@stlite/desktop 0.66.0 → 0.67.1
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/bin/dump_artifacts.js +1 -1
- package/build/asset-manifest.json +41 -38
- package/build/index.html +1 -1
- package/build/static/js/1001.b6744dec.chunk.js +1 -0
- package/build/static/js/1046.52decb2e.chunk.js +1 -0
- package/build/static/js/1189.ab8bacef.chunk.js +1 -0
- package/build/static/js/{1261.15eb6eb4.chunk.js → 1261.b566da4d.chunk.js} +1 -1
- package/build/static/js/{144.ab9b4469.chunk.js → 144.9ec5bd27.chunk.js} +1 -1
- package/build/static/js/1740.23a03bbe.chunk.js +1 -0
- package/build/static/js/241.e65eeb7b.chunk.js +1 -0
- package/build/static/js/2448.285a20d7.chunk.js +1 -0
- package/build/static/js/{2450.d2094d4f.chunk.js → 2450.3fbfa728.chunk.js} +1 -1
- package/build/static/js/2664.fcbdd10d.chunk.js +1 -0
- package/build/static/js/{2873.3a5dcb34.chunk.js → 2873.b29b2eeb.chunk.js} +1 -1
- package/build/static/js/2940.4e6caf5c.chunk.js +1 -0
- package/build/static/js/3849.3df70f1e.chunk.js +2 -0
- package/build/static/js/4482.a589131e.chunk.js +17 -0
- package/build/static/js/{4494.23456267.chunk.js → 4494.6e8d3b6e.chunk.js} +1 -1
- package/build/static/js/4724.917b0590.chunk.js +5 -0
- package/build/static/js/{4785.4ad0def4.chunk.js → 4785.98dbde84.chunk.js} +1 -1
- package/build/static/js/4831.0fbd4ca7.chunk.js +5 -0
- package/build/static/js/5299.b77de2fc.chunk.js +9 -0
- package/build/static/js/{6134.c33ca2c8.chunk.js → 6134.bdbf7672.chunk.js} +1 -1
- package/build/static/js/6463.cd216036.chunk.js +2 -0
- package/build/static/js/6463.cd216036.chunk.js.LICENSE.txt +1 -0
- package/build/static/js/6944.444c0fa6.chunk.js +1 -0
- package/build/static/js/{698.13ad7058.chunk.js → 698.0dd9747b.chunk.js} +1 -1
- package/build/static/js/7463.04979eb1.chunk.js +1 -0
- package/build/static/js/7579.b7954b39.chunk.js +1 -0
- package/build/static/js/7696.05d95d4d.chunk.js +1 -0
- package/build/static/js/7809.e90cb7d7.chunk.js +1 -0
- package/build/static/js/7866.47855e8c.chunk.js +2 -0
- package/build/static/js/8186.e2b282ee.chunk.js +2 -0
- package/build/static/js/8801.534f3181.chunk.js +1 -0
- package/build/static/js/8853.35db34e3.chunk.js +5 -0
- package/build/static/js/9005.980d0bb3.chunk.js +5 -0
- package/build/static/js/973.df151fda.chunk.js +1 -0
- package/build/static/js/9813.a08c138f.chunk.js +1 -0
- package/build/static/js/9846.9ae3ba57.chunk.js +1 -0
- package/build/static/js/main.099ed3b9.js +28 -0
- package/package.json +5 -5
- package/wheels/stlite_lib-0.1.0-py3-none-any.whl +0 -0
- package/wheels/streamlit-1.39.0-cp312-none-any.whl +0 -0
- package/build/static/js/1046.b35a30bb.chunk.js +0 -1
- package/build/static/js/1122.826a4d4a.chunk.js +0 -1
- package/build/static/js/1189.cfab8e1b.chunk.js +0 -1
- package/build/static/js/1740.94292e1e.chunk.js +0 -1
- package/build/static/js/188.76c35a12.chunk.js +0 -1
- package/build/static/js/2448.7421fffc.chunk.js +0 -1
- package/build/static/js/2664.826d28ff.chunk.js +0 -1
- package/build/static/js/2940.febd403d.chunk.js +0 -1
- package/build/static/js/4482.83141a76.chunk.js +0 -17
- package/build/static/js/4724.bece40dd.chunk.js +0 -5
- package/build/static/js/4831.c90232de.chunk.js +0 -5
- package/build/static/js/5299.e46d6a7b.chunk.js +0 -9
- package/build/static/js/6463.d6201add.chunk.js +0 -2
- package/build/static/js/6463.d6201add.chunk.js.LICENSE.txt +0 -1
- package/build/static/js/6944.41de199c.chunk.js +0 -1
- package/build/static/js/7579.7586a966.chunk.js +0 -1
- package/build/static/js/7696.d4742d64.chunk.js +0 -1
- package/build/static/js/8097.f846eb83.chunk.js +0 -2
- package/build/static/js/8186.711bca96.chunk.js +0 -2
- package/build/static/js/8801.f029b6c3.chunk.js +0 -1
- package/build/static/js/8853.2cc975d3.chunk.js +0 -5
- package/build/static/js/9005.b52b87da.chunk.js +0 -5
- package/build/static/js/9813.a3f195fe.chunk.js +0 -1
- package/build/static/js/9846.309b75be.chunk.js +0 -1
- package/build/static/js/989.d6cd1f50.chunk.js +0 -2
- package/build/static/js/main.eec824c7.js +0 -28
- package/wheels/streamlit-1.38.0-cp312-none-any.whl +0 -0
- /package/build/static/css/{188.da3ff442.chunk.css → 7463.da3ff442.chunk.css} +0 -0
- /package/build/static/css/{989.1edfa457.chunk.css → 7866.1edfa457.chunk.css} +0 -0
- /package/build/static/js/{8097.f846eb83.chunk.js.LICENSE.txt → 3849.3df70f1e.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{989.d6cd1f50.chunk.js.LICENSE.txt → 7866.47855e8c.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{8186.711bca96.chunk.js.LICENSE.txt → 8186.e2b282ee.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.eec824c7.js.LICENSE.txt → main.099ed3b9.js.LICENSE.txt} +0 -0
package/bin/dump_artifacts.js
CHANGED
|
@@ -33,7 +33,7 @@ ${_}`),y.pop(),`{${k}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";
|
|
|
33
33
|
`).filter(e=>!e.startsWith("#")).map(e=>e.replace(L_,"")).map(e=>e.trim()).filter(e=>e!=="")}Xn.parseRequirementsTxt=j_});var tp=w(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.PromiseDelegate=void 0;var Co=class{promise;resolveInternal;rejectInternal;constructor(){this.promise=new Promise((e,r)=>{this.resolveInternal=e,this.rejectInternal=r})}resolve(e){this.resolveInternal(e)}reject(e){this.rejectInternal(e)}};es.PromiseDelegate=Co});var rp=w(at=>{"use strict";var N_=at&&at.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),Lo=at&&at.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&N_(e,t,r)};Object.defineProperty(at,"__esModule",{value:!0});Lo(Xd(),at);Lo(ep(),at);Lo(tp(),at)});var op=w((IR,ap)=>{"use strict";ap.exports=np;function np(t,e,r){t instanceof RegExp&&(t=ip(t,r)),e instanceof RegExp&&(e=ip(e,r));var i=sp(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function ip(t,e){var r=e.match(t);return r?r[0]:null}np.range=sp;function sp(t,e,r){var i,n,s,a,o,l=r.indexOf(t),u=r.indexOf(e,l+1),h=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;h>=0&&!o;)h==l?(i.push(h),l=r.indexOf(t,h+1)):i.length==1?o=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,a=u),u=r.indexOf(e,h+1)),h=l<u&&l>=0?l:u;i.length&&(o=[s,a])}return o}});var gp=w(($R,pp)=>{var lp=op();pp.exports=$_;var up="\0SLASH"+Math.random()+"\0",fp="\0OPEN"+Math.random()+"\0",No="\0CLOSE"+Math.random()+"\0",hp="\0COMMA"+Math.random()+"\0",cp="\0PERIOD"+Math.random()+"\0";function jo(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function F_(t){return t.split("\\\\").join(up).split("\\{").join(fp).split("\\}").join(No).split("\\,").join(hp).split("\\.").join(cp)}function I_(t){return t.split(up).join("\\").split(fp).join("{").split(No).join("}").split(hp).join(",").split(cp).join(".")}function dp(t){if(!t)return[""];var e=[],r=lp("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var o=dp(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function $_(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),fi(F_(t),!0).map(I_)):[]}function W_(t){return"{"+t+"}"}function B_(t){return/^-?0\d/.test(t)}function U_(t,e){return t<=e}function z_(t,e){return t>=e}function fi(t,e){var r=[],i=lp("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?fi(i.post,!1):[""];if(/\$$/.test(i.pre))for(var a=0;a<s.length;a++){var o=n+"{"+i.body+"}"+s[a];r.push(o)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),h=l||u,p=i.body.indexOf(",")>=0;if(!h&&!p)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+No+i.post,fi(t)):[t];var c;if(h)c=i.body.split(/\.\./);else if(c=dp(i.body),c.length===1&&(c=fi(c[0],!1).map(W_),c.length===1))return s.map(function(te){return i.pre+c[0]+te});var f;if(h){var y=jo(c[0]),b=jo(c[1]),S=Math.max(c[0].length,c[1].length),_=c.length==3?Math.abs(jo(c[2])):1,x=U_,R=b<y;R&&(_*=-1,x=z_);var O=c.some(B_);f=[];for(var k=y;x(k,b);k+=_){var D;if(u)D=String.fromCharCode(k),D==="\\"&&(D="");else if(D=String(k),O){var F=S-D.length;if(F>0){var N=new Array(F+1).join("0");k<0?D="-"+N+D.slice(1):D=N+D}}f.push(D)}}else{f=[];for(var B=0;B<c.length;B++)f.push.apply(f,fi(c[B],!1))}for(var B=0;B<f.length;B++)for(var a=0;a<s.length;a++){var o=n+f[B]+s[a];(!e||h||o)&&r.push(o)}}return r}});var ig=pe(require("yargs")),ng=require("yargs/helpers"),ce=pe(require("node:path")),ut=pe(require("node:fs/promises")),tl=pe(require("fs-extra")),Oi=require("pyodide");var zd=pe(require("node:path")),Hd=pe(require("node:fs/promises"));var xt=pe(Ud()),I=xt.createLogger({transports:[new xt.transports.Console({format:xt.format.combine(xt.format.splat(),xt.format.cli())})]});function ui(t){process.emitWarning(t,{type:"DeprecationWarning"})}var Kn=class{sourceUrl;isRemote;_data=null;constructor(e){e.startsWith("file://")&&(e=e.slice(7)),this.sourceUrl=e,this.isRemote=e.includes("://")}async readJson(e){let r=zd.default.join(this.sourceUrl,e);if(this.isRemote){I.debug(`Fetching ${r}`);let i=await fetch(r);if(!i.ok)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);return await i.json()}else{I.debug(`Reading ${r}`);let i=await Hd.default.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;I.info("Load pyodide-lock.json");let e=await this.readJson("pyodide-lock.json");return this._data=e.packages,e.packages}async getPackageInfoByName(e){let r=await this.loadPrebuiltPackageData(),i=Object.values(r).find(n=>n.name===e);if(i==null)throw new Error(`Package ${e} is not found in the lock file.`);return i}};var Vd=pe(require("node:fs/promises")),Kd=pe(Zn());var X=pe(Zn()),Yd=X.object({entrypoint:X.string(),embed:X.defaulted(X.boolean(),!1),idbfsMountpoints:X.optional(X.array(X.string())),nodeJsWorker:X.defaulted(X.boolean(),!1),nodefsMountpoints:X.optional(X.record(X.string(),X.string()))});function R_(t){let e=Kd.mask(t??{},Yd);if(e.nodeJsWorker){if(e.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(e.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return e}async function Jd(t){let e=R_({...t.packageJsonStliteDesktopField,...t.fallbacks});I.info("App manifest: %j",e);let r=JSON.stringify(e,null,2);I.info(`Dump the manifest file -> ${t.manifestFilePath}`),await Vd.default.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var Zd=pe(require("node:path")),fe=pe(Zn());async function Qd(t){let{files:e,entrypoint:r}=x_(t),i=await T_(t),n=await O_(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function x_(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){ui("Missing `stlite.desktop.files` and `stlite.desktop.entrypoint` in `package.json`. Falling back to the `appHomeDirSource` argument to determine the app directory. Please update your `package.json` as this fallback is deprecated and will be removed in a future release.");let s=r;if(typeof s!="string")throw new Error("The `appHomeDirSource` argument is required when `stlite.desktop.files` and `stlite.desktop.entrypoint` are not found in the package.json. Note that `appHomeDirSource` is deprecated and will be removed in the future, so please specify `stlite.desktop.files` and `stlite.desktop.entrypoint` in the package.json.");i=[s],n=`./${s}/streamlit_app.py`}else r!=null&&ui("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return fe.assert(n,fe.string(),"The `stlite.desktop.entrypoint` field must be a string."),fe.assert(i,fe.array(fe.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function T_(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;fe.assert(i,fe.optional(fe.array(fe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(ui("The `packages` argument is deprecated and will be removed in a future release. Use `stlite.desktop.dependencies` in your `package.json` instead."),n=r),[...i??[],...n]}async function O_(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;fe.assert(n,fe.optional(fe.array(fe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(o=>Zd.default.resolve(e,o)),a=[];return i!=null&&i.length>0&&(ui("The `requirement` argument is deprecated and will be removed in a future release. Use `stlite.desktop.requirementsTxtFiles` in your `package.json` instead."),a=i),[...s??[],...a]}var _s=pe(rp());var Ep=pe(gp(),1);var hi=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var H_={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ci=t=>t.replace(/[[\]\\-]/g,"\\$&"),G_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),mp=t=>t.join(""),yp=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],s=r+1,a=!1,o=!1,l=!1,u=!1,h=r,p="";e:for(;s<t.length;){let b=t.charAt(s);if((b==="!"||b==="^")&&s===r+1){u=!0,s++;continue}if(b==="]"&&a&&!l){h=s+1;break}if(a=!0,b==="\\"&&!l){l=!0,s++;continue}if(b==="["&&!l){for(let[S,[_,x,R]]of Object.entries(H_))if(t.startsWith(S,s)){if(p)return["$.",!1,t.length-r,!0];s+=S.length,R?n.push(_):i.push(_),o=o||x;continue e}}if(l=!1,p){b>p?i.push(ci(p)+"-"+ci(b)):b===p&&i.push(ci(b)),p="",s++;continue}if(t.startsWith("-]",s+1)){i.push(ci(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){p=b,s+=2;continue}i.push(ci(b)),s++}if(h<s)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,t.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let b=i[0].length===2?i[0].slice(-1):i[0];return[G_(b),!1,h-r,!1]}let c="["+(u?"^":"")+mp(i)+"]",f="["+(u?"":"^")+mp(n)+"]";return[i.length&&n.length?"("+c+"|"+f+")":i.length?c:f,o,h-r,!0]};var We=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Y_=new Set(["!","?","+","*","@"]),bp=t=>Y_.has(t),V_="(?!(?:^|/)\\.\\.?(?:$|/))",ts="(?!\\.)",K_=new Set(["[","."]),J_=new Set(["..","."]),Z_=new Set("().*{}+?[]^$\\!"),Q_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Fo="[^/]",wp=Fo+"*?",vp=Fo+"+?",br=class t{type;#e;#r;#s=!1;#i=[];#o;#u;#h;#l=!1;#a;#t;#g=!1;constructor(e,r,i={}){this.type=e,e&&(this.#r=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#h=this.#e===this?[]:this.#e.#h,e==="!"&&!this.#e.#l&&this.#h.push(this),this.#u=this.#o?this.#o.#i.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#t!==void 0?this.#t:this.type?this.#t=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#t=this.#i.map(e=>String(e)).join("")}#y(){if(this!==this.#e)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let e;for(;e=this.#h.pop();){if(e.type!=="!")continue;let r=e,i=r.#o;for(;i;){for(let n=r.#u+1;!i.type&&n<i.#i.length;n++)for(let s of e.#i){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(i.#i[n])}r=i,i=r.#o}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#o===this))throw new Error("invalid part: "+r);this.#i.push(r)}}toJSON(){let e=this.type===null?this.#i.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#i.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#l&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#u===0)return!0;let e=this.#o;for(let r=0;r<this.#u;r++){let i=e.#i[r];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#i.length:0;return this.#u===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let i of this.#i)r.copyIn(i);return r}static#d(e,r,i,n){let s=!1,a=!1,o=-1,l=!1;if(r.type===null){let f=i,y="";for(;f<e.length;){let b=e.charAt(f++);if(s||b==="\\"){s=!s,y+=b;continue}if(a){f===o+1?(b==="^"||b==="!")&&(l=!0):b==="]"&&!(f===o+2&&l)&&(a=!1),y+=b;continue}else if(b==="["){a=!0,o=f,l=!1,y+=b;continue}if(!n.noext&&bp(b)&&e.charAt(f)==="("){r.push(y),y="";let S=new t(b,r);f=t.#d(e,S,f,n),r.push(S);continue}y+=b}return r.push(y),f}let u=i+1,h=new t(null,r),p=[],c="";for(;u<e.length;){let f=e.charAt(u++);if(s||f==="\\"){s=!s,c+=f;continue}if(a){u===o+1?(f==="^"||f==="!")&&(l=!0):f==="]"&&!(u===o+2&&l)&&(a=!1),c+=f;continue}else if(f==="["){a=!0,o=u,l=!1,c+=f;continue}if(bp(f)&&e.charAt(u)==="("){h.push(c),c="";let y=new t(f,h);h.push(y),u=t.#d(e,y,u,n);continue}if(f==="|"){h.push(c),c="",p.push(h),h=new t(null,r);continue}if(f===")")return c===""&&r.#i.length===0&&(r.#g=!0),h.push(c),c="",r.push(...p,h),u;c+=f}return r.type=null,r.#r=void 0,r.#i=[e.substring(i-1)],u}static fromGlob(e,r={}){let i=new t(null,void 0,r);return t.#d(e,i,0,r),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,i,n,s]=this.toRegExpSource();if(!(n||this.#r||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let o=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}toRegExpSource(e){let r=e??!!this.#a.dot;if(this.#e===this&&this.#y(),!this.type){let l=this.isStart()&&this.isEnd(),u=this.#i.map(f=>{let[y,b,S,_]=typeof f=="string"?t.#v(f,this.#r,l):f.toRegExpSource(e);return this.#r=this.#r||S,this.#s=this.#s||_,y}).join(""),h="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&J_.has(this.#i[0]))){let y=K_,b=r&&y.has(u.charAt(0))||u.startsWith("\\.")&&y.has(u.charAt(2))||u.startsWith("\\.\\.")&&y.has(u.charAt(4)),S=!r&&!e&&y.has(u.charAt(0));h=b?V_:S?ts:""}let p="";return this.isEnd()&&this.#e.#l&&this.#o?.type==="!"&&(p="(?:$|\\/)"),[h+u+p,We(u),this.#r=!!this.#r,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#c(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString();return this.#i=[l],this.type=null,this.#r=void 0,[l,We(this.toString()),!1,!1]}let a=!i||e||r||!ts?"":this.#c(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let o="";if(this.type==="!"&&this.#g)o=(this.isStart()&&!r?ts:"")+vp;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?ts:"")+wp+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=n+s+l}return[o,We(s),this.#r=!!this.#r,this.#s]}#c(e){return this.#i.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,s,a]=r.toRegExpSource(e);return this.#s=this.#s||a,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#v(e,r,i=!1){let n=!1,s="",a=!1;for(let o=0;o<e.length;o++){let l=e.charAt(o);if(n){n=!1,s+=(Z_.has(l)?"\\":"")+l;continue}if(l==="\\"){o===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,h,p,c]=yp(e,o);if(p){s+=u,a=a||h,o+=p-1,r=r||c;continue}}if(l==="*"){i&&e==="*"?s+=vp:s+=wp,r=!0;continue}if(l==="?"){s+=Fo,r=!0;continue}s+=Q_(l)}return[s,We(e),!!r,a]}};var wr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var _e=(t,e,r={})=>(hi(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Ae(e,r).match(t)),X_=/^\*+([^+@!?\*\[\(]*)$/,eS=t=>e=>!e.startsWith(".")&&e.endsWith(t),tS=t=>e=>e.endsWith(t),rS=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),iS=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),nS=/^\*+\.\*+$/,sS=t=>!t.startsWith(".")&&t.includes("."),aS=t=>t!=="."&&t!==".."&&t.includes("."),oS=/^\.\*+$/,lS=t=>t!=="."&&t!==".."&&t.startsWith("."),uS=/^\*+$/,fS=t=>t.length!==0&&!t.startsWith("."),hS=t=>t.length!==0&&t!=="."&&t!=="..",cS=/^\?+([^+@!?\*\[\(]*)?$/,dS=([t,e=""])=>{let r=Rp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},pS=([t,e=""])=>{let r=xp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},gS=([t,e=""])=>{let r=xp([t]);return e?i=>r(i)&&i.endsWith(e):r},mS=([t,e=""])=>{let r=Rp([t]);return e?i=>r(i)&&i.endsWith(e):r},Rp=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},xp=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},Tp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",_p={win32:{sep:"\\"},posix:{sep:"/"}},yS=Tp==="win32"?_p.win32.sep:_p.posix.sep;_e.sep=yS;var he=Symbol("globstar **");_e.GLOBSTAR=he;var bS="[^/]",wS=bS+"*?",vS="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",_S="(?:(?!(?:\\/|^)\\.).)*?",SS=(t,e={})=>r=>_e(r,t,e);_e.filter=SS;var Le=(t,e={})=>Object.assign({},t,e),ES=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return _e;let e=_e;return Object.assign((i,n,s={})=>e(i,n,Le(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,Le(t,s))}static defaults(n){return e.defaults(Le(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,a={}){super(n,s,Le(t,a))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Le(t,s))}},unescape:(i,n={})=>e.unescape(i,Le(t,n)),escape:(i,n={})=>e.escape(i,Le(t,n)),filter:(i,n={})=>e.filter(i,Le(t,n)),defaults:i=>e.defaults(Le(t,i)),makeRe:(i,n={})=>e.makeRe(i,Le(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,Le(t,n)),match:(i,n,s={})=>e.match(i,n,Le(t,s)),sep:e.sep,GLOBSTAR:he})};_e.defaults=ES;var Op=(t,e={})=>(hi(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Ep.default)(t));_e.braceExpand=Op;var RS=(t,e={})=>new Ae(t,e).makeRe();_e.makeRe=RS;var xS=(t,e,r={})=>{let i=new Ae(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};_e.match=xS;var Sp=/[?*]|[+@!]\(.*?\)|\[|\]/,TS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ae=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){hi(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||Tp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((s,a,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Sp.test(s[2]))&&!Sp.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(h=>this.parse(h))];if(u)return[s[0],...s.slice(1).map(h=>this.parse(h))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let n=0;n<e[i].length;n++)e[i][n]==="**"&&(e[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((i,n)=>{let s=i[i.length-1];return n==="**"&&s==="**"?i:n===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let s=e[n];n===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let n=e[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,e.splice(i-1,2),i-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let i of e){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let a=n;for(;i[a+1]==="**";)a++;a>n&&i.splice(n+1,a-n);let o=i[n+1],l=i[n+2],u=i[n+3];if(o!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;r=!0,i.splice(n,1);let h=i.slice(0);h[n]="**",e.push(h),n--}if(!this.preserveMultipleSlashes){for(let a=1;a<i.length-1;a++){let o=i[a];a===1&&o===""&&i[0]===""||(o==="."||o==="")&&(r=!0,i.splice(a,1),a--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let s=0;for(;(s=i.indexOf("..",s+1))!==-1;){let a=i[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let l=s===1&&i[s+1]==="**"?["."]:[];i.splice(s-1,2,...l),i.length===0&&i.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let i=r+1;i<e.length;i++){let n=this.partsMatch(e[r],e[i],!this.preserveMultipleSlashes);n&&(e[r]=n,e[i]=[])}return e.filter(r=>r.length)}partsMatch(e,r,i=!1){let n=0,s=0,a=[],o="";for(;n<e.length&&s<r.length;)if(e[n]===r[s])a.push(o==="b"?r[s]:e[n]),n++,s++;else if(i&&e[n]==="**"&&r[s]===e[n+1])a.push(e[n]),n++;else if(i&&r[s]==="**"&&e[n]===r[s+1])a.push(r[s]),s++;else if(e[n]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(o==="b")return!1;o="a",a.push(e[n]),n++,s++}else if(r[s]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(o==="a")return!1;o="b",a.push(r[s]),n++,s++}else return!1;return e.length===r.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i=!1){let n=this.options;if(this.isWindows){let b=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),S=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),_=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),x=!_&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),R=S?3:b?0:void 0,O=x?3:_?0:void 0;if(typeof R=="number"&&typeof O=="number"){let[k,D]=[e[R],r[O]];k.toLowerCase()===D.toLowerCase()&&(r[O]=k,O>R?r=r.slice(O):R>O&&(e=e.slice(R)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var a=0,o=0,l=e.length,u=r.length;a<l&&o<u;a++,o++){this.debug("matchOne loop");var h=r[o],p=e[a];if(this.debug(r,h,p),h===!1)return!1;if(h===he){this.debug("GLOBSTAR",[r,h,p]);var c=a,f=o+1;if(f===u){for(this.debug("** at the end");a<l;a++)if(e[a]==="."||e[a]===".."||!n.dot&&e[a].charAt(0)===".")return!1;return!0}for(;c<l;){var y=e[c];if(this.debug(`
|
|
34
34
|
globstar while`,e,c,r,f,y),this.matchOne(e.slice(c),r.slice(f),i))return this.debug("globstar found match!",c,l,y),!0;if(y==="."||y===".."||!n.dot&&y.charAt(0)==="."){this.debug("dot detected!",e,c,r,f);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(i&&(this.debug(`
|
|
35
35
|
>>> no match, partial?`,e,c,r,f),c===l))}let b;if(typeof h=="string"?(b=p===h,this.debug("string match",h,p,b)):(b=h.test(p),this.debug("pattern match",h,p,b)),!b)return!1}if(a===l&&o===u)return!0;if(a===l)return i;if(o===u)return a===l-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return Op(this.pattern,this.options)}parse(e){hi(e);let r=this.options;if(e==="**")return he;if(e==="")return"";let i,n=null;(i=e.match(uS))?n=r.dot?hS:fS:(i=e.match(X_))?n=(r.nocase?r.dot?iS:rS:r.dot?tS:eS)(i[1]):(i=e.match(cS))?n=(r.nocase?r.dot?pS:dS:r.dot?gS:mS)(i):(i=e.match(nS))?n=r.dot?aS:sS:(i=e.match(oS))&&(n=lS);let s=br.fromGlob(e,this.options).toMMPattern();return n?Object.assign(s,{test:n}):s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?wS:r.dot?vS:_S,n=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(h=>{if(h instanceof RegExp)for(let p of h.flags.split(""))n.add(p);return typeof h=="string"?TS(h):h===he?he:h._src});return u.forEach((h,p)=>{let c=u[p+1],f=u[p-1];h!==he||f===he||(f===void 0?c!==void 0&&c!==he?u[p+1]="(?:\\/|"+i+"\\/)?"+c:u[p]=i:c===void 0?u[p-1]=f+"(?:\\/|"+i+")?":c!==he&&(u[p-1]=f+"(?:\\/|\\/"+i+"\\/)"+c,u[p+1]=he))}),u.filter(h=>h!==he).join("/")}).join("|"),[a,o]=e.length>1?["(?:",")"]:["",""];s="^"+a+s+o+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let a=n[n.length-1];if(!a)for(let o=n.length-2;!a&&o>=0;o--)a=n[o];for(let o=0;o<s.length;o++){let l=s[o],u=n;if(i.matchBase&&l.length===1&&(u=[a]),this.matchOne(u,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return _e.defaults(e).Minimatch}};_e.AST=br;_e.Minimatch=Ae;_e.escape=wr;_e.unescape=We;var vr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ap=new Set,Io=typeof process=="object"&&process?process:{},kp=(t,e,r,i)=>{typeof Io.emitWarning=="function"?Io.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},rs=globalThis.AbortController,Mp=globalThis.AbortSignal;if(typeof rs>"u"){Mp=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},rs=class{constructor(){e()}signal=new Mp;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i)}}};let t=Io.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,kp("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var OS=t=>!Ap.has(t),ax=Symbol("type"),Tt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Pp=t=>Tt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?_r:null:null,_r=class extends Array{constructor(e){super(e),this.fill(0)}},$o=class t{heap;length;static#e=!1;static create(e){let r=Pp(e);if(!r)return[];t.#e=!0;let i=new t(e,r);return t.#e=!1,i}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},di=class t{#e;#r;#s;#i;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#h;#l;#a;#t;#g;#y;#d;#c;#v;#m;#x;#T;#_;#w;#M;#p;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#_,sizes:e.#x,keyMap:e.#l,keyList:e.#a,valList:e.#t,next:e.#g,prev:e.#y,get head(){return e.#d},get tail(){return e.#c},free:e.#v,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,i,n,s)=>e.#C(r,i,n,s),moveToTail:r=>e.#q(r),indexes:r=>e.#R(r),rindexes:r=>e.#A(r),isStale:r=>e.#b(r)}}get max(){return this.#e}get maxSize(){return this.#r}get calculatedSize(){return this.#h}get size(){return this.#u}get fetchMethod(){return this.#o}get dispose(){return this.#s}get disposeAfter(){return this.#i}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:l,dispose:u,disposeAfter:h,noDisposeOnSet:p,noUpdateTTL:c,maxSize:f=0,maxEntrySize:y=0,sizeCalculation:b,fetchMethod:S,noDeleteOnFetchRejection:_,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:O,ignoreFetchAbort:k}=e;if(r!==0&&!Tt(r))throw new TypeError("max option must be a nonnegative integer");let D=r?Pp(r):Array;if(!D)throw new Error("invalid max value: "+r);if(this.#e=r,this.#r=f,this.maxEntrySize=y||this.#r,this.sizeCalculation=b,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=S,this.#M=!!S,this.#l=new Map,this.#a=new Array(r).fill(void 0),this.#t=new Array(r).fill(void 0),this.#g=new D(r),this.#y=new D(r),this.#d=0,this.#c=0,this.#v=$o.create(r),this.#u=0,this.#h=0,typeof u=="function"&&(this.#s=u),typeof h=="function"?(this.#i=h,this.#m=[]):(this.#i=void 0,this.#m=void 0),this.#w=!!this.#s,this.#p=!!this.#i,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!_,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#r!==0&&!Tt(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Tt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=Tt(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!Tt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#k()}if(this.#e===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#r){let F="LRU_CACHE_UNBOUNDED";OS(F)&&(Ap.add(F),kp("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,t))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#k(){let e=new _r(this.#e),r=new _r(this.#e);this.#_=e,this.#T=r,this.#n=(s,a,o=vr.now())=>{if(r[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#b(s)&&this.delete(this.#a[s])},a+1);l.unref&&l.unref()}},this.#O=s=>{r[s]=e[s]!==0?vr.now():0},this.#S=(s,a)=>{if(e[a]){let o=e[a],l=r[a];if(!o||!l)return;s.ttl=o,s.start=l,s.now=i||n();let u=s.now-l;s.remainingTTL=o-u}};let i=0,n=()=>{let s=vr.now();if(this.ttlResolution>0){i=s;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return s};this.getRemainingTTL=s=>{let a=this.#l.get(s);if(a===void 0)return 0;let o=e[a],l=r[a];if(!o||!l)return 1/0;let u=(i||n())-l;return o-u},this.#b=s=>{let a=r[s],o=e[s];return!!o&&!!a&&(i||n())-a>o}}#O=()=>{};#S=()=>{};#n=()=>{};#b=()=>!1;#P(){let e=new _r(this.#e);this.#h=0,this.#x=e,this.#E=r=>{this.#h-=e[r],e[r]=0},this.#j=(r,i,n,s)=>{if(this.#f(i))return 0;if(!Tt(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!Tt(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.#L=(r,i,n)=>{if(e[r]=i,this.#r){let s=this.#r-e[r];for(;this.#h>s;)this.#D(!0)}this.#h+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#h)}}#E=e=>{};#L=(e,r,i)=>{};#j=(e,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#c;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#d));)r=this.#y[r]}*#A({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#d;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#c));)r=this.#g[r]}#N(e){return e!==void 0&&this.#l.get(this.#a[e])===e}*entries(){for(let e of this.#R())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*rentries(){for(let e of this.#A())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*keys(){for(let e of this.#R()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*rkeys(){for(let e of this.#A()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*values(){for(let e of this.#R())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#A())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#a[i],this))return this.get(this.#a[i],r)}}forEach(e,r=this){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}rforEach(e,r=this){for(let i of this.#A()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}purgeStale(){let e=!1;for(let r of this.#A({allowStale:!0}))this.#b(r)&&(this.delete(this.#a[r]),e=!0);return e}info(e){let r=this.#l.get(e);if(r===void 0)return;let i=this.#t[r],n=this.#f(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#_&&this.#T){let a=this.#_[r],o=this.#T[r];if(a&&o){let l=a-(vr.now()-o);s.ttl=l,s.start=Date.now()}}return this.#x&&(s.size=this.#x[r]),s}dump(){let e=[];for(let r of this.#R({allowStale:!0})){let i=this.#a[r],n=this.#t[r],s=this.#f(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let a={value:s};if(this.#_&&this.#T){a.ttl=this.#_[r];let o=vr.now()-this.#T[r];a.start=Math.floor(Date.now()-o)}this.#x&&(a.size=this.#x[r]),e.unshift([i,a])}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=vr.now()-n}this.set(r,i.value,i)}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:s,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,h=this.#j(e,r,i.size||0,o);if(this.maxEntrySize&&h>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let p=this.#u===0?void 0:this.#l.get(e);if(p===void 0)p=this.#u===0?this.#c:this.#v.length!==0?this.#v.pop():this.#u===this.#e?this.#D(!1):this.#u,this.#a[p]=e,this.#t[p]=r,this.#l.set(e,p),this.#g[this.#c]=p,this.#y[p]=this.#c,this.#c=p,this.#u++,this.#L(p,h,l),l&&(l.set="add"),u=!1;else{this.#q(p);let c=this.#t[p];if(r!==c){if(this.#M&&this.#f(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=c;f!==void 0&&!a&&(this.#w&&this.#s?.(f,e,"set"),this.#p&&this.#m?.push([f,e,"set"]))}else a||(this.#w&&this.#s?.(c,e,"set"),this.#p&&this.#m?.push([c,e,"set"]));if(this.#E(p),this.#L(p,h,l),this.#t[p]=r,l){l.set="replace";let f=c&&this.#f(c)?c.__staleWhileFetching:c;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(n!==0&&!this.#_&&this.#k(),this.#_&&(u||this.#n(p,n,s),l&&this.#S(l,p)),!a&&this.#p&&this.#m){let c=this.#m,f;for(;f=c?.shift();)this.#i?.(...f)}return this}pop(){try{for(;this.#u;){let e=this.#t[this.#d];if(this.#D(!0),this.#f(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}}#D(e){let r=this.#d,i=this.#a[r],n=this.#t[r];return this.#M&&this.#f(n)?n.__abortController.abort(new Error("evicted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,i,"evict"),this.#p&&this.#m?.push([n,i,"evict"])),this.#E(r),e&&(this.#a[r]=void 0,this.#t[r]=void 0,this.#v.push(r)),this.#u===1?(this.#d=this.#c=0,this.#v.length=0):this.#d=this.#g[r],this.#l.delete(i),this.#u--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#l.get(e);if(s!==void 0){let a=this.#t[s];if(this.#f(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#b(s))n&&(n.has="stale",this.#S(n,s));else return i&&this.#O(s),n&&(n.has="hit",this.#S(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#l.get(e);if(n===void 0||!i&&this.#b(n))return;let s=this.#t[n];return this.#f(s)?s.__staleWhileFetching:s}#C(e,r,i,n){let s=r===void 0?void 0:this.#t[r];if(this.#f(s))return s;let a=new rs,{signal:o}=i;o?.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:n},u=(b,S=!1)=>{let{aborted:_}=a.signal,x=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(_&&!S?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,x&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),_&&!x&&!S)return p(a.signal.reason);let R=f;return this.#t[r]===f&&(b===void 0?R.__staleWhileFetching?this.#t[r]=R.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,b,l.options))),b},h=b=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=b),p(b)),p=b=>{let{aborted:S}=a.signal,_=S&&i.allowStaleOnFetchAbort,x=_||i.allowStaleOnFetchRejection,R=x||i.noDeleteOnFetchRejection,O=f;if(this.#t[r]===f&&(!R||O.__staleWhileFetching===void 0?this.delete(e):_||(this.#t[r]=O.__staleWhileFetching)),x)return i.status&&O.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),O.__staleWhileFetching;if(O.__returned===O)throw b},c=(b,S)=>{let _=this.#o?.(e,s,l);_&&_ instanceof Promise&&_.then(x=>b(x===void 0?void 0:x),S),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=x=>u(x,!0)))})};i.status&&(i.status.fetchDispatched=!0);let f=new Promise(c).then(u,h),y=Object.assign(f,{__abortController:a,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,y,{...l.options,status:void 0}),r=this.#l.get(e)):this.#t[r]=y,y}#f(e){if(!this.#M)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof rs}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:b,forceRefresh:S=!1,status:_,signal:x}=r;if(!this.#M)return _&&(_.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:_});let R={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:a,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:h,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:y,ignoreFetchAbort:f,status:_,signal:x},O=this.#l.get(e);if(O===void 0){_&&(_.fetch="miss");let k=this.#C(e,O,R,b);return k.__returned=k}else{let k=this.#t[O];if(this.#f(k)){let te=i&&k.__staleWhileFetching!==void 0;return _&&(_.fetch="inflight",te&&(_.returnedStale=!0)),te?k.__staleWhileFetching:k.__returned=k}let D=this.#b(O);if(!S&&!D)return _&&(_.fetch="hit"),this.#q(O),n&&this.#O(O),_&&this.#S(_,O),k;let F=this.#C(e,O,R,b),B=F.__staleWhileFetching!==void 0&&i;return _&&(_.fetch=D?"stale":"refresh",B&&D&&(_.returnedStale=!0)),B?F.__staleWhileFetching:F.__returned=F}}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:a}=r,o=this.#l.get(e);if(o!==void 0){let l=this.#t[o],u=this.#f(l);return a&&this.#S(a,o),this.#b(o)?(a&&(a.get="stale"),u?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.delete(e),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),u?l.__staleWhileFetching:(this.#q(o),n&&this.#O(o),l))}else a&&(a.get="miss")}#F(e,r){this.#y[r]=e,this.#g[e]=r}#q(e){e!==this.#c&&(e===this.#d?this.#d=this.#g[e]:this.#F(this.#y[e],this.#g[e]),this.#F(this.#c,e),this.#c=e)}delete(e){let r=!1;if(this.#u!==0){let i=this.#l.get(e);if(i!==void 0)if(r=!0,this.#u===1)this.clear();else{this.#E(i);let n=this.#t[i];if(this.#f(n)?n.__abortController.abort(new Error("deleted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,e,"delete"),this.#p&&this.#m?.push([n,e,"delete"])),this.#l.delete(e),this.#a[i]=void 0,this.#t[i]=void 0,i===this.#c)this.#c=this.#y[i];else if(i===this.#d)this.#d=this.#g[i];else{let s=this.#y[i];this.#g[s]=this.#g[i];let a=this.#g[i];this.#y[a]=this.#y[i]}this.#u--,this.#v.push(i)}}if(this.#p&&this.#m?.length){let i=this.#m,n;for(;n=i?.shift();)this.#i?.(...n)}return r}clear(){for(let e of this.#A({allowStale:!0})){let r=this.#t[e];if(this.#f(r))r.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#w&&this.#s?.(r,i,"delete"),this.#p&&this.#m?.push([r,i,"delete"])}}if(this.#l.clear(),this.#t.fill(void 0),this.#a.fill(void 0),this.#_&&this.#T&&(this.#_.fill(0),this.#T.fill(0)),this.#x&&this.#x.fill(0),this.#d=0,this.#c=0,this.#v.length=0,this.#h=0,this.#u=0,this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}};var Rr=require("path"),Wp=require("url"),NS=pe(require("fs"),1),et=require("fs"),At=require("fs/promises");var us=require("events"),Yo=pe(require("stream"),1),jp=require("string_decoder"),Dp=typeof process=="object"&&process?process:{stdout:null,stderr:null},MS=t=>!!t&&typeof t=="object"&&(t instanceof Mt||t instanceof Yo.default||AS(t)||kS(t)),AS=t=>!!t&&typeof t=="object"&&t instanceof us.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==Yo.default.Writable.prototype.pipe,kS=t=>!!t&&typeof t=="object"&&t instanceof us.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",ot=Symbol("EOF"),lt=Symbol("maybeEmitEnd"),Ot=Symbol("emittedEnd"),is=Symbol("emittingEnd"),pi=Symbol("emittedError"),ns=Symbol("closed"),qp=Symbol("read"),ss=Symbol("flush"),Cp=Symbol("flushChunk"),Be=Symbol("encoding"),Sr=Symbol("decoder"),se=Symbol("flowing"),gi=Symbol("paused"),Er=Symbol("resume"),ae=Symbol("buffer"),Se=Symbol("pipes"),oe=Symbol("bufferLength"),Wo=Symbol("bufferPush"),as=Symbol("bufferShift"),ge=Symbol("objectMode"),ee=Symbol("destroyed"),Bo=Symbol("error"),Uo=Symbol("emitData"),Lp=Symbol("emitEnd"),zo=Symbol("emitEnd2"),Qe=Symbol("async"),Ho=Symbol("abort"),os=Symbol("aborted"),mi=Symbol("signal"),Jt=Symbol("dataListeners"),ke=Symbol("discarded"),yi=t=>Promise.resolve().then(t),PS=t=>t(),DS=t=>t==="end"||t==="finish"||t==="prefinish",qS=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,CS=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),ls=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Er](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Go=class extends ls{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}},LS=t=>!!t.objectMode,jS=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Mt=class extends us.EventEmitter{[se]=!1;[gi]=!1;[Se]=[];[ae]=[];[ge];[Be];[Qe];[Sr];[ot]=!1;[Ot]=!1;[is]=!1;[ns]=!1;[pi]=null;[oe]=0;[ee]=!1;[mi];[os]=!1;[Jt]=0;[ke]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");LS(r)?(this[ge]=!0,this[Be]=null):jS(r)?(this[Be]=r.encoding,this[ge]=!1):(this[ge]=!1,this[Be]=null),this[Qe]=!!r.async,this[Sr]=this[Be]?new jp.StringDecoder(this[Be]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[ae]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Se]});let{signal:i}=r;i&&(this[mi]=i,i.aborted?this[Ho]():i.addEventListener("abort",()=>this[Ho]()))}get bufferLength(){return this[oe]}get encoding(){return this[Be]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ge]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Qe]}set async(e){this[Qe]=this[Qe]||!!e}[Ho](){this[os]=!0,this.emit("abort",this[mi]?.reason),this.destroy(this[mi]?.reason)}get aborted(){return this[os]}set aborted(e){}write(e,r,i){if(this[os])return!1;if(this[ot])throw new Error("write after end");if(this[ee])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Qe]?yi:PS;if(!this[ge]&&!Buffer.isBuffer(e)){if(CS(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(qS(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ge]?(this[se]&&this[oe]!==0&&this[ss](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):e.length?(typeof e=="string"&&!(r===this[Be]&&!this[Sr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Be]&&(e=this[Sr].write(e)),this[se]&&this[oe]!==0&&this[ss](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):(this[oe]!==0&&this.emit("readable"),i&&n(i),this[se])}read(e){if(this[ee])return null;if(this[ke]=!1,this[oe]===0||e===0||e&&e>this[oe])return this[lt](),null;this[ge]&&(e=null),this[ae].length>1&&!this[ge]&&(this[ae]=[this[Be]?this[ae].join(""):Buffer.concat(this[ae],this[oe])]);let r=this[qp](e||null,this[ae][0]);return this[lt](),r}[qp](e,r){if(this[ge])this[as]();else{let i=r;e===i.length||e===null?this[as]():typeof i=="string"?(this[ae][0]=i.slice(e),r=i.slice(0,e),this[oe]-=e):(this[ae][0]=i.subarray(e),r=i.subarray(0,e),this[oe]-=e)}return this.emit("data",r),!this[ae].length&&!this[ot]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=void 0),typeof r=="function"&&(i=r,r="utf8"),e!==void 0&&this.write(e,r),i&&this.once("end",i),this[ot]=!0,this.writable=!1,(this[se]||!this[gi])&&this[lt](),this}[Er](){this[ee]||(!this[Jt]&&!this[Se].length&&(this[ke]=!0),this[gi]=!1,this[se]=!0,this.emit("resume"),this[ae].length?this[ss]():this[ot]?this[lt]():this.emit("drain"))}resume(){return this[Er]()}pause(){this[se]=!1,this[gi]=!0,this[ke]=!1}get destroyed(){return this[ee]}get flowing(){return this[se]}get paused(){return this[gi]}[Wo](e){this[ge]?this[oe]+=1:this[oe]+=e.length,this[ae].push(e)}[as](){return this[ge]?this[oe]-=1:this[oe]-=this[ae][0].length,this[ae].shift()}[ss](e=!1){do;while(this[Cp](this[as]())&&this[ae].length);!e&&!this[ae].length&&!this[ot]&&this.emit("drain")}[Cp](e){return this.emit("data",e),this[se]}pipe(e,r){if(this[ee])return e;this[ke]=!1;let i=this[Ot];return r=r||{},e===Dp.stdout||e===Dp.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Se].push(r.proxyErrors?new Go(this,e,r):new ls(this,e,r)),this[Qe]?yi(()=>this[Er]()):this[Er]()),e}unpipe(e){let r=this[Se].find(i=>i.dest===e);r&&(this[Se].length===1?(this[se]&&this[Jt]===0&&(this[se]=!1),this[Se]=[]):this[Se].splice(this[Se].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[ke]=!1,this[Jt]++,!this[Se].length&&!this[se]&&this[Er]();else if(e==="readable"&&this[oe]!==0)super.emit("readable");else if(DS(e)&&this[Ot])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[pi]){let n=r;this[Qe]?yi(()=>n.call(this,this[pi])):n.call(this,this[pi])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[Jt]=this.listeners("data").length,this[Jt]===0&&!this[ke]&&!this[Se].length&&(this[se]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Jt]=0,!this[ke]&&!this[Se].length&&(this[se]=!1)),r}get emittedEnd(){return this[Ot]}[lt](){!this[is]&&!this[Ot]&&!this[ee]&&this[ae].length===0&&this[ot]&&(this[is]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[ns]&&this.emit("close"),this[is]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[ge]&&!i?!1:this[Qe]?(yi(()=>this[Uo](i)),!0):this[Uo](i);if(e==="end")return this[Lp]();if(e==="close"){if(this[ns]=!0,!this[Ot]&&!this[ee])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[pi]=i,super.emit(Bo,i);let s=!this[mi]||this.listeners("error").length?super.emit("error",i):!1;return this[lt](),s}else if(e==="resume"){let s=super.emit("resume");return this[lt](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...r);return this[lt](),n}[Uo](e){for(let i of this[Se])i.dest.write(e)===!1&&this.pause();let r=this[ke]?!1:super.emit("data",e);return this[lt](),r}[Lp](){return this[Ot]?!1:(this[Ot]=!0,this.readable=!1,this[Qe]?(yi(()=>this[zo]()),!0):this[zo]())}[zo](){if(this[Sr]){let r=this[Sr].end();if(r){for(let i of this[Se])i.dest.write(r);this[ke]||super.emit("data",r)}}for(let r of this[Se])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ge]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[ge]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[ge])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Be]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ee,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ke]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[ot])return r();let s,a,o=p=>{this.off("data",l),this.off("end",u),this.off(ee,h),r(),a(p)},l=p=>{this.off("error",o),this.off("end",u),this.off(ee,h),this.pause(),s({value:p,done:!!this[ot]})},u=()=>{this.off("error",o),this.off("data",l),this.off(ee,h),r(),s({done:!0,value:void 0})},h=()=>o(new Error("stream destroyed"));return new Promise((p,c)=>{a=c,s=p,this.once(ee,h),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ke]=!1;let e=!1,r=()=>(this.pause(),this.off(Bo,r),this.off(ee,r),this.off("end",r),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return r();let n=this.read();return n===null?r():{done:!1,value:n}};return this.once("end",r),this.once(Bo,r),this.once(ee,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ee])return e?this.emit("error",e):this.emit(ee),this;this[ee]=!0,this[ke]=!0,this[ae].length=0,this[oe]=0;let r=this;return typeof r.close=="function"&&!this[ns]&&r.close(),e?this.emit("error",e):this.emit(ee),this}static get isStream(){return MS}};var FS=et.realpathSync.native,wi={lstatSync:et.lstatSync,readdir:et.readdir,readdirSync:et.readdirSync,readlinkSync:et.readlinkSync,realpathSync:FS,promises:{lstat:At.lstat,readdir:At.readdir,readlink:At.readlink,realpath:At.realpath}},Bp=t=>!t||t===wi||t===NS?wi:{...wi,...t,promises:{...wi.promises,...t.promises||{}}},Up=/^\\\\\?\\([a-z]:)\\?$/i,IS=t=>t.replace(/\//g,"\\").replace(Up,"$1\\"),$S=/[\\\/]/,Ne=0,zp=1,Hp=2,Xe=4,Gp=6,Yp=8,Zt=10,Vp=12,je=15,bi=~je,Vo=16,Np=32,vi=64,Ue=128,fs=256,cs=512,Fp=vi|Ue|cs,WS=1023,Ko=t=>t.isFile()?Yp:t.isDirectory()?Xe:t.isSymbolicLink()?Zt:t.isCharacterDevice()?Hp:t.isBlockDevice()?Gp:t.isSocket()?Vp:t.isFIFO()?zp:Ne,Ip=new Map,_i=t=>{let e=Ip.get(t);if(e)return e;let r=t.normalize("NFKD");return Ip.set(t,r),r},$p=new Map,hs=t=>{let e=$p.get(t);if(e)return e;let r=_i(t.toLowerCase());return $p.set(t,r),r},ds=class extends di{constructor(){super({max:256})}},Jo=class extends di{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},Kp=Symbol("PathScurry setAsCwd"),me=class{name;root;roots;parent;nocase;#e;#r;get dev(){return this.#r}#s;get mode(){return this.#s}#i;get nlink(){return this.#i}#o;get uid(){return this.#o}#u;get gid(){return this.#u}#h;get rdev(){return this.#h}#l;get blksize(){return this.#l}#a;get ino(){return this.#a}#t;get size(){return this.#t}#g;get blocks(){return this.#g}#y;get atimeMs(){return this.#y}#d;get mtimeMs(){return this.#d}#c;get ctimeMs(){return this.#c}#v;get birthtimeMs(){return this.#v}#m;get atime(){return this.#m}#x;get mtime(){return this.#x}#T;get ctime(){return this.#T}#_;get birthtime(){return this.#_}#w;#M;#p;#k;#O;#S;#n;#b;#P;#E;get path(){return(this.parent||this).fullpath()}constructor(e,r=Ne,i,n,s,a,o){this.name=e,this.#w=s?hs(e):_i(e),this.#n=r&WS,this.nocase=s,this.roots=n,this.root=i||this,this.#b=a,this.#p=o.fullpath,this.#O=o.relative,this.#S=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=Bp(o.fs)}depth(){return this.#M!==void 0?this.#M:this.parent?this.#M=this.parent.depth()+1:this.#M=0}childrenCache(){return this.#b}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#L(n):this.#L(n)}#L(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#b.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#b.set(this,r),this.#n&=~Vo,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?hs(e):_i(e);for(let l of i)if(l.#w===n)return l;let s=this.parent?this.sep:"",a=this.#p?this.#p+s+e:void 0,o=this.newChild(e,Ne,{...r,parent:this,fullpath:a});return this.canReaddir()||(o.#n|=Ue),i.push(o),o}relative(){if(this.#O!==void 0)return this.#O;let e=this.name,r=this.parent;if(!r)return this.#O=this.name;let i=r.relative();return i+(!i||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.#S!==void 0)return this.#S;let e=this.name,r=this.parent;if(!r)return this.#S=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+e}fullpath(){if(this.#p!==void 0)return this.#p;let e=this.name,r=this.parent;if(!r)return this.#p=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+e;return this.#p=n}fullpathPosix(){if(this.#k!==void 0)return this.#k;if(this.sep==="/")return this.#k=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#k=`//?/${n}`:this.#k=n}let e=this.parent,r=e.fullpathPosix(),i=r+(!r||!e.parent?"":"/")+this.name;return this.#k=i}isUnknown(){return(this.#n&je)===Ne}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#n&je)===Yp}isDirectory(){return(this.#n&je)===Xe}isCharacterDevice(){return(this.#n&je)===Hp}isBlockDevice(){return(this.#n&je)===Gp}isFIFO(){return(this.#n&je)===zp}isSocket(){return(this.#n&je)===Vp}isSymbolicLink(){return(this.#n&Zt)===Zt}lstatCached(){return this.#n&Np?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#E}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let e=this.#n&je;return!(e!==Ne&&e!==Zt||this.#n&fs||this.#n&Ue)}calledReaddir(){return!!(this.#n&Vo)}isENOENT(){return!!(this.#n&Ue)}isNamed(e){return this.nocase?this.#w===hs(e):this.#w===_i(e)}async readlink(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}readlinkSync(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}#j(e){this.#n|=Vo;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#R()}}#R(){this.#n&Ue||(this.#n=(this.#n|Ue)&bi,this.#A())}#A(){let e=this.children();e.provisional=0;for(let r of e)r.#R()}#N(){this.#n|=cs,this.#D()}#D(){if(this.#n&vi)return;let e=this.#n;(e&je)===Xe&&(e&=bi),this.#n=e|vi,this.#A()}#C(e=""){e==="ENOTDIR"||e==="EPERM"?this.#D():e==="ENOENT"?this.#R():this.children().provisional=0}#f(e=""){e==="ENOTDIR"?this.parent.#D():e==="ENOENT"&&this.#R()}#F(e=""){let r=this.#n;r|=fs,e==="ENOENT"&&(r|=Ue),(e==="EINVAL"||e==="UNKNOWN")&&(r&=bi),this.#n=r,e==="ENOTDIR"&&this.parent&&this.parent.#D()}#q(e,r){return this.#z(e,r)||this.#U(e,r)}#U(e,r){let i=Ko(e),n=this.newChild(e.name,i,{parent:this}),s=n.#n&je;return s!==Xe&&s!==Zt&&s!==Ne&&(n.#n|=vi),r.unshift(n),r.provisional++,n}#z(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?hs(e.name):_i(e.name))===n.#w)return this.#H(e,n,i,r)}}#H(e,r,i,n){let s=r.name;return r.#n=r.#n&bi|Ko(e),s!==e.name&&(r.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(r)),n.provisional++,r}async lstat(){if(!(this.#n&Ue))try{return this.#B(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#f(e.code)}}lstatSync(){if(!(this.#n&Ue))try{return this.#B(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#f(e.code)}}#B(e){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:a,blocks:o,ctime:l,ctimeMs:u,dev:h,gid:p,ino:c,mode:f,mtime:y,mtimeMs:b,nlink:S,rdev:_,size:x,uid:R}=e;this.#m=r,this.#y=i,this.#_=n,this.#v=s,this.#l=a,this.#g=o,this.#T=l,this.#c=u,this.#r=h,this.#u=p,this.#a=c,this.#s=f,this.#x=y,this.#d=b,this.#i=S,this.#h=_,this.#t=x,this.#o=R;let O=Ko(e);this.#n=this.#n&bi|O|Np,O!==Ne&&O!==Xe&&O!==Zt&&(this.#n|=vi)}#$=[];#W=!1;#G(e){this.#W=!1;let r=this.#$.slice();this.#$.length=0,r.forEach(i=>i(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#$.push(e),this.#W)return;this.#W=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,a)=>{if(s)this.#C(s.code),i.provisional=0;else{for(let o of a)this.#q(o,i);this.#j(i)}this.#G(i.slice(0,i.provisional))})}#I;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#I)await this.#I;else{let i=()=>{};this.#I=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#q(n,e);this.#j(e)}catch(n){this.#C(n.code),e.provisional=0}this.#I=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let i of this.#e.readdirSync(r,{withFileTypes:!0}))this.#q(i,e);this.#j(e)}catch(i){this.#C(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#n&Fp)return!1;let e=je&this.#n;return e===Ne||e===Xe||e===Zt}shouldWalk(e,r){return(this.#n&Xe)===Xe&&!(this.#n&Fp)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#E)return this.#E;if(!((cs|fs|Ue)&this.#n))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#E)return this.#E;if(!((cs|fs|Ue)&this.#n))try{let e=this.#e.realpathSync(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}[Kp](e){if(e===this)return;let r=new Set([]),i=[],n=this;for(;n&&n.parent;)r.add(n),n.#O=i.join(this.sep),n.#S=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#O=void 0,n.#S=void 0,n=n.parent}},ps=class t extends me{sep="\\";splitSep=$S;constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Rr.win32.parse(e).root}getRoot(e){if(e=IS(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,i]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=i;return this.roots[e]=new xr(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Up,"$1\\"),e===r}},gs=class t extends me{splitSep="/";sep="/";constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},ms=class{root;rootPath;roots;cwd;#e;#r;#s;nocase;#i;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:a=wi}={}){this.#i=Bp(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Wp.fileURLToPath)(e));let o=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new ds,this.#r=new ds,this.#s=new Jo(s);let l=o.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let u=this.root,h=l.length-1,p=r.sep,c=this.rootPath,f=!1;for(let y of l){let b=h--;u=u.child(y,{relative:new Array(b).fill("..").join(p),relativePosix:new Array(b).fill("..").join("/"),fullpath:c+=(f?"":p)+y}),f=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#e.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpath();return this.#e.set(r,n),n}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#r.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpathPosix();return this.#r.set(r,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i}=r;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0}=r;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.readlink();return r?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return r?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.realpath();return r?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return r?i:i?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set,u=(p,c)=>{l.add(p),p.readdirCB((f,y)=>{if(f)return c(f);let b=y.length;if(!b)return c();let S=()=>{--b===0&&c()};for(let _ of y)(!s||s(_))&&o.push(i?_:_.fullpath()),n&&_.isSymbolicLink()?_.realpath().then(x=>x?.isUnknown()?x.lstat():x).then(x=>x?.shouldWalk(l,a)?u(x,S):S()):_.shouldWalk(l,a)?u(_,S):S()},!0)},h=e;return new Promise((p,c)=>{u(h,f=>{if(f)return c(f);p(o)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let h=u.readdirSync();for(let p of h){(!s||s(p))&&o.push(i?p:p.fullpath());let c=p;if(p.isSymbolicLink()){if(!(n&&(c=p.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(l,a)&&l.add(c)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r;(!s||s(e))&&(yield i?e:e.fullpath());let o=new Set([e]);for(let l of o){let u=l.readdirSync();for(let h of u){(!s||s(h))&&(yield i?h:h.fullpath());let p=h;if(h.isSymbolicLink()){if(!(n&&(p=h.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(o,a)&&o.add(p)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Mt({objectMode:!0});(!s||s(e))&&o.write(i?e:e.fullpath());let l=new Set,u=[e],h=0,p=()=>{let c=!1;for(;!c;){let f=u.shift();if(!f){h===0&&o.end();return}h++,l.add(f);let y=(S,_,x=!1)=>{if(S)return o.emit("error",S);if(n&&!x){let R=[];for(let O of _)O.isSymbolicLink()&&R.push(O.realpath().then(k=>k?.isUnknown()?k.lstat():k));if(R.length){Promise.all(R).then(()=>y(null,_,!0));return}}for(let R of _)R&&(!s||s(R))&&(o.write(i?R:R.fullpath())||(c=!0));h--;for(let R of _){let O=R.realpathCached()||R;O.shouldWalk(l,a)&&u.push(O)}c&&!o.flowing?o.once("drain",p):b||p()},b=!0;f.readdirCB(y,!0),b=!1}};return p(),o}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Mt({objectMode:!0}),l=new Set;(!s||s(e))&&o.write(i?e:e.fullpath());let u=[e],h=0,p=()=>{let c=!1;for(;!c;){let f=u.shift();if(!f){h===0&&o.end();return}h++,l.add(f);let y=f.readdirSync();for(let b of y)(!s||s(b))&&(o.write(i?b:b.fullpath())||(c=!0));h--;for(let b of y){let S=b;if(b.isSymbolicLink()){if(!(n&&(S=b.realpathSync())))continue;S.isUnknown()&&S.lstatSync()}S.shouldWalk(l,a)&&u.push(S)}}c&&!o.flowing&&o.once("drain",p)};return p(),o}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Kp](r)}},xr=class extends ms{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,Rr.win32,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Rr.win32.parse(e).root.toUpperCase()}newRoot(e){return new ps(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Tr=class extends ms{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,Rr.posix,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new gs(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Si=class extends Tr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},hx=process.platform==="win32"?ps:gs,Jp=process.platform==="win32"?xr:process.platform==="darwin"?Si:Tr;var Zp=require("url");var BS=t=>t.length>=1,US=t=>t.length>=1,Or=class t{#e;#r;#s;length;#i;#o;#u;#h;#l;#a;#t=!0;constructor(e,r,i,n){if(!BS(e))throw new TypeError("empty pattern list");if(!US(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#r=r,this.#s=i,this.#i=n,this.#s===0){if(this.isUNC()){let[s,a,o,l,...u]=this.#e,[h,p,c,f,...y]=this.#r;u[0]===""&&(u.shift(),y.shift());let b=[s,a,o,l,""].join("/"),S=[h,p,c,f,""].join("/");this.#e=[b,...u],this.#r=[S,...y],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...a]=this.#e,[o,...l]=this.#r;a[0]===""&&(a.shift(),l.shift());let u=s+"/",h=o+"/";this.#e=[u,...a],this.#r=[h,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===he}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#u=this.#u||(this.#s===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new t(this.#e,this.#r,this.#s+1,this.#i),this.#o.#a=this.#a,this.#o.#l=this.#l,this.#o.#h=this.#h,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#l!==void 0?this.#l:this.#l=this.#i==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#t)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#t?!1:(this.#t=!1,!0)}};var zS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ei=class{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:a=zS}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];let o={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let l of e){let u=new Ae(l,o);for(let h=0;h<u.set.length;h++){let p=u.set[h],c=u.globParts[h];if(!p||!c)throw new Error("invalid pattern object");for(;p[0]==="."&&c[0]===".";)p.shift(),c.shift();let f=new Or(p,c,0,a),y=new Ae(f.globString(),o),b=c[c.length-1]==="**",S=f.isAbsolute();S?this.absolute.push(y):this.relative.push(y),b&&(S?this.absoluteChildren.push(y):this.relativeChildren.push(y))}}}ignored(e){let r=e.fullpath(),i=`${r}/`,n=e.relative()||".",s=`${n}/`;for(let a of this.relative)if(a.match(n)||a.match(s))return!0;for(let a of this.absolute)if(a.match(r)||a.match(i))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(i))return!0;for(let n of this.absoluteChildren)if(n.match(r))return!0;return!1}};var Zo=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){return this.store.get(e.fullpath())?.has(r.globString())}storeWalked(e,r){let i=e.fullpath(),n=this.store.get(i);n?n.add(r.globString()):this.store.set(i,new Set([r.globString()]))}},Qo=class{store=new Map;add(e,r,i){let n=(r?2:0)|(i?1:0),s=this.store.get(e);this.store.set(e,s===void 0?n:n&s)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}},Xo=class{store=new Map;add(e,r){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(n=>n.globString()===r.globString())||i.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ri=class t{hasWalkedCache;matches=new Qo;subwalks=new Xo;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Zo}processPatterns(e,r){this.patterns=r;let i=r.map(n=>[e,n]);for(let[n,s]of i){this.hasWalkedCache.storeWalked(n,s);let a=s.root(),o=s.isAbsolute()&&this.opts.absolute!==!1;if(a){n=n.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let p=s.rest();if(p)s=p;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,h=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,h=!0;if(l=s.pattern(),u=s.rest(),h){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let p=l===".."||l===""||l===".";this.matches.add(n.resolve(l),o,p);continue}else if(l===he){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let p=u?.pattern(),c=u?.rest();if(!u||(p===""||p===".")&&!c)this.matches.add(n,o,p===""||p===".");else if(p===".."){let f=n.parent||n;c?this.hasWalkedCache.hasWalked(f,c)||this.subwalks.add(f,c):this.matches.add(f,o,!0)}}else l instanceof RegExp&&this.subwalks.add(n,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let i=this.subwalks.get(e),n=this.child();for(let s of r)for(let a of i){let o=a.isAbsolute(),l=a.pattern(),u=a.rest();l===he?n.testGlobstar(s,a,u,o):l instanceof RegExp?n.testRegExp(s,l,u,o):n.testString(s,l,u,o)}return n}testGlobstar(e,r,i,n){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(i&&r.checkFollowGlobstar()?this.subwalks.add(e,i):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,i.rest(),n);else if(s===".."){let a=e.parent||e;this.subwalks.add(a,i)}else s instanceof RegExp&&this.testRegExp(e,s,i.rest(),n)}}testRegExp(e,r,i,n){r.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,r,i,n){e.isNamed(r)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}};var HS=(t,e)=>typeof t=="string"?new Ei([t],e):Array.isArray(t)?new Ei(t,e):t,ys=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#r;#s;signal;maxDepth;constructor(e,r,i){this.patterns=e,this.path=r,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",i.ignore&&(this.#r=HS(i.ignore,i)),this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(e){return this.seen.has(e)||!!this.#r?.ignored?.(e)}#o(e){return!!this.#r?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=await s.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#i(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=s.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#i(e))return;let i=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+n)}else{let s=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!s.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(s?a+s+n:"."+n)}}async match(e,r,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,r)}matchSync(e,r,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,r)}walkCB(e,r,i){this.signal?.aborted&&i(),this.walkCB2(e,r,new Ri(this.opts),i)}walkCB2(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirCached();o.calledReaddir()?this.walkCB3(o,l,i,a):o.readdirCB((u,h)=>this.walkCB3(o,h,i,a),!0)}a()}walkCB3(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let[o,l]of i.subwalks.entries())s++,this.walkCB2(o,l,i.child(),a);a()}walkCBSync(e,r,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,r,new Ri(this.opts),i)}walkCB2Sync(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirSync();this.walkCB3Sync(o,l,i,a)}a()}walkCB3Sync(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let[o,l]of i.subwalks.entries())s++,this.walkCB2Sync(o,l,i.child(),a);a()}},xi=class extends ys{matches;constructor(e,r,i){super(e,r,i),this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Ti=class extends ys{results;constructor(e,r,i){super(e,r,i),this.results=new Mt({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var GS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ze=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,Zp.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||GS,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?xr:r.platform==="darwin"?Si:r.platform?Tr:Jp;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",n={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new Ae(l,n)),[a,o]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=a.map((l,u)=>{let h=o[u];if(!h)throw new Error("invalid pattern object");return new Or(l,h,0,this.platform)})}async walk(){return[...await new xi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new xi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new Ti(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new Ti(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var el=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new Ae(r,e).hasMagic())return!0;return!1};function ws(t,e={}){return new ze(t,e).streamSync()}function Xp(t,e={}){return new ze(t,e).stream()}function eg(t,e={}){return new ze(t,e).walkSync()}async function Qp(t,e={}){return new ze(t,e).walk()}function vs(t,e={}){return new ze(t,e).iterateSync()}function tg(t,e={}){return new ze(t,e).iterate()}var YS=ws,VS=Object.assign(Xp,{sync:ws}),KS=vs,JS=Object.assign(tg,{sync:vs}),ZS=Object.assign(eg,{stream:ws,iterate:vs}),bs=Object.assign(Qp,{glob:Qp,globSync:eg,sync:ZS,globStream:Xp,stream:VS,globStreamSync:ws,streamSync:YS,globIterate:tg,iterate:JS,globIterateSync:vs,iterateSync:KS,Glob:ze,hasMagic:el,escape:wr,unescape:We});bs.glob=bs;var QS="../build",XS="../wheels";async function sg(t,e){let r=[],i=n=>{r.push(n)};if(await t.loadPackage(e,{errorCallback:i}),r.length>0)throw new Error(r.join(`
|
|
36
|
-
`))}async function eE(t){I.info("Copy the build directory (the bare built app files) to this directory...");let e=ce.default.resolve(__dirname,QS);if(!(await ut.default.stat(e)).isDirectory())throw new Error(`The source ${e} does not exist.`);if(e===t.copyTo){I.warn(`sourceDir == destDir (${e}). Are you in the development environment? Skip copying the directory.`);return}if(t.keepOld)try{await ut.default.access(t.copyTo),I.info(`${t.copyTo} already exists. Use it and skip copying.`);return}catch{throw new Error(`${t.copyTo} does not exist even though the \`keepOld\` option is specified`)}I.debug(`Copy ${e} to ${t.copyTo}`),await ut.default.rm(t.copyTo,{recursive:!0,force:!0}),await tl.default.copy(e,t.copyTo,{errorOnExist:!0})}async function tE(t){if(t.requirements.length===0)return[];let e=await(0,Oi.loadPyodide)({packageCacheDir:t.pyodideRuntimeDir});return e._api.setCdnUrl(t.pyodideSource),await ag(e,{requirements:t.requirements}),Object.entries(e.loadedPackages).filter(([,r])=>r==="default channel").map(([r])=>r)}async function rg(t,e){I.debug("Preparing the local wheel: %s",e);let r=await ut.default.readFile(e),i="/tmp/"+ce.default.basename(e);t.FS.writeFile(i,r);let n=`emfs:${i}`;return I.debug("The local wheel %s is prepared as %s",e,n),n}async function ag(t,e){await sg(t,"micropip");let r=t.pyimport("micropip"),i=[...e.requirements],n=ce.default.join(__dirname,XS),s=await rg(t,ce.default.join(n,"stlite_lib-0.1.0-py3-none-any.whl"));i.push(s);let a=await rg(t,ce.default.join(n,"streamlit-1.
|
|
36
|
+
`))}async function eE(t){I.info("Copy the build directory (the bare built app files) to this directory...");let e=ce.default.resolve(__dirname,QS);if(!(await ut.default.stat(e)).isDirectory())throw new Error(`The source ${e} does not exist.`);if(e===t.copyTo){I.warn(`sourceDir == destDir (${e}). Are you in the development environment? Skip copying the directory.`);return}if(t.keepOld)try{await ut.default.access(t.copyTo),I.info(`${t.copyTo} already exists. Use it and skip copying.`);return}catch{throw new Error(`${t.copyTo} does not exist even though the \`keepOld\` option is specified`)}I.debug(`Copy ${e} to ${t.copyTo}`),await ut.default.rm(t.copyTo,{recursive:!0,force:!0}),await tl.default.copy(e,t.copyTo,{errorOnExist:!0})}async function tE(t){if(t.requirements.length===0)return[];let e=await(0,Oi.loadPyodide)({packageCacheDir:t.pyodideRuntimeDir});return e._api.setCdnUrl(t.pyodideSource),await ag(e,{requirements:t.requirements}),Object.entries(e.loadedPackages).filter(([,r])=>r==="default channel").map(([r])=>r)}async function rg(t,e){I.debug("Preparing the local wheel: %s",e);let r=await ut.default.readFile(e),i="/tmp/"+ce.default.basename(e);t.FS.writeFile(i,r);let n=`emfs:${i}`;return I.debug("The local wheel %s is prepared as %s",e,n),n}async function ag(t,e){await sg(t,"micropip");let r=t.pyimport("micropip"),i=[...e.requirements],n=ce.default.join(__dirname,XS),s=await rg(t,ce.default.join(n,"stlite_lib-0.1.0-py3-none-any.whl"));i.push(s);let a=await rg(t,ce.default.join(n,"streamlit-1.39.0-cp312-none-any.whl"));i.push(a),I.info("Install the packages: %j",i),await r.install.callKwargs(i,{keep_going:!0})}async function rE(t){I.info("Create the site-packages snapshot file...");let e=await(0,Oi.loadPyodide)({packageCacheDir:t.pyodideRuntimeDir});e._api.setCdnUrl(t.pyodideSource),await sg(e,"micropip");let r=e.pyimport("micropip"),i=new Kn(t.pyodideSource),n=[];if(t.usedPrebuiltPackages.length>0){I.info("Mocking prebuilt packages so that they will not be included in the site-packages snapshot because these will be installed from the vendored wheel files at runtime...");for(let o of t.usedPrebuiltPackages){let l=await i.getPackageInfoByName(o);if(l==null)throw new Error(`Package ${o} is not found in the lock file.`);I.debug(`Mock ${l.name} ${l.version}`),r.add_mock_package(l.name,l.version),n.push(l.name)}}I.info("Install the requirements %j",t.requirements),await ag(e,{requirements:t.requirements}),I.info("Remove the mocked packages: %j",n),n.forEach(o=>r.remove_mock_package(o)),I.info("Archive the site-packages director(y|ies)");let s="/tmp/site-packages-snapshot.tar.gz";await e.runPythonAsync(`
|
|
37
37
|
import os
|
|
38
38
|
import tarfile
|
|
39
39
|
import site
|
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "/static/css/main.43acb583.css",
|
|
4
|
-
"main.js": "/static/js/main.
|
|
4
|
+
"main.js": "/static/js/main.099ed3b9.js",
|
|
5
5
|
"static/js/8798.a9a59610.chunk.js": "/static/js/8798.a9a59610.chunk.js",
|
|
6
6
|
"static/js/4994.2d981099.chunk.js": "/static/js/4994.2d981099.chunk.js",
|
|
7
7
|
"static/js/3685.39209b63.chunk.js": "/static/js/3685.39209b63.chunk.js",
|
|
8
|
-
"static/js/4785.
|
|
9
|
-
"static/js/5299.
|
|
10
|
-
"static/js/4482.
|
|
11
|
-
"static/css/
|
|
12
|
-
"static/js/
|
|
8
|
+
"static/js/4785.98dbde84.chunk.js": "/static/js/4785.98dbde84.chunk.js",
|
|
9
|
+
"static/js/5299.b77de2fc.chunk.js": "/static/js/5299.b77de2fc.chunk.js",
|
|
10
|
+
"static/js/4482.a589131e.chunk.js": "/static/js/4482.a589131e.chunk.js",
|
|
11
|
+
"static/css/7463.da3ff442.chunk.css": "/static/css/7463.da3ff442.chunk.css",
|
|
12
|
+
"static/js/7463.04979eb1.chunk.js": "/static/js/7463.04979eb1.chunk.js",
|
|
13
13
|
"static/css/2664.c24b25fa.chunk.css": "/static/css/2664.c24b25fa.chunk.css",
|
|
14
|
-
"static/js/2664.
|
|
14
|
+
"static/js/2664.fcbdd10d.chunk.js": "/static/js/2664.fcbdd10d.chunk.js",
|
|
15
15
|
"static/js/4021.c4f88158.chunk.js": "/static/js/4021.c4f88158.chunk.js",
|
|
16
|
-
"static/js/8186.
|
|
17
|
-
"static/js/
|
|
16
|
+
"static/js/8186.e2b282ee.chunk.js": "/static/js/8186.e2b282ee.chunk.js",
|
|
17
|
+
"static/js/7809.e90cb7d7.chunk.js": "/static/js/7809.e90cb7d7.chunk.js",
|
|
18
18
|
"static/js/6802.69de4123.chunk.js": "/static/js/6802.69de4123.chunk.js",
|
|
19
19
|
"static/js/9311.8174b048.chunk.js": "/static/js/9311.8174b048.chunk.js",
|
|
20
|
-
"static/js/144.
|
|
21
|
-
"static/js/2940.
|
|
20
|
+
"static/js/144.9ec5bd27.chunk.js": "/static/js/144.9ec5bd27.chunk.js",
|
|
21
|
+
"static/js/2940.4e6caf5c.chunk.js": "/static/js/2940.4e6caf5c.chunk.js",
|
|
22
22
|
"static/js/9001.d43ca39c.chunk.js": "/static/js/9001.d43ca39c.chunk.js",
|
|
23
|
-
"static/js/2873.
|
|
24
|
-
"static/js/6134.
|
|
25
|
-
"static/js/
|
|
26
|
-
"static/js/
|
|
27
|
-
"static/js/
|
|
28
|
-
"static/js/
|
|
29
|
-
"static/js/
|
|
30
|
-
"static/js/
|
|
31
|
-
"static/js/
|
|
32
|
-
"static/js/
|
|
23
|
+
"static/js/2873.b29b2eeb.chunk.js": "/static/js/2873.b29b2eeb.chunk.js",
|
|
24
|
+
"static/js/6134.bdbf7672.chunk.js": "/static/js/6134.bdbf7672.chunk.js",
|
|
25
|
+
"static/js/241.e65eeb7b.chunk.js": "/static/js/241.e65eeb7b.chunk.js",
|
|
26
|
+
"static/js/1189.ab8bacef.chunk.js": "/static/js/1189.ab8bacef.chunk.js",
|
|
27
|
+
"static/js/6944.444c0fa6.chunk.js": "/static/js/6944.444c0fa6.chunk.js",
|
|
28
|
+
"static/js/1740.23a03bbe.chunk.js": "/static/js/1740.23a03bbe.chunk.js",
|
|
29
|
+
"static/js/698.0dd9747b.chunk.js": "/static/js/698.0dd9747b.chunk.js",
|
|
30
|
+
"static/js/4724.917b0590.chunk.js": "/static/js/4724.917b0590.chunk.js",
|
|
31
|
+
"static/js/9846.9ae3ba57.chunk.js": "/static/js/9846.9ae3ba57.chunk.js",
|
|
32
|
+
"static/js/1261.b566da4d.chunk.js": "/static/js/1261.b566da4d.chunk.js",
|
|
33
|
+
"static/js/4494.6e8d3b6e.chunk.js": "/static/js/4494.6e8d3b6e.chunk.js",
|
|
33
34
|
"static/js/1612.be039667.chunk.js": "/static/js/1612.be039667.chunk.js",
|
|
34
|
-
"static/js/9813.
|
|
35
|
+
"static/js/9813.a08c138f.chunk.js": "/static/js/9813.a08c138f.chunk.js",
|
|
35
36
|
"static/js/4694.87b13a4d.chunk.js": "/static/js/4694.87b13a4d.chunk.js",
|
|
36
|
-
"static/js/7579.
|
|
37
|
-
"static/js/2448.
|
|
38
|
-
"static/js/8801.
|
|
39
|
-
"static/js/7696.
|
|
40
|
-
"static/js/2450.
|
|
41
|
-
"static/js/8853.
|
|
42
|
-
"static/js/9005.
|
|
43
|
-
"static/js/1046.
|
|
44
|
-
"static/js/4831.
|
|
37
|
+
"static/js/7579.b7954b39.chunk.js": "/static/js/7579.b7954b39.chunk.js",
|
|
38
|
+
"static/js/2448.285a20d7.chunk.js": "/static/js/2448.285a20d7.chunk.js",
|
|
39
|
+
"static/js/8801.534f3181.chunk.js": "/static/js/8801.534f3181.chunk.js",
|
|
40
|
+
"static/js/7696.05d95d4d.chunk.js": "/static/js/7696.05d95d4d.chunk.js",
|
|
41
|
+
"static/js/2450.3fbfa728.chunk.js": "/static/js/2450.3fbfa728.chunk.js",
|
|
42
|
+
"static/js/8853.35db34e3.chunk.js": "/static/js/8853.35db34e3.chunk.js",
|
|
43
|
+
"static/js/9005.980d0bb3.chunk.js": "/static/js/9005.980d0bb3.chunk.js",
|
|
44
|
+
"static/js/1046.52decb2e.chunk.js": "/static/js/1046.52decb2e.chunk.js",
|
|
45
|
+
"static/js/4831.0fbd4ca7.chunk.js": "/static/js/4831.0fbd4ca7.chunk.js",
|
|
45
46
|
"static/js/5599.47501794.chunk.js": "/static/js/5599.47501794.chunk.js",
|
|
46
47
|
"static/js/4004.05e297fd.chunk.js": "/static/js/4004.05e297fd.chunk.js",
|
|
47
48
|
"static/js/5783.1caefe8d.chunk.js": "/static/js/5783.1caefe8d.chunk.js",
|
|
@@ -52,20 +53,22 @@
|
|
|
52
53
|
"static/js/6449.98df60ee.chunk.js": "/static/js/6449.98df60ee.chunk.js",
|
|
53
54
|
"static/js/1839.45bfc04d.chunk.js": "/static/js/1839.45bfc04d.chunk.js",
|
|
54
55
|
"static/js/4752.3ffe3024.chunk.js": "/static/js/4752.3ffe3024.chunk.js",
|
|
55
|
-
"static/css/
|
|
56
|
-
"static/js/
|
|
57
|
-
"static/js/
|
|
56
|
+
"static/css/7866.1edfa457.chunk.css": "/static/css/7866.1edfa457.chunk.css",
|
|
57
|
+
"static/js/7866.47855e8c.chunk.js": "/static/js/7866.47855e8c.chunk.js",
|
|
58
|
+
"static/js/3849.3df70f1e.chunk.js": "/static/js/3849.3df70f1e.chunk.js",
|
|
58
59
|
"static/js/2070.376fb773.chunk.js": "/static/js/2070.376fb773.chunk.js",
|
|
59
60
|
"static/js/2967.cfd21d76.chunk.js": "/static/js/2967.cfd21d76.chunk.js",
|
|
60
61
|
"static/js/865.6b1ec0ad.chunk.js": "/static/js/865.6b1ec0ad.chunk.js",
|
|
62
|
+
"static/js/1001.b6744dec.chunk.js": "/static/js/1001.b6744dec.chunk.js",
|
|
61
63
|
"static/js/4563.d08f3466.chunk.js": "/static/js/4563.d08f3466.chunk.js",
|
|
62
64
|
"static/js/142.9be80baa.chunk.js": "/static/js/142.9be80baa.chunk.js",
|
|
63
65
|
"static/js/1673.30a31cf6.chunk.js": "/static/js/1673.30a31cf6.chunk.js",
|
|
64
66
|
"static/js/755.2fe2f05e.chunk.js": "/static/js/755.2fe2f05e.chunk.js",
|
|
65
67
|
"static/js/9166.e335c84b.chunk.js": "/static/js/9166.e335c84b.chunk.js",
|
|
66
|
-
"static/js/6463.
|
|
68
|
+
"static/js/6463.cd216036.chunk.js": "/static/js/6463.cd216036.chunk.js",
|
|
69
|
+
"static/js/973.df151fda.chunk.js": "/static/js/973.df151fda.chunk.js",
|
|
67
70
|
"module.wasm": "/c43e2f2e6b6fd378c8e1.module.wasm",
|
|
68
|
-
"pypi/streamlit-1.
|
|
71
|
+
"pypi/streamlit-1.39.0-cp312-none-any.whl": "/pypi/streamlit-1.39.0-cp312-none-any.whl",
|
|
69
72
|
"static/media/MaterialSymbols-Rounded.woff2": "/static/media/MaterialSymbols-Rounded.ec07649f7a20048d5730.woff2",
|
|
70
73
|
"static/media/fireworks.gif": "/static/media/fireworks.0906f02ea43f1018a6d2.gif",
|
|
71
74
|
"static/media/flake-2.png": "/static/media/flake-2.e3f07d06933dd0e84c24.png",
|
|
@@ -105,8 +108,8 @@
|
|
|
105
108
|
"static/media/KaTeX_Main-Regular.woff2": "/static/media/KaTeX_Main-Regular.f650f111a3b890d116f1.woff2",
|
|
106
109
|
"static/media/KaTeX_Main-Bold.woff2": "/static/media/KaTeX_Main-Bold.39890742bc957b368704.woff2",
|
|
107
110
|
"static/media/KaTeX_SansSerif-Bold.ttf": "/static/media/KaTeX_SansSerif-Bold.5b49f4993ae22d7975b4.ttf",
|
|
108
|
-
"static/media/KaTeX_SansSerif-Italic.ttf": "/static/media/KaTeX_SansSerif-Italic.b257a18c016f37ee4543.ttf",
|
|
109
111
|
"pypi/stlite_lib-0.1.0-py3-none-any.whl": "/pypi/stlite_lib-0.1.0-py3-none-any.whl",
|
|
112
|
+
"static/media/KaTeX_SansSerif-Italic.ttf": "/static/media/KaTeX_SansSerif-Italic.b257a18c016f37ee4543.ttf",
|
|
110
113
|
"static/media/KaTeX_Main-Italic.woff": "/static/media/KaTeX_Main-Italic.fd947498bc16392e76c2.woff",
|
|
111
114
|
"static/media/KaTeX_Fraktur-Bold.ttf": "/static/media/KaTeX_Fraktur-Bold.4c761b3711973ab04edf.ttf",
|
|
112
115
|
"static/media/KaTeX_Fraktur-Regular.ttf": "/static/media/KaTeX_Fraktur-Regular.ed305b5434865e06ffde.ttf",
|
|
@@ -164,6 +167,6 @@
|
|
|
164
167
|
},
|
|
165
168
|
"entrypoints": [
|
|
166
169
|
"static/css/main.43acb583.css",
|
|
167
|
-
"static/js/main.
|
|
170
|
+
"static/js/main.099ed3b9.js"
|
|
168
171
|
]
|
|
169
172
|
}
|
package/build/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>stlite</title><script defer="defer" src="/static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>stlite</title><script defer="defer" src="/static/js/main.099ed3b9.js"></script><link href="/static/css/main.43acb583.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1001],{23046:(t,e,i)=>{i.d(e,{H:()=>o});var s=i(7896),n=i(5057),r=i(63947),o=n.forwardRef((function(t,e){return n.createElement(r.D,(0,s.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),n.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),n.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))}));o.displayName="Delete"},18932:(t,e,i)=>{i.d(e,{i:()=>o});var s=i(7896),n=i(5057),r=i(63947),o=n.forwardRef((function(t,e){return n.createElement(r.D,(0,s.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),n.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),n.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))}));o.displayName="Fullscreen"},93576:(t,e,i)=>{i.d(e,{m:()=>o});var s=i(7896),n=i(5057),r=i(63947),o=n.forwardRef((function(t,e){return n.createElement(r.D,(0,s.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),n.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),n.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))}));o.displayName="FullscreenExit"},88099:(t,e,i)=>{i.d(e,{u:()=>o});var s=i(7896),n=i(5057),r=i(63947),o=n.forwardRef((function(t,e){return n.createElement(r.D,(0,s.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),n.createElement("g",{fill:"none"},n.createElement("rect",{width:24,height:24}),n.createElement("rect",{width:24,height:24}),n.createElement("rect",{width:24,height:24})),n.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),n.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))}));o.displayName="Mic"},51109:(t,e,i)=>{i.d(e,{d:()=>o});var s=i(7896),n=i(5057),r=i(63947),o=n.forwardRef((function(t,e){return n.createElement(r.D,(0,s.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))}));o.displayName="Pause"},14214:(t,e,i)=>{i.d(e,{J:()=>o});var s=i(7896),n=i(5057),r=i(63947),o=n.forwardRef((function(t,e){return n.createElement(r.D,(0,s.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))}));o.displayName="PlayArrow"},26261:(t,e,i)=>{i.d(e,{h:()=>o});var s=i(7896),n=i(5057),r=i(63947),o=n.forwardRef((function(t,e){return n.createElement(r.D,(0,s.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),n.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),n.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))}));o.displayName="Refresh"},27331:(t,e,i)=>{i.d(e,{P:()=>o});var s=i(7896),n=i(5057),r=i(63947),o=n.forwardRef((function(t,e){return n.createElement(r.D,(0,s.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),n.createElement("g",{fill:"none"},n.createElement("rect",{width:24,height:24}),n.createElement("rect",{width:24,height:24})),n.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))}));o.displayName="StopCircle"},10170:(t,e,i)=>{function s(t,e,i,s){return new(i||(i=Promise))((function(n,r){function o(t){try{h(s.next(t))}catch(t){r(t)}}function a(t){try{h(s.throw(t))}catch(t){r(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}h((s=s.apply(t,e||[])).next())}))}i.d(e,{Z:()=>h}),"function"==typeof SuppressedError&&SuppressedError;class n{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(e),null==i?void 0:i.once){const i=()=>{this.un(t,i),this.un(t,e)};return this.on(t,i),i}return()=>this.un(t,e)}un(t,e){var i;null===(i=this.listeners[t])||void 0===i||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach((t=>t(...e)))}}class r extends n{constructor(t){super(),this.subscriptions=[],this.options=t}onInit(){}_init(t){this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach((t=>t()))}}class o extends n{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",(()=>{requestAnimationFrame((()=>{this.emit("tick")}))})),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}}const a=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];class h extends r{constructor(t){var e,i,s,n,r,a;super(Object.assign(Object.assign({},t),{audioBitsPerSecond:null!==(e=t.audioBitsPerSecond)&&void 0!==e?e:128e3,scrollingWaveform:null!==(i=t.scrollingWaveform)&&void 0!==i&&i,scrollingWaveformWindow:null!==(s=t.scrollingWaveformWindow)&&void 0!==s?s:5,continuousWaveform:null!==(n=t.continuousWaveform)&&void 0!==n&&n,renderRecordedAudio:null===(r=t.renderRecordedAudio)||void 0===r||r,mediaRecorderTimeslice:null!==(a=t.mediaRecorderTimeslice)&&void 0!==a?a:void 0})),this.stream=null,this.mediaRecorder=null,this.dataWindow=null,this.isWaveformPaused=!1,this.lastStartTime=0,this.lastDuration=0,this.duration=0,this.timer=new o,this.subscriptions.push(this.timer.on("tick",(()=>{const t=performance.now()-this.lastStartTime;this.duration=this.isPaused()?this.duration:this.lastDuration+t,this.emit("record-progress",this.duration)})))}static create(t){return new h(t||{})}renderMicStream(t){var e;const i=new AudioContext,s=i.createMediaStreamSource(t),n=i.createAnalyser();s.connect(n),this.options.continuousWaveform&&(n.fftSize=32);const r=n.frequencyBinCount,o=new Float32Array(r);let a=0;this.wavesurfer&&(null!==(e=this.originalOptions)&&void 0!==e||(this.originalOptions=Object.assign({},this.wavesurfer.options)),this.wavesurfer.options.interact=!1,this.options.scrollingWaveform&&(this.wavesurfer.options.cursorWidth=0));const h=setInterval((()=>{var t,e,s,h;if(!this.isWaveformPaused){if(n.getFloatTimeDomainData(o),this.options.scrollingWaveform){const t=Math.floor((this.options.scrollingWaveformWindow||0)*i.sampleRate),e=Math.min(t,this.dataWindow?this.dataWindow.length+r:r),s=new Float32Array(t);if(this.dataWindow){const i=Math.max(0,t-this.dataWindow.length);s.set(this.dataWindow.slice(-e+r),i)}s.set(o,t-r),this.dataWindow=s}else if(this.options.continuousWaveform){if(!this.dataWindow){const i=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):(null!==(e=null===(t=this.wavesurfer)||void 0===t?void 0:t.getWidth())&&void 0!==e?e:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(i)}let i=0;for(let t=0;t<r;t++){const e=Math.abs(o[t]);e>i&&(i=e)}if(a+1>this.dataWindow.length){const t=new Float32Array(2*this.dataWindow.length);t.set(this.dataWindow,0),this.dataWindow=t}this.dataWindow[a]=i,a++}else this.dataWindow=o;if(this.wavesurfer){const t=(null!==(h=null===(s=this.dataWindow)||void 0===s?void 0:s.length)&&void 0!==h?h:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:t).then((()=>{this.wavesurfer&&this.options.continuousWaveform&&(this.wavesurfer.setTime(this.getDuration()/1e3),this.wavesurfer.options.minPxPerSec||this.wavesurfer.setOptions({minPxPerSec:this.wavesurfer.getWidth()/this.wavesurfer.getDuration()}))})).catch((t=>{console.error("Error rendering real-time recording data:",t)}))}}}),10);return{onDestroy:()=>{clearInterval(h),null==s||s.disconnect(),null==i||i.close()},onEnd:()=>{this.isWaveformPaused=!0,clearInterval(h),this.stopMic()}}}startMic(t){return s(this,void 0,void 0,(function*(){let e;try{e=yield navigator.mediaDevices.getUserMedia({audio:!(null==t?void 0:t.deviceId)||{deviceId:t.deviceId}})}catch(e){throw new Error("Error accessing the microphone: "+e.message)}const{onDestroy:i,onEnd:s}=this.renderMicStream(e);return this.subscriptions.push(this.once("destroy",i)),this.subscriptions.push(this.once("record-end",s)),this.stream=e,e}))}stopMic(){this.stream&&(this.stream.getTracks().forEach((t=>t.stop())),this.stream=null,this.mediaRecorder=null)}startRecording(t){return s(this,void 0,void 0,(function*(){const e=this.stream||(yield this.startMic(t));this.dataWindow=null;const i=this.mediaRecorder||new MediaRecorder(e,{mimeType:this.options.mimeType||a.find((t=>MediaRecorder.isTypeSupported(t))),audioBitsPerSecond:this.options.audioBitsPerSecond});this.mediaRecorder=i,this.stopRecording();const s=[];i.ondataavailable=t=>{t.data.size>0&&s.push(t.data),this.emit("record-data-available",t.data)};const n=t=>{var e;const n=new Blob(s,{type:i.mimeType});this.emit(t,n),this.options.renderRecordedAudio&&(this.applyOriginalOptionsIfNeeded(),null===(e=this.wavesurfer)||void 0===e||e.load(URL.createObjectURL(n)))};i.onpause=()=>n("record-pause"),i.onstop=()=>n("record-end"),i.start(this.options.mediaRecorderTimeslice),this.lastStartTime=performance.now(),this.lastDuration=0,this.duration=0,this.isWaveformPaused=!1,this.timer.start(),this.emit("record-start")}))}getDuration(){return this.duration}isRecording(){var t;return"recording"===(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}isPaused(){var t;return"paused"===(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}isActive(){var t;return"inactive"!==(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}stopRecording(){var t;this.isActive()&&(null===(t=this.mediaRecorder)||void 0===t||t.stop(),this.timer.stop())}pauseRecording(){var t,e;this.isRecording()&&(this.isWaveformPaused=!0,null===(t=this.mediaRecorder)||void 0===t||t.requestData(),null===(e=this.mediaRecorder)||void 0===e||e.pause(),this.timer.stop(),this.lastDuration=this.duration)}resumeRecording(){var t;this.isPaused()&&(this.isWaveformPaused=!1,null===(t=this.mediaRecorder)||void 0===t||t.resume(),this.timer.start(),this.lastStartTime=performance.now(),this.emit("record-resume"))}static getAvailableAudioDevices(){return s(this,void 0,void 0,(function*(){return navigator.mediaDevices.enumerateDevices().then((t=>t.filter((t=>"audioinput"===t.kind))))}))}destroy(){this.applyOriginalOptionsIfNeeded(),super.destroy(),this.stopRecording(),this.stopMic()}applyOriginalOptionsIfNeeded(){this.wavesurfer&&this.originalOptions&&(this.wavesurfer.setOptions(this.originalOptions),delete this.originalOptions)}}},65332:(t,e,i)=>{function s(t,e,i,s){return new(i||(i=Promise))((function(n,r){function o(t){try{h(s.next(t))}catch(t){r(t)}}function a(t){try{h(s.throw(t))}catch(t){r(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}h((s=s.apply(t,e||[])).next())}))}i.d(e,{Z:()=>v}),"function"==typeof SuppressedError&&SuppressedError;class n{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(e),null==i?void 0:i.once){const i=()=>{this.un(t,i),this.un(t,e)};return this.on(t,i),i}return()=>this.un(t,e)}un(t,e){var i;null===(i=this.listeners[t])||void 0===i||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach((t=>t(...e)))}}const r={decode:function(t,e){return s(this,void 0,void 0,(function*(){const i=new AudioContext({sampleRate:e});return i.decodeAudioData(t).finally((()=>i.close()))}))},createBuffer:function(t,e){return"number"==typeof t[0]&&(t=[t]),function(t){const e=t[0];if(e.some((t=>t>1||t<-1))){const i=e.length;let s=0;for(let t=0;t<i;t++){const i=Math.abs(e[t]);i>s&&(s=i)}for(const e of t)for(let t=0;t<i;t++)e[t]/=s}}(t),{duration:e,length:t[0].length,sampleRate:t[0].length/e,numberOfChannels:t.length,getChannelData:e=>null==t?void 0:t[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function o(t,e){const i=e.xmlns?document.createElementNS(e.xmlns,t):document.createElement(t);for(const[s,n]of Object.entries(e))if("children"===s)for(const[t,r]of Object.entries(e))"string"==typeof r?i.appendChild(document.createTextNode(r)):i.appendChild(o(t,r));else"style"===s?Object.assign(i.style,n):"textContent"===s?i.textContent=n:i.setAttribute(s,n.toString());return i}function a(t,e,i){const s=o(t,e||{});return null==i||i.appendChild(s),s}var h=Object.freeze({__proto__:null,createElement:a,default:a});const l={fetchBlob:function(t,e,i){return s(this,void 0,void 0,(function*(){const n=yield fetch(t,i);if(n.status>=400)throw new Error(`Failed to fetch ${t}: ${n.status} (${n.statusText})`);return function(t,e){s(this,void 0,void 0,(function*(){if(!t.body||!t.headers)return;const i=t.body.getReader(),n=Number(t.headers.get("Content-Length"))||0;let r=0;const o=t=>s(this,void 0,void 0,(function*(){r+=(null==t?void 0:t.length)||0;const i=Math.round(r/n*100);e(i)})),a=()=>s(this,void 0,void 0,(function*(){let t;try{t=yield i.read()}catch(t){return}t.done||(o(t.value),yield a())}));a()}))}(n.clone(),e),n.blob()}))}};class d extends n{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),null!=t.playbackRate&&this.onMediaEvent("canplay",(()=>{null!=t.playbackRate&&(this.media.playbackRate=t.playbackRate)}),{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return""!==this.media.canPlayType(t)}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const s=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;try{this.media.src=s}catch(e){this.media.src=t}}destroy(){this.media.pause(),this.isExternalMedia||(this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return s(this,void 0,void 0,(function*(){return this.media.play()}))}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=t}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){null!=e&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class c extends n{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[s,n]=this.initHtml();i.appendChild(s),this.container=s,this.scrollContainer=n.querySelector(".scroll"),this.wrapper=n.querySelector(".wrapper"),this.canvasWrapper=n.querySelector(".canvases"),this.progressWrapper=n.querySelector(".progress"),this.cursor=n.querySelector(".cursor"),e&&n.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if("string"==typeof t?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=t=>{const e=this.wrapper.getBoundingClientRect(),i=t.clientX-e.left,s=t.clientY-e.top;return[i/e.width,s/e.height]};if(this.wrapper.addEventListener("click",(e=>{const[i,s]=t(e);this.emit("click",i,s)})),this.wrapper.addEventListener("dblclick",(e=>{const[i,s]=t(e);this.emit("dblclick",i,s)})),!0!==this.options.dragToSeek&&"object"!=typeof this.options.dragToSeek||this.initDrag(),this.scrollContainer.addEventListener("scroll",(()=>{const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.scrollContainer,s=t/e,n=(t+i)/e;this.emit("scroll",s,n,t,t+i)})),"function"==typeof ResizeObserver){const t=this.createDelay(100);this.resizeObserver=new ResizeObserver((()=>{t().then((()=>this.onContainerResize())).catch((()=>{}))})),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&"auto"!==this.options.height||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,s,n=3,r=0,o=100){if(!t)return()=>{};const a=matchMedia("(pointer: coarse)").matches;let h=()=>{};const l=l=>{if(l.button!==r)return;l.preventDefault(),l.stopPropagation();let d=l.clientX,c=l.clientY,u=!1;const p=Date.now(),m=s=>{if(s.preventDefault(),s.stopPropagation(),a&&Date.now()-p<o)return;const r=s.clientX,h=s.clientY,l=r-d,m=h-c;if(u||Math.abs(l)>n||Math.abs(m)>n){const s=t.getBoundingClientRect(),{left:n,top:o}=s;u||(null==i||i(d-n,c-o),u=!0),e(l,m,r-n,h-o),d=r,c=h}},v=e=>{if(u){const i=e.clientX,n=e.clientY,r=t.getBoundingClientRect(),{left:o,top:a}=r;null==s||s(i-o,n-a)}h()},f=t=>{t.relatedTarget&&t.relatedTarget!==document.documentElement||v(t)},g=t=>{u&&(t.stopPropagation(),t.preventDefault())},b=t=>{u&&t.preventDefault()};document.addEventListener("pointermove",m),document.addEventListener("pointerup",v),document.addEventListener("pointerout",f),document.addEventListener("pointercancel",f),document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("click",g,{capture:!0}),h=()=>{document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",v),document.removeEventListener("pointerout",f),document.removeEventListener("pointercancel",f),document.removeEventListener("touchmove",b),setTimeout((()=>{document.removeEventListener("click",g,{capture:!0})}),10)}};return t.addEventListener("pointerdown",l),()=>{h(),t.removeEventListener("pointerdown",l)}}(this.wrapper,((t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))}),(t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}),(t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))})))}getHeight(t,e){var i;const s=(null===(i=this.audioData)||void 0===i?void 0:i.numberOfChannels)||1;if(null==t)return 128;if(!isNaN(Number(t)))return Number(t);if("auto"===t){const t=this.parent.clientHeight||128;return(null==e?void 0:e.every((t=>!t.overlay)))?t/s:t}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&"string"==typeof this.options.cspNonce?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`\n <style${i?` nonce="${i}"`:""}>\n :host {\n user-select: none;\n min-width: 1px;\n }\n :host audio {\n display: block;\n width: 100%;\n }\n :host .scroll {\n overflow-x: auto;\n overflow-y: hidden;\n width: 100%;\n position: relative;\n }\n :host .noScrollbar {\n scrollbar-color: transparent;\n scrollbar-width: none;\n }\n :host .noScrollbar::-webkit-scrollbar {\n display: none;\n -webkit-appearance: none;\n }\n :host .wrapper {\n position: relative;\n overflow: visible;\n z-index: 2;\n }\n :host .canvases {\n min-height: ${this.getHeight(this.options.height,this.options.splitChannels)}px;\n }\n :host .canvases > div {\n position: relative;\n }\n :host canvas {\n display: block;\n position: absolute;\n top: 0;\n image-rendering: pixelated;\n }\n :host .progress {\n pointer-events: none;\n position: absolute;\n z-index: 2;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n overflow: hidden;\n }\n :host .progress > div {\n position: relative;\n }\n :host .cursor {\n pointer-events: none;\n position: absolute;\n z-index: 5;\n top: 0;\n left: 0;\n height: 100%;\n border-radius: 2px;\n }\n </style>\n\n <div class="scroll" part="scroll">\n <div class="wrapper" part="wrapper">\n <div class="canvases" part="canvases"></div>\n <div class="progress" part="progress"></div>\n <div class="cursor" part="cursor"></div>\n </div>\n </div>\n `,[t,e]}setOptions(t){if(this.options.container!==t.container){const e=this.parentFromOptionsContainer(t.container);e.appendChild(this.container),this.parent=e}!0!==t.dragToSeek&&"object"!=typeof this.options.dragToSeek||this.initDrag(),this.options=t,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(t){this.scrollContainer.scrollLeft=t}setScrollPercentage(t){const{scrollWidth:e}=this.scrollContainer,i=e*t;this.setScroll(i)}destroy(){var t,e;this.subscriptions.forEach((t=>t())),this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(e=this.unsubscribeOnScroll)||void 0===e||e.call(this)}createDelay(t=10){let e,i;const s=()=>{e&&clearTimeout(e),i&&i()};return this.timeouts.push(s),()=>new Promise(((n,r)=>{s(),i=r,e=setTimeout((()=>{e=void 0,i=void 0,n()}),t)}))}convertColorValues(t){if(!Array.isArray(t))return t||"";if(t.length<2)return t[0]||"";const e=document.createElement("canvas"),i=e.getContext("2d"),s=e.height*(window.devicePixelRatio||1),n=i.createLinearGradient(0,0,0,s),r=1/(t.length-1);return t.forEach(((t,e)=>{const i=e*r;n.addColorStop(i,t)})),n}getPixelRatio(){return Math.max(1,window.devicePixelRatio||1)}renderBarWaveform(t,e,i,s){const n=t[0],r=t[1]||t[0],o=n.length,{width:a,height:h}=i.canvas,l=h/2,d=this.getPixelRatio(),c=e.barWidth?e.barWidth*d:1,u=e.barGap?e.barGap*d:e.barWidth?c/2:0,p=e.barRadius||0,m=a/(c+u)/o,v=p&&"roundRect"in i?"roundRect":"rect";i.beginPath();let f=0,g=0,b=0;for(let y=0;y<=o;y++){const t=Math.round(y*m);if(t>f){const n=Math.round(g*l*s),r=n+Math.round(b*l*s)||1;let o=l-n;"top"===e.barAlign?o=0:"bottom"===e.barAlign&&(o=h-r),i[v](f*(c+u),o,c,r,p),f=t,g=0,b=0}const o=Math.abs(n[y]||0),a=Math.abs(r[y]||0);o>g&&(g=o),a>b&&(b=a)}i.fill(),i.closePath()}renderLineWaveform(t,e,i,s){const n=e=>{const n=t[e]||t[0],r=n.length,{height:o}=i.canvas,a=o/2,h=i.canvas.width/r;i.moveTo(0,a);let l=0,d=0;for(let t=0;t<=r;t++){const r=Math.round(t*h);if(r>l){const t=a+(Math.round(d*a*s)||1)*(0===e?-1:1);i.lineTo(l,t),l=r,d=0}const o=Math.abs(n[t]||0);o>d&&(d=o)}i.lineTo(l,a)};i.beginPath(),n(0),n(1),i.fill(),i.closePath()}renderWaveform(t,e,i){if(i.fillStyle=this.convertColorValues(e.waveColor),e.renderFunction)return void e.renderFunction(t,i);let s=e.barHeight||1;if(e.normalize){const e=Array.from(t[0]).reduce(((t,e)=>Math.max(t,Math.abs(e))),0);s=e?1/e:1}e.barWidth||e.barGap||e.barAlign?this.renderBarWaveform(t,e,i,s):this.renderLineWaveform(t,e,i,s)}renderSingleCanvas(t,e,i,s,n,r,o){const a=this.getPixelRatio(),h=document.createElement("canvas");h.width=Math.round(i*a),h.height=Math.round(s*a),h.style.width=`${i}px`,h.style.height=`${s}px`,h.style.left=`${Math.round(n)}px`,r.appendChild(h);const l=h.getContext("2d");if(this.renderWaveform(t,e,l),h.width>0&&h.height>0){const t=h.cloneNode(),i=t.getContext("2d");i.drawImage(h,0,0),i.globalCompositeOperation="source-in",i.fillStyle=this.convertColorValues(e.progressColor),i.fillRect(0,0,h.width,h.height),o.appendChild(t)}}renderMultiCanvas(t,e,i,s,n,r){const o=this.getPixelRatio(),{clientWidth:a}=this.scrollContainer,h=i/o;let l=Math.min(c.MAX_CANVAS_WIDTH,a,h),d={};if(e.barWidth||e.barGap){const t=e.barWidth||.5,i=t+(e.barGap||t/2);l%i!=0&&(l=Math.floor(l/i)*i)}const u=i=>{if(i<0||i>=p)return;if(d[i])return;d[i]=!0;const o=i*l,a=Math.min(h-o,l);if(a<=0)return;const c=t.map((t=>{const e=Math.floor(o/h*t.length),i=Math.floor((o+a)/h*t.length);return t.slice(e,i)}));this.renderSingleCanvas(c,e,a,s,o,n,r)},p=Math.ceil(h/l);if(!this.isScrollable){for(let t=0;t<p;t++)u(t);return}const m=this.scrollContainer.scrollLeft/h,v=Math.floor(m*p);u(v-1),u(v),u(v+1),p>1&&(this.unsubscribeOnScroll=this.on("scroll",(()=>{const{scrollLeft:t}=this.scrollContainer,e=Math.floor(t/h*p);Object.keys(d).length>c.MAX_NODES&&(n.innerHTML="",r.innerHTML="",d={}),u(e-1),u(e),u(e+1)})))}renderChannel(t,e,i,s){var{overlay:n}=e,r=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(s=Object.getOwnPropertySymbols(t);n<s.length;n++)e.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(t,s[n])&&(i[s[n]]=t[s[n]])}return i}(e,["overlay"]);const o=document.createElement("div"),a=this.getHeight(r.height,r.splitChannels);o.style.height=`${a}px`,n&&s>0&&(o.style.marginTop=`-${a}px`),this.canvasWrapper.style.minHeight=`${a}px`,this.canvasWrapper.appendChild(o);const h=o.cloneNode();this.progressWrapper.appendChild(h),this.renderMultiCanvas(t,r,i,a,o,h)}render(t){return s(this,void 0,void 0,(function*(){var e;this.timeouts.forEach((t=>t())),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",null!=this.options.width&&(this.scrollContainer.style.width="number"==typeof this.options.width?`${this.options.width}px`:this.options.width);const i=this.getPixelRatio(),s=this.scrollContainer.clientWidth,n=Math.ceil(t.duration*(this.options.minPxPerSec||0));this.isScrollable=n>s;const r=this.options.fillParent&&!this.isScrollable,o=(r?s:n)*i;if(this.wrapper.style.width=r?"100%":`${n}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=t,this.emit("render"),this.options.splitChannels)for(let a=0;a<t.numberOfChannels;a++){const i=Object.assign(Object.assign({},this.options),null===(e=this.options.splitChannels)||void 0===e?void 0:e[a]);this.renderChannel([t.getChannelData(a)],i,o,a)}else{const e=[t.getChannelData(0)];t.numberOfChannels>1&&e.push(t.getChannelData(1)),this.renderChannel(e,this.options,o,0)}Promise.resolve().then((()=>this.emit("rendered")))}))}reRender(){var t;if(null===(t=this.unsubscribeOnScroll)||void 0===t||t.call(this),delete this.unsubscribeOnScroll,!this.audioData)return;const{scrollWidth:e}=this.scrollContainer,{right:i}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&e!==this.scrollContainer.scrollWidth){const{right:t}=this.progressWrapper.getBoundingClientRect();let e=t-i;e*=2,e=e<0?Math.floor(e):Math.ceil(e),e/=2,this.scrollContainer.scrollLeft+=e}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,e=!1){const{scrollLeft:i,scrollWidth:s,clientWidth:n}=this.scrollContainer,r=t*s,o=i,a=i+n,h=n/2;if(this.isDragging){const t=30;r+t>a?this.scrollContainer.scrollLeft+=t:r-t<o&&(this.scrollContainer.scrollLeft-=t)}else{(r<o||r>a)&&(this.scrollContainer.scrollLeft=r-(this.options.autoCenter?h:0));const t=r-i-h;e&&this.options.autoCenter&&t>0&&(this.scrollContainer.scrollLeft+=Math.min(t,10))}{const t=this.scrollContainer.scrollLeft,e=t/s,i=(t+n)/s;this.emit("scroll",e,i,t,t+n)}}renderProgress(t,e){if(isNaN(t))return;const i=100*t;this.canvasWrapper.style.clipPath=`polygon(${i}% 0, 100% 0, 100% 100%, ${i}% 100%)`,this.progressWrapper.style.width=`${i}%`,this.cursor.style.left=`${i}%`,this.cursor.style.transform=`translateX(-${100===Math.round(i)?this.options.cursorWidth:0}px)`,this.isScrollable&&this.options.autoScroll&&this.scrollIntoView(t,e)}exportImage(t,e,i){return s(this,void 0,void 0,(function*(){const s=this.canvasWrapper.querySelectorAll("canvas");if(!s.length)throw new Error("No waveform data");if("dataURL"===i){const i=Array.from(s).map((i=>i.toDataURL(t,e)));return Promise.resolve(i)}return Promise.all(Array.from(s).map((i=>new Promise(((s,n)=>{i.toBlob((t=>{t?s(t):n(new Error("Could not export image"))}),t,e)})))))}))}}c.MAX_CANVAS_WIDTH=8e3,c.MAX_NODES=10;class u extends n{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",(()=>{requestAnimationFrame((()=>{this.emit("tick")}))})),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}}class p extends n{constructor(t=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=t,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return s(this,void 0,void 0,(function*(){}))}get src(){return this.currentSrc}set src(t){if(this.currentSrc=t,this._duration=void 0,!t)return this.buffer=null,void this.emit("emptied");fetch(t).then((e=>{if(e.status>=400)throw new Error(`Failed to fetch ${t}: ${e.status} (${e.statusText})`);return e.arrayBuffer()})).then((e=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(e))).then((e=>{this.currentSrc===t&&(this.buffer=e,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}))}_play(){var t;if(!this.paused)return;this.paused=!1,null===(t=this.bufferNode)||void 0===t||t.disconnect(),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let e=this.playedDuration*this._playbackRate;e>=this.duration&&(e=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,e),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var t;this.paused=!0,null===(t=this.bufferNode)||void 0===t||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return s(this,void 0,void 0,(function*(){this.paused&&(this._play(),this.emit("play"))}))}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){var e,i;const s=t-this.currentTime;null===(e=this.bufferNode)||void 0===e||e.stop(this.audioContext.currentTime+s),null===(i=this.bufferNode)||void 0===i||i.addEventListener("ended",(()=>{this.bufferNode=null,this.pause()}),{once:!0})}setSinkId(t){return s(this,void 0,void 0,(function*(){return this.audioContext.setSinkId(t)}))}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this.bufferNode&&(this.bufferNode.playbackRate.value=t)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(t){const e=!this.paused;e&&this._pause(),this.playedDuration=t/this._playbackRate,e&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,e;return null!==(t=this._duration)&&void 0!==t?t:(null===(e=this.buffer)||void 0===e?void 0:e.duration)||0}set duration(t){this._duration=t}get volume(){return this.gainNode.gain.value}set volume(t){this.gainNode.gain.value=t,this.emit("volumechange")}get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(t){return/^(audio|video)\//.test(t)}getGainNode(){return this.gainNode}getChannelData(){const t=[];if(!this.buffer)return t;const e=this.buffer.numberOfChannels;for(let i=0;i<e;i++)t.push(this.buffer.getChannelData(i));return t}}const m={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class v extends d{static create(t){return new v(t)}constructor(t){const e=t.media||("WebAudio"===t.backend?new p:void 0);super({media:e,mediaControls:t.mediaControls,autoplay:t.autoplay,playbackRate:t.audioRate}),this.plugins=[],this.decodedData=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.options=Object.assign({},m,t),this.timer=new u;const i=e?void 0:this.getMediaElement();this.renderer=new c(this.options,i),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initPlugins();const s=this.options.url||this.getSrc()||"";Promise.resolve().then((()=>{this.emit("init");const{peaks:t,duration:e}=this.options;(s||t&&e)&&this.load(s,t,e).catch((()=>null))}))}updateProgress(t=this.getCurrentTime()){return this.renderer.renderProgress(t/this.getDuration(),this.isPlaying()),t}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",(()=>{if(!this.isSeeking()){const t=this.updateProgress();this.emit("timeupdate",t),this.emit("audioprocess",t)}})))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",(()=>{const t=this.updateProgress();this.emit("timeupdate",t)})),this.onMediaEvent("play",(()=>{this.emit("play"),this.timer.start()})),this.onMediaEvent("pause",(()=>{this.emit("pause"),this.timer.stop()})),this.onMediaEvent("emptied",(()=>{this.timer.stop()})),this.onMediaEvent("ended",(()=>{this.emit("finish")})),this.onMediaEvent("seeking",(()=>{this.emit("seeking",this.getCurrentTime())})),this.onMediaEvent("error",(t=>{this.emit("error",t.error)})))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",((t,e)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,e))})),this.renderer.on("dblclick",((t,e)=>{this.emit("dblclick",t,e)})),this.renderer.on("scroll",((t,e,i,s)=>{const n=this.getDuration();this.emit("scroll",t*n,e*n,i,s)})),this.renderer.on("render",(()=>{this.emit("redraw")})),this.renderer.on("rendered",(()=>{this.emit("redrawcomplete")})),this.renderer.on("dragstart",(t=>{this.emit("dragstart",t)})),this.renderer.on("dragend",(t=>{this.emit("dragend",t)})));{let t;this.subscriptions.push(this.renderer.on("drag",(e=>{if(!this.options.interact)return;let i;this.renderer.renderProgress(e),clearTimeout(t),this.isPlaying()?i=0:!0===this.options.dragToSeek?i=200:"object"==typeof this.options.dragToSeek&&void 0!==this.options.dragToSeek&&(i=this.options.dragToSeek.debounceTime),t=setTimeout((()=>{this.seekTo(e)}),i),this.emit("interaction",e*this.getDuration()),this.emit("drag",e)})))}}initPlugins(){var t;(null===(t=this.options.plugins)||void 0===t?void 0:t.length)&&this.options.plugins.forEach((t=>{this.registerPlugin(t)}))}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach((t=>t())),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),null!=t.mediaControls&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){return t._init(this),this.plugins.push(t),this.subscriptions.push(t.once("destroy",(()=>{this.plugins=this.plugins.filter((e=>e!==t))}))),t}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const e=t/this.getDuration();this.renderer.setScrollPercentage(e)}getActivePlugins(){return this.plugins}loadAudio(t,e,i,n){return s(this,void 0,void 0,(function*(){var s;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,!e&&!i){const i=this.options.fetchParams||{};window.AbortController&&!i.signal&&(this.abortController=new AbortController,i.signal=null===(s=this.abortController)||void 0===s?void 0:s.signal);const n=t=>this.emit("loading",t);e=yield l.fetchBlob(t,n,i)}this.setSrc(t,e);const o=yield new Promise((t=>{const e=n||this.getDuration();e?t(e):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",(()=>t(this.getDuration())),{once:!0}))}));if(!t&&!e){const t=this.getMediaElement();t instanceof p&&(t.duration=o)}if(i)this.decodedData=r.createBuffer(i,o||0);else if(e){const t=yield e.arrayBuffer();this.decodedData=yield r.decode(t,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())}))}load(t,e,i){return s(this,void 0,void 0,(function*(){try{return yield this.loadAudio(t,void 0,e,i)}catch(s){throw this.emit("error",s),s}}))}loadBlob(t,e,i){return s(this,void 0,void 0,(function*(){try{return yield this.loadAudio("",t,e,i)}catch(s){throw this.emit("error",s),s}}))}zoom(t){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(t),this.emit("zoom",t)}getDecodedData(){return this.decodedData}exportPeaks({channels:t=2,maxLength:e=8e3,precision:i=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const s=Math.min(t,this.decodedData.numberOfChannels),n=[];for(let r=0;r<s;r++){const t=this.decodedData.getChannelData(r),s=[],o=t.length/e;for(let n=0;n<e;n++){const e=t.slice(Math.floor(n*o),Math.ceil((n+1)*o));let r=0;for(let t=0;t<e.length;t++){const i=e[t];Math.abs(i)>Math.abs(r)&&(r=i)}s.push(Math.round(r*i)/i)}n.push(s)}return n}getDuration(){let t=super.getDuration()||0;return 0!==t&&t!==1/0||!this.decodedData||(t=this.decodedData.duration),t}toggleInteraction(t){this.options.interact=t}setTime(t){super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const e=this.getDuration()*t;this.setTime(e)}playPause(){return s(this,void 0,void 0,(function*(){return this.isPlaying()?this.pause():this.play()}))}stop(){this.pause(),this.setTime(0)}skip(t){this.setTime(this.getCurrentTime()+t)}empty(){this.load("",[[0]],.001)}setMediaElement(t){this.unsubscribePlayerEvents(),super.setMediaElement(t),this.initPlayerEvents()}exportImage(){return s(this,arguments,void 0,(function*(t="image/png",e=1,i="dataURL"){return this.renderer.exportImage(t,e,i)}))}destroy(){var t;this.emit("destroy"),null===(t=this.abortController)||void 0===t||t.abort(),this.plugins.forEach((t=>t.destroy())),this.subscriptions.forEach((t=>t())),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}}v.BasePlugin=class extends n{constructor(t){super(),this.subscriptions=[],this.options=t}onInit(){}_init(t){this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach((t=>t()))}},v.dom=h}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1046],{52955:(e,t,r)=>{r.d(t,{K:()=>i,O:()=>l});var o=r(5057),n=r(50120);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,n.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,n.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function l(e){let{element:t,widgetMgr:r,onFormCleared:i}=e;(0,o.useEffect)((()=>{if(!(0,n.bM)(t.formId))return;const e=r.addFormClearedListener(t.formId,i);return()=>{e.disconnect()}}),[t,r,i])}},31046:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var o=r(5057),n=r(61839),i=r(97296),l=r(81607),a=r(47206),s=r(52955),d=r(38944),u=r(93905),c=r(21034),p=r(98790),f=r(50120);const b=(0,r(82160).Z)("div",{target:"e1ipygm10"})((()=>({position:"absolute",top:"50%",right:"2.05em"})),"");var y=r(96266);class g extends o.PureComponent{constructor(){super(...arguments),this.formClearHelper=new s.K,this.state={value:this.initialValue},this.commitWidgetValue=e=>{const{widgetMgr:t,element:r,fragmentId:o}=this.props;t.setStringValue(r,this.state.value,e,o)},this.onFormCleared=()=>{this.setState(((e,t)=>{var r;return{value:null!==(r=t.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=e=>{let t;t=null===e?null:this.dateToString(e),this.setState({value:t},(()=>this.commitWidgetValue({fromUi:!0})))},this.stringToDate=e=>{if(null===e)return null;const[t,r]=e.split(":").map(Number),o=new Date;return o.setHours(t),o.setMinutes(r),o},this.dateToString=e=>`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}get initialValue(){var e;const t=this.props.widgetMgr.getStringValue(this.props.element);return null!==(e=null!==t&&void 0!==t?t:this.props.element.default)&&void 0!==e?e:null}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:null!==e&&void 0!==e?e:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{disabled:t,width:r,element:o,widgetMgr:a,theme:s}=this.props,g=(0,f.le)(o.default)&&!t,m={width:r},h={Select:{props:{disabled:t,overrides:{ControlContainer:{style:{height:s.sizes.minElementHeight,borderLeftWidth:s.sizes.borderWidth,borderRightWidth:s.sizes.borderWidth,borderTopWidth:s.sizes.borderWidth,borderBottomWidth:s.sizes.borderWidth}},IconsContainer:{style:()=>({paddingRight:s.spacing.sm})},ValueContainer:{style:()=>({lineHeight:s.lineHeights.inputWidget,paddingRight:s.spacing.sm,paddingLeft:s.spacing.sm,paddingBottom:s.spacing.sm,paddingTop:s.spacing.sm})},SingleValue:{props:{"data-testid":"stTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:s.spacing.none,paddingBottom:s.spacing.none})},Popover:{props:{overrides:{Body:{style:()=>({marginTop:s.spacing.px})}}}},SelectArrow:{component:l.Z,props:{overrides:{Svg:{style:()=>({width:s.iconSizes.xl,height:s.iconSizes.xl})}}}}}}}};return this.formClearHelper.manageFormClearListener(a,o.formId,this.onFormCleared),(0,y.jsxs)("div",{className:"stTimeInput","data-testid":"stTimeInput",style:m,children:[(0,y.jsx)(d.O,{label:o.label,disabled:t,labelVisibility:(0,f.iF)(null===(e=o.labelVisibility)||void 0===e?void 0:e.value),children:o.help&&(0,y.jsx)(u.dT,{children:(0,y.jsx)(c.Z,{content:o.help,placement:p.u.TOP_RIGHT})})}),(0,y.jsx)(n.Z,{format:"24",step:o.step?Number(o.step):900,value:(0,f.le)(this.state.value)?void 0:this.stringToDate(this.state.value),onChange:this.handleChange,overrides:h,nullable:g,creatable:!0,"aria-label":o.label}),g&&!(0,f.le)(this.state.value)&&(0,y.jsx)(b,{onClick:()=>{this.handleChange(null)},"data-testid":"stTimeInputClearButton",children:(0,y.jsx)(i.i,{overrides:{Svg:{style:{color:s.colors.darkGray,transform:"scale(1.41)",width:s.spacing.twoXL,":hover":{fill:s.colors.bodyText}}}},$isFocusVisible:!1})})]})}}const m=(0,a.b)(g)},51347:(e,t,r)=>{r.r(t),r.d(t,{ThemeConsumer:()=>l,ThemeProvider:()=>o.Z,createThemedStyled:()=>n.Tp,createThemedUseStyletron:()=>n.fj,createThemedWithStyle:()=>n.o4,expandBorderStyles:()=>i.Qj,hexToRgb:()=>i.oo,styled:()=>n.zo,useStyletron:()=>n.hQ,withStyle:()=>n.w1,withWrapper:()=>n.Le});var o=r(6532),n=r(53381),i=r(97012),l=o.N.Consumer},56653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getOverride=f,t.getOverrideProps=b,t.getOverrides=g,t.mergeConfigurationOverrides=h,t.mergeOverride=m,t.mergeOverrides=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign({},e,t);return Object.keys(r).reduce((function(r,o){return r[o]=m(y(e[o]),y(t[o])),r}),{})},t.toObjectOverride=y,t.useOverrides=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.useMemo((function(){return Object.keys(e).reduce((function(r,o){return r[o]=g(t[o],e[o]),r}),{})}),[t])};var o,n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==p(e)&&"function"!==typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,r&&r.set(e,o);return o}(r(5057)),i=r(97408),l=(o=r(85794))&&o.__esModule?o:{default:o};function a(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},s.apply(this,arguments)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e){return(0,i.isValidElementType)(e)?e:e&&"object"===p(e)?e.component:e}function b(e){return e&&"object"===p(e)?"object"===p(e.props)?u(u({},e.props),{},{$style:e.style}):{$style:e.style}:{}}function y(e){return(0,i.isValidElementType)(e)?{component:e}:e||{}}function g(e,t){var r=f(e)||t;if(e&&"object"===p(e)&&"function"===typeof e.props){0;var o=n.forwardRef((function(t,o){var i=e.props(t),l=b(u(u({},e),{},{props:i}));return n.createElement(r,s({ref:o},l))}));return o.displayName=r.displayName,[o,{}]}var i=b(e);return[r,i]}function m(e,t){var r=u(u({},e),t);return e.props&&t.props&&(r.props=h(e.props,t.props)),e.style&&t.style&&(r.style=h(e.style,t.style)),r}function h(e,t){return"object"===p(e)&&"object"===p(t)?(0,l.default)({},e,t):function(){return(0,l.default)({},"function"===typeof e?e.apply(void 0,arguments):e,"function"===typeof t?t.apply(void 0,arguments):t)}}},85669:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var a=i?Object.getOwnPropertyDescriptor(e,l):null;a&&(a.get||a.set)?Object.defineProperty(n,l,a):n[l]=e[l]}n.default=e,r&&r.set(e,n);return n}(r(5057)),l=r(51347),a=r(56653),s=(n=r(79746))&&n.__esModule?n:{default:n},d=["title","size","color","overrides"];function u(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},c.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);l=!0);}catch(s){a=!0,n=s}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function y(e,t){var r=f((0,l.useStyletron)(),2)[1],o=e.title,n=void 0===o?"Delete Alt":o,u=e.size,b=e.color,y=e.overrides,g=void 0===y?{}:y,m=p(e,d),h=(0,a.mergeOverride)({component:r.icons&&r.icons.DeleteAlt?r.icons.DeleteAlt:null},g&&g.Svg?(0,a.toObjectOverride)(g.Svg):{});return i.createElement(s.default,c({viewBox:"0 0 24 24",ref:t,title:n,size:u,color:b,overrides:{Svg:h}},m),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}var g=i.forwardRef(y);t.default=g},79746:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var a=i?Object.getOwnPropertyDescriptor(e,l):null;a&&(a.get||a.set)?Object.defineProperty(n,l,a):n[l]=e[l]}n.default=e,r&&r.set(e,n);return n}(r(5057)),l=r(56653),a=r(53413),s=(n=r(74155))&&n.__esModule?n:{default:n},d=["children","title","size","color","overrides"];function u(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},c.apply(this,arguments)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);l=!0);}catch(s){a=!0,n=s}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function m(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var h=function(e,t){var r=e.children,o=e.title,n=e.size,u=e.color,p=e.overrides,b=void 0===p?{}:p,g=m(e,d),h=y((0,l.getOverrides)(b.Svg,a.Svg),2),v=h[0],O=h[1],S=v.__STYLETRON__?f(f({title:o,$color:u,$size:n},g),O):f(f({title:o,color:u,size:n},(0,s.default)(g)),(0,s.default)(O));return i.createElement(v,c({"data-baseweb":"icon",ref:t},S),o?i.createElement("title",null,o):null,r)},v=i.forwardRef(h);t.default=v},74155:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};for(var r in e)"$"!==r[0]&&(t[r]=e[r]);return t}},53413:(e,t,r)=>{function o(e){var t=e.$theme,r=e.$size,o=e.$color,n=t.sizing.scale600;r&&(n=t.sizing[r]?t.sizing[r]:"number"===typeof r?"".concat(r,"px"):r);var i="currentColor";return o&&(i=t.colors[o]?t.colors[o]:o),{display:"inline-block",fill:i,color:i,height:n,width:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.Svg=void 0,t.getSvgStyles=o;var n=(0,r(51347).styled)("svg",o);t.Svg=n,n.displayName="Svg",n.displayName="Svg"},85384:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.STATE_CHANGE_TYPE=t.SIZE=t.ENHANCER_POSITION=t.CUSTOM_INPUT_TYPE=t.ADJOINED=void 0;t.STATE_CHANGE_TYPE={change:"change"};t.CUSTOM_INPUT_TYPE={textarea:"textarea"};t.ADJOINED={none:"none",left:"left",right:"right",both:"both"};t.SIZE={mini:"mini",default:"default",compact:"compact",large:"large"};t.ENHANCER_POSITION={start:"start",end:"end"}},97296:(e,t,r)=>{t.i=void 0;var o,n=r(51347),i=r(85384),l=(o=r(85669))&&o.__esModule?o:{default:o};function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u=(0,n.styled)("button",(function(e){var t,r=e.$theme,o=e.$size,n=e.$isFocusVisible,l=(t={},d(t,i.SIZE.mini,r.sizing.scale400),d(t,i.SIZE.compact,r.sizing.scale400),d(t,i.SIZE.default,r.sizing.scale300),d(t,i.SIZE.large,r.sizing.scale200),t)[o];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:l,paddingRight:l,outline:n?"solid 3px ".concat(r.colors.accent):"none",color:r.colors.contentPrimary}}));u.displayName="StyledMaskToggleButton",u.displayName="StyledMaskToggleButton";var c=(0,n.styled)("div",(function(e){var t,r=e.$alignTop,o=void 0!==r&&r,n=e.$size,l=e.$theme,a=(t={},d(t,i.SIZE.mini,l.sizing.scale200),d(t,i.SIZE.compact,l.sizing.scale200),d(t,i.SIZE.default,l.sizing.scale100),d(t,i.SIZE.large,l.sizing.scale0),t)[n];return{display:"flex",alignItems:o?"flex-start":"center",paddingLeft:a,paddingRight:a,paddingTop:o?l.sizing.scale500:"0px",color:l.colors.contentPrimary}}));c.displayName="StyledClearIconContainer",c.displayName="StyledClearIconContainer";var p=(0,n.styled)(l.default,(function(e){var t=e.$theme;return{cursor:"pointer",outline:e.$isFocusVisible?"solid 3px ".concat(t.colors.accent):"none"}}));function f(e,t){var r;return(r={},d(r,i.SIZE.mini,t.font100),d(r,i.SIZE.compact,t.font200),d(r,i.SIZE.default,t.font300),d(r,i.SIZE.large,t.font400),r)[e]}t.i=p,p.displayName="StyledClearIcon",p.displayName="StyledClearIcon";var b=function(e){var t=e.$isFocused,r=e.$adjoined,o=e.$error,n=e.$disabled,l=e.$positive,a=e.$size,d=e.$theme,u=e.$theme,c=u.borders,p=u.colors,b=u.sizing,y=u.typography,g=u.animation,m=e.$hasIconTrailing;return s(s(s(s({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:g.timing200,transitionTimingFunction:g.easeOutCurve},function(e,t){var r=t.inputBorderRadius;return e===i.SIZE.mini&&(r=t.inputBorderRadiusMini),{borderTopLeftRadius:r,borderBottomLeftRadius:r,borderTopRightRadius:r,borderBottomRightRadius:r}}(a,c)),f(a,y)),function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:n.inputFillDisabled,borderRightColor:n.inputFillDisabled,borderTopColor:n.inputFillDisabled,borderBottomColor:n.inputFillDisabled,backgroundColor:n.inputFillDisabled}:t?{borderLeftColor:n.borderSelected,borderRightColor:n.borderSelected,borderTopColor:n.borderSelected,borderBottomColor:n.borderSelected,backgroundColor:n.inputFillActive}:r?{borderLeftColor:n.inputBorderError,borderRightColor:n.inputBorderError,borderTopColor:n.inputBorderError,borderBottomColor:n.inputBorderError,backgroundColor:n.inputFillError}:o?{borderLeftColor:n.inputBorderPositive,borderRightColor:n.inputBorderPositive,borderTopColor:n.inputBorderPositive,borderBottomColor:n.inputBorderPositive,backgroundColor:n.inputFillPositive}:{borderLeftColor:n.inputBorder,borderRightColor:n.inputBorder,borderTopColor:n.inputBorder,borderBottomColor:n.inputBorder,backgroundColor:n.inputFill}}(n,t,o,l,p)),function(e,t,r,o,n){var l=e===i.ADJOINED.both||e===i.ADJOINED.left&&"rtl"!==o||e===i.ADJOINED.right&&"rtl"===o||n&&"rtl"===o,a=e===i.ADJOINED.both||e===i.ADJOINED.right&&"rtl"!==o||e===i.ADJOINED.left&&"rtl"===o||n&&"rtl"!==o;return{paddingLeft:l?r.scale550:"0px",paddingRight:a?r.scale550:"0px"}}(r,0,b,d.direction,m))};var y=(0,n.styled)("div",b);y.displayName="Root",y.displayName="Root";var g=(0,n.styled)("div",(function(e){var t=e.$size,r=e.$disabled,o=e.$isFocused,n=e.$error,l=e.$positive,a=e.$theme,u=a.colors,c=a.sizing,p=a.typography,b=a.animation;return s(s(s({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:b.timing200,transitionTimingFunction:b.easeOutCurve},f(t,p)),function(e,t){var r;return(r={},d(r,i.SIZE.mini,{paddingRight:t.scale400,paddingLeft:t.scale400}),d(r,i.SIZE.compact,{paddingRight:t.scale400,paddingLeft:t.scale400}),d(r,i.SIZE.default,{paddingRight:t.scale300,paddingLeft:t.scale300}),d(r,i.SIZE.large,{paddingRight:t.scale200,paddingLeft:t.scale200}),r)[e]}(t,c)),function(e,t,r,o,n){return e?{color:n.inputEnhancerTextDisabled,backgroundColor:n.inputFillDisabled}:t?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:r?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}(r,o,n,l,u))}));g.displayName="InputEnhancer",g.displayName="InputEnhancer";var m=function(e){var t=e.$isFocused,r=e.$error,o=e.$disabled,n=e.$positive,i=e.$size,l=e.$theme,a=l.colors,d=l.typography,u=l.animation;return s(s({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:u.timing200,transitionTimingFunction:u.easeOutCurve},f(i,d)),function(e,t,r,o,n){return e?{color:n.inputTextDisabled,backgroundColor:n.inputFillDisabled}:t?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:r?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}(o,t,r,n,a))};var h=(0,n.styled)("div",m);h.displayName="InputContainer",h.displayName="InputContainer";var v=function(e){var t=e.$disabled,r=(e.$isFocused,e.$error,e.$size),o=e.$theme,n=o.colors,l=o.sizing;return s(s(s({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:t?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},f(r,o.typography)),function(e,t){var r;return(r={},d(r,i.SIZE.mini,{paddingTop:t.scale100,paddingBottom:t.scale100,paddingLeft:t.scale550,paddingRight:t.scale550}),d(r,i.SIZE.compact,{paddingTop:t.scale200,paddingBottom:t.scale200,paddingLeft:t.scale550,paddingRight:t.scale550}),d(r,i.SIZE.default,{paddingTop:t.scale400,paddingBottom:t.scale400,paddingLeft:t.scale550,paddingRight:t.scale550}),d(r,i.SIZE.large,{paddingTop:t.scale550,paddingBottom:t.scale550,paddingLeft:t.scale550,paddingRight:t.scale550}),r)[e]}(r,l)),function(e,t,r,o){return e?{color:o.inputTextDisabled,"-webkit-text-fill-color":o.inputTextDisabled,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholderDisabled}}:{color:o.contentPrimary,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholder}}}(t,0,0,n))};var O=(0,n.styled)("input",v);O.displayName="Input",O.displayName="Input"},85794:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){return Array.isArray(e)||"[object Object]"=={}.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){t=t||{};for(var n,i,l=arguments.length<=1?0:arguments.length-1,a=0;a<l;a++)for(var s in n=(a+1<1||arguments.length<=a+1?void 0:arguments[a+1])||{})void 0!==r(n[s])&&(o(i=n[s])?t[s]=e(t[s]||Array.isArray(i)&&[]||{},i):t[s]=i);return t}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1189],{71189:(e,t,i)=>{i.r(t),i.d(t,{default:()=>r});i(5057);var s=i(44088),l=i(92649),d=i(38830),n=i(29968),a=i(96266);const r=function(e){const{disabled:t,element:i,widgetMgr:r,width:c,fragmentId:h}=e,o={width:c},u="primary"===i.type?s.nW.PRIMARY:s.nW.SECONDARY,p=!i.help||c;return(0,a.jsx)("div",{className:"stButton","data-testid":"stButton",style:o,children:(0,a.jsx)(l.t,{help:i.help,children:(0,a.jsx)(d.ZP,{kind:u,size:s.V5.SMALL,disabled:t,fluidWidth:!!i.useContainerWidth&&p,onClick:()=>r.setTriggerValue(i,{fromUi:!0},h),children:(0,a.jsx)(n.D,{icon:i.icon,label:i.label})})})})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1261],{71261:(e,t,i)=>{i.r(t),i.d(t,{default:()=>d});var s=i(5057),
|
|
1
|
+
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1261],{71261:(e,t,i)=>{i.r(t),i.d(t,{default:()=>d});var s=i(5057),r=i(52955),o=i(17943),l=i(50120),a=i(96266);class n extends s.PureComponent{constructor(){super(...arguments),this.formClearHelper=new r.K,this.state={value:this.initialValue},this.commitWidgetValue=e=>{const{widgetMgr:t,element:i,fragmentId:s}=this.props;t.setStringValue(i,this.state.value,e,s)},this.onFormCleared=()=>{this.setState(((e,t)=>({value:t.element.default})),(()=>this.commitWidgetValue({fromUi:!0})))},this.onColorClose=e=>{this.setState({value:e},(()=>this.commitWidgetValue({fromUi:!0})))}}get initialValue(){const e=this.props.widgetMgr.getStringValue(this.props.element);return void 0!==e?e:this.props.element.default}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:e},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{element:t,width:i,disabled:s,widgetMgr:r}=this.props,{value:n}=this.state;return this.formClearHelper.manageFormClearListener(r,t.formId,this.onFormCleared),(0,a.jsx)(o.Z,{label:t.label,labelVisibility:(0,l.iF)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),help:t.help,onChange:this.onColorClose,disabled:s,width:i,value:n})}}const d=n},52955:(e,t,i)=>{i.d(t,{K:()=>o,O:()=>l});var s=i(5057),r=i(50120);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,i){(0,r.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,r.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,i),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function l(e){let{element:t,widgetMgr:i,onFormCleared:o}=e;(0,s.useEffect)((()=>{if(!(0,r.bM)(t.formId))return;const e=i.addFormClearedListener(t.formId,o);return()=>{e.disconnect()}}),[t,i,o])}}}]);
|