@webflow/webflow-cli 1.22.0-next.1 → 1.22.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,57 +1,57 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var Nw=Object.create;var Fs=Object.defineProperty;var Lw=Object.getOwnPropertyDescriptor;var Mw=Object.getOwnPropertyNames;var Uw=Object.getPrototypeOf,Ww=Object.prototype.hasOwnProperty;var A=(e,t)=>()=>(e&&(t=e(e=0)),t);var _s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fu=(e,t)=>{for(var n in t)Fs(e,n,{get:t[n],enumerable:!0})},zw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Mw(t))!Ww.call(e,o)&&o!==n&&Fs(e,o,{get:()=>t[o],enumerable:!(r=Lw(t,o))||r.enumerable});return e};var w=(e,t,n)=>(n=e!=null?Nw(Uw(e)):{},zw(t||!e||!e.__esModule?Fs(n,"default",{value:e,enumerable:!0}):n,e));function qw(){let e=new Map;for(let[t,n]of Object.entries(ue)){for(let[r,o]of Object.entries(n))ue[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[r]=ue[r],e.set(o[0],o[1]);Object.defineProperty(ue,t,{value:n,enumerable:!1})}return Object.defineProperty(ue,"codes",{value:e,enumerable:!1}),ue.color.close="\x1B[39m",ue.bgColor.close="\x1B[49m",ue.color.ansi=mu(),ue.color.ansi256=hu(),ue.color.ansi16m=gu(),ue.bgColor.ansi=mu(10),ue.bgColor.ansi256=hu(10),ue.bgColor.ansi16m=gu(10),Object.defineProperties(ue,{rgbToAnsi256:{value(t,n,r){return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(i=>i+i).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>ue.rgbToAnsi256(...ue.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,o;if(t>=232)n=((t-232)*10+8)/255,r=n,o=n;else{t-=16;let a=t%36;n=Math.floor(t/36)/5,r=Math.floor(a/6)/5,o=a%6/5}let i=Math.max(n,r,o)*2;if(i===0)return 30;let s=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(n));return i===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>ue.ansi256ToAnsi(ue.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>ue.ansi256ToAnsi(ue.hexToAnsi256(t)),enumerable:!1}}),ue}var mu,hu,gu,ue,E2,Vw,Gw,F2,Jw,Ze,yu=A(()=>{"use strict";mu=(e=0)=>t=>`\x1B[${t+e}m`,hu=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,gu=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,ue={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]}},E2=Object.keys(ue.modifier),Vw=Object.keys(ue.color),Gw=Object.keys(ue.bgColor),F2=[...Vw,...Gw];Jw=qw(),Ze=Jw});function Le(e,t=globalThis.Deno?globalThis.Deno.args:Oo.default.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}function Hw(){if("FORCE_COLOR"in pe)return pe.FORCE_COLOR==="true"?1:pe.FORCE_COLOR==="false"?0:pe.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(pe.FORCE_COLOR,10),3)}function Kw(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Zw(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=Hw();r!==void 0&&(Ao=r);let o=n?Ao:r;if(o===0)return 0;if(n){if(Le("color=16m")||Le("color=full")||Le("color=truecolor"))return 3;if(Le("color=256"))return 2}if("TF_BUILD"in pe&&"AGENT_NAME"in pe)return 1;if(e&&!t&&o===void 0)return 0;let i=o||0;if(pe.TERM==="dumb")return i;if(Oo.default.platform==="win32"){let s=wu.default.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in pe)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in pe)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in pe)||pe.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in pe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(pe.TEAMCITY_VERSION)?1:0;if(pe.COLORTERM==="truecolor"||pe.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in pe){let s=Number.parseInt((pe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(pe.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(pe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(pe.TERM)||"COLORTERM"in pe?1:i}function bu(e,t={}){let n=Zw(e,{streamIsTTY:e&&e.isTTY,...t});return Kw(n)}var Oo,wu,Ss,pe,Ao,Yw,Du,ku=A(()=>{"use strict";Oo=w(require("process"),1),wu=w(require("os"),1),Ss=w(require("tty"),1);({env:pe}=Oo.default);Le("no-color")||Le("no-colors")||Le("color=false")||Le("color=never")?Ao=0:(Le("color")||Le("colors")||Le("color=true")||Le("color=always"))&&(Ao=1);Yw={stdout:bu({isTTY:Ss.default.isatty(1)}),stderr:bu({isTTY:Ss.default.isatty(2)})},Du=Yw});function vu(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let o=t.length,i=0,s="";do s+=e.slice(i,r)+t+n,i=r+o,r=e.indexOf(t,i);while(r!==-1);return s+=e.slice(i),s}function xu(e,t,n,r){let o=0,i="";do{let s=e[r-1]==="\r";i+=e.slice(o,s?r-1:r)+t+(s?`\r
2
+ "use strict";var WD=Object.create;var da=Object.defineProperty;var UD=Object.getOwnPropertyDescriptor;var zD=Object.getOwnPropertyNames;var VD=Object.getPrototypeOf,JD=Object.prototype.hasOwnProperty;var O=(e,t)=>()=>(e&&(t=e(e=0)),t);var pa=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),td=(e,t)=>{for(var n in t)da(e,n,{get:t[n],enumerable:!0})},qD=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of zD(t))!JD.call(e,o)&&o!==n&&da(e,o,{get:()=>t[o],enumerable:!(r=UD(t,o))||r.enumerable});return e};var w=(e,t,n)=>(n=e!=null?WD(VD(e)):{},qD(t||!e||!e.__esModule?da(n,"default",{value:e,enumerable:!0}):n,e));function YD(){let e=new Map;for(let[t,n]of Object.entries(ue)){for(let[r,o]of Object.entries(n))ue[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[r]=ue[r],e.set(o[0],o[1]);Object.defineProperty(ue,t,{value:n,enumerable:!1})}return Object.defineProperty(ue,"codes",{value:e,enumerable:!1}),ue.color.close="\x1B[39m",ue.bgColor.close="\x1B[49m",ue.color.ansi=rd(),ue.color.ansi256=od(),ue.color.ansi16m=id(),ue.bgColor.ansi=rd(10),ue.bgColor.ansi256=od(10),ue.bgColor.ansi16m=id(10),Object.defineProperties(ue,{rgbToAnsi256:{value(t,n,r){return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(i=>i+i).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>ue.rgbToAnsi256(...ue.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,o;if(t>=232)n=((t-232)*10+8)/255,r=n,o=n;else{t-=16;let a=t%36;n=Math.floor(t/36)/5,r=Math.floor(a/6)/5,o=a%6/5}let i=Math.max(n,r,o)*2;if(i===0)return 30;let s=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(n));return i===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>ue.ansi256ToAnsi(ue.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>ue.ansi256ToAnsi(ue.hexToAnsi256(t)),enumerable:!1}}),ue}var rd,od,id,ue,TA,ZD,KD,OA,XD,it,sd=O(()=>{"use strict";rd=(e=0)=>t=>`\x1B[${t+e}m`,od=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,id=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,ue={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]}},TA=Object.keys(ue.modifier),ZD=Object.keys(ue.color),KD=Object.keys(ue.bgColor),OA=[...ZD,...KD];XD=YD(),it=XD});function Je(e,t=globalThis.Deno?globalThis.Deno.args:ui.default.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}function QD(){if("FORCE_COLOR"in pe)return pe.FORCE_COLOR==="true"?1:pe.FORCE_COLOR==="false"?0:pe.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(pe.FORCE_COLOR,10),3)}function ev(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function tv(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=QD();r!==void 0&&(ci=r);let o=n?ci:r;if(o===0)return 0;if(n){if(Je("color=16m")||Je("color=full")||Je("color=truecolor"))return 3;if(Je("color=256"))return 2}if("TF_BUILD"in pe&&"AGENT_NAME"in pe)return 1;if(e&&!t&&o===void 0)return 0;let i=o||0;if(pe.TERM==="dumb")return i;if(ui.default.platform==="win32"){let s=ld.default.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in pe)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in pe)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in pe)||pe.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in pe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(pe.TEAMCITY_VERSION)?1:0;if(pe.COLORTERM==="truecolor"||pe.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in pe){let s=Number.parseInt((pe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(pe.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(pe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(pe.TERM)||"COLORTERM"in pe?1:i}function ad(e,t={}){let n=tv(e,{streamIsTTY:e&&e.isTTY,...t});return ev(n)}var ui,ld,fa,pe,ci,nv,cd,ud=O(()=>{"use strict";ui=w(require("process"),1),ld=w(require("os"),1),fa=w(require("tty"),1);({env:pe}=ui.default);Je("no-color")||Je("no-colors")||Je("color=false")||Je("color=never")?ci=0:(Je("color")||Je("colors")||Je("color=true")||Je("color=always"))&&(ci=1);nv={stdout:ad({isTTY:fa.default.isatty(1)}),stderr:ad({isTTY:fa.default.isatty(2)})},cd=nv});function dd(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let o=t.length,i=0,s="";do s+=e.slice(i,r)+t+n,i=r+o,r=e.indexOf(t,i);while(r!==-1);return s+=e.slice(i),s}function pd(e,t,n,r){let o=0,i="";do{let s=e[r-1]==="\r";i+=e.slice(o,s?r-1:r)+t+(s?`\r
3
3
  `:`
4
4
  `)+n,o=r+1,r=e.indexOf(`
5
- `,o)}while(r!==-1);return i+=e.slice(o),i}var Cu=A(()=>{"use strict"});function Or(e){return Qw(e)}var Eu,Fu,Ts,Bn,Ar,_u,Nn,Xw,Qw,As,eD,tD,Os,Io,nD,rD,P2,v,Ee=A(()=>{"use strict";yu();ku();Cu();({stdout:Eu,stderr:Fu}=Du),Ts=Symbol("GENERATOR"),Bn=Symbol("STYLER"),Ar=Symbol("IS_EMPTY"),_u=["ansi","ansi","ansi256","ansi16m"],Nn=Object.create(null),Xw=(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 n=Eu?Eu.level:0;e.level=t.level===void 0?n:t.level},Qw=e=>{let t=(...n)=>n.join(" ");return Xw(t,e),Object.setPrototypeOf(t,Or.prototype),t};Object.setPrototypeOf(Or.prototype,Function.prototype);for(let[e,t]of Object.entries(Ze))Nn[e]={get(){let n=Io(this,Os(t.open,t.close,this[Bn]),this[Ar]);return Object.defineProperty(this,e,{value:n}),n}};Nn.visible={get(){let e=Io(this,this[Bn],!0);return Object.defineProperty(this,"visible",{value:e}),e}};As=(e,t,n,...r)=>e==="rgb"?t==="ansi16m"?Ze[n].ansi16m(...r):t==="ansi256"?Ze[n].ansi256(Ze.rgbToAnsi256(...r)):Ze[n].ansi(Ze.rgbToAnsi(...r)):e==="hex"?As("rgb",t,n,...Ze.hexToRgb(...r)):Ze[n][e](...r),eD=["rgb","hex","ansi256"];for(let e of eD){Nn[e]={get(){let{level:n}=this;return function(...r){let o=Os(As(e,_u[n],"color",...r),Ze.color.close,this[Bn]);return Io(this,o,this[Ar])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Nn[t]={get(){let{level:n}=this;return function(...r){let o=Os(As(e,_u[n],"bgColor",...r),Ze.bgColor.close,this[Bn]);return Io(this,o,this[Ar])}}}}tD=Object.defineProperties(()=>{},{...Nn,level:{enumerable:!0,get(){return this[Ts].level},set(e){this[Ts].level=e}}}),Os=(e,t,n)=>{let r,o;return n===void 0?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},Io=(e,t,n)=>{let r=(...o)=>nD(r,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(r,tD),r[Ts]=e,r[Bn]=t,r[Ar]=n,r},nD=(e,t)=>{if(e.level<=0||!t)return e[Ar]?"":t;let n=e[Bn];if(n===void 0)return t;let{openAll:r,closeAll:o}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=vu(t,n.close,n.open),n=n.parent;let i=t.indexOf(`
6
- `);return i!==-1&&(t=xu(t,o,r,i)),r+t+o};Object.defineProperties(Or.prototype,Nn);rD=Or(),P2=Or({level:Fu?Fu.level:0}),v=rD});function Is(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let o of Reflect.ownKeys(t))oD(e,t,o,n);return sD(e,t),uD(e,t,r),e}var oD,iD,sD,aD,lD,cD,uD,Su=A(()=>{"use strict";oD=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!iD(o,i)&&r||Object.defineProperty(e,n,i)},iD=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)},sD=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},aD=(e,t)=>`/* Wrapped ${e}*/
7
- ${t}`,lD=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),cD=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),uD=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,o=aD.bind(null,r,t.toString());Object.defineProperty(o,"name",cD);let{writable:i,enumerable:s,configurable:a}=lD;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a})}});var Po,Tu,Au,Ou=A(()=>{"use strict";Su();Po=new WeakMap,Tu=(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(Po.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 Is(i,e),Po.set(i,r),i};Tu.callCount=e=>{if(!Po.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Po.get(e)};Au=Tu});var tn,Iu=A(()=>{"use strict";tn=[];tn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&tn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&tn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});var Ro,Ps,Rs,dD,$s,$o,pD,js,Bs,Ns,Pu,M2,U2,Ru=A(()=>{"use strict";Iu();Ro=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",Ps=Symbol.for("signal-exit emitter"),Rs=globalThis,dD=Object.defineProperty.bind(Object),$s=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Rs[Ps])return Rs[Ps];dD(Rs,Ps,{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}},$o=class{},pD=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),js=class extends $o{onExit(){return()=>{}}load(){}unload(){}},Bs=class extends $o{#s=Ns.platform==="win32"?"SIGINT":"SIGHUP";#n=new $s;#e;#o;#p;#t={};#i=!1;constructor(t){super(),this.#e=t,this.#t={};for(let n of tn)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(!Ro(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 tn)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,tn.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 Ro(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"&&Ro(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)}},Ns=globalThis.process,{onExit:Pu,load:M2,unload:U2}=pD(Ro(Ns)?new Bs(Ns):new js)});var Ir,$u,fD,ju,Bu=A(()=>{"use strict";Ir=w(require("process"),1);Ou();Ru();$u=Ir.default.stderr.isTTY?Ir.default.stderr:Ir.default.stdout.isTTY?Ir.default.stdout:void 0,fD=$u?Au(()=>{Pu(()=>{$u.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},ju=fD});var Ls,jo,Ln,Ms,Nu=A(()=>{"use strict";Ls=w(require("process"),1);Bu();jo=!1,Ln={};Ln.show=(e=Ls.default.stderr)=>{e.isTTY&&(jo=!1,e.write("\x1B[?25h"))};Ln.hide=(e=Ls.default.stderr)=>{e.isTTY&&(ju(),jo=!0,e.write("\x1B[?25l"))};Ln.toggle=(e,t)=>{e!==void 0&&(jo=e),jo?Ln.show(t):Ln.hide(t)};Ms=Ln});var Lu=_s((H2,mD)=>{mD.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 Us=_s((K2,Uu)=>{"use strict";var Bo=Object.assign({},Lu()),Mu=Object.keys(Bo);Object.defineProperty(Bo,"random",{get(){let e=Math.floor(Math.random()*Mu.length),t=Mu[e];return Bo[t]}});Uu.exports=Bo});function Ws(){return Me.default.platform!=="win32"?Me.default.env.TERM!=="linux":!!Me.default.env.CI||!!Me.default.env.WT_SESSION||!!Me.default.env.TERMINUS_SUBLIME||Me.default.env.ConEmuTask==="{cmd::Cmder}"||Me.default.env.TERM_PROGRAM==="Terminus-Sublime"||Me.default.env.TERM_PROGRAM==="vscode"||Me.default.env.TERM==="xterm-256color"||Me.default.env.TERM==="alacritty"||Me.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Me,Wu=A(()=>{"use strict";Me=w(require("process"),1)});var hD,gD,yD,Pr,zu=A(()=>{"use strict";Ee();Wu();hD={info:v.blue("\u2139"),success:v.green("\u2714"),warning:v.yellow("\u26A0"),error:v.red("\u2716")},gD={info:v.blue("i"),success:v.green("\u221A"),warning:v.yellow("\u203C"),error:v.red("\xD7")},yD=Ws()?hD:gD,Pr=yD});function zs({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 Vu=A(()=>{"use strict"});function Rr(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(bD,"")}var bD,Vs=A(()=>{"use strict";Vu();bD=zs()});function Gu(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 qu(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Ju(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 Hu=A(()=>{"use strict"});function wD(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Ku(e,{ambiguousAsWide:t=!1}={}){return wD(e),qu(e)||Ju(e)||t&&Gu(e)?2:1}var Zu=A(()=>{"use strict";Hu()});var Yu,Xu=A(()=>{"use strict";Yu=()=>/[#*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 Gs(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=Rr(e)),e.length===0)return 0;let o=0,i={ambiguousAsWide:!n};for(let{segment:s}of DD.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)&&!kD.test(s)){if(Yu().test(s)){o+=2;continue}o+=Ku(a,i)}}return o}var DD,kD,Qu=A(()=>{"use strict";Vs();Zu();Xu();DD=new Intl.Segmenter,kD=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u")});function qs({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var ed=A(()=>{"use strict"});function Hs(){let{env:e}=Js.default,{TERM:t,TERM_PROGRAM:n}=e;return Js.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 Js,td=A(()=>{"use strict";Js=w(require("process"),1)});var Ye,vD,Ks,xD,Zs,nd=A(()=>{"use strict";Ye=w(require("process"),1),vD=3,Ks=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(){Ye.default.platform==="win32"||!Ye.default.stdin.isTTY||(Ye.default.stdin.setRawMode(!0),Ye.default.stdin.on("data",this.#o),Ye.default.stdin.resume())}#e(){Ye.default.stdin.isTTY&&(Ye.default.stdin.off("data",this.#o),Ye.default.stdin.pause(),Ye.default.stdin.setRawMode(!1))}#o(t){t[0]===vD&&Ye.default.emit("SIGINT")}},xD=new Ks,Zs=xD});function Mn(e){return new Ys(e)}var $r,jr,CD,Ys,Xs=A(()=>{"use strict";$r=w(require("process"),1);Ee();Nu();jr=w(Us(),1);zu();Vs();Qu();ed();td();nd();CD=w(Us(),1),Ys=class{#s=0;#n=!1;#e=0;#o=-1;#p=0;#t;#i;#r;#f;#h;#c;#u;#d;#g;#a;#l;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:$r.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#h=this.#t.interval,this.#r=this.#t.stream,this.#c=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:qs({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,$r.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.#h??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#o=-1,this.#h=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(!Hs())this.#i=jr.default.line;else if(t===void 0)this.#i=jr.default.dots;else if(t!=="default"&&jr.default[t])this.#i=jr.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.#g}set text(t=""){this.#g=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:""}#b(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.#b(this.#l,"-"),o=" ".repeat(this.#d)+n+"--"+this.#g+"--"+r;this.#e=0;for(let i of Rr(o).split(`
8
- `))this.#e+=Math.max(1,Math.ceil(Gs(i,{countAnsiEscapeCodes:!0})/t))}get isEnabled(){return this.#c&&!this.#u}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#c=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.#p>=this.interval)&&(this.#o=++this.#o%this.#i.frames.length,this.#p=t);let{frames:n}=this.#i,r=n[this.#o];this.color&&(r=v[this.color](r));let o=typeof this.#a=="string"&&this.#a!==""?this.#a+" ":"",i=typeof this.text=="string"?" "+this.text:"",s=typeof this.#l=="string"&&this.#l!==""?" "+this.#l:"";return o+r+i+s}clear(){if(!this.#c||!this.#r.isTTY)return this;this.#r.cursorTo(0);for(let t=0;t<this.#s;t++)t>0&&this.#r.moveCursor(0,-1),this.#r.clearLine(1);return(this.#d||this.lastIndent!==this.#d)&&this.#r.cursorTo(this.#d),this.lastIndent=this.#d,this.#s=0,this}render(){return this.#u?this:(this.clear(),this.#r.write(this.frame()),this.#s=this.#e,this)}start(t){return t&&(this.text=t),this.#u?this:this.#c?this.isSpinning?this:(this.#t.hideCursor&&Ms.hide(this.#r),this.#t.discardStdin&&$r.default.stdin.isTTY&&(this.#n=!0,Zs.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#r.write(`- ${this.text}
9
- `),this)}stop(){return this.#c?(clearInterval(this.#f),this.#f=void 0,this.#o=0,this.clear(),this.#t.hideCursor&&Ms.show(this.#r),this.#t.discardStdin&&$r.default.stdin.isTTY&&this.#n&&(Zs.stop(),this.#n=!1),this):this}succeed(t){return this.stopAndPersist({symbol:Pr.success,text:t})}fail(t){return this.stopAndPersist({symbol:Pr.error,text:t})}warn(t){return this.stopAndPersist({symbol:Pr.warning,text:t})}info(t){return this.stopAndPersist({symbol:Pr.info,text:t})}stopAndPersist(t={}){if(this.#u)return this;let n=t.prefixText??this.#a,r=this.#y(n," "),o=t.symbol??" ",i=t.text??this.text,a=typeof i=="string"?(o?" ":"")+i:"",l=t.suffixText??this.#l,c=this.#b(l," "),u=r+o+a+c+`
10
- `;return this.stop(),this.#r.write(u),this}}});function ta(e,{suffix:t="nodejs"}={}){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),No.default.platform==="darwin"?ED(e):No.default.platform==="win32"?FD(e):_D(e)}var de,Qs,No,At,ea,Un,ED,FD,_D,rd=A(()=>{"use strict";de=w(require("path"),1),Qs=w(require("os"),1),No=w(require("process"),1),At=Qs.default.homedir(),ea=Qs.default.tmpdir(),{env:Un}=No.default,ED=e=>{let t=de.default.join(At,"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(ea,e)}},FD=e=>{let t=Un.APPDATA||de.default.join(At,"AppData","Roaming"),n=Un.LOCALAPPDATA||de.default.join(At,"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(ea,e)}},_D=e=>{let t=de.default.basename(At);return{data:de.default.join(Un.XDG_DATA_HOME||de.default.join(At,".local","share"),e),config:de.default.join(Un.XDG_CONFIG_HOME||de.default.join(At,".config"),e),cache:de.default.join(Un.XDG_CACHE_HOME||de.default.join(At,".cache"),e),log:de.default.join(Un.XDG_STATE_HOME||de.default.join(At,".local","state"),e),temp:de.default.join(ea,t,e)}}});function Lo(){return/[<>:"/\\|?*\u0000-\u001F]/g}function od(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}var id=A(()=>{"use strict"});function Br(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(Lo().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(TD,o),e=e.replace(Lo(),o),e=e.replace(n,o),e=e.replace(AD,""),o.length>0&&(!(e[0]===".")&&e[0]==="."&&(e=o+e),e[e.length-1]==="."&&(e+=o)),e=od().test(e)?e+o:e;let i=typeof t.maxLength=="number"?t.maxLength:SD;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 SD,TD,AD,na=A(()=>{"use strict";id();SD=100,TD=/^\.+(\\|\/)|^\.+$/,AD=/\.+$/});var OD,sd=A(()=>{"use strict";OD=w(require("path"),1);na()});var ad=A(()=>{"use strict";na();sd()});var Mo,ra=A(()=>{"use strict";Mo="webflow.json"});var nn,oa=A(()=>{"use strict";nn=class extends Error{constructor(t){super(`Manifest config for key "${t}" not found`),this.name="ManifestConfigKeyNotFoundError"}}});function cd(e){ia=e}function re(){return ia}function rt(){return!ia}function ud(e){ld=e}function dd(){return ld}var ia,ld,Se=A(()=>{"use strict";ia=!1});function rn(){let e=dd();if(e){if(e.endsWith(".json"))return{path:e,isUserDefined:!0};try{if((0,pd.statSync)(e)?.isDirectory())return{path:(0,fd.join)(e,Mo),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:`./${Mo}`,isUserDefined:!1}}var pd,fd,sa=A(()=>{"use strict";pd=require("fs"),fd=require("path");ra();Se()});var md,ID,PD,aa,hd=A(()=>{"use strict";md=w(require("ajv")),ID=new md.default,PD={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:[]}}},aa=ID.compile(PD)});function gd(e){return e instanceof Error?e:new Error("Unknown error")}function Q(){let{path:e}=rn();if(!(0,Uo.existsSync)(e))return{manifest:{},manifestPath:e};let t;try{t=(0,Uo.readFileSync)(e,"utf8")}catch(o){throw new Error(`Failed to read manifest file: ${gd(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: ${gd(o).message}`)}if(!aa(r)){let o=aa.errors?.map(i=>`${i.instancePath} ${i.message}`).join(", ")||"Unknown error";throw new Error(`Invalid manifest: ${o}.`)}return{manifest:r,manifestPath:e}}var Uo,Wo=A(()=>{"use strict";Uo=require("fs");sa();hd()});function Nr(e,t){let n=e[t];if(!n)throw new nn(t);return n}var yd=A(()=>{"use strict";oa()});function oe(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,bd.writeFileSync)(r,JSON.stringify(o,null,2),"utf-8"),o}var bd,la=A(()=>{"use strict";bd=require("fs");Wo()});var ye=A(()=>{"use strict";ra();oa();Wo();sa();yd();la()});var zo=_s((tA,RD)=>{RD.exports={name:"@webflow/webflow-cli",version:"1.22.0-next.1",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.2.2",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 ht(){try{return zo().version}catch{return"unknown"}}function ot(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=Lr.default.homedir();if(n){let o=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");t=t.replace(o,"~/REDACTED_PII")}let r=Lr.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 ca(e){if(e.stack)return ot(e.stack)}function Ot(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]=ot(o):typeof o=="object"&&o!==null&&!Array.isArray(o)?n[r]=Ot(o):Array.isArray(o)?n[r]=o.map(s=>typeof s=="object"&&s!==null?Ot(s):typeof s=="string"?ot(s):s):n[r]=o}return n}function wd(){return{platform:process.platform,nodeVersion:process.version,arch:process.arch,os:`${Lr.default.type()} ${Lr.default.release()}`}}function ua(){let e=Date.now().toString(36),t=Math.random().toString(36).substring(2,8);return`${e}-${t}`}var Lr,Mr=A(()=>{"use strict";Lr=w(require("os"))});var ee,L,gt,Wn,da,zn,ve=A(()=>{"use strict";Ee();ee=v.green("\u2714"),L=v.red("\u2716"),gt=v.cyan("\u2139"),Wn=v.green("\u279C"),da=v.red("\u279C"),zn=v.yellow("\u26A0")});var It,pa=A(()=>{"use strict";Ee();ye();Mr();G();ve();It=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(`${gt} Telemetry is disabled because the DO_NOT_TRACK environment variable is set.`),!1):(d.info(`${gt} Telemetry is enabled. Usage data and error reports help us improve Webflow CLI.`),d.info(`${gt} To opt out, run: ${v.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:ht()}}};await oe(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 Z(e,t){let r={"User-Agent":`webflow-cli@${ht()}`};return(0,Dd.default)(e,{...t,headers:{...t?.headers,...r}})}var Dd,it=A(()=>{"use strict";Dd=w(require("node-fetch"));Ie()});var kd,vd=A(()=>{"use strict";kd=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 fa,P,Vo,Vn,Ur,ma,Wr,zr,Gn,le=A(()=>{"use strict";vd();fa=(e,t)=>(kd(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),P=process.env.WEBFLOW_API_HOST?fa("WEBFLOW_API_HOST",process.env.WEBFLOW_API_HOST):"https://api.webflow.com",Vo=process.env.WEBFLOW_CDN_API_HOST?fa("WEBFLOW_CDN_API_HOST",process.env.WEBFLOW_CDN_API_HOST):"https://api-cdn.webflow.com",Vn=process.env.WEBFLOW_HOST?fa("WEBFLOW_HOST",process.env.WEBFLOW_HOST):"https://webflow.com",Ur="wf-manifest.json",ma="mf-manifest.json",Wr="@webflow_renderer",zr="ssr-bundle.tar",Gn="index.js"});var J,ha=A(()=>{"use strict";pa();Mr();G();it();le();J=class e{config;consentManager;sessionId;platformInfo;constructor(t){this.config=t,this.consentManager=It.getInstance(),this.sessionId=ua(),this.platformInfo=wd()}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:ca(t),context:n,metadata:r?Ot(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?Ot(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=It.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:ht(),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=ot(n.message)),n.stack&&(n.stack=ot(n.stack)),n.context&&(n.context=ot(n.context)),n.metadata&&(n.metadata=Ot(n.metadata)),n.data&&(n.data=Ot(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 Z(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||P,authToken:t.authToken,siteId:t.siteId,commandType:"devlink"})}static forExport(t){return new e({host:t.host||P,authToken:t.authToken,siteId:t.siteId,commandType:"export"})}static forCloud(t){return new e({host:t.host||P,authToken:t.authToken,siteId:t.siteId,projectId:t.projectId,commandType:"cloud"})}static forExtension(t){return new e({host:t.host||P,authToken:t.authToken,siteId:t.siteId,commandType:"extension"})}static forCodeLibraries(t){return new e({host:t.host||P,authToken:t.authToken,commandType:"library"})}static forCms(t){return new e({host:t.host||P,authToken:t.authToken,siteId:t.siteId,commandType:"cms"})}static forAssets(t){return new e({host:t.host||P,authToken:t.authToken,siteId:t.siteId,commandType:"assets"})}static forSites(t){return new e({host:t.host||P,authToken:t.authToken,commandType:"sites"})}static forForms(t){return new e({host:t.host||P,authToken:t.authToken,commandType:"forms"})}}});var xd=A(()=>{"use strict"});function Cd(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 Ie=A(()=>{"use strict";ha();pa();xd();Mr();Mr()});var ya,ga,$D,yt,ba=A(()=>{"use strict";ya=Symbol("webflow-cli-warn"),ga=class{warnings=[];originalConsoleWarn=null;isActive=!1;parseSource(t){let n=t.split(`
11
- `);for(let r=2;r<n.length;r++){let o=n[r],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]===ya){let i=t.slice(0,-1);this.originalConsoleWarn&&this.originalConsoleWarn(...i);return}let n=t.map(i=>{if(typeof i=="string")return i;if(i instanceof Error)return i.message;try{return String(i)}catch{return"[Object]"}}).join(" "),r=new Error().stack||"",o=this.parseSource(r);this.warnings.push({message:n,timestamp:Date.now(),source:o,stackTrace:r})})}stop(){this.isActive&&(this.originalConsoleWarn&&(console.warn=this.originalConsoleWarn,this.originalConsoleWarn=null),this.isActive=!1)}displayGrouped(){if(this.warnings.length===0)return;console.log(`
5
+ `,o)}while(r!==-1);return i+=e.slice(o),i}var fd=O(()=>{"use strict"});function io(e){return ov(e)}var md,gd,ma,ir,oo,hd,sr,rv,ov,ga,iv,sv,ha,di,av,lv,NA,E,_e=O(()=>{"use strict";sd();ud();fd();({stdout:md,stderr:gd}=cd),ma=Symbol("GENERATOR"),ir=Symbol("STYLER"),oo=Symbol("IS_EMPTY"),hd=["ansi","ansi","ansi256","ansi16m"],sr=Object.create(null),rv=(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 n=md?md.level:0;e.level=t.level===void 0?n:t.level},ov=e=>{let t=(...n)=>n.join(" ");return rv(t,e),Object.setPrototypeOf(t,io.prototype),t};Object.setPrototypeOf(io.prototype,Function.prototype);for(let[e,t]of Object.entries(it))sr[e]={get(){let n=di(this,ha(t.open,t.close,this[ir]),this[oo]);return Object.defineProperty(this,e,{value:n}),n}};sr.visible={get(){let e=di(this,this[ir],!0);return Object.defineProperty(this,"visible",{value:e}),e}};ga=(e,t,n,...r)=>e==="rgb"?t==="ansi16m"?it[n].ansi16m(...r):t==="ansi256"?it[n].ansi256(it.rgbToAnsi256(...r)):it[n].ansi(it.rgbToAnsi(...r)):e==="hex"?ga("rgb",t,n,...it.hexToRgb(...r)):it[n][e](...r),iv=["rgb","hex","ansi256"];for(let e of iv){sr[e]={get(){let{level:n}=this;return function(...r){let o=ha(ga(e,hd[n],"color",...r),it.color.close,this[ir]);return di(this,o,this[oo])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);sr[t]={get(){let{level:n}=this;return function(...r){let o=ha(ga(e,hd[n],"bgColor",...r),it.bgColor.close,this[ir]);return di(this,o,this[oo])}}}}sv=Object.defineProperties(()=>{},{...sr,level:{enumerable:!0,get(){return this[ma].level},set(e){this[ma].level=e}}}),ha=(e,t,n)=>{let r,o;return n===void 0?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},di=(e,t,n)=>{let r=(...o)=>av(r,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(r,sv),r[ma]=e,r[ir]=t,r[oo]=n,r},av=(e,t)=>{if(e.level<=0||!t)return e[oo]?"":t;let n=e[ir];if(n===void 0)return t;let{openAll:r,closeAll:o}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=dd(t,n.close,n.open),n=n.parent;let i=t.indexOf(`
6
+ `);return i!==-1&&(t=pd(t,o,r,i)),r+t+o};Object.defineProperties(io.prototype,sr);lv=io(),NA=io({level:gd?gd.level:0}),E=lv});function ya(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let o of Reflect.ownKeys(t))cv(e,t,o,n);return dv(e,t),gv(e,t,r),e}var cv,uv,dv,pv,fv,mv,gv,yd=O(()=>{"use strict";cv=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!uv(o,i)&&r||Object.defineProperty(e,n,i)},uv=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)},dv=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},pv=(e,t)=>`/* Wrapped ${e}*/
7
+ ${t}`,fv=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),mv=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),gv=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,o=pv.bind(null,r,t.toString());Object.defineProperty(o,"name",mv);let{writable:i,enumerable:s,configurable:a}=fv;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a})}});var pi,wd,bd,Dd=O(()=>{"use strict";yd();pi=new WeakMap,wd=(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 ya(i,e),pi.set(i,r),i};wd.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)};bd=wd});var Dn,vd=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,wa,ba,hv,Da,mi,yv,va,ka,xa,kd,JA,qA,xd=O(()=>{"use strict";vd();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",wa=Symbol.for("signal-exit emitter"),ba=globalThis,hv=Object.defineProperty.bind(Object),Da=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ba[wa])return ba[wa];hv(ba,wa,{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{},yv=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),va=class extends mi{onExit(){return()=>{}}load(){}unload(){}},ka=class extends mi{#s=xa.platform==="win32"?"SIGINT":"SIGHUP";#n=new Da;#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)}},xa=globalThis.process,{onExit:kd,load:JA,unload:qA}=yv(fi(xa)?new ka(xa):new va)});var so,Cd,wv,Ed,Fd=O(()=>{"use strict";so=w(require("process"),1);Dd();xd();Cd=so.default.stderr.isTTY?so.default.stderr:so.default.stdout.isTTY?so.default.stdout:void 0,wv=Cd?bd(()=>{kd(()=>{Cd.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},Ed=wv});var Ca,gi,ar,Ea,Sd=O(()=>{"use strict";Ca=w(require("process"),1);Fd();gi=!1,ar={};ar.show=(e=Ca.default.stderr)=>{e.isTTY&&(gi=!1,e.write("\x1B[?25h"))};ar.hide=(e=Ca.default.stderr)=>{e.isTTY&&(Ed(),gi=!0,e.write("\x1B[?25l"))};ar.toggle=(e,t)=>{e!==void 0&&(gi=e),gi?ar.show(t):ar.hide(t)};Ea=ar});var _d=pa((QA,bv)=>{bv.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 Fa=pa((eT,Td)=>{"use strict";var hi=Object.assign({},_d()),Ad=Object.keys(hi);Object.defineProperty(hi,"random",{get(){let e=Math.floor(Math.random()*Ad.length),t=Ad[e];return hi[t]}});Td.exports=hi});function Sa(){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,Od=O(()=>{"use strict";qe=w(require("process"),1)});var Dv,vv,kv,ao,Pd=O(()=>{"use strict";_e();Od();Dv={info:E.blue("\u2139"),success:E.green("\u2714"),warning:E.yellow("\u26A0"),error:E.red("\u2716")},vv={info:E.blue("i"),success:E.green("\u221A"),warning:E.yellow("\u203C"),error:E.red("\xD7")},kv=Sa()?Dv:vv,ao=kv});function _a({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 Id=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(xv,"")}var xv,Aa=O(()=>{"use strict";Id();xv=_a()});function Rd(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 jd(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function $d(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 Bd=O(()=>{"use strict"});function Cv(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Nd(e,{ambiguousAsWide:t=!1}={}){return Cv(e),jd(e)||$d(e)||t&&Rd(e)?2:1}var Ld=O(()=>{"use strict";Bd()});var Md,Wd=O(()=>{"use strict";Md=()=>/[#*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 Ta(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 Ev.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)&&!Fv.test(s)){if(Md().test(s)){o+=2;continue}o+=Nd(a,i)}}return o}var Ev,Fv,Ud=O(()=>{"use strict";Aa();Ld();Wd();Ev=new Intl.Segmenter,Fv=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u")});function Oa({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var zd=O(()=>{"use strict"});function Ia(){let{env:e}=Pa.default,{TERM:t,TERM_PROGRAM:n}=e;return Pa.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 Pa,Vd=O(()=>{"use strict";Pa=w(require("process"),1)});var st,Sv,Ra,_v,ja,Jd=O(()=>{"use strict";st=w(require("process"),1),Sv=3,Ra=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]===Sv&&st.default.emit("SIGINT")}},_v=new Ra,ja=_v});function lr(e){return new $a(e)}var co,uo,Av,$a,Ba=O(()=>{"use strict";co=w(require("process"),1);_e();Sd();uo=w(Fa(),1);Pd();Aa();Ud();zd();Vd();Jd();Av=w(Fa(),1),$a=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:Oa({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(!Ia())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(Ta(i,{countAnsiEscapeCodes:!0})/t))}get isEnabled(){return this.#c&&!this.#u}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#c=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.#p>=this.interval)&&(this.#o=++this.#o%this.#i.frames.length,this.#p=t);let{frames:n}=this.#i,r=n[this.#o];this.color&&(r=E[this.color](r));let o=typeof this.#a=="string"&&this.#a!==""?this.#a+" ":"",i=typeof this.text=="string"?" "+this.text:"",s=typeof this.#l=="string"&&this.#l!==""?" "+this.#l:"";return o+r+i+s}clear(){if(!this.#c||!this.#r.isTTY)return this;this.#r.cursorTo(0);for(let t=0;t<this.#s;t++)t>0&&this.#r.moveCursor(0,-1),this.#r.clearLine(1);return(this.#d||this.lastIndent!==this.#d)&&this.#r.cursorTo(this.#d),this.lastIndent=this.#d,this.#s=0,this}render(){return this.#u?this:(this.clear(),this.#r.write(this.frame()),this.#s=this.#e,this)}start(t){return t&&(this.text=t),this.#u?this:this.#c?this.isSpinning?this:(this.#t.hideCursor&&Ea.hide(this.#r),this.#t.discardStdin&&co.default.stdin.isTTY&&(this.#n=!0,ja.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#r.write(`- ${this.text}
9
+ `),this)}stop(){return this.#c?(clearInterval(this.#f),this.#f=void 0,this.#o=0,this.clear(),this.#t.hideCursor&&Ea.show(this.#r),this.#t.discardStdin&&co.default.stdin.isTTY&&this.#n&&(ja.stop(),this.#n=!1),this):this}succeed(t){return this.stopAndPersist({symbol:ao.success,text:t})}fail(t){return this.stopAndPersist({symbol:ao.error,text:t})}warn(t){return this.stopAndPersist({symbol:ao.warning,text:t})}info(t){return this.stopAndPersist({symbol:ao.info,text:t})}stopAndPersist(t={}){if(this.#u)return this;let n=t.prefixText??this.#a,r=this.#y(n," "),o=t.symbol??" ",i=t.text??this.text,a=typeof i=="string"?(o?" ":"")+i:"",l=t.suffixText??this.#l,c=this.#w(l," "),u=r+o+a+c+`
10
+ `;return this.stop(),this.#r.write(u),this}}});function Ma(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"?Tv(e):yi.default.platform==="win32"?Ov(e):Pv(e)}var de,Na,yi,Vt,La,cr,Tv,Ov,Pv,qd=O(()=>{"use strict";de=w(require("path"),1),Na=w(require("os"),1),yi=w(require("process"),1),Vt=Na.default.homedir(),La=Na.default.tmpdir(),{env:cr}=yi.default,Tv=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(La,e)}},Ov=e=>{let t=cr.APPDATA||de.default.join(Vt,"AppData","Roaming"),n=cr.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(La,e)}},Pv=e=>{let t=de.default.basename(Vt);return{data:de.default.join(cr.XDG_DATA_HOME||de.default.join(Vt,".local","share"),e),config:de.default.join(cr.XDG_CONFIG_HOME||de.default.join(Vt,".config"),e),cache:de.default.join(cr.XDG_CACHE_HOME||de.default.join(Vt,".cache"),e),log:de.default.join(cr.XDG_STATE_HOME||de.default.join(Vt,".local","state"),e),temp:de.default.join(La,t,e)}}});function wi(){return/[<>:"/\\|?*\u0000-\u001F]/g}function Gd(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}var Hd=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(Rv,o),e=e.replace(wi(),o),e=e.replace(n,o),e=e.replace(jv,""),o.length>0&&(!(e[0]===".")&&e[0]==="."&&(e=o+e),e[e.length-1]==="."&&(e+=o)),e=Gd().test(e)?e+o:e;let i=typeof t.maxLength=="number"?t.maxLength:Iv;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 Iv,Rv,jv,Wa=O(()=>{"use strict";Hd();Iv=100,Rv=/^\.+(\\|\/)|^\.+$/,jv=/\.+$/});var $v,Zd=O(()=>{"use strict";$v=w(require("path"),1);Wa()});var Kd=O(()=>{"use strict";Wa();Zd()});var bi,Ua=O(()=>{"use strict";bi="webflow.json"});var vn,za=O(()=>{"use strict";vn=class extends Error{constructor(t){super(`Manifest config for key "${t}" not found`),this.name="ManifestConfigKeyNotFoundError"}}});function Xd(e){Va=e}function oe(){return Va}function mt(){return!Va}function Qd(e){Yd=e}function ep(){return Yd}var Va,Yd,Oe=O(()=>{"use strict";Va=!1});function kn(){let e=ep();if(e){if(e.endsWith(".json"))return{path:e,isUserDefined:!0};try{if((0,tp.statSync)(e)?.isDirectory())return{path:(0,np.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 tp,np,Ja=O(()=>{"use strict";tp=require("fs"),np=require("path");Ua();Oe()});var rp,Bv,Nv,qa,op=O(()=>{"use strict";rp=w(require("ajv")),Bv=new rp.default,Nv={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:[]}}},qa=Bv.compile(Nv)});function ip(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: ${ip(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: ${ip(o).message}`)}if(!qa(r)){let o=qa.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");Ja();op()});function fo(e,t){let n=e[t];if(!n)throw new vn(t);return n}var sp=O(()=>{"use strict";za()});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,ap.writeFileSync)(r,JSON.stringify(o,null,2),"utf-8"),o}var ap,Ga=O(()=>{"use strict";ap=require("fs");vi()});var ke=O(()=>{"use strict";Ua();za();vi();Ja();sp();Ga()});var ki=pa((sO,Lv)=>{Lv.exports={name:"@webflow/webflow-cli",version:"1.22.0-next.2",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.2.2",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 Ha(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 lp(){return{platform:process.platform,nodeVersion:process.version,arch:process.arch,os:`${mo.default.type()} ${mo.default.release()}`}}function Za(){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,ur,Ka,dr,Ce=O(()=>{"use strict";_e();ee=E.green("\u2714"),N=E.red("\u2716"),At=E.cyan("\u2139"),ur=E.green("\u279C"),Ka=E.red("\u279C"),dr=E.yellow("\u26A0")});var qt,Ya=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,cp.default)(e,{...t,headers:{...t?.headers,...r}})}var cp,ht=O(()=>{"use strict";cp=w(require("node-fetch"));Be()});var up,dp=O(()=>{"use strict";up=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 Xa,I,xi,pr,ho,Qa,yo,wo,fr,le=O(()=>{"use strict";dp();Xa=(e,t)=>(up(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?Xa("WEBFLOW_API_HOST",process.env.WEBFLOW_API_HOST):"https://api.webflow.com",xi=process.env.WEBFLOW_CDN_API_HOST?Xa("WEBFLOW_CDN_API_HOST",process.env.WEBFLOW_CDN_API_HOST):"https://api-cdn.webflow.com",pr=process.env.WEBFLOW_HOST?Xa("WEBFLOW_HOST",process.env.WEBFLOW_HOST):"https://webflow.com",ho="wf-manifest.json",Qa="mf-manifest.json",yo="@webflow_renderer",wo="ssr-bundle.tar",fr="index.js"});var G,el=O(()=>{"use strict";Ya();go();J();ht();le();G=class e{config;consentManager;sessionId;platformInfo;constructor(t){this.config=t,this.consentManager=qt.getInstance(),this.sessionId=Za(),this.platformInfo=lp()}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:Ha(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 pp=O(()=>{"use strict"});function fp(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";el();Ya();pp();go();go()});var nl,tl,Mv,Tt,rl=O(()=>{"use strict";nl=Symbol("webflow-cli-warn"),tl=class{warnings=[];originalConsoleWarn=null;isActive=!1;parseSource(t){let n=t.split(`
11
+ `);for(let r=2;r<n.length;r++){let o=n[r],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]===nl){let i=t.slice(0,-1);this.originalConsoleWarn&&this.originalConsoleWarn(...i);return}let n=t.map(i=>{if(typeof i=="string")return i;if(i instanceof Error)return i.message;try{return String(i)}catch{return"[Object]"}}).join(" "),r=new Error().stack||"",o=this.parseSource(r);this.warnings.push({message:n,timestamp:Date.now(),source:o,stackTrace:r})})}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
13
  `);let t=this.warnings.reduce((n,r)=>{let o=r.source||"General";return n[o]||(n[o]=[]),n[o].push(r),n},{});Object.entries(t).forEach(([n,r])=>{n!=="General"&&console.log(` ${n}:`),r.forEach((o,i)=>{let s=n!=="General"?" ":" ",a=o.message||"[Empty warning message]";console.log(`${s}${i+1}. ${a}`)}),n!=="General"&&console.log("")}),t.General&&console.log("")}debug(){console.log(`
14
14
  \u{1F41B} Debug: Captured Warnings
15
15
  `),this.warnings.forEach((t,n)=>{console.log(`Warning ${n+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(r=>{console.log(` ${r}`)})),console.log("")})}},$D=new ga,yt=$D});function jD(e){return e.replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"")}function Ed(e,t){if(!e)return t;let n=parseInt(e,10);return isNaN(n)||n<=0?t:n}function Pt(e){Vr.push(ot(e)),Vr.length>LD&&Vr.shift()}function Fd(e){Da=e}function UD(e){return Pt(`DEBUG: ${e}`),e}function WD(e){return Pt(`INFO: ${e}`),e}function zD(e){return Pt(`WARN: ${e}`),e}function VD(e,t){let n=e instanceof Error?e.stack||e.message:e,r=t?.prefix?`${t.prefix} `:"";Pt(`ERROR: ${r}${n}`),ka=!0;let o=e instanceof Error?e.message:e;return`${r}${o}`}function GD(e){return Pt(`SUCCESS: ${e}`),`${v.green(e)}`}function qD(e){let t=Mn(`${e}...`).start(),n=!1,r=o=>i=>{Pt(`${{succeed:"INFO",fail:"ERROR",warn:"WARN",info:"INFO"}[o]||"INFO"}: ${i||e}`),o==="fail"&&(ka=!0),!n&&(n=!0,t[o](i||e))};return{succeed:r("succeed"),fail:r("fail"),warn:r("warn"),info:r("info")}}function JD(){let e=qn.default.readdirSync(Pe).filter(t=>t.endsWith(".log")).map(t=>({name:t,time:qn.default.statSync(Go.default.join(Pe,t)).mtime.getTime()})).sort((t,n)=>n.time-t.time);for(;e.length>=ND;)try{let t=e.pop();if(!t)break;qn.default.removeSync(Go.default.join(Pe,t.name))}catch{}}function va(e){try{let t=process.argv.slice(2).join(" ");if(/^(log|library\s+log)(\s|$)/.test(t))return;qn.default.ensureDirSync(Pe),JD(),Vr.unshift(`CLI Version: ${ht()}`,`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()}`,...Da?[`Sync ID: ${Da}`]:[],"");let n=Vr.map(jD);qn.default.writeFileSync(wa,n.join(`
17
- `)),ka&&(console.info(`
18
- ${L} An error occurred. See logs for more information:`),console.info(`${da} Latest log: ${wa}`),console.info(`${da} All logs: ${Pe}`)),(process.env.DEBUG||process.argv.includes("--verbose"))&&(console.info(`
19
- ${ee} Command completed successfully. Logs written to:`),console.info(`${Wn} Latest log: ${wa}`),console.info(`${Wn} All logs: ${Pe}`))}catch(t){console.error("Failed to write logs:",t)}}var qn,Go,IA,BD,Pe,ND,LD,MD,wa,Vr,ka,Da,Jn,d,G=A(()=>{"use strict";qn=w(require("fs-extra")),Go=w(require("path"));Ee();IA=require("source-map-support/register");Xs();rd();ad();Ie();ba();ve();BD=ta("webflow-cli"),Pe=BD.log;ND=Ed(process.env.MAX_PERSISTED_LOGS,50),LD=Ed(process.env.MAX_IN_MEMORY_LOGS,1e3),MD=`${Br(new Date().toISOString(),{replacement:"_"}).replace(/\./g,"_")}-debug.log`,wa=Go.default.join(Pe,MD);Vr=[],ka=!1;Jn=!1;process.on("uncaughtException",e=>{Jn||(Jn=!0,Pt(`UNCAUGHT EXCEPTION: ${e?.stack}`),va(1)),yt.displayGrouped(),yt.stop(),process.exit(1)});process.on("unhandledRejection",e=>{Jn||(Jn=!0,Pt(`UNHANDLED REJECTION: ${e instanceof Error?e.stack:String(e)}`),va(1)),yt.displayGrouped(),yt.stop(),process.exit(1)});process.on("exit",e=>{Jn||(Jn=!0,va(e))});d={debug:e=>{let t=UD(e);process.env.DEBUG&&console.debug(t)},dir:e=>console.dir(e,{depth:100}),info:e=>console.info(WD(e)),warn:e=>console.warn(zD(e),ya),error:(e,t)=>{console.error(VD(e,t))},success:e=>console.log(GD(e)),spinner:qD}});async function Gr(e){try{return await e()}catch(t){throw t instanceof Error&&KD.test(t.message)&&(d.debug(t.message),process.stdin.isTTY&&typeof process.stdin.setRawMode=="function"&&process.stdin.setRawMode(!1),process.exit(130)),t}}async function Fe(e){return re()?e.default??!1:Gr(()=>st.confirm(e))}async function Re(e){return re()?"default"in e?e.default:null:Gr(()=>st.select(e))}async function _e(e){return re()?e.default!==void 0?await e.validate?.(e.default)!==!0?null:e.default:null:Gr(()=>st.input(e))}async function Jo(e){if(re()){let t=[];return await e.validate?.(t)!==!0?null:t}return Gr(()=>st.checkbox(e))}async function Ho(e){return re()?"default"in e?e.default:null:Gr(()=>st.search(e))}var st,KD,$e=A(()=>{"use strict";st=w(require("@inquirer/prompts"));Se();G();KD=/SIGINT/i});function bt({apiToken:e,siteId:t,directory:n}){let r=Jr.resolve(n?Jr.join(n,".env"):Jr.join(process.cwd(),".env"));n&&!ln.existsSync(n)&&ln.mkdirSync(n,{recursive:!0}),ln.existsSync(r)||ln.writeFileSync(r,`# automatically generated at ${new Date().toISOString()}`,{encoding:"utf8"}),Ko.default.config({path:r,quiet:!0}),e&&Ko.default.set("WEBFLOW_API_TOKEN",e,{path:r,encrypt:!1}),t&&Ko.default.set("WEBFLOW_SITE_ID",t,{path:r,encrypt:!1})}var ln,Jr,Ko,Rd=A(()=>{"use strict";ln=w(require("fs")),Jr=w(require("path")),Ko=w(require("@dotenvx/dotenvx"))});var h,te=A(()=>{"use strict";h=class e extends Error{prefix;skipLogging;isUserError;constructor(t,n){let r=t instanceof Error?t.message:String(t);super(r),this.name="CLIError",this.prefix=n?.prefix,this.skipLogging=n?.skipLogging??!1,this.isUserError=n?.isUserError??(t instanceof e?t.isUserError:!1),t instanceof Error?(this.cause=t,this.stack=t.stack):Error.captureStackTrace&&Error.captureStackTrace(this,e)}}});function jt(){let e=QD();return cn.default.join(e,XD)}function QD(){if(process.platform==="win32"){let n=process.env.APPDATA??cn.default.join(Fa.default.homedir(),"AppData","Roaming");return cn.default.join(n,"webflow")}let t=process.env.XDG_CONFIG_HOME??cn.default.join(Fa.default.homedir(),".config");return cn.default.join(t,"webflow")}function Hr(){let e=jt();try{if(!$t.default.existsSync(e))return null;let t=$t.default.readFileSync(e,"utf8");return JSON.parse(t)}catch{return null}}function _a(e){let t=jt(),n=cn.default.dirname(t);$t.default.existsSync(n)||$t.default.mkdirSync(n,{recursive:!0,mode:448}),$t.default.writeFileSync(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384})}function Sa(){let e=jt();try{$t.default.existsSync(e)&&$t.default.unlinkSync(e)}catch{}}var $t,Fa,cn,XD,Ta=A(()=>{"use strict";$t=w(require("fs")),Fa=w(require("os")),cn=w(require("path")),XD="auth.json"});var Kr,Aa=A(()=>{"use strict";le();Kr={serverUrl:Vn,timeoutMs:5*60*1e3}});var $d,jd,Bd,Nd,ek,Ld,tk,Md,Ud=A(()=>{"use strict";$d=require("crypto"),jd=w(require("open"));Aa();G();it();Bd=e=>{let t=new Uint8Array(e);return $d.webcrypto.getRandomValues(t),Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")},Nd=({pollId:e,clientId:t,scope:n})=>`${Kr.serverUrl}/oauth/webflow/initiate?pollId=${e}&clientId=${t}&scope=${encodeURIComponent(n.join(" "))}`,ek=e=>`${Kr.serverUrl}/oauth/webflow/poll?pollId=${e}`,Ld=async e=>{let t=d.spinner("Opening browser for authentication. Please follow the instructions in your browser");try{await new Promise(n=>setTimeout(n,3e3)),await(0,jd.default)(e),t.succeed()}catch{t.fail(),d.warn(`Could not automatically open browser. Please open this URL manually: ${e}`)}},tk=async e=>{let t=ek(e),n=await Z(t);if(!n.ok){let r=`Failed to poll for authentication status (${n.status})`;try{let o=await n.json();o&&o.error&&(r+=`: ${o.error}`)}catch{}throw new Error(r)}return n.json()},Md=(e,t)=>{let n=d.spinner("Waiting for authentication");return new Promise((r,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 tk(e);a.status==="success"&&a.accessToken?(clearTimeout(i),clearInterval(s),n.succeed("Authentication successful! You can close the browser window."),r(a.accessToken)):a.status==="error"&&(clearTimeout(i),clearInterval(s),n.fail("Authentication failed"),o(new Error(a.error||"Authentication failed")))}catch(a){clearTimeout(i),clearInterval(s),n.fail("Authentication failed"),o(a instanceof Error?a:new Error(String(a)))}},2e3)})}});function Zr(){if(process.env.WEBFLOW_API_TOKEN)return process.env.WEBFLOW_API_TOKEN;let e=Hr();if(e?.accessToken)return e.accessToken;let t=process.env.WEBFLOW_WORKSPACE_API_TOKEN??process.env.WEBFLOW_SITE_API_TOKEN??null;return t&&!Wd&&(Wd=!0,d.warn(`${zn} 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 Y(e){if(e?.apiToken&&!e.force)return e.apiToken;if(!e?.force){let r=Zr();if(r)return r}if(re())throw new h(`No API token found. To authenticate in CI/CD environments:
16
+ `).slice(0,3).forEach(r=>{console.log(` ${r}`)})),console.log("")})}},Mv=new tl,Tt=Mv});function Wv(e){return e.replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"")}function gp(e,t){if(!e)return t;let n=parseInt(e,10);return isNaN(n)||n<=0?t:n}function Gt(e){bo.push(gt(e)),bo.length>Vv&&bo.shift()}function hp(e){il=e}function mp(e){return Gt(`DEBUG: ${e}`),e}function qv(e){return Gt(`INFO: ${e}`),e}function Gv(e){return Gt(`WARN: ${e}`),e}function Hv(e,t){let n=e instanceof Error?e.stack||e.message:e,r=t?.prefix?`${t.prefix} `:"";Gt(`ERROR: ${r}${n}`),sl=!0;let o=e instanceof Error?e.message:e;return`${r}${o}`}function Zv(e){return Gt(`SUCCESS: ${e}`),`${E.green(e)}`}function Kv(e){let t=lr(`${e}...`).start(),n=!1,r=o=>i=>{Gt(`${{succeed:"INFO",fail:"ERROR",warn:"WARN",info:"INFO"}[o]||"INFO"}: ${i||e}`),o==="fail"&&(sl=!0),!n&&(n=!0,t[o](i||e))};return{succeed:r("succeed"),fail:r("fail"),warn:r("warn"),info:r("info")}}function Yv(){let e=mr.default.readdirSync(Ne).filter(t=>t.endsWith(".log")).map(t=>({name:t,time:mr.default.statSync(Ci.default.join(Ne,t)).mtime.getTime()})).sort((t,n)=>n.time-t.time);for(;e.length>=zv;)try{let t=e.pop();if(!t)break;mr.default.removeSync(Ci.default.join(Ne,t.name))}catch{}}function al(e){try{let t=process.argv.slice(2).join(" ");if(/^(log|library\s+log)(\s|$)/.test(t))return;mr.default.ensureDirSync(Ne),Yv(),bo.unshift(`CLI Version: ${_t()}`,`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()}`,...il?[`Sync ID: ${il}`]:[],"");let n=bo.map(Wv);mr.default.writeFileSync(ol,n.join(`
17
+ `)),sl&&(console.info(`
18
+ ${N} An error occurred. See logs for more information:`),console.info(`${Ka} Latest log: ${ol}`),console.info(`${Ka} All logs: ${Ne}`)),(process.env.DEBUG||process.argv.includes("--verbose"))&&(console.info(`
19
+ ${ee} Command completed successfully. Logs written to:`),console.info(`${ur} Latest log: ${ol}`),console.info(`${ur} All logs: ${Ne}`))}catch(t){console.error("Failed to write logs:",t)}}var mr,Ci,BO,Uv,Ne,zv,Vv,Jv,ol,bo,sl,il,gr,Xv,d,J=O(()=>{"use strict";mr=w(require("fs-extra")),Ci=w(require("path"));_e();BO=require("source-map-support/register");Ba();qd();Kd();Be();rl();Ce();Uv=Ma("webflow-cli"),Ne=Uv.log;zv=gp(process.env.MAX_PERSISTED_LOGS,50),Vv=gp(process.env.MAX_IN_MEMORY_LOGS,1e3),Jv=`${po(new Date().toISOString(),{replacement:"_"}).replace(/\./g,"_")}-debug.log`,ol=Ci.default.join(Ne,Jv);bo=[],sl=!1;gr=!1;process.on("uncaughtException",e=>{gr||(gr=!0,Gt(`UNCAUGHT EXCEPTION: ${e?.stack}`),al(1)),Tt.displayGrouped(),Tt.stop(),process.exit(1)});process.on("unhandledRejection",e=>{gr||(gr=!0,Gt(`UNHANDLED REJECTION: ${e instanceof Error?e.stack:String(e)}`),al(1)),Tt.displayGrouped(),Tt.stop(),process.exit(1)});process.on("exit",e=>{gr||(gr=!0,al(e))});Xv={debug:e=>{let t=mp(e);process.env.DEBUG&&console.debug(t)},trace:e=>{let t=mp(e);process.env.DEBUG&&console.debug(t)},dir:e=>console.dir(e,{depth:100}),info:e=>console.info(qv(e)),warn:e=>console.warn(Gv(e),nl),error:(e,t)=>{console.error(Hv(e,t))},success:e=>console.log(Zv(e)),spinner:Kv},d=Xv});async function Do(e){try{return await e()}catch(t){throw t instanceof Error&&ek.test(t.message)&&(d.debug(t.message),process.stdin.isTTY&&typeof process.stdin.setRawMode=="function"&&process.stdin.setRawMode(!1),process.exit(130)),t}}async function Ae(e){return oe()?e.default??!1:Do(()=>yt.confirm(e))}async function Le(e){return oe()?"default"in e?e.default:null:Do(()=>yt.select(e))}async function Te(e){return oe()?e.default!==void 0?await e.validate?.(e.default)!==!0?null:e.default:null:Do(()=>yt.input(e))}async function Fi(e){if(oe()){let t=[];return await e.validate?.(t)!==!0?null:t}return Do(()=>yt.checkbox(e))}async function Si(e){return oe()?"default"in e?e.default:null:Do(()=>yt.search(e))}var yt,ek,Me=O(()=>{"use strict";yt=w(require("@inquirer/prompts"));Oe();J();ek=/SIGINT/i});function Ot({apiToken:e,siteId:t,directory:n}){let r=ko.resolve(n?ko.join(n,".env"):ko.join(process.cwd(),".env"));n&&!Fn.existsSync(n)&&Fn.mkdirSync(n,{recursive:!0}),Fn.existsSync(r)||Fn.writeFileSync(r,`# automatically generated at ${new Date().toISOString()}`,{encoding:"utf8"}),_i.default.config({path:r,quiet:!0}),e&&_i.default.set("WEBFLOW_API_TOKEN",e,{path:r,encrypt:!1}),t&&_i.default.set("WEBFLOW_SITE_ID",t,{path:r,encrypt:!1})}var Fn,ko,_i,Cp=O(()=>{"use strict";Fn=w(require("fs")),ko=w(require("path")),_i=w(require("@dotenvx/dotenvx"))});var g,te=O(()=>{"use strict";g=class e extends Error{prefix;skipLogging;isUserError;constructor(t,n){let r=t instanceof Error?t.message:String(t);super(r),this.name="CLIError",this.prefix=n?.prefix,this.skipLogging=n?.skipLogging??!1,this.isUserError=n?.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=ok();return Sn.default.join(e,rk)}function ok(){if(process.platform==="win32"){let n=process.env.APPDATA??Sn.default.join(dl.default.homedir(),"AppData","Roaming");return Sn.default.join(n,"webflow")}let t=process.env.XDG_CONFIG_HOME??Sn.default.join(dl.default.homedir(),".config");return Sn.default.join(t,"webflow")}function xo(){let e=Kt();try{if(!Zt.default.existsSync(e))return null;let t=Zt.default.readFileSync(e,"utf8");return JSON.parse(t)}catch{return null}}function pl(e){let t=Kt(),n=Sn.default.dirname(t);Zt.default.existsSync(n)||Zt.default.mkdirSync(n,{recursive:!0,mode:448}),Zt.default.writeFileSync(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384})}function fl(){let e=Kt();try{Zt.default.existsSync(e)&&Zt.default.unlinkSync(e)}catch{}}var Zt,dl,Sn,rk,ml=O(()=>{"use strict";Zt=w(require("fs")),dl=w(require("os")),Sn=w(require("path")),rk="auth.json"});var Co,gl=O(()=>{"use strict";le();Co={serverUrl:pr,timeoutMs:5*60*1e3}});var Ep,Fp,Sp,_p,ik,Ap,sk,Tp,Op=O(()=>{"use strict";Ep=require("crypto"),Fp=w(require("open"));gl();J();ht();Sp=e=>{let t=new Uint8Array(e);return Ep.webcrypto.getRandomValues(t),Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")},_p=({pollId:e,clientId:t,scope:n})=>`${Co.serverUrl}/oauth/webflow/initiate?pollId=${e}&clientId=${t}&scope=${encodeURIComponent(n.join(" "))}`,ik=e=>`${Co.serverUrl}/oauth/webflow/poll?pollId=${e}`,Ap=async e=>{let t=d.spinner("Opening browser for authentication. Please follow the instructions in your browser");try{await new Promise(n=>setTimeout(n,3e3)),await(0,Fp.default)(e),t.succeed()}catch{t.fail(),d.warn(`Could not automatically open browser. Please open this URL manually: ${e}`)}},sk=async e=>{let t=ik(e),n=await K(t);if(!n.ok){let r=`Failed to poll for authentication status (${n.status})`;try{let o=await n.json();o&&o.error&&(r+=`: ${o.error}`)}catch{}throw new Error(r)}return n.json()},Tp=(e,t)=>{let n=d.spinner("Waiting for authentication");return new Promise((r,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 sk(e);a.status==="success"&&a.accessToken?(clearTimeout(i),clearInterval(s),n.succeed("Authentication successful! You can close the browser window."),r(a.accessToken)):a.status==="error"&&(clearTimeout(i),clearInterval(s),n.fail("Authentication failed"),o(new Error(a.error||"Authentication failed")))}catch(a){clearTimeout(i),clearInterval(s),n.fail("Authentication failed"),o(a instanceof Error?a:new Error(String(a)))}},2e3)})}});function Eo(){if(process.env.WEBFLOW_API_TOKEN)return process.env.WEBFLOW_API_TOKEN;let e=xo();if(e?.accessToken)return e.accessToken;let t=process.env.WEBFLOW_WORKSPACE_API_TOKEN??process.env.WEBFLOW_SITE_API_TOKEN??null;return t&&!Pp&&(Pp=!0,d.warn(`${dr} 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 Y(e){if(e?.apiToken&&!e.force)return e.apiToken;if(!e?.force){let r=Eo();if(r)return r}if(oe())throw new g(`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=Bd(16),n=nk();try{let r=Nd({pollId:t,clientId:n,scope:Oa});await Ld(r);let o=await Md(t,Kr.timeoutMs);return _a({accessToken:o,scopes:Oa,createdAt:new Date().toISOString()}),d.info(`${ee} Credentials saved: ${jt()}`),o}catch(r){throw new h(r)}}function nk(){return"fbab9abdbeeb35bb2554a1b83b8bd060d719f22eca26ff9119b87608c87c0074"}var Oa,Wd,Ia=A(()=>{"use strict";Se();G();ve();te();Ta();Aa();Ud();Oa=["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"],Wd=!1});function rk(){return!0}function Yr(e){if(e.siteId)return e.siteId;let t=process.env.WEBFLOW_SITE_ID;return t?(rk()||(oe({siteId:t}),e.siteId=t),t):null}async function Pa(e){try{let n=await new zd.WebflowClient({accessToken:e,environment:{base:`${P}/v2`,dataApi:`${P}/v2`,contentDeliveryApi:`${Vo}/v2`}}).sites.list();if(!n||typeof n!="object"||!n.sites||!Array.isArray(n.sites))throw new h("Invalid response from Webflow API");let r=n.sites.map(o=>({id:o.id,displayName:o.displayName??"",shortName:o.shortName||(o.displayName??"").toLowerCase().replace(/\s+/g,"-"),lastUpdated:o.lastUpdated??null}));return r.sort((o,i)=>o.displayName.localeCompare(i.displayName)),r}catch(t){throw new h(t,{prefix:`Failed to fetch Webflow sites. Please check your authorization.
22
- `})}}async function Ra(e){let t=e.map(r=>({name:`${r.displayName} (${r.shortName})`,value:r})),n=await Ho({message:"Search for a Webflow site:",source:r=>{if(!r)return t;let o=r.toLowerCase();return t.filter(i=>i.value.displayName.toLowerCase().includes(o)||i.value.shortName.toLowerCase().includes(o))},pageSize:15});if(!n){if(e.length===0)throw new h("No sites available for selection");return d.warn(`Auto fallback to first site: ${e[0].displayName}`),e[0]}return n}var zd,Zo=A(()=>{"use strict";zd=require("webflow-api");$e();G();ye();le();le();te()});async function be(e,t){let n=t?.site??Yr(e);if(re()&&!n)throw new h(`No site ID configured for this project.
21
+ 2. Set it as the WEBFLOW_API_TOKEN environment variable in your CI/CD pipeline`);let t=Sp(16),n=ak();try{let r=_p({pollId:t,clientId:n,scope:hl});await Ap(r);let o=await Tp(t,Co.timeoutMs);return pl({accessToken:o,scopes:hl,createdAt:new Date().toISOString()}),d.info(`${ee} Credentials saved: ${Kt()}`),o}catch(r){throw new g(r)}}function ak(){return"fbab9abdbeeb35bb2554a1b83b8bd060d719f22eca26ff9119b87608c87c0074"}var hl,Pp,yl=O(()=>{"use strict";Oe();J();Ce();te();ml();gl();Op();hl=["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"],Pp=!1});function lk(){return!0}function Fo(e){if(e.siteId)return e.siteId;let t=process.env.WEBFLOW_SITE_ID;return t?(lk()||(se({siteId:t}),e.siteId=t),t):null}async function wl(e){try{let n=await new Ip.WebflowClient({accessToken:e,environment:{base:`${I}/v2`,dataApi:`${I}/v2`,contentDeliveryApi:`${xi}/v2`}}).sites.list();if(!n||typeof n!="object"||!n.sites||!Array.isArray(n.sites))throw new g("Invalid response from Webflow API");let r=n.sites.map(o=>({id:o.id,displayName:o.displayName??"",shortName:o.shortName||(o.displayName??"").toLowerCase().replace(/\s+/g,"-"),lastUpdated:o.lastUpdated??null}));return r.sort((o,i)=>o.displayName.localeCompare(i.displayName)),r}catch(t){throw new g(t,{prefix:`Failed to fetch Webflow sites. Please check your authorization.
22
+ `})}}async function bl(e){let t=e.map(r=>({name:`${r.displayName} (${r.shortName})`,value:r})),n=await Si({message:"Search for a Webflow site:",source:r=>{if(!r)return t;let o=r.toLowerCase();return t.filter(i=>i.value.displayName.toLowerCase().includes(o)||i.value.shortName.toLowerCase().includes(o))},pageSize:15});if(!n){if(e.length===0)throw new g("No sites available for selection");return d.warn(`Auto fallback to first site: ${e[0].displayName}`),e[0]}return n}var Ip,Ai=O(()=>{"use strict";Ip=require("webflow-api");Me();J();ke();le();le();te()});async function be(e,t){let n=t?.site??Fo(e);if(oe()&&!n)throw new g(`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 r=await Y({apiToken:t?.apiToken,force:t?.force});if(!n||t?.force){let o=await Pa(r);if(o.length===0)throw new h("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 Ra(o):o[0];n=i.id;let s=oe({siteId:n});return e.siteId=s.siteId,{siteId:n,siteName:i.displayName,accessToken:r}}return{siteId:n,accessToken:r}}var Vd=A(()=>{"use strict";ye();Se();Ia();Zo();te()});async function $a(e){let t=new Gd.WebflowClient({accessToken:e,environment:{base:`${P}/v2`,dataApi:`${P}/v2`}});try{return await t.token.authorizedBy()}catch{return null}}var Gd,qd=A(()=>{"use strict";Gd=require("webflow-api");le()});var je=A(()=>{"use strict";Rd();Ia();Vd();Zo();Zo();Ta();qd()});function hk(e,t){if(e.includes("..")||Xe.isAbsolute(e))throw new Error(`Invalid file path: "${e}" - path traversal not allowed`);let n=Xe.resolve(t,e),r=Xe.resolve(t);if(!n.startsWith(r+Xe.sep)&&n!==r)throw new Error(`Invalid file path: "${e}" - resolves outside root directory`)}async function li(e,t,n){let r=Xe.join(process.cwd(),t);n&&(0,Nt.existsSync)(r)&&await(0,ai.rm)(r,{recursive:!0,force:!0}),(0,Nt.existsSync)(r)||await(0,ai.mkdir)(r);for(let o of e){hk(o.path,r);let i=gk(r,o.path);if(o.path.includes("/")){let s=o.path.substring(0,o.path.lastIndexOf("/"));yk(r,s)}(0,Nt.writeFileSync)(i,o.content,{flag:"w+"})}}function gk(e,t){return Xe.join(e,...t.split("/"))}function yk(e,t){let n=t.split("/"),r=e;for(let o of n)r=Xe.join(r,o),(0,Nt.existsSync)(r)||(0,Nt.mkdirSync)(r)}var Nt,ai,Xe,qa=A(()=>{"use strict";Nt=require("fs"),ai=require("fs/promises"),Xe=w(require("path"))});function ji(e){for(let t of e??[]){let n=d[t.status]??d.info,r=m1[t.status]??gt;n(`
25
- ${r} ${t.content}`)}}var m1,Yl=A(()=>{"use strict";G();ve();m1={info:gt,warn:zn,success:ee}});function Ql(e){let{manifestPath:t}=Q();return(0,Yh.writeFileSync)(t,JSON.stringify(e,null,2),"utf-8"),e}var Yh,Xh=A(()=>{"use strict";Yh=require("fs");Wo()});function Bi(e,t){try{let n=ec(),r=tc(Object.values(e)),o=t?.force;return r&&n&&!o}catch{return!1}}var Qh,eg,ec,tc,Ni=A(()=>{"use strict";Qh=require("path"),eg=require("fs-extra");ec=()=>{try{return(0,eg.existsSync)((0,Qh.join)(process.cwd(),"tsconfig.json"))}catch{return!1}},tc=e=>e.some(t=>t.endsWith(".ts")||t.endsWith(".tsx"))});function h1(e){let{export:t,...n}=e;return t?n["devlink-export"]!=null?(Ql(n),n):(d.warn(`${zn} The 'export' key in webflow.json is deprecated. Use 'devlink-export' instead. Your configuration will be migrated automatically.`),n["devlink-export"]={...t},Ql(n),n):n}function rg(e,t){try{new RegExp(e)}catch{throw new h(`Invalid '${t}' regex '${e}' in webflow.json. Fix the value and re-run the export.`,{isUserError:!0})}}async function ig(e){e=h1(e);let t=e["devlink-export"]||{},n=!1,r=t.rootDir;r||(re()?r=tg:(n=!0,r=await _e({message:"Enter the root directory for exported components:",default:tg,validate:u=>!u||u.trim()===""?"Root directory is required":!0})));let o=t.ts;o===void 0&&(b1()?o=!0:re()?o=!1:(n=!0,o=await Fe({message:"Use TypeScript?",default:!0})));let i=t.cssScopes;i===void 0&&(re()?i=ng:(n=!0,i=await Fe({message:"Use DevLink style isolation (scoped wrapper + @scope)?",default:ng}))),t.components&&rg(t.components,"components"),t.componentGroups&&rg(t.componentGroups,"componentGroups");let s=t.components,a=t.componentGroups;!s&&!a&&(re()?(s=Li,a=Mi):(n=!0,await Fe({message:"Do you want to export all components?",default:!0})?(s=Li,a=Mi):(s=await _e({message:"Enter regex pattern to filter components (e.g., 'Button|Card' for specific):",default:Li,validate:p=>{try{return new RegExp(p),!0}catch{return"Invalid regex pattern. Please enter a valid regular expression."}}}),a=await _e({message:"Enter regex pattern to filter component groups (e.g., 'mygroup'):",default:Mi,validate:p=>{try{return new RegExp(p),!0}catch{return"Invalid regex pattern. Please enter a valid regular expression."}}})))),s=s||Li,a=a||Mi;let l=t.relativeHrefRoot;l===void 0&&(l=g1);let c={...t,rootDir:r,components:s,componentGroups:a,ts:o,cssScopes:i,relativeHrefRoot:l};return(!t.rootDir||t.ts===void 0||t.cssScopes===void 0||!t.components||!t.componentGroups||t.relativeHrefRoot===void 0)&&y1(c),{config:c,wasPrompted:n}}function y1(e){oe({"devlink-export":{...e}})}function b1(){try{let e=process.cwd();if(ec())return!0;let t=["src","app","pages","components"];for(let n of t){let r=og.join(e,n);if(Ui.existsSync(r)&&tc(Ui.readdirSync(r)))return!0}}catch{}return!1}var Ui,og,tg,Li,Mi,ng,g1,sg=A(()=>{"use strict";Ui=w(require("fs")),og=w(require("path"));$e();Se();G();ve();te();la();Xh();Ni();tg="./webflow",Li=".*",Mi=".*",ng=!0,g1="/"});async function cg(e){if(e.ok)return;let t=await e.text().catch(()=>"");d.debug(`Server error response (HTTP ${e.status}): ${t||"<empty>"}`);let n;try{n=JSON.parse(t).message}catch{}throw new po(n||`Request failed (HTTP ${e.status}).`)}async function rc(e,t,n,r){let o=await w1(n,r,t,e);if(!o.files||!Array.isArray(o.files))throw new h("Invalid response format from V2 API: expected 'files' array");return{files:o.files,messages:o.messages,metadata:o.metadata}}async function w1(e,t,n,r){let{taskId:o,polling:i}=await D1(e,t,n,r);return k1(e,t,n,o,i)}async function D1(e,t,n,r){let o=await(0,nc.default)(`${P}/v2/devlink/${e}/export`,{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json",[lg]:t},body:JSON.stringify(r),timeout:6e4});return o.ok||await cg(o),await o.json()}async function k1(e,t,n,r,o){let{initialDelayMs:i,maxBackoffMs:s,backoffMultiplier:a,timeoutMs:l}=o,c=Date.now()+l,u=i;do{let p=await(0,nc.default)(`${P}/v2/devlink/${e}/export/${r}`,{headers:{Authorization:`Bearer ${n}`,[lg]:t},timeout:6e4});p.ok||await cg(p);let f=await p.json();if(f.status==="finished")return f.result;if(f.status==="failed")throw new po("The export task failed. Please try again or report a bug.");await(0,ag.setTimeout)(u),u=Math.min(u*a,s)}while(Date.now()<c);throw new po(`Export task timed out after ${l}ms. Please try again.`)}var nc,ag,lg,po,ug=A(()=>{"use strict";nc=w(require("node-fetch")),ag=require("timers/promises");G();le();te();lg="X-WF-Sync-Id",po=class extends Error{}});var dg,pg=A(()=>{"use strict";$e();G();dg=async(e,t)=>{if(!t)return;await Fe({message:`Ready to export components to ${e.rootDir}?`,default:!0})||(d.info("Export cancelled."),process.exit(0))}});function fg(e,t,n){let i=new Intl.PluralRules("en-US").select(e)==="one"&&e===1?t:n||`${t}s`;return`${e} ${i}`}var mg=A(()=>{"use strict"});async function Wi(e){let t=Date.now(),n;try{let{manifest:r}=Q(),{siteId:o,accessToken:i}=await be(r,e),s=(0,hg.randomUUID)();Fd(s);let{config:a,wasPrompted:l}=await ig(r);d.info(`${ee} Export configuration loaded!`),await dg(a,l);let c=J.forExport({authToken:i,siteId:o});n=d.spinner("Exporting components"),await c.sendUsage("devlink_export_start",{cssScopes:a.cssScopes,ts:a.ts,relativeHrefRoot:a.relativeHrefRoot});try{let{files:u,messages:p,metadata:f}=await rc(a,i,o,s),m=f.exportCoverage==="full";await li(u,a.rootDir,m),n.succeed(`${fg(f.componentCount,"component")} exported to ${a.rootDir}`),ji(p);let g=Date.now()-t;await c.sendUsage("devlink_export_success",{duration:g,cssScopes:a.cssScopes,ts:a.ts,relativeHrefRoot:a.relativeHrefRoot})}catch(u){let p=u instanceof Error?u.message:String(u);throw n.fail(`Components export failed: ${p}`),await c.sendError(u instanceof Error?u:new Error(String(u)),"devlink_export_failure",{cssScopes:a.cssScopes,ts:a.ts}),u}}catch(r){let o="Export failed: "+(r instanceof Error?r.message:r);throw n?n.fail(o):d.error(o,{prefix:`
26
- `+L}),new h(r,{skipLogging:!0})}}var hg,gg=A(()=>{"use strict";hg=require("crypto");sg();ug();pg();Ie();je();ye();mg();G();te();qa();ve();Yl()});var yg={};fu(yg,{exportComponents:()=>Wi});var oc=A(()=>{"use strict";gg()});var jw=require("commander");G();var _d=require("child_process"),Sd=require("fs"),xa=w(require("semver"));G();var Ca="@webflow/webflow-cli",on="@webflow/data-types",qo="@webflow/react",HD=[Ca,on,qo],sn=class{getInstalledDependencies(){try{let t=(0,_d.execSync)(`npm ls ${HD.join(" ")} --depth=0 --json --silent`,{encoding:"utf-8"}),n=JSON.parse(t);return n.dependencies?Object.entries(n.dependencies).reduce((r,[o,{version:i}])=>(r[o]=i,r),{}):{}}catch(t){return d.debug(`Failed to get installed dependencies: ${t}`),{}}}getRequiredDependencies(t){let n=JSON.parse((0,Sd.readFileSync)(require.resolve(`${t}/package.json`),"utf8"));return{...n.dependencies,...n.devDependencies}}checkCLIAndDataTypes(t){let n=t[on];if(!n)return;let o=this.getRequiredDependencies(Ca)[on];if(!xa.default.satisfies(n,o))throw new Error(`Version mismatch: ${Ca} requires ${on} v${o} but found v${n}`)}checkReactAndDataTypes(t){let n=t[on],r=t[qo];if(!(!n||!r)&&!xa.default.eq(n,r))throw new Error(`Version mismatch: ${qo} and ${on} must be on the same version. Found ${qo}@${r} and ${on}@${n}`)}run(){let t=this.getInstalledDependencies();this.checkCLIAndDataTypes(t),this.checkReactAndDataTypes(t)}};var Id=require("fs-extra");$e();var Pd=require("@dotenvx/dotenvx"),an=w(require("semver"));G();var Td=require("child_process"),Ad=require("util"),ZD=(0,Ad.promisify)(Td.exec);async function Rt(e,t){try{let{stdout:n,stderr:r}=await ZD(e,t);return{stdout:n.toString().trim(),stderr:r.toString().trim(),code:0}}catch(n){let r=n;return{stdout:r.stdout??"",stderr:r.stderr??String(r.message??""),code:r.code??1}}}Se();var Ea=w(zo());(0,Pd.config)({quiet:!0,ignore:["MISSING_ENV_FILE"]});var Od={npm:{updateCommand:"npm install",update:async e=>await Rt(`npm install ${e}`),getOutdated:async e=>{let{stdout:t}=await Rt(`npm outdated --json ${e}`);return JSON.parse(t)},lockFile:"package-lock.json",globalFlag:"--global",supported:!0},pnpm:{updateCommand:"pnpm add",update:async e=>await Rt(`pnpm add ${e}`),getOutdated:async e=>{let{stdout:t}=await Rt(`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}},YD=["@webflow/webflow-cli","@webflow/data-types","@webflow/react","@webflow/emotion-utils","@webflow/styled-components-utils"],qr=class{packageManager;constructor(){this.packageManager=this.getPackagerManagerInfo()}getPackagerManagerInfo(){for(let[,t]of Object.entries(Od))if((0,Id.existsSync)(t.lockFile))return t;return Od.npm}async listOutdatedPackages(t="local",n=YD){let{getOutdated:r,globalFlag:o}=this.packageManager,i=await r(`${t==="global"?o:""} ${n?.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 n=await this.listOutdatedPackages("global",["@webflow/webflow-cli"]);return{...t,...n}}async showUpdatePrompt(t){if(Object.keys(t).length>1){let r=await Jo({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 r??[]}else{let[[r,{current:o,latest:i}]]=Object.entries(t);return await Fe({message:`A new version of ${r} (${o} \u2192 ${i}) is available. Would you like to update?`,default:!1})?[r]:[]}}showUpdateSuggestions(t){let n=Object.keys(t).length>1,{updateCommand:r,globalFlag:o}=this.packageManager;if(n){console.log(`
24
+ or provide --site and --api-token when running a CLI command`);let r=await Y({apiToken:t?.apiToken,force:t?.force});if(!n||t?.force){let o=await wl(r);if(o.length===0)throw new g("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 bl(o):o[0];n=i.id;let s=se({siteId:n});return e.siteId=s.siteId,{siteId:n,siteName:i.displayName,accessToken:r}}return{siteId:n,accessToken:r}}var Rp=O(()=>{"use strict";ke();Oe();yl();Ai();te()});async function Dl(e){let t=new jp.WebflowClient({accessToken:e,environment:{base:`${I}/v2`,dataApi:`${I}/v2`}});try{return await t.token.authorizedBy()}catch{return null}}var jp,$p=O(()=>{"use strict";jp=require("webflow-api");le()});var We=O(()=>{"use strict";Cp();yl();Rp();Ai();Ai();ml();$p()});function Dk(e,t){if(e.includes("..")||at.isAbsolute(e))throw new Error(`Invalid file path: "${e}" - path traversal not allowed`);let n=at.resolve(t,e),r=at.resolve(t);if(!n.startsWith(r+at.sep)&&n!==r)throw new Error(`Invalid file path: "${e}" - resolves outside root directory`)}async function Wi(e,t,n){let r=at.join(process.cwd(),t);n&&(0,Xt.existsSync)(r)&&await(0,Mi.rm)(r,{recursive:!0,force:!0}),(0,Xt.existsSync)(r)||await(0,Mi.mkdir)(r);for(let o of e){Dk(o.path,r);let i=vk(r,o.path);if(o.path.includes("/")){let s=o.path.substring(0,o.path.lastIndexOf("/"));kk(r,s)}(0,Xt.writeFileSync)(i,o.content,{flag:"w+"})}}function vk(e,t){return at.join(e,...t.split("/"))}function kk(e,t){let n=t.split("/"),r=e;for(let o of n)r=at.join(r,o),(0,Xt.existsSync)(r)||(0,Xt.mkdirSync)(r)}var Xt,Mi,at,Ol=O(()=>{"use strict";Xt=require("fs"),Mi=require("fs/promises"),at=w(require("path"))});function gs(e){for(let t of e??[]){let n=d[t.status]??d.info,r=bS[t.status]??At;n(`
25
+ ${r} ${t.content}`)}}var bS,$c=O(()=>{"use strict";J();Ce();bS={info:At,warn:dr,success:ee}});function Nc(e){let{manifestPath:t}=Q();return(0,Wh.writeFileSync)(t,JSON.stringify(e,null,2),"utf-8"),e}var Wh,Uh=O(()=>{"use strict";Wh=require("fs");vi()});function hs(e,t){try{let n=Lc(),r=Mc(Object.values(e)),o=t?.force;return r&&n&&!o}catch{return!1}}var zh,Vh,Lc,Mc,ys=O(()=>{"use strict";zh=require("path"),Vh=require("fs-extra");Lc=()=>{try{return(0,Vh.existsSync)((0,zh.join)(process.cwd(),"tsconfig.json"))}catch{return!1}},Mc=e=>e.some(t=>t.endsWith(".ts")||t.endsWith(".tsx"))});function DS(e){let{export:t,...n}=e;return t?n["devlink-export"]!=null?(Nc(n),n):(d.warn(`${dr} The 'export' key in webflow.json is deprecated. Use 'devlink-export' instead. Your configuration will be migrated automatically.`),n["devlink-export"]={...t},Nc(n),n):n}function Gh(e,t){try{new RegExp(e)}catch{throw new g(`Invalid '${t}' regex '${e}' in webflow.json. Fix the value and re-run the export.`,{isUserError:!0})}}async function Zh(e){e=DS(e);let t=e["devlink-export"]||{},n=!1,r=t.rootDir;r||(oe()?r=Jh:(n=!0,r=await Te({message:"Enter the root directory for exported components:",default:Jh,validate:u=>!u||u.trim()===""?"Root directory is required":!0})));let o=t.ts;o===void 0&&(xS()?o=!0:oe()?o=!1:(n=!0,o=await Ae({message:"Use TypeScript?",default:!0})));let i=t.cssScopes;i===void 0&&(oe()?i=qh:(n=!0,i=await Ae({message:"Use DevLink style isolation (scoped wrapper + @scope)?",default:qh}))),t.components&&Gh(t.components,"components"),t.componentGroups&&Gh(t.componentGroups,"componentGroups");let s=t.components,a=t.componentGroups;!s&&!a&&(oe()?(s=ws,a=bs):(n=!0,await Ae({message:"Do you want to export all components?",default:!0})?(s=ws,a=bs):(s=await Te({message:"Enter regex pattern to filter components (e.g., 'Button|Card' for specific):",default:ws,validate:p=>{try{return new RegExp(p),!0}catch{return"Invalid regex pattern. Please enter a valid regular expression."}}}),a=await Te({message:"Enter regex pattern to filter component groups (e.g., 'mygroup'):",default:bs,validate:p=>{try{return new RegExp(p),!0}catch{return"Invalid regex pattern. Please enter a valid regular expression."}}})))),s=s||ws,a=a||bs;let l=t.relativeHrefRoot;l===void 0&&(l=vS);let c={...t,rootDir:r,components:s,componentGroups:a,ts:o,cssScopes:i,relativeHrefRoot:l};return(!t.rootDir||t.ts===void 0||t.cssScopes===void 0||!t.components||!t.componentGroups||t.relativeHrefRoot===void 0)&&kS(c),{config:c,wasPrompted:n}}function kS(e){se({"devlink-export":{...e}})}function xS(){try{let e=process.cwd();if(Lc())return!0;let t=["src","app","pages","components"];for(let n of t){let r=Hh.join(e,n);if(Ds.existsSync(r)&&Mc(Ds.readdirSync(r)))return!0}}catch{}return!1}var Ds,Hh,Jh,ws,bs,qh,vS,Kh=O(()=>{"use strict";Ds=w(require("fs")),Hh=w(require("path"));Me();Oe();J();Ce();te();Ga();Uh();ys();Jh="./webflow",ws=".*",bs=".*",qh=!0,vS="/"});async function Qh(e){if(e.ok)return;let t=await e.text().catch(()=>"");d.debug(`Server error response (HTTP ${e.status}): ${t||"<empty>"}`);let n;try{n=JSON.parse(t).message}catch{}throw new Mo(n||`Request failed (HTTP ${e.status}).`)}async function Uc(e,t,n,r){let o=await CS(n,r,t,e);if(!o.files||!Array.isArray(o.files))throw new g("Invalid response format from V2 API: expected 'files' array");return{files:o.files,messages:o.messages,metadata:o.metadata}}async function CS(e,t,n,r){let{taskId:o,polling:i}=await ES(e,t,n,r);return FS(e,t,n,o,i)}async function ES(e,t,n,r){let o=await(0,Wc.default)(`${I}/v2/devlink/${e}/export`,{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json",[Xh]:t},body:JSON.stringify(r),timeout:6e4});return o.ok||await Qh(o),await o.json()}async function FS(e,t,n,r,o){let{initialDelayMs:i,maxBackoffMs:s,backoffMultiplier:a,timeoutMs:l}=o,c=Date.now()+l,u=i;do{let p=await(0,Wc.default)(`${I}/v2/devlink/${e}/export/${r}`,{headers:{Authorization:`Bearer ${n}`,[Xh]:t},timeout:6e4});p.ok||await Qh(p);let f=await p.json();if(f.status==="finished")return f.result;if(f.status==="failed")throw new Mo("The export task failed. Please try again or report a bug.");await(0,Yh.setTimeout)(u),u=Math.min(u*a,s)}while(Date.now()<c);throw new Mo(`Export task timed out after ${l}ms. Please try again.`)}var Wc,Yh,Xh,Mo,ey=O(()=>{"use strict";Wc=w(require("node-fetch")),Yh=require("timers/promises");J();le();te();Xh="X-WF-Sync-Id",Mo=class extends Error{}});var ty,ny=O(()=>{"use strict";Me();J();ty=async(e,t)=>{if(!t)return;await Ae({message:`Ready to export components to ${e.rootDir}?`,default:!0})||(d.info("Export cancelled."),process.exit(0))}});function ry(e,t,n){let i=new Intl.PluralRules("en-US").select(e)==="one"&&e===1?t:n||`${t}s`;return`${e} ${i}`}var oy=O(()=>{"use strict"});async function vs(e){let t=Date.now(),n;try{let{manifest:r}=Q(),{siteId:o,accessToken:i}=await be(r,e),s=(0,iy.randomUUID)();hp(s);let{config:a,wasPrompted:l}=await Zh(r);d.info(`${ee} Export configuration loaded!`),await ty(a,l);let c=G.forExport({authToken:i,siteId:o});n=d.spinner("Exporting components"),await c.sendUsage("devlink_export_start",{cssScopes:a.cssScopes,ts:a.ts,relativeHrefRoot:a.relativeHrefRoot});try{let{files:u,messages:p,metadata:f}=await Uc(a,i,o,s),m=f.exportCoverage==="full";await Wi(u,a.rootDir,m),n.succeed(`${ry(f.componentCount,"component")} exported to ${a.rootDir}`),gs(p);let h=Date.now()-t;await c.sendUsage("devlink_export_success",{duration:h,cssScopes:a.cssScopes,ts:a.ts,relativeHrefRoot:a.relativeHrefRoot})}catch(u){let p=u instanceof Error?u.message:String(u);throw n.fail(`Components export failed: ${p}`),await c.sendError(u instanceof Error?u:new Error(String(u)),"devlink_export_failure",{cssScopes:a.cssScopes,ts:a.ts}),u}}catch(r){let o="Export failed: "+(r instanceof Error?r.message:r);throw n?n.fail(o):d.error(o,{prefix:`
26
+ `+N}),new g(r,{skipLogging:!0})}}var iy,sy=O(()=>{"use strict";iy=require("crypto");Kh();ey();ny();Be();We();ke();oy();J();te();Ol();Ce();$c()});var ay={};td(ay,{exportComponents:()=>vs});var zc=O(()=>{"use strict";sy()});var nd=Symbol.for("@webflow/webflow-cli/suppress-deprecation");function GD(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 HD(e=process){if(e[nd])return;e[nd]=!0;let t=e.emit;e.emit=function(r,...o){return r==="warning"&&GD(o[0])?!1:t.call(this,r,...o)}}HD();var LD=require("commander");J();var yp=require("child_process"),wp=require("fs"),ll=w(require("semver"));J();var cl="@webflow/webflow-cli",xn="@webflow/data-types",Ei="@webflow/react",Qv=[cl,xn,Ei],Cn=class{getInstalledDependencies(){try{let t=(0,yp.execSync)(`npm ls ${Qv.join(" ")} --depth=0 --json --silent`,{encoding:"utf-8"}),n=JSON.parse(t);return n.dependencies?Object.entries(n.dependencies).reduce((r,[o,{version:i}])=>(r[o]=i,r),{}):{}}catch(t){return d.debug(`Failed to get installed dependencies: ${t}`),{}}}getRequiredDependencies(t){let n=JSON.parse((0,wp.readFileSync)(require.resolve(`${t}/package.json`),"utf8"));return{...n.dependencies,...n.devDependencies}}checkCLIAndDataTypes(t){let n=t[xn];if(!n)return;let o=this.getRequiredDependencies(cl)[xn];if(!ll.default.satisfies(n,o))throw new Error(`Version mismatch: ${cl} requires ${xn} v${o} but found v${n}`)}checkReactAndDataTypes(t){let n=t[xn],r=t[Ei];if(!(!n||!r)&&!ll.default.eq(n,r))throw new Error(`Version mismatch: ${Ei} and ${xn} must be on the same version. Found ${Ei}@${r} and ${xn}@${n}`)}run(){let t=this.getInstalledDependencies();this.checkCLIAndDataTypes(t),this.checkReactAndDataTypes(t)}};var kp=require("fs-extra");Me();var xp=require("@dotenvx/dotenvx"),En=w(require("semver"));J();var bp=require("child_process"),Dp=require("util"),tk=(0,Dp.promisify)(bp.exec);async function Ht(e,t){try{let{stdout:n,stderr:r}=await tk(e,t);return{stdout:n.toString().trim(),stderr:r.toString().trim(),code:0}}catch(n){let r=n;return{stdout:r.stdout??"",stderr:r.stderr??String(r.message??""),code:r.code??1}}}Oe();var ul=w(ki());(0,xp.config)({quiet:!0,ignore:["MISSING_ENV_FILE"]});var vp={npm:{updateCommand:"npm install",update:async e=>await Ht(`npm install ${e}`),getOutdated:async e=>{let{stdout:t}=await Ht(`npm outdated --json ${e}`);return JSON.parse(t)},lockFile:"package-lock.json",globalFlag:"--global",supported:!0},pnpm:{updateCommand:"pnpm add",update:async e=>await Ht(`pnpm add ${e}`),getOutdated:async e=>{let{stdout:t}=await Ht(`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}},nk=["@webflow/webflow-cli","@webflow/data-types","@webflow/react","@webflow/emotion-utils","@webflow/styled-components-utils"],vo=class{packageManager;constructor(){this.packageManager=this.getPackagerManagerInfo()}getPackagerManagerInfo(){for(let[,t]of Object.entries(vp))if((0,kp.existsSync)(t.lockFile))return t;return vp.npm}async listOutdatedPackages(t="local",n=nk){let{getOutdated:r,globalFlag:o}=this.packageManager,i=await r(`${t==="global"?o:""} ${n?.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 n=await this.listOutdatedPackages("global",["@webflow/webflow-cli"]);return{...t,...n}}async showUpdatePrompt(t){if(Object.keys(t).length>1){let r=await Fi({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 r??[]}else{let[[r,{current:o,latest:i}]]=Object.entries(t);return await Ae({message:`A new version of ${r} (${o} \u2192 ${i}) is available. Would you like to update?`,default:!1})?[r]:[]}}showUpdateSuggestions(t){let n=Object.keys(t).length>1,{updateCommand:r,globalFlag:o}=this.packageManager;if(n){console.log(`
27
27
  New versions of the following @webflow packages are available:`),Object.entries(t).forEach(([a,{current:l,latest:c}])=>{console.log(` ${a} (${l} \u2192 ${c})`)});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
28
  To update, run:`),i.length>0&&console.log(` ${r} ${i.join(" ")}`),s.length>0&&console.log(` ${r} ${o} ${s.join(" ")}`)}else{let[[i,{current:s,latest:a,installationType:l}]]=Object.entries(t);console.log(`
29
- A new version of ${i} (${s} \u2192 ${a}) is available.`);let c=l==="global"?` ${o}`:"";console.log(`To update, run: ${r}${c} ${i}@latest`)}}shouldSkipUpdateChecks(){return!this.packageManager.supported||process.env.WEBFLOW_SKIP_UPDATE_CHECKS==="true"}getDistTag(){let t=an.prerelease(Ea.default.version);return t&&t.length>0&&typeof t[0]=="string"?t[0]:"latest"}async promptPrerelease(t){let n;try{n=d.spinner("Checking for updates (to disable, use --skip-update-check)");let{stdout:r,code:o}=await Rt(`npm view @webflow/webflow-cli@${t} version`);if(o!==0||!r.trim()){n.succeed("Up to date");return}let i=r.trim(),s=Ea.default.version;if(!an.valid(i)||!an.valid(s)){n.succeed("Up to date");return}if(!an.gt(i,s)){n.succeed("All @webflow packages are up to date");return}if(n.succeed(),!process.stdin.isTTY||re()){console.log(`
30
- A new version of @webflow/webflow-cli@${t} is available.`);let{code:p}=await Rt("npm ls @webflow/webflow-cli --json"),m=(p===0?"local":"global")==="global"?" --global":"";console.log(`To update, run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`);return}let{code:l}=await Rt("npm ls @webflow/webflow-cli --json"),c=l===0?"local":"global";if(await Fe({message:`A new version of @webflow/webflow-cli@${t} is available. Would you like to update?`,default:!1})){n=d.spinner("Updating");let p=c==="global"?` ${this.packageManager.globalFlag}`:"";try{await this.packageManager.update(`${p} @webflow/webflow-cli@${t}`),n.succeed("Updated successfully")}catch{let m=c==="global"?` ${this.packageManager.globalFlag}`:"";n.fail(`Update failed. Manually run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`)}}}catch(r){n?.fail("Failed to check for updates"),d.debug(String(r))}}async prompt(){if(this.shouldSkipUpdateChecks())return;let t=this.getDistTag();if(t!=="latest")return this.promptPrerelease(t);let n;try{n=d.spinner("Checking for updates (to disable, use --skip-update-check)");let r=await this.getOutdatedPackages();if(!(Object.keys(r).length>0)){n.succeed("All @webflow packages are up to date");return}if(n.succeed(),!process.stdin.isTTY||re()){this.showUpdateSuggestions(r);return}let s=await this.showUpdatePrompt(r);if(s.length>0){n=d.spinner("Updating");let{local:a,global:l}=s.reduce((f,m)=>(f[r[m].installationType==="global"?"global":"local"].push(m),f),{local:[],global:[]}),{update:c,globalFlag:u,updateCommand:p}=this.packageManager;try{a.length>0&&await c(`${a.map(f=>`${f}@latest`).join(" ")}`),l.length>0&&await c(`${u} ${l.map(f=>`${f}@latest`).join(" ")}`),n.succeed("Updated successfully")}catch{n.fail(`Update failed. Manually run: ${p} ${s.map(m=>`${m}@latest`).join(" ")}`)}}}catch(r){n?.fail("Failed to check for updates"),d.debug(String(r))}}};Se();ba();ha();$e();Ie();je();Se();ye();G();te();ve();var Hd=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 n=>{if(re()){d.info(`${L} No-input mode enabled. Aborting OAuth authentication`);return}let{manifest:r}=Q();if(!n.force&&Zr()){let i=Yr(r);d.info(`${ee} Webflow credentials already exist:`),i&&d.info(` Site ID: ${i}`),d.info(" API Token: [hidden]"),d.info(`
31
- Use --force flag to reauthenticate anyway`);return}try{let o=await Y({force:n.force});bt({apiToken:o}),d.info(`
32
- You can now use other Webflow CLI commands that require authentication`)}catch(o){throw new h(o,{prefix:`${L} Authentication failed:`})}}),t.command("status").description("Show current authentication status").action(async()=>{let n=Hr(),r=n?.accessToken??Zr();if(!r){d.info(`${L} Not logged in. Run 'webflow auth login' to authenticate.`),process.exitCode=1;return}try{let o=await $a(r);if(!o){d.info(`${L} Token is invalid or expired. Run 'webflow auth login --force' to reauthenticate.`),process.exitCode=1;return}d.info(`${ee} Logged in as ${o.firstName} ${o.lastName} (${o.email})`),n?.scopes?.length&&d.info(` Scopes: ${n.scopes.join(", ")}`),d.info(` Session: ${jt()}`)}catch(o){throw new h(o,{prefix:`${L} Failed to fetch auth status:`})}}),t.command("logout").description("Log out and remove stored credentials").action(async()=>{Sa(),d.info(`${ee} Logged out. Session file removed.`),d.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 n=>{let r=It.getInstance();if(n.status){let s=await r.getTelemetryStatus();d.info(Jd(s.enabled));return}if(n.enable){await r.setGlobalPreference(!0),d.info(ja(!0));return}if(n.disable){await r.setGlobalPreference(!1),d.info(ja(!1));return}let o=await r.getTelemetryStatus();if(d.info(Jd(o.enabled)),re()){d.info("\u{1F4A1} When --no-input mode is enabled please provide --enable or --disable option");return}let i=await Re({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 r.setGlobalPreference(s),d.info(ja(s))}})},ja=e=>`${ee} Telemetry ${e?"enabled":"disabled"} for all Webflow CLI commands`,Jd=e=>`${gt} Telemetry status: ${e?`enabled ${ee}`:`disabled ${L}`}`;var hp=w(require("http")),gp=w(require("node-fetch")),yp=w(require("serve-handler")),bp=require("fs"),wp=w(require("path")),Dp=require("commander");var Zd=w(require("archiver")),Na=require("commander"),Qo=require("fs");var Kd=require("cosmiconfig"),Ba=require("commander"),Yo=async(e,t)=>{let n=await ok(t),r=n.config.apiVersion;return r&&typeof r!="string"&&Ba.program.error('Error: The apiVersion field in webflow.json must be a string (i.e. "apiVersion": "2").'),{filepath:n.filepath,config:{publicDir:e,...n.config}}},ok=async e=>{let n=await(0,Kd.cosmiconfig)("webflow",{searchPlaces:[e]}).search();return n||Ba.program.error(`No ${e} file was found. Run this command within your extension folder.`),n};var Yd=w(require("mime-types")),Xo=w(require("path")),ik=5*1024*1024,sk=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"]),Xd=async(e,t,n)=>{let{config:r,filepath:o}=await Yo(e,t),i=Xo.join(o,".."),s=!0,a=!1,l=u=>{let p=u.name,f=Yd.default.lookup(p);return p==="index.html"&&(a=!0),p&&p.endsWith(".DS_Store")||!f?!1:sk.has(f)?u:(console.log(`Invalid file type: ${f} for file: ${p}`),s=!1,!1)},c=u=>{(0,Qo.unlink)(n,p=>{p&&console.error(`Failed to delete file: ${p}`),Na.program.error(u)})};return console.log(`Packaging the contents of the ${r.publicDir} folder into ${n}...`),new Promise(u=>{let p=(0,Zd.default)("zip",{zlib:{level:9}}),f=(0,Qo.createWriteStream)(Xo.join(i,n));f.on("close",()=>{u(void 0)}),p.directory(Xo.join(i,r.publicDir),!1,l),p.file(o,{name:t}),p.pipe(f),p.finalize(),p.on("warning",m=>{console.log(m)}),p.on("error",m=>{Na.program.error(m.message)}),p.on("finish",()=>{if(!a){c("Could not find index.html in your `publicDir`, all Designer Extension code needs to be inside of `publicDir`");return}if(!s){c("Bundling failed due to invalid file types");return}if(!p.pointer()||p.pointer()===0){c("Bundling failed with no output");return}if(p.pointer()>=ik){c("Bundling failed due to the bundle exceeding 5MB");return}console.log(`${p.pointer()} total bytes written`),console.log(`Done! ${n} is ready for you to upload to your Webflow app.`)})})};var Xr=w(require("path")),at=w(require("fs/promises")),ni=w(require("fs")),ep=require("url"),QO=require("dotenv/config"),tp=["js","cjs","json"],Ua=process.cwd(),np=".webflowrc",Dt=Xr.extname(ni.readdirSync(Ua).find(e=>e.includes(np))??"").replace(/\./g,""),wt=Xr.join(Ua,`${np}${Dt&&`.${Dt}`}`),rp=ni.existsSync(wt),La=class extends Error{constructor(){super(`Missing extension for .webflowrc file. The supported extensions are: ${tp.join(", ")}`)}},ei=class extends Error{constructor(){super(`Unsupported extension for .webflowrc: ${Dt}. The supported extensions are: ${tp.join(", ")}`)}},ti=class extends Error{constructor(t){let n=t.includes(".webflowrc"),r=t.includes("webflow.json"),o;n?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.`:r?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)}},Ma=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 ak(e){return(await import(process.platform==="win32"&&e?.match(/[a-zA-Z]:[\\\/]/)?(0,ep.pathToFileURL)(e).href:e)).default}function Qd(e,t){let n=t.filter(r=>!e[r]);if(n.length)throw new Ma(n.join(", "))}async function Hn(e=[],t=!1){if(!rp){if(t)return{};throw new ti(wt)}if(!Dt)throw new La;switch(Dt){case"js":case"cjs":{await at.access(wt);let n=await ak(wt);return Qd(n,e),n}case"json":{let n=JSON.parse(await at.readFile(wt,"utf8"));return Qd(n,e),n}default:throw new ei}}function lk(e,t){if(Dt==="js"||Dt==="cjs"){let r=new RegExp(`${t}: process.env.([\\w]+),`,"gi").exec(e);if(r)return r[1]}}function ck(e,t,n){let r=lk(t,n);if(r){let o=new RegExp(`${n}: ".*?",`,"g");return e.replace(o,`${n}: process.env.${r},`)}return e}async function uk(e){let t=["authToken","host","siteId"],n=await at.readFile(wt,"utf-8");for(let r of t)e=ck(e,n,r);return e}async function dk(){try{let e=Xr.join(Ua,"package.json");return await at.access(e),JSON.parse(await at.readFile(e,"utf-8"))?.type==="module"}catch{return!1}}async function op(e){if(!rp)throw new ti(wt);let t=JSON.stringify(e,null,2);switch(Dt){case"js":case"cjs":{let n=await uk(t.replace(/"([^"]+)":/g,"$1:")),r=await dk()&&Dt==="js"?"export default ":"module.exports = ";return at.writeFile(wt,r+n)}case"json":return at.writeFile(wt,t);default:throw new ei}}var Bt=w(require("fs")),Ue=w(require("path"));var Qr="webflow.json",ip="index.html",sp="bundle.zip",Wa="public",za="extension-scaffolds",ri="default",ap="./";var lp="package.json",cp="wf-placeholder-name",Va=e=>JSON.stringify(e,null,2),up=e=>{let t="\u2500".repeat(e.length+2);return"\u256D"+t+`\u256E
29
+ A new version of ${i} (${s} \u2192 ${a}) is available.`);let c=l==="global"?` ${o}`:"";console.log(`To update, run: ${r}${c} ${i}@latest`)}}shouldSkipUpdateChecks(){return!this.packageManager.supported||process.env.WEBFLOW_SKIP_UPDATE_CHECKS==="true"}getDistTag(){let t=En.prerelease(ul.default.version);return t&&t.length>0&&typeof t[0]=="string"?t[0]:"latest"}async promptPrerelease(t){let n;try{n=d.spinner("Checking for updates (to disable, use --skip-update-check)");let{stdout:r,code:o}=await Ht(`npm view @webflow/webflow-cli@${t} version`);if(o!==0||!r.trim()){n.succeed("Up to date");return}let i=r.trim(),s=ul.default.version;if(!En.valid(i)||!En.valid(s)){n.succeed("Up to date");return}if(!En.gt(i,s)){n.succeed("All @webflow packages are up to date");return}if(n.succeed(),!process.stdin.isTTY||oe()){console.log(`
30
+ A new version of @webflow/webflow-cli@${t} is available.`);let{code:p}=await Ht("npm ls @webflow/webflow-cli --json"),m=(p===0?"local":"global")==="global"?" --global":"";console.log(`To update, run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`);return}let{code:l}=await Ht("npm ls @webflow/webflow-cli --json"),c=l===0?"local":"global";if(await Ae({message:`A new version of @webflow/webflow-cli@${t} is available. Would you like to update?`,default:!1})){n=d.spinner("Updating");let p=c==="global"?` ${this.packageManager.globalFlag}`:"";try{await this.packageManager.update(`${p} @webflow/webflow-cli@${t}`),n.succeed("Updated successfully")}catch{let m=c==="global"?` ${this.packageManager.globalFlag}`:"";n.fail(`Update failed. Manually run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`)}}}catch(r){n?.fail("Failed to check for updates"),d.debug(String(r))}}async prompt(){if(this.shouldSkipUpdateChecks())return;let t=this.getDistTag();if(t!=="latest")return this.promptPrerelease(t);let n;try{n=d.spinner("Checking for updates (to disable, use --skip-update-check)");let r=await this.getOutdatedPackages();if(!(Object.keys(r).length>0)){n.succeed("All @webflow packages are up to date");return}if(n.succeed(),!process.stdin.isTTY||oe()){this.showUpdateSuggestions(r);return}let s=await this.showUpdatePrompt(r);if(s.length>0){n=d.spinner("Updating");let{local:a,global:l}=s.reduce((f,m)=>(f[r[m].installationType==="global"?"global":"local"].push(m),f),{local:[],global:[]}),{update:c,globalFlag:u,updateCommand:p}=this.packageManager;try{a.length>0&&await c(`${a.map(f=>`${f}@latest`).join(" ")}`),l.length>0&&await c(`${u} ${l.map(f=>`${f}@latest`).join(" ")}`),n.succeed("Updated successfully")}catch{n.fail(`Update failed. Manually run: ${p} ${s.map(m=>`${m}@latest`).join(" ")}`)}}}catch(r){n?.fail("Failed to check for updates"),d.debug(String(r))}}};Oe();rl();el();Me();Be();We();Oe();ke();J();te();Ce();var Np=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 n=>{if(oe()){d.info(`${N} No-input mode enabled. Aborting OAuth authentication`);return}let{manifest:r}=Q();if(!n.force&&Eo()){let i=Fo(r);d.info(`${ee} Webflow credentials already exist:`),i&&d.info(` Site ID: ${i}`),d.info(" API Token: [hidden]"),d.info(`
31
+ Use --force flag to reauthenticate anyway`);return}try{let o=await Y({force:n.force});Ot({apiToken:o}),d.info(`
32
+ You can now use other Webflow CLI commands that require authentication`)}catch(o){throw new g(o,{prefix:`${N} Authentication failed:`})}}),t.command("status").description("Show current authentication status").action(async()=>{let n=xo(),r=n?.accessToken??Eo();if(!r){d.info(`${N} Not logged in. Run 'webflow auth login' to authenticate.`),process.exitCode=1;return}try{let o=await Dl(r);if(!o){d.info(`${N} Token is invalid or expired. Run 'webflow auth login --force' to reauthenticate.`),process.exitCode=1;return}d.info(`${ee} Logged in as ${o.firstName} ${o.lastName} (${o.email})`),n?.scopes?.length&&d.info(` Scopes: ${n.scopes.join(", ")}`),d.info(` Session: ${Kt()}`)}catch(o){throw new g(o,{prefix:`${N} Failed to fetch auth status:`})}}),t.command("logout").description("Log out and remove stored credentials").action(async()=>{fl(),d.info(`${ee} Logged out. Session file removed.`),d.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 n=>{let r=qt.getInstance();if(n.status){let s=await r.getTelemetryStatus();d.info(Bp(s.enabled));return}if(n.enable){await r.setGlobalPreference(!0),d.info(vl(!0));return}if(n.disable){await r.setGlobalPreference(!1),d.info(vl(!1));return}let o=await r.getTelemetryStatus();if(d.info(Bp(o.enabled)),oe()){d.info("\u{1F4A1} When --no-input mode is enabled please provide --enable or --disable option");return}let i=await Le({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 r.setGlobalPreference(s),d.info(vl(s))}})},vl=e=>`${ee} Telemetry ${e?"enabled":"disabled"} for all Webflow CLI commands`,Bp=e=>`${At} Telemetry status: ${e?`enabled ${ee}`:`disabled ${N}`}`;var sf=w(require("http")),af=w(require("node-fetch")),lf=w(require("serve-handler")),cf=require("fs"),uf=w(require("path")),df=require("commander");var Mp=w(require("archiver")),xl=require("commander"),Pi=require("fs");var Lp=require("cosmiconfig"),kl=require("commander"),Ti=async(e,t)=>{let n=await ck(t),r=n.config.apiVersion;return r&&typeof r!="string"&&kl.program.error('Error: The apiVersion field in webflow.json must be a string (i.e. "apiVersion": "2").'),{filepath:n.filepath,config:{publicDir:e,...n.config}}},ck=async e=>{let n=await(0,Lp.cosmiconfig)("webflow",{searchPlaces:[e]}).search();return n||kl.program.error(`No ${e} file was found. Run this command within your extension folder.`),n};var Wp=w(require("mime-types")),Oi=w(require("path")),uk=5*1024*1024,dk=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"]),Up=async(e,t,n)=>{let{config:r,filepath:o}=await Ti(e,t),i=Oi.join(o,".."),s=!0,a=!1,l=u=>{let p=u.name,f=Wp.default.lookup(p);return p==="index.html"&&(a=!0),p&&p.endsWith(".DS_Store")||!f?!1:dk.has(f)?u:(console.log(`Invalid file type: ${f} for file: ${p}`),s=!1,!1)},c=u=>{(0,Pi.unlink)(n,p=>{p&&console.error(`Failed to delete file: ${p}`),xl.program.error(u)})};return console.log(`Packaging the contents of the ${r.publicDir} folder into ${n}...`),new Promise(u=>{let p=(0,Mp.default)("zip",{zlib:{level:9}}),f=(0,Pi.createWriteStream)(Oi.join(i,n));f.on("close",()=>{u(void 0)}),p.directory(Oi.join(i,r.publicDir),!1,l),p.file(o,{name:t}),p.pipe(f),p.finalize(),p.on("warning",m=>{console.log(m)}),p.on("error",m=>{xl.program.error(m.message)}),p.on("finish",()=>{if(!a){c("Could not find index.html in your `publicDir`, all Designer Extension code needs to be inside of `publicDir`");return}if(!s){c("Bundling failed due to invalid file types");return}if(!p.pointer()||p.pointer()===0){c("Bundling failed with no output");return}if(p.pointer()>=uk){c("Bundling failed due to the bundle exceeding 5MB");return}console.log(`${p.pointer()} total bytes written`),console.log(`Done! ${n} is ready for you to upload to your Webflow app.`)})})};var So=w(require("path")),wt=w(require("fs/promises")),ji=w(require("fs")),Vp=require("url"),oI=require("dotenv/config"),Jp=["js","cjs","json"],Fl=process.cwd(),qp=".webflowrc",It=So.extname(ji.readdirSync(Fl).find(e=>e.includes(qp))??"").replace(/\./g,""),Pt=So.join(Fl,`${qp}${It&&`.${It}`}`),Gp=ji.existsSync(Pt),Cl=class extends Error{constructor(){super(`Missing extension for .webflowrc file. The supported extensions are: ${Jp.join(", ")}`)}},Ii=class extends Error{constructor(){super(`Unsupported extension for .webflowrc: ${It}. The supported extensions are: ${Jp.join(", ")}`)}},Ri=class extends Error{constructor(t){let n=t.includes(".webflowrc"),r=t.includes("webflow.json"),o;n?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.`:r?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)}},El=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 pk(e){return(await import(process.platform==="win32"&&e?.match(/[a-zA-Z]:[\\\/]/)?(0,Vp.pathToFileURL)(e).href:e)).default}function zp(e,t){let n=t.filter(r=>!e[r]);if(n.length)throw new El(n.join(", "))}async function hr(e=[],t=!1){if(!Gp){if(t)return{};throw new Ri(Pt)}if(!It)throw new Cl;switch(It){case"js":case"cjs":{await wt.access(Pt);let n=await pk(Pt);return zp(n,e),n}case"json":{let n=JSON.parse(await wt.readFile(Pt,"utf8"));return zp(n,e),n}default:throw new Ii}}function fk(e,t){if(It==="js"||It==="cjs"){let r=new RegExp(`${t}: process.env.([\\w]+),`,"gi").exec(e);if(r)return r[1]}}function mk(e,t,n){let r=fk(t,n);if(r){let o=new RegExp(`${n}: ".*?",`,"g");return e.replace(o,`${n}: process.env.${r},`)}return e}async function gk(e){let t=["authToken","host","siteId"],n=await wt.readFile(Pt,"utf-8");for(let r of t)e=mk(e,n,r);return e}async function hk(){try{let e=So.join(Fl,"package.json");return await wt.access(e),JSON.parse(await wt.readFile(e,"utf-8"))?.type==="module"}catch{return!1}}async function Hp(e){if(!Gp)throw new Ri(Pt);let t=JSON.stringify(e,null,2);switch(It){case"js":case"cjs":{let n=await gk(t.replace(/"([^"]+)":/g,"$1:")),r=await hk()&&It==="js"?"export default ":"module.exports = ";return wt.writeFile(Pt,r+n)}case"json":return wt.writeFile(Pt,t);default:throw new Ii}}var Yt=w(require("fs")),Ge=w(require("path"));var _o="webflow.json",Zp="index.html",Kp="bundle.zip",Sl="public",_l="extension-scaffolds",$i="default",Yp="./";var Xp="package.json",Qp="wf-placeholder-name",Al=e=>JSON.stringify(e,null,2),ef=e=>{let t="\u2500".repeat(e.length+2);return"\u256D"+t+`\u256E
33
33
  \u2502 `+e+` \u2502
34
- \u2570`+t+"\u256F"};var dp=async(e,t=ap,n=ri,r)=>{let o=r[n];try{for(let i of o){let s=Ue.join(t,i),a=fk(s,n,e);if(i.includes(lp)||i.includes(Qr))await pk(i,a,e);else{let l=await Bt.promises.readFile(i);await mp(a,l)}}}catch(i){console.error("Error writing file, ",i)}},pp=async()=>{let e={},t=Ue.resolve(__dirname),n=Ue.join(t,za),r=await Bt.promises.readdir(n);for(let o of r){let i=Ue.join(n,o),s=await fp(i);e[o]=s}return e},fp=async e=>{let t=[];try{let n=await Bt.promises.readdir(e);for(let r of n){let o=Ue.join(e,r);if((await Bt.promises.stat(o)).isDirectory()){let s=await fp(o);t.push(...s)}else t.push(o)}}catch(n){console.error(`Error reading ${Ue}, `,n)}return t},mp=async(e,t)=>{try{await Bt.promises.mkdir(Ue.dirname(e),{recursive:!0}),await Bt.promises.writeFile(e,t)}catch(n){console.error("Error writing file ",n)}},pk=async(e,t,n)=>Bt.promises.readFile(e,"utf8").then(async r=>{let o=r.replace(cp,n);await mp(t,o)}),fk=(e,t,n)=>{let r=Ue.join(za,t),o=e.indexOf(r);if(o!==-1){let i=e.substring(o+r.length+1);return Ue.join(n,i)}return""};var oi=async()=>await pp(),kp=async()=>{let e=await oi(),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"')},vp=async(e,t=ri)=>{let n=`./${e}`;console.log(`Scaffolding your new extension named: ${e}...`);let r=await oi();await dp(e,n,t,r),console.log(`Done! Check out ${n}/README.md for steps on how to develop your extension.`)},xp=()=>Xd(Wa,Qr,sp),Cp=async e=>{let{config:t,filepath:n}=await Yo(Wa,Qr),r=wp.join(n,"..",t.publicDir,ip),i=(await Hn([],!0)).extensionTemplateDomain||"webflow-ext.com",s=t.apiVersion==="2"?"template/v2":"template",a=Object.keys(t.featureFlags||{}).map(m=>t.featureFlags?.[m]===!0?`ff_on=${m}`:`ff_off=${m}`).join("&"),l=a?`&${a}`:"",u=await(await(0,gp.default)(`https://${i}/${s}?name=${t.name}${l}`)).text(),p=new hp.Server((m,g)=>{if(m.url==="/"){bp.promises.readFile(r,{encoding:"utf-8"}).catch(k=>{Dp.program.error(k.message)}).then(k=>{let C=u.replace("{{ui}}",k);return g.writeHead(200,{"Content-Length":Buffer.byteLength(C),"Content-Type":"text/html"}),g.end(C)});return}if(m.url==="/__webflow")return g.writeHead(200,{"Content-Length":Buffer.byteLength(Va(t)),"Content-Type":"application/json","Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"*"}),g.end(Va(t));(0,yp.default)(m,g,{public:t.publicDir,cleanUrls:!1,directoryListing:!1})}),f=mk(e);p.listen(f),console.log(up(`Serving your extension at http://localhost:${f}`)+`
35
- `)},mk=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};$e();te();var Ep=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(kp),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(n,r)=>{let o=await oi(),i=Object.keys(o),s=await _e({message:"What would you like to name your Designer Extension?",default:n,validate:l=>l.trim()===""?"The Designer Extension name cannot be empty.":!0});if(s===null)throw new h("When --no-input mode is enabled please provide the [projectName] argument.");let a=await Re({message:"Which project template would you like to use?",choices:i.map(l=>({name:l,value:l})),default:r||"default"});await vp(s,a)}),t.command("bundle").description("Prepare package that can be uploaded to Webflow.").action(xp),t.command("serve").description("Serve your extension locally.").argument("[port]","The port to serve your extension on").action(Cp)};var Xl=w(require("process"));G();le();ye();var _p=w(require("fs"));te();async function si(e){let{authToken:t,siteId:n}=e||{},{path:r,isUserDefined:o}=rn(),i=_p.existsSync(r),s=!1;try{let{manifest:a}=Q();s=!0,o&&d.info(`Using manifest file: ${r}`);try{let l=Nr(a,"devlink");if(!t||!n)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.
34
+ \u2570`+t+"\u256F"};var tf=async(e,t=Yp,n=$i,r)=>{let o=r[n];try{for(let i of o){let s=Ge.join(t,i),a=wk(s,n,e);if(i.includes(Xp)||i.includes(_o))await yk(i,a,e);else{let l=await Yt.promises.readFile(i);await of(a,l)}}}catch(i){console.error("Error writing file, ",i)}},nf=async()=>{let e={},t=Ge.resolve(__dirname),n=Ge.join(t,_l),r=await Yt.promises.readdir(n);for(let o of r){let i=Ge.join(n,o),s=await rf(i);e[o]=s}return e},rf=async e=>{let t=[];try{let n=await Yt.promises.readdir(e);for(let r of n){let o=Ge.join(e,r);if((await Yt.promises.stat(o)).isDirectory()){let s=await rf(o);t.push(...s)}else t.push(o)}}catch(n){console.error(`Error reading ${Ge}, `,n)}return t},of=async(e,t)=>{try{await Yt.promises.mkdir(Ge.dirname(e),{recursive:!0}),await Yt.promises.writeFile(e,t)}catch(n){console.error("Error writing file ",n)}},yk=async(e,t,n)=>Yt.promises.readFile(e,"utf8").then(async r=>{let o=r.replace(Qp,n);await of(t,o)}),wk=(e,t,n)=>{let r=Ge.join(_l,t),o=e.indexOf(r);if(o!==-1){let i=e.substring(o+r.length+1);return Ge.join(n,i)}return""};var Bi=async()=>await nf(),pf=async()=>{let e=await Bi(),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"')},ff=async(e,t=$i)=>{let n=`./${e}`;console.log(`Scaffolding your new extension named: ${e}...`);let r=await Bi();await tf(e,n,t,r),console.log(`Done! Check out ${n}/README.md for steps on how to develop your extension.`)},mf=()=>Up(Sl,_o,Kp),gf=async e=>{let{config:t,filepath:n}=await Ti(Sl,_o),r=uf.join(n,"..",t.publicDir,Zp),i=(await hr([],!0)).extensionTemplateDomain||"webflow-ext.com",s=t.apiVersion==="2"?"template/v2":"template",a=Object.keys(t.featureFlags||{}).map(m=>t.featureFlags?.[m]===!0?`ff_on=${m}`:`ff_off=${m}`).join("&"),l=a?`&${a}`:"",u=await(await(0,af.default)(`https://${i}/${s}?name=${t.name}${l}`)).text(),p=new sf.Server((m,h)=>{if(m.url==="/"){cf.promises.readFile(r,{encoding:"utf-8"}).catch(v=>{df.program.error(v.message)}).then(v=>{let k=u.replace("{{ui}}",v);return h.writeHead(200,{"Content-Length":Buffer.byteLength(k),"Content-Type":"text/html"}),h.end(k)});return}if(m.url==="/__webflow")return h.writeHead(200,{"Content-Length":Buffer.byteLength(Al(t)),"Content-Type":"application/json","Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"*"}),h.end(Al(t));(0,lf.default)(m,h,{public:t.publicDir,cleanUrls:!1,directoryListing:!1})}),f=bk(e);p.listen(f),console.log(ef(`Serving your extension at http://localhost:${f}`)+`
35
+ `)},bk=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};Me();te();var hf=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(pf),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(n,r)=>{let o=await Bi(),i=Object.keys(o),s=await Te({message:"What would you like to name your Designer Extension?",default:n,validate:l=>l.trim()===""?"The Designer Extension name cannot be empty.":!0});if(s===null)throw new g("When --no-input mode is enabled please provide the [projectName] argument.");let a=await Le({message:"Which project template would you like to use?",choices:i.map(l=>({name:l,value:l})),default:r||"default"});await ff(s,a)}),t.command("bundle").description("Prepare package that can be uploaded to Webflow.").action(mf),t.command("serve").description("Serve your extension locally.").argument("[port]","The port to serve your extension on").action(gf)};var Bc=w(require("process"));J();le();ke();var wf=w(require("fs"));te();async function Li(e){let{authToken:t,siteId:n}=e||{},{path:r,isUserDefined:o}=kn(),i=wf.existsSync(r),s=!1;try{let{manifest:a}=Q();s=!0,o&&d.info(`Using manifest file: ${r}`);try{let l=fo(a,"devlink");if(!t||!n)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 Fp(l?.relativeHrefRoot),{...l,host:P,authToken:t,siteId:n,cssModules:!!l?.cssModules,components:ii(l?.components),fileExtensions:l?.fileExtensions,...e}}catch(l){throw new h(l,{prefix:`Failed to read devlink config from manifest file: ${r}
38
+ webflow auth login`);return yf(l?.relativeHrefRoot),{...l,host:I,authToken:t,siteId:n,cssModules:!!l?.cssModules,components:Ni(l?.components),fileExtensions:l?.fileExtensions,...e}}catch(l){throw new g(l,{prefix:`Failed to read devlink config from manifest file: ${r}
39
39
  `})}}catch(a){if(o||i||s){let l=o?`The manifest file specified via --manifest flag was not found or is invalid: ${r}
40
40
  `:`Your manifest file exists but is invalid or missing required properties: ${r}
41
- `;throw new h(a,{prefix:l})}}try{let a=[];t||a.push("authToken"),n||a.push("siteId");let l=await Hn(a);return Fp(l?.relativeHrefRoot),{...l,host:l.host||P,cssModules:!!l?.cssModules,components:ii(l?.components),fileExtensions:l?.fileExtensions,...e}}catch(a){throw a instanceof Error&&a.message.includes(".webflowrc")&&(a.message=`No configuration file found. Please create either:
41
+ `;throw new g(a,{prefix:l})}}try{let a=[];t||a.push("authToken"),n||a.push("siteId");let l=await hr(a);return yf(l?.relativeHrefRoot),{...l,host:l.host||I,cssModules:!!l?.cssModules,components:Ni(l?.components),fileExtensions:l?.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 h(a)}}function Fp(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 ii(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>`^${t}$`).join("|")}qa();it();te();var bk=Object.create,Sl=Object.defineProperty,wk=Object.getOwnPropertyDescriptor,Dk=Object.getOwnPropertyNames,kk=Object.getPrototypeOf,vk=Object.prototype.hasOwnProperty,or=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),B=(e,t)=>{for(var n in t)Sl(e,n,{get:t[n],enumerable:!0})},xk=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Dk(t))!vk.call(e,o)&&o!==n&&Sl(e,o,{get:()=>t[o],enumerable:!(r=wk(t,o))||r.enumerable});return e},Ck=(e,t,n)=>(n=e!=null?bk(kk(e)):{},xk(t||!e||!e.__esModule?Sl(n,"default",{value:e,enumerable:!0}):n,e)),Ek=or(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}}),Fk=or(e=>{var t=Ek(),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,g,k;do{if(c>=p)throw new Error("Expected more digits in base 64 VLQ value.");if(k=t.decode(l.charCodeAt(c++)),k===-1)throw new Error("Invalid base64 digit: "+l.charAt(c-1));g=!!(k&i),k&=o,f=f+(k<<m),m+=n}while(g);u.value=a(f),u.rest=c}}),Tl=or(e=>{function t(y,b,N){if(b in y)return y[b];if(arguments.length===3)return N;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(N){for(var S=0;S<b.length;S++)if(b[S].input===N){var ge=b[0];return b[0]=b[S],b[S]=ge,b[0].result}var Ke=y(N);return b.unshift({input:N,result:Ke}),b.length>s&&b.pop(),Ke}}var l=a(function(y){var b=y,N=o(y);if(N){if(!N.path)return y;b=N.path}for(var S=e.isAbsolute(b),ge=[],Ke=0,z=0;;)if(Ke=z,z=b.indexOf("/",Ke),z===-1){ge.push(b.slice(Ke));break}else for(ge.push(b.slice(Ke,z));z<b.length&&b[z]==="/";)z++;for(var ce,Tt=0,z=ge.length-1;z>=0;z--)ce=ge[z],ce==="."?ge.splice(z,1):ce===".."?Tt++:Tt>0&&(ce===""?(ge.splice(z+1,Tt),Tt=0):(ge.splice(z,2),Tt--));return b=ge.join("/"),b===""&&(b=S?"/":"."),N?(N.path=b,i(N)):b});e.normalize=l;function c(y,b){y===""&&(y="."),b===""&&(b=".");var N=o(b),S=o(y);if(S&&(y=S.path||"/"),N&&!N.scheme)return S&&(N.scheme=S.scheme),i(N);if(N||b.match(r))return b;if(S&&!S.host&&!S.path)return S.host=b,i(S);var ge=b.charAt(0)==="/"?b:l(y.replace(/\/+$/,"")+"/"+b);return S?(S.path=ge,i(S)):ge}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 N=0;b.indexOf(y+"/")!==0;){var S=y.lastIndexOf("/");if(S<0||(y=y.slice(0,S),y.match(/^([^\/]+:\/)?\/*$/)))return b;++N}return Array(N+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 k(y)?"$"+y:y}e.toSetString=p?f:m;function g(y){return k(y)?y.slice(1):y}e.fromSetString=p?f:g;function k(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 N=b-10;N>=0;N--)if(y.charCodeAt(N)!==36)return!1;return!0}function C(y,b,N){var S=x(y.source,b.source);return S!==0||(S=y.originalLine-b.originalLine,S!==0)||(S=y.originalColumn-b.originalColumn,S!==0||N)||(S=y.generatedColumn-b.generatedColumn,S!==0)||(S=y.generatedLine-b.generatedLine,S!==0)?S:x(y.name,b.name)}e.compareByOriginalPositions=C;function O(y,b,N){var S;return S=y.originalLine-b.originalLine,S!==0||(S=y.originalColumn-b.originalColumn,S!==0||N)||(S=y.generatedColumn-b.generatedColumn,S!==0)||(S=y.generatedLine-b.generatedLine,S!==0)?S:x(y.name,b.name)}e.compareByOriginalPositionsNoSource=O;function I(y,b,N){var S=y.generatedLine-b.generatedLine;return S!==0||(S=y.generatedColumn-b.generatedColumn,S!==0||N)||(S=x(y.source,b.source),S!==0)||(S=y.originalLine-b.originalLine,S!==0)||(S=y.originalColumn-b.originalColumn,S!==0)?S:x(y.name,b.name)}e.compareByGeneratedPositionsDeflated=I;function E(y,b,N){var S=y.generatedColumn-b.generatedColumn;return S!==0||N||(S=x(y.source,b.source),S!==0)||(S=y.originalLine-b.originalLine,S!==0)||(S=y.originalColumn-b.originalColumn,S!==0)?S:x(y.name,b.name)}e.compareByGeneratedPositionsDeflatedNoLine=E;function x(y,b){return y===b?0:y===null?1:b===null?-1:y>b?1:-1}function V(y,b){var N=y.generatedLine-b.generatedLine;return N!==0||(N=y.generatedColumn-b.generatedColumn,N!==0)||(N=x(y.source,b.source),N!==0)||(N=y.originalLine-b.originalLine,N!==0)||(N=y.originalColumn-b.originalColumn,N!==0)?N:x(y.name,b.name)}e.compareByGeneratedPositionsInflated=V;function R(y){return JSON.parse(y.replace(/^\)]}'[^\n]*\n/,""))}e.parseSourceMapInput=R;function _(y,b,N){if(b=b||"",y&&(y[y.length-1]!=="/"&&b[0]!=="/"&&(y+="/"),b=y+b),N){var S=o(N);if(!S)throw new Error("sourceMapURL could not be parsed");if(S.path){var ge=S.path.lastIndexOf("/");ge>=0&&(S.path=S.path.substring(0,ge+1))}b=c(i(S),b)}return l(b)}e.computeSourceURL=_}),_k=or(e=>{var t=Tl(),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}),Sk=or(e=>{var t=Tl();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=or(e=>{var t=Fk(),n=Tl(),r=_k().ArraySet,o=Sk().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 g=s.originalPositionFor({line:m.originalLine,column:m.originalColumn});g.source!=null&&(m.source=g.source,l!=null&&(m.source=n.join(l,m.source)),u!=null&&(m.source=n.relative(u,m.source)),m.originalLine=g.line,m.originalColumn=g.column,g.name!=null&&(m.name=g.name))}var k=m.source;k!=null&&!p.has(k)&&p.add(k);var C=m.name;C!=null&&!f.has(C)&&f.add(C)},this),this._sources=p,this._names=f,s.sources.forEach(function(m){var g=s.sourceContentFor(m);g!=null&&(l!=null&&(m=n.join(l,m)),u!=null&&(m=n.relative(u,m)),this.setSourceContent(m,g))},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,g,k,C,O=this._mappings.toArray(),I=0,E=O.length;I<E;I++){if(g=O[I],m="",g.generatedLine!==a)for(s=0;g.generatedLine!==a;)m+=";",a++;else if(I>0){if(!n.compareByGeneratedPositionsInflated(g,O[I-1]))continue;m+=","}m+=t.encode(g.generatedColumn-s),s=g.generatedColumn,g.source!=null&&(C=this._sources.indexOf(g.source),m+=t.encode(C-p),p=C,m+=t.encode(g.originalLine-1-c),c=g.originalLine-1,m+=t.encode(g.originalColumn-l),l=g.originalColumn,g.name!=null&&(k=this._names.indexOf(g.name),m+=t.encode(k-u),u=k)),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}),Ak={};B(Ak,{AtKeyword:()=>Rk,BadString:()=>Bk,BadUrl:()=>Lk,CDC:()=>qk,CDO:()=>Gk,Colon:()=>Jk,Comma:()=>Kk,Comment:()=>nv,Delim:()=>Mk,Dimension:()=>zk,EOF:()=>Ok,Function:()=>Pk,Hash:()=>$k,Ident:()=>Ik,LeftCurlyBracket:()=>ev,LeftParenthesis:()=>Xk,LeftSquareBracket:()=>Zk,Number:()=>Uk,Percentage:()=>Wk,RightCurlyBracket:()=>tv,RightParenthesis:()=>Qk,RightSquareBracket:()=>Yk,Semicolon:()=>Hk,String:()=>jk,Url:()=>Nk,WhiteSpace:()=>Vk});var Ok=0,Ik=1,Pk=2,Rk=3,$k=4,jk=5,Bk=6,Nk=7,Lk=8,Mk=9,Uk=10,Wk=11,zk=12,Vk=13,Gk=14,qk=15,Jk=16,Hk=17,Kk=18,Zk=19,Yk=20,Xk=21,Qk=22,ev=23,tv=24,nv=25;function we(e){return e>=48&&e<=57}function Wt(e){return we(e)||e>=65&&e<=70||e>=97&&e<=102}function Al(e){return e>=65&&e<=90}function rv(e){return e>=97&&e<=122}function ov(e){return Al(e)||rv(e)}function iv(e){return e>=128}function ki(e){return ov(e)||iv(e)||e===95}function Ol(e){return ki(e)||we(e)||e===45}function sv(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function vi(e){return e===10||e===13||e===12}function pn(e){return vi(e)||e===32||e===9}function et(e,t){return!(e!==92||vi(t)||t===0)}function gi(e,t,n){return e===45?ki(t)||t===45||et(t,n):ki(e)?!0:e===92?et(e,t):!1}function Ja(e,t,n){return e===43||e===45?we(t)?2:t===46&&we(n)?3:0:e===46?we(t)?2:0:we(e)?1:0}function Ef(e){return e===65279||e===65534?1:0}var pl=new Array(128),av=128,yi=130,Ff=131,Il=132,_f=133;for(let e=0;e<pl.length;e++)pl[e]=pn(e)&&yi||we(e)&&Ff||ki(e)&&Il||sv(e)&&_f||e||av;function Ha(e){return e<128?pl[e]:Il}function er(e,t){return t<e.length?e.charCodeAt(t):0}function fl(e,t,n){return n===13&&er(e,t+1)===10?2:1}function tr(e,t,n){let r=e.charCodeAt(t);return Al(r)&&(r=r|32),r===n}function lo(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(Al(s)&&(s=s|32),s!==i)return!1}return!0}function lv(e,t){for(;t>=0&&pn(e.charCodeAt(t));t--);return t+1}function ci(e,t){for(;t<e.length&&pn(e.charCodeAt(t));t++);return t}function Ka(e,t){for(;t<e.length&&we(e.charCodeAt(t));t++);return t}function fn(e,t){if(t+=2,Wt(er(e,t-1))){for(let r=Math.min(e.length,t+5);t<r&&Wt(er(e,t));t++);let n=er(e,t);pn(n)&&(t+=fl(e,t,n))}return t}function ui(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!Ol(n)){if(et(n,er(e,t+1))){t=fn(e,t)-1;continue}break}}return t}function Ti(e,t){let n=e.charCodeAt(t);if((n===43||n===45)&&(n=e.charCodeAt(t+=1)),we(n)&&(t=Ka(e,t+1),n=e.charCodeAt(t)),n===46&&we(e.charCodeAt(t+1))&&(t+=2,t=Ka(e,t)),tr(e,t,101)){let r=0;n=e.charCodeAt(t+1),(n===45||n===43)&&(r=1,n=e.charCodeAt(t+2)),we(n)&&(t=Ka(e,t+1+r+1))}return t}function Za(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n===41){t++;break}et(n,er(e,t+1))&&(t=fn(e,t))}return t}function Pl(e){if(e.length===1&&!Wt(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 Sf=["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 xi(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}var Sp=10,cv=12,Tp=13;function Ap(e){let t=e.source,n=t.length,r=t.length>0?Ef(t.charCodeAt(0)):0,o=xi(e.lines,n),i=xi(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===Sp||c===Tp||c===cv)&&(c===Tp&&l+1<n&&t.charCodeAt(l+1)===Sp&&(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 uv=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||Ap(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||Ap(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]}}}},We=16777215,Lt=24,dv=new Map([[2,22],[21,22],[19,20],[23,24]]),pv=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=xi(this.offsetAndType,e.length+1),o=xi(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&We;for(a=o[f],s=a>>Lt,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=dv.get(c),a=s<<Lt|i;break}r[i++]=c<<Lt|p,l===-1&&(l=u)}),r[i]=0<<Lt|n,o[i]=n,o[n]=n;a!==0;){let c=a&We;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]>>Lt:0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&We:this.source.length}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount?lo(this.source,this.offsetAndType[e-1]&We,this.offsetAndType[e]&We,t):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&We:this.offsetAndType[this.tokenCount]&We: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]&We,t=this.offsetAndType[t],this.tokenType=t>>Lt,this.tokenEnd=t&We):(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>>Lt,this.tokenEnd=e&We):(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]&We: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&We,s=o>>Lt;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:Sf[t],chunk:this.source.substring(n,r),balance:this.balance[o]}}),e}};function Ai(e,t){function n(p){return p<a?e.charCodeAt(p):0}function r(){if(c=Ti(e,c),gi(n(c),n(c+1),n(c+2))){u=12,c=ui(e,c);return}if(n(c)===37){u=11,c++;return}u=10}function o(){let p=c;if(c=ui(e,c),lo(e,p,c,"url")&&n(c)===40){if(c=ci(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(Ha(f)){case p:c++;return;case yi:if(vi(f)){c+=fl(e,c,f),u=6;return}break;case 92:if(c===e.length-1)break;let m=n(c+1);vi(m)?c+=fl(e,c+1,m):et(f,m)&&(c=fn(e,c)-1);break}}}function s(){for(u=7,c=ci(e,c);c<e.length;c++){let p=e.charCodeAt(c);switch(Ha(p)){case 41:c++;return;case yi:if(c=ci(e,c),n(c)===41||c>=e.length){c<e.length&&c++;return}c=Za(e,c),u=8;return;case 34:case 39:case 40:case _f:c=Za(e,c),u=8;return;case 92:if(et(p,n(c+1))){c=fn(e,c)-1;break}c=Za(e,c),u=8;return}}}e=String(e||"");let a=e.length,l=Ef(n(0)),c=l,u;for(;c<a;){let p=e.charCodeAt(c);switch(Ha(p)){case yi:u=13,c=ci(e,c+1);break;case 34:i();break;case 35:Ol(n(c+1))||et(n(c+1),n(c+2))?(u=4,c=ui(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:Ja(p,n(c+1),n(c+2))?r():(u=9,c++);break;case 44:u=18,c++;break;case 45:Ja(p,n(c+1),n(c+2))?r():n(c+1)===45&&n(c+2)===62?(u=15,c=c+3):gi(p,n(c+1),n(c+2))?o():(u=9,c++);break;case 46:Ja(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:gi(n(c+1),n(c+2),n(c+3))?(u=3,c=ui(e,c+1)):(u=9,c++);break;case 91:u=19,c++;break;case 92:et(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 Ff:r();break;case Il:o();break;default:u=9,c++}t(u,l,l=c)}}var Kn=null,he=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return he.createItem(e)}allocateCursor(e,t){let n;return Kn!==null?(n=Kn,Kn=Kn.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=Kn,Kn=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=he.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 he;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 he;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 he;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(he.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(he.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(he.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(he.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(he.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 Oi(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
- `)}})}var Ya=100,Op=60,Ip=" ";function Pp({source:e,line:t,column:n},r){function o(u,p){return i.slice(u,p).map((f,m)=>String(u+m+1).padStart(l)+" |"+f).join(`
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+=(Ip.length-1)*(i[t-1].substr(0,n-1).match(/\t/g)||[]).length,n>Ya&&(c=n-Op+3,n=Op-2);for(let u=s;u<=a;u++)u>=0&&u<i.length&&(i[u]=i[u].replace(/\t/g,Ip),i[u]=(c>0&&i[u].length>c?"\u2026":"")+i[u].substr(c,Ya-2)+(i[u].length>c+Ya-1?"\u2026":""));return[o(s,t),new Array(n+l+2).join("-")+"^",o(t,a)].filter(Boolean).join(`
47
- `)}function Rp(e,t,n,r,o){return Object.assign(Oi("SyntaxError",e),{source:t,offset:n,line:r,column:o,sourceFragment(i){return Pp({source:t,line:r,column:o},isNaN(i)?0:i)},get formattedMessage(){return`Parse error: ${e}
48
- `+Pp({source:t,line:r,column:o},2)}})}function fv(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 $p=()=>{},mv=33,hv=35,Xa=59,jp=123,Bp=0;function gv(e){return function(){return this[e]()}}function Qa(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 yv(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Qa(e.atrule),pseudo:Qa(e.pseudo),node:Qa(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]=gv(e.parseContext[n]);break}return{config:t,...t,...t.node}}function bv(e){let t="",n="<unknown>",r=!1,o=$p,i=!1,s=new uv,a=Object.assign(new pv,yv(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:fv,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(l){return l===jp?1:0},consumeUntilLeftCurlyBracketOrSemicolon(l){return l===jp||l===Xa?1:0},consumeUntilExclamationMarkOrSemicolon(l){return l===mv||l===Xa?1:0},consumeUntilSemicolonIncluded(l){return l===Xa?2:0},createList(){return new he},createSingleNodeList(l){return new he().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!==Bp);return Bp},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 tr(t,l,c)},cmpStr(l,c,u){return lo(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,Ti(t,this.tokenStart));return this.eat(l),c},eat(l){if(this.tokenType!==l){let c=Sf[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(hv)&&(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(lv(t,t.length-1)):s.getLocation(this.tokenStart);throw new Rp(l||"Unexpected input",t,u.offset,u.line,u.column)}});return Object.assign(function(l,c){t=l,c=c||{},a.setSource(t,Ai),s.setSource(t,c.offset,c.line,c.column),n=c.filename||"<unknown>",r=!!c.positions,o=typeof c.onParseError=="function"?c.onParseError:$p,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,g,k)=>{if(m===25){let C=a.getLocation(g,k),O=lo(t,k-2,k,"*/")?t.slice(g+2,k-2):t.slice(g+2,k);p(O,C)}});let f=a.context[u].call(a,c);return a.eof||a.error(),f},{SyntaxError:Rp,config:a.config})}var wv=Ck(Tk(),1),Np=new Set(["Atrule","Selector","Declaration"]);function Dv(e){let t=new wv.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&&Np.has(f.type)){let m=f.loc.start.line,g=f.loc.start.column-1;(r.line!==m||r.column!==g)&&(r.line=m,r.column=g,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&&Np.has(f.type)&&(o.line=s,o.column=a)};let u=e.emit;e.emit=function(f,m,g){for(let k=0;k<f.length;k++)f.charCodeAt(k)===10?(s++,a=0):a++;u(f,m,g)};let p=e.result;return e.result=function(){return l&&t.addMapping(i),{css:p(),map:t}},e}var ml={};B(ml,{safe:()=>Of,spec:()=>Cv});var kv=43,vv=45,el=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){let n=e.charCodeAt(0);return n>127?32768:n<<8}return e},Tf=[[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],["/","*"]],xv=Tf.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 Af(e){let t=new Set(e.map(([n,r])=>el(n)<<16|el(r)));return function(n,r,o){let i=el(r,o),s=o.charCodeAt(0);return(s===vv&&r!==1&&r!==2&&r!==15||s===kv?t.has(n<<16|s<<8):t.has(n<<16|i))&&this.emit(" ",13,!0),i}}var Cv=Af(Tf),Of=Af(xv),Ev=92;function Fv(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 _v(e){Ai(e,(t,n,r)=>{this.token(t,e.slice(n,r))})}function Sv(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:Of,token(l,c){i=this.tokenBefore(i,l,c),this.emit(c,l,!1),l===9&&c.charCodeAt(0)===Ev&&this.emit(`
49
- `,13,!0)},emit(l){o+=l},result(){return o}};r&&(typeof r.decorator=="function"&&(s=r.decorator(s)),r.sourceMap&&(s=Dv(s)),r.mode in ml&&(s.tokenBefore=ml[r.mode]));let a={node:l=>s.node(l),children:Fv,token:(l,c)=>s.token(l,c),tokenize:_v};return s.node(n),s.result()}}function Tv(e){return{fromPlainObject(t){return e(t,{enter(n){n.children&&!(n.children instanceof he)&&(n.children=new he().fromArray(n.children))}}),t},toPlainObject(t){return e(t,{leave(n){n.children&&n.children instanceof he&&(n.children=n.children.toArray())}}),t}}}var{hasOwnProperty:Rl}=Object.prototype,to=function(){};function Lp(e){return typeof e=="function"?e:to}function Mp(e,t){return function(n,r,o){n.type===t&&e.call(this,n,r,o)}}function Av(e,t){let n=t.structure,r=[];for(let o in n){if(Rl.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 Ov(e){let t={};for(let n in e.node)if(Rl.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]=Av(n,r)}return t}function Up(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 Wp({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 Iv(e){let t=Ov(e),n={},r={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let c in t)Rl.call(t,c)&&t[c]!==null&&(n[c]=Up(t[c],!1),r[c]=Up(t[c],!0));let s=Wp(n),a=Wp(r),l=function(c,u){function p(O,I,E){let x=f.call(C,O,I,E);return x===o?!0:x===i?!1:!!(g.hasOwnProperty(O.type)&&g[O.type](O,C,p,k)||m.call(C,O,I,E)===o)}let f=to,m=to,g=n,k=(O,I,E,x)=>O||p(I,E,x),C={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=Lp(u.enter),m=Lp(u.leave),u.reverse&&(g=r),u.visit)){if(s.hasOwnProperty(u.visit))g=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=Mp(f,u.visit),m=Mp(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,g){if(u.call(this,f,m,g))return p=f,o}),p},l.findLast=function(c,u){let p=null;return l(c,{reverse:!0,enter(f,m,g){if(u.call(this,f,m,g))return p=f,o}}),p},l.findAll=function(c,u){let p=[];return l(c,function(f,m,g){u.call(this,f,m,g)&&p.push(f)}),p},l}function Pv(e){return e}function Rv(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 $v(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 jv(e,t,n,r){let o=e.combinator===" "||r?e.combinator:" "+e.combinator+" ",i=e.terms.map(s=>$l(s,t,n,r)).join(o);return e.explicit||n?(r||i[0]===","?"[":"[ ")+i+(r?"]":" ]"):i}function $l(e,t,n,r){let o;switch(e.type){case"Group":o=jv(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return $l(e.term,t,n,r)+t(Rv(e),e);case"Type":o="<"+e.name+(e.opts?t($v(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 Ii(e,t){let n=Pv,r=!1,o=!1;return typeof t=="function"?n=t:t&&(r=!!t.forceBraces,o=!!t.compact,typeof t.decorate=="function"&&(n=t.decorate)),$l(e,n,r,o)}var zp={offset:0,line:1,column:1};function Bv(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=di(i||t,"end")||no(zp,c),p=no(u)):(u=di(i,"start")||no(di(t,"start")||zp,c.slice(0,s)),p=di(i,"end")||no(u,c.substr(s,a))),{css:c,mismatchOffset:s,mismatchLength:a,start:u,end:p}}function di(e,t){let n=e&&e.loc&&e.loc[t];return n?"line"in n?no(n):n:null}function no({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 eo=function(e,t){let n=Oi("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},Nv=function(e,t,n,r){let o=Oi("SyntaxMatchError",e),{css:i,mismatchOffset:s,mismatchLength:a,start:l,end:c}=Bv(r,n);return o.rawMessage=e,o.syntax=t?Ii(t):"<generic>",o.css=i,o.mismatchOffset=s,o.mismatchLength=a,o.message=e+`
44
+ in your project root.`),new g(a)}}function yf(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("|")}Ol();ht();te();var xk=Object.create,fc=Object.defineProperty,Ck=Object.getOwnPropertyDescriptor,Ek=Object.getOwnPropertyNames,Fk=Object.getPrototypeOf,Sk=Object.prototype.hasOwnProperty,Fr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$=(e,t)=>{for(var n in t)fc(e,n,{get:t[n],enumerable:!0})},_k=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ek(t))!Sk.call(e,o)&&o!==n&&fc(e,o,{get:()=>t[o],enumerable:!(r=Ck(t,o))||r.enumerable});return e},Ak=(e,t,n)=>(n=e!=null?xk(Fk(e)):{},_k(t||!e||!e.__esModule?fc(n,"default",{value:e,enumerable:!0}):n,e)),Tk=Fr(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}}),Ok=Fr(e=>{var t=Tk(),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}}),mc=Fr(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 R(y){return JSON.parse(y.replace(/^\)]}'[^\n]*\n/,""))}e.parseSourceMapInput=R;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}),Pk=Fr(e=>{var t=mc(),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}),Ik=Fr(e=>{var t=mc();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}),Rk=Fr(e=>{var t=Ok(),n=mc(),r=Pk().ArraySet,o=Ik().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}),jk={};$(jk,{AtKeyword:()=>Lk,BadString:()=>Uk,BadUrl:()=>Vk,CDC:()=>Yk,CDO:()=>Kk,Colon:()=>Xk,Comma:()=>e0,Comment:()=>a0,Delim:()=>Jk,Dimension:()=>Hk,EOF:()=>$k,Function:()=>Nk,Hash:()=>Mk,Ident:()=>Bk,LeftCurlyBracket:()=>i0,LeftParenthesis:()=>r0,LeftSquareBracket:()=>t0,Number:()=>qk,Percentage:()=>Gk,RightCurlyBracket:()=>s0,RightParenthesis:()=>o0,RightSquareBracket:()=>n0,Semicolon:()=>Qk,String:()=>Wk,Url:()=>zk,WhiteSpace:()=>Zk});var $k=0,Bk=1,Nk=2,Lk=3,Mk=4,Wk=5,Uk=6,zk=7,Vk=8,Jk=9,qk=10,Gk=11,Hk=12,Zk=13,Kk=14,Yk=15,Xk=16,Qk=17,e0=18,t0=19,n0=20,r0=21,o0=22,i0=23,s0=24,a0=25;function De(e){return e>=48&&e<=57}function nn(e){return De(e)||e>=65&&e<=70||e>=97&&e<=102}function gc(e){return e>=65&&e<=90}function l0(e){return e>=97&&e<=122}function c0(e){return gc(e)||l0(e)}function u0(e){return e>=128}function es(e){return c0(e)||u0(e)||e===95}function hc(e){return es(e)||De(e)||e===45}function d0(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 Pl(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 gm(e){return e===65279||e===65534?1:0}var Yl=new Array(128),p0=128,Ki=130,hm=131,yc=132,ym=133;for(let e=0;e<Yl.length;e++)Yl[e]=Tn(e)&&Ki||De(e)&&hm||es(e)&&yc||d0(e)&&ym||e||p0;function Il(e){return e<128?Yl[e]:yc}function kr(e,t){return t<e.length?e.charCodeAt(t):0}function Xl(e,t,n){return n===13&&kr(e,t+1)===10?2:1}function xr(e,t,n){let r=e.charCodeAt(t);return gc(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(gc(s)&&(s=s|32),s!==i)return!1}return!0}function f0(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 Rl(e,t){for(;t<e.length&&De(e.charCodeAt(t));t++);return t}function On(e,t){if(t+=2,nn(kr(e,t-1))){for(let r=Math.min(e.length,t+5);t<r&&nn(kr(e,t));t++);let n=kr(e,t);Tn(n)&&(t+=Xl(e,t,n))}return t}function zi(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!hc(n)){if(ct(n,kr(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=Rl(e,t+1),n=e.charCodeAt(t)),n===46&&De(e.charCodeAt(t+1))&&(t+=2,t=Rl(e,t)),xr(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=Rl(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,kr(e,t+1))&&(t=On(e,t))}return t}function wc(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 wm=["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 bf=10,m0=12,Df=13;function vf(e){let t=e.source,n=t.length,r=t.length>0?gm(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===bf||c===Df||c===m0)&&(c===Df&&l+1<n&&t.charCodeAt(l+1)===bf&&(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 g0=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||vf(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||vf(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,h0=new Map([[2,22],[21,22],[19,20],[23,24]]),y0=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=h0.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:wm[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(Il(f)){case p:c++;return;case Ki:if(ts(f)){c+=Xl(e,c,f),u=6;return}break;case 92:if(c===e.length-1)break;let m=n(c+1);ts(m)?c+=Xl(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(Il(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 ym: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=gm(n(0)),c=l,u;for(;c<a;){let p=e.charCodeAt(c);switch(Il(p)){case Ki:u=13,c=Ui(e,c+1);break;case 34:i();break;case 35:hc(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:Pl(p,n(c+1),n(c+2))?r():(u=9,c++);break;case 44:u=18,c++;break;case 45:Pl(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:Pl(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 hm:r();break;case yc:o();break;default:u=9,c++}t(u,l,l=c)}}var yr=null,he=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return he.createItem(e)}allocateCursor(e,t){let n;return yr!==null?(n=yr,yr=yr.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=yr,yr=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=he.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 he;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 he;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 he;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(he.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(he.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(he.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(he.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(he.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
+ `)}})}var $l=100,kf=60,xf=" ";function Cf({source:e,line:t,column:n},r){function o(u,p){return i.slice(u,p).map((f,m)=>String(u+m+1).padStart(l)+" |"+f).join(`
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+=(xf.length-1)*(i[t-1].substr(0,n-1).match(/\t/g)||[]).length,n>$l&&(c=n-kf+3,n=kf-2);for(let u=s;u<=a;u++)u>=0&&u<i.length&&(i[u]=i[u].replace(/\t/g,xf),i[u]=(c>0&&i[u].length>c?"\u2026":"")+i[u].substr(c,$l-2)+(i[u].length>c+$l-1?"\u2026":""));return[o(s,t),new Array(n+l+2).join("-")+"^",o(t,a)].filter(Boolean).join(`
47
+ `)}function Ef(e,t,n,r,o){return Object.assign(us("SyntaxError",e),{source:t,offset:n,line:r,column:o,sourceFragment(i){return Cf({source:t,line:r,column:o},isNaN(i)?0:i)},get formattedMessage(){return`Parse error: ${e}
48
+ `+Cf({source:t,line:r,column:o},2)}})}function w0(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 Ff=()=>{},b0=33,D0=35,Bl=59,Sf=123,_f=0;function v0(e){return function(){return this[e]()}}function Nl(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 k0(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Nl(e.atrule),pseudo:Nl(e.pseudo),node:Nl(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]=v0(e.parseContext[n]);break}return{config:t,...t,...t.node}}function x0(e){let t="",n="<unknown>",r=!1,o=Ff,i=!1,s=new g0,a=Object.assign(new y0,k0(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:w0,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(l){return l===Sf?1:0},consumeUntilLeftCurlyBracketOrSemicolon(l){return l===Sf||l===Bl?1:0},consumeUntilExclamationMarkOrSemicolon(l){return l===b0||l===Bl?1:0},consumeUntilSemicolonIncluded(l){return l===Bl?2:0},createList(){return new he},createSingleNodeList(l){return new he().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!==_f);return _f},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 xr(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=wm[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(D0)&&(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(f0(t,t.length-1)):s.getLocation(this.tokenStart);throw new Ef(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:Ff,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:Ef,config:a.config})}var C0=Ak(Rk(),1),Af=new Set(["Atrule","Selector","Declaration"]);function E0(e){let t=new C0.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&&Af.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&&Af.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 Ql={};$(Ql,{safe:()=>vm,spec:()=>A0});var F0=43,S0=45,Ll=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){let n=e.charCodeAt(0);return n>127?32768:n<<8}return e},bm=[[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],["/","*"]],_0=bm.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 Dm(e){let t=new Set(e.map(([n,r])=>Ll(n)<<16|Ll(r)));return function(n,r,o){let i=Ll(r,o),s=o.charCodeAt(0);return(s===S0&&r!==1&&r!==2&&r!==15||s===F0?t.has(n<<16|s<<8):t.has(n<<16|i))&&this.emit(" ",13,!0),i}}var A0=Dm(bm),vm=Dm(_0),T0=92;function O0(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 P0(e){cs(e,(t,n,r)=>{this.token(t,e.slice(n,r))})}function I0(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:vm,token(l,c){i=this.tokenBefore(i,l,c),this.emit(c,l,!1),l===9&&c.charCodeAt(0)===T0&&this.emit(`
49
+ `,13,!0)},emit(l){o+=l},result(){return o}};r&&(typeof r.decorator=="function"&&(s=r.decorator(s)),r.sourceMap&&(s=E0(s)),r.mode in Ql&&(s.tokenBefore=Ql[r.mode]));let a={node:l=>s.node(l),children:O0,token:(l,c)=>s.token(l,c),tokenize:P0};return s.node(n),s.result()}}function R0(e){return{fromPlainObject(t){return e(t,{enter(n){n.children&&!(n.children instanceof he)&&(n.children=new he().fromArray(n.children))}}),t},toPlainObject(t){return e(t,{leave(n){n.children&&n.children instanceof he&&(n.children=n.children.toArray())}}),t}}}var{hasOwnProperty:bc}=Object.prototype,To=function(){};function Tf(e){return typeof e=="function"?e:To}function Of(e,t){return function(n,r,o){n.type===t&&e.call(this,n,r,o)}}function j0(e,t){let n=t.structure,r=[];for(let o in n){if(bc.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 $0(e){let t={};for(let n in e.node)if(bc.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]=j0(n,r)}return t}function Pf(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 If({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 B0(e){let t=$0(e),n={},r={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let c in t)bc.call(t,c)&&t[c]!==null&&(n[c]=Pf(t[c],!1),r[c]=Pf(t[c],!0));let s=If(n),a=If(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=Tf(u.enter),m=Tf(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=Of(f,u.visit),m=Of(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 N0(e){return e}function L0(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 M0(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 W0(e,t,n,r){let o=e.combinator===" "||r?e.combinator:" "+e.combinator+" ",i=e.terms.map(s=>Dc(s,t,n,r)).join(o);return e.explicit||n?(r||i[0]===","?"[":"[ ")+i+(r?"]":" ]"):i}function Dc(e,t,n,r){let o;switch(e.type){case"Group":o=W0(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return Dc(e.term,t,n,r)+t(L0(e),e);case"Type":o="<"+e.name+(e.opts?t(M0(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=N0,r=!1,o=!1;return typeof t=="function"?n=t:t&&(r=!!t.forceBraces,o=!!t.compact,typeof t.decorate=="function"&&(n=t.decorate)),Dc(e,n,r,o)}var Rf={offset:0,line:1,column:1};function U0(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(Rf,c),p=Oo(u)):(u=Vi(i,"start")||Oo(Vi(t,"start")||Rf,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},z0=function(e,t,n,r){let o=us("SyntaxMatchError",e),{css:i,mismatchOffset:s,mismatchLength:a,start:l,end:c}=U0(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
50
  syntax: `+o.syntax+`
51
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},pi=new Map,Zn=new Map,Ci=45,tl=Lv,Vp=Mv;function jl(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Ci&&e.charCodeAt(t+1)===Ci}function If(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Ci&&e.charCodeAt(t+1)!==Ci){let n=e.indexOf("-",t+2);if(n!==-1)return e.substring(t,n+1)}return""}function Lv(e){if(pi.has(e))return pi.get(e);let t=e.toLowerCase(),n=pi.get(t);if(n===void 0){let r=jl(t,0),o=r?"":If(t,0);n=Object.freeze({basename:t.substr(o.length),name:t,prefix:o,vendor:o,custom:r})}return pi.set(e,n),n}function Mv(e){if(Zn.has(e))return Zn.get(e);let t=e,n=e[0];n==="/"?n=e[1]==="/"?"//":"/":n!=="_"&&n!=="*"&&n!=="$"&&n!=="#"&&n!=="+"&&n!=="&"&&(n="");let r=jl(t,n.length);if(!r&&(t=t.toLowerCase(),Zn.has(t))){let a=Zn.get(t);return Zn.set(e,a),a}let o=r?"":If(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 Zn.set(e,s),s}var Pf=["initial","inherit","unset","revert","revert-layer"],co=43,lt=45,nl=110,Yn=!0,Uv=!1;function hl(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function so(e,t,n){for(;e!==null&&(e.type===13||e.type===25);)e=n(++t);return t}function Ut(e,t,n,r){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===co||o===lt){if(n)return 0;t++}for(;t<e.value.length;t++)if(!we(e.value.charCodeAt(t)))return 0;return r+1}function rl(e,t,n){let r=!1,o=so(e,t,n);if(e=n(o),e===null)return t;if(e.type!==10)if(hl(e,co)||hl(e,lt)){if(r=!0,o=so(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!==co&&i!==lt)return 0}return Ut(e,r?0:1,r,o)}function Wv(e,t){let n=0;if(!e)return 0;if(e.type===10)return Ut(e,0,Uv,n);if(e.type===1&&e.value.charCodeAt(0)===lt){if(!tr(e.value,1,nl))return 0;switch(e.value.length){case 2:return rl(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==lt?0:(n=so(t(++n),n,t),e=t(n),Ut(e,0,Yn,n));default:return e.value.charCodeAt(2)!==lt?0:Ut(e,3,Yn,n)}}else if(e.type===1||hl(e,co)&&t(n+1).type===1){if(e.type!==1&&(e=t(++n)),e===null||!tr(e.value,0,nl))return 0;switch(e.value.length){case 1:return rl(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==lt?0:(n=so(t(++n),n,t),e=t(n),Ut(e,0,Yn,n));default:return e.value.charCodeAt(1)!==lt?0:Ut(e,2,Yn,n)}}else if(e.type===12){let r=e.value.charCodeAt(0),o=r===co||r===lt?1:0,i=o;for(;i<e.value.length&&we(e.value.charCodeAt(i));i++);return i===o||!tr(e.value,i,nl)?0:i+1===e.value.length?rl(t(++n),n,t):e.value.charCodeAt(i+1)!==lt?0:i+2===e.value.length?(n=so(t(++n),n,t),e=t(n),Ut(e,0,Yn,n)):Ut(e,i+2,Yn,n)}return 0}var zv=43,Rf=45,$f=63,Vv=117;function gl(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function Gv(e,t){return e.value.charCodeAt(0)===t}function ro(e,t,n){let r=0;for(let o=t;o<e.value.length;o++){let i=e.value.charCodeAt(o);if(i===Rf&&n&&r!==0)return ro(e,t+r+1,!1),6;if(!Wt(i)||++r>6)return 0}return r}function fi(e,t,n){if(!e)return 0;for(;gl(n(t),$f);){if(++e>6)return 0;t++}return t}function qv(e,t){let n=0;if(e===null||e.type!==1||!tr(e.value,0,Vv)||(e=t(++n),e===null))return 0;if(gl(e,zv))return e=t(++n),e===null?0:e.type===1?fi(ro(e,0,!0),++n,t):gl(e,$f)?fi(1,++n,t):0;if(e.type===10){let r=ro(e,1,!0);return r===0?0:(e=t(++n),e===null?n:e.type===12||e.type===10?!Gv(e,Rf)||!ro(e,1,!1)?0:n+1:fi(r,n,t))}return e.type===12?fi(ro(e,1,!0),++n,t):0}var Jv=["calc(","-moz-calc(","-webkit-calc("],Bl=new Map([[2,22],[21,22],[19,20],[23,24]]);function tt(e,t){return t<e.length?e.charCodeAt(t):0}function jf(e,t){return lo(e,0,e.length,t)}function Bf(e,t){for(let n=0;n<t.length;n++)if(jf(e,t[n]))return!0;return!1}function Nf(e,t){return t!==e.length-2?!1:tt(e,t)===92&&we(tt(e,t+1))}function Pi(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 Hv(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=Bl.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&&Bf(t.value,Jv)?Hv(t,n):e(t,n,r)}}function ae(e){return function(t){return t===null||t.type!==e?0:1}}function Kv(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return Bf(t,Pf)||jf(t,"default")?0:1}function Zv(e){return e===null||e.type!==1||tt(e.value,0)!==45||tt(e.value,1)!==45?0:1}function Yv(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(!Wt(tt(e.value,n)))return 0;return 1}function Xv(e){return e===null||e.type!==4||!gi(tt(e.value,1),tt(e.value,2),tt(e.value,3))?0:1}function Qv(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=Bl.get(e.type);break}o++}while(e=t(o));return o}function e0(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=Bl.get(e.type);break}o++}while(e=t(o));return o}function kt(e){return e&&(e=new Set(e)),function(t,n,r){if(t===null||t.type!==12)return 0;let o=Ti(t.value,0);if(e!==null){let i=t.value.indexOf("\\",o),s=i===-1||!Nf(t.value,i)?t.value.substr(o):t.value.substring(o,i);if(e.has(s.toLowerCase())===!1)return 0}return Pi(r,t.value,o)?0:1}}function t0(e,t,n){return e===null||e.type!==11||Pi(n,e.value,e.value.length-1)?0:1}function Lf(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 n0(e,t,n){if(e===null)return 0;let r=Ti(e.value,0);return r!==e.value.length&&!Nf(e.value,r)||Pi(n,e.value,r)?0:1}function r0(e,t,n){if(e===null||e.type!==10)return 0;let r=tt(e.value,0)===43||tt(e.value,0)===45?1:0;for(;r<e.value.length;r++)if(!we(tt(e.value,r)))return 0;return Pi(n,e.value,r)?0:1}var o0={"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)},i0={string:ae(5),ident:ae(1),percentage:ze(t0),zero:Lf(),number:ze(n0),integer:ze(r0),"custom-ident":Kv,"custom-property-name":Zv,"hex-color":Yv,"id-selector":Xv,"an-plus-b":Wv,urange:qv,"declaration-value":Qv,"any-value":e0};function s0(e){let{angle:t,decibel:n,frequency:r,flex:o,length:i,resolution:s,semitones:a,time:l}=e||{};return{dimension:ze(kt(null)),angle:ze(kt(t)),decibel:ze(kt(n)),frequency:ze(kt(r)),flex:ze(kt(o)),length:ze(Lf(kt(i))),resolution:ze(kt(s)),semitones:ze(kt(a)),time:ze(kt(l))}}function a0(e){return{...o0,...i0,...s0(e)}}var yl={};B(yl,{angle:()=>c0,decibel:()=>m0,flex:()=>f0,frequency:()=>d0,length:()=>l0,resolution:()=>p0,semitones:()=>h0,time:()=>u0});var l0=["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"],c0=["deg","grad","rad","turn"],u0=["s","ms"],d0=["hz","khz"],p0=["dpi","dpcm","dppx","x"],f0=["fr"],m0=["db"],h0=["st"],g0={};B(g0,{SyntaxError:()=>Mf,generate:()=>Ii,parse:()=>zl,walk:()=>qf});function Mf(e,t,n){return Object.assign(Oi("SyntaxError",e),{input:t,offset:n,rawMessage:e,message:e+`
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,wr=new Map,rs=45,Ml=V0,jf=J0;function vc(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===rs&&e.charCodeAt(t+1)===rs}function km(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 V0(e){if(Ji.has(e))return Ji.get(e);let t=e.toLowerCase(),n=Ji.get(t);if(n===void 0){let r=vc(t,0),o=r?"":km(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 J0(e){if(wr.has(e))return wr.get(e);let t=e,n=e[0];n==="/"?n=e[1]==="/"?"//":"/":n!=="_"&&n!=="*"&&n!=="$"&&n!=="#"&&n!=="+"&&n!=="&"&&(n="");let r=vc(t,n.length);if(!r&&(t=t.toLowerCase(),wr.has(t))){let a=wr.get(t);return wr.set(e,a),a}let o=r?"":km(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 wr.set(e,s),s}var xm=["initial","inherit","unset","revert","revert-layer"],No=43,bt=45,Wl=110,br=!0,q0=!1;function ec(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function jo(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 Ul(e,t,n){let r=!1,o=jo(e,t,n);if(e=n(o),e===null)return t;if(e.type!==10)if(ec(e,No)||ec(e,bt)){if(r=!0,o=jo(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 G0(e,t){let n=0;if(!e)return 0;if(e.type===10)return tn(e,0,q0,n);if(e.type===1&&e.value.charCodeAt(0)===bt){if(!xr(e.value,1,Wl))return 0;switch(e.value.length){case 2:return Ul(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==bt?0:(n=jo(t(++n),n,t),e=t(n),tn(e,0,br,n));default:return e.value.charCodeAt(2)!==bt?0:tn(e,3,br,n)}}else if(e.type===1||ec(e,No)&&t(n+1).type===1){if(e.type!==1&&(e=t(++n)),e===null||!xr(e.value,0,Wl))return 0;switch(e.value.length){case 1:return Ul(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==bt?0:(n=jo(t(++n),n,t),e=t(n),tn(e,0,br,n));default:return e.value.charCodeAt(1)!==bt?0:tn(e,2,br,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||!xr(e.value,i,Wl)?0:i+1===e.value.length?Ul(t(++n),n,t):e.value.charCodeAt(i+1)!==bt?0:i+2===e.value.length?(n=jo(t(++n),n,t),e=t(n),tn(e,0,br,n)):tn(e,i+2,br,n)}return 0}var H0=43,Cm=45,Em=63,Z0=117;function tc(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function K0(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===Cm&&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(;tc(n(t),Em);){if(++e>6)return 0;t++}return t}function Y0(e,t){let n=0;if(e===null||e.type!==1||!xr(e.value,0,Z0)||(e=t(++n),e===null))return 0;if(tc(e,H0))return e=t(++n),e===null?0:e.type===1?qi(Po(e,0,!0),++n,t):tc(e,Em)?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?!K0(e,Cm)||!Po(e,1,!1)?0:n+1:qi(r,n,t))}return e.type===12?qi(Po(e,1,!0),++n,t):0}var X0=["calc(","-moz-calc(","-webkit-calc("],kc=new Map([[2,22],[21,22],[19,20],[23,24]]);function ut(e,t){return t<e.length?e.charCodeAt(t):0}function Fm(e,t){return Bo(e,0,e.length,t)}function Sm(e,t){for(let n=0;n<t.length;n++)if(Fm(e,t[n]))return!0;return!1}function _m(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 Q0(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=kc.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&&Sm(t.value,X0)?Q0(t,n):e(t,n,r)}}function ae(e){return function(t){return t===null||t.type!==e?0:1}}function ex(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return Sm(t,xm)||Fm(t,"default")?0:1}function tx(e){return e===null||e.type!==1||ut(e.value,0)!==45||ut(e.value,1)!==45?0:1}function nx(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 rx(e){return e===null||e.type!==4||!Zi(ut(e.value,1),ut(e.value,2),ut(e.value,3))?0:1}function ox(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=kc.get(e.type);break}o++}while(e=t(o));return o}function ix(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=kc.get(e.type);break}o++}while(e=t(o));return o}function Rt(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||!_m(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 sx(e,t,n){return e===null||e.type!==11||ps(n,e.value,e.value.length-1)?0:1}function Am(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 ax(e,t,n){if(e===null)return 0;let r=ls(e.value,0);return r!==e.value.length&&!_m(e.value,r)||ps(n,e.value,r)?0:1}function lx(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 cx={"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)},ux={string:ae(5),ident:ae(1),percentage:Ze(sx),zero:Am(),number:Ze(ax),integer:Ze(lx),"custom-ident":ex,"custom-property-name":tx,"hex-color":nx,"id-selector":rx,"an-plus-b":G0,urange:Y0,"declaration-value":ox,"any-value":ix};function dx(e){let{angle:t,decibel:n,frequency:r,flex:o,length:i,resolution:s,semitones:a,time:l}=e||{};return{dimension:Ze(Rt(null)),angle:Ze(Rt(t)),decibel:Ze(Rt(n)),frequency:Ze(Rt(r)),flex:Ze(Rt(o)),length:Ze(Am(Rt(i))),resolution:Ze(Rt(s)),semitones:Ze(Rt(a)),time:Ze(Rt(l))}}function px(e){return{...cx,...ux,...dx(e)}}var nc={};$(nc,{angle:()=>mx,decibel:()=>bx,flex:()=>wx,frequency:()=>hx,length:()=>fx,resolution:()=>yx,semitones:()=>Dx,time:()=>gx});var fx=["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"],mx=["deg","grad","rad","turn"],gx=["s","ms"],hx=["hz","khz"],yx=["dpi","dpcm","dppx","x"],wx=["fr"],bx=["db"],Dx=["st"],vx={};$(vx,{SyntaxError:()=>Tm,generate:()=>ds,parse:()=>_c,walk:()=>$m});function Tm(e,t,n){return Object.assign(us("SyntaxError",e),{input:t,offset:n,rawMessage:e,message:e+`
53
53
  `+t+`
54
- --`+new Array((n||t.length)+1).join("-")+"^"})}var y0=9,b0=10,w0=12,D0=13,k0=32,v0=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!==D0&&t!==b0&&t!==w0&&t!==k0&&t!==y0)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 Mf(e,this.str,this.pos)}},x0=9,C0=10,E0=12,F0=13,_0=32,Uf=33,Nl=35,Gp=38,Ei=39,Wf=40,S0=41,zf=42,Ll=43,Ml=44,qp=45,Ul=60,Vf=62,bl=63,T0=64,Ri=91,Wl=93,Fi=123,Jp=124,Hp=125,Kp=8734,uo=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),Zp={" ":1,"&&":2,"||":3,"|":4};function _i(e){return e.substringToPos(e.findWsEnd(e.pos))}function nr(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n>=128||uo[n]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Si(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 A0(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 Yp(e){let t=null,n=null;return e.eat(Fi),t=Si(e),e.charCode()===Ml?(e.pos++,e.charCode()!==Hp&&(n=Si(e))):n=t,e.eat(Hp),{min:Number(t),max:n?Number(n):0}}function O0(e){let t=null,n=!1;switch(e.charCode()){case zf:e.pos++,t={min:0,max:0};break;case Ll:e.pos++,t={min:1,max:0};break;case bl:e.pos++,t={min:0,max:1};break;case Nl:e.pos++,n=!0,e.charCode()===Fi?t=Yp(e):e.charCode()===bl?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case Fi:t=Yp(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}function rr(e,t){let n=O0(e);return n!==null?(n.term=t,e.charCode()===Nl&&e.charCodeAt(e.pos-1)===Ll?rr(e,n):n):t}function ol(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function I0(e){let t;return e.eat(Ul),e.eat(Ei),t=nr(e),e.eat(Ei),e.eat(Vf),rr(e,{type:"Property",name:t})}function P0(e){let t=null,n=null,r=1;return e.eat(Ri),e.charCode()===qp&&(e.peek(),r=-1),r==-1&&e.charCode()===Kp?e.peek():(t=r*Number(Si(e)),uo[e.charCode()]!==0&&(t+=nr(e))),_i(e),e.eat(Ml),_i(e),e.charCode()===Kp?e.peek():(r=1,e.charCode()===qp&&(e.peek(),r=-1),n=r*Number(Si(e)),uo[e.charCode()]!==0&&(n+=nr(e))),e.eat(Wl),{type:"Range",min:t,max:n}}function R0(e){let t,n=null;return e.eat(Ul),t=nr(e),e.charCode()===Wf&&e.nextCharCode()===S0&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===Ri&&(_i(e),n=P0(e)),e.eat(Vf),rr(e,{type:"Type",name:t,opts:n})}function $0(e){let t=nr(e);return e.charCode()===Wf?(e.pos++,{type:"Function",name:t}):rr(e,{type:"Keyword",name:t})}function j0(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)=>Zp[o]-Zp[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 Gf(e){let t=[],n={},r,o=null,i=e.pos;for(;r=N0(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:j0(t,n)||" ",disallowEmpty:!1,explicit:!1}}function B0(e){let t;return e.eat(Ri),t=Gf(e),e.eat(Wl),t.explicit=!0,e.charCode()===Uf&&(e.pos++,t.disallowEmpty=!0),t}function N0(e){let t=e.charCode();if(t<128&&uo[t]===1)return $0(e);switch(t){case Wl:break;case Ri:return rr(e,B0(e));case Ul:return e.nextCharCode()===Ei?I0(e):R0(e);case Jp:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===Jp?2:1))};case Gp:return e.pos++,e.eat(Gp),{type:"Combinator",value:"&&"};case Ml:return e.pos++,{type:"Comma"};case Ei:return rr(e,{type:"String",value:A0(e)});case _0:case x0:case C0:case F0:case E0:return{type:"Spaces",value:_i(e)};case T0:return t=e.nextCharCode(),t<128&&uo[t]===1?(e.pos++,{type:"AtKeyword",name:nr(e)}):ol(e);case zf:case Ll:case bl:case Nl:case Uf:break;case Fi:if(t=e.nextCharCode(),t<48||t>57)return ol(e);break;default:return ol(e)}}function zl(e){let t=new v0(e),n=Gf(t);return t.pos!==e.length&&t.error("Unexpected input"),n.terms.length===1&&n.terms[0].type==="Group"?n.terms[0]:n}var oo=function(){};function Xp(e){return typeof e=="function"?e:oo}function qf(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=oo,i=oo;if(typeof t=="function"?o=t:t&&(o=Xp(t.enter),i=Xp(t.leave)),o===oo&&i===oo)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");r(e,n)}var L0={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 M0(e){let t=[];return Ai(e,(n,r,o)=>t.push({type:n,value:e.slice(r,o),node:null})),t}function U0(e,t){return typeof e=="string"?M0(e):t.generate(e,L0)}var ne={type:"Match"},ie={type:"Mismatch"},Vl={type:"DisallowEmpty"},W0=40,z0=41;function xe(e,t,n){return t===ne&&n===ie||e===ne&&t===ne&&n===ne?e:(e.type==="If"&&e.else===ie&&t===ne&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function Jf(e){return e.length>2&&e.charCodeAt(e.length-2)===W0&&e.charCodeAt(e.length-1)===z0}function Qp(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&Jf(e.name)}function wl(e,t,n){switch(e){case" ":{let r=ne;for(let o=t.length-1;o>=0;o--){let i=t[o];r=xe(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(Qp(s)&&(o===null&&i>0&&Qp(t[i-1])&&(o=Object.create(null),r=xe({type:"Enum",map:o},ne,r)),o!==null)){let a=(Jf(s.name)?s.name.slice(0,-1):s.name).toLowerCase();if(!(a in o)){o[a]=s;continue}}o=null,r=xe(s,ne,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=wl(e,t.filter(function(a){return a!==i}),!1):s=ne,r=xe(i,s,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?ne:ie;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=wl(e,t.filter(function(a){return a!==i}),!0):s=ne,r=xe(i,s,r)}return r}}}function V0(e){let t=ne,n=Gl(e.term);if(e.max===0)n=xe(n,Vl,ie),t=xe(n,null,ie),t.then=xe(ne,ne,t),e.comma&&(t.then.else=xe({type:"Comma",syntax:e},t,ie));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==ne&&(t=xe({type:"Comma",syntax:e},t,ie)),t=xe(n,xe(ne,ne,t),ie);if(e.min===0)t=xe(ne,ne,t);else for(let r=0;r<e.min-1;r++)e.comma&&t!==ne&&(t=xe({type:"Comma",syntax:e},t,ie)),t=xe(n,t,ie);return t}function Gl(e){if(typeof e=="function")return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=wl(e.combinator,e.terms.map(Gl),!1);return e.disallowEmpty&&(t=xe(t,Vl,ie)),t}case"Multiplier":return V0(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 Dl(e,t){return typeof e=="string"&&(e=zl(e)),{type:"MatchGraph",match:Gl(e),syntax:t||null,source:e}}var{hasOwnProperty:ef}=Object.prototype,G0=0,q0=1,kl=2,Hf=3,tf="Match",J0="Mismatch",H0="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",nf=15e3,K0=0;function Z0(e){let t=null,n=null,r=e;for(;r!==null;)n=r.prev,r.prev=t,t=r,r=n;return t}function il(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 Y0(e){return e.type!==9?!1:e.value!=="?"}function rf(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||Y0(e)}function of(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function X0(e,t,n){function r(){do I++,O=I<e.length?e[I]:null;while(O!==null&&(O.type===13||O.type===25))}function o(V){let R=I+V;return R<e.length?e[R]:null}function i(V,R){return{nextState:V,matchStack:x,syntaxStack:p,thenStack:f,tokenIndex:I,prev:R}}function s(V){f={nextState:V,matchStack:x,syntaxStack:p,prev:f}}function a(V){m=i(V,m)}function l(){x={type:q0,syntax:t.syntax,token:O,prev:x},r(),g=null,I>E&&(E=I)}function c(){p={syntax:t.syntax,opts:t.syntax.opts||p!==null&&p.opts||null,prev:p},x={type:kl,syntax:t.syntax,token:x.token,prev:x}}function u(){x.type===kl?x=x.prev:x={type:Hf,syntax:p.syntax,token:x.token,prev:x},p=p.prev}let p=null,f=null,m=null,g=null,k=0,C=null,O=null,I=-1,E=0,x={type:G0,syntax:null,token:null,prev:null};for(r();C===null&&++k<nf;)switch(t.type){case"Match":if(f===null){if(O!==null&&(I!==e.length-1||O.value!=="\\0"&&O.value!=="\\9")){t=ie;break}C=tf;break}if(t=f.nextState,t===Vl)if(f.matchStack===x){t=ie;break}else t=ne;for(;f.syntaxStack!==p;)u();f=f.prev;break;case"Mismatch":if(g!==null&&g!==!1)(m===null||I>m.tokenIndex)&&(m=g,g=!1);else if(m===null){C=J0;break}t=m.nextState,f=m.thenStack,p=m.syntaxStack,x=m.matchStack,I=m.tokenIndex,O=I<e.length?e[I]:null,m=m.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==ie&&a(t.else),t.then!==ne&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let _=t.syntax.terms;if(t.index===_.length){if(t.mask===0||t.syntax.all){t=ie;break}t=ne;break}if(t.mask===(1<<_.length)-1){t=ne;break}for(;t.index<_.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=_[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(O!==null){let _=O.value.toLowerCase();if(_.indexOf("\\")!==-1&&(_=_.replace(/\\[09].*$/,"")),ef.call(t.map,_)){t=t.map[_];break}}t=ie;break;case"Generic":{let _=p!==null?p.opts:null,y=I+Math.floor(t.fn(O,o,_));if(!isNaN(y)&&y>I){for(;I<y;)l();t=ne}else t=ie;break}case"Type":case"Property":{let _=t.type==="Type"?"types":"properties",y=ef.call(n,_)?n[_][t.name]:null;if(!y||!y.match)throw new Error("Bad syntax reference: "+(t.type==="Type"?"<"+t.name+">":"<'"+t.name+"'>"));if(g!==!1&&O!==null&&t.type==="Type"&&(t.name==="custom-ident"&&O.type===1||t.name==="length"&&O.value==="0")){g===null&&(g=i(t,m)),t=ie;break}c(),t=y.match;break}case"Keyword":{let _=t.name;if(O!==null){let y=O.value;if(y.indexOf("\\")!==-1&&(y=y.replace(/\\[09].*$/,"")),il(y,_)){l(),t=ne;break}}t=ie;break}case"AtKeyword":case"Function":if(O!==null&&il(O.value,t.name)){l(),t=ne;break}t=ie;break;case"Token":if(O!==null&&O.value===t.value){l(),t=ne;break}t=ie;break;case"Comma":O!==null&&O.type===18?rf(x.token)?t=ie:(l(),t=of(O)?ie:ne):t=rf(x.token)||of(O)?ne:ie;break;case"String":let V="",R=I;for(;R<e.length&&V.length<t.value.length;R++)V+=e[R].value;if(il(V,t.value)){for(;I<R;)l();t=ne}else t=ie;break;default:throw new Error("Unknown node type: "+t.type)}switch(K0+=k,C){case null:console.warn("[csstree-match] BREAK after "+nf+" iterations"),C=H0,x=null;break;case tf:for(;p!==null;)u();break;default:x=null}return{tokens:e,reason:C,iterations:k,match:x,longestMatch:E}}function sf(e,t,n){let r=X0(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=Z0(o).prev;o!==null;){switch(o.type){case kl:i.match.push(i={syntax:o.syntax,match:[]}),s.push(i);break;case Hf: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 Kf={};B(Kf,{getTrace:()=>Zf,isKeyword:()=>tx,isProperty:()=>ex,isType:()=>Q0});function Zf(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 Q0(e,t){return ql(this,e,n=>n.type==="Type"&&n.name===t)}function ex(e,t){return ql(this,e,n=>n.type==="Property"&&n.name===t)}function tx(e){return ql(this,e,t=>t.type==="Keyword")}function ql(e,t,n){let r=Zf.call(e,t);return r===null?!1:r.some(n)}function Yf(e){return"node"in e?e.node:Yf(e.match[0])}function Xf(e){return"node"in e?e.node:Xf(e.match[e.match.length-1])}function af(e,t,n,r,o){function i(a){if(a.syntax!==null&&a.syntax.type===r&&a.syntax.name===o){let l=Yf(a),c=Xf(a);e.syntax.walk(t,function(u,p,f){if(u===l){let m=new he;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:ao}=Object.prototype;function sl(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function lf(e){return!!e&&sl(e.offset)&&sl(e.line)&&sl(e.column)}function nx(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(ao.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(!lf(n.loc.start))o+=".start";else if(!lf(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 he)}}}else r(n,"Unknown field `"+o+"` for "+e+" node type");i||r(n,"Bad value for `"+e+"."+o+"`")}}for(let o in t)ao.call(t,o)&&ao.call(n,o)===!1&&r(n,"Field `"+e+"."+o+"` is missed")}}function rx(e,t){let n=t.structure,r={type:String,loc:!0},o={type:'"'+e+'"'};for(let i in n){if(ao.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:nx(e,r)}}function ox(e){let t={};if(e.node){for(let n in e.node)if(ao.call(e.node,n)){let r=e.node[n];if(r.structure)t[n]=rx(n,r);else throw new Error("Missed `structure` field in `"+n+"` node type definition")}}return t}var ix=Dl(Pf.join(" | "));function vl(e,t,n){let r={};for(let o in e)e[o].syntax&&(r[o]=n?e[o].syntax:Ii(e[o].syntax,{compact:t}));return r}function sx(e,t,n){let r={};for(let[o,i]of Object.entries(e))r[o]={prelude:i.prelude&&(n?i.prelude.syntax:Ii(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&vl(i.descriptors,t,n)};return r}function ax(e){for(let t=0;t<e.length;t++)if(e[t].value.toLowerCase()==="var(")return!0;return!1}function Qe(e,t,n){return{matched:e,iterations:n,error:t,...Kf}}function Xn(e,t,n,r){let o=U0(n,e.syntax),i;return ax(o)?Qe(null,new Error("Matching for a tree with var() is not supported")):(r&&(i=sf(o,e.cssWideKeywordsSyntax,e)),(!r||!i.match)&&(i=sf(o,t.match,e),!i.match)?Qe(null,new Nv(i.reason,t.syntax,n,i),i.iterations):Qe(i.match,null,i.iterations))}var cf=class{constructor(e,t,n){if(this.cssWideKeywordsSyntax=ix,this.syntax=t,this.generic=!1,this.units={...yl},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=n||ox(e),e){if(e.units)for(let r of Object.keys(yl))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(a0(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=Dl(e,o):(typeof e=="string"?Object.defineProperty(i,"syntax",{get(){return Object.defineProperty(i,"syntax",{value:zl(e)}),i.syntax}}):i.syntax=e,Object.defineProperty(i,"match",{get(){return Object.defineProperty(i,"match",{value:Dl(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 eo("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&&!Xn(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=tl(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 eo("Unknown at-rule descriptor",t)}checkPropertyName(e){if(!this.getProperty(e))return new eo("Unknown property",e)}matchAtrulePrelude(e,t){let n=this.checkAtrulePrelude(e,t);if(n)return Qe(null,n);let r=this.getAtrule(e);return r.prelude?Xn(this,r.prelude,t||"",!1):Qe(null,null)}matchAtruleDescriptor(e,t,n){let r=this.checkAtruleDescriptorName(e,t);if(r)return Qe(null,r);let o=this.getAtrule(e),i=tl(t);return Xn(this,o.descriptors[i.name]||o.descriptors[i.basename],n,!1)}matchDeclaration(e){return e.type!=="Declaration"?Qe(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(Vp(e).custom)return Qe(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(e);return n?Qe(null,n):Xn(this,this.getProperty(e),t,!0)}matchType(e,t){let n=this.getType(e);return n?Xn(this,n,t,!1):Qe(null,new eo("Unknown type",e))}match(e,t){return typeof e!="string"&&(!e||!e.type)?Qe(null,new eo("Bad syntax")):((typeof e=="string"||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),Xn(this,e,t,!1))}findValueFragments(e,t,n,r){return af(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return af(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=tl(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=Vp(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&&qf(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:vl(this.types,!t,e),properties:vl(this.properties,!t,e),atrules:sx(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function al(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function uf(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 xl(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?al(l.prelude,s.prelude):l.prelude||null;for(let[c,u]of Object.entries(s.descriptors||{}))l.descriptors[c]=u?al(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]=al(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],...uf(o,["parse"])};break;case"node":n[r]={...e[r],...uf(o,["name","structure","parse","generate","walkContext"])};break}return n}function Qf(e){let t=bv(e),n=Iv(e),r=Sv(e),{fromPlainObject:o,toPlainObject:i}=Tv(n),s={lexer:null,createLexer:a=>new cf(a,s,s.lexer.structure),tokenize:Ai,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:o,toPlainObject:i,fork(a){let l=xl({},e);return Qf(typeof a=="function"?a(l,Object.assign):xl(l,a))}};return s.lexer=new cf({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var lx=e=>Qf(xl({},e)),cx={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}}},Jl={};B(Jl,{AnPlusB:()=>em,Atrule:()=>nm,AtrulePrelude:()=>om,AttributeSelector:()=>sm,Block:()=>cm,Brackets:()=>pm,CDC:()=>mm,CDO:()=>gm,ClassSelector:()=>bm,Combinator:()=>Dm,Comment:()=>vm,Declaration:()=>Cm,DeclarationList:()=>_m,Dimension:()=>Tm,Function:()=>Om,Hash:()=>Pm,IdSelector:()=>Bm,Identifier:()=>$m,MediaFeature:()=>Lm,MediaQuery:()=>Um,MediaQueryList:()=>zm,NestingSelector:()=>Gm,Nth:()=>Jm,Number:()=>Km,Operator:()=>Ym,Parentheses:()=>Qm,Percentage:()=>th,PseudoClassSelector:()=>rh,PseudoElementSelector:()=>ih,Ratio:()=>ah,Raw:()=>ch,Rule:()=>dh,Selector:()=>fh,SelectorList:()=>hh,String:()=>yh,StyleSheet:()=>vh,TypeSelector:()=>Ch,UnicodeRange:()=>Fh,Url:()=>Ah,Value:()=>$h,WhiteSpace:()=>Bh});var em={};B(em,{generate:()=>fx,name:()=>dx,parse:()=>tm,structure:()=>px});var ct=43,Be=45,bi=110,dn=!0,ux=!1;function wi(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===ct||r===Be)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)we(this.charCodeAt(n))||this.error("Integer is expected",n)}function Qn(e){return wi.call(this,0,e)}function Mt(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case bi:n="N is expected";break;case Be:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+e)}}function ll(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10)if(this.isDelim(ct,e)||this.isDelim(Be,e)){t=this.isDelim(ct,e)?ct:Be;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),Qn.call(this,dn))}else return null;return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==ct&&n!==Be&&this.error("Number sign is expected")),Qn.call(this,t!==0),t===Be?"-"+this.consume(10):this.consume(10)}var dx="AnPlusB",px={a:[String,null],b:[String,null]};function tm(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)Qn.call(this,ux),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Be))switch(t="-1",Mt.call(this,1,bi),this.tokenEnd-this.tokenStart){case 2:this.next(),n=ll.call(this);break;case 3:Mt.call(this,2,Be),this.next(),this.skipSC(),Qn.call(this,dn),n="-"+this.consume(10);break;default:Mt.call(this,2,Be),wi.call(this,3,dn),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(ct)&&this.lookupType(1)===1){let r=0;switch(t="1",this.isDelim(ct)&&(r=1,this.next()),Mt.call(this,0,bi),this.tokenEnd-this.tokenStart){case 1:this.next(),n=ll.call(this);break;case 2:Mt.call(this,1,Be),this.next(),this.skipSC(),Qn.call(this,dn),n="-"+this.consume(10);break;default:Mt.call(this,1,Be),wi.call(this,2,dn),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),o=r===ct||r===Be,i=this.tokenStart+o;for(;i<this.tokenEnd&&we(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),Mt.call(this,i-this.tokenStart,bi),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),n=ll.call(this)):(Mt.call(this,i-this.tokenStart+1,Be),i+2===this.tokenEnd?(this.next(),this.skipSC(),Qn.call(this,dn),n="-"+this.consume(10)):(wi.call(this,i-this.tokenStart+2,dn),this.next(),n=this.substrToCursor(i+1)))}else this.error();return t!==null&&t.charCodeAt(0)===ct&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===ct&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function fx(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 nm={};B(nm,{generate:()=>bx,name:()=>hx,parse:()=>rm,structure:()=>yx,walkContext:()=>gx});function df(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function mx(){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 hx="Atrule",gx="atrule",yx={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function rm(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),df):o=df.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(mx.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:o,block:i}}function bx(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var om={};B(om,{generate:()=>vx,name:()=>wx,parse:()=>im,structure:()=>kx,walkContext:()=>Dx});var wx="AtrulePrelude",Dx="atrulePrelude",kx={children:[[]]};function im(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 vx(e){this.children(e)}var sm={};B(sm,{generate:()=>Ax,name:()=>Sx,parse:()=>lm,structure:()=>Tx});var xx=36,am=42,Di=61,Cx=94,Cl=124,Ex=126;function Fx(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(am)?(t=!0,this.next()):this.isDelim(Cl)||this.eat(1),this.isDelim(Cl)?this.charCodeAt(this.tokenStart+1)!==Di?(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 _x(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==Di&&t!==Ex&&t!==Cx&&t!==xx&&t!==am&&t!==Cl&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==Di&&(this.isDelim(Di)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var Sx="AttributeSelector",Tx={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function lm(){let e=this.tokenStart,t,n=null,r=null,o=null;return this.eat(19),this.skipSC(),t=Fx.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=_x.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 Ax(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 cm={};B(cm,{generate:()=>jx,name:()=>Px,parse:()=>dm,structure:()=>$x,walkContext:()=>Rx});var Ox=38;function um(e){return this.Raw(e,null,!0)}function pf(){return this.parseWithFallback(this.Rule,um)}function ff(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Ix(){if(this.tokenType===17)return ff.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,ff);return this.tokenType===17&&this.next(),e}var Px="Block",Rx="block",$x={children:[["Atrule","Rule","Declaration"]]};function dm(e){let t=e?Ix:pf,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),um));break;default:e&&this.isDelim(Ox)?r.push(pf.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function jx(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}var pm={};B(pm,{generate:()=>Lx,name:()=>Bx,parse:()=>fm,structure:()=>Nx});var Bx="Brackets",Nx={children:[[]]};function fm(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 Lx(e){this.token(9,"["),this.children(e),this.token(9,"]")}var mm={};B(mm,{generate:()=>Wx,name:()=>Mx,parse:()=>hm,structure:()=>Ux});var Mx="CDC",Ux=[];function hm(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function Wx(){this.token(15,"-->")}var gm={};B(gm,{generate:()=>Gx,name:()=>zx,parse:()=>ym,structure:()=>Vx});var zx="CDO",Vx=[];function ym(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function Gx(){this.token(14,"<!--")}var bm={};B(bm,{generate:()=>Kx,name:()=>Jx,parse:()=>wm,structure:()=>Hx});var qx=46,Jx="ClassSelector",Hx={name:String};function wm(){return this.eatDelim(qx),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function Kx(e){this.token(9,"."),this.token(1,e.name)}var Dm={};B(Dm,{generate:()=>tC,name:()=>Qx,parse:()=>km,structure:()=>eC});var Zx=43,mf=47,Yx=62,Xx=126,Qx="Combinator",eC={name:String};function km(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case Yx:case Zx:case Xx:this.next();break;case mf:this.next(),this.eatIdent("deep"),this.eatDelim(mf);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e);break}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function tC(e){this.tokenize(e.name)}var vm={};B(vm,{generate:()=>sC,name:()=>oC,parse:()=>xm,structure:()=>iC});var nC=42,rC=47,oC="Comment",iC={value:String};function xm(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===nC&&this.charCodeAt(t-1)===rC&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function sC(e){this.token(25,"/*"+e.value+"*/")}var Cm={};B(Cm,{generate:()=>bC,name:()=>hC,parse:()=>Fm,structure:()=>yC,walkContext:()=>gC});var Em=33,aC=35,lC=36,cC=38,uC=42,dC=43,hf=47;function pC(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function fC(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function mC(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(Em)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}var hC="Declaration",gC="declaration",yC={important:[Boolean,String],property:String,value:["Value","Raw"]};function Fm(){let e=this.tokenStart,t=this.tokenIndex,n=wC.call(this),r=jl(n),o=r?this.parseCustomProperty:this.parseValue,i=r?fC:pC,s=!1,a;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(r||this.skipSC(),o?a=this.parseWithFallback(mC,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(Em)&&(s=DC.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 bC(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 wC(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case uC:case lC:case dC:case aC:case cC:this.next();break;case hf:this.next(),this.isDelim(hf)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function DC(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"?!0:e}var _m={};B(_m,{generate:()=>CC,name:()=>vC,parse:()=>Sm,structure:()=>xC});var kC=38;function cl(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var vC="DeclarationList",xC={children:[["Declaration","Atrule","Rule"]]};function Sm(){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),cl));break;default:this.isDelim(kC)?e.push(this.parseWithFallback(this.Rule,cl)):e.push(this.parseWithFallback(this.Declaration,cl))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function CC(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}var Tm={};B(Tm,{generate:()=>_C,name:()=>EC,parse:()=>Am,structure:()=>FC});var EC="Dimension",FC={value:String,unit:String};function Am(){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 _C(e){this.token(12,e.value+e.unit)}var Om={};B(Om,{generate:()=>OC,name:()=>SC,parse:()=>Im,structure:()=>AC,walkContext:()=>TC});var SC="Function",TC="function",AC={name:String,children:[[]]};function Im(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 OC(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var Pm={};B(Pm,{generate:()=>$C,name:()=>PC,parse:()=>Rm,structure:()=>RC,xxx:()=>IC});var IC="XXX",PC="Hash",RC={value:String};function Rm(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function $C(e){this.token(4,"#"+e.value)}var $m={};B($m,{generate:()=>NC,name:()=>jC,parse:()=>jm,structure:()=>BC});var jC="Identifier",BC={name:String};function jm(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function NC(e){this.token(1,e.name)}var Bm={};B(Bm,{generate:()=>UC,name:()=>LC,parse:()=>Nm,structure:()=>MC});var LC="IdSelector",MC={name:String};function Nm(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function UC(e){this.token(9,"#"+e.name)}var Lm={};B(Lm,{generate:()=>VC,name:()=>WC,parse:()=>Mm,structure:()=>zC});var WC="MediaFeature",zC={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function Mm(){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 VC(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var Um={};B(Um,{generate:()=>JC,name:()=>GC,parse:()=>Wm,structure:()=>qC});var GC="MediaQuery",qC={children:[["Identifier","MediaFeature","WhiteSpace"]]};function Wm(){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 JC(e){this.children(e)}var zm={};B(zm,{generate:()=>ZC,name:()=>HC,parse:()=>Vm,structure:()=>KC});var HC="MediaQueryList",KC={children:[["MediaQuery"]]};function Vm(){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 ZC(e){this.children(e,()=>this.token(18,","))}var Gm={};B(Gm,{generate:()=>eE,name:()=>XC,parse:()=>qm,structure:()=>QC});var YC=38,XC="NestingSelector",QC={};function qm(){let e=this.tokenStart;return this.eatDelim(YC),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function eE(){this.token(9,"&")}var Jm={};B(Jm,{generate:()=>rE,name:()=>tE,parse:()=>Hm,structure:()=>nE});var tE="Nth",nE={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function Hm(){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 rE(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}var Km={};B(Km,{generate:()=>sE,name:()=>oE,parse:()=>Zm,structure:()=>iE});var oE="Number",iE={value:String};function Zm(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function sE(e){this.token(10,e.value)}var Ym={};B(Ym,{generate:()=>cE,name:()=>aE,parse:()=>Xm,structure:()=>lE});var aE="Operator",lE={value:String};function Xm(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function cE(e){this.tokenize(e.value)}var Qm={};B(Qm,{generate:()=>pE,name:()=>uE,parse:()=>eh,structure:()=>dE});var uE="Parentheses",dE={children:[[]]};function eh(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 pE(e){this.token(21,"("),this.children(e),this.token(22,")")}var th={};B(th,{generate:()=>hE,name:()=>fE,parse:()=>nh,structure:()=>mE});var fE="Percentage",mE={value:String};function nh(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function hE(e){this.token(11,e.value+"%")}var rh={};B(rh,{generate:()=>wE,name:()=>gE,parse:()=>oh,structure:()=>bE,walkContext:()=>yE});var gE="PseudoClassSelector",yE="function",bE={name:String,children:[["Raw"],null]};function oh(){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 wE(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var ih={};B(ih,{generate:()=>xE,name:()=>DE,parse:()=>sh,structure:()=>vE,walkContext:()=>kE});var DE="PseudoElementSelector",kE="function",vE={name:String,children:[["Raw"],null]};function sh(){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 xE(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 ah={};B(ah,{generate:()=>SE,name:()=>FE,parse:()=>lh,structure:()=>_E});var CE=47,EE=46;function gf(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);!we(n)&&n!==EE&&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 FE="Ratio",_E={left:String,right:String};function lh(){let e=this.tokenStart,t=gf.call(this),n;return this.skipSC(),this.eatDelim(CE),n=gf.call(this),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function SE(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}var ch={};B(ch,{generate:()=>IE,name:()=>AE,parse:()=>uh,structure:()=>OE});function TE(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var AE="Raw",OE={value:String};function uh(e,t,n){let r=this.getTokenStart(e),o;return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n&&this.tokenStart>r?o=TE.call(this):o=this.tokenStart,{type:"Raw",loc:this.getLocation(r,o),value:this.substring(r,o)}}function IE(e){this.tokenize(e.value)}var dh={};B(dh,{generate:()=>BE,name:()=>RE,parse:()=>ph,structure:()=>jE,walkContext:()=>$E});function yf(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function PE(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}var RE="Rule",$E="rule",jE={prelude:["SelectorList","Raw"],block:["Block"]};function ph(){let e=this.tokenIndex,t=this.tokenStart,n,r;return this.parseRulePrelude?n=this.parseWithFallback(PE,yf):n=yf.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function BE(e){this.node(e.prelude),this.node(e.block)}var fh={};B(fh,{generate:()=>ME,name:()=>NE,parse:()=>mh,structure:()=>LE});var NE="Selector",LE={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function mh(){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 ME(e){this.children(e)}var hh={};B(hh,{generate:()=>VE,name:()=>UE,parse:()=>gh,structure:()=>zE,walkContext:()=>WE});var UE="SelectorList",WE="selector",zE={children:[["Selector","Raw"]]};function gh(){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 VE(e){this.children(e,()=>this.token(18,","))}var yh={};B(yh,{generate:()=>HE,name:()=>qE,parse:()=>kh,structure:()=>JE});var GE={};B(GE,{decode:()=>Hl,encode:()=>Dh});var El=92,bh=34,wh=39;function Hl(e){let t=e.length,n=e.charCodeAt(0),r=n===bh||n===wh?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===El){if(s===o){s!==t-1&&(i=e.substr(s+1));break}if(a=e.charCodeAt(++s),et(El,a)){let l=s-1,c=fn(e,l);s=c-1,i+=Pl(e.substring(l+1,c))}else a===13&&e.charCodeAt(s+1)===10&&s++}else i+=e[s]}return i}function Dh(e,t){let n=t?"'":'"',r=t?wh:bh,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===El?(o+="\\"+e.charAt(s),i=!1):(i&&(Wt(a)||pn(a))&&(o+=" "),o+=e.charAt(s),i=!1)}return n+o+n}var qE="String",JE={value:String};function kh(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Hl(this.consume(5))}}function HE(e){this.token(5,Dh(e.value))}var vh={};B(vh,{generate:()=>QE,name:()=>ZE,parse:()=>xh,structure:()=>XE,walkContext:()=>YE});var KE=33;function bf(e){return this.Raw(e,null,!1)}var ZE="StyleSheet",YE="stylesheet",XE={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function xh(){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)!==KE){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,bf);break;default:n=this.parseWithFallback(this.Rule,bf)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function QE(e){this.children(e)}var Ch={};B(Ch,{generate:()=>rF,name:()=>tF,parse:()=>Eh,structure:()=>nF});var eF=42,wf=124;function ul(){this.tokenType!==1&&this.isDelim(eF)===!1&&this.error("Identifier or asterisk is expected"),this.next()}var tF="TypeSelector",nF={name:String};function Eh(){let e=this.tokenStart;return this.isDelim(wf)?(this.next(),ul.call(this)):(ul.call(this),this.isDelim(wf)&&(this.next(),ul.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function rF(e){this.tokenize(e.name)}var Fh={};B(Fh,{generate:()=>lF,name:()=>sF,parse:()=>Th,structure:()=>aF});var _h=43,Sh=45,Fl=63;function io(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let o=this.charCodeAt(r);if(o===Sh&&t&&n!==0)return io.call(this,e+n+1,!1),-1;Wt(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 mi(e){let t=0;for(;this.isDelim(Fl);)++t>e&&this.error("Too many question marks"),this.next()}function oF(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===_h?"Plus sign":"Hyphen minus")+" is expected")}function iF(){let e=0;switch(this.tokenType){case 10:if(e=io.call(this,1,!0),this.isDelim(Fl)){mi.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){oF.call(this,Sh),io.call(this,1,!1);break}break;case 12:e=io.call(this,1,!0),e>0&&mi.call(this,6-e);break;default:if(this.eatDelim(_h),this.tokenType===1){e=io.call(this,0,!0),e>0&&mi.call(this,6-e);break}if(this.isDelim(Fl)){this.next(),mi.call(this,5);break}this.error("Hex digit or question mark is expected")}}var sF="UnicodeRange",aF={value:String};function Th(){let e=this.tokenStart;return this.eatIdent("u"),iF.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function lF(e){this.tokenize(e.value)}var Ah={};B(Ah,{generate:()=>gF,name:()=>mF,parse:()=>Rh,structure:()=>hF});var cF={};B(cF,{decode:()=>Ih,encode:()=>Ph});var uF=32,_l=92,dF=34,pF=39,fF=40,Oh=41;function Ih(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===Oh?t-2:t-1,o="";for(;n<r&&pn(e.charCodeAt(n));)n++;for(;n<r&&pn(e.charCodeAt(r));)r--;for(let i=n;i<=r;i++){let s=e.charCodeAt(i);if(s===_l){if(i===r){i!==t-1&&(o=e.substr(i+1));break}if(s=e.charCodeAt(++i),et(_l,s)){let a=i-1,l=fn(e,a);i=l-1,o+=Pl(e.substring(a+1,l))}else s===13&&e.charCodeAt(i+1)===10&&i++}else o+=e[i]}return o}function Ph(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===uF||o===_l||o===dF||o===pF||o===fF||o===Oh?(t+="\\"+e.charAt(r),n=!1):(n&&Wt(o)&&(t+=" "),t+=e.charAt(r),n=!1)}return"url("+t+")"}var mF="Url",hF={value:String};function Rh(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=Ih(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=Hl(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 gF(e){this.token(7,Ph(e.value))}var $h={};B($h,{generate:()=>wF,name:()=>yF,parse:()=>jh,structure:()=>bF});var yF="Value",bF={children:[[]]};function jh(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function wF(e){this.children(e)}var Bh={};B(Bh,{generate:()=>xF,name:()=>kF,parse:()=>Nh,structure:()=>vF});var DF=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),kF="WhiteSpace",vF={value:String};function Nh(){return this.eat(13),DF}function xF(e){this.token(13,e.value)}var CF={generic:!0,...cx,node:Jl},Lh={};B(Lh,{AtrulePrelude:()=>AF,Selector:()=>UF,Value:()=>VF});var EF=35,FF=42,Df=43,_F=45,SF=47,TF=117;function Mh(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,TF)&&this.cmpChar(this.tokenStart+1,Df)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===SF||t===FF||t===Df||t===_F)return this.Operator();t===EF&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var AF={getNode:Mh},OF=35,IF=38,PF=42,RF=43,$F=47,kf=46,jF=62,BF=124,NF=126;function LF(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function MF(){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)===kf&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case RF:case jF:case NF:case $F:return this.Combinator();case kf:return this.ClassSelector();case PF:case BF:return this.TypeSelector();case OF:return this.IdSelector();case IF:return this.NestingSelector()}break}}}var UF={onWhiteSpace:LF,getNode:MF};function WF(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function zF(){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 vf(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}var VF={getNode:Mh,onWhiteSpace(e,t){vf(e)&&(e.value=" "+e.value),vf(t.last)&&(t.last.value+=" ")},expression:WF,var:zF},GF={parse:{prelude:null,block(){return this.Block(!0)}}},qF={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}},JF={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},HF={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},KF={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};function ZF(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function YF(){return this.skipSC(),this.tokenType===1&&this.lookupNonWSType(1)===16?this.createSingleNodeList(this.Declaration()):Uh.call(this)}function Uh(){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(ZF,this.scope.AtrulePrelude);break;case 1:t=this.Identifier();break;case 21:t=this.Parentheses(YF,this.scope.AtrulePrelude);break;default:break e}e.push(t)}return e}var XF={parse:{prelude(){let e=Uh.call(this);return this.getFirstListNode(e)===null&&this.error("Condition is expected"),e},block(e=!1){return this.Block(e)}}},QF={"font-face":GF,import:qF,media:JF,nest:HF,page:KF,supports:XF},un={parse(){return this.createSingleNodeList(this.SelectorList())}},dl={parse(){return this.createSingleNodeList(this.Selector())}},xf={parse(){return this.createSingleNodeList(this.Identifier())}},hi={parse(){return this.createSingleNodeList(this.Nth())}},e1={dir:xf,has:un,lang:xf,matches:un,is:un,"-moz-any":un,"-webkit-any":un,where:un,not:un,"nth-child":hi,"nth-last-child":hi,"nth-last-of-type":hi,"nth-of-type":hi,slotted:dl,host:dl,"host-context":dl},Wh={};B(Wh,{AnPlusB:()=>tm,Atrule:()=>rm,AtrulePrelude:()=>im,AttributeSelector:()=>lm,Block:()=>dm,Brackets:()=>fm,CDC:()=>hm,CDO:()=>ym,ClassSelector:()=>wm,Combinator:()=>km,Comment:()=>xm,Declaration:()=>Fm,DeclarationList:()=>Sm,Dimension:()=>Am,Function:()=>Im,Hash:()=>Rm,IdSelector:()=>Nm,Identifier:()=>jm,MediaFeature:()=>Mm,MediaQuery:()=>Wm,MediaQueryList:()=>Vm,NestingSelector:()=>qm,Nth:()=>Hm,Number:()=>Zm,Operator:()=>Xm,Parentheses:()=>eh,Percentage:()=>nh,PseudoClassSelector:()=>oh,PseudoElementSelector:()=>sh,Ratio:()=>lh,Raw:()=>uh,Rule:()=>ph,Selector:()=>mh,SelectorList:()=>gh,String:()=>kh,StyleSheet:()=>xh,TypeSelector:()=>Eh,UnicodeRange:()=>Th,Url:()=>Rh,Value:()=>jh,WhiteSpace:()=>Nh});var t1={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:Lh,atrule:QF,pseudo:e1,node:Wh},n1={node:Jl},r1=lx({...CF,...t1,...n1});var o1={};B(o1,{decode:()=>i1,encode:()=>s1});var Cf=92;function i1(e){let t=e.length-1,n="";for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===Cf){if(r===t)break;if(o=e.charCodeAt(++r),et(Cf,o)){let i=r-1,s=fn(e,i);r=s-1,n+=Pl(e.substring(i+1,s))}else o===13&&e.charCodeAt(r+1)===10&&r++}else n+=e[r]}return n}function s1(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}Ol(r)?t+=e.charAt(n):t+="\\"+e.charAt(n)}return t}var{tokenize:kI,parse:zh,generate:Vh,lexer:vI,createLexer:xI,walk:Gh,find:CI,findLast:EI,findAll:FI,toPlainObject:_I,fromPlainObject:SI,fork:TI}=r1;var qh=w(require("prettier"));G();var a1=`
54
+ --`+new Array((n||t.length)+1).join("-")+"^"})}var kx=9,xx=10,Cx=12,Ex=13,Fx=32,Sx=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!==Ex&&t!==xx&&t!==Cx&&t!==Fx&&t!==kx)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 Tm(e,this.str,this.pos)}},_x=9,Ax=10,Tx=12,Ox=13,Px=32,Om=33,xc=35,$f=38,os=39,Pm=40,Ix=41,Im=42,Cc=43,Ec=44,Bf=45,Fc=60,Rm=62,rc=63,Rx=64,fs=91,Sc=93,is=123,Nf=124,Lf=125,Mf=8734,Lo=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),Wf={" ":1,"&&":2,"||":3,"|":4};function ss(e){return e.substringToPos(e.findWsEnd(e.pos))}function Cr(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 jx(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 Uf(e){let t=null,n=null;return e.eat(is),t=as(e),e.charCode()===Ec?(e.pos++,e.charCode()!==Lf&&(n=as(e))):n=t,e.eat(Lf),{min:Number(t),max:n?Number(n):0}}function $x(e){let t=null,n=!1;switch(e.charCode()){case Im:e.pos++,t={min:0,max:0};break;case Cc:e.pos++,t={min:1,max:0};break;case rc:e.pos++,t={min:0,max:1};break;case xc:e.pos++,n=!0,e.charCode()===is?t=Uf(e):e.charCode()===rc?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case is:t=Uf(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}function Er(e,t){let n=$x(e);return n!==null?(n.term=t,e.charCode()===xc&&e.charCodeAt(e.pos-1)===Cc?Er(e,n):n):t}function zl(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function Bx(e){let t;return e.eat(Fc),e.eat(os),t=Cr(e),e.eat(os),e.eat(Rm),Er(e,{type:"Property",name:t})}function Nx(e){let t=null,n=null,r=1;return e.eat(fs),e.charCode()===Bf&&(e.peek(),r=-1),r==-1&&e.charCode()===Mf?e.peek():(t=r*Number(as(e)),Lo[e.charCode()]!==0&&(t+=Cr(e))),ss(e),e.eat(Ec),ss(e),e.charCode()===Mf?e.peek():(r=1,e.charCode()===Bf&&(e.peek(),r=-1),n=r*Number(as(e)),Lo[e.charCode()]!==0&&(n+=Cr(e))),e.eat(Sc),{type:"Range",min:t,max:n}}function Lx(e){let t,n=null;return e.eat(Fc),t=Cr(e),e.charCode()===Pm&&e.nextCharCode()===Ix&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===fs&&(ss(e),n=Nx(e)),e.eat(Rm),Er(e,{type:"Type",name:t,opts:n})}function Mx(e){let t=Cr(e);return e.charCode()===Pm?(e.pos++,{type:"Function",name:t}):Er(e,{type:"Keyword",name:t})}function Wx(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)=>Wf[o]-Wf[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 jm(e){let t=[],n={},r,o=null,i=e.pos;for(;r=zx(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:Wx(t,n)||" ",disallowEmpty:!1,explicit:!1}}function Ux(e){let t;return e.eat(fs),t=jm(e),e.eat(Sc),t.explicit=!0,e.charCode()===Om&&(e.pos++,t.disallowEmpty=!0),t}function zx(e){let t=e.charCode();if(t<128&&Lo[t]===1)return Mx(e);switch(t){case Sc:break;case fs:return Er(e,Ux(e));case Fc:return e.nextCharCode()===os?Bx(e):Lx(e);case Nf:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===Nf?2:1))};case $f:return e.pos++,e.eat($f),{type:"Combinator",value:"&&"};case Ec:return e.pos++,{type:"Comma"};case os:return Er(e,{type:"String",value:jx(e)});case Px:case _x:case Ax:case Ox:case Tx:return{type:"Spaces",value:ss(e)};case Rx:return t=e.nextCharCode(),t<128&&Lo[t]===1?(e.pos++,{type:"AtKeyword",name:Cr(e)}):zl(e);case Im:case Cc:case rc:case xc:case Om:break;case is:if(t=e.nextCharCode(),t<48||t>57)return zl(e);break;default:return zl(e)}}function _c(e){let t=new Sx(e),n=jm(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 zf(e){return typeof e=="function"?e:Io}function $m(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=zf(t.enter),i=zf(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 Vx={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 Jx(e){let t=[];return cs(e,(n,r,o)=>t.push({type:n,value:e.slice(r,o),node:null})),t}function qx(e,t){return typeof e=="string"?Jx(e):t.generate(e,Vx)}var re={type:"Match"},ie={type:"Mismatch"},Ac={type:"DisallowEmpty"},Gx=40,Hx=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 Bm(e){return e.length>2&&e.charCodeAt(e.length-2)===Gx&&e.charCodeAt(e.length-1)===Hx}function Vf(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&Bm(e.name)}function oc(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(Vf(s)&&(o===null&&i>0&&Vf(t[i-1])&&(o=Object.create(null),r=Ee({type:"Enum",map:o},re,r)),o!==null)){let a=(Bm(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=oc(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=oc(e,t.filter(function(a){return a!==i}),!0):s=re,r=Ee(i,s,r)}return r}}}function Zx(e){let t=re,n=Tc(e.term);if(e.max===0)n=Ee(n,Ac,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 Tc(e){if(typeof e=="function")return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=oc(e.combinator,e.terms.map(Tc),!1);return e.disallowEmpty&&(t=Ee(t,Ac,ie)),t}case"Multiplier":return Zx(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 ic(e,t){return typeof e=="string"&&(e=_c(e)),{type:"MatchGraph",match:Tc(e),syntax:t||null,source:e}}var{hasOwnProperty:Jf}=Object.prototype,Kx=0,Yx=1,sc=2,Nm=3,qf="Match",Xx="Mismatch",Qx="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",Gf=15e3,eC=0;function tC(e){let t=null,n=null,r=e;for(;r!==null;)n=r.prev,r.prev=t,t=r,r=n;return t}function Vl(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 nC(e){return e.type!==9?!1:e.value!=="?"}function Hf(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||nC(e)}function Zf(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function rC(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 R=P+z;return R<e.length?e[R]:null}function i(z,R){return{nextState:z,matchStack:x,syntaxStack:p,thenStack:f,tokenIndex:P,prev:R}}function s(z){f={nextState:z,matchStack:x,syntaxStack:p,prev:f}}function a(z){m=i(z,m)}function l(){x={type:Yx,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:sc,syntax:t.syntax,token:x.token,prev:x}}function u(){x.type===sc?x=x.prev:x={type:Nm,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:Kx,syntax:null,token:null,prev:null};for(r();k===null&&++v<Gf;)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=qf;break}if(t=f.nextState,t===Ac)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=Xx;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].*$/,"")),Jf.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=Jf.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].*$/,"")),Vl(y,S)){l(),t=re;break}}t=ie;break}case"AtKeyword":case"Function":if(T!==null&&Vl(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?Hf(x.token)?t=ie:(l(),t=Zf(T)?ie:re):t=Hf(x.token)||Zf(T)?re:ie;break;case"String":let z="",R=P;for(;R<e.length&&z.length<t.value.length;R++)z+=e[R].value;if(Vl(z,t.value)){for(;P<R;)l();t=re}else t=ie;break;default:throw new Error("Unknown node type: "+t.type)}switch(eC+=v,k){case null:console.warn("[csstree-match] BREAK after "+Gf+" iterations"),k=Qx,x=null;break;case qf:for(;p!==null;)u();break;default:x=null}return{tokens:e,reason:k,iterations:v,match:x,longestMatch:C}}function Kf(e,t,n){let r=rC(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=tC(o).prev;o!==null;){switch(o.type){case sc:i.match.push(i={syntax:o.syntax,match:[]}),s.push(i);break;case Nm: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 Lm={};$(Lm,{getTrace:()=>Mm,isKeyword:()=>sC,isProperty:()=>iC,isType:()=>oC});function Mm(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 oC(e,t){return Oc(this,e,n=>n.type==="Type"&&n.name===t)}function iC(e,t){return Oc(this,e,n=>n.type==="Property"&&n.name===t)}function sC(e){return Oc(this,e,t=>t.type==="Keyword")}function Oc(e,t,n){let r=Mm.call(e,t);return r===null?!1:r.some(n)}function Wm(e){return"node"in e?e.node:Wm(e.match[0])}function Um(e){return"node"in e?e.node:Um(e.match[e.match.length-1])}function Yf(e,t,n,r,o){function i(a){if(a.syntax!==null&&a.syntax.type===r&&a.syntax.name===o){let l=Wm(a),c=Um(a);e.syntax.walk(t,function(u,p,f){if(u===l){let m=new he;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 Jl(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function Xf(e){return!!e&&Jl(e.offset)&&Jl(e.line)&&Jl(e.column)}function aC(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(!Xf(n.loc.start))o+=".start";else if(!Xf(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 he)}}}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 lC(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:aC(e,r)}}function cC(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]=lC(n,r);else throw new Error("Missed `structure` field in `"+n+"` node type definition")}}return t}var uC=ic(xm.join(" | "));function ac(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 dC(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&&ac(i.descriptors,t,n)};return r}function pC(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,...Lm}}function Dr(e,t,n,r){let o=qx(n,e.syntax),i;return pC(o)?lt(null,new Error("Matching for a tree with var() is not supported")):(r&&(i=Kf(o,e.cssWideKeywordsSyntax,e)),(!r||!i.match)&&(i=Kf(o,t.match,e),!i.match)?lt(null,new z0(i.reason,t.syntax,n,i),i.iterations):lt(i.match,null,i.iterations))}var Qf=class{constructor(e,t,n){if(this.cssWideKeywordsSyntax=uC,this.syntax=t,this.generic=!1,this.units={...nc},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=n||cC(e),e){if(e.units)for(let r of Object.keys(nc))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(px(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=ic(e,o):(typeof e=="string"?Object.defineProperty(i,"syntax",{get(){return Object.defineProperty(i,"syntax",{value:_c(e)}),i.syntax}}):i.syntax=e,Object.defineProperty(i,"match",{get(){return Object.defineProperty(i,"match",{value:ic(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&&!Dr(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=Ml(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?Dr(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=Ml(t);return Dr(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(jf(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):Dr(this,this.getProperty(e),t,!0)}matchType(e,t){let n=this.getType(e);return n?Dr(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")),Dr(this,e,t,!1))}findValueFragments(e,t,n,r){return Yf(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return Yf(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=Ml(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=jf(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&&$m(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:ac(this.types,!t,e),properties:ac(this.properties,!t,e),atrules:dC(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function ql(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function em(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 lc(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?ql(l.prelude,s.prelude):l.prelude||null;for(let[c,u]of Object.entries(s.descriptors||{}))l.descriptors[c]=u?ql(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]=ql(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],...em(o,["parse"])};break;case"node":n[r]={...e[r],...em(o,["name","structure","parse","generate","walkContext"])};break}return n}function zm(e){let t=x0(e),n=B0(e),r=I0(e),{fromPlainObject:o,toPlainObject:i}=R0(n),s={lexer:null,createLexer:a=>new Qf(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=lc({},e);return zm(typeof a=="function"?a(l,Object.assign):lc(l,a))}};return s.lexer=new Qf({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var fC=e=>zm(lc({},e)),mC={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}}},Pc={};$(Pc,{AnPlusB:()=>Vm,Atrule:()=>qm,AtrulePrelude:()=>Hm,AttributeSelector:()=>Km,Block:()=>Qm,Brackets:()=>ng,CDC:()=>og,CDO:()=>sg,ClassSelector:()=>lg,Combinator:()=>ug,Comment:()=>pg,Declaration:()=>mg,DeclarationList:()=>yg,Dimension:()=>bg,Function:()=>vg,Hash:()=>xg,IdSelector:()=>Sg,Identifier:()=>Eg,MediaFeature:()=>Ag,MediaQuery:()=>Og,MediaQueryList:()=>Ig,NestingSelector:()=>jg,Nth:()=>Bg,Number:()=>Lg,Operator:()=>Wg,Parentheses:()=>zg,Percentage:()=>Jg,PseudoClassSelector:()=>Gg,PseudoElementSelector:()=>Zg,Ratio:()=>Yg,Raw:()=>Qg,Rule:()=>th,Selector:()=>rh,SelectorList:()=>ih,String:()=>ah,StyleSheet:()=>ph,TypeSelector:()=>mh,UnicodeRange:()=>hh,Url:()=>Dh,Value:()=>Eh,WhiteSpace:()=>Sh});var Vm={};$(Vm,{generate:()=>wC,name:()=>hC,parse:()=>Jm,structure:()=>yC});var Dt=43,Ue=45,Yi=110,An=!0,gC=!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 vr(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 Gl(){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),vr.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")),vr.call(this,t!==0),t===Ue?"-"+this.consume(10):this.consume(10)}var hC="AnPlusB",yC={a:[String,null],b:[String,null]};function Jm(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)vr.call(this,gC),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=Gl.call(this);break;case 3:en.call(this,2,Ue),this.next(),this.skipSC(),vr.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=Gl.call(this);break;case 2:en.call(this,1,Ue),this.next(),this.skipSC(),vr.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=Gl.call(this)):(en.call(this,i-this.tokenStart+1,Ue),i+2===this.tokenEnd?(this.next(),this.skipSC(),vr.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 wC(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 qm={};$(qm,{generate:()=>xC,name:()=>DC,parse:()=>Gm,structure:()=>kC,walkContext:()=>vC});function tm(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function bC(){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 DC="Atrule",vC="atrule",kC={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function Gm(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),tm):o=tm.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(bC.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:o,block:i}}function xC(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var Hm={};$(Hm,{generate:()=>SC,name:()=>CC,parse:()=>Zm,structure:()=>FC,walkContext:()=>EC});var CC="AtrulePrelude",EC="atrulePrelude",FC={children:[[]]};function Zm(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 SC(e){this.children(e)}var Km={};$(Km,{generate:()=>jC,name:()=>IC,parse:()=>Xm,structure:()=>RC});var _C=36,Ym=42,Qi=61,AC=94,cc=124,TC=126;function OC(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(Ym)?(t=!0,this.next()):this.isDelim(cc)||this.eat(1),this.isDelim(cc)?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 PC(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==Qi&&t!==TC&&t!==AC&&t!==_C&&t!==Ym&&t!==cc&&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 IC="AttributeSelector",RC={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Xm(){let e=this.tokenStart,t,n=null,r=null,o=null;return this.eat(19),this.skipSC(),t=OC.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=PC.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 jC(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 Qm={};$(Qm,{generate:()=>WC,name:()=>NC,parse:()=>tg,structure:()=>MC,walkContext:()=>LC});var $C=38;function eg(e){return this.Raw(e,null,!0)}function nm(){return this.parseWithFallback(this.Rule,eg)}function rm(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function BC(){if(this.tokenType===17)return rm.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,rm);return this.tokenType===17&&this.next(),e}var NC="Block",LC="block",MC={children:[["Atrule","Rule","Declaration"]]};function tg(e){let t=e?BC:nm,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),eg));break;default:e&&this.isDelim($C)?r.push(nm.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function WC(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}var ng={};$(ng,{generate:()=>VC,name:()=>UC,parse:()=>rg,structure:()=>zC});var UC="Brackets",zC={children:[[]]};function rg(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 VC(e){this.token(9,"["),this.children(e),this.token(9,"]")}var og={};$(og,{generate:()=>GC,name:()=>JC,parse:()=>ig,structure:()=>qC});var JC="CDC",qC=[];function ig(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function GC(){this.token(15,"-->")}var sg={};$(sg,{generate:()=>KC,name:()=>HC,parse:()=>ag,structure:()=>ZC});var HC="CDO",ZC=[];function ag(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function KC(){this.token(14,"<!--")}var lg={};$(lg,{generate:()=>eE,name:()=>XC,parse:()=>cg,structure:()=>QC});var YC=46,XC="ClassSelector",QC={name:String};function cg(){return this.eatDelim(YC),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function eE(e){this.token(9,"."),this.token(1,e.name)}var ug={};$(ug,{generate:()=>sE,name:()=>oE,parse:()=>dg,structure:()=>iE});var tE=43,om=47,nE=62,rE=126,oE="Combinator",iE={name:String};function dg(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case nE:case tE:case rE:this.next();break;case om:this.next(),this.eatIdent("deep"),this.eatDelim(om);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e);break}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function sE(e){this.tokenize(e.name)}var pg={};$(pg,{generate:()=>dE,name:()=>cE,parse:()=>fg,structure:()=>uE});var aE=42,lE=47,cE="Comment",uE={value:String};function fg(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===aE&&this.charCodeAt(t-1)===lE&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function dE(e){this.token(25,"/*"+e.value+"*/")}var mg={};$(mg,{generate:()=>xE,name:()=>DE,parse:()=>hg,structure:()=>kE,walkContext:()=>vE});var gg=33,pE=35,fE=36,mE=38,gE=42,hE=43,im=47;function yE(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function wE(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function bE(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(gg)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}var DE="Declaration",vE="declaration",kE={important:[Boolean,String],property:String,value:["Value","Raw"]};function hg(){let e=this.tokenStart,t=this.tokenIndex,n=CE.call(this),r=vc(n),o=r?this.parseCustomProperty:this.parseValue,i=r?wE:yE,s=!1,a;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(r||this.skipSC(),o?a=this.parseWithFallback(bE,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(gg)&&(s=EE.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 xE(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 CE(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case gE:case fE:case hE:case pE:case mE:this.next();break;case im:this.next(),this.isDelim(im)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function EE(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"?!0:e}var yg={};$(yg,{generate:()=>AE,name:()=>SE,parse:()=>wg,structure:()=>_E});var FE=38;function Hl(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var SE="DeclarationList",_E={children:[["Declaration","Atrule","Rule"]]};function wg(){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),Hl));break;default:this.isDelim(FE)?e.push(this.parseWithFallback(this.Rule,Hl)):e.push(this.parseWithFallback(this.Declaration,Hl))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function AE(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}var bg={};$(bg,{generate:()=>PE,name:()=>TE,parse:()=>Dg,structure:()=>OE});var TE="Dimension",OE={value:String,unit:String};function Dg(){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 PE(e){this.token(12,e.value+e.unit)}var vg={};$(vg,{generate:()=>$E,name:()=>IE,parse:()=>kg,structure:()=>jE,walkContext:()=>RE});var IE="Function",RE="function",jE={name:String,children:[[]]};function kg(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 $E(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var xg={};$(xg,{generate:()=>ME,name:()=>NE,parse:()=>Cg,structure:()=>LE,xxx:()=>BE});var BE="XXX",NE="Hash",LE={value:String};function Cg(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function ME(e){this.token(4,"#"+e.value)}var Eg={};$(Eg,{generate:()=>zE,name:()=>WE,parse:()=>Fg,structure:()=>UE});var WE="Identifier",UE={name:String};function Fg(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function zE(e){this.token(1,e.name)}var Sg={};$(Sg,{generate:()=>qE,name:()=>VE,parse:()=>_g,structure:()=>JE});var VE="IdSelector",JE={name:String};function _g(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function qE(e){this.token(9,"#"+e.name)}var Ag={};$(Ag,{generate:()=>ZE,name:()=>GE,parse:()=>Tg,structure:()=>HE});var GE="MediaFeature",HE={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function Tg(){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 ZE(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var Og={};$(Og,{generate:()=>XE,name:()=>KE,parse:()=>Pg,structure:()=>YE});var KE="MediaQuery",YE={children:[["Identifier","MediaFeature","WhiteSpace"]]};function Pg(){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 XE(e){this.children(e)}var Ig={};$(Ig,{generate:()=>tF,name:()=>QE,parse:()=>Rg,structure:()=>eF});var QE="MediaQueryList",eF={children:[["MediaQuery"]]};function Rg(){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 tF(e){this.children(e,()=>this.token(18,","))}var jg={};$(jg,{generate:()=>iF,name:()=>rF,parse:()=>$g,structure:()=>oF});var nF=38,rF="NestingSelector",oF={};function $g(){let e=this.tokenStart;return this.eatDelim(nF),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function iF(){this.token(9,"&")}var Bg={};$(Bg,{generate:()=>lF,name:()=>sF,parse:()=>Ng,structure:()=>aF});var sF="Nth",aF={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function Ng(){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 lF(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}var Lg={};$(Lg,{generate:()=>dF,name:()=>cF,parse:()=>Mg,structure:()=>uF});var cF="Number",uF={value:String};function Mg(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function dF(e){this.token(10,e.value)}var Wg={};$(Wg,{generate:()=>mF,name:()=>pF,parse:()=>Ug,structure:()=>fF});var pF="Operator",fF={value:String};function Ug(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function mF(e){this.tokenize(e.value)}var zg={};$(zg,{generate:()=>yF,name:()=>gF,parse:()=>Vg,structure:()=>hF});var gF="Parentheses",hF={children:[[]]};function Vg(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 yF(e){this.token(21,"("),this.children(e),this.token(22,")")}var Jg={};$(Jg,{generate:()=>DF,name:()=>wF,parse:()=>qg,structure:()=>bF});var wF="Percentage",bF={value:String};function qg(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function DF(e){this.token(11,e.value+"%")}var Gg={};$(Gg,{generate:()=>CF,name:()=>vF,parse:()=>Hg,structure:()=>xF,walkContext:()=>kF});var vF="PseudoClassSelector",kF="function",xF={name:String,children:[["Raw"],null]};function Hg(){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 CF(e){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:()=>_F,name:()=>EF,parse:()=>Kg,structure:()=>SF,walkContext:()=>FF});var EF="PseudoElementSelector",FF="function",SF={name:String,children:[["Raw"],null]};function Kg(){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 _F(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 Yg={};$(Yg,{generate:()=>IF,name:()=>OF,parse:()=>Xg,structure:()=>PF});var AF=47,TF=46;function sm(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);!De(n)&&n!==TF&&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 OF="Ratio",PF={left:String,right:String};function Xg(){let e=this.tokenStart,t=sm.call(this),n;return this.skipSC(),this.eatDelim(AF),n=sm.call(this),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function IF(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}var Qg={};$(Qg,{generate:()=>BF,name:()=>jF,parse:()=>eh,structure:()=>$F});function RF(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var jF="Raw",$F={value:String};function eh(e,t,n){let r=this.getTokenStart(e),o;return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n&&this.tokenStart>r?o=RF.call(this):o=this.tokenStart,{type:"Raw",loc:this.getLocation(r,o),value:this.substring(r,o)}}function BF(e){this.tokenize(e.value)}var th={};$(th,{generate:()=>UF,name:()=>LF,parse:()=>nh,structure:()=>WF,walkContext:()=>MF});function am(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function NF(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}var LF="Rule",MF="rule",WF={prelude:["SelectorList","Raw"],block:["Block"]};function nh(){let e=this.tokenIndex,t=this.tokenStart,n,r;return this.parseRulePrelude?n=this.parseWithFallback(NF,am):n=am.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function UF(e){this.node(e.prelude),this.node(e.block)}var rh={};$(rh,{generate:()=>JF,name:()=>zF,parse:()=>oh,structure:()=>VF});var zF="Selector",VF={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function oh(){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 JF(e){this.children(e)}var ih={};$(ih,{generate:()=>ZF,name:()=>qF,parse:()=>sh,structure:()=>HF,walkContext:()=>GF});var qF="SelectorList",GF="selector",HF={children:[["Selector","Raw"]]};function sh(){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 ZF(e){this.children(e,()=>this.token(18,","))}var ah={};$(ah,{generate:()=>QF,name:()=>YF,parse:()=>dh,structure:()=>XF});var KF={};$(KF,{decode:()=>Ic,encode:()=>uh});var uc=92,lh=34,ch=39;function Ic(e){let t=e.length,n=e.charCodeAt(0),r=n===lh||n===ch?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===uc){if(s===o){s!==t-1&&(i=e.substr(s+1));break}if(a=e.charCodeAt(++s),ct(uc,a)){let l=s-1,c=On(e,l);s=c-1,i+=wc(e.substring(l+1,c))}else a===13&&e.charCodeAt(s+1)===10&&s++}else i+=e[s]}return i}function uh(e,t){let n=t?"'":'"',r=t?ch:lh,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===uc?(o+="\\"+e.charAt(s),i=!1):(i&&(nn(a)||Tn(a))&&(o+=" "),o+=e.charAt(s),i=!1)}return n+o+n}var YF="String",XF={value:String};function dh(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Ic(this.consume(5))}}function QF(e){this.token(5,uh(e.value))}var ph={};$(ph,{generate:()=>o1,name:()=>t1,parse:()=>fh,structure:()=>r1,walkContext:()=>n1});var e1=33;function lm(e){return this.Raw(e,null,!1)}var t1="StyleSheet",n1="stylesheet",r1={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function fh(){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)!==e1){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,lm);break;default:n=this.parseWithFallback(this.Rule,lm)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function o1(e){this.children(e)}var mh={};$(mh,{generate:()=>l1,name:()=>s1,parse:()=>gh,structure:()=>a1});var i1=42,cm=124;function Zl(){this.tokenType!==1&&this.isDelim(i1)===!1&&this.error("Identifier or asterisk is expected"),this.next()}var s1="TypeSelector",a1={name:String};function gh(){let e=this.tokenStart;return this.isDelim(cm)?(this.next(),Zl.call(this)):(Zl.call(this),this.isDelim(cm)&&(this.next(),Zl.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function l1(e){this.tokenize(e.name)}var hh={};$(hh,{generate:()=>f1,name:()=>d1,parse:()=>bh,structure:()=>p1});var yh=43,wh=45,dc=63;function Ro(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let o=this.charCodeAt(r);if(o===wh&&t&&n!==0)return Ro.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(dc);)++t>e&&this.error("Too many question marks"),this.next()}function c1(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===yh?"Plus sign":"Hyphen minus")+" is expected")}function u1(){let e=0;switch(this.tokenType){case 10:if(e=Ro.call(this,1,!0),this.isDelim(dc)){Gi.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){c1.call(this,wh),Ro.call(this,1,!1);break}break;case 12:e=Ro.call(this,1,!0),e>0&&Gi.call(this,6-e);break;default:if(this.eatDelim(yh),this.tokenType===1){e=Ro.call(this,0,!0),e>0&&Gi.call(this,6-e);break}if(this.isDelim(dc)){this.next(),Gi.call(this,5);break}this.error("Hex digit or question mark is expected")}}var d1="UnicodeRange",p1={value:String};function bh(){let e=this.tokenStart;return this.eatIdent("u"),u1.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function f1(e){this.tokenize(e.value)}var Dh={};$(Dh,{generate:()=>v1,name:()=>b1,parse:()=>Ch,structure:()=>D1});var m1={};$(m1,{decode:()=>kh,encode:()=>xh});var g1=32,pc=92,h1=34,y1=39,w1=40,vh=41;function kh(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===vh?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===pc){if(i===r){i!==t-1&&(o=e.substr(i+1));break}if(s=e.charCodeAt(++i),ct(pc,s)){let a=i-1,l=On(e,a);i=l-1,o+=wc(e.substring(a+1,l))}else s===13&&e.charCodeAt(i+1)===10&&i++}else o+=e[i]}return o}function xh(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===g1||o===pc||o===h1||o===y1||o===w1||o===vh?(t+="\\"+e.charAt(r),n=!1):(n&&nn(o)&&(t+=" "),t+=e.charAt(r),n=!1)}return"url("+t+")"}var b1="Url",D1={value:String};function Ch(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=kh(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=Ic(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 v1(e){this.token(7,xh(e.value))}var Eh={};$(Eh,{generate:()=>C1,name:()=>k1,parse:()=>Fh,structure:()=>x1});var k1="Value",x1={children:[[]]};function Fh(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function C1(e){this.children(e)}var Sh={};$(Sh,{generate:()=>_1,name:()=>F1,parse:()=>_h,structure:()=>S1});var E1=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),F1="WhiteSpace",S1={value:String};function _h(){return this.eat(13),E1}function _1(e){this.token(13,e.value)}var A1={generic:!0,...mC,node:Pc},Ah={};$(Ah,{AtrulePrelude:()=>j1,Selector:()=>q1,Value:()=>Z1});var T1=35,O1=42,um=43,P1=45,I1=47,R1=117;function Th(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,R1)&&this.cmpChar(this.tokenStart+1,um)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===I1||t===O1||t===um||t===P1)return this.Operator();t===T1&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var j1={getNode:Th},$1=35,B1=38,N1=42,L1=43,M1=47,dm=46,W1=62,U1=124,z1=126;function V1(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function J1(){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)===dm&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case L1:case W1:case z1:case M1:return this.Combinator();case dm:return this.ClassSelector();case N1:case U1:return this.TypeSelector();case $1:return this.IdSelector();case B1:return this.NestingSelector()}break}}}var q1={onWhiteSpace:V1,getNode:J1};function G1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function H1(){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 pm(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}var Z1={getNode:Th,onWhiteSpace(e,t){pm(e)&&(e.value=" "+e.value),pm(t.last)&&(t.last.value+=" ")},expression:G1,var:H1},K1={parse:{prelude:null,block(){return this.Block(!0)}}},Y1={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}},X1={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},Q1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},eS={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};function tS(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function nS(){return this.skipSC(),this.tokenType===1&&this.lookupNonWSType(1)===16?this.createSingleNodeList(this.Declaration()):Oh.call(this)}function Oh(){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(tS,this.scope.AtrulePrelude);break;case 1:t=this.Identifier();break;case 21:t=this.Parentheses(nS,this.scope.AtrulePrelude);break;default:break e}e.push(t)}return e}var rS={parse:{prelude(){let e=Oh.call(this);return this.getFirstListNode(e)===null&&this.error("Condition is expected"),e},block(e=!1){return this.Block(e)}}},oS={"font-face":K1,import:Y1,media:X1,nest:Q1,page:eS,supports:rS},_n={parse(){return this.createSingleNodeList(this.SelectorList())}},Kl={parse(){return this.createSingleNodeList(this.Selector())}},fm={parse(){return this.createSingleNodeList(this.Identifier())}},Hi={parse(){return this.createSingleNodeList(this.Nth())}},iS={dir:fm,has:_n,lang:fm,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:Kl,host:Kl,"host-context":Kl},Ph={};$(Ph,{AnPlusB:()=>Jm,Atrule:()=>Gm,AtrulePrelude:()=>Zm,AttributeSelector:()=>Xm,Block:()=>tg,Brackets:()=>rg,CDC:()=>ig,CDO:()=>ag,ClassSelector:()=>cg,Combinator:()=>dg,Comment:()=>fg,Declaration:()=>hg,DeclarationList:()=>wg,Dimension:()=>Dg,Function:()=>kg,Hash:()=>Cg,IdSelector:()=>_g,Identifier:()=>Fg,MediaFeature:()=>Tg,MediaQuery:()=>Pg,MediaQueryList:()=>Rg,NestingSelector:()=>$g,Nth:()=>Ng,Number:()=>Mg,Operator:()=>Ug,Parentheses:()=>Vg,Percentage:()=>qg,PseudoClassSelector:()=>Hg,PseudoElementSelector:()=>Kg,Ratio:()=>Xg,Raw:()=>eh,Rule:()=>nh,Selector:()=>oh,SelectorList:()=>sh,String:()=>dh,StyleSheet:()=>fh,TypeSelector:()=>gh,UnicodeRange:()=>bh,Url:()=>Ch,Value:()=>Fh,WhiteSpace:()=>_h});var sS={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:Ah,atrule:oS,pseudo:iS,node:Ph},aS={node:Pc},lS=fC({...A1,...sS,...aS});var cS={};$(cS,{decode:()=>uS,encode:()=>dS});var mm=92;function uS(e){let t=e.length-1,n="";for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===mm){if(r===t)break;if(o=e.charCodeAt(++r),ct(mm,o)){let i=r-1,s=On(e,i);r=s-1,n+=wc(e.substring(i+1,s))}else o===13&&e.charCodeAt(r+1)===10&&r++}else n+=e[r]}return n}function dS(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}hc(r)?t+=e.charAt(n):t+="\\"+e.charAt(n)}return t}var{tokenize:FI,parse:Ih,generate:Rh,lexer:SI,createLexer:_I,walk:jh,find:AI,findLast:TI,findAll:OI,toPlainObject:PI,fromPlainObject:II,fork:RI}=lS;var $h=w(require("prettier"));J();var pS=`
55
55
  .w-icon-slider-right:before {
56
56
  content: "\\e600";
57
57
  }
@@ -70,19 +70,19 @@ in your project root.`),new h(a)}}function Fp(e){if(!(e===void 0||e===!1)){if(ty
70
70
  .w-icon-file-upload-icon:before {
71
71
  content: "\\e903";
72
72
  }
73
- `;function l1(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 he().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 Jh(e){if(d.info("Detected skipTagSelectors flag is enabled. Skipping global CSS tags."),!e)return"";try{let t=zh(e);return Gh(t,{enter:l1}),qh.default.format([Vh(t),a1].join(`
73
+ `;function fS(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 he().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 Bh(e){if(d.info("Detected skipTagSelectors flag is enabled. Skipping global CSS tags."),!e)return"";try{let t=Ih(e);return jh(t,{enter:fS}),$h.default.format([Rh(t),pS].join(`
74
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 Hh(e){return e.reduce((t,n)=>(n.path==="css/global.css"?t.globalCss=n:t.rest.push(n),t),{rest:[]})}var ir=class extends Error{};function c1(e){try{let t=JSON.parse(e);if(t.msg&&typeof t.msg=="string")return t.msg}catch{}return null}async function u1(e){switch(e.status){case 400:{let t=await e.text(),n=c1(t);throw new ir(n||"Bad request: The server rejected the request due to invalid input. Please check your configuration and try again.")}case 401:throw new ir("Your access token is invalid for the provided siteId. Double check your configs in your .webflowrc configuration file.");case 404:throw new ir("You're not currently enrolled in the DevLink beta. You can apply for access here: https://webflow.com/devlink");default:throw new ir(`Something went wrong (HTTP ${e.status}).`)}}async function d1(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 Z(`${n}/devlink/${t}${l}`,{headers:{Authorization:`Bearer ${r}`},timeout:6e4});return c.ok?await c.json():u1(c)}catch(t){throw new h(t,{skipLogging:!0})}}async function Kl(e){try{let t=await d1(e);if(!t.files||!Array.isArray(t.files))throw new h("Invalid response format from V1 API: expected 'files' array");let n=p1(t.files,e),r=t.metadata?.exportCoverage==="full";return await li(n,e.rootDir,r),{messages:t.messages}}catch(t){throw t instanceof h?t:new h(t,{skipLogging:!0})}}function p1(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}=Hh(e);if(s){let a=Jh(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=f1(a,t.envVariables)),{path:s,content:a}})}function f1(e,t){return t?Object.entries(t).reduce((n,[r,o])=>n.replace(new RegExp(`DEVLINK_ENV_${r}`,"g"),o.trim()),e):e}var mn=w(require("process"));G();ye();it();var Zl=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;Z(`${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:mn.default.platform,node:mn.default.version})})}async storeChoice(t){try{return oe({devlink:{allowTelemetry:t}})}catch{let r=await Hn();await op({...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 $i(e){return async function(n){mn.default.removeListener("uncaughtException",$i),mn.default.removeListener("unhandledRejection",$i);let r=await si(e);if(!r)return;await new Zl(r,n).prompt()}}function Kh(e){mn.default.on("uncaughtException",$i(e)),mn.default.on("unhandledRejection",$i(e))}Ie();G();je();ye();Yl();async function Zh(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:ii(e),overwriteModule:!1}:{overwriteModule:!0}};Kh(s);let a=await si(s);if(!a)return Xl.default.exit();let l;try{l=J.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 Kl(a);c.succeed(`Successfully exported components into ${a.rootDir} folder`),ji(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:Xl.default.argv.slice(2)}),u}}oc();var qt=require("commander");var is=require("path"),fr=require("@webflow/data-types");le();var zi=require("fs"),ic=w(require("md5"));function sc(e,t){try{let n=(0,zi.statSync)(e),r=(0,zi.readFileSync)(e);return{value:r,meta:{title:e.replace(/^.*[\\\/]/,""),fileHash:(0,ic.default)(r),size:n.size,...t||{}}}}catch{throw new Error(`File '${e}' not found`)}}function fo(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,ic.default)(o),size:r,...n}}}catch{throw new Error(`Error parsing '${t}' inline file`)}}var bg=w(require("node-fetch")),wg=w(require("form-data"));async function mo(e,t){let n={...t.fields,file:e.value},r=new wg.default;Object.entries(n).forEach(([i,s])=>{r.append(i,s)});let o=await(0,bg.default)("https://"+t.fields.bucket+".s3.amazonaws.com",{method:"POST",body:r});v1(o)}function v1(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}`)}}G();ye();Ie();le();it();function x1({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:`${P}/v2/sites/${t}`,authToken:e}}return{baseUrl:`${P}/v2/workspaces`,authToken:e}}function C1(e){if(e)return JSON.stringify(Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)))}async function E1(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 zt({endpoint:e,method:t="GET",body:n,options:r}){let{baseUrl:o,authToken:i}=x1(r),s=`${o.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`,a=await Z(s,{method:t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:C1(n)});return await E1(a),a.json()}async function ac({options:e}){return(await zt({endpoint:"/code_libraries",options:e})).payload.workspaces[0]}async function lc({name:e,description:t,slug:n,options:r}){return(await zt({method:"POST",endpoint:"/code_library/init",body:{name:e,description:t,slug:n},options:r})).payload}async function cc({resourceId:e,files:t,options:n}){return(await zt({method:"POST",endpoint:`/code_library/${e}/files`,body:{files:t},options:n})).payload}async function uc({resourceId:e,codeModule:t,components:n,options:r}){return(await zt({method:"POST",endpoint:`/code_library/${e}/share`,body:{codeModule:t,components:n},options:r})).payload}var uy=require("path"),dy=w(require("webpack-merge")),hn=require("@webflow/data-types");le();G();var vg=require("memfs/lib/volume"),ho=require("@webflow/data-types");var ut="./tmp_entry",Dg="components";function F1(e){let t=_1(e);return/^[a-zA-Z]/.test(t.charAt(0))?t:"_"+t}function kg(e,t){let n=e.map(({name:l,path:c,isDefaultExport:u})=>u?`import ${l} from "${c}";`:`import { ${l} } from "${c}";`).join(`
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 Nh(e){return e.reduce((t,n)=>(n.path==="css/global.css"?t.globalCss=n:t.rest.push(n),t),{rest:[]})}var Sr=class extends Error{};function mS(e){try{let t=JSON.parse(e);if(t.msg&&typeof t.msg=="string")return t.msg}catch{}return null}async function gS(e){switch(e.status){case 400:{let t=await e.text(),n=mS(t);throw new Sr(n||"Bad request: The server rejected the request due to invalid input. Please check your configuration and try again.")}case 401:throw new Sr("Your access token is invalid for the provided siteId. Double check your configs in your .webflowrc configuration file.");case 404:throw new Sr("You're not currently enrolled in the DevLink beta. You can apply for access here: https://webflow.com/devlink");default:throw new Sr(`Something went wrong (HTTP ${e.status}).`)}}async function hS(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():gS(c)}catch(t){throw new g(t,{skipLogging:!0})}}async function Rc(e){try{let t=await hS(e);if(!t.files||!Array.isArray(t.files))throw new g("Invalid response format from V1 API: expected 'files' array");let n=yS(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 yS(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}=Nh(e);if(s){let a=Bh(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=wS(a,t.envVariables)),{path:s,content:a}})}function wS(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 hr();await Hp({...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 Lh(e){Pn.default.on("uncaughtException",ms(e)),Pn.default.on("unhandledRejection",ms(e))}Be();J();We();ke();$c();async function Mh(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}};Lh(s);let a=await Li(s);if(!a)return Bc.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 Rc(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:Bc.default.argv.slice(2)}),u}}zc();var an=require("commander");var Ls=require("path"),jr=require("@webflow/data-types");le();var ks=require("fs"),Vc=w(require("md5"));function Jc(e,t){try{let n=(0,ks.statSync)(e),r=(0,ks.readFileSync)(e);return{value:r,meta:{title:e.replace(/^.*[\\\/]/,""),fileHash:(0,Vc.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,Vc.default)(o),size:r,...n}}}catch{throw new Error(`Error parsing '${t}' inline file`)}}var ly=w(require("node-fetch")),cy=w(require("form-data"));async function Uo(e,t){let n={...t.fields,file:e.value},r=new cy.default;Object.entries(n).forEach(([i,s])=>{r.append(i,s)});let o=await(0,ly.default)("https://"+t.fields.bucket+".s3.amazonaws.com",{method:"POST",body:r});SS(o)}function SS(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 _S({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 AS(e){if(e)return JSON.stringify(Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)))}async function TS(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}=_S(r),s=`${o.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`,a=await K(s,{method:t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:AS(n)});return await TS(a),a.json()}async function qc({options:e}){return(await rn({endpoint:"/code_libraries",options:e})).payload.workspaces[0]}async function Gc({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 Hc({resourceId:e,files:t,options:n}){return(await rn({method:"POST",endpoint:`/code_library/${e}/files`,body:{files:t},options:n})).payload}async function Zc({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 ew=require("path"),tw=w(require("webpack-merge")),In=require("@webflow/data-types");le();J();var py=require("memfs/lib/volume"),zo=require("@webflow/data-types");var vt="./tmp_entry",uy="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 OS(e){let t=xs(e);return/^[a-zA-Z]/.test(t.charAt(0))?t:"_"+t}function dy(e,t){let n=e.map(({name:l,path:c,isDefaultExport:u})=>u?`import ${l} from "${c}";`:`import { ${l} } from "${c}";`).join(`
76
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}
77
77
 
78
- export default { ${[i,s,a].filter(Boolean).join(", ")} };`}function xg(e,t,n){let r={},o=`${ut}/Client.js`,i=`${ut}/Server.js`;r[o]=kg([{name:"ClientRenderer",path:e.client,exportKey:"Renderer",type:"internal"}],ho.Environment.Client);let s={},a=c=>{let u=F1(c);return s[u]?(s[u]+=1,`${u}${s[u]}`):(s[u]=1,u)};r[i]=kg([{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(ut)?u.replace(`${ut}/`,"./"):u;return{name:p,path:f,exportKey:c,isDefaultExport:!0,type:"component"}})],ho.Environment.Server);let l={[ho.Environment.Client]:o,[ho.Environment.Server]:i};return{entryPointsVolume:vg.Volume.fromJSON(r),paths:l}}var _1=e=>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,"");var py=require("memfs/lib/volume");var Sg=w(require("archiver")),sr=require("path");le();var go=require("@webflow/data-types");le();G();var Vt=e=>e.endsWith("/")||/%2F$/i.test(e)?e:`${e}/`;var Cg=2;function Eg(e){let t={type:go.ModuleLoader.FEDERATION,version:Cg,entry:ma,renderer:Wr,components:e};return{title:Ur,content:JSON.stringify(t)}}function Fg(e){let t={type:go.ModuleLoader.SSR,version:Cg,entry:Gn,components:e};return{title:Ur,content:JSON.stringify(t)}}function _g(e){let t=`/${go.Environment.Client}/${ma}`;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===Wr||(i[a]={css:[]},s.assets.css.sync.forEach(l=>{i[a].css.push(`${Vt(o)}${l}`)})),i},{})}}catch(n){d.error(n,{prefix:"Failed to extract components metadata from MF manifest:"})}return{}}var Vi=require("@webflow/data-types"),S1=/\.css$/i;async function Tg(e,t,n){let r=!1;return new Promise(async(o,i)=>{e.length===0&&i(new Error("No assets to bundle"));let s=`/${Vi.Environment.Server}/${zr}`,a=(0,Sg.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:zr,info:{},size:a.pointer(),emitted:!0,comparedForEmit:!1,cached:!1};return e.forEach(f=>{let m=(0,sr.resolve)((0,sr.join)(`/${Vi.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}=Fg(n);a.append(u,{name:c}),e.forEach(p=>{if(!S1.test(p.name))try{let f=(0,sr.resolve)((0,sr.join)(`/${Vi.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 Ag=require("@webflow/data-types");async function Og(e,t,n){let{title:r,content:o}=Eg(n);await t.promises.writeFile(`/${Ag.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 ry=require("@rspack/core"),oy=w(require("fork-ts-checker-webpack-plugin")),iy=require("ts-checker-rspack-plugin"),sy=w(require("mini-css-extract-plugin")),ay=require("@webflow/data-types");var Pg=require("webpack"),pc=w(require("mini-css-extract-plugin")),Rg=w(require("tsconfig-paths-webpack-plugin")),$g=require("tsconfig-paths"),fc=require("@webflow/data-types"),jg=require("path");le();var Ig=w(require("postcss-selector-parser")),dc=()=>({postcssPlugin:"CSSinShadowDOM",Once(e){e.walkRules(t=>{t.selector=(0,Ig.default)(n=>{n.walkPseudos(r=>{r.value===":root"&&(r.value=":host")})}).processSync(t.selector)})}});dc.postcss=!0;dc.postcssPlugin="CSSinShadowDOM";var Gi=dc;function T1(){return(0,$g.loadConfig)(process.cwd()).resultType==="success"}function Bg({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:pc.default.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[Gi]}}}]},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new pc.default({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:{plugins:[T1()?new Rg.default:null].filter(Boolean)},performance:{hints:!1}};if(t===fc.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,jg.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===fc.Environment.Server)return{...s,plugins:[...s.plugins||[],new Pg.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:Gn,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var Ng=require("@module-federation/enhanced"),mc=require("@webflow/data-types");function Lg({libraryName:e,env:t,exposes:n}){if(t===mc.Environment.Client)return{plugins:[new Ng.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===mc.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}function Mg(){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 qi(){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 Ji=require("@rspack/core"),Ug=require("tsconfig-paths"),hc=require("@webflow/data-types"),Wg=require("path");le();function A1(){let e=(0,Ug.loadConfig)(process.cwd());if(e.resultType==="success")return e.configFileAbsolutePath}function zg({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:Ji.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:[Gi]}}}],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 Ji.rspack.CssExtractRspackPlugin({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:(()=>{let a=A1();return a?{tsConfig:{configFile:a}}:{}})(),performance:{hints:!1}};if(t===hc.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,Wg.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===hc.Environment.Server)return{...s,plugins:[...Array.isArray(s.plugins)?s.plugins:[],new Ji.rspack.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:Gn,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var Vg=require("@module-federation/enhanced/rspack"),gc=require("@webflow/data-types");function Gg({libraryName:e,env:t,exposes:n}){if(t===gc.Environment.Client)return{plugins:[new Vg.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===gc.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}var I1=w(require("fs")),qg=require("unionfs"),Jg=require("webpack");function O1(e){return{name:e.name,size:e.size,emitted:e.emitted,info:e.info}}function Hi(e){let t=e.toJson();return{hasErrors:()=>e.hasErrors(),hasWarnings:()=>e.hasWarnings(),toString:n=>e.toString(n),toJson:()=>({...t,assets:(t.assets??[]).map(O1)})}}async function Hg({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((s,a)=>(s.use(a),s),new qg.Union().use(I1));return new Promise((s,a)=>{let l=(0,Jg.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(Hi(u)):a(new Error("Webpack stats are undefined"))})})})}var P1=w(require("fs")),yc=w(require("webpack-merge")),Kg=require("memfs"),Zg=require("unionfs"),Yg=require("@rspack/core");async function Ki({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((a,l)=>(a.use(l),a),new Zg.Union().use(P1)),s=e;return t.length>0&&(s=(0,yc.default)(s,{experiments:{...e.experiments,useInputFileSystem:[/./]}})),n&&(s=(0,yc.default)(s,{output:{clean:!1,...r&&{path:r}}})),new Promise((a,l)=>{let c=(0,Yg.rspack)(s);c.inputFileSystem=i,n&&(c.outputFileSystem=(0,Kg.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(Hi(p)):l(new Error("Rspack stats are undefined"))})})})}var Qg=require("@module-federation/enhanced");var ar=w(require("webpack-merge"));G();function Gt(e){return e!==null&&typeof e=="object"&&"constructor"in e?e.constructor.name??"":""}function Xg(e,t){let n=Object.entries(e).filter(([r])=>!t.includes(r));return Object.fromEntries(n)}function Yi(e){let{deduplicatePluginNames:t,ModuleFederationPluginClass:n,getPluginOptions:r,filterOverridePlugins:o}=e;return function(s,a,l){let c=["entry","output","target"],u=R1(s),p=Array.isArray(l)?Zi(...l.map(u)):Zi(u(l));Object.keys(p).some(R=>c.includes(R))&&d.warn(`Cannot override blocked properties: ${c.join(", ")}`);let m={...Xg(p,[...c,"ModuleFederationPlugin","module","plugins"]),module:Xg(p.module??{},["rules"])},g=(0,ar.default)(a,m),k=p.plugins??[];o&&(k=k.filter(o));let C=a.plugins??[],I=(0,ar.mergeWithCustomize)({customizeArray:(0,ar.unique)("plugins",t,R=>Gt(R))})({plugins:k},{plugins:C}).plugins,E=p?.ModuleFederationPlugin?.shared,x=I?.map(R=>{if(Gt(R)==="ModuleFederationPlugin"){let _=r(R);return new n({..._,...E?{shared:E}:{}})}return R});g.plugins=x;let V=p.module?.rules;if(V&&typeof V=="function"){let R=a.module?.rules??[];g.module={...g.module??{},rules:V(R)}}return g}}function Zi(...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 R1(e){return t=>typeof t=="function"?t(e):t}var $1=Yi({deduplicatePluginNames:["ModuleFederationPlugin","MiniCssExtractPlugin"],ModuleFederationPluginClass:Qg.ModuleFederationPlugin,getPluginOptions:e=>e._options??{}});function ey(e,t,n){return $1(e,t,n)}var ty=require("@module-federation/enhanced/rspack");var j1=Yi({deduplicatePluginNames:["ModuleFederationPlugin","CssExtractRspackPlugin"],ModuleFederationPluginClass:ty.ModuleFederationPlugin,getPluginOptions:e=>e._options??{},filterOverridePlugins:e=>Gt(e)!=="MiniCssExtractPlugin"});function ny(e,t,n){return j1(e,t,n)}var bc={[ay.Framework.React]:{generateWebpackBundlerConfig:Mg,generateRspackBundlerConfig:qi}},B1={webpack:{generateBaseConfig:Bg,getFrameworkConfig:(e,t)=>bc[e].generateWebpackBundlerConfig(t),generateFederationConfig:Lg,mergeConfigs:(e,t,n)=>ey(e,t,n),bundle:e=>Hg({...e,config:e.config}),typeCheckerPlugin:oy.default,hashFunction:"md5",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>Gt(t)==="MiniCssExtractPlugin"?new sy.default({filename:"[name].[contenthash].css"}):t)})},rspack:{generateBaseConfig:zg,getFrameworkConfig:(e,t)=>bc[e].generateRspackBundlerConfig(t),generateFederationConfig:Gg,mergeConfigs:(e,t,n)=>ny(e,t,n),bundle:e=>Ki({...e,config:e.config}),typeCheckerPlugin:iy.TsCheckerRspackPlugin,hashFunction:"md4",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>Gt(t)==="CssExtractRspackPlugin"?new ry.CssExtractRspackPlugin({filename:"[name].[contenthash].css"}):t)})}},lr=e=>B1[e],ly=e=>!!bc[e];var cy={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 Xi(e){let t=e.bundler??"webpack";d.debug("Generating entry points...");let{entryPointsVolume:n,paths:r}=xg(e.renderer,e.componentsFiles,e.componentsOptions),o=py.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=lr(t),a=C=>{let O=N1({env:C,mode:e.dev?"development":"production",framework:e.framework,publicPath:e.publicPath,components:e.componentsFiles,entryPaths:r,libraryName:e.libraryIdentifier,bundler:t}),I=s.mergeConfigs(C,O,i);return e?.debugBundler&&(d.info(`${t} config for env ${C}:`),d.dir(I)),I},l={sourceVolumes:[...e.sourceVolumes,n],outputVolume:o,failOnWarnings:e.failOnWarnings},[c,u]=await Promise.all([s.bundle({...l,config:a(hn.Environment.Server),outputPath:`/${hn.Environment.Server}`}),s.bundle({...l,config:a(hn.Environment.Client),outputPath:`/${hn.Environment.Client}`})]);e?.debugBundler&&(d.debug(o.toTree()),d.debug(`Server Bundler Stats: ${c.toString(cy)}`),d.debug(`Client Bundler Stats: ${u.toString(cy)}`));let p=_g(o);d.debug("Packaging server bundle...");let f=await Tg(c.toJson().assets||[],o,p);d.debug("Packaging client bundle...");let m=await Og(u.toJson().assets||[],o,p),g=C=>O=>[O,C];return{outputFiles:[...f.map(g(hn.Environment.Server)),...m.map(g(hn.Environment.Client))],outputVolume:o}}function N1({env:e,mode:t="production",framework:n,publicPath:r,components:o,entryPaths:i,libraryName:s,outputPath:a,bundler:l="webpack"}){if(!ly(n))throw new Error(`Unknown framework: ${n}`);let c=Object.entries({[Wr]:i[e],...o}).reduce((g,[k,C])=>({...g,[`./${k}`]:`./${(0,uy.relative)(process.cwd(),C)}`}),{}),u=lr(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,dy.default)(p,f,m)}var hy=w(require("path")),Dc=require("memfs/lib/volume"),kc=w(require("webpack-merge")),gy=w(require("webpack-node-externals")),Ve=require("@webflow/data-types");var L1=w(require("fs")),cr=require("path"),ur=require("webpack");function M1(e,t=L1){let n=(0,cr.join)(process.cwd(),"node_modules",e);for(;n!==(0,cr.dirname)(n)&&n!=="node_modules";){let r=(0,cr.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,cr.dirname)(n)}return null}var Qi=class{apply(t){t.hooks.compilation.tap("ProcessSourceMapsPlugin",function(n){n.hooks.processAssets.tap({name:"ProcessSourceMapsPlugin",stage:ur.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 g=m.match(/^external \S+ "(.+)"$/)?.[1];if(!g)throw new Error(`Could not extract package name from ${m}`);let k=M1(g,n.inputFileSystem);if(!k)throw new Error(`Could not find package information for ${g}`);k&&p.add(k)}}),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 ur.sources.RawSource(JSON.stringify({sources:s,dependencies:[...a]})))})}catch(r){n.errors.push(new ur.WebpackError(`[ProcessSourceMapsPlugin] Could not process source maps: ${r instanceof Error?r.stack:String(r)}`))}})})}};var fy=w(require("module")),my=require("jsdom"),wc="__webflowCliImportModuleWindow__";function U1(e){let n=/^(?:\ufeff?\s*)(?:'use strict'|"use strict");?\s*(?:\r?\n|\r)?/.exec(e),r=!!n,o=`module[${JSON.stringify(wc)}]`,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(`
78
+ export default { ${[i,s,a].filter(Boolean).join(", ")} };`}function fy(e,t,n){let r={},o=`${vt}/Client.js`,i=`${vt}/Server.js`;r[o]=dy([{name:"ClientRenderer",path:e.client,exportKey:"Renderer",type:"internal"}],zo.Environment.Client);let s={},a=c=>{let u=OS(c);return s[u]?(s[u]+=1,`${u}${s[u]}`):(s[u]=1,u)};r[i]=dy([{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:py.Volume.fromJSON(r),paths:l}}var nw=require("memfs/lib/volume");var wy=w(require("archiver")),_r=require("path");le();var Vo=require("@webflow/data-types");le();J();var on=e=>e.endsWith("/")||/%2F$/i.test(e)?e:`${e}/`;var my=2;function gy(e){let t={type:Vo.ModuleLoader.FEDERATION,version:my,entry:Qa,renderer:yo,components:e};return{title:ho,content:JSON.stringify(t)}}function hy(e){let t={type:Vo.ModuleLoader.SSR,version:my,entry:fr,components:e};return{title:ho,content:JSON.stringify(t)}}function yy(e){let t=`/${Vo.Environment.Client}/${Qa}`;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"),PS=/\.css$/i;async function by(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,wy.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,_r.resolve)((0,_r.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}=hy(n);a.append(u,{name:c}),e.forEach(p=>{if(!PS.test(p.name))try{let f=(0,_r.resolve)((0,_r.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 Dy=require("@webflow/data-types");async function vy(e,t,n){let{title:r,content:o}=gy(n);await t.promises.writeFile(`/${Dy.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 Gy=require("@rspack/core"),Hy=w(require("fork-ts-checker-webpack-plugin")),Zy=require("ts-checker-rspack-plugin"),Ky=w(require("mini-css-extract-plugin")),Yy=require("@webflow/data-types");var xy=require("webpack"),Yc=w(require("mini-css-extract-plugin")),Cy=w(require("tsconfig-paths-webpack-plugin")),Ey=require("tsconfig-paths"),Xc=require("@webflow/data-types"),Fy=require("path");le();var ky=w(require("postcss-selector-parser")),Kc=()=>({postcssPlugin:"CSSinShadowDOM",Once(e){e.walkRules(t=>{t.selector=(0,ky.default)(n=>{n.walkPseudos(r=>{r.value===":root"&&(r.value=":host")})}).processSync(t.selector)})}});Kc.postcss=!0;Kc.postcssPlugin="CSSinShadowDOM";var Es=Kc;function IS(){return(0,Ey.loadConfig)(process.cwd()).resultType==="success"}function Sy({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:Yc.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 Yc.default({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:{plugins:[IS()?new Cy.default:null].filter(Boolean)},performance:{hints:!1}};if(t===Xc.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,Fy.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===Xc.Environment.Server)return{...s,plugins:[...s.plugins||[],new xy.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:fr,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var _y=require("@module-federation/enhanced"),Qc=require("@webflow/data-types");function Ay({libraryName:e,env:t,exposes:n}){if(t===Qc.Environment.Client)return{plugins:[new _y.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===Qc.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}function Ty(){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"),Oy=require("tsconfig-paths"),eu=require("@webflow/data-types"),Py=require("path");le();function RS(){let e=(0,Oy.loadConfig)(process.cwd());if(e.resultType==="success")return e.configFileAbsolutePath}function Iy({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=RS();return a?{tsConfig:{configFile:a}}:{}})(),performance:{hints:!1}};if(t===eu.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,Py.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===eu.Environment.Server)return{...s,plugins:[...Array.isArray(s.plugins)?s.plugins:[],new Ss.rspack.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:fr,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var Ry=require("@module-federation/enhanced/rspack"),tu=require("@webflow/data-types");function jy({libraryName:e,env:t,exposes:n}){if(t===tu.Environment.Client)return{plugins:[new Ry.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===tu.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}var $S=w(require("fs")),$y=require("unionfs"),By=require("webpack");function jS(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(jS)})}}async function Ny({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((s,a)=>(s.use(a),s),new $y.Union().use($S));return new Promise((s,a)=>{let l=(0,By.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 BS=w(require("fs")),nu=w(require("webpack-merge")),Ly=require("memfs"),My=require("unionfs"),Wy=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 My.Union().use(BS)),s=e;return t.length>0&&(s=(0,nu.default)(s,{experiments:{...e.experiments,useInputFileSystem:[/./]}})),n&&(s=(0,nu.default)(s,{output:{clean:!1,...r&&{path:r}}})),new Promise((a,l)=>{let c=(0,Wy.rspack)(s);c.inputFileSystem=i,n&&(c.outputFileSystem=(0,Ly.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 zy=require("@module-federation/enhanced");var Ar=w(require("webpack-merge"));J();function sn(e){return e!==null&&typeof e=="object"&&"constructor"in e?e.constructor.name??"":""}function Uy(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=NS(s),p=Array.isArray(l)?Ts(...l.map(u)):Ts(u(l));Object.keys(p).some(R=>c.includes(R))&&d.warn(`Cannot override blocked properties: ${c.join(", ")}`);let m={...Uy(p,[...c,"ModuleFederationPlugin","module","plugins"]),module:Uy(p.module??{},["rules"])},h=(0,Ar.default)(a,m),v=p.plugins??[];o&&(v=v.filter(o));let k=a.plugins??[],P=(0,Ar.mergeWithCustomize)({customizeArray:(0,Ar.unique)("plugins",t,R=>sn(R))})({plugins:v},{plugins:k}).plugins,C=p?.ModuleFederationPlugin?.shared,x=P?.map(R=>{if(sn(R)==="ModuleFederationPlugin"){let S=r(R);return new n({...S,...C?{shared:C}:{}})}return R});h.plugins=x;let z=p.module?.rules;if(z&&typeof z=="function"){let R=a.module?.rules??[];h.module={...h.module??{},rules:z(R)}}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 NS(e){return t=>typeof t=="function"?t(e):t}var LS=Os({deduplicatePluginNames:["ModuleFederationPlugin","MiniCssExtractPlugin"],ModuleFederationPluginClass:zy.ModuleFederationPlugin,getPluginOptions:e=>e._options??{}});function Vy(e,t,n){return LS(e,t,n)}var Jy=require("@module-federation/enhanced/rspack");var MS=Os({deduplicatePluginNames:["ModuleFederationPlugin","CssExtractRspackPlugin"],ModuleFederationPluginClass:Jy.ModuleFederationPlugin,getPluginOptions:e=>e._options??{},filterOverridePlugins:e=>sn(e)!=="MiniCssExtractPlugin"});function qy(e,t,n){return MS(e,t,n)}var ru={[Yy.Framework.React]:{generateWebpackBundlerConfig:Ty,generateRspackBundlerConfig:Fs}},WS={webpack:{generateBaseConfig:Sy,getFrameworkConfig:(e,t)=>ru[e].generateWebpackBundlerConfig(t),generateFederationConfig:Ay,mergeConfigs:(e,t,n)=>Vy(e,t,n),bundle:e=>Ny({...e,config:e.config}),typeCheckerPlugin:Hy.default,hashFunction:"md5",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>sn(t)==="MiniCssExtractPlugin"?new Ky.default({filename:"[name].[contenthash].css"}):t)})},rspack:{generateBaseConfig:Iy,getFrameworkConfig:(e,t)=>ru[e].generateRspackBundlerConfig(t),generateFederationConfig:jy,mergeConfigs:(e,t,n)=>qy(e,t,n),bundle:e=>As({...e,config:e.config}),typeCheckerPlugin:Zy.TsCheckerRspackPlugin,hashFunction:"md4",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>sn(t)==="CssExtractRspackPlugin"?new Gy.CssExtractRspackPlugin({filename:"[name].[contenthash].css"}):t)})}},Tr=e=>WS[e],Xy=e=>!!ru[e];var Qy={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}=fy(e.renderer,e.componentsFiles,e.componentsOptions),o=nw.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=Tr(t),a=k=>{let T=US({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(Qy)}`),d.debug(`Client Bundler Stats: ${u.toString(Qy)}`));let p=yy(o);d.debug("Packaging server bundle...");let f=await by(c.toJson().assets||[],o,p);d.debug("Packaging client bundle...");let m=await vy(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 US({env:e,mode:t="production",framework:n,publicPath:r,components:o,entryPaths:i,libraryName:s,outputPath:a,bundler:l="webpack"}){if(!Xy(n))throw new Error(`Unknown framework: ${n}`);let c=Object.entries({[yo]:i[e],...o}).reduce((h,[v,k])=>({...h,[`./${v}`]:`./${(0,ew.relative)(process.cwd(),k)}`}),{}),u=Tr(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,tw.default)(p,f,m)}var iw=w(require("path")),iu=require("memfs/lib/volume"),su=w(require("webpack-merge")),sw=w(require("webpack-node-externals")),Ke=require("@webflow/data-types");var zS=w(require("fs")),Or=require("path"),Pr=require("webpack");function VS(e,t=zS){let n=(0,Or.join)(process.cwd(),"node_modules",e);for(;n!==(0,Or.dirname)(n)&&n!=="node_modules";){let r=(0,Or.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,Or.dirname)(n)}return null}var Is=class{apply(t){t.hooks.compilation.tap("ProcessSourceMapsPlugin",function(n){n.hooks.processAssets.tap({name:"ProcessSourceMapsPlugin",stage:Pr.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=VS(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 Pr.sources.RawSource(JSON.stringify({sources:s,dependencies:[...a]})))})}catch(r){n.errors.push(new Pr.WebpackError(`[ProcessSourceMapsPlugin] Could not process source maps: ${r instanceof Error?r.stack:String(r)}`))}})})}};var rw=w(require("module")),ow=require("jsdom"),ou="__webflowCliImportModuleWindow__";function JS(e){let n=/^(?:\ufeff?\s*)(?:'use strict'|"use strict");?\s*(?:\r?\n|\r)?/.exec(e),r=!!n,o=`module[${JSON.stringify(ou)}]`,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(`
79
79
  `)+`
80
- `;return n?e.slice(0,n[0].length)+s+e.slice(n[0].length):s+e}function yo(e,t){let n=e.readFileSync(t,"utf-8"),o=new my.JSDOM("<!DOCTYPE html><html><body></body></html>",{url:"http://localhost/",pretendToBeVisual:!0}).window,i=U1(n),s=new fy.default(t,module);Object.defineProperty(s,wc,{value:o,enumerable:!1,configurable:!0,writable:!1});try{return s._compile(i,t),s}finally{Reflect.deleteProperty(s,wc),o.close()}}function W1(e,t){let n=`/${t}.js`,r=yo(e,n),o=r.exports.default||r.exports;if(o&&typeof o=="object")try{let{name:i,description:s,group:a,props:l,options:c}=(0,Ve.parseComponentData)(o);return{displayName:i,description:s,group:a,props:Object.entries(l||{}).map(([u,p])=>({...p,name:u,defaultValue:typeof p.defaultValue!="string"?JSON.stringify(p.defaultValue):p.defaultValue,settings:p.settings!==void 0?JSON.stringify(p.settings):p.settings})),options:c}}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 z1({declarations:e,sources:t,overrideConfig:n={},performTypeCheck:r,bundler:o="webpack"}){let i=new Dc.Volume,s=lr(o),a=(0,kc.default)(s.generateBaseConfig({entry:e,env:Ve.Environment.Client,publicPath:"/",libraryName:"metadata"}),s.getFrameworkConfig(Ve.Framework.React,Ve.Environment.Client),{entry:e,mode:"development",output:{path:"/",library:{type:"commonjs2"}},target:"node",plugins:r?[new s.typeCheckerPlugin]:[]}),l=s.mergeConfigs(Ve.Environment.Client,a,n);return await s.bundle({outputPath:"/",config:l,sourceVolumes:t?[t]:[],outputVolume:i,failOnWarnings:!1}),i}async function V1({declarations:e,sources:t,overrideConfig:n={},bundler:r}){let o=new Dc.Volume,i=lr(r),s=(0,kc.default)(i.generateBaseConfig({entry:e,env:Ve.Environment.Client,publicPath:"/",libraryName:"source-maps"}),i.getFrameworkConfig(Ve.Framework.React,Ve.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 Qi],externals:[(0,gy.default)()]}),a=i.mergeConfigs(Ve.Environment.Client,s,n);return a=i.replaceCssPlugin(a),await i.bundle({outputPath:"/",config:a,sourceVolumes:t?[t]:[],outputVolume:o,failOnWarnings:!1}),o}function G1(e){return Object.entries(e.toJSON()).reduce((t,[n,r])=>{if(n.endsWith(".map")&&r?.length){let o=hy.default.basename(n).split(".")[0];t[o]=r}return t},{})}async function es({declarations:e,sources:t,overrideConfig:n,performTypeCheck:r=!1,skipSourceMaps:o=!1,bundler:i="webpack"}){let[s,a]=await Promise.all([z1({declarations:e,sources:t,overrideConfig:n,performTypeCheck:r,bundler:i}),o||i==="rspack"?Promise.resolve(null):V1({declarations:e,sources:t,overrideConfig:n,bundler:i})]),{metadata:l,options:c}=Object.keys(e).reduce((p,f)=>{let m=W1(s,f);return p.metadata[f]=m,p.options[f]=m.options||{},p},{metadata:{},options:{}});return{sourceMaps:a?G1(a):{},metadata:l,options:c}}function yy(e,{framework:t,sourceMaps:n}){return Object.fromEntries(Object.keys(e).map(r=>[r,{...e[r],id:r,framework:t,exportPath:"default",hash:n[r]}]))}$e();var wy=w(require("md5"));Ee();Se();var Dy=" - ";function q1(e){return e==="added"?` ${v.green("(Added)")}`:e==="removed"?` ${v.yellow("(Removed)")}`:e==="changed"?` ${v.blue("(Changed)")}`:""}function by(e){if(!e)return"";let t=JSON.parse(e);return(0,wy.default)(JSON.stringify([...Object.values(t.sources),...t.dependencies.filter(n=>!n.includes("@webflow/data-types")&&!n.includes("@webflow/react"))].sort()))}function J1({componentsMetadata:e,latestVersion:t,sourceMaps:n}){let r=t.resource.codeLibraryResource.manifest.components.reduce((s,a)=>(s[a.id]=a,s),{}),o={};return Object.entries(r).forEach(([s,a])=>{if(!e[s])o[s]={component:a,status:"removed"};else{let l=e[s],c=by(n[s]),u=a.displayName&&l.displayName!==a.displayName,p=c&&a.hash&&c!==by(a.hash),f=u||p;o[s]={component:l,status:f?"changed":"unchanged",previousName:u?a.displayName:void 0}}}),Object.entries(e).forEach(([s,a])=>{r[s]||(o[s]={component:a,status:"added"})}),Object.values(o).map(({component:s,status:a,previousName:l})=>{let c=s.displayName,u=l?`${l} \u2192 ${c}`:c;return`${Dy}${u}${q1(a)}`}).sort().join(`
81
- `)}function H1({componentsMetadata:e}){return Object.values(e).map(n=>`${Dy}${n.displayName}`).sort().join(`
82
- `)}async function ky({libraryConfig:e,componentsMetadata:t,existingCodeLibraries:n,sourceMaps:r,workspaceInfo:o}){if(re())return Promise.resolve(!0);let i=e.id?n.find(({profile:p})=>p.slug===e.id):null,s=i&&i.profile.status==="ACTIVE",a="Code components:",l=s?J1({componentsMetadata:t,latestVersion:i,sourceMaps:r}):H1({componentsMetadata:t}),c=s?`Ready to update ${e.name} on ${o.name}?`:`Ready to share ${e.name} with ${o.name}?`;return await Fe({message:`${a}
80
+ `;return n?e.slice(0,n[0].length)+s+e.slice(n[0].length):s+e}function Jo(e,t){let n=e.readFileSync(t,"utf-8"),o=new ow.JSDOM("<!DOCTYPE html><html><body></body></html>",{url:"http://localhost/",pretendToBeVisual:!0}).window,i=JS(n),s=new rw.default(t,module);Object.defineProperty(s,ou,{value:o,enumerable:!1,configurable:!0,writable:!1});try{return s._compile(i,t),s}finally{Reflect.deleteProperty(s,ou),o.close()}}function qS(e,t){let n=`/${t}.js`,r=Jo(e,n),o=r.exports.default||r.exports;if(o&&typeof o=="object")try{let{name:i,description:s,group:a,props:l,options:c}=(0,Ke.parseComponentData)(o);return{displayName:i,description:s,group:a,props:Object.entries(l||{}).map(([u,p])=>({...p,name:u,defaultValue:typeof p.defaultValue!="string"?JSON.stringify(p.defaultValue):p.defaultValue,settings:p.settings!==void 0?JSON.stringify(p.settings):p.settings})),options:c}}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 GS({declarations:e,sources:t,overrideConfig:n={},performTypeCheck:r,bundler:o="webpack"}){let i=new iu.Volume,s=Tr(o),a=(0,su.default)(s.generateBaseConfig({entry:e,env:Ke.Environment.Client,publicPath:"/",libraryName:"metadata"}),s.getFrameworkConfig(Ke.Framework.React,Ke.Environment.Client),{entry:e,mode:"development",output:{path:"/",library:{type:"commonjs2"}},target:"node",plugins:r?[new s.typeCheckerPlugin]:[]}),l=s.mergeConfigs(Ke.Environment.Client,a,n);return await s.bundle({outputPath:"/",config:l,sourceVolumes:t?[t]:[],outputVolume:i,failOnWarnings:!1}),i}async function HS({declarations:e,sources:t,overrideConfig:n={},bundler:r}){let o=new iu.Volume,i=Tr(r),s=(0,su.default)(i.generateBaseConfig({entry:e,env:Ke.Environment.Client,publicPath:"/",libraryName:"source-maps"}),i.getFrameworkConfig(Ke.Framework.React,Ke.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 Is],externals:[(0,sw.default)()]}),a=i.mergeConfigs(Ke.Environment.Client,s,n);return a=i.replaceCssPlugin(a),await i.bundle({outputPath:"/",config:a,sourceVolumes:t?[t]:[],outputVolume:o,failOnWarnings:!1}),o}function ZS(e){return Object.entries(e.toJSON()).reduce((t,[n,r])=>{if(n.endsWith(".map")&&r?.length){let o=iw.default.basename(n).split(".")[0];t[o]=r}return t},{})}async function Rs({declarations:e,sources:t,overrideConfig:n,performTypeCheck:r=!1,skipSourceMaps:o=!1,bundler:i="webpack"}){let[s,a]=await Promise.all([GS({declarations:e,sources:t,overrideConfig:n,performTypeCheck:r,bundler:i}),o||i==="rspack"?Promise.resolve(null):HS({declarations:e,sources:t,overrideConfig:n,bundler:i})]),{metadata:l,options:c}=Object.keys(e).reduce((p,f)=>{let m=qS(s,f);return p.metadata[f]=m,p.options[f]=m.options||{},p},{metadata:{},options:{}});return{sourceMaps:a?ZS(a):{},metadata:l,options:c}}function aw(e,{framework:t,sourceMaps:n}){return Object.fromEntries(Object.keys(e).map(r=>[r,{...e[r],id:r,framework:t,exportPath:"default",hash:n[r]}]))}Me();var cw=w(require("md5"));_e();Oe();var uw=" - ";function KS(e){return e==="added"?` ${E.green("(Added)")}`:e==="removed"?` ${E.yellow("(Removed)")}`:e==="changed"?` ${E.blue("(Changed)")}`:""}function lw(e){if(!e)return"";let t=JSON.parse(e);return(0,cw.default)(JSON.stringify([...Object.values(t.sources),...t.dependencies.filter(n=>!n.includes("@webflow/data-types")&&!n.includes("@webflow/react"))].sort()))}function YS({componentsMetadata:e,latestVersion:t,sourceMaps:n}){let r=t.resource.codeLibraryResource.manifest.components.reduce((s,a)=>(s[a.id]=a,s),{}),o={};return Object.entries(r).forEach(([s,a])=>{if(!e[s])o[s]={component:a,status:"removed"};else{let l=e[s],c=lw(n[s]),u=a.displayName&&l.displayName!==a.displayName,p=c&&a.hash&&c!==lw(a.hash),f=u||p;o[s]={component:l,status:f?"changed":"unchanged",previousName:u?a.displayName:void 0}}}),Object.entries(e).forEach(([s,a])=>{r[s]||(o[s]={component:a,status:"added"})}),Object.values(o).map(({component:s,status:a,previousName:l})=>{let c=s.displayName,u=l?`${l} \u2192 ${c}`:c;return`${uw}${u}${KS(a)}`}).sort().join(`
81
+ `)}function XS({componentsMetadata:e}){return Object.values(e).map(n=>`${uw}${n.displayName}`).sort().join(`
82
+ `)}async function dw({libraryConfig:e,componentsMetadata:t,existingCodeLibraries:n,sourceMaps:r,workspaceInfo:o}){if(oe())return Promise.resolve(!0);let i=e.id?n.find(({profile:p})=>p.slug===e.id):null,s=i&&i.profile.status==="ACTIVE",a="Code components:",l=s?YS({componentsMetadata:t,latestVersion:i,sourceMaps:r}):XS({componentsMetadata:t}),c=s?`Ready to update ${e.name} on ${o.name}?`:`Ready to share ${e.name} with ${o.name}?`;return await Ae({message:`${a}
83
83
  ${l}
84
84
 
85
- ${c}`})}var ts=require("path"),Cy=require("memfs/lib/volume");var vy=w(require("fast-glob")),K1=e=>{let t=e.split("/");return t[t.length-1]},Z1=e=>K1(e).split(".")[0];async function xy(e,t){return(await vy.default.glob(e,{absolute:!0,...t||{}})).reduce((r,o)=>{let i=Z1(o);if(r[i])throw new Error(`Duplicate component '${i}' found. Already declared at ${r[i]}, but also found at ${o}.`);return{...r,[i]:o}},{})}async function ns(e){let t=await xy(e.components,{cwd:(0,ts.dirname)(e.manifestPath),ignore:[e.globals,e.bundleConfig].filter(o=>o!=null)});if(!Object.keys(t).length)throw new Error("No declaration files found");let{componentsFiles:n,componentsVolume:r}=Y1(t,e.renderer.client,e.globals);return{componentsFiles:n,componentsVolume:r}}function Y1(e,t,n){let r={},o={};return Object.entries(e).forEach(([i,s])=>{let a=(0,ts.extname)(s),l=`${ut}/${Dg}/${i}${a}`;r[i]=l,o[l]=X1(t,s,n)}),{componentsFiles:r,componentsVolume:Cy.Volume.fromJSON(o)}}function X1(e,t,n){return n?`
85
+ ${c}`})}var js=require("path"),mw=require("memfs/lib/volume");var pw=w(require("fast-glob")),QS=e=>{let t=e.split("/");return t[t.length-1]},e_=e=>QS(e).split(".")[0];async function fw(e,t){return(await pw.default.glob(e,{absolute:!0,...t||{}})).reduce((r,o)=>{let i=e_(o);if(r[i])throw new Error(`Duplicate component '${i}' found. Already declared at ${r[i]}, but also found at ${o}.`);return{...r,[i]:o}},{})}async function $s(e){let t=await fw(e.components,{cwd:(0,js.dirname)(e.manifestPath),ignore:[e.globals,e.bundleConfig].filter(o=>o!=null)});if(!Object.keys(t).length)throw new Error("No declaration files found");let{componentsFiles:n,componentsVolume:r}=t_(t,e.renderer.client,e.globals);return{componentsFiles:n,componentsVolume:r}}function t_(e,t,n){let r={},o={};return Object.entries(e).forEach(([i,s])=>{let a=(0,js.extname)(s),l=`${vt}/${uy}/${i}${a}`;r[i]=l,o[l]=n_(t,s,n)}),{componentsFiles:r,componentsVolume:mw.Volume.fromJSON(o)}}function n_(e,t,n){return n?`
86
86
  import { applyDecorators } from "${e}";
87
87
  import componentDefinition from "${t}";
88
88
  const globals = require("${n}") || {};
@@ -104,78 +104,97 @@ export default decoratedDefinition;
104
104
  `.trim():`
105
105
  import componentDefinition from "${t}";
106
106
  export default {...componentDefinition};
107
- `.trim()}je();Ni();var Ey=require("@webflow/data-types"),rs={renderer:{client:"@webflow/react",server:"@webflow/react"},components:["**/*.webflow.@(js|jsx|mjs|ts|tsx)"],framework:Ey.Framework.React};var dr=require("path"),pr=require("fs");Ee();$e();G();ye();function vt(e){return e.replace(/\\/g,"/")}Se();te();function Fy(e){let t={...e};if(e.globals){let n=(0,dr.resolve)(process.cwd(),e.globals);if(!(0,pr.existsSync)(n))throw new Error(`Globals file not found: ${e.globals}
107
+ `.trim()}We();ys();var gw=require("@webflow/data-types"),Bs={renderer:{client:"@webflow/react",server:"@webflow/react"},components:["**/*.webflow.@(js|jsx|mjs|ts|tsx)"],framework:gw.Framework.React};var Ir=require("path"),Rr=require("fs");_e();Me();J();ke();function jt(e){return e.replace(/\\/g,"/")}Oe();te();function hw(e){let t={...e};if(e.globals){let n=(0,Ir.resolve)(process.cwd(),e.globals);if(!(0,Rr.existsSync)(n))throw new Error(`Globals file not found: ${e.globals}
108
108
  Resolved path: ${n}
109
- Please ensure the file exists or remove the 'globals' field from your manifest.`);t.globals=vt(n)}if(e.bundleConfig){let n=(0,dr.resolve)(process.cwd(),e.bundleConfig);if(!(0,pr.existsSync)(n))throw new Error(`Bundle config file not found: ${e.bundleConfig}
109
+ Please ensure the file exists or remove the 'globals' field from your manifest.`);t.globals=jt(n)}if(e.bundleConfig){let n=(0,Ir.resolve)(process.cwd(),e.bundleConfig);if(!(0,Rr.existsSync)(n))throw new Error(`Bundle config file not found: ${e.bundleConfig}
110
110
  Resolved path: ${n}
111
- Please ensure the file exists or remove the 'bundleConfig' field from your manifest.`);t.bundleConfig=vt(n)}if(typeof e.renderer=="string"){let n=(0,dr.resolve)(process.cwd(),e.renderer);(0,pr.existsSync)(n)&&(t.renderer=vt(n))}else if(typeof e.renderer=="object"&&typeof t.renderer=="object"){if(typeof e.renderer.client=="string"){let n=(0,dr.resolve)(process.cwd(),e.renderer.client);(0,pr.existsSync)(n)&&(t.renderer={...t.renderer,client:vt(n)})}if(typeof e.renderer.server=="string"){let n=(0,dr.resolve)(process.cwd(),e.renderer.server);(0,pr.existsSync)(n)&&(t.renderer={...t.renderer,server:vt(n)})}}return t}async function Q1({initialData:e}){let t=await _e({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 h("When --no-input mode is enabled please provide a name in your library manifest");let n=await _e({message:"Enter a description for your code library",default:e?.description??""});if(!await Fe({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:n}}async function e_({existingCodeLibraries:e}){let t={name:"[Create new code library]",value:null},r=[...e].sort((i,s)=>{let a=i.resource.codeLibraryResource.manifest.name??"",l=s.resource.codeLibraryResource.manifest.name??"",c=a.localeCompare(l,void 0,{sensitivity:"base"});return c!==0?c: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+=` ${v.yellow("(Unshared)")}`);let l={id:s.slug,name:i.codeLibraryResource.manifest.name,description:i.codeLibraryResource.manifest.description};return{name:a,value:l}});return await Ho({message:"Select an existing code library (or create new):",source:i=>{if(!i)return[t,...r];let s=i.toLowerCase(),a=r.filter(l=>{let c=l.value?.id??"",u=l.value?.name??"",p=l.value?.description??"";return c.toLowerCase().includes(s)||u.toLowerCase().includes(s)||p.toLowerCase().includes(s)});return[t,...a]},pageSize:15})}async function vc({initialData:e,existingCodeLibraries:t}){let n,r={components:rs.components},o=t.length>0?await e_({existingCodeLibraries:t}):null;if(o)n={...r,...o,...e,id:o.id};else{let a=await Q1({initialData:e});n={...r,...e,...a}}let i=Fy(n);oe({library:i});let{path:s}=rn();return{libraryManifest:i,manifestPath:s}}async function _y({existingCodeLibraries:e}){let t=d.spinner("Looking for webflow.json manifest");try{let{manifest:n,manifestPath:r}=Q(),o=Nr(n,"library");if(!o.id){if(rt())return t.succeed(),vc({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&&rt())return t.succeed(),vc({initialData:o,existingCodeLibraries:e});i||(i=o.id),t.succeed();let s=Fy({...o,name:i});return Promise.resolve({libraryManifest:s,manifestPath:r})}catch(n){if(n instanceof nn&&rt())return t.info(n.message),vc({existingCodeLibraries:e});throw t.fail(),n}}var xc=require("memfs/lib/volume"),Ay=w(require("webpack-merge"));var Oy="/client-renderer.js",Iy="/server-renderer.js",Sy=`${ut}/test-renderers${Oy}`,Ty=`${ut}/test-renderers${Iy}`,t_=new Set(["@webflow/react"]),n_=new Set(["@webflow/react","@webflow/emotion-utils/server","@webflow/styled-components-utils/server"]);async function Py(e){if(!e.client||!e.server)throw new Error("Invalid renderer configuration. Both client and server renderers must be specified.");if(t_.has(e.client)&&n_.has(e.server))return;let t=await i_(e);r_(e.client,t),o_(e.server,t)}function r_(e,t){let n=yo(t,Oy);if(typeof n.exports.ClientRenderer!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'ClientRenderer' export.`);if(typeof n.exports.applyDecorators!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'applyDecorators' export.`);let r=()=>null,o=n.exports.ClientRenderer(r),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 o_(e,t){let n=yo(t,Iy);if(typeof n.exports.ServerRenderer!="function")throw new Error(`Invalid server renderer: ${e} does not have a valid 'ServerRenderer' export.`);let r=()=>null,o=n.exports.ServerRenderer(r),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 i_(e){let t=new xc.Volume,n=vt(e.client),r=vt(e.server),o={[Sy]:`
111
+ Please ensure the file exists or remove the 'bundleConfig' field from your manifest.`);t.bundleConfig=jt(n)}if(typeof e.renderer=="string"){let n=(0,Ir.resolve)(process.cwd(),e.renderer);(0,Rr.existsSync)(n)&&(t.renderer=jt(n))}else if(typeof e.renderer=="object"&&typeof t.renderer=="object"){if(typeof e.renderer.client=="string"){let n=(0,Ir.resolve)(process.cwd(),e.renderer.client);(0,Rr.existsSync)(n)&&(t.renderer={...t.renderer,client:jt(n)})}if(typeof e.renderer.server=="string"){let n=(0,Ir.resolve)(process.cwd(),e.renderer.server);(0,Rr.existsSync)(n)&&(t.renderer={...t.renderer,server:jt(n)})}}return t}async function r_({initialData:e}){let t=await Te({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 g("When --no-input mode is enabled please provide a name in your library manifest");let n=await Te({message:"Enter a description for your code library",default:e?.description??""});if(!await Ae({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:n}}async function o_({existingCodeLibraries:e}){let t={name:"[Create new code library]",value:null},r=[...e].sort((i,s)=>{let a=i.resource.codeLibraryResource.manifest.name??"",l=s.resource.codeLibraryResource.manifest.name??"",c=a.localeCompare(l,void 0,{sensitivity:"base"});return c!==0?c: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+=` ${E.yellow("(Unshared)")}`);let l={id:s.slug,name:i.codeLibraryResource.manifest.name,description:i.codeLibraryResource.manifest.description};return{name:a,value:l}});return await Si({message:"Select an existing code library (or create new):",source:i=>{if(!i)return[t,...r];let s=i.toLowerCase(),a=r.filter(l=>{let c=l.value?.id??"",u=l.value?.name??"",p=l.value?.description??"";return c.toLowerCase().includes(s)||u.toLowerCase().includes(s)||p.toLowerCase().includes(s)});return[t,...a]},pageSize:15})}async function au({initialData:e,existingCodeLibraries:t}){let n,r={components:Bs.components},o=t.length>0?await o_({existingCodeLibraries:t}):null;if(o)n={...r,...o,...e,id:o.id};else{let a=await r_({initialData:e});n={...r,...e,...a}}let i=hw(n);se({library:i});let{path:s}=kn();return{libraryManifest:i,manifestPath:s}}async function yw({existingCodeLibraries:e}){let t=d.spinner("Looking for webflow.json manifest");try{let{manifest:n,manifestPath:r}=Q(),o=fo(n,"library");if(!o.id){if(mt())return t.succeed(),au({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&&mt())return t.succeed(),au({initialData:o,existingCodeLibraries:e});i||(i=o.id),t.succeed();let s=hw({...o,name:i});return Promise.resolve({libraryManifest:s,manifestPath:r})}catch(n){if(n instanceof vn&&mt())return t.info(n.message),au({existingCodeLibraries:e});throw t.fail(),n}}var lu=require("memfs/lib/volume"),Dw=w(require("webpack-merge"));var vw="/client-renderer.js",kw="/server-renderer.js",ww=`${vt}/test-renderers${vw}`,bw=`${vt}/test-renderers${kw}`,i_=new Set(["@webflow/react"]),s_=new Set(["@webflow/react","@webflow/emotion-utils/server","@webflow/styled-components-utils/server"]);async function xw(e){if(!e.client||!e.server)throw new Error("Invalid renderer configuration. Both client and server renderers must be specified.");if(i_.has(e.client)&&s_.has(e.server))return;let t=await c_(e);a_(e.client,t),l_(e.server,t)}function a_(e,t){let n=Jo(t,vw);if(typeof n.exports.ClientRenderer!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'ClientRenderer' export.`);if(typeof n.exports.applyDecorators!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'applyDecorators' export.`);let r=()=>null,o=n.exports.ClientRenderer(r),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 l_(e,t){let n=Jo(t,kw);if(typeof n.exports.ServerRenderer!="function")throw new Error(`Invalid server renderer: ${e} does not have a valid 'ServerRenderer' export.`);let r=()=>null,o=n.exports.ServerRenderer(r),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 c_(e){let t=new lu.Volume,n=jt(e.client),r=jt(e.server),o={[ww]:`
112
112
  export * from "${n}";
113
- `,[Ty]:`
113
+ `,[bw]:`
114
114
  export * from "${r}";
115
- `},i=(0,Ay.default)(qi(),{entry:{"client-renderer":Sy,"server-renderer":Ty},mode:"development",output:{path:"/",filename:"[name].js",library:{type:"commonjs2"}},target:"node"});return await Ki({config:i,sourceVolumes:[xc.Volume.fromJSON(o)],outputVolume:t,failOnWarnings:!1}),t}async function os({existingCodeLibraries:e}){let{libraryManifest:t,manifestPath:n}=await _y({existingCodeLibraries:e}),{renderer:r,...o}=rs,i=typeof t.renderer=="string"?{client:t.renderer,server:t.renderer}:{client:t.renderer?.client??r.client,server:t.renderer?.server??r.server};return await Py(i),{...o,...t,renderer:i,manifestPath:n}}te();async function s_(e,t){let{trackPerformance:n,libraryConfig:r}=e;return await n("collect_metadata",async()=>{let{componentsFiles:o,componentsVolume:i}=await ns(r);d.debug(`Components: ${JSON.stringify(o,null,2)}`);let{sourceMaps:s,metadata:a,options:l}=await es({declarations:o,sources:i,overrideConfig:e.overrideConfig,performTypeCheck:Bi(o,t),bundler:t?.bundler});return d.debug(`Metadata: ${JSON.stringify(a,null,2)}`),d.debug(`Source Maps:
115
+ `},i=(0,Dw.default)(Fs(),{entry:{"client-renderer":ww,"server-renderer":bw},mode:"development",output:{path:"/",filename:"[name].js",library:{type:"commonjs2"}},target:"node"});return await As({config:i,sourceVolumes:[lu.Volume.fromJSON(o)],outputVolume:t,failOnWarnings:!1}),t}async function Ns({existingCodeLibraries:e}){let{libraryManifest:t,manifestPath:n}=await yw({existingCodeLibraries:e}),{renderer:r,...o}=Bs,i=typeof t.renderer=="string"?{client:t.renderer,server:t.renderer}:{client:t.renderer?.client??r.client,server:t.renderer?.server??r.server};return await xw(i),{...o,...t,renderer:i,manifestPath:n}}te();async function u_(e,t){let{trackPerformance:n,libraryConfig:r}=e;return await n("collect_metadata",async()=>{let{componentsFiles:o,componentsVolume:i}=await $s(r);d.debug(`Components: ${JSON.stringify(o,null,2)}`);let{sourceMaps:s,metadata:a,options:l}=await Rs({declarations:o,sources:i,overrideConfig:e.overrideConfig,performTypeCheck:hs(o,t),bundler:t?.bundler});return d.debug(`Metadata: ${JSON.stringify(a,null,2)}`),d.debug(`Source Maps:
116
116
 
117
117
  ${Object.entries(s).reduce((c,[u,p])=>(c+=`${u}: ${JSON.stringify(JSON.parse(p),null,2)}
118
118
 
119
- `,c),"")}`),{componentsFiles:o,componentsVolume:i,componentsMetadata:a,componentsOptions:l,sourceMaps:s}})}async function a_(e,t,n,r,o,i,s){let{trackPerformance:a,libraryConfig:l}=e;return await a("generate_library_bundle",async()=>await Xi({libraryIdentifier:`_${o}`,renderer:l.renderer,framework:l.framework,publicPath:Vt(i[fr.Environment.Client]),sourceVolumes:[n],componentsFiles:t,componentsOptions:r,debugBundler:s?.debugBundler,dev:s?.dev,overrideConfig:e.overrideConfig,failOnWarnings:!s?.force,bundler:s?.bundler}))}async function l_(e,t,n,r){let{trackPerformance:o,apiOptions:i}=e;return await o("upload_files",async()=>{let s=t.map(([l,c])=>{let u=(0,is.resolve)((0,is.join)(`/${c}`,`${l.name}`));return fo(n.readFileSync(u,"utf8").toString(),u,{bundleEnvironment:c})}),{signatures:a}=await cc({resourceId:r,files:s.map(({meta:l})=>l),options:i});await Promise.all(a.map(async l=>{let c=s.find(u=>u.meta.fileHash===l.hash);if(!c)throw new Error(`File not found: ${l.hash}`);await mo(c,l.value)}))})}async function c_(e,t,n,r,o){let{trackPerformance:i,libraryConfig:s,apiOptions:a}=e;return await i("share_library",async()=>{let l={clientModule:{bundleUrl:Vt(o[fr.Environment.Client])+Ur,loaderType:fr.ModuleLoader.FEDERATION},serverModule:{bundleUrl:Vt(o[fr.Environment.Server])+zr}},c=yy(t,{framework:s.framework,sourceMaps:n}),{taskId:u}=await uc({resourceId:r,codeModule:l,components:Object.values(c),options:a});d.debug(JSON.stringify({taskId:u},null,2))})}async function Cc(e){e?.verbose&&(process.env.DEBUG="true");let t,n=Date.now(),r;try{r=await Y({apiToken:e?.apiToken})}catch(s){throw d.error(s),s}d.debug("Initializing telemetry service...");let o=J.forCodeLibraries({authToken:r}),i=Cd(o);try{d.debug("Checking dependencies versions..."),new sn().run();let s={apiToken:r};t=d.spinner("Initializing");let a=await i("get_code_libraries",async()=>await ac({options:s})),{workspace:l,libraries:c}=a;t.succeed(),d.debug("Parsing library config...");let u=await os({existingCodeLibraries:c}),p=u.bundleConfig?require(u.bundleConfig):{},f={trackPerformance:i,apiOptions:s,libraryConfig:u,overrideConfig:p};t=d.spinner("Collecting metadata");let{componentsFiles:m,componentsVolume:g,componentsMetadata:k,componentsOptions:C,sourceMaps:O}=await s_(f,e);if(t.succeed(),!await ky({libraryConfig:u,componentsMetadata:k,existingCodeLibraries:c,sourceMaps:O,workspaceInfo:l}))return;t=d.spinner("Creating code library");let{resourceId:E,profileSlug:x,workspace:V,s3Urls:R,cdnUrls:_}=await i("init_code_library",async()=>await lc({name:u.name,slug:u.id,description:u.description,options:s}));t.succeed(),d.debug(JSON.stringify({resourceId:E,profileSlug:x,s3Urls:R,cdnUrls:_},null,2)),await o.sendUsage("library_initialized",{libraryName:u.name,framework:u.framework,resourceId:E,profileSlug:x}),u.id||oe({library:{id:x}}),t=d.spinner("Compiling code components");let{outputFiles:y,outputVolume:b}=await a_(f,m,g,C,E,_,e);t.succeed(),await o.sendUsage("bundle_generated",{libraryName:u.name,componentCount:Object.keys(m).length,resourceId:E,profileSlug:x}),t=d.spinner("Uploading files"),await l_(f,y,b,E),t.succeed(),await o.sendUsage("files_uploaded",{libraryName:u.name,fileCount:y.length,resourceId:E,profileSlug:x}),t=d.spinner("Sharing library"),await c_(f,k,O,E,_),t.succeed(),d.success(`Code library shared successfully${V?.slug?`: ${Vn}/dashboard/workspace/${V?.slug}/shared-libraries-and-templates`:"!"}`);let N=Date.now()-n;await o.sendUsage("share_library",{duration:N,componentCount:Object.keys(m).length,libraryName:u.name,framework:u.framework,resourceId:E,profileSlug:x})}catch(s){t?.fail();let a=Date.now()-n;throw await o.sendError(s instanceof Error?s:new Error(String(s)),"share_library",{duration:a}),new h(s)}}var ss=w(require("fs")),mr=require("path");G();Ni();te();function u_(e){return e.replace(/[-_]+/g," ").replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).replace(/\s+/g,"")}var d_="dist",p_="http://localhost/";async function Ec(e){e.verbose&&(process.env.DEBUG="true");let t;try{d.debug("Checking dependencies versions..."),new sn().run(),d.debug("Looking for manifest...");let n=await os({existingCodeLibraries:[]}),r=`_${e.libraryId||u_(n.name)}`;e?.debugBundler&&d.debug(`Library Config: ${JSON.stringify(n,null,2)}`),t=d.spinner("Collecting metadata");let{componentsFiles:o,componentsVolume:i}=await ns(n);e?.debugBundler&&d.debug(`Components: ${JSON.stringify(o,null,2)}`);let s=n.bundleConfig?require(n.bundleConfig):{},{sourceMaps:a,metadata:l,options:c}=await es({declarations:o,sources:i,overrideConfig:s,performTypeCheck:Bi(o,e),skipSourceMaps:!e?.debugBundler,bundler:e.bundler});e?.debugBundler&&(d.debug(`Metadata: ${JSON.stringify(l,null,2)}`),d.debug(`Source Maps:
120
-
121
- ${Object.entries(a).reduce((f,[m,g])=>(f+=`${m}: ${JSON.stringify(JSON.parse(g),null,2)}
122
-
123
- `,f),"")}`)),t.succeed(),t=d.spinner("Generating library bundle");let{outputFiles:u,outputVolume:p}=await Xi({libraryIdentifier:r,renderer:n.renderer,framework:n.framework,publicPath:Vt(e.publicPath||p_),sourceVolumes:[i],componentsFiles:o,componentsOptions:c,debugBundler:e?.debugBundler,dev:e?.dev,overrideConfig:s,failOnWarnings:!e.force,bundler:e.bundler});t.succeed(),t=d.spinner("Writing to disk"),u.forEach(([f,m])=>{let g=(0,mr.join)(`/${m}`,`${f.name}`),k=fo(p.readFileSync(g,"utf8").toString(),g,{bundleEnvironment:m}),C=(0,mr.join)(process.cwd(),e.outputPath||d_);ss.default.existsSync((0,mr.join)(C,`${m}`))||ss.default.mkdirSync((0,mr.join)(C,`${m}`),{recursive:!0}),ss.default.writeFileSync((0,mr.join)(C,m,f.name),k.value.toString())}),t.succeed(),d.success("Code Library bundled successfully!")}catch(n){throw t?.fail(),new h(n)}}var bo=w(require("fs-extra")),Fc=w(require("path"));G();ve();function f_(){try{if(!bo.default.existsSync(Pe))return null;let e=bo.default.readdirSync(Pe).filter(t=>t.endsWith(".log")).map(t=>({name:t,path:Fc.default.join(Pe,t),time:bo.default.statSync(Fc.default.join(Pe,t)).mtime.getTime()})).sort((t,n)=>n.time-t.time);if(e.length===0)return null;for(let t of e)try{let r=bo.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 _c(){let e=f_();e&&console.info(`${Wn} Latest log: ${e}`),console.info(`${Wn} All logs: ${Pe}`)}async function Ry(e){e.command("log").description("Display the logs directory and path to the latest log file, if available.").action(_c)}var gn=require("commander"),Sc=new gn.Option("--no-input","Avoid prompting or doing anything interactive. Use this for CI/CD pipelines."),Tc=new gn.Option("--manifest <path>","Path to a manifest.json file or directory containing webflow.json. Default: ./webflow.json"),Ac=new gn.Option("--skip-update-check","Skip checking for @webflow packages updates"),Oc=new gn.Option("--verbose","Display more information for debugging purposes."),wo=new gn.Option("--api-token <token>","API token. Default: value set in WEBFLOW_API_TOKEN env variable."),hr=new gn.Option("-s, --site <site-id>","Site ID. Default: value set in webflow.json config."),Do=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.",h_="Bundle a library of Code Components for local development.",$y=new qt.Option("-f, --force","Force the bundler to finish compiling, even if there are warnings or type errors."),jy=new qt.Option("--debug-bundler","Display final bundler configurations for debugging purposes."),By=new qt.Option("--dev","Bundle in development mode for debugging purposes."),Ny=new qt.Option("--bundler <engine>","Bundler to use: webpack or rspack (experimental). Default: webpack").choices(["webpack","rspack"]).default("webpack").hideHelp(),g_=new qt.Option("--library-id <id>","Set the library identifier to use for the bundle.").hideHelp(),y_=new qt.Option("--public-path <path>","Set the public path for the bundle."),b_=new qt.Option("--output-path <path>","Override the output path for the bundle. Default is './dist'");function Ic(e,t){return e.command(t).description(m_).addOption(wo).addOption($y).addOption(jy).addOption(By).addOption(Ny).action(Do(Cc))}function Pc(e,t){return e.command(t).description(h_).addOption(g_).addOption(y_).addOption(b_).addOption($y).addOption(jy).addOption(By).addOption(Ny).action(Do(Ec))}var Ly=e=>{let t=e.command("library").description("CLI for managing your Webflow libraries of Code Components.");Ic(t,"share"),Pc(t,"bundle"),t.command("log").description("Display the logs directory and path to the latest log file, if available.").action(_c)};var My=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(wo).addOption(hr).action(Zh),Ic(t,"import"),Pc(t,"bundle"),t.command("export").description("Export Webflow Components from your Webflow Site.").addOption(wo).addOption(hr).action(Do(Wi))};var qb=w(require("path"));var xt=w(require("fs")),Ge=w(require("path"));G();je();var fe={New:"new",Existing:"existing"},Uy="cli",Jt=3,Ht=39,as="astro",Wy="cloud-scaffolds";var zy="package.json",yn="webflow.json",ls="wf-placeholder-name",Vy="CLOUD_MOUNT_PATH",Gy="gitignore";function Rc(e){return!e.siteId}var ko=async(e,t,n=as,r,o,i)=>{try{let s,a;if("content"in r){let l=r.content;s=l.files,a=c=>Ge.relative(l.extractionRoot,c).replace(/\\/g,"/")}else{let c=r[n];if(!c)throw new Error(`Scaffold "${n}" not found`);s=c;let u=Ge.join(Wy,n);a=p=>p.split(u)[1]?.substring(1).replace(/\\/g,"/")??""}for(let l of s)try{let c=Ge.join(e,a(l)),u=l.includes("next.config.ts"),p=l.includes("astro.config.mjs"),f=u||p;if(l.includes(yn)&&xt.existsSync(c))continue;if(l.includes(zy)||l.includes(yn)){let g=(await xt.promises.readFile(l,"utf8")).replace(ls,e);await cs(c,g)}else if(f){let m=await xt.promises.readFile(l,"utf8");await cs(c,m.replace(Vy,t))}else if(Ge.basename(c).toLowerCase()===Gy){let m=await xt.promises.readFile(l,"utf8"),g=Ge.join(Ge.dirname(c),".gitignore");await cs(g,m)}else{let m=await xt.promises.readFile(l);await cs(c,m)}}catch(c){d.error(`Error processing file ${l}: ${c}`)}if(o&&i)try{bt({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 cs=async(e,t)=>{try{await xt.promises.mkdir(Ge.dirname(e),{recursive:!0}),await xt.promises.writeFile(e,t)}catch(n){throw d.error(`Error writing file ${e}: ${n}`),n}};var Kt=w(require("fs")),qy=w(require("fs-extra")),Zt=w(require("path")),Lc=w(require("os")),Jy=w(require("tar"));var De=class extends Error{constructor(n,r,o){super(n);this.scaffoldId=r;this.supportedIds=o;this.name="ScaffoldError"}};var vo={"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 xo(e){let t=vo[e];if(!t){let n=Object.keys(vo);throw new De(`Unsupported framework: "${e}". Supported: ${n.join(", ")}`,e,n)}return t}function $c(){return Object.keys(vo)}function jc(){return[...new Set($c().map(e=>e.replace(/-minimal$/,"")))]}function Bc(){return["astro","nextjs"]}function Nc(e){let n=`${e.replace(/-minimal$/,"")}-minimal`;if(!vo[n]){let r=$c();throw new De(`No minimal scaffold for "${e}". Supported: ${r.join(", ")}`,n,r)}return n}G();var w_="https://github.com";async function Mc(e){let t=e.endsWith("-minimal")?e:Nc(e);return us(t)}async function us(e){return xo(e).source.type==="github"?D_(e):Hy(e)}async function Hy(e){let t=xo(e);if(t.source.type!=="local")throw new De(`Scaffold "${e}" does not have a local source`,e);let n=Zt.isAbsolute(t.source.path)?t.source.path:Zt.join(__dirname,t.source.path);if(!Kt.existsSync(n))throw new De(`Scaffold directory not found: ${n}`,e);let r=await Uc(n);return{scaffoldId:e,files:r,extractionRoot:n}}async function D_(e){let t=xo(e);if(t.source.type!=="github")throw new De(`Scaffold "${e}" does not have a GitHub source`,e);let n=t.source.ref??"main",r=`${w_}/${t.source.repo}/archive/${n}.tar.gz`,o=await Kt.promises.mkdtemp(Zt.join(Lc.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 De(`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 De(`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 k_(a,o),l.succeed("Scaffold ready")}catch(m){throw l.fail("Unpack failed"),m}let c=await Kt.promises.readdir(o),u=c[0];if(!u||c.length!==1)throw new De(`Unexpected tarball structure for ${t.source.repo}`,e);let p=Zt.join(o,u),f=await Uc(p);return{scaffoldId:e,files:f,extractionRoot:p}}catch(s){try{qy.default.removeSync(o)}catch{}throw s instanceof De?s:new De(`Failed to fetch scaffold "${e}": ${s instanceof Error?s.message:String(s)}`,e)}}async function k_(e,t){let n=Zt.join(Lc.tmpdir(),`webflow-scaffold-${Date.now()}.tar.gz`);await Kt.promises.writeFile(n,new Uint8Array(e.buffer,e.byteOffset,e.byteLength));try{await Jy.extract({file:n,cwd:t})}finally{await Kt.promises.unlink(n).catch(()=>{})}}async function Uc(e){let t=[],n=await Kt.promises.readdir(e,{withFileTypes:!0});for(let r of n){let o=Zt.join(e,r.name);r.isDirectory()?t.push(...await Uc(o)):t.push(o)}return t}var ru=w(require("fs-extra"));je();Ie();var gr=w(require("fs")),Wc=w(require("path"));G();ye();var ds={angular:{package_identifier:"@angular/ssr",build_command:"ng build",config_template_path:"templates/angular/angular.json.template",wrangler_template_path:"templates/angular/wrangler.angular.json",assets_path:"dist/browser",deployment_type:"ssr",entrypoint_path:"./server.js"},astro:{package_identifier:"@astrojs/cloudflare",build_command:"astro build",config_template_path:"templates/astro/astro.config.mjs.template",additional_config_files:["templates/astro/webflow-loader.ts"],wrangler_template_path:"templates/astro/wrangler.astro.json",assets_path:"dist",deployment_type:"ssr",assets_exclude_path:"_worker.js",entrypoint_path:"./index.js"},docusaurus:{package_identifier:"@docusaurus/core",build_command:"docusaurus build",config_template_path:"templates/docusaurus/docusaurus.config.js.template",wrangler_template_path:"templates/docusaurus/wrangler.docusaurus.json",assets_path:"build",deployment_type:"ssg",entrypoint_path:"./no-op-worker.js"},gatsby:{package_identifier:"gatsby",build_command:"gatsby build",wrangler_template_path:"templates/gatsby/wrangler.gatsby.json",assets_path:"public",deployment_type:"ssg",entrypoint_path:"./no-op-worker.js"},nextjs:{package_identifier:"@opennextjs/cloudflare",build_command:"opennextjs-cloudflare build",config_template_path:"templates/nextjs/next.config.ts.template",additional_config_files:["templates/nextjs/webflow-loader.ts"],wrangler_template_path:"templates/nextjs/wrangler.nextjs.json",assets_path:".open-next/assets",entrypoint_path:"./worker.js",deployment_type:"ssr"},nuxt:{package_identifier:"nuxt",build_command:"nuxt build",config_template_path:"templates/nuxt/nuxt.config.ts.template",wrangler_template_path:"templates/nuxt/wrangler.nuxt.json",assets_path:".output/public",entrypoint_path:"./index.js",deployment_type:"ssr"},qwik:{package_identifier:"@builder.io/qwik",build_command:"qwik build",config_template_path:"templates/qwik/vite.config.ts.template",wrangler_template_path:"templates/qwik/wrangler.qwik.json",assets_path:"dist",deployment_type:"ssr",entrypoint_path:"./_worker.js"},react:{package_identifier:"@vitejs/plugin-react",build_command:"tsc -b && vite build",config_template_path:"templates/react/vite.config.ts.template",wrangler_template_path:"templates/react/wrangler.react.json",assets_path:"dist",deployment_type:"spa",entrypoint_path:"./index.js"},remix:{package_identifier:"@remix-run/cloudflare",build_command:"remix vite:build",config_template_path:"templates/remix/vite.config.ts.template",wrangler_template_path:"templates/remix/wrangler.remix.json",assets_path:"build/client",deployment_type:"ssr",entrypoint_path:"./server.js"},solid:{package_identifier:"@solidjs/start",build_command:"vinxi build",config_template_path:"templates/solid/app.config.ts.template",wrangler_template_path:"templates/solid/wrangler.solid.json",assets_path:".output/public",deployment_type:"ssr",entrypoint_path:"./index.js"},svelte:{package_identifier:"@sveltejs/vite-plugin-svelte",build_command:"vite build",config_template_path:"templates/svelte/vite.config.ts.template",wrangler_template_path:"templates/svelte/wrangler.svelte.json",assets_path:".svelte-kit/cloudflare",deployment_type:"ssr",entrypoint_path:"./_worker.js"},vue:{package_identifier:"@vitejs/plugin-vue",build_command:"vue-tsc --build && vite build",config_template_path:"templates/vue/vite.config.ts.template",wrangler_template_path:"templates/vue/wrangler.vue.json",assets_path:"dist",deployment_type:"spa",entrypoint_path:"./index.js"}},bn=["nextjs","astro"];async function Ky(e=process.cwd()){let t=Wc.join(e,"package.json"),n=Wc.join(e,"webflow.json");if(!gr.existsSync(t))throw new Error("No package.json file found");let r=null;if(gr.existsSync(n)){let o;try{o=JSON.parse(gr.readFileSync(n,"utf8"))}catch(s){throw s instanceof SyntaxError?new Error("webflow.json contains invalid JSON"):s}let i=o.cloud?.framework;if(i){if(!ds[i]){let s=Object.keys(ds).join(", ");throw new Error(`Framework '${i}' from webflow.json is not supported. Must be one of: ${s}`)}if(!bn.includes(i))throw new Error(`Framework '${i}' is not currently supported. Must be one of: ${bn.join(", ")}`);r=i,d.info(`Using framework type from webflow.json: ${r}`)}}if(!r){let o;try{o=JSON.parse(gr.readFileSync(t,"utf8"))}catch(i){throw i instanceof SyntaxError?new Error("package.json contains invalid JSON"):i}for(let i of bn){let s=ds[i].package_identifier;if(o.dependencies?.[s]||o.devDependencies?.[s]){r=i;break}}if(!r)throw new Error(`Framework not detected or not supported. Only ${bn.join(", ")} are currently supported.`);d.info(`Detected framework: ${r}`),oe({cloud:{framework:r}})}return{framework:r,config:ds[r]}}var j=w(require("fs")),W=w(require("path")),_r=require("child_process"),bb=w(require("tar"));var me=w(require("fs")),Oe=w(require("path"));var se={};fu(se,{BRAND:()=>J_,DIRTY:()=>wn,EMPTY_PATH:()=>E_,INVALID:()=>M,NEVER:()=>OS,OK:()=>Ce,ParseStatus:()=>ke,Schema:()=>H,ZodAny:()=>Qt,ZodArray:()=>_t,ZodBigInt:()=>kn,ZodBoolean:()=>vn,ZodBranded:()=>Eo,ZodCatch:()=>Pn,ZodDate:()=>xn,ZodDefault:()=>In,ZodDiscriminatedUnion:()=>ms,ZodEffects:()=>He,ZodEnum:()=>An,ZodError:()=>Te,ZodFirstPartyTypeKind:()=>U,ZodFunction:()=>gs,ZodIntersection:()=>_n,ZodIssueCode:()=>D,ZodLazy:()=>Sn,ZodLiteral:()=>Tn,ZodMap:()=>vr,ZodNaN:()=>Cr,ZodNativeEnum:()=>On,ZodNever:()=>nt,ZodNull:()=>En,ZodNullable:()=>ft,ZodNumber:()=>Dn,ZodObject:()=>Ae,ZodOptional:()=>qe,ZodParsedType:()=>T,ZodPipeline:()=>Fo,ZodPromise:()=>en,ZodReadonly:()=>Rn,ZodRecord:()=>hs,ZodSchema:()=>H,ZodSet:()=>xr,ZodString:()=>Xt,ZodSymbol:()=>Dr,ZodTransformer:()=>He,ZodTuple:()=>pt,ZodType:()=>H,ZodUndefined:()=>Cn,ZodUnion:()=>Fn,ZodUnknown:()=>Ft,ZodVoid:()=>kr,addIssueToContext:()=>F,any:()=>nS,array:()=>sS,bigint:()=>Y_,boolean:()=>sb,coerce:()=>AS,custom:()=>rb,date:()=>X_,datetimeRegex:()=>tb,defaultErrorMap:()=>Ct,discriminatedUnion:()=>uS,effect:()=>vS,enum:()=>wS,function:()=>gS,getErrorMap:()=>yr,getParsedType:()=>dt,instanceof:()=>K_,intersection:()=>dS,isAborted:()=>ps,isAsync:()=>br,isDirty:()=>fs,isValid:()=>Yt,late:()=>H_,lazy:()=>yS,literal:()=>bS,makeIssue:()=>Co,map:()=>mS,nan:()=>Z_,nativeEnum:()=>DS,never:()=>oS,null:()=>tS,nullable:()=>CS,number:()=>ib,object:()=>aS,objectUtil:()=>zc,oboolean:()=>TS,onumber:()=>SS,optional:()=>xS,ostring:()=>_S,pipeline:()=>FS,preprocess:()=>ES,promise:()=>kS,quotelessJson:()=>v_,record:()=>fS,set:()=>hS,setErrorMap:()=>C_,strictObject:()=>lS,string:()=>ob,symbol:()=>Q_,transformer:()=>vS,tuple:()=>pS,undefined:()=>eS,union:()=>cS,unknown:()=>rS,util:()=>X,void:()=>iS});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 zc;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(zc||(zc={}));var T=X.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),dt=e=>{switch(typeof e){case"undefined":return T.undefined;case"string":return T.string;case"number":return Number.isNaN(e)?T.nan:T.number;case"boolean":return T.boolean;case"function":return T.function;case"bigint":return T.bigint;case"symbol":return T.symbol;case"object":return Array.isArray(e)?T.array:e===null?T.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?T.promise:typeof Map<"u"&&e instanceof Map?T.map:typeof Set<"u"&&e instanceof Set?T.set:typeof Date<"u"&&e instanceof Date?T.date:T.object;default:return T.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"]),v_=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Te=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()}};Te.create=e=>new Te(e);var x_=(e,t)=>{let n;switch(e.code){case D.invalid_type:e.received===T.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}},Ct=x_;var Zy=Ct;function C_(e){Zy=e}function yr(){return Zy}var Co=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=yr(),r=Co({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ct?void 0:Ct].filter(o=>!!o)});e.common.issues.push(r)}var ke=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 M;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 M;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}}},M=Object.freeze({status:"aborted"}),wn=e=>({status:"dirty",value:e}),Ce=e=>({status:"valid",value:e}),ps=e=>e.status==="aborted",fs=e=>e.status==="dirty",Yt=e=>e.status==="valid",br=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 Je=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}},Yy=(e,t)=>{if(Yt(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 Te(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 dt(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:dt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ke,ctx:{common:t.parent.common,data:t.data,parsedType:dt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(br(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:dt(t)},o=this._parseSync({data:t,path:r.path,parent:r});return Yy(r,o)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:dt(t)};if(!this["~standard"].async)try{let r=this._parseSync({data:t,path:[],parent:n});return Yt(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=>Yt(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:dt(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(br(o)?o:Promise.resolve(o));return Yy(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 He({schema:this,typeName:U.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 qe.create(this,this._def)}nullable(){return ft.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _t.create(this)}promise(){return en.create(this,this._def)}or(t){return Fn.create([this,t],this._def)}and(t){return _n.create(this,t,this._def)}transform(t){return new He({...q(this._def),schema:this,typeName:U.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new In({...q(this._def),innerType:this,defaultValue:n,typeName:U.ZodDefault})}brand(){return new Eo({typeName:U.ZodBranded,type:this,...q(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new Pn({...q(this._def),innerType:this,catchValue:n,typeName:U.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Fo.create(this,t)}readonly(){return Rn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},F_=/^c[^\s-]{8,}$/i,__=/^[0-9a-z]+$/,S_=/^[0-9A-HJKMNP-TV-Z]{26}$/i,T_=/^[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,A_=/^[a-z0-9_-]{21}$/i,O_=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,I_=/^[-+]?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)?)??$/,P_=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,R_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Vc,$_=/^(?:(?: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])$/,j_=/^(?:(?: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}(=)?))?$/,Qy="((\\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])))",U_=new RegExp(`^${Qy}$`);function eb(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 W_(e){return new RegExp(`^${eb(e)}$`)}function tb(e){let t=`${Qy}T${eb(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)&&$_.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 G_(e,t){return!!((t==="v4"||!t)&&j_.test(e)||(t==="v6"||!t)&&N_.test(e))}var Xt=class e extends H{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==T.string){let i=this._getOrReturnCtx(t);return F(i,{code:D.invalid_type,expected:T.string,received:i.parsedType}),M}let r=new ke,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")P_.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")Vc||(Vc=new RegExp(R_,"u")),Vc.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")T_.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")A_.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")__.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")S_.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"?tb(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"?U_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{code:D.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?W_(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"?I_.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"?G_(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,...$.errToObj(r)})}_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,n){return this._addCheck({kind:"regex",regex:t,...$.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...$.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...$.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...$.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...$.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...$.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...$.errToObj(n)})}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 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}};Xt.create=e=>new Xt({checks:[],typeName:U.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 Dn=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)!==T.number){let i=this._getOrReturnCtx(t);return F(i,{code:D.invalid_type,expected:T.number,received:i.parsedType}),M}let r,o=new ke;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,$.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,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,n){return this._addCheck({kind:"multipleOf",value:t,message:$.toString(n)})}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 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)}};Dn.create=e=>new Dn({checks:[],typeName:U.ZodNumber,coerce:e?.coerce||!1,...q(e)});var kn=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)!==T.bigint)return this._getInvalidInput(t);let r,o=new ke;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:T.bigint,received:n.parsedType}),M}gte(t,n){return this.setLimit("min",t,!0,$.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,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,n){return this._addCheck({kind:"multipleOf",value:t,message:$.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}};kn.create=e=>new kn({checks:[],typeName:U.ZodBigInt,coerce:e?.coerce??!1,...q(e)});var vn=class extends H{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==T.boolean){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:T.boolean,received:r.parsedType}),M}return Ce(t.data)}};vn.create=e=>new vn({typeName:U.ZodBoolean,coerce:e?.coerce||!1,...q(e)});var xn=class e extends H{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==T.date){let i=this._getOrReturnCtx(t);return F(i,{code:D.invalid_type,expected:T.date,received:i.parsedType}),M}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return F(i,{code:D.invalid_date}),M}let r=new ke,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:$.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:$.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}};xn.create=e=>new xn({checks:[],coerce:e?.coerce||!1,typeName:U.ZodDate,...q(e)});var Dr=class extends H{_parse(t){if(this._getType(t)!==T.symbol){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:T.symbol,received:r.parsedType}),M}return Ce(t.data)}};Dr.create=e=>new Dr({typeName:U.ZodSymbol,...q(e)});var Cn=class extends H{_parse(t){if(this._getType(t)!==T.undefined){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:T.undefined,received:r.parsedType}),M}return Ce(t.data)}};Cn.create=e=>new Cn({typeName:U.ZodUndefined,...q(e)});var En=class extends H{_parse(t){if(this._getType(t)!==T.null){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:T.null,received:r.parsedType}),M}return Ce(t.data)}};En.create=e=>new En({typeName:U.ZodNull,...q(e)});var Qt=class extends H{constructor(){super(...arguments),this._any=!0}_parse(t){return Ce(t.data)}};Qt.create=e=>new Qt({typeName:U.ZodAny,...q(e)});var Ft=class extends H{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ce(t.data)}};Ft.create=e=>new Ft({typeName:U.ZodUnknown,...q(e)});var nt=class extends H{_parse(t){let n=this._getOrReturnCtx(t);return F(n,{code:D.invalid_type,expected:T.never,received:n.parsedType}),M}};nt.create=e=>new nt({typeName:U.ZodNever,...q(e)});var kr=class extends H{_parse(t){if(this._getType(t)!==T.undefined){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:T.void,received:r.parsedType}),M}return Ce(t.data)}};kr.create=e=>new kr({typeName:U.ZodVoid,...q(e)});var _t=class e extends H{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==T.array)return F(n,{code:D.invalid_type,expected:T.array,received:n.parsedType}),M;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 Je(n,s,n.path,a)))).then(s=>ke.mergeArray(r,s));let i=[...n.data].map((s,a)=>o.type._parseSync(new Je(n,s,n.path,a)));return ke.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:$.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:$.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:$.toString(n)}})}nonempty(t){return this.min(1,t)}};_t.create=(e,t)=>new _t({type:e,minLength:null,maxLength:null,exactLength:null,typeName:U.ZodArray,...q(t)});function wr(e){if(e instanceof Ae){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=qe.create(wr(r))}return new Ae({...e._def,shape:()=>t})}else return e instanceof _t?new _t({...e._def,type:wr(e.element)}):e instanceof qe?qe.create(wr(e.unwrap())):e instanceof ft?ft.create(wr(e.unwrap())):e instanceof pt?pt.create(e.items.map(t=>wr(t))):e}var Ae=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)!==T.object){let c=this._getOrReturnCtx(t);return F(c,{code:D.invalid_type,expected:T.object,received:c.parsedType}),M}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof nt&&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 Je(o,p,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof nt){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 Je(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=>ke.mergeObjectSync(r,c)):ke.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return $.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:$.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:U.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 qe;)i=i._def.innerType;n[r]=i}return new e({...this._def,shape:()=>n})}keyof(){return nb(X.objectKeys(this.shape))}};Ae.create=(e,t)=>new Ae({shape:()=>e,unknownKeys:"strip",catchall:nt.create(),typeName:U.ZodObject,...q(t)});Ae.strictCreate=(e,t)=>new Ae({shape:()=>e,unknownKeys:"strict",catchall:nt.create(),typeName:U.ZodObject,...q(t)});Ae.lazycreate=(e,t)=>new Ae({shape:e,unknownKeys:"strip",catchall:nt.create(),typeName:U.ZodObject,...q(t)});var Fn=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 Te(a.ctx.common.issues));return F(n,{code:D.invalid_union,unionErrors:s}),M}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 Te(l));return F(n,{code:D.invalid_union,unionErrors:a}),M}}get options(){return this._def.options}};Fn.create=(e,t)=>new Fn({options:e,typeName:U.ZodUnion,...q(t)});var Et=e=>e instanceof Sn?Et(e.schema):e instanceof He?Et(e.innerType()):e instanceof Tn?[e.value]:e instanceof An?e.options:e instanceof On?X.objectValues(e.enum):e instanceof In?Et(e._def.innerType):e instanceof Cn?[void 0]:e instanceof En?[null]:e instanceof qe?[void 0,...Et(e.unwrap())]:e instanceof ft?[null,...Et(e.unwrap())]:e instanceof Eo||e instanceof Rn?Et(e.unwrap()):e instanceof Pn?Et(e._def.innerType):[],ms=class e extends H{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==T.object)return F(n,{code:D.invalid_type,expected:T.object,received:n.parsedType}),M;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]}),M)}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=Et(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:U.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...q(r)})}};function Gc(e,t){let n=dt(e),r=dt(t);if(e===t)return{valid:!0,data:e};if(n===T.object&&r===T.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=Gc(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===T.array&&r===T.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=Gc(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===T.date&&r===T.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var _n=class extends H{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(ps(i)||ps(s))return M;let a=Gc(i.value,s.value);return a.valid?((fs(i)||fs(s))&&n.dirty(),{status:n.value,value:a.data}):(F(r,{code:D.invalid_intersection_types}),M)};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}))}};_n.create=(e,t,n)=>new _n({left:e,right:t,typeName:U.ZodIntersection,...q(n)});var pt=class e extends H{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==T.array)return F(r,{code:D.invalid_type,expected:T.array,received:r.parsedType}),M;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"}),M;!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 Je(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>ke.mergeArray(n,s)):ke.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};pt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pt({items:e,typeName:U.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!==T.object)return F(r,{code:D.invalid_type,expected:T.object,received:r.parsedType}),M;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in r.data)o.push({key:i._parse(new Je(r,a,r.path,a)),value:s._parse(new Je(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ke.mergeObjectAsync(n,o):ke.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:U.ZodRecord,...q(r)}):new e({keyType:Xt.create(),valueType:t,typeName:U.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!==T.map)return F(r,{code:D.invalid_type,expected:T.map,received:r.parsedType}),M;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Je(r,a,r.path,[c,"key"])),value:i._parse(new Je(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 M;(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 M;(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:U.ZodMap,...q(n)});var xr=class e extends H{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==T.set)return F(r,{code:D.invalid_type,expected:T.set,received:r.parsedType}),M;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 M;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 Je(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:$.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:$.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};xr.create=(e,t)=>new xr({valueType:e,minSize:null,maxSize:null,typeName:U.ZodSet,...q(t)});var gs=class e extends H{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==T.function)return F(n,{code:D.invalid_type,expected:T.function,received:n.parsedType}),M;function r(a,l){return Co({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,yr(),Ct].filter(c=>!!c),issueData:{code:D.invalid_arguments,argumentsError:l}})}function o(a,l){return Co({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,yr(),Ct].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 en){let a=this;return Ce(async function(...l){let c=new Te([]),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 Ce(function(...l){let c=a._def.args.safeParse(l,i);if(!c.success)throw new Te([r(l,c.error)]);let u=Reflect.apply(s,this,c.data),p=a._def.returns.safeParse(u,i);if(!p.success)throw new Te([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:pt.create(t).rest(Ft.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||pt.create([]).rest(Ft.create()),returns:n||Ft.create(),typeName:U.ZodFunction,...q(r)})}},Sn=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})}};Sn.create=(e,t)=>new Sn({getter:e,typeName:U.ZodLazy,...q(t)});var Tn=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}),M}return{status:"valid",value:t.data}}get value(){return this._def.value}};Tn.create=(e,t)=>new Tn({value:e,typeName:U.ZodLiteral,...q(t)});function nb(e,t){return new An({values:e,typeName:U.ZodEnum,...q(t)})}var An=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}),M}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}),M}return Ce(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})}};An.create=nb;var On=class extends H{_parse(t){let n=X.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==T.string&&r.parsedType!==T.number){let o=X.objectValues(n);return F(r,{expected:X.joinValues(o),received:r.parsedType,code:D.invalid_type}),M}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}),M}return Ce(t.data)}get enum(){return this._def.values}};On.create=(e,t)=>new On({values:e,typeName:U.ZodNativeEnum,...q(t)});var en=class extends H{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==T.promise&&n.common.async===!1)return F(n,{code:D.invalid_type,expected:T.promise,received:n.parsedType}),M;let r=n.parsedType===T.promise?n.data:Promise.resolve(n.data);return Ce(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};en.create=(e,t)=>new en({type:e,typeName:U.ZodPromise,...q(t)});var He=class extends H{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===U.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 M;let l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?M:l.status==="dirty"?wn(l.value):n.value==="dirty"?wn(l.value):l});{if(n.value==="aborted")return M;let a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?M:a.status==="dirty"?wn(a.value):n.value==="dirty"?wn(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"?M:(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"?M:(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(!Yt(s))return M;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=>Yt(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):M);X.assertNever(o)}};He.create=(e,t,n)=>new He({schema:e,typeName:U.ZodEffects,effect:t,...q(n)});He.createWithPreprocess=(e,t,n)=>new He({schema:t,effect:{type:"preprocess",transform:e},typeName:U.ZodEffects,...q(n)});var qe=class extends H{_parse(t){return this._getType(t)===T.undefined?Ce(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};qe.create=(e,t)=>new qe({innerType:e,typeName:U.ZodOptional,...q(t)});var ft=class extends H{_parse(t){return this._getType(t)===T.null?Ce(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ft.create=(e,t)=>new ft({innerType:e,typeName:U.ZodNullable,...q(t)});var In=class extends H{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===T.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};In.create=(e,t)=>new In({innerType:e,typeName:U.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...q(t)});var Pn=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 br(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Te(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Te(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Pn.create=(e,t)=>new Pn({innerType:e,typeName:U.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...q(t)});var Cr=class extends H{_parse(t){if(this._getType(t)!==T.nan){let r=this._getOrReturnCtx(t);return F(r,{code:D.invalid_type,expected:T.nan,received:r.parsedType}),M}return{status:"valid",value:t.data}}};Cr.create=e=>new Cr({typeName:U.ZodNaN,...q(e)});var J_=Symbol("zod_brand"),Eo=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}},Fo=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"?M:i.status==="dirty"?(n.dirty(),wn(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"?M: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:U.ZodPipeline})}},Rn=class extends H{_parse(t){let n=this._def.innerType._parse(t),r=o=>(Yt(o)&&(o.value=Object.freeze(o.value)),o);return br(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}};Rn.create=(e,t)=>new Rn({innerType:e,typeName:U.ZodReadonly,...q(t)});function Xy(e,t){let n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function rb(e,t={},n){return e?Qt.create().superRefine((r,o)=>{let i=e(r);if(i instanceof Promise)return i.then(s=>{if(!s){let a=Xy(t,r),l=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:l})}});if(!i){let s=Xy(t,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):Qt.create()}var H_={object:Ae.lazycreate},U;(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"})(U||(U={}));var K_=(e,t={message:`Input not instance of ${e.name}`})=>rb(n=>n instanceof e,t),ob=Xt.create,ib=Dn.create,Z_=Cr.create,Y_=kn.create,sb=vn.create,X_=xn.create,Q_=Dr.create,eS=Cn.create,tS=En.create,nS=Qt.create,rS=Ft.create,oS=nt.create,iS=kr.create,sS=_t.create,aS=Ae.create,lS=Ae.strictCreate,cS=Fn.create,uS=ms.create,dS=_n.create,pS=pt.create,fS=hs.create,mS=vr.create,hS=xr.create,gS=gs.create,yS=Sn.create,bS=Tn.create,wS=An.create,DS=On.create,kS=en.create,vS=He.create,xS=qe.create,CS=ft.create,ES=He.createWithPreprocess,FS=Fo.create,_S=()=>ob().optional(),SS=()=>ib().optional(),TS=()=>sb().optional(),AS={string:e=>Xt.create({...e,coerce:!0}),number:e=>Dn.create({...e,coerce:!0}),boolean:e=>vn.create({...e,coerce:!0}),bigint:e=>kn.create({...e,coerce:!0}),date:e=>xn.create({...e,coerce:!0})};var OS=M;function ys(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(E,x){let V=0,R=0;for(;V<E||!x;){let _=e.charCodeAt(r);if(_>=48&&_<=57)R=R*16+_-48;else if(_>=65&&_<=70)R=R*16+_-65+10;else if(_>=97&&_<=102)R=R*16+_-97+10;else break;r++,V++}return V<E&&(R=-1),R}function m(E){r=E,o="",i=0,s=16,p=0}function g(){let E=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&Er(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&Er(e.charCodeAt(r)))for(r++;r<e.length&&Er(e.charCodeAt(r));)r++;else return p=3,e.substring(E,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&&Er(e.charCodeAt(r))){for(r++;r<e.length&&Er(e.charCodeAt(r));)r++;x=r}else p=3;return e.substring(E,x)}function k(){let E="",x=r;for(;;){if(r>=n){E+=e.substring(x,r),p=2;break}let V=e.charCodeAt(r);if(V===34){E+=e.substring(x,r),r++;break}if(V===92){if(E+=e.substring(x,r),r++,r>=n){p=2;break}switch(e.charCodeAt(r++)){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+=`
124
- `;break;case 114:E+="\r";break;case 116:E+=" ";break;case 117:let _=f(4,!0);_>=0?E+=String.fromCharCode(_):p=4;break;default:p=5}x=r;continue}if(V>=0&&V<=31)if(_o(V)){E+=e.substring(x,r),p=2;break}else p=6;r++}return E}function C(){if(o="",p=0,i=r,l=a,u=c,r>=n)return i=n,s=17;let E=e.charCodeAt(r);if(qc(E)){do r++,o+=String.fromCharCode(E),E=e.charCodeAt(r);while(qc(E));return s=15}if(_o(E))return r++,o+=String.fromCharCode(E),E===13&&e.charCodeAt(r)===10&&(r++,o+=`
125
- `),a++,c=r,s=14;switch(E){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,o=k(),s=10;case 47:let x=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!_o(e.charCodeAt(r));)r++;return o=e.substring(x,r),s=12}if(e.charCodeAt(r+1)===42){r+=2;let V=n-1,R=!1;for(;r<V;){let _=e.charCodeAt(r);if(_===42&&e.charCodeAt(r+1)===47){r+=2,R=!0;break}r++,_o(_)&&(_===13&&e.charCodeAt(r)===10&&r++,a++,c=r)}return R||(r++,p=1),o=e.substring(x,r),s=13}return o+=String.fromCharCode(E),r++,s=16;case 45:if(o+=String.fromCharCode(E),r++,r===n||!Er(e.charCodeAt(r)))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+=g(),s=11;default:for(;r<n&&O(E);)r++,E=e.charCodeAt(r);if(i!==r){switch(o=e.substring(i,r),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(E),r++,s=16}}function O(E){if(qc(E)||_o(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 I(){let E;do E=C();while(E>=12&&E<=15);return E}return{setPosition:m,getPosition:()=>r,scan:t?I:C,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>i,getTokenLength:()=>r-i,getTokenStartLine:()=>l,getTokenStartCharacter:()=>i-u,getTokenError:()=>p}}function qc(e){return e===32||e===9}function _o(e){return e===10||e===13}function Er(e){return e>=48&&e<=57}var ab;(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"})(ab||(ab={}));var PS=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),Fr=200,RS={" ":{"\n":new Array(Fr).fill(0).map((e,t)=>`
126
- `+" ".repeat(t)),"\r":new Array(Fr).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Fr).fill(0).map((e,t)=>`\r
127
- `+" ".repeat(t))}," ":{"\n":new Array(Fr).fill(0).map((e,t)=>`
128
- `+" ".repeat(t)),"\r":new Array(Fr).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Fr).fill(0).map((e,t)=>`\r
129
- `+" ".repeat(t))}};var bs;(function(e){e.DEFAULT={allowTrailingComma:!1}})(bs||(bs={}));function lb(e,t=[],n=bs.DEFAULT){let r=null,o=[],i=[];function s(l){Array.isArray(o)?o.push(l):r!==null&&(o[r]=l)}return cb(e,{onObjectBegin:()=>{let l={};s(l),i.push(o),o=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{o=i.pop()},onArrayBegin:()=>{let l=[];s(l),i.push(o),o=l,r=null},onArrayEnd:()=>{o=i.pop()},onLiteralValue:s,onError:(l,c,u)=>{t.push({error:l,offset:c,length:u})}},n),o[0]}function cb(e,t,n=bs.DEFAULT){let r=ys(e,!1),o=[],i=0;function s(z){return z?()=>i===0&&z(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(z){return z?ce=>i===0&&z(ce,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(z){return z?ce=>i===0&&z(ce,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}function c(z){return z?()=>{i>0?i++:z(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice())===!1&&(i=1)}:()=>!0}function u(z){return z?()=>{i>0&&i--,i===0&&z(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let p=c(t.onObjectBegin),f=l(t.onObjectProperty),m=u(t.onObjectEnd),g=c(t.onArrayBegin),k=u(t.onArrayEnd),C=l(t.onLiteralValue),O=a(t.onSeparator),I=s(t.onComment),E=a(t.onError),x=n&&n.disallowComments,V=n&&n.allowTrailingComma;function R(){for(;;){let z=r.scan();switch(r.getTokenError()){case 4:_(14);break;case 5:_(15);break;case 3:_(13);break;case 1:x||_(11);break;case 2:_(12);break;case 6:_(16);break}switch(z){case 12:case 13:x?_(10):I();break;case 16:_(1);break;case 15:case 14:break;default:return z}}}function _(z,ce=[],Tt=[]){if(E(z),ce.length+Tt.length>0){let To=r.getToken();for(;To!==17;){if(ce.indexOf(To)!==-1){R();break}else if(Tt.indexOf(To)!==-1)break;To=R()}}}function y(z){let ce=r.getTokenValue();return z?C(ce):(f(ce),o.push(ce)),R(),!0}function b(){switch(r.getToken()){case 11:let z=r.getTokenValue(),ce=Number(z);isNaN(ce)&&(_(2),ce=0),C(ce);break;case 7:C(null);break;case 8:C(!0);break;case 9:C(!1);break;default:return!1}return R(),!0}function N(){return r.getToken()!==10?(_(3,[],[2,5]),!1):(y(!1),r.getToken()===6?(O(":"),R(),Ke()||_(4,[],[2,5])):_(5,[],[2,5]),o.pop(),!0)}function S(){p(),R();let z=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(z||_(4,[],[]),O(","),R(),r.getToken()===2&&V)break}else z&&_(6,[],[]);N()||_(4,[],[2,5]),z=!0}return m(),r.getToken()!==2?_(7,[2],[]):R(),!0}function ge(){g(),R();let z=!0,ce=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(ce||_(4,[],[]),O(","),R(),r.getToken()===4&&V)break}else ce&&_(6,[],[]);z?(o.push(0),z=!1):o[o.length-1]++,Ke()||_(4,[],[4,5]),ce=!0}return k(),z||o.pop(),r.getToken()!==4?_(8,[4],[]):R(),!0}function Ke(){switch(r.getToken()){case 3:return ge();case 1:return S();case 10:return y(!0);default:return b()}}return R(),r.getToken()===17?n.allowEmptyContent?!0:(_(4,[],[]),!1):Ke()?(r.getToken()!==17&&_(9,[],[]),!0):(_(4,[],[]),!1)}var ub;(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"})(ub||(ub={}));var db;(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"})(db||(db={}));var Jc=lb;var pb;(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"})(pb||(pb={}));G();var fb=se.object({name:se.string(),main:se.string(),compatibility_date:se.string(),compatibility_flags:se.array(se.string()).optional(),placement:se.object({mode:se.string()}).passthrough().optional(),assets:se.object({directory:se.string(),binding:se.string().optional()}).passthrough().optional(),d1_databases:se.array(se.object({database_name:se.string(),database_id:se.string(),binding:se.string(),migrations_dir:se.string().optional()}).passthrough()).default([]),kv_namespaces:se.array(se.object({binding:se.string(),id:se.string()}).passthrough()).default([]),r2_buckets:se.array(se.object({binding:se.string(),bucket_name:se.string()}).passthrough()).default([])}).passthrough();function mb(e,t="wrangler.json"){let n=Oe.join(e,t);if(!me.existsSync(n)){if(t.endsWith(".json"))return d.warn(`/${t} not found, checking for /${t}c`),mb(e,t+"c");d.warn(`/${t} not found`);return}let r=me.readFileSync(n,"utf8");d.info(`reading /${t}...`);let o;try{o=Jc(r)}catch(i){d.error(`/${t} loaded but could not parse as JSONC: ${i}`);return}try{let i=fb.parse(o);return d.info(`successfully loaded /${t}`),i}catch(i){d.error(`/${t} valid JSONC but schema validation failed: ${i}`);return}}function hb(e,t,n={}){if(!me.existsSync(e))return 0;me.mkdirSync(t,{recursive:!0});let r=me.readdirSync(e,{withFileTypes:!0}),o=0;for(let i of r){if(n.exclude&&i.name===n.exclude)continue;let s=Oe.join(e,i.name),a=Oe.join(t,i.name);i.isDirectory()?o+=hb(s,a,n):(me.copyFileSync(s,a),o++)}return o}async function gb(e,t){let n=null,r=null,o=Oe.join(t,"wrangler.json"),i=Oe.join(t,"wrangler.jsonc");me.existsSync(o)?(n=o,r=".json"):me.existsSync(i)&&(n=i,r=".jsonc"),n&&r&&(d.info(`saving user-provided wrangler JSON as /clouduser.wrangler${r}...`),me.copyFileSync(n,Oe.join(t,`clouduser.wrangler${r}`)));let s=n?mb(t,Oe.basename(n)):null,a=Oe.join(__dirname,e.config.wrangler_template_path),l=Oe.join(t,"wrangler.json");if(!me.existsSync(a))throw new Error(`Wrangler template not found at ${a}. Make sure the template is properly copied during build.`);if(d.info(`copying template /templates/${e.framework}/wrangler.${e.framework}.json to /wrangler.json`),me.copyFileSync(a,l),!s)return;let c=JSON.parse(me.readFileSync(l,"utf8"));if(s.kv_namespaces&&s.kv_namespaces.length>0&&(c.kv_namespaces=s.kv_namespaces,d.info(`merged ${s.kv_namespaces.length} KV namespace(s) into template`)),s.r2_buckets&&s.r2_buckets.length>0&&(c.r2_buckets=s.r2_buckets,d.info(`merged ${s.r2_buckets.length} R2 bucket(s) into template`)),s.d1_databases&&s.d1_databases.length>0&&(c.d1_databases=s.d1_databases,d.info(`merged ${s.d1_databases.length} D1 database(s) into template`)),me.writeFileSync(l,JSON.stringify(c,null,2)),s.d1_databases.length!==0)for(let u in s.d1_databases){let p=s.d1_databases[u];if(!p.migrations_dir){d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir is not defined`);continue}let f=p.migrations_dir,m=Oe.join(t,f);if(!me.existsSync(m)){d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) does not exist`);continue}let g=Oe.join(t,"clouduser","migrations",f),k=hb(m,g);k>0?d.info(`copied ${k} migrations to /clouduser/migrations/${f}`):d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) is empty`)}}function WS(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 yb(e){let t=null;for(let i of[".json",".jsonc"]){let s=Oe.join(e,`clouduser.wrangler${i}`);if(me.existsSync(s)){t=s;break}}if(!t)return;let n=me.readFileSync(t,"utf8"),r;try{r=Jc(n)}catch(i){throw new Error(`Failed to parse wrangler config at ${t} as JSONC: ${i}`)}let o=fb.parse(r);if(o.d1_databases&&o.d1_databases.length>0&&o.d1_databases.length>5)throw new Error(`Too many D1 databases configured: ${o.d1_databases.length}. Maximum allowed is 5.`);if(o.kv_namespaces&&o.kv_namespaces.length>0&&o.kv_namespaces.length>5)throw new Error(`Too many KV namespaces configured: ${o.kv_namespaces.length}. Maximum allowed is 5.`);if(o.r2_buckets&&o.r2_buckets.length>0){if(o.r2_buckets.length>5)throw new Error(`Too many R2 buckets configured: ${o.r2_buckets.length}. Maximum allowed is 5.`);d.info(`validating ${o.r2_buckets.length} object storage bucket name(s)...`);for(let i of o.r2_buckets)WS(i.bucket_name)}}G();Ee();te();ve();async function wb(e,t={}){let n=t.projectPath||process.cwd(),r=Date.now(),o=W.join(n,".tmp",`webflow-build-${r}`),i=t.outputDir||W.join(o,"output"),s=t.mountPath||"/app",a=Date.now(),l=Kc(n),c=t.telemetry;await c?.sendUsage("cloud_build_start",{framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),j.mkdirSync(o,{recursive:!0});try{d.info(v.green(`--- \u{1F4E6} Installing dependencies ------------------------------------
130
- `)),await zS(n,e.framework,t.telemetry),d.info(v.green(`--- \u{1F527} Setting up framework configuration ----------------------
131
- `)),await GS(n,e,s,t.deployUrl,t.environmentId),d.info(v.green(`--- \u{1F527} Setting up wrangler configuration -----------------------
132
- `)),await gb(e,n),yb(n),d.info(v.green(`--- \u{1F3D7}\uFE0F Building app -----------------------------------------------
133
- `)),d.info(`running ${e.config.build_command}...`),await qS(n,e.config.build_command,t.telemetry),d.info(v.green(`--- \u{1F9EA} Creating wrangler dry-run ----------------------------------
134
- `)),await JS(n,i),d.info(v.green(`--- \u{1F4C1} Copying assets ------------------------------------------
135
- `)),await HS(n,i,e,s),d.info(v.green(`--- \u{1F4E6} Creating tarball -----------------------------------------
136
- `));let u=await ZS(i),p=Date.now()-a;return d.info(`${ee} Build completed in ${(p/1e3).toFixed(1)}s`),await c?.sendUsage("cloud_build_success",{duration:p,framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),u}catch(u){let p=Date.now()-a;throw await c?.sendError(u instanceof Error?u:new Error(String(u)),"cloud_build_failure",{duration:p,framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),u}}function Kc(e){let t=W.join(e,"wrangler.json");if(!j.existsSync(t))return{hasKV:!1,hasD1:!1,hasR2:!1,hasVars:!1,kvCount:0,d1Count:0,r2Count:0,varCount:0};try{let n=JSON.parse(j.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=W.dirname(e);t.includes(".tmp/webflow-build-")&&(d.info(v.green(`--- \u{1F9F9} Cleaning up build artifacts... -----------------
137
- `)),j.rmSync(t,{recursive:!0,force:!0}))}catch(t){d.warn(`Warning: Failed to clean up build artifacts: ${t}`)}}function kb(e,t){try{if(!t.config.config_template_path)return;let n=W.join(__dirname,t.config.config_template_path),r=W.basename(n,".template"),o=r.slice(0,r.lastIndexOf("."));d.info(v.grey(`--- \u{1F9F9} Reverting framework configuration changes ---------------
138
- `));for(let s of["mjs","cjs","js","ts"]){let a=W.join(e,`clouduser.${o}.${s}`),l=W.join(e,`${o}.${s}`);if(j.existsSync(a)){d.info(`restoring /${o}.${s} from /clouduser.${o}.${s}...`),j.existsSync(l)&&j.unlinkSync(l),j.renameSync(a,l);break}}for(let s of[".jsonc",".json"]){let a=W.join(e,`clouduser.wrangler${s}`);if(j.existsSync(a)){d.info(`restoring user wrangler${s} from backup...`);let l=W.join(e,"wrangler.json");j.existsSync(l)&&j.unlinkSync(l);let c=W.join(e,`wrangler${s}`);j.renameSync(a,c);break}}let i=W.join(e,"clouduser");j.existsSync(i)&&(d.info("cleaning up clouduser directory..."),j.rmSync(i,{recursive:!0,force:!0}));for(let s of t.config.additional_config_files||[]){let a=W.join(e,W.basename(s));j.existsSync(a)&&(d.info(`cleaning up additional config file ${a}...`),j.unlinkSync(a))}}catch(n){d.warn(`Warning: Failed to cleanup framework configuration: ${n}`)}}async function zS(e,t,n){let r=Date.now(),o=["--no-update-notifier","--no-progress"];try{if(t==="astro"){let a=W.join(e,"package.json"),l=JSON.parse(j.readFileSync(a,"utf8"));l.dependencies?.["@astrojs/react"]||l.devDependencies?.["@astrojs/react"]||(d.info("Warning: cosmic astro integration requires @astrojs/react and this project doesn't require it. Installing now..."),(0,_r.execSync)("npm install --save @astrojs/react",{cwd:e,stdio:"inherit"}))}let i=W.join(e,"package-lock.json");j.existsSync(i)?(d.info("Running npm ci..."),(0,_r.execSync)(`npm ci ${o.join(" ")}`,{cwd:e,stdio:"inherit"})):(d.info("Warning: No package-lock.json found, installing dependencies with npm install"),(0,_r.execSync)(`npm install ${o.join(" ")}`,{cwd:e,stdio:"inherit"}));let s=Date.now()-r;await n?.sendUsage("cloud_install_dependencies_success",{duration:s,framework:t,hasPackageLock:j.existsSync(W.join(e,"package-lock.json"))})}catch(i){let s=Date.now()-r;throw await n?.sendError(i instanceof Error?i:new Error(String(i)),"cloud_install_dependencies_failure",{duration:s,framework:t,hasPackageLock:j.existsSync(W.join(e,"package-lock.json"))}),i}}function VS(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 GS(e,t,n,r,o){if(d.info(`Framework: ${t.framework}`),d.info(`Mount path: ${n}`),d.info(`Deployment type: ${t.config.deployment_type}`),!t.config.config_template_path)return;let i=W.join(__dirname,t.config.config_template_path),s=W.basename(i,".template"),a=s.slice(0,s.lastIndexOf("."));for(let f of["mjs","cjs","js","ts"]){let m=W.join(e,`${a}.${f}`);if(j.existsSync(m)){let g=W.join(e,`clouduser.${a}.${f}`);d.info(`renaming user base config /${a}.${f} to /clouduser.${a}.${f}...`),j.renameSync(m,g);break}}let l=W.join(e,s);d.info(`rendering override config from /templates/${t.framework}/${s}.template to /${s}`);let c=j.readFileSync(i,"utf8"),u=t.framework==="nextjs"&&n==="/"?"":n,p=c.replace(/\$\{([^}]+)\}/g,(f,m)=>({COSMIC_MOUNT_PATH:u,COSMIC_DEPLOY_URL:r||(o?VS(o):"")})[m]??f);j.writeFileSync(l,p);for(let f of t.config.additional_config_files||[]){let m=W.join(__dirname,f);j.statSync(m,{throwIfNoEntry:!1})?(d.info(`copying additional config file /${f} to ${W.join(e,W.basename(f))}`),j.copyFileSync(m,W.join(e,W.basename(f)))):d.warn(`additional config file /${f} does not exist; skipping`)}}async function qS(e,t,n){let r=Date.now();try{let o=t.split(" "),i=o[0],s=o.slice(1);(0,_r.execSync)(`npx ${i} ${s.join(" ")}`,{cwd:e,stdio:"inherit"});let a=Date.now()-r;await n?.sendUsage("cloud_build_command_success",{duration:a,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 JS(e,t){j.mkdirSync(t,{recursive:!0});let n=W.join(e,"wrangler.json"),r=W.join(e,"wrangler.jsonc");if(!j.existsSync(n)&&!j.existsSync(r))throw new Error("Missing wrangler configuration: wrangler.json or wrangler.jsonc file is required");(0,_r.execSync)(`npx wrangler deploy --dry-run --outdir="${t}"`,{cwd:e,stdio:"inherit"})}async function HS(e,t,n,r){let o=n.config.assets_path,i=n.config.assets_exclude_path,s=r.replace(/\/+$/,"").replace(/^\/+/,"");if((n.framework==="nextjs"||n.framework==="astro")&&s){let u=W.join(e,o);if(j.existsSync(u)&&j.statSync(u).isDirectory()){let f=j.readdirSync(u,{withFileTypes:!0}).find(m=>!(!m.isDirectory()||i&&m.name===i||n.framework==="astro"&&(m.name==="_routes.json"||m.name==="_worker.js")));f&&(o=`${o}/${f.name}`)}}let a=W.join(t,"assets",s||"");j.mkdirSync(a,{recursive:!0});let l=W.join(e,o);if(j.existsSync(l)&&j.statSync(l).isDirectory()){d.info(`copying assets from /${o} to output/assets...`);try{i?(d.info(`excluding ${i}`),vb(l,a,i)):Hc(l,a)}catch(u){d.error(u,{prefix:"Failed to copy assets:"})}}else d.info("No assets to copy or assets directory not found");KS(e,t,n);let c=null;for(let u of[".json",".jsonc"]){let p=W.join(e,`clouduser.wrangler${u}`);if(j.existsSync(p)){c=p;break}}if(c){d.info("including user wrangler config in output..."),j.copyFileSync(c,W.join(t,"clouduser.wrangler.json"));let u=W.join(e,"clouduser","migrations");if(j.existsSync(u)){d.info("copying migrations from clouduser/migrations to output/migrations...");let p=W.join(t,"migrations");Hc(u,p)}}}function KS(e,t,n){let r=W.join(e,"webflow.json"),o=W.join(t,"webflow.json"),i={};if(j.existsSync(r))try{i=JSON.parse(j.readFileSync(r,"utf8"))}catch(s){d.warn(`Failed to parse webflow.json, writing a minimal one for the deployer: ${s instanceof Error?s.message:String(s)}`)}i.cloud={...i.cloud,framework:n.framework,deployment_type:n.config.deployment_type,entrypoint_path:n.config.entrypoint_path},j.writeFileSync(o,JSON.stringify(i,null,2))}async function ZS(e){let t=`${e}.tar.gz`;try{return await bb.create({gzip:!0,file:t,cwd:W.dirname(e)},[W.basename(e)]),d.info(`Tarball created: ${t}`),t}catch(n){throw new h(n,{prefix:"Failed to create tarball:"})}}function Hc(e,t){j.mkdirSync(t,{recursive:!0});let n=j.readdirSync(e,{withFileTypes:!0});for(let r of n){let o=W.join(e,r.name),i=W.join(t,r.name);r.isDirectory()?Hc(o,i):j.copyFileSync(o,i)}}function vb(e,t,n){j.mkdirSync(t,{recursive:!0});let r=j.readdirSync(e,{withFileTypes:!0});for(let o of r){if(o.name===n)continue;let i=W.join(e,o.name),s=W.join(t,o.name);o.isDirectory()?vb(i,s,n):j.copyFileSync(i,s)}}ye();le();G();var YS="DUPLICATE_ENVIRONMENT_MOUNT",XS="ENVIRONMENT_MOUNT_MISMATCH",QS="DUPLICATE_ENVIRONMENT_BRANCH",e2="INVALID_MOUNT_PATH_FORMAT",t2="INVALID_PROJECT_ID",xb={[YS]:"An environment with this mount path already exists for this site. Please choose a different mount path.",[XS]:"This environment already exists with a different mount path. Please create a new environment or use the existing environment's mount path.",[QS]:"An environment with this branch already exists for this project.",[e2]:"Mount path format is invalid. It must start with a / and be followed by at least one character (e.g., /app).",[t2]:"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 Cb(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 xb)if(n.includes(i))return xb[i];return`An unknown error occurred. Error code: ${t.code||"N/A"}, Message: ${t.msg||"No message provided"}`}var Sr=w(require("fs")),Zc=require("child_process");G();te();ve();var Eb=104857600;function Fb(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 n2(){try{let e=(0,Zc.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,Zc.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 Yc(e,t,n){let r=await fetch(`${P}${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=Cb(i);throw new Error(s)}return r.json()}async function _b(e,t,n,r){let{manifest:o}=Q(),i=o.cloud||{},s=i.project_id,a=i.framework;if(!a)throw new h("No framework specified in webflow.json. Please ensure your webflow.json has a cloud.framework property");let l=await r2({siteId:e.siteId,apiToken:e.accessToken,framework:a,mountPath:n,environment:t,projectId:s,projectName:r?.projectName,description:r?.description,directory:r?.directory,version:n2()});return!s&&l.project_id&&(d.info("\u{1F4DD} Updating webflow.json with project ID..."),oe({cloud:{...i,project_id:l.project_id}})),l}async function r2(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 Yc(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 Yc(r,o,{method:"GET"})}async function Tb(e){let{siteId:t,accessToken:n}=e,r=t?`/cosmic/${t}/cli-projects`:"/cosmic/cli-projects";return Yc(n,r,{method:"GET"})}async function Ab(e,t){if(!Sr.existsSync(e))throw new Error(`Tarball not found at ${e}`);let n=Sr.statSync(e);if(n.size>Eb)throw new Error(`Build output is too large (${Fb(n.size)}). Maximum allowed size is ${Fb(Eb)}.`);let r=Sr.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 h(l,{prefix:`${L} Upload failed with response:`})}}async function Ob(e,t){if(!e||e==="undefined")throw new h("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 h(`Failed to trigger deployment: ${r.status} ${r.statusText}`)}var Ib=require("webflow-api");le();le();te();function Xc(e){return new Ib.WebflowClient({accessToken:e,environment:{base:`${P}/v2`,dataApi:`${P}/v2`,contentDeliveryApi:`${Vo}/v2`}})}async function So(e,t){try{let r=await Xc(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 h(n,{prefix:"Error fetching site details:"})}}async function Qc(e,t){try{return{customDomains:(await Xc(e).sites.getCustomDomain(t)).customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(n){throw new h(n,{prefix:"Error fetching custom domains:"})}}async function eu(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 h(t,{prefix:`Failed to fetch manifest from ${e}:`})}}function tu(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=Xc(e),o=await So(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 h(r,{prefix:"Error publishing site:"})}}$e();Xs();G();async function Rb(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=Mn("Validating mount path configuration...").start();try{let s=await So(o,r),a=await Qc(o,r),l=[`${s.shortName}.webflow.io`,...a.customDomains?.map(g=>g.url)||[]],c=0;i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (0/${l.length})`;let u=l.map(async g=>{try{let k=await eu(g),C=Array.isArray(k.cosmic)?k.cosmic.map(I=>I.mountPath).filter(I=>typeof I=="string"):[],O=tu(k,t,n);return{domain:g,mountPaths:C,isValid:O===!0}}catch(k){return{domain:g,mountPaths:[],isValid:!1,error:k instanceof Error?k.message:String(k)}}finally{c++,i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (${c}/${l.length})`}}),p=await Promise.all(u),f=p.some(g=>!g.isValid),m=p.every(g=>g.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 $b(e,t,n){let{siteId:r,accessToken:o}=e;if(!r)return[];try{let i=await So(o,r),s=await Qc(o,r),l=[`${i.shortName}.webflow.io`,...s.customDomains?.map(u=>u.url)||[]].map(async u=>{try{let p=await eu(u),f=tu(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 jb(e,t){return e.map(n=>`${n.startsWith("localhost")||n.startsWith("127.0.0.1")?"http":"https"}://${n}${t}`)}async function Bb(e){let t=e.map(r=>({name:r,value:r,checked:!0})),n=await Jo({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 Nb(){return await Fe({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 nu(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=Mn(`Publishing site to ${t.length} domain(s)...`).start();try{let s=`${(await So(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 $n=w(require("path"));ye();G();Ee();le();Se();var ks=w(require("fs"));te();ve();le();$e();te();G();async function ws(e){let t=await fetch(`${P}/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 h(`Missing required scopes for workspace access.
119
+ `,c),"")}`),{componentsFiles:o,componentsVolume:i,componentsMetadata:a,componentsOptions:l,sourceMaps:s}})}async function d_(e,t,n,r,o,i,s){let{trackPerformance:a,libraryConfig:l}=e;return await a("generate_library_bundle",async()=>await Ps({libraryIdentifier:`_${o}`,renderer:l.renderer,framework:l.framework,publicPath:on(i[jr.Environment.Client]),sourceVolumes:[n],componentsFiles:t,componentsOptions:r,debugBundler:s?.debugBundler,dev:s?.dev,overrideConfig:e.overrideConfig,failOnWarnings:!s?.force,bundler:s?.bundler}))}async function p_(e,t,n,r){let{trackPerformance:o,apiOptions:i}=e;return await o("upload_files",async()=>{let s=t.map(([l,c])=>{let u=(0,Ls.resolve)((0,Ls.join)(`/${c}`,`${l.name}`));return Wo(n.readFileSync(u,"utf8").toString(),u,{bundleEnvironment:c})}),{signatures:a}=await Hc({resourceId:r,files:s.map(({meta:l})=>l),options:i});await Promise.all(a.map(async l=>{let c=s.find(u=>u.meta.fileHash===l.hash);if(!c)throw new Error(`File not found: ${l.hash}`);await Uo(c,l.value)}))})}async function f_(e,t,n,r,o){let{trackPerformance:i,libraryConfig:s,apiOptions:a}=e;return await i("share_library",async()=>{let l={clientModule:{bundleUrl:on(o[jr.Environment.Client])+ho,loaderType:jr.ModuleLoader.FEDERATION},serverModule:{bundleUrl:on(o[jr.Environment.Server])+wo}},c=aw(t,{framework:s.framework,sourceMaps:n}),{taskId:u}=await Zc({resourceId:r,codeModule:l,components:Object.values(c),options:a});d.debug(JSON.stringify({taskId:u},null,2))})}async function cu(e){e?.verbose&&(process.env.DEBUG="true");let t,n=Date.now(),r;try{r=await Y({apiToken:e?.apiToken})}catch(s){throw d.error(s),s}d.debug("Initializing telemetry service...");let o=G.forCodeLibraries({authToken:r}),i=fp(o);try{d.debug("Checking dependencies versions..."),new Cn().run();let s={apiToken:r};t=d.spinner("Initializing");let a=await i("get_code_libraries",async()=>await qc({options:s})),{workspace:l,libraries:c}=a;t.succeed(),d.debug("Parsing library config...");let u=await Ns({existingCodeLibraries:c}),p=u.bundleConfig?require(u.bundleConfig):{},f={trackPerformance:i,apiOptions:s,libraryConfig:u,overrideConfig:p};t=d.spinner("Collecting metadata");let{componentsFiles:m,componentsVolume:h,componentsMetadata:v,componentsOptions:k,sourceMaps:T}=await u_(f,e);if(t.succeed(),!await dw({libraryConfig:u,componentsMetadata:v,existingCodeLibraries:c,sourceMaps:T,workspaceInfo:l}))return;t=d.spinner("Creating code library");let{resourceId:C,profileSlug:x,workspace:z,s3Urls:R,cdnUrls:S}=await i("init_code_library",async()=>await Gc({name:u.name,slug:u.id,description:u.description,options:s}));t.succeed(),d.debug(JSON.stringify({resourceId:C,profileSlug:x,s3Urls:R,cdnUrls:S},null,2)),await o.sendUsage("library_initialized",{libraryName:u.name,framework:u.framework,resourceId:C,profileSlug:x}),u.id||se({library:{id:x}}),t=d.spinner("Compiling code components");let{outputFiles:y,outputVolume:b}=await d_(f,m,h,k,C,S,e);t.succeed(),await o.sendUsage("bundle_generated",{libraryName:u.name,componentCount:Object.keys(m).length,resourceId:C,profileSlug:x}),t=d.spinner("Uploading files"),await p_(f,y,b,C),t.succeed(),await o.sendUsage("files_uploaded",{libraryName:u.name,fileCount:y.length,resourceId:C,profileSlug:x}),t=d.spinner("Sharing library"),await f_(f,v,T,C,S),t.succeed(),d.success(`Code library shared successfully${z?.slug?`: ${pr}/dashboard/workspace/${z?.slug}/shared-libraries-and-templates`:"!"}`);let B=Date.now()-n;await o.sendUsage("share_library",{duration:B,componentCount:Object.keys(m).length,libraryName:u.name,framework:u.framework,resourceId:C,profileSlug:x})}catch(s){t?.fail();let a=Date.now()-n;throw await o.sendError(s instanceof Error?s:new Error(String(s)),"share_library",{duration:a}),new g(s)}}var Ms=w(require("fs")),$r=require("path");J();ys();te();var m_="CodeLibrary",g_="dist",h_="http://localhost/";async function uu(e){e.verbose&&(process.env.DEBUG="true");let t;try{d.debug("Checking dependencies versions..."),new Cn().run(),d.debug("Looking for manifest...");let n=await Ns({existingCodeLibraries:[]}),r=xs(n.name)||m_,o=`_${e.libraryId||r}`;e?.debugBundler&&d.debug(`Library Config: ${JSON.stringify(n,null,2)}`),t=d.spinner("Collecting metadata");let{componentsFiles:i,componentsVolume:s}=await $s(n);e?.debugBundler&&d.debug(`Components: ${JSON.stringify(i,null,2)}`);let a=n.bundleConfig?require(n.bundleConfig):{},{sourceMaps:l,metadata:c,options:u}=await Rs({declarations:i,sources:s,overrideConfig:a,performTypeCheck:hs(i,e),skipSourceMaps:!e?.debugBundler,bundler:e.bundler});e?.debugBundler&&(d.debug(`Metadata: ${JSON.stringify(c,null,2)}`),d.debug(`Source Maps:
120
+
121
+ ${Object.entries(l).reduce((m,[h,v])=>(m+=`${h}: ${JSON.stringify(JSON.parse(v),null,2)}
122
+
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||h_),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,$r.join)(`/${h}`,`${m.name}`),k=Wo(f.readFileSync(v,"utf8").toString(),v,{bundleEnvironment:h}),T=(0,$r.join)(process.cwd(),e.outputPath||g_);Ms.default.existsSync((0,$r.join)(T,`${h}`))||Ms.default.mkdirSync((0,$r.join)(T,`${h}`),{recursive:!0}),Ms.default.writeFileSync((0,$r.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")),du=w(require("path"));J();Ce();function y_(){try{if(!qo.default.existsSync(Ne))return null;let e=qo.default.readdirSync(Ne).filter(t=>t.endsWith(".log")).map(t=>({name:t,path:du.default.join(Ne,t),time:qo.default.statSync(du.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 pu(){let e=y_();e&&console.info(`${ur} Latest log: ${e}`),console.info(`${ur} All logs: ${Ne}`)}async function Cw(e){e.command("log").description("Display the logs directory and path to the latest log file, if available.").action(pu)}var Rn=require("commander"),fu=new Rn.Option("--no-input","Avoid prompting or doing anything interactive. Use this for CI/CD pipelines."),mu=new Rn.Option("--manifest <path>","Path to a manifest.json file or directory containing webflow.json. Default: ./webflow.json"),gu=new Rn.Option("--skip-update-check","Skip checking for @webflow packages updates"),hu=new Rn.Option("--verbose","Display more information for debugging purposes."),Go=new Rn.Option("--api-token <token>","API token. Default: value set in WEBFLOW_API_TOKEN env variable."),Br=new Rn.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 w_="Import a library of Code Components into your Webflow Workspace.",b_="Bundle a library of Code Components for local development.",Ew=new an.Option("-f, --force","Force the bundler to finish compiling, even if there are warnings or type errors."),Fw=new an.Option("--debug-bundler","Display final bundler configurations for debugging purposes."),Sw=new an.Option("--dev","Bundle in development mode for debugging purposes."),_w=new an.Option("--bundler <engine>","Bundler to use: webpack or rspack (experimental). Default: webpack").choices(["webpack","rspack"]).default("webpack").hideHelp(),D_=new an.Option("--library-id <id>","Set the library identifier to use for the bundle.").hideHelp(),v_=new an.Option("--public-path <path>","Set the public path for the bundle."),k_=new an.Option("--output-path <path>","Override the output path for the bundle. Default is './dist'");function yu(e,t){return e.command(t).description(w_).addOption(Go).addOption(Ew).addOption(Fw).addOption(Sw).addOption(_w).action(Ho(cu))}function wu(e,t){return e.command(t).description(b_).addOption(D_).addOption(v_).addOption(k_).addOption(Ew).addOption(Fw).addOption(Sw).addOption(_w).action(Ho(uu))}var Aw=e=>{let t=e.command("library").description("CLI for managing your Webflow libraries of Code Components.");yu(t,"share"),wu(t,"bundle"),t.command("log").description("Display the logs directory and path to the latest log file, if available.").action(pu)};var Tw=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(Br).action(Mh),yu(t,"import"),wu(t,"bundle"),t.command("export").description("Export Webflow Components from your Webflow Site.").addOption(Go).addOption(Br).action(Ho(vs))};var Zb=w(require("path"));var $t=w(require("fs")),Ye=w(require("path"));J();We();var fe={New:"new",Existing:"existing"},Ow="cli",ln=3,cn=39,Ws="astro",Pw="cloud-scaffolds";var Iw="package.json",jn="webflow.json",Us="wf-placeholder-name",Rw="CLOUD_MOUNT_PATH",jw="gitignore";function bu(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(Pw,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(jn)&&$t.existsSync(c))continue;if(l.includes(Iw)||l.includes(jn)){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(Rw,t))}else if(Ye.basename(c).toLowerCase()===jw){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")),$w=w(require("fs-extra")),dn=w(require("path")),Cu=w(require("os")),Bw=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-astro6",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-astro6-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 Du(){return Object.keys(Ko)}function vu(){return[...new Set(Du().map(e=>e.replace(/-minimal$/,"")))]}function ku(){return["astro","nextjs"]}function xu(e){let n=`${e.replace(/-minimal$/,"")}-minimal`;if(!Ko[n]){let r=Du();throw new ve(`No minimal scaffold for "${e}". Supported: ${r.join(", ")}`,n,r)}return n}J();var x_="https://github.com";async function Eu(e){let t=e.endsWith("-minimal")?e:xu(e);return Vs(t)}async function Vs(e){return Yo(e).source.type==="github"?C_(e):Nw(e)}async function Nw(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 Fu(n);return{scaffoldId:e,files:r,extractionRoot:n}}async function C_(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=`${x_}/${t.source.repo}/archive/${n}.tar.gz`,o=await un.promises.mkdtemp(dn.join(Cu.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 E_(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 Fu(p);return{scaffoldId:e,files:f,extractionRoot:p}}catch(s){try{$w.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 E_(e,t){let n=dn.join(Cu.tmpdir(),`webflow-scaffold-${Date.now()}.tar.gz`);await un.promises.writeFile(n,new Uint8Array(e.buffer,e.byteOffset,e.byteLength));try{await Bw.extract({file:n,cwd:t})}finally{await un.promises.unlink(n).catch(()=>{})}}async function Fu(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 Fu(o)):t.push(o)}return t}var Ju=w(require("fs-extra"));We();Be();var V=w(require("fs")),ne=w(require("path")),si=require("child_process"),vb=w(require("tar"));var Se=w(require("fs")),ft=w(require("path"));var U={};td(U,{BRAND:()=>Y_,DIRTY:()=>$n,EMPTY_PATH:()=>A_,INVALID:()=>L,NEVER:()=>j2,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:()=>zr,ZodNaN:()=>Jr,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:()=>Vr,ZodString:()=>fn,ZodSymbol:()=>Wr,ZodTransformer:()=>et,ZodTuple:()=>xt,ZodType:()=>H,ZodUndefined:()=>Wn,ZodUnion:()=>zn,ZodUnknown:()=>Lt,ZodVoid:()=>Ur,addIssueToContext:()=>F,any:()=>s2,array:()=>u2,bigint:()=>t2,boolean:()=>Zw,coerce:()=>R2,custom:()=>qw,date:()=>n2,datetimeRegex:()=>Vw,defaultErrorMap:()=>Bt,discriminatedUnion:()=>m2,effect:()=>F2,enum:()=>x2,function:()=>D2,getErrorMap:()=>Nr,getParsedType:()=>kt,instanceof:()=>Q_,intersection:()=>g2,isAborted:()=>Js,isAsync:()=>Lr,isDirty:()=>qs,isValid:()=>pn,late:()=>X_,lazy:()=>v2,literal:()=>k2,makeIssue:()=>Xo,map:()=>w2,nan:()=>e2,nativeEnum:()=>C2,never:()=>l2,null:()=>i2,nullable:()=>_2,number:()=>Hw,object:()=>d2,objectUtil:()=>Su,oboolean:()=>I2,onumber:()=>P2,optional:()=>S2,ostring:()=>O2,pipeline:()=>T2,preprocess:()=>A2,promise:()=>E2,quotelessJson:()=>F_,record:()=>y2,set:()=>b2,setErrorMap:()=>__,strictObject:()=>p2,string:()=>Gw,symbol:()=>r2,transformer:()=>F2,tuple:()=>h2,undefined:()=>o2,union:()=>f2,unknown:()=>a2,util:()=>X,void:()=>c2});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 Su;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Su||(Su={}));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"]),F_=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 S_=(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=S_;var Lw=Bt;function __(e){Lw=e}function Nr(){return Lw}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}},A_=[];function F(e,t){let n=Nr(),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",Lr=e=>typeof Promise<"u"&&e instanceof Promise;var j;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(j||(j={}));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}},Mw=(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(Lr(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 Mw(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(Lr(o)?o:Promise.resolve(o));return Mw(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}},T_=/^c[^\s-]{8,}$/i,O_=/^[0-9a-z]+$/,P_=/^[0-9A-HJKMNP-TV-Z]{26}$/i,I_=/^[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,R_=/^[a-z0-9_-]{21}$/i,j_=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$_=/^[-+]?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)?)??$/,B_=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,N_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",_u,L_=/^(?:(?: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])$/,M_=/^(?:(?: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])$/,W_=/^(([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]))$/,U_=/^(([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])$/,z_=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,V_=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Uw="((\\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])))",J_=new RegExp(`^${Uw}$`);function zw(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 q_(e){return new RegExp(`^${zw(e)}$`)}function Vw(e){let t=`${Uw}T${zw(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 G_(e,t){return!!((t==="v4"||!t)&&L_.test(e)||(t==="v6"||!t)&&W_.test(e))}function H_(e,t){if(!j_.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 Z_(e,t){return!!((t==="v4"||!t)&&M_.test(e)||(t==="v6"||!t)&&U_.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")B_.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")_u||(_u=new RegExp(N_,"u")),_u.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")I_.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")R_.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")T_.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")O_.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")P_.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"?Vw(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"?J_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{code:D.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?q_(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"?$_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"duration",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?G_(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"?H_(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"?Z_(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"?z_.test(t.data)||(o=this._getOrReturnCtx(t,o),F(o,{validation:"base64",code:D.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?V_.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,...j.errToObj(r)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...j.errToObj(t)})}url(t){return this._addCheck({kind:"url",...j.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...j.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...j.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...j.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...j.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...j.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...j.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...j.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...j.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...j.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...j.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...j.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,...j.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,...j.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...j.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...j.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...j.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...j.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...j.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...j.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...j.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...j.errToObj(n)})}nonempty(t){return this.min(1,j.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 K_(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"?K_(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,j.toString(n))}gt(t,n){return this.setLimit("min",t,!1,j.toString(n))}lte(t,n){return this.setLimit("max",t,!0,j.toString(n))}lt(t,n){return this.setLimit("max",t,!1,j.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:j.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:j.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:j.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.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,j.toString(n))}gt(t,n){return this.setLimit("min",t,!1,j.toString(n))}lte(t,n){return this.setLimit("max",t,!0,j.toString(n))}lt(t,n){return this.setLimit("max",t,!1,j.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:j.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:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:j.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:j.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:j.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 Wr=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)}};Wr.create=e=>new Wr({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 Ur=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)}};Ur.create=e=>new Ur({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:j.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:j.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:j.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 Mr(e){if(e instanceof Ie){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Xe.create(Mr(r))}return new Ie({...e._def,shape:()=>t})}else return e instanceof Mt?new Mt({...e._def,type:Mr(e.element)}):e instanceof Xe?Xe.create(Mr(e.unwrap())):e instanceof Ct?Ct.create(Mr(e.unwrap())):e instanceof xt?xt.create(e.items.map(t=>Mr(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 j.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:j.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 Mr(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 Jw(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 Au(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=Au(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=Au(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=Au(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)})}},zr=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}}}};zr.create=(e,t,n)=>new zr({valueType:t,keyType:e,typeName:M.ZodMap,...q(n)});var Vr=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:j.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:j.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};Vr.create=(e,t)=>new Vr({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,Nr(),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,Nr(),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 Jw(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=Jw;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 Lr(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 Jr=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}}};Jr.create=e=>new Jr({typeName:M.ZodNaN,...q(e)});var Y_=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 Lr(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 Ww(e,t){let n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function qw(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=Ww(t,r),l=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:l})}});if(!i){let s=Ww(t,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):mn.create()}var X_={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 Q_=(e,t={message:`Input not instance of ${e.name}`})=>qw(n=>n instanceof e,t),Gw=fn.create,Hw=Bn.create,e2=Jr.create,t2=Nn.create,Zw=Ln.create,n2=Mn.create,r2=Wr.create,o2=Wn.create,i2=Un.create,s2=mn.create,a2=Lt.create,l2=dt.create,c2=Ur.create,u2=Mt.create,d2=Ie.create,p2=Ie.strictCreate,f2=zn.create,m2=Gs.create,g2=Vn.create,h2=xt.create,y2=Hs.create,w2=zr.create,b2=Vr.create,D2=Zs.create,v2=Jn.create,k2=qn.create,x2=Gn.create,C2=Hn.create,E2=gn.create,F2=et.create,S2=Xe.create,_2=Ct.create,A2=et.createWithPreprocess,T2=ei.create,O2=()=>Gw().optional(),P2=()=>Hw().optional(),I2=()=>Zw().optional(),R2={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 j2=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,R=0;for(;z<C||!x;){let S=e.charCodeAt(r);if(S>=48&&S<=57)R=R*16+S-48;else if(S>=65&&S<=70)R=R*16+S-65+10;else if(S>=97&&S<=102)R=R*16+S-97+10;else break;r++,z++}return z<C&&(R=-1),R}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&&qr(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&qr(e.charCodeAt(r)))for(r++;r<e.length&&qr(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&&qr(e.charCodeAt(r))){for(r++;r<e.length&&qr(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:C+="\r";break;case 116:C+=" ";break;case 117:let S=f(4,!0);S>=0?C+=String.fromCharCode(S):p=4;break;default:p=5}x=r;continue}if(z>=0&&z<=31)if(ti(z)){C+=e.substring(x,r),p=2;break}else p=6;r++}return C}function k(){if(o="",p=0,i=r,l=a,u=c,r>=n)return i=n,s=17;let C=e.charCodeAt(r);if(Tu(C)){do r++,o+=String.fromCharCode(C),C=e.charCodeAt(r);while(Tu(C));return s=15}if(ti(C))return r++,o+=String.fromCharCode(C),C===13&&e.charCodeAt(r)===10&&(r++,o+=`
125
+ `),a++,c=r,s=14;switch(C){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,o=v(),s=10;case 47:let x=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!ti(e.charCodeAt(r));)r++;return o=e.substring(x,r),s=12}if(e.charCodeAt(r+1)===42){r+=2;let z=n-1,R=!1;for(;r<z;){let S=e.charCodeAt(r);if(S===42&&e.charCodeAt(r+1)===47){r+=2,R=!0;break}r++,ti(S)&&(S===13&&e.charCodeAt(r)===10&&r++,a++,c=r)}return R||(r++,p=1),o=e.substring(x,r),s=13}return o+=String.fromCharCode(C),r++,s=16;case 45:if(o+=String.fromCharCode(C),r++,r===n||!qr(e.charCodeAt(r)))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+=h(),s=11;default:for(;r<n&&T(C);)r++,C=e.charCodeAt(r);if(i!==r){switch(o=e.substring(i,r),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(C),r++,s=16}}function T(C){if(Tu(C)||ti(C))return!1;switch(C){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function P(){let C;do C=k();while(C>=12&&C<=15);return C}return{setPosition:m,getPosition:()=>r,scan:t?P:k,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>i,getTokenLength:()=>r-i,getTokenStartLine:()=>l,getTokenStartCharacter:()=>i-u,getTokenError:()=>p}}function Tu(e){return e===32||e===9}function ti(e){return e===10||e===13}function qr(e){return e>=48&&e<=57}var Kw;(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"})(Kw||(Kw={}));var B2=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),Gr=200,N2={" ":{"\n":new Array(Gr).fill(0).map((e,t)=>`
126
+ `+" ".repeat(t)),"\r":new Array(Gr).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Gr).fill(0).map((e,t)=>`\r
127
+ `+" ".repeat(t))}," ":{"\n":new Array(Gr).fill(0).map((e,t)=>`
128
+ `+" ".repeat(t)),"\r":new Array(Gr).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(Gr).fill(0).map((e,t)=>`\r
129
+ `+" ".repeat(t))}};var Ys;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Ys||(Ys={}));function Yw(e,t=[],n=Ys.DEFAULT){let r=null,o=[],i=[];function s(l){Array.isArray(o)?o.push(l):r!==null&&(o[r]=l)}return Xw(e,{onObjectBegin:()=>{let l={};s(l),i.push(o),o=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{o=i.pop()},onArrayBegin:()=>{let l=[];s(l),i.push(o),o=l,r=null},onArrayEnd:()=>{o=i.pop()},onLiteralValue:s,onError:(l,c,u)=>{t.push({error:l,offset:c,length:u})}},n),o[0]}function Xw(e,t,n=Ys.DEFAULT){let r=Ks(e,!1),o=[],i=0;function s(W){return W?()=>i===0&&W(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(W){return W?ce=>i===0&&W(ce,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(W){return W?ce=>i===0&&W(ce,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}function c(W){return W?()=>{i>0?i++:W(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice())===!1&&(i=1)}:()=>!0}function u(W){return W?()=>{i>0&&i--,i===0&&W(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let p=c(t.onObjectBegin),f=l(t.onObjectProperty),m=u(t.onObjectEnd),h=c(t.onArrayBegin),v=u(t.onArrayEnd),k=l(t.onLiteralValue),T=a(t.onSeparator),P=s(t.onComment),C=a(t.onError),x=n&&n.disallowComments,z=n&&n.allowTrailingComma;function R(){for(;;){let W=r.scan();switch(r.getTokenError()){case 4:S(14);break;case 5:S(15);break;case 3:S(13);break;case 1:x||S(11);break;case 2:S(12);break;case 6:S(16);break}switch(W){case 12:case 13:x?S(10):P();break;case 16:S(1);break;case 15:case 14:break;default:return W}}}function S(W,ce=[],zt=[]){if(C(W),ce.length+zt.length>0){let li=r.getToken();for(;li!==17;){if(ce.indexOf(li)!==-1){R();break}else if(zt.indexOf(li)!==-1)break;li=R()}}}function y(W){let ce=r.getTokenValue();return W?k(ce):(f(ce),o.push(ce)),R(),!0}function b(){switch(r.getToken()){case 11:let W=r.getTokenValue(),ce=Number(W);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 R(),!0}function B(){return r.getToken()!==10?(S(3,[],[2,5]),!1):(y(!1),r.getToken()===6?(T(":"),R(),ot()||S(4,[],[2,5])):S(5,[],[2,5]),o.pop(),!0)}function _(){p(),R();let W=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(W||S(4,[],[]),T(","),R(),r.getToken()===2&&z)break}else W&&S(6,[],[]);B()||S(4,[],[2,5]),W=!0}return m(),r.getToken()!==2?S(7,[2],[]):R(),!0}function we(){h(),R();let W=!0,ce=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(ce||S(4,[],[]),T(","),R(),r.getToken()===4&&z)break}else ce&&S(6,[],[]);W?(o.push(0),W=!1):o[o.length-1]++,ot()||S(4,[],[4,5]),ce=!0}return v(),W||o.pop(),r.getToken()!==4?S(8,[4],[]):R(),!0}function ot(){switch(r.getToken()){case 3:return we();case 1:return _();case 10:return y(!0);default:return b()}}return R(),r.getToken()===17?n.allowEmptyContent?!0:(S(4,[],[]),!1):ot()?(r.getToken()!==17&&S(9,[],[]),!0):(S(4,[],[]),!1)}var Qw;(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"})(Qw||(Qw={}));var eb;(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"})(eb||(eb={}));var Xn=Yw;var tb;(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"})(tb||(tb={}));var to=w(require("fs")),mb=w(require("path"));var Hr=class extends Error{remediation;documentationUrl;cause;constructor(t,n){super(t),this.name="FrameworkError",this.cause=n?.cause,this.remediation=n?.remediation,this.documentationUrl=n?.documentationUrl,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toDisplayString(){let t=this.message;return this.remediation&&(t+=`
130
+
131
+ How to fix: ${this.remediation}`),this.documentationUrl&&(t+=`
132
+
133
+ Documentation: ${this.documentationUrl}`),t}},ye=class extends Hr{constructor(t,n){super(t,n),this.name="FrameworkValidationError"}};var Qn=class extends Hr{configFile;constructor(t,n){super(t,n),this.name="FrameworkConfigError",this.configFile=n?.configFile}toDisplayString(){let t=super.toDisplayString();return this.configFile&&(t+=`
134
+
135
+ Config file: ${this.configFile}`),t}},hn=class extends Hr{constructor(t,n){super(t,n),this.name="FrameworkDetectionError"}};var je=w(require("path")),ri=w(require("fs"));var tt=class{static frameworkName="";ctx;constructor(t){this.ctx=t}static detect(t,n){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:n}=this.ctx;return t in(n.dependencies||{})||t in(n.devDependencies||{})}getDependencyVersion(t){let{packageJson:n}=this.ctx;return n.dependencies?.[t]||n.devDependencies?.[t]}get log(){return this.ctx.log}get cwd(){return this.ctx.cwd}};var ub=w(require("semver")),me=w(require("fs")),Et=w(require("path"));var Zr=w(require("semver")),nb=require("child_process");function J2(){return process.version.slice(1)}function q2(e,t){let n=Zr.coerce(e),r=Zr.coerce(t);return!n||!r?!1:Zr.gte(n,r)}function rb(e,t,n){if(!t)return{kind:"local"};let r=J2();return q2(r,t.minimum)?(e.debug(`Node ${r} satisfies ${n} requirement (>= ${t.minimum}).`),{kind:"local"}):t.severity==="warn"?(e.warn(`${n} recommends Node ${t.minimum}+ \u2014 current is ${r}. Build may behave unexpectedly.`),{kind:"local"}):(e.info(`${n} requires Node ${t.minimum}+ \u2014 current is ${r}.`),e.info(`Installing Node ${t.minimum} via npm (cached after first run, ~50 MB) and routing the build through it...`),{kind:"npx",version:t.minimum})}function Kr(e,t){if(t.kind!=="npx"||!t.version)return e;let n=e.replace(/"/g,'\\"');return`npx --yes -p node@${t.version} -c "${n}"`}function ob(e,t){if(t.kind!=="npx"||!t.version)return;let n=e.spinner(`Installing Node ${t.version} for the build (one-time, ~50 MB)`);try{(0,nb.execSync)(`npx --yes -p node@${t.version} -- node --version`,{stdio:"ignore"}),n.succeed(`Node ${t.version} ready`)}catch(r){throw n.fail(`Failed to install Node ${t.version} via npx. Either reconnect to the internet, or install Node ${t.version} locally and re-run.`),r}}var Xs=w(require("fs")),ib=w(require("path"));var sb=U.object({name:U.string().optional(),version:U.string().optional(),dependencies:U.record(U.string()).optional(),devDependencies:U.record(U.string()).optional()});function ni(e){let t=ib.default.join(e,"package.json");if(!Xs.statSync(t,{throwIfNoEntry:!1}))return;let n=Xs.readFileSync(t).toString("utf8"),r;try{r=JSON.parse(n)}catch(o){throw new ye("package.json was not valid JSON",{cause:o})}try{return sb.parse(r)}catch(o){throw new ye("package.json schema validation failed",{cause:o})}}var Qs=w(require("fs")),ab=w(require("path"));var ea=U.object({cloud:U.object({framework:U.string().optional(),assets_path_prefix:U.string().optional(),entrypoint_path:U.string().optional(),deployment_type:U.enum(["spa","ssg","ssr","ssr-spa-combo"]).optional(),skip_no_bundle:U.boolean().optional(),assets_source_skip_mount_path:U.boolean().optional()}).passthrough().optional()}).passthrough();function Yr(e,t,n="webflow.json"){let r=ab.default.join(t,n);if(!Qs.statSync(r,{throwIfNoEntry:!1}))return n.endsWith(".json")?Yr(e,t,n+"c"):void 0;let o=Qs.readFileSync(r).toString("utf8"),i;try{i=Xn(o)}catch(s){e?.error(`loaded but could not parse as JSONC ${r} ${JSON.stringify(o)}: ${s}`);return}try{let s=ea.parse(i);return e.debug(`loaded ${r}: ${JSON.stringify(s)}`),s}catch(s){e?.error(`${r} was valid JSON but schema validation failed: ${s}`);return}}var lb=require("child_process");var cb=["--no-update-notifier","--no-progress","--no-audit","--no-fund"];async function Re(e){let{log:t,cwd:n,args:r,nodeRuntime:o}=e,i={...process.env,...e.env||{},WRANGLER_SEND_METRICS:"false",NEXT_TELEMETRY_DISABLED:"1"},s=[...cb,...r];t.debug(`npm ${s.join(" ")} (in ${n})`);let a=`npm ${s.map(c=>JSON.stringify(c)).join(" ")}`,l=o?Kr(a,o):a;(0,lb.execSync)(l,{cwd:n,env:i,stdio:"inherit"})}function yn(e){if(!e)return null;let t=ub.coerce(e);return t?t.major:null}function er(e,t,n,r){let o=r?.exclude?Array.isArray(r.exclude)?r.exclude:[r.exclude]:[],i=Et.basename(t);if(o.some(l=>i===l))return e.trace(`Skipping excluded: ${t}`),0;let s=me.statSync(t,{throwIfNoEntry:!1});if(!s)return e.trace(`Source does not exist: ${t}`),0;if(s.isDirectory()){e.trace(`Copying directory: ${t} -> ${n}`);let l=me.readdirSync(t),c=0;for(let u of l)c+=er(e,Et.join(t,u),Et.join(n,u),r);return c}let a=Et.dirname(n);return me.existsSync(a)||me.mkdirSync(a,{recursive:!0}),e.trace(`Copying file: ${t} -> ${n}`),me.copyFileSync(t,n),1}function pt(e){return me.existsSync(e)}function Ft(...e){for(let t of e)if(me.existsSync(t))return t;return e[0]??""}async function wn(e,t,n,r){if(!me.existsSync(t))throw new Qn(`Template not found: ${t}`,{configFile:t});let o=me.readFileSync(t,"utf8");e.debug(`envsubst: ${t} -> ${n}`);let i=r||process.env,s=o.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g,(l,c)=>i[c]??"").replace(/\$([A-Za-z_][A-Za-z0-9_]*)/g,(l,c)=>i[c]??""),a=Et.dirname(n);me.existsSync(a)||me.mkdirSync(a,{recursive:!0}),me.writeFileSync(n,s)}function bn(e,t,n,r){for(let o of r){let i=Et.join(t,`${n}.${o}`);if(me.existsSync(i)){let s=Et.join(t,`clouduser.${n}.${o}`);return e.info(`Renaming user config: ${n}.${o} -> clouduser.${n}.${o}`),me.renameSync(i,s),s}}return null}var Pu=Ft(je.join(__dirname,"templates","astro","v5"),je.join(__dirname,"templates","v5")),db=Ft(je.join(__dirname,"templates","astro"),je.join(__dirname,"templates")),tr=class extends tt{static frameworkName="astro";get info(){return{name:"astro",version:"5.x",displayName:"Astro 5"}}static detect(t,n){let r=n?.cloud?.framework;if(r&&r!=="astro")return{detected:!1};let o=t.dependencies?.astro||t.devDependencies?.astro;if(!o)return r==="astro"?{detected:!0,reason:"Specified as astro in webflow.json"}:{detected:!1};let i=yn(o);return i!==null&&i>=6?{detected:!1}:{detected:!0,reason:`Found astro@${o}`}}async validate(){let{log:t,packageJson:n}=this.ctx,r=n.dependencies?.astro||n.devDependencies?.astro;if(!r)throw new ye("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(r==="latest")throw new ye('Astro version "latest" is not supported by Webflow Cloud.',{remediation:"Please specify a version, e.g.: npm install astro@^5.0.0"});let o=yn(r);if(o!==null&&o>=6)throw new ye(`Astro ${o}.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@${r}`)}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:n,nodeRuntime:r}=this.ctx,o=this.getCloudflareAdapter();this.hasDependency(o.name)||(t.warn(`Installing ${o.name}@${o.version} (required for Cloudflare deployment)...`),await Re({log:t,cwd:n,args:["install","--save",`${o.name}@${o.version}`],nodeRuntime:r}));for(let i of this.getRequiredIntegrations())this.hasDependency(i.name)||(t.warn(`Installing ${i.name}@${i.version} (${i.reason})...`),await Re({log:t,cwd:n,args:["install","--save",`${i.name}@${i.version}`],nodeRuntime:r}))}getWebflowLoader(){return{templatePath:je.join(Pu,"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 je.join(Pu,"wrangler.json")}getAdditionalConfigFiles(){return[this.getWebflowLoader().templatePath,je.join(db,"astro.config.webflow.ts")]}async prepareConfig(){let{log:t,cwd:n,userEnv:r}=this.ctx;bn(t,n,"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"),ri.writeFileSync(je.join(n,"clouduser.astro.config.mjs"),`export default {};
136
+ `));let i=je.join(db,"astro.config.webflow.ts");pt(i)&&(t.info("Copying astro.config.webflow.ts..."),ri.copyFileSync(i,je.join(n,"astro.config.webflow.ts")));let s=je.join(Pu,"astro.config.mjs.template"),a=je.join(n,"astro.config.mjs");t.info("Generating astro.config.mjs from template..."),await wn(t,s,a,{...process.env,...r});let l=this.getWebflowLoader();pt(l.templatePath)&&(t.info(`Copying ${l.destinationName}...`),ri.copyFileSync(l.templatePath,je.join(n,l.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 $e=w(require("path")),oi=w(require("fs"));var Iu=Ft($e.join(__dirname,"templates","astro","v6"),$e.join(__dirname,"templates","v6")),pb=Ft($e.join(__dirname,"templates","astro"),$e.join(__dirname,"templates")),nr=class extends tt{static frameworkName="astro";get info(){return{name:"astro",version:"6.x",displayName:"Astro 6"}}static detect(t,n){let r=n?.cloud?.framework;if(r&&r!=="astro")return{detected:!1};let o=t.dependencies?.astro||t.devDependencies?.astro;if(!o)return{detected:!1};let i=yn(o);return i!==null&&i>=6?{detected:!0,reason:`Found astro@${o} (Astro ${i}.x)`}:{detected:!1}}async validate(){let{log:t,packageJson:n}=this.ctx,r=n.dependencies?.astro||n.devDependencies?.astro;if(!r)throw new ye("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(r==="latest")throw new ye('Astro version "latest" is not supported by Webflow Cloud.',{remediation:"Please specify a version, e.g.: npm install astro@^6.0.0"});let o=yn(r);if(o!==null&&o<6)throw new ye(`Astro ${o}.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@${r}`)}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:n,nodeRuntime:r}=this.ctx,o=this.getCloudflareAdapter();if(this.hasDependency(o.name)||(t.warn(`Installing ${o.name}@${o.version} (required for Cloudflare deployment)...`),await Re({log:t,cwd:n,args:["install","--save",`${o.name}@${o.version}`],nodeRuntime:r})),o.peerDependencies)for(let i of o.peerDependencies)this.hasDependency(i)||(t.warn(`Installing ${i} (peer dependency of ${o.name})...`),await Re({log:t,cwd:n,args:["install","--save",i],nodeRuntime:r}));for(let i of this.getRequiredIntegrations())this.hasDependency(i.name)||(t.warn(`Installing ${i.name}@${i.version} (${i.reason})...`),await Re({log:t,cwd:n,args:["install","--save",`${i.name}@${i.version}`],nodeRuntime:r}))}getWebflowLoader(){return{templatePath:$e.join(Iu,"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 $e.join(Iu,"wrangler.json")}getAdditionalConfigFiles(){return[this.getWebflowLoader().templatePath,$e.join(pb,"astro.config.webflow.ts")]}async prepareConfig(){let{log:t,cwd:n,userEnv:r}=this.ctx;bn(t,n,"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"),oi.writeFileSync($e.join(n,"clouduser.astro.config.mjs"),`export default {};
137
+ `));let i=$e.join(pb,"astro.config.webflow.ts");pt(i)&&(t.info("Copying astro.config.webflow.ts..."),oi.copyFileSync(i,$e.join(n,"astro.config.webflow.ts")));let s=$e.join(Iu,"astro.config.mjs.template"),a=$e.join(n,"astro.config.mjs");t.info("Generating astro.config.mjs from template (Astro 6)..."),await wn(t,s,a,{...process.env,...r});let l=this.getWebflowLoader();pt(l.templatePath)&&(t.info(`Copying ${l.destinationName}...`),oi.copyFileSync(l.templatePath,$e.join(n,l.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 ge=w(require("path")),nt=w(require("fs"));var Xr=Ft(ge.join(__dirname,"templates","nextjs"),ge.join(__dirname,"templates")),Qr=class extends tt{static frameworkName="nextjs";get info(){return{name:"nextjs",version:"*",displayName:"Next.js"}}static detect(t,n){let r=n?.cloud?.framework;return r==="nextjs"?{detected:!0,reason:"Specified as nextjs in webflow.json"}:r&&r!=="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:n}=this.ctx,r=n.dependencies?.next||n.devDependencies?.next;if(!r)throw new ye("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@${r}`)}getCloudflareAdapter(){return{name:"@opennextjs/cloudflare",version:"*"}}getRequiredIntegrations(){return[]}async installDependencies(){let{log:t,cwd:n,nodeRuntime:r}=this.ctx,o=this.getCloudflareAdapter();this.hasDependency(o.name)||(t.warn("nextjs integration requires @opennextjs/cloudflare and this project doesn't have it. installing now..."),await Re({log:t,cwd:n,args:["install","--save",o.name],nodeRuntime:r}))}getWebflowLoader(){return{templatePath:ge.join(Xr,"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 ge.join(Xr,"wrangler.json")}getAdditionalConfigFiles(){return[this.getWebflowLoader().templatePath,ge.join(Xr,"open-next.config.ts")]}findOpenNextConfig(){let t="open-next.config.ts";if(nt.existsSync(ge.join(this.cwd,t)))return t}ensureOpenNextConfig(t){let{log:n,cwd:r}=this.ctx,o=this.findOpenNextConfig();if(o){n.info(`${o} found, skipping creation (opennextjs-cloudflare will validate)`);return}if(n.info("open-next.config not found, creating open-next.config.ts with default Webflow Cloud configuration..."),!nt.existsSync(t))throw new Qn(`open-next.config.ts template not found at ${t}. This is a Webflow Cloud build system error.`,{configFile:t});let i=ge.join(r,"open-next.config.ts");nt.copyFileSync(t,i),n.info("open-next.config.ts created successfully")}async prepareConfig(){let{log:t,cwd:n,userEnv:r}=this.ctx,o=bn(t,n,"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"),nt.writeFileSync(ge.join(n,"clouduser.next.config.ts"),`export default {};
138
+ `)):ge.extname(o)!==".ts"&&(t.info(`writing clouduser.next.config.d.ts shim for ${ge.basename(o)}`),nt.writeFileSync(ge.join(n,"clouduser.next.config.d.ts"),`import type { UserNextConfig } from './next.config.webflow';
139
+ declare const config: UserNextConfig;
140
+ export default config;
141
+ `));let i=ge.join(Xr,"next.config.webflow.ts");pt(i)&&(t.info("Copying next.config.webflow.ts..."),nt.copyFileSync(i,ge.join(n,"next.config.webflow.ts")));let s=ge.join(Xr,"next.config.ts.template"),a=ge.join(n,"next.config.ts");t.info("Generating next.config.ts from template..."),await wn(t,s,a,{...process.env,...r});let l=this.getWebflowLoader();pt(l.templatePath)&&(t.info(`Copying ${l.destinationName}...`),nt.copyFileSync(l.templatePath,ge.join(n,l.destinationName)));let c=ge.join(Xr,"open-next.config.ts");this.ensureOpenNextConfig(c)}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 nt.statSync(ge.join(t,"./worker.js"),{throwIfNoEntry:!1})?.isFile()??!1}};var ze=w(require("path")),rt=w(require("fs"));var ta=Ft(ze.join(__dirname,"templates","vite"),ze.join(__dirname,"templates")),eo=class extends tt{static frameworkName="vite";get info(){return{name:"vite",version:"6.x",displayName:"Vite"}}static detect(t,n){let r=n?.cloud?.framework;return r==="vite"?{detected:!0,reason:"Specified as vite in webflow.json"}:r&&r!=="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:n}=this.ctx,r=n.dependencies?.vite||n.devDependencies?.vite;if(!r)throw new ye("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@${r}`)}getCloudflareAdapter(){return{name:"@cloudflare/vite-plugin",version:"*"}}getRequiredIntegrations(){return[{name:"@cloudflare/workers-types",version:"*",dev:!0}]}async installDependencies(){let{log:t,cwd:n,packageJson:r,nodeRuntime:o}=this.ctx,i=r.devDependencies?.vite||r.dependencies?.vite||"",s=yn(i);s!==null&&s<6&&(t.warn("Upgrading vite to ^6.1.0 (required by @cloudflare/vite-plugin)..."),await Re({log:t,cwd:n,args:["install","--save-dev","vite@^6.1.0"],nodeRuntime:o}));let a=this.getCloudflareAdapter();this.hasDependency(a.name)||(t.warn("Vite integration requires @cloudflare/vite-plugin, installing now..."),await Re({log:t,cwd:n,args:["install","--save",a.name],nodeRuntime:o}));let l=this.getRequiredIntegrations();for(let c of l)if(!this.hasDependency(c.name)){t.info(`Installing ${c.name}...`);let u=c.dev?["install","--save-dev",c.name]:["install","--save",c.name];await Re({log:t,cwd:n,args:u,nodeRuntime:o})}}getWebflowLoader(){return null}getUserConfigPatterns(){return["vite.config.mjs","vite.config.cjs","vite.config.js","vite.config.ts"]}getWranglerTemplatePath(){return ze.join(ta,"wrangler.json")}getAdditionalConfigFiles(){return[ze.join(ta,"vite.config.webflow.ts")]}hasCustomWorkerEntry(){let{log:t,cwd:n}=this.ctx;for(let r of["wrangler.json","wrangler.jsonc"]){let o=ze.join(n,r);if(rt.existsSync(o)){try{let i=rt.readFileSync(o,"utf8"),s=Xn(i);if(s?.main&&s.main!=="./src/worker.ts")return t.info(`user-provided ${r} has custom main entrypoint "${s.main}", will preserve user's worker`),!0}catch(i){t.warn(`failed to parse ${r}: ${i}`)}break}}return!1}ensureWorkerEntry(){let{log:t,cwd:n}=this.ctx,r=ze.join(n,"src","worker.ts");if(rt.existsSync(r)){t.info("src/worker.ts already exists, skipping creation");return}t.warn("src/worker.ts does not exist, creating a minimal worker..."),rt.mkdirSync(ze.join(n,"src"),{recursive:!0}),rt.writeFileSync(r,`/// <reference types="@cloudflare/workers-types" />
142
+
143
+ interface Env {
144
+ ASSETS: Fetcher;
145
+ }
146
+
147
+ export default {
148
+ async fetch(request: Request, env: Env): Promise<Response> {
149
+ return env.ASSETS.fetch(request);
150
+ },
151
+ } satisfies ExportedHandler<Env>;
152
+ `)}async prepareConfig(){let{log:t,cwd:n,userEnv:r}=this.ctx,o=this.hasCustomWorkerEntry();bn(t,n,"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"),rt.writeFileSync(ze.join(n,"clouduser.vite.config.ts"),`export default {};
153
+ `));let s=ze.join(ta,"vite.config.webflow.ts");pt(s)&&(t.info("Copying vite.config.webflow.ts..."),rt.copyFileSync(s,ze.join(n,"vite.config.webflow.ts")));let a=ze.join(ta,"vite.config.ts.template"),l=ze.join(n,"vite.config.ts");t.info("Generating vite.config.ts from template..."),await wn(t,a,l,{...process.env,...r}),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 fb=[nr,tr,Qr,eo],ii=["astro","nextjs","vite"];function na(e,t){for(let n of fb){let r=n.detect(e,t);if(r.detected)return{Builder:n,result:r}}return null}function Ru(e,t){let n=na(e.packageJson,t);if(!n)throw new hn("Could not detect framework from package.json or webflow.json",{remediation:`Create a webflow.json file with: { "cloud": { "framework": "astro" } } (or one of: ${ii.join(", ")})`});return e.log.info(`Detected framework: ${n.result.reason}`),new n.Builder(e)}function ju(e,t,n,r){let o=mb.join(t,"webflow.json"),i={cloud:{}};if(to.existsSync(o))try{let a=to.readFileSync(o,"utf8"),l=JSON.parse(a),c=ea.safeParse(l);if(c.success)i=c.data;else{let u=c.error.issues.map(p=>`${p.path.join(".")}: ${p.message}`).join(", ");e.warn(`webflow.json has schema issues (will be corrected): ${u}`),i=l}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=n,r){let a=r.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: ${n}`),to.writeFileSync(o,JSON.stringify(i,null,2))}function gb(e,t){let n=Yr(e,t);if(n?.cloud?.framework)return n.cloud.framework;let r=ni(t);if(!r)throw new hn("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=na(r,n);if(!o)throw new hn("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}`),ju(e,t,i),i}J();var hb=U.object({name:U.string(),main:U.string().optional(),compatibility_date:U.string(),compatibility_flags:U.array(U.string()).optional(),placement:U.object({mode:U.string()}).passthrough().optional(),assets:U.object({directory:U.string(),binding:U.string().optional()}).passthrough().optional(),d1_databases:U.array(U.object({database_name:U.string(),database_id:U.string(),binding:U.string(),migrations_dir:U.string().optional()}).passthrough()).default([]),kv_namespaces:U.array(U.object({binding:U.string(),id:U.string()}).passthrough()).default([]),r2_buckets:U.array(U.object({binding:U.string(),bucket_name:U.string()}).passthrough()).default([])}).passthrough();function yb(e){return e.issues.map(t=>` - ${t.path.length>0?t.path.join("."):"<root>"}: ${t.message}`).join(`
154
+ `)}function wb(e,t="wrangler.json"){let n=ft.join(e,t);if(!Se.existsSync(n)){if(t.endsWith(".json"))return d.warn(`/${t} not found, checking for /${t}c`),wb(e,t+"c");d.warn(`/${t} not found`);return}let r=Se.readFileSync(n,"utf8");d.info(`reading /${t}...`);let o;try{o=Xn(r)}catch(s){d.error(`/${t} loaded but could not parse as JSONC: ${s}`);return}let i=hb.safeParse(o);if(!i.success){d.error(`/${t} loaded but schema validation failed:
155
+ ${yb(i.error)}`);return}return d.info(`successfully loaded /${t}`),i.data}async function bb(e,t){let n=null,r=null,o=ft.join(t,"wrangler.json"),i=ft.join(t,"wrangler.jsonc");Se.existsSync(o)?(n=o,r=".json"):Se.existsSync(i)&&(n=i,r=".jsonc"),n&&r&&(d.info(`saving user-provided wrangler JSON as /clouduser.wrangler${r}...`),Se.copyFileSync(n,ft.join(t,`clouduser.wrangler${r}`)));let s=n?wb(t,ft.basename(n)):null,a=e.getWranglerTemplatePath(),l=ft.join(t,"wrangler.json");if(!Se.existsSync(a))throw new Error(`Wrangler template not found at ${a}. Make sure the template is properly copied during build.`);if(d.info(`copying wrangler template for ${e.info.name} to /wrangler.json`),Se.copyFileSync(a,l),!s)return;let c=JSON.parse(Se.readFileSync(l,"utf8"));if(s.kv_namespaces&&s.kv_namespaces.length>0&&(c.kv_namespaces=s.kv_namespaces,d.info(`merged ${s.kv_namespaces.length} KV namespace(s) into template`)),s.r2_buckets&&s.r2_buckets.length>0&&(c.r2_buckets=s.r2_buckets,d.info(`merged ${s.r2_buckets.length} R2 bucket(s) into template`)),s.d1_databases&&s.d1_databases.length>0&&(c.d1_databases=s.d1_databases,d.info(`merged ${s.d1_databases.length} D1 database(s) into template`)),Se.writeFileSync(l,JSON.stringify(c,null,2)),s.d1_databases.length!==0)for(let u in s.d1_databases){let p=s.d1_databases[u];if(!p.migrations_dir){d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir is not defined`);continue}let f=p.migrations_dir,m=ft.join(t,f);if(!Se.existsSync(m)){d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) does not exist`);continue}let h=ft.join(t,"clouduser","migrations",f),v=er(d,m,h);v>0?d.info(`copied ${v} migrations to /clouduser/migrations/${f}`):d.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) is empty`)}}function G2(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 Db(e){let t=null;for(let s of[".json",".jsonc"]){let a=ft.join(e,`clouduser.wrangler${s}`);if(Se.existsSync(a)){t=a;break}}if(!t)return;let n=Se.readFileSync(t,"utf8"),r;try{r=Xn(n)}catch(s){throw new Error(`Failed to parse wrangler config at ${t} as JSONC: ${s}`)}let o=hb.safeParse(r);if(!o.success)throw new Error(`Invalid wrangler config at ${t}:
156
+ ${yb(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.`);d.info(`validating ${i.r2_buckets.length} object storage bucket name(s)...`);for(let s of i.r2_buckets)G2(s.bucket_name)}}J();_e();te();Ce();var H2="4.82.1",ra=60;function Wt(e,t){let n=Math.min(ra,process.stdout.columns??ra),r=`\u2500\u2500\u2500 ${e} ${t} `,o="\u2500".repeat(Math.max(0,n-r.length));d.info(`
157
+ ${E.bold.cyan(`${r}${o}`)}`)}function $u(e,t){let n=Math.min(ra,process.stdout.columns??ra),r=`\u2550\u2550\u2550 ${e} ${t} `,o="\u2550".repeat(Math.max(0,n-r.length));d.info(`
158
+ ${E.bold.white(`${r}${o}`)}`)}async function kb(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:K2(n)}:{}};return Ru({cwd:e,log:d,packageJson:o,userEnv:s},i)}async function xb(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=Bu(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=rb(d,e.getNodeVersionRequirement(),e.info.displayName);e.ctx.nodeRuntime=f,ob(d,f),d.info("Validating framework requirements..."),await e.validate(),d.info("Installing framework dependencies..."),await e.installDependencies(),Wt("\u2699\uFE0F ","Configure wrangler"),await bb(e,n),d.info("Preparing framework configuration..."),await e.prepareConfig(),ju(d,n,e.info.name,e),Wt("\u{1F4E6}","Install dependencies"),await Z2(n,e.info.name,f,t.telemetry),Db(n),Wt("\u{1F3D7}\uFE0F ","Build app"),d.info(`running ${u}...`),await Y2(n,u,f,t.telemetry),await e.postBuild(),Wt("\u{1F9EA}","Wrangler dry-run"),await X2(n,i),Wt("\u{1F4C1}","Copy assets"),await Q2(n,i,e,s),Wt("\u{1F381}","Create tarball");let m=await eA(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 Bu(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 Cb(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 Eb(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 Z2(e,t,n,r){let o=Date.now(),i=["--no-update-notifier","--no-progress"],s=ne.join(e,"package-lock.json");try{V.existsSync(s)?(d.info("Running npm ci --include=dev..."),(0,si.execSync)(Kr(`npm ci --include=dev ${i.join(" ")}`,n),{cwd:e,stdio:"inherit"})):(d.info("Warning: No package-lock.json found, installing dependencies with npm install --include=dev"),(0,si.execSync)(Kr(`npm install --include=dev ${i.join(" ")}`,n),{cwd:e,stdio:"inherit"}));let a=Date.now()-o;await r?.sendUsage("cloud_install_dependencies_success",{duration:a,framework:t,hasPackageLock:V.existsSync(s)})}catch(a){let l=Date.now()-o;throw await r?.sendError(a instanceof Error?a:new Error(String(a)),"cloud_install_dependencies_failure",{duration:l,framework:t,hasPackageLock:V.existsSync(s)}),a}}function K2(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 Y2(e,t,n,r){let o=Date.now(),[i,...s]=t.split(/\s+/),a=[`./node_modules/.bin/${i}`,...s].join(" ");try{(0,si.execSync)(Kr(a,n),{cwd:e,stdio:"inherit"});let l=Date.now()-o;await r?.sendUsage("cloud_build_command_success",{duration:l,buildCommand:t})}catch(l){let c=Date.now()-o;throw await r?.sendError(l instanceof Error?l:new Error(String(l)),"cloud_build_command_failure",{duration:c,buildCommand:t}),new Error(`Build command failed: ${t}`)}}async function X2(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 --yes -- wrangler@${H2} deploy --dry-run --outdir="${t}"`,{cwd:e,stdio:"inherit"})}async function Q2(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}`),er(d,u,c,{exclude:s})):er(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");er(d,m,h)}}}async function eA(e){let t=`${e}.tar.gz`;try{return await vb.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 tA="DUPLICATE_ENVIRONMENT_MOUNT",nA="ENVIRONMENT_MOUNT_MISMATCH",rA="DUPLICATE_ENVIRONMENT_BRANCH",oA="INVALID_MOUNT_PATH_FORMAT",iA="INVALID_PROJECT_ID",Fb={[tA]:"An environment with this mount path already exists for this site. Please choose a different mount path.",[nA]:"This environment already exists with a different mount path. Please create a new environment or use the existing environment's mount path.",[rA]:"An environment with this branch already exists for this project.",[oA]:"Mount path format is invalid. It must start with a / and be followed by at least one character (e.g., /app).",[iA]:"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 Sb(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 Fb)if(n.includes(i))return Fb[i];return`An unknown error occurred. Error code: ${t.code||"N/A"}, Message: ${t.msg||"No message provided"}`}var no=w(require("fs")),Nu=require("child_process");J();te();Ce();var _b=104857600;function Ab(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 sA(){try{let e=(0,Nu.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,Nu.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 Lu(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=Sb(i);throw new Error(s)}return r.json()}async function Tb(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 aA({siteId:e.siteId,apiToken:e.accessToken,framework:a,mountPath:n,environment:t,projectId:s,projectName:r?.projectName,description:r?.description,directory:r?.directory,version:sA()});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 aA(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 Lu(e.apiToken,p,{method:"POST",body:u})}async function Ob(e,t){let{siteId:n,accessToken:r}=e,o=n?`/cosmic/${n}/cli-project-environments/${t}`:`/cosmic/cli-project-environments/${t}`;return Lu(r,o,{method:"GET"})}async function Pb(e){let{siteId:t,accessToken:n}=e,r=t?`/cosmic/${t}/cli-projects`:"/cosmic/cli-projects";return Lu(n,r,{method:"GET"})}async function Ib(e,t){if(!no.existsSync(e))throw new Error(`Tarball not found at ${e}`);let n=no.statSync(e);if(n.size>_b)throw new Error(`Build output is too large (${Ab(n.size)}). Maximum allowed size is ${Ab(_b)}.`);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 Rb(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 jb=require("webflow-api");le();le();te();function Mu(e){return new jb.WebflowClient({accessToken:e,environment:{base:`${I}/v2`,dataApi:`${I}/v2`,contentDeliveryApi:`${xi}/v2`}})}async function ai(e,t){try{let r=await Mu(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 Wu(e,t){try{return{customDomains:(await Mu(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 Uu(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 zu(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 $b(e,t,n){try{let r=Mu(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();Ba();J();async function Bb(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=lr("Validating mount path configuration...").start();try{let s=await ai(o,r),a=await Wu(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 Uu(h),k=Array.isArray(v.cosmic)?v.cosmic.map(P=>P.mountPath).filter(P=>typeof P=="string"):[],T=zu(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 Nb(e,t,n){let{siteId:r,accessToken:o}=e;if(!r)return[];try{let i=await ai(o,r),s=await Wu(o,r),l=[`${i.shortName}.webflow.io`,...s.customDomains?.map(u=>u.url)||[]].map(async u=>{try{let p=await Uu(u),f=zu(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 Lb(e,t){return e.map(n=>`${n.startsWith("localhost")||n.startsWith("127.0.0.1")?"http":"https"}://${n}${t}`)}async function Mb(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 Wb(){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 Vu(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=lr(`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 $b(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 rr=w(require("path"));ke();J();_e();le();Oe();var sa=w(require("fs"));te();Ce();le();Me();te();J();async function oa(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.
139
159
  ${o.message??""}
140
- Re-run 'webflow auth login' to grant the necessary permissions.`):new h(`Failed to fetch workspaces: ${t.status} ${t.statusText}`+(o.message?`
141
- ${o.message}`:""))}return(await t.json()).workspaces}async function Ds(e){if(e.length===1)return e[0];let t=await Re({message:"Select the workspace for this project:",choices:e.map(n=>({name:n.name,value:n}))});return t||(d.warn(`Auto fallback to first workspace: ${e[0].name}`),e[0])}var xs=async()=>{try{let e=jc(),t=Bc();return[...new Set([...e,...t])]}catch(e){return d.error(e,{prefix:"Failed to get available scaffolds:"}),[]}},o2=async(e,t,n)=>{let r;if("content"in n)r=n.content.files;else{let l=n[t];if(!l)throw new Error(`Scaffold "${t}" not found`);r=l}let o=r.find(l=>l.includes(yn));if(!o)throw new Error(`No ${yn} found in scaffold "${t}"`);await ks.promises.mkdir(e,{recursive:!0});let s=(await ks.promises.readFile(o,"utf8")).replace(ls,e),a=$n.join(e,yn);await ks.promises.writeFile(a,s,"utf8")},ou=async(e,t,n=as,r,o=fe.Existing,i)=>{if(fe.New,o===fe.New){try{let a=await Mc(n);await i2(e,t,a.scaffoldId,{content:a},n,i)}catch(a){if(a instanceof De){let l=a.message;throw a.supportedIds?.length&&(l+=`
142
- Available frameworks: ${a.supportedIds.join(", ")}`),new h(l)}throw a}return}try{let a=await us(n);await s2(e,t,n,{content:a},r)}catch(a){if(a instanceof De){let l=a.message;throw a.supportedIds?.length&&(l+=`
143
- Available frameworks: ${a.supportedIds.join(", ")}`),new h(l)}throw a}},i2=async(e,t,n,r,o,i)=>{let s=`./${e}`,a="content"in r&&typeof r.content=="object"&&"extractionRoot"in r.content?r.content:null,l=a?$n.dirname(a.extractionRoot):null;try{let c=Date.now(),u=await Y(),p;if(i)p={id:i};else{let g=await ws(u);if(g.length===0)throw new h("No workspaces found in your account. Please make sure you have at least one workspace.");p=await Ds(g)}await ko(e,t,n,r,void 0,void 0),process.chdir(s);let f=o??n;oe({cloud:{framework:f,workspace_id:p.id}}),bt({apiToken:u,directory:"."}),process.env.WEBFLOW_API_TOKEN=u;let m=Date.now()-c;try{await J.forCloud({authToken:u}).sendUsage("project_init",{scaffold:f,scaffoldName:f,initMode:fe.New,workspaceId:p.id,totalDuration:m,mountPath:t})}catch{}}catch(c){if(c instanceof h||c instanceof Error&&c.message.includes("OAuth")){try{await ko(e,t,n,r),process.chdir(s),oe({cloud:{framework:o??n}}),bt({directory:"."})}catch{}throw d.error("Project scaffold was created, but authentication failed."),d.error("To set up Webflow credentials later, run:"),d.error(" webflow auth login"),vs(e,fe.New),new h(c,{skipLogging:!0})}throw c}finally{if(l)try{ru.default.removeSync(l)}catch{}}vs(e,fe.New)},s2=async(e,t,n,r,o)=>{let i=`./${e}`,s=null,a=!1,l="content"in r&&typeof r.content=="object"&&"extractionRoot"in r.content?r.content:null,c=l?$n.dirname(l.extractionRoot):null;try{let u=Date.now();await o2(e,n,r),process.chdir(i);let{manifest:p}=Q(),f=await be(p,{site:o}),m=f.accessToken,g=f.siteId;if(s=J.forCloud({authToken:m,siteId:g}),await ko(".",t,n,r,g,m),g){d.info("Running devlink export to fetch your Webflow components...");try{await a2({site:g,apiToken:m}),a=!0}catch(C){d.error(C,{prefix:"Failed to run devlink export:"}),d.info("You can manually run 'npx webflow devlink export' later to export your components.")}}let k=Date.now()-u;await s?.sendUsage("project_init",{scaffold:n,scaffoldName:n,devlinkSyncStatus:a,totalDuration:k,mountPath:t}),vs(e,fe.Existing)}catch(u){throw d.error(u,{prefix:"Error during Webflow authentication:"}),await ko(".",t,n,r),d.error("Project scaffold was created, but authentication failed."),d.error("To set up Webflow credentials later, run:"),d.error(" webflow auth login"),vs(e,fe.Existing),new h(u,{skipLogging:!0})}finally{if(c)try{ru.default.removeSync(c)}catch{}}},a2=async e=>{let{exportComponents:t}=await Promise.resolve().then(()=>(oc(),yg));await t({site:e.site,apiToken:e.apiToken})},l2=e=>{if(e?.skipMountPathCheck!==void 0)return e.skipMountPathCheck;try{let{manifest:t}=Q();return Rc(t)?!0:t.cloud?.skipMountPathCheck===!0}catch{return!1}},c2=async(e,t,n,r)=>{d.info("\u{1F50D} Validating mount path configuration...");let o=await Rb(e,t,n);if(o.isValid)d.info(`${ee} Mount path validation passed`);else if(d.info(`
144
- \u{1F4CB} Mount path validation results:`),o.domains.forEach(i=>{let s=i.isValid?ee:L,a=i.isValid?`(mountPath: ${i.mountPaths[0]})`:"(no matching mountPath)";d.info(`${s} ${i.domain} ${a}`),i.error&&d.debug(` Error: ${i.error}`)}),o.needsPublishing)if(r){d.info("\u{1F680} Auto-publishing site to update mount path configuration...");let i=o.domains.filter(s=>!s.isValid).map(s=>s.domain);await nu(e,i)}else if(await Nb()&&rt()){let s=o.domains.filter(l=>!l.isValid).map(l=>l.domain),a=await Bb(s);await nu(e,a)}else d.warn("\u26A0\uFE0F Continuing with deployment without publishing...")},u2=async(e,t,n,r)=>{d.info(`
145
- \u{1F3D7}\uFE0F Building project...`);let o=await wb(e,{mountPath:n,telemetry:r?.telemetry,deployUrl:t.deploy_url,environmentId:t.environment_id});d.info("\u{1F4E4} Uploading build artifacts...");let i=Date.now();await Ab(o,t.upload_url);let s=Date.now()-i;return d.info(`${ee} Upload completed in ${(s/1e3).toFixed(1)}s`),o},d2=async(e,t,n,r)=>{d.success(`
146
- \u{1F310} Your cloud app will soon be available at:`);try{let o=r?.domainsOverride??await $b(e,t,n),i=jb(o??[],t);i?.length>0?i.forEach(s=>{d.info(` ${s}`)}):d.warn(" No domains found with the correct mount path configuration yet.")}catch(o){d.warn(` Could not determine deployment links: ${o instanceof Error?o.message:o}`)}},p2=e=>{e.site_slug?d.success(`Visit your deployment:
147
-
148
- ${Vn}/dashboard/sites/${e.site_slug}/webflow-cloud/projects/${e.project_id}/environments/${e.environment_id}/deployments/${e.deployment_id}`):d.info(`
149
- Visit the webflow Cloud dashboard to view your deployment: https://webflow.com/dashboard/sites`)},f2=async(e,t,n,r,o)=>{try{if(await Ob(t.completion_url,!!r),r)d.error(`
150
- ${L} Deployment failed due to build error.`);else{d.success(`
151
- ${ee} Deployment triggered successfully!`);let i;try{let{manifest:s}=Q();Rc(s)&&(i=[`${o?.projectName??$n.basename(process.cwd())}.webflow.io`])}catch(s){d.debug(`Could not read manifest for standalone deploy link hint: ${s instanceof Error?s.message:String(s)}`)}await d2(e,n,t.environment_id,i!==void 0?{domainsOverride:i}:void 0),p2(t)}}catch(i){throw new h(i,{prefix:"Failed to trigger deployment:"})}},m2=(e,t)=>{e&&kb(process.cwd(),e),t&&Db(t)},Lb=async(e,t,n,r)=>{let o=null,i=null,s=Date.now(),a=null,l=null,c=Kc(process.cwd()),u=r?.telemetry;await u?.sendUsage("cloud_deploy_start",{environment:t,mountPath:n,projectName:r?.projectName,hasDescription:!!r?.description,hasDirectory:!!r?.directory,cloudflareBindings:c});try{d.info("\u{1F527} Detecting framework..."),a=await Ky(),d.info(`Framework: ${a.framework}`),d.info(`Build command: ${a.config.build_command}`),d.info("\u{1F3D7}\uFE0F Building project..."),o=await _b(e,t,n,r),l2(r)?d.info("\u23ED\uFE0F Skipping mount path validation..."):await c2(e,n,o.environment_id,r?.autoPublish),i=await u2(a,o,n,r),d.info(`Starting deployment process for environment: ${t} at mount path: ${n}`);let p=Date.now()-s;await u?.sendUsage("cloud_deploy_success",{duration:p,environment:t,mountPath:n,projectName:r?.projectName,hasDescription:!!r?.description,hasDirectory:!!r?.directory,framework:a.framework,buildCommand:a.config.build_command,cloudflareBindings:c})}catch(p){l=p instanceof Error?p:new Error(String(p)),d.error(l,{prefix:"Error during deployment initialization:"});let f=Date.now()-s;await u?.sendError(l,"cloud_deploy_failure",{duration:f,environment:t,mountPath:n,projectName:r?.projectName,cloudflareBindings:c,argv:process.argv.slice(2)})}finally{if(m2(a,i),o&&await f2(e,o,n,l,{projectName:r?.projectName}),l)throw new h(l,{skipLogging:!0})}},vs=(e,t)=>{d.info("--- "),d.info(v.bold.green("Get started with the following commands:")),d.info(` cd ${e}`),d.info(" npm install"),d.info(" npm run dev"),d.info(` webflow cloud deploy
160
+ Re-run 'webflow auth login' to grant the necessary permissions.`):new g(`Failed to fetch workspaces: ${t.status} ${t.statusText}`+(o.message?`
161
+ ${o.message}`:""))}return(await t.json()).workspaces}async function ia(e){if(e.length===1)return e[0];let t=await Le({message:"Select the workspace for this project:",choices:e.map(n=>({name:n.name,value:n}))});return t||(d.warn(`Auto fallback to first workspace: ${e[0].name}`),e[0])}var la=async()=>{try{let e=vu(),t=ku();return[...new Set([...e,...t])]}catch(e){return d.error(e,{prefix:"Failed to get available scaffolds:"}),[]}},lA=async(e,t,n)=>{let r;if("content"in n)r=n.content.files;else{let l=n[t];if(!l)throw new Error(`Scaffold "${t}" not found`);r=l}let o=r.find(l=>l.includes(jn));if(!o)throw new Error(`No ${jn} found in scaffold "${t}"`);await sa.promises.mkdir(e,{recursive:!0});let s=(await sa.promises.readFile(o,"utf8")).replace(Us,e),a=rr.join(e,jn);await sa.promises.writeFile(a,s,"utf8")},qu=async(e,t,n=Ws,r,o=fe.Existing,i)=>{if(fe.New,o===fe.New){try{let a=await Eu(n);await cA(e,t,a.scaffoldId,{content:a},n,i)}catch(a){if(a instanceof ve){let l=a.message;throw a.supportedIds?.length&&(l+=`
162
+ Available frameworks: ${a.supportedIds.join(", ")}`),new g(l)}throw a}return}try{let a=await Vs(n);await uA(e,t,n,{content:a},r)}catch(a){if(a instanceof ve){let l=a.message;throw a.supportedIds?.length&&(l+=`
163
+ Available frameworks: ${a.supportedIds.join(", ")}`),new g(l)}throw a}},cA=async(e,t,n,r,o,i)=>{let s=`./${e}`,a="content"in r&&typeof r.content=="object"&&"extractionRoot"in r.content?r.content:null,l=a?rr.dirname(a.extractionRoot):null;try{let c=Date.now(),u=await Y(),p;if(i)p={id:i};else{let h=await oa(u);if(h.length===0)throw new g("No workspaces found in your account. Please make sure you have at least one workspace.");p=await ia(h)}await Zo(e,t,n,r,void 0,void 0),process.chdir(s);let f=o??n;se({cloud:{framework:f,workspace_id:p.id}}),Ot({apiToken:u,directory:"."}),process.env.WEBFLOW_API_TOKEN=u;let m=Date.now()-c;try{await G.forCloud({authToken:u}).sendUsage("project_init",{scaffold:f,scaffoldName:f,initMode:fe.New,workspaceId:p.id,totalDuration:m,mountPath:t})}catch{}}catch(c){if(c instanceof g||c instanceof Error&&c.message.includes("OAuth")){try{await Zo(e,t,n,r),process.chdir(s),se({cloud:{framework:o??n}}),Ot({directory:"."})}catch{}throw d.error("Project scaffold was created, but authentication failed."),d.error("To set up Webflow credentials later, run:"),d.error(" webflow auth login"),aa(e,fe.New),new g(c,{skipLogging:!0})}throw c}finally{if(l)try{Ju.default.removeSync(l)}catch{}}aa(e,fe.New)},uA=async(e,t,n,r,o)=>{let i=`./${e}`,s=null,a=!1,l="content"in r&&typeof r.content=="object"&&"extractionRoot"in r.content?r.content:null,c=l?rr.dirname(l.extractionRoot):null;try{let u=Date.now();await lA(e,n,r),process.chdir(i);let{manifest:p}=Q(),f=await be(p,{site:o}),m=f.accessToken,h=f.siteId;if(s=G.forCloud({authToken:m,siteId:h}),await Zo(".",t,n,r,h,m),h){d.info("Running devlink export to fetch your Webflow components...");try{await dA({site:h,apiToken:m}),a=!0}catch(k){d.error(k,{prefix:"Failed to run devlink export:"}),d.info("You can manually run 'npx webflow devlink export' later to export your components.")}}let v=Date.now()-u;await s?.sendUsage("project_init",{scaffold:n,scaffoldName:n,devlinkSyncStatus:a,totalDuration:v,mountPath:t}),aa(e,fe.Existing)}catch(u){throw d.error(u,{prefix:"Error during Webflow authentication:"}),await Zo(".",t,n,r),d.error("Project scaffold was created, but authentication failed."),d.error("To set up Webflow credentials later, run:"),d.error(" webflow auth login"),aa(e,fe.Existing),new g(u,{skipLogging:!0})}finally{if(c)try{Ju.default.removeSync(c)}catch{}}},dA=async e=>{let{exportComponents:t}=await Promise.resolve().then(()=>(zc(),ay));await t({site:e.site,apiToken:e.apiToken})},pA=e=>{if(e?.skipMountPathCheck!==void 0)return e.skipMountPathCheck;try{let{manifest:t}=Q();return bu(t)?!0:t.cloud?.skipMountPathCheck===!0}catch{return!1}},fA=async(e,t,n,r)=>{d.info("\u{1F50D} Validating mount path configuration...");let o=await Bb(e,t,n);if(o.isValid)d.info(`${ee} Mount path validation passed`);else if(d.info(`
164
+ \u{1F4CB} Mount path validation results:`),o.domains.forEach(i=>{let s=i.isValid?ee:N,a=i.isValid?`(mountPath: ${i.mountPaths[0]})`:"(no matching mountPath)";d.info(`${s} ${i.domain} ${a}`),i.error&&d.debug(` Error: ${i.error}`)}),o.needsPublishing)if(r){d.info("\u{1F680} Auto-publishing site to update mount path configuration...");let i=o.domains.filter(s=>!s.isValid).map(s=>s.domain);await Vu(e,i)}else if(await Wb()&&mt()){let s=o.domains.filter(l=>!l.isValid).map(l=>l.domain),a=await Mb(s);await Vu(e,a)}else d.warn("\u26A0\uFE0F Continuing with deployment without publishing...")},mA=async(e,t,n,r)=>{$u("\u{1F3D7}\uFE0F ","Building project");let o=await xb(e,{mountPath:n,telemetry:r?.telemetry,deployUrl:t.deploy_url,environmentId:t.environment_id});$u("\u{1F4E4}","Uploading build artifacts");let i=Date.now();await Ib(o,t.upload_url);let s=Date.now()-i;return d.info(`${ee} Upload completed in ${(s/1e3).toFixed(1)}s`),o},gA=async(e,t,n,r)=>{d.success(`
165
+ \u{1F310} Your cloud app will soon be available at:`);try{let o=r?.domainsOverride??await Nb(e,t,n),i=Lb(o??[],t);i?.length>0?i.forEach(s=>{d.info(` ${s}`)}):d.warn(" No domains found with the correct mount path configuration yet.")}catch(o){d.warn(` Could not determine deployment links: ${o instanceof Error?o.message:o}`)}},hA=e=>{e.site_slug?d.success(`Visit your deployment:
166
+
167
+ ${pr}/dashboard/sites/${e.site_slug}/webflow-cloud/projects/${e.project_id}/environments/${e.environment_id}/deployments/${e.deployment_id}`):d.info(`
168
+ Visit the webflow Cloud dashboard to view your deployment: https://webflow.com/dashboard/sites`)},yA=async(e,t,n,r,o)=>{try{if(await Rb(t.completion_url,!!r),r)d.error(`
169
+ ${N} Deployment failed due to build error.`);else{d.success(`
170
+ ${ee} Deployment triggered successfully!`);let i;try{let{manifest:s}=Q();bu(s)&&(i=[`${o?.projectName??rr.basename(process.cwd())}.webflow.io`])}catch(s){d.debug(`Could not read manifest for standalone deploy link hint: ${s instanceof Error?s.message:String(s)}`)}await gA(e,n,t.environment_id,i!==void 0?{domainsOverride:i}:void 0),hA(t)}}catch(i){throw new g(i,{prefix:"Failed to trigger deployment:"})}},wA=(e,t)=>{e&&Eb(process.cwd(),e),t&&Cb(t)},Ub=async(e,t,n,r)=>{let o=null,i=null,s=Date.now(),a=null,l=null,c=Bu(process.cwd()),u=r?.telemetry;await u?.sendUsage("cloud_deploy_start",{environment:t,mountPath:n,projectName:r?.projectName,hasDescription:!!r?.description,hasDirectory:!!r?.directory,cloudflareBindings:c});try{gb(d,process.cwd()),o=await Tb(e,t,n,r),d.info("\u{1F527} Detecting framework..."),a=await kb(process.cwd(),o.deploy_url,o.environment_id,n),d.info(`Framework: ${a.info.displayName}`),d.info(`Build command: ${a.getBuildCommand()}`),pA(r)?d.info("\u23ED\uFE0F Skipping mount path validation..."):await fA(e,n,o.environment_id,r?.autoPublish),i=await mA(a,o,n,r),d.info(`Starting deployment process for environment: ${t} at mount path: ${n}`);let p=Date.now()-s;await u?.sendUsage("cloud_deploy_success",{duration:p,environment:t,mountPath:n,projectName:r?.projectName,hasDescription:!!r?.description,hasDirectory:!!r?.directory,framework:a.info.name,buildCommand:a.getBuildCommand(),cloudflareBindings:c})}catch(p){l=p instanceof Error?p:new Error(String(p)),d.error(l,{prefix:"Error during deployment initialization:"});let f=Date.now()-s;await u?.sendError(l,"cloud_deploy_failure",{duration:f,environment:t,mountPath:n,projectName:r?.projectName,cloudflareBindings:c,argv:process.argv.slice(2)})}finally{if(wA(a,i),o&&await yA(e,o,n,l,{projectName:r?.projectName}),l)throw new g(l,{skipLogging:!0})}},aa=(e,t)=>{d.info("--- "),d.info(E.bold.green("Get started with the following commands:")),d.info(` cd ${e}`),d.info(" npm install"),d.info(" npm run dev"),d.info(` webflow cloud deploy
152
171
 
153
172
  `),t!==fe.New&&(d.info("Run the following command to export Webflow components when they update:"),d.info(` webflow devlink export
154
173
  `)),d.info(`
155
- --- `)};ye();$e();Ie();G();Se();var Mb=w(require("path"));function jn(e){if(!e||e.trim()==="")return"/";let t=Mb.posix.normalize(e);return t.startsWith("/")||(t="/"+t),t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t=t.split("/").map((r,o)=>o===0?r:encodeURIComponent(r)).join("/"),t}function Cs(e){return!(!e||e.trim()===""||!e.startsWith("/")||e.includes(".."))}te();var Ub=require("crypto");le();te();async function Wb(e){let{accessToken:t,workspaceId:n,displayName:r,description:o,appPath:i}=e,a={requestId:(0,Ub.randomUUID)(),cloudApp:{displayName:r,description:o,appPath:i,source:{type:"CLI",cli:{sourceUrl:Uy}}}},l=`${P}/cosmic/workspaces/${n}/cloudApps`,c=await fetch(l,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json","Accept-Version":"1.0.0"},body:JSON.stringify(a)});if(!c.ok){let u=await c.text();throw h2(c.status,c.statusText,u)}return c.json()}function h2(e,t,n){let r={};try{r=JSON.parse(n)}catch{}return e===403?r.publicErrorCode==="missing_scopes"?new h(`Missing required scopes to create a Cloud app.
174
+ --- `)};ke();Me();Be();J();Oe();var zb=w(require("path"));function or(e){if(!e||e.trim()==="")return"/";let t=zb.posix.normalize(e);return t.startsWith("/")||(t="/"+t),t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t=t.split("/").map((r,o)=>o===0?r:encodeURIComponent(r)).join("/"),t}function ca(e){return!(!e||e.trim()===""||!e.startsWith("/")||e.includes(".."))}te();var Vb=require("crypto");le();te();async function Jb(e){let{accessToken:t,workspaceId:n,displayName:r,description:o,appPath:i}=e,a={requestId:(0,Vb.randomUUID)(),cloudApp:{displayName:r,description:o,appPath:i,source:{type:"CLI",cli:{sourceUrl:Ow}}}},l=`${I}/cosmic/workspaces/${n}/cloudApps`,c=await fetch(l,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json","Accept-Version":"1.0.0"},body:JSON.stringify(a)});if(!c.ok){let u=await c.text();throw bA(c.status,c.statusText,u)}return c.json()}function bA(e,t,n){let r={};try{r=JSON.parse(n)}catch{}return e===403?r.publicErrorCode==="missing_scopes"?new g(`Missing required scopes to create a Cloud app.
156
175
  ${r.msg??""}
157
- Re-run 'webflow auth login' to grant the necessary permissions.`):new h(r.msg??"You don't have permission to create apps in this workspace."):e===404?new h("Cloud app creation is not available. The workspace may not exist or the feature is not enabled for your account."):e===409?r.msg?.includes("No new sites can be created")?new h(`Failed to create app: your workspace has reached its app limit.
158
- Upgrade your plan or remove unused apps to create a new one.`):new h(r.msg??"A Cloud app creation request is already being processed. Please wait and try again."):new h(`Failed to create app: ${e} ${t}`+(r.msg?`
159
- ${r.msg}`:""))}je();ye();te();Se();$e();G();je();function g2(){return!0}async function Gb(e={}){y2(e);let t=await b2(e,Q().manifest);return{credentials:t.credentials,workspaceId:t.workspaceId,manifest:Q().manifest}}function y2(e){if(e.siteId&&e.workspaceId)throw new h("--site-id and --workspace-id are mutually exclusive. Pass exactly one.")}async function b2(e,t){let n=g2();if(e.siteId)return zb(t,e.siteId);if(e.workspaceId&&n)return Vb(e.workspaceId);if(t.siteId)return zb(t,t.siteId);if(t.cloud?.workspace_id&&n)return Vb(t.cloud.workspace_id);if(process.env.WEBFLOW_SITE_ID)return n&&d.info("Using site from WEBFLOW_SITE_ID env var. Pass --site-id explicitly or unset to see the deploy mode picker."),iu(t);if(re()||!rt())throw new h(n?`No identity configured for this project.
176
+ Re-run 'webflow auth login' to grant the necessary permissions.`):new g(r.msg??"You don't have permission to create apps in this workspace."):e===404?new g("Cloud app creation is not available. The workspace may not exist or the feature is not enabled for your account."):e===409?r.msg?.includes("No new sites can be created")?new g(`Failed to create app: your workspace has reached its app limit.
177
+ Upgrade your plan or remove unused apps to create a new one.`):new g(r.msg??"A Cloud app creation request is already being processed. Please wait and try again."):new g(`Failed to create app: ${e} ${t}`+(r.msg?`
178
+ ${r.msg}`:""))}We();ke();te();Oe();Me();J();We();function DA(){return!0}async function Hb(e={}){vA(e);let t=await kA(e,Q().manifest);return{credentials:t.credentials,workspaceId:t.workspaceId,manifest:Q().manifest}}function vA(e){if(e.siteId&&e.workspaceId)throw new g("--site-id and --workspace-id are mutually exclusive. Pass exactly one.")}async function kA(e,t){let n=DA();if(e.siteId)return qb(t,e.siteId);if(e.workspaceId&&n)return Gb(e.workspaceId);if(t.siteId)return qb(t,t.siteId);if(t.cloud?.workspace_id&&n)return Gb(t.cloud.workspace_id);if(process.env.WEBFLOW_SITE_ID)return n&&d.info("Using site from WEBFLOW_SITE_ID env var. Pass --site-id explicitly or unset to see the deploy mode picker."),Gu(t);if(oe()||!mt())throw new g(n?`No identity configured for this project.
160
179
  Pass one of:
161
180
  --site-id <id> (deploy to an existing Webflow site)
162
181
  --workspace-id <id> (create a new standalone Cloud app)
163
182
  Or run 'webflow cloud init' to scaffold a new project.`:`No identity configured for this project.
164
- Pass --site-id <id> or run 'webflow cloud init' to scaffold a new project.`);return n?D2(t):iu(t)}async function zb(e,t){return{credentials:await be(e,{site:t})}}async function iu(e){return{credentials:await be(e,{})}}async function Vb(e){let t=await Y();return{workspaceId:e,credentials:{accessToken:t,siteId:""}}}async function w2(){let e=await Y(),t=await ws(e);if(t.length===0)throw new h("No workspaces found in your account. Please make sure you have at least one workspace.");let n=await Ds(t);return oe({cloud:{workspace_id:n.id}}),{workspaceId:n.id,credentials:{accessToken:e,siteId:""}}}async function D2(e){let t=await Re({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 h("Deploy cancelled.",{skipLogging:!0});return t==="standalone"?w2():iu(e)}var Jb=e=>{let t=e.command("cloud").description("Create and manage Webflow Cloud projects"),n=!0;t.command("create").description(n?"[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)=>{n&&d.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 xs()).find(u=>u===a)){d.error(`Framework ${a} not found`);return}await ou(i,"/app",a,void 0,fe.Existing,void 0)}),t.command("list").description("Get list of project templates that can be used for `init`").action(async()=>{let i=await xs();d.info("Available project templates:"),i.length>0?i.forEach(s=>d.info(`- ${s}`)):d.info("No templates found.")});let r=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>",n?"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");n&&(r.option("--new","Create a standalone project without connecting to a site"),r.option("-w, --workspace-id <workspaceId>","Workspace ID for standalone projects (skips workspace picker)")),r.action(async i=>{if(i.workspaceId&&i.siteId)throw new h("--workspace-id and --site-id are mutually exclusive. Pass exactly one.");let s=process.stdin.isTTY,a=await xs(),l={};if(s&&rt()){if(n&&i?.new!==!0&&(l.initMode=await Re({message:"Where do you want to deploy this app?",choices:[{name:"New domain",value:fe.New},{name:"Existing site",value:fe.Existing}],default:fe.New})),i?.framework||(l.scaffoldName=await Re({message:"Which framework would you like to use?",choices:a.map(C=>({name:C,value:C})),default:"astro"})),!i.projectName){let C=await _e({message:"What would you like to name your app?",validate:O=>{let I=O.trim();return I===""?"App name cannot be empty":I.length<Jt||I.length>Ht?`App name must be between ${Jt} and ${Ht} characters`:!0}});if(C==null)throw new h("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");l.projectName=C}let k=n&&(i.new===!0||l.initMode===fe.New);if(!i.mount&&!k){let C=await _e({message:"What path do you want to use locally? (e.g., /app)",default:"/app"});l.mountPath=jn(C)}}let c=i.projectName||l.projectName,u=i.framework||l.scaffoldName,p=n?i.new?fe.New:l.initMode??(re()?fe.New:fe.Existing):fe.Existing,f=p===fe.New?i.mount||l.mountPath||"/":i.mount||l.mountPath||"/app",m=i.siteId,g=jn(f);if(!c||typeof c!="string"||c.trim()==="")throw new h("--project-name cannot be empty");if(c.length<Jt||c.length>Ht)throw new h(`--project-name must be between ${Jt} and ${Ht} characters`);if(!u)throw new h("--framework is required");if(!a.includes(u)){let k=a.join(`
165
- - `);throw new h(`--framework "${u}" not found
183
+ Pass --site-id <id> or run 'webflow cloud init' to scaffold a new project.`);return n?CA(t):Gu(t)}async function qb(e,t){return{credentials:await be(e,{site:t})}}async function Gu(e){return{credentials:await be(e,{})}}async function Gb(e){let t=await Y();return{workspaceId:e,credentials:{accessToken:t,siteId:""}}}async function xA(){let e=await Y(),t=await oa(e);if(t.length===0)throw new g("No workspaces found in your account. Please make sure you have at least one workspace.");let n=await ia(t);return se({cloud:{workspace_id:n.id}}),{workspaceId:n.id,credentials:{accessToken:e,siteId:""}}}async function CA(e){let t=await Le({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 g("Deploy cancelled.",{skipLogging:!0});return t==="standalone"?xA():Gu(e)}var Kb=e=>{let t=e.command("cloud").description("Create and manage Webflow Cloud projects"),n=!0;t.command("create").description(n?"[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)=>{n&&d.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 la()).find(u=>u===a)){d.error(`Framework ${a} not found`);return}await qu(i,"/app",a,void 0,fe.Existing,void 0)}),t.command("list").description("Get list of project templates that can be used for `init`").action(async()=>{let i=await la();d.info("Available project templates:"),i.length>0?i.forEach(s=>d.info(`- ${s}`)):d.info("No templates found.")});let r=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>",n?"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");n&&(r.option("--new","Create a standalone project without connecting to a site"),r.option("-w, --workspace-id <workspaceId>","Workspace ID for standalone projects (skips workspace picker)")),r.action(async i=>{if(i.workspaceId&&i.siteId)throw new g("--workspace-id and --site-id are mutually exclusive. Pass exactly one.");let s=process.stdin.isTTY,a=await la(),l={};if(s&&mt()){if(n&&i?.new!==!0&&(l.initMode=await Le({message:"Where do you want to deploy this app?",choices:[{name:"New domain",value:fe.New},{name:"Existing site",value:fe.Existing}],default:fe.New})),i?.framework||(l.scaffoldName=await Le({message:"Which framework would you like to use?",choices:a.map(k=>({name:k,value:k})),default:"astro"})),!i.projectName){let k=await Te({message:"What would you like to name your app?",validate:T=>{let P=T.trim();return P===""?"App name cannot be empty":P.length<ln||P.length>cn?`App name must be between ${ln} and ${cn} characters`:!0}});if(k==null)throw new g("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");l.projectName=k}let v=n&&(i.new===!0||l.initMode===fe.New);if(!i.mount&&!v){let k=await Te({message:"What path do you want to use locally? (e.g., /app)",default:"/app"});l.mountPath=or(k)}}let c=i.projectName||l.projectName,u=i.framework||l.scaffoldName,p=n?i.new?fe.New:l.initMode??(oe()?fe.New:fe.Existing):fe.Existing,f=p===fe.New?i.mount||l.mountPath||"/":i.mount||l.mountPath||"/app",m=i.siteId,h=or(f);if(!c||typeof c!="string"||c.trim()==="")throw new g("--project-name cannot be empty");if(c.length<ln||c.length>cn)throw new g(`--project-name must be between ${ln} and ${cn} characters`);if(!u)throw new g("--framework is required");if(!a.includes(u)){let v=a.join(`
184
+ - `);throw new g(`--framework "${u}" not found
166
185
 
167
186
  Available frameworks:
168
- - ${k}`)}if(typeof g!="string"||!Cs(g))throw new h("Invalid mount path: "+g);if(p===fe.Existing&&!m&&(!s||re()))throw new h("--site-id is required when connecting to an existing site in non-interactive mode.");await ou(c,g,u,m,p,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)");n&&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),d.info(`Changed directory to: ${i.directory}`)}catch(I){throw d.error(`Error: Could not change to directory ${i.directory}`),new h(I)}if(i.framework){if(!bn.includes(i.framework))throw new h(`Framework "${i.framework}" is not supported. Allowed: ${bn.join(", ")}.`);oe({cloud:{framework:i.framework}})}let s=await Gb({siteId:i.siteId,workspaceId:i.workspaceId}),{workspaceId:a}=s,{credentials:l,manifest:c}=s,u=!!a;if(a){if(!n)throw new h("Standalone Cloud apps are only available in @next builds. Install with: npm i -g @webflow/webflow-cli@next");let I=qb.default.basename(process.cwd()).trim(),E=I.length>=Jt&&I.length<=Ht,x=i.projectName??(E?I:"Cloud App");if(x.length<Jt||x.length>Ht)throw new h(`Project name must be between ${Jt} and ${Ht} characters (got ${x.length}).
169
- Use --project-name to provide a valid name.`);let V=d.spinner("Creating Cloud app...");try{let _=await Wb({accessToken:l.accessToken,workspaceId:a,displayName:x});V.succeed(`Cloud app created: ${_.cloudApp.displayName}`),oe({siteId:_.cloudApp.siteId,cloud:{...c.cloud,project_id:_.cloudApp.project.id,environment_id:_.cloudApp.environment.id}}),bt({siteId:_.cloudApp.siteId,directory:"."}),process.env.WEBFLOW_SITE_ID=_.cloudApp.siteId,{manifest:c}=Q()}catch(_){throw V.fail("Failed to create app"),new h(_,{prefix:"Could not create app:"})}let R=c.siteId;if(!R)throw new h("Expected siteId in manifest after Cloud app creation.");l={accessToken:l.accessToken,siteId:R}}let p;try{p=J.forCloud({authToken:l.accessToken,siteId:l.siteId})}catch(I){d.debug(`Failed to initialize telemetry: ${I}`)}let f=c.cloud||{},m=i.projectId??f.project_id,g,k,C=i.projectName,O=i.description;if(i.environment&&i.mount){if(g=i.environment,k=jn(i.mount),!Cs(k))throw new h("Invalid mount path: "+k)}else{let I=[];if(!m){if(!C&&re())throw new h("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");try{let x=await Tb(l);if(x.projects.length>0){let V=await Re({message:"Select an app to deploy to:",choices:[...x.projects.map(R=>({name:`${R.name} (${R.description||"No description"})`,value:R.id})),{name:"Create new app",value:null}]});V?(m=V,d.info("\u{1F4DD} Updating webflow.json with app ID..."),oe({cloud:{project_id:V}})):d.info("Creating a new app will be handled during deployment.")}else d.info("No existing apps found. A new app will be created during deployment.")}catch(x){d.warn("Could not fetch existing apps. A new app will be created during deployment."),d.warn(x instanceof Error?x.message:String(x))}}if(!m&&!C&&(C=await _e({message:"What would you like to name your new app?",default:"New Webflow Cloud App",validate:x=>x.trim()===""?"App name cannot be empty":!0})),m)try{let V=(await Sb(l,m)).environments.map(R=>({name:`${R.branch} (${R.mount})`,value:{branch:R.branch,mount:R.mount}}));I.push(...V)}catch(x){throw new h(x,{prefix:"Error fetching project environments:"})}I.push({name:"Create new environment",value:null});let E=await Re({message:"Select an environment to deploy to:",choices:I});if(E)g=E.branch,k=jn(E.mount);else if(i.environment?g=i.environment:g=await _e({message:"What environment would you like to deploy to?",default:"main",validate:x=>x.trim()===""?"Environment cannot be empty":!0}),i.mount)k=jn(i.mount);else{let x=await _e({message:"What path should this environment be mounted at? (e.g., /app)",default:"/app"});k=jn(x)}}if(!Cs(k))throw new h("Invalid mount path: "+k);await Lb(l,g,k,{projectName:C,description:O,directory:i.directory,skipMountPathCheck:u||i.skipMountPathCheck,autoPublish:i.autoPublish,telemetry:p})}catch(s){throw new h(s,{prefix:"Error during deployment setup:"})}})};var au=require("commander");je();Ie();ye();G();te();ve();Ee();le();it();te();te();function K(e,t){if(!/^[a-f0-9]{24}$/.test(e))throw new h(`Invalid ${t}: "${e}" is not a valid resource ID.`,{isUserError:!0})}var su=e=>e.replace(/\x1b\[[0-9;]*m/g,""),Hb=(e,t)=>e+" ".repeat(Math.max(0,t-su(e).length));function Ne(e,t){let n=e.map((s,a)=>Math.max(su(s).length,...t.map(l=>su(String(l[a])).length))),r=n.map(s=>"\u2500".repeat(s+2)).join("\u2500"),o=e.map((s,a)=>Hb(s,n[a]+2)).join(""),i=t.map(s=>s.map((a,l)=>Hb(String(a),n[l]+2)).join("")).join(`
187
+ - ${v}`)}if(typeof h!="string"||!ca(h))throw new g("Invalid mount path: "+h);if(p===fe.Existing&&!m&&(!s||oe()))throw new g("--site-id is required when connecting to an existing site in non-interactive mode.");await qu(c,h,u,m,p,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)");n&&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),d.info(`Changed directory to: ${i.directory}`)}catch(P){throw d.error(`Error: Could not change to directory ${i.directory}`),new g(P)}if(i.framework){if(!ii.includes(i.framework))throw new g(`Framework "${i.framework}" is not supported. Allowed: ${ii.join(", ")}.`);se({cloud:{framework:i.framework}})}let s=await Hb({siteId:i.siteId,workspaceId:i.workspaceId}),{workspaceId:a}=s,{credentials:l,manifest:c}=s,u=!!a;if(a){if(!n)throw new g("Standalone Cloud apps are only available in @next builds. Install with: npm i -g @webflow/webflow-cli@next");let P=Zb.default.basename(process.cwd()).trim(),C=P.length>=ln&&P.length<=cn,x=i.projectName??(C?P:"Cloud App");if(x.length<ln||x.length>cn)throw new g(`Project name must be between ${ln} and ${cn} characters (got ${x.length}).
188
+ Use --project-name to provide a valid name.`);let z=d.spinner("Creating Cloud app...");try{let S=await Jb({accessToken:l.accessToken,workspaceId:a,displayName:x});z.succeed(`Cloud app created: ${S.cloudApp.displayName}`),se({siteId:S.cloudApp.siteId,cloud:{...c.cloud,project_id:S.cloudApp.project.id,environment_id:S.cloudApp.environment.id}}),Ot({siteId:S.cloudApp.siteId,directory:"."}),process.env.WEBFLOW_SITE_ID=S.cloudApp.siteId,{manifest:c}=Q()}catch(S){throw z.fail("Failed to create app"),new g(S,{prefix:"Could not create app:"})}let R=c.siteId;if(!R)throw new g("Expected siteId in manifest after Cloud app creation.");l={accessToken:l.accessToken,siteId:R}}let p;try{p=G.forCloud({authToken:l.accessToken,siteId:l.siteId})}catch(P){d.debug(`Failed to initialize telemetry: ${P}`)}let f=c.cloud||{},m=i.projectId??f.project_id,h,v,k=i.projectName,T=i.description;if(i.environment&&i.mount){if(h=i.environment,v=or(i.mount),!ca(v))throw new g("Invalid mount path: "+v)}else{let P=[];if(!m){if(!k&&oe())throw new g("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");try{let x=await Pb(l);if(x.projects.length>0){let z=await Le({message:"Select an app to deploy to:",choices:[...x.projects.map(R=>({name:`${R.name} (${R.description||"No description"})`,value:R.id})),{name:"Create new app",value:null}]});z?(m=z,d.info("\u{1F4DD} Updating webflow.json with app ID..."),se({cloud:{project_id:z}})):d.info("Creating a new app will be handled during deployment.")}else d.info("No existing apps found. A new app will be created during deployment.")}catch(x){d.warn("Could not fetch existing apps. A new app will be created during deployment."),d.warn(x instanceof Error?x.message:String(x))}}if(!m&&!k&&(k=await Te({message:"What would you like to name your new app?",default:"New Webflow Cloud App",validate:x=>x.trim()===""?"App name cannot be empty":!0})),m)try{let z=(await Ob(l,m)).environments.map(R=>({name:`${R.branch} (${R.mount})`,value:{branch:R.branch,mount:R.mount}}));P.push(...z)}catch(x){throw new g(x,{prefix:"Error fetching project environments:"})}P.push({name:"Create new environment",value:null});let C=await Le({message:"Select an environment to deploy to:",choices:P});if(C)h=C.branch,v=or(C.mount);else if(i.environment?h=i.environment:h=await Te({message:"What environment would you like to deploy to?",default:"main",validate:x=>x.trim()===""?"Environment cannot be empty":!0}),i.mount)v=or(i.mount);else{let x=await Te({message:"What path should this environment be mounted at? (e.g., /app)",default:"/app"});v=or(x)}}if(!ca(v))throw new g("Invalid mount path: "+v);await Ub(l,h,v,{projectName:k,description:T,directory:i.directory,skipMountPathCheck:u||i.skipMountPathCheck,autoPublish:i.autoPublish,telemetry:p})}catch(s){throw new g(s,{prefix:"Error during deployment setup:"})}})};var Zu=require("commander");We();Be();ke();J();te();Ce();_e();le();ht();te();te();function Z(e,t){if(!/^[a-f0-9]{24}$/.test(e))throw new g(`Invalid ${t}: "${e}" is not a valid resource ID.`,{isUserError:!0})}var Hu=e=>e.replace(/\x1b\[[0-9;]*m/g,""),Yb=(e,t)=>e+" ".repeat(Math.max(0,t-Hu(e).length));function Ve(e,t){let n=e.map((s,a)=>Math.max(Hu(s).length,...t.map(l=>Hu(String(l[a])).length))),r=n.map(s=>"\u2500".repeat(s+2)).join("\u2500"),o=e.map((s,a)=>Yb(s,n[a]+2)).join(""),i=t.map(s=>s.map((a,l)=>Yb(String(a),n[l]+2)).join("")).join(`
170
189
  `);return`${o}
171
190
  ${r}
172
- ${i}`}async function mt(e){try{let t=await e.json();return t.message??t.error??`${e.status} ${e.statusText}`}catch{return`${e.status} ${e.statusText}`}}async function Kb(e,t){K(t,"siteId");let n=await Z(`${P}/v2/sites/${t}/collections`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok){let o=await mt(n);throw n.status>=400&&n.status<500?new h(o,{isUserError:!0}):new h(`Failed to list collections: ${o}`)}return(await n.json()).collections??[]}async function Zb(e,t){K(t,"collectionId");let n=await Z(`${P}/v2/collections/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(n.status===404)throw new h(`Collection "${t}" not found`,{isUserError:!0});if(!n.ok)throw new h(`Failed to get collection: ${await mt(n)}`);let r=await n.json();return{...r,fields:r.fields??[]}}async function Yb(e,t,n){K(t,"siteId");let r={displayName:n.displayName,singularName:n.singularName};n.slug&&(r.slug=n.slug);let o=await Z(`${P}/v2/sites/${t}/collections`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)});if(!o.ok){let i=await mt(o);throw o.status>=400&&o.status<500?new h(i,{isUserError:!0}):new h(`Failed to create collection: ${i}`)}return await o.json()}async function Xb(e,t,n){K(t,"collectionId");let r=await Z(`${P}/v2/collections/${t}/fields`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({displayName:n.displayName,type:n.type,isRequired:n.isRequired??!1})});if(!r.ok){let o=await mt(r);throw r.status===404?new h(`Collection "${t}" not found`,{isUserError:!0}):r.status>=400&&r.status<500?new h(o,{isUserError:!0}):new h(`Failed to create field: ${o}`)}return await r.json()}async function Qb(e,t,n={}){K(t,"collectionId");let r=new URLSearchParams;n.limit!=null&&r.set("limit",String(n.limit)),n.offset!=null&&r.set("offset",String(n.offset)),n.cmsLocaleId&&r.set("cmsLocaleId",n.cmsLocaleId);let o=r.toString()?`?${r.toString()}`:"",i=await Z(`${P}/v2/collections/${t}/items${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(i.status===404)throw new h(`Collection "${t}" not found`,{isUserError:!0});if(!i.ok)throw new h(`Failed to list items: ${await mt(i)}`);let s=await i.json();return{items:s.items??[],total:s.total??0,count:s.count??s.items?.length??0,limit:s.limit??n.limit??100,offset:s.offset??n.offset??0}}async function ew(e,t,n,r){K(t,"collectionId"),K(n,"itemId");let o=r?`?cmsLocaleId=${encodeURIComponent(r)}`:"",i=await Z(`${P}/v2/collections/${t}/items/${n}${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(i.status===404)throw new h(`Item "${n}" not found`,{isUserError:!0});if(!i.ok)throw new h(`Failed to get item: ${await mt(i)}`);return await i.json()}async function tw(e,t,n,r=!1){K(t,"collectionId");let o=await Z(`${P}/v2/collections/${t}/items`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:n,isDraft:r})});if(!o.ok){let i=await mt(o);throw o.status>=400&&o.status<500?new h(i,{isUserError:!0}):new h(`Failed to create item: ${i}`)}return await o.json()}async function nw(e,t,n,r){K(t,"collectionId"),K(n,"itemId");let o=await Z(`${P}/v2/collections/${t}/items/${n}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:r})});if(o.status===404)throw new h(`Item "${n}" not found`,{isUserError:!0});if(!o.ok)throw new h(`Failed to update item: ${await mt(o)}`);return await o.json()}async function rw(e,t,n){K(t,"collectionId"),K(n,"itemId");let r=await Z(`${P}/v2/collections/${t}/items/${n}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(r.status===404)throw new h(`Item "${n}" not found`,{isUserError:!0});if(!r.ok)throw new h(`Failed to delete item: ${await mt(r)}`)}async function ow(e,t,n){K(t,"collectionId"),n.forEach(o=>K(o,"itemId"));let r=await Z(`${P}/v2/collections/${t}/items/publish`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({itemIds:n})});if(!r.ok){let o=await mt(r);throw r.status>=400&&r.status<500?new h(o,{isUserError:!0}):new h(`Failed to publish items: ${o}`)}return await r.json()}function iw(e,t=["id","displayName","slug"]){if(e.length===0)return v.dim("No collections found.");let n=["id","displayName","singularName","slug","lastUpdated"],r=Object.fromEntries(n.map(a=>[a.toLowerCase(),a])),o=t.map(a=>r[a.toLowerCase()]).filter(a=>a!=null);if(o.length===0)return v.red(`Invalid fields. Available: ${n.join(", ")}`);let i=o.map(a=>v.bold(a)),s=e.map(a=>o.map(l=>{let c=a[l];return c?l==="lastUpdated"?new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):c:v.dim("\u2014")}));return Ne(i,s)}function sw(e){let t=[`${v.bold("Collection:")} ${e.displayName}`,`${v.bold("ID:")} ${e.id}`,`${v.bold("Slug:")} ${e.slug}`,`${v.bold("Singular:")} ${e.singularName}`,`${v.bold("Updated:")} ${new Date(e.lastUpdated).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}`,"",v.bold("Fields:")];if(e.fields.length===0)return t.push(v.dim(" No fields defined.")),t.join(`
173
- `);let n=["NAME","SLUG","TYPE","REQUIRED"].map(o=>v.bold(o)),r=e.fields.map(o=>[o.displayName,o.slug,o.type,o.isRequired?"yes":"no"]);return t.push(Ne(n,r)),t.join(`
174
- `)}function aw(e,t=["id","isDraft","lastUpdated"]){if(e.length===0)return v.dim("No items found.");let n=t.map(o=>v.bold(o)),r=e.map(o=>t.map(i=>{if(i==="fieldData")return JSON.stringify(o.fieldData);if(i==="isDraft")return o.isDraft?v.yellow("draft"):v.green("live");if(i==="isArchived")return o.isArchived?v.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"}):v.dim("\u2014")}let s=o[i];return s==null?v.dim("\u2014"):String(s)}));return Ne(n,r)}function Es(e,t,n="asc"){return[...e].sort((r,o)=>{let i=r[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)),n==="desc"?-a:a})}var St=new au.Option("--json","Output as JSON"),Tr=new au.Option("--dry-run","Preview without executing"),lw=e=>{let t=e.command("cms").description("Manage Webflow CMS content"),n=t.command("collections").description("Manage CMS collections");n.command("list").description("List all CMS collections for a site").addOption(hr).addOption(St).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 Y(),a=i.site;else{let{manifest:u}=Q(),p=await be(u);s=p.accessToken,a=p.siteId}let l=J.forCms({authToken:s,siteId:a}),c=Date.now();try{let u=await Kb(s,a);if(await l.sendUsage("cms_collections_list",{duration:Date.now()-c,count:u.length}),u.length===0){d.info("No collections found.");return}let p=["displayName","slug","lastUpdated"];if(p.includes(i.sortBy)||(d.warn(`Unknown --sort-by "${i.sortBy}". Valid fields: ${p.join(", ")}. Defaulting to displayName.`),i.sortBy="displayName"),!["asc","desc"].includes(i.order))throw new h(`Invalid --order "${i.order}". Valid values: asc, desc`,{isUserError:!0});let f=Es(u,i.sortBy,i.order);if(i.json){d.info(JSON.stringify(f,null,2));return}let m=i.fields.split(",").map(g=>g.trim());d.info(iw(f,m))}catch(u){if(u instanceof h&&u.isUserError){d.info(`${L} ${u.message}`),process.exitCode=1;return}throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_collections_list",{duration:Date.now()-c}),new h(u,{prefix:`${L} Failed to list collections:`})}}),n.command("get").description("Get details and field schema for a CMS collection").argument("<collectionId>","Collection ID").addOption(St).action(async(i,s)=>{let a=await Y(),l=J.forCms({authToken:a}),c=Date.now();try{let u=await Zb(a,i);if(await l.sendUsage("cms_collections_get",{duration:Date.now()-c}),s.json){d.info(JSON.stringify(u,null,2));return}d.info(sw(u))}catch(u){if(u instanceof h&&u.isUserError){d.info(`${L} ${u.message}`),process.exitCode=1;return}throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_collections_get",{duration:Date.now()-c}),new h(u,{prefix:`${L} Failed to get collection:`})}}),n.command("create").description("Create a new CMS collection on a site. Use --dry-run to preview.").addOption(hr).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(Tr).addOption(St).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){d.info("Dry run \u2014 would create collection:"),d.info(JSON.stringify({displayName:i.name,singularName:s,slug:a},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let l,c;if(i.site)l=await Y(),c=i.site;else{let{manifest:f}=Q(),m=await be(f);l=m.accessToken,c=m.siteId}let u=J.forCms({authToken:l,siteId:c}),p=Date.now();try{let f=await Yb(l,c,{displayName:i.name,singularName:s,slug:a});if(await u.sendUsage("cms_collections_create",{duration:Date.now()-p}),i.json){d.info(JSON.stringify(f,null,2));return}d.info(`${ee} Collection created: ${f.id}`),d.info(` Name: ${f.displayName}`),d.info(` Slug: ${f.slug}`),d.info(`
175
- Next: add fields with "webflow cms fields create --collection ${f.id} --name <name> --type <type>"`)}catch(f){if(f instanceof h&&f.isUserError){d.info(`${L} ${f.message}`),process.exitCode=1;return}throw await u.sendError(f instanceof Error?f:new Error(String(f)),"cms_collections_create",{duration:Date.now()-p}),new h(f,{prefix:`${L} 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(Tr).addOption(St).action(async i=>{if(i.dryRun){d.info("Dry run \u2014 would create field:"),d.info(JSON.stringify({collectionId:i.collection,displayName:i.name,type:i.type,isRequired:i.required??!1},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let s=await Y(),a=J.forCms({authToken:s}),l=Date.now();try{let c=await Xb(s,i.collection,{displayName:i.name,type:i.type,isRequired:i.required??!1});if(await a.sendUsage("cms_fields_create",{duration:Date.now()-l}),i.json){d.info(JSON.stringify(c,null,2));return}d.info(`${ee} Field created: ${c.id}`),d.info(` Name: ${c.displayName}`),d.info(` Type: ${c.type}`),d.info(` Slug: ${c.slug}`)}catch(c){if(c instanceof h&&c.isUserError){d.info(`${L} ${c.message}`),process.exitCode=1;return}throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_fields_create",{duration:Date.now()-l}),new h(c,{prefix:`${L} 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(St).option("--fields <fields>","Comma-separated fields to display (id, isDraft, isArchived, lastUpdated, fieldData)","id,isDraft,lastUpdated").action(async i=>{let s=await Y(),a=J.forCms({authToken:s}),l=Date.now(),c=parseInt(i.limit,10)||100,u=parseInt(i.offset,10)||0;try{let p=await Qb(s,i.collection,{limit:c,offset:u,cmsLocaleId:i.locale});if(await a.sendUsage("cms_items_list",{duration:Date.now()-l,count:p.items.length}),p.items.length===0){d.info("No items found.");return}if(i.json){d.info(JSON.stringify(p,null,2));return}let f=i.fields.split(",").map(C=>C.trim());d.info(aw(p.items,f));let m=u+1,g=u+p.items.length;if(p.items.length>=c||u>0){let C=p.total>0?` of ${p.total}`:"";d.info(`
176
- Showing ${m}\u2013${g}${C} items. Use --offset ${g} to load next page.`)}}catch(p){if(p instanceof h&&p.isUserError){d.info(`${L} ${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 h(p,{prefix:`${L} 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(St).action(async i=>{let s=await Y(),a=J.forCms({authToken:s}),l=Date.now();try{let c=await ew(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 h&&c.isUserError){d.info(`${L} ${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 h(c,{prefix:`${L} 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(Tr).addOption(St).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new h(`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=J.forCms({authToken:a}),c=Date.now();try{let u=await tw(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 h&&u.isUserError){d.info(`${L} ${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 h(u,{prefix:`${L} 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(Tr).addOption(St).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new h(`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=J.forCms({authToken:a}),c=Date.now();try{let u=await nw(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 h&&u.isUserError){d.info(`${L} ${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 h(u,{prefix:`${L} 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(Tr).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=J.forCms({authToken:s}),l=Date.now();try{await rw(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 h&&c.isUserError){d.info(`${L} ${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 h(c,{prefix:`${L} 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(Tr).addOption(St).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=J.forCms({authToken:a}),c=Date.now();try{let u=await ow(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 h&&u.isUserError){d.info(`${L} ${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 h(u,{prefix:`${L} Failed to publish items:`})}})};Ee();je();Ie();ye();G();te();ve();Ee();le();it();te();async function uw(e,t,n={}){if(K(t,"siteId"),n.folderId){K(n.folderId,"folderId");let a=await k2(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 C=await Z(`${P}/v2/sites/${t}/assets?limit=${p}&offset=${u}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!C.ok)throw new h(`Failed to list assets: ${C.status} ${C.statusText}`);let O=await C.json(),I=O.assets??[];c.push(...I);let E=O.pagination?.total??0;if(u+=I.length,u>=E||I.length===0)break}let f=c.filter(C=>l.has(C.id)),m=n.offset??0,g=n.limit??f.length,k=f.slice(m,m+g);return{assets:k,pagination:{total:f.length,limit:k.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 Z(`${P}/v2/sites/${t}/assets${o?`?${o}`:""}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new h(`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 dw(e,t,n,r,o){K(t,"siteId"),o&&K(o,"folderId");let i=sc(n);v2(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 Z(`${P}/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 h(`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 mo(i,u)}catch(p){throw await Z(`${P}/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 pw(e,t,n){K(t,"assetId");let r=await Z(`${P}/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 h(`Failed to update asset: ${r.status} ${r.statusText}`);return await r.json()}async function k2(e,t){K(t,"folderId");let n=await Z(`${P}/v2/asset_folders/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new h(`Failed to get folder: ${n.status} ${n.statusText}`);return await n.json()}async function fw(e,t){K(t,"siteId");let n=await Z(`${P}/v2/sites/${t}/asset_folders`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new h(`Failed to list folders: ${n.status} ${n.statusText}`);return(await n.json()).assetFolders??[]}async function mw(e,t,n,r){K(t,"siteId"),r&&K(r,"parentFolderId");let o={displayName:n};r&&(o.parentFolder=r);let i=await Z(`${P}/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 h(`Failed to create folder: ${i.status} ${i.statusText}`);return await i.json()}var cw={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 v2(e,t){let n=e.split(".").pop()?.toLowerCase()??"",r=cw[n];if(!r){let o=Object.keys(cw).join(", ");throw new h(`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 h(`File too large: ${i} MB exceeds the ${o} MB limit for ${r.category} files.`,{isUserError:!0})}}var lu=["id","displayName","originalFileName","contentType","size","lastUpdated"];function hw(e,t=["id","displayName","lastUpdated","size"]){if(e.length===0)return v.dim("No assets found.");let n=Object.fromEntries(lu.map(l=>[l.toLowerCase(),l])),r=t.map(l=>n[l.toLowerCase()]).filter(l=>l!=null);if(r.length===0)return v.red(`Invalid fields. Available: ${lu.join(", ")}`);let o=t.filter(l=>n[l.toLowerCase()]==null),i=o.length>0?v.yellow(`Warning: unknown field(s) ignored: ${o.join(", ")}. Available: ${lu.join(", ")}
177
- `):"",s=r.map(l=>v.bold(l)),a=e.map(l=>r.map(c=>{let u=l[c];if(u==null||c==="size"&&u===0)return v.dim("\u2014");if(c==="size")return x2(Number(u));if(c==="lastUpdated"){let f=new Date(String(u)),m=String(f.getMonth()+1).padStart(2,"0"),g=String(f.getDate()).padStart(2,"0"),k=String(f.getFullYear()).slice(-2),C=String(f.getHours()).padStart(2,"0"),O=String(f.getMinutes()).padStart(2,"0");return`${m}/${g}/${k} ${C}:${O}`}let p=String(u);return c==="displayName"&&p.length>40?v.dim("\u2026")+p.slice(-39):p}));return i+Ne(s,a)}function x2(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function gw(e){if(e.length===0)return v.dim("No folders found.");let t=[...e].sort((o,i)=>o.displayName.localeCompare(i.displayName)),n=["id","displayName","assets","lastUpdated"].map(o=>v.bold(o)),r=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 Ne(n,r)}var yw=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 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=J.forAssets({authToken:o,siteId:i}),a=Date.now();try{let{assets:l,pagination:c}=await uw(o,i,{limit:r.limit,offset:r.offset,folderId:r.folder});if(await s.sendUsage("assets_list",{duration:Date.now()-a,count:l.length}),l.length===0){d.info("No assets found.");return}let u=["displayName","originalFileName","contentType","size","lastUpdated"];if(u.includes(r.sortBy)||(d.warn(`Unknown --sort-by "${r.sortBy}". Valid fields: ${u.join(", ")}. Defaulting to displayName.`),r.sortBy="displayName"),!["asc","desc"].includes(r.order))throw new h(`Invalid --order "${r.order}". Valid values: asc, desc`,{isUserError:!0});let p=Es(l,r.sortBy,r.order);if(r.json){d.info(JSON.stringify({assets:p,pagination:c},null,2));return}let f=r.fields.split(",").map(g=>g.trim());d.info(hw(p,f));let m=(r.offset??0)+l.length;m<c.total&&d.info(v.dim(`Showing ${m} of ${c.total} assets. Use --offset ${m} to see more.`))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_list",{duration:Date.now()-a}),new h(l,{prefix:`${L} Failed to list assets:`})}}),t.command("upload").description(`Upload a file as an asset. Use --dry-run to preview before uploading.
178
- 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=J.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await dw(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 h(c,{prefix:`${L} 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 h("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=J.forAssets({authToken:i}),a=Date.now();try{let l=await pw(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 h(l,{prefix:`${L} 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=J.forAssets({authToken:o,siteId:i}),a=Date.now();try{let l=await fw(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(gw(l))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_folders_list",{duration:Date.now()-a}),new h(l,{prefix:`${L} 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=J.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await mw(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 h(c,{prefix:`${L} Failed to create folder:`})}})};je();Ie();G();te();ve();Ee();le();it();te();async function ww(e,t){K(t,"siteId");let n=await Z(`${P}/v2/sites/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new h(`Failed to get site: ${n.status} ${n.statusText}`);return await n.json()}async function Dw(e){let t=[],n=0,r=100;for(;;){let o=new URL(`${P}/v2/sites`);o.searchParams.set("limit",String(r)),o.searchParams.set("offset",String(n));let i=await Z(o.toString(),{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new h(`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 kw(e,t){K(t,"siteId");let n=await Z(`${P}/v2/sites/${t}/custom_domains`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new h(`Failed to get custom domains: ${n.status} ${n.statusText}`);return(await n.json()).customDomains??[]}async function vw(e,t,n=[],r){K(t,"siteId"),r&&K(r,"pageId");let o=n.length>0?{customDomains:n}:{publishToWebflowSubdomain:!0};r&&(o.pageId=r);let i=await Z(`${P}/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 h(`Failed to publish site: ${i.status} ${i.statusText}`);return await i.json()}var cu=["id","displayName","shortName","lastPublished","lastUpdated","timeZone"],bw=Object.fromEntries(cu.map(e=>[e.toLowerCase(),e]));function xw(e,t=["id","displayName","lastPublished"],{warn:n}={}){if(e.length===0)return v.dim("No sites found.");let r=t.map(a=>bw[a.toLowerCase()]).filter(a=>a!=null),o=t.filter(a=>bw[a.toLowerCase()]==null);if(o.length>0&&n&&n(`Unknown field(s): ${o.join(", ")}. Available: ${cu.join(", ")}`),r.length===0)throw new h(`No valid fields specified. Available: ${cu.join(", ")}`,{isUserError:!0});let i=r.map(a=>v.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:v.dim("\u2014")}));return Ne(i,s)}function Cw(e){if(e.length===0)return v.dim("No custom domains configured.");let t=[v.bold("id"),v.bold("url"),v.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"}):v.dim("\u2014")]);return Ne(t,n)}var Ew=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=J.forSites({authToken:r}),i=Date.now();try{let s=await Dw(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(xw(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 h(s,{prefix:`${L} 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=J.forSites({authToken:o}),s=Date.now();try{let a=await ww(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 h(a,{prefix:`${L} 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=J.forSites({authToken:r}),i=Date.now();try{let s=await kw(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(Cw(s))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"sites_domains",{duration:Date.now()-i}),new h(s,{prefix:`${L} 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(K(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=J.forSites({authToken:r}),i=Date.now();try{let s=n.domains?n.domains.split(",").map(u=>u.trim()):[],a=await vw(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 h(s,{prefix:`${L} Failed to publish site:`})}})};var Iw=w(require("fs"));je();Ie();G();te();ve();Ee();le();te();it();te();async function uu(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 Z(a.toString(),{headers:{Authorization:`Bearer ${t}`,Accept:"application/json"}});if(!l.ok)throw new h(`${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 _w(e,t){return K(t,"siteId"),uu(`${P}/v2/sites/${t}/forms`,e,"forms","Failed to list forms")}async function Sw(e,t,n){return K(t,"siteId"),K(n,"formId"),uu(`${P}/v2/sites/${t}/forms/${n}/submissions`,e,"formSubmissions","Failed to list submissions")}var du=["id","displayName","name","slug","createdOn","lastUpdated"],Fw=Object.fromEntries(du.map(e=>[e.toLowerCase(),e]));function Tw(e,t=["id","displayName","slug"],{warn:n}={}){if(e.length===0)return v.dim("No forms found.");let r=t.map(a=>Fw[a.toLowerCase()]).filter(a=>a!=null),o=t.filter(a=>Fw[a.toLowerCase()]==null);if(o.length>0&&n&&n(`Unknown field(s): ${o.join(", ")}. Available: ${du.join(", ")}`),r.length===0)throw new h(`No valid fields specified. Available: ${du.join(", ")}`,{isUserError:!0});let i=r.map(a=>v.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:v.dim("\u2014")}));return Ne(i,s)}function Aw(e){if(e.length===0)return v.dim("No submissions found.");let t=Array.from(new Set(e.flatMap(o=>Object.keys(o.formResponse)))),n=["id","dateSubmitted",...t].map(o=>v.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?v.dim("\u2014"):typeof s=="object"?JSON.stringify(s):String(s)})]);return Ne(n,r)}function Ow(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(`
191
+ ${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 Xb(e,t){Z(t,"siteId");let n=await K(`${I}/v2/sites/${t}/collections`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok){let o=await St(n);throw n.status>=400&&n.status<500?new g(o,{isUserError:!0}):new g(`Failed to list collections: ${o}`)}return(await n.json()).collections??[]}async function Qb(e,t){Z(t,"collectionId");let n=await K(`${I}/v2/collections/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(n.status===404)throw new g(`Collection "${t}" not found`,{isUserError:!0});if(!n.ok)throw new g(`Failed to get collection: ${await St(n)}`);let r=await n.json();return{...r,fields:r.fields??[]}}async function eD(e,t,n){Z(t,"siteId");let r={displayName:n.displayName,singularName:n.singularName};n.slug&&(r.slug=n.slug);let o=await K(`${I}/v2/sites/${t}/collections`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)});if(!o.ok){let i=await St(o);throw o.status>=400&&o.status<500?new g(i,{isUserError:!0}):new g(`Failed to create collection: ${i}`)}return await o.json()}async function tD(e,t,n){Z(t,"collectionId");let r=await K(`${I}/v2/collections/${t}/fields`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({displayName:n.displayName,type:n.type,isRequired:n.isRequired??!1})});if(!r.ok){let o=await St(r);throw r.status===404?new g(`Collection "${t}" not found`,{isUserError:!0}):r.status>=400&&r.status<500?new g(o,{isUserError:!0}):new g(`Failed to create field: ${o}`)}return await r.json()}async function nD(e,t,n={}){Z(t,"collectionId");let r=new URLSearchParams;n.limit!=null&&r.set("limit",String(n.limit)),n.offset!=null&&r.set("offset",String(n.offset)),n.cmsLocaleId&&r.set("cmsLocaleId",n.cmsLocaleId);let o=r.toString()?`?${r.toString()}`:"",i=await K(`${I}/v2/collections/${t}/items${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(i.status===404)throw new g(`Collection "${t}" not found`,{isUserError:!0});if(!i.ok)throw new g(`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??n.limit??100,offset:s.offset??n.offset??0}}async function rD(e,t,n,r){Z(t,"collectionId"),Z(n,"itemId");let o=r?`?cmsLocaleId=${encodeURIComponent(r)}`:"",i=await K(`${I}/v2/collections/${t}/items/${n}${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(i.status===404)throw new g(`Item "${n}" not found`,{isUserError:!0});if(!i.ok)throw new g(`Failed to get item: ${await St(i)}`);return await i.json()}async function oD(e,t,n,r=!1){Z(t,"collectionId");let o=await K(`${I}/v2/collections/${t}/items`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:n,isDraft:r})});if(!o.ok){let i=await St(o);throw o.status>=400&&o.status<500?new g(i,{isUserError:!0}):new g(`Failed to create item: ${i}`)}return await o.json()}async function iD(e,t,n,r){Z(t,"collectionId"),Z(n,"itemId");let o=await K(`${I}/v2/collections/${t}/items/${n}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:r})});if(o.status===404)throw new g(`Item "${n}" not found`,{isUserError:!0});if(!o.ok)throw new g(`Failed to update item: ${await St(o)}`);return await o.json()}async function sD(e,t,n){Z(t,"collectionId"),Z(n,"itemId");let r=await K(`${I}/v2/collections/${t}/items/${n}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(r.status===404)throw new g(`Item "${n}" not found`,{isUserError:!0});if(!r.ok)throw new g(`Failed to delete item: ${await St(r)}`)}async function aD(e,t,n){Z(t,"collectionId"),n.forEach(o=>Z(o,"itemId"));let r=await K(`${I}/v2/collections/${t}/items/publish`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({itemIds:n})});if(!r.ok){let o=await St(r);throw r.status>=400&&r.status<500?new g(o,{isUserError:!0}):new g(`Failed to publish items: ${o}`)}return await r.json()}function lD(e,t=["id","displayName","slug"]){if(e.length===0)return E.dim("No collections found.");let n=["id","displayName","singularName","slug","lastUpdated"],r=Object.fromEntries(n.map(a=>[a.toLowerCase(),a])),o=t.map(a=>r[a.toLowerCase()]).filter(a=>a!=null);if(o.length===0)return E.red(`Invalid fields. Available: ${n.join(", ")}`);let i=o.map(a=>E.bold(a)),s=e.map(a=>o.map(l=>{let c=a[l];return c?l==="lastUpdated"?new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):c:E.dim("\u2014")}));return Ve(i,s)}function cD(e){let t=[`${E.bold("Collection:")} ${e.displayName}`,`${E.bold("ID:")} ${e.id}`,`${E.bold("Slug:")} ${e.slug}`,`${E.bold("Singular:")} ${e.singularName}`,`${E.bold("Updated:")} ${new Date(e.lastUpdated).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}`,"",E.bold("Fields:")];if(e.fields.length===0)return t.push(E.dim(" No fields defined.")),t.join(`
192
+ `);let n=["NAME","SLUG","TYPE","REQUIRED"].map(o=>E.bold(o)),r=e.fields.map(o=>[o.displayName,o.slug,o.type,o.isRequired?"yes":"no"]);return t.push(Ve(n,r)),t.join(`
193
+ `)}function uD(e,t=["id","isDraft","lastUpdated"]){if(e.length===0)return E.dim("No items found.");let n=t.map(o=>E.bold(o)),r=e.map(o=>t.map(i=>{if(i==="fieldData")return JSON.stringify(o.fieldData);if(i==="isDraft")return o.isDraft?E.yellow("draft"):E.green("live");if(i==="isArchived")return o.isArchived?E.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"}):E.dim("\u2014")}let s=o[i];return s==null?E.dim("\u2014"):String(s)}));return Ve(n,r)}function ua(e,t,n="asc"){return[...e].sort((r,o)=>{let i=r[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)),n==="desc"?-a:a})}var Ut=new Zu.Option("--json","Output as JSON"),ro=new Zu.Option("--dry-run","Preview without executing"),dD=e=>{let t=e.command("cms").description("Manage Webflow CMS content"),n=t.command("collections").description("Manage CMS collections");n.command("list").description("List all CMS collections for a site").addOption(Br).addOption(Ut).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 Y(),a=i.site;else{let{manifest:u}=Q(),p=await be(u);s=p.accessToken,a=p.siteId}let l=G.forCms({authToken:s,siteId:a}),c=Date.now();try{let u=await Xb(s,a);if(await l.sendUsage("cms_collections_list",{duration:Date.now()-c,count:u.length}),u.length===0){d.info("No collections found.");return}let p=["displayName","slug","lastUpdated"];if(p.includes(i.sortBy)||(d.warn(`Unknown --sort-by "${i.sortBy}". Valid fields: ${p.join(", ")}. Defaulting to displayName.`),i.sortBy="displayName"),!["asc","desc"].includes(i.order))throw new g(`Invalid --order "${i.order}". Valid values: asc, desc`,{isUserError:!0});let f=ua(u,i.sortBy,i.order);if(i.json){d.info(JSON.stringify(f,null,2));return}let m=i.fields.split(",").map(h=>h.trim());d.info(lD(f,m))}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_collections_list",{duration:Date.now()-c}),new g(u,{prefix:`${N} Failed to list collections:`})}}),n.command("get").description("Get details and field schema for a CMS collection").argument("<collectionId>","Collection ID").addOption(Ut).action(async(i,s)=>{let a=await Y(),l=G.forCms({authToken:a}),c=Date.now();try{let u=await Qb(a,i);if(await l.sendUsage("cms_collections_get",{duration:Date.now()-c}),s.json){d.info(JSON.stringify(u,null,2));return}d.info(cD(u))}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_collections_get",{duration:Date.now()-c}),new g(u,{prefix:`${N} Failed to get collection:`})}}),n.command("create").description("Create a new CMS collection on a site. Use --dry-run to preview.").addOption(Br).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(ro).addOption(Ut).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){d.info("Dry run \u2014 would create collection:"),d.info(JSON.stringify({displayName:i.name,singularName:s,slug:a},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let l,c;if(i.site)l=await Y(),c=i.site;else{let{manifest:f}=Q(),m=await be(f);l=m.accessToken,c=m.siteId}let u=G.forCms({authToken:l,siteId:c}),p=Date.now();try{let f=await eD(l,c,{displayName:i.name,singularName:s,slug:a});if(await u.sendUsage("cms_collections_create",{duration:Date.now()-p}),i.json){d.info(JSON.stringify(f,null,2));return}d.info(`${ee} Collection created: ${f.id}`),d.info(` Name: ${f.displayName}`),d.info(` Slug: ${f.slug}`),d.info(`
194
+ Next: add fields with "webflow cms fields create --collection ${f.id} --name <name> --type <type>"`)}catch(f){if(f instanceof g&&f.isUserError){d.info(`${N} ${f.message}`),process.exitCode=1;return}throw await u.sendError(f instanceof Error?f:new Error(String(f)),"cms_collections_create",{duration:Date.now()-p}),new g(f,{prefix:`${N} 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(ro).addOption(Ut).action(async i=>{if(i.dryRun){d.info("Dry run \u2014 would create field:"),d.info(JSON.stringify({collectionId:i.collection,displayName:i.name,type:i.type,isRequired:i.required??!1},null,2)),d.info("Dry run complete \u2014 no changes made.");return}let s=await Y(),a=G.forCms({authToken:s}),l=Date.now();try{let c=await tD(s,i.collection,{displayName:i.name,type:i.type,isRequired:i.required??!1});if(await a.sendUsage("cms_fields_create",{duration:Date.now()-l}),i.json){d.info(JSON.stringify(c,null,2));return}d.info(`${ee} Field created: ${c.id}`),d.info(` Name: ${c.displayName}`),d.info(` Type: ${c.type}`),d.info(` Slug: ${c.slug}`)}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_fields_create",{duration:Date.now()-l}),new g(c,{prefix:`${N} 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(Ut).option("--fields <fields>","Comma-separated fields to display (id, isDraft, isArchived, lastUpdated, fieldData)","id,isDraft,lastUpdated").action(async i=>{let s=await Y(),a=G.forCms({authToken:s}),l=Date.now(),c=parseInt(i.limit,10)||100,u=parseInt(i.offset,10)||0;try{let p=await nD(s,i.collection,{limit:c,offset:u,cmsLocaleId:i.locale});if(await a.sendUsage("cms_items_list",{duration:Date.now()-l,count:p.items.length}),p.items.length===0){d.info("No items found.");return}if(i.json){d.info(JSON.stringify(p,null,2));return}let f=i.fields.split(",").map(k=>k.trim());d.info(uD(p.items,f));let m=u+1,h=u+p.items.length;if(p.items.length>=c||u>0){let k=p.total>0?` of ${p.total}`:"";d.info(`
195
+ 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 rD(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 oD(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 iD(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 sD(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 aD(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 fD(e,t,n={}){if(Z(t,"siteId"),n.folderId){Z(n.folderId,"folderId");let a=await EA(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 mD(e,t,n,r,o){Z(t,"siteId"),o&&Z(o,"folderId");let i=Jc(n);FA(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 gD(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 EA(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 hD(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 yD(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 pD={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 FA(e,t){let n=e.split(".").pop()?.toLowerCase()??"",r=pD[n];if(!r){let o=Object.keys(pD).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 Ku=["id","displayName","originalFileName","contentType","size","lastUpdated"];function wD(e,t=["id","displayName","lastUpdated","size"]){if(e.length===0)return E.dim("No assets found.");let n=Object.fromEntries(Ku.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: ${Ku.join(", ")}`);let o=t.filter(l=>n[l.toLowerCase()]==null),i=o.length>0?E.yellow(`Warning: unknown field(s) ignored: ${o.join(", ")}. Available: ${Ku.join(", ")}
196
+ `):"",s=r.map(l=>E.bold(l)),a=e.map(l=>r.map(c=>{let u=l[c];if(u==null||c==="size"&&u===0)return E.dim("\u2014");if(c==="size")return SA(Number(u));if(c==="lastUpdated"){let f=new Date(String(u)),m=String(f.getMonth()+1).padStart(2,"0"),h=String(f.getDate()).padStart(2,"0"),v=String(f.getFullYear()).slice(-2),k=String(f.getHours()).padStart(2,"0"),T=String(f.getMinutes()).padStart(2,"0");return`${m}/${h}/${v} ${k}:${T}`}let p=String(u);return c==="displayName"&&p.length>40?E.dim("\u2026")+p.slice(-39):p}));return i+Ve(s,a)}function SA(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function bD(e){if(e.length===0)return E.dim("No folders found.");let t=[...e].sort((o,i)=>o.displayName.localeCompare(i.displayName)),n=["id","displayName","assets","lastUpdated"].map(o=>E.bold(o)),r=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 Ve(n,r)}var DD=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 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{assets:l,pagination:c}=await fD(o,i,{limit:r.limit,offset:r.offset,folderId:r.folder});if(await s.sendUsage("assets_list",{duration:Date.now()-a,count:l.length}),l.length===0){d.info("No assets found.");return}let u=["displayName","originalFileName","contentType","size","lastUpdated"];if(u.includes(r.sortBy)||(d.warn(`Unknown --sort-by "${r.sortBy}". Valid fields: ${u.join(", ")}. Defaulting to displayName.`),r.sortBy="displayName"),!["asc","desc"].includes(r.order))throw new g(`Invalid --order "${r.order}". Valid values: asc, desc`,{isUserError:!0});let p=ua(l,r.sortBy,r.order);if(r.json){d.info(JSON.stringify({assets:p,pagination:c},null,2));return}let f=r.fields.split(",").map(h=>h.trim());d.info(wD(p,f));let m=(r.offset??0)+l.length;m<c.total&&d.info(E.dim(`Showing ${m} of ${c.total} assets. Use --offset ${m} to see more.`))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_list",{duration:Date.now()-a}),new g(l,{prefix:`${N} Failed to list assets:`})}}),t.command("upload").description(`Upload a file as an asset. Use --dry-run to preview before uploading.
197
+ 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 mD(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 gD(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 hD(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(bD(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 yD(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 kD(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 xD(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 CD(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 ED(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 Yu=["id","displayName","shortName","lastPublished","lastUpdated","timeZone"],vD=Object.fromEntries(Yu.map(e=>[e.toLowerCase(),e]));function FD(e,t=["id","displayName","lastPublished"],{warn:n}={}){if(e.length===0)return E.dim("No sites found.");let r=t.map(a=>vD[a.toLowerCase()]).filter(a=>a!=null),o=t.filter(a=>vD[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==="lastPublished"||l==="lastUpdated"?new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):c:E.dim("\u2014")}));return Ve(i,s)}function SD(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 _D=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 xD(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(FD(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 kD(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 CD(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(SD(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 ED(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 jD=w(require("fs"));We();Be();J();te();Ce();_e();le();te();ht();te();async function Xu(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 TD(e,t){return Z(t,"siteId"),Xu(`${I}/v2/sites/${t}/forms`,e,"forms","Failed to list forms")}async function OD(e,t,n){return Z(t,"siteId"),Z(n,"formId"),Xu(`${I}/v2/sites/${t}/forms/${n}/submissions`,e,"formSubmissions","Failed to list submissions")}var Qu=["id","displayName","name","slug","createdOn","lastUpdated"],AD=Object.fromEntries(Qu.map(e=>[e.toLowerCase(),e]));function PD(e,t=["id","displayName","slug"],{warn:n}={}){if(e.length===0)return E.dim("No forms found.");let r=t.map(a=>AD[a.toLowerCase()]).filter(a=>a!=null),o=t.filter(a=>AD[a.toLowerCase()]==null);if(o.length>0&&n&&n(`Unknown field(s): ${o.join(", ")}. Available: ${Qu.join(", ")}`),r.length===0)throw new g(`No valid fields specified. Available: ${Qu.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 ID(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 RD(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(`
179
198
  `)?`"${s.replace(/"/g,'""')}"`:s};return[n.join(","),...e.map(i=>n.map(s=>r(s==="id"?i.id:s==="formId"?i.formId:s==="displayName"?i.displayName:s==="dateSubmitted"?i.dateSubmitted:i.formResponse[s])).join(","))].join(`
180
- `)}var Pw=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 n=>{let r=await Y(),o=J.forForms({authToken:r}),i=Date.now();try{let s=await _w(r,n.site);if(await o.sendUsage("forms_list",{duration:Date.now()-i,count:s.length}),n.json){d.info(JSON.stringify(s,null,2));return}if(s.length===0){d.info("No forms found.");return}let a=n.fields.split(",").map(l=>l.trim());d.info(Tw(s,a,{warn:l=>d.warn(l)}))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"forms_list",{duration:Date.now()-i}),new h(s,{prefix:`${L} 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 n=>{K(n.site,"siteId"),K(n.form,"formId"),n.output&&n.json&&d.warn("--json is ignored when --output is set.");let r=await Y(),o=J.forForms({authToken:r}),i=Date.now();try{let s=await Sw(r,n.site,n.form);if(await o.sendUsage("forms_submissions",{duration:Date.now()-i,count:s.length}),s.length===0){d.info("No submissions found.");return}if(n.output){let a=Ow(s);Iw.default.writeFileSync(n.output,a,"utf8"),d.info(`${ee} ${s.length} submission${s.length===1?"":"s"} written to ${n.output}`);return}if(n.json){d.info(JSON.stringify(s,null,2));return}d.info(Aw(s))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"forms_submissions",{duration:Date.now()-i}),new h(s,{prefix:`${L} Failed to fetch submissions:`})}})};var Rw=w(zo());function pu(e,t){t.forEach(n=>{e.addOption(n)}),e.commands.forEach(n=>pu(n,t))}function $w(e){let t=Rw.default.version;e.name("webflow").description("Webflow CLI").version(t,"-v, --version").addOption(Sc).addOption(Tc).addOption(Ac).addOption(Oc).showHelpAfterError(),e.hook("preAction",async n=>{let r=n.opts();r.input||cd(!0),yt.start(),r.manifest&&ud(r.manifest);try{await J.promptForConsentIfNeeded()}catch(o){d.debug(`Failed to check telemetry preference: ${o}`)}try{r.skipUpdateCheck||await new qr().prompt()}catch(o){d.debug(`Failed to check for package updates: ${o}`)}}),e.hook("postAction",async()=>{yt.displayGrouped(),yt.stop()}),Hd(e),lw(e),Ep(e),My(e),Jb(e),Ly(e),yw(e),Ew(e),Pw(e),Ry(e),e.commands.forEach(n=>{pu(n,[Sc,Tc,Ac,Oc])})}G();te();var Bw=new jw.Command;$w(Bw);Bw.parseAsync().catch(e=>{if(e instanceof h){if(!e.skipLogging)if(e.isUserError){let t=e.prefix?`${e.prefix} `:"";console.error(`${t}${e.message}`)}else d.error(e,{prefix:e.prefix})}else d.error(e);process.exit(1)});
199
+ `)}var $D=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 n=>{let r=await Y(),o=G.forForms({authToken:r}),i=Date.now();try{let s=await TD(r,n.site);if(await o.sendUsage("forms_list",{duration:Date.now()-i,count:s.length}),n.json){d.info(JSON.stringify(s,null,2));return}if(s.length===0){d.info("No forms found.");return}let a=n.fields.split(",").map(l=>l.trim());d.info(PD(s,a,{warn:l=>d.warn(l)}))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"forms_list",{duration:Date.now()-i}),new g(s,{prefix:`${N} 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 n=>{Z(n.site,"siteId"),Z(n.form,"formId"),n.output&&n.json&&d.warn("--json is ignored when --output is set.");let r=await Y(),o=G.forForms({authToken:r}),i=Date.now();try{let s=await OD(r,n.site,n.form);if(await o.sendUsage("forms_submissions",{duration:Date.now()-i,count:s.length}),s.length===0){d.info("No submissions found.");return}if(n.output){let a=RD(s);jD.default.writeFileSync(n.output,a,"utf8"),d.info(`${ee} ${s.length} submission${s.length===1?"":"s"} written to ${n.output}`);return}if(n.json){d.info(JSON.stringify(s,null,2));return}d.info(ID(s))}catch(s){throw await o.sendError(s instanceof Error?s:new Error(String(s)),"forms_submissions",{duration:Date.now()-i}),new g(s,{prefix:`${N} Failed to fetch submissions:`})}})};var BD=w(ki());function ed(e,t){t.forEach(n=>{e.addOption(n)}),e.commands.forEach(n=>ed(n,t))}function ND(e){let t=BD.default.version;e.name("webflow").description("Webflow CLI").version(t,"-v, --version").addOption(fu).addOption(mu).addOption(gu).addOption(hu).showHelpAfterError(),e.hook("preAction",async n=>{let r=n.opts();r.input||Xd(!0),Tt.start(),r.manifest&&Qd(r.manifest);try{await G.promptForConsentIfNeeded()}catch(o){d.debug(`Failed to check telemetry preference: ${o}`)}try{r.skipUpdateCheck||await new vo().prompt()}catch(o){d.debug(`Failed to check for package updates: ${o}`)}}),e.hook("postAction",async()=>{Tt.displayGrouped(),Tt.stop()}),Np(e),dD(e),hf(e),Tw(e),Kb(e),Aw(e),DD(e),_D(e),$D(e),Cw(e),e.commands.forEach(n=>{ed(n,[fu,mu,gu,hu])})}J();te();var MD=new LD.Command;ND(MD);MD.parseAsync().catch(e=>{if(e instanceof g){if(!e.skipLogging)if(e.isUserError){let t=e.prefix?`${e.prefix} `:"";console.error(`${t}${e.message}`)}else d.error(e,{prefix:e.prefix})}else d.error(e);process.exit(1)});
181
200
  //# sourceMappingURL=index.js.map