design-token-inspector
Version:
UI components built for inspecting design tokens in a live application
83 lines (75 loc) • 1.76 MB
JavaScript
(function(Mr,Sr){typeof exports=="object"&&typeof module<"u"?Sr(exports,require("react"),require("antd"),require("lodash"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","antd","lodash","react-dom"],Sr):(Mr=typeof globalThis<"u"?globalThis:Mr||self,Sr(Mr.index={},Mr.React,Mr.Antd,Mr.Lodash,Mr.ReactDOM))})(this,function(Mr,Sr,xr,Bo,bD){"use strict";var coe=Object.defineProperty;var FP=Mr=>{throw TypeError(Mr)};var poe=(Mr,Sr,xr)=>Sr in Mr?coe(Mr,Sr,{enumerable:!0,configurable:!0,writable:!0,value:xr}):Mr[Sr]=xr;var Ge=(Mr,Sr,xr)=>poe(Mr,typeof Sr!="symbol"?Sr+"":Sr,xr),W8=(Mr,Sr,xr)=>Sr.has(Mr)||FP("Cannot "+xr);var W=(Mr,Sr,xr)=>(W8(Mr,Sr,"read from private field"),xr?xr.call(Mr):Sr.get(Mr)),St=(Mr,Sr,xr)=>Sr.has(Mr)?FP("Cannot add the same private member more than once"):Sr instanceof WeakSet?Sr.add(Mr):Sr.set(Mr,xr),tt=(Mr,Sr,xr,Bo)=>(W8(Mr,Sr,"write to private field"),Bo?Bo.call(Mr,xr):Sr.set(Mr,xr),xr),mt=(Mr,Sr,xr)=>(W8(Mr,Sr,"access private method"),xr);var pD=(Mr,Sr,xr,Bo)=>({set _(bD){tt(Mr,Sr,bD,xr)},get _(){return W(Mr,Sr,Bo)}});var Gn,ci,mu,Cn,Jn,ml,Mc,yl,vo,Rc,pm,$c,NP,gl,pi,hD,H8,IP,Zk,Eo,Bf,eP,tP,Na,$s,Ia,Ba,Of,Lf,Xn,Oa,Wn,Dn,Pr,Xi,Us,Li,fi,La,hi,ja,Ma,qs,Ra,Dl,Yi,$t,K8,Uc,yu,fm,Js,BP,qc,jf,hm,Ol,Ll,V8,dD,mD,xn,G8,F0,jl,X8,Mf,rP,nP,iP,sP,aP,oP,uP,lP,cP,pP,fP,hP,dP,mP,yP,gP,DP,bP,xP,Qi,dm,mm,ym,gm,Dm,bm,xm,vm,Em,_m,wm,Am,Tm,Sm,Cm,Fm,km,Pm,bl,Jc,_o,gu,Du,bu,kr,Wc,xu,wo,yr,Y8,yD,k0,Q8,Z8,P0,gD,e_,t_,DD,OP,LP,jP,r_,Rf,$f,MP,zc,vP,Uf,qf,Nm,Im,EP,Yn,Ws,di,Hc,$a,Bm,xl,vl,El,Jf,Wf,zf,vu,Kc,la,mp,n_,_P;var xD=typeof document<"u"?document.currentScript:null;function WP(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Cs=WP(Sr);function zP(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var N0={exports:{}},_h={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var i_;function HP(){if(i_)return _h;i_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var l in i)l!=="key"&&(s[l]=i[l])}else s=i;return i=s.ref,{$$typeof:e,type:n,key:o,ref:i!==void 0?i:null,props:s}}return _h.Fragment=t,_h.jsx=r,_h.jsxs=r,_h}var wh={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var s_;function KP(){return s_||(s_=1,process.env.NODE_ENV!=="production"&&function(){function e(ne){if(ne==null)return null;if(typeof ne=="function")return ne.$$typeof===ie?null:ne.displayName||ne.name||null;if(typeof ne=="string")return ne;switch(ne){case D:return"Fragment";case E:return"Profiler";case T:return"StrictMode";case j:return"Suspense";case k:return"SuspenseList";case V:return"Activity"}if(typeof ne=="object")switch(typeof ne.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),ne.$$typeof){case w:return"Portal";case S:return(ne.displayName||"Context")+".Provider";case C:return(ne._context.displayName||"Context")+".Consumer";case F:var ue=ne.render;return ne=ne.displayName,ne||(ne=ue.displayName||ue.name||"",ne=ne!==""?"ForwardRef("+ne+")":"ForwardRef"),ne;case M:return ue=ne.displayName||null,ue!==null?ue:e(ne.type)||"Memo";case O:ue=ne._payload,ne=ne._init;try{return e(ne(ue))}catch{}}return null}function t(ne){return""+ne}function r(ne){try{t(ne);var ue=!1}catch{ue=!0}if(ue){ue=console;var K=ue.error,Z=typeof Symbol=="function"&&Symbol.toStringTag&&ne[Symbol.toStringTag]||ne.constructor.name||"Object";return K.call(ue,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Z),t(ne)}}function n(ne){if(ne===D)return"<>";if(typeof ne=="object"&&ne!==null&&ne.$$typeof===O)return"<...>";try{var ue=e(ne);return ue?"<"+ue+">":"<...>"}catch{return"<...>"}}function i(){var ne=te.A;return ne===null?null:ne.getOwner()}function s(){return Error("react-stack-top-frame")}function o(ne){if(Fe.call(ne,"key")){var ue=Object.getOwnPropertyDescriptor(ne,"key").get;if(ue&&ue.isReactWarning)return!1}return ne.key!==void 0}function l(ne,ue){function K(){Me||(Me=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ue))}K.isReactWarning=!0,Object.defineProperty(ne,"key",{get:K,configurable:!0})}function u(){var ne=e(this.type);return Ye[ne]||(Ye[ne]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),ne=this.props.ref,ne!==void 0?ne:null}function y(ne,ue,K,Z,oe,ke,de,se){return K=ke.ref,ne={$$typeof:_,type:ne,key:ue,props:ke,_owner:oe},(K!==void 0?K:null)!==null?Object.defineProperty(ne,"ref",{enumerable:!1,get:u}):Object.defineProperty(ne,"ref",{enumerable:!1,value:null}),ne._store={},Object.defineProperty(ne._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(ne,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(ne,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:de}),Object.defineProperty(ne,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(ne.props),Object.freeze(ne)),ne}function h(ne,ue,K,Z,oe,ke,de,se){var pe=ue.children;if(pe!==void 0)if(Z)if(Pe(pe)){for(Z=0;Z<pe.length;Z++)g(pe[Z]);Object.freeze&&Object.freeze(pe)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(pe);if(Fe.call(ue,"key")){pe=e(ne);var De=Object.keys(ue).filter(function(Be){return Be!=="key"});Z=0<De.length?"{key: someKey, "+De.join(": ..., ")+": ...}":"{key: someKey}",Se[pe+Z]||(De=0<De.length?"{"+De.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,Z,pe,De,pe),Se[pe+Z]=!0)}if(pe=null,K!==void 0&&(r(K),pe=""+K),o(ue)&&(r(ue.key),pe=""+ue.key),"key"in ue){K={};for(var ge in ue)ge!=="key"&&(K[ge]=ue[ge])}else K=ue;return pe&&l(K,typeof ne=="function"?ne.displayName||ne.name||"Unknown":ne),y(ne,pe,ke,oe,i(),K,de,se)}function g(ne){typeof ne=="object"&&ne!==null&&ne.$$typeof===_&&ne._store&&(ne._store.validated=1)}var x=Sr,_=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),S=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),ie=Symbol.for("react.client.reference"),te=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Fe=Object.prototype.hasOwnProperty,Pe=Array.isArray,Ae=console.createTask?console.createTask:function(){return null};x={"react-stack-bottom-frame":function(ne){return ne()}};var Me,Ye={},re=x["react-stack-bottom-frame"].bind(x,s)(),le=Ae(n(s)),Se={};wh.Fragment=D,wh.jsx=function(ne,ue,K,Z,oe){var ke=1e4>te.recentlyCreatedOwnerStacks++;return h(ne,ue,K,!1,Z,oe,ke?Error("react-stack-top-frame"):re,ke?Ae(n(ne)):le)},wh.jsxs=function(ne,ue,K,Z,oe){var ke=1e4>te.recentlyCreatedOwnerStacks++;return h(ne,ue,K,!0,Z,oe,ke?Error("react-stack-top-frame"):re,ke?Ae(n(ne)):le)}}()),wh}var a_;function VP(){return a_||(a_=1,process.env.NODE_ENV==="production"?N0.exports=HP():N0.exports=KP()),N0.exports}var _r=VP();const o_=Sr.createContext({});var vD={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/var u_;function GP(){return u_||(u_=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var s="",o=0;o<arguments.length;o++){var l=arguments[o];l&&(s=i(s,n(l)))}return s}function n(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return r.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var l in s)t.call(s,l)&&s[l]&&(o=i(o,l));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(vD)),vD.exports}var XP=GP();const YP=zP(XP),QP={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},ei=Math.round;function ED(e,t){const r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=t(n[i]||0,r[i]||"",i);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const l_=(e,t,r)=>r===0?e:e/100;function Ah(e,t){const r=t||255;return e>r?r:e<0?0:e}class yp{constructor(t){Ge(this,"isValid",!0);Ge(this,"r",0);Ge(this,"g",0);Ge(this,"b",0);Ge(this,"a",1);Ge(this,"_h");Ge(this,"_s");Ge(this,"_l");Ge(this,"_v");Ge(this,"_max");Ge(this,"_min");Ge(this,"_brightness");function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let i=function(s){return n.startsWith(s)};const n=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(n))this.fromHexString(n);else if(i("rgb"))this.fromRgbString(n);else if(i("hsl"))this.fromHslString(n);else if(i("hsv")||i("hsb"))this.fromHsvString(n);else{const s=QP[n.toLowerCase()];s&&this.fromHexString(parseInt(s,36).toString(16).padStart(6,"0"))}}else if(t instanceof yp)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Ah(t.r),this.g=Ah(t.g),this.b=Ah(t.b),this.a=typeof t.a=="number"?Ah(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(s){const o=s/255;return o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)}const r=t(this.r),n=t(this.g),i=t(this.b);return .2126*r+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=ei(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:r,s:n,l:i,a:this.a})}lighten(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:r,s:n,l:i,a:this.a})}mix(t,r=50){const n=this._c(t),i=r/100,s=l=>(n[l]-this[l])*i+this[l],o={r:ei(s("r")),g:ei(s("g")),b:ei(s("b")),a:ei(s("a")*100)/100};return this._c(o)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),n=this.a+r.a*(1-this.a),i=s=>ei((this[s]*this.a+r[s]*r.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const s=ei(this.a*255).toString(16);t+=s.length===2?s:"0"+s}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=ei(this.getSaturation()*100),n=ei(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){const i=this.clone();return i[t]=Ah(r,n),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const r=t.replace("#","");function n(i,s){return parseInt(r[i]+r[s||i],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:i}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof i=="number"?i:1,r<=0){const x=ei(n*255);this.r=x,this.g=x,this.b=x}let s=0,o=0,l=0;const u=t/60,y=(1-Math.abs(2*n-1))*r,h=y*(1-Math.abs(u%2-1));u>=0&&u<1?(s=y,o=h):u>=1&&u<2?(s=h,o=y):u>=2&&u<3?(o=y,l=h):u>=3&&u<4?(o=h,l=y):u>=4&&u<5?(s=h,l=y):u>=5&&u<6&&(s=y,l=h);const g=n-y/2;this.r=ei((s+g)*255),this.g=ei((o+g)*255),this.b=ei((l+g)*255)}fromHsv({h:t,s:r,v:n,a:i}){this._h=t%360,this._s=r,this._v=n,this.a=typeof i=="number"?i:1;const s=ei(n*255);if(this.r=s,this.g=s,this.b=s,r<=0)return;const o=t/60,l=Math.floor(o),u=o-l,y=ei(n*(1-r)*255),h=ei(n*(1-r*u)*255),g=ei(n*(1-r*(1-u))*255);switch(l){case 0:this.g=g,this.b=y;break;case 1:this.r=h,this.b=y;break;case 2:this.r=y,this.b=g;break;case 3:this.r=y,this.g=h;break;case 4:this.r=g,this.g=y;break;case 5:default:this.g=y,this.b=h;break}}fromHsvString(t){const r=ED(t,l_);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=ED(t,l_);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=ED(t,(n,i)=>i.includes("%")?ei(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}const I0=2,c_=.16,ZP=.05,eN=.05,tN=.15,p_=5,f_=4,rN=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function h_(e,t,r){let n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-I0*t:Math.round(e.h)+I0*t:n=r?Math.round(e.h)+I0*t:Math.round(e.h)-I0*t,n<0?n+=360:n>=360&&(n-=360),n}function d_(e,t,r){if(e.h===0&&e.s===0)return e.s;let n;return r?n=e.s-c_*t:t===f_?n=e.s+c_:n=e.s+ZP*t,n>1&&(n=1),r&&t===p_&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function m_(e,t,r){let n;return r?n=e.v+eN*t:n=e.v-tN*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function nN(e,t={}){const r=[],n=new yp(e),i=n.toHsv();for(let s=p_;s>0;s-=1){const o=new yp({h:h_(i,s,!0),s:d_(i,s,!0),v:m_(i,s,!0)});r.push(o)}r.push(n);for(let s=1;s<=f_;s+=1){const o=new yp({h:h_(i,s),s:d_(i,s),v:m_(i,s)});r.push(o)}return t.theme==="dark"?rN.map(({index:s,amount:o})=>new yp(t.backgroundColor||"#141414").mix(r[s],o).toHexString()):r.map(s=>s.toHexString())}const _D=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];_D.primary=_D[5];function iN(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function sN(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}const y_="data-rc-order",g_="data-rc-priority",aN="rc-util-key",wD=new Map;function D_({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:aN}function AD(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function oN(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function TD(e){return Array.from((wD.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function b_(e,t={}){if(!iN())return null;const{csp:r,prepend:n,priority:i=0}=t,s=oN(n),o=s==="prependQueue",l=document.createElement("style");l.setAttribute(y_,s),o&&i&&l.setAttribute(g_,`${i}`),r!=null&&r.nonce&&(l.nonce=r==null?void 0:r.nonce),l.innerHTML=e;const u=AD(t),{firstChild:y}=u;if(n){if(o){const h=(t.styles||TD(u)).filter(g=>{if(!["prepend","prependQueue"].includes(g.getAttribute(y_)))return!1;const x=Number(g.getAttribute(g_)||0);return i>=x});if(h.length)return u.insertBefore(l,h[h.length-1].nextSibling),l}u.insertBefore(l,y)}else u.appendChild(l);return l}function uN(e,t={}){let{styles:r}=t;return r||(r=TD(AD(t))),r.find(n=>n.getAttribute(D_(t))===e)}function lN(e,t){const r=wD.get(e);if(!r||!sN(document,r)){const n=b_("",t),{parentNode:i}=n;wD.set(e,i),e.removeChild(n)}}function cN(e,t,r={}){var u,y,h;const n=AD(r),i=TD(n),s={...r,styles:i};lN(n,s);const o=uN(t,s);if(o)return(u=s.csp)!=null&&u.nonce&&o.nonce!==((y=s.csp)==null?void 0:y.nonce)&&(o.nonce=(h=s.csp)==null?void 0:h.nonce),o.innerHTML!==e&&(o.innerHTML=e),o;const l=b_(e,s);return l.setAttribute(D_(s),t),l}function x_(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function pN(e){return x_(e)instanceof ShadowRoot}function fN(e){return pN(e)?x_(e):null}let SD={};const CD=[],hN=e=>{CD.push(e)};function dN(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const r=CD.reduce((n,i)=>i(n??"","warning"),t);r&&console.error(`Warning: ${r}`)}}function mN(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const r=CD.reduce((n,i)=>i(n??"","note"),t);r&&console.warn(`Note: ${r}`)}}function yN(){SD={}}function v_(e,t,r){!t&&!SD[r]&&(e(!1,r),SD[r]=!0)}function B0(e,t){v_(dN,e,t)}function gN(e,t){v_(mN,e,t)}B0.preMessage=hN,B0.resetWarned=yN,B0.noteOnce=gN;function DN(e){return e.replace(/-(.)/g,(t,r)=>r.toUpperCase())}function bN(e,t){B0(e,`[@ant-design/icons] ${t}`)}function E_(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function __(e={}){return Object.keys(e).reduce((t,r)=>{const n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[DN(r)]=n}return t},{})}function FD(e,t,r){return r?Sr.createElement(e.tag,{key:t,...__(e.attrs),...r},(e.children||[]).map((n,i)=>FD(n,`${t}-${e.tag}-${i}`))):Sr.createElement(e.tag,{key:t,...__(e.attrs)},(e.children||[]).map((n,i)=>FD(n,`${t}-${e.tag}-${i}`)))}function w_(e){return nN(e)[0]}function A_(e){return e?Array.isArray(e)?e:[e]:[]}const xN=`
.anticon {
display: inline-flex;
align-items: center;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.125em;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticon > * {
line-height: 1;
}
.anticon svg {
display: inline-block;
}
.anticon::before {
display: none;
}
.anticon .anticon-icon {
display: block;
}
.anticon[tabindex] {
cursor: pointer;
}
.anticon-spin::before,
.anticon-spin {
display: inline-block;
-webkit-animation: loadingCircle 1s infinite linear;
animation: loadingCircle 1s infinite linear;
}
@-webkit-keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
`,vN=e=>{const{csp:t,prefixCls:r,layer:n}=Sr.useContext(o_);let i=xN;r&&(i=i.replace(/anticon/g,r)),n&&(i=`@layer ${n} {
${i}
}`),Sr.useEffect(()=>{const s=e.current,o=fN(s);cN(i,"@ant-design-icons",{prepend:!n,csp:t,attachTo:o})},[])},Th={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function EN({primaryColor:e,secondaryColor:t}){Th.primaryColor=e,Th.secondaryColor=t||w_(e),Th.calculated=!!t}function _N(){return{...Th}}const gp=e=>{const{icon:t,className:r,onClick:n,style:i,primaryColor:s,secondaryColor:o,...l}=e,u=Cs.useRef();let y=Th;if(s&&(y={primaryColor:s,secondaryColor:o||w_(s)}),vN(u),bN(E_(t),`icon should be icon definiton, but got ${t}`),!E_(t))return null;let h=t;return h&&typeof h.icon=="function"&&(h={...h,icon:h.icon(y.primaryColor,y.secondaryColor)}),FD(h.icon,`svg-${h.name}`,{className:r,onClick:n,style:i,"data-icon":h.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...l,ref:u})};gp.displayName="IconReact",gp.getTwoToneColors=_N,gp.setTwoToneColors=EN;function T_(e){const[t,r]=A_(e);return gp.setTwoToneColors({primaryColor:t,secondaryColor:r})}function wN(){const e=gp.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function kD(){return kD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kD.apply(this,arguments)}T_(_D.primary);const Ml=Cs.forwardRef((e,t)=>{const{className:r,icon:n,spin:i,rotate:s,tabIndex:o,onClick:l,twoToneColor:u,...y}=e,{prefixCls:h="anticon",rootClassName:g}=Cs.useContext(o_),x=YP(g,h,{[`${h}-${n.name}`]:!!n.name,[`${h}-spin`]:!!i||n.name==="loading"},r);let _=o;_===void 0&&l&&(_=-1);const w=s?{msTransform:`rotate(${s}deg)`,transform:`rotate(${s}deg)`}:void 0,[D,T]=A_(u);return Cs.createElement("span",kD({role:"img","aria-label":n.name},y,{ref:t,tabIndex:_,onClick:l,className:x}),Cs.createElement(gp,{icon:n,primaryColor:D,secondaryColor:T,style:w}))});Ml.displayName="AntdIcon",Ml.getTwoToneColor=wN,Ml.setTwoToneColor=T_;var AN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};function PD(){return PD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},PD.apply(this,arguments)}const TN=(e,t)=>Cs.createElement(Ml,PD({},e,{ref:t,icon:AN})),S_=Cs.forwardRef(TN);process.env.NODE_ENV!=="production"&&(S_.displayName="DownOutlined");var SN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function ND(){return ND=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ND.apply(this,arguments)}const CN=(e,t)=>Cs.createElement(Ml,ND({},e,{ref:t,icon:SN})),C_=Cs.forwardRef(CN);process.env.NODE_ENV!=="production"&&(C_.displayName="LeftOutlined");var FN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function ID(){return ID=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ID.apply(this,arguments)}const kN=(e,t)=>Cs.createElement(Ml,ID({},e,{ref:t,icon:FN})),F_=Cs.forwardRef(kN);process.env.NODE_ENV!=="production"&&(F_.displayName="RightOutlined");var PN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};function BD(){return BD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},BD.apply(this,arguments)}const NN=(e,t)=>Cs.createElement(Ml,BD({},e,{ref:t,icon:PN})),k_=Cs.forwardRef(NN);process.env.NODE_ENV!=="production"&&(k_.displayName="UpOutlined");const IN=e=>{const t=document.styleSheets,r=[];let n=0;for(const i in t){const s=t[i].cssRules;for(const o in s){const l=s[o];(e.matches(l.selectorText)||e.closest(l.selectorText))&&(r.push({rule:l,indexInStylesheet:n}),n+=1)}}return r},BN=({rule:e,indexInStylesheet:t})=>{if(!e.cssText||!e.cssText.includes("var("))return null;const r=/([\w-]+)\s*:\s*var\((--[\w-]+)\)/g,n=[...e.cssText.matchAll(r)].map(i=>({property:i[1],variableName:i[2]}));return{rule:e,indexInStylesheet:t,variables:n,selectors:e.selectorText.split(",")}},ON=(e,t)=>{const r=document.querySelector(t);return r?getComputedStyle(r).getPropertyValue(e):""},LN=(e,t)=>{const r=[];for(const n of e.variables)for(const i of e.selectors)if(t.matches(i)||t.closest(i)){const s=ON(n.variableName,i);r.push({name:n.variableName,value:s,property:n.property,selector:{text:i,index:e.indexInStylesheet}})}return r};function jN(e){const t=(e.match(/#/g)||[]).length,r=(e.match(/\.[\w-]+/g)||[]).length,n=(e.match(/\[[^\]]+\]/g)||[]).length,i=(e.match(/:(?!:)[^(\s]+/g)||[]).length,s=(e.match(/(^|[\s>+~])\w+/g)||[]).length,o=(e.match(/::[^\s]+/g)||[]).length;return t*100+(r+n+i)*10+(s+o)*1}const MN=(e,t)=>{const r=[],n=getComputedStyle(t),i=Bo.groupBy(e,"property");for(const[s,o]of Object.entries(i)){let l=o;if(s.startsWith("--")||n.getPropertyValue(s)==""||(l=l.filter(g=>!g.selector.text.includes(":")),l.length===0))continue;const h=l.map(g=>({...g,specificity:jN(g.selector.text)})).sort(function(g,x){return g.specificity-x.specificity===0?x.selector.index-g.selector.index:x.specificity-g.specificity}).map(g=>Bo.omit(g,"specificity"))[0];r.push(h)}return r},RN=e=>{const t=[],r=Bo.groupBy(e,"name");for(const[n,i]of Object.entries(r)){const s=i.reduce((o,l)=>(o.value=l.value,o.property=o.property&&o.property!==l.property?`${o.property}, ${l.property}`:l.property,o),{name:n,value:"",property:"",selector:{text:"",index:0}});t.push(s)}return t},$N=e=>{const r=IN(e).map(BN).filter(o=>o!==null).flat();if(r.length<=0)return[];const n=r.flatMap(o=>LN(o,e)),i=MN(n,e);return RN(i)},UN=({name:e,defaultValue:t,onChange:r})=>{const n=xr.Form.useFormInstance(),i=xr.Form.useWatch(e,{form:n,preserve:!0}),s=h=>{const g=parseFloat(h.replace(/^[^\d.-]+/,"")),x=h.replace(/^[\d.-]+/,"").trim();return{value:g,suffix:x}},{value:o,suffix:l}=s(i||t),{value:u}=s(t),y=h=>{if(h===null)return;const g=`${h}${l||""}`;i!==g&&n.setFieldValue(e,g),r&&r(e,g)};return _r.jsxs(xr.Row,{children:[_r.jsx(xr.Col,{span:14,children:_r.jsx(xr.Slider,{min:u/2,max:u*2,step:(u*2-u/2)/100,value:o,onChange:y})}),_r.jsx(xr.Col,{span:10,children:_r.jsx(xr.InputNumber,{style:{margin:"0 16px"},addonAfter:l,value:o,onChange:y})})]})},qN=(e,t,r)=>_r.jsx(xr.Form.Item,{name:t,initialValue:r,noStyle:!0,children:e}),JN=(e,t)=>{const{value:r}=e;let n=null;if(typeof r=="string")if(r.startsWith("#")||r.startsWith("rgb"))n=_r.jsx(xr.ColorPicker,{showText:!0,size:"small"});else{if(!isNaN(parseFloat(r))||r.endsWith("px")||r.endsWith("em")||r.endsWith("rem")||r.endsWith("vh")||r.endsWith("vw"))return _r.jsx(UN,{defaultValue:r,name:e.name,onChange:t});n=_r.jsx(xr.Input,{defaultValue:r})}else typeof r=="number"&&(n=_r.jsx(xr.InputNumber,{}));return qN(n,e.name,r)},{Text:WN}=xr.Typography,zN=(e,t=!1,r)=>{const n=_r.jsxs(_r.Fragment,{children:["(used in ",_r.jsx(WN,{strong:!0,children:e.property}),")"]});return _r.jsxs("div",{children:[e.formattedName??e.name,":"," ",t&&r?_r.jsxs(_r.Fragment,{children:[n," ",_r.jsx("br",{}),JN(e,r)]}):_r.jsxs(_r.Fragment,{children:[_r.jsx("code",{children:e.value})," ",n]})]})},OD=(e,t)=>{document.documentElement.style.setProperty(e,t)},{Text:HN}=xr.Typography,KN=()=>{const[e,t]=Sr.useState(null),[r,n]=Sr.useState(!1),[i,s]=Sr.useState(!1),[o]=xr.Form.useForm(),l=h=>{for(const[g,x]of Object.entries(h)){if(typeof x=="object"&&"toCssString"in x){OD(g,x.toCssString());continue}OD(g,x)}},u=()=>{s(!1),n(!1)},y=h=>{if(!h)return _r.jsx("h4",{children:"No target selected "});try{const g=h.tagName,x=$N(h);return _r.jsxs(_r.Fragment,{children:[_r.jsx(HN,{strong:!0,children:Bo.lowerCase(g)}),_r.jsxs(xr.Form,{form:o,name:"variableValues",onValuesChange:l,onFinish:u,style:i?{display:"flex",flexDirection:"column",gap:"2px"}:{},children:[x.map(_=>zN(_,i,(w,D)=>{OD(w,D)})),_r.jsx("br",{}),_r.jsx(xr.Flex,{gap:8,children:i?_r.jsx(xr.Form.Item,{noStyle:!0,children:_r.jsx(xr.Button,{color:"cyan",variant:"solid",size:"small",htmlType:"submit",children:"Save"})}):null})]}),r?bD.createPortal(_r.jsx("div",{className:"frozen-indicator"}),document.body):null]})}catch(g){console.log(g)}};return Sr.useEffect(()=>{e&&(r?e.classList.add("token-details__selected-target--frozen"):e.classList.remove("token-details__selected-target--frozen"))},[e,r]),Sr.useEffect(()=>{const h=w=>{if(w.target instanceof HTMLElement&&!(w.target.matches(".tokenInspector *")||w.target.matches("#unfreeze-button *"))){if(w.preventDefault(),w.stopPropagation(),r){if(w.target.matches(".token-details__selected-target")){n(!1),u();return}return}n(!0),s(!0)}},g=(w,D,T)=>{T||(w&&w.classList.remove("token-details__selected-target"),D&&(D.classList.add("token-details__selected-target"),document.querySelectorAll(".token-details__selected-target").forEach(E=>{E!==D&&E.classList.remove("token-details__selected-target")}),t(D)))},x=w=>{const D=w.target;D&&!D.matches(".tokenInspector")&&!D.matches(".tokenInspector *")&&g(e,D,r)},_=w=>{const D=w.target;D&&!D.matches(".tokenInspector")&&!D.matches(".tokenInspector *")&&g(e,null,r)};return document.addEventListener("mouseover",x),document.addEventListener("mouseout",_),document.addEventListener("click",h),()=>{document.removeEventListener("mouseover",x),document.removeEventListener("mouseout",_),document.removeEventListener("click",h)}},[r,e]),y(e)},LD=()=>{var e;return typeof window=="object"?((e=window.navigator.userAgentData)==null?void 0:e.platform)==="Windows"||window.navigator.userAgent.includes("Windows"):(process==null?void 0:process.platform)==="win32"},VN=65,GN=97,XN=90,YN=122,Sh=46,Oo=47,P_=92,O0=58;LD();function jD(e,t="and"){switch(e.length){case 0:return"";case 1:return`${e[0]}`;case 2:return`${e[0]} ${t} ${e[1]}`;case 3:return`${e[0]}, ${e[1]}, ${t} ${e[2]}`;default:return`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}}const QN=["string","function","number","object","Function","Object","boolean","bigint","symbol"],ZN=/^[A-Z][a-zA-Z0-9]*$/;function eI(e,t,r){Array.isArray(t)||(t=[t]);let n="The ";if(e.endsWith(" argument"))n+=`${e} `;else{const l=e.includes(".")?"property":"argument";n+=`"${e}" ${l} `}n+="must be ";const i=[],s=[],o=[];for(const l of t)QN.includes(l)?i.push(l.toLowerCase()):ZN.exec(l)!==null?s.push(l):o.push(l);if(s.length>0){const l=i.indexOf("object");l!==-1&&(i.splice(l,1),s.push("Object"))}return i.length>0&&(n+=`${i.length>1?"one of type":"of type"} ${jD(i,"or")}`,(s.length>0||o.length>0)&&(n+=" or ")),s.length>0&&(n+=`an instance of ${jD(s,"or")}`,o.length>0&&(n+=" or ")),o.length>0&&(o.length>1?n+=`one of ${jD(o,"or")}`:(o[0].toLowerCase()!==o[0]&&(n+="an "),n+=`${o[0]}`)),n+=`. Received ${typeof r}`,n}class Dp extends Error{constructor(t,r,n){const i=eI(t,r,n);super(i),this.name="ERR_INVALID_ARG_TYPE"}}const N_=0,tI=1,rI=2,nI=4,iI=(e,t,r=N_)=>{if(r===N_){if(e===null||Array.isArray(e))throw new Dp(t,"Object",e);if(typeof e!="object")throw new Dp(t,"Object",e)}else{if((tI&r)===0&&e===null)throw new Dp(t,"Object",e);if((rI&r)===0&&Array.isArray(e))throw new Dp(t,"Object",e);const s=(nI&r)===0,o=typeof e;if(o!=="object"&&(s||o!=="function"))throw new Dp(t,"Object",e)}},Ka=(e,t)=>{if(typeof e!="string")throw new Dp(t,"string",e)};typeof window=="object"&&(window.process||(window.process={}),window.process.cwd=()=>"/");const sI=LD();function nn(e){return e===Oo||e===P_}function MD(e){return e===Oo}function L0(e){return e>=VN&&e<=XN||e>=GN&&e<=YN}function j0(e,t,r,n){let i="",s=0,o=-1,l=0,u=0;for(let y=0;y<=e.length;++y){if(y<e.length)u=e.charCodeAt(y);else{if(n(u))break;u=Oo}if(n(u)){if(!(o===y-1||l===1))if(l===2){if(i.length<2||s!==2||i.charCodeAt(i.length-1)!==Sh||i.charCodeAt(i.length-2)!==Sh){if(i.length>2){const h=i.lastIndexOf(r);h===-1?(i="",s=0):(i=i.slice(0,h),s=i.length-1-i.lastIndexOf(r)),o=y,l=0;continue}else if(i.length!==0){i="",s=0,o=y,l=0;continue}}t&&(i+=i.length>0?`${r}..`:"..",s=2)}else i.length>0?i+=`${r}${e.slice(o+1,y)}`:i=e.slice(o+1,y),s=y-o-1;o=y,l=0}else u===Sh&&l!==-1?++l:l=-1}return i}function aI(e){return e?`${e[0]==="."?"":"."}${e}`:""}function I_(e,t){iI(t,"pathObject");const r=t.dir||t.root,n=t.base||`${t.name||""}${aI(t.ext)}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}function oI(...e){let t="",r="",n=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],Ka(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=process.cwd():(s=(process==null?void 0:process.env[`=${t}`])||process.cwd(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===P_)&&(s=`${t}\\`));const o=s.length;let l=0,u="",y=!1;const h=s.charCodeAt(0);if(o===1)nn(h)&&(l=1,y=!0);else if(nn(h))if(y=!0,nn(s.charCodeAt(1))){let g=2,x=g;for(;g<o&&!nn(s.charCodeAt(g));)g++;if(g<o&&g!==x){const _=s.slice(x,g);for(x=g;g<o&&nn(s.charCodeAt(g));)g++;if(g<o&&g!==x){for(x=g;g<o&&!nn(s.charCodeAt(g));)g++;(g===o||g!==x)&&(u=`\\\\${_}\\${s.slice(x,g)}`,l=g)}}}else l=1;else L0(h)&&s.charCodeAt(1)===O0&&(u=s.slice(0,2),l=2,o>2&&nn(s.charCodeAt(2))&&(y=!0,l=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(r=`${s.slice(l)}\\${r}`,n=y,y&&t.length>0)break}return r=j0(r,!n,"\\",nn),n?`${t}\\${r}`:`${t}${r}`||"."}function uI(e){Ka(e,"path");const t=e.length;if(t===0)return".";let r=0,n,i=!1;const s=e.charCodeAt(0);if(t===1)return MD(s)?"\\":e;if(nn(s))if(i=!0,nn(e.charCodeAt(1))){let l=2,u=l;for(;l<t&&!nn(e.charCodeAt(l));)l++;if(l<t&&l!==u){const y=e.slice(u,l);for(u=l;l<t&&nn(e.charCodeAt(l));)l++;if(l<t&&l!==u){for(u=l;l<t&&!nn(e.charCodeAt(l));)l++;if(l===t)return`\\\\${y}\\${e.slice(u)}\\`;l!==u&&(n=`\\\\${y}\\${e.slice(u,l)}`,r=l)}}}else r=1;else L0(s)&&e.charCodeAt(1)===O0&&(n=e.slice(0,2),r=2,t>2&&nn(e.charCodeAt(2))&&(i=!0,r=3));let o=r<t?j0(e.slice(r),!i,"\\",nn):"";return o.length===0&&!i&&(o="."),o.length>0&&nn(e.charCodeAt(t-1))&&(o+="\\"),n===void 0?i?`\\${o}`:o:i?`${n}\\${o}`:`${n}${o}`}function lI(...e){if(e.length===0)return".";let t,r;for(let s=0;s<e.length;++s){const o=e[s];Ka(o,"path"),o.length>0&&(t===void 0?t=r=o:t+=`\\${o}`)}if(t===void 0)return".";let n=!0,i=0;if(r!==void 0&&nn(r.charCodeAt(0))){++i;const s=r.length;s>1&&nn(r.charCodeAt(1))&&(++i,s>2&&(nn(r.charCodeAt(2))?++i:n=!1))}if(n){for(;i<t.length&&nn(t.charCodeAt(i));)i++;i>=2&&(t=`\\${t.slice(i)}`)}return uI(t)}function cI(e){Ka(e,"path");const t=e.length;if(t===0)return".";let r=-1,n=0;const i=e.charCodeAt(0);if(t===1)return nn(i)?e:".";if(nn(i)){if(r=n=1,nn(e.charCodeAt(1))){let l=2,u=l;for(;l<t&&!nn(e.charCodeAt(l));)l++;if(l<t&&l!==u){for(u=l;l<t&&nn(e.charCodeAt(l));)l++;if(l<t&&l!==u){for(u=l;l<t&&!nn(e.charCodeAt(l));)l++;if(l===t)return e;l!==u&&(r=n=l+1)}}}}else L0(i)&&e.charCodeAt(1)===O0&&(r=t>2&&nn(e.charCodeAt(2))?3:2,n=r);let s=-1,o=!0;for(let l=t-1;l>=n;--l)if(nn(e.charCodeAt(l))){if(!o){s=l;break}}else o=!1;if(s===-1){if(r===-1)return".";s=r}return e.slice(0,s)}function pI(e){Ka(e,"path");let t=0,r=-1,n=0,i=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===O0&&L0(e.charCodeAt(0))&&(t=n=2);for(let l=e.length-1;l>=t;--l){const u=e.charCodeAt(l);if(nn(u)){if(!s){n=l+1;break}continue}i===-1&&(s=!1,i=l+1),u===Sh?r===-1?r=l:o!==1&&(o=1):r!==-1&&(o=-1)}return r===-1||i===-1||o===0||o===1&&r===i-1&&r===n+1?"":e.slice(r,i)}I_.bind(null,"\\");const fI=(()=>{if(sI){const e=/\\/g;return()=>{const t=process.cwd().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>process.cwd()})();function hI(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:fI();Ka(i,`paths[${n}]`),i.length!==0&&(t=`${i}/${t}`,r=i.charCodeAt(0)===Oo)}return t=j0(t,!r,"/",MD),r?`/${t}`:t.length>0?t:"."}function dI(e){if(Ka(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===Oo,r=e.charCodeAt(e.length-1)===Oo;return e=j0(e,!t,"/",MD),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)}function mI(...e){if(e.length===0)return".";let t;for(let r=0;r<e.length;++r){const n=e[r];Ka(n,"path"),n.length>0&&(t===void 0?t=n:t+=`/${n}`)}return t===void 0?".":dI(t)}function yI(e){if(Ka(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===Oo;let r=-1,n=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===Oo){if(!n){r=i;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)}function gI(e){Ka(e,"path");let t=-1,r=0,n=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){const l=e.charCodeAt(o);if(l===Oo){if(!i){r=o+1;break}continue}n===-1&&(i=!1,n=o+1),l===Sh?t===-1?t=o:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===r+1?"":e.slice(t,n)}I_.bind(null,"/");const RD=LD(),DI=RD?lI:mI,B_=RD?cI:yI,$D=RD?pI:gI;var or={},Va,Ga;function UD(){throw new Error("setTimeout has not been defined")}function qD(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Va=setTimeout:Va=UD}catch{Va=UD}try{typeof clearTimeout=="function"?Ga=clearTimeout:Ga=qD}catch{Ga=qD}})();function O_(e){if(Va===setTimeout)return setTimeout(e,0);if((Va===UD||!Va)&&setTimeout)return Va=setTimeout,setTimeout(e,0);try{return Va(e,0)}catch{try{return Va.call(null,e,0)}catch{return Va.call(this,e,0)}}}function bI(e){if(Ga===clearTimeout)return clearTimeout(e);if((Ga===qD||!Ga)&&clearTimeout)return Ga=clearTimeout,clearTimeout(e);try{return Ga(e)}catch{try{return Ga.call(null,e)}catch{return Ga.call(this,e)}}}var Lo=[],bp=!1,Rl,M0=-1;function xI(){!bp||!Rl||(bp=!1,Rl.length?Lo=Rl.concat(Lo):M0=-1,Lo.length&&L_())}function L_(){if(!bp){var e=O_(xI);bp=!0;for(var t=Lo.length;t;){for(Rl=Lo,Lo=[];++M0<t;)Rl&&Rl[M0].run();M0=-1,t=Lo.length}Rl=null,bp=!1,bI(e)}}or.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Lo.push(new j_(e,t)),Lo.length===1&&!bp&&O_(L_)};function j_(e,t){this.fun=e,this.array=t}j_.prototype.run=function(){this.fun.apply(null,this.array)},or.title="browser",or.browser=!0,or.env={},or.argv=[],or.version="",or.versions={};function jo(){}or.on=jo,or.addListener=jo,or.once=jo,or.off=jo,or.removeListener=jo,or.removeAllListeners=jo,or.emit=jo,or.prependListener=jo,or.prependOnceListener=jo,or.listeners=function(e){return[]},or.binding=function(e){throw new Error("process.binding is not supported")},or.cwd=function(){return"/"},or.chdir=function(e){throw new Error("process.chdir is not supported")},or.umask=function(){return 0};var vI=Object.create,R0=Object.defineProperty,EI=Object.getOwnPropertyDescriptor,JD=Object.getOwnPropertyNames,_I=Object.getPrototypeOf,wI=Object.prototype.hasOwnProperty,AI=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),TI=(e,t)=>function(){return e&&(t=(0,e[JD(e)[0]])(e=0)),t},bt=(e,t)=>function(){return t||(0,e[JD(e)[0]])((t={exports:{}}).exports,t),t.exports},SI=(e,t)=>{for(var r in t)R0(e,r,{get:t[r],enumerable:!0})},M_=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of JD(t))!wI.call(e,i)&&i!==r&&R0(e,i,{get:()=>t[i],enumerable:!(n=EI(t,i))||n.enumerable});return e},CI=(e,t,r)=>(r=e!=null?vI(_I(e)):{},M_(R0(r,"default",{value:e,enumerable:!0}),e)),FI=e=>M_(R0({},"__esModule",{value:!0}),e),$l=bt({"node_modules/memfs/lib/constants.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.constants=void 0,e.constants={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:64,O_EXCL:128,O_NOCTTY:256,O_TRUNC:512,O_APPEND:1024,O_DIRECTORY:65536,O_NOATIME:262144,O_NOFOLLOW:131072,O_SYNC:1052672,O_SYMLINK:2097152,O_DIRECT:16384,O_NONBLOCK:2048,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,UV_FS_COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,COPYFILE_EXCL:1,COPYFILE_FICLONE:2,COPYFILE_FICLONE_FORCE:4}}}),WD=bt({"node_modules/memfs/lib/Stats.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stats=void 0;var t=$l(),{S_IFMT:r,S_IFDIR:n,S_IFREG:i,S_IFBLK:s,S_IFCHR:o,S_IFLNK:l,S_IFIFO:u,S_IFSOCK:y}=t.constants,h=class kP{static build(x,_=!1){const w=new kP,{uid:D,gid:T,atime:E,mtime:C,ctime:S}=x,F=_?k=>BigInt(k):k=>k;w.uid=F(D),w.gid=F(T),w.rdev=F(x.rdev),w.blksize=F(4096),w.ino=F(x.ino),w.size=F(x.getSize()),w.blocks=F(1),w.atime=E,w.mtime=C,w.ctime=S,w.birthtime=S,w.atimeMs=F(E.getTime()),w.mtimeMs=F(C.getTime());const j=F(S.getTime());if(w.ctimeMs=j,w.birthtimeMs=j,_){w.atimeNs=BigInt(E.getTime())*BigInt(1e6),w.mtimeNs=BigInt(C.getTime())*BigInt(1e6);const k=BigInt(S.getTime())*BigInt(1e6);w.ctimeNs=k,w.birthtimeNs=k}return w.dev=F(0),w.mode=F(x.mode),w.nlink=F(x.nlink),w}_checkModeProperty(x){return(Number(this.mode)&r)===x}isDirectory(){return this._checkModeProperty(n)}isFile(){return this._checkModeProperty(i)}isBlockDevice(){return this._checkModeProperty(s)}isCharacterDevice(){return this._checkModeProperty(o)}isSymbolicLink(){return this._checkModeProperty(l)}isFIFO(){return this._checkModeProperty(u)}isSocket(){return this._checkModeProperty(y)}};e.Stats=h,e.default=h}}),kI=bt({"node_modules/base64-js/index.js"(e){e.byteLength=u,e.toByteArray=h,e.fromByteArray=_;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(s=0,o=i.length;s<o;++s)t[s]=i[s],r[i.charCodeAt(s)]=s;var s,o;r[45]=62,r[95]=63;function l(w){var D=w.length;if(D%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var T=w.indexOf("=");T===-1&&(T=D);var E=T===D?0:4-T%4;return[T,E]}function u(w){var D=l(w),T=D[0],E=D[1];return(T+E)*3/4-E}function y(w,D,T){return(D+T)*3/4-T}function h(w){var D,T=l(w),E=T[0],C=T[1],S=new n(y(w,E,C)),F=0,j=C>0?E-4:E,k;for(k=0;k<j;k+=4)D=r[w.charCodeAt(k)]<<18|r[w.charCodeAt(k+1)]<<12|r[w.charCodeAt(k+2)]<<6|r[w.charCodeAt(k+3)],S[F++]=D>>16&255,S[F++]=D>>8&255,S[F++]=D&255;return C===2&&(D=r[w.charCodeAt(k)]<<2|r[w.charCodeAt(k+1)]>>4,S[F++]=D&255),C===1&&(D=r[w.charCodeAt(k)]<<10|r[w.charCodeAt(k+1)]<<4|r[w.charCodeAt(k+2)]>>2,S[F++]=D>>8&255,S[F++]=D&255),S}function g(w){return t[w>>18&63]+t[w>>12&63]+t[w>>6&63]+t[w&63]}function x(w,D,T){for(var E,C=[],S=D;S<T;S+=3)E=(w[S]<<16&16711680)+(w[S+1]<<8&65280)+(w[S+2]&255),C.push(g(E));return C.join("")}function _(w){for(var D,T=w.length,E=T%3,C=[],S=16383,F=0,j=T-E;F<j;F+=S)C.push(x(w,F,F+S>j?j:F+S));return E===1?(D=w[T-1],C.push(t[D>>2]+t[D<<4&63]+"==")):E===2&&(D=(w[T-2]<<8)+w[T-1],C.push(t[D>>10]+t[D>>4&63]+t[D<<2&63]+"=")),C.join("")}}}),PI=bt({"node_modules/ieee754/index.js"(e){e.read=function(t,r,n,i,s){var o,l,u=s*8-i-1,y=(1<<u)-1,h=y>>1,g=-7,x=n?s-1:0,_=n?-1:1,w=t[r+x];for(x+=_,o=w&(1<<-g)-1,w>>=-g,g+=u;g>0;o=o*256+t[r+x],x+=_,g-=8);for(l=o&(1<<-g)-1,o>>=-g,g+=i;g>0;l=l*256+t[r+x],x+=_,g-=8);if(o===0)o=1-h;else{if(o===y)return l?NaN:(w?-1:1)*(1/0);l=l+Math.pow(2,i),o=o-h}return(w?-1:1)*l*Math.pow(2,o-i)},e.write=function(t,r,n,i,s,o){var l,u,y,h=o*8-s-1,g=(1<<h)-1,x=g>>1,_=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=i?0:o-1,D=i?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,l=g):(l=Math.floor(Math.log(r)/Math.LN2),r*(y=Math.pow(2,-l))<1&&(l--,y*=2),l+x>=1?r+=_/y:r+=_*Math.pow(2,1-x),r*y>=2&&(l++,y/=2),l+x>=g?(u=0,l=g):l+x>=1?(u=(r*y-1)*Math.pow(2,s),l=l+x):(u=r*Math.pow(2,x-1)*Math.pow(2,s),l=0));s>=8;t[n+w]=u&255,w+=D,u/=256,s-=8);for(l=l<<s|u,h+=s;h>0;t[n+w]=l&255,w+=D,l/=256,h-=8);t[n+w-D]|=T*128}}}),NI=bt({"node_modules/buffer/index.js"(e){var t=kI(),r=PI(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=C,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,l.TYPED_ARRAY_SUPPORT=s(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const N=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(N,m),N.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function o(N){if(N>i)throw new RangeError('The value "'+N+'" is invalid for option "size"');const m=new Uint8Array(N);return Object.setPrototypeOf(m,l.prototype),m}function l(N,m,b){if(typeof N=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(N)}return u(N,m,b)}l.poolSize=8192;function u(N,m,b){if(typeof N=="string")return x(N,m);if(ArrayBuffer.isView(N))return w(N);if(N==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof N);if(Yt(N,ArrayBuffer)||N&&Yt(N.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Yt(N,SharedArrayBuffer)||N&&Yt(N.buffer,SharedArrayBuffer)))return D(N,m,b);if(typeof N=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const R=N.valueOf&&N.valueOf();if(R!=null&&R!==N)return l.from(R,m,b);const z=T(N);if(z)return z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof N[Symbol.toPrimitive]=="function")return l.from(N[Symbol.toPrimitive]("string"),m,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer