@webflow/webflow-cli 1.22.0-next.3 → 1.23.0
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/CHANGELOG.md +29 -0
- package/dist/index.js +106 -137
- package/dist/index.js.map +1 -1
- package/package.json +2 -6
- package/dist/cloud-scaffolds/astro/.vscode/extensions.json +0 -4
- package/dist/cloud-scaffolds/astro/.vscode/launch.json +0 -11
- package/dist/cloud-scaffolds/astro/.vscode/settings.json +0 -5
- package/dist/cloud-scaffolds/astro/public/.assetsignore +0 -2
- package/dist/cloud-scaffolds/nextjs/.vscode/settings.json +0 -5
package/dist/index.js
CHANGED
|
@@ -1,91 +1,60 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var Xm=Object.create;var Ji=Object.defineProperty;var Qm=Object.getOwnPropertyDescriptor;var eg=Object.getOwnPropertyNames;var tg=Object.getPrototypeOf,rg=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var Gi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ic=(e,t)=>{for(var r in t)Ji(e,r,{get:t[r],enumerable:!0})},ng=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of eg(t))!rg.call(e,o)&&o!==r&&Ji(e,o,{get:()=>t[o],enumerable:!(n=Qm(t,o))||n.enumerable});return e};var h=(e,t,r)=>(r=e!=null?Xm(tg(e)):{},ng(t||!e||!e.__esModule?Ji(r,"default",{value:e,enumerable:!0}):r,e));function cg(){let e=new Map;for(let[t,r]of Object.entries(te)){for(let[n,o]of Object.entries(r))te[n]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},r[n]=te[n],e.set(o[0],o[1]);Object.defineProperty(te,t,{value:r,enumerable:!1})}return Object.defineProperty(te,"codes",{value:e,enumerable:!1}),te.color.close="\x1B[39m",te.bgColor.close="\x1B[49m",te.color.ansi=$c(),te.color.ansi256=Rc(),te.color.ansi16m=jc(),te.bgColor.ansi=$c(10),te.bgColor.ansi256=Rc(10),te.bgColor.ansi16m=jc(10),Object.defineProperties(te,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(i=>i+i).join(""));let o=Number.parseInt(n,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>te.rgbToAnsi256(...te.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,o;if(t>=232)r=((t-232)*10+8)/255,n=r,o=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,o=a%6/5}let i=Math.max(r,n,o)*2;if(i===0)return 30;let s=30+(Math.round(o)<<2|Math.round(n)<<1|Math.round(r));return i===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>te.ansi256ToAnsi(te.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>te.ansi256ToAnsi(te.hexToAnsi256(t)),enumerable:!1}}),te}var $c,Rc,jc,te,KD,sg,ag,ZD,lg,Ve,Bc=F(()=>{"use strict";$c=(e=0)=>t=>`\x1B[${t+e}m`,Rc=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,jc=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,te={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]}},KD=Object.keys(te.modifier),sg=Object.keys(te.color),ag=Object.keys(te.bgColor),ZD=[...sg,...ag];lg=cg(),Ve=lg});function Ie(e,t=globalThis.Deno?globalThis.Deno.args:po.default.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}function ug(){if("FORCE_COLOR"in ne)return ne.FORCE_COLOR==="true"?1:ne.FORCE_COLOR==="false"?0:ne.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ne.FORCE_COLOR,10),3)}function dg(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function fg(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=ug();n!==void 0&&(fo=n);let o=r?fo:n;if(o===0)return 0;if(r){if(Ie("color=16m")||Ie("color=full")||Ie("color=truecolor"))return 3;if(Ie("color=256"))return 2}if("TF_BUILD"in ne&&"AGENT_NAME"in ne)return 1;if(e&&!t&&o===void 0)return 0;let i=o||0;if(ne.TERM==="dumb")return i;if(po.default.platform==="win32"){let s=Mc.default.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in ne)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in ne)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in ne)||ne.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in ne)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ne.TEAMCITY_VERSION)?1:0;if(ne.COLORTERM==="truecolor"||ne.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in ne){let s=Number.parseInt((ne.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ne.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ne.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ne.TERM)||"COLORTERM"in ne?1:i}function Nc(e,t={}){let r=fg(e,{streamIsTTY:e&&e.isTTY,...t});return dg(r)}var po,Mc,zi,ne,fo,pg,Lc,Wc=F(()=>{"use strict";po=h(require("process"),1),Mc=h(require("os"),1),zi=h(require("tty"),1);({env:ne}=po.default);Ie("no-color")||Ie("no-colors")||Ie("color=false")||Ie("color=never")?fo=0:(Ie("color")||Ie("colors")||Ie("color=true")||Ie("color=always"))&&(fo=1);pg={stdout:Nc({isTTY:zi.default.isatty(1)}),stderr:Nc({isTTY:zi.default.isatty(2)})},Lc=pg});function Uc(e,t,r){let n=e.indexOf(t);if(n===-1)return e;let o=t.length,i=0,s="";do s+=e.slice(i,n)+t+r,i=n+o,n=e.indexOf(t,i);while(n!==-1);return s+=e.slice(i),s}function Vc(e,t,r,n){let o=0,i="";do{let s=e[n-1]==="\r";i+=e.slice(o,s?n-1:n)+t+(s?`\r
|
|
3
3
|
`:`
|
|
4
|
-
`)+
|
|
5
|
-
`,o)}while(
|
|
6
|
-
`);return i!==-1&&(t=
|
|
7
|
-
${t}`,cv=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),uv=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),dv=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,o=lv.bind(null,r,t.toString());Object.defineProperty(o,"name",uv);let{writable:i,enumerable:s,configurable:a}=cv;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a})}});var pi,hd,yd,wd=O(()=>{"use strict";gd();pi=new WeakMap,hd=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,o=e.displayName||e.name||"<anonymous>",i=function(...s){if(pi.set(i,++r),r===1)n=e.apply(this,s),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return n};return ha(i,e),pi.set(i,r),i};hd.callCount=e=>{if(!pi.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return pi.get(e)};yd=hd});var Dn,bd=O(()=>{"use strict";Dn=[];Dn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Dn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Dn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});var fi,ya,wa,pv,ba,mi,fv,Da,va,ka,Dd,UA,zA,vd=O(()=>{"use strict";bd();fi=e=>!!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",ya=Symbol.for("signal-exit emitter"),wa=globalThis,pv=Object.defineProperty.bind(Object),ba=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(wa[ya])return wa[ya];pv(wa,ya,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){let r=this.listeners[t],o=r.indexOf(n);o!==-1&&(o===0&&r.length===1?r.length=0:r.splice(o,1))}emit(t,n,r){if(this.emitted[t])return!1;this.emitted[t]=!0;let o=!1;for(let i of this.listeners[t])o=i(n,r)===!0||o;return t==="exit"&&(o=this.emit("afterExit",n,r)||o),o}},mi=class{},fv=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),Da=class extends mi{onExit(){return()=>{}}load(){}unload(){}},va=class extends mi{#s=ka.platform==="win32"?"SIGINT":"SIGHUP";#n=new ba;#e;#o;#p;#t={};#i=!1;constructor(t){super(),this.#e=t,this.#t={};for(let n of Dn)this.#t[n]=()=>{let r=this.#e.listeners(n),{count:o}=this.#n,i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(o+=i.__signal_exit_emitter__.count),r.length===o){this.unload();let s=this.#n.emit("exit",null,n),a=n==="SIGHUP"?this.#s:n;s||t.kill(t.pid,a)}};this.#p=t.reallyExit,this.#o=t.emit}onExit(t,n){if(!fi(this.#e))return()=>{};this.#i===!1&&this.load();let r=n?.alwaysLast?"afterExit":"exit";return this.#n.on(r,t),()=>{this.#n.removeListener(r,t),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#n.count+=1;for(let t of Dn)try{let n=this.#t[t];n&&this.#e.on(t,n)}catch{}this.#e.emit=(t,...n)=>this.#f(t,...n),this.#e.reallyExit=t=>this.#r(t)}}unload(){this.#i&&(this.#i=!1,Dn.forEach(t=>{let n=this.#t[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,n)}catch{}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#p,this.#n.count-=1)}#r(t){return fi(this.#e)?(this.#e.exitCode=t||0,this.#n.emit("exit",this.#e.exitCode,null),this.#p.call(this.#e,this.#e.exitCode)):0}#f(t,...n){let r=this.#o;if(t==="exit"&&fi(this.#e)){typeof n[0]=="number"&&(this.#e.exitCode=n[0]);let o=r.call(this.#e,t,...n);return this.#n.emit("exit",this.#e.exitCode,null),o}else return r.call(this.#e,t,...n)}},ka=globalThis.process,{onExit:Dd,load:UA,unload:zA}=fv(fi(ka)?new va(ka):new Da)});var so,kd,mv,xd,Cd=O(()=>{"use strict";so=w(require("process"),1);wd();vd();kd=so.default.stderr.isTTY?so.default.stderr:so.default.stdout.isTTY?so.default.stdout:void 0,mv=kd?yd(()=>{Dd(()=>{kd.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},xd=mv});var xa,gi,lr,Ca,Ed=O(()=>{"use strict";xa=w(require("process"),1);Cd();gi=!1,lr={};lr.show=(e=xa.default.stderr)=>{e.isTTY&&(gi=!1,e.write("\x1B[?25h"))};lr.hide=(e=xa.default.stderr)=>{e.isTTY&&(xd(),gi=!0,e.write("\x1B[?25l"))};lr.toggle=(e,t)=>{e!==void 0&&(gi=e),gi?lr.show(t):lr.hide(t)};Ca=lr});var Fd=da((KA,gv)=>{gv.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var Ea=da((YA,_d)=>{"use strict";var hi=Object.assign({},Fd()),Sd=Object.keys(hi);Object.defineProperty(hi,"random",{get(){let e=Math.floor(Math.random()*Sd.length),t=Sd[e];return hi[t]}});_d.exports=hi});function Fa(){return qe.default.platform!=="win32"?qe.default.env.TERM!=="linux":!!qe.default.env.CI||!!qe.default.env.WT_SESSION||!!qe.default.env.TERMINUS_SUBLIME||qe.default.env.ConEmuTask==="{cmd::Cmder}"||qe.default.env.TERM_PROGRAM==="Terminus-Sublime"||qe.default.env.TERM_PROGRAM==="vscode"||qe.default.env.TERM==="xterm-256color"||qe.default.env.TERM==="alacritty"||qe.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var qe,Ad=O(()=>{"use strict";qe=w(require("process"),1)});var hv,yv,wv,ao,Td=O(()=>{"use strict";_e();Ad();hv={info:E.blue("\u2139"),success:E.green("\u2714"),warning:E.yellow("\u26A0"),error:E.red("\u2716")},yv={info:E.blue("i"),success:E.green("\u221A"),warning:E.yellow("\u203C"),error:E.red("\xD7")},wv=Fa()?hv:yv,ao=wv});function Sa({onlyFirst:e=!1}={}){let o="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(o,e?void 0:"g")}var Od=O(()=>{"use strict"});function lo(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(bv,"")}var bv,_a=O(()=>{"use strict";Od();bv=Sa()});function Pd(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Id(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function jd(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Rd=O(()=>{"use strict"});function Dv(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function $d(e,{ambiguousAsWide:t=!1}={}){return Dv(e),Id(e)||jd(e)||t&&Pd(e)?2:1}var Bd=O(()=>{"use strict";Rd()});var Nd,Ld=O(()=>{"use strict";Nd=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\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?|[\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](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});function Aa(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=lo(e)),e.length===0)return 0;let o=0,i={ambiguousAsWide:!n};for(let{segment:s}of vv.segment(e)){let a=s.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!kv.test(s)){if(Nd().test(s)){o+=2;continue}o+=$d(a,i)}}return o}var vv,kv,Md=O(()=>{"use strict";_a();Bd();Ld();vv=new Intl.Segmenter,kv=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u")});function Ta({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var Wd=O(()=>{"use strict"});function Pa(){let{env:e}=Oa.default,{TERM:t,TERM_PROGRAM:n}=e;return Oa.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||n==="Terminus-Sublime"||n==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Oa,Ud=O(()=>{"use strict";Oa=w(require("process"),1)});var st,xv,Ia,Cv,ja,zd=O(()=>{"use strict";st=w(require("process"),1),xv=3,Ia=class{#s=0;start(){this.#s++,this.#s===1&&this.#n()}stop(){if(this.#s<=0)throw new Error("`stop` called more times than `start`");this.#s--,this.#s===0&&this.#e()}#n(){st.default.platform==="win32"||!st.default.stdin.isTTY||(st.default.stdin.setRawMode(!0),st.default.stdin.on("data",this.#o),st.default.stdin.resume())}#e(){st.default.stdin.isTTY&&(st.default.stdin.off("data",this.#o),st.default.stdin.pause(),st.default.stdin.setRawMode(!1))}#o(t){t[0]===xv&&st.default.emit("SIGINT")}},Cv=new Ia,ja=Cv});function cr(e){return new Ra(e)}var co,uo,Ev,Ra,$a=O(()=>{"use strict";co=w(require("process"),1);_e();Ed();uo=w(Ea(),1);Td();_a();Md();Wd();Ud();zd();Ev=w(Ea(),1),Ra=class{#s=0;#n=!1;#e=0;#o=-1;#p=0;#t;#i;#r;#f;#g;#c;#u;#d;#h;#a;#l;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:co.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#g=this.#t.interval,this.#r=this.#t.stream,this.#c=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:Ta({stream:this.#r}),this.#u=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,co.default.env.NODE_ENV==="test"&&(this._stream=this.#r,this._isEnabled=this.#c,Object.defineProperty(this,"_linesToClear",{get(){return this.#s},set(n){this.#s=n}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#o}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#d}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#d=t,this.#m()}get interval(){return this.#g??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#o=-1,this.#g=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#i=t}else if(!Pa())this.#i=uo.default.line;else if(t===void 0)this.#i=uo.default.dots;else if(t!=="default"&&uo.default[t])this.#i=uo.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#h}set text(t=""){this.#h=t,this.#m()}get prefixText(){return this.#a}set prefixText(t=""){this.#a=t,this.#m()}get suffixText(){return this.#l}set suffixText(t=""){this.#l=t,this.#m()}get isSpinning(){return this.#f!==void 0}#y(t=this.#a,n=" "){return typeof t=="string"&&t!==""?t+n:typeof t=="function"?t()+n:""}#w(t=this.#l,n=" "){return typeof t=="string"&&t!==""?n+t:typeof t=="function"?n+t():""}#m(){let t=this.#r.columns??80,n=this.#y(this.#a,"-"),r=this.#w(this.#l,"-"),o=" ".repeat(this.#d)+n+"--"+this.#h+"--"+r;this.#e=0;for(let i of lo(o).split(`
|
|
8
|
-
`))this.#e+=Math.max(1,Math.ceil(
|
|
9
|
-
`),this)}stop(){return this.#
|
|
10
|
-
`;return this.stop(),this.#r.write(u),this}}});function La(e,{suffix:t="nodejs"}={}){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),yi.default.platform==="darwin"?Fv(e):yi.default.platform==="win32"?Sv(e):_v(e)}var de,Ba,yi,Vt,Na,ur,Fv,Sv,_v,Vd=O(()=>{"use strict";de=w(require("path"),1),Ba=w(require("os"),1),yi=w(require("process"),1),Vt=Ba.default.homedir(),Na=Ba.default.tmpdir(),{env:ur}=yi.default,Fv=e=>{let t=de.default.join(Vt,"Library");return{data:de.default.join(t,"Application Support",e),config:de.default.join(t,"Preferences",e),cache:de.default.join(t,"Caches",e),log:de.default.join(t,"Logs",e),temp:de.default.join(Na,e)}},Sv=e=>{let t=ur.APPDATA||de.default.join(Vt,"AppData","Roaming"),n=ur.LOCALAPPDATA||de.default.join(Vt,"AppData","Local");return{data:de.default.join(n,e,"Data"),config:de.default.join(t,e,"Config"),cache:de.default.join(n,e,"Cache"),log:de.default.join(n,e,"Log"),temp:de.default.join(Na,e)}},_v=e=>{let t=de.default.basename(Vt);return{data:de.default.join(ur.XDG_DATA_HOME||de.default.join(Vt,".local","share"),e),config:de.default.join(ur.XDG_CONFIG_HOME||de.default.join(Vt,".config"),e),cache:de.default.join(ur.XDG_CACHE_HOME||de.default.join(Vt,".cache"),e),log:de.default.join(ur.XDG_STATE_HOME||de.default.join(Vt,".local","state"),e),temp:de.default.join(Na,t,e)}}});function wi(){return/[<>:"/\\|?*\u0000-\u001F]/g}function Jd(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}var qd=O(()=>{"use strict"});function po(e,t={}){let n=/[\u0000-\u001F\u0080-\u009F]/g,r=/([<>:"/\\|?*\u0000-\u001F]){2,}/g;if(typeof e!="string")throw new TypeError("Expected a string");let o=t.replacement===void 0?"!":t.replacement;if(wi().test(o)&&n.test(o))throw new Error("Replacement string cannot contain reserved filename characters");o.length>0&&(e=e.replace(r,"$1")),e=e.normalize("NFD"),e=e.replace(Tv,o),e=e.replace(wi(),o),e=e.replace(n,o),e=e.replace(Ov,""),o.length>0&&(!(e[0]===".")&&e[0]==="."&&(e=o+e),e[e.length-1]==="."&&(e+=o)),e=Jd().test(e)?e+o:e;let i=typeof t.maxLength=="number"?t.maxLength:Av;if(e.length>i){let s=e.lastIndexOf(".");if(s===-1)e=e.slice(0,i);else{let a=e.slice(0,s),l=e.slice(s);e=a.slice(0,Math.max(1,i-l.length))+l}}return e}var Av,Tv,Ov,Ma=O(()=>{"use strict";qd();Av=100,Tv=/^\.+(\\|\/)|^\.+$/,Ov=/\.+$/});var Pv,Gd=O(()=>{"use strict";Pv=w(require("path"),1);Ma()});var Hd=O(()=>{"use strict";Ma();Gd()});var bi,Wa=O(()=>{"use strict";bi="webflow.json"});var vn,Ua=O(()=>{"use strict";vn=class extends Error{constructor(t){super(`Manifest config for key "${t}" not found`),this.name="ManifestConfigKeyNotFoundError"}}});function Kd(e){za=e}function oe(){return za}function mt(){return!za}function Yd(e){Zd=e}function Xd(){return Zd}var za,Zd,Oe=O(()=>{"use strict";za=!1});function kn(){let e=Xd();if(e){if(e.endsWith(".json"))return{path:e,isUserDefined:!0};try{if((0,Qd.statSync)(e)?.isDirectory())return{path:(0,ep.join)(e,bi),isUserDefined:!0}}catch{if(e.endsWith(".json"))return{path:e,isUserDefined:!0}}throw new Error(`Manifest path must be either a directory or a .json file. Got: ${e}`)}return{path:`./${bi}`,isUserDefined:!1}}var Qd,ep,Va=O(()=>{"use strict";Qd=require("fs"),ep=require("path");Wa();Oe()});var tp,Iv,jv,Ja,np=O(()=>{"use strict";tp=w(require("ajv")),Iv=new tp.default,jv={type:"object",properties:{library:{type:"object",properties:{name:{type:"string",minLength:1},id:{type:"string",minLength:1},components:{type:"array",items:{type:"string"},minItems:1},renderer:{anyOf:[{type:"object",properties:{client:{type:"string",minLength:1},server:{type:"string",minLength:1}}},{type:"string",minLength:1}]},globals:{type:"string",minLength:1}},required:[]},devlink:{type:"object",properties:{rootDir:{type:"string",minLength:1},cssModules:{type:"boolean"},allowTelemetry:{type:"boolean"},overwriteModule:{type:"boolean"},skipTagSelectors:{type:"boolean"},envVariables:{type:"object",additionalProperties:{type:"string"}},components:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},fileExtensions:{type:"object",properties:{js:{type:"string"},css:{type:"string"}}},relativeHrefRoot:{oneOf:[{type:"boolean"},{type:"string"}]}},required:["rootDir"]},"devlink-export":{type:"object",properties:{rootDir:{type:"string",minLength:1},components:{type:"string"},componentGroups:{type:"string"},ts:{type:"boolean"},cssScopes:{type:"boolean"},relativeHrefRoot:{oneOf:[{type:"boolean",const:!1},{type:"string"}]},treeShake:{type:"boolean"}},required:[]}}},Ja=Iv.compile(jv)});function rp(e){return e instanceof Error?e:new Error("Unknown error")}function Q(){let{path:e}=kn();if(!(0,Di.existsSync)(e))return{manifest:{},manifestPath:e};let t;try{t=(0,Di.readFileSync)(e,"utf8")}catch(o){throw new Error(`Failed to read manifest file: ${rp(o).message}`)}if(t.trim()==="")return{manifest:{},manifestPath:e};let r;try{r=JSON.parse(t)}catch(o){throw new Error(`Invalid JSON in manifest file: ${rp(o).message}`)}if(!Ja(r)){let o=Ja.errors?.map(i=>`${i.instancePath} ${i.message}`).join(", ")||"Unknown error";throw new Error(`Invalid manifest: ${o}.`)}return{manifest:r,manifestPath:e}}var Di,vi=O(()=>{"use strict";Di=require("fs");Va();np()});function fo(e,t){let n=e[t];if(!n)throw new vn(t);return n}var op=O(()=>{"use strict";Ua()});function se(e){let t=Q(),n=t.manifest,r=t.manifestPath,o={...n};for(let i in e){let s=i,a=e[s];if(a!==void 0)if(typeof a=="string"||typeof a=="number"||typeof a=="boolean"||a===null)o[s]=a;else{let l=o[s];o[s]={...typeof l=="object"&&l!==null?l:{},...a}}}return(0,ip.writeFileSync)(r,JSON.stringify(o,null,2),"utf-8"),o}var ip,qa=O(()=>{"use strict";ip=require("fs");vi()});var ke=O(()=>{"use strict";Wa();Ua();vi();Va();op();qa()});var ki=da((rO,Rv)=>{Rv.exports={name:"@webflow/webflow-cli",version:"1.22.0-next.3",license:"MIT",bin:{webflow:"./dist/index.js"},scripts:{build:"tsup",dev:"tsup",lint:"eslint .",test:"jest --ci","test:unit":"jest --ci --ignoreProjects e2e","test:local":"jest","test:e2e-cache-clear":"bash scripts/clear-e2e-cache.sh"},files:["CHANGELOG.md","dist/**/*"],publishConfig:{access:"public"},dependencies:{"@babel/preset-env":"^7.26.9","@babel/preset-react":"^7.26.3","@babel/preset-typescript":"^7.27.0","@dotenvx/dotenvx":"^1.44.1","@inquirer/prompts":"^7.9.0","@module-federation/enhanced":"0.20.0","@rspack/core":"^1.7.8","@webflow/data-types":"*",ajv:"^8.17.1",archiver:"^5.3.1","babel-loader":"^10.0.0",commander:"^10.0.0",cosmiconfig:"^8.2.0","css-loader":"^7.1.2","css-tree":"^2.3.1",dotenv:"^16.0.3","env-paths":"^3.0.0","fast-glob":"^3.3.3",filenamify:"^6.0.0","fork-ts-checker-webpack-plugin":"9.1.0","form-data":"4.0.4","fs-extra":"^11.3.0",jsdom:"^26.0.0","jsonc-parser":"^3.2.0",md5:"^2.2.1",memfs:"4.17.0","mime-types":"^2.1.35","mini-css-extract-plugin":"^2.9.2","node-fetch":"^2.6.7",open:"^8.4.2",ora:"^8.2.0",postcss:"^8.5.6","postcss-loader":"^8.1.1","postcss-selector-parser":"^7.1.0",prettier:"^2.7.1",semver:"^7.7.2","serve-handler":"^6.1.5","source-map-support":"^0.5.21",tar:"^7.4.3","ts-checker-rspack-plugin":"^1.0.0","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.2.0",unionfs:"^4.5.4","webflow-api":"3.3.4",webpack:">=5.99.7 <5.106.0","webpack-merge":"^6.0.1","webpack-node-externals":"^3.0.0",zod:"^3.22.4"},devDependencies:{"@types/archiver":"^5.3.2","@types/css-tree":"^2.3.1","@types/express":"^4.17.13","@types/fs-extra":"^11.0.4","@types/jest":"^29.2.3","@types/md5":"^2.3.2","@types/mime-types":"^2.1.4","@types/nock":"^8.0.33","@types/node":"^18.16.0","@types/node-fetch":"2.6.13","@types/prettier":"^2.7.1","@types/serve-handler":"^6.1.1","@types/source-map":"^0.5.2","@types/webpack-node-externals":"^3.0.4",astro:"^5.17.2","eslint-config-custom":"*",express:"^4.18.1",jest:"^29.3.1",nock:"13.3.1",tar:"^7.4.3","ts-jest":"^29.0.3","ts-node":"^10.9.1",tsconfig:"*",tsup:"^8.4.0",typescript:"^4.9.3"},engines:{node:">=18.16.0"}}});function _t(){try{return ki().version}catch{return"unknown"}}function gt(e=""){if(!e)return"";let t=e;t=t.replace(/\/.*?\/webflow-cli/gi,"/REDACTED_PII/webflow-cli"),t=t.replace(/\/.*?\/node_modules/gi,"/REDACTED_PII/node_modules");let n=mo.default.homedir();if(n){let o=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");t=t.replace(o,"~/REDACTED_PII")}let r=mo.default.userInfo().username;if(r){let o=new RegExp(`/Users/${r}`,"gi");t=t.replace(o,"/Users/REDACTED_PII")}return t=t.replace(/\/Users\/[^\/\s]+/gi,"/Users/REDACTED_PII"),t=t.replace(/C:\\Users\\[^\\]+/gi,"C:\\Users\\REDACTED_PII"),t=t.replace(/[a-zA-Z0-9]{32,}/g,"[REDACTED_TOKEN]"),t=t.replace(/Bearer\s+[^\s]+/gi,"Bearer [REDACTED_TOKEN]"),t=t.replace(/token[=:]\s*[^\s]+/gi,"token=[REDACTED_TOKEN]"),t=t.replace(/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,"[REDACTED_EMAIL]"),t=t.replace(/\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,"[REDACTED_IP]"),t}function Ga(e){if(e.stack)return gt(e.stack)}function Jt(e){let t=["password","token","secret","key","auth","bearer","authorization","apikey","api_key","access_token","refresh_token","client_secret","private_key"],n={};for(let[r,o]of Object.entries(e)){let i=r.toLowerCase();t.some(s=>i.includes(s))?n[r]="[REDACTED]":typeof o=="string"?n[r]=gt(o):typeof o=="object"&&o!==null&&!Array.isArray(o)?n[r]=Jt(o):Array.isArray(o)?n[r]=o.map(s=>typeof s=="object"&&s!==null?Jt(s):typeof s=="string"?gt(s):s):n[r]=o}return n}function sp(){return{platform:process.platform,nodeVersion:process.version,arch:process.arch,os:`${mo.default.type()} ${mo.default.release()}`}}function Ha(){let e=Date.now().toString(36),t=Math.random().toString(36).substring(2,8);return`${e}-${t}`}var mo,go=O(()=>{"use strict";mo=w(require("os"))});var ee,N,At,dr,Za,pr,Ce=O(()=>{"use strict";_e();ee=E.green("\u2714"),N=E.red("\u2716"),At=E.cyan("\u2139"),dr=E.green("\u279C"),Za=E.red("\u279C"),pr=E.yellow("\u26A0")});var qt,Ka=O(()=>{"use strict";_e();ke();go();J();Ce();qt=class e{static instance;cache=void 0;static isDoNotTrackEnabled(){let t=process.env.DO_NOT_TRACK;return t==="1"||t?.toLowerCase()==="true"}static getInstance(){return e.instance||(e.instance=new e),e.instance}async getPreference(){if(e.isDoNotTrackEnabled())return!1;if(this.cache!==void 0)return this.cache;try{let{manifest:t}=await Q(),n=t?.telemetry?.global?.allowTelemetry;return this.cache=n,n}catch{return}}async setPreference(t){this.cache=t,await this.setGlobalPreference(t)}async promptForConsent(t){return e.isDoNotTrackEnabled()?(d.info(`${At} Telemetry is disabled because the DO_NOT_TRACK environment variable is set.`),!1):(d.info(`${At} Telemetry is enabled. Usage data and error reports help us improve Webflow CLI.`),d.info(`${At} To opt out, run: ${E.blue("webflow auth telemetry --disable")}`),await this.setPreference(!0),!0)}clearCache(){this.cache=void 0}async getGlobalPreference(){return this.getPreference()}async setGlobalPreference(t){let n={telemetry:{global:{allowTelemetry:t,lastPrompted:Date.now(),version:_t()}}};await se(n),this.cache=t}async hasGlobalPreference(){return await this.getPreference()!==void 0}async getTelemetryStatus(){let t=await this.getPreference();return t!==void 0?{enabled:t,source:"global",hasPreference:!0}:{enabled:!1,source:"none",hasPreference:!1}}setCacheValue(t,n){this.cache=n}}});async function K(e,t){let r={"User-Agent":`webflow-cli@${_t()}`};return(0,ap.default)(e,{...t,headers:{...t?.headers,...r}})}var ap,ht=O(()=>{"use strict";ap=w(require("node-fetch"));Be()});var lp,cp=O(()=>{"use strict";lp=e=>{try{let t=new URL(e);return!(!["http:","https:"].includes(t.protocol)||e.includes("?")||e.includes("#")||t.search||t.hash)}catch{return!1}}});var Ya,I,xi,fr,ho,Xa,yo,wo,mr,le=O(()=>{"use strict";cp();Ya=(e,t)=>(lp(t)||(console.error(`Error: Invalid ${e} environment variable. Only valid plain HTTP/HTTPS URLs without query parameters and anchors is allowed.`),process.exit(1)),t),I=process.env.WEBFLOW_API_HOST?Ya("WEBFLOW_API_HOST",process.env.WEBFLOW_API_HOST):"https://api.webflow.com",xi=process.env.WEBFLOW_CDN_API_HOST?Ya("WEBFLOW_CDN_API_HOST",process.env.WEBFLOW_CDN_API_HOST):"https://api-cdn.webflow.com",fr=process.env.WEBFLOW_HOST?Ya("WEBFLOW_HOST",process.env.WEBFLOW_HOST):"https://webflow.com",ho="wf-manifest.json",Xa="mf-manifest.json",yo="@webflow_renderer",wo="ssr-bundle.tar",mr="index.js"});var G,Qa=O(()=>{"use strict";Ka();go();J();ht();le();G=class e{config;consentManager;sessionId;platformInfo;constructor(t){this.config=t,this.consentManager=qt.getInstance(),this.sessionId=Ha(),this.platformInfo=sp()}async sendEvent(t){try{if(!await this.isEnabled())return;let n=this.enrichEvent(t),r=this.sanitizeEvent(n);await this.transmitEvent(r)}catch(n){d.debug(`Failed to send telemetry event: ${n}`)}}async sendError(t,n,r){await this.sendEvent({eventType:"error",success:!1,name:t.name,message:t.message,cause:t.cause,stack:Ga(t),context:n,metadata:r?Jt(r):void 0})}async sendUsage(t,n){let{duration:r,...o}=n??{};await this.sendEvent({eventType:"usage",success:!0,feature:t,duration:typeof r=="number"?r:void 0,data:Object.keys(o).length>0?Jt(o):void 0})}async sendPerformance(t,n,r){await this.sendEvent({eventType:"performance",operation:t,duration:n,metrics:r})}async isEnabled(){return await this.consentManager.getPreference()!==!1}async isGloballyEnabled(){return await this.consentManager.getGlobalPreference()!==!1}async updatePreferences(t){await this.consentManager.setPreference(t)}static async promptForConsentIfNeeded(t){let n=qt.getInstance(),r=await n.getPreference();return r!==void 0?r:await n.promptForConsent(t)}enrichEvent(t){return{...{eventType:t.eventType||"usage",timestamp:Date.now(),sessionId:this.sessionId,platform:this.platformInfo.platform,nodeVersion:this.platformInfo.nodeVersion,cliVersion:_t(),command:process.argv.slice(2).join(" ")||void 0,metadata:{...t.metadata,commandType:this.config.commandType,siteId:this.config.siteId,projectId:this.config.projectId,os:this.platformInfo.os,arch:this.platformInfo.arch}},...t}}sanitizeEvent(t){let n=JSON.parse(JSON.stringify(t));return n.message&&(n.message=gt(n.message)),n.stack&&(n.stack=gt(n.stack)),n.context&&(n.context=gt(n.context)),n.metadata&&(n.metadata=Jt(n.metadata)),n.data&&(n.data=Jt(n.data)),n}async transmitEvent(t){let n=this.getEndpoint(),r=process.env.WEBFLOW_TELEMETRY_DEBUG==="true";if(r){console.log(`\u{1F4CA} [Telemetry] Sending to: ${n}`);let i={...t};i.metadata&&(delete i.metadata.authToken,delete i.metadata.apiToken),console.log("\u{1F4CA} [Telemetry] Payload:",JSON.stringify(i,null,2))}let o=await K(n,{method:"POST",headers:{Authorization:`Bearer ${this.config.authToken}`,"Content-Type":"application/json"},body:JSON.stringify(t),timeout:5e3});if(o.ok)r&&console.log(`\u{1F4CA} [Telemetry] Request successful: ${o.status}`);else throw r&&console.error(`\u{1F4CA} [Telemetry] Request failed: ${o.status} ${o.statusText}`),new Error(`Telemetry request failed: ${o.status} ${o.statusText}`)}getEndpoint(){let{host:t,commandType:n}=this.config;return`${t}/webflow-cli/${n}/telemetry`}static forDevlinkSync(t){return new e({host:t.host||I,authToken:t.authToken,siteId:t.siteId,commandType:"devlink"})}static forExport(t){return new e({host:t.host||I,authToken:t.authToken,siteId:t.siteId,commandType:"export"})}static forCloud(t){return new e({host:t.host||I,authToken:t.authToken,siteId:t.siteId,projectId:t.projectId,commandType:"cloud"})}static forExtension(t){return new e({host:t.host||I,authToken:t.authToken,siteId:t.siteId,commandType:"extension"})}static forCodeLibraries(t){return new e({host:t.host||I,authToken:t.authToken,commandType:"library"})}static forCms(t){return new e({host:t.host||I,authToken:t.authToken,siteId:t.siteId,commandType:"cms"})}static forAssets(t){return new e({host:t.host||I,authToken:t.authToken,siteId:t.siteId,commandType:"assets"})}static forSites(t){return new e({host:t.host||I,authToken:t.authToken,commandType:"sites"})}static forForms(t){return new e({host:t.host||I,authToken:t.authToken,commandType:"forms"})}}});var up=O(()=>{"use strict"});function dp(e){return async(t,n,r)=>{let o=Date.now(),i=process.memoryUsage().heapUsed;try{let s=await n(),a=Date.now()-o,l=process.memoryUsage().heapUsed;return await e.sendPerformance(t,a,{memoryDelta:l-i,...r}),s}catch(s){let a=Date.now()-o;throw await e.sendPerformance(t,a,{failed:1,...r}),s}}}var Be=O(()=>{"use strict";Qa();Ka();up();go();go()});var tl,el,$v,Tt,nl=O(()=>{"use strict";tl=Symbol("webflow-cli-warn"),el=class{warnings=[];originalConsoleWarn=null;isActive=!1;parseSource(t){let n=t.split(`
|
|
11
|
-
`);for(let
|
|
4
|
+
`)+r,o=n+1,n=e.indexOf(`
|
|
5
|
+
`,o)}while(n!==-1);return i+=e.slice(o),i}var Jc=F(()=>{"use strict"});function Dn(e){return gg(e)}var Gc,zc,qi,Sr,wn,qc,Tr,mg,gg,Hi,hg,yg,Ki,mo,wg,Dg,nb,D,he=F(()=>{"use strict";Bc();Wc();Jc();({stdout:Gc,stderr:zc}=Lc),qi=Symbol("GENERATOR"),Sr=Symbol("STYLER"),wn=Symbol("IS_EMPTY"),qc=["ansi","ansi","ansi256","ansi16m"],Tr=Object.create(null),mg=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Gc?Gc.level:0;e.level=t.level===void 0?r:t.level},gg=e=>{let t=(...r)=>r.join(" ");return mg(t,e),Object.setPrototypeOf(t,Dn.prototype),t};Object.setPrototypeOf(Dn.prototype,Function.prototype);for(let[e,t]of Object.entries(Ve))Tr[e]={get(){let r=mo(this,Ki(t.open,t.close,this[Sr]),this[wn]);return Object.defineProperty(this,e,{value:r}),r}};Tr.visible={get(){let e=mo(this,this[Sr],!0);return Object.defineProperty(this,"visible",{value:e}),e}};Hi=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?Ve[r].ansi16m(...n):t==="ansi256"?Ve[r].ansi256(Ve.rgbToAnsi256(...n)):Ve[r].ansi(Ve.rgbToAnsi(...n)):e==="hex"?Hi("rgb",t,r,...Ve.hexToRgb(...n)):Ve[r][e](...n),hg=["rgb","hex","ansi256"];for(let e of hg){Tr[e]={get(){let{level:r}=this;return function(...n){let o=Ki(Hi(e,qc[r],"color",...n),Ve.color.close,this[Sr]);return mo(this,o,this[wn])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Tr[t]={get(){let{level:r}=this;return function(...n){let o=Ki(Hi(e,qc[r],"bgColor",...n),Ve.bgColor.close,this[Sr]);return mo(this,o,this[wn])}}}}yg=Object.defineProperties(()=>{},{...Tr,level:{enumerable:!0,get(){return this[qi].level},set(e){this[qi].level=e}}}),Ki=(e,t,r)=>{let n,o;return r===void 0?(n=e,o=t):(n=r.openAll+e,o=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:o,parent:r}},mo=(e,t,r)=>{let n=(...o)=>wg(n,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(n,yg),n[qi]=e,n[Sr]=t,n[wn]=r,n},wg=(e,t)=>{if(e.level<=0||!t)return e[wn]?"":t;let r=e[Sr];if(r===void 0)return t;let{openAll:n,closeAll:o}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Uc(t,r.close,r.open),r=r.parent;let i=t.indexOf(`
|
|
6
|
+
`);return i!==-1&&(t=Vc(t,o,n,i)),n+t+o};Object.defineProperties(Dn.prototype,Tr);Dg=Dn(),nb=Dn({level:zc?zc.level:0}),D=Dg});function Zi(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(let o of Reflect.ownKeys(t))bg(e,t,o,r);return Fg(e,t),_g(e,t,n),e}var bg,vg,Fg,Eg,xg,Cg,_g,Hc=F(()=>{"use strict";bg=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let o=Object.getOwnPropertyDescriptor(e,r),i=Object.getOwnPropertyDescriptor(t,r);!vg(o,i)&&n||Object.defineProperty(e,r,i)},vg=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Fg=(e,t)=>{let r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},Eg=(e,t)=>`/* Wrapped ${e}*/
|
|
7
|
+
${t}`,xg=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Cg=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),_g=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,o=Eg.bind(null,n,t.toString());Object.defineProperty(o,"name",Cg);let{writable:i,enumerable:s,configurable:a}=xg;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a})}});var go,Kc,Zc,Yc=F(()=>{"use strict";Hc();go=new WeakMap,Kc=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0,o=e.displayName||e.name||"<anonymous>",i=function(...s){if(go.set(i,++n),n===1)r=e.apply(this,s),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return r};return Zi(i,e),go.set(i,n),i};Kc.callCount=e=>{if(!go.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return go.get(e)};Zc=Kc});var zt,Xc=F(()=>{"use strict";zt=[];zt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&zt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&zt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});var ho,Yi,Xi,kg,Qi,yo,Sg,es,ts,rs,Qc,ub,db,el=F(()=>{"use strict";Xc();ho=e=>!!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",Yi=Symbol.for("signal-exit emitter"),Xi=globalThis,kg=Object.defineProperty.bind(Object),Qi=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Xi[Yi])return Xi[Yi];kg(Xi,Yi,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],o=n.indexOf(r);o!==-1&&(o===0&&n.length===1?n.length=0:n.splice(o,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let o=!1;for(let i of this.listeners[t])o=i(r,n)===!0||o;return t==="exit"&&(o=this.emit("afterExit",r,n)||o),o}},yo=class{},Sg=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),es=class extends yo{onExit(){return()=>{}}load(){}unload(){}},ts=class extends yo{#s=rs.platform==="win32"?"SIGINT":"SIGHUP";#r=new Qi;#e;#o;#f;#t={};#i=!1;constructor(t){super(),this.#e=t,this.#t={};for(let r of zt)this.#t[r]=()=>{let n=this.#e.listeners(r),{count:o}=this.#r,i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(o+=i.__signal_exit_emitter__.count),n.length===o){this.unload();let s=this.#r.emit("exit",null,r),a=r==="SIGHUP"?this.#s:r;s||t.kill(t.pid,a)}};this.#f=t.reallyExit,this.#o=t.emit}onExit(t,r){if(!ho(this.#e))return()=>{};this.#i===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#r.on(n,t),()=>{this.#r.removeListener(n,t),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#r.count+=1;for(let t of zt)try{let r=this.#t[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#p(t,...r),this.#e.reallyExit=t=>this.#n(t)}}unload(){this.#i&&(this.#i=!1,zt.forEach(t=>{let r=this.#t[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#f,this.#r.count-=1)}#n(t){return ho(this.#e)?(this.#e.exitCode=t||0,this.#r.emit("exit",this.#e.exitCode,null),this.#f.call(this.#e,this.#e.exitCode)):0}#p(t,...r){let n=this.#o;if(t==="exit"&&ho(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let o=n.call(this.#e,t,...r);return this.#r.emit("exit",this.#e.exitCode,null),o}else return n.call(this.#e,t,...r)}},rs=globalThis.process,{onExit:Qc,load:ub,unload:db}=Sg(ho(rs)?new ts(rs):new es)});var bn,tl,Tg,rl,nl=F(()=>{"use strict";bn=h(require("process"),1);Yc();el();tl=bn.default.stderr.isTTY?bn.default.stderr:bn.default.stdout.isTTY?bn.default.stdout:void 0,Tg=tl?Zc(()=>{Qc(()=>{tl.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},rl=Tg});var ns,wo,Ar,os,ol=F(()=>{"use strict";ns=h(require("process"),1);nl();wo=!1,Ar={};Ar.show=(e=ns.default.stderr)=>{e.isTTY&&(wo=!1,e.write("\x1B[?25h"))};Ar.hide=(e=ns.default.stderr)=>{e.isTTY&&(rl(),wo=!0,e.write("\x1B[?25l"))};Ar.toggle=(e,t)=>{e!==void 0&&(wo=e),wo?Ar.show(t):Ar.hide(t)};os=Ar});var il=Gi((wb,Ag)=>{Ag.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var is=Gi((Db,al)=>{"use strict";var Do=Object.assign({},il()),sl=Object.keys(Do);Object.defineProperty(Do,"random",{get(){let e=Math.floor(Math.random()*sl.length),t=sl[e];return Do[t]}});al.exports=Do});function ss(){return Pe.default.platform!=="win32"?Pe.default.env.TERM!=="linux":!!Pe.default.env.CI||!!Pe.default.env.WT_SESSION||!!Pe.default.env.TERMINUS_SUBLIME||Pe.default.env.ConEmuTask==="{cmd::Cmder}"||Pe.default.env.TERM_PROGRAM==="Terminus-Sublime"||Pe.default.env.TERM_PROGRAM==="vscode"||Pe.default.env.TERM==="xterm-256color"||Pe.default.env.TERM==="alacritty"||Pe.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Pe,cl=F(()=>{"use strict";Pe=h(require("process"),1)});var Og,Ig,Pg,vn,ll=F(()=>{"use strict";he();cl();Og={info:D.blue("\u2139"),success:D.green("\u2714"),warning:D.yellow("\u26A0"),error:D.red("\u2716")},Ig={info:D.blue("i"),success:D.green("\u221A"),warning:D.yellow("\u203C"),error:D.red("\xD7")},Pg=ss()?Og:Ig,vn=Pg});function as({onlyFirst:e=!1}={}){let o="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(o,e?void 0:"g")}var ul=F(()=>{"use strict"});function Fn(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace($g,"")}var $g,cs=F(()=>{"use strict";ul();$g=as()});function dl(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function fl(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function pl(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var ml=F(()=>{"use strict"});function Rg(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function gl(e,{ambiguousAsWide:t=!1}={}){return Rg(e),fl(e)||pl(e)||t&&dl(e)?2:1}var hl=F(()=>{"use strict";ml()});var yl,wl=F(()=>{"use strict";yl=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\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?|[\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](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});function ls(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=Fn(e)),e.length===0)return 0;let o=0,i={ambiguousAsWide:!r};for(let{segment:s}of jg.segment(e)){let a=s.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!Bg.test(s)){if(yl().test(s)){o+=2;continue}o+=gl(a,i)}}return o}var jg,Bg,Dl=F(()=>{"use strict";cs();hl();wl();jg=new Intl.Segmenter,Bg=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u")});function us({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var bl=F(()=>{"use strict"});function fs(){let{env:e}=ds.default,{TERM:t,TERM_PROGRAM:r}=e;return ds.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ds,vl=F(()=>{"use strict";ds=h(require("process"),1)});var Je,Ng,ps,Mg,ms,Fl=F(()=>{"use strict";Je=h(require("process"),1),Ng=3,ps=class{#s=0;start(){this.#s++,this.#s===1&&this.#r()}stop(){if(this.#s<=0)throw new Error("`stop` called more times than `start`");this.#s--,this.#s===0&&this.#e()}#r(){Je.default.platform==="win32"||!Je.default.stdin.isTTY||(Je.default.stdin.setRawMode(!0),Je.default.stdin.on("data",this.#o),Je.default.stdin.resume())}#e(){Je.default.stdin.isTTY&&(Je.default.stdin.off("data",this.#o),Je.default.stdin.pause(),Je.default.stdin.setRawMode(!1))}#o(t){t[0]===Ng&&Je.default.emit("SIGINT")}},Mg=new ps,ms=Mg});function Or(e){return new gs(e)}var En,xn,Lg,gs,hs=F(()=>{"use strict";En=h(require("process"),1);he();ol();xn=h(is(),1);ll();cs();Dl();bl();vl();Fl();Lg=h(is(),1),gs=class{#s=0;#r=!1;#e=0;#o=-1;#f=0;#t;#i;#n;#p;#g;#l;#u;#d;#h;#a;#c;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:En.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#g=this.#t.interval,this.#n=this.#t.stream,this.#l=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:us({stream:this.#n}),this.#u=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,En.default.env.NODE_ENV==="test"&&(this._stream=this.#n,this._isEnabled=this.#l,Object.defineProperty(this,"_linesToClear",{get(){return this.#s},set(r){this.#s=r}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#o}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#d}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#d=t,this.#m()}get interval(){return this.#g??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#o=-1,this.#g=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#i=t}else if(!fs())this.#i=xn.default.line;else if(t===void 0)this.#i=xn.default.dots;else if(t!=="default"&&xn.default[t])this.#i=xn.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#h}set text(t=""){this.#h=t,this.#m()}get prefixText(){return this.#a}set prefixText(t=""){this.#a=t,this.#m()}get suffixText(){return this.#c}set suffixText(t=""){this.#c=t,this.#m()}get isSpinning(){return this.#p!==void 0}#y(t=this.#a,r=" "){return typeof t=="string"&&t!==""?t+r:typeof t=="function"?t()+r:""}#w(t=this.#c,r=" "){return typeof t=="string"&&t!==""?r+t:typeof t=="function"?r+t():""}#m(){let t=this.#n.columns??80,r=this.#y(this.#a,"-"),n=this.#w(this.#c,"-"),o=" ".repeat(this.#d)+r+"--"+this.#h+"--"+n;this.#e=0;for(let i of Fn(o).split(`
|
|
8
|
+
`))this.#e+=Math.max(1,Math.ceil(ls(i,{countAnsiEscapeCodes:!0})/t))}get isEnabled(){return this.#l&&!this.#u}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#l=t}get isSilent(){return this.#u}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#u=t}frame(){let t=Date.now();(this.#o===-1||t-this.#f>=this.interval)&&(this.#o=++this.#o%this.#i.frames.length,this.#f=t);let{frames:r}=this.#i,n=r[this.#o];this.color&&(n=D[this.color](n));let o=typeof this.#a=="string"&&this.#a!==""?this.#a+" ":"",i=typeof this.text=="string"?" "+this.text:"",s=typeof this.#c=="string"&&this.#c!==""?" "+this.#c:"";return o+n+i+s}clear(){if(!this.#l||!this.#n.isTTY)return this;this.#n.cursorTo(0);for(let t=0;t<this.#s;t++)t>0&&this.#n.moveCursor(0,-1),this.#n.clearLine(1);return(this.#d||this.lastIndent!==this.#d)&&this.#n.cursorTo(this.#d),this.lastIndent=this.#d,this.#s=0,this}render(){return this.#u?this:(this.clear(),this.#n.write(this.frame()),this.#s=this.#e,this)}start(t){return t&&(this.text=t),this.#u?this:this.#l?this.isSpinning?this:(this.#t.hideCursor&&os.hide(this.#n),this.#t.discardStdin&&En.default.stdin.isTTY&&(this.#r=!0,ms.start()),this.render(),this.#p=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#n.write(`- ${this.text}
|
|
9
|
+
`),this)}stop(){return this.#l?(clearInterval(this.#p),this.#p=void 0,this.#o=0,this.clear(),this.#t.hideCursor&&os.show(this.#n),this.#t.discardStdin&&En.default.stdin.isTTY&&this.#r&&(ms.stop(),this.#r=!1),this):this}succeed(t){return this.stopAndPersist({symbol:vn.success,text:t})}fail(t){return this.stopAndPersist({symbol:vn.error,text:t})}warn(t){return this.stopAndPersist({symbol:vn.warning,text:t})}info(t){return this.stopAndPersist({symbol:vn.info,text:t})}stopAndPersist(t={}){if(this.#u)return this;let r=t.prefixText??this.#a,n=this.#y(r," "),o=t.symbol??" ",i=t.text??this.text,a=typeof i=="string"?(o?" ":"")+i:"",c=t.suffixText??this.#c,l=this.#w(c," "),d=n+o+a+l+`
|
|
10
|
+
`;return this.stop(),this.#n.write(d),this}}});function Ds(e,{suffix:t="nodejs"}={}){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),bo.default.platform==="darwin"?Wg(e):bo.default.platform==="win32"?Ug(e):Vg(e)}var re,ys,bo,vt,ws,Ir,Wg,Ug,Vg,El=F(()=>{"use strict";re=h(require("path"),1),ys=h(require("os"),1),bo=h(require("process"),1),vt=ys.default.homedir(),ws=ys.default.tmpdir(),{env:Ir}=bo.default,Wg=e=>{let t=re.default.join(vt,"Library");return{data:re.default.join(t,"Application Support",e),config:re.default.join(t,"Preferences",e),cache:re.default.join(t,"Caches",e),log:re.default.join(t,"Logs",e),temp:re.default.join(ws,e)}},Ug=e=>{let t=Ir.APPDATA||re.default.join(vt,"AppData","Roaming"),r=Ir.LOCALAPPDATA||re.default.join(vt,"AppData","Local");return{data:re.default.join(r,e,"Data"),config:re.default.join(t,e,"Config"),cache:re.default.join(r,e,"Cache"),log:re.default.join(r,e,"Log"),temp:re.default.join(ws,e)}},Vg=e=>{let t=re.default.basename(vt);return{data:re.default.join(Ir.XDG_DATA_HOME||re.default.join(vt,".local","share"),e),config:re.default.join(Ir.XDG_CONFIG_HOME||re.default.join(vt,".config"),e),cache:re.default.join(Ir.XDG_CACHE_HOME||re.default.join(vt,".cache"),e),log:re.default.join(Ir.XDG_STATE_HOME||re.default.join(vt,".local","state"),e),temp:re.default.join(ws,t,e)}}});function vo(){return/[<>:"/\\|?*\u0000-\u001F]/g}function xl(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}var Cl=F(()=>{"use strict"});function Cn(e,t={}){let r=/[\u0000-\u001F\u0080-\u009F]/g,n=/([<>:"/\\|?*\u0000-\u001F]){2,}/g;if(typeof e!="string")throw new TypeError("Expected a string");let o=t.replacement===void 0?"!":t.replacement;if(vo().test(o)&&r.test(o))throw new Error("Replacement string cannot contain reserved filename characters");o.length>0&&(e=e.replace(n,"$1")),e=e.normalize("NFD"),e=e.replace(Gg,o),e=e.replace(vo(),o),e=e.replace(r,o),e=e.replace(zg,""),o.length>0&&(!(e[0]===".")&&e[0]==="."&&(e=o+e),e[e.length-1]==="."&&(e+=o)),e=xl().test(e)?e+o:e;let i=typeof t.maxLength=="number"?t.maxLength:Jg;if(e.length>i){let s=e.lastIndexOf(".");if(s===-1)e=e.slice(0,i);else{let a=e.slice(0,s),c=e.slice(s);e=a.slice(0,Math.max(1,i-c.length))+c}}return e}var Jg,Gg,zg,bs=F(()=>{"use strict";Cl();Jg=100,Gg=/^\.+(\\|\/)|^\.+$/,zg=/\.+$/});var qg,_l=F(()=>{"use strict";qg=h(require("path"),1);bs()});var kl=F(()=>{"use strict";bs();_l()});var Fo,vs=F(()=>{"use strict";Fo="webflow.json"});var qt,Fs=F(()=>{"use strict";qt=class extends Error{constructor(t){super(`Manifest config for key "${t}" not found`),this.name="ManifestConfigKeyNotFoundError"}}});function Tl(e){Es=e}function Y(){return Es}function Ke(){return!Es}function Al(e){Sl=e}function Ol(){return Sl}var Es,Sl,De=F(()=>{"use strict";Es=!1});function Ht(){let e=Ol();if(e){if(e.endsWith(".json"))return{path:e,isUserDefined:!0};try{if((0,Il.statSync)(e)?.isDirectory())return{path:(0,Pl.join)(e,Fo),isUserDefined:!0}}catch{if(e.endsWith(".json"))return{path:e,isUserDefined:!0}}throw new Error(`Manifest path must be either a directory or a .json file. Got: ${e}`)}return{path:`./${Fo}`,isUserDefined:!1}}var Il,Pl,xs=F(()=>{"use strict";Il=require("fs"),Pl=require("path");vs();De()});var $l,Hg,Kg,Cs,Rl=F(()=>{"use strict";$l=h(require("ajv")),Hg=new $l.default,Kg={type:"object",properties:{library:{type:"object",properties:{name:{type:"string",minLength:1},id:{type:"string",minLength:1},components:{type:"array",items:{type:"string"},minItems:1},renderer:{anyOf:[{type:"object",properties:{client:{type:"string",minLength:1},server:{type:"string",minLength:1}}},{type:"string",minLength:1}]},globals:{type:"string",minLength:1}},required:[]},devlink:{type:"object",properties:{rootDir:{type:"string",minLength:1},cssModules:{type:"boolean"},allowTelemetry:{type:"boolean"},overwriteModule:{type:"boolean"},skipTagSelectors:{type:"boolean"},envVariables:{type:"object",additionalProperties:{type:"string"}},components:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},fileExtensions:{type:"object",properties:{js:{type:"string"},css:{type:"string"}}},relativeHrefRoot:{oneOf:[{type:"boolean"},{type:"string"}]}},required:["rootDir"]},"devlink-export":{type:"object",properties:{rootDir:{type:"string",minLength:1},components:{type:"string"},componentGroups:{type:"string"},ts:{type:"boolean"},cssScopes:{type:"boolean"},relativeHrefRoot:{oneOf:[{type:"boolean",const:!1},{type:"string"}]},treeShake:{type:"boolean"}},required:[]}}},Cs=Hg.compile(Kg)});function jl(e){return e instanceof Error?e:new Error("Unknown error")}function J(){let{path:e}=Ht();if(!(0,Eo.existsSync)(e))return{manifest:{},manifestPath:e};let t;try{t=(0,Eo.readFileSync)(e,"utf8")}catch(o){throw new Error(`Failed to read manifest file: ${jl(o).message}`)}if(t.trim()==="")return{manifest:{},manifestPath:e};let n;try{n=JSON.parse(t)}catch(o){throw new Error(`Invalid JSON in manifest file: ${jl(o).message}`)}if(!Cs(n)){let o=Cs.errors?.map(i=>`${i.instancePath} ${i.message}`).join(", ")||"Unknown error";throw new Error(`Invalid manifest: ${o}.`)}return{manifest:n,manifestPath:e}}var Eo,xo=F(()=>{"use strict";Eo=require("fs");xs();Rl()});function _n(e,t){let r=e[t];if(!r)throw new qt(t);return r}var Bl=F(()=>{"use strict";Fs()});function Q(e){let t=J(),r=t.manifest,n=t.manifestPath,o={...r};for(let i in e){let s=i,a=e[s];if(a!==void 0)if(typeof a=="string"||typeof a=="number"||typeof a=="boolean"||a===null)o[s]=a;else{let c=o[s];o[s]={...typeof c=="object"&&c!==null?c:{},...a}}}return(0,Nl.writeFileSync)(n,JSON.stringify(o,null,2),"utf-8"),o}var Nl,_s=F(()=>{"use strict";Nl=require("fs");xo()});var de=F(()=>{"use strict";vs();Fs();xo();xs();Bl();_s()});var Co=Gi((C0,Zg)=>{Zg.exports={name:"@webflow/webflow-cli",version:"1.23.0",license:"MIT",bin:{webflow:"./dist/index.js"},scripts:{build:"tsup",dev:"tsup",lint:"eslint .",test:"jest --ci","test:unit":"jest --ci --ignoreProjects e2e","test:local":"jest","test:e2e-cache-clear":"bash scripts/clear-e2e-cache.sh"},files:["CHANGELOG.md","dist/**/*"],publishConfig:{access:"public"},dependencies:{"@babel/preset-env":"^7.26.9","@babel/preset-react":"^7.26.3","@babel/preset-typescript":"^7.27.0","@dotenvx/dotenvx":"^1.44.1","@inquirer/prompts":"^7.9.0","@module-federation/enhanced":"0.20.0","@rspack/core":"^1.7.8","@webflow/data-types":"*",ajv:"^8.17.1",archiver:"^5.3.1","babel-loader":"^10.0.0",commander:"^10.0.0",cosmiconfig:"^8.2.0","css-loader":"^7.1.2",dotenv:"^16.0.3","env-paths":"^3.0.0","fast-glob":"^3.3.3",filenamify:"^6.0.0","fork-ts-checker-webpack-plugin":"9.1.0","form-data":"4.0.4","fs-extra":"^11.3.0",jsdom:"^26.0.0","jsonc-parser":"^3.2.0",md5:"^2.2.1",memfs:"4.17.0","mime-types":"^2.1.35","mini-css-extract-plugin":"^2.9.2","node-fetch":"^2.6.7",open:"^8.4.2",ora:"^8.2.0",postcss:"^8.5.6","postcss-loader":"^8.1.1","postcss-selector-parser":"^7.1.0",semver:"^7.7.2","serve-handler":"^6.1.5","source-map-support":"^0.5.21",tar:"^7.4.3","ts-checker-rspack-plugin":"^1.0.0","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.2.0",unionfs:"^4.5.4","webflow-api":"3.3.4",webpack:">=5.99.7 <5.106.0","webpack-merge":"^6.0.1","webpack-node-externals":"^3.0.0",zod:"^3.22.4"},devDependencies:{"@types/archiver":"^5.3.2","@types/express":"^4.17.13","@types/fs-extra":"^11.0.4","@types/jest":"^29.2.3","@types/md5":"^2.3.2","@types/mime-types":"^2.1.4","@types/nock":"^8.0.33","@types/node":"^18.16.0","@types/node-fetch":"2.6.13","@types/serve-handler":"^6.1.1","@types/source-map":"^0.5.2","@types/webpack-node-externals":"^3.0.4",astro:"^5.17.2","eslint-config-custom":"*",express:"^4.18.1",jest:"^29.3.1",nock:"13.3.1",tar:"^7.4.3","ts-jest":"^29.0.3","ts-node":"^10.9.1",tsconfig:"*",tsup:"^8.4.0",typescript:"^4.9.3"},engines:{node:">=18.16.0"}}});function at(){try{return Co().version}catch{return"unknown"}}function Ze(e=""){if(!e)return"";let t=e;t=t.replace(/\/.*?\/webflow-cli/gi,"/REDACTED_PII/webflow-cli"),t=t.replace(/\/.*?\/node_modules/gi,"/REDACTED_PII/node_modules");let r=kn.default.homedir();if(r){let o=new RegExp(r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");t=t.replace(o,"~/REDACTED_PII")}let n=kn.default.userInfo().username;if(n){let o=new RegExp(`/Users/${n}`,"gi");t=t.replace(o,"/Users/REDACTED_PII")}return t=t.replace(/\/Users\/[^\/\s]+/gi,"/Users/REDACTED_PII"),t=t.replace(/C:\\Users\\[^\\]+/gi,"C:\\Users\\REDACTED_PII"),t=t.replace(/[a-zA-Z0-9]{32,}/g,"[REDACTED_TOKEN]"),t=t.replace(/Bearer\s+[^\s]+/gi,"Bearer [REDACTED_TOKEN]"),t=t.replace(/token[=:]\s*[^\s]+/gi,"token=[REDACTED_TOKEN]"),t=t.replace(/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,"[REDACTED_EMAIL]"),t=t.replace(/\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,"[REDACTED_IP]"),t}function ks(e){if(e.stack)return Ze(e.stack)}function Ft(e){let t=["password","token","secret","key","auth","bearer","authorization","apikey","api_key","access_token","refresh_token","client_secret","private_key"],r={};for(let[n,o]of Object.entries(e)){let i=n.toLowerCase();t.some(s=>i.includes(s))?r[n]="[REDACTED]":typeof o=="string"?r[n]=Ze(o):typeof o=="object"&&o!==null&&!Array.isArray(o)?r[n]=Ft(o):Array.isArray(o)?r[n]=o.map(s=>typeof s=="object"&&s!==null?Ft(s):typeof s=="string"?Ze(s):s):r[n]=o}return r}function Ml(){return{platform:process.platform,nodeVersion:process.version,arch:process.arch,os:`${kn.default.type()} ${kn.default.release()}`}}function Ss(){let e=Date.now().toString(36),t=Math.random().toString(36).substring(2,8);return`${e}-${t}`}var kn,Sn=F(()=>{"use strict";kn=h(require("os"))});var G,T,ct,Pr,Ts,$r,pe=F(()=>{"use strict";he();G=D.green("\u2714"),T=D.red("\u2716"),ct=D.cyan("\u2139"),Pr=D.green("\u279C"),Ts=D.red("\u279C"),$r=D.yellow("\u26A0")});var Et,As=F(()=>{"use strict";he();de();Sn();j();pe();Et=class e{static instance;cache=void 0;static isDoNotTrackEnabled(){let t=process.env.DO_NOT_TRACK;return t==="1"||t?.toLowerCase()==="true"}static getInstance(){return e.instance||(e.instance=new e),e.instance}async getPreference(){if(e.isDoNotTrackEnabled())return!1;if(this.cache!==void 0)return this.cache;try{let{manifest:t}=await J(),r=t?.telemetry?.global?.allowTelemetry;return this.cache=r,r}catch{return}}async setPreference(t){this.cache=t,await this.setGlobalPreference(t)}async promptForConsent(t){return e.isDoNotTrackEnabled()?(u.info(`${ct} Telemetry is disabled because the DO_NOT_TRACK environment variable is set.`),!1):(u.info(`${ct} Telemetry is enabled. Usage data and error reports help us improve Webflow CLI.`),u.info(`${ct} To opt out, run: ${D.blue("webflow auth telemetry --disable")}`),await this.setPreference(!0),!0)}clearCache(){this.cache=void 0}async getGlobalPreference(){return this.getPreference()}async setGlobalPreference(t){let r={telemetry:{global:{allowTelemetry:t,lastPrompted:Date.now(),version:at()}}};await Q(r),this.cache=t}async hasGlobalPreference(){return await this.getPreference()!==void 0}async getTelemetryStatus(){let t=await this.getPreference();return t!==void 0?{enabled:t,source:"global",hasPreference:!0}:{enabled:!1,source:"none",hasPreference:!1}}setCacheValue(t,r){this.cache=r}}});async function W(e,t){let n={"User-Agent":`webflow-cli@${at()}`};return(0,Ll.default)(e,{...t,headers:{...t?.headers,...n}})}var Ll,Ye=F(()=>{"use strict";Ll=h(require("node-fetch"));Ce()});var Wl,Ul=F(()=>{"use strict";Wl=e=>{try{let t=new URL(e);return!(!["http:","https:"].includes(t.protocol)||e.includes("?")||e.includes("#")||t.search||t.hash)}catch{return!1}}});var Os,C,_o,Rr,Tn,Is,An,On,jr,ee=F(()=>{"use strict";Ul();Os=(e,t)=>(Wl(t)||(console.error(`Error: Invalid ${e} environment variable. Only valid plain HTTP/HTTPS URLs without query parameters and anchors is allowed.`),process.exit(1)),t),C=process.env.WEBFLOW_API_HOST?Os("WEBFLOW_API_HOST",process.env.WEBFLOW_API_HOST):"https://api.webflow.com",_o=process.env.WEBFLOW_CDN_API_HOST?Os("WEBFLOW_CDN_API_HOST",process.env.WEBFLOW_CDN_API_HOST):"https://api-cdn.webflow.com",Rr=process.env.WEBFLOW_HOST?Os("WEBFLOW_HOST",process.env.WEBFLOW_HOST):"https://webflow.com",Tn="wf-manifest.json",Is="mf-manifest.json",An="@webflow_renderer",On="ssr-bundle.tar",jr="index.js"});var N,Ps=F(()=>{"use strict";As();Sn();j();Ye();ee();N=class e{config;consentManager;sessionId;platformInfo;constructor(t){this.config=t,this.consentManager=Et.getInstance(),this.sessionId=Ss(),this.platformInfo=Ml()}async sendEvent(t){try{if(!await this.isEnabled())return;let r=this.enrichEvent(t),n=this.sanitizeEvent(r);await this.transmitEvent(n)}catch(r){u.debug(`Failed to send telemetry event: ${r}`)}}async sendError(t,r,n){await this.sendEvent({eventType:"error",success:!1,name:t.name,message:t.message,cause:t.cause,stack:ks(t),context:r,metadata:n?Ft(n):void 0})}async sendUsage(t,r){let{duration:n,...o}=r??{};await this.sendEvent({eventType:"usage",success:!0,feature:t,duration:typeof n=="number"?n:void 0,data:Object.keys(o).length>0?Ft(o):void 0})}async sendPerformance(t,r,n){await this.sendEvent({eventType:"performance",operation:t,duration:r,metrics:n})}async isEnabled(){return await this.consentManager.getPreference()!==!1}async isGloballyEnabled(){return await this.consentManager.getGlobalPreference()!==!1}async updatePreferences(t){await this.consentManager.setPreference(t)}static async promptForConsentIfNeeded(t){let r=Et.getInstance(),n=await r.getPreference();return n!==void 0?n:await r.promptForConsent(t)}enrichEvent(t){return{...{eventType:t.eventType||"usage",timestamp:Date.now(),sessionId:this.sessionId,platform:this.platformInfo.platform,nodeVersion:this.platformInfo.nodeVersion,cliVersion:at(),command:process.argv.slice(2).join(" ")||void 0,metadata:{...t.metadata,commandType:this.config.commandType,siteId:this.config.siteId,projectId:this.config.projectId,os:this.platformInfo.os,arch:this.platformInfo.arch}},...t}}sanitizeEvent(t){let r=JSON.parse(JSON.stringify(t));return r.message&&(r.message=Ze(r.message)),r.stack&&(r.stack=Ze(r.stack)),r.context&&(r.context=Ze(r.context)),r.metadata&&(r.metadata=Ft(r.metadata)),r.data&&(r.data=Ft(r.data)),r}async transmitEvent(t){let r=this.getEndpoint(),n=process.env.WEBFLOW_TELEMETRY_DEBUG==="true";if(n){console.log(`\u{1F4CA} [Telemetry] Sending to: ${r}`);let i={...t};i.metadata&&(delete i.metadata.authToken,delete i.metadata.apiToken),console.log("\u{1F4CA} [Telemetry] Payload:",JSON.stringify(i,null,2))}let o=await W(r,{method:"POST",headers:{Authorization:`Bearer ${this.config.authToken}`,"Content-Type":"application/json"},body:JSON.stringify(t),timeout:5e3});if(o.ok)n&&console.log(`\u{1F4CA} [Telemetry] Request successful: ${o.status}`);else throw n&&console.error(`\u{1F4CA} [Telemetry] Request failed: ${o.status} ${o.statusText}`),new Error(`Telemetry request failed: ${o.status} ${o.statusText}`)}getEndpoint(){let{host:t,commandType:r}=this.config;return`${t}/webflow-cli/${r}/telemetry`}static forDevlinkSync(t){return new e({host:t.host||C,authToken:t.authToken,siteId:t.siteId,commandType:"devlink"})}static forExport(t){return new e({host:t.host||C,authToken:t.authToken,siteId:t.siteId,commandType:"export"})}static forCloud(t){return new e({host:t.host||C,authToken:t.authToken,siteId:t.siteId,projectId:t.projectId,commandType:"cloud"})}static forExtension(t){return new e({host:t.host||C,authToken:t.authToken,siteId:t.siteId,commandType:"extension"})}static forCodeLibraries(t){return new e({host:t.host||C,authToken:t.authToken,commandType:"library"})}static forCms(t){return new e({host:t.host||C,authToken:t.authToken,siteId:t.siteId,commandType:"cms"})}static forAssets(t){return new e({host:t.host||C,authToken:t.authToken,siteId:t.siteId,commandType:"assets"})}static forSites(t){return new e({host:t.host||C,authToken:t.authToken,commandType:"sites"})}static forForms(t){return new e({host:t.host||C,authToken:t.authToken,commandType:"forms"})}}});var Vl=F(()=>{"use strict"});function Jl(e){return async(t,r,n)=>{let o=Date.now(),i=process.memoryUsage().heapUsed;try{let s=await r(),a=Date.now()-o,c=process.memoryUsage().heapUsed;return await e.sendPerformance(t,a,{memoryDelta:c-i,...n}),s}catch(s){let a=Date.now()-o;throw await e.sendPerformance(t,a,{failed:1,...n}),s}}}var Ce=F(()=>{"use strict";Ps();As();Vl();Sn();Sn()});var Rs,$s,Yg,lt,js=F(()=>{"use strict";Rs=Symbol("webflow-cli-warn"),$s=class{warnings=[];originalConsoleWarn=null;isActive=!1;parseSource(t){let r=t.split(`
|
|
11
|
+
`);for(let n=2;n<r.length;n++){let o=r[n],i=o.match(/at .+? \((.+?):\d+:\d+\)/)||o.match(/at (.+?):\d+:\d+/);if(i){let s=i[1];if(s.includes("node_modules")){let a=s.match(/node_modules\/(@?[^/]+(?:\/[^/]+)?)/);return a?`External: ${a[1]}`:"External Dependencies"}else if(s.includes("webflow-cli"))return s.includes("/metadata/")?"Metadata Collection":s.includes("/bundler/")?"Bundling":s.includes("/commands/")?"CLI Commands":"Webflow CLI"}}return"General"}start(){this.isActive||(this.warnings=[],this.originalConsoleWarn=console.warn,this.isActive=!0,console.warn=(...t)=>{if(t.length>1&&t[t.length-1]===Rs){let i=t.slice(0,-1);this.originalConsoleWarn&&this.originalConsoleWarn(...i);return}let r=t.map(i=>{if(typeof i=="string")return i;if(i instanceof Error)return i.message;try{return String(i)}catch{return"[Object]"}}).join(" "),n=new Error().stack||"",o=this.parseSource(n);this.warnings.push({message:r,timestamp:Date.now(),source:o,stackTrace:n})})}stop(){this.isActive&&(this.originalConsoleWarn&&(console.warn=this.originalConsoleWarn,this.originalConsoleWarn=null),this.isActive=!1)}displayGrouped(){if(this.warnings.length===0)return;console.log(`
|
|
12
12
|
\u26A0\uFE0F Warnings:
|
|
13
|
-
`);let t=this.warnings.reduce((n
|
|
13
|
+
`);let t=this.warnings.reduce((r,n)=>{let o=n.source||"General";return r[o]||(r[o]=[]),r[o].push(n),r},{});Object.entries(t).forEach(([r,n])=>{r!=="General"&&console.log(` ${r}:`),n.forEach((o,i)=>{let s=r!=="General"?" ":" ",a=o.message||"[Empty warning message]";console.log(`${s}${i+1}. ${a}`)}),r!=="General"&&console.log("")}),t.General&&console.log("")}debug(){console.log(`
|
|
14
14
|
\u{1F41B} Debug: Captured Warnings
|
|
15
|
-
`),this.warnings.forEach((t,
|
|
16
|
-
`).slice(0,3).forEach(
|
|
17
|
-
`)),
|
|
18
|
-
${
|
|
19
|
-
${
|
|
15
|
+
`),this.warnings.forEach((t,r)=>{console.log(`Warning ${r+1}:`),console.log(` Source: ${t.source}`),console.log(` Message: ${t.message}`),console.log(` Message length: ${t.message.length}`),console.log(` Timestamp: ${new Date(t.timestamp).toISOString()}`),t.stackTrace&&(console.log(" Stack (first 3 lines):"),t.stackTrace.split(`
|
|
16
|
+
`).slice(0,3).forEach(n=>{console.log(` ${n}`)})),console.log("")})}},Yg=new $s,lt=Yg});function Xg(e){return e.replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"")}function zl(e,t){if(!e)return t;let r=parseInt(e,10);return isNaN(r)||r<=0?t:r}function xt(e){In.push(Ze(e)),In.length>th&&In.shift()}function ql(e){Ns=e}function Gl(e){return xt(`DEBUG: ${e}`),e}function nh(e){return xt(`INFO: ${e}`),e}function oh(e){return xt(`WARN: ${e}`),e}function ih(e,t){let r=e instanceof Error?e.stack||e.message:e,n=t?.prefix?`${t.prefix} `:"";xt(`ERROR: ${n}${r}`),Ms=!0;let o=e instanceof Error?e.message:e;return`${n}${o}`}function sh(e){return xt(`SUCCESS: ${e}`),`${D.green(e)}`}function ah(e){let t=Or(`${e}...`).start(),r=!1,n=o=>i=>{xt(`${{succeed:"INFO",fail:"ERROR",warn:"WARN",info:"INFO"}[o]||"INFO"}: ${i||e}`),o==="fail"&&(Ms=!0),!r&&(r=!0,t[o](i||e))};return{succeed:n("succeed"),fail:n("fail"),warn:n("warn"),info:n("info")}}function ch(){let e=Br.default.readdirSync(_e).filter(t=>t.endsWith(".log")).map(t=>({name:t,time:Br.default.statSync(ko.default.join(_e,t)).mtime.getTime()})).sort((t,r)=>r.time-t.time);for(;e.length>=eh;)try{let t=e.pop();if(!t)break;Br.default.removeSync(ko.default.join(_e,t.name))}catch{}}function Ls(e){try{let t=process.argv.slice(2).join(" ");if(/^(log|library\s+log)(\s|$)/.test(t))return;Br.default.ensureDirSync(_e),ch(),In.unshift(`CLI Version: ${at()}`,`Node Version: ${process.version}`,`Platform: ${process.platform}`,`Architecture: ${process.arch}`,`Command: ${t||"N/A"}`,`Exit Code: ${e??0}`,`Memory Usage: ${Math.round(process.memoryUsage().heapUsed/1024/1024)}MB`,`Timestamp: ${new Date().toISOString()}`,...Ns?[`Sync ID: ${Ns}`]:[],"");let r=In.map(Xg);Br.default.writeFileSync(Bs,r.join(`
|
|
17
|
+
`)),Ms&&(console.info(`
|
|
18
|
+
${T} An error occurred. See logs for more information:`),console.info(`${Ts} Latest log: ${Bs}`),console.info(`${Ts} All logs: ${_e}`)),(process.env.DEBUG||process.argv.includes("--verbose"))&&(console.info(`
|
|
19
|
+
${G} Command completed successfully. Logs written to:`),console.info(`${Pr} Latest log: ${Bs}`),console.info(`${Pr} All logs: ${_e}`))}catch(t){console.error("Failed to write logs:",t)}}var Br,ko,rv,Qg,_e,eh,th,rh,Bs,In,Ms,Ns,Nr,lh,u,j=F(()=>{"use strict";Br=h(require("fs-extra")),ko=h(require("path"));he();rv=require("source-map-support/register");hs();El();kl();Ce();js();pe();Qg=Ds("webflow-cli"),_e=Qg.log;eh=zl(process.env.MAX_PERSISTED_LOGS,50),th=zl(process.env.MAX_IN_MEMORY_LOGS,1e3),rh=`${Cn(new Date().toISOString(),{replacement:"_"}).replace(/\./g,"_")}-debug.log`,Bs=ko.default.join(_e,rh);In=[],Ms=!1;Nr=!1;process.on("uncaughtException",e=>{Nr||(Nr=!0,xt(`UNCAUGHT EXCEPTION: ${e?.stack}`),Ls(1)),lt.displayGrouped(),lt.stop(),process.exit(1)});process.on("unhandledRejection",e=>{Nr||(Nr=!0,xt(`UNHANDLED REJECTION: ${e instanceof Error?e.stack:String(e)}`),Ls(1)),lt.displayGrouped(),lt.stop(),process.exit(1)});process.on("exit",e=>{Nr||(Nr=!0,Ls(e))});lh={debug:e=>{let t=Gl(e);process.env.DEBUG&&console.debug(t)},trace:e=>{let t=Gl(e);process.env.DEBUG&&console.debug(t)},dir:e=>console.dir(e,{depth:100}),info:e=>console.info(nh(e)),warn:e=>console.warn(oh(e),Rs),error:(e,t)=>{console.error(ih(e,t))},success:e=>console.log(sh(e)),spinner:ah},u=lh});async function Pn(e){try{return await e()}catch(t){throw t instanceof Error&&dh.test(t.message)&&(u.debug(t.message),process.stdin.isTTY&&typeof process.stdin.setRawMode=="function"&&process.stdin.setRawMode(!1),process.exit(130)),t}}async function ye(e){return Y()?e.default??!1:Pn(()=>Xe.confirm(e))}async function ke(e){return Y()?"default"in e?e.default:null:Pn(()=>Xe.select(e))}async function we(e){return Y()?e.default!==void 0?await e.validate?.(e.default)!==!0?null:e.default:null:Pn(()=>Xe.input(e))}async function To(e){if(Y()){let t=[];return await e.validate?.(t)!==!0?null:t}return Pn(()=>Xe.checkbox(e))}async function Ao(e){return Y()?"default"in e?e.default:null:Pn(()=>Xe.search(e))}var Xe,dh,Se=F(()=>{"use strict";Xe=h(require("@inquirer/prompts"));De();j();dh=/SIGINT/i});function ut({apiToken:e,siteId:t,directory:r}){let n=Rn.resolve(r?Rn.join(r,".env"):Rn.join(process.cwd(),".env"));r&&!Xt.existsSync(r)&&Xt.mkdirSync(r,{recursive:!0}),Xt.existsSync(n)||Xt.writeFileSync(n,`# automatically generated at ${new Date().toISOString()}`,{encoding:"utf8"}),Oo.default.config({path:n,quiet:!0}),e&&Oo.default.set("WEBFLOW_API_TOKEN",e,{path:n,encrypt:!1}),t&&Oo.default.set("WEBFLOW_SITE_ID",t,{path:n,encrypt:!1})}var Xt,Rn,Oo,tu=F(()=>{"use strict";Xt=h(require("fs")),Rn=h(require("path")),Oo=h(require("@dotenvx/dotenvx"))});var p,q=F(()=>{"use strict";p=class e extends Error{prefix;skipLogging;isUserError;constructor(t,r){let n=t instanceof Error?t.message:String(t);super(n),this.name="CLIError",this.prefix=r?.prefix,this.skipLogging=r?.skipLogging??!1,this.isUserError=r?.isUserError??(t instanceof e?t.isUserError:!1),t instanceof Error?(this.cause=t,this.stack=t.stack):Error.captureStackTrace&&Error.captureStackTrace(this,e)}}});function kt(){let e=gh();return Qt.default.join(e,mh)}function gh(){if(process.platform==="win32"){let r=process.env.APPDATA??Qt.default.join(Js.default.homedir(),"AppData","Roaming");return Qt.default.join(r,"webflow")}let t=process.env.XDG_CONFIG_HOME??Qt.default.join(Js.default.homedir(),".config");return Qt.default.join(t,"webflow")}function jn(){let e=kt();try{if(!_t.default.existsSync(e))return null;let t=_t.default.readFileSync(e,"utf8");return JSON.parse(t)}catch{return null}}function Gs(e){let t=kt(),r=Qt.default.dirname(t);_t.default.existsSync(r)||_t.default.mkdirSync(r,{recursive:!0,mode:448}),_t.default.writeFileSync(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384})}function zs(){let e=kt();try{_t.default.existsSync(e)&&_t.default.unlinkSync(e)}catch{}}var _t,Js,Qt,mh,qs=F(()=>{"use strict";_t=h(require("fs")),Js=h(require("os")),Qt=h(require("path")),mh="auth.json"});var Bn,Hs=F(()=>{"use strict";ee();Bn={serverUrl:Rr,timeoutMs:5*60*1e3}});var ru,nu,ou,iu,hh,su,yh,au,cu=F(()=>{"use strict";ru=require("crypto"),nu=h(require("open"));Hs();j();Ye();ou=e=>{let t=new Uint8Array(e);return ru.webcrypto.getRandomValues(t),Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")},iu=({pollId:e,clientId:t,scope:r})=>`${Bn.serverUrl}/oauth/webflow/initiate?pollId=${e}&clientId=${t}&scope=${encodeURIComponent(r.join(" "))}`,hh=e=>`${Bn.serverUrl}/oauth/webflow/poll?pollId=${e}`,su=async e=>{let t=u.spinner("Opening browser for authentication. Please follow the instructions in your browser");try{await new Promise(r=>setTimeout(r,3e3)),await(0,nu.default)(e),t.succeed()}catch{t.fail(),u.warn(`Could not automatically open browser. Please open this URL manually: ${e}`)}},yh=async e=>{let t=hh(e),r=await W(t);if(!r.ok){let n=`Failed to poll for authentication status (${r.status})`;try{let o=await r.json();o&&o.error&&(n+=`: ${o.error}`)}catch{}throw new Error(n)}return r.json()},au=(e,t)=>{let r=u.spinner("Waiting for authentication");return new Promise((n,o)=>{let i=setTimeout(()=>{clearTimeout(i),clearInterval(s),o(new Error("Authentication timed out. Please try again."))},t),s=setInterval(async()=>{try{let a=await yh(e);a.status==="success"&&a.accessToken?(clearTimeout(i),clearInterval(s),r.succeed("Authentication successful! You can close the browser window."),n(a.accessToken)):a.status==="error"&&(clearTimeout(i),clearInterval(s),r.fail("Authentication failed"),o(new Error(a.error||"Authentication failed")))}catch(a){clearTimeout(i),clearInterval(s),r.fail("Authentication failed"),o(a instanceof Error?a:new Error(String(a)))}},2e3)})}});function Nn(){if(process.env.WEBFLOW_API_TOKEN)return process.env.WEBFLOW_API_TOKEN;let e=jn();if(e?.accessToken)return e.accessToken;let t=process.env.WEBFLOW_WORKSPACE_API_TOKEN??process.env.WEBFLOW_SITE_API_TOKEN??null;return t&&!lu&&(lu=!0,u.warn(`${$r} WEBFLOW_SITE_API_TOKEN / WEBFLOW_WORKSPACE_API_TOKEN are deprecated. Please use WEBFLOW_API_TOKEN instead. Run 'webflow auth login --force' to update your .env file.`)),t}async function U(e){if(e?.apiToken&&!e.force)return e.apiToken;if(!e?.force){let n=Nn();if(n)return n}if(Y())throw new p(`No API token found. To authenticate in CI/CD environments:
|
|
20
20
|
1. Generate a Workspace API token in your Webflow Dashboard > Apps & Integrations > Manage > Workspace API Token
|
|
21
|
-
2. Set it as the WEBFLOW_API_TOKEN environment variable in your CI/CD pipeline`);let t=
|
|
22
|
-
`})}}async function
|
|
21
|
+
2. Set it as the WEBFLOW_API_TOKEN environment variable in your CI/CD pipeline`);let t=ou(16),r=wh();try{let n=iu({pollId:t,clientId:r,scope:Ks});await su(n);let o=await au(t,Bn.timeoutMs);return Gs({accessToken:o,scopes:Ks,createdAt:new Date().toISOString()}),u.info(`${G} Credentials saved: ${kt()}`),o}catch(n){throw new p(n)}}function wh(){return"fbab9abdbeeb35bb2554a1b83b8bd060d719f22eca26ff9119b87608c87c0074"}var Ks,lu,Zs=F(()=>{"use strict";De();j();pe();q();qs();Hs();cu();Ks=["assets:read","assets:write","authorized_user:read","cloud_apps:write","cms:read","cms:write","code_components:read","code_components:write","devlink_export:read","forms:read","sites:read","sites:write","workspace:read"],lu=!1});function Dh(){return!1}function Mn(e){if(e.siteId)return e.siteId;let t=process.env.WEBFLOW_SITE_ID;return t?(Dh()||(Q({siteId:t}),e.siteId=t),t):null}async function Ys(e){try{let r=await new uu.WebflowClient({accessToken:e,environment:{base:`${C}/v2`,dataApi:`${C}/v2`,contentDeliveryApi:`${_o}/v2`}}).sites.list();if(!r||typeof r!="object"||!r.sites||!Array.isArray(r.sites))throw new p("Invalid response from Webflow API");let n=r.sites.map(o=>({id:o.id,displayName:o.displayName??"",shortName:o.shortName||(o.displayName??"").toLowerCase().replace(/\s+/g,"-"),lastUpdated:o.lastUpdated??null}));return n.sort((o,i)=>o.displayName.localeCompare(i.displayName)),n}catch(t){throw new p(t,{prefix:`Failed to fetch Webflow sites. Please check your authorization.
|
|
22
|
+
`})}}async function Xs(e){let t=e.map(n=>({name:`${n.displayName} (${n.shortName})`,value:n})),r=await Ao({message:"Search for a Webflow site:",source:n=>{if(!n)return t;let o=n.toLowerCase();return t.filter(i=>i.value.displayName.toLowerCase().includes(o)||i.value.shortName.toLowerCase().includes(o))},pageSize:15});if(!r){if(e.length===0)throw new p("No sites available for selection");return u.warn(`Auto fallback to first site: ${e[0].displayName}`),e[0]}return r}var uu,Io=F(()=>{"use strict";uu=require("webflow-api");Se();j();de();ee();ee();q()});async function le(e,t){let r=t?.site??Mn(e);if(Y()&&!r)throw new p(`No site ID configured for this project.
|
|
23
23
|
Run 'webflow auth login' locally to authenticate and associate this project with a Webflow site,
|
|
24
|
-
or provide --site and --api-token when running a CLI command`);let
|
|
25
|
-
${
|
|
26
|
-
`+
|
|
27
|
-
New versions of the following @webflow packages are available:`),Object.entries(t).forEach(([a,{current:
|
|
28
|
-
To update, run:`),i.length>0&&console.log(` ${
|
|
29
|
-
A new version of ${i} (${s} \u2192 ${a}) is available.`);let c
|
|
30
|
-
A new version of @webflow/webflow-cli@${t} is available.`);let{code:
|
|
31
|
-
Use --force flag to reauthenticate anyway`);return}try{let o=await
|
|
32
|
-
You can now use other Webflow CLI commands that require authentication`)}catch(o){throw new
|
|
24
|
+
or provide --site and --api-token when running a CLI command`);let n=await U({apiToken:t?.apiToken,force:t?.force});if(!r||t?.force){let o=await Ys(n);if(o.length===0)throw new p("No Webflow sites found in your account. Please make sure you have at least one authorized site in your Webflow account");let i=o.length>1?await Xs(o):o[0];r=i.id;let s=Q({siteId:r});return e.siteId=s.siteId,{siteId:r,siteName:i.displayName,accessToken:n}}return{siteId:r,accessToken:n}}var du=F(()=>{"use strict";de();De();Zs();Io();q()});async function Qs(e){let t=new fu.WebflowClient({accessToken:e,environment:{base:`${C}/v2`,dataApi:`${C}/v2`}});try{return await t.token.authorizedBy()}catch{return null}}var fu,pu=F(()=>{"use strict";fu=require("webflow-api");ee()});var Te=F(()=>{"use strict";tu();Zs();du();Io();Io();qs();pu()});function Oh(e,t){if(e.includes("..")||Ge.isAbsolute(e))throw new Error(`Invalid file path: "${e}" - path traversal not allowed`);let r=Ge.resolve(t,e),n=Ge.resolve(t);if(!r.startsWith(n+Ge.sep)&&r!==n)throw new Error(`Invalid file path: "${e}" - resolves outside root directory`)}async function Jo(e,t,r){let n=Ge.join(process.cwd(),t);r&&(0,Tt.existsSync)(n)&&await(0,Vo.rm)(n,{recursive:!0,force:!0}),(0,Tt.existsSync)(n)||await(0,Vo.mkdir)(n);for(let o of e){Oh(o.path,n);let i=Ih(n,o.path);if(o.path.includes("/")){let s=o.path.substring(0,o.path.lastIndexOf("/"));Ph(n,s)}(0,Tt.writeFileSync)(i,o.content,{flag:"w+"})}}function Ih(e,t){return Ge.join(e,...t.split("/"))}function Ph(e,t){let r=t.split("/"),n=e;for(let o of r)n=Ge.join(n,o),(0,Tt.existsSync)(n)||(0,Tt.mkdirSync)(n)}var Tt,Vo,Ge,ua=F(()=>{"use strict";Tt=require("fs"),Vo=require("fs/promises"),Ge=h(require("path"))});function zo(e){for(let t of e??[]){let r=u[t.status]??u.info,n=Bh[t.status]??ct;r(`
|
|
25
|
+
${n} ${t.content}`)}}var Bh,pa=F(()=>{"use strict";j();pe();Bh={info:ct,warn:$r,success:G}});function ga(e){let{manifestPath:t}=J();return(0,Yu.writeFileSync)(t,JSON.stringify(e,null,2),"utf-8"),e}var Yu,Xu=F(()=>{"use strict";Yu=require("fs");xo()});function qo(e,t){try{let r=ha(),n=ya(Object.values(e)),o=t?.force;return n&&r&&!o}catch{return!1}}var Qu,ed,ha,ya,Ho=F(()=>{"use strict";Qu=require("path"),ed=require("fs-extra");ha=()=>{try{return(0,ed.existsSync)((0,Qu.join)(process.cwd(),"tsconfig.json"))}catch{return!1}},ya=e=>e.some(t=>t.endsWith(".ts")||t.endsWith(".tsx"))});function Nh(e){let{export:t,...r}=e;return t?r["devlink-export"]!=null?(ga(r),r):(u.warn(`${$r} The 'export' key in webflow.json is deprecated. Use 'devlink-export' instead. Your configuration will be migrated automatically.`),r["devlink-export"]={...t},ga(r),r):r}function nd(e,t){try{new RegExp(e)}catch{throw new p(`Invalid '${t}' regex '${e}' in webflow.json. Fix the value and re-run the export.`,{isUserError:!0})}}async function id(e){e=Nh(e);let t=e["devlink-export"]||{},r=!1,n=t.rootDir;n||(Y()?n=td:(r=!0,n=await we({message:"Enter the root directory for exported components:",default:td,validate:d=>!d||d.trim()===""?"Root directory is required":!0})));let o=t.ts;o===void 0&&(Wh()?o=!0:Y()?o=!1:(r=!0,o=await ye({message:"Use TypeScript?",default:!0})));let i=t.cssScopes;i===void 0&&(Y()?i=rd:(r=!0,i=await ye({message:"Use DevLink style isolation (scoped wrapper + @scope)?",default:rd}))),t.components&&nd(t.components,"components"),t.componentGroups&&nd(t.componentGroups,"componentGroups");let s=t.components,a=t.componentGroups;!s&&!a&&(Y()?(s=Ko,a=Zo):(r=!0,await ye({message:"Do you want to export all components?",default:!0})?(s=Ko,a=Zo):(s=await we({message:"Enter regex pattern to filter components (e.g., 'Button|Card' for specific):",default:Ko,validate:f=>{try{return new RegExp(f),!0}catch{return"Invalid regex pattern. Please enter a valid regular expression."}}}),a=await we({message:"Enter regex pattern to filter component groups (e.g., 'mygroup'):",default:Zo,validate:f=>{try{return new RegExp(f),!0}catch{return"Invalid regex pattern. Please enter a valid regular expression."}}})))),s=s||Ko,a=a||Zo;let c=t.relativeHrefRoot;c===void 0&&(c=Mh);let l={...t,rootDir:n,components:s,componentGroups:a,ts:o,cssScopes:i,relativeHrefRoot:c};return(!t.rootDir||t.ts===void 0||t.cssScopes===void 0||!t.components||!t.componentGroups||t.relativeHrefRoot===void 0)&&Lh(l),{config:l,wasPrompted:r}}function Lh(e){Q({"devlink-export":{...e}})}function Wh(){try{let e=process.cwd();if(ha())return!0;let t=["src","app","pages","components"];for(let r of t){let n=od.join(e,r);if(Yo.existsSync(n)&&ya(Yo.readdirSync(n)))return!0}}catch{}return!1}var Yo,od,td,Ko,Zo,rd,Mh,sd=F(()=>{"use strict";Yo=h(require("fs")),od=h(require("path"));Se();De();j();pe();q();_s();Xu();Ho();td="./webflow",Ko=".*",Zo=".*",rd=!0,Mh="/"});async function ld(e){if(e.ok)return;let t=await e.text().catch(()=>"");u.debug(`Server error response (HTTP ${e.status}): ${t||"<empty>"}`);let r;try{r=JSON.parse(t).message}catch{}throw new Un(r||`Request failed (HTTP ${e.status}).`)}async function Da(e,t,r,n){let o=await Uh(r,n,t,e);if(!o.files||!Array.isArray(o.files))throw new p("Invalid response format from V2 API: expected 'files' array");return{files:o.files,messages:o.messages,metadata:o.metadata}}async function Uh(e,t,r,n){let{taskId:o,polling:i}=await Vh(e,t,r,n);return Jh(e,t,r,o,i)}async function Vh(e,t,r,n){let o=await(0,wa.default)(`${C}/v2/devlink/${e}/export`,{method:"POST",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json",[cd]:t},body:JSON.stringify(n),timeout:6e4});return o.ok||await ld(o),await o.json()}async function Jh(e,t,r,n,o){let{initialDelayMs:i,maxBackoffMs:s,backoffMultiplier:a,timeoutMs:c}=o,l=Date.now()+c,d=i;do{let f=await(0,wa.default)(`${C}/v2/devlink/${e}/export/${n}`,{headers:{Authorization:`Bearer ${r}`,[cd]:t},timeout:6e4});f.ok||await ld(f);let m=await f.json();if(m.status==="finished")return m.result;if(m.status==="failed")throw new Un("The export task failed. Please try again or report a bug.");await(0,ad.setTimeout)(d),d=Math.min(d*a,s)}while(Date.now()<l);throw new Un(`Export task timed out after ${c}ms. Please try again.`)}var wa,ad,cd,Un,ud=F(()=>{"use strict";wa=h(require("node-fetch")),ad=require("timers/promises");j();ee();q();cd="X-WF-Sync-Id",Un=class extends Error{}});var dd,fd=F(()=>{"use strict";Se();j();dd=async(e,t)=>{if(!t)return;await ye({message:`Ready to export components to ${e.rootDir}?`,default:!0})||(u.info("Export cancelled."),process.exit(0))}});function pd(e,t,r){let i=new Intl.PluralRules("en-US").select(e)==="one"&&e===1?t:r||`${t}s`;return`${e} ${i}`}var md=F(()=>{"use strict"});async function Xo(e){let t=Date.now(),r;try{let{manifest:n}=J(),{siteId:o,accessToken:i}=await le(n,e),s=(0,gd.randomUUID)();ql(s);let{config:a,wasPrompted:c}=await id(n);u.info(`${G} Export configuration loaded!`),await dd(a,c);let l=N.forExport({authToken:i,siteId:o});r=u.spinner("Exporting components"),await l.sendUsage("devlink_export_start",{cssScopes:a.cssScopes,ts:a.ts,relativeHrefRoot:a.relativeHrefRoot});try{let{files:d,messages:f,metadata:m}=await Da(a,i,o,s),g=m.exportCoverage==="full";await Jo(d,a.rootDir,g),r.succeed(`${pd(m.componentCount,"component")} exported to ${a.rootDir}`),zo(f);let w=Date.now()-t;await l.sendUsage("devlink_export_success",{duration:w,cssScopes:a.cssScopes,ts:a.ts,relativeHrefRoot:a.relativeHrefRoot})}catch(d){let f=d instanceof Error?d.message:String(d);throw r.fail(`Components export failed: ${f}`),await l.sendError(d instanceof Error?d:new Error(String(d)),"devlink_export_failure",{cssScopes:a.cssScopes,ts:a.ts}),d}}catch(n){let o="Export failed: "+(n instanceof Error?n.message:n);throw r?r.fail(o):u.error(o,{prefix:`
|
|
26
|
+
`+T}),new p(n,{skipLogging:!0})}}var gd,hd=F(()=>{"use strict";gd=require("crypto");sd();ud();fd();Ce();Te();de();md();j();q();ua();pe();pa()});var yd={};Ic(yd,{exportComponents:()=>Xo});var ba=F(()=>{"use strict";hd()});var Pc=Symbol.for("@webflow/webflow-cli/suppress-deprecation");function og(e){if(typeof e!="object"||e===null)return!1;let t=e;return t.code==="DEP0040"&&typeof t.message=="string"&&t.message.includes("punycode")}function ig(e=process){if(e[Pc])return;e[Pc]=!0;let t=e.emit;e.emit=function(n,...o){return n==="warning"&&og(o[0])?!1:t.call(this,n,...o)}}ig();var Hm=require("commander");j();var Hl=require("child_process"),Kl=require("fs"),Ws=h(require("semver"));j();var Us="@webflow/webflow-cli",Kt="@webflow/data-types",So="@webflow/react",uh=[Us,Kt,So],Zt=class{getInstalledDependencies(){try{let t=(0,Hl.execSync)(`npm ls ${uh.join(" ")} --depth=0 --json --silent`,{encoding:"utf-8"}),r=JSON.parse(t);return r.dependencies?Object.entries(r.dependencies).reduce((n,[o,{version:i}])=>(n[o]=i,n),{}):{}}catch(t){return u.debug(`Failed to get installed dependencies: ${t}`),{}}}getRequiredDependencies(t){let r=JSON.parse((0,Kl.readFileSync)(require.resolve(`${t}/package.json`),"utf8"));return{...r.dependencies,...r.devDependencies}}checkCLIAndDataTypes(t){let r=t[Kt];if(!r)return;let o=this.getRequiredDependencies(Us)[Kt];if(!Ws.default.satisfies(r,o))throw new Error(`Version mismatch: ${Us} requires ${Kt} v${o} but found v${r}`)}checkReactAndDataTypes(t){let r=t[Kt],n=t[So];if(!(!r||!n)&&!Ws.default.eq(r,n))throw new Error(`Version mismatch: ${So} and ${Kt} must be on the same version. Found ${So}@${n} and ${Kt}@${r}`)}run(){let t=this.getInstalledDependencies();this.checkCLIAndDataTypes(t),this.checkReactAndDataTypes(t)}};var Ql=require("fs-extra");Se();var eu=require("@dotenvx/dotenvx"),Yt=h(require("semver"));j();var Zl=require("child_process"),Yl=require("util"),fh=(0,Yl.promisify)(Zl.exec);async function Ct(e,t){try{let{stdout:r,stderr:n}=await fh(e,t);return{stdout:r.toString().trim(),stderr:n.toString().trim(),code:0}}catch(r){let n=r;return{stdout:n.stdout??"",stderr:n.stderr??String(n.message??""),code:n.code??1}}}De();var Vs=h(Co());(0,eu.config)({quiet:!0,ignore:["MISSING_ENV_FILE"]});var Xl={npm:{updateCommand:"npm install",update:async e=>await Ct(`npm install ${e}`),getOutdated:async e=>{let{stdout:t}=await Ct(`npm outdated --json ${e}`);return JSON.parse(t)},lockFile:"package-lock.json",globalFlag:"--global",supported:!0},pnpm:{updateCommand:"pnpm add",update:async e=>await Ct(`pnpm add ${e}`),getOutdated:async e=>{let{stdout:t}=await Ct(`pnpm outdated --json ${e}`);return JSON.parse(t)},lockFile:"pnpm-lock.yaml",globalFlag:"--global",supported:!0},yarn:{lockFile:"yarn.lock",globalFlag:"",updateCommand:"",getOutdated:async()=>({}),update:async()=>({stdout:"",stderr:"",code:0}),supported:!1}},ph=["@webflow/webflow-cli","@webflow/data-types","@webflow/react","@webflow/emotion-utils","@webflow/styled-components-utils"],$n=class{packageManager;constructor(){this.packageManager=this.getPackagerManagerInfo()}getPackagerManagerInfo(){for(let[,t]of Object.entries(Xl))if((0,Ql.existsSync)(t.lockFile))return t;return Xl.npm}async listOutdatedPackages(t="local",r=ph){let{getOutdated:n,globalFlag:o}=this.packageManager,i=await n(`${t==="global"?o:""} ${r?.join(" ")}`);return Object.fromEntries(Object.entries(i).map(([s,a])=>Array.isArray(a)?[s,{current:a[0].current,latest:a[0].latest,installationType:t}]:[s,{current:a.current,latest:a.latest,installationType:t}]))}async getOutdatedPackages(){let t=await this.listOutdatedPackages();if(t["@webflow/webflow-cli"])return t;let r=await this.listOutdatedPackages("global",["@webflow/webflow-cli"]);return{...t,...r}}async showUpdatePrompt(t){if(Object.keys(t).length>1){let n=await To({message:"New versions of the following @webflow packages are available. Would you like to update?",choices:Object.entries(t).map(([o,{current:i,latest:s}])=>({name:`${o} (${i} \u2192 ${s})`,value:o}))});return n??[]}else{let[[n,{current:o,latest:i}]]=Object.entries(t);return await ye({message:`A new version of ${n} (${o} \u2192 ${i}) is available. Would you like to update?`,default:!1})?[n]:[]}}showUpdateSuggestions(t){let r=Object.keys(t).length>1,{updateCommand:n,globalFlag:o}=this.packageManager;if(r){console.log(`
|
|
27
|
+
New versions of the following @webflow packages are available:`),Object.entries(t).forEach(([a,{current:c,latest:l}])=>{console.log(` ${a} (${c} \u2192 ${l})`)});let i=Object.entries(t).filter(([,{installationType:a}])=>a==="local").map(([a])=>`${a}@latest`),s=Object.entries(t).filter(([,{installationType:a}])=>a==="global").map(([a])=>`${a}@latest`);console.log(`
|
|
28
|
+
To update, run:`),i.length>0&&console.log(` ${n} ${i.join(" ")}`),s.length>0&&console.log(` ${n} ${o} ${s.join(" ")}`)}else{let[[i,{current:s,latest:a,installationType:c}]]=Object.entries(t);console.log(`
|
|
29
|
+
A new version of ${i} (${s} \u2192 ${a}) is available.`);let l=c==="global"?` ${o}`:"";console.log(`To update, run: ${n}${l} ${i}@latest`)}}shouldSkipUpdateChecks(){return!this.packageManager.supported||process.env.WEBFLOW_SKIP_UPDATE_CHECKS==="true"}getDistTag(){let t=Yt.prerelease(Vs.default.version);return t&&t.length>0&&typeof t[0]=="string"?t[0]:"latest"}async promptPrerelease(t){let r;try{r=u.spinner("Checking for updates (to disable, use --skip-update-check)");let{stdout:n,code:o}=await Ct(`npm view @webflow/webflow-cli@${t} version`);if(o!==0||!n.trim()){r.succeed("Up to date");return}let i=n.trim(),s=Vs.default.version;if(!Yt.valid(i)||!Yt.valid(s)){r.succeed("Up to date");return}if(!Yt.gt(i,s)){r.succeed("All @webflow packages are up to date");return}if(r.succeed(),!process.stdin.isTTY||Y()){console.log(`
|
|
30
|
+
A new version of @webflow/webflow-cli@${t} is available.`);let{code:f}=await Ct("npm ls @webflow/webflow-cli --json"),g=(f===0?"local":"global")==="global"?" --global":"";console.log(`To update, run: ${this.packageManager.updateCommand}${g} @webflow/webflow-cli@${t}`);return}let{code:c}=await Ct("npm ls @webflow/webflow-cli --json"),l=c===0?"local":"global";if(await ye({message:`A new version of @webflow/webflow-cli@${t} is available. Would you like to update?`,default:!1})){r=u.spinner("Updating");let f=l==="global"?` ${this.packageManager.globalFlag}`:"";try{await this.packageManager.update(`${f} @webflow/webflow-cli@${t}`),r.succeed("Updated successfully")}catch{let g=l==="global"?` ${this.packageManager.globalFlag}`:"";r.fail(`Update failed. Manually run: ${this.packageManager.updateCommand}${g} @webflow/webflow-cli@${t}`)}}}catch(n){r?.fail("Failed to check for updates"),u.debug(String(n))}}async prompt(){if(this.shouldSkipUpdateChecks())return;let t=this.getDistTag();if(t!=="latest")return this.promptPrerelease(t);let r;try{r=u.spinner("Checking for updates (to disable, use --skip-update-check)");let n=await this.getOutdatedPackages();if(!(Object.keys(n).length>0)){r.succeed("All @webflow packages are up to date");return}if(r.succeed(),!process.stdin.isTTY||Y()){this.showUpdateSuggestions(n);return}let s=await this.showUpdatePrompt(n);if(s.length>0){r=u.spinner("Updating");let{local:a,global:c}=s.reduce((m,g)=>(m[n[g].installationType==="global"?"global":"local"].push(g),m),{local:[],global:[]}),{update:l,globalFlag:d,updateCommand:f}=this.packageManager;try{a.length>0&&await l(`${a.map(m=>`${m}@latest`).join(" ")}`),c.length>0&&await l(`${d} ${c.map(m=>`${m}@latest`).join(" ")}`),r.succeed("Updated successfully")}catch{r.fail(`Update failed. Manually run: ${f} ${s.map(g=>`${g}@latest`).join(" ")}`)}}}catch(n){r?.fail("Failed to check for updates"),u.debug(String(n))}}};De();js();Ps();Se();Ce();Te();De();de();j();q();pe();var gu=e=>{let t=e.command("auth").description("Authentication and configuration commands");t.command("login").description("Authenticate with Webflow and save credentials to .env file").option("-f, --force","Force reauthentication even if credentials exist").action(async r=>{if(Y()){u.info(`${T} No-input mode enabled. Aborting OAuth authentication`);return}let{manifest:n}=J();if(!r.force&&Nn()){let i=Mn(n);u.info(`${G} Webflow credentials already exist:`),i&&u.info(` Site ID: ${i}`),u.info(" API Token: [hidden]"),u.info(`
|
|
31
|
+
Use --force flag to reauthenticate anyway`);return}try{let o=await U({force:r.force});ut({apiToken:o}),u.info(`
|
|
32
|
+
You can now use other Webflow CLI commands that require authentication`)}catch(o){throw new p(o,{prefix:`${T} Authentication failed:`})}}),t.command("status").description("Show current authentication status").action(async()=>{let r=jn(),n=r?.accessToken??Nn();if(!n){u.info(`${T} Not logged in. Run 'webflow auth login' to authenticate.`),process.exitCode=1;return}try{let o=await Qs(n);if(!o){u.info(`${T} Token is invalid or expired. Run 'webflow auth login --force' to reauthenticate.`),process.exitCode=1;return}u.info(`${G} Logged in as ${o.firstName} ${o.lastName} (${o.email})`),r?.scopes?.length&&u.info(` Scopes: ${r.scopes.join(", ")}`),u.info(` Session: ${kt()}`)}catch(o){throw new p(o,{prefix:`${T} Failed to fetch auth status:`})}}),t.command("logout").description("Log out and remove stored credentials").action(async()=>{zs(),u.info(`${G} Logged out. Session file removed.`),u.info(" Run 'webflow auth login' to authenticate again.")}),t.command("telemetry").description("Manage telemetry settings for all Webflow CLI commands").option("--enable","Enable telemetry for all commands").option("--disable","Disable telemetry for all commands").option("--status","Show current telemetry status").action(async r=>{let n=Et.getInstance();if(r.status){let s=await n.getTelemetryStatus();u.info(mu(s.enabled));return}if(r.enable){await n.setGlobalPreference(!0),u.info(ea(!0));return}if(r.disable){await n.setGlobalPreference(!1),u.info(ea(!1));return}let o=await n.getTelemetryStatus();if(u.info(mu(o.enabled)),Y()){u.info("\u{1F4A1} When --no-input mode is enabled please provide --enable or --disable option");return}let i=await ke({message:"What would you like to do?",choices:[{name:"Enable telemetry for all commands",value:"enable"},{name:"Disable telemetry for all commands",value:"disable"},{name:"Cancel",value:"cancel"}]});if(i==="enable"||i==="disable"){let s=i==="enable";await n.setGlobalPreference(s),u.info(ea(s))}})},ea=e=>`${G} Telemetry ${e?"enabled":"disabled"} for all Webflow CLI commands`,mu=e=>`${ct} Telemetry status: ${e?`enabled ${G}`:`disabled ${T}`}`;var ju=h(require("http")),Bu=h(require("node-fetch")),Nu=h(require("serve-handler")),Mu=require("fs"),Lu=h(require("path")),Wu=require("commander");var yu=h(require("archiver")),ra=require("commander"),Ro=require("fs");var hu=require("cosmiconfig"),ta=require("commander"),Po=async(e,t)=>{let r=await bh(t),n=r.config.apiVersion;return n&&typeof n!="string"&&ta.program.error('Error: The apiVersion field in webflow.json must be a string (i.e. "apiVersion": "2").'),{filepath:r.filepath,config:{publicDir:e,...r.config}}},bh=async e=>{let r=await(0,hu.cosmiconfig)("webflow",{searchPlaces:[e]}).search();return r||ta.program.error(`No ${e} file was found. Run this command within your extension folder.`),r};var wu=h(require("mime-types")),$o=h(require("path")),vh=5*1024*1024,Fh=new Set(["application/javascript","application/json","application/xml","image/png","image/jpeg","image/gif","image/svg+xml","image/webp","image/vnd.microsoft.icon","image/x-icon","video/webm","font/ttf","font/otf","font/woff","font/woff2","text/plain","text/markdown","text/html","text/css"]),Du=async(e,t,r)=>{let{config:n,filepath:o}=await Po(e,t),i=$o.join(o,".."),s=!0,a=!1,c=d=>{let f=d.name,m=wu.default.lookup(f);return f==="index.html"&&(a=!0),f&&f.endsWith(".DS_Store")||!m?!1:Fh.has(m)?d:(console.log(`Invalid file type: ${m} for file: ${f}`),s=!1,!1)},l=d=>{(0,Ro.unlink)(r,f=>{f&&console.error(`Failed to delete file: ${f}`),ra.program.error(d)})};return console.log(`Packaging the contents of the ${n.publicDir} folder into ${r}...`),new Promise(d=>{let f=(0,yu.default)("zip",{zlib:{level:9}}),m=(0,Ro.createWriteStream)($o.join(i,r));m.on("close",()=>{d(void 0)}),f.directory($o.join(i,n.publicDir),!1,c),f.file(o,{name:t}),f.pipe(m),f.finalize(),f.on("warning",g=>{console.log(g)}),f.on("error",g=>{ra.program.error(g.message)}),f.on("finish",()=>{if(!a){l("Could not find index.html in your `publicDir`, all Designer Extension code needs to be inside of `publicDir`");return}if(!s){l("Bundling failed due to invalid file types");return}if(!f.pointer()||f.pointer()===0){l("Bundling failed with no output");return}if(f.pointer()>=vh){l("Bundling failed due to the bundle exceeding 5MB");return}console.log(`${f.pointer()} total bytes written`),console.log(`Done! ${r} is ready for you to upload to your Webflow app.`)})})};var Ln=h(require("path")),Qe=h(require("fs/promises")),No=h(require("fs")),vu=require("url"),EF=require("dotenv/config"),Fu=["js","cjs","json"],ia=process.cwd(),Eu=".webflowrc",ft=Ln.extname(No.readdirSync(ia).find(e=>e.includes(Eu))??"").replace(/\./g,""),dt=Ln.join(ia,`${Eu}${ft&&`.${ft}`}`),xu=No.existsSync(dt),na=class extends Error{constructor(){super(`Missing extension for .webflowrc file. The supported extensions are: ${Fu.join(", ")}`)}},jo=class extends Error{constructor(){super(`Unsupported extension for .webflowrc: ${ft}. The supported extensions are: ${Fu.join(", ")}`)}},Bo=class extends Error{constructor(t){let r=t.includes(".webflowrc"),n=t.includes("webflow.json"),o;r?o=`It seems like you don't have a .webflowrc file in your project (${t}). Make sure there is a .webflowrc file in your project root.`:n?o=`It seems like you don't have a webflow.json file in your project (${t}). Make sure there is a webflow.json file in your project root.`:o=`It seems like you don't have a config file in your project (${t}). Make sure there is a config file in your project root.`,super(o)}},oa=class extends Error{constructor(t){super(`The following required fields are missing or undefined in your .webflowrc file: ${t}. If you're using process.env variables, make sure they're set up correctly.`)}};async function Eh(e){return(await import(process.platform==="win32"&&e?.match(/[a-zA-Z]:[\\\/]/)?(0,vu.pathToFileURL)(e).href:e)).default}function bu(e,t){let r=t.filter(n=>!e[n]);if(r.length)throw new oa(r.join(", "))}async function Mr(e=[],t=!1){if(!xu){if(t)return{};throw new Bo(dt)}if(!ft)throw new na;switch(ft){case"js":case"cjs":{await Qe.access(dt);let r=await Eh(dt);return bu(r,e),r}case"json":{let r=JSON.parse(await Qe.readFile(dt,"utf8"));return bu(r,e),r}default:throw new jo}}function xh(e,t){if(ft==="js"||ft==="cjs"){let n=new RegExp(`${t}: process.env.([\\w]+),`,"gi").exec(e);if(n)return n[1]}}function Ch(e,t,r){let n=xh(t,r);if(n){let o=new RegExp(`${r}: ".*?",`,"g");return e.replace(o,`${r}: process.env.${n},`)}return e}async function _h(e){let t=["authToken","host","siteId"],r=await Qe.readFile(dt,"utf-8");for(let n of t)e=Ch(e,r,n);return e}async function kh(){try{let e=Ln.join(ia,"package.json");return await Qe.access(e),JSON.parse(await Qe.readFile(e,"utf-8"))?.type==="module"}catch{return!1}}async function Cu(e){if(!xu)throw new Bo(dt);let t=JSON.stringify(e,null,2);switch(ft){case"js":case"cjs":{let r=await _h(t.replace(/"([^"]+)":/g,"$1:")),n=await kh()&&ft==="js"?"export default ":"module.exports = ";return Qe.writeFile(dt,n+r)}case"json":return Qe.writeFile(dt,t);default:throw new jo}}var St=h(require("fs")),$e=h(require("path"));var Wn="webflow.json",_u="index.html",ku="bundle.zip",sa="public",aa="extension-scaffolds",Mo="default",Su="./";var Tu="package.json",Au="wf-placeholder-name",ca=e=>JSON.stringify(e,null,2),Ou=e=>{let t="\u2500".repeat(e.length+2);return"\u256D"+t+`\u256E
|
|
33
33
|
\u2502 `+e+` \u2502
|
|
34
|
-
\u2570`+t+"\u256F"};var
|
|
35
|
-
`)},
|
|
34
|
+
\u2570`+t+"\u256F"};var Iu=async(e,t=Su,r=Mo,n)=>{let o=n[r];try{for(let i of o){let s=$e.join(t,i),a=Th(s,r,e);if(i.includes(Tu)||i.includes(Wn))await Sh(i,a,e);else{let c=await St.promises.readFile(i);await Ru(a,c)}}}catch(i){console.error("Error writing file, ",i)}},Pu=async()=>{let e={},t=$e.resolve(__dirname),r=$e.join(t,aa),n=await St.promises.readdir(r);for(let o of n){let i=$e.join(r,o),s=await $u(i);e[o]=s}return e},$u=async e=>{let t=[];try{let r=await St.promises.readdir(e);for(let n of r){let o=$e.join(e,n);if((await St.promises.stat(o)).isDirectory()){let s=await $u(o);t.push(...s)}else t.push(o)}}catch(r){console.error(`Error reading ${$e}, `,r)}return t},Ru=async(e,t)=>{try{await St.promises.mkdir($e.dirname(e),{recursive:!0}),await St.promises.writeFile(e,t)}catch(r){console.error("Error writing file ",r)}},Sh=async(e,t,r)=>St.promises.readFile(e,"utf8").then(async n=>{let o=n.replace(Au,r);await Ru(t,o)}),Th=(e,t,r)=>{let n=$e.join(aa,t),o=e.indexOf(n);if(o!==-1){let i=e.substring(o+n.length+1);return $e.join(r,i)}return""};var Lo=async()=>await Pu(),Uu=async()=>{let e=await Lo(),t=Object.keys(e).join(", ");console.log(`Your available templates are: ${t}`),console.log('\u{1F4A1} Syntax: "webflow extension init projectName templateName"'),console.log('\u{1F31F} Example: "webflow extension init my-first-extension react"')},Vu=async(e,t=Mo)=>{let r=`./${e}`;console.log(`Scaffolding your new extension named: ${e}...`);let n=await Lo();await Iu(e,r,t,n),console.log(`Done! Check out ${r}/README.md for steps on how to develop your extension.`)},Ju=()=>Du(sa,Wn,ku),Gu=async e=>{let{config:t,filepath:r}=await Po(sa,Wn),n=Lu.join(r,"..",t.publicDir,_u),i=(await Mr([],!0)).extensionTemplateDomain||"webflow-ext.com",s=t.apiVersion==="2"?"template/v2":"template",a=Object.keys(t.featureFlags||{}).map(g=>t.featureFlags?.[g]===!0?`ff_on=${g}`:`ff_off=${g}`).join("&"),c=a?`&${a}`:"",d=await(await(0,Bu.default)(`https://${i}/${s}?name=${t.name}${c}`)).text(),f=new ju.Server((g,w)=>{if(g.url==="/"){Mu.promises.readFile(n,{encoding:"utf-8"}).catch(x=>{Wu.program.error(x.message)}).then(x=>{let k=d.replace("{{ui}}",x);return w.writeHead(200,{"Content-Length":Buffer.byteLength(k),"Content-Type":"text/html"}),w.end(k)});return}if(g.url==="/__webflow")return w.writeHead(200,{"Content-Length":Buffer.byteLength(ca(t)),"Content-Type":"application/json","Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"*"}),w.end(ca(t));(0,Nu.default)(g,w,{public:t.publicDir,cleanUrls:!1,directoryListing:!1})}),m=Ah(e);f.listen(m),console.log(Ou(`Serving your extension at http://localhost:${m}`)+`
|
|
35
|
+
`)},Ah=e=>{if(e){let t=parseInt(e,10);return isNaN(t)?(console.log("Invalid port number provided. Using the default port "+1337),1337):t}return 1337};Se();q();var zu=e=>{let t=e.command("extension").description("CLI for developing Designer Extensions.");t.command("list").description("Get list of project templates that can be used for `init`").action(Uu),t.command("init").description("Bootstrap a Designer Extension.").argument("[projectName]","What is your Designer Extension's name?").argument("[scaffoldName]","Which project template do you want to use?").action(async(r,n)=>{let o=await Lo(),i=Object.keys(o),s=await we({message:"What would you like to name your Designer Extension?",default:r,validate:c=>c.trim()===""?"The Designer Extension name cannot be empty.":!0});if(s===null)throw new p("When --no-input mode is enabled please provide the [projectName] argument.");let a=await ke({message:"Which project template would you like to use?",choices:i.map(c=>({name:c,value:c})),default:n||"default"});await Vu(s,a)}),t.command("bundle").description("Prepare package that can be uploaded to Webflow.").action(Ju),t.command("serve").description("Serve your extension locally.").argument("[port]","The port to serve your extension on").action(Gu)};var ma=h(require("process"));j();ee();de();var Hu=h(require("fs"));q();async function Uo(e){let{authToken:t,siteId:r}=e||{},{path:n,isUserDefined:o}=Ht(),i=Hu.existsSync(n),s=!1;try{let{manifest:a}=J();s=!0,o&&u.info(`Using manifest file: ${n}`);try{let c=_n(a,"devlink");if(!t||!r)throw new Error(`Missing Site ID or API token. Make sure you have WEBFLOW_API_TOKEN and WEBFLOW_SITE_ID set in your environment variables, or pass them as arguments --site and --api-token.
|
|
36
36
|
|
|
37
37
|
To set up your credentials, run:
|
|
38
|
-
webflow auth login`);return
|
|
39
|
-
`})}}catch(a){if(o||i||s){let
|
|
40
|
-
`:`Your manifest file exists but is invalid or missing required properties: ${
|
|
41
|
-
`;throw new
|
|
38
|
+
webflow auth login`);return qu(c?.relativeHrefRoot),{...c,host:C,authToken:t,siteId:r,cssModules:!!c?.cssModules,components:Wo(c?.components),fileExtensions:c?.fileExtensions,...e}}catch(c){throw new p(c,{prefix:`Failed to read devlink config from manifest file: ${n}
|
|
39
|
+
`})}}catch(a){if(o||i||s){let c=o?`The manifest file specified via --manifest flag was not found or is invalid: ${n}
|
|
40
|
+
`:`Your manifest file exists but is invalid or missing required properties: ${n}
|
|
41
|
+
`;throw new p(a,{prefix:c})}}try{let a=[];t||a.push("authToken"),r||a.push("siteId");let c=await Mr(a);return qu(c?.relativeHrefRoot),{...c,host:c.host||C,cssModules:!!c?.cssModules,components:Wo(c?.components),fileExtensions:c?.fileExtensions,...e}}catch(a){throw a instanceof Error&&a.message.includes(".webflowrc")&&(a.message=`No configuration file found. Please create either:
|
|
42
42
|
- webflow.json with a "devlink" section, or
|
|
43
43
|
- .webflowrc file
|
|
44
|
-
in your project root.`),new g(a)}}function gf(e){if(!(e===void 0||e===!1)){if(typeof e=="string"){if(e==="/"||e.startsWith("http://")||e.startsWith("https://"))return;throw new Error(`Invalid relativeHrefRoot value "${e}". Must be false, "/" or an absolute URL starting with http:// or https://`)}throw new Error(`Invalid relativeHrefRoot type. Must be false, "/" or an absolute URL string, got: ${typeof e}`)}}function Ni(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>`^${t}$`).join("|")}Tl();ht();te();var bk=Object.create,pc=Object.defineProperty,Dk=Object.getOwnPropertyDescriptor,vk=Object.getOwnPropertyNames,kk=Object.getPrototypeOf,xk=Object.prototype.hasOwnProperty,Sr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$=(e,t)=>{for(var n in t)pc(e,n,{get:t[n],enumerable:!0})},Ck=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of vk(t))!xk.call(e,o)&&o!==n&&pc(e,o,{get:()=>t[o],enumerable:!(r=Dk(t,o))||r.enumerable});return e},Ek=(e,t,n)=>(n=e!=null?bk(kk(e)):{},Ck(t||!e||!e.__esModule?pc(n,"default",{value:e,enumerable:!0}):n,e)),Fk=Sr(e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(n){if(0<=n&&n<t.length)return t[n];throw new TypeError("Must be between 0 and 63: "+n)},e.decode=function(n){var r=65,o=90,i=97,s=122,a=48,l=57,c=43,u=47,p=26,f=52;return r<=n&&n<=o?n-r:i<=n&&n<=s?n-i+p:a<=n&&n<=l?n-a+f:n==c?62:n==u?63:-1}}),Sk=Sr(e=>{var t=Fk(),n=5,r=1<<n,o=r-1,i=r;function s(l){return l<0?(-l<<1)+1:(l<<1)+0}function a(l){var c=(l&1)===1,u=l>>1;return c?-u:u}e.encode=function(l){var c="",u,p=s(l);do u=p&o,p>>>=n,p>0&&(u|=i),c+=t.encode(u);while(p>0);return c},e.decode=function(l,c,u){var p=l.length,f=0,m=0,h,v;do{if(c>=p)throw new Error("Expected more digits in base 64 VLQ value.");if(v=t.decode(l.charCodeAt(c++)),v===-1)throw new Error("Invalid base64 digit: "+l.charAt(c-1));h=!!(v&i),v&=o,f=f+(v<<m),m+=n}while(h);u.value=a(f),u.rest=c}}),fc=Sr(e=>{function t(y,b,B){if(b in y)return y[b];if(arguments.length===3)return B;throw new Error('"'+b+'" is a required argument.')}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function o(y){var b=y.match(n);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}e.urlParse=o;function i(y){var b="";return y.scheme&&(b+=y.scheme+":"),b+="//",y.auth&&(b+=y.auth+"@"),y.host&&(b+=y.host),y.port&&(b+=":"+y.port),y.path&&(b+=y.path),b}e.urlGenerate=i;var s=32;function a(y){var b=[];return function(B){for(var _=0;_<b.length;_++)if(b[_].input===B){var we=b[0];return b[0]=b[_],b[_]=we,b[0].result}var ot=y(B);return b.unshift({input:B,result:ot}),b.length>s&&b.pop(),ot}}var l=a(function(y){var b=y,B=o(y);if(B){if(!B.path)return y;b=B.path}for(var _=e.isAbsolute(b),we=[],ot=0,W=0;;)if(ot=W,W=b.indexOf("/",ot),W===-1){we.push(b.slice(ot));break}else for(we.push(b.slice(ot,W));W<b.length&&b[W]==="/";)W++;for(var ce,zt=0,W=we.length-1;W>=0;W--)ce=we[W],ce==="."?we.splice(W,1):ce===".."?zt++:zt>0&&(ce===""?(we.splice(W+1,zt),zt=0):(we.splice(W,2),zt--));return b=we.join("/"),b===""&&(b=_?"/":"."),B?(B.path=b,i(B)):b});e.normalize=l;function c(y,b){y===""&&(y="."),b===""&&(b=".");var B=o(b),_=o(y);if(_&&(y=_.path||"/"),B&&!B.scheme)return _&&(B.scheme=_.scheme),i(B);if(B||b.match(r))return b;if(_&&!_.host&&!_.path)return _.host=b,i(_);var we=b.charAt(0)==="/"?b:l(y.replace(/\/+$/,"")+"/"+b);return _?(_.path=we,i(_)):we}e.join=c,e.isAbsolute=function(y){return y.charAt(0)==="/"||n.test(y)};function u(y,b){y===""&&(y="."),y=y.replace(/\/$/,"");for(var B=0;b.indexOf(y+"/")!==0;){var _=y.lastIndexOf("/");if(_<0||(y=y.slice(0,_),y.match(/^([^\/]+:\/)?\/*$/)))return b;++B}return Array(B+1).join("../")+b.substr(y.length+1)}e.relative=u;var p=function(){var y=Object.create(null);return!("__proto__"in y)}();function f(y){return y}function m(y){return v(y)?"$"+y:y}e.toSetString=p?f:m;function h(y){return v(y)?y.slice(1):y}e.fromSetString=p?f:h;function v(y){if(!y)return!1;var b=y.length;if(b<9||y.charCodeAt(b-1)!==95||y.charCodeAt(b-2)!==95||y.charCodeAt(b-3)!==111||y.charCodeAt(b-4)!==116||y.charCodeAt(b-5)!==111||y.charCodeAt(b-6)!==114||y.charCodeAt(b-7)!==112||y.charCodeAt(b-8)!==95||y.charCodeAt(b-9)!==95)return!1;for(var B=b-10;B>=0;B--)if(y.charCodeAt(B)!==36)return!1;return!0}function k(y,b,B){var _=x(y.source,b.source);return _!==0||(_=y.originalLine-b.originalLine,_!==0)||(_=y.originalColumn-b.originalColumn,_!==0||B)||(_=y.generatedColumn-b.generatedColumn,_!==0)||(_=y.generatedLine-b.generatedLine,_!==0)?_:x(y.name,b.name)}e.compareByOriginalPositions=k;function T(y,b,B){var _;return _=y.originalLine-b.originalLine,_!==0||(_=y.originalColumn-b.originalColumn,_!==0||B)||(_=y.generatedColumn-b.generatedColumn,_!==0)||(_=y.generatedLine-b.generatedLine,_!==0)?_:x(y.name,b.name)}e.compareByOriginalPositionsNoSource=T;function P(y,b,B){var _=y.generatedLine-b.generatedLine;return _!==0||(_=y.generatedColumn-b.generatedColumn,_!==0||B)||(_=x(y.source,b.source),_!==0)||(_=y.originalLine-b.originalLine,_!==0)||(_=y.originalColumn-b.originalColumn,_!==0)?_:x(y.name,b.name)}e.compareByGeneratedPositionsDeflated=P;function C(y,b,B){var _=y.generatedColumn-b.generatedColumn;return _!==0||B||(_=x(y.source,b.source),_!==0)||(_=y.originalLine-b.originalLine,_!==0)||(_=y.originalColumn-b.originalColumn,_!==0)?_:x(y.name,b.name)}e.compareByGeneratedPositionsDeflatedNoLine=C;function x(y,b){return y===b?0:y===null?1:b===null?-1:y>b?1:-1}function z(y,b){var B=y.generatedLine-b.generatedLine;return B!==0||(B=y.generatedColumn-b.generatedColumn,B!==0)||(B=x(y.source,b.source),B!==0)||(B=y.originalLine-b.originalLine,B!==0)||(B=y.originalColumn-b.originalColumn,B!==0)?B:x(y.name,b.name)}e.compareByGeneratedPositionsInflated=z;function j(y){return JSON.parse(y.replace(/^\)]}'[^\n]*\n/,""))}e.parseSourceMapInput=j;function S(y,b,B){if(b=b||"",y&&(y[y.length-1]!=="/"&&b[0]!=="/"&&(y+="/"),b=y+b),B){var _=o(B);if(!_)throw new Error("sourceMapURL could not be parsed");if(_.path){var we=_.path.lastIndexOf("/");we>=0&&(_.path=_.path.substring(0,we+1))}b=c(i(_),b)}return l(b)}e.computeSourceURL=S}),_k=Sr(e=>{var t=fc(),n=Object.prototype.hasOwnProperty,r=typeof Map<"u";function o(){this._array=[],this._set=r?new Map:Object.create(null)}o.fromArray=function(i,s){for(var a=new o,l=0,c=i.length;l<c;l++)a.add(i[l],s);return a},o.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(i,s){var a=r?i:t.toSetString(i),l=r?this.has(i):n.call(this._set,a),c=this._array.length;(!l||s)&&this._array.push(i),l||(r?this._set.set(i,c):this._set[a]=c)},o.prototype.has=function(i){if(r)return this._set.has(i);var s=t.toSetString(i);return n.call(this._set,s)},o.prototype.indexOf=function(i){if(r){var s=this._set.get(i);if(s>=0)return s}else{var a=t.toSetString(i);if(n.call(this._set,a))return this._set[a]}throw new Error('"'+i+'" is not in the set.')},o.prototype.at=function(i){if(i>=0&&i<this._array.length)return this._array[i];throw new Error("No element indexed by "+i)},o.prototype.toArray=function(){return this._array.slice()},e.ArraySet=o}),Ak=Sr(e=>{var t=fc();function n(o,i){var s=o.generatedLine,a=i.generatedLine,l=o.generatedColumn,c=i.generatedColumn;return a>s||a==s&&c>=l||t.compareByGeneratedPositionsInflated(o,i)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(o,i){this._array.forEach(o,i)},r.prototype.add=function(o){n(this._last,o)?(this._last=o,this._array.push(o)):(this._sorted=!1,this._array.push(o))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r}),Tk=Sr(e=>{var t=Sk(),n=fc(),r=_k().ArraySet,o=Ak().MappingList;function i(s){s||(s={}),this._file=n.getArg(s,"file",null),this._sourceRoot=n.getArg(s,"sourceRoot",null),this._skipValidation=n.getArg(s,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(s){var a=s.sourceRoot,l=new i({file:s.file,sourceRoot:a});return s.eachMapping(function(c){var u={generated:{line:c.generatedLine,column:c.generatedColumn}};c.source!=null&&(u.source=c.source,a!=null&&(u.source=n.relative(a,u.source)),u.original={line:c.originalLine,column:c.originalColumn},c.name!=null&&(u.name=c.name)),l.addMapping(u)}),s.sources.forEach(function(c){var u=c;a!==null&&(u=n.relative(a,c)),l._sources.has(u)||l._sources.add(u);var p=s.sourceContentFor(c);p!=null&&l.setSourceContent(c,p)}),l},i.prototype.addMapping=function(s){var a=n.getArg(s,"generated"),l=n.getArg(s,"original",null),c=n.getArg(s,"source",null),u=n.getArg(s,"name",null);this._skipValidation||this._validateMapping(a,l,c,u),c!=null&&(c=String(c),this._sources.has(c)||this._sources.add(c)),u!=null&&(u=String(u),this._names.has(u)||this._names.add(u)),this._mappings.add({generatedLine:a.line,generatedColumn:a.column,originalLine:l!=null&&l.line,originalColumn:l!=null&&l.column,source:c,name:u})},i.prototype.setSourceContent=function(s,a){var l=s;this._sourceRoot!=null&&(l=n.relative(this._sourceRoot,l)),a!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(l)]=a):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(l)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(s,a,l){var c=a;if(a==null){if(s.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);c=s.file}var u=this._sourceRoot;u!=null&&(c=n.relative(u,c));var p=new r,f=new r;this._mappings.unsortedForEach(function(m){if(m.source===c&&m.originalLine!=null){var h=s.originalPositionFor({line:m.originalLine,column:m.originalColumn});h.source!=null&&(m.source=h.source,l!=null&&(m.source=n.join(l,m.source)),u!=null&&(m.source=n.relative(u,m.source)),m.originalLine=h.line,m.originalColumn=h.column,h.name!=null&&(m.name=h.name))}var v=m.source;v!=null&&!p.has(v)&&p.add(v);var k=m.name;k!=null&&!f.has(k)&&f.add(k)},this),this._sources=p,this._names=f,s.sources.forEach(function(m){var h=s.sourceContentFor(m);h!=null&&(l!=null&&(m=n.join(l,m)),u!=null&&(m=n.relative(u,m)),this.setSourceContent(m,h))},this)},i.prototype._validateMapping=function(s,a,l,c){if(a&&typeof a.line!="number"&&typeof a.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(s&&"line"in s&&"column"in s&&s.line>0&&s.column>=0&&!a&&!l&&!c)){if(s&&"line"in s&&"column"in s&&a&&"line"in a&&"column"in a&&s.line>0&&s.column>=0&&a.line>0&&a.column>=0&&l)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:s,source:l,original:a,name:c}))}},i.prototype._serializeMappings=function(){for(var s=0,a=1,l=0,c=0,u=0,p=0,f="",m,h,v,k,T=this._mappings.toArray(),P=0,C=T.length;P<C;P++){if(h=T[P],m="",h.generatedLine!==a)for(s=0;h.generatedLine!==a;)m+=";",a++;else if(P>0){if(!n.compareByGeneratedPositionsInflated(h,T[P-1]))continue;m+=","}m+=t.encode(h.generatedColumn-s),s=h.generatedColumn,h.source!=null&&(k=this._sources.indexOf(h.source),m+=t.encode(k-p),p=k,m+=t.encode(h.originalLine-1-c),c=h.originalLine-1,m+=t.encode(h.originalColumn-l),l=h.originalColumn,h.name!=null&&(v=this._names.indexOf(h.name),m+=t.encode(v-u),u=v)),f+=m}return f},i.prototype._generateSourcesContent=function(s,a){return s.map(function(l){if(!this._sourcesContents)return null;a!=null&&(l=n.relative(a,l));var c=n.toSetString(l);return Object.prototype.hasOwnProperty.call(this._sourcesContents,c)?this._sourcesContents[c]:null},this)},i.prototype.toJSON=function(){var s={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(s.file=this._file),this._sourceRoot!=null&&(s.sourceRoot=this._sourceRoot),this._sourcesContents&&(s.sourcesContent=this._generateSourcesContent(s.sources,s.sourceRoot)),s},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i}),Ok={};$(Ok,{AtKeyword:()=>Rk,BadString:()=>Nk,BadUrl:()=>Mk,CDC:()=>Gk,CDO:()=>qk,Colon:()=>Hk,Comma:()=>Kk,Comment:()=>r0,Delim:()=>Wk,Dimension:()=>Vk,EOF:()=>Pk,Function:()=>jk,Hash:()=>$k,Ident:()=>Ik,LeftCurlyBracket:()=>t0,LeftParenthesis:()=>Qk,LeftSquareBracket:()=>Yk,Number:()=>Uk,Percentage:()=>zk,RightCurlyBracket:()=>n0,RightParenthesis:()=>e0,RightSquareBracket:()=>Xk,Semicolon:()=>Zk,String:()=>Bk,Url:()=>Lk,WhiteSpace:()=>Jk});var Pk=0,Ik=1,jk=2,Rk=3,$k=4,Bk=5,Nk=6,Lk=7,Mk=8,Wk=9,Uk=10,zk=11,Vk=12,Jk=13,qk=14,Gk=15,Hk=16,Zk=17,Kk=18,Yk=19,Xk=20,Qk=21,e0=22,t0=23,n0=24,r0=25;function De(e){return e>=48&&e<=57}function nn(e){return De(e)||e>=65&&e<=70||e>=97&&e<=102}function mc(e){return e>=65&&e<=90}function o0(e){return e>=97&&e<=122}function i0(e){return mc(e)||o0(e)}function s0(e){return e>=128}function es(e){return i0(e)||s0(e)||e===95}function gc(e){return es(e)||De(e)||e===45}function a0(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function ts(e){return e===10||e===13||e===12}function Tn(e){return ts(e)||e===32||e===9}function ct(e,t){return!(e!==92||ts(t)||t===0)}function Zi(e,t,n){return e===45?es(t)||t===45||ct(t,n):es(e)?!0:e===92?ct(e,t):!1}function Ol(e,t,n){return e===43||e===45?De(t)?2:t===46&&De(n)?3:0:e===46?De(t)?2:0:De(e)?1:0}function fm(e){return e===65279||e===65534?1:0}var Kl=new Array(128),l0=128,Ki=130,mm=131,hc=132,gm=133;for(let e=0;e<Kl.length;e++)Kl[e]=Tn(e)&&Ki||De(e)&&mm||es(e)&&hc||a0(e)&&gm||e||l0;function Pl(e){return e<128?Kl[e]:hc}function xr(e,t){return t<e.length?e.charCodeAt(t):0}function Yl(e,t,n){return n===13&&xr(e,t+1)===10?2:1}function Cr(e,t,n){let r=e.charCodeAt(t);return mc(r)&&(r=r|32),r===n}function Bo(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let o=t;o<n;o++){let i=r.charCodeAt(o-t),s=e.charCodeAt(o);if(mc(s)&&(s=s|32),s!==i)return!1}return!0}function c0(e,t){for(;t>=0&&Tn(e.charCodeAt(t));t--);return t+1}function Ui(e,t){for(;t<e.length&&Tn(e.charCodeAt(t));t++);return t}function Il(e,t){for(;t<e.length&&De(e.charCodeAt(t));t++);return t}function On(e,t){if(t+=2,nn(xr(e,t-1))){for(let r=Math.min(e.length,t+5);t<r&&nn(xr(e,t));t++);let n=xr(e,t);Tn(n)&&(t+=Yl(e,t,n))}return t}function zi(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!gc(n)){if(ct(n,xr(e,t+1))){t=On(e,t)-1;continue}break}}return t}function ls(e,t){let n=e.charCodeAt(t);if((n===43||n===45)&&(n=e.charCodeAt(t+=1)),De(n)&&(t=Il(e,t+1),n=e.charCodeAt(t)),n===46&&De(e.charCodeAt(t+1))&&(t+=2,t=Il(e,t)),Cr(e,t,101)){let r=0;n=e.charCodeAt(t+1),(n===45||n===43)&&(r=1,n=e.charCodeAt(t+2)),De(n)&&(t=Il(e,t+1+r+1))}return t}function jl(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n===41){t++;break}ct(n,xr(e,t+1))&&(t=On(e,t))}return t}function yc(e){if(e.length===1&&!nn(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var hm=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];function ns(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}var yf=10,u0=12,wf=13;function bf(e){let t=e.source,n=t.length,r=t.length>0?fm(t.charCodeAt(0)):0,o=ns(e.lines,n),i=ns(e.columns,n),s=e.startLine,a=e.startColumn;for(let l=r;l<n;l++){let c=t.charCodeAt(l);o[l]=s,i[l]=a++,(c===yf||c===wf||c===u0)&&(c===wf&&l+1<n&&t.charCodeAt(l+1)===yf&&(l++,o[l]=s,i[l]=a),s++,a=1)}o[n]=s,i[n]=a,e.lines=o,e.columns=i,e.computed=!0}var d0=class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||bf(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||bf(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},He=16777215,Qt=24,p0=new Map([[2,22],[21,22],[19,20],[23,24]]),f0=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=()=>{}){e=String(e||"");let n=e.length,r=ns(this.offsetAndType,e.length+1),o=ns(this.balance,e.length+1),i=0,s=0,a=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,(c,u,p)=>{switch(c){default:o[i]=n;break;case s:{let f=a&He;for(a=o[f],s=a>>Qt,o[i]=f,o[f++]=i;f<i;f++)o[f]===n&&(o[f]=i);break}case 21:case 2:case 19:case 23:o[i]=a,s=p0.get(c),a=s<<Qt|i;break}r[i++]=c<<Qt|p,l===-1&&(l=u)}),r[i]=0<<Qt|n,o[i]=n,o[n]=n;a!==0;){let c=a&He;a=o[c],o[c]=n}this.source=e,this.firstCharOffset=l===-1?0:l,this.tokenCount=i,this.offsetAndType=r,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>Qt:0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&He:this.source.length}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount?Bo(this.source,this.offsetAndType[e-1]&He,this.offsetAndType[e]&He,t):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&He:this.offsetAndType[this.tokenCount]&He:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&He,t=this.offsetAndType[t],this.tokenType=t>>Qt,this.tokenEnd=t&He):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>Qt,this.tokenEnd=e&He):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let n=e,r,o;e:for(;n<this.tokenCount;n++){if(r=this.balance[n],r<e)break e;switch(o=n>0?this.offsetAndType[n-1]&He:this.firstCharOffset,t(this.source.charCodeAt(o))){case 1:break e;case 2:n++;break e;default:this.balance[r]===n&&(n=r)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,o=this.offsetAndType[t],i=o&He,s=o>>Qt;n=i,e(s,r,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken((t,n,r,o)=>{e[o]={idx:o,type:hm[t],chunk:this.source.substring(n,r),balance:this.balance[o]}}),e}};function cs(e,t){function n(p){return p<a?e.charCodeAt(p):0}function r(){if(c=ls(e,c),Zi(n(c),n(c+1),n(c+2))){u=12,c=zi(e,c);return}if(n(c)===37){u=11,c++;return}u=10}function o(){let p=c;if(c=zi(e,c),Bo(e,p,c,"url")&&n(c)===40){if(c=Ui(e,c+1),n(c)===34||n(c)===39){u=2,c=p+4;return}s();return}if(n(c)===40){u=2,c++;return}u=1}function i(p){for(p||(p=n(c++)),u=5;c<e.length;c++){let f=e.charCodeAt(c);switch(Pl(f)){case p:c++;return;case Ki:if(ts(f)){c+=Yl(e,c,f),u=6;return}break;case 92:if(c===e.length-1)break;let m=n(c+1);ts(m)?c+=Yl(e,c+1,m):ct(f,m)&&(c=On(e,c)-1);break}}}function s(){for(u=7,c=Ui(e,c);c<e.length;c++){let p=e.charCodeAt(c);switch(Pl(p)){case 41:c++;return;case Ki:if(c=Ui(e,c),n(c)===41||c>=e.length){c<e.length&&c++;return}c=jl(e,c),u=8;return;case 34:case 39:case 40:case gm:c=jl(e,c),u=8;return;case 92:if(ct(p,n(c+1))){c=On(e,c)-1;break}c=jl(e,c),u=8;return}}}e=String(e||"");let a=e.length,l=fm(n(0)),c=l,u;for(;c<a;){let p=e.charCodeAt(c);switch(Pl(p)){case Ki:u=13,c=Ui(e,c+1);break;case 34:i();break;case 35:gc(n(c+1))||ct(n(c+1),n(c+2))?(u=4,c=zi(e,c+1)):(u=9,c++);break;case 39:i();break;case 40:u=21,c++;break;case 41:u=22,c++;break;case 43:Ol(p,n(c+1),n(c+2))?r():(u=9,c++);break;case 44:u=18,c++;break;case 45:Ol(p,n(c+1),n(c+2))?r():n(c+1)===45&&n(c+2)===62?(u=15,c=c+3):Zi(p,n(c+1),n(c+2))?o():(u=9,c++);break;case 46:Ol(p,n(c+1),n(c+2))?r():(u=9,c++);break;case 47:n(c+1)===42?(u=25,c=e.indexOf("*/",c+2),c=c===-1?e.length:c+2):(u=9,c++);break;case 58:u=16,c++;break;case 59:u=17,c++;break;case 60:n(c+1)===33&&n(c+2)===45&&n(c+3)===45?(u=14,c=c+4):(u=9,c++);break;case 64:Zi(n(c+1),n(c+2),n(c+3))?(u=3,c=zi(e,c+1)):(u=9,c++);break;case 91:u=19,c++;break;case 92:ct(p,n(c+1))?o():(u=9,c++);break;case 93:u=20,c++;break;case 123:u=23,c++;break;case 125:u=24,c++;break;case mm:r();break;case hc:o();break;default:u=9,c++}t(u,l,l=c)}}var wr=null,ye=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return ye.createItem(e)}allocateCursor(e,t){let n;return wr!==null?(n=wr,wr=wr.cursor,n.prev=e,n.next=t,n.cursor=this.cursor):n={prev:e,next:t,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=wr,wr=e}updateCursors(e,t,n,r){let{cursor:o}=this;for(;o!==null;)o.prev===e&&(o.prev=t),o.next===n&&(o.next=r),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;t!==null;t=t.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let n of e){let r=ye.createItem(n);t!==null?t.next=r:this.head=r,r.prev=t,t=r}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r=this.allocateCursor(null,this.head),o=t,i;for(;r.next!==null;)i=r.next,r.next=i.next,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}reduceRight(e,t,n=this){let r=this.allocateCursor(this.tail,null),o=t,i;for(;r.prev!==null;)i=r.prev,r.prev=i.prev,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}some(e,t=this){for(let n=this.head;n!==null;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(e,t=this){let n=new ye;for(let r=this.head;r!==null;r=r.next)n.appendData(e.call(t,r.data,r,this));return n}filter(e,t=this){let n=new ye;for(let r=this.head;r!==null;r=r.next)e.call(t,r.data,r,this)&&n.appendData(r.data);return n}nextUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(null,e);for(;r.next!==null;){let o=r.next;if(r.next=o.next,t.call(n,o.data,o,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(e,null);for(;r.prev!==null;){let o=r.prev;if(r.prev=o.prev,t.call(n,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new ye;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),this.head!==null?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(ye.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(ye.createItem(e))}insert(e,t=null){if(t!==null)if(this.updateCursors(t.prev,e,t,e),t.prev===null){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),this.tail!==null?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(ye.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(ye.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(ye.createItem(e))}shift(){return this.head!==null?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return e.head===null?this:(t!=null?(this.updateCursors(t.prev,e.tail,t,e.head),t.prev!==null?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),this.tail!==null?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null,this)}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function us(e,t){let n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}
|
|
45
|
-
`)
|
|
46
|
-
`)}let i=e.split(/\r\n?|\n|\f/),s=Math.max(1,t-r)-1,a=Math.min(t+r,i.length+1),l=Math.max(4,String(a).length)+1,c=0;n+=(vf.length-1)*(i[t-1].substr(0,n-1).match(/\t/g)||[]).length,n>Rl&&(c=n-Df+3,n=Df-2);for(let u=s;u<=a;u++)u>=0&&u<i.length&&(i[u]=i[u].replace(/\t/g,vf),i[u]=(c>0&&i[u].length>c?"\u2026":"")+i[u].substr(c,Rl-2)+(i[u].length>c+Rl-1?"\u2026":""));return[o(s,t),new Array(n+l+2).join("-")+"^",o(t,a)].filter(Boolean).join(`
|
|
47
|
-
`)}function xf(e,t,n,r,o){return Object.assign(us("SyntaxError",e),{source:t,offset:n,line:r,column:o,sourceFragment(i){return kf({source:t,line:r,column:o},isNaN(i)?0:i)},get formattedMessage(){return`Parse error: ${e}
|
|
48
|
-
`+kf({source:t,line:r,column:o},2)}})}function m0(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let o=e.getNode.call(this,r);if(o===void 0)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,r),n=!1),t.push(o)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var Cf=()=>{},g0=33,h0=35,$l=59,Ef=123,Ff=0;function y0(e){return function(){return this[e]()}}function Bl(e){let t=Object.create(null);for(let n in e){let r=e[n],o=r.parse||r;o&&(t[n]=o)}return t}function w0(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Bl(e.atrule),pseudo:Bl(e.pseudo),node:Bl(e.node)};for(let n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=y0(e.parseContext[n]);break}return{config:t,...t,...t.node}}function b0(e){let t="",n="<unknown>",r=!1,o=Cf,i=!1,s=new d0,a=Object.assign(new f0,w0(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:m0,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(l){return l===Ef?1:0},consumeUntilLeftCurlyBracketOrSemicolon(l){return l===Ef||l===$l?1:0},consumeUntilExclamationMarkOrSemicolon(l){return l===g0||l===$l?1:0},consumeUntilSemicolonIncluded(l){return l===$l?2:0},createList(){return new ye},createSingleNodeList(l){return new ye().appendData(l)},getFirstListNode(l){return l&&l.first},getLastListNode(l){return l&&l.last},parseWithFallback(l,c){let u=this.tokenIndex;try{return l.call(this)}catch(p){if(i)throw p;let f=c.call(this,u);return i=!0,o(p,f),i=!1,f}},lookupNonWSType(l){let c;do if(c=this.lookupType(l++),c!==13)return c;while(c!==Ff);return Ff},charCodeAt(l){return l>=0&&l<t.length?t.charCodeAt(l):0},substring(l,c){return t.substring(l,c)},substrToCursor(l){return this.source.substring(l,this.tokenStart)},cmpChar(l,c){return Cr(t,l,c)},cmpStr(l,c,u){return Bo(t,l,c,u)},consume(l){let c=this.tokenStart;return this.eat(l),this.substrToCursor(c)},consumeFunctionName(){let l=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),l},consumeNumber(l){let c=t.substring(this.tokenStart,ls(t,this.tokenStart));return this.eat(l),c},eat(l){if(this.tokenType!==l){let c=hm[l].slice(0,-6).replace(/-/g," ").replace(/^./,f=>f.toUpperCase()),u=`${/[[\](){}]/.test(c)?`"${c}"`:c} is expected`,p=this.tokenStart;switch(l){case 1:this.tokenType===2||this.tokenType===7?(p=this.tokenEnd-1,u="Identifier is expected but function found"):u="Identifier is expected";break;case 4:this.isDelim(h0)&&(this.next(),p++,u="Name is expected");break;case 11:this.tokenType===10&&(p=this.tokenEnd,u="Percent sign is expected");break}this.error(u,p)}this.next()},eatIdent(l){(this.tokenType!==1||this.lookupValue(0,l)===!1)&&this.error(`Identifier "${l}" is expected`),this.next()},eatDelim(l){this.isDelim(l)||this.error(`Delim "${String.fromCharCode(l)}" is expected`),this.next()},getLocation(l,c){return r?s.getLocationRange(l,c,n):null},getLocationFromList(l){if(r){let c=this.getFirstListNode(l),u=this.getLastListNode(l);return s.getLocationRange(c!==null?c.loc.start.offset-s.startOffset:this.tokenStart,u!==null?u.loc.end.offset-s.startOffset:this.tokenStart,n)}return null},error(l,c){let u=typeof c<"u"&&c<t.length?s.getLocation(c):this.eof?s.getLocation(c0(t,t.length-1)):s.getLocation(this.tokenStart);throw new xf(l||"Unexpected input",t,u.offset,u.line,u.column)}});return Object.assign(function(l,c){t=l,c=c||{},a.setSource(t,cs),s.setSource(t,c.offset,c.line,c.column),n=c.filename||"<unknown>",r=!!c.positions,o=typeof c.onParseError=="function"?c.onParseError:Cf,i=!1,a.parseAtrulePrelude="parseAtrulePrelude"in c?!!c.parseAtrulePrelude:!0,a.parseRulePrelude="parseRulePrelude"in c?!!c.parseRulePrelude:!0,a.parseValue="parseValue"in c?!!c.parseValue:!0,a.parseCustomProperty="parseCustomProperty"in c?!!c.parseCustomProperty:!1;let{context:u="default",onComment:p}=c;if(!(u in a.context))throw new Error("Unknown context `"+u+"`");typeof p=="function"&&a.forEachToken((m,h,v)=>{if(m===25){let k=a.getLocation(h,v),T=Bo(t,v-2,v,"*/")?t.slice(h+2,v-2):t.slice(h+2,v);p(T,k)}});let f=a.context[u].call(a,c);return a.eof||a.error(),f},{SyntaxError:xf,config:a.config})}var D0=Ek(Tk(),1),Sf=new Set(["Atrule","Selector","Declaration"]);function v0(e){let t=new D0.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},o={line:1,column:0},i={generated:o},s=1,a=0,l=!1,c=e.node;e.node=function(f){if(f.loc&&f.loc.start&&Sf.has(f.type)){let m=f.loc.start.line,h=f.loc.start.column-1;(r.line!==m||r.column!==h)&&(r.line=m,r.column=h,n.line=s,n.column=a,l&&(l=!1,(n.line!==o.line||n.column!==o.column)&&t.addMapping(i)),l=!0,t.addMapping({source:f.loc.source,original:r,generated:n}))}c.call(this,f),l&&Sf.has(f.type)&&(o.line=s,o.column=a)};let u=e.emit;e.emit=function(f,m,h){for(let v=0;v<f.length;v++)f.charCodeAt(v)===10?(s++,a=0):a++;u(f,m,h)};let p=e.result;return e.result=function(){return l&&t.addMapping(i),{css:p(),map:t}},e}var Xl={};$(Xl,{safe:()=>bm,spec:()=>E0});var k0=43,x0=45,Nl=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){let n=e.charCodeAt(0);return n>127?32768:n<<8}return e},ym=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],C0=ym.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function wm(e){let t=new Set(e.map(([n,r])=>Nl(n)<<16|Nl(r)));return function(n,r,o){let i=Nl(r,o),s=o.charCodeAt(0);return(s===x0&&r!==1&&r!==2&&r!==15||s===k0?t.has(n<<16|s<<8):t.has(n<<16|i))&&this.emit(" ",13,!0),i}}var E0=wm(ym),bm=wm(C0),F0=92;function S0(e,t){if(typeof t=="function"){let n=null;e.children.forEach(r=>{n!==null&&t.call(this,n),this.node(r),n=r});return}e.children.forEach(this.node,this)}function _0(e){cs(e,(t,n,r)=>{this.token(t,e.slice(n,r))})}function A0(e){let t=new Map;for(let n in e.node){let r=e.node[n];typeof(r.generate||r)=="function"&&t.set(n,r.generate||r)}return function(n,r){let o="",i=0,s={node(l){if(t.has(l.type))t.get(l.type).call(a,l);else throw new Error("Unknown node type: "+l.type)},tokenBefore:bm,token(l,c){i=this.tokenBefore(i,l,c),this.emit(c,l,!1),l===9&&c.charCodeAt(0)===F0&&this.emit(`
|
|
49
|
-
`,13,!0)},emit(l){o+=l},result(){return o}};r&&(typeof r.decorator=="function"&&(s=r.decorator(s)),r.sourceMap&&(s=v0(s)),r.mode in Xl&&(s.tokenBefore=Xl[r.mode]));let a={node:l=>s.node(l),children:S0,token:(l,c)=>s.token(l,c),tokenize:_0};return s.node(n),s.result()}}function T0(e){return{fromPlainObject(t){return e(t,{enter(n){n.children&&!(n.children instanceof ye)&&(n.children=new ye().fromArray(n.children))}}),t},toPlainObject(t){return e(t,{leave(n){n.children&&n.children instanceof ye&&(n.children=n.children.toArray())}}),t}}}var{hasOwnProperty:wc}=Object.prototype,To=function(){};function _f(e){return typeof e=="function"?e:To}function Af(e,t){return function(n,r,o){n.type===t&&e.call(this,n,r,o)}}function O0(e,t){let n=t.structure,r=[];for(let o in n){if(wc.call(n,o)===!1)continue;let i=n[o],s={name:o,type:!1,nullable:!1};Array.isArray(i)||(i=[i]);for(let a of i)a===null?s.nullable=!0:typeof a=="string"?s.type="node":Array.isArray(a)&&(s.type="list");s.type&&r.push(s)}return r.length?{context:t.walkContext,fields:r}:null}function P0(e){let t={};for(let n in e.node)if(wc.call(e.node,n)){let r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=O0(n,r)}return t}function Tf(e,t){let n=e.fields.slice(),r=e.context,o=typeof r=="string";return t&&n.reverse(),function(i,s,a,l){let c;o&&(c=s[r],s[r]=i);for(let u of n){let p=i[u.name];if(!u.nullable||p){if(u.type==="list"){if(t?p.reduceRight(l,!1):p.reduce(l,!1))return!0}else if(a(p))return!0}}o&&(s[r]=c)}}function Of({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}}}function I0(e){let t=P0(e),n={},r={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let c in t)wc.call(t,c)&&t[c]!==null&&(n[c]=Tf(t[c],!1),r[c]=Tf(t[c],!0));let s=Of(n),a=Of(r),l=function(c,u){function p(T,P,C){let x=f.call(k,T,P,C);return x===o?!0:x===i?!1:!!(h.hasOwnProperty(T.type)&&h[T.type](T,k,p,v)||m.call(k,T,P,C)===o)}let f=To,m=To,h=n,v=(T,P,C,x)=>T||p(P,C,x),k={break:o,skip:i,root:c,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof u=="function")f=u;else if(u&&(f=_f(u.enter),m=_f(u.leave),u.reverse&&(h=r),u.visit)){if(s.hasOwnProperty(u.visit))h=u.reverse?a[u.visit]:s[u.visit];else if(!t.hasOwnProperty(u.visit))throw new Error("Bad value `"+u.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");f=Af(f,u.visit),m=Af(m,u.visit)}if(f===To&&m===To)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");p(c)};return l.break=o,l.skip=i,l.find=function(c,u){let p=null;return l(c,function(f,m,h){if(u.call(this,f,m,h))return p=f,o}),p},l.findLast=function(c,u){let p=null;return l(c,{reverse:!0,enter(f,m,h){if(u.call(this,f,m,h))return p=f,o}}),p},l.findAll=function(c,u){let p=[];return l(c,function(f,m,h){u.call(this,f,m,h)&&p.push(f)}),p},l}function j0(e){return e}function R0(e){let{min:t,max:n,comma:r}=e;return t===0&&n===0?r?"#?":"*":t===0&&n===1?"?":t===1&&n===0?r?"#":"+":t===1&&n===1?"":(r?"#":"")+(t===n?"{"+t+"}":"{"+t+","+(n!==0?n:"")+"}")}function $0(e){switch(e.type){case"Range":return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}function B0(e,t,n,r){let o=e.combinator===" "||r?e.combinator:" "+e.combinator+" ",i=e.terms.map(s=>bc(s,t,n,r)).join(o);return e.explicit||n?(r||i[0]===","?"[":"[ ")+i+(r?"]":" ]"):i}function bc(e,t,n,r){let o;switch(e.type){case"Group":o=B0(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return bc(e.term,t,n,r)+t(R0(e),e);case"Type":o="<"+e.name+(e.opts?t($0(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function ds(e,t){let n=j0,r=!1,o=!1;return typeof t=="function"?n=t:t&&(r=!!t.forceBraces,o=!!t.compact,typeof t.decorate=="function"&&(n=t.decorate)),bc(e,n,r,o)}var Pf={offset:0,line:1,column:1};function N0(e,t){let n=e.tokens,r=e.longestMatch,o=r<n.length&&n[r].node||null,i=o!==t?o:null,s=0,a=0,l=0,c="",u,p;for(let f=0;f<n.length;f++){let m=n[f].value;f===r&&(a=m.length,s=c.length),i!==null&&n[f].node===i&&(f<=r?l++:l=0),c+=m}return r===n.length||l>1?(u=Vi(i||t,"end")||Oo(Pf,c),p=Oo(u)):(u=Vi(i,"start")||Oo(Vi(t,"start")||Pf,c.slice(0,s)),p=Vi(i,"end")||Oo(u,c.substr(s,a))),{css:c,mismatchOffset:s,mismatchLength:a,start:u,end:p}}function Vi(e,t){let n=e&&e.loc&&e.loc[t];return n?"line"in n?Oo(n):n:null}function Oo({offset:e,line:t,column:n},r){let o={offset:e,line:t,column:n};if(r){let i=r.split(/\n|\r\n?|\f/);o.offset+=r.length,o.line+=i.length-1,o.column=i.length===1?o.column+r.length:i.pop().length+1}return o}var Ao=function(e,t){let n=us("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},L0=function(e,t,n,r){let o=us("SyntaxMatchError",e),{css:i,mismatchOffset:s,mismatchLength:a,start:l,end:c}=N0(r,n);return o.rawMessage=e,o.syntax=t?ds(t):"<generic>",o.css=i,o.mismatchOffset=s,o.mismatchLength=a,o.message=e+`
|
|
50
|
-
syntax: `+o.syntax+`
|
|
51
|
-
value: `+(i||"<empty string>")+`
|
|
52
|
-
--------`+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:l,end:c},o},Ji=new Map,br=new Map,rs=45,Ll=M0,If=W0;function Dc(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===rs&&e.charCodeAt(t+1)===rs}function Dm(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===rs&&e.charCodeAt(t+1)!==rs){let n=e.indexOf("-",t+2);if(n!==-1)return e.substring(t,n+1)}return""}function M0(e){if(Ji.has(e))return Ji.get(e);let t=e.toLowerCase(),n=Ji.get(t);if(n===void 0){let r=Dc(t,0),o=r?"":Dm(t,0);n=Object.freeze({basename:t.substr(o.length),name:t,prefix:o,vendor:o,custom:r})}return Ji.set(e,n),n}function W0(e){if(br.has(e))return br.get(e);let t=e,n=e[0];n==="/"?n=e[1]==="/"?"//":"/":n!=="_"&&n!=="*"&&n!=="$"&&n!=="#"&&n!=="+"&&n!=="&"&&(n="");let r=Dc(t,n.length);if(!r&&(t=t.toLowerCase(),br.has(t))){let a=br.get(t);return br.set(e,a),a}let o=r?"":Dm(t,n.length),i=t.substr(0,n.length+o.length),s=Object.freeze({basename:t.substr(i.length),name:t.substr(n.length),hack:n,vendor:o,prefix:i,custom:r});return br.set(e,s),s}var vm=["initial","inherit","unset","revert","revert-layer"],No=43,bt=45,Ml=110,Dr=!0,U0=!1;function Ql(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function Ro(e,t,n){for(;e!==null&&(e.type===13||e.type===25);)e=n(++t);return t}function tn(e,t,n,r){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===No||o===bt){if(n)return 0;t++}for(;t<e.value.length;t++)if(!De(e.value.charCodeAt(t)))return 0;return r+1}function Wl(e,t,n){let r=!1,o=Ro(e,t,n);if(e=n(o),e===null)return t;if(e.type!==10)if(Ql(e,No)||Ql(e,bt)){if(r=!0,o=Ro(n(++o),o,n),e=n(o),e===null||e.type!==10)return 0}else return t;if(!r){let i=e.value.charCodeAt(0);if(i!==No&&i!==bt)return 0}return tn(e,r?0:1,r,o)}function z0(e,t){let n=0;if(!e)return 0;if(e.type===10)return tn(e,0,U0,n);if(e.type===1&&e.value.charCodeAt(0)===bt){if(!Cr(e.value,1,Ml))return 0;switch(e.value.length){case 2:return Wl(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==bt?0:(n=Ro(t(++n),n,t),e=t(n),tn(e,0,Dr,n));default:return e.value.charCodeAt(2)!==bt?0:tn(e,3,Dr,n)}}else if(e.type===1||Ql(e,No)&&t(n+1).type===1){if(e.type!==1&&(e=t(++n)),e===null||!Cr(e.value,0,Ml))return 0;switch(e.value.length){case 1:return Wl(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==bt?0:(n=Ro(t(++n),n,t),e=t(n),tn(e,0,Dr,n));default:return e.value.charCodeAt(1)!==bt?0:tn(e,2,Dr,n)}}else if(e.type===12){let r=e.value.charCodeAt(0),o=r===No||r===bt?1:0,i=o;for(;i<e.value.length&&De(e.value.charCodeAt(i));i++);return i===o||!Cr(e.value,i,Ml)?0:i+1===e.value.length?Wl(t(++n),n,t):e.value.charCodeAt(i+1)!==bt?0:i+2===e.value.length?(n=Ro(t(++n),n,t),e=t(n),tn(e,0,Dr,n)):tn(e,i+2,Dr,n)}return 0}var V0=43,km=45,xm=63,J0=117;function ec(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function q0(e,t){return e.value.charCodeAt(0)===t}function Po(e,t,n){let r=0;for(let o=t;o<e.value.length;o++){let i=e.value.charCodeAt(o);if(i===km&&n&&r!==0)return Po(e,t+r+1,!1),6;if(!nn(i)||++r>6)return 0}return r}function qi(e,t,n){if(!e)return 0;for(;ec(n(t),xm);){if(++e>6)return 0;t++}return t}function G0(e,t){let n=0;if(e===null||e.type!==1||!Cr(e.value,0,J0)||(e=t(++n),e===null))return 0;if(ec(e,V0))return e=t(++n),e===null?0:e.type===1?qi(Po(e,0,!0),++n,t):ec(e,xm)?qi(1,++n,t):0;if(e.type===10){let r=Po(e,1,!0);return r===0?0:(e=t(++n),e===null?n:e.type===12||e.type===10?!q0(e,km)||!Po(e,1,!1)?0:n+1:qi(r,n,t))}return e.type===12?qi(Po(e,1,!0),++n,t):0}var H0=["calc(","-moz-calc(","-webkit-calc("],vc=new Map([[2,22],[21,22],[19,20],[23,24]]);function ut(e,t){return t<e.length?e.charCodeAt(t):0}function Cm(e,t){return Bo(e,0,e.length,t)}function Em(e,t){for(let n=0;n<t.length;n++)if(Cm(e,t[n]))return!0;return!1}function Fm(e,t){return t!==e.length-2?!1:ut(e,t)===92&&De(ut(e,t+1))}function ps(e,t,n){if(e&&e.type==="Range"){let r=Number(n!==void 0&&n!==t.length?t.substr(0,n):t);if(isNaN(r)||e.min!==null&&r<e.min&&typeof e.min!="string"||e.max!==null&&r>e.max&&typeof e.max!="string")return!0}return!1}function Z0(e,t){let n=0,r=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==n)break e;if(n=r.pop(),r.length===0){o++;break e}break;case 2:case 21:case 19:case 23:r.push(n),n=vc.get(e.type);break}o++}while(e=t(o));return o}function Ze(e){return function(t,n,r){return t===null?0:t.type===2&&Em(t.value,H0)?Z0(t,n):e(t,n,r)}}function ae(e){return function(t){return t===null||t.type!==e?0:1}}function K0(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return Em(t,vm)||Cm(t,"default")?0:1}function Y0(e){return e===null||e.type!==1||ut(e.value,0)!==45||ut(e.value,1)!==45?0:1}function X0(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let n=1;n<t;n++)if(!nn(ut(e.value,n)))return 0;return 1}function Q0(e){return e===null||e.type!==4||!Zi(ut(e.value,1),ut(e.value,2),ut(e.value,3))?0:1}function ex(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 17:if(n===0)break e;break;case 9:if(n===0&&e.value==="!")break e;break;case 2:case 21:case 19:case 23:r.push(n),n=vc.get(e.type);break}o++}while(e=t(o));return o}function tx(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 2:case 21:case 19:case 23:r.push(n),n=vc.get(e.type);break}o++}while(e=t(o));return o}function jt(e){return e&&(e=new Set(e)),function(t,n,r){if(t===null||t.type!==12)return 0;let o=ls(t.value,0);if(e!==null){let i=t.value.indexOf("\\",o),s=i===-1||!Fm(t.value,i)?t.value.substr(o):t.value.substring(o,i);if(e.has(s.toLowerCase())===!1)return 0}return ps(r,t.value,o)?0:1}}function nx(e,t,n){return e===null||e.type!==11||ps(n,e.value,e.value.length-1)?0:1}function Sm(e){return typeof e!="function"&&(e=function(){return 0}),function(t,n,r){return t!==null&&t.type===10&&Number(t.value)===0?1:e(t,n,r)}}function rx(e,t,n){if(e===null)return 0;let r=ls(e.value,0);return r!==e.value.length&&!Fm(e.value,r)||ps(n,e.value,r)?0:1}function ox(e,t,n){if(e===null||e.type!==10)return 0;let r=ut(e.value,0)===43||ut(e.value,0)===45?1:0;for(;r<e.value.length;r++)if(!De(ut(e.value,r)))return 0;return ps(n,e.value,r)?0:1}var ix={"ident-token":ae(1),"function-token":ae(2),"at-keyword-token":ae(3),"hash-token":ae(4),"string-token":ae(5),"bad-string-token":ae(6),"url-token":ae(7),"bad-url-token":ae(8),"delim-token":ae(9),"number-token":ae(10),"percentage-token":ae(11),"dimension-token":ae(12),"whitespace-token":ae(13),"CDO-token":ae(14),"CDC-token":ae(15),"colon-token":ae(16),"semicolon-token":ae(17),"comma-token":ae(18),"[-token":ae(19),"]-token":ae(20),"(-token":ae(21),")-token":ae(22),"{-token":ae(23),"}-token":ae(24)},sx={string:ae(5),ident:ae(1),percentage:Ze(nx),zero:Sm(),number:Ze(rx),integer:Ze(ox),"custom-ident":K0,"custom-property-name":Y0,"hex-color":X0,"id-selector":Q0,"an-plus-b":z0,urange:G0,"declaration-value":ex,"any-value":tx};function ax(e){let{angle:t,decibel:n,frequency:r,flex:o,length:i,resolution:s,semitones:a,time:l}=e||{};return{dimension:Ze(jt(null)),angle:Ze(jt(t)),decibel:Ze(jt(n)),frequency:Ze(jt(r)),flex:Ze(jt(o)),length:Ze(Sm(jt(i))),resolution:Ze(jt(s)),semitones:Ze(jt(a)),time:Ze(jt(l))}}function lx(e){return{...ix,...sx,...ax(e)}}var tc={};$(tc,{angle:()=>ux,decibel:()=>gx,flex:()=>mx,frequency:()=>px,length:()=>cx,resolution:()=>fx,semitones:()=>hx,time:()=>dx});var cx=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],ux=["deg","grad","rad","turn"],dx=["s","ms"],px=["hz","khz"],fx=["dpi","dpcm","dppx","x"],mx=["fr"],gx=["db"],hx=["st"],yx={};$(yx,{SyntaxError:()=>_m,generate:()=>ds,parse:()=>Sc,walk:()=>jm});function _m(e,t,n){return Object.assign(us("SyntaxError",e),{input:t,offset:n,rawMessage:e,message:e+`
|
|
53
|
-
`+t+`
|
|
54
|
-
--`+new Array((n||t.length)+1).join("-")+"^"})}var wx=9,bx=10,Dx=12,vx=13,kx=32,xx=class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e<this.str.length?this.str.charCodeAt(e):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(e){return this.charCodeAt(this.findWsEnd(e))}findWsEnd(e){for(;e<this.str.length;e++){let t=this.str.charCodeAt(e);if(t!==vx&&t!==bx&&t!==Dx&&t!==kx&&t!==wx)break}return e}substringToPos(e){return this.str.substring(this.pos,this.pos=e)}eat(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(e){throw new _m(e,this.str,this.pos)}},Cx=9,Ex=10,Fx=12,Sx=13,_x=32,Am=33,kc=35,jf=38,os=39,Tm=40,Ax=41,Om=42,xc=43,Cc=44,Rf=45,Ec=60,Pm=62,nc=63,Tx=64,fs=91,Fc=93,is=123,$f=124,Bf=125,Nf=8734,Lo=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),Lf={" ":1,"&&":2,"||":3,"|":4};function ss(e){return e.substringToPos(e.findWsEnd(e.pos))}function Er(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n>=128||Lo[n]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function as(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n<48||n>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Ox(e){let t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Mf(e){let t=null,n=null;return e.eat(is),t=as(e),e.charCode()===Cc?(e.pos++,e.charCode()!==Bf&&(n=as(e))):n=t,e.eat(Bf),{min:Number(t),max:n?Number(n):0}}function Px(e){let t=null,n=!1;switch(e.charCode()){case Om:e.pos++,t={min:0,max:0};break;case xc:e.pos++,t={min:1,max:0};break;case nc:e.pos++,t={min:0,max:1};break;case kc:e.pos++,n=!0,e.charCode()===is?t=Mf(e):e.charCode()===nc?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case is:t=Mf(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}function Fr(e,t){let n=Px(e);return n!==null?(n.term=t,e.charCode()===kc&&e.charCodeAt(e.pos-1)===xc?Fr(e,n):n):t}function Ul(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function Ix(e){let t;return e.eat(Ec),e.eat(os),t=Er(e),e.eat(os),e.eat(Pm),Fr(e,{type:"Property",name:t})}function jx(e){let t=null,n=null,r=1;return e.eat(fs),e.charCode()===Rf&&(e.peek(),r=-1),r==-1&&e.charCode()===Nf?e.peek():(t=r*Number(as(e)),Lo[e.charCode()]!==0&&(t+=Er(e))),ss(e),e.eat(Cc),ss(e),e.charCode()===Nf?e.peek():(r=1,e.charCode()===Rf&&(e.peek(),r=-1),n=r*Number(as(e)),Lo[e.charCode()]!==0&&(n+=Er(e))),e.eat(Fc),{type:"Range",min:t,max:n}}function Rx(e){let t,n=null;return e.eat(Ec),t=Er(e),e.charCode()===Tm&&e.nextCharCode()===Ax&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===fs&&(ss(e),n=jx(e)),e.eat(Pm),Fr(e,{type:"Type",name:t,opts:n})}function $x(e){let t=Er(e);return e.charCode()===Tm?(e.pos++,{type:"Function",name:t}):Fr(e,{type:"Keyword",name:t})}function Bx(e,t){function n(o,i){return{type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort((o,i)=>Lf[o]-Lf[i]);t.length>0;){r=t.shift();let o=0,i=0;for(;o<e.length;o++){let s=e[o];s.type==="Combinator"&&(s.value===r?(i===-1&&(i=o-1),e.splice(o,1),o--):(i!==-1&&o-i>1&&(e.splice(i,o-i,n(e.slice(i,o),r)),o=i+1),i=-1))}i!==-1&&t.length&&e.splice(i,o-i,n(e.slice(i,o),r))}return r}function Im(e){let t=[],n={},r,o=null,i=e.pos;for(;r=Lx(e);)r.type!=="Spaces"&&(r.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),n[r.value]=!0):o!==null&&o.type!=="Combinator"&&(n[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(r),o=r,i=e.pos);return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:Bx(t,n)||" ",disallowEmpty:!1,explicit:!1}}function Nx(e){let t;return e.eat(fs),t=Im(e),e.eat(Fc),t.explicit=!0,e.charCode()===Am&&(e.pos++,t.disallowEmpty=!0),t}function Lx(e){let t=e.charCode();if(t<128&&Lo[t]===1)return $x(e);switch(t){case Fc:break;case fs:return Fr(e,Nx(e));case Ec:return e.nextCharCode()===os?Ix(e):Rx(e);case $f:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===$f?2:1))};case jf:return e.pos++,e.eat(jf),{type:"Combinator",value:"&&"};case Cc:return e.pos++,{type:"Comma"};case os:return Fr(e,{type:"String",value:Ox(e)});case _x:case Cx:case Ex:case Sx:case Fx:return{type:"Spaces",value:ss(e)};case Tx:return t=e.nextCharCode(),t<128&&Lo[t]===1?(e.pos++,{type:"AtKeyword",name:Er(e)}):Ul(e);case Om:case xc:case nc:case kc:case Am:break;case is:if(t=e.nextCharCode(),t<48||t>57)return Ul(e);break;default:return Ul(e)}}function Sc(e){let t=new xx(e),n=Im(t);return t.pos!==e.length&&t.error("Unexpected input"),n.terms.length===1&&n.terms[0].type==="Group"?n.terms[0]:n}var Io=function(){};function Wf(e){return typeof e=="function"?e:Io}function jm(e,t,n){function r(s){switch(o.call(n,s),s.type){case"Group":s.terms.forEach(r);break;case"Multiplier":r(s.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+s.type)}i.call(n,s)}let o=Io,i=Io;if(typeof t=="function"?o=t:t&&(o=Wf(t.enter),i=Wf(t.leave)),o===Io&&i===Io)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");r(e,n)}var Mx={decorator(e){let t=[],n=null;return{...e,node(r){let o=n;n=r,e.node.call(this,r),n=o},emit(r,o,i){t.push({type:o,value:r,node:i?null:n})},result(){return t}}}};function Wx(e){let t=[];return cs(e,(n,r,o)=>t.push({type:n,value:e.slice(r,o),node:null})),t}function Ux(e,t){return typeof e=="string"?Wx(e):t.generate(e,Mx)}var re={type:"Match"},ie={type:"Mismatch"},_c={type:"DisallowEmpty"},zx=40,Vx=41;function Ee(e,t,n){return t===re&&n===ie||e===re&&t===re&&n===re?e:(e.type==="If"&&e.else===ie&&t===re&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function Rm(e){return e.length>2&&e.charCodeAt(e.length-2)===zx&&e.charCodeAt(e.length-1)===Vx}function Uf(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&Rm(e.name)}function rc(e,t,n){switch(e){case" ":{let r=re;for(let o=t.length-1;o>=0;o--){let i=t[o];r=Ee(i,r,ie)}return r}case"|":{let r=ie,o=null;for(let i=t.length-1;i>=0;i--){let s=t[i];if(Uf(s)&&(o===null&&i>0&&Uf(t[i-1])&&(o=Object.create(null),r=Ee({type:"Enum",map:o},re,r)),o!==null)){let a=(Rm(s.name)?s.name.slice(0,-1):s.name).toLowerCase();if(!(a in o)){o[a]=s;continue}}o=null,r=Ee(s,re,r)}return r}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=ie;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=rc(e,t.filter(function(a){return a!==i}),!1):s=re,r=Ee(i,s,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?re:ie;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=rc(e,t.filter(function(a){return a!==i}),!0):s=re,r=Ee(i,s,r)}return r}}}function Jx(e){let t=re,n=Ac(e.term);if(e.max===0)n=Ee(n,_c,ie),t=Ee(n,null,ie),t.then=Ee(re,re,t),e.comma&&(t.then.else=Ee({type:"Comma",syntax:e},t,ie));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==re&&(t=Ee({type:"Comma",syntax:e},t,ie)),t=Ee(n,Ee(re,re,t),ie);if(e.min===0)t=Ee(re,re,t);else for(let r=0;r<e.min-1;r++)e.comma&&t!==re&&(t=Ee({type:"Comma",syntax:e},t,ie)),t=Ee(n,t,ie);return t}function Ac(e){if(typeof e=="function")return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=rc(e.combinator,e.terms.map(Ac),!1);return e.disallowEmpty&&(t=Ee(t,_c,ie)),t}case"Multiplier":return Jx(e);case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return e.value.length===3?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function oc(e,t){return typeof e=="string"&&(e=Sc(e)),{type:"MatchGraph",match:Ac(e),syntax:t||null,source:e}}var{hasOwnProperty:zf}=Object.prototype,qx=0,Gx=1,ic=2,$m=3,Vf="Match",Hx="Mismatch",Zx="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",Jf=15e3,Kx=0;function Yx(e){let t=null,n=null,r=e;for(;r!==null;)n=r.prev,r.prev=t,t=r,r=n;return t}function zl(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=t.charCodeAt(n),o=e.charCodeAt(n);if(o>=65&&o<=90&&(o=o|32),o!==r)return!1}return!0}function Xx(e){return e.type!==9?!1:e.value!=="?"}function qf(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||Xx(e)}function Gf(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function Qx(e,t,n){function r(){do P++,T=P<e.length?e[P]:null;while(T!==null&&(T.type===13||T.type===25))}function o(z){let j=P+z;return j<e.length?e[j]:null}function i(z,j){return{nextState:z,matchStack:x,syntaxStack:p,thenStack:f,tokenIndex:P,prev:j}}function s(z){f={nextState:z,matchStack:x,syntaxStack:p,prev:f}}function a(z){m=i(z,m)}function l(){x={type:Gx,syntax:t.syntax,token:T,prev:x},r(),h=null,P>C&&(C=P)}function c(){p={syntax:t.syntax,opts:t.syntax.opts||p!==null&&p.opts||null,prev:p},x={type:ic,syntax:t.syntax,token:x.token,prev:x}}function u(){x.type===ic?x=x.prev:x={type:$m,syntax:p.syntax,token:x.token,prev:x},p=p.prev}let p=null,f=null,m=null,h=null,v=0,k=null,T=null,P=-1,C=0,x={type:qx,syntax:null,token:null,prev:null};for(r();k===null&&++v<Jf;)switch(t.type){case"Match":if(f===null){if(T!==null&&(P!==e.length-1||T.value!=="\\0"&&T.value!=="\\9")){t=ie;break}k=Vf;break}if(t=f.nextState,t===_c)if(f.matchStack===x){t=ie;break}else t=re;for(;f.syntaxStack!==p;)u();f=f.prev;break;case"Mismatch":if(h!==null&&h!==!1)(m===null||P>m.tokenIndex)&&(m=h,h=!1);else if(m===null){k=Hx;break}t=m.nextState,f=m.thenStack,p=m.syntaxStack,x=m.matchStack,P=m.tokenIndex,T=P<e.length?e[P]:null,m=m.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==ie&&a(t.else),t.then!==re&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let S=t.syntax.terms;if(t.index===S.length){if(t.mask===0||t.syntax.all){t=ie;break}t=re;break}if(t.mask===(1<<S.length)-1){t=re;break}for(;t.index<S.length;t.index++){let y=1<<t.index;if((t.mask&y)===0){a(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|y}),t=S[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(T!==null){let S=T.value.toLowerCase();if(S.indexOf("\\")!==-1&&(S=S.replace(/\\[09].*$/,"")),zf.call(t.map,S)){t=t.map[S];break}}t=ie;break;case"Generic":{let S=p!==null?p.opts:null,y=P+Math.floor(t.fn(T,o,S));if(!isNaN(y)&&y>P){for(;P<y;)l();t=re}else t=ie;break}case"Type":case"Property":{let S=t.type==="Type"?"types":"properties",y=zf.call(n,S)?n[S][t.name]:null;if(!y||!y.match)throw new Error("Bad syntax reference: "+(t.type==="Type"?"<"+t.name+">":"<'"+t.name+"'>"));if(h!==!1&&T!==null&&t.type==="Type"&&(t.name==="custom-ident"&&T.type===1||t.name==="length"&&T.value==="0")){h===null&&(h=i(t,m)),t=ie;break}c(),t=y.match;break}case"Keyword":{let S=t.name;if(T!==null){let y=T.value;if(y.indexOf("\\")!==-1&&(y=y.replace(/\\[09].*$/,"")),zl(y,S)){l(),t=re;break}}t=ie;break}case"AtKeyword":case"Function":if(T!==null&&zl(T.value,t.name)){l(),t=re;break}t=ie;break;case"Token":if(T!==null&&T.value===t.value){l(),t=re;break}t=ie;break;case"Comma":T!==null&&T.type===18?qf(x.token)?t=ie:(l(),t=Gf(T)?ie:re):t=qf(x.token)||Gf(T)?re:ie;break;case"String":let z="",j=P;for(;j<e.length&&z.length<t.value.length;j++)z+=e[j].value;if(zl(z,t.value)){for(;P<j;)l();t=re}else t=ie;break;default:throw new Error("Unknown node type: "+t.type)}switch(Kx+=v,k){case null:console.warn("[csstree-match] BREAK after "+Jf+" iterations"),k=Zx,x=null;break;case Vf:for(;p!==null;)u();break;default:x=null}return{tokens:e,reason:k,iterations:v,match:x,longestMatch:C}}function Hf(e,t,n){let r=Qx(e,t,n||{});if(r.match===null)return r;let o=r.match,i=r.match={syntax:t.syntax||null,match:[]},s=[i];for(o=Yx(o).prev;o!==null;){switch(o.type){case ic:i.match.push(i={syntax:o.syntax,match:[]}),s.push(i);break;case $m:s.pop(),i=s[s.length-1];break;default:i.match.push({syntax:o.syntax||null,token:o.token.value,node:o.token.node})}o=o.prev}return r}var Bm={};$(Bm,{getTrace:()=>Nm,isKeyword:()=>nC,isProperty:()=>tC,isType:()=>eC});function Nm(e){function t(o){return o===null?!1:o.type==="Type"||o.type==="Property"||o.type==="Keyword"}function n(o){if(Array.isArray(o.match)){for(let i=0;i<o.match.length;i++)if(n(o.match[i]))return t(o.syntax)&&r.unshift(o.syntax),!0}else if(o.node===e)return r=t(o.syntax)?[o.syntax]:[],!0;return!1}let r=null;return this.matched!==null&&n(this.matched),r}function eC(e,t){return Tc(this,e,n=>n.type==="Type"&&n.name===t)}function tC(e,t){return Tc(this,e,n=>n.type==="Property"&&n.name===t)}function nC(e){return Tc(this,e,t=>t.type==="Keyword")}function Tc(e,t,n){let r=Nm.call(e,t);return r===null?!1:r.some(n)}function Lm(e){return"node"in e?e.node:Lm(e.match[0])}function Mm(e){return"node"in e?e.node:Mm(e.match[e.match.length-1])}function Zf(e,t,n,r,o){function i(a){if(a.syntax!==null&&a.syntax.type===r&&a.syntax.name===o){let l=Lm(a),c=Mm(a);e.syntax.walk(t,function(u,p,f){if(u===l){let m=new ye;do{if(m.appendData(p.data),p.data===c)break;p=p.next}while(p!==null);s.push({parent:f,nodes:m})}})}Array.isArray(a.match)&&a.match.forEach(i)}let s=[];return n.matched!==null&&i(n.matched),s}var{hasOwnProperty:$o}=Object.prototype;function Vl(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function Kf(e){return!!e&&Vl(e.offset)&&Vl(e.line)&&Vl(e.column)}function rC(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(let o in n){let i=!0;if($o.call(n,o)!==!1){if(o==="type")n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if(o==="loc"){if(n.loc===null)continue;if(n.loc&&n.loc.constructor===Object)if(typeof n.loc.source!="string")o+=".source";else if(!Kf(n.loc.start))o+=".start";else if(!Kf(n.loc.end))o+=".end";else continue;i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let s=0;!i&&s<t[o].length;s++){let a=t[o][s];switch(a){case String:i=typeof n[o]=="string";break;case Boolean:i=typeof n[o]=="boolean";break;case null:i=n[o]===null;break;default:typeof a=="string"?i=n[o]&&n[o].type===a:Array.isArray(a)&&(i=n[o]instanceof ye)}}}else r(n,"Unknown field `"+o+"` for "+e+" node type");i||r(n,"Bad value for `"+e+"."+o+"`")}}for(let o in t)$o.call(t,o)&&$o.call(n,o)===!1&&r(n,"Field `"+e+"."+o+"` is missed")}}function oC(e,t){let n=t.structure,r={type:String,loc:!0},o={type:'"'+e+'"'};for(let i in n){if($o.call(n,i)===!1)continue;let s=[],a=r[i]=Array.isArray(n[i])?n[i].slice():[n[i]];for(let l=0;l<a.length;l++){let c=a[l];if(c===String||c===Boolean)s.push(c.name);else if(c===null)s.push("null");else if(typeof c=="string")s.push("<"+c+">");else if(Array.isArray(c))s.push("List");else throw new Error("Wrong value `"+c+"` in `"+e+"."+i+"` structure definition")}o[i]=s.join(" | ")}return{docs:o,check:rC(e,r)}}function iC(e){let t={};if(e.node){for(let n in e.node)if($o.call(e.node,n)){let r=e.node[n];if(r.structure)t[n]=oC(n,r);else throw new Error("Missed `structure` field in `"+n+"` node type definition")}}return t}var sC=oc(vm.join(" | "));function sc(e,t,n){let r={};for(let o in e)e[o].syntax&&(r[o]=n?e[o].syntax:ds(e[o].syntax,{compact:t}));return r}function aC(e,t,n){let r={};for(let[o,i]of Object.entries(e))r[o]={prelude:i.prelude&&(n?i.prelude.syntax:ds(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&sc(i.descriptors,t,n)};return r}function lC(e){for(let t=0;t<e.length;t++)if(e[t].value.toLowerCase()==="var(")return!0;return!1}function lt(e,t,n){return{matched:e,iterations:n,error:t,...Bm}}function vr(e,t,n,r){let o=Ux(n,e.syntax),i;return lC(o)?lt(null,new Error("Matching for a tree with var() is not supported")):(r&&(i=Hf(o,e.cssWideKeywordsSyntax,e)),(!r||!i.match)&&(i=Hf(o,t.match,e),!i.match)?lt(null,new L0(i.reason,t.syntax,n,i),i.iterations):lt(i.match,null,i.iterations))}var Yf=class{constructor(e,t,n){if(this.cssWideKeywordsSyntax=sC,this.syntax=t,this.generic=!1,this.units={...tc},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=n||iC(e),e){if(e.units)for(let r of Object.keys(tc))Array.isArray(e.units[r])&&(this.units[r]=e.units[r]);if(e.types)for(let r in e.types)this.addType_(r,e.types[r]);if(e.generic){this.generic=!0;for(let[r,o]of Object.entries(lx(this.units)))this.addType_(r,o)}if(e.atrules)for(let r in e.atrules)this.addAtrule_(r,e.atrules[r]);if(e.properties)for(let r in e.properties)this.addProperty_(r,e.properties[r])}}checkStructure(e){function t(o,i){r.push({node:o,message:i})}let n=this.structure,r=[];return this.syntax.walk(e,function(o){n.hasOwnProperty(o.type)?n[o.type].check(o,t):t(o,"Unknown node type `"+o.type+"`")}),r.length?r:!1}createDescriptor(e,t,n,r=null){let o={type:t,name:n},i={type:t,name:n,parent:r,serializable:typeof e=="string"||e&&typeof e.type=="string",syntax:null,match:null};return typeof e=="function"?i.match=oc(e,o):(typeof e=="string"?Object.defineProperty(i,"syntax",{get(){return Object.defineProperty(i,"syntax",{value:Sc(e)}),i.syntax}}):i.syntax=e,Object.defineProperty(i,"match",{get(){return Object.defineProperty(i,"match",{value:oc(i.syntax,o)}),i.match}})),i}addAtrule_(e,t){!t||(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,"Type",e))}checkAtruleName(e){if(!this.getAtrule(e))return new Ao("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e);if(!r.prelude&&t)return new SyntaxError("At-rule `@"+e+"` should not contain a prelude");if(r.prelude&&!t&&!vr(this,r.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e),o=Ll(t);if(!r.descriptors)return new SyntaxError("At-rule `@"+e+"` has no known descriptors");if(!r.descriptors[o.name]&&!r.descriptors[o.basename])return new Ao("Unknown at-rule descriptor",t)}checkPropertyName(e){if(!this.getProperty(e))return new Ao("Unknown property",e)}matchAtrulePrelude(e,t){let n=this.checkAtrulePrelude(e,t);if(n)return lt(null,n);let r=this.getAtrule(e);return r.prelude?vr(this,r.prelude,t||"",!1):lt(null,null)}matchAtruleDescriptor(e,t,n){let r=this.checkAtruleDescriptorName(e,t);if(r)return lt(null,r);let o=this.getAtrule(e),i=Ll(t);return vr(this,o.descriptors[i.name]||o.descriptors[i.basename],n,!1)}matchDeclaration(e){return e.type!=="Declaration"?lt(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(If(e).custom)return lt(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(e);return n?lt(null,n):vr(this,this.getProperty(e),t,!0)}matchType(e,t){let n=this.getType(e);return n?vr(this,n,t,!1):lt(null,new Ao("Unknown type",e))}match(e,t){return typeof e!="string"&&(!e||!e.type)?lt(null,new Ao("Bad syntax")):((typeof e=="string"||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),vr(this,e,t,!1))}findValueFragments(e,t,n,r){return Zf(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return Zf(this,e.value,this.matchDeclaration(e),t,n)}findAllFragments(e,t,n){let r=[];return this.syntax.walk(e,{visit:"Declaration",enter:o=>{r.push.apply(r,this.findDeclarationValueFragments(o,t,n))}}),r}getAtrule(e,t=!0){let n=Ll(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(e,t=!0){let n=this.getAtrule(e,t);return n&&n.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let n=If(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(r,o,i,s){if(i.has(o))return i.get(o);i.set(o,!1),s.syntax!==null&&jm(s.syntax,function(a){if(a.type!=="Type"&&a.type!=="Property")return;let l=a.type==="Type"?r.types:r.properties,c=a.type==="Type"?t:n;(!hasOwnProperty.call(l,a.name)||e(r,a.name,c,l[a.name]))&&i.set(o,!0)},this)}let t=new Map,n=new Map;for(let r in this.types)e(this,r,t,this.types[r]);for(let r in this.properties)e(this,r,n,this.properties[r]);return t=[...t.keys()].filter(r=>t.get(r)),n=[...n.keys()].filter(r=>n.get(r)),t.length||n.length?{types:t,properties:n}:null}dump(e,t){return{generic:this.generic,units:this.units,types:sc(this.types,!t,e),properties:sc(this.properties,!t,e),atrules:aC(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function Jl(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function Xf(e,t){let n=Object.create(null);for(let[r,o]of Object.entries(e))if(o){n[r]={};for(let i of Object.keys(o))t.includes(i)&&(n[r][i]=o[i])}return n}function ac(e,t){let n={...e};for(let[r,o]of Object.entries(t))switch(r){case"generic":n[r]=!!o;break;case"units":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=Array.isArray(s)?s:[];break;case"atrules":n[r]={...e[r]};for(let[i,s]of Object.entries(o)){let a=n[r][i]||{},l=n[r][i]={prelude:a.prelude||null,descriptors:{...a.descriptors}};if(s){l.prelude=s.prelude?Jl(l.prelude,s.prelude):l.prelude||null;for(let[c,u]of Object.entries(s.descriptors||{}))l.descriptors[c]=u?Jl(l.descriptors[c],u):null;Object.keys(l.descriptors).length||(l.descriptors=null)}}break;case"types":case"properties":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=Jl(n[r][i],s);break;case"scope":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]={...n[r][i],...s};break;case"parseContext":n[r]={...e[r],...o};break;case"atrule":case"pseudo":n[r]={...e[r],...Xf(o,["parse"])};break;case"node":n[r]={...e[r],...Xf(o,["name","structure","parse","generate","walkContext"])};break}return n}function Wm(e){let t=b0(e),n=I0(e),r=A0(e),{fromPlainObject:o,toPlainObject:i}=T0(n),s={lexer:null,createLexer:a=>new Yf(a,s,s.lexer.structure),tokenize:cs,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:o,toPlainObject:i,fork(a){let l=ac({},e);return Wm(typeof a=="function"?a(l,Object.assign):ac(l,a))}};return s.lexer=new Yf({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var cC=e=>Wm(ac({},e)),uC={generic:!0,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",axis:"block|inline|vertical|horizontal","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","cos()":"cos( <calc-sum> )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","exp()":"exp( <calc-sum> )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )","hypot()":"hypot( <calc-sum># )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length-percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","log()":"log( <calc-sum> , <calc-sum>? )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )","mod()":"mod( <calc-sum> , <calc-sum> )","name-repeat":"repeat( [<integer [1,\u221E]>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( [<length [0,\u221E]>|none] )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pow()":"pow( <calc-sum> , <calc-sum> )","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )",ratio:"<number [0,\u221E]> [/ <number [0,\u221E]>]?","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","reversed-counter-name":"reversed( <counter-name> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( <number-percentage> )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","sign()":"sign( <calc-sum> )","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( <calc-sum> )","single-animation":"<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<timeline-name>|scroll( <axis>? <scroller>? )","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","sqrt()":"sqrt( <calc-sum> )","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>","tan()":"tan( <calc-sum> )",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timeline-name":"<custom-ident>|<string>","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","bg-clip":"<box>|border|text",bottom:"<length>|auto","container-name":"<custom-ident>","container-condition":"not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",right:"<length>|auto","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","single-animation-composition":"replace|add|accumulate","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,\u221E]>","query-in-parens":"( <container-condition> )|( <size-feature> )|style( <style-query> )|<general-enclosed>","size-feature":"<mf-plain>|<mf-boolean>|<mf-range>","style-feature":"<declaration>","style-query":"<style-condition>|<style-feature>","style-condition":"not <style-in-parens>|<style-in-parens> [[and <style-in-parens>]*|[or <style-in-parens>]*]","style-in-parens":"( <style-condition> )|( <style-feature> )|<general-enclosed>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert|revert-layer",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end",caret:"<'caret-color'>||<'caret-shape'>","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[[size||inline-size]||layout||style||paint]","contain-intrinsic-size":"[none|<length>|auto <length>]{1,2}","contain-intrinsic-block-size":"none|<length>|auto <length>","contain-intrinsic-height":"none|<length>|auto <length>","contain-intrinsic-inline-size":"none|<length>|auto <length>","contain-intrinsic-width":"none|<length>|auto <length>",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,\u221E]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","scroll-timeline":"<scroll-timeline-name>||<scroll-timeline-axis>","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",container:"<'container-name'> [/ <'container-type'>]?","container-name":"none|<custom-ident>+","container-type":"normal||[size|inline-size]",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}},container:{prelude:"[<container-name>]? <container-condition>",descriptors:null},nest:{prelude:"<complex-selector-list>",descriptors:null}}},Oc={};$(Oc,{AnPlusB:()=>Um,Atrule:()=>Vm,AtrulePrelude:()=>qm,AttributeSelector:()=>Hm,Block:()=>Ym,Brackets:()=>eg,CDC:()=>ng,CDO:()=>og,ClassSelector:()=>sg,Combinator:()=>lg,Comment:()=>ug,Declaration:()=>pg,DeclarationList:()=>gg,Dimension:()=>yg,Function:()=>bg,Hash:()=>vg,IdSelector:()=>Eg,Identifier:()=>xg,MediaFeature:()=>Sg,MediaQuery:()=>Ag,MediaQueryList:()=>Og,NestingSelector:()=>Ig,Nth:()=>Rg,Number:()=>Bg,Operator:()=>Lg,Parentheses:()=>Wg,Percentage:()=>zg,PseudoClassSelector:()=>Jg,PseudoElementSelector:()=>Gg,Ratio:()=>Zg,Raw:()=>Yg,Rule:()=>Qg,Selector:()=>th,SelectorList:()=>rh,String:()=>ih,StyleSheet:()=>uh,TypeSelector:()=>ph,UnicodeRange:()=>mh,Url:()=>wh,Value:()=>xh,WhiteSpace:()=>Eh});var Um={};$(Um,{generate:()=>mC,name:()=>pC,parse:()=>zm,structure:()=>fC});var Dt=43,Ue=45,Yi=110,An=!0,dC=!1;function Xi(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===Dt||r===Ue)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)De(this.charCodeAt(n))||this.error("Integer is expected",n)}function kr(e){return Xi.call(this,0,e)}function en(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case Yi:n="N is expected";break;case Ue:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+e)}}function ql(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10)if(this.isDelim(Dt,e)||this.isDelim(Ue,e)){t=this.isDelim(Dt,e)?Dt:Ue;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),kr.call(this,An))}else return null;return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==Dt&&n!==Ue&&this.error("Number sign is expected")),kr.call(this,t!==0),t===Ue?"-"+this.consume(10):this.consume(10)}var pC="AnPlusB",fC={a:[String,null],b:[String,null]};function zm(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)kr.call(this,dC),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Ue))switch(t="-1",en.call(this,1,Yi),this.tokenEnd-this.tokenStart){case 2:this.next(),n=ql.call(this);break;case 3:en.call(this,2,Ue),this.next(),this.skipSC(),kr.call(this,An),n="-"+this.consume(10);break;default:en.call(this,2,Ue),Xi.call(this,3,An),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(Dt)&&this.lookupType(1)===1){let r=0;switch(t="1",this.isDelim(Dt)&&(r=1,this.next()),en.call(this,0,Yi),this.tokenEnd-this.tokenStart){case 1:this.next(),n=ql.call(this);break;case 2:en.call(this,1,Ue),this.next(),this.skipSC(),kr.call(this,An),n="-"+this.consume(10);break;default:en.call(this,1,Ue),Xi.call(this,2,An),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),o=r===Dt||r===Ue,i=this.tokenStart+o;for(;i<this.tokenEnd&&De(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),en.call(this,i-this.tokenStart,Yi),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),n=ql.call(this)):(en.call(this,i-this.tokenStart+1,Ue),i+2===this.tokenEnd?(this.next(),this.skipSC(),kr.call(this,An),n="-"+this.consume(10)):(Xi.call(this,i-this.tokenStart+2,An),this.next(),n=this.substrToCursor(i+1)))}else this.error();return t!==null&&t.charCodeAt(0)===Dt&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===Dt&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function mC(e){if(e.a){let t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){let n=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}var Vm={};$(Vm,{generate:()=>bC,name:()=>hC,parse:()=>Jm,structure:()=>wC,walkContext:()=>yC});function Qf(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function gC(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}var hC="Atrule",yC="atrule",wC={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function Jm(e=!1){let t=this.tokenStart,n,r,o=null,i=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?o=this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),Qf):o=Qf.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block=="function"?i=this.atrule[r].block.call(this,e):i=this.Block(gC.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:o,block:i}}function bC(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var qm={};$(qm,{generate:()=>xC,name:()=>DC,parse:()=>Gm,structure:()=>kC,walkContext:()=>vC});var DC="AtrulePrelude",vC="atrulePrelude",kC={children:[[]]};function Gm(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude=="function"?t=this.atrule[e].prelude.call(this):t=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function xC(e){this.children(e)}var Hm={};$(Hm,{generate:()=>OC,name:()=>AC,parse:()=>Km,structure:()=>TC});var CC=36,Zm=42,Qi=61,EC=94,lc=124,FC=126;function SC(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(Zm)?(t=!0,this.next()):this.isDelim(lc)||this.eat(1),this.isDelim(lc)?this.charCodeAt(this.tokenStart+1)!==Qi?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function _C(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==Qi&&t!==FC&&t!==EC&&t!==CC&&t!==Zm&&t!==lc&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==Qi&&(this.isDelim(Qi)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var AC="AttributeSelector",TC={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Km(){let e=this.tokenStart,t,n=null,r=null,o=null;return this.eat(19),this.skipSC(),t=SC.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=_C.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:o}}function OC(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]")}var Ym={};$(Ym,{generate:()=>BC,name:()=>jC,parse:()=>Qm,structure:()=>$C,walkContext:()=>RC});var PC=38;function Xm(e){return this.Raw(e,null,!0)}function em(){return this.parseWithFallback(this.Rule,Xm)}function tm(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function IC(){if(this.tokenType===17)return tm.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,tm);return this.tokenType===17&&this.next(),e}var jC="Block",RC="block",$C={children:[["Atrule","Rule","Declaration"]]};function Qm(e){let t=e?IC:em,n=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),Xm));break;default:e&&this.isDelim(PC)?r.push(em.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function BC(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}var eg={};$(eg,{generate:()=>MC,name:()=>NC,parse:()=>tg,structure:()=>LC});var NC="Brackets",LC={children:[[]]};function tg(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function MC(e){this.token(9,"["),this.children(e),this.token(9,"]")}var ng={};$(ng,{generate:()=>zC,name:()=>WC,parse:()=>rg,structure:()=>UC});var WC="CDC",UC=[];function rg(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function zC(){this.token(15,"-->")}var og={};$(og,{generate:()=>qC,name:()=>VC,parse:()=>ig,structure:()=>JC});var VC="CDO",JC=[];function ig(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function qC(){this.token(14,"<!--")}var sg={};$(sg,{generate:()=>KC,name:()=>HC,parse:()=>ag,structure:()=>ZC});var GC=46,HC="ClassSelector",ZC={name:String};function ag(){return this.eatDelim(GC),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function KC(e){this.token(9,"."),this.token(1,e.name)}var lg={};$(lg,{generate:()=>nE,name:()=>eE,parse:()=>cg,structure:()=>tE});var YC=43,nm=47,XC=62,QC=126,eE="Combinator",tE={name:String};function cg(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case XC:case YC:case QC:this.next();break;case nm:this.next(),this.eatIdent("deep"),this.eatDelim(nm);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e);break}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function nE(e){this.tokenize(e.name)}var ug={};$(ug,{generate:()=>aE,name:()=>iE,parse:()=>dg,structure:()=>sE});var rE=42,oE=47,iE="Comment",sE={value:String};function dg(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===rE&&this.charCodeAt(t-1)===oE&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function aE(e){this.token(25,"/*"+e.value+"*/")}var pg={};$(pg,{generate:()=>bE,name:()=>hE,parse:()=>mg,structure:()=>wE,walkContext:()=>yE});var fg=33,lE=35,cE=36,uE=38,dE=42,pE=43,rm=47;function fE(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function mE(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function gE(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(fg)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}var hE="Declaration",yE="declaration",wE={important:[Boolean,String],property:String,value:["Value","Raw"]};function mg(){let e=this.tokenStart,t=this.tokenIndex,n=DE.call(this),r=Dc(n),o=r?this.parseCustomProperty:this.parseValue,i=r?mE:fE,s=!1,a;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(r||this.skipSC(),o?a=this.parseWithFallback(gE,i):a=i.call(this,this.tokenIndex),r&&a.type==="Value"&&a.children.isEmpty){for(let c=l-this.tokenIndex;c<=0;c++)if(this.lookupType(c)===13){a.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(fg)&&(s=vE.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:s,property:n,value:a}}function bE(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important))}function DE(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case dE:case cE:case pE:case lE:case uE:this.next();break;case rm:this.next(),this.isDelim(rm)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function vE(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"?!0:e}var gg={};$(gg,{generate:()=>EE,name:()=>xE,parse:()=>hg,structure:()=>CE});var kE=38;function Gl(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var xE="DeclarationList",CE={children:[["Declaration","Atrule","Rule"]]};function hg(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Gl));break;default:this.isDelim(kE)?e.push(this.parseWithFallback(this.Rule,Gl)):e.push(this.parseWithFallback(this.Declaration,Gl))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function EE(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}var yg={};$(yg,{generate:()=>_E,name:()=>FE,parse:()=>wg,structure:()=>SE});var FE="Dimension",SE={value:String,unit:String};function wg(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function _E(e){this.token(12,e.value+e.unit)}var bg={};$(bg,{generate:()=>PE,name:()=>AE,parse:()=>Dg,structure:()=>OE,walkContext:()=>TE});var AE="Function",TE="function",OE={name:String,children:[[]]};function Dg(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),o=r.toLowerCase(),i;return i=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:r,children:i}}function PE(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var vg={};$(vg,{generate:()=>$E,name:()=>jE,parse:()=>kg,structure:()=>RE,xxx:()=>IE});var IE="XXX",jE="Hash",RE={value:String};function kg(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function $E(e){this.token(4,"#"+e.value)}var xg={};$(xg,{generate:()=>LE,name:()=>BE,parse:()=>Cg,structure:()=>NE});var BE="Identifier",NE={name:String};function Cg(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function LE(e){this.token(1,e.name)}var Eg={};$(Eg,{generate:()=>UE,name:()=>ME,parse:()=>Fg,structure:()=>WE});var ME="IdSelector",WE={name:String};function Fg(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function UE(e){this.token(9,"#"+e.name)}var Sg={};$(Sg,{generate:()=>JE,name:()=>zE,parse:()=>_g,structure:()=>VE});var zE="MediaFeature",VE={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function _g(){let e=this.tokenStart,t,n=null;if(this.eat(21),this.skipSC(),t=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?n=this.Ratio():n=this.Number();break;case 12:n=this.Dimension();break;case 1:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(e,this.tokenStart),name:t,value:n}}function JE(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var Ag={};$(Ag,{generate:()=>HE,name:()=>qE,parse:()=>Tg,structure:()=>GE});var qE="MediaQuery",GE={children:[["Identifier","MediaFeature","WhiteSpace"]]};function Tg(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return t===null&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function HE(e){this.children(e)}var Og={};$(Og,{generate:()=>YE,name:()=>ZE,parse:()=>Pg,structure:()=>KE});var ZE="MediaQueryList",KE={children:[["MediaQuery"]]};function Pg(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function YE(e){this.children(e,()=>this.token(18,","))}var Ig={};$(Ig,{generate:()=>tF,name:()=>QE,parse:()=>jg,structure:()=>eF});var XE=38,QE="NestingSelector",eF={};function jg(){let e=this.tokenStart;return this.eatDelim(XE),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function tF(){this.token(9,"&")}var Rg={};$(Rg,{generate:()=>oF,name:()=>nF,parse:()=>$g,structure:()=>rF});var nF="Nth",rF={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function $g(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:r,selector:n}}function oF(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}var Bg={};$(Bg,{generate:()=>aF,name:()=>iF,parse:()=>Ng,structure:()=>sF});var iF="Number",sF={value:String};function Ng(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function aF(e){this.token(10,e.value)}var Lg={};$(Lg,{generate:()=>uF,name:()=>lF,parse:()=>Mg,structure:()=>cF});var lF="Operator",cF={value:String};function Mg(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function uF(e){this.tokenize(e.value)}var Wg={};$(Wg,{generate:()=>fF,name:()=>dF,parse:()=>Ug,structure:()=>pF});var dF="Parentheses",pF={children:[[]]};function Ug(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function fF(e){this.token(21,"("),this.children(e),this.token(22,")")}var zg={};$(zg,{generate:()=>hF,name:()=>mF,parse:()=>Vg,structure:()=>gF});var mF="Percentage",gF={value:String};function Vg(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function hF(e){this.token(11,e.value+"%")}var Jg={};$(Jg,{generate:()=>DF,name:()=>yF,parse:()=>qg,structure:()=>bF,walkContext:()=>wF});var yF="PseudoClassSelector",wF="function",bF={name:String,children:[["Raw"],null]};function qg(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function DF(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var Gg={};$(Gg,{generate:()=>CF,name:()=>vF,parse:()=>Hg,structure:()=>xF,walkContext:()=>kF});var vF="PseudoElementSelector",kF="function",xF={name:String,children:[["Raw"],null]};function Hg(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function CF(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var Zg={};$(Zg,{generate:()=>AF,name:()=>SF,parse:()=>Kg,structure:()=>_F});var EF=47,FF=46;function om(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);!De(n)&&n!==FF&&this.error("Unsigned number is expected",this.tokenStart-e.length+t)}return Number(e)===0&&this.error("Zero number is not allowed",this.tokenStart-e.length),e}var SF="Ratio",_F={left:String,right:String};function Kg(){let e=this.tokenStart,t=om.call(this),n;return this.skipSC(),this.eatDelim(EF),n=om.call(this),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function AF(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}var Yg={};$(Yg,{generate:()=>IF,name:()=>OF,parse:()=>Xg,structure:()=>PF});function TF(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var OF="Raw",PF={value:String};function Xg(e,t,n){let r=this.getTokenStart(e),o;return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n&&this.tokenStart>r?o=TF.call(this):o=this.tokenStart,{type:"Raw",loc:this.getLocation(r,o),value:this.substring(r,o)}}function IF(e){this.tokenize(e.value)}var Qg={};$(Qg,{generate:()=>NF,name:()=>RF,parse:()=>eh,structure:()=>BF,walkContext:()=>$F});function im(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function jF(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}var RF="Rule",$F="rule",BF={prelude:["SelectorList","Raw"],block:["Block"]};function eh(){let e=this.tokenIndex,t=this.tokenStart,n,r;return this.parseRulePrelude?n=this.parseWithFallback(jF,im):n=im.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function NF(e){this.node(e.prelude),this.node(e.block)}var th={};$(th,{generate:()=>WF,name:()=>LF,parse:()=>nh,structure:()=>MF});var LF="Selector",MF={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function nh(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function WF(e){this.children(e)}var rh={};$(rh,{generate:()=>JF,name:()=>UF,parse:()=>oh,structure:()=>VF,walkContext:()=>zF});var UF="SelectorList",zF="selector",VF={children:[["Selector","Raw"]]};function oh(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function JF(e){this.children(e,()=>this.token(18,","))}var ih={};$(ih,{generate:()=>ZF,name:()=>GF,parse:()=>ch,structure:()=>HF});var qF={};$(qF,{decode:()=>Pc,encode:()=>lh});var cc=92,sh=34,ah=39;function Pc(e){let t=e.length,n=e.charCodeAt(0),r=n===sh||n===ah?1:0,o=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,i="";for(let s=r;s<=o;s++){let a=e.charCodeAt(s);if(a===cc){if(s===o){s!==t-1&&(i=e.substr(s+1));break}if(a=e.charCodeAt(++s),ct(cc,a)){let l=s-1,c=On(e,l);s=c-1,i+=yc(e.substring(l+1,c))}else a===13&&e.charCodeAt(s+1)===10&&s++}else i+=e[s]}return i}function lh(e,t){let n=t?"'":'"',r=t?ah:sh,o="",i=!1;for(let s=0;s<e.length;s++){let a=e.charCodeAt(s);if(a===0){o+="\uFFFD";continue}if(a<=31||a===127){o+="\\"+a.toString(16),i=!0;continue}a===r||a===cc?(o+="\\"+e.charAt(s),i=!1):(i&&(nn(a)||Tn(a))&&(o+=" "),o+=e.charAt(s),i=!1)}return n+o+n}var GF="String",HF={value:String};function ch(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Pc(this.consume(5))}}function ZF(e){this.token(5,lh(e.value))}var uh={};$(uh,{generate:()=>e1,name:()=>YF,parse:()=>dh,structure:()=>QF,walkContext:()=>XF});var KF=33;function sm(e){return this.Raw(e,null,!1)}var YF="StyleSheet",XF="stylesheet",QF={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function dh(){let e=this.tokenStart,t=this.createList(),n;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==KF){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,sm);break;default:n=this.parseWithFallback(this.Rule,sm)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function e1(e){this.children(e)}var ph={};$(ph,{generate:()=>o1,name:()=>n1,parse:()=>fh,structure:()=>r1});var t1=42,am=124;function Hl(){this.tokenType!==1&&this.isDelim(t1)===!1&&this.error("Identifier or asterisk is expected"),this.next()}var n1="TypeSelector",r1={name:String};function fh(){let e=this.tokenStart;return this.isDelim(am)?(this.next(),Hl.call(this)):(Hl.call(this),this.isDelim(am)&&(this.next(),Hl.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function o1(e){this.tokenize(e.name)}var mh={};$(mh,{generate:()=>c1,name:()=>a1,parse:()=>yh,structure:()=>l1});var gh=43,hh=45,uc=63;function jo(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let o=this.charCodeAt(r);if(o===hh&&t&&n!==0)return jo.call(this,e+n+1,!1),-1;nn(o)||this.error(t&&n!==0?"Hyphen minus"+(n<6?" or hex digit":"")+" is expected":n<6?"Hex digit is expected":"Unexpected input",r),++n>6&&this.error("Too many hex digits",r)}return this.next(),n}function Gi(e){let t=0;for(;this.isDelim(uc);)++t>e&&this.error("Too many question marks"),this.next()}function i1(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===gh?"Plus sign":"Hyphen minus")+" is expected")}function s1(){let e=0;switch(this.tokenType){case 10:if(e=jo.call(this,1,!0),this.isDelim(uc)){Gi.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){i1.call(this,hh),jo.call(this,1,!1);break}break;case 12:e=jo.call(this,1,!0),e>0&&Gi.call(this,6-e);break;default:if(this.eatDelim(gh),this.tokenType===1){e=jo.call(this,0,!0),e>0&&Gi.call(this,6-e);break}if(this.isDelim(uc)){this.next(),Gi.call(this,5);break}this.error("Hex digit or question mark is expected")}}var a1="UnicodeRange",l1={value:String};function yh(){let e=this.tokenStart;return this.eatIdent("u"),s1.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function c1(e){this.tokenize(e.value)}var wh={};$(wh,{generate:()=>y1,name:()=>g1,parse:()=>kh,structure:()=>h1});var u1={};$(u1,{decode:()=>Dh,encode:()=>vh});var d1=32,dc=92,p1=34,f1=39,m1=40,bh=41;function Dh(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===bh?t-2:t-1,o="";for(;n<r&&Tn(e.charCodeAt(n));)n++;for(;n<r&&Tn(e.charCodeAt(r));)r--;for(let i=n;i<=r;i++){let s=e.charCodeAt(i);if(s===dc){if(i===r){i!==t-1&&(o=e.substr(i+1));break}if(s=e.charCodeAt(++i),ct(dc,s)){let a=i-1,l=On(e,a);i=l-1,o+=yc(e.substring(a+1,l))}else s===13&&e.charCodeAt(i+1)===10&&i++}else o+=e[i]}return o}function vh(e){let t="",n=!1;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===0){t+="\uFFFD";continue}if(o<=31||o===127){t+="\\"+o.toString(16),n=!0;continue}o===d1||o===dc||o===p1||o===f1||o===m1||o===bh?(t+="\\"+e.charAt(r),n=!1):(n&&nn(o)&&(t+=" "),t+=e.charAt(r),n=!1)}return"url("+t+")"}var g1="Url",h1={value:String};function kh(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=Dh(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=Pc(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function y1(e){this.token(7,vh(e.value))}var xh={};$(xh,{generate:()=>D1,name:()=>w1,parse:()=>Ch,structure:()=>b1});var w1="Value",b1={children:[[]]};function Ch(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function D1(e){this.children(e)}var Eh={};$(Eh,{generate:()=>C1,name:()=>k1,parse:()=>Fh,structure:()=>x1});var v1=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),k1="WhiteSpace",x1={value:String};function Fh(){return this.eat(13),v1}function C1(e){this.token(13,e.value)}var E1={generic:!0,...uC,node:Oc},Sh={};$(Sh,{AtrulePrelude:()=>O1,Selector:()=>U1,Value:()=>J1});var F1=35,S1=42,lm=43,_1=45,A1=47,T1=117;function _h(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,T1)&&this.cmpChar(this.tokenStart+1,lm)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===A1||t===S1||t===lm||t===_1)return this.Operator();t===F1&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var O1={getNode:_h},P1=35,I1=38,j1=42,R1=43,$1=47,cm=46,B1=62,N1=124,L1=126;function M1(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function W1(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===cm&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case R1:case B1:case L1:case $1:return this.Combinator();case cm:return this.ClassSelector();case j1:case N1:return this.TypeSelector();case P1:return this.IdSelector();case I1:return this.NestingSelector()}break}}}var U1={onWhiteSpace:M1,getNode:W1};function z1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function V1(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type==="Value"&&n.children.isEmpty){for(let r=t-this.tokenIndex;r<=0;r++)if(this.lookupType(r)===13){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}e.push(n)}return e}function um(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}var J1={getNode:_h,onWhiteSpace(e,t){um(e)&&(e.value=" "+e.value),um(t.last)&&(t.last.value+=" ")},expression:z1,var:V1},q1={parse:{prelude:null,block(){return this.Block(!0)}}},G1={parse:{prelude(){let e=this.createList();switch(this.skipSC(),this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}},H1={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},Z1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},K1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};function Y1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function X1(){return this.skipSC(),this.tokenType===1&&this.lookupNonWSType(1)===16?this.createSingleNodeList(this.Declaration()):Ah.call(this)}function Ah(){let e=this.createList(),t;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 2:t=this.Function(Y1,this.scope.AtrulePrelude);break;case 1:t=this.Identifier();break;case 21:t=this.Parentheses(X1,this.scope.AtrulePrelude);break;default:break e}e.push(t)}return e}var Q1={parse:{prelude(){let e=Ah.call(this);return this.getFirstListNode(e)===null&&this.error("Condition is expected"),e},block(e=!1){return this.Block(e)}}},eS={"font-face":q1,import:G1,media:H1,nest:Z1,page:K1,supports:Q1},_n={parse(){return this.createSingleNodeList(this.SelectorList())}},Zl={parse(){return this.createSingleNodeList(this.Selector())}},dm={parse(){return this.createSingleNodeList(this.Identifier())}},Hi={parse(){return this.createSingleNodeList(this.Nth())}},tS={dir:dm,has:_n,lang:dm,matches:_n,is:_n,"-moz-any":_n,"-webkit-any":_n,where:_n,not:_n,"nth-child":Hi,"nth-last-child":Hi,"nth-last-of-type":Hi,"nth-of-type":Hi,slotted:Zl,host:Zl,"host-context":Zl},Th={};$(Th,{AnPlusB:()=>zm,Atrule:()=>Jm,AtrulePrelude:()=>Gm,AttributeSelector:()=>Km,Block:()=>Qm,Brackets:()=>tg,CDC:()=>rg,CDO:()=>ig,ClassSelector:()=>ag,Combinator:()=>cg,Comment:()=>dg,Declaration:()=>mg,DeclarationList:()=>hg,Dimension:()=>wg,Function:()=>Dg,Hash:()=>kg,IdSelector:()=>Fg,Identifier:()=>Cg,MediaFeature:()=>_g,MediaQuery:()=>Tg,MediaQueryList:()=>Pg,NestingSelector:()=>jg,Nth:()=>$g,Number:()=>Ng,Operator:()=>Mg,Parentheses:()=>Ug,Percentage:()=>Vg,PseudoClassSelector:()=>qg,PseudoElementSelector:()=>Hg,Ratio:()=>Kg,Raw:()=>Xg,Rule:()=>eh,Selector:()=>nh,SelectorList:()=>oh,String:()=>ch,StyleSheet:()=>dh,TypeSelector:()=>fh,UnicodeRange:()=>yh,Url:()=>kh,Value:()=>Ch,WhiteSpace:()=>Fh});var nS={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:Sh,atrule:eS,pseudo:tS,node:Th},rS={node:Oc},oS=cC({...E1,...nS,...rS});var iS={};$(iS,{decode:()=>sS,encode:()=>aS});var pm=92;function sS(e){let t=e.length-1,n="";for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===pm){if(r===t)break;if(o=e.charCodeAt(++r),ct(pm,o)){let i=r-1,s=On(e,i);r=s-1,n+=yc(e.substring(i+1,s))}else o===13&&e.charCodeAt(r+1)===10&&r++}else n+=e[r]}return n}function aS(e){let t="";if(e.length===1&&e.charCodeAt(0)===45)return"\\-";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===0){t+="\uFFFD";continue}if(r<=31||r===127||r>=48&&r<=57&&(n===0||n===1&&e.charCodeAt(0)===45)){t+="\\"+r.toString(16)+" ";continue}gc(r)?t+=e.charAt(n):t+="\\"+e.charAt(n)}return t}var{tokenize:xI,parse:Oh,generate:Ph,lexer:CI,createLexer:EI,walk:Ih,find:FI,findLast:SI,findAll:_I,toPlainObject:AI,fromPlainObject:TI,fork:OI}=oS;var jh=w(require("prettier"));J();var lS=`
|
|
55
|
-
.w-icon-slider-right:before {
|
|
56
|
-
content: "\\e600";
|
|
57
|
-
}
|
|
58
|
-
.w-icon-slider-left:before {
|
|
59
|
-
content: "\\e601";
|
|
60
|
-
}
|
|
61
|
-
.w-icon-nav-menu:before {
|
|
62
|
-
content: "\\e602";
|
|
63
|
-
}
|
|
64
|
-
.w-icon-arrow-down:before {
|
|
65
|
-
content: "\\e603";
|
|
66
|
-
}
|
|
67
|
-
.w-icon-file-upload-remove:before {
|
|
68
|
-
content: "\\e900";
|
|
69
|
-
}
|
|
70
|
-
.w-icon-file-upload-icon:before {
|
|
71
|
-
content: "\\e903";
|
|
72
|
-
}
|
|
73
|
-
`;function cS(e,t,n){let r=["ClassSelector","AttributeSelector","IdSelector","PseudoClassSelector"],o=["type"],i=["root"];if(e.type==="Rule"&&(e.prelude.type==="SelectorList"&&(e.prelude.children=new ye().fromArray(e.prelude.children.toArray().filter(s=>{let a="children"in s?s.children?.first:null;return!a||!r.includes(a.type)?!1:a.type==="PseudoClassSelector"?i.includes(a.name):a.type==="AttributeSelector"?!o.includes(a.name.name):!0}))),e.prelude.children.toArray().length===0&&n)){n.remove(t);return}}function Rh(e){if(d.info("Detected skipTagSelectors flag is enabled. Skipping global CSS tags."),!e)return"";try{let t=Oh(e);return Ih(t,{enter:cS}),jh.default.format([Ph(t),lS].join(`
|
|
74
|
-
|
|
75
|
-
`).trim(),{parser:"css"})}catch{return d.warn("There was a problem skipping global tags from CSS. Falling back to normal global CSS."),e}}function $h(e){return e.reduce((t,n)=>(n.path==="css/global.css"?t.globalCss=n:t.rest.push(n),t),{rest:[]})}var _r=class extends Error{};function uS(e){try{let t=JSON.parse(e);if(t.msg&&typeof t.msg=="string")return t.msg}catch{}return null}async function dS(e){switch(e.status){case 400:{let t=await e.text(),n=uS(t);throw new _r(n||"Bad request: The server rejected the request due to invalid input. Please check your configuration and try again.")}case 401:throw new _r("Your access token is invalid for the provided siteId. Double check your configs in your .webflowrc configuration file.");case 404:throw new _r("You're not currently enrolled in the DevLink beta. You can apply for access here: https://webflow.com/devlink");default:throw new _r(`Something went wrong (HTTP ${e.status}).`)}}async function pS(e){try{let{siteId:t,host:n,authToken:r,components:o,cssModules:i,relativeHrefRoot:s}=e,a=new URLSearchParams({cssModules:i?"true":"false"});o&&a.append("components",o),s!==void 0&&a.append("relativeHrefRoot",String(s));let l=`?${a.toString()}`,c=await K(`${n}/devlink/${t}${l}`,{headers:{Authorization:`Bearer ${r}`},timeout:6e4});return c.ok?await c.json():dS(c)}catch(t){throw new g(t,{skipLogging:!0})}}async function Ic(e){try{let t=await pS(e);if(!t.files||!Array.isArray(t.files))throw new g("Invalid response format from V1 API: expected 'files' array");let n=fS(t.files,e),r=t.metadata?.exportCoverage==="full";return await Wi(n,e.rootDir,r),{messages:t.messages}}catch(t){throw t instanceof g?t:new g(t,{skipLogging:!0})}}function fS(e,t){let n=t.skipTagSelectors===!0,r=t.envVariables&&Object.keys(t.envVariables).length>0;if(!n&&!t.fileExtensions&&!r)return e;let o=e;if(n){let{rest:i,globalCss:s}=$h(e);if(s){let a=Rh(s.content);o=[...i,{...s,content:a}]}}return!t.fileExtensions&&!r?o:o.map(i=>{let s=i.path,a=i.content;if(t.fileExtensions){let{js:l,css:c}=t.fileExtensions;if(l){let u=l.startsWith(".")?l:`.${l}`;s=s.replace(/\.(jsx|js)$/,u)}if(c){let u=c.startsWith(".")?c:`.${c}`;s=s.replace(/\.css$/,u)}}return r&&(a=mS(a,t.envVariables)),{path:s,content:a}})}function mS(e,t){return t?Object.entries(t).reduce((n,[r,o])=>n.replace(new RegExp(`DEVLINK_ENV_${r}`,"g"),o.trim()),e):e}var Pn=w(require("process"));J();ke();ht();var jc=class{config;error;constructor(t,n){this.config=t,this.error=n}stripPII(t=""){return t.replace(/\/(.*)webflow-cli/gi,"/REDACTED_PII/webflow-cli/").replace(/\/(.*)node_modules/gi,"/REDACTED_PII/node_modules")}sendTelemetry(){let t=this.config,n=this.error;K(`${t.host}/devlink/${t.siteId}/telemetry`,{headers:{Authorization:`Bearer ${t.authToken}`,"Content-Type":"application/json"},method:"post",body:JSON.stringify({cause:n.cause,message:n.message,name:n.name,stack:this.stripPII(n.stack),platform:Pn.default.platform,node:Pn.default.version})})}async storeChoice(t){try{return se({devlink:{allowTelemetry:t}})}catch{let r=await yr();await qp({...r,allowTelemetry:t})}}async prompt(){let t=this.config;if(d.error(this.error),t.allowTelemetry===!0)d.info("Sending crash report telemetry..."),this.sendTelemetry();else if(t.allowTelemetry===!1){d.info("Skipping crash report telemetry...");return}else d.info("Telemetry is enabled. Crash reports help us improve Webflow CLI."),d.info("To opt out, run: webflow auth telemetry --disable"),await this.storeChoice(!0),d.info("Sending crash report telemetry..."),this.sendTelemetry()}};function ms(e){return async function(n){Pn.default.removeListener("uncaughtException",ms),Pn.default.removeListener("unhandledRejection",ms);let r=await Li(e);if(!r)return;await new jc(r,n).prompt()}}function Bh(e){Pn.default.on("uncaughtException",ms(e)),Pn.default.on("unhandledRejection",ms(e))}Be();J();We();ke();Rc();async function Nh(e,t){let n=Date.now(),{manifest:r}=Q(),{accessToken:o,siteId:i}=await be(r,{site:t?.site,apiToken:t?.apiToken}),s={...o?{authToken:o}:{},...i?{siteId:i}:{},...e&&e.length>0?{components:Ni(e),overwriteModule:!1}:{overwriteModule:!0}};Bh(s);let a=await Li(s);if(!a)return $c.default.exit();let l;try{l=G.forDevlinkSync(a)}catch(u){d.debug(`Failed to initialize telemetry: ${u}`)}await l?.sendUsage("devlink_sync_start",{specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot});let c=d.spinner(`Exporting components into ${a.rootDir}`);try{let{messages:u}=await Ic(a);c.succeed(`Successfully exported components into ${a.rootDir} folder`),gs(u);let p=Date.now()-n;await l?.sendUsage("devlink_sync_success",{duration:p,specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot})}catch(u){let p=u instanceof Error?u.message:String(u);c.fail(`Failed to export components: ${p}`);let f=Date.now()-n;throw await l?.sendError(u instanceof Error?u:new Error(String(u)),"devlink_sync_failure",{duration:f,specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot,configOverrides:Object.keys(s),argv:$c.default.argv.slice(2)}),u}}Uc();var an=require("commander");var Ls=require("path"),$r=require("@webflow/data-types");le();var ks=require("fs"),zc=w(require("md5"));function Vc(e,t){try{let n=(0,ks.statSync)(e),r=(0,ks.readFileSync)(e);return{value:r,meta:{title:e.replace(/^.*[\\\/]/,""),fileHash:(0,zc.default)(r),size:n.size,...t||{}}}}catch{throw new Error(`File '${e}' not found`)}}function Wo(e,t,n){try{let r=new Blob([e]).size,o=Buffer.from(e,"utf-8");return{value:o,meta:{title:t.replace(/^.*[\\\/]/,""),fileHash:(0,zc.default)(o),size:r,...n}}}catch{throw new Error(`Error parsing '${t}' inline file`)}}var sy=w(require("node-fetch")),ay=w(require("form-data"));async function Uo(e,t){let n={...t.fields,file:e.value},r=new ay.default;Object.entries(n).forEach(([i,s])=>{r.append(i,s)});let o=await(0,sy.default)("https://"+t.fields.bucket+".s3.amazonaws.com",{method:"POST",body:r});xS(o)}function xS(e){switch(e.status){case 200:case 201:return;case 403:throw new Error("Unauthorized. Please check your AWS access key");default:throw new Error(`Something went wrong when uploading the file: ${e.statusText}`)}}J();ke();Be();le();ht();function CS({apiToken:e=process.env.WEBFLOW_API_TOKEN??process.env.WEBFLOW_WORKSPACE_API_TOKEN??process.env.WEBFLOW_SITE_API_TOKEN,siteId:t=process.env.WEBFLOW_SITE_ID,libraryTarget:n=process.env.WEBFLOW_LIBRARY_TARGET}){if(!e)throw new Error("No API token provided");if(n==="site"){if(!t)throw new Error("No site provided");return{baseUrl:`${I}/v2/sites/${t}`,authToken:e}}return{baseUrl:`${I}/v2/workspaces`,authToken:e}}function ES(e){if(e)return JSON.stringify(Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)))}async function FS(e){if(e.ok)return;if(e.status===401||e.status===403)throw new Error("Your API token is invalid or not authorized to perform this action. Remove the token from .env and run the command again to generate a new token.");if(e.status===404)throw new Error("Code components are rolling out in phases. Check back soon for access.");let t=await e.json();throw new Error(t.message||e.statusText)}async function rn({endpoint:e,method:t="GET",body:n,options:r}){let{baseUrl:o,authToken:i}=CS(r),s=`${o.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`,a=await K(s,{method:t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:ES(n)});return await FS(a),a.json()}async function Jc({options:e}){return(await rn({endpoint:"/code_libraries",options:e})).payload.workspaces[0]}async function qc({name:e,description:t,slug:n,options:r}){return(await rn({method:"POST",endpoint:"/code_library/init",body:{name:e,description:t,slug:n},options:r})).payload}async function Gc({resourceId:e,files:t,options:n}){return(await rn({method:"POST",endpoint:`/code_library/${e}/files`,body:{files:t},options:n})).payload}async function Hc({resourceId:e,codeModule:t,components:n,options:r}){return(await rn({method:"POST",endpoint:`/code_library/${e}/share`,body:{codeModule:t,components:n},options:r})).payload}var Xy=require("path"),Qy=w(require("webpack-merge")),In=require("@webflow/data-types");le();J();var uy=require("memfs/lib/volume"),zo=require("@webflow/data-types");var vt="./tmp_entry",ly="components";function xs(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+|[^\p{L}\p{N}]/gu," ").toLowerCase().replace(new RegExp("(?:^|\\s)(\\p{L})","gu"),(t,n)=>n.toUpperCase()).replace(/\s+/g,"")}function SS(e){let t=xs(e);return/^[a-zA-Z]/.test(t.charAt(0))?t:"_"+t}function cy(e,t){let n=e.map(({name:l,path:c,isDefaultExport:u})=>u?`import ${l} from "${c}";`:`import { ${l} } from "${c}";`).join(`
|
|
76
|
-
`),r=e.filter(l=>l.type==="internal").map(({name:l,exportKey:c})=>`${c}: ${l}`).join(", "),o=e.filter(l=>l.type==="component").map(({name:l,exportKey:c})=>`"${c}": ${l}`).join(", "),i=`env: "${t}"`,s=r,a=o?`components: { ${o} }`:void 0;return`${n}
|
|
44
|
+
in your project root.`),new p(a)}}function qu(e){if(!(e===void 0||e===!1)){if(typeof e=="string"){if(e==="/"||e.startsWith("http://")||e.startsWith("https://"))return;throw new Error(`Invalid relativeHrefRoot value "${e}". Must be false, "/" or an absolute URL starting with http:// or https://`)}throw new Error(`Invalid relativeHrefRoot type. Must be false, "/" or an absolute URL string, got: ${typeof e}`)}}function Wo(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>`^${t}$`).join("|")}ua();Ye();q();var Lr=class extends Error{};function $h(e){try{let t=JSON.parse(e);if(t.msg&&typeof t.msg=="string")return t.msg}catch{}return null}async function Rh(e){switch(e.status){case 400:{let t=await e.text(),r=$h(t);throw new Lr(r||"Bad request: The server rejected the request due to invalid input. Please check your configuration and try again.")}case 401:throw new Lr("Your access token is invalid for the provided siteId. Double check your configs in your .webflowrc configuration file.");case 404:throw new Lr("You're not currently enrolled in the DevLink beta. You can apply for access here: https://webflow.com/devlink");default:throw new Lr(`Something went wrong (HTTP ${e.status}).`)}}async function jh(e){try{let{siteId:t,host:r,authToken:n,...o}=e,i=await W(`${r}/devlink/${t}`,{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"},body:JSON.stringify(o),timeout:6e4});return i.ok?await i.json():Rh(i)}catch(t){throw new p(t,{skipLogging:!0})}}async function da(e){try{let t=await jh(e);if(!t.files||!Array.isArray(t.files))throw new p("Invalid response format from V1 API: expected 'files' array");let r=t.metadata?.exportCoverage==="full";return await Jo(t.files,e.rootDir,r),{messages:t.messages}}catch(t){throw t instanceof p?t:new p(t,{skipLogging:!0})}}var er=h(require("process"));j();de();Ye();var fa=class{config;error;constructor(t,r){this.config=t,this.error=r}stripPII(t=""){return t.replace(/\/(.*)webflow-cli/gi,"/REDACTED_PII/webflow-cli/").replace(/\/(.*)node_modules/gi,"/REDACTED_PII/node_modules")}sendTelemetry(){let t=this.config,r=this.error;W(`${t.host}/devlink/${t.siteId}/telemetry`,{headers:{Authorization:`Bearer ${t.authToken}`,"Content-Type":"application/json"},method:"post",body:JSON.stringify({cause:r.cause,message:r.message,name:r.name,stack:this.stripPII(r.stack),platform:er.default.platform,node:er.default.version})})}async storeChoice(t){try{return Q({devlink:{allowTelemetry:t}})}catch{let n=await Mr();await Cu({...n,allowTelemetry:t})}}async prompt(){let t=this.config;if(u.error(this.error),t.allowTelemetry===!0)u.info("Sending crash report telemetry..."),this.sendTelemetry();else if(t.allowTelemetry===!1){u.info("Skipping crash report telemetry...");return}else u.info("Telemetry is enabled. Crash reports help us improve Webflow CLI."),u.info("To opt out, run: webflow auth telemetry --disable"),await this.storeChoice(!0),u.info("Sending crash report telemetry..."),this.sendTelemetry()}};function Go(e){return async function(r){er.default.removeListener("uncaughtException",Go),er.default.removeListener("unhandledRejection",Go);let n=await Uo(e);if(!n)return;await new fa(n,r).prompt()}}function Ku(e){er.default.on("uncaughtException",Go(e)),er.default.on("unhandledRejection",Go(e))}Ce();j();Te();de();pa();async function Zu(e,t){let r=Date.now(),{manifest:n}=J(),{accessToken:o,siteId:i}=await le(n,{site:t?.site,apiToken:t?.apiToken}),s={...o?{authToken:o}:{},...i?{siteId:i}:{},...e&&e.length>0?{components:Wo(e),overwriteModule:!1}:{overwriteModule:!0}};Ku(s);let a=await Uo(s);if(!a)return ma.default.exit();let c;try{c=N.forDevlinkSync(a)}catch(d){u.debug(`Failed to initialize telemetry: ${d}`)}await c?.sendUsage("devlink_sync_start",{specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot});let l=u.spinner(`Exporting components into ${a.rootDir}`);try{let{messages:d}=await da(a);l.succeed(`Successfully exported components into ${a.rootDir} folder`),zo(d);let f=Date.now()-r;await c?.sendUsage("devlink_sync_success",{duration:f,specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot})}catch(d){let f=d instanceof Error?d.message:String(d);l.fail(`Failed to export components: ${f}`);let m=Date.now()-r;throw await c?.sendError(d instanceof Error?d:new Error(String(d)),"devlink_sync_failure",{duration:m,specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot,configOverrides:Object.keys(s),argv:ma.default.argv.slice(2)}),d}}ba();var Pt=require("commander");var hi=require("path"),Hr=require("@webflow/data-types");ee();var Qo=require("fs"),va=h(require("md5"));function Fa(e,t){try{let r=(0,Qo.statSync)(e),n=(0,Qo.readFileSync)(e);return{value:n,meta:{title:e.replace(/^.*[\\\/]/,""),fileHash:(0,va.default)(n),size:r.size,...t||{}}}}catch{throw new Error(`File '${e}' not found`)}}function Vn(e,t,r){try{let n=new Blob([e]).size,o=Buffer.from(e,"utf-8");return{value:o,meta:{title:t.replace(/^.*[\\\/]/,""),fileHash:(0,va.default)(o),size:n,...r}}}catch{throw new Error(`Error parsing '${t}' inline file`)}}var wd=h(require("node-fetch")),Dd=h(require("form-data"));async function Jn(e,t){let r={...t.fields,file:e.value},n=new Dd.default;Object.entries(r).forEach(([i,s])=>{n.append(i,s)});let o=await(0,wd.default)("https://"+t.fields.bucket+".s3.amazonaws.com",{method:"POST",body:n});Gh(o)}function Gh(e){switch(e.status){case 200:case 201:return;case 403:throw new Error("Unauthorized. Please check your AWS access key");default:throw new Error(`Something went wrong when uploading the file: ${e.statusText}`)}}j();de();Ce();ee();Ye();function zh({apiToken:e=process.env.WEBFLOW_API_TOKEN??process.env.WEBFLOW_WORKSPACE_API_TOKEN??process.env.WEBFLOW_SITE_API_TOKEN,siteId:t=process.env.WEBFLOW_SITE_ID,libraryTarget:r=process.env.WEBFLOW_LIBRARY_TARGET}){if(!e)throw new Error("No API token provided");if(r==="site"){if(!t)throw new Error("No site provided");return{baseUrl:`${C}/v2/sites/${t}`,authToken:e}}return{baseUrl:`${C}/v2/workspaces`,authToken:e}}function qh(e){if(e)return JSON.stringify(Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)))}async function Hh(e){if(e.ok)return;if(e.status===401||e.status===403)throw new Error("Your API token is invalid or not authorized to perform this action. Remove the token from .env and run the command again to generate a new token.");if(e.status===404)throw new Error("Code components are rolling out in phases. Check back soon for access.");let t=await e.json();throw new Error(t.message||e.statusText)}async function At({endpoint:e,method:t="GET",body:r,options:n}){let{baseUrl:o,authToken:i}=zh(n),s=`${o.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`,a=await W(s,{method:t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:qh(r)});return await Hh(a),a.json()}async function Ea({options:e}){return(await At({endpoint:"/code_libraries",options:e})).payload.workspaces[0]}async function xa({name:e,description:t,slug:r,options:n}){return(await At({method:"POST",endpoint:"/code_library/init",body:{name:e,description:t,slug:r},options:n})).payload}async function Ca({resourceId:e,files:t,options:r}){return(await At({method:"POST",endpoint:`/code_library/${e}/files`,body:{files:t},options:r})).payload}async function _a({resourceId:e,codeModule:t,components:r,options:n}){return(await At({method:"POST",endpoint:`/code_library/${e}/share`,body:{codeModule:t,components:r},options:n})).payload}var df=require("path"),ff=h(require("webpack-merge")),tr=require("@webflow/data-types");ee();j();var Fd=require("memfs/lib/volume"),Gn=require("@webflow/data-types");var et="./tmp_entry",bd="components";function ei(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+|[^\p{L}\p{N}]/gu," ").toLowerCase().replace(new RegExp("(?:^|\\s)(\\p{L})","gu"),(t,r)=>r.toUpperCase()).replace(/\s+/g,"")}function Kh(e){let t=ei(e);return/^[a-zA-Z]/.test(t.charAt(0))?t:"_"+t}function vd(e,t){let r=e.map(({name:c,path:l,isDefaultExport:d})=>d?`import ${c} from "${l}";`:`import { ${c} } from "${l}";`).join(`
|
|
45
|
+
`),n=e.filter(c=>c.type==="internal").map(({name:c,exportKey:l})=>`${l}: ${c}`).join(", "),o=e.filter(c=>c.type==="component").map(({name:c,exportKey:l})=>`"${l}": ${c}`).join(", "),i=`env: "${t}"`,s=n,a=o?`components: { ${o} }`:void 0;return`${r}
|
|
77
46
|
|
|
78
|
-
export default { ${[i,s,a].filter(Boolean).join(", ")} };`}function dy(e,t,n){let r={},o=`${vt}/Client.js`,i=`${vt}/Server.js`;r[o]=cy([{name:"ClientRenderer",path:e.client,exportKey:"Renderer",type:"internal"}],zo.Environment.Client);let s={},a=c=>{let u=SS(c);return s[u]?(s[u]+=1,`${u}${s[u]}`):(s[u]=1,u)};r[i]=cy([{name:"ServerRenderer",path:e.server,exportKey:"Renderer",type:"internal"},...Object.entries(t).filter(([c])=>n[c]?.ssr??!0).map(([c,u])=>{let p=a(c),f=u.startsWith(vt)?u.replace(`${vt}/`,"./"):u;return{name:p,path:f,exportKey:c,isDefaultExport:!0,type:"component"}})],zo.Environment.Server);let l={[zo.Environment.Client]:o,[zo.Environment.Server]:i};return{entryPointsVolume:uy.Volume.fromJSON(r),paths:l}}var ew=require("memfs/lib/volume");var hy=w(require("archiver")),Ar=require("path");le();var Vo=require("@webflow/data-types");le();J();var on=e=>e.endsWith("/")||/%2F$/i.test(e)?e:`${e}/`;var py=2;function fy(e){let t={type:Vo.ModuleLoader.FEDERATION,version:py,entry:Xa,renderer:yo,components:e};return{title:ho,content:JSON.stringify(t)}}function my(e){let t={type:Vo.ModuleLoader.SSR,version:py,entry:mr,components:e};return{title:ho,content:JSON.stringify(t)}}function gy(e){let t=`/${Vo.Environment.Client}/${Xa}`;try{if(e.existsSync(t)){let n=e.readFileSync(t,"utf8"),r=JSON.parse(n.toString()),o="publicPath"in r.metaData?r.metaData.publicPath:null;if(!o)throw new Error("Public path not found in module federation manifest");return r.exposes.reduce((i,s)=>{let a=s.name;return a===yo||(i[a]={css:[]},s.assets.css.sync.forEach(l=>{i[a].css.push(`${on(o)}${l}`)})),i},{})}}catch(n){d.error(n,{prefix:"Failed to extract components metadata from MF manifest:"})}return{}}var Cs=require("@webflow/data-types"),_S=/\.css$/i;async function yy(e,t,n){let r=!1;return new Promise(async(o,i)=>{e.length===0&&i(new Error("No assets to bundle"));let s=`/${Cs.Environment.Server}/${wo}`,a=(0,hy.default)("tar",{gzip:!1}),l=t.createWriteStream(s);a.on("error",p=>(r=!0,i(p))),l.on("close",()=>{if(!r)try{let p={type:"asset",name:wo,info:{},size:a.pointer(),emitted:!0,comparedForEmit:!1,cached:!1};return e.forEach(f=>{let m=(0,Ar.resolve)((0,Ar.join)(`/${Cs.Environment.Server}`,f.name));t.existsSync(m)&&t.rmSync(m)}),o([p])}catch(p){return i(p)}finally{r=!0}}),a.pipe(l);let{title:c,content:u}=my(n);a.append(u,{name:c}),e.forEach(p=>{if(!_S.test(p.name))try{let f=(0,Ar.resolve)((0,Ar.join)(`/${Cs.Environment.Server}`,p.name)),m=t.readFileSync(f,"utf8");a.append(m,{name:p.name})}catch(f){return r=!0,i(f)}}),await a.finalize()})}var wy=require("@webflow/data-types");async function by(e,t,n){let{title:r,content:o}=fy(n);await t.promises.writeFile(`/${wy.Environment.Client}/${r}`,o);let i={type:"asset",name:r,info:{},size:o.length,emitted:!0,comparedForEmit:!1,cached:!1};return e.filter(s=>s.name!=="mf-stats.json").concat([i])}var Jy=require("@rspack/core"),qy=w(require("fork-ts-checker-webpack-plugin")),Gy=require("ts-checker-rspack-plugin"),Hy=w(require("mini-css-extract-plugin")),Zy=require("@webflow/data-types");var vy=require("webpack"),Kc=w(require("mini-css-extract-plugin")),ky=w(require("tsconfig-paths-webpack-plugin")),xy=require("tsconfig-paths"),Yc=require("@webflow/data-types"),Cy=require("path");le();var Dy=w(require("postcss-selector-parser")),Zc=()=>({postcssPlugin:"CSSinShadowDOM",Once(e){e.walkRules(t=>{t.selector=(0,Dy.default)(n=>{n.walkPseudos(r=>{r.value===":root"&&(r.value=":host")})}).processSync(t.selector)})}});Zc.postcss=!0;Zc.postcssPlugin="CSSinShadowDOM";var Es=Zc;function AS(){return(0,xy.loadConfig)(process.cwd()).resultType==="success"}function Ey({entry:e,env:t,mode:n="production",publicPath:r,libraryName:o,outputPath:i}){let s={mode:n,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:Kc.default.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[Es]}}}]},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new Kc.default({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:{plugins:[AS()?new ky.default:null].filter(Boolean)},performance:{hints:!1}};if(t===Yc.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,Cy.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===Yc.Environment.Server)return{...s,plugins:[...s.plugins||[],new vy.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:mr,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var Fy=require("@module-federation/enhanced"),Xc=require("@webflow/data-types");function Sy({libraryName:e,env:t,exposes:n}){if(t===Xc.Environment.Client)return{plugins:[new Fy.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===Xc.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}function _y(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,use:[{ident:"babel-loader",loader:require.resolve("babel-loader"),options:{presets:[require.resolve("@babel/preset-env"),[require.resolve("@babel/preset-react"),{runtime:"automatic"}],require.resolve("@babel/preset-typescript")]}}]}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}function Fs(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,loader:"builtin:swc-loader",options:{jsc:{parser:{syntax:"typescript",tsx:!0},transform:{react:{runtime:"automatic",development:!1,refresh:!1}}}}}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}var Ss=require("@rspack/core"),Ay=require("tsconfig-paths"),Qc=require("@webflow/data-types"),Ty=require("path");le();function TS(){let e=(0,Ay.loadConfig)(process.cwd());if(e.resultType==="success")return e.configFileAbsolutePath}function Oy({entry:e,env:t,mode:n="production",publicPath:r,libraryName:o,outputPath:i}){let s={mode:n,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:Ss.rspack.CssExtractRspackPlugin.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[Es]}}}],type:"javascript/auto"},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new Ss.rspack.CssExtractRspackPlugin({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:(()=>{let a=TS();return a?{tsConfig:{configFile:a}}:{}})(),performance:{hints:!1}};if(t===Qc.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,Ty.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===Qc.Environment.Server)return{...s,plugins:[...Array.isArray(s.plugins)?s.plugins:[],new Ss.rspack.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:mr,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var Py=require("@module-federation/enhanced/rspack"),eu=require("@webflow/data-types");function Iy({libraryName:e,env:t,exposes:n}){if(t===eu.Environment.Client)return{plugins:[new Py.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===eu.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}var PS=w(require("fs")),jy=require("unionfs"),Ry=require("webpack");function OS(e){return{name:e.name,size:e.size,emitted:e.emitted,info:e.info}}function _s(e){let t=e.toJson();return{hasErrors:()=>e.hasErrors(),hasWarnings:()=>e.hasWarnings(),toString:n=>e.toString(n),toJson:()=>({...t,assets:(t.assets??[]).map(OS)})}}async function $y({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((s,a)=>(s.use(a),s),new jy.Union().use(PS));return new Promise((s,a)=>{let l=(0,Ry.webpack)(e);l.inputFileSystem=i,n&&(l.outputFileSystem=n),r&&(l.outputPath=r),l.run((c,u)=>{l.close(p=>{c||p?a(c||p):u?u.hasErrors()||o&&u.hasWarnings()?a(new Error(u.toString("errors-warnings"))):s(_s(u)):a(new Error("Webpack stats are undefined"))})})})}var IS=w(require("fs")),tu=w(require("webpack-merge")),By=require("memfs"),Ny=require("unionfs"),Ly=require("@rspack/core");async function As({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((a,l)=>(a.use(l),a),new Ny.Union().use(IS)),s=e;return t.length>0&&(s=(0,tu.default)(s,{experiments:{...e.experiments,useInputFileSystem:[/./]}})),n&&(s=(0,tu.default)(s,{output:{clean:!1,...r&&{path:r}}})),new Promise((a,l)=>{let c=(0,Ly.rspack)(s);c.inputFileSystem=i,n&&(c.outputFileSystem=(0,By.createFsFromVolume)(n)),r&&(c.outputPath=r),c.run((u,p)=>{c.close(f=>{u||f?l(u||f):p?p.hasErrors()||o&&p.hasWarnings()?l(new Error(p.toString("errors-warnings"))):a(_s(p)):l(new Error("Rspack stats are undefined"))})})})}var Wy=require("@module-federation/enhanced");var Tr=w(require("webpack-merge"));J();function sn(e){return e!==null&&typeof e=="object"&&"constructor"in e?e.constructor.name??"":""}function My(e,t){let n=Object.entries(e).filter(([r])=>!t.includes(r));return Object.fromEntries(n)}function Os(e){let{deduplicatePluginNames:t,ModuleFederationPluginClass:n,getPluginOptions:r,filterOverridePlugins:o}=e;return function(s,a,l){let c=["entry","output","target"],u=jS(s),p=Array.isArray(l)?Ts(...l.map(u)):Ts(u(l));Object.keys(p).some(j=>c.includes(j))&&d.warn(`Cannot override blocked properties: ${c.join(", ")}`);let m={...My(p,[...c,"ModuleFederationPlugin","module","plugins"]),module:My(p.module??{},["rules"])},h=(0,Tr.default)(a,m),v=p.plugins??[];o&&(v=v.filter(o));let k=a.plugins??[],P=(0,Tr.mergeWithCustomize)({customizeArray:(0,Tr.unique)("plugins",t,j=>sn(j))})({plugins:v},{plugins:k}).plugins,C=p?.ModuleFederationPlugin?.shared,x=P?.map(j=>{if(sn(j)==="ModuleFederationPlugin"){let S=r(j);return new n({...S,...C?{shared:C}:{}})}return j});h.plugins=x;let z=p.module?.rules;if(z&&typeof z=="function"){let j=a.module?.rules??[];h.module={...h.module??{},rules:z(j)}}return h}}function Ts(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={};for(let n of e){let{module:r,ModuleFederationPlugin:o,plugins:i,...s}=n;if(t={...t,...s},r){let{rules:a,...l}=r;if(t.module={...t.module,...l},a){let c=t.module?.rules;c?t.module.rules=u=>{let p=c(u);return a(p)}:t.module.rules=a}}o?.shared&&(t.ModuleFederationPlugin={shared:{...t.ModuleFederationPlugin?.shared,...o.shared}}),i&&(t.plugins=[...t.plugins??[],...i])}return t}function jS(e){return t=>typeof t=="function"?t(e):t}var RS=Os({deduplicatePluginNames:["ModuleFederationPlugin","MiniCssExtractPlugin"],ModuleFederationPluginClass:Wy.ModuleFederationPlugin,getPluginOptions:e=>e._options??{}});function Uy(e,t,n){return RS(e,t,n)}var zy=require("@module-federation/enhanced/rspack");var $S=Os({deduplicatePluginNames:["ModuleFederationPlugin","CssExtractRspackPlugin"],ModuleFederationPluginClass:zy.ModuleFederationPlugin,getPluginOptions:e=>e._options??{},filterOverridePlugins:e=>sn(e)!=="MiniCssExtractPlugin"});function Vy(e,t,n){return $S(e,t,n)}var nu={[Zy.Framework.React]:{generateWebpackBundlerConfig:_y,generateRspackBundlerConfig:Fs}},BS={webpack:{generateBaseConfig:Ey,getFrameworkConfig:(e,t)=>nu[e].generateWebpackBundlerConfig(t),generateFederationConfig:Sy,mergeConfigs:(e,t,n)=>Uy(e,t,n),bundle:e=>$y({...e,config:e.config}),typeCheckerPlugin:qy.default,hashFunction:"md5",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>sn(t)==="MiniCssExtractPlugin"?new Hy.default({filename:"[name].[contenthash].css"}):t)})},rspack:{generateBaseConfig:Oy,getFrameworkConfig:(e,t)=>nu[e].generateRspackBundlerConfig(t),generateFederationConfig:Iy,mergeConfigs:(e,t,n)=>Vy(e,t,n),bundle:e=>As({...e,config:e.config}),typeCheckerPlugin:Gy.TsCheckerRspackPlugin,hashFunction:"md4",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>sn(t)==="CssExtractRspackPlugin"?new Jy.CssExtractRspackPlugin({filename:"[name].[contenthash].css"}):t)})}},Or=e=>BS[e],Ky=e=>!!nu[e];var Yy={colors:!0,chunks:!1,modules:!1,chunkModules:!1,reasons:!1,errorDetails:!1,assetsSpace:1/0,warnings:!1,assets:!0,entrypoints:!0,performance:!0};async function Ps(e){let t=e.bundler??"webpack";d.debug("Generating entry points...");let{entryPointsVolume:n,paths:r}=dy(e.renderer,e.componentsFiles,e.componentsOptions),o=ew.Volume.fromJSON({"/Server":null,"/Client":null});d.debug("Generating bundling config...");let i=e.overrideConfig??{};Object.keys(i).length&&d.debug("Found bundle config overrides. Merging...");let s=Or(t),a=k=>{let T=NS({env:k,mode:e.dev?"development":"production",framework:e.framework,publicPath:e.publicPath,components:e.componentsFiles,entryPaths:r,libraryName:e.libraryIdentifier,bundler:t}),P=s.mergeConfigs(k,T,i);return e?.debugBundler&&(d.info(`${t} config for env ${k}:`),d.dir(P)),P},l={sourceVolumes:[...e.sourceVolumes,n],outputVolume:o,failOnWarnings:e.failOnWarnings},[c,u]=await Promise.all([s.bundle({...l,config:a(In.Environment.Server),outputPath:`/${In.Environment.Server}`}),s.bundle({...l,config:a(In.Environment.Client),outputPath:`/${In.Environment.Client}`})]);e?.debugBundler&&(d.debug(o.toTree()),d.debug(`Server Bundler Stats: ${c.toString(Yy)}`),d.debug(`Client Bundler Stats: ${u.toString(Yy)}`));let p=gy(o);d.debug("Packaging server bundle...");let f=await yy(c.toJson().assets||[],o,p);d.debug("Packaging client bundle...");let m=await by(u.toJson().assets||[],o,p),h=k=>T=>[T,k];return{outputFiles:[...f.map(h(In.Environment.Server)),...m.map(h(In.Environment.Client))],outputVolume:o}}function NS({env:e,mode:t="production",framework:n,publicPath:r,components:o,entryPaths:i,libraryName:s,outputPath:a,bundler:l="webpack"}){if(!Ky(n))throw new Error(`Unknown framework: ${n}`);let c=Object.entries({[yo]:i[e],...o}).reduce((h,[v,k])=>({...h,[`./${v}`]:`./${(0,Xy.relative)(process.cwd(),k)}`}),{}),u=Or(l),p=u.generateBaseConfig({entry:i[e],env:e,mode:t,libraryName:s,publicPath:r,outputPath:a}),f=u.getFrameworkConfig(n,e),m=u.generateFederationConfig({exposes:c,env:e,libraryName:s});return(0,Qy.default)(p,f,m)}var rw=w(require("path")),ou=require("memfs/lib/volume"),iu=w(require("webpack-merge")),ow=w(require("webpack-node-externals")),Ke=require("@webflow/data-types");var LS=w(require("fs")),Pr=require("path"),Ir=require("webpack");function MS(e,t=LS){let n=(0,Pr.join)(process.cwd(),"node_modules",e);for(;n!==(0,Pr.dirname)(n)&&n!=="node_modules";){let r=(0,Pr.join)(n,"package.json");if(t.existsSync(r))try{let{name:o,version:i}=JSON.parse(t.readFileSync(r,"utf8"));return`${o}@${i}`}catch{return null}n=(0,Pr.dirname)(n)}return null}var Is=class{apply(t){t.hooks.compilation.tap("ProcessSourceMapsPlugin",function(n){n.hooks.processAssets.tap({name:"ProcessSourceMapsPlugin",stage:Ir.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE},function(){try{let r=n.getAssets(),o={};Object.values(r).forEach(({name:i,source:s})=>{if(!i.endsWith(".map"))return;let[a,l,c]=i.split("."),u=o[a]?.sources??{},p=o[a]?.dependencies??new Set;JSON.parse(s.source().toString()).sources.forEach(m=>{if(m.startsWith("external")){let h=m.match(/^external \S+ "(.+)"$/)?.[1];if(!h)throw new Error(`Could not extract package name from ${m}`);let v=MS(h,n.inputFileSystem);if(!v)throw new Error(`Could not find package information for ${h}`);v&&p.add(v)}}),o[a]={sources:{...u,[`./${a}.${c}`]:l},dependencies:p},n.deleteAsset(i)}),Object.entries(o).forEach(([i,{sources:s,dependencies:a}])=>{n.emitAsset(`${i}.js.map`,new Ir.sources.RawSource(JSON.stringify({sources:s,dependencies:[...a]})))})}catch(r){n.errors.push(new Ir.WebpackError(`[ProcessSourceMapsPlugin] Could not process source maps: ${r instanceof Error?r.stack:String(r)}`))}})})}};var tw=w(require("module")),nw=require("jsdom"),ru="__webflowCliImportModuleWindow__";function WS(e){let n=/^(?:\ufeff?\s*)(?:'use strict'|"use strict");?\s*(?:\r?\n|\r)?/.exec(e),r=!!n,o=`module[${JSON.stringify(ru)}]`,i=[];r||i.push('"use strict";'),i.push(`var __wfW = ${o};`,'if (__wfW == null) { throw new ReferenceError("Webflow CLI internal: missing JSDOM window on module"); }',"var window = __wfW;","var document = __wfW.document;","var navigator = __wfW.navigator;","var HTMLElement = __wfW.HTMLElement;","var localStorage = __wfW.localStorage;","var sessionStorage = __wfW.sessionStorage;","var requestAnimationFrame = __wfW.requestAnimationFrame.bind(__wfW);","var cancelAnimationFrame = __wfW.cancelAnimationFrame.bind(__wfW);","var getComputedStyle = __wfW.getComputedStyle.bind(__wfW);","var performance = __wfW.performance;","");let s=i.join(`
|
|
47
|
+
export default { ${[i,s,a].filter(Boolean).join(", ")} };`}function Ed(e,t,r){let n={},o=`${et}/Client.js`,i=`${et}/Server.js`;n[o]=vd([{name:"ClientRenderer",path:e.client,exportKey:"Renderer",type:"internal"}],Gn.Environment.Client);let s={},a=l=>{let d=Kh(l);return s[d]?(s[d]+=1,`${d}${s[d]}`):(s[d]=1,d)};n[i]=vd([{name:"ServerRenderer",path:e.server,exportKey:"Renderer",type:"internal"},...Object.entries(t).filter(([l])=>r[l]?.ssr??!0).map(([l,d])=>{let f=a(l),m=d.startsWith(et)?d.replace(`${et}/`,"./"):d;return{name:f,path:m,exportKey:l,isDefaultExport:!0,type:"component"}})],Gn.Environment.Server);let c={[Gn.Environment.Client]:o,[Gn.Environment.Server]:i};return{entryPointsVolume:Fd.Volume.fromJSON(n),paths:c}}var pf=require("memfs/lib/volume");var Sd=h(require("archiver")),Wr=require("path");ee();var zn=require("@webflow/data-types");ee();j();var Ot=e=>e.endsWith("/")||/%2F$/i.test(e)?e:`${e}/`;var xd=2;function Cd(e){let t={type:zn.ModuleLoader.FEDERATION,version:xd,entry:Is,renderer:An,components:e};return{title:Tn,content:JSON.stringify(t)}}function _d(e){let t={type:zn.ModuleLoader.SSR,version:xd,entry:jr,components:e};return{title:Tn,content:JSON.stringify(t)}}function kd(e){let t=`/${zn.Environment.Client}/${Is}`;try{if(e.existsSync(t)){let r=e.readFileSync(t,"utf8"),n=JSON.parse(r.toString()),o="publicPath"in n.metaData?n.metaData.publicPath:null;if(!o)throw new Error("Public path not found in module federation manifest");return n.exposes.reduce((i,s)=>{let a=s.name;return a===An||(i[a]={css:[]},s.assets.css.sync.forEach(c=>{i[a].css.push(`${Ot(o)}${c}`)})),i},{})}}catch(r){u.error(r,{prefix:"Failed to extract components metadata from MF manifest:"})}return{}}var ti=require("@webflow/data-types"),Zh=/\.css$/i;async function Td(e,t,r){let n=!1;return new Promise(async(o,i)=>{e.length===0&&i(new Error("No assets to bundle"));let s=`/${ti.Environment.Server}/${On}`,a=(0,Sd.default)("tar",{gzip:!1}),c=t.createWriteStream(s);a.on("error",f=>(n=!0,i(f))),c.on("close",()=>{if(!n)try{let f={type:"asset",name:On,info:{},size:a.pointer(),emitted:!0,comparedForEmit:!1,cached:!1};return e.forEach(m=>{let g=(0,Wr.resolve)((0,Wr.join)(`/${ti.Environment.Server}`,m.name));t.existsSync(g)&&t.rmSync(g)}),o([f])}catch(f){return i(f)}finally{n=!0}}),a.pipe(c);let{title:l,content:d}=_d(r);a.append(d,{name:l}),e.forEach(f=>{if(!Zh.test(f.name))try{let m=(0,Wr.resolve)((0,Wr.join)(`/${ti.Environment.Server}`,f.name)),g=t.readFileSync(m,"utf8");a.append(g,{name:f.name})}catch(m){return n=!0,i(m)}}),await a.finalize()})}var Ad=require("@webflow/data-types");async function Od(e,t,r){let{title:n,content:o}=Cd(r);await t.promises.writeFile(`/${Ad.Environment.Client}/${n}`,o);let i={type:"asset",name:n,info:{},size:o.length,emitted:!0,comparedForEmit:!1,cached:!1};return e.filter(s=>s.name!=="mf-stats.json").concat([i])}var nf=require("@rspack/core"),of=h(require("fork-ts-checker-webpack-plugin")),sf=require("ts-checker-rspack-plugin"),af=h(require("mini-css-extract-plugin")),cf=require("@webflow/data-types");var Pd=require("webpack"),Sa=h(require("mini-css-extract-plugin")),$d=h(require("tsconfig-paths-webpack-plugin")),Rd=require("tsconfig-paths"),Ta=require("@webflow/data-types"),jd=require("path");ee();var Id=h(require("postcss-selector-parser")),ka=()=>({postcssPlugin:"CSSinShadowDOM",Once(e){e.walkRules(t=>{t.selector=(0,Id.default)(r=>{r.walkPseudos(n=>{n.value===":root"&&(n.value=":host")})}).processSync(t.selector)})}});ka.postcss=!0;ka.postcssPlugin="CSSinShadowDOM";var ri=ka;function Yh(){return(0,Rd.loadConfig)(process.cwd()).resultType==="success"}function Bd({entry:e,env:t,mode:r="production",publicPath:n,libraryName:o,outputPath:i}){let s={mode:r,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:Sa.default.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[ri]}}}]},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new Sa.default({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:{plugins:[Yh()?new $d.default:null].filter(Boolean)},performance:{hints:!1}};if(t===Ta.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,jd.join)(process.cwd(),i,t):"/",publicPath:n,clean:!0,uniqueName:o},target:"web"};if(t===Ta.Environment.Server)return{...s,plugins:[...s.plugins||[],new Pd.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:jr,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var Nd=require("@module-federation/enhanced"),Aa=require("@webflow/data-types");function Md({libraryName:e,env:t,exposes:r}){if(t===Aa.Environment.Client)return{plugins:[new Nd.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:r,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===Aa.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}function Ld(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,use:[{ident:"babel-loader",loader:require.resolve("babel-loader"),options:{presets:[require.resolve("@babel/preset-env"),[require.resolve("@babel/preset-react"),{runtime:"automatic"}],require.resolve("@babel/preset-typescript")]}}]}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}function ni(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,loader:"builtin:swc-loader",options:{jsc:{parser:{syntax:"typescript",tsx:!0},transform:{react:{runtime:"automatic",development:!1,refresh:!1}}}}}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}var oi=require("@rspack/core"),Wd=require("tsconfig-paths"),Oa=require("@webflow/data-types"),Ud=require("path");ee();function Xh(){let e=(0,Wd.loadConfig)(process.cwd());if(e.resultType==="success")return e.configFileAbsolutePath}function Vd({entry:e,env:t,mode:r="production",publicPath:n,libraryName:o,outputPath:i}){let s={mode:r,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:oi.rspack.CssExtractRspackPlugin.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[ri]}}}],type:"javascript/auto"},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new oi.rspack.CssExtractRspackPlugin({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:(()=>{let a=Xh();return a?{tsConfig:{configFile:a}}:{}})(),performance:{hints:!1}};if(t===Oa.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,Ud.join)(process.cwd(),i,t):"/",publicPath:n,clean:!0,uniqueName:o},target:"web"};if(t===Oa.Environment.Server)return{...s,plugins:[...Array.isArray(s.plugins)?s.plugins:[],new oi.rspack.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:jr,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var Jd=require("@module-federation/enhanced/rspack"),Ia=require("@webflow/data-types");function Gd({libraryName:e,env:t,exposes:r}){if(t===Ia.Environment.Client)return{plugins:[new Jd.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:r,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===Ia.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}var ey=h(require("fs")),zd=require("unionfs"),qd=require("webpack");function Qh(e){return{name:e.name,size:e.size,emitted:e.emitted,info:e.info}}function ii(e){let t=e.toJson();return{hasErrors:()=>e.hasErrors(),hasWarnings:()=>e.hasWarnings(),toString:r=>e.toString(r),toJson:()=>({...t,assets:(t.assets??[]).map(Qh)})}}async function Hd({config:e,sourceVolumes:t=[],outputVolume:r,outputPath:n,failOnWarnings:o=!0}){let i=t.reduce((s,a)=>(s.use(a),s),new zd.Union().use(ey));return new Promise((s,a)=>{let c=(0,qd.webpack)(e);c.inputFileSystem=i,r&&(c.outputFileSystem=r),n&&(c.outputPath=n),c.run((l,d)=>{c.close(f=>{l||f?a(l||f):d?d.hasErrors()||o&&d.hasWarnings()?a(new Error(d.toString("errors-warnings"))):s(ii(d)):a(new Error("Webpack stats are undefined"))})})})}var ty=h(require("fs")),Pa=h(require("webpack-merge")),Kd=require("memfs"),Zd=require("unionfs"),Yd=require("@rspack/core");async function si({config:e,sourceVolumes:t=[],outputVolume:r,outputPath:n,failOnWarnings:o=!0}){let i=t.reduce((a,c)=>(a.use(c),a),new Zd.Union().use(ty)),s=e;return t.length>0&&(s=(0,Pa.default)(s,{experiments:{...e.experiments,useInputFileSystem:[/./]}})),r&&(s=(0,Pa.default)(s,{output:{clean:!1,...n&&{path:n}}})),new Promise((a,c)=>{let l=(0,Yd.rspack)(s);l.inputFileSystem=i,r&&(l.outputFileSystem=(0,Kd.createFsFromVolume)(r)),n&&(l.outputPath=n),l.run((d,f)=>{l.close(m=>{d||m?c(d||m):f?f.hasErrors()||o&&f.hasWarnings()?c(new Error(f.toString("errors-warnings"))):a(ii(f)):c(new Error("Rspack stats are undefined"))})})})}var Qd=require("@module-federation/enhanced");var Ur=h(require("webpack-merge"));j();function It(e){return e!==null&&typeof e=="object"&&"constructor"in e?e.constructor.name??"":""}function Xd(e,t){let r=Object.entries(e).filter(([n])=>!t.includes(n));return Object.fromEntries(r)}function ci(e){let{deduplicatePluginNames:t,ModuleFederationPluginClass:r,getPluginOptions:n,filterOverridePlugins:o}=e;return function(s,a,c){let l=["entry","output","target"],d=ry(s),f=Array.isArray(c)?ai(...c.map(d)):ai(d(c));Object.keys(f).some(O=>l.includes(O))&&u.warn(`Cannot override blocked properties: ${l.join(", ")}`);let g={...Xd(f,[...l,"ModuleFederationPlugin","module","plugins"]),module:Xd(f.module??{},["rules"])},w=(0,Ur.default)(a,g),x=f.plugins??[];o&&(x=x.filter(o));let k=a.plugins??[],z=(0,Ur.mergeWithCustomize)({customizeArray:(0,Ur.unique)("plugins",t,O=>It(O))})({plugins:x},{plugins:k}).plugins,E=f?.ModuleFederationPlugin?.shared,P=z?.map(O=>{if(It(O)==="ModuleFederationPlugin"){let S=n(O);return new r({...S,...E?{shared:E}:{}})}return O});w.plugins=P;let Z=f.module?.rules;if(Z&&typeof Z=="function"){let O=a.module?.rules??[];w.module={...w.module??{},rules:Z(O)}}return w}}function ai(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={};for(let r of e){let{module:n,ModuleFederationPlugin:o,plugins:i,...s}=r;if(t={...t,...s},n){let{rules:a,...c}=n;if(t.module={...t.module,...c},a){let l=t.module?.rules;l?t.module.rules=d=>{let f=l(d);return a(f)}:t.module.rules=a}}o?.shared&&(t.ModuleFederationPlugin={shared:{...t.ModuleFederationPlugin?.shared,...o.shared}}),i&&(t.plugins=[...t.plugins??[],...i])}return t}function ry(e){return t=>typeof t=="function"?t(e):t}var ny=ci({deduplicatePluginNames:["ModuleFederationPlugin","MiniCssExtractPlugin"],ModuleFederationPluginClass:Qd.ModuleFederationPlugin,getPluginOptions:e=>e._options??{}});function ef(e,t,r){return ny(e,t,r)}var tf=require("@module-federation/enhanced/rspack");var oy=ci({deduplicatePluginNames:["ModuleFederationPlugin","CssExtractRspackPlugin"],ModuleFederationPluginClass:tf.ModuleFederationPlugin,getPluginOptions:e=>e._options??{},filterOverridePlugins:e=>It(e)!=="MiniCssExtractPlugin"});function rf(e,t,r){return oy(e,t,r)}var $a={[cf.Framework.React]:{generateWebpackBundlerConfig:Ld,generateRspackBundlerConfig:ni}},iy={webpack:{generateBaseConfig:Bd,getFrameworkConfig:(e,t)=>$a[e].generateWebpackBundlerConfig(t),generateFederationConfig:Md,mergeConfigs:(e,t,r)=>ef(e,t,r),bundle:e=>Hd({...e,config:e.config}),typeCheckerPlugin:of.default,hashFunction:"md5",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>It(t)==="MiniCssExtractPlugin"?new af.default({filename:"[name].[contenthash].css"}):t)})},rspack:{generateBaseConfig:Vd,getFrameworkConfig:(e,t)=>$a[e].generateRspackBundlerConfig(t),generateFederationConfig:Gd,mergeConfigs:(e,t,r)=>rf(e,t,r),bundle:e=>si({...e,config:e.config}),typeCheckerPlugin:sf.TsCheckerRspackPlugin,hashFunction:"md4",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>It(t)==="CssExtractRspackPlugin"?new nf.CssExtractRspackPlugin({filename:"[name].[contenthash].css"}):t)})}},Vr=e=>iy[e],lf=e=>!!$a[e];var uf={colors:!0,chunks:!1,modules:!1,chunkModules:!1,reasons:!1,errorDetails:!1,assetsSpace:1/0,warnings:!1,assets:!0,entrypoints:!0,performance:!0};async function li(e){let t=e.bundler??"webpack";u.debug("Generating entry points...");let{entryPointsVolume:r,paths:n}=Ed(e.renderer,e.componentsFiles,e.componentsOptions),o=pf.Volume.fromJSON({"/Server":null,"/Client":null});u.debug("Generating bundling config...");let i=e.overrideConfig??{};Object.keys(i).length&&u.debug("Found bundle config overrides. Merging...");let s=Vr(t),a=k=>{let X=sy({env:k,mode:e.dev?"development":"production",framework:e.framework,publicPath:e.publicPath,components:e.componentsFiles,entryPaths:n,libraryName:e.libraryIdentifier,bundler:t}),z=s.mergeConfigs(k,X,i);return e?.debugBundler&&(u.info(`${t} config for env ${k}:`),u.dir(z)),z},c={sourceVolumes:[...e.sourceVolumes,r],outputVolume:o,failOnWarnings:e.failOnWarnings},[l,d]=await Promise.all([s.bundle({...c,config:a(tr.Environment.Server),outputPath:`/${tr.Environment.Server}`}),s.bundle({...c,config:a(tr.Environment.Client),outputPath:`/${tr.Environment.Client}`})]);e?.debugBundler&&(u.debug(o.toTree()),u.debug(`Server Bundler Stats: ${l.toString(uf)}`),u.debug(`Client Bundler Stats: ${d.toString(uf)}`));let f=kd(o);u.debug("Packaging server bundle...");let m=await Td(l.toJson().assets||[],o,f);u.debug("Packaging client bundle...");let g=await Od(d.toJson().assets||[],o,f),w=k=>X=>[X,k];return{outputFiles:[...m.map(w(tr.Environment.Server)),...g.map(w(tr.Environment.Client))],outputVolume:o}}function sy({env:e,mode:t="production",framework:r,publicPath:n,components:o,entryPaths:i,libraryName:s,outputPath:a,bundler:c="webpack"}){if(!lf(r))throw new Error(`Unknown framework: ${r}`);let l=Object.entries({[An]:i[e],...o}).reduce((w,[x,k])=>({...w,[`./${x}`]:`./${(0,df.relative)(process.cwd(),k)}`}),{}),d=Vr(c),f=d.generateBaseConfig({entry:i[e],env:e,mode:t,libraryName:s,publicPath:n,outputPath:a}),m=d.getFrameworkConfig(r,e),g=d.generateFederationConfig({exposes:l,env:e,libraryName:s});return(0,ff.default)(f,m,g)}var hf=h(require("path")),ja=require("memfs/lib/volume"),Ba=h(require("webpack-merge")),yf=h(require("webpack-node-externals")),Re=require("@webflow/data-types");var ay=h(require("fs")),Jr=require("path"),Gr=require("webpack");function cy(e,t=ay){let r=(0,Jr.join)(process.cwd(),"node_modules",e);for(;r!==(0,Jr.dirname)(r)&&r!=="node_modules";){let n=(0,Jr.join)(r,"package.json");if(t.existsSync(n))try{let{name:o,version:i}=JSON.parse(t.readFileSync(n,"utf8"));return`${o}@${i}`}catch{return null}r=(0,Jr.dirname)(r)}return null}var ui=class{apply(t){t.hooks.compilation.tap("ProcessSourceMapsPlugin",function(r){r.hooks.processAssets.tap({name:"ProcessSourceMapsPlugin",stage:Gr.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE},function(){try{let n=r.getAssets(),o={};Object.values(n).forEach(({name:i,source:s})=>{if(!i.endsWith(".map"))return;let[a,c,l]=i.split("."),d=o[a]?.sources??{},f=o[a]?.dependencies??new Set;JSON.parse(s.source().toString()).sources.forEach(g=>{if(g.startsWith("external")){let w=g.match(/^external \S+ "(.+)"$/)?.[1];if(!w)throw new Error(`Could not extract package name from ${g}`);let x=cy(w,r.inputFileSystem);if(!x)throw new Error(`Could not find package information for ${w}`);x&&f.add(x)}}),o[a]={sources:{...d,[`./${a}.${l}`]:c},dependencies:f},r.deleteAsset(i)}),Object.entries(o).forEach(([i,{sources:s,dependencies:a}])=>{r.emitAsset(`${i}.js.map`,new Gr.sources.RawSource(JSON.stringify({sources:s,dependencies:[...a]})))})}catch(n){r.errors.push(new Gr.WebpackError(`[ProcessSourceMapsPlugin] Could not process source maps: ${n instanceof Error?n.stack:String(n)}`))}})})}};var mf=h(require("module")),gf=require("jsdom"),Ra="__webflowCliImportModuleWindow__";function ly(e){let r=/^(?:\ufeff?\s*)(?:'use strict'|"use strict");?\s*(?:\r?\n|\r)?/.exec(e),n=!!r,o=`module[${JSON.stringify(Ra)}]`,i=[];n||i.push('"use strict";'),i.push(`var __wfW = ${o};`,'if (__wfW == null) { throw new ReferenceError("Webflow CLI internal: missing JSDOM window on module"); }',"var window = __wfW;","var document = __wfW.document;","var navigator = __wfW.navigator;","var HTMLElement = __wfW.HTMLElement;","var localStorage = __wfW.localStorage;","var sessionStorage = __wfW.sessionStorage;","var requestAnimationFrame = __wfW.requestAnimationFrame.bind(__wfW);","var cancelAnimationFrame = __wfW.cancelAnimationFrame.bind(__wfW);","var getComputedStyle = __wfW.getComputedStyle.bind(__wfW);","var performance = __wfW.performance;","");let s=i.join(`
|
|
79
48
|
`)+`
|
|
80
|
-
`;return
|
|
81
|
-
`)}function
|
|
82
|
-
`)}async function
|
|
83
|
-
${
|
|
49
|
+
`;return r?e.slice(0,r[0].length)+s+e.slice(r[0].length):s+e}function qn(e,t){let r=e.readFileSync(t,"utf-8"),o=new gf.JSDOM("<!DOCTYPE html><html><body></body></html>",{url:"http://localhost/",pretendToBeVisual:!0}).window,i=ly(r),s=new mf.default(t,module);Object.defineProperty(s,Ra,{value:o,enumerable:!1,configurable:!0,writable:!1});try{return s._compile(i,t),s}finally{Reflect.deleteProperty(s,Ra),o.close()}}function uy(e,t){let r=`/${t}.js`,n=qn(e,r),o=n.exports.default||n.exports;if(o&&typeof o=="object")try{let{name:i,description:s,group:a,props:c,options:l}=(0,Re.parseComponentData)(o);return{displayName:i,description:s,group:a,props:Object.entries(c||{}).map(([d,f])=>({...f,name:d,defaultValue:typeof f.defaultValue!="string"?JSON.stringify(f.defaultValue):f.defaultValue,settings:f.settings!==void 0?JSON.stringify(f.settings):f.settings})),options:l}}catch(i){let s=i instanceof Error?i.stack:String(i);throw new Error(`Error parsing component data for '${t}': ${s}`)}throw new Error(`Could not get declaration for '${t}'`)}async function dy({declarations:e,sources:t,overrideConfig:r={},performTypeCheck:n,bundler:o="webpack"}){let i=new ja.Volume,s=Vr(o),a=(0,Ba.default)(s.generateBaseConfig({entry:e,env:Re.Environment.Client,publicPath:"/",libraryName:"metadata"}),s.getFrameworkConfig(Re.Framework.React,Re.Environment.Client),{entry:e,mode:"development",output:{path:"/",library:{type:"commonjs2"}},target:"node",plugins:n?[new s.typeCheckerPlugin]:[]}),c=s.mergeConfigs(Re.Environment.Client,a,r);return await s.bundle({outputPath:"/",config:c,sourceVolumes:t?[t]:[],outputVolume:i,failOnWarnings:!1}),i}async function fy({declarations:e,sources:t,overrideConfig:r={},bundler:n}){let o=new ja.Volume,i=Vr(n),s=(0,Ba.default)(i.generateBaseConfig({entry:e,env:Re.Environment.Client,publicPath:"/",libraryName:"source-maps"}),i.getFrameworkConfig(Re.Framework.React,Re.Environment.Client),{entry:e,mode:"production",optimization:{mangleExports:"deterministic",moduleIds:"deterministic",chunkIds:"deterministic"},output:{filename:"[name].[contenthash].js",path:"/",library:{type:"commonjs2"},devtoolModuleFilenameTemplate:"[resource-path]",hashFunction:i.hashFunction},externalsPresets:{node:!0},devtool:"source-map",plugins:[new ui],externals:[(0,yf.default)()]}),a=i.mergeConfigs(Re.Environment.Client,s,r);return a=i.replaceCssPlugin(a),await i.bundle({outputPath:"/",config:a,sourceVolumes:t?[t]:[],outputVolume:o,failOnWarnings:!1}),o}function py(e){return Object.entries(e.toJSON()).reduce((t,[r,n])=>{if(r.endsWith(".map")&&n?.length){let o=hf.default.basename(r).split(".")[0];t[o]=n}return t},{})}async function di({declarations:e,sources:t,overrideConfig:r,performTypeCheck:n=!1,skipSourceMaps:o=!1,bundler:i="webpack"}){let[s,a]=await Promise.all([dy({declarations:e,sources:t,overrideConfig:r,performTypeCheck:n,bundler:i}),o||i==="rspack"?Promise.resolve(null):fy({declarations:e,sources:t,overrideConfig:r,bundler:i})]),{metadata:c,options:l}=Object.keys(e).reduce((f,m)=>{let g=uy(s,m);return f.metadata[m]=g,f.options[m]=g.options||{},f},{metadata:{},options:{}});return{sourceMaps:a?py(a):{},metadata:c,options:l}}function wf(e,{framework:t,sourceMaps:r}){return Object.fromEntries(Object.keys(e).map(n=>[n,{...e[n],id:n,framework:t,exportPath:"default",hash:r[n]}]))}Se();var bf=h(require("md5"));he();De();var vf=" - ";function my(e){return e==="added"?` ${D.green("(Added)")}`:e==="removed"?` ${D.yellow("(Removed)")}`:e==="changed"?` ${D.blue("(Changed)")}`:""}function Df(e){if(!e)return"";let t=JSON.parse(e);return(0,bf.default)(JSON.stringify([...Object.values(t.sources),...t.dependencies.filter(r=>!r.includes("@webflow/data-types")&&!r.includes("@webflow/react"))].sort()))}function gy({componentsMetadata:e,latestVersion:t,sourceMaps:r}){let n=t.resource.codeLibraryResource.manifest.components.reduce((s,a)=>(s[a.id]=a,s),{}),o={};return Object.entries(n).forEach(([s,a])=>{if(!e[s])o[s]={component:a,status:"removed"};else{let c=e[s],l=Df(r[s]),d=a.displayName&&c.displayName!==a.displayName,f=l&&a.hash&&l!==Df(a.hash),m=d||f;o[s]={component:c,status:m?"changed":"unchanged",previousName:d?a.displayName:void 0}}}),Object.entries(e).forEach(([s,a])=>{n[s]||(o[s]={component:a,status:"added"})}),Object.values(o).map(({component:s,status:a,previousName:c})=>{let l=s.displayName,d=c?`${c} \u2192 ${l}`:l;return`${vf}${d}${my(a)}`}).sort().join(`
|
|
50
|
+
`)}function hy({componentsMetadata:e}){return Object.values(e).map(r=>`${vf}${r.displayName}`).sort().join(`
|
|
51
|
+
`)}async function Ff({libraryConfig:e,componentsMetadata:t,existingCodeLibraries:r,sourceMaps:n,workspaceInfo:o}){if(Y())return Promise.resolve(!0);let i=e.id?r.find(({profile:f})=>f.slug===e.id):null,s=i&&i.profile.status==="ACTIVE",a="Code components:",c=s?gy({componentsMetadata:t,latestVersion:i,sourceMaps:n}):hy({componentsMetadata:t}),l=s?`Ready to update ${e.name} on ${o.name}?`:`Ready to share ${e.name} with ${o.name}?`;return await ye({message:`${a}
|
|
52
|
+
${c}
|
|
84
53
|
|
|
85
|
-
${
|
|
54
|
+
${l}`})}var fi=require("path"),Cf=require("memfs/lib/volume");var Ef=h(require("fast-glob")),yy=e=>{let t=e.split("/");return t[t.length-1]},wy=e=>yy(e).split(".")[0];async function xf(e,t){return(await Ef.default.glob(e,{absolute:!0,...t||{}})).reduce((n,o)=>{let i=wy(o);if(n[i])throw new Error(`Duplicate component '${i}' found. Already declared at ${n[i]}, but also found at ${o}.`);return{...n,[i]:o}},{})}async function pi(e){let t=await xf(e.components,{cwd:(0,fi.dirname)(e.manifestPath),ignore:["**/dist/**","**/node_modules/**",e.globals,e.bundleConfig].filter(o=>o!=null)});if(!Object.keys(t).length)throw new Error("No declaration files found");let{componentsFiles:r,componentsVolume:n}=Dy(t,e.renderer.client,e.globals);return{componentsFiles:r,componentsVolume:n}}function Dy(e,t,r){let n={},o={};return Object.entries(e).forEach(([i,s])=>{let a=(0,fi.extname)(s),c=`${et}/${bd}/${i}${a}`;n[i]=c,o[c]=by(t,s,r)}),{componentsFiles:n,componentsVolume:Cf.Volume.fromJSON(o)}}function by(e,t,r){return r?`
|
|
86
55
|
import { applyDecorators } from "${e}";
|
|
87
56
|
import componentDefinition from "${t}";
|
|
88
|
-
const globals = require("${
|
|
57
|
+
const globals = require("${r}") || {};
|
|
89
58
|
|
|
90
59
|
const globalDecorators = globals?.decorators || [];
|
|
91
60
|
const decoratedDefinition = {
|
|
@@ -104,44 +73,44 @@ export default decoratedDefinition;
|
|
|
104
73
|
`.trim():`
|
|
105
74
|
import componentDefinition from "${t}";
|
|
106
75
|
export default {...componentDefinition};
|
|
107
|
-
`.trim()}
|
|
108
|
-
Resolved path: ${
|
|
109
|
-
Please ensure the file exists or remove the 'globals' field from your manifest.`);t.globals=
|
|
110
|
-
Resolved path: ${
|
|
111
|
-
Please ensure the file exists or remove the 'bundleConfig' field from your manifest.`);t.bundleConfig=
|
|
112
|
-
export * from "${n}";
|
|
113
|
-
`,[yw]:`
|
|
76
|
+
`.trim()}Te();Ho();var _f=require("@webflow/data-types"),mi={renderer:{client:"@webflow/react",server:"@webflow/react"},components:["**/*.webflow.@(js|jsx|mjs|ts|tsx)"],framework:_f.Framework.React};var zr=require("path"),qr=require("fs");he();Se();j();de();function pt(e){return e.replace(/\\/g,"/")}De();q();function kf(e){let t={...e};if(e.globals){let r=(0,zr.resolve)(process.cwd(),e.globals);if(!(0,qr.existsSync)(r))throw new Error(`Globals file not found: ${e.globals}
|
|
77
|
+
Resolved path: ${r}
|
|
78
|
+
Please ensure the file exists or remove the 'globals' field from your manifest.`);t.globals=pt(r)}if(e.bundleConfig){let r=(0,zr.resolve)(process.cwd(),e.bundleConfig);if(!(0,qr.existsSync)(r))throw new Error(`Bundle config file not found: ${e.bundleConfig}
|
|
79
|
+
Resolved path: ${r}
|
|
80
|
+
Please ensure the file exists or remove the 'bundleConfig' field from your manifest.`);t.bundleConfig=pt(r)}if(typeof e.renderer=="string"){let r=(0,zr.resolve)(process.cwd(),e.renderer);(0,qr.existsSync)(r)&&(t.renderer=pt(r))}else if(typeof e.renderer=="object"&&typeof t.renderer=="object"){if(typeof e.renderer.client=="string"){let r=(0,zr.resolve)(process.cwd(),e.renderer.client);(0,qr.existsSync)(r)&&(t.renderer={...t.renderer,client:pt(r)})}if(typeof e.renderer.server=="string"){let r=(0,zr.resolve)(process.cwd(),e.renderer.server);(0,qr.existsSync)(r)&&(t.renderer={...t.renderer,server:pt(r)})}}return t}async function vy({initialData:e}){let t=await we({message:"Enter a name for your code library",validate:o=>o.trim()===""?"The library name cannot be empty.":!0,default:e?.name});if(t==null)throw new p("When --no-input mode is enabled please provide a name in your library manifest");let r=await we({message:"Enter a description for your code library",default:e?.description??""});if(!await ye({message:"Is the code (including 3rd party packages) you are uploading to Webflow trusted and secure?"}))throw new Error("Code library is not trusted and secure");return{name:t,description:r}}async function Fy({existingCodeLibraries:e}){let t={name:"[Create new code library]",value:null},n=[...e].sort((i,s)=>{let a=i.resource.codeLibraryResource.manifest.name??"",c=s.resource.codeLibraryResource.manifest.name??"",l=a.localeCompare(c,void 0,{sensitivity:"base"});return l!==0?l:i.profile.slug.localeCompare(s.profile.slug,void 0,{sensitivity:"base"})}).map(({resource:i,profile:s})=>{let a=`${i.codeLibraryResource.manifest.name} (${s.slug})`;s.status==="ARCHIVED"&&(a+=` ${D.yellow("(Unshared)")}`);let c={id:s.slug,name:i.codeLibraryResource.manifest.name,description:i.codeLibraryResource.manifest.description};return{name:a,value:c}});return await Ao({message:"Select an existing code library (or create new):",source:i=>{if(!i)return[t,...n];let s=i.toLowerCase(),a=n.filter(c=>{let l=c.value?.id??"",d=c.value?.name??"",f=c.value?.description??"";return l.toLowerCase().includes(s)||d.toLowerCase().includes(s)||f.toLowerCase().includes(s)});return[t,...a]},pageSize:15})}async function Na({initialData:e,existingCodeLibraries:t}){let r,n={components:mi.components},o=t.length>0?await Fy({existingCodeLibraries:t}):null;if(o)r={...n,...o,...e,id:o.id};else{let a=await vy({initialData:e});r={...n,...e,...a}}let i=kf(r);Q({library:i});let{path:s}=Ht();return{libraryManifest:i,manifestPath:s}}async function Sf({existingCodeLibraries:e}){let t=u.spinner("Looking for webflow.json manifest");try{let{manifest:r,manifestPath:n}=J(),o=_n(r,"library");if(!o.id){if(Ke())return t.succeed(),Na({initialData:o,existingCodeLibraries:e});throw new Error("Library manifest does not have an id")}let i=o.name??e.find(({profile:a})=>a.slug===o.id)?.resource.codeLibraryResource.manifest.name;if(!i&&Ke())return t.succeed(),Na({initialData:o,existingCodeLibraries:e});i||(i=o.id),t.succeed();let s=kf({...o,name:i});return Promise.resolve({libraryManifest:s,manifestPath:n})}catch(r){if(r instanceof qt&&Ke())return t.info(r.message),Na({existingCodeLibraries:e});throw t.fail(),r}}var Ma=require("memfs/lib/volume"),Of=h(require("webpack-merge"));var If="/client-renderer.js",Pf="/server-renderer.js",Tf=`${et}/test-renderers${If}`,Af=`${et}/test-renderers${Pf}`,Ey=new Set(["@webflow/react"]),xy=new Set(["@webflow/react","@webflow/emotion-utils/server","@webflow/styled-components-utils/server"]);async function $f(e){if(!e.client||!e.server)throw new Error("Invalid renderer configuration. Both client and server renderers must be specified.");if(Ey.has(e.client)&&xy.has(e.server))return;let t=await ky(e);Cy(e.client,t),_y(e.server,t)}function Cy(e,t){let r=qn(t,If);if(typeof r.exports.ClientRenderer!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'ClientRenderer' export.`);if(typeof r.exports.applyDecorators!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'applyDecorators' export.`);let n=()=>null,o=r.exports.ClientRenderer(n),i=["mount","hydrate","render","createSlot"];for(let s of i)if(typeof o[s]!="function")throw new Error(`Invalid client renderer: ${e} ClientRenderer must return an object with a '${s}' function.`)}function _y(e,t){let r=qn(t,Pf);if(typeof r.exports.ServerRenderer!="function")throw new Error(`Invalid server renderer: ${e} does not have a valid 'ServerRenderer' export.`);let n=()=>null,o=r.exports.ServerRenderer(n),i=["renderToStream","renderToString","createSlot"];for(let s of i)if(typeof o[s]!="function")throw new Error(`Invalid server renderer: ${e} ServerRenderer must return an object with a '${s}' function.`)}async function ky(e){let t=new Ma.Volume,r=pt(e.client),n=pt(e.server),o={[Tf]:`
|
|
114
81
|
export * from "${r}";
|
|
115
|
-
|
|
82
|
+
`,[Af]:`
|
|
83
|
+
export * from "${n}";
|
|
84
|
+
`},i=(0,Of.default)(ni(),{entry:{"client-renderer":Tf,"server-renderer":Af},mode:"development",output:{path:"/",filename:"[name].js",library:{type:"commonjs2"}},target:"node"});return await si({config:i,sourceVolumes:[Ma.Volume.fromJSON(o)],outputVolume:t,failOnWarnings:!1}),t}async function gi({existingCodeLibraries:e}){let{libraryManifest:t,manifestPath:r}=await Sf({existingCodeLibraries:e}),{renderer:n,...o}=mi,i=typeof t.renderer=="string"?{client:t.renderer,server:t.renderer}:{client:t.renderer?.client??n.client,server:t.renderer?.server??n.server};return await $f(i),{...o,...t,renderer:i,manifestPath:r}}q();async function Sy(e,t){let{trackPerformance:r,libraryConfig:n}=e;return await r("collect_metadata",async()=>{let{componentsFiles:o,componentsVolume:i}=await pi(n);u.debug(`Components: ${JSON.stringify(o,null,2)}`);let{sourceMaps:s,metadata:a,options:c}=await di({declarations:o,sources:i,overrideConfig:e.overrideConfig,performTypeCheck:qo(o,t),bundler:t?.bundler});return u.debug(`Metadata: ${JSON.stringify(a,null,2)}`),u.debug(`Source Maps:
|
|
116
85
|
|
|
117
|
-
${Object.entries(s).reduce((
|
|
86
|
+
${Object.entries(s).reduce((l,[d,f])=>(l+=`${d}: ${JSON.stringify(JSON.parse(f),null,2)}
|
|
118
87
|
|
|
119
|
-
`,
|
|
88
|
+
`,l),"")}`),{componentsFiles:o,componentsVolume:i,componentsMetadata:a,componentsOptions:c,sourceMaps:s}})}async function Ty(e,t,r,n,o,i,s){let{trackPerformance:a,libraryConfig:c}=e;return await a("generate_library_bundle",async()=>await li({libraryIdentifier:`_${o}`,renderer:c.renderer,framework:c.framework,publicPath:Ot(i[Hr.Environment.Client]),sourceVolumes:[r],componentsFiles:t,componentsOptions:n,debugBundler:s?.debugBundler,dev:s?.dev,overrideConfig:e.overrideConfig,failOnWarnings:!s?.force,bundler:s?.bundler}))}async function Ay(e,t,r,n){let{trackPerformance:o,apiOptions:i}=e;return await o("upload_files",async()=>{let s=t.map(([c,l])=>{let d=(0,hi.resolve)((0,hi.join)(`/${l}`,`${c.name}`));return Vn(r.readFileSync(d,"utf8").toString(),d,{bundleEnvironment:l})}),{signatures:a}=await Ca({resourceId:n,files:s.map(({meta:c})=>c),options:i});await Promise.all(a.map(async c=>{let l=s.find(d=>d.meta.fileHash===c.hash);if(!l)throw new Error(`File not found: ${c.hash}`);await Jn(l,c.value)}))})}async function Oy(e,t,r,n,o){let{trackPerformance:i,libraryConfig:s,apiOptions:a}=e;return await i("share_library",async()=>{let c={clientModule:{bundleUrl:Ot(o[Hr.Environment.Client])+Tn,loaderType:Hr.ModuleLoader.FEDERATION},serverModule:{bundleUrl:Ot(o[Hr.Environment.Server])+On}},l=wf(t,{framework:s.framework,sourceMaps:r}),{taskId:d}=await _a({resourceId:n,codeModule:c,components:Object.values(l),options:a});u.debug(JSON.stringify({taskId:d},null,2))})}async function La(e){e?.verbose&&(process.env.DEBUG="true");let t,r=Date.now(),n;try{n=await U({apiToken:e?.apiToken})}catch(s){throw u.error(s),s}u.debug("Initializing telemetry service...");let o=N.forCodeLibraries({authToken:n}),i=Jl(o);try{u.debug("Checking dependencies versions..."),new Zt().run();let s={apiToken:n};t=u.spinner("Initializing");let a=await i("get_code_libraries",async()=>await Ea({options:s})),{workspace:c,libraries:l}=a;t.succeed(),u.debug("Parsing library config...");let d=await gi({existingCodeLibraries:l}),f=d.bundleConfig?require(d.bundleConfig):{},m={trackPerformance:i,apiOptions:s,libraryConfig:d,overrideConfig:f};t=u.spinner("Collecting metadata");let{componentsFiles:g,componentsVolume:w,componentsMetadata:x,componentsOptions:k,sourceMaps:X}=await Sy(m,e);if(t.succeed(),!await Ff({libraryConfig:d,componentsMetadata:x,existingCodeLibraries:l,sourceMaps:X,workspaceInfo:c}))return;t=u.spinner("Creating code library");let{resourceId:E,profileSlug:P,workspace:Z,s3Urls:O,cdnUrls:S}=await i("init_code_library",async()=>await xa({name:d.name,slug:d.id,description:d.description,options:s}));t.succeed(),u.debug(JSON.stringify({resourceId:E,profileSlug:P,s3Urls:O,cdnUrls:S},null,2)),await o.sendUsage("library_initialized",{libraryName:d.name,framework:d.framework,resourceId:E,profileSlug:P}),d.id||Q({library:{id:P}}),t=u.spinner("Compiling code components");let{outputFiles:yn,outputVolume:Wi}=await Ty(m,g,w,k,E,S,e);t.succeed(),await o.sendUsage("bundle_generated",{libraryName:d.name,componentCount:Object.keys(g).length,resourceId:E,profileSlug:P}),t=u.spinner("Uploading files"),await Ay(m,yn,Wi,E),t.succeed(),await o.sendUsage("files_uploaded",{libraryName:d.name,fileCount:yn.length,resourceId:E,profileSlug:P}),t=u.spinner("Sharing library"),await Oy(m,x,X,E,S),t.succeed(),u.success(`Code library shared successfully${Z?.slug?`: ${Rr}/dashboard/workspace/${Z?.slug}/shared-libraries-and-templates`:"!"}`);let Ui=Date.now()-r;await o.sendUsage("share_library",{duration:Ui,componentCount:Object.keys(g).length,libraryName:d.name,framework:d.framework,resourceId:E,profileSlug:P})}catch(s){t?.fail();let a=Date.now()-r;throw await o.sendError(s instanceof Error?s:new Error(String(s)),"share_library",{duration:a}),new p(s)}}var yi=h(require("fs")),Kr=require("path");j();Ho();q();var Iy="CodeLibrary",Py="dist",$y="http://localhost/";async function Wa(e){e.verbose&&(process.env.DEBUG="true");let t;try{u.debug("Checking dependencies versions..."),new Zt().run(),u.debug("Looking for manifest...");let r=await gi({existingCodeLibraries:[]}),n=ei(r.name)||Iy,o=`_${e.libraryId||n}`;e?.debugBundler&&u.debug(`Library Config: ${JSON.stringify(r,null,2)}`),t=u.spinner("Collecting metadata");let{componentsFiles:i,componentsVolume:s}=await pi(r);e?.debugBundler&&u.debug(`Components: ${JSON.stringify(i,null,2)}`);let a=r.bundleConfig?require(r.bundleConfig):{},{sourceMaps:c,metadata:l,options:d}=await di({declarations:i,sources:s,overrideConfig:a,performTypeCheck:qo(i,e),skipSourceMaps:!e?.debugBundler,bundler:e.bundler});e?.debugBundler&&(u.debug(`Metadata: ${JSON.stringify(l,null,2)}`),u.debug(`Source Maps:
|
|
120
89
|
|
|
121
|
-
${Object.entries(
|
|
90
|
+
${Object.entries(c).reduce((g,[w,x])=>(g+=`${w}: ${JSON.stringify(JSON.parse(x),null,2)}
|
|
122
91
|
|
|
123
|
-
`,m),"")}`)),t.succeed(),t=d.spinner("Generating library bundle");let{outputFiles:p,outputVolume:f}=await Ps({libraryIdentifier:o,renderer:n.renderer,framework:n.framework,publicPath:on(e.publicPath||p_),sourceVolumes:[s],componentsFiles:i,componentsOptions:u,debugBundler:e?.debugBundler,dev:e?.dev,overrideConfig:a,failOnWarnings:!e.force,bundler:e.bundler});t.succeed(),t=d.spinner("Writing to disk"),p.forEach(([m,h])=>{let v=(0,Br.join)(`/${h}`,`${m.name}`),k=Wo(f.readFileSync(v,"utf8").toString(),v,{bundleEnvironment:h}),T=(0,Br.join)(process.cwd(),e.outputPath||d_);Ms.default.existsSync((0,Br.join)(T,`${h}`))||Ms.default.mkdirSync((0,Br.join)(T,`${h}`),{recursive:!0}),Ms.default.writeFileSync((0,Br.join)(T,h,m.name),k.value.toString())}),t.succeed(),d.success("Code Library bundled successfully!")}catch(n){throw t?.fail(),new g(n)}}var qo=w(require("fs-extra")),uu=w(require("path"));J();Ce();function f_(){try{if(!qo.default.existsSync(Ne))return null;let e=qo.default.readdirSync(Ne).filter(t=>t.endsWith(".log")).map(t=>({name:t,path:uu.default.join(Ne,t),time:qo.default.statSync(uu.default.join(Ne,t)).mtime.getTime()})).sort((t,n)=>n.time-t.time);if(e.length===0)return null;for(let t of e)try{let r=qo.default.readFileSync(t.path,"utf8").match(/Command: (.+)/);if(r){let o=r[1];if(!/^(log|library\s+log)(\s|$)/.test(o))return t.path}}catch{continue}return null}catch{return null}}async function du(){let e=f_();e&&console.info(`${dr} Latest log: ${e}`),console.info(`${dr} All logs: ${Ne}`)}async function kw(e){e.command("log").description("Display the logs directory and path to the latest log file, if available.").action(du)}var jn=require("commander"),pu=new jn.Option("--no-input","Avoid prompting or doing anything interactive. Use this for CI/CD pipelines."),fu=new jn.Option("--manifest <path>","Path to a manifest.json file or directory containing webflow.json. Default: ./webflow.json"),mu=new jn.Option("--skip-update-check","Skip checking for @webflow packages updates"),gu=new jn.Option("--verbose","Display more information for debugging purposes."),Go=new jn.Option("--api-token <token>","API token. Default: value set in WEBFLOW_API_TOKEN env variable."),Nr=new jn.Option("-s, --site <site-id>","Site ID. Default: value set in webflow.json config."),Ho=e=>async(t,n)=>{let o={...n.parent?.opts()||{},...t};await e(o)};var m_="Import a library of Code Components into your Webflow Workspace.",g_="Bundle a library of Code Components for local development.",xw=new an.Option("-f, --force","Force the bundler to finish compiling, even if there are warnings or type errors."),Cw=new an.Option("--debug-bundler","Display final bundler configurations for debugging purposes."),Ew=new an.Option("--dev","Bundle in development mode for debugging purposes."),Fw=new an.Option("--bundler <engine>","Bundler to use: webpack or rspack (experimental). Default: webpack").choices(["webpack","rspack"]).default("webpack").hideHelp(),h_=new an.Option("--library-id <id>","Set the library identifier to use for the bundle.").hideHelp(),y_=new an.Option("--public-path <path>","Set the public path for the bundle."),w_=new an.Option("--output-path <path>","Override the output path for the bundle. Default is './dist'");function hu(e,t){return e.command(t).description(m_).addOption(Go).addOption(xw).addOption(Cw).addOption(Ew).addOption(Fw).action(Ho(lu))}function yu(e,t){return e.command(t).description(g_).addOption(h_).addOption(y_).addOption(w_).addOption(xw).addOption(Cw).addOption(Ew).addOption(Fw).action(Ho(cu))}var Sw=e=>{let t=e.command("library").description("CLI for managing your Webflow libraries of Code Components.");hu(t,"share"),yu(t,"bundle"),t.command("log").description("Display the logs directory and path to the latest log file, if available.").action(du)};var _w=e=>{let t=e.command("devlink").description("CLI for managing your Webflow Components.");t.command("sync").description("Sync your Webflow components to your filesystem.").argument("[components...]","A list of components to sync. If none is provided, all components will be synced.").addOption(Go).addOption(Nr).action(Nh),hu(t,"import"),yu(t,"bundle"),t.command("export").description("Export Webflow Components from your Webflow Site.").addOption(Go).addOption(Nr).action(Ho(vs))};var Jb=w(require("path"));var $t=w(require("fs")),Ye=w(require("path"));J();We();var fe={New:"new",Existing:"existing"},Aw="cli",ln=3,cn=39,Ws="astro",Tw="cloud-scaffolds";var Ow="package.json",Rn="webflow.json",Us="wf-placeholder-name",Pw="CLOUD_MOUNT_PATH",Iw="gitignore";function wu(e){return!e.siteId}var Zo=async(e,t,n=Ws,r,o,i)=>{try{let s,a;if("content"in r){let l=r.content;s=l.files,a=c=>Ye.relative(l.extractionRoot,c).replace(/\\/g,"/")}else{let c=r[n];if(!c)throw new Error(`Scaffold "${n}" not found`);s=c;let u=Ye.join(Tw,n);a=p=>p.split(u)[1]?.substring(1).replace(/\\/g,"/")??""}for(let l of s)try{let c=Ye.join(e,a(l)),u=l.includes("next.config.ts"),p=l.includes("astro.config.mjs"),f=u||p;if(l.includes(Rn)&&$t.existsSync(c))continue;if(l.includes(Ow)||l.includes(Rn)){let h=(await $t.promises.readFile(l,"utf8")).replace(Us,e);await zs(c,h)}else if(f){let m=await $t.promises.readFile(l,"utf8");await zs(c,m.replace(Pw,t))}else if(Ye.basename(c).toLowerCase()===Iw){let m=await $t.promises.readFile(l,"utf8"),h=Ye.join(Ye.dirname(c),".gitignore");await zs(h,m)}else{let m=await $t.promises.readFile(l);await zs(c,m)}}catch(c){d.error(`Error processing file ${l}: ${c}`)}if(o&&i)try{Ot({siteId:o,apiToken:i,directory:e})}catch(l){d.error(`Error creating .env file: ${l}`)}}catch(s){throw d.error(`Error applying scaffold: ${s}`),s}};var zs=async(e,t)=>{try{await $t.promises.mkdir(Ye.dirname(e),{recursive:!0}),await $t.promises.writeFile(e,t)}catch(n){throw d.error(`Error writing file ${e}: ${n}`),n}};var un=w(require("fs")),jw=w(require("fs-extra")),dn=w(require("path")),xu=w(require("os")),Rw=w(require("tar"));var ve=class extends Error{constructor(n,r,o){super(n);this.scaffoldId=r;this.supportedIds=o;this.name="ScaffoldError"}};var Ko={"astro-minimal":{id:"astro-minimal",name:"Astro",source:{type:"github",repo:"Webflow-Examples/hello-world-astro",ref:"v1"}},"nextjs-minimal":{id:"nextjs-minimal",name:"Next.js",source:{type:"github",repo:"Webflow-Examples/hello-world-nextjs",ref:"v1"}},astro:{id:"astro",name:"Astro (site-attached)",source:{type:"github",repo:"Webflow-Examples/hello-world-astro-devlink",ref:"v1"}},nextjs:{id:"nextjs",name:"Next.js (site-attached)",source:{type:"github",repo:"Webflow-Examples/hello-world-nextjs-devlink",ref:"v1"}}};function Yo(e){let t=Ko[e];if(!t){let n=Object.keys(Ko);throw new ve(`Unsupported framework: "${e}". Supported: ${n.join(", ")}`,e,n)}return t}function bu(){return Object.keys(Ko)}function Du(){return[...new Set(bu().map(e=>e.replace(/-minimal$/,"")))]}function vu(){return["astro","nextjs"]}function ku(e){let n=`${e.replace(/-minimal$/,"")}-minimal`;if(!Ko[n]){let r=bu();throw new ve(`No minimal scaffold for "${e}". Supported: ${r.join(", ")}`,n,r)}return n}J();var b_="https://github.com";async function Cu(e){let t=e.endsWith("-minimal")?e:ku(e);return Vs(t)}async function Vs(e){return Yo(e).source.type==="github"?D_(e):$w(e)}async function $w(e){let t=Yo(e);if(t.source.type!=="local")throw new ve(`Scaffold "${e}" does not have a local source`,e);let n=dn.isAbsolute(t.source.path)?t.source.path:dn.join(__dirname,t.source.path);if(!un.existsSync(n))throw new ve(`Scaffold directory not found: ${n}`,e);let r=await Eu(n);return{scaffoldId:e,files:r,extractionRoot:n}}async function D_(e){let t=Yo(e);if(t.source.type!=="github")throw new ve(`Scaffold "${e}" does not have a GitHub source`,e);let n=t.source.ref??"main",r=`${b_}/${t.source.repo}/archive/${n}.tar.gz`,o=await un.promises.mkdtemp(dn.join(xu.tmpdir(),`webflow-scaffold-${e}-`)),i=d.spinner(`Downloading scaffold (${t.source.repo}@${n})`);try{let s;try{s=await fetch(r,{redirect:"follow",headers:{"User-Agent":"webflow-cli"}})}catch(m){throw i.fail("Download failed"),new ve(`Failed to fetch scaffold from GitHub: ${m instanceof Error?m.message:String(m)}. Repo: ${t.source.repo}, ref: ${n}`,e)}if(!s.ok)throw i.fail(`GitHub returned ${s.status} ${s.statusText}`),new ve(`Failed to fetch scaffold from GitHub: ${s.status} ${s.statusText}. Repo: ${t.source.repo}, ref: ${n}`,e);let a=Buffer.from(await s.arrayBuffer());i.succeed("Downloaded scaffold");let l=d.spinner("Unpacking scaffold");try{await v_(a,o),l.succeed("Scaffold ready")}catch(m){throw l.fail("Unpack failed"),m}let c=await un.promises.readdir(o),u=c[0];if(!u||c.length!==1)throw new ve(`Unexpected tarball structure for ${t.source.repo}`,e);let p=dn.join(o,u),f=await Eu(p);return{scaffoldId:e,files:f,extractionRoot:p}}catch(s){try{jw.default.removeSync(o)}catch{}throw s instanceof ve?s:new ve(`Failed to fetch scaffold "${e}": ${s instanceof Error?s.message:String(s)}`,e)}}async function v_(e,t){let n=dn.join(xu.tmpdir(),`webflow-scaffold-${Date.now()}.tar.gz`);await un.promises.writeFile(n,new Uint8Array(e.buffer,e.byteOffset,e.byteLength));try{await Rw.extract({file:n,cwd:t})}finally{await un.promises.unlink(n).catch(()=>{})}}async function Eu(e){let t=[],n=await un.promises.readdir(e,{withFileTypes:!0});for(let r of n){let o=dn.join(e,r.name);r.isDirectory()?t.push(...await Eu(o)):t.push(o)}return t}var zu=w(require("fs-extra"));We();Be();var V=w(require("fs")),ne=w(require("path")),si=require("child_process"),yb=w(require("tar"));var Se=w(require("fs")),ft=w(require("path"));var U={};Qu(U,{BRAND:()=>G_,DIRTY:()=>$n,EMPTY_PATH:()=>E_,INVALID:()=>L,NEVER:()=>O2,OK:()=>Fe,ParseStatus:()=>xe,Schema:()=>H,ZodAny:()=>mn,ZodArray:()=>Mt,ZodBigInt:()=>Nn,ZodBoolean:()=>Ln,ZodBranded:()=>Qo,ZodCatch:()=>Kn,ZodDate:()=>Mn,ZodDefault:()=>Zn,ZodDiscriminatedUnion:()=>Gs,ZodEffects:()=>et,ZodEnum:()=>Gn,ZodError:()=>Pe,ZodFirstPartyTypeKind:()=>M,ZodFunction:()=>Zs,ZodIntersection:()=>Vn,ZodIssueCode:()=>D,ZodLazy:()=>Jn,ZodLiteral:()=>qn,ZodMap:()=>Vr,ZodNaN:()=>qr,ZodNativeEnum:()=>Hn,ZodNever:()=>dt,ZodNull:()=>Un,ZodNullable:()=>Ct,ZodNumber:()=>Bn,ZodObject:()=>Ie,ZodOptional:()=>Xe,ZodParsedType:()=>A,ZodPipeline:()=>ei,ZodPromise:()=>gn,ZodReadonly:()=>Yn,ZodRecord:()=>Hs,ZodSchema:()=>H,ZodSet:()=>Jr,ZodString:()=>fn,ZodSymbol:()=>Ur,ZodTransformer:()=>et,ZodTuple:()=>xt,ZodType:()=>H,ZodUndefined:()=>Wn,ZodUnion:()=>zn,ZodUnknown:()=>Lt,ZodVoid:()=>zr,addIssueToContext:()=>F,any:()=>n2,array:()=>s2,bigint:()=>Y_,boolean:()=>Gw,coerce:()=>T2,custom:()=>Vw,date:()=>X_,datetimeRegex:()=>Uw,defaultErrorMap:()=>Bt,discriminatedUnion:()=>u2,effect:()=>k2,enum:()=>b2,function:()=>h2,getErrorMap:()=>Lr,getParsedType:()=>kt,instanceof:()=>Z_,intersection:()=>d2,isAborted:()=>Js,isAsync:()=>Mr,isDirty:()=>qs,isValid:()=>pn,late:()=>H_,lazy:()=>y2,literal:()=>w2,makeIssue:()=>Xo,map:()=>m2,nan:()=>K_,nativeEnum:()=>D2,never:()=>o2,null:()=>t2,nullable:()=>C2,number:()=>qw,object:()=>a2,objectUtil:()=>Fu,oboolean:()=>A2,onumber:()=>_2,optional:()=>x2,ostring:()=>S2,pipeline:()=>F2,preprocess:()=>E2,promise:()=>v2,quotelessJson:()=>k_,record:()=>f2,set:()=>g2,setErrorMap:()=>C_,strictObject:()=>l2,string:()=>Jw,symbol:()=>Q_,transformer:()=>k2,tuple:()=>p2,undefined:()=>e2,union:()=>c2,unknown:()=>r2,util:()=>X,void:()=>i2});var X;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(X||(X={}));var Fu;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Fu||(Fu={}));var A=X.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),kt=e=>{switch(typeof e){case"undefined":return A.undefined;case"string":return A.string;case"number":return Number.isNaN(e)?A.nan:A.number;case"boolean":return A.boolean;case"function":return A.function;case"bigint":return A.bigint;case"symbol":return A.symbol;case"object":return Array.isArray(e)?A.array:e===null?A.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?A.promise:typeof Map<"u"&&e instanceof Map?A.map:typeof Set<"u"&&e instanceof Set?A.set:typeof Date<"u"&&e instanceof Date?A.date:A.object;default:return A.unknown}};var D=X.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),k_=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Pe=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){let c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,X.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},r=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];n[i]=n[i]||[],n[i].push(t(o))}else r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Pe.create=e=>new Pe(e);var x_=(e,t)=>{let n;switch(e.code){case D.invalid_type:e.received===A.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case D.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,X.jsonStringifyReplacer)}`;break;case D.unrecognized_keys:n=`Unrecognized key(s) in object: ${X.joinValues(e.keys,", ")}`;break;case D.invalid_union:n="Invalid input";break;case D.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${X.joinValues(e.options)}`;break;case D.invalid_enum_value:n=`Invalid enum value. Expected ${X.joinValues(e.options)}, received '${e.received}'`;break;case D.invalid_arguments:n="Invalid function arguments";break;case D.invalid_return_type:n="Invalid function return type";break;case D.invalid_date:n="Invalid date";break;case D.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:X.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case D.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case D.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case D.custom:n="Invalid input";break;case D.invalid_intersection_types:n="Intersection results could not be merged";break;case D.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case D.not_finite:n="Number must be finite";break;default:n=t.defaultError,X.assertNever(e)}return{message:n}},Bt=x_;var Bw=Bt;function C_(e){Bw=e}function Lr(){return Bw}var Xo=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",l=r.filter(c=>!!c).slice().reverse();for(let c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},E_=[];function F(e,t){let n=Lr(),r=Xo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Bt?void 0:Bt].filter(o=>!!o)});e.common.issues.push(r)}var xe=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return L;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n){let i=await o.key,s=await o.value;r.push({key:i,value:s})}return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return L;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}},L=Object.freeze({status:"aborted"}),$n=e=>({status:"dirty",value:e}),Fe=e=>({status:"valid",value:e}),Js=e=>e.status==="aborted",qs=e=>e.status==="dirty",pn=e=>e.status==="valid",Mr=e=>typeof Promise<"u"&&e instanceof Promise;var R;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(R||(R={}));var Qe=class{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Nw=(e,t)=>{if(pn(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Pe(e.common.issues);return this._error=n,this._error}}};function q(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{let{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}var H=class{get description(){return this._def.description}_getType(t){return kt(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:kt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new xe,ctx:{common:t.parent.common,data:t.data,parsedType:kt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(Mr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kt(t)},o=this._parseSync({data:t,path:r.path,parent:r});return Nw(r,o)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kt(t)};if(!this["~standard"].async)try{let r=this._parseSync({data:t,path:[],parent:n});return pn(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>pn(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:kt(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Mr(o)?o:Promise.resolve(o));return Nw(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let s=t(o),a=()=>i.addIssue({code:D.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new et({schema:this,typeName:M.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Xe.create(this,this._def)}nullable(){return Ct.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mt.create(this)}promise(){return gn.create(this,this._def)}or(t){return zn.create([this,t],this._def)}and(t){return Vn.create(this,t,this._def)}transform(t){return new et({...q(this._def),schema:this,typeName:M.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new Zn({...q(this._def),innerType:this,defaultValue:n,typeName:M.ZodDefault})}brand(){return new Qo({typeName:M.ZodBranded,type:this,...q(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new Kn({...q(this._def),innerType:this,catchValue:n,typeName:M.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return ei.create(this,t)}readonly(){return Yn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},F_=/^c[^\s-]{8,}$/i,S_=/^[0-9a-z]+$/,__=/^[0-9A-HJKMNP-TV-Z]{26}$/i,A_=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,T_=/^[a-z0-9_-]{21}$/i,O_=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,P_=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,I_=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,j_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Su,R_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,$_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,B_=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,N_=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,L_=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,M_=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Mw="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",W_=new RegExp(`^${Mw}$`);function Ww(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function U_(e){return new RegExp(`^${Ww(e)}$`)}function Uw(e){let t=`${Mw}T${Ww(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function z_(e,t){return!!((t==="v4"||!t)&&R_.test(e)||(t==="v6"||!t)&&B_.test(e))}function V_(e,t){if(!O_.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function J_(e,t){return!!((t==="v4"||!t)&&$_.test(e)||(t==="v6"||!t)&&N_.test(e))}var fn=class e extends H{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==A.string){let i=this._getOrReturnCtx(t);return F(i,{code:D.invalid_type,expected:A.string,received:i.parsedType}),L}let r=new xe,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),F(o,{code:D.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),F(o,{code:D.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?F(o,{code:D.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&F(o,{code:D.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")I_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"email",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Su||(Su=new RegExp(j_,"u")),Su.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"emoji",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")A_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"uuid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")T_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"nanoid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")F_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"cuid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")S_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"cuid2",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")__.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"ulid",code:D.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),F(o,{validation:"url",code:D.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"regex",code:D.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),F(o,{code:D.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),F(o,{code:D.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),F(o,{code:D.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Uw(i).test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{code:D.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?W_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{code:D.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?U_(i).test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{code:D.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?P_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"duration",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?z_(t.data,i.version)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"ip",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?V_(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"jwt",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?J_(t.data,i.version)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"cidr",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?L_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"base64",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?M_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"base64url",code:D.invalid_string,message:i.message}),r.dirty()):X.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:D.invalid_string,...R.errToObj(r)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...R.errToObj(t)})}url(t){return this._addCheck({kind:"url",...R.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...R.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...R.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...R.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...R.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...R.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...R.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...R.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...R.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...R.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...R.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...R.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...R.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...R.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...R.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...R.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...R.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...R.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...R.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...R.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...R.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...R.errToObj(n)})}nonempty(t){return this.min(1,R.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};fn.create=e=>new fn({checks:[],typeName:M.ZodString,coerce:e?.coerce??!1,...q(e)});function q_(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}var Bn=class e extends H{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==A.number){let i=this._getOrReturnCtx(t);return F(i,{code:D.invalid_type,expected:A.number,received:i.parsedType}),L}let r,o=new xe;for(let i of this._def.checks)i.kind==="int"?X.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),F(r,{code:D.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),F(r,{code:D.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),F(r,{code:D.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?q_(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),F(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),F(r,{code:D.not_finite,message:i.message}),o.dirty()):X.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,R.toString(n))}gt(t,n){return this.setLimit("min",t,!1,R.toString(n))}lte(t,n){return this.setLimit("max",t,!0,R.toString(n))}lt(t,n){return this.setLimit("max",t,!1,R.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:R.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:R.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:R.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:R.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:R.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:R.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:R.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:R.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:R.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:R.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&X.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};Bn.create=e=>new Bn({checks:[],typeName:M.ZodNumber,coerce:e?.coerce||!1,...q(e)});var Nn=class e extends H{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==A.bigint)return this._getInvalidInput(t);let r,o=new xe;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),F(r,{code:D.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),F(r,{code:D.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),F(r,{code:D.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):X.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return F(n,{code:D.invalid_type,expected:A.bigint,received:n.parsedType}),L}gte(t,n){return this.setLimit("min",t,!0,R.toString(n))}gt(t,n){return this.setLimit("min",t,!1,R.toString(n))}lte(t,n){return this.setLimit("max",t,!0,R.toString(n))}lt(t,n){return this.setLimit("max",t,!1,R.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:R.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:R.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:R.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:R.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:R.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:R.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};Nn.create=e=>new Nn({checks:[],typeName:M.ZodBigInt,coerce:e?.coerce??!1,...q(e)});var Ln=class extends H{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==A.boolean){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:A.boolean,received:r.parsedType}),L}return Fe(t.data)}};Ln.create=e=>new Ln({typeName:M.ZodBoolean,coerce:e?.coerce||!1,...q(e)});var Mn=class e extends H{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==A.date){let i=this._getOrReturnCtx(t);return F(i,{code:D.invalid_type,expected:A.date,received:i.parsedType}),L}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return F(i,{code:D.invalid_date}),L}let r=new xe,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),F(o,{code:D.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),F(o,{code:D.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):X.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:R.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:R.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};Mn.create=e=>new Mn({checks:[],coerce:e?.coerce||!1,typeName:M.ZodDate,...q(e)});var Ur=class extends H{_parse(t){if(this._getType(t)!==A.symbol){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:A.symbol,received:r.parsedType}),L}return Fe(t.data)}};Ur.create=e=>new Ur({typeName:M.ZodSymbol,...q(e)});var Wn=class extends H{_parse(t){if(this._getType(t)!==A.undefined){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:A.undefined,received:r.parsedType}),L}return Fe(t.data)}};Wn.create=e=>new Wn({typeName:M.ZodUndefined,...q(e)});var Un=class extends H{_parse(t){if(this._getType(t)!==A.null){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:A.null,received:r.parsedType}),L}return Fe(t.data)}};Un.create=e=>new Un({typeName:M.ZodNull,...q(e)});var mn=class extends H{constructor(){super(...arguments),this._any=!0}_parse(t){return Fe(t.data)}};mn.create=e=>new mn({typeName:M.ZodAny,...q(e)});var Lt=class extends H{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Fe(t.data)}};Lt.create=e=>new Lt({typeName:M.ZodUnknown,...q(e)});var dt=class extends H{_parse(t){let n=this._getOrReturnCtx(t);return F(n,{code:D.invalid_type,expected:A.never,received:n.parsedType}),L}};dt.create=e=>new dt({typeName:M.ZodNever,...q(e)});var zr=class extends H{_parse(t){if(this._getType(t)!==A.undefined){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:A.void,received:r.parsedType}),L}return Fe(t.data)}};zr.create=e=>new zr({typeName:M.ZodVoid,...q(e)});var Mt=class e extends H{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==A.array)return F(n,{code:D.invalid_type,expected:A.array,received:n.parsedType}),L;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(F(n,{code:s?D.too_big:D.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(F(n,{code:D.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(F(n,{code:D.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new Qe(n,s,n.path,a)))).then(s=>xe.mergeArray(r,s));let i=[...n.data].map((s,a)=>o.type._parseSync(new Qe(n,s,n.path,a)));return xe.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:R.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:R.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:R.toString(n)}})}nonempty(t){return this.min(1,t)}};Mt.create=(e,t)=>new Mt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:M.ZodArray,...q(t)});function Wr(e){if(e instanceof Ie){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Xe.create(Wr(r))}return new Ie({...e._def,shape:()=>t})}else return e instanceof Mt?new Mt({...e._def,type:Wr(e.element)}):e instanceof Xe?Xe.create(Wr(e.unwrap())):e instanceof Ct?Ct.create(Wr(e.unwrap())):e instanceof xt?xt.create(e.items.map(t=>Wr(t))):e}var Ie=class e extends H{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=X.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==A.object){let c=this._getOrReturnCtx(t);return F(c,{code:D.invalid_type,expected:A.object,received:c.parsedType}),L}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof dt&&this._def.unknownKeys==="strip"))for(let c in o.data)s.includes(c)||a.push(c);let l=[];for(let c of s){let u=i[c],p=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Qe(o,p,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof dt){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(F(o,{code:D.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of a){let p=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Qe(o,p,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of l){let p=await u.key,f=await u.value;c.push({key:p,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>xe.mergeObjectSync(r,c)):xe.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return R.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{let o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:R.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:M.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let r of X.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let r of X.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new e({...this._def,shape:()=>n})}deepPartial(){return Wr(this)}partial(t){let n={};for(let r of X.objectKeys(this.shape)){let o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let r of X.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Xe;)i=i._def.innerType;n[r]=i}return new e({...this._def,shape:()=>n})}keyof(){return zw(X.objectKeys(this.shape))}};Ie.create=(e,t)=>new Ie({shape:()=>e,unknownKeys:"strip",catchall:dt.create(),typeName:M.ZodObject,...q(t)});Ie.strictCreate=(e,t)=>new Ie({shape:()=>e,unknownKeys:"strict",catchall:dt.create(),typeName:M.ZodObject,...q(t)});Ie.lazycreate=(e,t)=>new Ie({shape:e,unknownKeys:"strip",catchall:dt.create(),typeName:M.ZodObject,...q(t)});var zn=class extends H{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Pe(a.ctx.common.issues));return F(n,{code:D.invalid_union,unionErrors:s}),L}if(n.common.async)return Promise.all(r.map(async i=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let l of r){let c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(l=>new Pe(l));return F(n,{code:D.invalid_union,unionErrors:a}),L}}get options(){return this._def.options}};zn.create=(e,t)=>new zn({options:e,typeName:M.ZodUnion,...q(t)});var Nt=e=>e instanceof Jn?Nt(e.schema):e instanceof et?Nt(e.innerType()):e instanceof qn?[e.value]:e instanceof Gn?e.options:e instanceof Hn?X.objectValues(e.enum):e instanceof Zn?Nt(e._def.innerType):e instanceof Wn?[void 0]:e instanceof Un?[null]:e instanceof Xe?[void 0,...Nt(e.unwrap())]:e instanceof Ct?[null,...Nt(e.unwrap())]:e instanceof Qo||e instanceof Yn?Nt(e.unwrap()):e instanceof Kn?Nt(e._def.innerType):[],Gs=class e extends H{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==A.object)return F(n,{code:D.invalid_type,expected:A.object,received:n.parsedType}),L;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(F(n,{code:D.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),L)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let i of n){let s=Nt(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new e({typeName:M.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...q(r)})}};function _u(e,t){let n=kt(e),r=kt(t);if(e===t)return{valid:!0,data:e};if(n===A.object&&r===A.object){let o=X.objectKeys(t),i=X.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let l=_u(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===A.array&&r===A.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],l=_u(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===A.date&&r===A.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Vn=class extends H{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(Js(i)||Js(s))return L;let a=_u(i.value,s.value);return a.valid?((qs(i)||qs(s))&&n.dirty(),{status:n.value,value:a.data}):(F(r,{code:D.invalid_intersection_types}),L)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Vn.create=(e,t,n)=>new Vn({left:e,right:t,typeName:M.ZodIntersection,...q(n)});var xt=class e extends H{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.array)return F(r,{code:D.invalid_type,expected:A.array,received:r.parsedType}),L;if(r.data.length<this._def.items.length)return F(r,{code:D.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),L;!this._def.rest&&r.data.length>this._def.items.length&&(F(r,{code:D.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,a)=>{let l=this._def.items[a]||this._def.rest;return l?l._parse(new Qe(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>xe.mergeArray(n,s)):xe.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};xt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new xt({items:e,typeName:M.ZodTuple,rest:null,...q(t)})};var Hs=class e extends H{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.object)return F(r,{code:D.invalid_type,expected:A.object,received:r.parsedType}),L;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in r.data)o.push({key:i._parse(new Qe(r,a,r.path,a)),value:s._parse(new Qe(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?xe.mergeObjectAsync(n,o):xe.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof H?new e({keyType:t,valueType:n,typeName:M.ZodRecord,...q(r)}):new e({keyType:fn.create(),valueType:t,typeName:M.ZodRecord,...q(n)})}},Vr=class extends H{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.map)return F(r,{code:D.invalid_type,expected:A.map,received:r.parsedType}),L;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Qe(r,a,r.path,[c,"key"])),value:i._parse(new Qe(r,l,r.path,[c,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let l of s){let c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return L;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let l of s){let c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return L;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}};Vr.create=(e,t,n)=>new Vr({valueType:t,keyType:e,typeName:M.ZodMap,...q(n)});var Jr=class e extends H{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.set)return F(r,{code:D.invalid_type,expected:A.set,received:r.parsedType}),L;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(F(r,{code:D.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(F(r,{code:D.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function s(l){let c=new Set;for(let u of l){if(u.status==="aborted")return L;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}let a=[...r.data.values()].map((l,c)=>i._parse(new Qe(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new e({...this._def,minSize:{value:t,message:R.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:R.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};Jr.create=(e,t)=>new Jr({valueType:e,minSize:null,maxSize:null,typeName:M.ZodSet,...q(t)});var Zs=class e extends H{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==A.function)return F(n,{code:D.invalid_type,expected:A.function,received:n.parsedType}),L;function r(a,l){return Xo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Lr(),Bt].filter(c=>!!c),issueData:{code:D.invalid_arguments,argumentsError:l}})}function o(a,l){return Xo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Lr(),Bt].filter(c=>!!c),issueData:{code:D.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof gn){let a=this;return Fe(async function(...l){let c=new Pe([]),u=await a._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(r(l,m)),c}),p=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(p,i).catch(m=>{throw c.addIssue(o(p,m)),c})})}else{let a=this;return Fe(function(...l){let c=a._def.args.safeParse(l,i);if(!c.success)throw new Pe([r(l,c.error)]);let u=Reflect.apply(s,this,c.data),p=a._def.returns.safeParse(u,i);if(!p.success)throw new Pe([o(u,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:xt.create(t).rest(Lt.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||xt.create([]).rest(Lt.create()),returns:n||Lt.create(),typeName:M.ZodFunction,...q(r)})}},Jn=class extends H{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Jn.create=(e,t)=>new Jn({getter:e,typeName:M.ZodLazy,...q(t)});var qn=class extends H{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return F(n,{received:n.data,code:D.invalid_literal,expected:this._def.value}),L}return{status:"valid",value:t.data}}get value(){return this._def.value}};qn.create=(e,t)=>new qn({value:e,typeName:M.ZodLiteral,...q(t)});function zw(e,t){return new Gn({values:e,typeName:M.ZodEnum,...q(t)})}var Gn=class e extends H{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return F(n,{expected:X.joinValues(r),received:n.parsedType,code:D.invalid_type}),L}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),r=this._def.values;return F(n,{received:n.data,code:D.invalid_enum_value,options:r}),L}return Fe(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}};Gn.create=zw;var Hn=class extends H{_parse(t){let n=X.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==A.string&&r.parsedType!==A.number){let o=X.objectValues(n);return F(r,{expected:X.joinValues(o),received:r.parsedType,code:D.invalid_type}),L}if(this._cache||(this._cache=new Set(X.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=X.objectValues(n);return F(r,{received:r.data,code:D.invalid_enum_value,options:o}),L}return Fe(t.data)}get enum(){return this._def.values}};Hn.create=(e,t)=>new Hn({values:e,typeName:M.ZodNativeEnum,...q(t)});var gn=class extends H{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==A.promise&&n.common.async===!1)return F(n,{code:D.invalid_type,expected:A.promise,received:n.parsedType}),L;let r=n.parsedType===A.promise?n.data:Promise.resolve(n.data);return Fe(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};gn.create=(e,t)=>new gn({type:e,typeName:M.ZodPromise,...q(t)});var et=class extends H{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===M.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{F(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return L;let l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?L:l.status==="dirty"?$n(l.value):n.value==="dirty"?$n(l.value):l});{if(n.value==="aborted")return L;let a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?L:a.status==="dirty"?$n(a.value):n.value==="dirty"?$n(a.value):a}}if(o.type==="refinement"){let s=a=>{let l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?L:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?L:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!pn(s))return L;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>pn(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):L);X.assertNever(o)}};et.create=(e,t,n)=>new et({schema:e,typeName:M.ZodEffects,effect:t,...q(n)});et.createWithPreprocess=(e,t,n)=>new et({schema:t,effect:{type:"preprocess",transform:e},typeName:M.ZodEffects,...q(n)});var Xe=class extends H{_parse(t){return this._getType(t)===A.undefined?Fe(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Xe.create=(e,t)=>new Xe({innerType:e,typeName:M.ZodOptional,...q(t)});var Ct=class extends H{_parse(t){return this._getType(t)===A.null?Fe(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ct.create=(e,t)=>new Ct({innerType:e,typeName:M.ZodNullable,...q(t)});var Zn=class extends H{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===A.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Zn.create=(e,t)=>new Zn({innerType:e,typeName:M.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...q(t)});var Kn=class extends H{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Mr(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Pe(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Pe(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Kn.create=(e,t)=>new Kn({innerType:e,typeName:M.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...q(t)});var qr=class extends H{_parse(t){if(this._getType(t)!==A.nan){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:A.nan,received:r.parsedType}),L}return{status:"valid",value:t.data}}};qr.create=e=>new qr({typeName:M.ZodNaN,...q(e)});var G_=Symbol("zod_brand"),Qo=class extends H{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},ei=class e extends H{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?L:i.status==="dirty"?(n.dirty(),$n(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?L:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new e({in:t,out:n,typeName:M.ZodPipeline})}},Yn=class extends H{_parse(t){let n=this._def.innerType._parse(t),r=o=>(pn(o)&&(o.value=Object.freeze(o.value)),o);return Mr(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}};Yn.create=(e,t)=>new Yn({innerType:e,typeName:M.ZodReadonly,...q(t)});function Lw(e,t){let n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function Vw(e,t={},n){return e?mn.create().superRefine((r,o)=>{let i=e(r);if(i instanceof Promise)return i.then(s=>{if(!s){let a=Lw(t,r),l=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:l})}});if(!i){let s=Lw(t,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):mn.create()}var H_={object:Ie.lazycreate},M;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(M||(M={}));var Z_=(e,t={message:`Input not instance of ${e.name}`})=>Vw(n=>n instanceof e,t),Jw=fn.create,qw=Bn.create,K_=qr.create,Y_=Nn.create,Gw=Ln.create,X_=Mn.create,Q_=Ur.create,e2=Wn.create,t2=Un.create,n2=mn.create,r2=Lt.create,o2=dt.create,i2=zr.create,s2=Mt.create,a2=Ie.create,l2=Ie.strictCreate,c2=zn.create,u2=Gs.create,d2=Vn.create,p2=xt.create,f2=Hs.create,m2=Vr.create,g2=Jr.create,h2=Zs.create,y2=Jn.create,w2=qn.create,b2=Gn.create,D2=Hn.create,v2=gn.create,k2=et.create,x2=Xe.create,C2=Ct.create,E2=et.createWithPreprocess,F2=ei.create,S2=()=>Jw().optional(),_2=()=>qw().optional(),A2=()=>Gw().optional(),T2={string:e=>fn.create({...e,coerce:!0}),number:e=>Bn.create({...e,coerce:!0}),boolean:e=>Ln.create({...e,coerce:!0}),bigint:e=>Nn.create({...e,coerce:!0}),date:e=>Mn.create({...e,coerce:!0})};var O2=L;function Ks(e,t=!1){let n=e.length,r=0,o="",i=0,s=16,a=0,l=0,c=0,u=0,p=0;function f(C,x){let z=0,j=0;for(;z<C||!x;){let S=e.charCodeAt(r);if(S>=48&&S<=57)j=j*16+S-48;else if(S>=65&&S<=70)j=j*16+S-65+10;else if(S>=97&&S<=102)j=j*16+S-97+10;else break;r++,z++}return z<C&&(j=-1),j}function m(C){r=C,o="",i=0,s=16,p=0}function h(){let C=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&Gr(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&Gr(e.charCodeAt(r)))for(r++;r<e.length&&Gr(e.charCodeAt(r));)r++;else return p=3,e.substring(C,r);let x=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&Gr(e.charCodeAt(r))){for(r++;r<e.length&&Gr(e.charCodeAt(r));)r++;x=r}else p=3;return e.substring(C,x)}function v(){let C="",x=r;for(;;){if(r>=n){C+=e.substring(x,r),p=2;break}let z=e.charCodeAt(r);if(z===34){C+=e.substring(x,r),r++;break}if(z===92){if(C+=e.substring(x,r),r++,r>=n){p=2;break}switch(e.charCodeAt(r++)){case 34:C+='"';break;case 92:C+="\\";break;case 47:C+="/";break;case 98:C+="\b";break;case 102:C+="\f";break;case 110:C+=`
|
|
124
|
-
`;break;case 114:
|
|
125
|
-
`),a++,
|
|
126
|
-
`+" ".repeat(t)),"\r":new Array(
|
|
127
|
-
`+" ".repeat(t))}," ":{"\n":new Array(
|
|
128
|
-
`+" ".repeat(t)),"\r":new Array(
|
|
129
|
-
`+" ".repeat(t))}};var
|
|
92
|
+
`,g),"")}`)),t.succeed(),t=u.spinner("Generating library bundle");let{outputFiles:f,outputVolume:m}=await li({libraryIdentifier:o,renderer:r.renderer,framework:r.framework,publicPath:Ot(e.publicPath||$y),sourceVolumes:[s],componentsFiles:i,componentsOptions:d,debugBundler:e?.debugBundler,dev:e?.dev,overrideConfig:a,failOnWarnings:!e.force,bundler:e.bundler});t.succeed(),t=u.spinner("Writing to disk"),f.forEach(([g,w])=>{let x=(0,Kr.join)(`/${w}`,`${g.name}`),k=Vn(m.readFileSync(x,"utf8").toString(),x,{bundleEnvironment:w}),X=(0,Kr.join)(process.cwd(),e.outputPath||Py);yi.default.existsSync((0,Kr.join)(X,`${w}`))||yi.default.mkdirSync((0,Kr.join)(X,`${w}`),{recursive:!0}),yi.default.writeFileSync((0,Kr.join)(X,w,g.name),k.value.toString())}),t.succeed(),u.success("Code Library bundled successfully!")}catch(r){throw t?.fail(),new p(r)}}var Hn=h(require("fs-extra")),Ua=h(require("path"));j();pe();function Ry(){try{if(!Hn.default.existsSync(_e))return null;let e=Hn.default.readdirSync(_e).filter(t=>t.endsWith(".log")).map(t=>({name:t,path:Ua.default.join(_e,t),time:Hn.default.statSync(Ua.default.join(_e,t)).mtime.getTime()})).sort((t,r)=>r.time-t.time);if(e.length===0)return null;for(let t of e)try{let n=Hn.default.readFileSync(t.path,"utf8").match(/Command: (.+)/);if(n){let o=n[1];if(!/^(log|library\s+log)(\s|$)/.test(o))return t.path}}catch{continue}return null}catch{return null}}async function Va(){let e=Ry();e&&console.info(`${Pr} Latest log: ${e}`),console.info(`${Pr} All logs: ${_e}`)}async function Rf(e){e.command("log").description("Display the logs directory and path to the latest log file, if available.").action(Va)}var rr=require("commander"),Ja=new rr.Option("--no-input","Avoid prompting or doing anything interactive. Use this for CI/CD pipelines."),Ga=new rr.Option("--manifest <path>","Path to a manifest.json file or directory containing webflow.json. Default: ./webflow.json"),za=new rr.Option("--skip-update-check","Skip checking for @webflow packages updates"),qa=new rr.Option("--verbose","Display more information for debugging purposes."),Kn=new rr.Option("--api-token <token>","API token. Default: value set in WEBFLOW_API_TOKEN env variable."),Zr=new rr.Option("-s, --site <site-id>","Site ID. Default: value set in webflow.json config."),Zn=e=>async(t,r)=>{let o={...r.parent?.opts()||{},...t};await e(o)};var jy="Import a library of Code Components into your Webflow Workspace.",By="Bundle a library of Code Components for local development.",jf=new Pt.Option("-f, --force","Force the bundler to finish compiling, even if there are warnings or type errors."),Bf=new Pt.Option("--debug-bundler","Display final bundler configurations for debugging purposes."),Nf=new Pt.Option("--dev","Bundle in development mode for debugging purposes."),Mf=new Pt.Option("--bundler <engine>","Bundler to use: webpack or rspack (experimental). Default: webpack").choices(["webpack","rspack"]).default("webpack").hideHelp(),Ny=new Pt.Option("--library-id <id>","Set the library identifier to use for the bundle.").hideHelp(),My=new Pt.Option("--public-path <path>","Set the public path for the bundle."),Ly=new Pt.Option("--output-path <path>","Override the output path for the bundle. Default is './dist'");function Ha(e,t){return e.command(t).description(jy).addOption(Kn).addOption(jf).addOption(Bf).addOption(Nf).addOption(Mf).action(Zn(La))}function Ka(e,t){return e.command(t).description(By).addOption(Ny).addOption(My).addOption(Ly).addOption(jf).addOption(Bf).addOption(Nf).addOption(Mf).action(Zn(Wa))}var Lf=e=>{let t=e.command("library").description("CLI for managing your Webflow libraries of Code Components.");Ha(t,"share"),Ka(t,"bundle"),t.command("log").description("Display the logs directory and path to the latest log file, if available.").action(Va)};var Wf=e=>{let t=e.command("devlink").description("CLI for managing your Webflow Components.");t.command("sync").description("Sync your Webflow components to your filesystem.").argument("[components...]","A list of components to sync. If none is provided, all components will be synced.").addOption(Kn).addOption(Zr).action(Zu),Ha(t,"import"),Ka(t,"bundle"),t.command("export").description("Export Webflow Components from your Webflow Site.").addOption(Kn).addOption(Zr).action(Zn(Xo))};var om=h(require("path"));var mt=h(require("fs")),je=h(require("path"));j();Te();var oe={New:"new",Existing:"existing"},Uf="cli",$t=3,Rt=39,wi="astro",Vf="cloud-scaffolds";var Jf="package.json",nr="webflow.json",Di="wf-placeholder-name",Gf="CLOUD_MOUNT_PATH",zf="gitignore";function Za(e){return!e.siteId}var Yn=async(e,t,r=wi,n,o,i)=>{try{let s,a;if("content"in n){let c=n.content;s=c.files,a=l=>je.relative(c.extractionRoot,l).replace(/\\/g,"/")}else{let l=n[r];if(!l)throw new Error(`Scaffold "${r}" not found`);s=l;let d=je.join(Vf,r);a=f=>f.split(d)[1]?.substring(1).replace(/\\/g,"/")??""}for(let c of s)try{let l=je.join(e,a(c)),d=c.includes("next.config.ts"),f=c.includes("astro.config.mjs"),m=d||f;if(c.includes(nr)&&mt.existsSync(l))continue;if(c.includes(Jf)||c.includes(nr)){let w=(await mt.promises.readFile(c,"utf8")).replace(Di,e);await bi(l,w)}else if(m){let g=await mt.promises.readFile(c,"utf8");await bi(l,g.replace(Gf,t))}else if(je.basename(l).toLowerCase()===zf){let g=await mt.promises.readFile(c,"utf8"),w=je.join(je.dirname(l),".gitignore");await bi(w,g)}else{let g=await mt.promises.readFile(c);await bi(l,g)}}catch(l){u.error(`Error processing file ${c}: ${l}`)}if(o&&i)try{ut({siteId:o,apiToken:i,directory:e})}catch(c){u.error(`Error creating .env file: ${c}`)}}catch(s){throw u.error(`Error applying scaffold: ${s}`),s}};var bi=async(e,t)=>{try{await mt.promises.mkdir(je.dirname(e),{recursive:!0}),await mt.promises.writeFile(e,t)}catch(r){throw u.error(`Error writing file ${e}: ${r}`),r}};var jt=h(require("fs")),qf=h(require("fs-extra")),Bt=h(require("path")),tc=h(require("os")),Hf=h(require("tar"));var ue=class extends Error{constructor(r,n,o){super(r);this.scaffoldId=n;this.supportedIds=o;this.name="ScaffoldError"}};var Xn={"astro-minimal":{id:"astro-minimal",name:"Astro",source:{type:"github",repo:"Webflow-Examples/hello-world-astro",ref:"v1"}},"nextjs-minimal":{id:"nextjs-minimal",name:"Next.js",source:{type:"github",repo:"Webflow-Examples/hello-world-nextjs",ref:"v1"}},astro:{id:"astro",name:"Astro (site-attached)",source:{type:"github",repo:"Webflow-Examples/hello-world-astro-devlink",ref:"v1"}},nextjs:{id:"nextjs",name:"Next.js (site-attached)",source:{type:"github",repo:"Webflow-Examples/hello-world-nextjs-devlink",ref:"v1"}}};function Qn(e){let t=Xn[e];if(!t){let r=Object.keys(Xn);throw new ue(`Unsupported framework: "${e}". Supported: ${r.join(", ")}`,e,r)}return t}function Ya(){return Object.keys(Xn)}function Xa(){return[...new Set(Ya().map(e=>e.replace(/-minimal$/,"")))]}function Qa(){return["astro","nextjs"]}function ec(e){let r=`${e.replace(/-minimal$/,"")}-minimal`;if(!Xn[r]){let n=Ya();throw new ue(`No minimal scaffold for "${e}". Supported: ${n.join(", ")}`,r,n)}return r}j();var Wy="https://github.com";async function rc(e){let t=e.endsWith("-minimal")?e:ec(e);return vi(t)}async function vi(e){return Qn(e).source.type==="github"?Uy(e):Kf(e)}async function Kf(e){let t=Qn(e);if(t.source.type!=="local")throw new ue(`Scaffold "${e}" does not have a local source`,e);let r=Bt.isAbsolute(t.source.path)?t.source.path:Bt.join(__dirname,t.source.path);if(!jt.existsSync(r))throw new ue(`Scaffold directory not found: ${r}`,e);let n=await nc(r);return{scaffoldId:e,files:n,extractionRoot:r}}async function Uy(e){let t=Qn(e);if(t.source.type!=="github")throw new ue(`Scaffold "${e}" does not have a GitHub source`,e);let r=t.source.ref??"main",n=`${Wy}/${t.source.repo}/archive/${r}.tar.gz`,o=await jt.promises.mkdtemp(Bt.join(tc.tmpdir(),`webflow-scaffold-${e}-`)),i=u.spinner(`Downloading scaffold (${t.source.repo}@${r})`);try{let s;try{s=await fetch(n,{redirect:"follow",headers:{"User-Agent":"webflow-cli"}})}catch(g){throw i.fail("Download failed"),new ue(`Failed to fetch scaffold from GitHub: ${g instanceof Error?g.message:String(g)}. Repo: ${t.source.repo}, ref: ${r}`,e)}if(!s.ok)throw i.fail(`GitHub returned ${s.status} ${s.statusText}`),new ue(`Failed to fetch scaffold from GitHub: ${s.status} ${s.statusText}. Repo: ${t.source.repo}, ref: ${r}`,e);let a=Buffer.from(await s.arrayBuffer());i.succeed("Downloaded scaffold");let c=u.spinner("Unpacking scaffold");try{await Vy(a,o),c.succeed("Scaffold ready")}catch(g){throw c.fail("Unpack failed"),g}let l=await jt.promises.readdir(o),d=l[0];if(!d||l.length!==1)throw new ue(`Unexpected tarball structure for ${t.source.repo}`,e);let f=Bt.join(o,d),m=await nc(f);return{scaffoldId:e,files:m,extractionRoot:f}}catch(s){try{qf.default.removeSync(o)}catch{}throw s instanceof ue?s:new ue(`Failed to fetch scaffold "${e}": ${s instanceof Error?s.message:String(s)}`,e)}}async function Vy(e,t){let r=Bt.join(tc.tmpdir(),`webflow-scaffold-${Date.now()}.tar.gz`);await jt.promises.writeFile(r,new Uint8Array(e.buffer,e.byteOffset,e.byteLength));try{await Hf.extract({file:r,cwd:t})}finally{await jt.promises.unlink(r).catch(()=>{})}}async function nc(e){let t=[],r=await jt.promises.readdir(e,{withFileTypes:!0});for(let n of r){let o=Bt.join(e,n.name);n.isDirectory()?t.push(...await nc(o)):t.push(o)}return t}var vc=h(require("fs-extra"));Te();Ce();var R=h(require("fs")),H=h(require("path")),co=require("child_process"),Ap=h(require("tar"));var ge=h(require("fs")),He=h(require("path"));var $={};Ic($,{BRAND:()=>gw,DIRTY:()=>or,EMPTY_PATH:()=>qy,INVALID:()=>A,NEVER:()=>Qw,OK:()=>me,ParseStatus:()=>fe,Schema:()=>M,ZodAny:()=>Lt,ZodArray:()=>wt,ZodBigInt:()=>sr,ZodBoolean:()=>ar,ZodBranded:()=>to,ZodCatch:()=>wr,ZodDate:()=>cr,ZodDefault:()=>yr,ZodDiscriminatedUnion:()=>xi,ZodEffects:()=>Me,ZodEnum:()=>gr,ZodError:()=>be,ZodFirstPartyTypeKind:()=>I,ZodFunction:()=>_i,ZodIntersection:()=>fr,ZodIssueCode:()=>y,ZodLazy:()=>pr,ZodLiteral:()=>mr,ZodMap:()=>rn,ZodNaN:()=>on,ZodNativeEnum:()=>hr,ZodNever:()=>ze,ZodNull:()=>ur,ZodNullable:()=>nt,ZodNumber:()=>ir,ZodObject:()=>ve,ZodOptional:()=>Be,ZodParsedType:()=>v,ZodPipeline:()=>ro,ZodPromise:()=>Wt,ZodReadonly:()=>Dr,ZodRecord:()=>Ci,ZodSchema:()=>M,ZodSet:()=>nn,ZodString:()=>Mt,ZodSymbol:()=>en,ZodTransformer:()=>Me,ZodTuple:()=>rt,ZodType:()=>M,ZodUndefined:()=>lr,ZodUnion:()=>dr,ZodUnknown:()=>yt,ZodVoid:()=>tn,addIssueToContext:()=>b,any:()=>xw,array:()=>Sw,bigint:()=>Dw,boolean:()=>sp,coerce:()=>Xw,custom:()=>np,date:()=>bw,datetimeRegex:()=>tp,defaultErrorMap:()=>gt,discriminatedUnion:()=>Iw,effect:()=>Jw,enum:()=>Ww,function:()=>Nw,getErrorMap:()=>Yr,getParsedType:()=>tt,instanceof:()=>yw,intersection:()=>Pw,isAborted:()=>Fi,isAsync:()=>Xr,isDirty:()=>Ei,isValid:()=>Nt,late:()=>hw,lazy:()=>Mw,literal:()=>Lw,makeIssue:()=>eo,map:()=>jw,nan:()=>ww,nativeEnum:()=>Uw,never:()=>_w,null:()=>Ew,nullable:()=>zw,number:()=>ip,object:()=>Tw,objectUtil:()=>oc,oboolean:()=>Yw,onumber:()=>Zw,optional:()=>Gw,ostring:()=>Kw,pipeline:()=>Hw,preprocess:()=>qw,promise:()=>Vw,quotelessJson:()=>Jy,record:()=>Rw,set:()=>Bw,setErrorMap:()=>zy,strictObject:()=>Aw,string:()=>op,symbol:()=>vw,transformer:()=>Jw,tuple:()=>$w,undefined:()=>Fw,union:()=>Ow,unknown:()=>Cw,util:()=>V,void:()=>kw});var V;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(V||(V={}));var oc;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(oc||(oc={}));var v=V.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),tt=e=>{switch(typeof e){case"undefined":return v.undefined;case"string":return v.string;case"number":return Number.isNaN(e)?v.nan:v.number;case"boolean":return v.boolean;case"function":return v.function;case"bigint":return v.bigint;case"symbol":return v.symbol;case"object":return Array.isArray(e)?v.array:e===null?v.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?v.promise:typeof Map<"u"&&e instanceof Map?v.map:typeof Set<"u"&&e instanceof Set?v.set:typeof Date<"u"&&e instanceof Date?v.date:v.object;default:return v.unknown}};var y=V.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Jy=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),be=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,V.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];r[i]=r[i]||[],r[i].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};be.create=e=>new be(e);var Gy=(e,t)=>{let r;switch(e.code){case y.invalid_type:e.received===v.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case y.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,V.jsonStringifyReplacer)}`;break;case y.unrecognized_keys:r=`Unrecognized key(s) in object: ${V.joinValues(e.keys,", ")}`;break;case y.invalid_union:r="Invalid input";break;case y.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${V.joinValues(e.options)}`;break;case y.invalid_enum_value:r=`Invalid enum value. Expected ${V.joinValues(e.options)}, received '${e.received}'`;break;case y.invalid_arguments:r="Invalid function arguments";break;case y.invalid_return_type:r="Invalid function return type";break;case y.invalid_date:r="Invalid date";break;case y.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:V.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case y.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case y.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case y.custom:r="Invalid input";break;case y.invalid_intersection_types:r="Intersection results could not be merged";break;case y.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case y.not_finite:r="Number must be finite";break;default:r=t.defaultError,V.assertNever(e)}return{message:r}},gt=Gy;var Zf=gt;function zy(e){Zf=e}function Yr(){return Zf}var eo=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=n.filter(l=>!!l).slice().reverse();for(let l of c)a=l(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},qy=[];function b(e,t){let r=Yr(),n=eo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===gt?void 0:gt].filter(o=>!!o)});e.common.issues.push(n)}var fe=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return A;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let i=await o.key,s=await o.value;n.push({key:i,value:s})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return A;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(n[i.value]=s.value)}return{status:t.value,value:n}}},A=Object.freeze({status:"aborted"}),or=e=>({status:"dirty",value:e}),me=e=>({status:"valid",value:e}),Fi=e=>e.status==="aborted",Ei=e=>e.status==="dirty",Nt=e=>e.status==="valid",Xr=e=>typeof Promise<"u"&&e instanceof Promise;var _;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(_||(_={}));var Ne=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Yf=(e,t)=>{if(Nt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new be(e.common.issues);return this._error=r,this._error}}};function B(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:o}}var M=class{get description(){return this._def.description}_getType(t){return tt(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:tt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new fe,ctx:{common:t.parent.common,data:t.data,parsedType:tt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Xr(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:tt(t)},o=this._parseSync({data:t,path:n.path,parent:n});return Yf(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:tt(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Nt(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>Nt(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:tt(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(Xr(o)?o:Promise.resolve(o));return Yf(n,i)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{let s=t(o),a=()=>i.addIssue({code:y.custom,...n(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new Me({schema:this,typeName:I.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Be.create(this,this._def)}nullable(){return nt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wt.create(this)}promise(){return Wt.create(this,this._def)}or(t){return dr.create([this,t],this._def)}and(t){return fr.create(this,t,this._def)}transform(t){return new Me({...B(this._def),schema:this,typeName:I.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new yr({...B(this._def),innerType:this,defaultValue:r,typeName:I.ZodDefault})}brand(){return new to({typeName:I.ZodBranded,type:this,...B(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new wr({...B(this._def),innerType:this,catchValue:r,typeName:I.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return ro.create(this,t)}readonly(){return Dr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Hy=/^c[^\s-]{8,}$/i,Ky=/^[0-9a-z]+$/,Zy=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Yy=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Xy=/^[a-z0-9_-]{21}$/i,Qy=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ew=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,tw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ic,nw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ow=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,iw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,sw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,aw=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,cw=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Qf="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",lw=new RegExp(`^${Qf}$`);function ep(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function uw(e){return new RegExp(`^${ep(e)}$`)}function tp(e){let t=`${Qf}T${ep(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function dw(e,t){return!!((t==="v4"||!t)&&nw.test(e)||(t==="v6"||!t)&&iw.test(e))}function fw(e,t){if(!Qy.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function pw(e,t){return!!((t==="v4"||!t)&&ow.test(e)||(t==="v6"||!t)&&sw.test(e))}var Mt=class e extends M{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==v.string){let i=this._getOrReturnCtx(t);return b(i,{code:y.invalid_type,expected:v.string,received:i.parsedType}),A}let n=new fe,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),b(o,{code:y.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),b(o,{code:y.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?b(o,{code:y.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&b(o,{code:y.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")tw.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"email",code:y.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")ic||(ic=new RegExp(rw,"u")),ic.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"emoji",code:y.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Yy.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"uuid",code:y.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")Xy.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"nanoid",code:y.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Hy.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"cuid",code:y.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Ky.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"cuid2",code:y.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Zy.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"ulid",code:y.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),b(o,{validation:"url",code:y.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"regex",code:y.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),b(o,{code:y.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),b(o,{code:y.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),b(o,{code:y.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?tp(i).test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{code:y.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?lw.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{code:y.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?uw(i).test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{code:y.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?ew.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"duration",code:y.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?dw(t.data,i.version)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"ip",code:y.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?fw(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"jwt",code:y.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?pw(t.data,i.version)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"cidr",code:y.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?aw.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"base64",code:y.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?cw.test(t.data)||(o=this._getOrReturnCtx(t,o),b(o,{validation:"base64url",code:y.invalid_string,message:i.message}),n.dirty()):V.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:y.invalid_string,..._.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",..._.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",..._.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",..._.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",..._.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",..._.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,..._.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,..._.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",..._.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,..._.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._.errToObj(r)})}nonempty(t){return this.min(1,_.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Mt.create=e=>new Mt({checks:[],typeName:I.ZodString,coerce:e?.coerce??!1,...B(e)});function mw(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}var ir=class e extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==v.number){let i=this._getOrReturnCtx(t);return b(i,{code:y.invalid_type,expected:v.number,received:i.parsedType}),A}let n,o=new fe;for(let i of this._def.checks)i.kind==="int"?V.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),b(n,{code:y.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),b(n,{code:y.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),b(n,{code:y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?mw(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),b(n,{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),b(n,{code:y.not_finite,message:i.message}),o.dirty()):V.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&V.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};ir.create=e=>new ir({checks:[],typeName:I.ZodNumber,coerce:e?.coerce||!1,...B(e)});var sr=class e extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==v.bigint)return this._getInvalidInput(t);let n,o=new fe;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),b(n,{code:y.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),b(n,{code:y.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),b(n,{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):V.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return b(r,{code:y.invalid_type,expected:v.bigint,received:r.parsedType}),A}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};sr.create=e=>new sr({checks:[],typeName:I.ZodBigInt,coerce:e?.coerce??!1,...B(e)});var ar=class extends M{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==v.boolean){let n=this._getOrReturnCtx(t);return b(n,{code:y.invalid_type,expected:v.boolean,received:n.parsedType}),A}return me(t.data)}};ar.create=e=>new ar({typeName:I.ZodBoolean,coerce:e?.coerce||!1,...B(e)});var cr=class e extends M{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==v.date){let i=this._getOrReturnCtx(t);return b(i,{code:y.invalid_type,expected:v.date,received:i.parsedType}),A}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return b(i,{code:y.invalid_date}),A}let n=new fe,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),b(o,{code:y.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),b(o,{code:y.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):V.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};cr.create=e=>new cr({checks:[],coerce:e?.coerce||!1,typeName:I.ZodDate,...B(e)});var en=class extends M{_parse(t){if(this._getType(t)!==v.symbol){let n=this._getOrReturnCtx(t);return b(n,{code:y.invalid_type,expected:v.symbol,received:n.parsedType}),A}return me(t.data)}};en.create=e=>new en({typeName:I.ZodSymbol,...B(e)});var lr=class extends M{_parse(t){if(this._getType(t)!==v.undefined){let n=this._getOrReturnCtx(t);return b(n,{code:y.invalid_type,expected:v.undefined,received:n.parsedType}),A}return me(t.data)}};lr.create=e=>new lr({typeName:I.ZodUndefined,...B(e)});var ur=class extends M{_parse(t){if(this._getType(t)!==v.null){let n=this._getOrReturnCtx(t);return b(n,{code:y.invalid_type,expected:v.null,received:n.parsedType}),A}return me(t.data)}};ur.create=e=>new ur({typeName:I.ZodNull,...B(e)});var Lt=class extends M{constructor(){super(...arguments),this._any=!0}_parse(t){return me(t.data)}};Lt.create=e=>new Lt({typeName:I.ZodAny,...B(e)});var yt=class extends M{constructor(){super(...arguments),this._unknown=!0}_parse(t){return me(t.data)}};yt.create=e=>new yt({typeName:I.ZodUnknown,...B(e)});var ze=class extends M{_parse(t){let r=this._getOrReturnCtx(t);return b(r,{code:y.invalid_type,expected:v.never,received:r.parsedType}),A}};ze.create=e=>new ze({typeName:I.ZodNever,...B(e)});var tn=class extends M{_parse(t){if(this._getType(t)!==v.undefined){let n=this._getOrReturnCtx(t);return b(n,{code:y.invalid_type,expected:v.void,received:n.parsedType}),A}return me(t.data)}};tn.create=e=>new tn({typeName:I.ZodVoid,...B(e)});var wt=class e extends M{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==v.array)return b(r,{code:y.invalid_type,expected:v.array,received:r.parsedType}),A;if(o.exactLength!==null){let s=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(s||a)&&(b(r,{code:s?y.too_big:y.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(b(r,{code:y.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(b(r,{code:y.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>o.type._parseAsync(new Ne(r,s,r.path,a)))).then(s=>fe.mergeArray(n,s));let i=[...r.data].map((s,a)=>o.type._parseSync(new Ne(r,s,r.path,a)));return fe.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:_.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:_.toString(r)}})}nonempty(t){return this.min(1,t)}};wt.create=(e,t)=>new wt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:I.ZodArray,...B(t)});function Qr(e){if(e instanceof ve){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Be.create(Qr(n))}return new ve({...e._def,shape:()=>t})}else return e instanceof wt?new wt({...e._def,type:Qr(e.element)}):e instanceof Be?Be.create(Qr(e.unwrap())):e instanceof nt?nt.create(Qr(e.unwrap())):e instanceof rt?rt.create(e.items.map(t=>Qr(t))):e}var ve=class e extends M{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=V.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==v.object){let l=this._getOrReturnCtx(t);return b(l,{code:y.invalid_type,expected:v.object,received:l.parsedType}),A}let{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof ze&&this._def.unknownKeys==="strip"))for(let l in o.data)s.includes(l)||a.push(l);let c=[];for(let l of s){let d=i[l],f=o.data[l];c.push({key:{status:"valid",value:l},value:d._parse(new Ne(o,f,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof ze){let l=this._def.unknownKeys;if(l==="passthrough")for(let d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:o.data[d]}});else if(l==="strict")a.length>0&&(b(o,{code:y.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let d of a){let f=o.data[d];c.push({key:{status:"valid",value:d},value:l._parse(new Ne(o,f,o.path,d)),alwaysSet:d in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let l=[];for(let d of c){let f=await d.key,m=await d.value;l.push({key:f,value:m,alwaysSet:d.alwaysSet})}return l}).then(l=>fe.mergeObjectSync(n,l)):fe.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return _.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:_.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:I.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of V.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of V.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return Qr(this)}partial(t){let r={};for(let n of V.objectKeys(this.shape)){let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of V.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Be;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return rp(V.objectKeys(this.shape))}};ve.create=(e,t)=>new ve({shape:()=>e,unknownKeys:"strip",catchall:ze.create(),typeName:I.ZodObject,...B(t)});ve.strictCreate=(e,t)=>new ve({shape:()=>e,unknownKeys:"strict",catchall:ze.create(),typeName:I.ZodObject,...B(t)});ve.lazycreate=(e,t)=>new ve({shape:e,unknownKeys:"strip",catchall:ze.create(),typeName:I.ZodObject,...B(t)});var dr=class extends M{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new be(a.ctx.common.issues));return b(r,{code:y.invalid_union,unionErrors:s}),A}if(r.common.async)return Promise.all(n.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let c of n){let l={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:l});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new be(c));return b(r,{code:y.invalid_union,unionErrors:a}),A}}get options(){return this._def.options}};dr.create=(e,t)=>new dr({options:e,typeName:I.ZodUnion,...B(t)});var ht=e=>e instanceof pr?ht(e.schema):e instanceof Me?ht(e.innerType()):e instanceof mr?[e.value]:e instanceof gr?e.options:e instanceof hr?V.objectValues(e.enum):e instanceof yr?ht(e._def.innerType):e instanceof lr?[void 0]:e instanceof ur?[null]:e instanceof Be?[void 0,...ht(e.unwrap())]:e instanceof nt?[null,...ht(e.unwrap())]:e instanceof to||e instanceof Dr?ht(e.unwrap()):e instanceof wr?ht(e._def.innerType):[],xi=class e extends M{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==v.object)return b(r,{code:y.invalid_type,expected:v.object,received:r.parsedType}),A;let n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(b(r,{code:y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),A)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let i of r){let s=ht(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new e({typeName:I.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...B(n)})}};function sc(e,t){let r=tt(e),n=tt(t);if(e===t)return{valid:!0,data:e};if(r===v.object&&n===v.object){let o=V.objectKeys(t),i=V.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=sc(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===v.array&&n===v.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=sc(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===v.date&&n===v.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var fr=class extends M{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(i,s)=>{if(Fi(i)||Fi(s))return A;let a=sc(i.value,s.value);return a.valid?((Ei(i)||Ei(s))&&r.dirty(),{status:r.value,value:a.data}):(b(n,{code:y.invalid_intersection_types}),A)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};fr.create=(e,t,r)=>new fr({left:e,right:t,typeName:I.ZodIntersection,...B(r)});var rt=class e extends M{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==v.array)return b(n,{code:y.invalid_type,expected:v.array,received:n.parsedType}),A;if(n.data.length<this._def.items.length)return b(n,{code:y.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&n.data.length>this._def.items.length&&(b(n,{code:y.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Ne(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>fe.mergeArray(r,s)):fe.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};rt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new rt({items:e,typeName:I.ZodTuple,rest:null,...B(t)})};var Ci=class e extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==v.object)return b(n,{code:y.invalid_type,expected:v.object,received:n.parsedType}),A;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in n.data)o.push({key:i._parse(new Ne(n,a,n.path,a)),value:s._parse(new Ne(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?fe.mergeObjectAsync(r,o):fe.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof M?new e({keyType:t,valueType:r,typeName:I.ZodRecord,...B(n)}):new e({keyType:Mt.create(),valueType:t,typeName:I.ZodRecord,...B(r)})}},rn=class extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==v.map)return b(n,{code:y.invalid_type,expected:v.map,received:n.parsedType}),A;let o=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([a,c],l)=>({key:o._parse(new Ne(n,a,n.path,[l,"key"])),value:i._parse(new Ne(n,c,n.path,[l,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let l=await c.key,d=await c.value;if(l.status==="aborted"||d.status==="aborted")return A;(l.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(l.value,d.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let l=c.key,d=c.value;if(l.status==="aborted"||d.status==="aborted")return A;(l.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(l.value,d.value)}return{status:r.value,value:a}}}};rn.create=(e,t,r)=>new rn({valueType:t,keyType:e,typeName:I.ZodMap,...B(r)});var nn=class e extends M{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==v.set)return b(n,{code:y.invalid_type,expected:v.set,received:n.parsedType}),A;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(b(n,{code:y.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(b(n,{code:y.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let l=new Set;for(let d of c){if(d.status==="aborted")return A;d.status==="dirty"&&r.dirty(),l.add(d.value)}return{status:r.value,value:l}}let a=[...n.data.values()].map((c,l)=>i._parse(new Ne(n,c,n.path,l)));return n.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:_.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:_.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};nn.create=(e,t)=>new nn({valueType:e,minSize:null,maxSize:null,typeName:I.ZodSet,...B(t)});var _i=class e extends M{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==v.function)return b(r,{code:y.invalid_type,expected:v.function,received:r.parsedType}),A;function n(a,c){return eo({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Yr(),gt].filter(l=>!!l),issueData:{code:y.invalid_arguments,argumentsError:c}})}function o(a,c){return eo({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Yr(),gt].filter(l=>!!l),issueData:{code:y.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Wt){let a=this;return me(async function(...c){let l=new be([]),d=await a._def.args.parseAsync(c,i).catch(g=>{throw l.addIssue(n(c,g)),l}),f=await Reflect.apply(s,this,d);return await a._def.returns._def.type.parseAsync(f,i).catch(g=>{throw l.addIssue(o(f,g)),l})})}else{let a=this;return me(function(...c){let l=a._def.args.safeParse(c,i);if(!l.success)throw new be([n(c,l.error)]);let d=Reflect.apply(s,this,l.data),f=a._def.returns.safeParse(d,i);if(!f.success)throw new be([o(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:rt.create(t).rest(yt.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||rt.create([]).rest(yt.create()),returns:r||yt.create(),typeName:I.ZodFunction,...B(n)})}},pr=class extends M{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};pr.create=(e,t)=>new pr({getter:e,typeName:I.ZodLazy,...B(t)});var mr=class extends M{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return b(r,{received:r.data,code:y.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:t.data}}get value(){return this._def.value}};mr.create=(e,t)=>new mr({value:e,typeName:I.ZodLiteral,...B(t)});function rp(e,t){return new gr({values:e,typeName:I.ZodEnum,...B(t)})}var gr=class e extends M{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return b(r,{expected:V.joinValues(n),received:r.parsedType,code:y.invalid_type}),A}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return b(r,{received:r.data,code:y.invalid_enum_value,options:n}),A}return me(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};gr.create=rp;var hr=class extends M{_parse(t){let r=V.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==v.string&&n.parsedType!==v.number){let o=V.objectValues(r);return b(n,{expected:V.joinValues(o),received:n.parsedType,code:y.invalid_type}),A}if(this._cache||(this._cache=new Set(V.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=V.objectValues(r);return b(n,{received:n.data,code:y.invalid_enum_value,options:o}),A}return me(t.data)}get enum(){return this._def.values}};hr.create=(e,t)=>new hr({values:e,typeName:I.ZodNativeEnum,...B(t)});var Wt=class extends M{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==v.promise&&r.common.async===!1)return b(r,{code:y.invalid_type,expected:v.promise,received:r.parsedType}),A;let n=r.parsedType===v.promise?r.data:Promise.resolve(r.data);return me(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Wt.create=(e,t)=>new Wt({type:e,typeName:I.ZodPromise,...B(t)});var Me=class extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===I.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{b(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(n.data,i);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return A;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?A:c.status==="dirty"?or(c.value):r.value==="dirty"?or(c.value):c});{if(r.value==="aborted")return A;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?A:a.status==="dirty"?or(a.value):r.value==="dirty"?or(a.value):a}}if(o.type==="refinement"){let s=a=>{let c=o.refinement(a,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?A:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?A:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Nt(s))return A;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>Nt(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:r.value,value:a})):A);V.assertNever(o)}};Me.create=(e,t,r)=>new Me({schema:e,typeName:I.ZodEffects,effect:t,...B(r)});Me.createWithPreprocess=(e,t,r)=>new Me({schema:t,effect:{type:"preprocess",transform:e},typeName:I.ZodEffects,...B(r)});var Be=class extends M{_parse(t){return this._getType(t)===v.undefined?me(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Be.create=(e,t)=>new Be({innerType:e,typeName:I.ZodOptional,...B(t)});var nt=class extends M{_parse(t){return this._getType(t)===v.null?me(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};nt.create=(e,t)=>new nt({innerType:e,typeName:I.ZodNullable,...B(t)});var yr=class extends M{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===v.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};yr.create=(e,t)=>new yr({innerType:e,typeName:I.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...B(t)});var wr=class extends M{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Xr(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new be(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new be(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};wr.create=(e,t)=>new wr({innerType:e,typeName:I.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...B(t)});var on=class extends M{_parse(t){if(this._getType(t)!==v.nan){let n=this._getOrReturnCtx(t);return b(n,{code:y.invalid_type,expected:v.nan,received:n.parsedType}),A}return{status:"valid",value:t.data}}};on.create=e=>new on({typeName:I.ZodNaN,...B(e)});var gw=Symbol("zod_brand"),to=class extends M{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},ro=class e extends M{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?A:i.status==="dirty"?(r.dirty(),or(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?A:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:I.ZodPipeline})}},Dr=class extends M{_parse(t){let r=this._def.innerType._parse(t),n=o=>(Nt(o)&&(o.value=Object.freeze(o.value)),o);return Xr(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};Dr.create=(e,t)=>new Dr({innerType:e,typeName:I.ZodReadonly,...B(t)});function Xf(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function np(e,t={},r){return e?Lt.create().superRefine((n,o)=>{let i=e(n);if(i instanceof Promise)return i.then(s=>{if(!s){let a=Xf(t,n),c=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=Xf(t,n),a=s.fatal??r??!0;o.addIssue({code:"custom",...s,fatal:a})}}):Lt.create()}var hw={object:ve.lazycreate},I;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(I||(I={}));var yw=(e,t={message:`Input not instance of ${e.name}`})=>np(r=>r instanceof e,t),op=Mt.create,ip=ir.create,ww=on.create,Dw=sr.create,sp=ar.create,bw=cr.create,vw=en.create,Fw=lr.create,Ew=ur.create,xw=Lt.create,Cw=yt.create,_w=ze.create,kw=tn.create,Sw=wt.create,Tw=ve.create,Aw=ve.strictCreate,Ow=dr.create,Iw=xi.create,Pw=fr.create,$w=rt.create,Rw=Ci.create,jw=rn.create,Bw=nn.create,Nw=_i.create,Mw=pr.create,Lw=mr.create,Ww=gr.create,Uw=hr.create,Vw=Wt.create,Jw=Me.create,Gw=Be.create,zw=nt.create,qw=Me.createWithPreprocess,Hw=ro.create,Kw=()=>op().optional(),Zw=()=>ip().optional(),Yw=()=>sp().optional(),Xw={string:e=>Mt.create({...e,coerce:!0}),number:e=>ir.create({...e,coerce:!0}),boolean:e=>ar.create({...e,coerce:!0}),bigint:e=>sr.create({...e,coerce:!0}),date:e=>cr.create({...e,coerce:!0})};var Qw=A;function ki(e,t=!1){let r=e.length,n=0,o="",i=0,s=16,a=0,c=0,l=0,d=0,f=0;function m(E,P){let Z=0,O=0;for(;Z<E||!P;){let S=e.charCodeAt(n);if(S>=48&&S<=57)O=O*16+S-48;else if(S>=65&&S<=70)O=O*16+S-65+10;else if(S>=97&&S<=102)O=O*16+S-97+10;else break;n++,Z++}return Z<E&&(O=-1),O}function g(E){n=E,o="",i=0,s=16,f=0}function w(){let E=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&sn(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&sn(e.charCodeAt(n)))for(n++;n<e.length&&sn(e.charCodeAt(n));)n++;else return f=3,e.substring(E,n);let P=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&sn(e.charCodeAt(n))){for(n++;n<e.length&&sn(e.charCodeAt(n));)n++;P=n}else f=3;return e.substring(E,P)}function x(){let E="",P=n;for(;;){if(n>=r){E+=e.substring(P,n),f=2;break}let Z=e.charCodeAt(n);if(Z===34){E+=e.substring(P,n),n++;break}if(Z===92){if(E+=e.substring(P,n),n++,n>=r){f=2;break}switch(e.charCodeAt(n++)){case 34:E+='"';break;case 92:E+="\\";break;case 47:E+="/";break;case 98:E+="\b";break;case 102:E+="\f";break;case 110:E+=`
|
|
93
|
+
`;break;case 114:E+="\r";break;case 116:E+=" ";break;case 117:let S=m(4,!0);S>=0?E+=String.fromCharCode(S):f=4;break;default:f=5}P=n;continue}if(Z>=0&&Z<=31)if(no(Z)){E+=e.substring(P,n),f=2;break}else f=6;n++}return E}function k(){if(o="",f=0,i=n,c=a,d=l,n>=r)return i=r,s=17;let E=e.charCodeAt(n);if(ac(E)){do n++,o+=String.fromCharCode(E),E=e.charCodeAt(n);while(ac(E));return s=15}if(no(E))return n++,o+=String.fromCharCode(E),E===13&&e.charCodeAt(n)===10&&(n++,o+=`
|
|
94
|
+
`),a++,l=n,s=14;switch(E){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,o=x(),s=10;case 47:let P=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<r&&!no(e.charCodeAt(n));)n++;return o=e.substring(P,n),s=12}if(e.charCodeAt(n+1)===42){n+=2;let Z=r-1,O=!1;for(;n<Z;){let S=e.charCodeAt(n);if(S===42&&e.charCodeAt(n+1)===47){n+=2,O=!0;break}n++,no(S)&&(S===13&&e.charCodeAt(n)===10&&n++,a++,l=n)}return O||(n++,f=1),o=e.substring(P,n),s=13}return o+=String.fromCharCode(E),n++,s=16;case 45:if(o+=String.fromCharCode(E),n++,n===r||!sn(e.charCodeAt(n)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=w(),s=11;default:for(;n<r&&X(E);)n++,E=e.charCodeAt(n);if(i!==n){switch(o=e.substring(i,n),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(E),n++,s=16}}function X(E){if(ac(E)||no(E))return!1;switch(E){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function z(){let E;do E=k();while(E>=12&&E<=15);return E}return{setPosition:g,getPosition:()=>n,scan:t?z:k,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>i,getTokenLength:()=>n-i,getTokenStartLine:()=>c,getTokenStartCharacter:()=>i-d,getTokenError:()=>f}}function ac(e){return e===32||e===9}function no(e){return e===10||e===13}function sn(e){return e>=48&&e<=57}var ap;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(ap||(ap={}));var tD=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),an=200,rD={" ":{"\n":new Array(an).fill(0).map((e,t)=>`
|
|
95
|
+
`+" ".repeat(t)),"\r":new Array(an).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(an).fill(0).map((e,t)=>`\r
|
|
96
|
+
`+" ".repeat(t))}," ":{"\n":new Array(an).fill(0).map((e,t)=>`
|
|
97
|
+
`+" ".repeat(t)),"\r":new Array(an).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(an).fill(0).map((e,t)=>`\r
|
|
98
|
+
`+" ".repeat(t))}};var Si;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Si||(Si={}));function cp(e,t=[],r=Si.DEFAULT){let n=null,o=[],i=[];function s(c){Array.isArray(o)?o.push(c):n!==null&&(o[n]=c)}return lp(e,{onObjectBegin:()=>{let c={};s(c),i.push(o),o=c,n=null},onObjectProperty:c=>{n=c},onObjectEnd:()=>{o=i.pop()},onArrayBegin:()=>{let c=[];s(c),i.push(o),o=c,n=null},onArrayEnd:()=>{o=i.pop()},onLiteralValue:s,onError:(c,l,d)=>{t.push({error:c,offset:l,length:d})}},r),o[0]}function lp(e,t,r=Si.DEFAULT){let n=ki(e,!1),o=[],i=0;function s(K){return K?()=>i===0&&K(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function a(K){return K?ce=>i===0&&K(ce,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function c(K){return K?ce=>i===0&&K(ce,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice()):()=>!0}function l(K){return K?()=>{i>0?i++:K(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice())===!1&&(i=1)}:()=>!0}function d(K){return K?()=>{i>0&&i--,i===0&&K(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}let f=l(t.onObjectBegin),m=c(t.onObjectProperty),g=d(t.onObjectEnd),w=l(t.onArrayBegin),x=d(t.onArrayEnd),k=c(t.onLiteralValue),X=a(t.onSeparator),z=s(t.onComment),E=a(t.onError),P=r&&r.disallowComments,Z=r&&r.allowTrailingComma;function O(){for(;;){let K=n.scan();switch(n.getTokenError()){case 4:S(14);break;case 5:S(15);break;case 3:S(13);break;case 1:P||S(11);break;case 2:S(12);break;case 6:S(16);break}switch(K){case 12:case 13:P?S(10):z();break;case 16:S(1);break;case 15:case 14:break;default:return K}}}function S(K,ce=[],Oc=[]){if(E(K),ce.length+Oc.length>0){let uo=n.getToken();for(;uo!==17;){if(ce.indexOf(uo)!==-1){O();break}else if(Oc.indexOf(uo)!==-1)break;uo=O()}}}function yn(K){let ce=n.getTokenValue();return K?k(ce):(m(ce),o.push(ce)),O(),!0}function Wi(){switch(n.getToken()){case 11:let K=n.getTokenValue(),ce=Number(K);isNaN(ce)&&(S(2),ce=0),k(ce);break;case 7:k(null);break;case 8:k(!0);break;case 9:k(!1);break;default:return!1}return O(),!0}function Ui(){return n.getToken()!==10?(S(3,[],[2,5]),!1):(yn(!1),n.getToken()===6?(X(":"),O(),Vi()||S(4,[],[2,5])):S(5,[],[2,5]),o.pop(),!0)}function Zm(){f(),O();let K=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(K||S(4,[],[]),X(","),O(),n.getToken()===2&&Z)break}else K&&S(6,[],[]);Ui()||S(4,[],[2,5]),K=!0}return g(),n.getToken()!==2?S(7,[2],[]):O(),!0}function Ym(){w(),O();let K=!0,ce=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(ce||S(4,[],[]),X(","),O(),n.getToken()===4&&Z)break}else ce&&S(6,[],[]);K?(o.push(0),K=!1):o[o.length-1]++,Vi()||S(4,[],[4,5]),ce=!0}return x(),K||o.pop(),n.getToken()!==4?S(8,[4],[]):O(),!0}function Vi(){switch(n.getToken()){case 3:return Ym();case 1:return Zm();case 10:return yn(!0);default:return Wi()}}return O(),n.getToken()===17?r.allowEmptyContent?!0:(S(4,[],[]),!1):Vi()?(n.getToken()!==17&&S(9,[],[]),!0):(S(4,[],[]),!1)}var up;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(up||(up={}));var dp;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(dp||(dp={}));var br=cp;var fp;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(fp||(fp={}));var mn=h(require("fs")),Fp=h(require("path"));var cn=class extends Error{remediation;documentationUrl;cause;constructor(t,r){super(t),this.name="FrameworkError",this.cause=r?.cause,this.remediation=r?.remediation,this.documentationUrl=r?.documentationUrl,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toDisplayString(){let t=this.message;return this.remediation&&(t+=`
|
|
130
99
|
|
|
131
100
|
How to fix: ${this.remediation}`),this.documentationUrl&&(t+=`
|
|
132
101
|
|
|
133
|
-
Documentation: ${this.documentationUrl}`),t}},
|
|
102
|
+
Documentation: ${this.documentationUrl}`),t}},ae=class extends cn{constructor(t,r){super(t,r),this.name="FrameworkValidationError"}};var vr=class extends cn{configFile;constructor(t,r){super(t,r),this.name="FrameworkConfigError",this.configFile=r?.configFile}toDisplayString(){let t=super.toDisplayString();return this.configFile&&(t+=`
|
|
134
103
|
|
|
135
|
-
Config file: ${this.configFile}`),t}},
|
|
104
|
+
Config file: ${this.configFile}`),t}},Ut=class extends cn{constructor(t,r){super(t,r),this.name="FrameworkDetectionError"}};var Ee=h(require("path")),io=h(require("fs"));var Le=class{static frameworkName="";ctx;constructor(t){this.ctx=t}static detect(t,r){return{detected:!1}}static detectFromBuiltOutput(t){return!1}static getOutputDeployMetadata(){throw new Error("getOutputDeployMetadata must be implemented by the framework subclass")}getOutputDeployMetadata(){return this.constructor.getOutputDeployMetadata()}async postBuild(){}getAdditionalConfigFiles(){return[]}getUserConfigPatterns(){return[]}hasDependency(t){let{packageJson:r}=this.ctx;return t in(r.dependencies||{})||t in(r.devDependencies||{})}getDependencyVersion(t){let{packageJson:r}=this.ctx;return r.dependencies?.[t]||r.devDependencies?.[t]}get log(){return this.ctx.log}get cwd(){return this.ctx.cwd}};var wp=h(require("semver")),ie=h(require("fs")),ot=h(require("path"));var Fr=h(require("semver"));function lD(){return process.version.slice(1)}function uD(e){let t=Fr.coerce(e);return t?t.major:null}function dD(e,t){let r=Fr.coerce(e),n=Fr.coerce(t);return!r||!n?!1:Fr.gte(r,n)}function ln(e,t,r){let n=lD(),o=t.minimum;if(dD(n,o))e.debug(`Node.js version ${n} meets requirement ${o}`);else{let i=uD(o),s=`${r} requires Node.js ${o} or higher. Current version: ${n}`;if(t.severity==="error")throw new ae(s,{remediation:`Please upgrade Node.js to ${o} or higher. You can use nvm, fnm, or similar tools to manage Node.js versions.
|
|
136
105
|
|
|
137
106
|
nvm install ${i}
|
|
138
|
-
nvm use ${i}`,documentationUrl:"https://nodejs.org/en/download/"});e.warn(`${s}. Build may fail or behave unexpectedly.`)}}var
|
|
139
|
-
`));let i=
|
|
140
|
-
`));let i
|
|
141
|
-
`)):
|
|
107
|
+
nvm use ${i}`,documentationUrl:"https://nodejs.org/en/download/"});e.warn(`${s}. Build may fail or behave unexpectedly.`)}}var Ti=h(require("fs")),pp=h(require("path"));var mp=$.object({name:$.string().optional(),version:$.string().optional(),dependencies:$.record($.string()).optional(),devDependencies:$.record($.string()).optional()});function oo(e){let t=pp.default.join(e,"package.json");if(!Ti.statSync(t,{throwIfNoEntry:!1}))return;let r=Ti.readFileSync(t).toString("utf8"),n;try{n=JSON.parse(r)}catch(o){throw new ae("package.json was not valid JSON",{cause:o})}try{return mp.parse(n)}catch(o){throw new ae("package.json schema validation failed",{cause:o})}}var Ai=h(require("fs")),gp=h(require("path"));var Oi=$.object({cloud:$.object({framework:$.string().optional(),assets_path_prefix:$.string().optional(),entrypoint_path:$.string().optional(),deployment_type:$.enum(["spa","ssg","ssr","ssr-spa-combo"]).optional(),skip_no_bundle:$.boolean().optional(),assets_source_skip_mount_path:$.boolean().optional()}).passthrough().optional()}).passthrough();function un(e,t,r="webflow.json"){let n=gp.default.join(t,r);if(!Ai.statSync(n,{throwIfNoEntry:!1}))return r.endsWith(".json")?un(e,t,r+"c"):void 0;let o=Ai.readFileSync(n).toString("utf8"),i;try{i=br(o)}catch(s){e?.error(`loaded but could not parse as JSONC ${n} ${JSON.stringify(o)}: ${s}`);return}try{let s=Oi.parse(i);return e.debug(`loaded ${n}: ${JSON.stringify(s)}`),s}catch(s){e?.error(`${n} was valid JSON but schema validation failed: ${s}`);return}}var hp=require("child_process"),yp=["--no-update-notifier","--no-progress","--no-audit","--no-fund"];async function Fe(e){let{log:t,cwd:r,args:n}=e,o={...process.env,...e.env||{},WRANGLER_SEND_METRICS:"false",NEXT_TELEMETRY_DISABLED:"1"},i=[...yp,...n];t.debug(`npm ${i.join(" ")} (in ${r})`),(0,hp.execSync)(`npm ${i.map(s=>JSON.stringify(s)).join(" ")}`,{cwd:r,env:o,stdio:"inherit"})}function Vt(e){if(!e)return null;let t=wp.coerce(e);return t?t.major:null}function Er(e,t,r,n){let o=n?.exclude?Array.isArray(n.exclude)?n.exclude:[n.exclude]:[],i=ot.basename(t);if(o.some(c=>i===c))return e.trace(`Skipping excluded: ${t}`),0;let s=ie.statSync(t,{throwIfNoEntry:!1});if(!s)return e.trace(`Source does not exist: ${t}`),0;if(s.isDirectory()){e.trace(`Copying directory: ${t} -> ${r}`);let c=ie.readdirSync(t),l=0;for(let d of c)l+=Er(e,ot.join(t,d),ot.join(r,d),n);return l}let a=ot.dirname(r);return ie.existsSync(a)||ie.mkdirSync(a,{recursive:!0}),e.trace(`Copying file: ${t} -> ${r}`),ie.copyFileSync(t,r),1}function qe(e){return ie.existsSync(e)}function it(...e){for(let t of e)if(ie.existsSync(t))return t;return e[0]??""}async function Jt(e,t,r,n){if(!ie.existsSync(t))throw new vr(`Template not found: ${t}`,{configFile:t});let o=ie.readFileSync(t,"utf8");e.debug(`envsubst: ${t} -> ${r}`);let i=n||process.env,s=o.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g,(c,l)=>i[l]??"").replace(/\$([A-Za-z_][A-Za-z0-9_]*)/g,(c,l)=>i[l]??""),a=ot.dirname(r);ie.existsSync(a)||ie.mkdirSync(a,{recursive:!0}),ie.writeFileSync(r,s)}function Gt(e,t,r,n){for(let o of n){let i=ot.join(t,`${r}.${o}`);if(ie.existsSync(i)){let s=ot.join(t,`clouduser.${r}.${o}`);return e.info(`Renaming user config: ${r}.${o} -> clouduser.${r}.${o}`),ie.renameSync(i,s),s}}return null}var lc=it(Ee.join(__dirname,"templates","astro","v5"),Ee.join(__dirname,"templates","v5")),Dp=it(Ee.join(__dirname,"templates","astro"),Ee.join(__dirname,"templates")),xr=class extends Le{static frameworkName="astro";get info(){return{name:"astro",version:"5.x",displayName:"Astro 5"}}static detect(t,r){let n=r?.cloud?.framework;if(n&&n!=="astro")return{detected:!1};let o=t.dependencies?.astro||t.devDependencies?.astro;if(!o)return n==="astro"?{detected:!0,reason:"Specified as astro in webflow.json"}:{detected:!1};let i=Vt(o);return i!==null&&i>=6?{detected:!1}:{detected:!0,reason:`Found astro@${o}`}}async validate(){let{log:t,packageJson:r}=this.ctx,n=this.getNodeVersionRequirement();n&&ln(t,n,this.info.displayName);let o=r.dependencies?.astro||r.devDependencies?.astro;if(!o)throw new ae("Astro is not installed in this project.",{remediation:"Install Astro by running: npm install astro@^5.0.0",documentationUrl:"https://docs.astro.build/en/install/"});if(o==="latest")throw new ae('Astro version "latest" is not supported by Webflow Cloud.',{remediation:"Please specify a version, e.g.: npm install astro@^5.0.0"});let i=Vt(o);if(i!==null&&i>=6)throw new ae(`Astro ${i}.x detected but was routed to the Astro 5 builder. This is an internal error.`,{remediation:"Ensure your package.json has astro@^6.0.0 - the Astro 6 builder will be used automatically. If this persists, please report the issue."});t.info(`Validated Astro project: astro@${o}`)}getCloudflareAdapter(){return{name:"@astrojs/cloudflare",version:"^12.0.0"}}getRequiredIntegrations(){return[{name:"@astrojs/react",version:"^4.0.0",reason:"Required for Webflow React components"}]}async installDependencies(){let{log:t,cwd:r}=this.ctx,n=this.getCloudflareAdapter();this.hasDependency(n.name)||(t.warn(`Installing ${n.name}@${n.version} (required for Cloudflare deployment)...`),await Fe({log:t,cwd:r,args:["install","--save",`${n.name}@${n.version}`]}));for(let o of this.getRequiredIntegrations())this.hasDependency(o.name)||(t.warn(`Installing ${o.name}@${o.version} (${o.reason})...`),await Fe({log:t,cwd:r,args:["install","--save",`${o.name}@${o.version}`]}))}getWebflowLoader(){return{templatePath:Ee.join(lc,"webflow-loader.ts"),destinationName:"webflow-loader.ts",configPath:"./webflow-loader.ts"}}getUserConfigPatterns(){return["astro.config.mjs","astro.config.cjs","astro.config.js","astro.config.ts"]}getWranglerTemplatePath(){return Ee.join(lc,"wrangler.json")}getAdditionalConfigFiles(){return[this.getWebflowLoader().templatePath,Ee.join(Dp,"astro.config.webflow.ts")]}async prepareConfig(){let{log:t,cwd:r,userEnv:n}=this.ctx;Gt(t,r,"astro.config",["mjs","cjs","js","ts"])===null&&(t.info("no user astro.config.{mjs,cjs,js,ts} found \u2014 writing empty clouduser.astro.config.mjs stub"),io.writeFileSync(Ee.join(r,"clouduser.astro.config.mjs"),`export default {};
|
|
108
|
+
`));let i=Ee.join(Dp,"astro.config.webflow.ts");qe(i)&&(t.info("Copying astro.config.webflow.ts..."),io.copyFileSync(i,Ee.join(r,"astro.config.webflow.ts")));let s=Ee.join(lc,"astro.config.mjs.template"),a=Ee.join(r,"astro.config.mjs");t.info("Generating astro.config.mjs from template..."),await Jt(t,s,a,{...process.env,...n});let c=this.getWebflowLoader();qe(c.templatePath)&&(t.info(`Copying ${c.destinationName}...`),io.copyFileSync(c.templatePath,Ee.join(r,c.destinationName)))}getBuildCommand(){return"astro build"}getNodeVersionRequirement(){return{minimum:"18.0.0",severity:"error"}}static getOutputDeployMetadata(){return{staticAssetsPath:"dist",staticAssetsExclude:["_worker.js"],workerEntryPath:"dist/_worker.js/index.js",deploymentType:"ssr",dryRunEntryPath:"./index.js"}}};var xe=h(require("path")),so=h(require("fs"));var uc=it(xe.join(__dirname,"templates","astro","v6"),xe.join(__dirname,"templates","v6")),bp=it(xe.join(__dirname,"templates","astro"),xe.join(__dirname,"templates")),Cr=class extends Le{static frameworkName="astro";get info(){return{name:"astro",version:"6.x",displayName:"Astro 6"}}static detect(t,r){let n=r?.cloud?.framework;if(n&&n!=="astro")return{detected:!1};let o=t.dependencies?.astro||t.devDependencies?.astro;if(!o)return{detected:!1};let i=Vt(o);return i!==null&&i>=6?{detected:!0,reason:`Found astro@${o} (Astro ${i}.x)`}:{detected:!1}}async validate(){let{log:t,packageJson:r}=this.ctx,n=this.getNodeVersionRequirement();n&&ln(t,n,this.info.displayName);let o=r.dependencies?.astro||r.devDependencies?.astro;if(!o)throw new ae("Astro is not installed in this project.",{remediation:"Install Astro by running: npm install astro@^6.0.0",documentationUrl:"https://docs.astro.build/en/install/"});if(o==="latest")throw new ae('Astro version "latest" is not supported by Webflow Cloud.',{remediation:"Please specify a version, e.g.: npm install astro@^6.0.0"});let i=Vt(o);if(i!==null&&i<6)throw new ae(`Astro ${i}.x detected but Astro6Builder was selected. This is likely a configuration error.`,{remediation:"Use Astro5Builder for Astro 5.x projects, or upgrade: npm install astro@^6.0.0"});t.info(`Validated Astro 6 project: astro@${o}`)}getCloudflareAdapter(){return{name:"@astrojs/cloudflare",version:"^13.0.0",peerDependencies:["@cloudflare/vite-plugin"]}}getRequiredIntegrations(){return[{name:"@astrojs/react",version:"^5.0.0",reason:"Required for Webflow React components"}]}async installDependencies(){let{log:t,cwd:r}=this.ctx,n=this.getCloudflareAdapter();if(this.hasDependency(n.name)||(t.warn(`Installing ${n.name}@${n.version} (required for Cloudflare deployment)...`),await Fe({log:t,cwd:r,args:["install","--save",`${n.name}@${n.version}`]})),n.peerDependencies)for(let o of n.peerDependencies)this.hasDependency(o)||(t.warn(`Installing ${o} (peer dependency of ${n.name})...`),await Fe({log:t,cwd:r,args:["install","--save",o]}));for(let o of this.getRequiredIntegrations())this.hasDependency(o.name)||(t.warn(`Installing ${o.name}@${o.version} (${o.reason})...`),await Fe({log:t,cwd:r,args:["install","--save",`${o.name}@${o.version}`]}))}getWebflowLoader(){return{templatePath:xe.join(uc,"webflow-loader.ts"),destinationName:"webflow-loader.ts",configPath:"./webflow-loader.ts"}}getUserConfigPatterns(){return["astro.config.mjs","astro.config.cjs","astro.config.js","astro.config.ts"]}getWranglerTemplatePath(){return xe.join(uc,"wrangler.json")}getAdditionalConfigFiles(){return[this.getWebflowLoader().templatePath,xe.join(bp,"astro.config.webflow.ts")]}async prepareConfig(){let{log:t,cwd:r,userEnv:n}=this.ctx;Gt(t,r,"astro.config",["mjs","cjs","js","ts"])===null&&(t.info("no user astro.config.{mjs,cjs,js,ts} found \u2014 writing empty clouduser.astro.config.mjs stub"),so.writeFileSync(xe.join(r,"clouduser.astro.config.mjs"),`export default {};
|
|
109
|
+
`));let i=xe.join(bp,"astro.config.webflow.ts");qe(i)&&(t.info("Copying astro.config.webflow.ts..."),so.copyFileSync(i,xe.join(r,"astro.config.webflow.ts")));let s=xe.join(uc,"astro.config.mjs.template"),a=xe.join(r,"astro.config.mjs");t.info("Generating astro.config.mjs from template (Astro 6)..."),await Jt(t,s,a,{...process.env,...n});let c=this.getWebflowLoader();qe(c.templatePath)&&(t.info(`Copying ${c.destinationName}...`),so.copyFileSync(c.templatePath,xe.join(r,c.destinationName)))}getBuildCommand(){return"astro build"}getNodeVersionRequirement(){return{minimum:"22.12.0",severity:"error"}}static getOutputDeployMetadata(){return{staticAssetsPath:"dist/client",workerEntryPath:"dist/server/entry.mjs",wranglerMainOverride:"@astrojs/cloudflare/entrypoints/server",deploymentType:"ssr",usesAssetsBinding:!0,skipNoBundle:!0,assetsSourceSkipMountPath:!0,dryRunEntryPath:"./entry.mjs"}}};var se=h(require("path")),We=h(require("fs"));var dn=it(se.join(__dirname,"templates","nextjs"),se.join(__dirname,"templates")),fn=class extends Le{static frameworkName="nextjs";get info(){return{name:"nextjs",version:"*",displayName:"Next.js"}}static detect(t,r){let n=r?.cloud?.framework;return n==="nextjs"?{detected:!0,reason:"Specified as nextjs in webflow.json"}:n&&n!=="nextjs"?{detected:!1}:t.dependencies?.next!==void 0||t.devDependencies?.next!==void 0?{detected:!0,reason:'Found "next" in package.json'}:{detected:!1}}async validate(){let{log:t,packageJson:r}=this.ctx,n=r.dependencies?.next||r.devDependencies?.next;if(!n)throw new ae("Next.js is not installed in this project.",{remediation:"Install Next.js by running: npm install next",documentationUrl:"https://nextjs.org/docs/getting-started/installation"});t.info(`Validated Next.js project: next@${n}`)}getCloudflareAdapter(){return{name:"@opennextjs/cloudflare",version:"*"}}getRequiredIntegrations(){return[]}async installDependencies(){let{log:t,cwd:r}=this.ctx,n=this.getCloudflareAdapter();this.hasDependency(n.name)||(t.warn("nextjs integration requires @opennextjs/cloudflare and this project doesn't have it. installing now..."),await Fe({log:t,cwd:r,args:["install","--save",n.name]}))}getWebflowLoader(){return{templatePath:se.join(dn,"webflow-loader.ts"),destinationName:"webflow-loader.ts",configPath:"./webflow-loader.ts"}}getUserConfigPatterns(){return["next.config.mjs","next.config.cjs","next.config.js","next.config.ts"]}getWranglerTemplatePath(){return se.join(dn,"wrangler.json")}getAdditionalConfigFiles(){return[this.getWebflowLoader().templatePath,se.join(dn,"open-next.config.ts")]}findOpenNextConfig(){let t="open-next.config.ts";if(We.existsSync(se.join(this.cwd,t)))return t}ensureOpenNextConfig(t){let{log:r,cwd:n}=this.ctx,o=this.findOpenNextConfig();if(o){r.info(`${o} found, skipping creation (opennextjs-cloudflare will validate)`);return}if(r.info("open-next.config not found, creating open-next.config.ts with default Webflow Cloud configuration..."),!We.existsSync(t))throw new vr(`open-next.config.ts template not found at ${t}. This is a Webflow Cloud build system error.`,{configFile:t});let i=se.join(n,"open-next.config.ts");We.copyFileSync(t,i),r.info("open-next.config.ts created successfully")}async prepareConfig(){let{log:t,cwd:r,userEnv:n}=this.ctx,o=Gt(t,r,"next.config",["mjs","cjs","js","ts"]);o===null?(t.info("no user next.config.{mjs,cjs,js,ts} found \u2014 writing empty clouduser.next.config.ts stub"),We.writeFileSync(se.join(r,"clouduser.next.config.ts"),`export default {};
|
|
110
|
+
`)):se.extname(o)!==".ts"&&(t.info(`writing clouduser.next.config.d.ts shim for ${se.basename(o)}`),We.writeFileSync(se.join(r,"clouduser.next.config.d.ts"),`import type { UserNextConfig } from './next.config.webflow';
|
|
142
111
|
declare const config: UserNextConfig;
|
|
143
112
|
export default config;
|
|
144
|
-
`));let i=
|
|
113
|
+
`));let i=se.join(dn,"next.config.webflow.ts");qe(i)&&(t.info("Copying next.config.webflow.ts..."),We.copyFileSync(i,se.join(r,"next.config.webflow.ts")));let s=se.join(dn,"next.config.ts.template"),a=se.join(r,"next.config.ts");t.info("Generating next.config.ts from template..."),await Jt(t,s,a,{...process.env,...n});let c=this.getWebflowLoader();qe(c.templatePath)&&(t.info(`Copying ${c.destinationName}...`),We.copyFileSync(c.templatePath,se.join(r,c.destinationName)));let l=se.join(dn,"open-next.config.ts");this.ensureOpenNextConfig(l)}getBuildCommand(){return"opennextjs-cloudflare build"}getNodeVersionRequirement(){return{minimum:"18.0.0",severity:"error"}}static getOutputDeployMetadata(){return{staticAssetsPath:".open-next/assets",workerEntryPath:".open-next/worker.js",deploymentType:"ssr",dryRunEntryPath:"./worker.js"}}static detectFromBuiltOutput(t){return We.statSync(se.join(t,"./worker.js"),{throwIfNoEntry:!1})?.isFile()??!1}};var Ae=h(require("path")),Ue=h(require("fs"));var Ii=it(Ae.join(__dirname,"templates","vite"),Ae.join(__dirname,"templates")),pn=class extends Le{static frameworkName="vite";get info(){return{name:"vite",version:"6.x",displayName:"Vite"}}static detect(t,r){let n=r?.cloud?.framework;return n==="vite"?{detected:!0,reason:"Specified as vite in webflow.json"}:n&&n!=="vite"?{detected:!1}:t.dependencies?.vite!==void 0||t.devDependencies?.vite!==void 0?{detected:!0,reason:'Found "vite" in package.json'}:{detected:!1}}async validate(){let{log:t,packageJson:r}=this.ctx,n=r.dependencies?.vite||r.devDependencies?.vite;if(!n)throw new ae("Vite is not installed in this project.",{remediation:"Install Vite by running: npm install vite",documentationUrl:"https://vitejs.dev/guide/"});t.info(`Validated Vite project: vite@${n}`)}getCloudflareAdapter(){return{name:"@cloudflare/vite-plugin",version:"*"}}getRequiredIntegrations(){return[{name:"@cloudflare/workers-types",version:"*",dev:!0}]}async installDependencies(){let{log:t,cwd:r,packageJson:n}=this.ctx,o=n.devDependencies?.vite||n.dependencies?.vite||"",i=Vt(o);i!==null&&i<6&&(t.warn("Upgrading vite to ^6.1.0 (required by @cloudflare/vite-plugin)..."),await Fe({log:t,cwd:r,args:["install","--save-dev","vite@^6.1.0"]}));let s=this.getCloudflareAdapter();this.hasDependency(s.name)||(t.warn("Vite integration requires @cloudflare/vite-plugin, installing now..."),await Fe({log:t,cwd:r,args:["install","--save",s.name]}));let a=this.getRequiredIntegrations();for(let c of a)if(!this.hasDependency(c.name)){t.info(`Installing ${c.name}...`);let l=c.dev?["install","--save-dev",c.name]:["install","--save",c.name];await Fe({log:t,cwd:r,args:l})}}getWebflowLoader(){return null}getUserConfigPatterns(){return["vite.config.mjs","vite.config.cjs","vite.config.js","vite.config.ts"]}getWranglerTemplatePath(){return Ae.join(Ii,"wrangler.json")}getAdditionalConfigFiles(){return[Ae.join(Ii,"vite.config.webflow.ts")]}hasCustomWorkerEntry(){let{log:t,cwd:r}=this.ctx;for(let n of["wrangler.json","wrangler.jsonc"]){let o=Ae.join(r,n);if(Ue.existsSync(o)){try{let i=Ue.readFileSync(o,"utf8"),s=br(i);if(s?.main&&s.main!=="./src/worker.ts")return t.info(`user-provided ${n} has custom main entrypoint "${s.main}", will preserve user's worker`),!0}catch(i){t.warn(`failed to parse ${n}: ${i}`)}break}}return!1}ensureWorkerEntry(){let{log:t,cwd:r}=this.ctx,n=Ae.join(r,"src","worker.ts");if(Ue.existsSync(n)){t.info("src/worker.ts already exists, skipping creation");return}t.warn("src/worker.ts does not exist, creating a minimal worker..."),Ue.mkdirSync(Ae.join(r,"src"),{recursive:!0}),Ue.writeFileSync(n,`/// <reference types="@cloudflare/workers-types" />
|
|
145
114
|
|
|
146
115
|
interface Env {
|
|
147
116
|
ASSETS: Fetcher;
|
|
@@ -152,52 +121,52 @@ export default {
|
|
|
152
121
|
return env.ASSETS.fetch(request);
|
|
153
122
|
},
|
|
154
123
|
} satisfies ExportedHandler<Env>;
|
|
155
|
-
`)}async prepareConfig(){let{log:t,cwd:
|
|
156
|
-
`));let s=
|
|
157
|
-
`)}function
|
|
158
|
-
${
|
|
159
|
-
${
|
|
160
|
-
${E.bold.cyan(`${r}${o}`)}`)}async function wb(e=process.cwd(),t,n,r){let o=ni(e);if(!o)throw new Error("No package.json file found");let i=Yr(d,e),s={...r?{COSMIC_MOUNT_PATH:r}:{},...t?{COSMIC_DEPLOY_URL:t}:{},...n&&!t?{COSMIC_DEPLOY_URL:G2(n)}:{}};return Iu({cwd:e,log:d,packageJson:o,userEnv:s},i)}async function bb(e,t={}){let n=t.projectPath||process.cwd(),r=Date.now(),o=ne.join(n,".tmp",`webflow-build-${r}`),i=t.outputDir||ne.join(o,"output"),s=t.mountPath||"/app",a=Date.now(),l=Ru(n),c=t.telemetry,u=e.getBuildCommand(),p=e.getOutputDeployMetadata();await c?.sendUsage("cloud_build_start",{framework:e.info.name,buildCommand:u,deploymentType:p.deploymentType,mountPath:s,cloudflareBindings:l}),V.mkdirSync(o,{recursive:!0});try{Wt("\u{1F527}","Configure framework"),d.info(`Framework: ${e.info.displayName}`),d.info(`Mount path: ${s}`),d.info(`Deployment type: ${p.deploymentType}`);let f=e.getNodeVersionRequirement();f&&Kr(d,f,e.info.displayName),d.info("Validating framework requirements..."),await e.validate(),d.info("Installing framework dependencies..."),await e.installDependencies(),Wt("\u2699\uFE0F ","Configure wrangler"),await mb(e,n),d.info("Preparing framework configuration..."),await e.prepareConfig(),ju(d,n,e.info.name,e),Wt("\u{1F4E6}","Install dependencies"),await q2(n,e.info.name,t.telemetry),gb(n),Wt("\u{1F3D7}\uFE0F ","Build app"),d.info(`running ${u}...`),await H2(n,u,t.telemetry),await e.postBuild(),Wt("\u{1F9EA}","Wrangler dry-run"),await Z2(n,i),Wt("\u{1F4C1}","Copy assets"),await K2(n,i,e,s),Wt("\u{1F381}","Create tarball");let m=await Y2(i),h=Date.now()-a;return d.info(`${ee} Build completed in ${(h/1e3).toFixed(1)}s`),await c?.sendUsage("cloud_build_success",{duration:h,framework:e.info.name,buildCommand:u,deploymentType:p.deploymentType,mountPath:s,cloudflareBindings:l}),m}catch(f){let m=Date.now()-a;throw await c?.sendError(f instanceof Error?f:new Error(String(f)),"cloud_build_failure",{duration:m,framework:e.info.name,buildCommand:u,deploymentType:p.deploymentType,mountPath:s,cloudflareBindings:l}),f}}function Ru(e){let t=ne.join(e,"wrangler.json");if(!V.existsSync(t))return{hasKV:!1,hasD1:!1,hasR2:!1,hasVars:!1,kvCount:0,d1Count:0,r2Count:0,varCount:0};try{let n=JSON.parse(V.readFileSync(t,"utf8")),r=n.kv_namespaces||[],o=n.d1_databases||[],i=n.r2_buckets||[],s=n.vars||{};return{hasKV:r.length>0,hasD1:o.length>0,hasR2:i.length>0,hasVars:Object.keys(s).length>0,kvCount:r.length,d1Count:o.length,r2Count:i.length,varCount:Object.keys(s).length}}catch(n){return console.debug("Failed to parse wrangler.json for bindings detection:",n),{hasKV:!1,hasD1:!1,hasR2:!1,hasVars:!1,kvCount:0,d1Count:0,r2Count:0,varCount:0}}}function Db(e){try{let t=ne.dirname(e);t.includes(".tmp/webflow-build-")&&(Wt("\u{1F9F9}","Clean up build artifacts"),V.rmSync(t,{recursive:!0,force:!0}))}catch(t){d.warn(`Warning: Failed to clean up build artifacts: ${t}`)}}function vb(e,t){try{Wt("\u{1F9F9}","Revert framework configuration");let n=t.getUserConfigPatterns(),r=new Set;for(let s of n){let a=ne.extname(s).slice(1),l=ne.basename(s,`.${a}`);if(!r.has(l)){r.add(l);for(let c of["mjs","cjs","js","ts"]){let u=ne.join(e,`clouduser.${l}.${c}`),p=ne.join(e,`${l}.${c}`);if(V.existsSync(u)){d.info(`restoring /${l}.${c} from /clouduser.${l}.${c}...`),V.existsSync(p)&&V.unlinkSync(p),V.renameSync(u,p);break}}}}for(let s of[".jsonc",".json"]){let a=ne.join(e,`clouduser.wrangler${s}`);if(V.existsSync(a)){d.info(`restoring user wrangler${s} from backup...`);let l=ne.join(e,"wrangler.json");V.existsSync(l)&&V.unlinkSync(l);let c=ne.join(e,`wrangler${s}`);V.renameSync(a,c);break}}let o=ne.join(e,"clouduser");V.existsSync(o)&&(d.info("cleaning up clouduser directory..."),V.rmSync(o,{recursive:!0,force:!0}));for(let s of t.getAdditionalConfigFiles()){let a=ne.join(e,ne.basename(s));V.existsSync(a)&&(d.info(`cleaning up additional config file ${a}...`),V.unlinkSync(a))}let i=t.getWebflowLoader();if(i){let s=ne.join(e,i.destinationName);V.existsSync(s)&&(d.info(`cleaning up ${i.destinationName}...`),V.unlinkSync(s))}}catch(n){d.warn(`Warning: Failed to cleanup framework configuration: ${n}`)}}async function q2(e,t,n){let r=Date.now(),o=["--no-update-notifier","--no-progress"],i=ne.join(e,"package-lock.json");try{V.existsSync(i)?(d.info("Running npm ci --include=dev..."),(0,si.execSync)(`npm ci --include=dev ${o.join(" ")}`,{cwd:e,stdio:"inherit"})):(d.info("Warning: No package-lock.json found, installing dependencies with npm install --include=dev"),(0,si.execSync)(`npm install --include=dev ${o.join(" ")}`,{cwd:e,stdio:"inherit"}));let s=Date.now()-r;await n?.sendUsage("cloud_install_dependencies_success",{duration:s,framework:t,hasPackageLock:V.existsSync(i)})}catch(s){let a=Date.now()-r;throw await n?.sendError(s instanceof Error?s:new Error(String(s)),"cloud_install_dependencies_failure",{duration:a,framework:t,hasPackageLock:V.existsSync(i)}),s}}function G2(e){let t="production",n;switch(t){case"development":n="wf-app-dev";break;case"acceptance":n="wf-app-acceptance";break;default:n="wf-app-prod"}return`https://${e}.${n}.cosmic.webflow.services`}async function H2(e,t,n){let r=Date.now();try{(0,si.execSync)(`npm exec -- ${t}`,{cwd:e,stdio:"inherit"});let o=Date.now()-r;await n?.sendUsage("cloud_build_command_success",{duration:o,buildCommand:t})}catch(o){let i=Date.now()-r;throw await n?.sendError(o instanceof Error?o:new Error(String(o)),"cloud_build_command_failure",{duration:i,buildCommand:t}),new Error(`Build command failed: ${t}`)}}async function Z2(e,t){V.mkdirSync(t,{recursive:!0});let n=ne.join(e,"wrangler.json"),r=ne.join(e,"wrangler.jsonc");if(!V.existsSync(n)&&!V.existsSync(r))throw new Error("Missing wrangler configuration: wrangler.json or wrangler.jsonc file is required");(0,si.execSync)(`npx wrangler@${J2} deploy --dry-run --outdir="${t}"`,{cwd:e,stdio:"inherit"})}async function K2(e,t,n,r){let o=n.getOutputDeployMetadata(),i=o.staticAssetsPath,s=o.staticAssetsExclude?.[0],a=o.assetsSourceSkipMountPath===!0,l=r.replace(/\/+$/,"").replace(/^\/+/,"");if(!a&&l&&(n.info.name==="nextjs"||n.info.name==="astro")){let m=ne.join(e,i);if(V.existsSync(m)&&V.statSync(m).isDirectory()){let v=V.readdirSync(m,{withFileTypes:!0}).find(k=>!(!k.isDirectory()||s&&k.name===s||n.info.name==="astro"&&(k.name==="_routes.json"||k.name==="_worker.js")));v&&(i=`${i}/${v.name}`)}}let c=ne.join(t,"assets",l||"");V.mkdirSync(c,{recursive:!0});let u=ne.join(e,i);if(V.existsSync(u)&&V.statSync(u).isDirectory()){d.info(`copying assets from /${i} to output/assets...`);try{s?(d.info(`excluding ${s}`),tr(d,u,c,{exclude:s})):tr(d,u,c)}catch(m){d.error(m,{prefix:"Failed to copy assets:"})}}else d.info("No assets to copy or assets directory not found");let p=ne.join(e,"webflow.json");V.existsSync(p)?(d.info("including webflow.json in output..."),V.copyFileSync(p,ne.join(t,"webflow.json"))):d.warn("webflow.json not found at project root; deploy may fail framework detection");let f=null;for(let m of[".json",".jsonc"]){let h=ne.join(e,`clouduser.wrangler${m}`);if(V.existsSync(h)){f=h;break}}if(f){d.info("including user wrangler config in output..."),V.copyFileSync(f,ne.join(t,"clouduser.wrangler.json"));let m=ne.join(e,"clouduser","migrations");if(V.existsSync(m)){d.info("copying migrations from clouduser/migrations to output/migrations...");let h=ne.join(t,"migrations");tr(d,m,h)}}}async function Y2(e){let t=`${e}.tar.gz`;try{return await yb.create({gzip:!0,file:t,cwd:ne.dirname(e)},[ne.basename(e)]),d.info(`Tarball created: ${t}`),t}catch(n){throw new g(n,{prefix:"Failed to create tarball:"})}}ke();le();J();var X2="DUPLICATE_ENVIRONMENT_MOUNT",Q2="ENVIRONMENT_MOUNT_MISMATCH",eA="DUPLICATE_ENVIRONMENT_BRANCH",tA="INVALID_MOUNT_PATH_FORMAT",nA="INVALID_PROJECT_ID",kb={[X2]:"An environment with this mount path already exists for this site. Please choose a different mount path.",[Q2]:"This environment already exists with a different mount path. Please create a new environment or use the existing environment's mount path.",[eA]:"An environment with this branch already exists for this project.",[tA]:"Mount path format is invalid. It must start with a / and be followed by at least one character (e.g., /app).",[nA]:"Invalid project ID. This project may have been deleted or belongs to a different site. Please remove the 'project_id' from your webflow.json file and redeploy to create a new project."};function xb(e){let t={timestamp:new Date().toISOString()};if(e instanceof Error)t.code=e.name,t.msg=e.message,t.stack=e.stack;else if(typeof e=="object"&&e!==null){let i=e;t.code=typeof i.code=="string"?i.code:void 0,t.msg=typeof i.msg=="string"?i.msg:void 0,t.status=typeof i.status=="number"?i.status:void 0}let n=t.msg||"",r=t.status??t.code,o=typeof r=="number"?r:typeof r=="string"&&/^\d+$/.test(r)?Number(r):void 0;if(d.error(`Error Details: ${JSON.stringify({timestamp:t.timestamp,code:t.code,message:t.msg,status:t.status,stack:t.stack},null,2)}`),o===401)return"Your access token is expired or invalid. Run 'webflow auth login' to re-authenticate.";if(o===403)return"Your access token is missing required permissions. Run 'webflow auth login' to re-authenticate with the necessary scopes.";for(let i in kb)if(n.includes(i))return kb[i];return`An unknown error occurred. Error code: ${t.code||"N/A"}, Message: ${t.msg||"No message provided"}`}var no=w(require("fs")),$u=require("child_process");J();te();Ce();var Cb=104857600;function Eb(e){if(e===0)return"0 B";let t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(1))} ${n[r]}`}function rA(){try{let e=(0,$u.execSync)("git rev-parse HEAD",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();if(!/^[0-9a-f]{40}$/.test(e))throw new Error("Invalid commit hash format");try{return(0,$u.execSync)("git status --porcelain --untracked-files=no",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim().length>0?`git@${e}+dirty`:`git@${e}`}catch{return`git@${e}`}}catch{return`noversion@${new Date().toISOString()}`}}async function Bu(e,t,n){let r=await fetch(`${I}${t}`,{method:n.method,headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:n.body?JSON.stringify(n.body):void 0});if(!r.ok){let o=await r.text(),i;try{i=JSON.parse(o)}catch{i={msg:o}}let s=xb(i);throw new Error(s)}return r.json()}async function Fb(e,t,n,r){let{manifest:o}=Q(),i=o.cloud||{},s=i.project_id,a=i.framework;if(!a)throw new g("No framework specified in webflow.json. Please ensure your webflow.json has a cloud.framework property");let l=await oA({siteId:e.siteId,apiToken:e.accessToken,framework:a,mountPath:n,environment:t,projectId:s,projectName:r?.projectName,description:r?.description,directory:r?.directory,version:rA()});return!s&&l.project_id&&(d.info("\u{1F4DD} Updating webflow.json with project ID..."),se({cloud:{...i,project_id:l.project_id}})),l}async function oA(e){let{siteId:t,framework:n,mountPath:r,environment:o,version:i,projectId:s,projectName:a,description:l,directory:c}=e,u={framework:n,mount_path:r,environment:o,version:i};s&&(u.project_id=s),a&&(u.project_name=a),l&&(u.description=l),c&&(u.app_path=c);let p=t?`/cosmic/${t}/cli-deploy-init`:"/cosmic/cli-deploy-init";return Bu(e.apiToken,p,{method:"POST",body:u})}async function Sb(e,t){let{siteId:n,accessToken:r}=e,o=n?`/cosmic/${n}/cli-project-environments/${t}`:`/cosmic/cli-project-environments/${t}`;return Bu(r,o,{method:"GET"})}async function _b(e){let{siteId:t,accessToken:n}=e,r=t?`/cosmic/${t}/cli-projects`:"/cosmic/cli-projects";return Bu(n,r,{method:"GET"})}async function Ab(e,t){if(!no.existsSync(e))throw new Error(`Tarball not found at ${e}`);let n=no.statSync(e);if(n.size>Cb)throw new Error(`Build output is too large (${Eb(n.size)}). Maximum allowed size is ${Eb(Cb)}.`);let r=no.readFileSync(e),o=JSON.parse(t);if(!o.fields)throw new Error("Upload URL is missing fields property");let i=new FormData;Object.entries(o.fields).forEach(([l,c])=>{i.append(l,c)});let s=new Blob([r],{type:"application/gzip"});i.append("file",s,"output.tar.gz");let a=await fetch(o.url,{method:"POST",body:i});if(!a.ok){let l=await a.text();throw new g(l,{prefix:`${N} Upload failed with response:`})}}async function Tb(e,t){if(!e||e==="undefined")throw new g("Completion URL is undefined or invalid");let n=new URL(e);t&&n.searchParams.set("failed","true");let r=await fetch(n.toString(),{method:"GET"});if(!r.ok)throw new g(`Failed to trigger deployment: ${r.status} ${r.statusText}`)}var Ob=require("webflow-api");le();le();te();function Nu(e){return new Ob.WebflowClient({accessToken:e,environment:{base:`${I}/v2`,dataApi:`${I}/v2`,contentDeliveryApi:`${xi}/v2`}})}async function ai(e,t){try{let r=await Nu(e).sites.get(t);return{id:r.id||t,displayName:r.displayName||"Unknown Site",shortName:r.shortName||"unknown-site",customDomains:r.customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(n){throw new g(n,{prefix:"Error fetching site details:"})}}async function Lu(e,t){try{return{customDomains:(await Nu(e).sites.getCustomDomain(t)).customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(n){throw new g(n,{prefix:"Error fetching custom domains:"})}}async function Mu(e){try{let t=await fetch(`https://${e}/manifest.json`);if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);return await t.json()}catch(t){throw new g(t,{prefix:`Failed to fetch manifest from ${e}:`})}}function Wu(e,t,n){return e.cosmic&&Array.isArray(e.cosmic)?e.cosmic.some(r=>{if(r.mountPath!==t)return!1;if(!n)return!0;if(r.workerUrl)try{return new URL(r.workerUrl).hostname.split(".")[0]===n}catch{return!1}return!1}):!1}async function Pb(e,t,n){try{let r=Nu(e),o=await ai(e,t),i=[];if(n?.domains&&n.domains.length>0)for(let s of n.domains){let a=o.customDomains?.find(l=>l.url===s);a?.id&&i.push(a.id)}await r.sites.publish(t,{customDomains:i,publishToWebflowSubdomain:n?.publishToWebflowSubdomain??!0})}catch(r){throw new g(r,{prefix:"Error publishing site:"})}}Me();$a();J();async function Ib(e,t,n){let{siteId:r,accessToken:o}=e;if(!r)throw new Error("Site ID is required for mount path validation. Standalone apps skip this step.");let i=cr("Validating mount path configuration...").start();try{let s=await ai(o,r),a=await Lu(o,r),l=[`${s.shortName}.webflow.io`,...a.customDomains?.map(h=>h.url)||[]],c=0;i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (0/${l.length})`;let u=l.map(async h=>{try{let v=await Mu(h),k=Array.isArray(v.cosmic)?v.cosmic.map(P=>P.mountPath).filter(P=>typeof P=="string"):[],T=Wu(v,t,n);return{domain:h,mountPaths:k,isValid:T===!0}}catch(v){return{domain:h,mountPaths:[],isValid:!1,error:v instanceof Error?v.message:String(v)}}finally{c++,i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (${c}/${l.length})`}}),p=await Promise.all(u),f=p.some(h=>!h.isValid),m=p.every(h=>h.isValid);return i.succeed("Mount path validation completed"),{isValid:m,domains:p,needsPublishing:f}}catch(s){throw i.fail("Mount path validation failed"),s}}async function jb(e,t,n){let{siteId:r,accessToken:o}=e;if(!r)return[];try{let i=await ai(o,r),s=await Lu(o,r),l=[`${i.shortName}.webflow.io`,...s.customDomains?.map(u=>u.url)||[]].map(async u=>{try{let p=await Mu(u),f=Wu(p,t,n);return{domain:u,isValid:f}}catch(p){return d.debug(`Could not verify mount path for ${u}: ${p}`),{domain:u,isValid:!1}}});return(await Promise.all(l)).filter(u=>u.isValid).map(u=>u.domain)}catch(i){return d.debug(`Error getting valid domains: ${i}`),[]}}function Rb(e,t){return e.map(n=>`${n.startsWith("localhost")||n.startsWith("127.0.0.1")?"http":"https"}://${n}${t}`)}async function $b(e){let t=e.map(r=>({name:r,value:r,checked:!0})),n=await Fi({message:"Select which domains you want to publish to update the mount path configuration:",choices:t,validate:r=>r.length===0?"Please select at least one domain to publish to.":!0});return n??[]}async function Bb(){return await Ae({message:"The mount path doesn't match on some domains. Would you like to publish the site to update the configuration?",default:!0})}async function Uu(e,t){let{siteId:n,accessToken:r}=e;if(!n)throw new Error("Site ID is required to publish. Standalone apps do not use this.");let o=cr(`Publishing site to ${t.length} domain(s)...`).start();try{let s=`${(await ai(r,n)).shortName}.webflow.io`,a=t.includes(s),l=t.filter(c=>c!==s);await Pb(r,n,{domains:l,publishToWebflowSubdomain:a}),o.succeed(`Site published successfully to selected domains: ${t.join(", ")}`)}catch{throw o.fail("Failed to publish site"),new Error("Failed to publish site")}}var or=w(require("path"));ke();J();_e();le();Oe();var ia=w(require("fs"));te();Ce();le();Me();te();J();async function ra(e){let t=await fetch(`${I}/v2/workspaces`,{method:"GET",headers:{Authorization:`Bearer ${e}`}});if(!t.ok){let r=await t.text(),o={};try{o=JSON.parse(r)}catch{}throw t.status===403&&o.code==="missing_scopes"?new g(`Missing required scopes for workspace access.
|
|
124
|
+
`)}async prepareConfig(){let{log:t,cwd:r,userEnv:n}=this.ctx,o=this.hasCustomWorkerEntry();Gt(t,r,"vite.config",["mjs","cjs","js","ts"])===null&&(t.info("no user vite.config.{mjs,cjs,js,ts} found \u2014 writing empty clouduser.vite.config.ts stub"),Ue.writeFileSync(Ae.join(r,"clouduser.vite.config.ts"),`export default {};
|
|
125
|
+
`));let s=Ae.join(Ii,"vite.config.webflow.ts");qe(s)&&(t.info("Copying vite.config.webflow.ts..."),Ue.copyFileSync(s,Ae.join(r,"vite.config.webflow.ts")));let a=Ae.join(Ii,"vite.config.ts.template"),c=Ae.join(r,"vite.config.ts");t.info("Generating vite.config.ts from template..."),await Jt(t,a,c,{...process.env,...n}),o||this.ensureWorkerEntry()}getBuildCommand(){return"vite build"}getNodeVersionRequirement(){return{minimum:"18.0.0",severity:"error"}}static getOutputDeployMetadata(){return{staticAssetsPath:"dist/client",workerEntryPath:"./src/worker.ts",deploymentType:"ssr-spa-combo",usesAssetsBinding:!0}}};var vp=[Cr,xr,fn,pn],ao=["astro","nextjs","vite"];function Pi(e,t){for(let r of vp){let n=r.detect(e,t);if(n.detected)return{Builder:r,result:n}}return null}function dc(e,t){let r=Pi(e.packageJson,t);if(!r)throw new Ut("Could not detect framework from package.json or webflow.json",{remediation:`Create a webflow.json file with: { "cloud": { "framework": "astro" } } (or one of: ${ao.join(", ")})`});return e.log.info(`Detected framework: ${r.result.reason}`),new r.Builder(e)}function fc(e,t,r,n){let o=Fp.join(t,"webflow.json"),i={cloud:{}};if(mn.existsSync(o))try{let a=mn.readFileSync(o,"utf8"),c=JSON.parse(a),l=Oi.safeParse(c);if(l.success)i=l.data;else{let d=l.error.issues.map(f=>`${f.path.join(".")}: ${f.message}`).join(", ");e.warn(`webflow.json has schema issues (will be corrected): ${d}`),i=c}i.cloud||(e.warn('webflow.json is missing "cloud" property, adding it'),i.cloud={})}catch(a){e.warn(`Failed to parse existing webflow.json, overwriting: ${a}`)}let s=i.cloud;if(s.framework=r,n){let a=n.getOutputDeployMetadata();s.deployment_type=a.deploymentType,a.dryRunEntryPath?s.entrypoint_path=a.dryRunEntryPath:s.entrypoint_path="./index.js",a.skipNoBundle&&(s.skip_no_bundle=!0),a.assetsSourceSkipMountPath&&(s.assets_source_skip_mount_path=!0)}e.info(`Creating webflow.json with framework: ${r}`),mn.writeFileSync(o,JSON.stringify(i,null,2))}function Ep(e,t){let r=un(e,t);if(r?.cloud?.framework)return r.cloud.framework;let n=oo(t);if(!n)throw new Ut("Cannot detect framework: no package.json found",{remediation:'Run this command from your project root, or add a webflow.json with: { "cloud": { "framework": "<name>" } }'});e.info("webflow.json has no framework \u2014 detecting from package.json...");let o=Pi(n,r);if(!o)throw new Ut("Could not detect framework from package.json or webflow.json",{remediation:'Add a webflow.json with: { "cloud": { "framework": "<name>" } } (supported: astro, nextjs, vite)'});let i=o.Builder.frameworkName;return e.info(`Detected framework: ${o.result.reason}`),fc(e,t,i),i}j();var xp=$.object({name:$.string(),main:$.string().optional(),compatibility_date:$.string(),compatibility_flags:$.array($.string()).optional(),placement:$.object({mode:$.string()}).passthrough().optional(),assets:$.object({directory:$.string(),binding:$.string().optional()}).passthrough().optional(),d1_databases:$.array($.object({database_name:$.string(),database_id:$.string(),binding:$.string(),migrations_dir:$.string().optional()}).passthrough()).default([]),kv_namespaces:$.array($.object({binding:$.string(),id:$.string()}).passthrough()).default([]),r2_buckets:$.array($.object({binding:$.string(),bucket_name:$.string()}).passthrough()).default([])}).passthrough();function Cp(e){return e.issues.map(t=>` - ${t.path.length>0?t.path.join("."):"<root>"}: ${t.message}`).join(`
|
|
126
|
+
`)}function _p(e,t="wrangler.json"){let r=He.join(e,t);if(!ge.existsSync(r)){if(t.endsWith(".json"))return u.warn(`/${t} not found, checking for /${t}c`),_p(e,t+"c");u.warn(`/${t} not found`);return}let n=ge.readFileSync(r,"utf8");u.info(`reading /${t}...`);let o;try{o=br(n)}catch(s){u.error(`/${t} loaded but could not parse as JSONC: ${s}`);return}let i=xp.safeParse(o);if(!i.success){u.error(`/${t} loaded but schema validation failed:
|
|
127
|
+
${Cp(i.error)}`);return}return u.info(`successfully loaded /${t}`),i.data}async function kp(e,t){let r=null,n=null,o=He.join(t,"wrangler.json"),i=He.join(t,"wrangler.jsonc");ge.existsSync(o)?(r=o,n=".json"):ge.existsSync(i)&&(r=i,n=".jsonc"),r&&n&&(u.info(`saving user-provided wrangler JSON as /clouduser.wrangler${n}...`),ge.copyFileSync(r,He.join(t,`clouduser.wrangler${n}`)));let s=r?_p(t,He.basename(r)):null,a=e.getWranglerTemplatePath(),c=He.join(t,"wrangler.json");if(!ge.existsSync(a))throw new Error(`Wrangler template not found at ${a}. Make sure the template is properly copied during build.`);if(u.info(`copying wrangler template for ${e.info.name} to /wrangler.json`),ge.copyFileSync(a,c),!s)return;let l=JSON.parse(ge.readFileSync(c,"utf8"));if(s.kv_namespaces&&s.kv_namespaces.length>0&&(l.kv_namespaces=s.kv_namespaces,u.info(`merged ${s.kv_namespaces.length} KV namespace(s) into template`)),s.r2_buckets&&s.r2_buckets.length>0&&(l.r2_buckets=s.r2_buckets,u.info(`merged ${s.r2_buckets.length} R2 bucket(s) into template`)),s.d1_databases&&s.d1_databases.length>0&&(l.d1_databases=s.d1_databases,u.info(`merged ${s.d1_databases.length} D1 database(s) into template`)),ge.writeFileSync(c,JSON.stringify(l,null,2)),s.d1_databases.length!==0)for(let d in s.d1_databases){let f=s.d1_databases[d];if(!f.migrations_dir){u.info(`skipping migrations for database ${d} in wrangler.json; migrations dir is not defined`);continue}let m=f.migrations_dir,g=He.join(t,m);if(!ge.existsSync(g)){u.info(`skipping migrations for database ${d} in wrangler.json; migrations dir (/${m}) does not exist`);continue}let w=He.join(t,"clouduser","migrations",m),x=Er(u,g,w);x>0?u.info(`copied ${x} migrations to /clouduser/migrations/${m}`):u.info(`skipping migrations for database ${d} in wrangler.json; migrations dir (/${m}) is empty`)}}function fD(e){if(!/^[a-z0-9-]+$/.test(e))throw new Error(`Invalid object storage bucket name ${JSON.stringify(e)}: Only lowercase letters, numbers, and hyphens are allowed.`);if(e.startsWith("-")||e.endsWith("-"))throw new Error(`Invalid object storage bucket name "${e}": Cannot begin or end with a hyphen.`);if(e.length>27)throw new Error(`Invalid object storage bucket name "${e}": Must be 27 characters or fewer (currently ${e.length} characters).`)}function Sp(e){let t=null;for(let s of[".json",".jsonc"]){let a=He.join(e,`clouduser.wrangler${s}`);if(ge.existsSync(a)){t=a;break}}if(!t)return;let r=ge.readFileSync(t,"utf8"),n;try{n=br(r)}catch(s){throw new Error(`Failed to parse wrangler config at ${t} as JSONC: ${s}`)}let o=xp.safeParse(n);if(!o.success)throw new Error(`Invalid wrangler config at ${t}:
|
|
128
|
+
${Cp(o.error)}`);let i=o.data;if(i.d1_databases&&i.d1_databases.length>0&&i.d1_databases.length>5)throw new Error(`Too many D1 databases configured: ${i.d1_databases.length}. Maximum allowed is 5.`);if(i.kv_namespaces&&i.kv_namespaces.length>0&&i.kv_namespaces.length>5)throw new Error(`Too many KV namespaces configured: ${i.kv_namespaces.length}. Maximum allowed is 5.`);if(i.r2_buckets&&i.r2_buckets.length>0){if(i.r2_buckets.length>5)throw new Error(`Too many R2 buckets configured: ${i.r2_buckets.length}. Maximum allowed is 5.`);u.info(`validating ${i.r2_buckets.length} object storage bucket name(s)...`);for(let s of i.r2_buckets)fD(s.bucket_name)}}j();he();q();pe();var pD="4.82.1",Tp=60;function Dt(e,t){let r=Math.min(Tp,process.stdout.columns??Tp),n=`\u2500\u2500\u2500 ${e} ${t} `,o="\u2500".repeat(Math.max(0,r-n.length));u.info(`
|
|
129
|
+
${D.bold.cyan(`${n}${o}`)}`)}async function Op(e=process.cwd(),t,r,n){let o=oo(e);if(!o)throw new Error("No package.json file found");let i=un(u,e),s={...n?{COSMIC_MOUNT_PATH:n}:{},...t?{COSMIC_DEPLOY_URL:t}:{},...r&&!t?{COSMIC_DEPLOY_URL:gD(r)}:{}};return dc({cwd:e,log:u,packageJson:o,userEnv:s},i)}async function Ip(e,t={}){let r=t.projectPath||process.cwd(),n=Date.now(),o=H.join(r,".tmp",`webflow-build-${n}`),i=t.outputDir||H.join(o,"output"),s=t.mountPath||"/app",a=Date.now(),c=pc(r),l=t.telemetry,d=e.getBuildCommand(),f=e.getOutputDeployMetadata();await l?.sendUsage("cloud_build_start",{framework:e.info.name,buildCommand:d,deploymentType:f.deploymentType,mountPath:s,cloudflareBindings:c}),R.mkdirSync(o,{recursive:!0});try{Dt("\u{1F527}","Configure framework"),u.info(`Framework: ${e.info.displayName}`),u.info(`Mount path: ${s}`),u.info(`Deployment type: ${f.deploymentType}`);let m=e.getNodeVersionRequirement();m&&ln(u,m,e.info.displayName),u.info("Validating framework requirements..."),await e.validate(),u.info("Installing framework dependencies..."),await e.installDependencies(),Dt("\u2699\uFE0F ","Configure wrangler"),await kp(e,r),u.info("Preparing framework configuration..."),await e.prepareConfig(),fc(u,r,e.info.name,e),Dt("\u{1F4E6}","Install dependencies"),await mD(r,e.info.name,t.telemetry),Sp(r),Dt("\u{1F3D7}\uFE0F ","Build app"),u.info(`running ${d}...`),await hD(r,d,t.telemetry),await e.postBuild(),Dt("\u{1F9EA}","Wrangler dry-run"),await yD(r,i),Dt("\u{1F4C1}","Copy assets"),await wD(r,i,e,s),Dt("\u{1F381}","Create tarball");let g=await DD(i),w=Date.now()-a;return u.info(`${G} Build completed in ${(w/1e3).toFixed(1)}s`),await l?.sendUsage("cloud_build_success",{duration:w,framework:e.info.name,buildCommand:d,deploymentType:f.deploymentType,mountPath:s,cloudflareBindings:c}),g}catch(m){let g=Date.now()-a;throw await l?.sendError(m instanceof Error?m:new Error(String(m)),"cloud_build_failure",{duration:g,framework:e.info.name,buildCommand:d,deploymentType:f.deploymentType,mountPath:s,cloudflareBindings:c}),m}}function pc(e){let t=H.join(e,"wrangler.json");if(!R.existsSync(t))return{hasKV:!1,hasD1:!1,hasR2:!1,hasVars:!1,kvCount:0,d1Count:0,r2Count:0,varCount:0};try{let r=JSON.parse(R.readFileSync(t,"utf8")),n=r.kv_namespaces||[],o=r.d1_databases||[],i=r.r2_buckets||[],s=r.vars||{};return{hasKV:n.length>0,hasD1:o.length>0,hasR2:i.length>0,hasVars:Object.keys(s).length>0,kvCount:n.length,d1Count:o.length,r2Count:i.length,varCount:Object.keys(s).length}}catch(r){return console.debug("Failed to parse wrangler.json for bindings detection:",r),{hasKV:!1,hasD1:!1,hasR2:!1,hasVars:!1,kvCount:0,d1Count:0,r2Count:0,varCount:0}}}function Pp(e){try{let t=H.dirname(e);t.includes(".tmp/webflow-build-")&&(Dt("\u{1F9F9}","Clean up build artifacts"),R.rmSync(t,{recursive:!0,force:!0}))}catch(t){u.warn(`Warning: Failed to clean up build artifacts: ${t}`)}}function $p(e,t){try{Dt("\u{1F9F9}","Revert framework configuration");let r=t.getUserConfigPatterns(),n=new Set;for(let s of r){let a=H.extname(s).slice(1),c=H.basename(s,`.${a}`);if(!n.has(c)){n.add(c);for(let l of["mjs","cjs","js","ts"]){let d=H.join(e,`clouduser.${c}.${l}`),f=H.join(e,`${c}.${l}`);if(R.existsSync(d)){u.info(`restoring /${c}.${l} from /clouduser.${c}.${l}...`),R.existsSync(f)&&R.unlinkSync(f),R.renameSync(d,f);break}}}}for(let s of[".jsonc",".json"]){let a=H.join(e,`clouduser.wrangler${s}`);if(R.existsSync(a)){u.info(`restoring user wrangler${s} from backup...`);let c=H.join(e,"wrangler.json");R.existsSync(c)&&R.unlinkSync(c);let l=H.join(e,`wrangler${s}`);R.renameSync(a,l);break}}let o=H.join(e,"clouduser");R.existsSync(o)&&(u.info("cleaning up clouduser directory..."),R.rmSync(o,{recursive:!0,force:!0}));for(let s of t.getAdditionalConfigFiles()){let a=H.join(e,H.basename(s));R.existsSync(a)&&(u.info(`cleaning up additional config file ${a}...`),R.unlinkSync(a))}let i=t.getWebflowLoader();if(i){let s=H.join(e,i.destinationName);R.existsSync(s)&&(u.info(`cleaning up ${i.destinationName}...`),R.unlinkSync(s))}}catch(r){u.warn(`Warning: Failed to cleanup framework configuration: ${r}`)}}async function mD(e,t,r){let n=Date.now(),o=["--no-update-notifier","--no-progress"],i=H.join(e,"package-lock.json");try{R.existsSync(i)?(u.info("Running npm ci --include=dev..."),(0,co.execSync)(`npm ci --include=dev ${o.join(" ")}`,{cwd:e,stdio:"inherit"})):(u.info("Warning: No package-lock.json found, installing dependencies with npm install --include=dev"),(0,co.execSync)(`npm install --include=dev ${o.join(" ")}`,{cwd:e,stdio:"inherit"}));let s=Date.now()-n;await r?.sendUsage("cloud_install_dependencies_success",{duration:s,framework:t,hasPackageLock:R.existsSync(i)})}catch(s){let a=Date.now()-n;throw await r?.sendError(s instanceof Error?s:new Error(String(s)),"cloud_install_dependencies_failure",{duration:a,framework:t,hasPackageLock:R.existsSync(i)}),s}}function gD(e){let t="production",r;switch(t){case"development":r="wf-app-dev";break;case"acceptance":r="wf-app-acceptance";break;default:r="wf-app-prod"}return`https://${e}.${r}.cosmic.webflow.services`}async function hD(e,t,r){let n=Date.now();try{(0,co.execSync)(`npm exec -- ${t}`,{cwd:e,stdio:"inherit"});let o=Date.now()-n;await r?.sendUsage("cloud_build_command_success",{duration:o,buildCommand:t})}catch(o){let i=Date.now()-n;throw await r?.sendError(o instanceof Error?o:new Error(String(o)),"cloud_build_command_failure",{duration:i,buildCommand:t}),new Error(`Build command failed: ${t}`)}}async function yD(e,t){R.mkdirSync(t,{recursive:!0});let r=H.join(e,"wrangler.json"),n=H.join(e,"wrangler.jsonc");if(!R.existsSync(r)&&!R.existsSync(n))throw new Error("Missing wrangler configuration: wrangler.json or wrangler.jsonc file is required");(0,co.execSync)(`npx wrangler@${pD} deploy --dry-run --outdir="${t}"`,{cwd:e,stdio:"inherit"})}async function wD(e,t,r,n){let o=r.getOutputDeployMetadata(),i=o.staticAssetsPath,s=o.staticAssetsExclude?.[0],a=o.assetsSourceSkipMountPath===!0,c=n.replace(/\/+$/,"").replace(/^\/+/,"");if(!a&&c&&(r.info.name==="nextjs"||r.info.name==="astro")){let g=H.join(e,i);if(R.existsSync(g)&&R.statSync(g).isDirectory()){let x=R.readdirSync(g,{withFileTypes:!0}).find(k=>!(!k.isDirectory()||s&&k.name===s||r.info.name==="astro"&&(k.name==="_routes.json"||k.name==="_worker.js")));x&&(i=`${i}/${x.name}`)}}let l=H.join(t,"assets",c||"");R.mkdirSync(l,{recursive:!0});let d=H.join(e,i);if(R.existsSync(d)&&R.statSync(d).isDirectory()){u.info(`copying assets from /${i} to output/assets...`);try{s?(u.info(`excluding ${s}`),Er(u,d,l,{exclude:s})):Er(u,d,l)}catch(g){u.error(g,{prefix:"Failed to copy assets:"})}}else u.info("No assets to copy or assets directory not found");let f=H.join(e,"webflow.json");R.existsSync(f)?(u.info("including webflow.json in output..."),R.copyFileSync(f,H.join(t,"webflow.json"))):u.warn("webflow.json not found at project root; deploy may fail framework detection");let m=null;for(let g of[".json",".jsonc"]){let w=H.join(e,`clouduser.wrangler${g}`);if(R.existsSync(w)){m=w;break}}if(m){u.info("including user wrangler config in output..."),R.copyFileSync(m,H.join(t,"clouduser.wrangler.json"));let g=H.join(e,"clouduser","migrations");if(R.existsSync(g)){u.info("copying migrations from clouduser/migrations to output/migrations...");let w=H.join(t,"migrations");Er(u,g,w)}}}async function DD(e){let t=`${e}.tar.gz`;try{return await Ap.create({gzip:!0,file:t,cwd:H.dirname(e)},[H.basename(e)]),u.info(`Tarball created: ${t}`),t}catch(r){throw new p(r,{prefix:"Failed to create tarball:"})}}de();ee();j();var bD="DUPLICATE_ENVIRONMENT_MOUNT",vD="ENVIRONMENT_MOUNT_MISMATCH",FD="DUPLICATE_ENVIRONMENT_BRANCH",ED="INVALID_MOUNT_PATH_FORMAT",xD="INVALID_PROJECT_ID",Rp={[bD]:"An environment with this mount path already exists for this site. Please choose a different mount path.",[vD]:"This environment already exists with a different mount path. Please create a new environment or use the existing environment's mount path.",[FD]:"An environment with this branch already exists for this project.",[ED]:"Mount path format is invalid. It must start with a / and be followed by at least one character (e.g., /app).",[xD]:"Invalid project ID. This project may have been deleted or belongs to a different site. Please remove the 'project_id' from your webflow.json file and redeploy to create a new project."};function jp(e){let t={timestamp:new Date().toISOString()};if(e instanceof Error)t.code=e.name,t.msg=e.message,t.stack=e.stack;else if(typeof e=="object"&&e!==null){let i=e;t.code=typeof i.code=="string"?i.code:void 0,t.msg=typeof i.msg=="string"?i.msg:void 0,t.status=typeof i.status=="number"?i.status:void 0}let r=t.msg||"",n=t.status??t.code,o=typeof n=="number"?n:typeof n=="string"&&/^\d+$/.test(n)?Number(n):void 0;if(u.error(`Error Details: ${JSON.stringify({timestamp:t.timestamp,code:t.code,message:t.msg,status:t.status,stack:t.stack},null,2)}`),o===401)return"Your access token is expired or invalid. Run 'webflow auth login' to re-authenticate.";if(o===403)return"Your access token is missing required permissions. Run 'webflow auth login' to re-authenticate with the necessary scopes.";for(let i in Rp)if(r.includes(i))return Rp[i];return`An unknown error occurred. Error code: ${t.code||"N/A"}, Message: ${t.msg||"No message provided"}`}var gn=h(require("fs")),mc=require("child_process");j();q();pe();var Bp=104857600;function Np(e){if(e===0)return"0 B";let t=1024,r=["B","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,n)).toFixed(1))} ${r[n]}`}function CD(){try{let e=(0,mc.execSync)("git rev-parse HEAD",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();if(!/^[0-9a-f]{40}$/.test(e))throw new Error("Invalid commit hash format");try{return(0,mc.execSync)("git status --porcelain --untracked-files=no",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim().length>0?`git@${e}+dirty`:`git@${e}`}catch{return`git@${e}`}}catch{return`noversion@${new Date().toISOString()}`}}async function gc(e,t,r){let n=await fetch(`${C}${t}`,{method:r.method,headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:r.body?JSON.stringify(r.body):void 0});if(!n.ok){let o=await n.text(),i;try{i=JSON.parse(o)}catch{i={msg:o}}let s=jp(i);throw new Error(s)}return n.json()}async function Mp(e,t,r,n){let{manifest:o}=J(),i=o.cloud||{},s=i.project_id,a=i.framework;if(!a)throw new p("No framework specified in webflow.json. Please ensure your webflow.json has a cloud.framework property");let c=await _D({siteId:e.siteId,apiToken:e.accessToken,framework:a,mountPath:r,environment:t,projectId:s,projectName:n?.projectName,description:n?.description,directory:n?.directory,version:CD()});return!s&&c.project_id&&(u.info("\u{1F4DD} Updating webflow.json with project ID..."),Q({cloud:{...i,project_id:c.project_id}})),c}async function _D(e){let{siteId:t,framework:r,mountPath:n,environment:o,version:i,projectId:s,projectName:a,description:c,directory:l}=e,d={framework:r,mount_path:n,environment:o,version:i};s&&(d.project_id=s),a&&(d.project_name=a),c&&(d.description=c),l&&(d.app_path=l);let f=t?`/cosmic/${t}/cli-deploy-init`:"/cosmic/cli-deploy-init";return gc(e.apiToken,f,{method:"POST",body:d})}async function Lp(e,t){let{siteId:r,accessToken:n}=e,o=r?`/cosmic/${r}/cli-project-environments/${t}`:`/cosmic/cli-project-environments/${t}`;return gc(n,o,{method:"GET"})}async function Wp(e){let{siteId:t,accessToken:r}=e,n=t?`/cosmic/${t}/cli-projects`:"/cosmic/cli-projects";return gc(r,n,{method:"GET"})}async function Up(e,t){if(!gn.existsSync(e))throw new Error(`Tarball not found at ${e}`);let r=gn.statSync(e);if(r.size>Bp)throw new Error(`Build output is too large (${Np(r.size)}). Maximum allowed size is ${Np(Bp)}.`);let n=gn.readFileSync(e),o=JSON.parse(t);if(!o.fields)throw new Error("Upload URL is missing fields property");let i=new FormData;Object.entries(o.fields).forEach(([c,l])=>{i.append(c,l)});let s=new Blob([n],{type:"application/gzip"});i.append("file",s,"output.tar.gz");let a=await fetch(o.url,{method:"POST",body:i});if(!a.ok){let c=await a.text();throw new p(c,{prefix:`${T} Upload failed with response:`})}}async function Vp(e,t){if(!e||e==="undefined")throw new p("Completion URL is undefined or invalid");let r=new URL(e);t&&r.searchParams.set("failed","true");let n=await fetch(r.toString(),{method:"GET"});if(!n.ok)throw new p(`Failed to trigger deployment: ${n.status} ${n.statusText}`)}var Jp=require("webflow-api");ee();ee();q();function hc(e){return new Jp.WebflowClient({accessToken:e,environment:{base:`${C}/v2`,dataApi:`${C}/v2`,contentDeliveryApi:`${_o}/v2`}})}async function lo(e,t){try{let n=await hc(e).sites.get(t);return{id:n.id||t,displayName:n.displayName||"Unknown Site",shortName:n.shortName||"unknown-site",customDomains:n.customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(r){throw new p(r,{prefix:"Error fetching site details:"})}}async function yc(e,t){try{return{customDomains:(await hc(e).sites.getCustomDomain(t)).customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(r){throw new p(r,{prefix:"Error fetching custom domains:"})}}async function wc(e){try{let t=await fetch(`https://${e}/manifest.json`);if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);return await t.json()}catch(t){throw new p(t,{prefix:`Failed to fetch manifest from ${e}:`})}}function Dc(e,t,r){return e.cosmic&&Array.isArray(e.cosmic)?e.cosmic.some(n=>{if(n.mountPath!==t)return!1;if(!r)return!0;if(n.workerUrl)try{return new URL(n.workerUrl).hostname.split(".")[0]===r}catch{return!1}return!1}):!1}async function Gp(e,t,r){try{let n=hc(e),o=await lo(e,t),i=[];if(r?.domains&&r.domains.length>0)for(let s of r.domains){let a=o.customDomains?.find(c=>c.url===s);a?.id&&i.push(a.id)}await n.sites.publish(t,{customDomains:i,publishToWebflowSubdomain:r?.publishToWebflowSubdomain??!0})}catch(n){throw new p(n,{prefix:"Error publishing site:"})}}Se();hs();j();async function zp(e,t,r){let{siteId:n,accessToken:o}=e;if(!n)throw new Error("Site ID is required for mount path validation. Standalone apps skip this step.");let i=Or("Validating mount path configuration...").start();try{let s=await lo(o,n),a=await yc(o,n),c=[`${s.shortName}.webflow.io`,...a.customDomains?.map(w=>w.url)||[]],l=0;i.text=`Validating ${c.length} domain(s) for mount path: ${t}... (0/${c.length})`;let d=c.map(async w=>{try{let x=await wc(w),k=Array.isArray(x.cosmic)?x.cosmic.map(z=>z.mountPath).filter(z=>typeof z=="string"):[],X=Dc(x,t,r);return{domain:w,mountPaths:k,isValid:X===!0}}catch(x){return{domain:w,mountPaths:[],isValid:!1,error:x instanceof Error?x.message:String(x)}}finally{l++,i.text=`Validating ${c.length} domain(s) for mount path: ${t}... (${l}/${c.length})`}}),f=await Promise.all(d),m=f.some(w=>!w.isValid),g=f.every(w=>w.isValid);return i.succeed("Mount path validation completed"),{isValid:g,domains:f,needsPublishing:m}}catch(s){throw i.fail("Mount path validation failed"),s}}async function qp(e,t,r){let{siteId:n,accessToken:o}=e;if(!n)return[];try{let i=await lo(o,n),s=await yc(o,n),c=[`${i.shortName}.webflow.io`,...s.customDomains?.map(d=>d.url)||[]].map(async d=>{try{let f=await wc(d),m=Dc(f,t,r);return{domain:d,isValid:m}}catch(f){return u.debug(`Could not verify mount path for ${d}: ${f}`),{domain:d,isValid:!1}}});return(await Promise.all(c)).filter(d=>d.isValid).map(d=>d.domain)}catch(i){return u.debug(`Error getting valid domains: ${i}`),[]}}function Hp(e,t){return e.map(r=>`${r.startsWith("localhost")||r.startsWith("127.0.0.1")?"http":"https"}://${r}${t}`)}async function Kp(e){let t=e.map(n=>({name:n,value:n,checked:!0})),r=await To({message:"Select which domains you want to publish to update the mount path configuration:",choices:t,validate:n=>n.length===0?"Please select at least one domain to publish to.":!0});return r??[]}async function Zp(){return await ye({message:"The mount path doesn't match on some domains. Would you like to publish the site to update the configuration?",default:!0})}async function bc(e,t){let{siteId:r,accessToken:n}=e;if(!r)throw new Error("Site ID is required to publish. Standalone apps do not use this.");let o=Or(`Publishing site to ${t.length} domain(s)...`).start();try{let s=`${(await lo(n,r)).shortName}.webflow.io`,a=t.includes(s),c=t.filter(l=>l!==s);await Gp(n,r,{domains:c,publishToWebflowSubdomain:a}),o.succeed(`Site published successfully to selected domains: ${t.join(", ")}`)}catch{throw o.fail("Failed to publish site"),new Error("Failed to publish site")}}var _r=h(require("path"));de();j();he();ee();De();var ji=h(require("fs"));q();pe();ee();Se();q();j();async function $i(e){let t=await fetch(`${C}/v2/workspaces`,{method:"GET",headers:{Authorization:`Bearer ${e}`}});if(!t.ok){let n=await t.text(),o={};try{o=JSON.parse(n)}catch{}throw t.status===403&&o.code==="missing_scopes"?new p(`Missing required scopes for workspace access.
|
|
161
130
|
${o.message??""}
|
|
162
|
-
Re-run 'webflow auth login' to grant the necessary permissions.`):new
|
|
163
|
-
${o.message}`:""))}return(await t.json()).workspaces}async function
|
|
164
|
-
Available frameworks: ${a.supportedIds.join(", ")}`),new
|
|
165
|
-
Available frameworks: ${a.supportedIds.join(", ")}`),new
|
|
166
|
-
\u{1F4CB} Mount path validation results:`),o.domains.forEach(i=>{let s=i.isValid?
|
|
167
|
-
\u{1F3D7}\uFE0F Building project...`);let o=await
|
|
168
|
-
\u{1F310} Your cloud app will soon be available at:`);try{let o=
|
|
169
|
-
|
|
170
|
-
${
|
|
171
|
-
Visit the webflow Cloud dashboard to view your deployment: https://webflow.com/dashboard/sites`)},
|
|
172
|
-
${
|
|
173
|
-
${
|
|
174
|
-
|
|
175
|
-
`),t!==
|
|
176
|
-
`)),
|
|
177
|
-
--- `)};
|
|
178
|
-
${
|
|
179
|
-
Re-run 'webflow auth login' to grant the necessary permissions.`):new
|
|
180
|
-
Upgrade your plan or remove unused apps to create a new one.`):new
|
|
181
|
-
${
|
|
131
|
+
Re-run 'webflow auth login' to grant the necessary permissions.`):new p(`Failed to fetch workspaces: ${t.status} ${t.statusText}`+(o.message?`
|
|
132
|
+
${o.message}`:""))}return(await t.json()).workspaces}async function Ri(e){if(e.length===1)return e[0];let t=await ke({message:"Select the workspace for this project:",choices:e.map(r=>({name:r.name,value:r}))});return t||(u.warn(`Auto fallback to first workspace: ${e[0].name}`),e[0])}var Ni=async()=>{try{let e=Xa(),t=Qa();return[...new Set([...e,...t])]}catch(e){return u.error(e,{prefix:"Failed to get available scaffolds:"}),[]}},kD=async(e,t,r)=>{let n;if("content"in r)n=r.content.files;else{let c=r[t];if(!c)throw new Error(`Scaffold "${t}" not found`);n=c}let o=n.find(c=>c.includes(nr));if(!o)throw new Error(`No ${nr} found in scaffold "${t}"`);await ji.promises.mkdir(e,{recursive:!0});let s=(await ji.promises.readFile(o,"utf8")).replace(Di,e),a=_r.join(e,nr);await ji.promises.writeFile(a,s,"utf8")},Fc=async(e,t,r=wi,n,o=oe.Existing,i)=>{if(o===oe.New)throw new p("Standalone projects are only available in @next builds. Install with: npm i -g @webflow/webflow-cli@next");if(o===oe.New){try{let a=await rc(r);await SD(e,t,a.scaffoldId,{content:a},r,i)}catch(a){if(a instanceof ue){let c=a.message;throw a.supportedIds?.length&&(c+=`
|
|
133
|
+
Available frameworks: ${a.supportedIds.join(", ")}`),new p(c)}throw a}return}try{let a=await vi(r);await TD(e,t,r,{content:a},n)}catch(a){if(a instanceof ue){let c=a.message;throw a.supportedIds?.length&&(c+=`
|
|
134
|
+
Available frameworks: ${a.supportedIds.join(", ")}`),new p(c)}throw a}},SD=async(e,t,r,n,o,i)=>{let s=`./${e}`,a="content"in n&&typeof n.content=="object"&&"extractionRoot"in n.content?n.content:null,c=a?_r.dirname(a.extractionRoot):null;try{let l=Date.now(),d=await U(),f;if(i)f={id:i};else{let w=await $i(d);if(w.length===0)throw new p("No workspaces found in your account. Please make sure you have at least one workspace.");f=await Ri(w)}await Yn(e,t,r,n,void 0,void 0),process.chdir(s);let m=o??r;Q({cloud:{framework:m,workspace_id:f.id}}),ut({apiToken:d,directory:"."}),process.env.WEBFLOW_API_TOKEN=d;let g=Date.now()-l;try{await N.forCloud({authToken:d}).sendUsage("project_init",{scaffold:m,scaffoldName:m,initMode:oe.New,workspaceId:f.id,totalDuration:g,mountPath:t})}catch{}}catch(l){if(l instanceof p||l instanceof Error&&l.message.includes("OAuth")){try{await Yn(e,t,r,n),process.chdir(s),Q({cloud:{framework:o??r}}),ut({directory:"."})}catch{}throw u.error("Project scaffold was created, but authentication failed."),u.error("To set up Webflow credentials later, run:"),u.error(" webflow auth login"),Bi(e,oe.New),new p(l,{skipLogging:!0})}throw l}finally{if(c)try{vc.default.removeSync(c)}catch{}}Bi(e,oe.New)},TD=async(e,t,r,n,o)=>{let i=`./${e}`,s=null,a=!1,c="content"in n&&typeof n.content=="object"&&"extractionRoot"in n.content?n.content:null,l=c?_r.dirname(c.extractionRoot):null;try{let d=Date.now();await kD(e,r,n),process.chdir(i);let{manifest:f}=J(),m=await le(f,{site:o}),g=m.accessToken,w=m.siteId;if(s=N.forCloud({authToken:g,siteId:w}),await Yn(".",t,r,n,w,g),w){u.info("Running devlink export to fetch your Webflow components...");try{await AD({site:w,apiToken:g}),a=!0}catch(k){u.error(k,{prefix:"Failed to run devlink export:"}),u.info("You can manually run 'npx webflow devlink export' later to export your components.")}}let x=Date.now()-d;await s?.sendUsage("project_init",{scaffold:r,scaffoldName:r,devlinkSyncStatus:a,totalDuration:x,mountPath:t}),Bi(e,oe.Existing)}catch(d){throw u.error(d,{prefix:"Error during Webflow authentication:"}),await Yn(".",t,r,n),u.error("Project scaffold was created, but authentication failed."),u.error("To set up Webflow credentials later, run:"),u.error(" webflow auth login"),Bi(e,oe.Existing),new p(d,{skipLogging:!0})}finally{if(l)try{vc.default.removeSync(l)}catch{}}},AD=async e=>{let{exportComponents:t}=await Promise.resolve().then(()=>(ba(),yd));await t({site:e.site,apiToken:e.apiToken})},OD=e=>{if(e?.skipMountPathCheck!==void 0)return e.skipMountPathCheck;try{let{manifest:t}=J();return Za(t)?!0:t.cloud?.skipMountPathCheck===!0}catch{return!1}},ID=async(e,t,r,n)=>{u.info("\u{1F50D} Validating mount path configuration...");let o=await zp(e,t,r);if(o.isValid)u.info(`${G} Mount path validation passed`);else if(u.info(`
|
|
135
|
+
\u{1F4CB} Mount path validation results:`),o.domains.forEach(i=>{let s=i.isValid?G:T,a=i.isValid?`(mountPath: ${i.mountPaths[0]})`:"(no matching mountPath)";u.info(`${s} ${i.domain} ${a}`),i.error&&u.debug(` Error: ${i.error}`)}),o.needsPublishing)if(n){u.info("\u{1F680} Auto-publishing site to update mount path configuration...");let i=o.domains.filter(s=>!s.isValid).map(s=>s.domain);await bc(e,i)}else if(await Zp()&&Ke()){let s=o.domains.filter(c=>!c.isValid).map(c=>c.domain),a=await Kp(s);await bc(e,a)}else u.warn("\u26A0\uFE0F Continuing with deployment without publishing...")},PD=async(e,t,r,n)=>{u.info(`
|
|
136
|
+
\u{1F3D7}\uFE0F Building project...`);let o=await Ip(e,{mountPath:r,telemetry:n?.telemetry,deployUrl:t.deploy_url,environmentId:t.environment_id});u.info("\u{1F4E4} Uploading build artifacts...");let i=Date.now();await Up(o,t.upload_url);let s=Date.now()-i;return u.info(`${G} Upload completed in ${(s/1e3).toFixed(1)}s`),o},$D=async(e,t,r,n)=>{u.success(`
|
|
137
|
+
\u{1F310} Your cloud app will soon be available at:`);try{let o=n?.domainsOverride??await qp(e,t,r),i=Hp(o??[],t);i?.length>0?i.forEach(s=>{u.info(` ${s}`)}):u.warn(" No domains found with the correct mount path configuration yet.")}catch(o){u.warn(` Could not determine deployment links: ${o instanceof Error?o.message:o}`)}},RD=e=>{e.site_slug?u.success(`Visit your deployment:
|
|
138
|
+
|
|
139
|
+
${Rr}/dashboard/sites/${e.site_slug}/webflow-cloud/projects/${e.project_id}/environments/${e.environment_id}/deployments/${e.deployment_id}`):u.info(`
|
|
140
|
+
Visit the webflow Cloud dashboard to view your deployment: https://webflow.com/dashboard/sites`)},jD=async(e,t,r,n,o)=>{try{if(await Vp(t.completion_url,!!n),n)u.error(`
|
|
141
|
+
${T} Deployment failed due to build error.`);else{u.success(`
|
|
142
|
+
${G} Deployment triggered successfully!`);let i;try{let{manifest:s}=J();Za(s)&&(i=[`${o?.projectName??_r.basename(process.cwd())}.webflow.io`])}catch(s){u.debug(`Could not read manifest for standalone deploy link hint: ${s instanceof Error?s.message:String(s)}`)}await $D(e,r,t.environment_id,i!==void 0?{domainsOverride:i}:void 0),RD(t)}}catch(i){throw new p(i,{prefix:"Failed to trigger deployment:"})}},BD=(e,t)=>{e&&$p(process.cwd(),e),t&&Pp(t)},Yp=async(e,t,r,n)=>{let o=null,i=null,s=Date.now(),a=null,c=null,l=pc(process.cwd()),d=n?.telemetry;await d?.sendUsage("cloud_deploy_start",{environment:t,mountPath:r,projectName:n?.projectName,hasDescription:!!n?.description,hasDirectory:!!n?.directory,cloudflareBindings:l});try{u.info("\u{1F3D7}\uFE0F Building project..."),Ep(u,process.cwd()),o=await Mp(e,t,r,n),u.info("\u{1F527} Detecting framework..."),a=await Op(process.cwd(),o.deploy_url,o.environment_id,r),u.info(`Framework: ${a.info.displayName}`),u.info(`Build command: ${a.getBuildCommand()}`),OD(n)?u.info("\u23ED\uFE0F Skipping mount path validation..."):await ID(e,r,o.environment_id,n?.autoPublish),i=await PD(a,o,r,n),u.info(`Starting deployment process for environment: ${t} at mount path: ${r}`);let f=Date.now()-s;await d?.sendUsage("cloud_deploy_success",{duration:f,environment:t,mountPath:r,projectName:n?.projectName,hasDescription:!!n?.description,hasDirectory:!!n?.directory,framework:a.info.name,buildCommand:a.getBuildCommand(),cloudflareBindings:l})}catch(f){c=f instanceof Error?f:new Error(String(f)),u.error(c,{prefix:"Error during deployment initialization:"});let m=Date.now()-s;await d?.sendError(c,"cloud_deploy_failure",{duration:m,environment:t,mountPath:r,projectName:n?.projectName,cloudflareBindings:l,argv:process.argv.slice(2)})}finally{if(BD(a,i),o&&await jD(e,o,r,c,{projectName:n?.projectName}),c)throw new p(c,{skipLogging:!0})}},Bi=(e,t)=>{u.info("--- "),u.info(D.bold.green("Get started with the following commands:")),u.info(` cd ${e}`),u.info(" npm install"),u.info(" npm run dev"),u.info(` webflow cloud deploy
|
|
143
|
+
|
|
144
|
+
`),t!==oe.New&&(u.info("Run the following command to export Webflow components when they update:"),u.info(` webflow devlink export
|
|
145
|
+
`)),u.info(`
|
|
146
|
+
--- `)};de();Se();Ce();j();De();var Xp=h(require("path"));function kr(e){if(!e||e.trim()==="")return"/";let t=Xp.posix.normalize(e);return t.startsWith("/")||(t="/"+t),t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t=t.split("/").map((n,o)=>o===0?n:encodeURIComponent(n)).join("/"),t}function Mi(e){return!(!e||e.trim()===""||!e.startsWith("/")||e.includes(".."))}q();var Qp=require("crypto");ee();q();async function em(e){let{accessToken:t,workspaceId:r,displayName:n,description:o,appPath:i}=e,a={requestId:(0,Qp.randomUUID)(),cloudApp:{displayName:n,description:o,appPath:i,source:{type:"CLI",cli:{sourceUrl:Uf}}}},c=`${C}/cosmic/workspaces/${r}/cloudApps`,l=await fetch(c,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json","Accept-Version":"1.0.0"},body:JSON.stringify(a)});if(!l.ok){let d=await l.text();throw ND(l.status,l.statusText,d)}return l.json()}function ND(e,t,r){let n={};try{n=JSON.parse(r)}catch{}return e===403?n.publicErrorCode==="missing_scopes"?new p(`Missing required scopes to create a Cloud app.
|
|
147
|
+
${n.msg??""}
|
|
148
|
+
Re-run 'webflow auth login' to grant the necessary permissions.`):new p(n.msg??"You don't have permission to create apps in this workspace."):e===404?new p("Cloud app creation is not available. The workspace may not exist or the feature is not enabled for your account."):e===409?n.msg?.includes("No new sites can be created")?new p(`Failed to create app: your workspace has reached its app limit.
|
|
149
|
+
Upgrade your plan or remove unused apps to create a new one.`):new p(n.msg??"A Cloud app creation request is already being processed. Please wait and try again."):new p(`Failed to create app: ${e} ${t}`+(n.msg?`
|
|
150
|
+
${n.msg}`:""))}Te();de();q();De();Se();j();Te();function MD(){return!1}async function nm(e={}){LD(e);let t=await WD(e,J().manifest);return{credentials:t.credentials,workspaceId:t.workspaceId,manifest:J().manifest}}function LD(e){if(e.siteId&&e.workspaceId)throw new p("--site-id and --workspace-id are mutually exclusive. Pass exactly one.")}async function WD(e,t){let r=MD();if(e.siteId)return tm(t,e.siteId);if(e.workspaceId&&r)return rm(e.workspaceId);if(t.siteId)return tm(t,t.siteId);if(t.cloud?.workspace_id&&r)return rm(t.cloud.workspace_id);if(process.env.WEBFLOW_SITE_ID)return r&&u.info("Using site from WEBFLOW_SITE_ID env var. Pass --site-id explicitly or unset to see the deploy mode picker."),Ec(t);if(Y()||!Ke())throw new p(r?`No identity configured for this project.
|
|
182
151
|
Pass one of:
|
|
183
152
|
--site-id <id> (deploy to an existing Webflow site)
|
|
184
153
|
--workspace-id <id> (create a new standalone Cloud app)
|
|
185
154
|
Or run 'webflow cloud init' to scaffold a new project.`:`No identity configured for this project.
|
|
186
|
-
Pass --site-id <id> or run 'webflow cloud init' to scaffold a new project.`);return
|
|
187
|
-
- `);throw new
|
|
155
|
+
Pass --site-id <id> or run 'webflow cloud init' to scaffold a new project.`);return r?VD(t):Ec(t)}async function tm(e,t){return{credentials:await le(e,{site:t})}}async function Ec(e){return{credentials:await le(e,{})}}async function rm(e){let t=await U();return{workspaceId:e,credentials:{accessToken:t,siteId:""}}}async function UD(){let e=await U(),t=await $i(e);if(t.length===0)throw new p("No workspaces found in your account. Please make sure you have at least one workspace.");let r=await Ri(t);return Q({cloud:{workspace_id:r.id}}),{workspaceId:r.id,credentials:{accessToken:e,siteId:""}}}async function VD(e){let t=await ke({message:"This project isn't initialized for Webflow Cloud. How would you like to deploy?",choices:[{name:"Create a new app",value:"standalone"},{name:"Attach to an existing Webflow site",value:"site-attached"},{name:"Cancel",value:"cancel"}]});if(t==="cancel"||!t)throw new p("Deploy cancelled.",{skipLogging:!0});return t==="standalone"?UD():Ec(e)}var im=e=>{let t=e.command("cloud").description("Create and manage Webflow Cloud projects"),r=!1;t.command("create").description(r?"[Deprecated] Use 'webflow cloud init' instead. Quick non-interactive scaffold for site-attached projects (hardcoded to /app).":"Quick non-interactive scaffold for site-attached projects (hardcoded to /app).").argument("<name>","Project name").option("-f, --framework <framework>","Framework to use","nextjs").action(async(i,s)=>{r&&u.warn("\u26A0\uFE0F 'webflow cloud create' is deprecated and will be removed in a future major release. Use 'webflow cloud init' instead.");let{framework:a}=s;if(!(await Ni()).find(d=>d===a)){u.error(`Framework ${a} not found`);return}await Fc(i,"/app",a,void 0,oe.Existing,void 0)}),t.command("list").description("Get list of project templates that can be used for `init`").action(async()=>{let i=await Ni();u.info("Available project templates:"),i.length>0?i.forEach(s=>u.info(`- ${s}`)):u.info("No templates found.")});let n=t.command("init").description("Bootstrap a new Webflow Cloud project").option("-n, --project-name <name>","Project name").option("-f, --framework <framework>","Framework to use (e.g., astro, nextjs)").option("-m, --mount <mount>",r?"Mount path (default: '/' for standalone, '/app' for site-attached)":"Mount path (e.g., /app)").option("-s, --site-id <siteId>","Webflow site ID to connect to");r&&(n.option("--new","Create a standalone project without connecting to a site"),n.option("-w, --workspace-id <workspaceId>","Workspace ID for standalone projects (skips workspace picker)")),n.action(async i=>{if(i.workspaceId&&i.siteId)throw new p("--workspace-id and --site-id are mutually exclusive. Pass exactly one.");let s=process.stdin.isTTY,a=await Ni(),c={};if(s&&Ke()){if(r&&i?.new!==!0&&(c.initMode=await ke({message:"Where do you want to deploy this app?",choices:[{name:"New domain",value:oe.New},{name:"Existing site",value:oe.Existing}],default:oe.New})),i?.framework||(c.scaffoldName=await ke({message:"Which framework would you like to use?",choices:a.map(k=>({name:k,value:k})),default:"astro"})),!i.projectName){let k=await we({message:"What would you like to name your app?",validate:X=>{let z=X.trim();return z===""?"App name cannot be empty":z.length<$t||z.length>Rt?`App name must be between ${$t} and ${Rt} characters`:!0}});if(k==null)throw new p("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");c.projectName=k}let x=r&&(i.new===!0||c.initMode===oe.New);if(!i.mount&&!x){let k=await we({message:"What path do you want to use locally? (e.g., /app)",default:"/app"});c.mountPath=kr(k)}}let l=i.projectName||c.projectName,d=i.framework||c.scaffoldName,f=r?i.new?oe.New:c.initMode??(Y()?oe.New:oe.Existing):oe.Existing,m=f===oe.New?i.mount||c.mountPath||"/":i.mount||c.mountPath||"/app",g=i.siteId,w=kr(m);if(!l||typeof l!="string"||l.trim()==="")throw new p("--project-name cannot be empty");if(l.length<$t||l.length>Rt)throw new p(`--project-name must be between ${$t} and ${Rt} characters`);if(!d)throw new p("--framework is required");if(!a.includes(d)){let x=a.join(`
|
|
156
|
+
- `);throw new p(`--framework "${d}" not found
|
|
188
157
|
|
|
189
158
|
Available frameworks:
|
|
190
|
-
- ${
|
|
191
|
-
Use --project-name to provide a valid name.`);let
|
|
159
|
+
- ${x}`)}if(typeof w!="string"||!Mi(w))throw new p("Invalid mount path: "+w);if(f===oe.Existing&&!g&&(!s||Y()))throw new p("--site-id is required when connecting to an existing site in non-interactive mode.");await Fc(l,w,d,g,f,i.workspaceId)});let o=t.command("deploy").description("Deploy your Webflow Cloud project").option("-e, --environment <environment>","Environment name").option("-m, --mount <mount>","Mount path (e.g., /app)").option("-n, --project-name <name>","Project name (for new projects)").option("-d, --directory <path>","Project directory path (for new projects)").option("--description <description>","Project description (for new projects)").option("--skip-mount-path-check","Skip mount path checking").option("--auto-publish","Automatically publish site for mount path updates").option("-s, --site-id <siteId>","Webflow site ID for site-attached deploys (skips site picker)").option("-p, --project-id <projectId>","Cloud project ID (skips app picker)").option("-f, --framework <framework>","Override framework detection (e.g., nextjs, astro)");r&&o.option("-w, --workspace-id <workspaceId>","Workspace ID for standalone first deploys (skips workspace picker)"),o.action(async i=>{try{if(i.directory)try{process.chdir(i.directory),u.info(`Changed directory to: ${i.directory}`)}catch(z){throw u.error(`Error: Could not change to directory ${i.directory}`),new p(z)}if(i.framework){if(!ao.includes(i.framework))throw new p(`Framework "${i.framework}" is not supported. Allowed: ${ao.join(", ")}.`);Q({cloud:{framework:i.framework}})}let s=await nm({siteId:i.siteId,workspaceId:i.workspaceId}),{workspaceId:a}=s,{credentials:c,manifest:l}=s,d=!!a;if(a){if(!r)throw new p("Standalone Cloud apps are only available in @next builds. Install with: npm i -g @webflow/webflow-cli@next");let z=om.default.basename(process.cwd()).trim(),E=z.length>=$t&&z.length<=Rt,P=i.projectName??(E?z:"Cloud App");if(P.length<$t||P.length>Rt)throw new p(`Project name must be between ${$t} and ${Rt} characters (got ${P.length}).
|
|
160
|
+
Use --project-name to provide a valid name.`);let Z=u.spinner("Creating Cloud app...");try{let S=await em({accessToken:c.accessToken,workspaceId:a,displayName:P});Z.succeed(`Cloud app created: ${S.cloudApp.displayName}`),Q({siteId:S.cloudApp.siteId,cloud:{...l.cloud,project_id:S.cloudApp.project.id,environment_id:S.cloudApp.environment.id}}),ut({siteId:S.cloudApp.siteId,directory:"."}),process.env.WEBFLOW_SITE_ID=S.cloudApp.siteId,{manifest:l}=J()}catch(S){throw Z.fail("Failed to create app"),new p(S,{prefix:"Could not create app:"})}let O=l.siteId;if(!O)throw new p("Expected siteId in manifest after Cloud app creation.");c={accessToken:c.accessToken,siteId:O}}let f;try{f=N.forCloud({authToken:c.accessToken,siteId:c.siteId})}catch(z){u.debug(`Failed to initialize telemetry: ${z}`)}let m=l.cloud||{},g=i.projectId??m.project_id,w,x,k=i.projectName,X=i.description;if(i.environment&&i.mount){if(w=i.environment,x=kr(i.mount),!Mi(x))throw new p("Invalid mount path: "+x)}else{let z=[];if(!g){if(!k&&Y())throw new p("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");try{let P=await Wp(c);if(P.projects.length>0){let Z=await ke({message:"Select an app to deploy to:",choices:[...P.projects.map(O=>({name:`${O.name} (${O.description||"No description"})`,value:O.id})),{name:"Create new app",value:null}]});Z?(g=Z,u.info("\u{1F4DD} Updating webflow.json with app ID..."),Q({cloud:{project_id:Z}})):u.info("Creating a new app will be handled during deployment.")}else u.info("No existing apps found. A new app will be created during deployment.")}catch(P){u.warn("Could not fetch existing apps. A new app will be created during deployment."),u.warn(P instanceof Error?P.message:String(P))}}if(!g&&!k&&(k=await we({message:"What would you like to name your new app?",default:"New Webflow Cloud App",validate:P=>P.trim()===""?"App name cannot be empty":!0})),g)try{let Z=(await Lp(c,g)).environments.map(O=>({name:`${O.branch} (${O.mount})`,value:{branch:O.branch,mount:O.mount}}));z.push(...Z)}catch(P){throw new p(P,{prefix:"Error fetching project environments:"})}z.push({name:"Create new environment",value:null});let E=await ke({message:"Select an environment to deploy to:",choices:z});if(E)w=E.branch,x=kr(E.mount);else if(i.environment?w=i.environment:w=await we({message:"What environment would you like to deploy to?",default:"main",validate:P=>P.trim()===""?"Environment cannot be empty":!0}),i.mount)x=kr(i.mount);else{let P=await we({message:"What path should this environment be mounted at? (e.g., /app)",default:"/app"});x=kr(P)}}if(!Mi(x))throw new p("Invalid mount path: "+x);await Yp(c,w,x,{projectName:k,description:X,directory:i.directory,skipMountPathCheck:d||i.skipMountPathCheck,autoPublish:i.autoPublish,telemetry:f})}catch(s){throw new p(s,{prefix:"Error during deployment setup:"})}})};var Cc=require("commander");Te();Ce();de();j();q();pe();he();ee();Ye();q();q();function L(e,t){if(!/^[a-f0-9]{24}$/.test(e))throw new p(`Invalid ${t}: "${e}" is not a valid resource ID.`,{isUserError:!0})}var xc=e=>e.replace(/\x1b\[[0-9;]*m/g,""),sm=(e,t)=>e+" ".repeat(Math.max(0,t-xc(e).length));function Oe(e,t){let r=e.map((s,a)=>Math.max(xc(s).length,...t.map(c=>xc(String(c[a])).length))),n=r.map(s=>"\u2500".repeat(s+2)).join("\u2500"),o=e.map((s,a)=>sm(s,r[a]+2)).join(""),i=t.map(s=>s.map((a,c)=>sm(String(a),r[c]+2)).join("")).join(`
|
|
192
161
|
`);return`${o}
|
|
193
|
-
${
|
|
194
|
-
${i}`}async function
|
|
195
|
-
`);let
|
|
196
|
-
`)}function
|
|
197
|
-
Next: add fields with "webflow cms fields create --collection ${
|
|
198
|
-
Showing ${m}\u2013${h}${k} items. Use --offset ${h} to load next page.`)}}catch(p){if(p instanceof g&&p.isUserError){d.info(`${N} ${p.message}`),process.exitCode=1;return}throw await a.sendError(p instanceof Error?p:new Error(String(p)),"cms_items_list",{duration:Date.now()-l}),new g(p,{prefix:`${N} Failed to list items:`})}}),o.command("get").description("Get a single CMS item by ID").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").option("--locale <cmsLocaleId>","CMS locale ID to retrieve content for").addOption(Ut).action(async i=>{let s=await Y(),a=G.forCms({authToken:s}),l=Date.now();try{let c=await Qb(s,i.collection,i.item,i.locale);if(await a.sendUsage("cms_items_get",{duration:Date.now()-l}),i.json){d.info(JSON.stringify(c,null,2));return}let u=c.isArchived?"archived":c.isDraft?"draft":"live";d.info(`${c.id} [${u}]`),d.info(` Last updated: ${new Date(c.lastUpdated).toLocaleString()}`),c.lastPublished&&d.info(` Last published: ${new Date(c.lastPublished).toLocaleString()}`),d.info(" Fields:"),d.info(JSON.stringify(c.fieldData,null,4).replace(/^/gm," "))}catch(c){if(c instanceof g&&c.isUserError){d.info(`${N} ${c.message}`),process.exitCode=1;return}throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_items_get",{duration:Date.now()-l}),new g(c,{prefix:`${N} Failed to get item:`})}}),o.command("create").description("Create a new CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--data <json>","Item field data as a JSON string").option("--draft","Create as draft (not published)").addOption(ro).addOption(Ut).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new g(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){d.info("Dry run \u2014 would create item:"),d.info(JSON.stringify({fieldData:s,isDraft:i.draft??!1},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let a=await Y(),l=G.forCms({authToken:a}),c=Date.now();try{let u=await eD(a,i.collection,s,i.draft??!1);if(await l.sendUsage("cms_items_create",{duration:Date.now()-c,dryRun:!1}),i.json){d.info(JSON.stringify(u,null,2));return}d.info(`${ee} Item created: ${u.id}`)}catch(u){if(u instanceof g&&u.isUserError){d.info(`${N} ${u.message}`),process.exitCode=1;return}throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_create",{duration:Date.now()-c}),new g(u,{prefix:`${N} Failed to create item:`})}}),o.command("update").description("Update an existing CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").requiredOption("--data <json>","Updated field data as a JSON string").addOption(ro).addOption(Ut).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new g(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){d.info("Dry run \u2014 would update item:"),d.info(JSON.stringify({collectionId:i.collection,itemId:i.item,fieldData:s},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let a=await Y(),l=G.forCms({authToken:a}),c=Date.now();try{let u=await tD(a,i.collection,i.item,s);if(await l.sendUsage("cms_items_update",{duration:Date.now()-c,dryRun:!1}),i.json){d.info(JSON.stringify(u,null,2));return}d.info(`${ee} Item updated: ${u.id}`)}catch(u){if(u instanceof g&&u.isUserError){d.info(`${N} ${u.message}`),process.exitCode=1;return}throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_update",{duration:Date.now()-c}),new g(u,{prefix:`${N} Failed to update item:`})}}),o.command("delete").description("Delete a CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").addOption(ro).action(async i=>{if(i.dryRun){d.info(`Dry run \u2014 would delete item ${i.item} from collection ${i.collection}`),d.info("Dry run complete \u2014 no changes made.");return}let s=await Y(),a=G.forCms({authToken:s}),l=Date.now();try{await nD(s,i.collection,i.item),await a.sendUsage("cms_items_delete",{duration:Date.now()-l,dryRun:!1}),d.info(`${ee} Item deleted: ${i.item}`)}catch(c){if(c instanceof g&&c.isUserError){d.info(`${N} ${c.message}`),process.exitCode=1;return}throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_items_delete",{duration:Date.now()-l}),new g(c,{prefix:`${N} Failed to delete item:`})}}),o.command("publish").description("Publish one or more CMS items. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--items <itemIds>","Comma-separated item IDs to publish").addOption(ro).addOption(Ut).action(async i=>{let s=i.items.split(",").map(u=>u.trim());if(i.dryRun){d.info(`Dry run \u2014 would publish ${s.length} item(s) in collection ${i.collection}:`),s.forEach(u=>d.info(` ${u}`)),d.info("Dry run complete \u2014 no changes made.");return}let a=await Y(),l=G.forCms({authToken:a}),c=Date.now();try{let u=await rD(a,i.collection,s);if(await l.sendUsage("cms_items_publish",{duration:Date.now()-c,itemCount:s.length,dryRun:!1}),i.json){d.info(JSON.stringify(u,null,2));return}let p=u.publishedItemIds?.length??0;d.info(`${ee} Published ${p} item(s)`),u.errors?.length&&u.errors.forEach(f=>d.warn(` ${f.itemId}: ${f.message}`))}catch(u){if(u instanceof g&&u.isUserError){d.info(`${N} ${u.message}`),process.exitCode=1;return}throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_publish",{duration:Date.now()-c}),new g(u,{prefix:`${N} Failed to publish items:`})}})};_e();We();Be();ke();J();te();Ce();_e();le();ht();te();async function cD(e,t,n={}){if(Z(t,"siteId"),n.folderId){Z(n.folderId,"folderId");let a=await kA(e,n.folderId),l=new Set(a.assets);if(l.size===0)return{assets:[],pagination:{total:0,limit:0,offset:0}};let c=[],u=0,p=100;for(;;){let k=await K(`${I}/v2/sites/${t}/assets?limit=${p}&offset=${u}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!k.ok)throw new g(`Failed to list assets: ${k.status} ${k.statusText}`);let T=await k.json(),P=T.assets??[];c.push(...P);let C=T.pagination?.total??0;if(u+=P.length,u>=C||P.length===0)break}let f=c.filter(k=>l.has(k.id)),m=n.offset??0,h=n.limit??f.length,v=f.slice(m,m+h);return{assets:v,pagination:{total:f.length,limit:v.length,offset:m}}}let r=new URLSearchParams;n.limit!=null&&r.set("limit",String(n.limit)),n.offset!=null&&r.set("offset",String(n.offset));let o=r.toString(),i=await K(`${I}/v2/sites/${t}/assets${o?`?${o}`:""}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new g(`Failed to list assets: ${i.status} ${i.statusText}`);let s=await i.json();return{assets:s.assets??[],pagination:s.pagination??{total:0,limit:100,offset:0}}}async function uD(e,t,n,r,o){Z(t,"siteId"),o&&Z(o,"folderId");let i=Vc(n);xA(i.meta.title,i.meta.size);let s=r??i.meta.title,a={fileName:i.meta.title,fileHash:i.meta.fileHash,displayName:s};o&&(a.parentFolder=o);let l=await K(`${I}/v2/sites/${t}/assets`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(a)});if(!l.ok)throw new g(`Failed to initiate asset upload: ${l.status} ${l.statusText}`);let c=await l.json(),u={fields:c.uploadDetails,_id:c.id,s3Url:c.hostedUrl??"",url:c.uploadUrl??"",contentType:c.contentType??"",origFileName:c.originalFileName??i.meta.title,success_action_redirect:"",createdOn:"",updatedOn:""};try{await Uo(i,u)}catch(p){throw await K(`${I}/v2/assets/${u._id}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}}).catch(()=>{}),p}return{id:u._id,hostedUrl:u.s3Url,displayName:s,originalFileName:i.meta.title}}async function dD(e,t,n){Z(t,"assetId");let r=await K(`${I}/v2/assets/${t}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new g(`Failed to update asset: ${r.status} ${r.statusText}`);return await r.json()}async function kA(e,t){Z(t,"folderId");let n=await K(`${I}/v2/asset_folders/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new g(`Failed to get folder: ${n.status} ${n.statusText}`);return await n.json()}async function pD(e,t){Z(t,"siteId");let n=await K(`${I}/v2/sites/${t}/asset_folders`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new g(`Failed to list folders: ${n.status} ${n.statusText}`);return(await n.json()).assetFolders??[]}async function fD(e,t,n,r){Z(t,"siteId"),r&&Z(r,"parentFolderId");let o={displayName:n};r&&(o.parentFolder=r);let i=await K(`${I}/v2/sites/${t}/asset_folders`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new g(`Failed to create folder: ${i.status} ${i.statusText}`);return await i.json()}var lD={png:{category:"image",maxBytes:4*1024*1024},jpeg:{category:"image",maxBytes:4*1024*1024},jpg:{category:"image",maxBytes:4*1024*1024},gif:{category:"image",maxBytes:4*1024*1024},svg:{category:"image",maxBytes:4*1024*1024},webp:{category:"image",maxBytes:4*1024*1024},avif:{category:"image",maxBytes:4*1024*1024},pdf:{category:"document",maxBytes:10*1024*1024},doc:{category:"document",maxBytes:10*1024*1024},docx:{category:"document",maxBytes:10*1024*1024},xls:{category:"document",maxBytes:10*1024*1024},xlsx:{category:"document",maxBytes:10*1024*1024},ppt:{category:"document",maxBytes:10*1024*1024},pptx:{category:"document",maxBytes:10*1024*1024},txt:{category:"document",maxBytes:10*1024*1024},csv:{category:"document",maxBytes:10*1024*1024},odt:{category:"document",maxBytes:10*1024*1024},ods:{category:"document",maxBytes:10*1024*1024},odp:{category:"document",maxBytes:10*1024*1024},json:{category:"lottie",maxBytes:10*1024*1024},lottie:{category:"lottie",maxBytes:10*1024*1024}};function xA(e,t){let n=e.split(".").pop()?.toLowerCase()??"",r=lD[n];if(!r){let o=Object.keys(lD).join(", ");throw new g(`Unsupported file type ".${n}". Allowed types: ${o}`,{isUserError:!0})}if(t>r.maxBytes){let o=r.maxBytes/1048576,i=(t/(1024*1024)).toFixed(1);throw new g(`File too large: ${i} MB exceeds the ${o} MB limit for ${r.category} files.`,{isUserError:!0})}}var Hu=["id","displayName","originalFileName","contentType","size","lastUpdated"];function mD(e,t=["id","displayName","lastUpdated","size"]){if(e.length===0)return E.dim("No assets found.");let n=Object.fromEntries(Hu.map(l=>[l.toLowerCase(),l])),r=t.map(l=>n[l.toLowerCase()]).filter(l=>l!=null);if(r.length===0)return E.red(`Invalid fields. Available: ${Hu.join(", ")}`);let o=t.filter(l=>n[l.toLowerCase()]==null),i=o.length>0?E.yellow(`Warning: unknown field(s) ignored: ${o.join(", ")}. Available: ${Hu.join(", ")}
|
|
199
|
-
`):"",s=
|
|
200
|
-
Supported types: png, jpg, jpeg, gif, svg, webp, avif (\u22644 MB); pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv, odt, ods, odp, json, lottie (\u226410 MB)`).argument("<file>","Path to the file to upload (see supported types above)").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--name <displayName>","Display name for the asset (defaults to filename)").option("--folder <folderId>","Upload into a folder").option("--dry-run","Preview the upload without executing it").option("--json","Output as JSON").action(async(r,o)=>{if(o.dryRun){d.info(`Dry run \u2014 would upload: ${r}`),o.name&&d.info(` Display name: ${o.name}`),o.folder&&d.info(` Folder: ${o.folder}`),d.info("Dry run complete \u2014 no changes made.");return}let i,s;if(o.site)i=await Y(),s=o.site;else{let{manifest:c}=Q(),u=await be(c);i=u.accessToken,s=u.siteId}let a=G.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await uD(i,s,r,o.name,o.folder);if(await a.sendUsage("assets_upload",{duration:Date.now()-l,dryRun:!1}),o.json){d.info(JSON.stringify(c,null,2));return}d.info(`${ee} Asset uploaded: ${c.id}`),c.hostedUrl&&d.info(` URL: ${c.hostedUrl}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"assets_upload",{duration:Date.now()-l}),new g(c,{prefix:`${N} Failed to upload asset:`})}}),t.command("update").description("Update an asset's metadata. Use --dry-run to preview.").argument("<assetId>","Asset ID to update").option("--alt-text <text>","Alt text for the asset").option("--display-name <name>","New display name for the asset").option("--dry-run","Preview without executing").option("--json","Output as JSON").action(async(r,o)=>{if(!o.altText&&!o.displayName)throw new g("Provide at least one of --alt-text or --display-name.",{isUserError:!0});if(o.dryRun){d.info(`Dry run \u2014 would update asset: ${r}`),o.altText&&d.info(` Alt text: ${o.altText}`),o.displayName&&d.info(` Display name: ${o.displayName}`),d.info("Dry run complete \u2014 no changes made.");return}let i=await Y(),s=G.forAssets({authToken:i}),a=Date.now();try{let l=await dD(i,r,{altText:o.altText,displayName:o.displayName});if(await s.sendUsage("assets_update",{duration:Date.now()-a,dryRun:!1}),o.json){d.info(JSON.stringify(l,null,2));return}d.info(`${ee} Asset updated: ${l.id}`),l.displayName&&d.info(` Display name: ${l.displayName}`),l.altText&&d.info(` Alt text: ${l.altText}`)}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_update",{duration:Date.now()-a}),new g(l,{prefix:`${N} Failed to update asset:`})}});let n=t.command("folders").description("Manage asset folders");n.command("list").description("List all asset folders for a site").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--json","Output as JSON").action(async r=>{let o,i;if(r.site)o=await Y(),i=r.site;else{let{manifest:l}=Q(),c=await be(l);o=c.accessToken,i=c.siteId}let s=G.forAssets({authToken:o,siteId:i}),a=Date.now();try{let l=await pD(o,i);if(await s.sendUsage("assets_folders_list",{duration:Date.now()-a,count:l.length}),r.json){d.info(JSON.stringify(l,null,2));return}d.info(gD(l))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_folders_list",{duration:Date.now()-a}),new g(l,{prefix:`${N} Failed to list folders:`})}}),n.command("create").description("Create a new asset folder").argument("<name>","Display name for the folder").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--parent <folderId>","Parent folder ID (creates a nested folder)").option("--json","Output as JSON").action(async(r,o)=>{let i,s;if(o.site)i=await Y(),s=o.site;else{let{manifest:c}=Q(),u=await be(c);i=u.accessToken,s=u.siteId}let a=G.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await fD(i,s,r,o.parent);if(await a.sendUsage("assets_folders_create",{duration:Date.now()-l}),o.json){d.info(JSON.stringify(c,null,2));return}d.info(`${ee} Folder created: ${c.id}`),d.info(` Name: ${c.displayName}`),c.parentFolder&&d.info(` Parent: ${c.parentFolder}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"assets_folders_create",{duration:Date.now()-l}),new g(c,{prefix:`${N} Failed to create folder:`})}})};We();Be();J();te();Ce();_e();le();ht();te();async function wD(e,t){Z(t,"siteId");let n=await K(`${I}/v2/sites/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new g(`Failed to get site: ${n.status} ${n.statusText}`);return await n.json()}async function bD(e){let t=[],n=0,r=100;for(;;){let o=new URL(`${I}/v2/sites`);o.searchParams.set("limit",String(r)),o.searchParams.set("offset",String(n));let i=await K(o.toString(),{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new g(`Failed to list sites: ${i.status} ${i.statusText}`);let s=await i.json(),a=s.sites??[];t.push(...a);let l=s.pagination?.total??a.length;if(n+=a.length,n>=l||a.length<r)break}return t}async function DD(e,t){Z(t,"siteId");let n=await K(`${I}/v2/sites/${t}/custom_domains`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new g(`Failed to get custom domains: ${n.status} ${n.statusText}`);return(await n.json()).customDomains??[]}async function vD(e,t,n=[],r){Z(t,"siteId"),r&&Z(r,"pageId");let o=n.length>0?{customDomains:n}:{publishToWebflowSubdomain:!0};r&&(o.pageId=r);let i=await K(`${I}/v2/sites/${t}/publish`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new g(`Failed to publish site: ${i.status} ${i.statusText}`);return await i.json()}var Zu=["id","displayName","shortName","lastPublished","lastUpdated","timeZone"],yD=Object.fromEntries(Zu.map(e=>[e.toLowerCase(),e]));function kD(e,t=["id","displayName","lastPublished"],{warn:n}={}){if(e.length===0)return E.dim("No sites found.");let r=t.map(a=>yD[a.toLowerCase()]).filter(a=>a!=null),o=t.filter(a=>yD[a.toLowerCase()]==null);if(o.length>0&&n&&n(`Unknown field(s): ${o.join(", ")}. Available: ${Zu.join(", ")}`),r.length===0)throw new g(`No valid fields specified. Available: ${Zu.join(", ")}`,{isUserError:!0});let i=r.map(a=>E.bold(a)),s=e.map(a=>r.map(l=>{let c=a[l];return c?l==="lastPublished"||l==="lastUpdated"?new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):c:E.dim("\u2014")}));return Ve(i,s)}function xD(e){if(e.length===0)return E.dim("No custom domains configured.");let t=[E.bold("id"),E.bold("url"),E.bold("lastPublished")],n=e.map(r=>[r.id,r.url,r.lastPublished?new Date(r.lastPublished).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):E.dim("\u2014")]);return Ve(t,n)}var CD=e=>{let t=e.command("sites").description("Manage Webflow sites");t.command("list").description("List all sites in your Webflow workspace").option("--json","Output as JSON").option("--fields <fields>","Comma-separated fields to display (id, displayName, shortName, lastPublished, lastUpdated, timeZone)","id,displayName,lastPublished").action(async n=>{let r=await Y(),o=G.forSites({authToken:r}),i=Date.now();try{let s=await bD(r);if(await o.sendUsage("sites_list",{duration:Date.now()-i,count:s.length}),n.json){d.info(JSON.stringify(s,null,2));return}let a=n.fields.split(",").map(l=>l.trim());d.info(kD(s,a,{warn:l=>d.warn(l)}))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_list",{duration:Date.now()-i}),new g(s,{prefix:`${N} Failed to list sites:`})}}),t.command("get").description("Get details for a specific site").argument("<siteId>","Site ID").option("--json","Output as JSON").action(async(n,r)=>{let o=await Y(),i=G.forSites({authToken:o}),s=Date.now();try{let a=await wD(o,n);if(await i.sendUsage("sites_get",{duration:Date.now()-s}),r.json){d.info(JSON.stringify(a,null,2));return}d.info(`${a.displayName} (${a.id})`),d.info(` Short name: ${a.shortName}`),d.info(` Time zone: ${a.timeZone}`),a.lastPublished&&d.info(` Published: ${new Date(a.lastPublished).toLocaleString()}`),a.previewUrl&&d.info(` Preview: ${a.previewUrl}`)}catch(a){throw await i.sendError(a instanceof Error?a:new Error(String(a)),"sites_get",{duration:Date.now()-s}),new g(a,{prefix:`${N} Failed to get site:`})}}),t.command("domains").description("List custom domains configured for a site").requiredOption("--site <siteId>","Site ID").option("--json","Output as JSON").action(async n=>{let r=await Y(),o=G.forSites({authToken:r}),i=Date.now();try{let s=await DD(r,n.site);if(await o.sendUsage("sites_domains",{duration:Date.now()-i,count:s.length}),n.json){d.info(JSON.stringify(s,null,2));return}d.info(xD(s))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_domains",{duration:Date.now()-i}),new g(s,{prefix:`${N} Failed to get custom domains:`})}}),t.command("publish").description("Publish a Webflow site (defaults to Webflow subdomain)").requiredOption("--site <siteId>","Site ID to publish").option("--domains <domains>","Comma-separated custom domain IDs to publish to").option("--page <pageId>","Publish a single page instead of the whole site").option("--dry-run","Preview what would be published without publishing").option("--json","Output as JSON").action(async n=>{if(Z(n.site,"siteId"),n.dryRun){d.info(`Would publish ${n.page?`page ${n.page} on`:"site"} ${n.site}`),n.domains?d.info(` Custom domains: ${n.domains}`):d.info(" Domains: Webflow subdomain");return}let r=await Y(),o=G.forSites({authToken:r}),i=Date.now();try{let s=n.domains?n.domains.split(",").map(u=>u.trim()):[],a=await vD(r,n.site,s,n.page);if(await o.sendUsage("sites_publish",{duration:Date.now()-i,dryRun:!1,publishScope:a.publishScope}),n.json){d.info(JSON.stringify(a,null,2));return}let l=a.publishScope==="page"?"Page":"Site";d.info(`${ee} ${l} published successfully`);let c=a.customDomains??[];c.length>0?c.forEach(u=>{let p=u.lastPublished?` (${new Date(u.lastPublished).toLocaleString()})`:"";d.info(` Live at: https://${u.url}${p}`)}):a.publishToWebflowSubdomain&&d.info(" Published to Webflow subdomain")}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_publish",{duration:Date.now()-i}),new g(s,{prefix:`${N} Failed to publish site:`})}})};var OD=w(require("fs"));We();Be();J();te();Ce();_e();le();te();ht();te();async function Ku(e,t,n,r){let o=[],i=0,s=100;for(;;){let a=new URL(e);a.searchParams.set("limit",String(s)),a.searchParams.set("offset",String(i));let l=await K(a.toString(),{headers:{Authorization:`Bearer ${t}`,Accept:"application/json"}});if(!l.ok)throw new g(`${r}: ${l.status} ${l.statusText}`);let c=await l.json(),u=c[n]??[];o.push(...u);let p=c.pagination?.total??u.length;if(i+=u.length,i>=p||u.length<s)break}return o}async function FD(e,t){return Z(t,"siteId"),Ku(`${I}/v2/sites/${t}/forms`,e,"forms","Failed to list forms")}async function SD(e,t,n){return Z(t,"siteId"),Z(n,"formId"),Ku(`${I}/v2/sites/${t}/forms/${n}/submissions`,e,"formSubmissions","Failed to list submissions")}var Yu=["id","displayName","name","slug","createdOn","lastUpdated"],ED=Object.fromEntries(Yu.map(e=>[e.toLowerCase(),e]));function _D(e,t=["id","displayName","slug"],{warn:n}={}){if(e.length===0)return E.dim("No forms found.");let r=t.map(a=>ED[a.toLowerCase()]).filter(a=>a!=null),o=t.filter(a=>ED[a.toLowerCase()]==null);if(o.length>0&&n&&n(`Unknown field(s): ${o.join(", ")}. Available: ${Yu.join(", ")}`),r.length===0)throw new g(`No valid fields specified. Available: ${Yu.join(", ")}`,{isUserError:!0});let i=r.map(a=>E.bold(a)),s=e.map(a=>r.map(l=>{let c=a[l];return c?l==="createdOn"||l==="lastUpdated"?new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):c:E.dim("\u2014")}));return Ve(i,s)}function AD(e){if(e.length===0)return E.dim("No submissions found.");let t=Array.from(new Set(e.flatMap(o=>Object.keys(o.formResponse)))),n=["id","dateSubmitted",...t].map(o=>E.bold(o)),r=e.map(o=>[o.id,new Date(o.dateSubmitted).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),...t.map(i=>{let s=o.formResponse[i];return s==null?E.dim("\u2014"):typeof s=="object"?JSON.stringify(s):String(s)})]);return Ve(n,r)}function TD(e){if(e.length===0)return"";let n=["id","formId","displayName","dateSubmitted",...Array.from(new Set(e.flatMap(i=>Object.keys(i.formResponse))))],r=i=>{let s=i==null?"":typeof i=="object"?JSON.stringify(i):String(i);return s.includes(",")||s.includes('"')||s.includes(`
|
|
201
|
-
`)?`"${s.replace(/"/g,'""')}"`:s};return[
|
|
202
|
-
`)}var
|
|
162
|
+
${n}
|
|
163
|
+
${i}`}async function st(e){try{let t=await e.json();return t.message??t.error??`${e.status} ${e.statusText}`}catch{return`${e.status} ${e.statusText}`}}async function am(e,t){L(t,"siteId");let r=await W(`${C}/v2/sites/${t}/collections`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!r.ok){let o=await st(r);throw r.status>=400&&r.status<500?new p(o,{isUserError:!0}):new p(`Failed to list collections: ${o}`)}return(await r.json()).collections??[]}async function cm(e,t){L(t,"collectionId");let r=await W(`${C}/v2/collections/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(r.status===404)throw new p(`Collection "${t}" not found`,{isUserError:!0});if(!r.ok)throw new p(`Failed to get collection: ${await st(r)}`);let n=await r.json();return{...n,fields:n.fields??[]}}async function lm(e,t,r){L(t,"siteId");let n={displayName:r.displayName,singularName:r.singularName};r.slug&&(n.slug=r.slug);let o=await W(`${C}/v2/sites/${t}/collections`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});if(!o.ok){let i=await st(o);throw o.status>=400&&o.status<500?new p(i,{isUserError:!0}):new p(`Failed to create collection: ${i}`)}return await o.json()}async function um(e,t,r){L(t,"collectionId");let n=await W(`${C}/v2/collections/${t}/fields`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({displayName:r.displayName,type:r.type,isRequired:r.isRequired??!1})});if(!n.ok){let o=await st(n);throw n.status===404?new p(`Collection "${t}" not found`,{isUserError:!0}):n.status>=400&&n.status<500?new p(o,{isUserError:!0}):new p(`Failed to create field: ${o}`)}return await n.json()}async function dm(e,t,r={}){L(t,"collectionId");let n=new URLSearchParams;r.limit!=null&&n.set("limit",String(r.limit)),r.offset!=null&&n.set("offset",String(r.offset)),r.cmsLocaleId&&n.set("cmsLocaleId",r.cmsLocaleId);let o=n.toString()?`?${n.toString()}`:"",i=await W(`${C}/v2/collections/${t}/items${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(i.status===404)throw new p(`Collection "${t}" not found`,{isUserError:!0});if(!i.ok)throw new p(`Failed to list items: ${await st(i)}`);let s=await i.json();return{items:s.items??[],total:s.total??0,count:s.count??s.items?.length??0,limit:s.limit??r.limit??100,offset:s.offset??r.offset??0}}async function fm(e,t,r,n){L(t,"collectionId"),L(r,"itemId");let o=n?`?cmsLocaleId=${encodeURIComponent(n)}`:"",i=await W(`${C}/v2/collections/${t}/items/${r}${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(i.status===404)throw new p(`Item "${r}" not found`,{isUserError:!0});if(!i.ok)throw new p(`Failed to get item: ${await st(i)}`);return await i.json()}async function pm(e,t,r,n=!1){L(t,"collectionId");let o=await W(`${C}/v2/collections/${t}/items`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:r,isDraft:n})});if(!o.ok){let i=await st(o);throw o.status>=400&&o.status<500?new p(i,{isUserError:!0}):new p(`Failed to create item: ${i}`)}return await o.json()}async function mm(e,t,r,n){L(t,"collectionId"),L(r,"itemId");let o=await W(`${C}/v2/collections/${t}/items/${r}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:n})});if(o.status===404)throw new p(`Item "${r}" not found`,{isUserError:!0});if(!o.ok)throw new p(`Failed to update item: ${await st(o)}`);return await o.json()}async function gm(e,t,r){L(t,"collectionId"),L(r,"itemId");let n=await W(`${C}/v2/collections/${t}/items/${r}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(n.status===404)throw new p(`Item "${r}" not found`,{isUserError:!0});if(!n.ok)throw new p(`Failed to delete item: ${await st(n)}`)}async function hm(e,t,r){L(t,"collectionId"),r.forEach(o=>L(o,"itemId"));let n=await W(`${C}/v2/collections/${t}/items/publish`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({itemIds:r})});if(!n.ok){let o=await st(n);throw n.status>=400&&n.status<500?new p(o,{isUserError:!0}):new p(`Failed to publish items: ${o}`)}return await n.json()}function ym(e,t=["id","displayName","slug"]){if(e.length===0)return D.dim("No collections found.");let r=["id","displayName","singularName","slug","lastUpdated"],n=Object.fromEntries(r.map(a=>[a.toLowerCase(),a])),o=t.map(a=>n[a.toLowerCase()]).filter(a=>a!=null);if(o.length===0)return D.red(`Invalid fields. Available: ${r.join(", ")}`);let i=o.map(a=>D.bold(a)),s=e.map(a=>o.map(c=>{let l=a[c];return l?c==="lastUpdated"?new Date(l).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):l:D.dim("\u2014")}));return Oe(i,s)}function wm(e){let t=[`${D.bold("Collection:")} ${e.displayName}`,`${D.bold("ID:")} ${e.id}`,`${D.bold("Slug:")} ${e.slug}`,`${D.bold("Singular:")} ${e.singularName}`,`${D.bold("Updated:")} ${new Date(e.lastUpdated).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}`,"",D.bold("Fields:")];if(e.fields.length===0)return t.push(D.dim(" No fields defined.")),t.join(`
|
|
164
|
+
`);let r=["NAME","SLUG","TYPE","REQUIRED"].map(o=>D.bold(o)),n=e.fields.map(o=>[o.displayName,o.slug,o.type,o.isRequired?"yes":"no"]);return t.push(Oe(r,n)),t.join(`
|
|
165
|
+
`)}function Dm(e,t=["id","isDraft","lastUpdated"]){if(e.length===0)return D.dim("No items found.");let r=t.map(o=>D.bold(o)),n=e.map(o=>t.map(i=>{if(i==="fieldData")return JSON.stringify(o.fieldData);if(i==="isDraft")return o.isDraft?D.yellow("draft"):D.green("live");if(i==="isArchived")return o.isArchived?D.dim("archived"):"";if(i==="lastUpdated"||i==="lastPublished"||i==="createdOn"){let a=o[i];return a?new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):D.dim("\u2014")}let s=o[i];return s==null?D.dim("\u2014"):String(s)}));return Oe(r,n)}function Li(e,t,r="asc"){return[...e].sort((n,o)=>{let i=n[t],s=o[t];if(i==null&&s==null)return 0;if(i==null)return 1;if(s==null)return-1;let a=0;return typeof i=="string"&&typeof s=="string"?a=i.localeCompare(s):typeof i=="number"&&typeof s=="number"?a=i-s:a=String(i).localeCompare(String(s)),r==="desc"?-a:a})}var bt=new Cc.Option("--json","Output as JSON"),hn=new Cc.Option("--dry-run","Preview without executing"),bm=e=>{let t=e.command("cms").description("Manage Webflow CMS content"),r=t.command("collections").description("Manage CMS collections");r.command("list").description("List all CMS collections for a site").addOption(Zr).addOption(bt).option("--fields <fields>","Comma-separated fields to display (id, displayName, singularName, slug, lastUpdated)","id,displayName,slug").option("--sort-by <field>","Sort by: displayName, slug, lastUpdated","displayName").option("--order <dir>","Sort direction: asc or desc","asc").action(async i=>{let s,a;if(i.site)s=await U(),a=i.site;else{let{manifest:d}=J(),f=await le(d);s=f.accessToken,a=f.siteId}let c=N.forCms({authToken:s,siteId:a}),l=Date.now();try{let d=await am(s,a);if(await c.sendUsage("cms_collections_list",{duration:Date.now()-l,count:d.length}),d.length===0){u.info("No collections found.");return}let f=["displayName","slug","lastUpdated"];if(f.includes(i.sortBy)||(u.warn(`Unknown --sort-by "${i.sortBy}". Valid fields: ${f.join(", ")}. Defaulting to displayName.`),i.sortBy="displayName"),!["asc","desc"].includes(i.order))throw new p(`Invalid --order "${i.order}". Valid values: asc, desc`,{isUserError:!0});let m=Li(d,i.sortBy,i.order);if(i.json){u.info(JSON.stringify(m,null,2));return}let g=i.fields.split(",").map(w=>w.trim());u.info(ym(m,g))}catch(d){if(d instanceof p&&d.isUserError){u.info(`${T} ${d.message}`),process.exitCode=1;return}throw await c.sendError(d instanceof Error?d:new Error(String(d)),"cms_collections_list",{duration:Date.now()-l}),new p(d,{prefix:`${T} Failed to list collections:`})}}),r.command("get").description("Get details and field schema for a CMS collection").argument("<collectionId>","Collection ID").addOption(bt).action(async(i,s)=>{let a=await U(),c=N.forCms({authToken:a}),l=Date.now();try{let d=await cm(a,i);if(await c.sendUsage("cms_collections_get",{duration:Date.now()-l}),s.json){u.info(JSON.stringify(d,null,2));return}u.info(wm(d))}catch(d){if(d instanceof p&&d.isUserError){u.info(`${T} ${d.message}`),process.exitCode=1;return}throw await c.sendError(d instanceof Error?d:new Error(String(d)),"cms_collections_get",{duration:Date.now()-l}),new p(d,{prefix:`${T} Failed to get collection:`})}}),r.command("create").description("Create a new CMS collection on a site. Use --dry-run to preview.").addOption(Zr).requiredOption("--name <displayName>","Collection display name").option("--singular-name <singularName>","Singular name (defaults to --name)").option("--slug <slug>","URL slug for the collection (auto-derived from --name if omitted)").addOption(hn).addOption(bt).action(async i=>{let s=i.singularName??i.name,a=i.slug??i.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");if(i.dryRun){u.info("Dry run \u2014 would create collection:"),u.info(JSON.stringify({displayName:i.name,singularName:s,slug:a},null,2)),u.info("Dry run complete \u2014 no changes made.");return}let c,l;if(i.site)c=await U(),l=i.site;else{let{manifest:m}=J(),g=await le(m);c=g.accessToken,l=g.siteId}let d=N.forCms({authToken:c,siteId:l}),f=Date.now();try{let m=await lm(c,l,{displayName:i.name,singularName:s,slug:a});if(await d.sendUsage("cms_collections_create",{duration:Date.now()-f}),i.json){u.info(JSON.stringify(m,null,2));return}u.info(`${G} Collection created: ${m.id}`),u.info(` Name: ${m.displayName}`),u.info(` Slug: ${m.slug}`),u.info(`
|
|
166
|
+
Next: add fields with "webflow cms fields create --collection ${m.id} --name <name> --type <type>"`)}catch(m){if(m instanceof p&&m.isUserError){u.info(`${T} ${m.message}`),process.exitCode=1;return}throw await d.sendError(m instanceof Error?m:new Error(String(m)),"cms_collections_create",{duration:Date.now()-f}),new p(m,{prefix:`${T} Failed to create collection:`})}}),t.command("fields").description("Manage CMS collection fields").command("create").description("Add a field to a CMS collection. Use --dry-run to preview.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--name <displayName>","Field display name").requiredOption("--type <type>","Field type (e.g. PlainText, RichText, Number, DateTime, Link, Image, Video, Color, Bool, Option, ItemRef, ItemRefSet)").option("--required","Mark field as required").addOption(hn).addOption(bt).action(async i=>{if(i.dryRun){u.info("Dry run \u2014 would create field:"),u.info(JSON.stringify({collectionId:i.collection,displayName:i.name,type:i.type,isRequired:i.required??!1},null,2)),u.info("Dry run complete \u2014 no changes made.");return}let s=await U(),a=N.forCms({authToken:s}),c=Date.now();try{let l=await um(s,i.collection,{displayName:i.name,type:i.type,isRequired:i.required??!1});if(await a.sendUsage("cms_fields_create",{duration:Date.now()-c}),i.json){u.info(JSON.stringify(l,null,2));return}u.info(`${G} Field created: ${l.id}`),u.info(` Name: ${l.displayName}`),u.info(` Type: ${l.type}`),u.info(` Slug: ${l.slug}`)}catch(l){if(l instanceof p&&l.isUserError){u.info(`${T} ${l.message}`),process.exitCode=1;return}throw await a.sendError(l instanceof Error?l:new Error(String(l)),"cms_fields_create",{duration:Date.now()-c}),new p(l,{prefix:`${T} Failed to create field:`})}});let o=t.command("items").description("Manage CMS items");o.command("list").description("List items in a CMS collection").requiredOption("--collection <collectionId>","Collection ID").option("--limit <n>","Maximum items to return (default: 100)","100").option("--offset <n>","Number of items to skip (default: 0)","0").option("--locale <cmsLocaleId>","CMS locale ID to filter by").addOption(bt).option("--fields <fields>","Comma-separated fields to display (id, isDraft, isArchived, lastUpdated, fieldData)","id,isDraft,lastUpdated").action(async i=>{let s=await U(),a=N.forCms({authToken:s}),c=Date.now(),l=parseInt(i.limit,10)||100,d=parseInt(i.offset,10)||0;try{let f=await dm(s,i.collection,{limit:l,offset:d,cmsLocaleId:i.locale});if(await a.sendUsage("cms_items_list",{duration:Date.now()-c,count:f.items.length}),f.items.length===0){u.info("No items found.");return}if(i.json){u.info(JSON.stringify(f,null,2));return}let m=i.fields.split(",").map(k=>k.trim());u.info(Dm(f.items,m));let g=d+1,w=d+f.items.length;if(f.items.length>=l||d>0){let k=f.total>0?` of ${f.total}`:"";u.info(`
|
|
167
|
+
Showing ${g}\u2013${w}${k} items. Use --offset ${w} to load next page.`)}}catch(f){if(f instanceof p&&f.isUserError){u.info(`${T} ${f.message}`),process.exitCode=1;return}throw await a.sendError(f instanceof Error?f:new Error(String(f)),"cms_items_list",{duration:Date.now()-c}),new p(f,{prefix:`${T} Failed to list items:`})}}),o.command("get").description("Get a single CMS item by ID").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").option("--locale <cmsLocaleId>","CMS locale ID to retrieve content for").addOption(bt).action(async i=>{let s=await U(),a=N.forCms({authToken:s}),c=Date.now();try{let l=await fm(s,i.collection,i.item,i.locale);if(await a.sendUsage("cms_items_get",{duration:Date.now()-c}),i.json){u.info(JSON.stringify(l,null,2));return}let d=l.isArchived?"archived":l.isDraft?"draft":"live";u.info(`${l.id} [${d}]`),u.info(` Last updated: ${new Date(l.lastUpdated).toLocaleString()}`),l.lastPublished&&u.info(` Last published: ${new Date(l.lastPublished).toLocaleString()}`),u.info(" Fields:"),u.info(JSON.stringify(l.fieldData,null,4).replace(/^/gm," "))}catch(l){if(l instanceof p&&l.isUserError){u.info(`${T} ${l.message}`),process.exitCode=1;return}throw await a.sendError(l instanceof Error?l:new Error(String(l)),"cms_items_get",{duration:Date.now()-c}),new p(l,{prefix:`${T} Failed to get item:`})}}),o.command("create").description("Create a new CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--data <json>","Item field data as a JSON string").option("--draft","Create as draft (not published)").addOption(hn).addOption(bt).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new p(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){u.info("Dry run \u2014 would create item:"),u.info(JSON.stringify({fieldData:s,isDraft:i.draft??!1},null,2)),u.info("Dry run complete \u2014 no changes made.");return}let a=await U(),c=N.forCms({authToken:a}),l=Date.now();try{let d=await pm(a,i.collection,s,i.draft??!1);if(await c.sendUsage("cms_items_create",{duration:Date.now()-l,dryRun:!1}),i.json){u.info(JSON.stringify(d,null,2));return}u.info(`${G} Item created: ${d.id}`)}catch(d){if(d instanceof p&&d.isUserError){u.info(`${T} ${d.message}`),process.exitCode=1;return}throw await c.sendError(d instanceof Error?d:new Error(String(d)),"cms_items_create",{duration:Date.now()-l}),new p(d,{prefix:`${T} Failed to create item:`})}}),o.command("update").description("Update an existing CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").requiredOption("--data <json>","Updated field data as a JSON string").addOption(hn).addOption(bt).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new p(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){u.info("Dry run \u2014 would update item:"),u.info(JSON.stringify({collectionId:i.collection,itemId:i.item,fieldData:s},null,2)),u.info("Dry run complete \u2014 no changes made.");return}let a=await U(),c=N.forCms({authToken:a}),l=Date.now();try{let d=await mm(a,i.collection,i.item,s);if(await c.sendUsage("cms_items_update",{duration:Date.now()-l,dryRun:!1}),i.json){u.info(JSON.stringify(d,null,2));return}u.info(`${G} Item updated: ${d.id}`)}catch(d){if(d instanceof p&&d.isUserError){u.info(`${T} ${d.message}`),process.exitCode=1;return}throw await c.sendError(d instanceof Error?d:new Error(String(d)),"cms_items_update",{duration:Date.now()-l}),new p(d,{prefix:`${T} Failed to update item:`})}}),o.command("delete").description("Delete a CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").addOption(hn).action(async i=>{if(i.dryRun){u.info(`Dry run \u2014 would delete item ${i.item} from collection ${i.collection}`),u.info("Dry run complete \u2014 no changes made.");return}let s=await U(),a=N.forCms({authToken:s}),c=Date.now();try{await gm(s,i.collection,i.item),await a.sendUsage("cms_items_delete",{duration:Date.now()-c,dryRun:!1}),u.info(`${G} Item deleted: ${i.item}`)}catch(l){if(l instanceof p&&l.isUserError){u.info(`${T} ${l.message}`),process.exitCode=1;return}throw await a.sendError(l instanceof Error?l:new Error(String(l)),"cms_items_delete",{duration:Date.now()-c}),new p(l,{prefix:`${T} Failed to delete item:`})}}),o.command("publish").description("Publish one or more CMS items. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--items <itemIds>","Comma-separated item IDs to publish").addOption(hn).addOption(bt).action(async i=>{let s=i.items.split(",").map(d=>d.trim());if(i.dryRun){u.info(`Dry run \u2014 would publish ${s.length} item(s) in collection ${i.collection}:`),s.forEach(d=>u.info(` ${d}`)),u.info("Dry run complete \u2014 no changes made.");return}let a=await U(),c=N.forCms({authToken:a}),l=Date.now();try{let d=await hm(a,i.collection,s);if(await c.sendUsage("cms_items_publish",{duration:Date.now()-l,itemCount:s.length,dryRun:!1}),i.json){u.info(JSON.stringify(d,null,2));return}let f=d.publishedItemIds?.length??0;u.info(`${G} Published ${f} item(s)`),d.errors?.length&&d.errors.forEach(m=>u.warn(` ${m.itemId}: ${m.message}`))}catch(d){if(d instanceof p&&d.isUserError){u.info(`${T} ${d.message}`),process.exitCode=1;return}throw await c.sendError(d instanceof Error?d:new Error(String(d)),"cms_items_publish",{duration:Date.now()-l}),new p(d,{prefix:`${T} Failed to publish items:`})}})};he();Te();Ce();de();j();q();pe();he();ee();Ye();q();async function Fm(e,t,r={}){if(L(t,"siteId"),r.folderId){L(r.folderId,"folderId");let a=await JD(e,r.folderId),c=new Set(a.assets);if(c.size===0)return{assets:[],pagination:{total:0,limit:0,offset:0}};let l=[],d=0,f=100;for(;;){let k=await W(`${C}/v2/sites/${t}/assets?limit=${f}&offset=${d}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!k.ok)throw new p(`Failed to list assets: ${k.status} ${k.statusText}`);let X=await k.json(),z=X.assets??[];l.push(...z);let E=X.pagination?.total??0;if(d+=z.length,d>=E||z.length===0)break}let m=l.filter(k=>c.has(k.id)),g=r.offset??0,w=r.limit??m.length,x=m.slice(g,g+w);return{assets:x,pagination:{total:m.length,limit:x.length,offset:g}}}let n=new URLSearchParams;r.limit!=null&&n.set("limit",String(r.limit)),r.offset!=null&&n.set("offset",String(r.offset));let o=n.toString(),i=await W(`${C}/v2/sites/${t}/assets${o?`?${o}`:""}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new p(`Failed to list assets: ${i.status} ${i.statusText}`);let s=await i.json();return{assets:s.assets??[],pagination:s.pagination??{total:0,limit:100,offset:0}}}async function Em(e,t,r,n,o){L(t,"siteId"),o&&L(o,"folderId");let i=Fa(r);GD(i.meta.title,i.meta.size);let s=n??i.meta.title,a={fileName:i.meta.title,fileHash:i.meta.fileHash,displayName:s};o&&(a.parentFolder=o);let c=await W(`${C}/v2/sites/${t}/assets`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(a)});if(!c.ok)throw new p(`Failed to initiate asset upload: ${c.status} ${c.statusText}`);let l=await c.json(),d={fields:l.uploadDetails,_id:l.id,s3Url:l.hostedUrl??"",url:l.uploadUrl??"",contentType:l.contentType??"",origFileName:l.originalFileName??i.meta.title,success_action_redirect:"",createdOn:"",updatedOn:""};try{await Jn(i,d)}catch(f){throw await W(`${C}/v2/assets/${d._id}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}}).catch(()=>{}),f}return{id:d._id,hostedUrl:d.s3Url,displayName:s,originalFileName:i.meta.title}}async function xm(e,t,r){L(t,"assetId");let n=await W(`${C}/v2/assets/${t}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)});if(!n.ok)throw new p(`Failed to update asset: ${n.status} ${n.statusText}`);return await n.json()}async function JD(e,t){L(t,"folderId");let r=await W(`${C}/v2/asset_folders/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!r.ok)throw new p(`Failed to get folder: ${r.status} ${r.statusText}`);return await r.json()}async function Cm(e,t){L(t,"siteId");let r=await W(`${C}/v2/sites/${t}/asset_folders`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!r.ok)throw new p(`Failed to list folders: ${r.status} ${r.statusText}`);return(await r.json()).assetFolders??[]}async function _m(e,t,r,n){L(t,"siteId"),n&&L(n,"parentFolderId");let o={displayName:r};n&&(o.parentFolder=n);let i=await W(`${C}/v2/sites/${t}/asset_folders`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new p(`Failed to create folder: ${i.status} ${i.statusText}`);return await i.json()}var vm={png:{category:"image",maxBytes:4*1024*1024},jpeg:{category:"image",maxBytes:4*1024*1024},jpg:{category:"image",maxBytes:4*1024*1024},gif:{category:"image",maxBytes:4*1024*1024},svg:{category:"image",maxBytes:4*1024*1024},webp:{category:"image",maxBytes:4*1024*1024},avif:{category:"image",maxBytes:4*1024*1024},pdf:{category:"document",maxBytes:10*1024*1024},doc:{category:"document",maxBytes:10*1024*1024},docx:{category:"document",maxBytes:10*1024*1024},xls:{category:"document",maxBytes:10*1024*1024},xlsx:{category:"document",maxBytes:10*1024*1024},ppt:{category:"document",maxBytes:10*1024*1024},pptx:{category:"document",maxBytes:10*1024*1024},txt:{category:"document",maxBytes:10*1024*1024},csv:{category:"document",maxBytes:10*1024*1024},odt:{category:"document",maxBytes:10*1024*1024},ods:{category:"document",maxBytes:10*1024*1024},odp:{category:"document",maxBytes:10*1024*1024},json:{category:"lottie",maxBytes:10*1024*1024},lottie:{category:"lottie",maxBytes:10*1024*1024}};function GD(e,t){let r=e.split(".").pop()?.toLowerCase()??"",n=vm[r];if(!n){let o=Object.keys(vm).join(", ");throw new p(`Unsupported file type ".${r}". Allowed types: ${o}`,{isUserError:!0})}if(t>n.maxBytes){let o=n.maxBytes/1048576,i=(t/(1024*1024)).toFixed(1);throw new p(`File too large: ${i} MB exceeds the ${o} MB limit for ${n.category} files.`,{isUserError:!0})}}var _c=["id","displayName","originalFileName","contentType","size","lastUpdated"];function km(e,t=["id","displayName","lastUpdated","size"]){if(e.length===0)return D.dim("No assets found.");let r=Object.fromEntries(_c.map(c=>[c.toLowerCase(),c])),n=t.map(c=>r[c.toLowerCase()]).filter(c=>c!=null);if(n.length===0)return D.red(`Invalid fields. Available: ${_c.join(", ")}`);let o=t.filter(c=>r[c.toLowerCase()]==null),i=o.length>0?D.yellow(`Warning: unknown field(s) ignored: ${o.join(", ")}. Available: ${_c.join(", ")}
|
|
168
|
+
`):"",s=n.map(c=>D.bold(c)),a=e.map(c=>n.map(l=>{let d=c[l];if(d==null||l==="size"&&d===0)return D.dim("\u2014");if(l==="size")return zD(Number(d));if(l==="lastUpdated"){let m=new Date(String(d)),g=String(m.getMonth()+1).padStart(2,"0"),w=String(m.getDate()).padStart(2,"0"),x=String(m.getFullYear()).slice(-2),k=String(m.getHours()).padStart(2,"0"),X=String(m.getMinutes()).padStart(2,"0");return`${g}/${w}/${x} ${k}:${X}`}let f=String(d);return l==="displayName"&&f.length>40?D.dim("\u2026")+f.slice(-39):f}));return i+Oe(s,a)}function zD(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Sm(e){if(e.length===0)return D.dim("No folders found.");let t=[...e].sort((o,i)=>o.displayName.localeCompare(i.displayName)),r=["id","displayName","assets","lastUpdated"].map(o=>D.bold(o)),n=t.map(o=>[o.id,o.displayName,String(o.assets.length),new Date(o.lastUpdated).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})]);return Oe(r,n)}var Tm=e=>{let t=e.command("assets").description("Manage Webflow site assets");t.command("list").description("List all assets for a site").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--folder <folderId>","Filter by folder ID").option("--json","Output as JSON").option("--fields <fields>","Comma-separated fields to display (id, displayName, originalFileName, contentType, size, lastUpdated)","id,displayName,lastUpdated,size").option("--limit <n>","Max number of assets to return (default 100)",parseInt).option("--offset <n>","Number of assets to skip",parseInt).option("--sort-by <field>","Sort by: displayName, originalFileName, contentType, size, lastUpdated","displayName").option("--order <dir>","Sort direction: asc or desc","asc").action(async n=>{let o,i;if(n.site)o=await U(),i=n.site;else{let{manifest:c}=J(),l=await le(c);o=l.accessToken,i=l.siteId}let s=N.forAssets({authToken:o,siteId:i}),a=Date.now();try{let{assets:c,pagination:l}=await Fm(o,i,{limit:n.limit,offset:n.offset,folderId:n.folder});if(await s.sendUsage("assets_list",{duration:Date.now()-a,count:c.length}),c.length===0){u.info("No assets found.");return}let d=["displayName","originalFileName","contentType","size","lastUpdated"];if(d.includes(n.sortBy)||(u.warn(`Unknown --sort-by "${n.sortBy}". Valid fields: ${d.join(", ")}. Defaulting to displayName.`),n.sortBy="displayName"),!["asc","desc"].includes(n.order))throw new p(`Invalid --order "${n.order}". Valid values: asc, desc`,{isUserError:!0});let f=Li(c,n.sortBy,n.order);if(n.json){u.info(JSON.stringify({assets:f,pagination:l},null,2));return}let m=n.fields.split(",").map(w=>w.trim());u.info(km(f,m));let g=(n.offset??0)+c.length;g<l.total&&u.info(D.dim(`Showing ${g} of ${l.total} assets. Use --offset ${g} to see more.`))}catch(c){throw await s.sendError(c instanceof Error?c:new Error(String(c)),"assets_list",{duration:Date.now()-a}),new p(c,{prefix:`${T} Failed to list assets:`})}}),t.command("upload").description(`Upload a file as an asset. Use --dry-run to preview before uploading.
|
|
169
|
+
Supported types: png, jpg, jpeg, gif, svg, webp, avif (\u22644 MB); pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv, odt, ods, odp, json, lottie (\u226410 MB)`).argument("<file>","Path to the file to upload (see supported types above)").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--name <displayName>","Display name for the asset (defaults to filename)").option("--folder <folderId>","Upload into a folder").option("--dry-run","Preview the upload without executing it").option("--json","Output as JSON").action(async(n,o)=>{if(o.dryRun){u.info(`Dry run \u2014 would upload: ${n}`),o.name&&u.info(` Display name: ${o.name}`),o.folder&&u.info(` Folder: ${o.folder}`),u.info("Dry run complete \u2014 no changes made.");return}let i,s;if(o.site)i=await U(),s=o.site;else{let{manifest:l}=J(),d=await le(l);i=d.accessToken,s=d.siteId}let a=N.forAssets({authToken:i,siteId:s}),c=Date.now();try{let l=await Em(i,s,n,o.name,o.folder);if(await a.sendUsage("assets_upload",{duration:Date.now()-c,dryRun:!1}),o.json){u.info(JSON.stringify(l,null,2));return}u.info(`${G} Asset uploaded: ${l.id}`),l.hostedUrl&&u.info(` URL: ${l.hostedUrl}`)}catch(l){throw await a.sendError(l instanceof Error?l:new Error(String(l)),"assets_upload",{duration:Date.now()-c}),new p(l,{prefix:`${T} Failed to upload asset:`})}}),t.command("update").description("Update an asset's metadata. Use --dry-run to preview.").argument("<assetId>","Asset ID to update").option("--alt-text <text>","Alt text for the asset").option("--display-name <name>","New display name for the asset").option("--dry-run","Preview without executing").option("--json","Output as JSON").action(async(n,o)=>{if(!o.altText&&!o.displayName)throw new p("Provide at least one of --alt-text or --display-name.",{isUserError:!0});if(o.dryRun){u.info(`Dry run \u2014 would update asset: ${n}`),o.altText&&u.info(` Alt text: ${o.altText}`),o.displayName&&u.info(` Display name: ${o.displayName}`),u.info("Dry run complete \u2014 no changes made.");return}let i=await U(),s=N.forAssets({authToken:i}),a=Date.now();try{let c=await xm(i,n,{altText:o.altText,displayName:o.displayName});if(await s.sendUsage("assets_update",{duration:Date.now()-a,dryRun:!1}),o.json){u.info(JSON.stringify(c,null,2));return}u.info(`${G} Asset updated: ${c.id}`),c.displayName&&u.info(` Display name: ${c.displayName}`),c.altText&&u.info(` Alt text: ${c.altText}`)}catch(c){throw await s.sendError(c instanceof Error?c:new Error(String(c)),"assets_update",{duration:Date.now()-a}),new p(c,{prefix:`${T} Failed to update asset:`})}});let r=t.command("folders").description("Manage asset folders");r.command("list").description("List all asset folders for a site").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--json","Output as JSON").action(async n=>{let o,i;if(n.site)o=await U(),i=n.site;else{let{manifest:c}=J(),l=await le(c);o=l.accessToken,i=l.siteId}let s=N.forAssets({authToken:o,siteId:i}),a=Date.now();try{let c=await Cm(o,i);if(await s.sendUsage("assets_folders_list",{duration:Date.now()-a,count:c.length}),n.json){u.info(JSON.stringify(c,null,2));return}u.info(Sm(c))}catch(c){throw await s.sendError(c instanceof Error?c:new Error(String(c)),"assets_folders_list",{duration:Date.now()-a}),new p(c,{prefix:`${T} Failed to list folders:`})}}),r.command("create").description("Create a new asset folder").argument("<name>","Display name for the folder").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--parent <folderId>","Parent folder ID (creates a nested folder)").option("--json","Output as JSON").action(async(n,o)=>{let i,s;if(o.site)i=await U(),s=o.site;else{let{manifest:l}=J(),d=await le(l);i=d.accessToken,s=d.siteId}let a=N.forAssets({authToken:i,siteId:s}),c=Date.now();try{let l=await _m(i,s,n,o.parent);if(await a.sendUsage("assets_folders_create",{duration:Date.now()-c}),o.json){u.info(JSON.stringify(l,null,2));return}u.info(`${G} Folder created: ${l.id}`),u.info(` Name: ${l.displayName}`),l.parentFolder&&u.info(` Parent: ${l.parentFolder}`)}catch(l){throw await a.sendError(l instanceof Error?l:new Error(String(l)),"assets_folders_create",{duration:Date.now()-c}),new p(l,{prefix:`${T} Failed to create folder:`})}})};Te();Ce();j();q();pe();he();ee();Ye();q();async function Om(e,t){L(t,"siteId");let r=await W(`${C}/v2/sites/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!r.ok)throw new p(`Failed to get site: ${r.status} ${r.statusText}`);return await r.json()}async function Im(e){let t=[],r=0,n=100;for(;;){let o=new URL(`${C}/v2/sites`);o.searchParams.set("limit",String(n)),o.searchParams.set("offset",String(r));let i=await W(o.toString(),{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new p(`Failed to list sites: ${i.status} ${i.statusText}`);let s=await i.json(),a=s.sites??[];t.push(...a);let c=s.pagination?.total??a.length;if(r+=a.length,r>=c||a.length<n)break}return t}async function Pm(e,t){L(t,"siteId");let r=await W(`${C}/v2/sites/${t}/custom_domains`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!r.ok)throw new p(`Failed to get custom domains: ${r.status} ${r.statusText}`);return(await r.json()).customDomains??[]}async function $m(e,t,r=[],n){L(t,"siteId"),n&&L(n,"pageId");let o=r.length>0?{customDomains:r}:{publishToWebflowSubdomain:!0};n&&(o.pageId=n);let i=await W(`${C}/v2/sites/${t}/publish`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new p(`Failed to publish site: ${i.status} ${i.statusText}`);return await i.json()}var kc=["id","displayName","shortName","lastPublished","lastUpdated","timeZone"],Am=Object.fromEntries(kc.map(e=>[e.toLowerCase(),e]));function Rm(e,t=["id","displayName","lastPublished"],{warn:r}={}){if(e.length===0)return D.dim("No sites found.");let n=t.map(a=>Am[a.toLowerCase()]).filter(a=>a!=null),o=t.filter(a=>Am[a.toLowerCase()]==null);if(o.length>0&&r&&r(`Unknown field(s): ${o.join(", ")}. Available: ${kc.join(", ")}`),n.length===0)throw new p(`No valid fields specified. Available: ${kc.join(", ")}`,{isUserError:!0});let i=n.map(a=>D.bold(a)),s=e.map(a=>n.map(c=>{let l=a[c];return l?c==="lastPublished"||c==="lastUpdated"?new Date(l).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):l:D.dim("\u2014")}));return Oe(i,s)}function jm(e){if(e.length===0)return D.dim("No custom domains configured.");let t=[D.bold("id"),D.bold("url"),D.bold("lastPublished")],r=e.map(n=>[n.id,n.url,n.lastPublished?new Date(n.lastPublished).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):D.dim("\u2014")]);return Oe(t,r)}var Bm=e=>{let t=e.command("sites").description("Manage Webflow sites");t.command("list").description("List all sites in your Webflow workspace").option("--json","Output as JSON").option("--fields <fields>","Comma-separated fields to display (id, displayName, shortName, lastPublished, lastUpdated, timeZone)","id,displayName,lastPublished").action(async r=>{let n=await U(),o=N.forSites({authToken:n}),i=Date.now();try{let s=await Im(n);if(await o.sendUsage("sites_list",{duration:Date.now()-i,count:s.length}),r.json){u.info(JSON.stringify(s,null,2));return}let a=r.fields.split(",").map(c=>c.trim());u.info(Rm(s,a,{warn:c=>u.warn(c)}))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_list",{duration:Date.now()-i}),new p(s,{prefix:`${T} Failed to list sites:`})}}),t.command("get").description("Get details for a specific site").argument("<siteId>","Site ID").option("--json","Output as JSON").action(async(r,n)=>{let o=await U(),i=N.forSites({authToken:o}),s=Date.now();try{let a=await Om(o,r);if(await i.sendUsage("sites_get",{duration:Date.now()-s}),n.json){u.info(JSON.stringify(a,null,2));return}u.info(`${a.displayName} (${a.id})`),u.info(` Short name: ${a.shortName}`),u.info(` Time zone: ${a.timeZone}`),a.lastPublished&&u.info(` Published: ${new Date(a.lastPublished).toLocaleString()}`),a.previewUrl&&u.info(` Preview: ${a.previewUrl}`)}catch(a){throw await i.sendError(a instanceof Error?a:new Error(String(a)),"sites_get",{duration:Date.now()-s}),new p(a,{prefix:`${T} Failed to get site:`})}}),t.command("domains").description("List custom domains configured for a site").requiredOption("--site <siteId>","Site ID").option("--json","Output as JSON").action(async r=>{let n=await U(),o=N.forSites({authToken:n}),i=Date.now();try{let s=await Pm(n,r.site);if(await o.sendUsage("sites_domains",{duration:Date.now()-i,count:s.length}),r.json){u.info(JSON.stringify(s,null,2));return}u.info(jm(s))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_domains",{duration:Date.now()-i}),new p(s,{prefix:`${T} Failed to get custom domains:`})}}),t.command("publish").description("Publish a Webflow site (defaults to Webflow subdomain)").requiredOption("--site <siteId>","Site ID to publish").option("--domains <domains>","Comma-separated custom domain IDs to publish to").option("--page <pageId>","Publish a single page instead of the whole site").option("--dry-run","Preview what would be published without publishing").option("--json","Output as JSON").action(async r=>{if(L(r.site,"siteId"),r.dryRun){u.info(`Would publish ${r.page?`page ${r.page} on`:"site"} ${r.site}`),r.domains?u.info(` Custom domains: ${r.domains}`):u.info(" Domains: Webflow subdomain");return}let n=await U(),o=N.forSites({authToken:n}),i=Date.now();try{let s=r.domains?r.domains.split(",").map(d=>d.trim()):[],a=await $m(n,r.site,s,r.page);if(await o.sendUsage("sites_publish",{duration:Date.now()-i,dryRun:!1,publishScope:a.publishScope}),r.json){u.info(JSON.stringify(a,null,2));return}let c=a.publishScope==="page"?"Page":"Site";u.info(`${G} ${c} published successfully`);let l=a.customDomains??[];l.length>0?l.forEach(d=>{let f=d.lastPublished?` (${new Date(d.lastPublished).toLocaleString()})`:"";u.info(` Live at: https://${d.url}${f}`)}):a.publishToWebflowSubdomain&&u.info(" Published to Webflow subdomain")}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_publish",{duration:Date.now()-i}),new p(s,{prefix:`${T} Failed to publish site:`})}})};var Jm=h(require("fs"));Te();Ce();j();q();pe();he();ee();q();Ye();q();async function Sc(e,t,r,n){let o=[],i=0,s=100;for(;;){let a=new URL(e);a.searchParams.set("limit",String(s)),a.searchParams.set("offset",String(i));let c=await W(a.toString(),{headers:{Authorization:`Bearer ${t}`,Accept:"application/json"}});if(!c.ok)throw new p(`${n}: ${c.status} ${c.statusText}`);let l=await c.json(),d=l[r]??[];o.push(...d);let f=l.pagination?.total??d.length;if(i+=d.length,i>=f||d.length<s)break}return o}async function Mm(e,t){return L(t,"siteId"),Sc(`${C}/v2/sites/${t}/forms`,e,"forms","Failed to list forms")}async function Lm(e,t,r){return L(t,"siteId"),L(r,"formId"),Sc(`${C}/v2/sites/${t}/forms/${r}/submissions`,e,"formSubmissions","Failed to list submissions")}var Tc=["id","displayName","name","slug","createdOn","lastUpdated"],Nm=Object.fromEntries(Tc.map(e=>[e.toLowerCase(),e]));function Wm(e,t=["id","displayName","slug"],{warn:r}={}){if(e.length===0)return D.dim("No forms found.");let n=t.map(a=>Nm[a.toLowerCase()]).filter(a=>a!=null),o=t.filter(a=>Nm[a.toLowerCase()]==null);if(o.length>0&&r&&r(`Unknown field(s): ${o.join(", ")}. Available: ${Tc.join(", ")}`),n.length===0)throw new p(`No valid fields specified. Available: ${Tc.join(", ")}`,{isUserError:!0});let i=n.map(a=>D.bold(a)),s=e.map(a=>n.map(c=>{let l=a[c];return l?c==="createdOn"||c==="lastUpdated"?new Date(l).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):l:D.dim("\u2014")}));return Oe(i,s)}function Um(e){if(e.length===0)return D.dim("No submissions found.");let t=Array.from(new Set(e.flatMap(o=>Object.keys(o.formResponse)))),r=["id","dateSubmitted",...t].map(o=>D.bold(o)),n=e.map(o=>[o.id,new Date(o.dateSubmitted).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),...t.map(i=>{let s=o.formResponse[i];return s==null?D.dim("\u2014"):typeof s=="object"?JSON.stringify(s):String(s)})]);return Oe(r,n)}function Vm(e){if(e.length===0)return"";let r=["id","formId","displayName","dateSubmitted",...Array.from(new Set(e.flatMap(i=>Object.keys(i.formResponse))))],n=i=>{let s=i==null?"":typeof i=="object"?JSON.stringify(i):String(i);return s.includes(",")||s.includes('"')||s.includes(`
|
|
170
|
+
`)?`"${s.replace(/"/g,'""')}"`:s};return[r.join(","),...e.map(i=>r.map(s=>n(s==="id"?i.id:s==="formId"?i.formId:s==="displayName"?i.displayName:s==="dateSubmitted"?i.dateSubmitted:i.formResponse[s])).join(","))].join(`
|
|
171
|
+
`)}var Gm=e=>{let t=e.command("forms").description("Manage Webflow forms");t.command("list").description("List all forms for a site").requiredOption("--site <siteId>","Site ID").option("--json","Output as JSON").option("--fields <fields>","Comma-separated fields to display (id, displayName, name, slug, createdOn, lastUpdated)","id,displayName,slug").action(async r=>{let n=await U(),o=N.forForms({authToken:n}),i=Date.now();try{let s=await Mm(n,r.site);if(await o.sendUsage("forms_list",{duration:Date.now()-i,count:s.length}),r.json){u.info(JSON.stringify(s,null,2));return}if(s.length===0){u.info("No forms found.");return}let a=r.fields.split(",").map(c=>c.trim());u.info(Wm(s,a,{warn:c=>u.warn(c)}))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"forms_list",{duration:Date.now()-i}),new p(s,{prefix:`${T} Failed to list forms:`})}}),t.command("submissions").description("List or export form submissions").requiredOption("--site <siteId>","Site ID").requiredOption("--form <formId>","Form ID").option("--json","Output as JSON").option("--output <file>","Save submissions as CSV to a file").action(async r=>{L(r.site,"siteId"),L(r.form,"formId"),r.output&&r.json&&u.warn("--json is ignored when --output is set.");let n=await U(),o=N.forForms({authToken:n}),i=Date.now();try{let s=await Lm(n,r.site,r.form);if(await o.sendUsage("forms_submissions",{duration:Date.now()-i,count:s.length}),s.length===0){u.info("No submissions found.");return}if(r.output){let a=Vm(s);Jm.default.writeFileSync(r.output,a,"utf8"),u.info(`${G} ${s.length} submission${s.length===1?"":"s"} written to ${r.output}`);return}if(r.json){u.info(JSON.stringify(s,null,2));return}u.info(Um(s))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"forms_submissions",{duration:Date.now()-i}),new p(s,{prefix:`${T} Failed to fetch submissions:`})}})};var zm=h(Co());function Ac(e,t){t.forEach(r=>{e.addOption(r)}),e.commands.forEach(r=>Ac(r,t))}function qm(e){let t=zm.default.version;e.name("webflow").description("Webflow CLI").version(t,"-v, --version").addOption(Ja).addOption(Ga).addOption(za).addOption(qa).showHelpAfterError(),e.hook("preAction",async r=>{let n=r.opts();n.input||Tl(!0),lt.start(),n.manifest&&Al(n.manifest);try{await N.promptForConsentIfNeeded()}catch(o){u.debug(`Failed to check telemetry preference: ${o}`)}try{n.skipUpdateCheck||await new $n().prompt()}catch(o){u.debug(`Failed to check for package updates: ${o}`)}}),e.hook("postAction",async()=>{lt.displayGrouped(),lt.stop()}),gu(e),bm(e),zu(e),Wf(e),im(e),Lf(e),Tm(e),Bm(e),Gm(e),Rf(e),e.commands.forEach(r=>{Ac(r,[Ja,Ga,za,qa])})}j();q();var Km=new Hm.Command;qm(Km);Km.parseAsync().catch(e=>{if(e instanceof p){if(!e.skipLogging)if(e.isUserError){let t=e.prefix?`${e.prefix} `:"";console.error(`${t}${e.message}`)}else u.error(e,{prefix:e.prefix})}else u.error(e);process.exit(1)});
|
|
203
172
|
//# sourceMappingURL=index.js.map
|