Files
korean_comments_action/js/korean_comments_action-main.mjs

36 lines
351 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var Oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function El(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ku={exports:{}},Xt=ku.exports={},Le,Be;function Mo(){throw new Error("setTimeout has not been defined")}function To(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Le=setTimeout:Le=Mo}catch{Le=Mo}try{typeof clearTimeout=="function"?Be=clearTimeout:Be=To}catch{Be=To}})();function $u(e){if(Le===setTimeout)return setTimeout(e,0);if((Le===Mo||!Le)&&setTimeout)return Le=setTimeout,setTimeout(e,0);try{return Le(e,0)}catch{try{return Le.call(null,e,0)}catch{return Le.call(this,e,0)}}}function _l(e){if(Be===clearTimeout)return clearTimeout(e);if((Be===To||!Be)&&clearTimeout)return Be=clearTimeout,clearTimeout(e);try{return Be(e)}catch{try{return Be.call(null,e)}catch{return Be.call(this,e)}}}var Te=[],un=!1,qe,Hn=-1;function Al(){!un||!qe||(un=!1,qe.length?Te=qe.concat(Te):Hn=-1,Te.length&&Fu())}function Fu(){if(!un){var e=$u(Al);un=!0;for(var t=Te.length;t;){for(qe=Te,Te=[];++Hn<t;)qe&&qe[Hn].run();Hn=-1,t=Te.length}qe=null,un=!1,_l(e)}}Xt.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Te.push(new Gu(e,t)),Te.length===1&&!un&&$u(Fu)};function Gu(e,t){this.fun=e,this.array=t}Gu.prototype.run=function(){this.fun.apply(null,this.array)},Xt.title="browser",Xt.browser=!0,Xt.env={},Xt.argv=[],Xt.version="",Xt.versions={};function De(){}Xt.on=De,Xt.addListener=De,Xt.once=De,Xt.off=De,Xt.removeListener=De,Xt.removeAllListeners=De,Xt.emit=De,Xt.prependListener=De,Xt.prependOnceListener=De,Xt.listeners=function(e){return[]},Xt.binding=function(e){throw new Error("process.binding is not supported")},Xt.cwd=function(){return"/"},Xt.chdir=function(e){throw new Error("process.chdir is not supported")},Xt.umask=function(){return 0};var Sl=ku.exports;const vt=El(Sl);var fr,js;function Ou(){if(js)return fr;js=1;var e={};return fr=typeof vt=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},fr}var hr,Ds;function Vu(){if(Ds)return hr;Ds=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,o=t-6;return hr={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:o,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},hr}var pr={exports:{}},Ms;function Nl(){return Ms||(Ms=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=Vu(),s=Ou();t=e.exports={};const u=t.re=[],i=t.safeRe=[],f=t.src=[],h=t.safeSrc=[],a=t.t={};let p=0;const d="[a-zA-Z0-9-]",I=[["\\s",1],["\\d",o],[d,r]],S=R=>{for(const[v,E]of I)R=R.split(`${v}*`).join(`${v}{0,${E}}`).split(`${v}+`).join(`${v}{1,${E}}`);return R},w=(R,v,E)=>{const x=S(v),N=p++;s(R,N,v),a[R]=N,f[N]=v,h[N]=x,u[N]=new RegExp(v,E?"g":void 0),i[N]=new RegExp(x,E?"g":void 0)};w("NUMERICIDENTIFIER","0|[1-9]\\d*"),w("NUMERICIDENTIFIERLOOSE","\\d+"),w("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),w("MAINVERSION",`(${f[a.NUMERICIDENTIFIER]})\\.(${f[a.NUMERICIDENTIFIER]})\\.(${f[a.NUMERICIDENTIFIER]})`),w("MAINVERSIONLOOSE",`(${f[a.NUMERICIDENTIFIERLOOSE]})\\.(${f[a.NUMERICIDENTIFIERLOOSE]})\\.(${f[a.NUMERICIDENTIFIERLOOSE]})`),w("PRERELEASEIDENTIFIER",`(?:${f[a.NONNUMERICIDENTIFIER]}|${f[a.NUMERICIDENTIFIER]})`),w("PRERELEASEIDENTIFIERLOOSE",`(?:${f[a.NONNUMERICIDENTIFIER]}|${f[a.NUMERICIDENTIFIERLOOSE]})`),w("PRERELEASE",`(?:-(${f[a.PRERELEASEIDENTIFIER]}(?:\\.${f[a.PRERELEASEIDENTIFIER]})*))`),w("PRERELEASELOOSE",`(?:-?(${f[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${f[a.PRERELEASEIDENTIFIERLOOSE]})*))`),w("BUILDIDENTIFIER",`${d}+`),w("BUILD",`(?:\\+(${f[a.BUILDIDENTIFIER]}(?:\\.${f[a.BUILDIDENTIFIER]})*))`),w("FULLPLAIN",`v?${f[a.MAINVERSION]}${f[a.PRERELEASE]}?${f[a.BUILD]}?`),w("FULL",`^${f[a.FULLPLAIN]}$`),w("LOOSEPLAIN",`[v=\\s]*${f[a.MAINVERSIONLOOSE]}${f[a.PRERELEASELOOSE]}?${f[a.BUILD]}?`),w("LOOSE",`^${f[a.LOOSEPLAIN]}$`),w("GTLT","((?:<|>)?=?)"),w("XRANGEIDENTIFIERLOOSE",`${f[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),w("XRANGEIDENTIFIER",`${f[a.NUMERICIDENTIFIER]}|x|X|\\*`),w("XRANGEPLAIN",`[v=\\s]*(${f[a.XRANGEIDENTIFIER]})(?:\\.(${f[a.XRANGEIDENTIFIER]})(?:\\.(${f[a.XRANGEIDENTIFIER]})(?:${f[a.PRERELEASE]})?${f[a.BUILD]}?)?)?`),w("XRANGEPLAINLOOSE",`[v=\\s]*(${f[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[a.XRANGEIDENTIFIERLOOSE]})(?:${f[a.PRERELEASELOOSE]})?${f[a.BUILD]}?)?)?`),w("XRANGE",`^${f[a.GTLT]}\\s*${f[a.XRANGEPLAIN]}$`),w("XRANGELOOSE",`^${f[a.GTLT]}\\s*${f[a.XRANGEPLAINLOOSE]}$`),w("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),w("COERCE",`${f[a.COERCEPLAIN]}(?:$|[^\\d])`),w("COERCEFULL",f[a.COERCEPLAIN]+`(?:${f[a.PRERELEASE]})?(?:${f[a.BUILD]})?(?:$|[^\\d])`),w("COERCERTL",f[a.COERCE],!0),w("COERCERTLFULL",f[a.COERCEFULL],!0),w("LONETILDE","(?:~>?)"),w("TILDETRIM",`(\\s*)${f[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",w("TILDE",`^${f[a.LONETILDE]}${f[a.XRANGEPLAIN]}$`),w("TILDELOOSE",`^${f[a.LONETILDE]}${f[a.XRANGEPLAINLOOSE]}$`),w("LONECARET","(?:\\^)"),w("CARETTRIM",`(\\s*)${f[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",w("CARET",`^${f[a.LONECARET]}${f[a.XRANGEPLAIN]}$`),w("CARETLOOSE",`^${f[a.LONECARET]}${f[a.XRANGEPLAINLOOSE]}$`),w("COMPARATORLOOSE",`^${f[a.GTLT]}\\s*(${f[a.LOOSEPLAIN]})$|^$`),w("COMPARATOR",`^${f[a.GTLT]}\\s*(${f[a.FULLPLAIN]})$|^$`),w("COMPARATORTRIM",`(\\s*)${f[a.GTLT]}\\s*(${f[a.LOOSEPLAIN]}|${f[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",w("HYPHENRANGE",`^\\s*(${f[a.XRANGEPLAIN]})\\s+-\\s+(${f[a.XRANGEPLAIN]})\\s*$`),w("HYPHENRANGELOOSE",`^\\s*(${f[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${f[a.XRANGEPLAINLOOSE]})\\s*$`),w("STAR","(<|>)?=?\\s*\\*"),w("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),w("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(pr,pr.exports)),pr.exports}var dr,Ts;function Il(){if(Ts)return dr;Ts=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return dr=n=>n?typeof n!="object"?e:n:t,dr}var gr,Us;function Rl(){if(Us)return gr;Us=1;const e=/^[0-9]+$/,t=(n,r)=>{if(typeof n=="number"&&typeof r=="number")return n===r?0:n<r?-1:1;const o=e.test(n),s=e.test(r);return o&&s&&(n=+n,r=+r),n===r?0:o&&!s?-1:s&&!o?1:n<r?-1:1};return gr={compareIdentifiers:t,rcompareIdentifiers:(n,r)=>t(r,n)},gr}var mr,ks;function zu(){if(ks)return mr;ks=1;const e=Ou(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Vu(),{safeRe:r,t:o}=Nl(),s=Il(),{compareIdentifiers:u}=Rl(),i=(h,a)=>{const p=a.split(".");if(p.length>h.length)return!1;for(let d=0;d<p.length;d++)if(u(h[d],p[d])!==0)return!1;return!0};class f{constructor(a,p){if(p=s(p),a instanceof f){if(a.loose===!!p.loose&&a.includePrerelease===!!p.includePrerelease)return a;a=a.version}else if(typeof a!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,p),this.options=p,this.loose=!!p.loose,this.includePrerelease=!!p.includePrerelease;const d=a.trim().match(p.loose?r[o.LOOSE]:r[o.FULL]);if(!d)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(I=>{if(/^[0-9]+$/.test(I)){const S=+I;if(S>=0&&S<n)return S}return I}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(a){if(e("SemVer.compare",this.version,this.options,a),!(a instanceof f)){if(typeof a=="string"&&a===this.version)return 0;a=new f(a,this.options)}return a.version===this.version?0:this.compareMain(a)||this.comparePre(a)}compareMain(a){return a instanceof f||(a=new f(a,this.options)),this.major<a.major?-1:this.major>a.major?1:this.minor<a.minor?-1:this.minor>a.minor?1:this.patch<a.patch?-1:this.patch>a.patch?1:0}comparePre(a){if(a instanceof f||(a=new f(a,this.options)),this.prerelease.length&&!a.prerelease.length)return-1;if(!this.prerelease.length&&a.prerelease.length)return 1;if(!this.prerelease.length&&!a.prerelease.length)return 0;let p=0;do{const d=this.prerelease[p],I=a.prerelease[p];if(e("prerelease compare",p,d,I),d===void 0&&I===void 0)return 0;if(I===void 0)return 1;if(d===void 0)return-1;if(d!==I)return u(d,I)}while(++p)}compareBuild(a){a instanceof f||(a=new f(a,this.options));let p=0;do{const d=this.build[p],I=a.build[p];if(e("build compare",p,d,I),d===void 0&&I===void 0)return 0;if(I===void 0)return 1;if(d===void 0)return-1;if(d!==I)return u(d,I)}while(++p)}inc(a,p,d){if(a.startsWith("pre")){if(!p&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(p){const I=`-${p}`.match(this.options.loose?r[o.PRERELEASELOOSE]:r[o.PRERELEASE]);if(!I||I[1]!==p)throw new Error(`invalid identifier: ${p}`)}}switch(a){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",p,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",p,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",p,d),this.inc("pre",p,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",p,d),this.inc("pre",p,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const I=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[I];else{let S=this.prerelease.length;for(;--S>=0;)typeof this.prerelease[S]=="number"&&(this.prerelease[S]++,S=-2);if(S===-1){if(p===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(I)}}if(p){let S=[p,I];if(d===!1&&(S=[p]),i(this.prerelease,p)){const w=this.prerelease[p.split(".").length];isNaN(w)&&(this.prerelease=S)}else this.prerelease=S}break}default:throw new Error(`invalid increment argument: ${a}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return mr=f,mr}var yr,$s;function xl(){if($s)return yr;$s=1;const e=zu();return yr=(t,n)=>new e(t,n).major,yr}var Pl=xl();const Fs=Qo(Pl);var br,Gs;function Cl(){if(Gs)return br;Gs=1;const e=zu();return br=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(o){if(!r)return null;throw o}},br}var wr,Os;function Ll(){if(Os)return wr;Os=1;const e=Cl();return wr=(t,n)=>{const r=e(t,n);return r?r.version:null},wr}var Bl=Ll();const jl=Qo(Bl);class Dl{bus;constructor(t){typeof t.getVersion!="function"||!jl(t.getVersion())?console.warn("Proxying an event bus with an unknown or invalid version"):Fs(t.getVersion())!==Fs(this.getVersion())&&console.warn("Proxying an event bus of version "+t.getVersion()+" with "+this.getVersion()),this.bus=t}getVersion(){return"3.3.3"}subscribe(t,n){this.bus.subscribe(t,n)}unsubscribe(t,n){this.bus.unsubscribe(t,n)}emit(t,...n){this.bus.emit(t,...n)}}class Ml{handlers=new Map;getVersion(){return"3.3.3"}subscribe(t,n){this.handlers.set(t,(this.handlers.get(t)||[]).concat(n))}unsubscribe(t,n){this.handlers.set(t,(this.handlers.get(t)||[]).filter(r=>r!==n))}emit(t,...n){(this.handlers.get(t)||[]).forEach(r=>{try{r(n[0])}catch(o){console.error("could not invoke event listener",o)}})}}let bn=null;function Zo(){return bn!==null?bn:typeof window>"u"?new Proxy({},{get:()=>()=>console.error("Window not available, EventBus can not be established!")}):(window.OC?._eventBus&&typeof window._nc_event_bus>"u"&&(console.warn("found old event bus instance at OC._eventBus. Update your version!"),window._nc_event_bus=window.OC._eventBus),typeof window?._nc_event_bus<"u"?bn=new Dl(window._nc_event_bus):bn=window._nc_event_bus=new Ml,bn)}function Wu(e,t){Zo().subscribe(e,t)}function Tl(e,t){Zo().unsubscribe(e,t)}function Yu(e,...t){Zo().emit(e,...t)}const Ul=e=>"/remote.php/"+e;function kl(e,t){return Gl(),$l()+Ul(e)}function $l(){return Hu(),window.location.protocol+"//"+window.location.host+Fl()}function Fl(){Hu();let e=window._oc_webroot;if(typeof e>"u"){e=location.pathname;const t=e.indexOf("/index.php/");if(t!==-1)e=e.slice(0,t);else{const n=e.indexOf("/",1);e=e.slice(0,n>0?n:void 0)}}return e}function Hu(){if(typeof window>"u")throw new Error("This function is only available in a DOM environment")}function Gl(e){if(typeof window>"u")throw new Error("This function requires baseURL option to be provided in non-DOM environments")}class Jn{static GLOBAL_SCOPE_VOLATILE="nextcloud_vol";static GLOBAL_SCOPE_PERSISTENT="nextcloud_per";scope;wrapped;constructor(t,n,r){this.scope=`${r?Jn.GLOBAL_SCOPE_PERSISTENT:Jn.GLOBAL_SCOPE_VOLATILE}_${btoa(t)}_`,this.wrapped=n}scopeKey(t){return`${this.scope}${t}`}setItem(t,n){this.wrapped.setItem(this.scopeKey(t),n)}getItem(t){return this.wrapped.getItem(this.scopeKey(t))}removeItem(t){this.wrapped.removeItem(this.scopeKey(t))}clear(){Object.keys(this.wrapped).filter(t=>t.startsWith(this.scope)).map(this.wrapped.removeItem.bind(this.wrapped))}}class Ol{appId;persisted=!1;clearedOnLogout=!1;constructor(t){this.appId=t}persist(t=!0){return this.persisted=t,this}clearOnLogout(t=!0){return this.clearedOnLogout=t,this}build(){return new Jn(this.appId,this.persisted?window.localStorage:window.sessionStorage,!this.clearedOnLogout)}}function Vl(e){return new Ol(e)}Hl();function zl(){return globalThis._nc_auth_requestToken?globalThis._nc_auth_requestToken:globalThis.document?document.head.dataset.requesttoken??null:null}function Wl(e){if(!e||typeof e!="string")throw new Error("Invalid CSRF token given",{cause:{token:e}});globalThis._nc_auth_requestToken!==e&&(globalThis._nc_auth_requestToken=e,globalThis.document&&(document.head.dataset.requesttoken=e),Yu("csrf-token-update",{token:e,_internal:!0}))}function Yl(e){const t=async({token:n})=>{try{e(n)}catch(r){console.error("Error updating CSRF token observer",r)}};return Wu("csrf-token-update",t),()=>Tl("csrf-token-update",t)}function Hl(){Wu("csrf-token-update",({token:e,_internal:t})=>{t||Wl(e)})}Vl("public").persist().build();let en;function Vs(e,t){return e?e.getAttribute(t):null}function Ko(){if(en!==void 0)return en;const e=document?.getElementsByTagName("head")[0];if(!e)return null;const t=Vs(e,"data-user");return t===null?(en=null,en):(en={uid:t,displayName:Vs(e,"data-user-displayname"),isAdmin:!!window._oc_isadmin},en)}var qt=(e=>(e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Fatal=4]="Fatal",e))(qt||{});class Xl{context;constructor(t){this.context=t||{}}formatMessage(t,n,r){let o="["+qt[n].toUpperCase()+"] ";return r&&r.app&&(o+=r.app+": "),typeof t=="string"?o+t:(o+=`Unexpected ${t.name}`,t.message&&(o+=` "${t.message}"`),n===qt.Debug&&t.stack&&(o+=`
Stack trace:
${t.stack}`),o)}log(t,n,r){if(!(typeof this.context?.level=="number"&&t<this.context?.level))switch(typeof n=="object"&&r?.error===void 0&&(r.error=n),t){case qt.Debug:console.debug(this.formatMessage(n,qt.Debug,r),r);break;case qt.Info:console.info(this.formatMessage(n,qt.Info,r),r);break;case qt.Warn:console.warn(this.formatMessage(n,qt.Warn,r),r);break;case qt.Error:console.error(this.formatMessage(n,qt.Error,r),r);break;case qt.Fatal:default:console.error(this.formatMessage(n,qt.Fatal,r),r);break}}debug(t,n){this.log(qt.Debug,t,Object.assign({},this.context,n))}info(t,n){this.log(qt.Info,t,Object.assign({},this.context,n))}warn(t,n){this.log(qt.Warn,t,Object.assign({},this.context,n))}error(t,n){this.log(qt.Error,t,Object.assign({},this.context,n))}fatal(t,n){this.log(qt.Fatal,t,Object.assign({},this.context,n))}}function Jl(e){return new Xl(e)}class ql{context;factory;constructor(t){this.context={},this.factory=t}setApp(t){return this.context.app=t,this}setLogLevel(t){return this.context.level=t,this}setUid(t){return this.context.uid=t,this}detectUser(){const t=Ko();return t!==null&&(this.context.uid=t.uid),this}detectLogLevel(){const t=this,n=()=>{document.readyState==="complete"||document.readyState==="interactive"?(t.context.level=window._oc_config?.loglevel??qt.Warn,window._oc_debug&&(t.context.level=qt.Debug),document.removeEventListener("readystatechange",n)):document.addEventListener("readystatechange",n)};return n(),this}build(){return this.context.level===void 0&&this.detectLogLevel(),this.factory(this.context)}}function Ql(){return new ql(Jl)}function zs(e){return e&&e.split("/").map(encodeURIComponent).join("/")}function Xu(e,t){return e=e.replace(/\\/g,"/").replace(/\/+$/g,"").replace(/.*\//,""),e}function Ws(e){e=e.replaceAll(/\\/g,"/");const t=e.split("/");return t.length<=1?".":(t.pop(),t.length===1&&t[0]===""?"/":t.join("/"))}function Zl(e){const t=Xu(e),n=t.lastIndexOf(".");return n>0?t.substring(n):""}function Kl(...e){if(arguments.length<1)return"";const t=e.filter(f=>f.length>0);if(t.length<1)return"";const n=t[t.length-1],r=t[0].charAt(0)==="/",o=n.charAt(n.length-1)==="/",s=t.reduce((f,h)=>f.concat(h.split("/")),[]);let u=!r;const i=s.reduce((f,h)=>h===""?f:u?(u=!1,f+h):f+"/"+h,"");return o?i+"/":i}window._nc_files_scope??={},window._nc_files_scope.v4_0??={};const Ot=window._nc_files_scope.v4_0,Ge=Ql().setApp("@nextcloud/files").detectUser().build(),Ju=Object.freeze({Folder:"folder",File:"file"}),Ee=Object.freeze({NONE:0,READ:1,UPDATE:2,CREATE:4,WRITE:4,DELETE:8,SHARE:16,ALL:31}),qu=Object.freeze({NEW:"new",FAILED:"failed",LOADING:"loading",LOCKED:"locked"});function Qu(e,t){return e.match(t)!==null}function ke(e,t){if(e.id&&typeof e.id!="number"&&typeof e.id!="string")throw new Error("Invalid id type of value");if(!e.source)throw new Error("Missing mandatory source");try{new URL(e.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!e.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(!e.root)throw new Error("Missing mandatory root");if(typeof e.root!="string")throw new Error("Invalid root type");if(!e.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(!e.source.includes(e.root))throw new Error("Root must be part of the source");if(Qu(e.source,t)){const n=e.source.match(t)[0];if(!e.source.includes(Kl(n,e.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(e.displayname&&typeof e.displayname!="string")throw new Error("Invalid displayname type");if(e.mtime&&!(e.mtime instanceof Date))throw new Error("Invalid mtime type");if(e.crtime&&!(e.crtime instanceof Date))throw new Error("Invalid crtime type");if(!e.mime||typeof e.mime!="string"||!e.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in e&&typeof e.size!="number"&&e.size!==void 0)throw new Error("Invalid size type");if("permissions"in e&&e.permissions!==void 0&&!(typeof e.permissions=="number"&&e.permissions>=Ee.NONE&&e.permissions<=Ee.ALL))throw new Error("Invalid permissions");if(e.owner&&e.owner!==null&&typeof e.owner!="string")throw new Error("Invalid owner type");if(e.attributes&&typeof e.attributes!="object")throw new Error("Invalid attributes type");if(e.status&&!Object.values(qu).includes(e.status))throw new Error("Status must be a valid NodeStatus")}function tf(e){e.mtime&&typeof e.mtime=="string"&&!isNaN(Date.parse(e.mtime))&&JSON.stringify(new Date(e.mtime))===JSON.stringify(e.mtime)&&(e.mtime=new Date(e.mtime)),e.crtime&&typeof e.crtime=="string"&&!isNaN(Date.parse(e.crtime))&&JSON.stringify(new Date(e.crtime))===JSON.stringify(e.crtime)&&(e.crtime=new Date(e.crtime))}function ef(e){if(e instanceof RegExp)return e;const t=e.match(/(\/?)(.+)\1([a-z]*)/i);if(!t)throw new Error("Invalid regular expression format.");const n=Array.from(new Set(t[3])).filter(r=>"gimsuy".includes(r)).join("");return new RegExp(t[2],n)}class nr{_attributes;_data;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(nr.prototype)).filter(t=>typeof t[1].get=="function"&&t[0]!=="__proto__").map(t=>t[0]);handler={set:(t,n,r)=>this.readonlyAttributes.includes(n)?!1:Reflect.set(t,n,r),deleteProperty:(t,n)=>this.readonlyAttributes.includes(n)?!1:Reflect.deleteProperty(t,n)};constructor(...[t,n]){t.mime||(t.mime="application/octet-stream"),tf(t),n=ef(n||this._knownDavService),ke(t,n),this._data={...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),n&&(this._knownDavService=n)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+zs(this.source.slice(t.length))}get basename(){return Xu(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(t){ke({...this._data,displayname:t},this._knownDavService),this._data.displayname=t}get extension(){return Zl(this.source)}get dirname(){return Ws(this.path)}get mime(){return this._data.mime||"application/octet-stream"}set mime(t){t??="application/octet-stream",ke({...this._data,mime:t},this._knownDavService),this._data.mime=t}get mtime(){return this._data.mtime}set mtime(t){ke({...this._data,mtime:t},this._knownDavService),this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){ke({...this._data,size:t},this._knownDavService),this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return this.owner===null&&!this.isDavResource?Ee.READ:this._data.permissions!==void 0?this._data.permissions:Ee.NONE}set permissions(t){ke({...this._data,permissions:t},this._knownDavService),this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavResource?this._data.owner:null}get isDavResource(){return Qu(this.source,this._knownDavService)}get root(){return this._data.root.replace(/^(.+)\/$/,"$1")}get path(){const t=this.source.indexOf("://"),n=this.source.slice(0,t),r=this.source.slice(t+3),o=r.indexOf("/"),s=r.slice(0,o),u=r.slice(o),i=`${n}://${s}${zs(u)}`,f=new URL(i);let h=decodeURIComponent(f.pathname);this.isDavResource&&(h=h.split(this._knownDavService).pop());const a=h.indexOf(this.root),p=this.root.replace(/\/$/,"");return h.slice(a+p.length)||"/"}get fileid(){return typeof this._data?.id=="number"?this._data.id:void 0}get id(){if(!(typeof this._data?.id>"u"||typeof this._data.id=="number"&&this._data.id<0))return String(this._data.id)}get status(){return this._data?.status}set status(t){ke({...this._data,status:t},this._knownDavService),this._data.status=t}move(t){ke({...this._data,source:t},this._knownDavService);const n=this.basename;this._data.source=t,this.displayname===n&&this.basename!==n&&(this.displayname=this.basename)}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move(Ws(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[n,r]of Object.entries(t))try{r===void 0?delete this.attributes[n]:this.attributes[n]=r}catch(o){if(o instanceof TypeError)continue;throw o}}clone(){return new this.constructor(structuredClone(this._data),this._knownDavService)}toJSON(){return JSON.stringify([structuredClone(this._data),this._knownDavService.toString()])}}class nf extends nr{constructor(...[t,n]){super(t,n)}get type(){return Ju.File}}class rf extends nr{constructor(...[t,n]){super({...t,mime:"httpd/unix-directory"},n)}get type(){return Ju.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}var of=class extends EventTarget{dispatchTypedEvent(e,t){return super.dispatchEvent(t)}},Zu={},Xn={};Xn.byteLength=uf,Xn.toByteArray=lf,Xn.fromByteArray=pf;for(var je=[],Ne=[],sf=typeof Uint8Array<"u"?Uint8Array:Array,vr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nn=0,af=vr.length;nn<af;++nn)je[nn]=vr[nn],Ne[vr.charCodeAt(nn)]=nn;Ne[45]=62,Ne[95]=63;function Ku(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function uf(e){var t=Ku(e),n=t[0],r=t[1];return(n+r)*3/4-r}function cf(e,t,n){return(t+n)*3/4-n}function lf(e){var t,n=Ku(e),r=n[0],o=n[1],s=new sf(cf(e,r,o)),u=0,i=o>0?r-4:r,f;for(f=0;f<i;f+=4)t=Ne[e.charCodeAt(f)]<<18|Ne[e.charCodeAt(f+1)]<<12|Ne[e.charCodeAt(f+2)]<<6|Ne[e.charCodeAt(f+3)],s[u++]=t>>16&255,s[u++]=t>>8&255,s[u++]=t&255;return o===2&&(t=Ne[e.charCodeAt(f)]<<2|Ne[e.charCodeAt(f+1)]>>4,s[u++]=t&255),o===1&&(t=Ne[e.charCodeAt(f)]<<10|Ne[e.charCodeAt(f+1)]<<4|Ne[e.charCodeAt(f+2)]>>2,s[u++]=t>>8&255,s[u++]=t&255),s}function ff(e){return je[e>>18&63]+je[e>>12&63]+je[e>>6&63]+je[e&63]}function hf(e,t,n){for(var r,o=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),o.push(ff(r));return o.join("")}function pf(e){for(var t,n=e.length,r=n%3,o=[],s=16383,u=0,i=n-r;u<i;u+=s)o.push(hf(e,u,u+s>i?i:u+s));return r===1?(t=e[n-1],o.push(je[t>>2]+je[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],o.push(je[t>>10]+je[t>>4&63]+je[t<<2&63]+"=")),o.join("")}var Uo={};Uo.read=function(e,t,n,r,o){var s,u,i=o*8-r-1,f=(1<<i)-1,h=f>>1,a=-7,p=n?o-1:0,d=n?-1:1,I=e[t+p];for(p+=d,s=I&(1<<-a)-1,I>>=-a,a+=i;a>0;s=s*256+e[t+p],p+=d,a-=8);for(u=s&(1<<-a)-1,s>>=-a,a+=r;a>0;u=u*256+e[t+p],p+=d,a-=8);if(s===0)s=1-h;else{if(s===f)return u?NaN:(I?-1:1)*(1/0);u=u+Math.pow(2,r),s=s-h}return(I?-1:1)*u*Math.pow(2,s-r)},Uo.write=function(e,t,n,r,o,s){var u,i,f,h=s*8-o-1,a=(1<<h)-1,p=a>>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=r?0:s-1,S=r?1:-1,w=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,u=a):(u=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-u))<1&&(u--,f*=2),u+p>=1?t+=d/f:t+=d*Math.pow(2,1-p),t*f>=2&&(u++,f/=2),u+p>=a?(i=0,u=a):u+p>=1?(i=(t*f-1)*Math.pow(2,o),u=u+p):(i=t*Math.pow(2,p-1)*Math.pow(2,o),u=0));o>=8;e[n+I]=i&255,I+=S,i/=256,o-=8);for(u=u<<o|i,h+=o;h>0;e[n+I]=u&255,I+=S,u/=256,h-=8);e[n+I-S]|=w*128};(function(e){const t=Xn,n=Uo,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=P,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o;const{Uint8Array:s,ArrayBuffer:u,SharedArrayBuffer:i}=globalThis;a.TYPED_ARRAY_SUPPORT=f(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function f(){try{const c=new s(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,s.prototype),Object.setPrototypeOf(c,g),c.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function h(c){if(c>o)throw new RangeError('The value "'+c+'" is invalid for option "size"');const g=new s(c);return Object.setPrototypeOf(g,a.prototype),g}function a(c,g,_){if(typeof c=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return S(c)}return p(c,g,_)}a.poolSize=8192;function p(c,g,_){if(typeof c=="string")return w(c,g);if(u.isView(c))return v(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(Wt(c,u)||c&&Wt(c.buffer,u)||typeof i<"u"&&(Wt(c,i)||c&&Wt(c.buffer,i)))return E(c,g,_);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const $=c.valueOf&&c.valueOf();if($!=null&&$!==c)return a.from($,g,_);const V=x(c);if(V)return V;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return a.from(c[Symbol.toPrimitive]("string"),g,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}a.from=function(c,g,_){return p(c,g,_)},Object.setPrototypeOf(a.prototype,s.prototype),Object.setPrototypeOf(a,s);function d(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function I(c,g,_){return d(c),c<=0?h(c):g!==void 0?typeof _=="string"?h(c).fill(g,_):h(c).fill(g):h(c)}a.alloc=function(c,g,_){return I(c,g,_)};function S(c){return d(c),h(c<0?0:N(c)|0)}a.allocUnsafe=function(c){return S(c)},a.allocUnsafeSlow=function(c){return S(c)};function w(c,g){if((typeof g!="string"||g==="")&&(g="utf8"),!a.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const _=M(c,g)|0;let $=h(_);const V=$.write(c,g);return V!==_&&($=$.slice(0,V)),$}function R(c){const g=c.length<0?0:N(c.length)|0,_=h(g);for(let $=0;$<g;$+=1)_[$]=c[$]&255;return _}function v(c){if(Wt(c,s)){const g=new s(c);return E(g.buffer,g.byteOffset,g.byteLength)}return R(c)}function E(c,g,_){if(g<0||c.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<g+(_||0))throw new RangeError('"length" is outside of buffer bounds');let $;return g===void 0&&_===void 0?$=new s(c):_===void 0?$=new s(c,g):$=new s(c,g,_),Object.setPrototypeOf($,a.prototype),$}function x(c){if(a.isBuffer(c)){const g=N(c.length)|0,_=h(g);return _.length===0||c.copy(_,0,0,g),_}if(c.length!==void 0)return typeof c.length!="number"||ne(c.length)?h(0):R(c);if(c.type==="Buffer"&&Array.isArray(c.data))return R(c.data)}function N(c){if(c>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return c|0}function P(c){return+c!=c&&(c=0),a.alloc(+c)}a.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==a.prototype},a.compare=function(c,g){if(Wt(c,s)&&(c=a.from(c,c.offset,c.byteLength)),Wt(g,s)&&(g=a.from(g,g.offset,g.byteLength)),!a.isBuffer(c)||!a.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===g)return 0;let _=c.length,$=g.length;for(let V=0,Z=Math.min(_,$);V<Z;++V)if(c[V]!==g[V]){_=c[V],$=g[V];break}return _<$?-1:$<_?1:0},a.isEncoding=function(c){switch(String(c).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(c,g){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return a.alloc(0);let _;if(g===void 0)for(g=0,_=0;_<c.length;++_)g+=c[_].length;const $=a.allocUnsafe(g);let V=0;for(_=0;_<c.length;++_){let Z=c[_];if(Wt(Z,s))V+Z.length>$.length?(a.isBuffer(Z)||(Z=a.from(Z)),Z.copy($,V)):s.prototype.set.call($,Z,V);else if(a.isBuffer(Z))Z.copy($,V);else throw new TypeError('"list" argument must be an Array of Buffers');V+=Z.length}return $};function M(c,g){if(a.isBuffer(c))return c.length;if(u.isView(c)||Wt(c,u))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);const _=c.length,$=arguments.length>2&&arguments[2]===!0;if(!$&&_===0)return 0;let V=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return wt(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return gt(c).length;default:if(V)return $?-1:wt(c).length;g=(""+g).toLowerCase(),V=!0}}a.byteLength=M;function F(c,g,_){let $=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,g>>>=0,_<=g))return"";for(c||(c="utf8");;)switch(c){case"hex":return ft(this,g,_);case"utf8":case"utf-8":return lt(this,g,_);case"ascii":return yt(this,g,_);case"latin1":case"binary":return Tt(this,g,_);case"base64":return Et(this,g,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,g,_);default:if($)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),$=!0}}a.prototype._isBuffer=!0;function O(c,g,_){const $=c[g];c[g]=c[_],c[_]=$}a.prototype.swap16=function(){const c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;g<c;g+=2)O(this,g,g+1);return this},a.prototype.swap32=function(){const c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let g=0;g<c;g+=4)O(this,g,g+3),O(this,g+1,g+2);return this},a.prototype.swap64=function(){const c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let g=0;g<c;g+=8)O(this,g,g+7),O(this,g+1,g+6),O(this,g+2,g+5),O(this,g+3,g+4);return this},a.prototype.toString=function(){const c=this.length;return c===0?"":arguments.length===0?lt(this,0,c):F.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(c){if(!a.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:a.compare(this,c)===0},a.prototype.inspect=function(){let c="";const g=e.INSPECT_MAX_BYTES;return c=this.toString("hex",0,g).replace(/(.{2})/g,"$1 ").trim(),this.length>g&&(c+=" ... "),"<Buffer "+c+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(c,g,_,$,V){if(Wt(c,s)&&(c=a.from(c,c.offset,c.byteLength)),!a.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(g===void 0&&(g=0),_===void 0&&(_=c?c.length:0),$===void 0&&($=0),V===void 0&&(V=this.length),g<0||_>c.length||$<0||V>this.length)throw new RangeError("out of range index");if($>=V&&g>=_)return 0;if($>=V)return-1;if(g>=_)return 1;if(g>>>=0,_>>>=0,$>>>=0,V>>>=0,this===c)return 0;let Z=V-$,at=_-g;const xt=Math.min(Z,at),Ft=this.slice($,V),Ct=c.slice(g,_);for(let Rt=0;Rt<xt;++Rt)if(Ft[Rt]!==Ct[Rt]){Z=Ft[Rt],at=Ct[Rt];break}return Z<at?-1:at<Z?1:0};function q(c,g,_,$,V){if(c.length===0)return-1;if(typeof _=="string"?($=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,ne(_)&&(_=V?0:c.length-1),_<0&&(_=c.length+_),_>=c.length){if(V)return-1;_=c.length-1}else if(_<0)if(V)_=0;else return-1;if(typeof g=="string"&&(g=a.from(g,$)),a.isBuffer(g))return g.length===0?-1:j(c,g,_,$,V);if(typeof g=="number")return g=g&255,typeof s.prototype.indexOf=="function"?V?s.prototype.indexOf.call(c,g,_):s.prototype.lastIndexOf.call(c,g,_):j(c,[g],_,$,V);throw new TypeError("val must be string, number or Buffer")}function j(c,g,_,$,V){let Z=1,at=c.length,xt=g.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(c.length<2||g.length<2)return-1;Z=2,at/=2,xt/=2,_/=2}function Ft(Rt,Dt){return Z===1?Rt[Dt]:Rt.readUInt16BE(Dt*Z)}let Ct;if(V){let Rt=-1;for(Ct=_;Ct<at;Ct++)if(Ft(c,Ct)===Ft(g,Rt===-1?0:Ct-Rt)){if(Rt===-1&&(Rt=Ct),Ct-Rt+1===xt)return Rt*Z}else Rt!==-1&&(Ct-=Ct-Rt),Rt=-1}else for(_+xt>at&&(_=at-xt),Ct=_;Ct>=0;Ct--){let Rt=!0;for(let Dt=0;Dt<xt;Dt++)if(Ft(c,Ct+Dt)!==Ft(g,Dt)){Rt=!1;break}if(Rt)return Ct}return-1}a.prototype.includes=function(c,g,_){return this.indexOf(c,g,_)!==-1},a.prototype.indexOf=function(c,g,_){return q(this,c,g,_,!0)},a.prototype.lastIndexOf=function(c,g,_){return q(this,c,g,_,!1)};function ct(c,g,_,$){_=Number(_)||0;const V=c.length-_;$?($=Number($),$>V&&($=V)):$=V;const Z=g.length;$>Z/2&&($=Z/2);let at;for(at=0;at<$;++at){const xt=parseInt(g.substr(at*2,2),16);if(ne(xt))return at;c[_+at]=xt}return at}function G(c,g,_,$){return Ut(wt(g,c.length-_),c,_,$)}function rt(c,g,_,$){return Ut(Bt(g),c,_,$)}function pt(c,g,_,$){return Ut(gt(g),c,_,$)}function At(c,g,_,$){return Ut(dt(g,c.length-_),c,_,$)}a.prototype.write=function(c,g,_,$){if(g===void 0)$="utf8",_=this.length,g=0;else if(_===void 0&&typeof g=="string")$=g,_=this.length,g=0;else if(isFinite(g))g=g>>>0,isFinite(_)?(_=_>>>0,$===void 0&&($="utf8")):($=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const V=this.length-g;if((_===void 0||_>V)&&(_=V),c.length>0&&(_<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");$||($="utf8");let Z=!1;for(;;)switch($){case"hex":return ct(this,c,g,_);case"utf8":case"utf-8":return G(this,c,g,_);case"ascii":case"latin1":case"binary":return rt(this,c,g,_);case"base64":return pt(this,c,g,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return At(this,c,g,_);default:if(Z)throw new TypeError("Unknown encoding: "+$);$=(""+$).toLowerCase(),Z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Et(c,g,_){return g===0&&_===c.length?t.fromByteArray(c):t.fromByteArray(c.slice(g,_))}function lt(c,g,_){_=Math.min(c.length,_);const $=[];let V=g;for(;V<_;){const Z=c[V];let at=null,xt=Z>239?4:Z>223?3:Z>191?2:1;if(V+xt<=_){let Ft,Ct,Rt,Dt;switch(xt){case 1:Z<128&&(at=Z);break;case 2:Ft=c[V+1],(Ft&192)===128&&(Dt=(Z&31)<<6|Ft&63,Dt>127&&(at=Dt));break;case 3:Ft=c[V+1],Ct=c[V+2],(Ft&192)===128&&(Ct&192)===128&&(Dt=(Z&15)<<12|(Ft&63)<<6|Ct&63,Dt>2047&&(Dt<55296||Dt>57343)&&(at=Dt));break;case 4:Ft=c[V+1],Ct=c[V+2],Rt=c[V+3],(Ft&192)===128&&(Ct&192)===128&&(Rt&192)===128&&(Dt=(Z&15)<<18|(Ft&63)<<12|(Ct&63)<<6|Rt&63,Dt>65535&&Dt<1114112&&(at=Dt))}}at===null?(at=65533,xt=1):at>65535&&(at-=65536,$.push(at>>>10&1023|55296),at=56320|at&1023),$.push(at),V+=xt}return Nt($)}const mt=4096;function Nt(c){const g=c.length;if(g<=mt)return String.fromCharCode.apply(String,c);let _="",$=0;for(;$<g;)_+=String.fromCharCode.apply(String,c.slice($,$+=mt));return _}function yt(c,g,_){let $="";_=Math.min(c.length,_);for(let V=g;V<_;++V)$+=String.fromCharCode(c[V]&127);return $}function Tt(c,g,_){let $="";_=Math.min(c.length,_);for(let V=g;V<_;++V)$+=String.fromCharCode(c[V]);return $}function ft(c,g,_){const $=c.length;(!g||g<0)&&(g=0),(!_||_<0||_>$)&&(_=$);let V="";for(let Z=g;Z<_;++Z)V+=$t[c[Z]];return V}function z(c,g,_){const $=c.slice(g,_);let V="";for(let Z=0;Z<$.length-1;Z+=2)V+=String.fromCharCode($[Z]+$[Z+1]*256);return V}a.prototype.slice=function(c,g){const _=this.length;c=~~c,g=g===void 0?_:~~g,c<0?(c+=_,c<0&&(c=0)):c>_&&(c=_),g<0?(g+=_,g<0&&(g=0)):g>_&&(g=_),g<c&&(g=c);const $=this.subarray(c,g);return Object.setPrototypeOf($,a.prototype),$};function H(c,g,_){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+g>_)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(c,g,_){c=c>>>0,g=g>>>0,_||H(c,g,this.length);let $=this[c],V=1,Z=0;for(;++Z<g&&(V*=256);)$+=this[c+Z]*V;return $},a.prototype.readUintBE=a.prototype.readUIntBE=function(c,g,_){c=c>>>0,g=g>>>0,_||H(c,g,this.length);let $=this[c+--g],V=1;for(;g>0&&(V*=256);)$+=this[c+--g]*V;return $},a.prototype.readUint8=a.prototype.readUInt8=function(c,g){return c=c>>>0,g||H(c,1,this.length),this[c]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(c,g){return c=c>>>0,g||H(c,2,this.length),this[c]|this[c+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(c,g){return c=c>>>0,g||H(c,2,this.length),this[c]<<8|this[c+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(c,g){return c=c>>>0,g||H(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(c,g){return c=c>>>0,g||H(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},a.prototype.readBigUInt64LE=Pt(function(c){c=c>>>0,D(c,"offset");const g=this[c],_=this[c+7];(g===void 0||_===void 0)&&ot(c,this.length-8);const $=g+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24,V=this[++c]+this[++c]*2**8+this[++c]*2**16+_*2**24;return BigInt($)+(BigInt(V)<<BigInt(32))}),a.prototype.readBigUInt64BE=Pt(function(c){c=c>>>0,D(c,"offset");const g=this[c],_=this[c+7];(g===void 0||_===void 0)&&ot(c,this.length-8);const $=g*2**24+this[++c]*2**16+this[++c]*2**8+this[++c],V=this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+_;return(BigInt($)<<BigInt(32))+BigInt(V)}),a.prototype.readIntLE=function(c,g,_){c=c>>>0,g=g>>>0,_||H(c,g,this.length);let $=this[c],V=1,Z=0;for(;++Z<g&&(V*=256);)$+=this[c+Z]*V;return V*=128,$>=V&&($-=Math.pow(2,8*g)),$},a.prototype.readIntBE=function(c,g,_){c=c>>>0,g=g>>>0,_||H(c,g,this.length);let $=g,V=1,Z=this[c+--$];for(;$>0&&(V*=256);)Z+=this[c+--$]*V;return V*=128,Z>=V&&(Z-=Math.pow(2,8*g)),Z},a.prototype.readInt8=function(c,g){return c=c>>>0,g||H(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},a.prototype.readInt16LE=function(c,g){c=c>>>0,g||H(c,2,this.length);const _=this[c]|this[c+1]<<8;return _&32768?_|4294901760:_},a.prototype.readInt16BE=function(c,g){c=c>>>0,g||H(c,2,this.length);const _=this[c+1]|this[c]<<8;return _&32768?_|4294901760:_},a.prototype.readInt32LE=function(c,g){return c=c>>>0,g||H(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},a.prototype.readInt32BE=function(c,g){return c=c>>>0,g||H(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},a.prototype.readBigInt64LE=Pt(function(c){c=c>>>0,D(c,"offset");const g=this[c],_=this[c+7];(g===void 0||_===void 0)&&ot(c,this.length-8);const $=this[c+4]+this[c+5]*2**8+this[c+6]*2**16+(_<<24);return(BigInt($)<<BigInt(32))+BigInt(g+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24)}),a.prototype.readBigInt64BE=Pt(function(c){c=c>>>0,D(c,"offset");const g=this[c],_=this[c+7];(g===void 0||_===void 0)&&ot(c,this.length-8);const $=(g<<24)+this[++c]*2**16+this[++c]*2**8+this[++c];return(BigInt($)<<BigInt(32))+BigInt(this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+_)}),a.prototype.readFloatLE=function(c,g){return c=c>>>0,g||H(c,4,this.length),n.read(this,c,!0,23,4)},a.prototype.readFloatBE=function(c,g){return c=c>>>0,g||H(c,4,this.length),n.read(this,c,!1,23,4)},a.prototype.readDoubleLE=function(c,g){return c=c>>>0,g||H(c,8,this.length),n.read(this,c,!0,52,8)},a.prototype.readDoubleBE=function(c,g){return c=c>>>0,g||H(c,8,this.length),n.read(this,c,!1,52,8)};function Q(c,g,_,$,V,Z){if(!a.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>V||g<Z)throw new RangeError('"value" argument is out of bounds');if(_+$>c.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(c,g,_,$){if(c=+c,g=g>>>0,_=_>>>0,!$){const at=Math.pow(2,8*_)-1;Q(this,c,g,_,at,0)}let V=1,Z=0;for(this[g]=c&255;++Z<_&&(V*=256);)this[g+Z]=c/V&255;return g+_},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(c,g,_,$){if(c=+c,g=g>>>0,_=_>>>0,!$){const at=Math.pow(2,8*_)-1;Q(this,c,g,_,at,0)}let V=_-1,Z=1;for(this[g+V]=c&255;--V>=0&&(Z*=256);)this[g+V]=c/Z&255;return g+_},a.prototype.writeUint8=a.prototype.writeUInt8=function(c,g,_){return c=+c,g=g>>>0,_||Q(this,c,g,1,255,0),this[g]=c&255,g+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(c,g,_){return c=+c,g=g>>>0,_||Q(this,c,g,2,65535,0),this[g]=c&255,this[g+1]=c>>>8,g+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(c,g,_){return c=+c,g=g>>>0,_||Q(this,c,g,2,65535,0),this[g]=c>>>8,this[g+1]=c&255,g+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(c,g,_){return c=+c,g=g>>>0,_||Q(this,c,g,4,4294967295,0),this[g+3]=c>>>24,this[g+2]=c>>>16,this[g+1]=c>>>8,this[g]=c&255,g+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(c,g,_){return c=+c,g=g>>>0,_||Q(this,c,g,4,4294967295,0),this[g]=c>>>24,this[g+1]=c>>>16,this[g+2]=c>>>8,this[g+3]=c&255,g+4};function T(c,g,_,$,V){k(g,$,V,c,_,7);let Z=Number(g&BigInt(4294967295));c[_++]=Z,Z=Z>>8,c[_++]=Z,Z=Z>>8,c[_++]=Z,Z=Z>>8,c[_++]=Z;let at=Number(g>>BigInt(32)&BigInt(4294967295));return c[_++]=at,at=at>>8,c[_++]=at,at=at>>8,c[_++]=at,at=at>>8,c[_++]=at,_}function Y(c,g,_,$,V){k(g,$,V,c,_,7);let Z=Number(g&BigInt(4294967295));c[_+7]=Z,Z=Z>>8,c[_+6]=Z,Z=Z>>8,c[_+5]=Z,Z=Z>>8,c[_+4]=Z;let at=Number(g>>BigInt(32)&BigInt(4294967295));return c[_+3]=at,at=at>>8,c[_+2]=at,at=at>>8,c[_+1]=at,at=at>>8,c[_]=at,_+8}a.prototype.writeBigUInt64LE=Pt(function(c,g=0){return T(this,c,g,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Pt(function(c,g=0){return Y(this,c,g,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(c,g,_,$){if(c=+c,g=g>>>0,!$){const xt=Math.pow(2,8*_-1);Q(this,c,g,_,xt-1,-xt)}let V=0,Z=1,at=0;for(this[g]=c&255;++V<_&&(Z*=256);)c<0&&at===0&&this[g+V-1]!==0&&(at=1),this[g+V]=(c/Z>>0)-at&255;return g+_},a.prototype.writeIntBE=function(c,g,_,$){if(c=+c,g=g>>>0,!$){const xt=Math.pow(2,8*_-1);Q(this,c,g,_,xt-1,-xt)}let V=_-1,Z=1,at=0;for(this[g+V]=c&255;--V>=0&&(Z*=256);)c<0&&at===0&&this[g+V+1]!==0&&(at=1),this[g+V]=(c/Z>>0)-at&255;return g+_},a.prototype.writeInt8=function(c,g,_){return c=+c,g=g>>>0,_||Q(this,c,g,1,127,-128),c<0&&(c=255+c+1),this[g]=c&255,g+1},a.prototype.writeInt16LE=function(c,g,_){return c=+c,g=g>>>0,_||Q(this,c,g,2,32767,-32768),this[g]=c&255,this[g+1]=c>>>8,g+2},a.prototype.writeInt16BE=function(c,g,_){return c=+c,g=g>>>0,_||Q(this,c,g,2,32767,-32768),this[g]=c>>>8,this[g+1]=c&255,g+2},a.prototype.writeInt32LE=function(c,g,_){return c=+c,g=g>>>0,_||Q(this,c,g,4,2147483647,-2147483648),this[g]=c&255,this[g+1]=c>>>8,this[g+2]=c>>>16,this[g+3]=c>>>24,g+4},a.prototype.writeInt32BE=function(c,g,_){return c=+c,g=g>>>0,_||Q(this,c,g,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[g]=c>>>24,this[g+1]=c>>>16,this[g+2]=c>>>8,this[g+3]=c&255,g+4},a.prototype.writeBigInt64LE=Pt(function(c,g=0){return T(this,c,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Pt(function(c,g=0){return Y(this,c,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function K(c,g,_,$,V,Z){if(_+$>c.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function nt(c,g,_,$,V){return g=+g,_=_>>>0,V||K(c,g,_,4),n.write(c,g,_,$,23,4),_+4}a.prototype.writeFloatLE=function(c,g,_){return nt(this,c,g,!0,_)},a.prototype.writeFloatBE=function(c,g,_){return nt(this,c,g,!1,_)};function st(c,g,_,$,V){return g=+g,_=_>>>0,V||K(c,g,_,8),n.write(c,g,_,$,52,8),_+8}a.prototype.writeDoubleLE=function(c,g,_){return st(this,c,g,!0,_)},a.prototype.writeDoubleBE=function(c,g,_){return st(this,c,g,!1,_)},a.prototype.copy=function(c,g,_,$){if(!a.isBuffer(c))throw new TypeError("argument should be a Buffer");if(_||(_=0),!$&&$!==0&&($=this.length),g>=c.length&&(g=c.length),g||(g=0),$>0&&$<_&&($=_),$===_||c.length===0||this.length===0)return 0;if(g<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("sourceEnd out of bounds");$>this.length&&($=this.length),c.length-g<$-_&&($=c.length-g+_);const V=$-_;return this===c&&typeof s.prototype.copyWithin=="function"?this.copyWithin(g,_,$):s.prototype.set.call(c,this.subarray(_,$),g),V},a.prototype.fill=function(c,g,_,$){if(typeof c=="string"){if(typeof g=="string"?($=g,g=0,_=this.length):typeof _=="string"&&($=_,_=this.length),$!==void 0&&typeof $!="string")throw new TypeError("encoding must be a string");if(typeof $=="string"&&!a.isEncoding($))throw new TypeError("Unknown encoding: "+$);if(c.length===1){const Z=c.charCodeAt(0);($==="utf8"&&Z<128||$==="latin1")&&(c=Z)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(g<0||this.length<g||this.length<_)throw new RangeError("Out of range index");if(_<=g)return this;g=g>>>0,_=_===void 0?this.length:_>>>0,c||(c=0);let V;if(typeof c=="number")for(V=g;V<_;++V)this[V]=c;else{const Z=a.isBuffer(c)?c:a.from(c,$),at=Z.length;if(at===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(V=0;V<_-g;++V)this[V+g]=Z[V%at]}return this};const L={};function B(c,g,_){L[c]=class extends _{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code($){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:$,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}B("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),B("ERR_INVALID_ARG_TYPE",function(c,g){return`The "${c}" argument must be of type number. Received type ${typeof g}`},TypeError),B("ERR_OUT_OF_RANGE",function(c,g,_){let $=`The value of "${c}" is out of range.`,V=_;return Number.isInteger(_)&&Math.abs(_)>2**32?V=b(String(_)):typeof _=="bigint"&&(V=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(V=b(V)),V+="n"),$+=` It must be ${g}. Received ${V}`,$},RangeError);function b(c){let g="",_=c.length;const $=c[0]==="-"?1:0;for(;_>=$+4;_-=3)g=`_${c.slice(_-3,_)}${g}`;return`${c.slice(0,_)}${g}`}function y(c,g,_){D(g,"offset"),(c[g]===void 0||c[g+_]===void 0)&&ot(g,c.length-(_+1))}function k(c,g,_,$,V,Z){if(c>_||c<g){const at=typeof g=="bigint"?"n":"";let xt;throw g===0||g===BigInt(0)?xt=`>= 0${at} and < 2${at} ** ${(Z+1)*8}${at}`:xt=`>= -(2${at} ** ${(Z+1)*8-1}${at}) and < 2 ** ${(Z+1)*8-1}${at}`,new L.ERR_OUT_OF_RANGE("value",xt,c)}y($,V,Z)}function D(c,g){if(typeof c!="number")throw new L.ERR_INVALID_ARG_TYPE(g,"number",c)}function ot(c,g,_){throw Math.floor(c)!==c?(D(c,_),new L.ERR_OUT_OF_RANGE("offset","an integer",c)):g<0?new L.ERR_BUFFER_OUT_OF_BOUNDS:new L.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${g}`,c)}const _t=/[^+/0-9A-Za-z-_]/g;function X(c){if(c=c.split("=")[0],c=c.trim().replace(_t,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function wt(c,g){g=g||1/0;let _;const $=c.length;let V=null;const Z=[];for(let at=0;at<$;++at){if(_=c.charCodeAt(at),_>55295&&_<57344){if(!V){if(_>56319){(g-=3)>-1&&Z.push(239,191,189);continue}else if(at+1===$){(g-=3)>-1&&Z.push(239,191,189);continue}V=_;continue}if(_<56320){(g-=3)>-1&&Z.push(239,191,189),V=_;continue}_=(V-55296<<10|_-56320)+65536}else V&&(g-=3)>-1&&Z.push(239,191,189);if(V=null,_<128){if((g-=1)<0)break;Z.push(_)}else if(_<2048){if((g-=2)<0)break;Z.push(_>>6|192,_&63|128)}else if(_<65536){if((g-=3)<0)break;Z.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((g-=4)<0)break;Z.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return Z}function Bt(c){const g=[];for(let _=0;_<c.length;++_)g.push(c.charCodeAt(_)&255);return g}function dt(c,g){let _,$,V;const Z=[];for(let at=0;at<c.length&&!((g-=2)<0);++at)_=c.charCodeAt(at),$=_>>8,V=_%256,Z.push(V),Z.push($);return Z}function gt(c){return t.toByteArray(X(c))}function Ut(c,g,_,$){let V;for(V=0;V<$&&!(V+_>=g.length||V>=c.length);++V)g[V+_]=c[V];return V}function Wt(c,g){return c instanceof g||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===g.name}function ne(c){return c!==c}const $t=(function(){const c="0123456789abcdef",g=new Array(256);for(let _=0;_<16;++_){const $=_*16;for(let V=0;V<16;++V)g[$+V]=c[_]+c[V]}return g})();function Pt(c){return typeof BigInt>"u"?se:c}function se(){throw new Error("BigInt not supported")}})(Zu);const rn=Zu.Buffer;var Ys={},On={exports:{}},Hs;function ts(){if(Hs)return On.exports;Hs=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(N,P,M){return Function.prototype.apply.call(N,P,M)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(N){return Object.getOwnPropertyNames(N).concat(Object.getOwnPropertySymbols(N))}:n=function(N){return Object.getOwnPropertyNames(N)};function r(N){console&&console.warn&&console.warn(N)}var o=Number.isNaN||function(N){return N!==N};function s(){s.init.call(this)}On.exports=s,On.exports.once=v,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function i(N){if(typeof N!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof N)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(N){if(typeof N!="number"||N<0||o(N))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+N+".");u=N}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(N){if(typeof N!="number"||N<0||o(N))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+N+".");return this._maxListeners=N,this};function f(N){return N._maxListeners===void 0?s.defaultMaxListeners:N._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(N){for(var P=[],M=1;M<arguments.length;M++)P.push(arguments[M]);var F=N==="error",O=this._events;if(O!==void 0)F=F&&O.error===void 0;else if(!F)return!1;if(F){var q;if(P.length>0&&(q=P[0]),q instanceof Error)throw q;var j=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw j.context=q,j}var ct=O[N];if(ct===void 0)return!1;if(typeof ct=="function")t(ct,this,P);else for(var G=ct.length,rt=S(ct,G),M=0;M<G;++M)t(rt[M],this,P);return!0};function h(N,P,M,F){var O,q,j;if(i(M),q=N._events,q===void 0?(q=N._events=Object.create(null),N._eventsCount=0):(q.newListener!==void 0&&(N.emit("newListener",P,M.listener?M.listener:M),q=N._events),j=q[P]),j===void 0)j=q[P]=M,++N._eventsCount;else if(typeof j=="function"?j=q[P]=F?[M,j]:[j,M]:F?j.unshift(M):j.push(M),O=f(N),O>0&&j.length>O&&!j.warned){j.warned=!0;var ct=new Error("Possible EventEmitter memory leak detected. "+j.length+" "+String(P)+" listeners added. Use emitter.setMaxListeners() to increase limit");ct.name="MaxListenersExceededWarning",ct.emitter=N,ct.type=P,ct.count=j.length,r(ct)}return N}s.prototype.addListener=function(N,P){return h(this,N,P,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(N,P){return h(this,N,P,!0)};function a(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(N,P,M){var F={fired:!1,wrapFn:void 0,target:N,type:P,listener:M},O=a.bind(F);return O.listener=M,F.wrapFn=O,O}s.prototype.once=function(N,P){return i(P),this.on(N,p(this,N,P)),this},s.prototype.prependOnceListener=function(N,P){return i(P),this.prependListener(N,p(this,N,P)),this},s.prototype.removeListener=function(N,P){var M,F,O,q,j;if(i(P),F=this._events,F===void 0)return this;if(M=F[N],M===void 0)return this;if(M===P||M.listener===P)--this._eventsCount===0?this._events=Object.create(null):(delete F[N],F.removeListener&&this.emit("removeListener",N,M.listener||P));else if(typeof M!="function"){for(O=-1,q=M.length-1;q>=0;q--)if(M[q]===P||M[q].listener===P){j=M[q].listener,O=q;break}if(O<0)return this;O===0?M.shift():w(M,O),M.length===1&&(F[N]=M[0]),F.removeListener!==void 0&&this.emit("removeListener",N,j||P)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(N){var P,M,F;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[N]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[N]),this;if(arguments.length===0){var O=Object.keys(M),q;for(F=0;F<O.length;++F)q=O[F],q!=="removeListener"&&this.removeAllListeners(q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(P=M[N],typeof P=="function")this.removeListener(N,P);else if(P!==void 0)for(F=P.length-1;F>=0;F--)this.removeListener(N,P[F]);return this};function d(N,P,M){var F=N._events;if(F===void 0)return[];var O=F[P];return O===void 0?[]:typeof O=="function"?M?[O.listener||O]:[O]:M?R(O):S(O,O.length)}s.prototype.listeners=function(N){return d(this,N,!0)},s.prototype.rawListeners=function(N){return d(this,N,!1)},s.listenerCount=function(N,P){return typeof N.listenerCount=="function"?N.listenerCount(P):I.call(N,P)},s.prototype.listenerCount=I;function I(N){var P=this._events;if(P!==void 0){var M=P[N];if(typeof M=="function")return 1;if(M!==void 0)return M.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function S(N,P){for(var M=new Array(P),F=0;F<P;++F)M[F]=N[F];return M}function w(N,P){for(;P+1<N.length;P++)N[P]=N[P+1];N.pop()}function R(N){for(var P=new Array(N.length),M=0;M<P.length;++M)P[M]=N[M].listener||N[M];return P}function v(N,P){return new Promise(function(M,F){function O(j){N.removeListener(P,q),F(j)}function q(){typeof N.removeListener=="function"&&N.removeListener("error",O),M([].slice.call(arguments))}x(N,P,q,{once:!0}),P!=="error"&&E(N,O,{once:!0})})}function E(N,P,M){typeof N.on=="function"&&x(N,"error",P,M)}function x(N,P,M,F){if(typeof N.on=="function")F.once?N.once(P,M):N.on(P,M);else if(typeof N.addEventListener=="function")N.addEventListener(P,function O(q){F.once&&N.removeEventListener(P,O),M(q)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof N)}return On.exports}var Er={exports:{}},Xs;function Qe(){return Xs||(Xs=1,typeof Object.create=="function"?Er.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Er.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),Er.exports}var Js,qs;function tc(){return qs||(qs=1,Js=ts().EventEmitter),Js}var Qs={},Zs;function rr(){return Zs||(Zs=1,(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},n={};n.byteLength=a,n.toByteArray=d,n.fromByteArray=w;for(var r=[],o=[],s=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,f=u.length;i<f;++i)r[i]=u[i],o[u.charCodeAt(i)]=i;o[45]=62,o[95]=63;function h(E){var x=E.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var N=E.indexOf("=");N===-1&&(N=x);var P=N===x?0:4-N%4;return[N,P]}function a(E){var x=h(E),N=x[0],P=x[1];return(N+P)*3/4-P}function p(E,x,N){return(x+N)*3/4-N}function d(E){var x,N=h(E),P=N[0],M=N[1],F=new s(p(E,P,M)),O=0,q=M>0?P-4:P,j;for(j=0;j<q;j+=4)x=o[E.charCodeAt(j)]<<18|o[E.charCodeAt(j+1)]<<12|o[E.charCodeAt(j+2)]<<6|o[E.charCodeAt(j+3)],F[O++]=x>>16&255,F[O++]=x>>8&255,F[O++]=x&255;return M===2&&(x=o[E.charCodeAt(j)]<<2|o[E.charCodeAt(j+1)]>>4,F[O++]=x&255),M===1&&(x=o[E.charCodeAt(j)]<<10|o[E.charCodeAt(j+1)]<<4|o[E.charCodeAt(j+2)]>>2,F[O++]=x>>8&255,F[O++]=x&255),F}function I(E){return r[E>>18&63]+r[E>>12&63]+r[E>>6&63]+r[E&63]}function S(E,x,N){for(var P,M=[],F=x;F<N;F+=3)P=(E[F]<<16&16711680)+(E[F+1]<<8&65280)+(E[F+2]&255),M.push(I(P));return M.join("")}function w(E){for(var x,N=E.length,P=N%3,M=[],F=16383,O=0,q=N-P;O<q;O+=F)M.push(S(E,O,O+F>q?q:O+F));return P===1?(x=E[N-1],M.push(r[x>>2]+r[x<<4&63]+"==")):P===2&&(x=(E[N-2]<<8)+E[N-1],M.push(r[x>>10]+r[x>>4&63]+r[x<<2&63]+"=")),M.join("")}var R={};R.read=function(E,x,N,P,M){var F,O,q=M*8-P-1,j=(1<<q)-1,ct=j>>1,G=-7,rt=N?M-1:0,pt=N?-1:1,At=E[x+rt];for(rt+=pt,F=At&(1<<-G)-1,At>>=-G,G+=q;G>0;F=F*256+E[x+rt],rt+=pt,G-=8);for(O=F&(1<<-G)-1,F>>=-G,G+=P;G>0;O=O*256+E[x+rt],rt+=pt,G-=8);if(F===0)F=1-ct;else{if(F===j)return O?NaN:(At?-1:1)*(1/0);O=O+Math.pow(2,P),F=F-ct}return(At?-1:1)*O*Math.pow(2,F-P)},R.write=function(E,x,N,P,M,F){var O,q,j,ct=F*8-M-1,G=(1<<ct)-1,rt=G>>1,pt=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,At=P?0:F-1,Et=P?1:-1,lt=x<0||x===0&&1/x<0?1:0;for(x=Math.abs(x),isNaN(x)||x===1/0?(q=isNaN(x)?1:0,O=G):(O=Math.floor(Math.log(x)/Math.LN2),x*(j=Math.pow(2,-O))<1&&(O--,j*=2),O+rt>=1?x+=pt/j:x+=pt*Math.pow(2,1-rt),x*j>=2&&(O++,j/=2),O+rt>=G?(q=0,O=G):O+rt>=1?(q=(x*j-1)*Math.pow(2,M),O=O+rt):(q=x*Math.pow(2,rt-1)*Math.pow(2,M),O=0));M>=8;E[N+At]=q&255,At+=Et,q/=256,M-=8);for(O=O<<M|q,ct+=M;ct>0;E[N+At]=O&255,At+=Et,O/=256,ct-=8);E[N+At-Et]|=lt*128},(function(E){const x=n,N=R,P=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;E.Buffer=G,E.SlowBuffer=z,E.INSPECT_MAX_BYTES=50;const M=2147483647;E.kMaxLength=M;const{Uint8Array:F,ArrayBuffer:O,SharedArrayBuffer:q}=globalThis;G.TYPED_ARRAY_SUPPORT=j(),!G.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function j(){try{const l=new F(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,F.prototype),Object.setPrototypeOf(l,m),l.foo()===42}catch{return!1}}Object.defineProperty(G.prototype,"parent",{enumerable:!0,get:function(){if(G.isBuffer(this))return this.buffer}}),Object.defineProperty(G.prototype,"offset",{enumerable:!0,get:function(){if(G.isBuffer(this))return this.byteOffset}});function ct(l){if(l>M)throw new RangeError('The value "'+l+'" is invalid for option "size"');const m=new F(l);return Object.setPrototypeOf(m,G.prototype),m}function G(l,m,A){if(typeof l=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Et(l)}return rt(l,m,A)}G.poolSize=8192;function rt(l,m,A){if(typeof l=="string")return lt(l,m);if(O.isView(l))return Nt(l);if(l==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l);if(oe(l,O)||l&&oe(l.buffer,O)||typeof q<"u"&&(oe(l,q)||l&&oe(l.buffer,q)))return yt(l,m,A);if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const U=l.valueOf&&l.valueOf();if(U!=null&&U!==l)return G.from(U,m,A);const W=Tt(l);if(W)return W;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof l[Symbol.toPrimitive]=="function")return G.from(l[Symbol.toPrimitive]("string"),m,A);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l)}G.from=function(l,m,A){return rt(l,m,A)},Object.setPrototypeOf(G.prototype,F.prototype),Object.setPrototypeOf(G,F);function pt(l){if(typeof l!="number")throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('The value "'+l+'" is invalid for option "size"')}function At(l,m,A){return pt(l),l<=0?ct(l):m!==void 0?typeof A=="string"?ct(l).fill(m,A):ct(l).fill(m):ct(l)}G.alloc=function(l,m,A){return At(l,m,A)};function Et(l){return pt(l),ct(l<0?0:ft(l)|0)}G.allocUnsafe=function(l){return Et(l)},G.allocUnsafeSlow=function(l){return Et(l)};function lt(l,m){if((typeof m!="string"||m==="")&&(m="utf8"),!G.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const A=H(l,m)|0;let U=ct(A);const W=U.write(l,m);return W!==A&&(U=U.slice(0,W)),U}function mt(l){const m=l.length<0?0:ft(l.length)|0,A=ct(m);for(let U=0;U<m;U+=1)A[U]=l[U]&255;return A}function Nt(l){if(oe(l,F)){const m=new F(l);return yt(m.buffer,m.byteOffset,m.byteLength)}return mt(l)}function yt(l,m,A){if(m<0||l.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(l.byteLength<m+(A||0))throw new RangeError('"length" is outside of buffer bounds');let U;return m===void 0&&A===void 0?U=new F(l):A===void 0?U=new F(l,m):U=new F(l,m,A),Object.setPrototypeOf(U,G.prototype),U}function Tt(l){if(G.isBuffer(l)){const m=ft(l.length)|0,A=ct(m);return A.length===0||l.copy(A,0,0,m),A}if(l.length!==void 0)return typeof l.length!="number"||Ze(l.length)?ct(0):mt(l);if(l.type==="Buffer"&&Array.isArray(l.data))return mt(l.data)}function ft(l){if(l>=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return l|0}function z(l){return+l!=l&&(l=0),G.alloc(+l)}G.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==G.prototype},G.compare=function(l,m){if(oe(l,F)&&(l=G.from(l,l.offset,l.byteLength)),oe(m,F)&&(m=G.from(m,m.offset,m.byteLength)),!G.isBuffer(l)||!G.isBuffer(m))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===m)return 0;let A=l.length,U=m.length;for(let W=0,tt=Math.min(A,U);W<tt;++W)if(l[W]!==m[W]){A=l[W],U=m[W];break}return A<U?-1:U<A?1:0},G.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},G.concat=function(l,m){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return G.alloc(0);let A;if(m===void 0)for(m=0,A=0;A<l.length;++A)m+=l[A].length;const U=G.allocUnsafe(m);let W=0;for(A=0;A<l.length;++A){let tt=l[A];if(oe(tt,F))W+tt.length>U.length?(G.isBuffer(tt)||(tt=G.from(tt)),tt.copy(U,W)):F.prototype.set.call(U,tt,W);else if(G.isBuffer(tt))tt.copy(U,W);else throw new TypeError('"list" argument must be an Array of Buffers');W+=tt.length}return U};function H(l,m){if(G.isBuffer(l))return l.length;if(O.isView(l)||oe(l,O))return l.byteLength;if(typeof l!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof l);const A=l.length,U=arguments.length>2&&arguments[2]===!0;if(!U&&A===0)return 0;let W=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return A;case"utf8":case"utf-8":return Ft(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A*2;case"hex":return A>>>1;case"base64":return Dt(l).length;default:if(W)return U?-1:Ft(l).length;m=(""+m).toLowerCase(),W=!0}}G.byteLength=H;function Q(l,m,A){let U=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((A===void 0||A>this.length)&&(A=this.length),A<=0)||(A>>>=0,m>>>=0,A<=m))return"";for(l||(l="utf8");;)switch(l){case"hex":return wt(this,m,A);case"utf8":case"utf-8":return k(this,m,A);case"ascii":return _t(this,m,A);case"latin1":case"binary":return X(this,m,A);case"base64":return y(this,m,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,m,A);default:if(U)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),U=!0}}G.prototype._isBuffer=!0;function T(l,m,A){const U=l[m];l[m]=l[A],l[A]=U}G.prototype.swap16=function(){const l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let m=0;m<l;m+=2)T(this,m,m+1);return this},G.prototype.swap32=function(){const l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let m=0;m<l;m+=4)T(this,m,m+3),T(this,m+1,m+2);return this},G.prototype.swap64=function(){const l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let m=0;m<l;m+=8)T(this,m,m+7),T(this,m+1,m+6),T(this,m+2,m+5),T(this,m+3,m+4);return this},G.prototype.toString=function(){const l=this.length;return l===0?"":arguments.length===0?k(this,0,l):Q.apply(this,arguments)},G.prototype.toLocaleString=G.prototype.toString,G.prototype.equals=function(l){if(!G.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:G.compare(this,l)===0},G.prototype.inspect=function(){let l="";const m=E.INSPECT_MAX_BYTES;return l=this.toString("hex",0,m).replace(/(.{2})/g,"$1 ").trim(),this.length>m&&(l+=" ... "),"<Buffer "+l+">"},P&&(G.prototype[P]=G.prototype.inspect),G.prototype.compare=function(l,m,A,U,W){if(oe(l,F)&&(l=G.from(l,l.offset,l.byteLength)),!G.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(m===void 0&&(m=0),A===void 0&&(A=l?l.length:0),U===void 0&&(U=0),W===void 0&&(W=this.length),m<0||A>l.length||U<0||W>this.length)throw new RangeError("out of range index");if(U>=W&&m>=A)return 0;if(U>=W)return-1;if(m>=A)return 1;if(m>>>=0,A>>>=0,U>>>=0,W>>>=0,this===l)return 0;let tt=W-U,it=A-m;const Mt=Math.min(tt,it),Jt=this.slice(U,W),jt=l.slice(m,A);for(let Lt=0;Lt<Mt;++Lt)if(Jt[Lt]!==jt[Lt]){tt=Jt[Lt],it=jt[Lt];break}return tt<it?-1:it<tt?1:0};function Y(l,m,A,U,W){if(l.length===0)return-1;if(typeof A=="string"?(U=A,A=0):A>2147483647?A=2147483647:A<-2147483648&&(A=-2147483648),A=+A,Ze(A)&&(A=W?0:l.length-1),A<0&&(A=l.length+A),A>=l.length){if(W)return-1;A=l.length-1}else if(A<0)if(W)A=0;else return-1;if(typeof m=="string"&&(m=G.from(m,U)),G.isBuffer(m))return m.length===0?-1:K(l,m,A,U,W);if(typeof m=="number")return m=m&255,typeof F.prototype.indexOf=="function"?W?F.prototype.indexOf.call(l,m,A):F.prototype.lastIndexOf.call(l,m,A):K(l,[m],A,U,W);throw new TypeError("val must be string, number or Buffer")}function K(l,m,A,U,W){let tt=1,it=l.length,Mt=m.length;if(U!==void 0&&(U=String(U).toLowerCase(),U==="ucs2"||U==="ucs-2"||U==="utf16le"||U==="utf-16le")){if(l.length<2||m.length<2)return-1;tt=2,it/=2,Mt/=2,A/=2}function Jt(Lt,Gt){return tt===1?Lt[Gt]:Lt.readUInt16BE(Gt*tt)}let jt;if(W){let Lt=-1;for(jt=A;jt<it;jt++)if(Jt(l,jt)===Jt(m,Lt===-1?0:jt-Lt)){if(Lt===-1&&(Lt=jt),jt-Lt+1===Mt)return Lt*tt}else Lt!==-1&&(jt-=jt-Lt),Lt=-1}else for(A+Mt>it&&(A=it-Mt),jt=A;jt>=0;jt--){let Lt=!0;for(let Gt=0;Gt<Mt;Gt++)if(Jt(l,jt+Gt)!==Jt(m,Gt)){Lt=!1;break}if(Lt)return jt}return-1}G.prototype.includes=function(l,m,A){return this.indexOf(l,m,A)!==-1},G.prototype.indexOf=function(l,m,A){return Y(this,l,m,A,!0)},G.prototype.lastIndexOf=function(l,m,A){return Y(this,l,m,A,!1)};function nt(l,m,A,U){A=Number(A)||0;const W=l.length-A;U?(U=Number(U),U>W&&(U=W)):U=W;const tt=m.length;U>tt/2&&(U=tt/2);let it;for(it=0;it<U;++it){const Mt=parseInt(m.substr(it*2,2),16);if(Ze(Mt))return it;l[A+it]=Mt}return it}function st(l,m,A,U){return Ie(Ft(m,l.length-A),l,A,U)}function L(l,m,A,U){return Ie(Ct(m),l,A,U)}function B(l,m,A,U){return Ie(Dt(m),l,A,U)}function b(l,m,A,U){return Ie(Rt(m,l.length-A),l,A,U)}G.prototype.write=function(l,m,A,U){if(m===void 0)U="utf8",A=this.length,m=0;else if(A===void 0&&typeof m=="string")U=m,A=this.length,m=0;else if(isFinite(m))m=m>>>0,isFinite(A)?(A=A>>>0,U===void 0&&(U="utf8")):(U=A,A=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const W=this.length-m;if((A===void 0||A>W)&&(A=W),l.length>0&&(A<0||m<0)||m>this.length)throw new RangeError("Attempt to write outside buffer bounds");U||(U="utf8");let tt=!1;for(;;)switch(U){case"hex":return nt(this,l,m,A);case"utf8":case"utf-8":return st(this,l,m,A);case"ascii":case"latin1":case"binary":return L(this,l,m,A);case"base64":return B(this,l,m,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,l,m,A);default:if(tt)throw new TypeError("Unknown encoding: "+U);U=(""+U).toLowerCase(),tt=!0}},G.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function y(l,m,A){return m===0&&A===l.length?x.fromByteArray(l):x.fromByteArray(l.slice(m,A))}function k(l,m,A){A=Math.min(l.length,A);const U=[];let W=m;for(;W<A;){const tt=l[W];let it=null,Mt=tt>239?4:tt>223?3:tt>191?2:1;if(W+Mt<=A){let Jt,jt,Lt,Gt;switch(Mt){case 1:tt<128&&(it=tt);break;case 2:Jt=l[W+1],(Jt&192)===128&&(Gt=(tt&31)<<6|Jt&63,Gt>127&&(it=Gt));break;case 3:Jt=l[W+1],jt=l[W+2],(Jt&192)===128&&(jt&192)===128&&(Gt=(tt&15)<<12|(Jt&63)<<6|jt&63,Gt>2047&&(Gt<55296||Gt>57343)&&(it=Gt));break;case 4:Jt=l[W+1],jt=l[W+2],Lt=l[W+3],(Jt&192)===128&&(jt&192)===128&&(Lt&192)===128&&(Gt=(tt&15)<<18|(Jt&63)<<12|(jt&63)<<6|Lt&63,Gt>65535&&Gt<1114112&&(it=Gt))}}it===null?(it=65533,Mt=1):it>65535&&(it-=65536,U.push(it>>>10&1023|55296),it=56320|it&1023),U.push(it),W+=Mt}return ot(U)}const D=4096;function ot(l){const m=l.length;if(m<=D)return String.fromCharCode.apply(String,l);let A="",U=0;for(;U<m;)A+=String.fromCharCode.apply(String,l.slice(U,U+=D));return A}function _t(l,m,A){let U="";A=Math.min(l.length,A);for(let W=m;W<A;++W)U+=String.fromCharCode(l[W]&127);return U}function X(l,m,A){let U="";A=Math.min(l.length,A);for(let W=m;W<A;++W)U+=String.fromCharCode(l[W]);return U}function wt(l,m,A){const U=l.length;(!m||m<0)&&(m=0),(!A||A<0||A>U)&&(A=U);let W="";for(let tt=m;tt<A;++tt)W+=Dn[l[tt]];return W}function Bt(l,m,A){const U=l.slice(m,A);let W="";for(let tt=0;tt<U.length-1;tt+=2)W+=String.fromCharCode(U[tt]+U[tt+1]*256);return W}G.prototype.slice=function(l,m){const A=this.length;l=~~l,m=m===void 0?A:~~m,l<0?(l+=A,l<0&&(l=0)):l>A&&(l=A),m<0?(m+=A,m<0&&(m=0)):m>A&&(m=A),m<l&&(m=l);const U=this.subarray(l,m);return Object.setPrototypeOf(U,G.prototype),U};function dt(l,m,A){if(l%1!==0||l<0)throw new RangeError("offset is not uint");if(l+m>A)throw new RangeError("Trying to access beyond buffer length")}G.prototype.readUintLE=G.prototype.readUIntLE=function(l,m,A){l=l>>>0,m=m>>>0,A||dt(l,m,this.length);let U=this[l],W=1,tt=0;for(;++tt<m&&(W*=256);)U+=this[l+tt]*W;return U},G.prototype.readUintBE=G.prototype.readUIntBE=function(l,m,A){l=l>>>0,m=m>>>0,A||dt(l,m,this.length);let U=this[l+--m],W=1;for(;m>0&&(W*=256);)U+=this[l+--m]*W;return U},G.prototype.readUint8=G.prototype.readUInt8=function(l,m){return l=l>>>0,m||dt(l,1,this.length),this[l]},G.prototype.readUint16LE=G.prototype.readUInt16LE=function(l,m){return l=l>>>0,m||dt(l,2,this.length),this[l]|this[l+1]<<8},G.prototype.readUint16BE=G.prototype.readUInt16BE=function(l,m){return l=l>>>0,m||dt(l,2,this.length),this[l]<<8|this[l+1]},G.prototype.readUint32LE=G.prototype.readUInt32LE=function(l,m){return l=l>>>0,m||dt(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},G.prototype.readUint32BE=G.prototype.readUInt32BE=function(l,m){return l=l>>>0,m||dt(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},G.prototype.readBigUInt64LE=Re(function(l){l=l>>>0,V(l,"offset");const m=this[l],A=this[l+7];(m===void 0||A===void 0)&&Z(l,this.length-8);const U=m+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,W=this[++l]+this[++l]*2**8+this[++l]*2**16+A*2**24;return BigInt(U)+(BigInt(W)<<BigInt(32))}),G.prototype.readBigUInt64BE=Re(function(l){l=l>>>0,V(l,"offset");const m=this[l],A=this[l+7];(m===void 0||A===void 0)&&Z(l,this.length-8);const U=m*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],W=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+A;return(BigInt(U)<<BigInt(32))+BigInt(W)}),G.prototype.readIntLE=function(l,m,A){l=l>>>0,m=m>>>0,A||dt(l,m,this.length);let U=this[l],W=1,tt=0;for(;++tt<m&&(W*=256);)U+=this[l+tt]*W;return W*=128,U>=W&&(U-=Math.pow(2,8*m)),U},G.prototype.readIntBE=function(l,m,A){l=l>>>0,m=m>>>0,A||dt(l,m,this.length);let U=m,W=1,tt=this[l+--U];for(;U>0&&(W*=256);)tt+=this[l+--U]*W;return W*=128,tt>=W&&(tt-=Math.pow(2,8*m)),tt},G.prototype.readInt8=function(l,m){return l=l>>>0,m||dt(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},G.prototype.readInt16LE=function(l,m){l=l>>>0,m||dt(l,2,this.length);const A=this[l]|this[l+1]<<8;return A&32768?A|4294901760:A},G.prototype.readInt16BE=function(l,m){l=l>>>0,m||dt(l,2,this.length);const A=this[l+1]|this[l]<<8;return A&32768?A|4294901760:A},G.prototype.readInt32LE=function(l,m){return l=l>>>0,m||dt(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},G.prototype.readInt32BE=function(l,m){return l=l>>>0,m||dt(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},G.prototype.readBigInt64LE=Re(function(l){l=l>>>0,V(l,"offset");const m=this[l],A=this[l+7];(m===void 0||A===void 0)&&Z(l,this.length-8);const U=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(A<<24);return(BigInt(U)<<BigInt(32))+BigInt(m+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),G.prototype.readBigInt64BE=Re(function(l){l=l>>>0,V(l,"offset");const m=this[l],A=this[l+7];(m===void 0||A===void 0)&&Z(l,this.length-8);const U=(m<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(U)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+A)}),G.prototype.readFloatLE=function(l,m){return l=l>>>0,m||dt(l,4,this.length),N.read(this,l,!0,23,4)},G.prototype.readFloatBE=function(l,m){return l=l>>>0,m||dt(l,4,this.length),N.read(this,l,!1,23,4)},G.prototype.readDoubleLE=function(l,m){return l=l>>>0,m||dt(l,8,this.length),N.read(this,l,!0,52,8)},G.prototype.readDoubleBE=function(l,m){return l=l>>>0,m||dt(l,8,this.length),N.read(this,l,!1,52,8)};function gt(l,m,A,U,W,tt){if(!G.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>W||m<tt)throw new RangeError('"value" argument is out of bounds');if(A+U>l.length)throw new RangeError("Index out of range")}G.prototype.writeUintLE=G.prototype.writeUIntLE=function(l,m,A,U){if(l=+l,m=m>>>0,A=A>>>0,!U){const it=Math.pow(2,8*A)-1;gt(this,l,m,A,it,0)}let W=1,tt=0;for(this[m]=l&255;++tt<A&&(W*=256);)this[m+tt]=l/W&255;return m+A},G.prototype.writeUintBE=G.prototype.writeUIntBE=function(l,m,A,U){if(l=+l,m=m>>>0,A=A>>>0,!U){const it=Math.pow(2,8*A)-1;gt(this,l,m,A,it,0)}let W=A-1,tt=1;for(this[m+W]=l&255;--W>=0&&(tt*=256);)this[m+W]=l/tt&255;return m+A},G.prototype.writeUint8=G.prototype.writeUInt8=function(l,m,A){return l=+l,m=m>>>0,A||gt(this,l,m,1,255,0),this[m]=l&255,m+1},G.prototype.writeUint16LE=G.prototype.writeUInt16LE=function(l,m,A){return l=+l,m=m>>>0,A||gt(this,l,m,2,65535,0),this[m]=l&255,this[m+1]=l>>>8,m+2},G.prototype.writeUint16BE=G.prototype.writeUInt16BE=function(l,m,A){return l=+l,m=m>>>0,A||gt(this,l,m,2,65535,0),this[m]=l>>>8,this[m+1]=l&255,m+2},G.prototype.writeUint32LE=G.prototype.writeUInt32LE=function(l,m,A){return l=+l,m=m>>>0,A||gt(this,l,m,4,4294967295,0),this[m+3]=l>>>24,this[m+2]=l>>>16,this[m+1]=l>>>8,this[m]=l&255,m+4},G.prototype.writeUint32BE=G.prototype.writeUInt32BE=function(l,m,A){return l=+l,m=m>>>0,A||gt(this,l,m,4,4294967295,0),this[m]=l>>>24,this[m+1]=l>>>16,this[m+2]=l>>>8,this[m+3]=l&255,m+4};function Ut(l,m,A,U,W){$(m,U,W,l,A,7);let tt=Number(m&BigInt(4294967295));l[A++]=tt,tt=tt>>8,l[A++]=tt,tt=tt>>8,l[A++]=tt,tt=tt>>8,l[A++]=tt;let it=Number(m>>BigInt(32)&BigInt(4294967295));return l[A++]=it,it=it>>8,l[A++]=it,it=it>>8,l[A++]=it,it=it>>8,l[A++]=it,A}function Wt(l,m,A,U,W){$(m,U,W,l,A,7);let tt=Number(m&BigInt(4294967295));l[A+7]=tt,tt=tt>>8,l[A+6]=tt,tt=tt>>8,l[A+5]=tt,tt=tt>>8,l[A+4]=tt;let it=Number(m>>BigInt(32)&BigInt(4294967295));return l[A+3]=it,it=it>>8,l[A+2]=it,it=it>>8,l[A+1]=it,it=it>>8,l[A]=it,A+8}G.prototype.writeBigUInt64LE=Re(function(l,m=0){return Ut(this,l,m,BigInt(0),BigInt("0xffffffffffffffff"))}),G.prototype.writeBigUInt64BE=Re(function(l,m=0){return Wt(this,l,m,BigInt(0),BigInt("0xffffffffffffffff"))}),G.prototype.writeIntLE=function(l,m,A,U){if(l=+l,m=m>>>0,!U){const Mt=Math.pow(2,8*A-1);gt(this,l,m,A,Mt-1,-Mt)}let W=0,tt=1,it=0;for(this[m]=l&255;++W<A&&(tt*=256);)l<0&&it===0&&this[m+W-1]!==0&&(it=1),this[m+W]=(l/tt>>0)-it&255;return m+A},G.prototype.writeIntBE=function(l,m,A,U){if(l=+l,m=m>>>0,!U){const Mt=Math.pow(2,8*A-1);gt(this,l,m,A,Mt-1,-Mt)}let W=A-1,tt=1,it=0;for(this[m+W]=l&255;--W>=0&&(tt*=256);)l<0&&it===0&&this[m+W+1]!==0&&(it=1),this[m+W]=(l/tt>>0)-it&255;return m+A},G.prototype.writeInt8=function(l,m,A){return l=+l,m=m>>>0,A||gt(this,l,m,1,127,-128),l<0&&(l=255+l+1),this[m]=l&255,m+1},G.prototype.writeInt16LE=function(l,m,A){return l=+l,m=m>>>0,A||gt(this,l,m,2,32767,-32768),this[m]=l&255,this[m+1]=l>>>8,m+2},G.prototype.writeInt16BE=function(l,m,A){return l=+l,m=m>>>0,A||gt(this,l,m,2,32767,-32768),this[m]=l>>>8,this[m+1]=l&255,m+2},G.prototype.writeInt32LE=function(l,m,A){return l=+l,m=m>>>0,A||gt(this,l,m,4,2147483647,-2147483648),this[m]=l&255,this[m+1]=l>>>8,this[m+2]=l>>>16,this[m+3]=l>>>24,m+4},G.prototype.writeInt32BE=function(l,m,A){return l=+l,m=m>>>0,A||gt(this,l,m,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[m]=l>>>24,this[m+1]=l>>>16,this[m+2]=l>>>8,this[m+3]=l&255,m+4},G.prototype.writeBigInt64LE=Re(function(l,m=0){return Ut(this,l,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),G.prototype.writeBigInt64BE=Re(function(l,m=0){return Wt(this,l,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ne(l,m,A,U,W,tt){if(A+U>l.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function $t(l,m,A,U,W){return m=+m,A=A>>>0,W||ne(l,m,A,4),N.write(l,m,A,U,23,4),A+4}G.prototype.writeFloatLE=function(l,m,A){return $t(this,l,m,!0,A)},G.prototype.writeFloatBE=function(l,m,A){return $t(this,l,m,!1,A)};function Pt(l,m,A,U,W){return m=+m,A=A>>>0,W||ne(l,m,A,8),N.write(l,m,A,U,52,8),A+8}G.prototype.writeDoubleLE=function(l,m,A){return Pt(this,l,m,!0,A)},G.prototype.writeDoubleBE=function(l,m,A){return Pt(this,l,m,!1,A)},G.prototype.copy=function(l,m,A,U){if(!G.isBuffer(l))throw new TypeError("argument should be a Buffer");if(A||(A=0),!U&&U!==0&&(U=this.length),m>=l.length&&(m=l.length),m||(m=0),U>0&&U<A&&(U=A),U===A||l.length===0||this.length===0)return 0;if(m<0)throw new RangeError("targetStart out of bounds");if(A<0||A>=this.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("sourceEnd out of bounds");U>this.length&&(U=this.length),l.length-m<U-A&&(U=l.length-m+A);const W=U-A;return this===l&&typeof F.prototype.copyWithin=="function"?this.copyWithin(m,A,U):F.prototype.set.call(l,this.subarray(A,U),m),W},G.prototype.fill=function(l,m,A,U){if(typeof l=="string"){if(typeof m=="string"?(U=m,m=0,A=this.length):typeof A=="string"&&(U=A,A=this.length),U!==void 0&&typeof U!="string")throw new TypeError("encoding must be a string");if(typeof U=="string"&&!G.isEncoding(U))throw new TypeError("Unknown encoding: "+U);if(l.length===1){const tt=l.charCodeAt(0);(U==="utf8"&&tt<128||U==="latin1")&&(l=tt)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(m<0||this.length<m||this.length<A)throw new RangeError("Out of range index");if(A<=m)return this;m=m>>>0,A=A===void 0?this.length:A>>>0,l||(l=0);let W;if(typeof l=="number")for(W=m;W<A;++W)this[W]=l;else{const tt=G.isBuffer(l)?l:G.from(l,U),it=tt.length;if(it===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(W=0;W<A-m;++W)this[W+m]=tt[W%it]}return this};const se={};function c(l,m,A){se[l]=class extends A{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${l}]`,this.stack,delete this.name}get code(){return l}set code(U){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:U,writable:!0})}toString(){return`${this.name} [${l}]: ${this.message}`}}}c("ERR_BUFFER_OUT_OF_BOUNDS",function(l){return l?`${l} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),c("ERR_INVALID_ARG_TYPE",function(l,m){return`The "${l}" argument must be of type number. Received type ${typeof m}`},TypeError),c("ERR_OUT_OF_RANGE",function(l,m,A){let U=`The value of "${l}" is out of range.`,W=A;return Number.isInteger(A)&&Math.abs(A)>2**32?W=g(String(A)):typeof A=="bigint"&&(W=String(A),(A>BigInt(2)**BigInt(32)||A<-(BigInt(2)**BigInt(32)))&&(W=g(W)),W+="n"),U+=` It must be ${m}. Received ${W}`,U},RangeError);function g(l){let m="",A=l.length;const U=l[0]==="-"?1:0;for(;A>=U+4;A-=3)m=`_${l.slice(A-3,A)}${m}`;return`${l.slice(0,A)}${m}`}function _(l,m,A){V(m,"offset"),(l[m]===void 0||l[m+A]===void 0)&&Z(m,l.length-(A+1))}function $(l,m,A,U,W,tt){if(l>A||l<m){const it=typeof m=="bigint"?"n":"";let Mt;throw m===0||m===BigInt(0)?Mt=`>= 0${it} and < 2${it} ** ${(tt+1)*8}${it}`:Mt=`>= -(2${it} ** ${(tt+1)*8-1}${it}) and < 2 ** ${(tt+1)*8-1}${it}`,new se.ERR_OUT_OF_RANGE("value",Mt,l)}_(U,W,tt)}function V(l,m){if(typeof l!="number")throw new se.ERR_INVALID_ARG_TYPE(m,"number",l)}function Z(l,m,A){throw Math.floor(l)!==l?(V(l,A),new se.ERR_OUT_OF_RANGE("offset","an integer",l)):m<0?new se.ERR_BUFFER_OUT_OF_BOUNDS:new se.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${m}`,l)}const at=/[^+/0-9A-Za-z-_]/g;function xt(l){if(l=l.split("=")[0],l=l.trim().replace(at,""),l.length<2)return"";for(;l.length%4!==0;)l=l+"=";return l}function Ft(l,m){m=m||1/0;let A;const U=l.length;let W=null;const tt=[];for(let it=0;it<U;++it){if(A=l.charCodeAt(it),A>55295&&A<57344){if(!W){if(A>56319){(m-=3)>-1&&tt.push(239,191,189);continue}else if(it+1===U){(m-=3)>-1&&tt.push(239,191,189);continue}W=A;continue}if(A<56320){(m-=3)>-1&&tt.push(239,191,189),W=A;continue}A=(W-55296<<10|A-56320)+65536}else W&&(m-=3)>-1&&tt.push(239,191,189);if(W=null,A<128){if((m-=1)<0)break;tt.push(A)}else if(A<2048){if((m-=2)<0)break;tt.push(A>>6|192,A&63|128)}else if(A<65536){if((m-=3)<0)break;tt.push(A>>12|224,A>>6&63|128,A&63|128)}else if(A<1114112){if((m-=4)<0)break;tt.push(A>>18|240,A>>12&63|128,A>>6&63|128,A&63|128)}else throw new Error("Invalid code point")}return tt}function Ct(l){const m=[];for(let A=0;A<l.length;++A)m.push(l.charCodeAt(A)&255);return m}function Rt(l,m){let A,U,W;const tt=[];for(let it=0;it<l.length&&!((m-=2)<0);++it)A=l.charCodeAt(it),U=A>>8,W=A%256,tt.push(W),tt.push(U);return tt}function Dt(l){return x.toByteArray(xt(l))}function Ie(l,m,A,U){let W;for(W=0;W<U&&!(W+A>=m.length||W>=l.length);++W)m[W+A]=l[W];return W}function oe(l,m){return l instanceof m||l!=null&&l.constructor!=null&&l.constructor.name!=null&&l.constructor.name===m.name}function Ze(l){return l!==l}const Dn=(function(){const l="0123456789abcdef",m=new Array(256);for(let A=0;A<16;++A){const U=A*16;for(let W=0;W<16;++W)m[U+W]=l[A]+l[W]}return m})();function Re(l){return typeof BigInt>"u"?Mn:l}function Mn(){throw new Error("BigInt not supported")}})(t);const v=t.Buffer;e.Blob=t.Blob,e.BlobOptions=t.BlobOptions,e.Buffer=t.Buffer,e.File=t.File,e.FileOptions=t.FileOptions,e.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,e.SlowBuffer=t.SlowBuffer,e.TranscodeEncoding=t.TranscodeEncoding,e.atob=t.atob,e.btoa=t.btoa,e.constants=t.constants,e.default=v,e.isAscii=t.isAscii,e.isUtf8=t.isUtf8,e.kMaxLength=t.kMaxLength,e.kStringMaxLength=t.kStringMaxLength,e.resolveObjectURL=t.resolveObjectURL,e.transcode=t.transcode})(Qs)),Qs}var Ks={},ta={},ea,na;function ec(){return na||(na=1,ea=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,t);if(u.value!==r||u.enumerable!==!0)return!1}return!0}),ea}var _r,ra;function or(){if(ra)return _r;ra=1;var e=ec();return _r=function(){return e()&&!!Symbol.toStringTag},_r}var oa,sa;function nc(){return sa||(sa=1,oa=Object),oa}var aa,ia;function df(){return ia||(ia=1,aa=Error),aa}var ua,ca;function gf(){return ca||(ca=1,ua=EvalError),ua}var la,fa;function mf(){return fa||(fa=1,la=RangeError),la}var ha,pa;function yf(){return pa||(pa=1,ha=ReferenceError),ha}var da,ga;function rc(){return ga||(ga=1,da=SyntaxError),da}var ma,ya;function Ln(){return ya||(ya=1,ma=TypeError),ma}var ba,wa;function bf(){return wa||(wa=1,ba=URIError),ba}var va,Ea;function wf(){return Ea||(Ea=1,va=Math.abs),va}var _a,Aa;function vf(){return Aa||(Aa=1,_a=Math.floor),_a}var Sa,Na;function Ef(){return Na||(Na=1,Sa=Math.max),Sa}var Ia,Ra;function _f(){return Ra||(Ra=1,Ia=Math.min),Ia}var xa,Pa;function Af(){return Pa||(Pa=1,xa=Math.pow),xa}var Ca,La;function Sf(){return La||(La=1,Ca=Math.round),Ca}var Ba,ja;function Nf(){return ja||(ja=1,Ba=Number.isNaN||function(e){return e!==e}),Ba}var Ar,Da;function If(){if(Da)return Ar;Da=1;var e=Nf();return Ar=function(t){return e(t)||t===0?t:t<0?-1:1},Ar}var Ma,Ta;function Rf(){return Ta||(Ta=1,Ma=Object.getOwnPropertyDescriptor),Ma}var Sr,Ua;function pn(){if(Ua)return Sr;Ua=1;var e=Rf();if(e)try{e([],"length")}catch{e=null}return Sr=e,Sr}var Nr,ka;function sr(){if(ka)return Nr;ka=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Nr=e,Nr}var Ir,$a;function xf(){if($a)return Ir;$a=1;var e=typeof Symbol<"u"&&Symbol,t=ec();return Ir=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Ir}var Fa,Ga;function oc(){return Ga||(Ga=1,Fa=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Fa}var Rr,Oa;function sc(){if(Oa)return Rr;Oa=1;var e=nc();return Rr=e.getPrototypeOf||null,Rr}var xr,Va;function Pf(){if(Va)return xr;Va=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(i,f){for(var h=[],a=0;a<i.length;a+=1)h[a]=i[a];for(var p=0;p<f.length;p+=1)h[p+i.length]=f[p];return h},s=function(i,f){for(var h=[],a=f,p=0;a<i.length;a+=1,p+=1)h[p]=i[a];return h},u=function(i,f){for(var h="",a=0;a<i.length;a+=1)h+=i[a],a+1<i.length&&(h+=f);return h};return xr=function(i){var f=this;if(typeof f!="function"||t.apply(f)!==r)throw new TypeError(e+f);for(var h=s(arguments,1),a,p=function(){if(this instanceof a){var R=f.apply(this,o(h,arguments));return Object(R)===R?R:this}return f.apply(i,o(h,arguments))},d=n(0,f.length-h.length),I=[],S=0;S<d;S++)I[S]="$"+S;if(a=Function("binder","return function ("+u(I,",")+"){ return binder.apply(this,arguments); }")(p),f.prototype){var w=function(){};w.prototype=f.prototype,a.prototype=new w,w.prototype=null}return a},xr}var Pr,za;function Bn(){if(za)return Pr;za=1;var e=Pf();return Pr=Function.prototype.bind||e,Pr}var Wa,Ya;function es(){return Ya||(Ya=1,Wa=Function.prototype.call),Wa}var Ha,Xa;function ns(){return Xa||(Xa=1,Ha=Function.prototype.apply),Ha}var Ja,qa;function Cf(){return qa||(qa=1,Ja=typeof Reflect<"u"&&Reflect&&Reflect.apply),Ja}var Cr,Qa;function ac(){if(Qa)return Cr;Qa=1;var e=Bn(),t=ns(),n=es(),r=Cf();return Cr=r||e.call(n,t),Cr}var Lr,Za;function rs(){if(Za)return Lr;Za=1;var e=Bn(),t=Ln(),n=es(),r=ac();return Lr=function(o){if(o.length<1||typeof o[0]!="function")throw new t("a function is required");return r(e,n,o)},Lr}var Br,Ka;function Lf(){if(Ka)return Br;Ka=1;var e=rs(),t=pn(),n;try{n=[].__proto__===Array.prototype}catch(u){if(!u||typeof u!="object"||!("code"in u)||u.code!=="ERR_PROTO_ACCESS")throw u}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,s=o.getPrototypeOf;return Br=r&&typeof r.get=="function"?e([r.get]):typeof s=="function"?function(u){return s(u==null?u:o(u))}:!1,Br}var jr,ti;function os(){if(ti)return jr;ti=1;var e=oc(),t=sc(),n=Lf();return jr=e?function(r){return e(r)}:t?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return t(r)}:n?function(r){return n(r)}:null,jr}var Dr,ei;function ic(){if(ei)return Dr;ei=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Bn();return Dr=n.call(e,t),Dr}var Mr,ni;function uc(){if(ni)return Mr;ni=1;var e,t=nc(),n=df(),r=gf(),o=mf(),s=yf(),u=rc(),i=Ln(),f=bf(),h=wf(),a=vf(),p=Ef(),d=_f(),I=Af(),S=Sf(),w=If(),R=Function,v=function(nt){try{return R('"use strict"; return ('+nt+").constructor;")()}catch{}},E=pn(),x=sr(),N=function(){throw new i},P=E?(function(){try{return arguments.callee,N}catch{try{return E(arguments,"callee").get}catch{return N}}})():N,M=xf()(),F=os(),O=sc(),q=oc(),j=ns(),ct=es(),G={},rt=typeof Uint8Array>"u"||!F?e:F(Uint8Array),pt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":M&&F?F([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":G,"%AsyncGenerator%":G,"%AsyncGeneratorFunction%":G,"%AsyncIteratorPrototype%":G,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":R,"%GeneratorFunction%":G,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&F?F(F([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!M||!F?e:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":E,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!M||!F?e:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&F?F(""[Symbol.iterator]()):e,"%Symbol%":M?Symbol:e,"%SyntaxError%":u,"%ThrowTypeError%":P,"%TypedArray%":rt,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":f,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":ct,"%Function.prototype.apply%":j,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":O,"%Math.abs%":h,"%Math.floor%":a,"%Math.max%":p,"%Math.min%":d,"%Math.pow%":I,"%Math.round%":S,"%Math.sign%":w,"%Reflect.getPrototypeOf%":q};if(F)try{null.error}catch(nt){var At=F(F(nt));pt["%Error.prototype%"]=At}var Et=function nt(st){var L;if(st==="%AsyncFunction%")L=v("async function () {}");else if(st==="%GeneratorFunction%")L=v("function* () {}");else if(st==="%AsyncGeneratorFunction%")L=v("async function* () {}");else if(st==="%AsyncGenerator%"){var B=nt("%AsyncGeneratorFunction%");B&&(L=B.prototype)}else if(st==="%AsyncIteratorPrototype%"){var b=nt("%AsyncGenerator%");b&&F&&(L=F(b.prototype))}return pt[st]=L,L},lt={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},mt=Bn(),Nt=ic(),yt=mt.call(ct,Array.prototype.concat),Tt=mt.call(j,Array.prototype.splice),ft=mt.call(ct,String.prototype.replace),z=mt.call(ct,String.prototype.slice),H=mt.call(ct,RegExp.prototype.exec),Q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,Y=function(nt){var st=z(nt,0,1),L=z(nt,-1);if(st==="%"&&L!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(L==="%"&&st!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var B=[];return ft(nt,Q,function(b,y,k,D){B[B.length]=k?ft(D,T,"$1"):y||b}),B},K=function(nt,st){var L=nt,B;if(Nt(lt,L)&&(B=lt[L],L="%"+B[0]+"%"),Nt(pt,L)){var b=pt[L];if(b===G&&(b=Et(L)),typeof b>"u"&&!st)throw new i("intrinsic "+nt+" exists, but is not available. Please file an issue!");return{alias:B,name:L,value:b}}throw new u("intrinsic "+nt+" does not exist!")};return Mr=function(nt,st){if(typeof nt!="string"||nt.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof st!="boolean")throw new i('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,nt)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var L=Y(nt),B=L.length>0?L[0]:"",b=K("%"+B+"%",st),y=b.name,k=b.value,D=!1,ot=b.alias;ot&&(B=ot[0],Tt(L,yt([0,1],ot)));for(var _t=1,X=!0;_t<L.length;_t+=1){var wt=L[_t],Bt=z(wt,0,1),dt=z(wt,-1);if((Bt==='"'||Bt==="'"||Bt==="`"||dt==='"'||dt==="'"||dt==="`")&&Bt!==dt)throw new u("property names with quotes must have matching quotes");if((wt==="constructor"||!X)&&(D=!0),B+="."+wt,y="%"+B+"%",Nt(pt,y))k=pt[y];else if(k!=null){if(!(wt in k)){if(!st)throw new i("base intrinsic for "+nt+" exists, but the property is not available.");return}if(E&&_t+1>=L.length){var gt=E(k,wt);X=!!gt,X&&"get"in gt&&!("originalValue"in gt.get)?k=gt.get:k=k[wt]}else X=Nt(k,wt),k=k[wt];X&&!D&&(pt[y]=k)}}return k},Mr}var Tr,ri;function jn(){if(ri)return Tr;ri=1;var e=uc(),t=rs(),n=t([e("%String.prototype.indexOf%")]);return Tr=function(r,o){var s=e(r,!!o);return typeof s=="function"&&n(r,".prototype.")>-1?t([s]):s},Tr}var Ur,oi;function Bf(){if(oi)return Ur;oi=1;var e=or()(),t=jn(),n=t("Object.prototype.toString"),r=function(u){return e&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:n(u)==="[object Arguments]"},o=function(u){return r(u)?!0:u!==null&&typeof u=="object"&&"length"in u&&typeof u.length=="number"&&u.length>=0&&n(u)!=="[object Array]"&&"callee"in u&&n(u.callee)==="[object Function]"},s=(function(){return r(arguments)})();return r.isLegacyArguments=o,Ur=s?r:o,Ur}var kr,si;function jf(){if(si)return kr;si=1;var e=jn(),t=or()(),n=ic(),r=pn(),o;if(t){var s=e("RegExp.prototype.exec"),u={},i=function(){throw u},f={toString:i,valueOf:i};typeof Symbol.toPrimitive=="symbol"&&(f[Symbol.toPrimitive]=i),o=function(p){if(!p||typeof p!="object")return!1;var d=r(p,"lastIndex"),I=d&&n(d,"value");if(!I)return!1;try{s(p,f)}catch(S){return S===u}}}else{var h=e("Object.prototype.toString"),a="[object RegExp]";o=function(p){return!p||typeof p!="object"&&typeof p!="function"?!1:h(p)===a}}return kr=o,kr}var $r,ai;function Df(){if(ai)return $r;ai=1;var e=jn(),t=jf(),n=e("RegExp.prototype.exec"),r=Ln();return $r=function(o){if(!t(o))throw new r("`regex` must be a RegExp");return function(s){return n(o,s)!==null}},$r}var Fr,ii;function Mf(){if(ii)return Fr;ii=1;const e=function*(){}.constructor;return Fr=()=>e,Fr}var Gr,ui;function Tf(){if(ui)return Gr;ui=1;var e=jn(),t=Df(),n=t(/^\s*(?:function)?\*/),r=or()(),o=os(),s=e("Object.prototype.toString"),u=e("Function.prototype.toString"),i=Mf();return Gr=function(f){if(typeof f!="function")return!1;if(n(u(f)))return!0;if(!r){var h=s(f);return h==="[object GeneratorFunction]"}if(!o)return!1;var a=i();return a&&o(f)===a.prototype},Gr}var Or,ci;function Uf(){if(ci)return Or;ci=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,r;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw r}}),r={},t(function(){throw 42},null,n)}catch(E){E!==r&&(t=null)}else t=null;var o=/^\s*class\b/,s=function(E){try{var x=e.call(E);return o.test(x)}catch{return!1}},u=function(E){try{return s(E)?!1:(e.call(E),!0)}catch{return!1}},i=Object.prototype.toString,f="[object Object]",h="[object Function]",a="[object GeneratorFunction]",p="[object HTMLAllCollection]",d="[object HTML document.all class]",I="[object HTMLCollection]",S=typeof Symbol=="function"&&!!Symbol.toStringTag,w=!(0 in[,]),R=function(){return!1};if(typeof document=="object"){var v=document.all;i.call(v)===i.call(document.all)&&(R=function(E){if((w||!E)&&(typeof E>"u"||typeof E=="object"))try{var x=i.call(E);return(x===p||x===d||x===I||x===f)&&E("")==null}catch{}return!1})}return Or=t?function(E){if(R(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;try{t(E,null,n)}catch(x){if(x!==r)return!1}return!s(E)&&u(E)}:function(E){if(R(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;if(S)return u(E);if(s(E))return!1;var x=i.call(E);return x!==h&&x!==a&&!/^\[object HTML/.test(x)?!1:u(E)},Or}var Vr,li;function kf(){if(li)return Vr;li=1;var e=Uf(),t=Object.prototype.toString,n=Object.prototype.hasOwnProperty,r=function(i,f,h){for(var a=0,p=i.length;a<p;a++)n.call(i,a)&&(h==null?f(i[a],a,i):f.call(h,i[a],a,i))},o=function(i,f,h){for(var a=0,p=i.length;a<p;a++)h==null?f(i.charAt(a),a,i):f.call(h,i.charAt(a),a,i)},s=function(i,f,h){for(var a in i)n.call(i,a)&&(h==null?f(i[a],a,i):f.call(h,i[a],a,i))};function u(i){return t.call(i)==="[object Array]"}return Vr=function(i,f,h){if(!e(f))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=h),u(i)?r(i,f,a):typeof i=="string"?o(i,f,a):s(i,f,a)},Vr}var fi,hi;function $f(){return hi||(hi=1,fi=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),fi}var zr,pi;function Ff(){if(pi)return zr;pi=1;var e=$f(),t=typeof globalThis>"u"?Oe:globalThis;return zr=function(){for(var n=[],r=0;r<e.length;r++)typeof t[e[r]]=="function"&&(n[n.length]=e[r]);return n},zr}var di={exports:{}},Wr,gi;function Gf(){if(gi)return Wr;gi=1;var e=sr(),t=rc(),n=Ln(),r=pn();return Wr=function(o,s,u){if(!o||typeof o!="object"&&typeof o!="function")throw new n("`obj` must be an object or a function`");if(typeof s!="string"&&typeof s!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,p=!!r&&r(o,s);if(e)e(o,s,{configurable:h===null&&p?p.configurable:!h,enumerable:i===null&&p?p.enumerable:!i,value:u,writable:f===null&&p?p.writable:!f});else if(a||!i&&!f&&!h)o[s]=u;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Wr}var Yr,mi;function Of(){if(mi)return Yr;mi=1;var e=sr(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Yr=t,Yr}var Hr,yi;function Vf(){if(yi)return Hr;yi=1;var e=uc(),t=Gf(),n=Of()(),r=pn(),o=Ln(),s=e("%Math.floor%");return Hr=function(u,i){if(typeof u!="function")throw new o("`fn` is not a function");if(typeof i!="number"||i<0||i>4294967295||s(i)!==i)throw new o("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],h=!0,a=!0;if("length"in u&&r){var p=r(u,"length");p&&!p.configurable&&(h=!1),p&&!p.writable&&(a=!1)}return(h||a||!f)&&(n?t(u,"length",i,!0,!0):t(u,"length",i)),u},Hr}var Xr,bi;function zf(){if(bi)return Xr;bi=1;var e=Bn(),t=ns(),n=ac();return Xr=function(){return n(e,t,arguments)},Xr}var wi;function Wf(){return wi||(wi=1,(function(e){var t=Vf(),n=sr(),r=rs(),o=zf();e.exports=function(s){var u=r(arguments),i=1+s.length-(arguments.length-1);return t(u,i>0?i:0,!0)},n?n(e.exports,"apply",{value:o}):e.exports.apply=o})(di)),di.exports}var Jr,vi;function cc(){if(vi)return Jr;vi=1;var e=kf(),t=Ff(),n=Wf(),r=jn(),o=pn(),s=os(),u=r("Object.prototype.toString"),i=or()(),f=typeof globalThis>"u"?Oe:globalThis,h=t(),a=r("String.prototype.slice"),p=r("Array.prototype.indexOf",!0)||function(v,E){for(var x=0;x<v.length;x+=1)if(v[x]===E)return x;return-1},d={__proto__:null};i&&o&&s?e(h,function(v){var E=new f[v];if(Symbol.toStringTag in E&&s){var x=s(E),N=o(x,Symbol.toStringTag);if(!N&&x){var P=s(x);N=o(P,Symbol.toStringTag)}if(N&&N.get){var M=n(N.get);d["$"+v]=M}}}):e(h,function(v){var E=new f[v],x=E.slice||E.set;if(x){var N=n(x);d["$"+v]=N}});function I(v){var E=!1;return e(d,function(x,N){if(!E)try{"$"+x(v)===N&&(E=a(N,1))}catch{}}),E}function S(v){var E=!1;return e(d,function(x,N){if(!E)try{x(v),E=a(N,1)}catch{}}),E}function w(v){return p(h,v)>-1}function R(v){if(!v||typeof v!="object")return!1;if(!i){var E=a(u(v),8,-1);return w(E)?E:E!=="Object"?!1:S(v)}return o?I(v):null}return Jr=R,Jr}var qr,Ei;function Yf(){if(Ei)return qr;Ei=1;var e=cc();return qr=function(t){return!!e(t)},qr}var _i;function Hf(){return _i||(_i=1,(function(e){var t=Bf(),n=Tf(),r=cc(),o=Yf();function s(X){return X.call.bind(X)}var u=typeof BigInt<"u",i=typeof Symbol<"u",f=s(Object.prototype.toString),h=s(Number.prototype.valueOf),a=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(u)var d=s(BigInt.prototype.valueOf);if(i)var I=s(Symbol.prototype.valueOf);function S(X,wt){if(typeof X!="object")return!1;try{return wt(X),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=o;function w(X){return typeof Promise<"u"&&X instanceof Promise||X!==null&&typeof X=="object"&&typeof X.then=="function"&&typeof X.catch=="function"}e.isPromise=w;function R(X){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(X):o(X)||z(X)}e.isArrayBufferView=R;function v(X){return r(X)==="Uint8Array"}e.isUint8Array=v;function E(X){return r(X)==="Uint8ClampedArray"}e.isUint8ClampedArray=E;function x(X){return r(X)==="Uint16Array"}e.isUint16Array=x;function N(X){return r(X)==="Uint32Array"}e.isUint32Array=N;function P(X){return r(X)==="Int8Array"}e.isInt8Array=P;function M(X){return r(X)==="Int16Array"}e.isInt16Array=M;function F(X){return r(X)==="Int32Array"}e.isInt32Array=F;function O(X){return r(X)==="Float32Array"}e.isFloat32Array=O;function q(X){return r(X)==="Float64Array"}e.isFloat64Array=q;function j(X){return r(X)==="BigInt64Array"}e.isBigInt64Array=j;function ct(X){return r(X)==="BigUint64Array"}e.isBigUint64Array=ct;function G(X){return f(X)==="[object Map]"}G.working=typeof Map<"u"&&G(new Map);function rt(X){return typeof Map>"u"?!1:G.working?G(X):X instanceof Map}e.isMap=rt;function pt(X){return f(X)==="[object Set]"}pt.working=typeof Set<"u"&&pt(new Set);function At(X){return typeof Set>"u"?!1:pt.working?pt(X):X instanceof Set}e.isSet=At;function Et(X){return f(X)==="[object WeakMap]"}Et.working=typeof WeakMap<"u"&&Et(new WeakMap);function lt(X){return typeof WeakMap>"u"?!1:Et.working?Et(X):X instanceof WeakMap}e.isWeakMap=lt;function mt(X){return f(X)==="[object WeakSet]"}mt.working=typeof WeakSet<"u"&&mt(new WeakSet);function Nt(X){return mt(X)}e.isWeakSet=Nt;function yt(X){return f(X)==="[object ArrayBuffer]"}yt.working=typeof ArrayBuffer<"u"&&yt(new ArrayBuffer);function Tt(X){return typeof ArrayBuffer>"u"?!1:yt.working?yt(X):X instanceof ArrayBuffer}e.isArrayBuffer=Tt;function ft(X){return f(X)==="[object DataView]"}ft.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&ft(new DataView(new ArrayBuffer(1),0,1));function z(X){return typeof DataView>"u"?!1:ft.working?ft(X):X instanceof DataView}e.isDataView=z;var H=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Q(X){return f(X)==="[object SharedArrayBuffer]"}function T(X){return typeof H>"u"?!1:(typeof Q.working>"u"&&(Q.working=Q(new H)),Q.working?Q(X):X instanceof H)}e.isSharedArrayBuffer=T;function Y(X){return f(X)==="[object AsyncFunction]"}e.isAsyncFunction=Y;function K(X){return f(X)==="[object Map Iterator]"}e.isMapIterator=K;function nt(X){return f(X)==="[object Set Iterator]"}e.isSetIterator=nt;function st(X){return f(X)==="[object Generator]"}e.isGeneratorObject=st;function L(X){return f(X)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=L;function B(X){return S(X,h)}e.isNumberObject=B;function b(X){return S(X,a)}e.isStringObject=b;function y(X){return S(X,p)}e.isBooleanObject=y;function k(X){return u&&S(X,d)}e.isBigIntObject=k;function D(X){return i&&S(X,I)}e.isSymbolObject=D;function ot(X){return B(X)||b(X)||y(X)||k(X)||D(X)}e.isBoxedPrimitive=ot;function _t(X){return typeof Uint8Array<"u"&&(Tt(X)||T(X))}e.isAnyArrayBuffer=_t,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(X){Object.defineProperty(e,X,{enumerable:!1,value:function(){throw new Error(X+" is not supported in userland")}})})})(ta)),ta}var Ai,Si;function Xf(){return Si||(Si=1,Ai=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),Ai}var Ni;function lc(){return Ni||(Ni=1,(function(e){var t={},n=Object.getOwnPropertyDescriptors||function(z){for(var H=Object.keys(z),Q={},T=0;T<H.length;T++)Q[H[T]]=Object.getOwnPropertyDescriptor(z,H[T]);return Q},r=/%[sdj%]/g;e.format=function(z){if(!M(z)){for(var H=[],Q=0;Q<arguments.length;Q++)H.push(i(arguments[Q]));return H.join(" ")}for(var Q=1,T=arguments,Y=T.length,K=String(z).replace(r,function(L){if(L==="%%")return"%";if(Q>=Y)return L;switch(L){case"%s":return String(T[Q++]);case"%d":return Number(T[Q++]);case"%j":try{return JSON.stringify(T[Q++])}catch{return"[Circular]"}default:return L}}),nt=T[Q];Q<Y;nt=T[++Q])x(nt)||!j(nt)?K+=" "+nt:K+=" "+i(nt);return K},e.deprecate=function(z,H){if(typeof vt<"u"&&vt.noDeprecation===!0)return z;if(typeof vt>"u")return function(){return e.deprecate(z,H).apply(this,arguments)};var Q=!1;function T(){if(!Q){if(vt.throwDeprecation)throw new Error(H);vt.traceDeprecation?console.trace(H):console.error(H),Q=!0}return z.apply(this,arguments)}return T};var o={},s=/^$/;if(t.NODE_DEBUG){var u=t.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+u+"$","i")}e.debuglog=function(z){if(z=z.toUpperCase(),!o[z])if(s.test(z)){var H=vt.pid;o[z]=function(){var Q=e.format.apply(e,arguments);console.error("%s %d: %s",z,H,Q)}}else o[z]=function(){};return o[z]};function i(z,H){var Q={seen:[],stylize:h};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),E(H)?Q.showHidden=H:H&&e._extend(Q,H),O(Q.showHidden)&&(Q.showHidden=!1),O(Q.depth)&&(Q.depth=2),O(Q.colors)&&(Q.colors=!1),O(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=f),p(Q,z,Q.depth)}e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function f(z,H){var Q=i.styles[H];return Q?"\x1B["+i.colors[Q][0]+"m"+z+"\x1B["+i.colors[Q][1]+"m":z}function h(z,H){return z}function a(z){var H={};return z.forEach(function(Q,T){H[Q]=!0}),H}function p(z,H,Q){if(z.customInspect&&H&&rt(H.inspect)&&H.inspect!==e.inspect&&!(H.constructor&&H.constructor.prototype===H)){var T=H.inspect(Q,z);return M(T)||(T=p(z,T,Q)),T}var Y=d(z,H);if(Y)return Y;var K=Object.keys(H),nt=a(K);if(z.showHidden&&(K=Object.getOwnPropertyNames(H)),G(H)&&(K.indexOf("message")>=0||K.indexOf("description")>=0))return I(H);if(K.length===0){if(rt(H)){var st=H.name?": "+H.name:"";return z.stylize("[Function"+st+"]","special")}if(q(H))return z.stylize(RegExp.prototype.toString.call(H),"regexp");if(ct(H))return z.stylize(Date.prototype.toString.call(H),"date");if(G(H))return I(H)}var L="",B=!1,b=["{","}"];if(v(H)&&(B=!0,b=["[","]"]),rt(H)){var y=H.name?": "+H.name:"";L=" [Function"+y+"]"}if(q(H)&&(L=" "+RegExp.prototype.toString.call(H)),ct(H)&&(L=" "+Date.prototype.toUTCString.call(H)),G(H)&&(L=" "+I(H)),K.length===0&&(!B||H.length==0))return b[0]+L+b[1];if(Q<0)return q(H)?z.stylize(RegExp.prototype.toString.call(H),"regexp"):z.stylize("[Object]","special");z.seen.push(H);var k;return B?k=S(z,H,Q,nt,K):k=K.map(function(D){return w(z,H,Q,nt,D,B)}),z.seen.pop(),R(k,L,b)}function d(z,H){if(O(H))return z.stylize("undefined","undefined");if(M(H)){var Q="'"+JSON.stringify(H).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return z.stylize(Q,"string")}if(P(H))return z.stylize(""+H,"number");if(E(H))return z.stylize(""+H,"boolean");if(x(H))return z.stylize("null","null")}function I(z){return"["+Error.prototype.toString.call(z)+"]"}function S(z,H,Q,T,Y){for(var K=[],nt=0,st=H.length;nt<st;++nt)Nt(H,String(nt))?K.push(w(z,H,Q,T,String(nt),!0)):K.push("");return Y.forEach(function(L){L.match(/^\d+$/)||K.push(w(z,H,Q,T,L,!0))}),K}function w(z,H,Q,T,Y,K){var nt,st,L;if(L=Object.getOwnPropertyDescriptor(H,Y)||{value:H[Y]},L.get?L.set?st=z.stylize("[Getter/Setter]","special"):st=z.stylize("[Getter]","special"):L.set&&(st=z.stylize("[Setter]","special")),Nt(T,Y)||(nt="["+Y+"]"),st||(z.seen.indexOf(L.value)<0?(x(Q)?st=p(z,L.value,null):st=p(z,L.value,Q-1),st.indexOf(`
`)>-1&&(K?st=st.split(`
`).map(function(B){return" "+B}).join(`
`).slice(2):st=`
`+st.split(`
`).map(function(B){return" "+B}).join(`
`))):st=z.stylize("[Circular]","special")),O(nt)){if(K&&Y.match(/^\d+$/))return st;nt=JSON.stringify(""+Y),nt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(nt=nt.slice(1,-1),nt=z.stylize(nt,"name")):(nt=nt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),nt=z.stylize(nt,"string"))}return nt+": "+st}function R(z,H,Q){var T=z.reduce(function(Y,K){return K.indexOf(`
`)>=0,Y+K.replace(/\u001b\[\d\d?m/g,"").length+1},0);return T>60?Q[0]+(H===""?"":H+`
`)+" "+z.join(`,
`)+" "+Q[1]:Q[0]+H+" "+z.join(", ")+" "+Q[1]}e.types=Hf();function v(z){return Array.isArray(z)}e.isArray=v;function E(z){return typeof z=="boolean"}e.isBoolean=E;function x(z){return z===null}e.isNull=x;function N(z){return z==null}e.isNullOrUndefined=N;function P(z){return typeof z=="number"}e.isNumber=P;function M(z){return typeof z=="string"}e.isString=M;function F(z){return typeof z=="symbol"}e.isSymbol=F;function O(z){return z===void 0}e.isUndefined=O;function q(z){return j(z)&&At(z)==="[object RegExp]"}e.isRegExp=q,e.types.isRegExp=q;function j(z){return typeof z=="object"&&z!==null}e.isObject=j;function ct(z){return j(z)&&At(z)==="[object Date]"}e.isDate=ct,e.types.isDate=ct;function G(z){return j(z)&&(At(z)==="[object Error]"||z instanceof Error)}e.isError=G,e.types.isNativeError=G;function rt(z){return typeof z=="function"}e.isFunction=rt;function pt(z){return z===null||typeof z=="boolean"||typeof z=="number"||typeof z=="string"||typeof z=="symbol"||typeof z>"u"}e.isPrimitive=pt,e.isBuffer=Xf();function At(z){return Object.prototype.toString.call(z)}function Et(z){return z<10?"0"+z.toString(10):z.toString(10)}var lt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function mt(){var z=new Date,H=[Et(z.getHours()),Et(z.getMinutes()),Et(z.getSeconds())].join(":");return[z.getDate(),lt[z.getMonth()],H].join(" ")}e.log=function(){console.log("%s - %s",mt(),e.format.apply(e,arguments))},e.inherits=Qe(),e._extend=function(z,H){if(!H||!j(H))return z;for(var Q=Object.keys(H),T=Q.length;T--;)z[Q[T]]=H[Q[T]];return z};function Nt(z,H){return Object.prototype.hasOwnProperty.call(z,H)}var yt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(z){if(typeof z!="function")throw new TypeError('The "original" argument must be of type Function');if(yt&&z[yt]){var H=z[yt];if(typeof H!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(H,yt,{value:H,enumerable:!1,writable:!1,configurable:!0}),H}function H(){for(var Q,T,Y=new Promise(function(st,L){Q=st,T=L}),K=[],nt=0;nt<arguments.length;nt++)K.push(arguments[nt]);K.push(function(st,L){st?T(st):Q(L)});try{z.apply(this,K)}catch(st){T(st)}return Y}return Object.setPrototypeOf(H,Object.getPrototypeOf(z)),yt&&Object.defineProperty(H,yt,{value:H,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(H,n(z))},e.promisify.custom=yt;function Tt(z,H){if(!z){var Q=new Error("Promise was rejected with a falsy value");Q.reason=z,z=Q}return H(z)}function ft(z){if(typeof z!="function")throw new TypeError('The "original" argument must be of type Function');function H(){for(var Q=[],T=0;T<arguments.length;T++)Q.push(arguments[T]);var Y=Q.pop();if(typeof Y!="function")throw new TypeError("The last argument must be of type Function");var K=this,nt=function(){return Y.apply(K,arguments)};z.apply(this,Q).then(function(st){vt.nextTick(nt.bind(null,null,st))},function(st){vt.nextTick(Tt.bind(null,st,nt))})}return Object.setPrototypeOf(H,Object.getPrototypeOf(z)),Object.defineProperties(H,n(z)),H}e.callbackify=ft})(Ks)),Ks}var Qr,Ii;function Jf(){if(Ii)return Qr;Ii=1;function e(S,w){var R=Object.keys(S);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(S);w&&(v=v.filter(function(E){return Object.getOwnPropertyDescriptor(S,E).enumerable})),R.push.apply(R,v)}return R}function t(S){for(var w=1;w<arguments.length;w++){var R=arguments[w]!=null?arguments[w]:{};w%2?e(Object(R),!0).forEach(function(v){n(S,v,R[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(R)):e(Object(R)).forEach(function(v){Object.defineProperty(S,v,Object.getOwnPropertyDescriptor(R,v))})}return S}function n(S,w,R){return w=u(w),w in S?Object.defineProperty(S,w,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[w]=R,S}function r(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function o(S,w){for(var R=0;R<w.length;R++){var v=w[R];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(S,u(v.key),v)}}function s(S,w,R){return w&&o(S.prototype,w),Object.defineProperty(S,"prototype",{writable:!1}),S}function u(S){var w=i(S,"string");return typeof w=="symbol"?w:String(w)}function i(S,w){if(typeof S!="object"||S===null)return S;var R=S[Symbol.toPrimitive];if(R!==void 0){var v=R.call(S,w);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(S)}var f=rr(),h=f.Buffer,a=lc(),p=a.inspect,d=p&&p.custom||"inspect";function I(S,w,R){h.prototype.copy.call(S,w,R)}return Qr=(function(){function S(){r(this,S),this.head=null,this.tail=null,this.length=0}return s(S,[{key:"push",value:function(w){var R={data:w,next:null};this.length>0?this.tail.next=R:this.head=R,this.tail=R,++this.length}},{key:"unshift",value:function(w){var R={data:w,next:this.head};this.length===0&&(this.tail=R),this.head=R,++this.length}},{key:"shift",value:function(){if(this.length!==0){var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(w){if(this.length===0)return"";for(var R=this.head,v=""+R.data;R=R.next;)v+=w+R.data;return v}},{key:"concat",value:function(w){if(this.length===0)return h.alloc(0);for(var R=h.allocUnsafe(w>>>0),v=this.head,E=0;v;)I(v.data,R,E),E+=v.data.length,v=v.next;return R}},{key:"consume",value:function(w,R){var v;return w<this.head.data.length?(v=this.head.data.slice(0,w),this.head.data=this.head.data.slice(w)):w===this.head.data.length?v=this.shift():v=R?this._getString(w):this._getBuffer(w),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(w){var R=this.head,v=1,E=R.data;for(w-=E.length;R=R.next;){var x=R.data,N=w>x.length?x.length:w;if(N===x.length?E+=x:E+=x.slice(0,w),w-=N,w===0){N===x.length?(++v,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=x.slice(N));break}++v}return this.length-=v,E}},{key:"_getBuffer",value:function(w){var R=h.allocUnsafe(w),v=this.head,E=1;for(v.data.copy(R),w-=v.data.length;v=v.next;){var x=v.data,N=w>x.length?x.length:w;if(x.copy(R,R.length-w,0,N),w-=N,w===0){N===x.length?(++E,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=x.slice(N));break}++E}return this.length-=E,R}},{key:d,value:function(w,R){return p(this,t(t({},R),{},{depth:0,customInspect:!1}))}}]),S})(),Qr}var Zr,Ri;function fc(){if(Ri)return Zr;Ri=1;function e(u,i){var f=this,h=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return h||a?(i?i(u):u&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,vt.nextTick(o,this,u)):vt.nextTick(o,this,u)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(p){!i&&p?f._writableState?f._writableState.errorEmitted?vt.nextTick(n,f):(f._writableState.errorEmitted=!0,vt.nextTick(t,f,p)):vt.nextTick(t,f,p):i?(vt.nextTick(n,f),i(p)):vt.nextTick(n,f)}),this)}function t(u,i){o(u,i),n(u)}function n(u){u._writableState&&!u._writableState.emitClose||u._readableState&&!u._readableState.emitClose||u.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(u,i){u.emit("error",i)}function s(u,i){var f=u._readableState,h=u._writableState;f&&f.autoDestroy||h&&h.autoDestroy?u.destroy(i):u.emit("error",i)}return Zr={destroy:e,undestroy:r,errorOrDestroy:s},Zr}var Kr={},xi;function dn(){if(xi)return Kr;xi=1;function e(i,f){i.prototype=Object.create(f.prototype),i.prototype.constructor=i,i.__proto__=f}var t={};function n(i,f,h){h||(h=Error);function a(d,I,S){return typeof f=="string"?f:f(d,I,S)}var p=(function(d){e(I,d);function I(S,w,R){return d.call(this,a(S,w,R))||this}return I})(h);p.prototype.name=h.name,p.prototype.code=i,t[i]=p}function r(i,f){if(Array.isArray(i)){var h=i.length;return i=i.map(function(a){return String(a)}),h>2?"one of ".concat(f," ").concat(i.slice(0,h-1).join(", "),", or ")+i[h-1]:h===2?"one of ".concat(f," ").concat(i[0]," or ").concat(i[1]):"of ".concat(f," ").concat(i[0])}else return"of ".concat(f," ").concat(String(i))}function o(i,f,h){return i.substr(0,f.length)===f}function s(i,f,h){return(h===void 0||h>i.length)&&(h=i.length),i.substring(h-f.length,h)===f}function u(i,f,h){return typeof h!="number"&&(h=0),h+f.length>i.length?!1:i.indexOf(f,h)!==-1}return n("ERR_INVALID_OPT_VALUE",function(i,f){return'The value "'+f+'" is invalid for option "'+i+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(i,f,h){var a;typeof f=="string"&&o(f,"not ")?(a="must not be",f=f.replace(/^not /,"")):a="must be";var p;if(s(i," argument"))p="The ".concat(i," ").concat(a," ").concat(r(f,"type"));else{var d=u(i,".")?"property":"argument";p='The "'.concat(i,'" ').concat(d," ").concat(a," ").concat(r(f,"type"))}return p+=". Received type ".concat(typeof h),p},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(i){return"The "+i+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(i){return"Cannot call "+i+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(i){return"Unknown encoding: "+i},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Kr.codes=t,Kr}var to,Pi;function hc(){if(Pi)return to;Pi=1;var e=dn().codes.ERR_INVALID_OPT_VALUE;function t(r,o,s){return r.highWaterMark!=null?r.highWaterMark:o?r[s]:null}function n(r,o,s,u){var i=t(o,u,s);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var f=u?s:"highWaterMark";throw new e(f,i)}return Math.floor(i)}return r.objectMode?16:16*1024}return to={getHighWaterMark:n},to}var eo,Ci;function qf(){if(Ci)return eo;Ci=1,eo=e;function e(n,r){if(t("noDeprecation"))return n;var o=!1;function s(){if(!o){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),o=!0}return n.apply(this,arguments)}return s}function t(n){try{if(!Oe.localStorage)return!1}catch{return!1}var r=Oe.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return eo}var no,Li;function pc(){if(Li)return no;Li=1,no=O;function e(T){var Y=this;this.next=null,this.entry=null,this.finish=function(){Q(Y,T)}}var t;O.WritableState=M;var n={deprecate:qf()},r=tc(),o=rr().Buffer,s=(typeof Oe<"u"?Oe:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(T){return o.from(T)}function i(T){return o.isBuffer(T)||T instanceof s}var f=fc(),h=hc(),a=h.getHighWaterMark,p=dn().codes,d=p.ERR_INVALID_ARG_TYPE,I=p.ERR_METHOD_NOT_IMPLEMENTED,S=p.ERR_MULTIPLE_CALLBACK,w=p.ERR_STREAM_CANNOT_PIPE,R=p.ERR_STREAM_DESTROYED,v=p.ERR_STREAM_NULL_VALUES,E=p.ERR_STREAM_WRITE_AFTER_END,x=p.ERR_UNKNOWN_ENCODING,N=f.errorOrDestroy;Qe()(O,r);function P(){}function M(T,Y,K){t=t||fn(),T=T||{},typeof K!="boolean"&&(K=Y instanceof t),this.objectMode=!!T.objectMode,K&&(this.objectMode=this.objectMode||!!T.writableObjectMode),this.highWaterMark=a(this,T,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var nt=T.decodeStrings===!1;this.decodeStrings=!nt,this.defaultEncoding=T.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(st){Et(Y,st)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=T.emitClose!==!1,this.autoDestroy=!!T.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}M.prototype.getBuffer=function(){for(var T=this.bufferedRequest,Y=[];T;)Y.push(T),T=T.next;return Y},(function(){try{Object.defineProperty(M.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var F;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(F=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(T){return F.call(this,T)?!0:this!==O?!1:T&&T._writableState instanceof M}})):F=function(T){return T instanceof this};function O(T){t=t||fn();var Y=this instanceof t;if(!Y&&!F.call(O,this))return new O(T);this._writableState=new M(T,this,Y),this.writable=!0,T&&(typeof T.write=="function"&&(this._write=T.write),typeof T.writev=="function"&&(this._writev=T.writev),typeof T.destroy=="function"&&(this._destroy=T.destroy),typeof T.final=="function"&&(this._final=T.final)),r.call(this)}O.prototype.pipe=function(){N(this,new w)};function q(T,Y){var K=new E;N(T,K),vt.nextTick(Y,K)}function j(T,Y,K,nt){var st;return K===null?st=new v:typeof K!="string"&&!Y.objectMode&&(st=new d("chunk",["string","Buffer"],K)),st?(N(T,st),vt.nextTick(nt,st),!1):!0}O.prototype.write=function(T,Y,K){var nt=this._writableState,st=!1,L=!nt.objectMode&&i(T);return L&&!o.isBuffer(T)&&(T=u(T)),typeof Y=="function"&&(K=Y,Y=null),L?Y="buffer":Y||(Y=nt.defaultEncoding),typeof K!="function"&&(K=P),nt.ending?q(this,K):(L||j(this,nt,T,K))&&(nt.pendingcb++,st=G(this,nt,L,T,Y,K)),st},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var T=this._writableState;T.corked&&(T.corked--,!T.writing&&!T.corked&&!T.bufferProcessing&&T.bufferedRequest&&Nt(this,T))},O.prototype.setDefaultEncoding=function(T){if(typeof T=="string"&&(T=T.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((T+"").toLowerCase())>-1))throw new x(T);return this._writableState.defaultEncoding=T,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ct(T,Y,K){return!T.objectMode&&T.decodeStrings!==!1&&typeof Y=="string"&&(Y=o.from(Y,K)),Y}Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G(T,Y,K,nt,st,L){if(!K){var B=ct(Y,nt,st);nt!==B&&(K=!0,st="buffer",nt=B)}var b=Y.objectMode?1:nt.length;Y.length+=b;var y=Y.length<Y.highWaterMark;if(y||(Y.needDrain=!0),Y.writing||Y.corked){var k=Y.lastBufferedRequest;Y.lastBufferedRequest={chunk:nt,encoding:st,isBuf:K,callback:L,next:null},k?k.next=Y.lastBufferedRequest:Y.bufferedRequest=Y.lastBufferedRequest,Y.bufferedRequestCount+=1}else rt(T,Y,!1,b,nt,st,L);return y}function rt(T,Y,K,nt,st,L,B){Y.writelen=nt,Y.writecb=B,Y.writing=!0,Y.sync=!0,Y.destroyed?Y.onwrite(new R("write")):K?T._writev(st,Y.onwrite):T._write(st,L,Y.onwrite),Y.sync=!1}function pt(T,Y,K,nt,st){--Y.pendingcb,K?(vt.nextTick(st,nt),vt.nextTick(z,T,Y),T._writableState.errorEmitted=!0,N(T,nt)):(st(nt),T._writableState.errorEmitted=!0,N(T,nt),z(T,Y))}function At(T){T.writing=!1,T.writecb=null,T.length-=T.writelen,T.writelen=0}function Et(T,Y){var K=T._writableState,nt=K.sync,st=K.writecb;if(typeof st!="function")throw new S;if(At(K),Y)pt(T,K,nt,Y,st);else{var L=yt(K)||T.destroyed;!L&&!K.corked&&!K.bufferProcessing&&K.bufferedRequest&&Nt(T,K),nt?vt.nextTick(lt,T,K,L,st):lt(T,K,L,st)}}function lt(T,Y,K,nt){K||mt(T,Y),Y.pendingcb--,nt(),z(T,Y)}function mt(T,Y){Y.length===0&&Y.needDrain&&(Y.needDrain=!1,T.emit("drain"))}function Nt(T,Y){Y.bufferProcessing=!0;var K=Y.bufferedRequest;if(T._writev&&K&&K.next){var nt=Y.bufferedRequestCount,st=new Array(nt),L=Y.corkedRequestsFree;L.entry=K;for(var B=0,b=!0;K;)st[B]=K,K.isBuf||(b=!1),K=K.next,B+=1;st.allBuffers=b,rt(T,Y,!0,Y.length,st,"",L.finish),Y.pendingcb++,Y.lastBufferedRequest=null,L.next?(Y.corkedRequestsFree=L.next,L.next=null):Y.corkedRequestsFree=new e(Y),Y.bufferedRequestCount=0}else{for(;K;){var y=K.chunk,k=K.encoding,D=K.callback,ot=Y.objectMode?1:y.length;if(rt(T,Y,!1,ot,y,k,D),K=K.next,Y.bufferedRequestCount--,Y.writing)break}K===null&&(Y.lastBufferedRequest=null)}Y.bufferedRequest=K,Y.bufferProcessing=!1}O.prototype._write=function(T,Y,K){K(new I("_write()"))},O.prototype._writev=null,O.prototype.end=function(T,Y,K){var nt=this._writableState;return typeof T=="function"?(K=T,T=null,Y=null):typeof Y=="function"&&(K=Y,Y=null),T!=null&&this.write(T,Y),nt.corked&&(nt.corked=1,this.uncork()),nt.ending||H(this,nt,K),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function yt(T){return T.ending&&T.length===0&&T.bufferedRequest===null&&!T.finished&&!T.writing}function Tt(T,Y){T._final(function(K){Y.pendingcb--,K&&N(T,K),Y.prefinished=!0,T.emit("prefinish"),z(T,Y)})}function ft(T,Y){!Y.prefinished&&!Y.finalCalled&&(typeof T._final=="function"&&!Y.destroyed?(Y.pendingcb++,Y.finalCalled=!0,vt.nextTick(Tt,T,Y)):(Y.prefinished=!0,T.emit("prefinish")))}function z(T,Y){var K=yt(Y);if(K&&(ft(T,Y),Y.pendingcb===0&&(Y.finished=!0,T.emit("finish"),Y.autoDestroy))){var nt=T._readableState;(!nt||nt.autoDestroy&&nt.endEmitted)&&T.destroy()}return K}function H(T,Y,K){Y.ending=!0,z(T,Y),K&&(Y.finished?vt.nextTick(K):T.once("finish",K)),Y.ended=!0,T.writable=!1}function Q(T,Y,K){var nt=T.entry;for(T.entry=null;nt;){var st=nt.callback;Y.pendingcb--,st(K),nt=nt.next}Y.corkedRequestsFree.next=T}return Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(T){this._writableState&&(this._writableState.destroyed=T)}}),O.prototype.destroy=f.destroy,O.prototype._undestroy=f.undestroy,O.prototype._destroy=function(T,Y){Y(T)},no}var ro,Bi;function fn(){if(Bi)return ro;Bi=1;var e=Object.keys||function(h){var a=[];for(var p in h)a.push(p);return a};ro=u;var t=dc(),n=pc();Qe()(u,t);for(var r=e(n.prototype),o=0;o<r.length;o++){var s=r[o];u.prototype[s]||(u.prototype[s]=n.prototype[s])}function u(h){if(!(this instanceof u))return new u(h);t.call(this,h),n.call(this,h),this.allowHalfOpen=!0,h&&(h.readable===!1&&(this.readable=!1),h.writable===!1&&(this.writable=!1),h.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",i)))}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function i(){this._writableState.ended||vt.nextTick(f,this)}function f(h){h.end()}return Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(h){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=h,this._writableState.destroyed=h)}}),ro}var oo={},so={exports:{}},ji;function Qf(){return ji||(ji=1,(function(e,t){var n=rr(),r=n.Buffer;function o(u,i){for(var f in u)i[f]=u[f]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s);function s(u,i,f){return r(u,i,f)}s.prototype=Object.create(r.prototype),o(r,s),s.from=function(u,i,f){if(typeof u=="number")throw new TypeError("Argument must not be a number");return r(u,i,f)},s.alloc=function(u,i,f){if(typeof u!="number")throw new TypeError("Argument must be a number");var h=r(u);return i!==void 0?typeof f=="string"?h.fill(i,f):h.fill(i):h.fill(0),h},s.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return r(u)},s.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(u)}})(so,so.exports)),so.exports}var Di;function Mi(){if(Di)return oo;Di=1;var e=Qf().Buffer,t=e.isEncoding||function(v){switch(v=""+v,v&&v.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(v){if(!v)return"utf8";for(var E;;)switch(v){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return v;default:if(E)return;v=(""+v).toLowerCase(),E=!0}}function r(v){var E=n(v);if(typeof E!="string"&&(e.isEncoding===t||!t(v)))throw new Error("Unknown encoding: "+v);return E||v}oo.StringDecoder=o;function o(v){this.encoding=r(v);var E;switch(this.encoding){case"utf16le":this.text=p,this.end=d,E=4;break;case"utf8":this.fillLast=f,E=4;break;case"base64":this.text=I,this.end=S,E=3;break;default:this.write=w,this.end=R;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(E)}o.prototype.write=function(v){if(v.length===0)return"";var E,x;if(this.lastNeed){if(E=this.fillLast(v),E===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x<v.length?E?E+this.text(v,x):this.text(v,x):E||""},o.prototype.end=a,o.prototype.text=h,o.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function s(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function u(v,E,x){var N=E.length-1;if(N<x)return 0;var P=s(E[N]);return P>=0?(P>0&&(v.lastNeed=P-1),P):--N<x||P===-2?0:(P=s(E[N]),P>=0?(P>0&&(v.lastNeed=P-2),P):--N<x||P===-2?0:(P=s(E[N]),P>=0?(P>0&&(P===2?P=0:v.lastNeed=P-3),P):0))}function i(v,E,x){if((E[0]&192)!==128)return v.lastNeed=0,"�";if(v.lastNeed>1&&E.length>1){if((E[1]&192)!==128)return v.lastNeed=1,"�";if(v.lastNeed>2&&E.length>2&&(E[2]&192)!==128)return v.lastNeed=2,"�"}}function f(v){var E=this.lastTotal-this.lastNeed,x=i(this,v);if(x!==void 0)return x;if(this.lastNeed<=v.length)return v.copy(this.lastChar,E,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,E,0,v.length),this.lastNeed-=v.length}function h(v,E){var x=u(this,v,E);if(!this.lastNeed)return v.toString("utf8",E);this.lastTotal=x;var N=v.length-(x-this.lastNeed);return v.copy(this.lastChar,0,N),v.toString("utf8",E,N)}function a(v){var E=v&&v.length?this.write(v):"";return this.lastNeed?E+"�":E}function p(v,E){if((v.length-E)%2===0){var x=v.toString("utf16le",E);if(x){var N=x.charCodeAt(x.length-1);if(N>=55296&&N<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",E,v.length-1)}function d(v){var E=v&&v.length?this.write(v):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return E+this.lastChar.toString("utf16le",0,x)}return E}function I(v,E){var x=(v.length-E)%3;return x===0?v.toString("base64",E):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",E,v.length-x))}function S(v){var E=v&&v.length?this.write(v):"";return this.lastNeed?E+this.lastChar.toString("base64",0,3-this.lastNeed):E}function w(v){return v.toString(this.encoding)}function R(v){return v&&v.length?this.write(v):""}return oo}var ao,Ti;function ss(){if(Ti)return ao;Ti=1;var e=dn().codes.ERR_STREAM_PREMATURE_CLOSE;function t(s){var u=!1;return function(){if(!u){u=!0;for(var i=arguments.length,f=new Array(i),h=0;h<i;h++)f[h]=arguments[h];s.apply(this,f)}}}function n(){}function r(s){return s.setHeader&&typeof s.abort=="function"}function o(s,u,i){if(typeof u=="function")return o(s,null,u);u||(u={}),i=t(i||n);var f=u.readable||u.readable!==!1&&s.readable,h=u.writable||u.writable!==!1&&s.writable,a=function(){s.writable||d()},p=s._writableState&&s._writableState.finished,d=function(){h=!1,p=!0,f||i.call(s)},I=s._readableState&&s._readableState.endEmitted,S=function(){f=!1,I=!0,h||i.call(s)},w=function(E){i.call(s,E)},R=function(){var E;if(f&&!I)return(!s._readableState||!s._readableState.ended)&&(E=new e),i.call(s,E);if(h&&!p)return(!s._writableState||!s._writableState.ended)&&(E=new e),i.call(s,E)},v=function(){s.req.on("finish",d)};return r(s)?(s.on("complete",d),s.on("abort",R),s.req?v():s.on("request",v)):h&&!s._writableState&&(s.on("end",a),s.on("close",a)),s.on("end",S),s.on("finish",d),u.error!==!1&&s.on("error",w),s.on("close",R),function(){s.removeListener("complete",d),s.removeListener("abort",R),s.removeListener("request",v),s.req&&s.req.removeListener("finish",d),s.removeListener("end",a),s.removeListener("close",a),s.removeListener("finish",d),s.removeListener("end",S),s.removeListener("error",w),s.removeListener("close",R)}}return ao=o,ao}var io,Ui;function Zf(){if(Ui)return io;Ui=1;var e;function t(x,N,P){return N=n(N),N in x?Object.defineProperty(x,N,{value:P,enumerable:!0,configurable:!0,writable:!0}):x[N]=P,x}function n(x){var N=r(x,"string");return typeof N=="symbol"?N:String(N)}function r(x,N){if(typeof x!="object"||x===null)return x;var P=x[Symbol.toPrimitive];if(P!==void 0){var M=P.call(x,N);if(typeof M!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(x)}var o=ss(),s=Symbol("lastResolve"),u=Symbol("lastReject"),i=Symbol("error"),f=Symbol("ended"),h=Symbol("lastPromise"),a=Symbol("handlePromise"),p=Symbol("stream");function d(x,N){return{value:x,done:N}}function I(x){var N=x[s];if(N!==null){var P=x[p].read();P!==null&&(x[h]=null,x[s]=null,x[u]=null,N(d(P,!1)))}}function S(x){vt.nextTick(I,x)}function w(x,N){return function(P,M){x.then(function(){if(N[f]){P(d(void 0,!0));return}N[a](P,M)},M)}}var R=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[p]},next:function(){var x=this,N=this[i];if(N!==null)return Promise.reject(N);if(this[f])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise(function(O,q){vt.nextTick(function(){x[i]?q(x[i]):O(d(void 0,!0))})});var P=this[h],M;if(P)M=new Promise(w(P,this));else{var F=this[p].read();if(F!==null)return Promise.resolve(d(F,!1));M=new Promise(this[a])}return this[h]=M,M}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var x=this;return new Promise(function(N,P){x[p].destroy(null,function(M){if(M){P(M);return}N(d(void 0,!0))})})}),e),R),E=function(x){var N,P=Object.create(v,(N={},t(N,p,{value:x,writable:!0}),t(N,s,{value:null,writable:!0}),t(N,u,{value:null,writable:!0}),t(N,i,{value:null,writable:!0}),t(N,f,{value:x._readableState.endEmitted,writable:!0}),t(N,a,{value:function(M,F){var O=P[p].read();O?(P[h]=null,P[s]=null,P[u]=null,M(d(O,!1))):(P[s]=M,P[u]=F)},writable:!0}),N));return P[h]=null,o(x,function(M){if(M&&M.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=P[u];F!==null&&(P[h]=null,P[s]=null,P[u]=null,F(M)),P[i]=M;return}var O=P[s];O!==null&&(P[h]=null,P[s]=null,P[u]=null,O(d(void 0,!0))),P[f]=!0}),x.on("readable",S.bind(null,P)),P};return io=E,io}var ki,$i;function Kf(){return $i||($i=1,ki=function(){throw new Error("Readable.from is not available in the browser")}),ki}var uo,Fi;function dc(){if(Fi)return uo;Fi=1,uo=q;var e;q.ReadableState=O,ts().EventEmitter;var t=function(L,B){return L.listeners(B).length},n=tc(),r=rr().Buffer,o=(typeof Oe<"u"?Oe:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(L){return r.from(L)}function u(L){return r.isBuffer(L)||L instanceof o}var i=lc(),f;i&&i.debuglog?f=i.debuglog("stream"):f=function(){};var h=Jf(),a=fc(),p=hc(),d=p.getHighWaterMark,I=dn().codes,S=I.ERR_INVALID_ARG_TYPE,w=I.ERR_STREAM_PUSH_AFTER_EOF,R=I.ERR_METHOD_NOT_IMPLEMENTED,v=I.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,E,x,N;Qe()(q,n);var P=a.errorOrDestroy,M=["error","close","destroy","pause","resume"];function F(L,B,b){if(typeof L.prependListener=="function")return L.prependListener(B,b);!L._events||!L._events[B]?L.on(B,b):Array.isArray(L._events[B])?L._events[B].unshift(b):L._events[B]=[b,L._events[B]]}function O(L,B,b){e=e||fn(),L=L||{},typeof b!="boolean"&&(b=B instanceof e),this.objectMode=!!L.objectMode,b&&(this.objectMode=this.objectMode||!!L.readableObjectMode),this.highWaterMark=d(this,L,"readableHighWaterMark",b),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.destroyed=!1,this.defaultEncoding=L.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,L.encoding&&(E||(E=Mi().StringDecoder),this.decoder=new E(L.encoding),this.encoding=L.encoding)}function q(L){if(e=e||fn(),!(this instanceof q))return new q(L);var B=this instanceof e;this._readableState=new O(L,this,B),this.readable=!0,L&&(typeof L.read=="function"&&(this._read=L.read),typeof L.destroy=="function"&&(this._destroy=L.destroy)),n.call(this)}Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(L){this._readableState&&(this._readableState.destroyed=L)}}),q.prototype.destroy=a.destroy,q.prototype._undestroy=a.undestroy,q.prototype._destroy=function(L,B){B(L)},q.prototype.push=function(L,B){var b=this._readableState,y;return b.objectMode?y=!0:typeof L=="string"&&(B=B||b.defaultEncoding,B!==b.encoding&&(L=r.from(L,B),B=""),y=!0),j(this,L,B,!1,y)},q.prototype.unshift=function(L){return j(this,L,null,!0,!1)};function j(L,B,b,y,k){f("readableAddChunk",B);var D=L._readableState;if(B===null)D.reading=!1,Et(L,D);else{var ot;if(k||(ot=G(D,B)),ot)P(L,ot);else if(D.objectMode||B&&B.length>0)if(typeof B!="string"&&!D.objectMode&&Object.getPrototypeOf(B)!==r.prototype&&(B=s(B)),y)D.endEmitted?P(L,new v):ct(L,D,B,!0);else if(D.ended)P(L,new w);else{if(D.destroyed)return!1;D.reading=!1,D.decoder&&!b?(B=D.decoder.write(B),D.objectMode||B.length!==0?ct(L,D,B,!1):Nt(L,D)):ct(L,D,B,!1)}else y||(D.reading=!1,Nt(L,D))}return!D.ended&&(D.length<D.highWaterMark||D.length===0)}function ct(L,B,b,y){B.flowing&&B.length===0&&!B.sync?(B.awaitDrain=0,L.emit("data",b)):(B.length+=B.objectMode?1:b.length,y?B.buffer.unshift(b):B.buffer.push(b),B.needReadable&&lt(L)),Nt(L,B)}function G(L,B){var b;return!u(B)&&typeof B!="string"&&B!==void 0&&!L.objectMode&&(b=new S("chunk",["string","Buffer","Uint8Array"],B)),b}q.prototype.isPaused=function(){return this._readableState.flowing===!1},q.prototype.setEncoding=function(L){E||(E=Mi().StringDecoder);var B=new E(L);this._readableState.decoder=B,this._readableState.encoding=this._readableState.decoder.encoding;for(var b=this._readableState.buffer.head,y="";b!==null;)y+=B.write(b.data),b=b.next;return this._readableState.buffer.clear(),y!==""&&this._readableState.buffer.push(y),this._readableState.length=y.length,this};var rt=1073741824;function pt(L){return L>=rt?L=rt:(L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++),L}function At(L,B){return L<=0||B.length===0&&B.ended?0:B.objectMode?1:L!==L?B.flowing&&B.length?B.buffer.head.data.length:B.length:(L>B.highWaterMark&&(B.highWaterMark=pt(L)),L<=B.length?L:B.ended?B.length:(B.needReadable=!0,0))}q.prototype.read=function(L){f("read",L),L=parseInt(L,10);var B=this._readableState,b=L;if(L!==0&&(B.emittedReadable=!1),L===0&&B.needReadable&&((B.highWaterMark!==0?B.length>=B.highWaterMark:B.length>0)||B.ended))return f("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?K(this):lt(this),null;if(L=At(L,B),L===0&&B.ended)return B.length===0&&K(this),null;var y=B.needReadable;f("need readable",y),(B.length===0||B.length-L<B.highWaterMark)&&(y=!0,f("length less than watermark",y)),B.ended||B.reading?(y=!1,f("reading or ended",y)):y&&(f("do read"),B.reading=!0,B.sync=!0,B.length===0&&(B.needReadable=!0),this._read(B.highWaterMark),B.sync=!1,B.reading||(L=At(b,B)));var k;return L>0?k=Y(L,B):k=null,k===null?(B.needReadable=B.length<=B.highWaterMark,L=0):(B.length-=L,B.awaitDrain=0),B.length===0&&(B.ended||(B.needReadable=!0),b!==L&&B.ended&&K(this)),k!==null&&this.emit("data",k),k};function Et(L,B){if(f("onEofChunk"),!B.ended){if(B.decoder){var b=B.decoder.end();b&&b.length&&(B.buffer.push(b),B.length+=B.objectMode?1:b.length)}B.ended=!0,B.sync?lt(L):(B.needReadable=!1,B.emittedReadable||(B.emittedReadable=!0,mt(L)))}}function lt(L){var B=L._readableState;f("emitReadable",B.needReadable,B.emittedReadable),B.needReadable=!1,B.emittedReadable||(f("emitReadable",B.flowing),B.emittedReadable=!0,vt.nextTick(mt,L))}function mt(L){var B=L._readableState;f("emitReadable_",B.destroyed,B.length,B.ended),!B.destroyed&&(B.length||B.ended)&&(L.emit("readable"),B.emittedReadable=!1),B.needReadable=!B.flowing&&!B.ended&&B.length<=B.highWaterMark,T(L)}function Nt(L,B){B.readingMore||(B.readingMore=!0,vt.nextTick(yt,L,B))}function yt(L,B){for(;!B.reading&&!B.ended&&(B.length<B.highWaterMark||B.flowing&&B.length===0);){var b=B.length;if(f("maybeReadMore read 0"),L.read(0),b===B.length)break}B.readingMore=!1}q.prototype._read=function(L){P(this,new R("_read()"))},q.prototype.pipe=function(L,B){var b=this,y=this._readableState;switch(y.pipesCount){case 0:y.pipes=L;break;case 1:y.pipes=[y.pipes,L];break;default:y.pipes.push(L);break}y.pipesCount+=1,f("pipe count=%d opts=%j",y.pipesCount,B);var k=(!B||B.end!==!1)&&L!==vt.stdout&&L!==vt.stderr,D=k?_t:ne;y.endEmitted?vt.nextTick(D):b.once("end",D),L.on("unpipe",ot);function ot($t,Pt){f("onunpipe"),$t===b&&Pt&&Pt.hasUnpiped===!1&&(Pt.hasUnpiped=!0,Bt())}function _t(){f("onend"),L.end()}var X=Tt(b);L.on("drain",X);var wt=!1;function Bt(){f("cleanup"),L.removeListener("close",Ut),L.removeListener("finish",Wt),L.removeListener("drain",X),L.removeListener("error",gt),L.removeListener("unpipe",ot),b.removeListener("end",_t),b.removeListener("end",ne),b.removeListener("data",dt),wt=!0,y.awaitDrain&&(!L._writableState||L._writableState.needDrain)&&X()}b.on("data",dt);function dt($t){f("ondata");var Pt=L.write($t);f("dest.write",Pt),Pt===!1&&((y.pipesCount===1&&y.pipes===L||y.pipesCount>1&&st(y.pipes,L)!==-1)&&!wt&&(f("false write response, pause",y.awaitDrain),y.awaitDrain++),b.pause())}function gt($t){f("onerror",$t),ne(),L.removeListener("error",gt),t(L,"error")===0&&P(L,$t)}F(L,"error",gt);function Ut(){L.removeListener("finish",Wt),ne()}L.once("close",Ut);function Wt(){f("onfinish"),L.removeListener("close",Ut),ne()}L.once("finish",Wt);function ne(){f("unpipe"),b.unpipe(L)}return L.emit("pipe",b),y.flowing||(f("pipe resume"),b.resume()),L};function Tt(L){return function(){var B=L._readableState;f("pipeOnDrain",B.awaitDrain),B.awaitDrain&&B.awaitDrain--,B.awaitDrain===0&&t(L,"data")&&(B.flowing=!0,T(L))}}q.prototype.unpipe=function(L){var B=this._readableState,b={hasUnpiped:!1};if(B.pipesCount===0)return this;if(B.pipesCount===1)return L&&L!==B.pipes?this:(L||(L=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,L&&L.emit("unpipe",this,b),this);if(!L){var y=B.pipes,k=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var D=0;D<k;D++)y[D].emit("unpipe",this,{hasUnpiped:!1});return this}var ot=st(B.pipes,L);return ot===-1?this:(B.pipes.splice(ot,1),B.pipesCount-=1,B.pipesCount===1&&(B.pipes=B.pipes[0]),L.emit("unpipe",this,b),this)},q.prototype.on=function(L,B){var b=n.prototype.on.call(this,L,B),y=this._readableState;return L==="data"?(y.readableListening=this.listenerCount("readable")>0,y.flowing!==!1&&this.resume()):L==="readable"&&!y.endEmitted&&!y.readableListening&&(y.readableListening=y.needReadable=!0,y.flowing=!1,y.emittedReadable=!1,f("on readable",y.length,y.reading),y.length?lt(this):y.reading||vt.nextTick(z,this)),b},q.prototype.addListener=q.prototype.on,q.prototype.removeListener=function(L,B){var b=n.prototype.removeListener.call(this,L,B);return L==="readable"&&vt.nextTick(ft,this),b},q.prototype.removeAllListeners=function(L){var B=n.prototype.removeAllListeners.apply(this,arguments);return(L==="readable"||L===void 0)&&vt.nextTick(ft,this),B};function ft(L){var B=L._readableState;B.readableListening=L.listenerCount("readable")>0,B.resumeScheduled&&!B.paused?B.flowing=!0:L.listenerCount("data")>0&&L.resume()}function z(L){f("readable nexttick read 0"),L.read(0)}q.prototype.resume=function(){var L=this._readableState;return L.flowing||(f("resume"),L.flowing=!L.readableListening,H(this,L)),L.paused=!1,this};function H(L,B){B.resumeScheduled||(B.resumeScheduled=!0,vt.nextTick(Q,L,B))}function Q(L,B){f("resume",B.reading),B.reading||L.read(0),B.resumeScheduled=!1,L.emit("resume"),T(L),B.flowing&&!B.reading&&L.read(0)}q.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function T(L){var B=L._readableState;for(f("flow",B.flowing);B.flowing&&L.read()!==null;);}q.prototype.wrap=function(L){var B=this,b=this._readableState,y=!1;L.on("end",function(){if(f("wrapped end"),b.decoder&&!b.ended){var ot=b.decoder.end();ot&&ot.length&&B.push(ot)}B.push(null)}),L.on("data",function(ot){if(f("wrapped data"),b.decoder&&(ot=b.decoder.write(ot)),!(b.objectMode&&ot==null)&&!(!b.objectMode&&(!ot||!ot.length))){var _t=B.push(ot);_t||(y=!0,L.pause())}});for(var k in L)this[k]===void 0&&typeof L[k]=="function"&&(this[k]=(function(ot){return function(){return L[ot].apply(L,arguments)}})(k));for(var D=0;D<M.length;D++)L.on(M[D],this.emit.bind(this,M[D]));return this._read=function(ot){f("wrapped _read",ot),y&&(y=!1,L.resume())},this},typeof Symbol=="function"&&(q.prototype[Symbol.asyncIterator]=function(){return x===void 0&&(x=Zf()),x(this)}),Object.defineProperty(q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(L){this._readableState&&(this._readableState.flowing=L)}}),q._fromList=Y,Object.defineProperty(q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Y(L,B){if(B.length===0)return null;var b;return B.objectMode?b=B.buffer.shift():!L||L>=B.length?(B.decoder?b=B.buffer.join(""):B.buffer.length===1?b=B.buffer.first():b=B.buffer.concat(B.length),B.buffer.clear()):b=B.buffer.consume(L,B.decoder),b}function K(L){var B=L._readableState;f("endReadable",B.endEmitted),B.endEmitted||(B.ended=!0,vt.nextTick(nt,B,L))}function nt(L,B){if(f("endReadableNT",L.endEmitted,L.length),!L.endEmitted&&L.length===0&&(L.endEmitted=!0,B.readable=!1,B.emit("end"),L.autoDestroy)){var b=B._writableState;(!b||b.autoDestroy&&b.finished)&&B.destroy()}}typeof Symbol=="function"&&(q.from=function(L,B){return N===void 0&&(N=Kf()),N(q,L,B)});function st(L,B){for(var b=0,y=L.length;b<y;b++)if(L[b]===B)return b;return-1}return uo}var co,Gi;function gc(){if(Gi)return co;Gi=1,co=i;var e=dn().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=e.ERR_TRANSFORM_WITH_LENGTH_0,s=fn();Qe()(i,s);function u(a,p){var d=this._transformState;d.transforming=!1;var I=d.writecb;if(I===null)return this.emit("error",new n);d.writechunk=null,d.writecb=null,p!=null&&this.push(p),I(a);var S=this._readableState;S.reading=!1,(S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}function i(a){if(!(this instanceof i))return new i(a);s.call(this,a),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&(typeof a.transform=="function"&&(this._transform=a.transform),typeof a.flush=="function"&&(this._flush=a.flush)),this.on("prefinish",f)}function f(){var a=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(p,d){h(a,p,d)}):h(this,null,null)}i.prototype.push=function(a,p){return this._transformState.needTransform=!1,s.prototype.push.call(this,a,p)},i.prototype._transform=function(a,p,d){d(new t("_transform()"))},i.prototype._write=function(a,p,d){var I=this._transformState;if(I.writecb=d,I.writechunk=a,I.writeencoding=p,!I.transforming){var S=this._readableState;(I.needTransform||S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}},i.prototype._read=function(a){var p=this._transformState;p.writechunk!==null&&!p.transforming?(p.transforming=!0,this._transform(p.writechunk,p.writeencoding,p.afterTransform)):p.needTransform=!0},i.prototype._destroy=function(a,p){s.prototype._destroy.call(this,a,function(d){p(d)})};function h(a,p,d){if(p)return a.emit("error",p);if(d!=null&&a.push(d),a._writableState.length)throw new o;if(a._transformState.transforming)throw new r;return a.push(null)}return co}var lo,Oi;function th(){if(Oi)return lo;Oi=1,lo=t;var e=gc();Qe()(t,e);function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return t.prototype._transform=function(n,r,o){o(null,n)},lo}var fo,Vi;function eh(){if(Vi)return fo;Vi=1;var e;function t(d){var I=!1;return function(){I||(I=!0,d.apply(void 0,arguments))}}var n=dn().codes,r=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function s(d){if(d)throw d}function u(d){return d.setHeader&&typeof d.abort=="function"}function i(d,I,S,w){w=t(w);var R=!1;d.on("close",function(){R=!0}),e===void 0&&(e=ss()),e(d,{readable:I,writable:S},function(E){if(E)return w(E);R=!0,w()});var v=!1;return function(E){if(!R&&!v){if(v=!0,u(d))return d.abort();if(typeof d.destroy=="function")return d.destroy();w(E||new o("pipe"))}}}function f(d){d()}function h(d,I){return d.pipe(I)}function a(d){return!d.length||typeof d[d.length-1]!="function"?s:d.pop()}function p(){for(var d=arguments.length,I=new Array(d),S=0;S<d;S++)I[S]=arguments[S];var w=a(I);if(Array.isArray(I[0])&&(I=I[0]),I.length<2)throw new r("streams");var R,v=I.map(function(E,x){var N=x<I.length-1,P=x>0;return i(E,N,P,function(M){R||(R=M),M&&v.forEach(f),!N&&(v.forEach(f),w(R))})});return I.reduce(h)}return fo=p,fo}var ho,zi;function nh(){if(zi)return ho;zi=1,ho=n;var e=ts().EventEmitter,t=Qe();t(n,e),n.Readable=dc(),n.Writable=pc(),n.Duplex=fn(),n.Transform=gc(),n.PassThrough=th(),n.finished=ss(),n.pipeline=eh(),n.Stream=n;function n(){e.call(this)}return n.prototype.pipe=function(r,o){var s=this;function u(I){r.writable&&r.write(I)===!1&&s.pause&&s.pause()}s.on("data",u);function i(){s.readable&&s.resume&&s.resume()}r.on("drain",i),!r._isStdio&&(!o||o.end!==!1)&&(s.on("end",h),s.on("close",a));var f=!1;function h(){f||(f=!0,r.end())}function a(){f||(f=!0,typeof r.destroy=="function"&&r.destroy())}function p(I){if(d(),e.listenerCount(this,"error")===0)throw I}s.on("error",p),r.on("error",p);function d(){s.removeListener("data",u),r.removeListener("drain",i),s.removeListener("end",h),s.removeListener("close",a),s.removeListener("error",p),r.removeListener("error",p),s.removeListener("end",d),s.removeListener("close",d),r.removeListener("close",d)}return s.on("end",d),s.on("close",d),r.on("close",d),r.emit("pipe",s),r},ho}var Wi;function rh(){return Wi||(Wi=1,(function(e){(function(t){t.parser=function(b,y){return new r(b,y)},t.SAXParser=r,t.SAXStream=p,t.createStream=h,t.MAX_BUFFER_LENGTH=64*1024;var n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function r(b,y){if(!(this instanceof r))return new r(b,y);var k=this;s(k),k.q=k.c="",k.bufferCheckPosition=t.MAX_BUFFER_LENGTH,k.encoding=null,k.opt=y||{},k.opt.lowercase=k.opt.lowercase||k.opt.lowercasetags,k.looseCase=k.opt.lowercase?"toLowerCase":"toUpperCase",k.opt.maxEntityCount=k.opt.maxEntityCount||512,k.opt.maxEntityDepth=k.opt.maxEntityDepth||4,k.entityCount=k.entityDepth=0,k.tags=[],k.closed=k.closedRoot=k.sawRoot=!1,k.tag=k.error=null,k.strict=!!b,k.noscript=!!(b||k.opt.noscript),k.state=j.BEGIN,k.strictEntities=k.opt.strictEntities,k.ENTITIES=k.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),k.attribList=[],k.opt.xmlns&&(k.ns=Object.create(R)),k.opt.unquotedAttributeValues===void 0&&(k.opt.unquotedAttributeValues=!b),k.trackPosition=k.opt.position!==!1,k.trackPosition&&(k.position=k.line=k.column=0),G(k,"onready")}Object.create||(Object.create=function(b){function y(){}y.prototype=b;var k=new y;return k}),Object.keys||(Object.keys=function(b){var y=[];for(var k in b)b.hasOwnProperty(k)&&y.push(k);return y});function o(b){for(var y=Math.max(t.MAX_BUFFER_LENGTH,10),k=0,D=0,ot=n.length;D<ot;D++){var _t=b[n[D]].length;if(_t>y)switch(n[D]){case"textNode":mt(b);break;case"cdata":lt(b,"oncdata",b.cdata),b.cdata="";break;case"script":lt(b,"onscript",b.script),b.script="";break;default:yt(b,"Max buffer length exceeded: "+n[D])}k=Math.max(k,_t)}var X=t.MAX_BUFFER_LENGTH-k;b.bufferCheckPosition=X+b.position}function s(b){for(var y=0,k=n.length;y<k;y++)b[n[y]]=""}function u(b){mt(b),b.cdata!==""&&(lt(b,"oncdata",b.cdata),b.cdata=""),b.script!==""&&(lt(b,"onscript",b.script),b.script="")}r.prototype={end:function(){Tt(this)},write:B,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){u(this)}};var i;try{i=nh().Stream}catch{i=function(){}}i||(i=function(){});var f=t.EVENTS.filter(function(b){return b!=="error"&&b!=="end"});function h(b,y){return new p(b,y)}function a(b,y){if(b.length>=2){if(b[0]===255&&b[1]===254)return"utf-16le";if(b[0]===254&&b[1]===255)return"utf-16be"}return b.length>=3&&b[0]===239&&b[1]===187&&b[2]===191?"utf8":b.length>=4?b[0]===60&&b[1]===0&&b[2]===63&&b[3]===0?"utf-16le":b[0]===0&&b[1]===60&&b[2]===0&&b[3]===63?"utf-16be":"utf8":y?"utf8":null}function p(b,y){if(!(this instanceof p))return new p(b,y);i.apply(this),this._parser=new r(b,y),this.writable=!0,this.readable=!0;var k=this;this._parser.onend=function(){k.emit("end")},this._parser.onerror=function(D){k.emit("error",D),k._parser.error=null},this._decoder=null,this._decoderBuffer=null,f.forEach(function(D){Object.defineProperty(k,"on"+D,{get:function(){return k._parser["on"+D]},set:function(ot){if(!ot)return k.removeAllListeners(D),k._parser["on"+D]=ot,ot;k.on(D,ot)},enumerable:!0,configurable:!1})})}p.prototype=Object.create(i.prototype,{constructor:{value:p}}),p.prototype._decodeBuffer=function(b,y){if(this._decoderBuffer&&(b=rn.concat([this._decoderBuffer,b]),this._decoderBuffer=null),!this._decoder){var k=a(b,y);if(!k)return this._decoderBuffer=b,"";this._parser.encoding=k,this._decoder=new TextDecoder(k)}return this._decoder.decode(b,{stream:!y})},p.prototype.write=function(b){if(typeof rn=="function"&&typeof rn.isBuffer=="function"&&rn.isBuffer(b))b=this._decodeBuffer(b,!1);else if(this._decoderBuffer){var y=this._decodeBuffer(rn.alloc(0),!0);y&&(this._parser.write(y),this.emit("data",y))}return this._parser.write(b.toString()),this.emit("data",b),!0},p.prototype.end=function(b){if(b&&b.length&&this.write(b),this._decoderBuffer){var y=this._decodeBuffer(rn.alloc(0),!0);y&&(this._parser.write(y),this.emit("data",y))}else if(this._decoder){var k=this._decoder.decode();k&&(this._parser.write(k),this.emit("data",k))}return this._parser.end(),!0},p.prototype.on=function(b,y){var k=this;return!k._parser["on"+b]&&f.indexOf(b)!==-1&&(k._parser["on"+b]=function(){var D=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);D.splice(0,0,b),k.emit.apply(k,D)}),i.prototype.on.call(k,b,y)};var d=/^\[CDATA\[$/i,I=/^DOCTYPE$/i,S="http://www.w3.org/XML/1998/namespace",w="http://www.w3.org/2000/xmlns/",R={xml:S,xmlns:w},v=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,E=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,x=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,N=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function P(b){return b===" "||b===`
`||b==="\r"||b===" "}function M(b){return b==='"'||b==="'"}function F(b){return b===">"||P(b)}function O(b,y){return b.test(y)}function q(b,y){return!O(b,y)}var j=0;t.STATE={BEGIN:j++,BEGIN_WHITESPACE:j++,TEXT:j++,TEXT_ENTITY:j++,OPEN_WAKA:j++,SGML_DECL:j++,SGML_DECL_QUOTED:j++,DOCTYPE:j++,DOCTYPE_QUOTED:j++,DOCTYPE_DTD:j++,DOCTYPE_DTD_QUOTED:j++,COMMENT_STARTING:j++,COMMENT:j++,COMMENT_ENDING:j++,COMMENT_ENDED:j++,CDATA:j++,CDATA_ENDING:j++,CDATA_ENDING_2:j++,PROC_INST:j++,PROC_INST_BODY:j++,PROC_INST_ENDING:j++,OPEN_TAG:j++,OPEN_TAG_SLASH:j++,ATTRIB:j++,ATTRIB_NAME:j++,ATTRIB_NAME_SAW_WHITE:j++,ATTRIB_VALUE:j++,ATTRIB_VALUE_QUOTED:j++,ATTRIB_VALUE_CLOSED:j++,ATTRIB_VALUE_UNQUOTED:j++,ATTRIB_VALUE_ENTITY_Q:j++,ATTRIB_VALUE_ENTITY_U:j++,CLOSE_TAG:j++,CLOSE_TAG_SAW_WHITE:j++,SCRIPT:j++,SCRIPT_ENDING:j++},t.XML_ENTITIES=Object.assign(Object.create(null),{amp:"&",gt:">",lt:"<",quot:'"',apos:"'"}),t.ENTITIES=Object.assign(Object.create(null),{amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}),Object.keys(t.ENTITIES).forEach(function(b){var y=t.ENTITIES[b],k=typeof y=="number"?String.fromCharCode(y):y;t.ENTITIES[b]=k});for(var ct in t.STATE)t.STATE[t.STATE[ct]]=ct;j=t.STATE;function G(b,y,k){b[y]&&b[y](k)}function rt(b){var y=b&&b.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);return y?y[2]:null}function pt(b){return b?b.toLowerCase().replace(/[^a-z0-9]/g,""):null}function At(b,y){const k=pt(b),D=pt(y);return!k||!D?!0:D==="utf16"?k==="utf16le"||k==="utf16be":k===D}function Et(b,y){if(!(!b.strict||!b.encoding||!y||y.name!=="xml")){var k=rt(y.body);k&&!At(b.encoding,k)&&ft(b,"XML declaration encoding "+k+" does not match detected stream encoding "+b.encoding.toUpperCase())}}function lt(b,y,k){b.textNode&&mt(b),G(b,y,k)}function mt(b){b.textNode=Nt(b.opt,b.textNode),b.textNode&&G(b,"ontext",b.textNode),b.textNode=""}function Nt(b,y){return b.trim&&(y=y.trim()),b.normalize&&(y=y.replace(/\s+/g," ")),y}function yt(b,y){return mt(b),b.trackPosition&&(y+=`
Line: `+b.line+`
Column: `+b.column+`
Char: `+b.c),y=new Error(y),b.error=y,G(b,"onerror",y),b}function Tt(b){return b.sawRoot&&!b.closedRoot&&ft(b,"Unclosed root tag"),b.state!==j.BEGIN&&b.state!==j.BEGIN_WHITESPACE&&b.state!==j.TEXT&&yt(b,"Unexpected end"),mt(b),b.c="",b.closed=!0,G(b,"onend"),r.call(b,b.strict,b.opt),b}function ft(b,y){if(typeof b!="object"||!(b instanceof r))throw new Error("bad call to strictFail");b.strict&&yt(b,y)}function z(b){b.strict||(b.tagName=b.tagName[b.looseCase]());var y=b.tags[b.tags.length-1]||b,k=b.tag={name:b.tagName,attributes:{}};b.opt.xmlns&&(k.ns=y.ns),b.attribList.length=0,lt(b,"onopentagstart",k)}function H(b,y){var k=b.indexOf(":"),D=k<0?["",b]:b.split(":"),ot=D[0],_t=D[1];return y&&b==="xmlns"&&(ot="xmlns",_t=""),{prefix:ot,local:_t}}function Q(b){if(b.strict||(b.attribName=b.attribName[b.looseCase]()),b.attribList.indexOf(b.attribName)!==-1||b.tag.attributes.hasOwnProperty(b.attribName)){b.attribName=b.attribValue="";return}if(b.opt.xmlns){var y=H(b.attribName,!0),k=y.prefix,D=y.local;if(k==="xmlns")if(D==="xml"&&b.attribValue!==S)ft(b,"xml: prefix must be bound to "+S+`
Actual: `+b.attribValue);else if(D==="xmlns"&&b.attribValue!==w)ft(b,"xmlns: prefix must be bound to "+w+`
Actual: `+b.attribValue);else{var ot=b.tag,_t=b.tags[b.tags.length-1]||b;ot.ns===_t.ns&&(ot.ns=Object.create(_t.ns)),ot.ns[D]=b.attribValue}b.attribList.push([b.attribName,b.attribValue])}else b.tag.attributes[b.attribName]=b.attribValue,lt(b,"onattribute",{name:b.attribName,value:b.attribValue});b.attribName=b.attribValue=""}function T(b,y){if(b.opt.xmlns){var k=b.tag,D=H(b.tagName);k.prefix=D.prefix,k.local=D.local,k.uri=k.ns[D.prefix]||"",k.prefix&&!k.uri&&(ft(b,"Unbound namespace prefix: "+JSON.stringify(b.tagName)),k.uri=D.prefix);var ot=b.tags[b.tags.length-1]||b;k.ns&&ot.ns!==k.ns&&Object.keys(k.ns).forEach(function(Pt){lt(b,"onopennamespace",{prefix:Pt,uri:k.ns[Pt]})});for(var _t=0,X=b.attribList.length;_t<X;_t++){var wt=b.attribList[_t],Bt=wt[0],dt=wt[1],gt=H(Bt,!0),Ut=gt.prefix,Wt=gt.local,ne=Ut===""?"":k.ns[Ut]||"",$t={name:Bt,value:dt,prefix:Ut,local:Wt,uri:ne};Ut&&Ut!=="xmlns"&&!ne&&(ft(b,"Unbound namespace prefix: "+JSON.stringify(Ut)),$t.uri=Ut),b.tag.attributes[Bt]=$t,lt(b,"onattribute",$t)}b.attribList.length=0}b.tag.isSelfClosing=!!y,b.sawRoot=!0,b.tags.push(b.tag),lt(b,"onopentag",b.tag),y||(!b.noscript&&b.tagName.toLowerCase()==="script"?b.state=j.SCRIPT:b.state=j.TEXT,b.tag=null,b.tagName=""),b.attribName=b.attribValue="",b.attribList.length=0}function Y(b){if(!b.tagName){ft(b,"Weird empty close tag."),b.textNode+="</>",b.state=j.TEXT;return}if(b.script){if(b.tagName!=="script"){b.script+="</"+b.tagName+">",b.tagName="",b.state=j.SCRIPT;return}lt(b,"onscript",b.script),b.script=""}var y=b.tags.length,k=b.tagName;b.strict||(k=k[b.looseCase]());for(var D=k;y--;){var ot=b.tags[y];if(ot.name!==D)ft(b,"Unexpected close tag");else break}if(y<0){ft(b,"Unmatched closing tag: "+b.tagName),b.textNode+="</"+b.tagName+">",b.state=j.TEXT;return}b.tagName=k;for(var _t=b.tags.length;_t-- >y;){var X=b.tag=b.tags.pop();b.tagName=b.tag.name,lt(b,"onclosetag",b.tagName);var wt={};for(var Bt in X.ns)wt[Bt]=X.ns[Bt];var dt=b.tags[b.tags.length-1]||b;b.opt.xmlns&&X.ns!==dt.ns&&Object.keys(X.ns).forEach(function(gt){var Ut=X.ns[gt];lt(b,"onclosenamespace",{prefix:gt,uri:Ut})})}y===0&&(b.closedRoot=!0),b.tagName=b.attribValue=b.attribName="",b.attribList.length=0,b.state=j.TEXT}function K(b){var y=b.entity,k=y.toLowerCase(),D,ot="";return b.ENTITIES[y]?b.ENTITIES[y]:b.ENTITIES[k]?b.ENTITIES[k]:(y=k,y.charAt(0)==="#"&&(y.charAt(1)==="x"?(y=y.slice(2),D=parseInt(y,16),ot=D.toString(16)):(y=y.slice(1),D=parseInt(y,10),ot=D.toString(10))),y=y.replace(/^0+/,""),isNaN(D)||ot.toLowerCase()!==y||D<0||D>1114111||!nt(D)?(ft(b,"Invalid character entity"),"&"+b.entity+";"):String.fromCodePoint(D))}function nt(b){return b===9||b===10||b===13||b>=32&&b<=55295||b>=57344&&b<=65533||b>=65536&&b<=1114111}function st(b,y){y==="<"?(b.state=j.OPEN_WAKA,b.startTagPosition=b.position):P(y)||(ft(b,"Non-whitespace before first tag."),b.textNode=y,b.state=j.TEXT)}function L(b,y){var k="";return y<b.length&&(k=b.charAt(y)),k}function B(b){var y=this;if(this.error)throw this.error;if(y.closed)return yt(y,"Cannot write after close. Assign an onready handler.");if(b===null)return Tt(y);typeof b=="object"&&(b=b.toString());for(var k=0,D="";D=L(b,k++),y.c=D,!!D;)switch(y.trackPosition&&(y.position++,D===`
`?(y.line++,y.column=0):y.column++),y.state){case j.BEGIN:if(y.state=j.BEGIN_WHITESPACE,D==="\uFEFF")continue;st(y,D);continue;case j.BEGIN_WHITESPACE:st(y,D);continue;case j.TEXT:if(y.sawRoot&&!y.closedRoot){for(var ot=k-1;D&&D!=="<"&&D!=="&";)D=L(b,k++),D&&y.trackPosition&&(y.position++,D===`
`?(y.line++,y.column=0):y.column++);y.textNode+=b.substring(ot,k-1)}D==="<"&&!(y.sawRoot&&y.closedRoot&&!y.strict)?(y.state=j.OPEN_WAKA,y.startTagPosition=y.position):(!P(D)&&(!y.sawRoot||y.closedRoot)&&ft(y,"Text data outside of root node."),D==="&"?y.state=j.TEXT_ENTITY:y.textNode+=D);continue;case j.SCRIPT:D==="<"?y.state=j.SCRIPT_ENDING:y.script+=D;continue;case j.SCRIPT_ENDING:D==="/"?y.state=j.CLOSE_TAG:(y.script+="<"+D,y.state=j.SCRIPT);continue;case j.OPEN_WAKA:if(D==="!")y.state=j.SGML_DECL,y.sgmlDecl="";else if(!P(D))if(O(v,D))y.state=j.OPEN_TAG,y.tagName=D;else if(D==="/")y.state=j.CLOSE_TAG,y.tagName="";else if(D==="?")y.state=j.PROC_INST,y.procInstName=y.procInstBody="";else{if(ft(y,"Unencoded <"),y.startTagPosition+1<y.position){var _t=y.position-y.startTagPosition;D=new Array(_t).join(" ")+D}y.textNode+="<"+D,y.state=j.TEXT}continue;case j.SGML_DECL:if(y.sgmlDecl+D==="--"){y.state=j.COMMENT,y.comment="",y.sgmlDecl="";continue}y.doctype&&y.doctype!==!0&&y.sgmlDecl?(y.state=j.DOCTYPE_DTD,y.doctype+="<!"+y.sgmlDecl+D,y.sgmlDecl=""):d.test(y.sgmlDecl+D)?(lt(y,"onopencdata"),y.state=j.CDATA,y.sgmlDecl="",y.cdata=""):I.test(y.sgmlDecl+D)?(y.state=j.DOCTYPE,(y.doctype||y.sawRoot)&&ft(y,"Inappropriately located doctype declaration"),y.doctype="",y.sgmlDecl=""):D===">"?(lt(y,"onsgmldeclaration",y.sgmlDecl),y.sgmlDecl="",y.state=j.TEXT):(M(D)&&(y.state=j.SGML_DECL_QUOTED),y.sgmlDecl+=D);continue;case j.SGML_DECL_QUOTED:D===y.q&&(y.state=j.SGML_DECL,y.q=""),y.sgmlDecl+=D;continue;case j.DOCTYPE:D===">"?(y.state=j.TEXT,lt(y,"ondoctype",y.doctype),y.doctype=!0):(y.doctype+=D,D==="["?y.state=j.DOCTYPE_DTD:M(D)&&(y.state=j.DOCTYPE_QUOTED,y.q=D));continue;case j.DOCTYPE_QUOTED:y.doctype+=D,D===y.q&&(y.q="",y.state=j.DOCTYPE);continue;case j.DOCTYPE_DTD:D==="]"?(y.doctype+=D,y.state=j.DOCTYPE):D==="<"?(y.state=j.OPEN_WAKA,y.startTagPosition=y.position):M(D)?(y.doctype+=D,y.state=j.DOCTYPE_DTD_QUOTED,y.q=D):y.doctype+=D;continue;case j.DOCTYPE_DTD_QUOTED:y.doctype+=D,D===y.q&&(y.state=j.DOCTYPE_DTD,y.q="");continue;case j.COMMENT:D==="-"?y.state=j.COMMENT_ENDING:y.comment+=D;continue;case j.COMMENT_ENDING:D==="-"?(y.state=j.COMMENT_ENDED,y.comment=Nt(y.opt,y.comment),y.comment&&lt(y,"oncomment",y.comment),y.comment=""):(y.comment+="-"+D,y.state=j.COMMENT);continue;case j.COMMENT_ENDED:D!==">"?(ft(y,"Malformed comment"),y.comment+="--"+D,y.state=j.COMMENT):y.doctype&&y.doctype!==!0?y.state=j.DOCTYPE_DTD:y.state=j.TEXT;continue;case j.CDATA:for(var ot=k-1;D&&D!=="]";)D=L(b,k++),D&&y.trackPosition&&(y.position++,D===`
`?(y.line++,y.column=0):y.column++);y.cdata+=b.substring(ot,k-1),D==="]"&&(y.state=j.CDATA_ENDING);continue;case j.CDATA_ENDING:D==="]"?y.state=j.CDATA_ENDING_2:(y.cdata+="]"+D,y.state=j.CDATA);continue;case j.CDATA_ENDING_2:D===">"?(y.cdata&&lt(y,"oncdata",y.cdata),lt(y,"onclosecdata"),y.cdata="",y.state=j.TEXT):D==="]"?y.cdata+="]":(y.cdata+="]]"+D,y.state=j.CDATA);continue;case j.PROC_INST:D==="?"?y.state=j.PROC_INST_ENDING:P(D)?y.state=j.PROC_INST_BODY:y.procInstName+=D;continue;case j.PROC_INST_BODY:if(!y.procInstBody&&P(D))continue;D==="?"?y.state=j.PROC_INST_ENDING:y.procInstBody+=D;continue;case j.PROC_INST_ENDING:if(D===">"){const dt={name:y.procInstName,body:y.procInstBody};Et(y,dt),lt(y,"onprocessinginstruction",dt),y.procInstName=y.procInstBody="",y.state=j.TEXT}else y.procInstBody+="?"+D,y.state=j.PROC_INST_BODY;continue;case j.OPEN_TAG:O(E,D)?y.tagName+=D:(z(y),D===">"?T(y):D==="/"?y.state=j.OPEN_TAG_SLASH:(P(D)||ft(y,"Invalid character in tag name"),y.state=j.ATTRIB));continue;case j.OPEN_TAG_SLASH:D===">"?(T(y,!0),Y(y)):(ft(y,"Forward-slash in opening tag not followed by >"),y.state=j.ATTRIB);continue;case j.ATTRIB:if(P(D))continue;D===">"?T(y):D==="/"?y.state=j.OPEN_TAG_SLASH:O(v,D)?(y.attribName=D,y.attribValue="",y.state=j.ATTRIB_NAME):ft(y,"Invalid attribute name");continue;case j.ATTRIB_NAME:D==="="?y.state=j.ATTRIB_VALUE:D===">"?(ft(y,"Attribute without value"),y.attribValue=y.attribName,Q(y),T(y)):P(D)?y.state=j.ATTRIB_NAME_SAW_WHITE:O(E,D)?y.attribName+=D:ft(y,"Invalid attribute name");continue;case j.ATTRIB_NAME_SAW_WHITE:if(D==="=")y.state=j.ATTRIB_VALUE;else{if(P(D))continue;ft(y,"Attribute without value"),y.tag.attributes[y.attribName]="",y.attribValue="",lt(y,"onattribute",{name:y.attribName,value:""}),y.attribName="",D===">"?T(y):O(v,D)?(y.attribName=D,y.state=j.ATTRIB_NAME):(ft(y,"Invalid attribute name"),y.state=j.ATTRIB)}continue;case j.ATTRIB_VALUE:if(P(D))continue;M(D)?(y.q=D,y.state=j.ATTRIB_VALUE_QUOTED):(y.opt.unquotedAttributeValues||yt(y,"Unquoted attribute value"),y.state=j.ATTRIB_VALUE_UNQUOTED,y.attribValue=D);continue;case j.ATTRIB_VALUE_QUOTED:if(D!==y.q){D==="&"?y.state=j.ATTRIB_VALUE_ENTITY_Q:y.attribValue+=D;continue}Q(y),y.q="",y.state=j.ATTRIB_VALUE_CLOSED;continue;case j.ATTRIB_VALUE_CLOSED:P(D)?y.state=j.ATTRIB:D===">"?T(y):D==="/"?y.state=j.OPEN_TAG_SLASH:O(v,D)?(ft(y,"No whitespace between attributes"),y.attribName=D,y.attribValue="",y.state=j.ATTRIB_NAME):ft(y,"Invalid attribute name");continue;case j.ATTRIB_VALUE_UNQUOTED:if(!F(D)){D==="&"?y.state=j.ATTRIB_VALUE_ENTITY_U:y.attribValue+=D;continue}Q(y),D===">"?T(y):y.state=j.ATTRIB;continue;case j.CLOSE_TAG:if(y.tagName)D===">"?Y(y):O(E,D)?y.tagName+=D:y.script?(y.script+="</"+y.tagName+D,y.tagName="",y.state=j.SCRIPT):(P(D)||ft(y,"Invalid tagname in closing tag"),y.state=j.CLOSE_TAG_SAW_WHITE);else{if(P(D))continue;q(v,D)?y.script?(y.script+="</"+D,y.state=j.SCRIPT):ft(y,"Invalid tagname in closing tag."):y.tagName=D}continue;case j.CLOSE_TAG_SAW_WHITE:if(P(D))continue;D===">"?Y(y):ft(y,"Invalid characters in closing tag");continue;case j.TEXT_ENTITY:case j.ATTRIB_VALUE_ENTITY_Q:case j.ATTRIB_VALUE_ENTITY_U:var X,wt;switch(y.state){case j.TEXT_ENTITY:X=j.TEXT,wt="textNode";break;case j.ATTRIB_VALUE_ENTITY_Q:X=j.ATTRIB_VALUE_QUOTED,wt="attribValue";break;case j.ATTRIB_VALUE_ENTITY_U:X=j.ATTRIB_VALUE_UNQUOTED,wt="attribValue";break}if(D===";"){var Bt=K(y);y.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(Bt)?((y.entityCount+=1)>y.opt.maxEntityCount&&yt(y,"Parsed entity count exceeds max entity count"),(y.entityDepth+=1)>y.opt.maxEntityDepth&&yt(y,"Parsed entity depth exceeds max entity depth"),y.entity="",y.state=X,y.write(Bt),y.entityDepth-=1):(y[wt]+=Bt,y.entity="",y.state=X)}else O(y.entity.length?N:x,D)?y.entity+=D:(ft(y,"Invalid character in entity name"),y[wt]+="&"+y.entity+D,y.entity="",y.state=X);continue;default:throw new Error(y,"Unknown state: "+y.state)}return y.position>=y.bufferCheckPosition&&o(y),y}String.fromCodePoint||(function(){var b=String.fromCharCode,y=Math.floor,k=function(){var D=16384,ot=[],_t,X,wt=-1,Bt=arguments.length;if(!Bt)return"";for(var dt="";++wt<Bt;){var gt=Number(arguments[wt]);if(!isFinite(gt)||gt<0||gt>1114111||y(gt)!==gt)throw RangeError("Invalid code point: "+gt);gt<=65535?ot.push(gt):(gt-=65536,_t=(gt>>10)+55296,X=gt%1024+56320,ot.push(_t,X)),(wt+1===Bt||ot.length>D)&&(dt+=b.apply(null,ot),ot.length=0)}return dt};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:k,configurable:!0,writable:!0}):String.fromCodePoint=k})()})(e)})(Ys)),Ys}var oh=rh();const sh=Qo(oh),ah={"http://www.w3.org/2000/svg":{ext:"svg",mime:"image/svg+xml"},"http://www.w3.org/1999/xhtml":{ext:"xhtml",mime:"application/xhtml+xml"},"http://www.opengis.net/kml/2.2":{ext:"kml",mime:"application/vnd.google-earth.kml+xml"},"http://www.opengis.net/gml":{ext:"gml",mime:"application/gml+xml"}},ih={rss:{ext:"rss",mime:"application/rss+xml"},"score-partwise":{ext:"musicxml",mime:"application/vnd.recordare.musicxml+xml"},svg:{ext:"svg",mime:"image/svg+xml"}};class uh{constructor(t){this.options=t??{},this.firstTag=!0,this.onEnd=!1,this.parser=sh.parser(!0,{xmlns:!0}),this.nesting=0,this.parser.onerror=n=>{n.message.startsWith("Invalid character entity")||(this.fileType=void 0,this.onEnd=!0)},this.parser.onopentag=n=>{++this.nesting,!(!this.firstTag||this.onEnd)&&(this.firstTag=!1,n.uri?this.fileType=ah[n.uri]:n.name&&(this.fileType=ih[n.name.toLowerCase()]),this.fileType&&!this.options.fullScan&&(this.onEnd=!0))},this.parser.onclosetag=()=>{--this.nesting}}write(t){this.parser.write(t)}close(){this.parser.close(),this.onEnd=!0}isValid(){return this.nesting===0}}function ch(e,{validate:t=!0}={}){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);if(e=e.trim(),e.length===0)return!1;const n=new uh({fullScan:t});if(t){if(n.write(e),!n.isValid())return!1}else{let r=0;for(;e.length>r&&!n.onEnd;)n.write(e.slice(r,Math.min(r+128,e.length))),r+=128}return n.fileType?.ext==="svg"}function as(e,t,n){const r=`#initial-state-${e}-${t}`;if(window._nc_initial_state?.has(r))return window._nc_initial_state.get(r);window._nc_initial_state||(window._nc_initial_state=new Map);const o=document.querySelector(r);if(o===null)return n;try{const s=JSON.parse(atob(o.value));return window._nc_initial_state.set(r,s),s}catch(s){return console.error("[@nextcloud/initial-state] Could not parse initial state",{key:t,app:e,error:s}),n}}function Yi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lh(e){if(Array.isArray(e))return e}function fh(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,u,i=[],f=!0,h=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(f=(r=s.call(n)).done)&&(i.push(r.value),i.length!==t);f=!0);}catch(a){h=!0,o=a}finally{try{if(!f&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(h)throw o}}return i}}function hh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ph(e,t){return lh(e)||fh(e,t)||dh(e,t)||hh()}function dh(e,t){if(e){if(typeof e=="string")return Yi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yi(e,t):void 0}}const mc=Object.entries,Hi=Object.setPrototypeOf,gh=Object.isFrozen,mh=Object.getPrototypeOf,yh=Object.getOwnPropertyDescriptor;let Zt=Object.freeze,re=Object.seal,on=Object.create,yc=typeof Reflect<"u"&&Reflect,ko=yc.apply,$o=yc.construct;Zt||(Zt=function(e){return e}),re||(re=function(e){return e}),ko||(ko=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),$o||($o=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const Je=Qt(Array.prototype.forEach),bh=Qt(Array.prototype.lastIndexOf),Xi=Qt(Array.prototype.pop),wn=Qt(Array.prototype.push),wh=Qt(Array.prototype.splice),cn=Array.isArray,In=Qt(String.prototype.toLowerCase),po=Qt(String.prototype.toString),Ji=Qt(String.prototype.match),vn=Qt(String.prototype.replace),qi=Qt(String.prototype.indexOf),vh=Qt(String.prototype.trim),Eh=Qt(Number.prototype.toString),_h=Qt(Boolean.prototype.toString),Qi=typeof BigInt>"u"?null:Qt(BigInt.prototype.toString),Zi=typeof Symbol>"u"?null:Qt(Symbol.prototype.toString),me=Qt(Object.prototype.hasOwnProperty),En=Qt(Object.prototype.toString),ie=Qt(RegExp.prototype.test),Ye=Ah(TypeError);function Qt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return ko(e,t,r)}}function Ah(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return $o(e,n)}}function It(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:In;if(Hi&&Hi(e,null),!cn(t))return e;let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const s=n(o);s!==o&&(gh(t)||(t[r]=s),o=s)}e[o]=!0}return e}function Sh(e){for(let t=0;t<e.length;t++)me(e,t)||(e[t]=null);return e}function ve(e){const t=on(null);for(const r of mc(e)){var n=ph(r,2);const o=n[0],s=n[1];me(e,o)&&(cn(s)?t[o]=Sh(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=ve(s):t[o]=s)}return t}function Nh(e){switch(typeof e){case"string":return e;case"number":return Eh(e);case"boolean":return _h(e);case"bigint":return Qi?Qi(e):"0";case"symbol":return Zi?Zi(e):"Symbol()";case"undefined":return En(e);case"function":case"object":{if(e===null)return En(e);const t=e,n=Ae(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:En(r)}return En(e)}default:return En(e)}}function Ae(e,t){for(;e!==null;){const r=yh(e,t);if(r){if(r.get)return Qt(r.get);if(typeof r.value=="function")return Qt(r.value)}e=mh(e)}function n(){return null}return n}function Ih(e){try{return ie(e,""),!0}catch{return!1}}const Ki=Zt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),go=Zt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),mo=Zt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Rh=Zt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),yo=Zt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),xh=Zt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),tu=Zt(["#text"]),eu=Zt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),bo=Zt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),nu=Zt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Vn=Zt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ph=re(/{{[\w\W]*|^[\w\W]*}}/g),Ch=re(/<%[\w\W]*|^[\w\W]*%>/g),Lh=re(/\${[\w\W]*/g),Bh=re(/^data-[\-\w.\u00B7-\uFFFF]+$/),jh=re(/^aria-[\-\w]+$/),ru=re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Dh=re(/^(?:\w+script|data):/i),Mh=re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Th=re(/^html$/i),Uh=re(/^[a-z][.\w]*(-[.\w]+)+$/i),ou=re(/<[/\w!]/g),su=re(/<[/\w]/g),kh=re(/<\/no(script|embed|frames)/i),$h=re(/\/>/i),be={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},bc=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Fh=Zt(It({},bc)),Gh=(function(){const e={};return Je(bc,t=>{e[t]=re(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Zt(e)})(),Oh=function(){return typeof window>"u"?null:window},Vh=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},au=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},$e=function(e,t,n,r){return me(e,t)&&cn(e[t])?It(r.base?ve(r.base):{},e[t],r.transform):n},wo=function(e,t,n){const r=me(e,t)?e[t]:void 0;return r&&typeof r=="object"?ve(r):n()};function wc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Oh();const t=C=>wc(C);if(t.version="3.4.15",t.removed=[],!e||!e.document||e.document.nodeType!==be.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,o=r.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,u=e.Node,i=e.Element,f=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const a=e.DOMParser,p=e.trustedTypes,d=i.prototype,I=Ae(d,"cloneNode"),S=Ae(d,"remove"),w=Ae(d,"removeAttributeNode"),R=Ae(d,"nextSibling"),v=Ae(d,"childNodes"),E=Ae(d,"parentNode"),x=Ae(d,"shadowRoot"),N=Ae(d,"attributes"),P=u&&u.prototype?Ae(u.prototype,"nodeType"):null,M=u&&u.prototype?Ae(u.prototype,"nodeName"):null,F=u&&u.prototype?Ae(u.prototype,"ownerDocument"):null,O=function(C){return P?P(C):C.nodeType},q=function(C){return M?M(C):C.nodeName};if(typeof s=="function"){const C=n.createElement("template");C.content&&C.content.ownerDocument&&(n=C.content.ownerDocument)}let j,ct="",G,rt=!1,pt=0;const At=function(){if(pt>0)throw Ye('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Et=function(C){At(),pt++;try{return j.createHTML(C)}finally{pt--}},lt=function(C){At(),pt++;try{return j.createScriptURL(C)}finally{pt--}},mt=function(){return rt||(G=Vh(p,o),rt=!0),G},Nt=n,yt=Nt.implementation,Tt=Nt.createNodeIterator,ft=Nt.createDocumentFragment,z=Nt.getElementsByTagName,H=r.importNode;let Q=au();t.isSupported=typeof mc=="function"&&typeof E=="function"&&yt&&yt.createHTMLDocument!==void 0;const T=Ph,Y=Ch,K=Lh,nt=Bh,st=jh,L=Dh,B=Mh,b=Uh;let y=ru,k=null;const D=It({},[...Ki,...go,...mo,...yo,...tu]);let ot=null;const _t=It({},[...eu,...bo,...nu,...Vn]);let X=Object.seal(on(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),wt=null,Bt=null;const dt=Object.seal(on(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let gt=!0,Ut=!0,Wt=!1,ne=!0,$t=!1,Pt=!0,se=!1,c=!1,g=null,_=null,$=!1,V=!1,Z=!1,at=!1,xt=!0,Ft=!1;const Ct="user-content-";let Rt=!0,Dt=!1,Ie={},oe=null;const Ze=It({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Dn=null;const Re=It({},["audio","video","img","source","image","track"]);let Mn=null;const l=It({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),m="http://www.w3.org/1998/Math/MathML",A="http://www.w3.org/2000/svg",U="http://www.w3.org/1999/xhtml";let W=U,tt=!1,it=null;const Mt=It({},[m,A,U],po),Jt=Zt(["mi","mo","mn","ms","mtext"]);let jt=It({},Jt);const Lt=Zt(["annotation-xml"]);let Gt=It({},Lt);const al=It({},["title","style","font","a","script"]);let mn=null;const il=["application/xhtml+xml","text/html"],ul="text/html";let Yt=null,Ke=null;const cl=n.createElement("form"),ws=function(C){return C instanceof RegExp||C instanceof Function},ur=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ke&&Ke===C)return;(!C||typeof C!="object")&&(C={}),C=ve(C),mn=il.indexOf(C.PARSER_MEDIA_TYPE)===-1?ul:C.PARSER_MEDIA_TYPE,Yt=mn==="application/xhtml+xml"?po:In,k=$e(C,"ALLOWED_TAGS",D,{transform:Yt}),ot=$e(C,"ALLOWED_ATTR",_t,{transform:Yt}),it=$e(C,"ALLOWED_NAMESPACES",Mt,{transform:po}),Mn=$e(C,"ADD_URI_SAFE_ATTR",l,{transform:Yt,base:l}),Dn=$e(C,"ADD_DATA_URI_TAGS",Re,{transform:Yt,base:Re}),oe=$e(C,"FORBID_CONTENTS",Ze,{transform:Yt}),wt=$e(C,"FORBID_TAGS",ve({}),{transform:Yt}),Bt=$e(C,"FORBID_ATTR",ve({}),{transform:Yt}),Ie=me(C,"USE_PROFILES")?C.USE_PROFILES&&typeof C.USE_PROFILES=="object"?ve(C.USE_PROFILES):C.USE_PROFILES:!1,gt=C.ALLOW_ARIA_ATTR!==!1,Ut=C.ALLOW_DATA_ATTR!==!1,Wt=C.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$t=C.SAFE_FOR_TEMPLATES||!1,Pt=C.SAFE_FOR_XML!==!1,se=C.WHOLE_DOCUMENT||!1,V=C.RETURN_DOM||!1,Z=C.RETURN_DOM_FRAGMENT||!1,at=C.RETURN_TRUSTED_TYPE||!1,$=C.FORCE_BODY||!1,xt=C.SANITIZE_DOM!==!1,Ft=C.SANITIZE_NAMED_PROPS||!1,Rt=C.KEEP_CONTENT!==!1,Dt=C.IN_PLACE||!1,y=Ih(C.ALLOWED_URI_REGEXP)?C.ALLOWED_URI_REGEXP:ru,W=typeof C.NAMESPACE=="string"?C.NAMESPACE:U,jt=wo(C,"MATHML_TEXT_INTEGRATION_POINTS",()=>It({},Jt)),Gt=wo(C,"HTML_INTEGRATION_POINTS",()=>It({},Lt));const J=wo(C,"CUSTOM_ELEMENT_HANDLING",()=>on(null));if(X=on(null),me(J,"tagNameCheck")&&ws(J.tagNameCheck)&&(X.tagNameCheck=J.tagNameCheck),me(J,"attributeNameCheck")&&ws(J.attributeNameCheck)&&(X.attributeNameCheck=J.attributeNameCheck),me(J,"allowCustomizedBuiltInElements")&&typeof J.allowCustomizedBuiltInElements=="boolean"&&(X.allowCustomizedBuiltInElements=J.allowCustomizedBuiltInElements),re(X),$t&&(Ut=!1),Z&&(V=!0),Ie&&(k=It({},tu),ot=on(null),Ie.html===!0&&(It(k,Ki),It(ot,eu)),Ie.svg===!0&&(It(k,go),It(ot,bo),It(ot,Vn)),Ie.svgFilters===!0&&(It(k,mo),It(ot,bo),It(ot,Vn)),Ie.mathMl===!0&&(It(k,yo),It(ot,nu),It(ot,Vn))),dt.tagCheck=null,dt.attributeCheck=null,me(C,"ADD_TAGS")&&(typeof C.ADD_TAGS=="function"?dt.tagCheck=C.ADD_TAGS:cn(C.ADD_TAGS)&&(k===D&&(k=ve(k)),It(k,C.ADD_TAGS,Yt))),me(C,"ADD_ATTR")&&(typeof C.ADD_ATTR=="function"?dt.attributeCheck=C.ADD_ATTR:cn(C.ADD_ATTR)&&(ot===_t&&(ot=ve(ot)),It(ot,C.ADD_ATTR,Yt))),me(C,"ADD_FORBID_CONTENTS")&&cn(C.ADD_FORBID_CONTENTS)&&(oe===Ze&&(oe=ve(oe)),It(oe,C.ADD_FORBID_CONTENTS,Yt)),Rt&&(k["#text"]=!0),se&&It(k,["html","head","body"]),k.table&&(It(k,["tbody"]),delete wt.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ye('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ye('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const et=j;j=C.TRUSTED_TYPES_POLICY;try{ct=Et("")}catch(ut){throw j=et,ut}}else C.TRUSTED_TYPES_POLICY===null?(j=void 0,ct=""):(j===void 0&&(j=mt()),j&&typeof ct=="string"&&(ct=Et("")));Zt&&Zt(C),Ke=C},vs=It({},[...go,...mo,...Rh]),Es=It({},[...yo,...xh]),ll=function(C,J,et){return J.namespaceURI===U?C==="svg":J.namespaceURI===m?C==="svg"&&(et==="annotation-xml"||jt[et]):!!vs[C]},fl=function(C,J,et){return J.namespaceURI===U?C==="math":J.namespaceURI===A?C==="math"&&Gt[et]:!!Es[C]},hl=function(C,J,et){return J.namespaceURI===A&&!Gt[et]||J.namespaceURI===m&&!jt[et]?!1:!Es[C]&&(al[C]||!vs[C])},pl=function(C){let J=E(C);(!J||!J.tagName)&&(J={namespaceURI:W,tagName:"template"});const et=In(C.tagName),ut=In(J.tagName);return it[C.namespaceURI]?C.namespaceURI===A?ll(et,J,ut):C.namespaceURI===m?fl(et,J,ut):C.namespaceURI===U?hl(et,J,ut):!!(mn==="application/xhtml+xml"&&it[C.namespaceURI]):!1},ze=function(C){wn(t.removed,{element:C});try{E(C).removeChild(C)}catch{if(S(C),!E(C))throw Ye("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},_s=function(C,J,et){try{w(C,J)}catch{try{C.removeAttribute(et)}catch{}}},Tn=function(C){Un(C);const J=v(C);if(J){const ut=[];Je(J,ht=>{wn(ut,ht)}),Je(ut,ht=>{try{S(ht)}catch{}})}const et=N(C);if(et)for(let ut=et.length-1;ut>=0;--ut){const ht=et[ut],bt=ht&&ht.name;typeof bt=="string"&&_s(C,ht,bt)}},We=function(C,J,et){if(!et)try{et=J.getAttributeNode(C)}catch{et=null}wn(t.removed,{attribute:et||null,from:J});try{et?w(J,et):J.removeAttribute(C)}catch{try{J.removeAttribute(C)}catch{}}if(C==="is")if(V||Z)try{ze(J)}catch{}else try{J.setAttribute(C,"")}catch{}},dl=function(C){const J=N(C);if(J)for(let et=J.length-1;et>=0;--et){const ut=J[et],ht=ut&&ut.name;typeof ht!="string"||ot[Yt(ht)]||_s(C,ut,ht)}},Un=function(C){const J=[C];for(;J.length>0;){const et=J.pop();O(et)===be.element&&dl(et);const ut=v(et);if(ut)for(let ht=ut.length-1;ht>=0;--ht)J.push(ut[ht])}},As=function(C,J){return Pt?C==="patchsrc"?!0:C==="for"&&J!=="label"&&J!=="output":!1},gl=function(C){if(!Pt)return;const J=[C];for(;J.length>0;){const et=J.pop(),ut=O(et);if(ut===be.processingInstruction||ut===be.comment&&ie(su,et.data)){try{S(et)}catch{}continue}if(ut===be.element){const bt=et,St=Yt(q(et));try{bt.hasAttribute&&bt.hasAttribute("patchsrc")&&bt.removeAttribute("patchsrc"),bt.hasAttribute&&bt.hasAttribute("for")&&As("for",St)&&bt.removeAttribute("for")}catch{}}const ht=v(et);if(ht)for(let bt=ht.length-1;bt>=0;--bt)J.push(ht[bt])}},Ss=function(C){let J=null,et=null;if($)C="<remove></remove>"+C;else{const bt=Ji(C,/^[\r\n\t ]+/);et=bt&&bt[0]}mn==="application/xhtml+xml"&&W===U&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const ut=j?Et(C):C;if(W===U)try{J=new a().parseFromString(ut,mn)}catch{}if(!J||!J.documentElement){J=yt.createDocument(W,"template",null);try{J.documentElement.innerHTML=tt?ct:ut}catch{}}const ht=J.body||J.documentElement;return C&&et&&ht.insertBefore(n.createTextNode(et),ht.childNodes[0]||null),W===U?z.call(J,se?"html":"body")[0]:se?J.documentElement:ht},Ns=function(C){const J=F?F(C):C.ownerDocument;return Tt.call(J||C,C,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},kn=function(C){return C=vn(C,T," "),C=vn(C,Y," "),C=vn(C,K," "),C},cr=function(C){var J;C.normalize();const et=F?F(C):C.ownerDocument,ut=Tt.call(et||C,C,f.SHOW_TEXT|f.SHOW_COMMENT|f.SHOW_CDATA_SECTION|f.SHOW_PROCESSING_INSTRUCTION,null);let ht=ut.nextNode();for(;ht;)ht.data=kn(ht.data),ht=ut.nextNode();const bt=(J=C.querySelectorAll)===null||J===void 0?void 0:J.call(C,"template");bt&&Je(bt,St=>{tn(St.content)&&cr(St.content)})},$n=function(C){const J=M?M(C):null;return typeof J!="string"||Yt(J)!=="form"?!1:typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||C.attributes!==N(C)||typeof C.removeAttribute!="function"||typeof C.removeAttributeNode!="function"||typeof C.getAttributeNode!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function"||C.nodeType!==P(C)||C.childNodes!==v(C)},tn=function(C){if(!P||typeof C!="object"||C===null)return!1;try{return P(C)===be.documentFragment}catch{return!1}},yn=function(C){if(!P||typeof C!="object"||C===null)return!1;try{return typeof P(C)=="number"}catch{return!1}};function Pe(C,J,et){C.length!==0&&Je(C,ut=>{ut.call(t,J,et,Ke)})}const ml=function(C,J){return!!(Pt&&C.hasChildNodes()&&!yn(C.firstElementChild)&&ie(ou,C.textContent)&&ie(ou,C.innerHTML)||Pt&&C.namespaceURI===U&&Fh[J]&&(yn(C.firstElementChild)||typeof C.textContent=="string"&&ie(Gh[J],C.textContent))||C.nodeType===be.processingInstruction||Pt&&C.nodeType===be.comment&&ie(su,C.data))},Fn=function(C,J){if(C instanceof RegExp)return ie(C,J);if(C instanceof Function){for(var et=arguments.length,ut=new Array(et>2?et-2:0),ht=2;ht<et;ht++)ut[ht-2]=arguments[ht];return!!C(J,...ut)}return!1},yl=function(C,J,et){if(!wt[J]&&Cs(J)&&Fn(X.tagNameCheck,J))return!1;if(Rt&&!oe[J]){const ut=E(C),ht=v(C);if(ht&&ut){const bt=ht.length;for(let St=bt-1;St>=0;--St){const Ce=C===et?I(ht[St],!0):ht[St];ut.insertBefore(Ce,R(C))}}}return ze(C),!0},Is=function(C,J,et,ut){return C.length===0?J:J===et||J===ut?ve(J):J},Rs=function(C,J){return C===J||E(C)!==null?!1:(Dt&&Un(C),!0)},xs=function(C,J){if(Pe(Q.beforeSanitizeElements,C,null),Rs(C,J))return!0;if($n(C))return ze(C),!0;const et=Yt(q(C));if(k=Is(Q.uponSanitizeElement,k,D,g),Pe(Q.uponSanitizeElement,C,{tagName:et,allowedTags:k}),Rs(C,J))return!0;if(ml(C,et))return ze(C),!0;if(wt[et]||!(dt.tagCheck instanceof Function&&dt.tagCheck(et))&&!k[et]){const ut=yl(C,et,J);return ut===!1&&Pe(Q.afterSanitizeElements,C,null),ut}if(O(C)===be.element&&!pl(C)||(et==="noscript"||et==="noembed"||et==="noframes")&&ie(kh,C.innerHTML))return ze(C),!0;if($t&&C.nodeType===be.text){const ut=kn(C.textContent);C.textContent!==ut&&(wn(t.removed,{element:C.cloneNode()}),C.textContent=ut)}return Pe(Q.afterSanitizeElements,C,null),!1},Ps=function(C,J,et){if(Bt[J]||As(J,C)||xt&&(J==="id"||J==="name")&&(et in n||et in cl))return!1;const ut=ot[J]||dt.attributeCheck instanceof Function&&dt.attributeCheck(J,C);return Ut&&ie(nt,J)||gt&&ie(st,J)?!0:ut?Mn[J]||ie(y,vn(et,B,""))||(J==="src"||J==="xlink:href"||J==="href")&&C!=="script"&&qi(et,"data:")===0&&Dn[C]||Wt&&!ie(L,vn(et,B,""))?!0:!et:Cs(C)&&Fn(X.tagNameCheck,C)&&Fn(X.attributeNameCheck,J,C)||J==="is"&&X.allowCustomizedBuiltInElements&&Fn(X.tagNameCheck,et)},bl=It({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Cs=function(C){return!bl[In(C)]&&ie(b,C)},wl=function(C,J,et,ut){if(j&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!et)switch(p.getAttributeType(C,J)){case"TrustedHTML":return Et(ut);case"TrustedScriptURL":return lt(ut)}return ut},vl=function(C,J,et,ut){try{return et?C.setAttributeNS(et,J,ut):C.setAttribute(J,ut),$n(C)?(ze(C),!1):!0}catch{return We(J,C),!1}},Ls=function(C){Pe(Q.beforeSanitizeAttributes,C,null);const J=C.attributes;if(!J||$n(C))return;ot=Is(Q.uponSanitizeAttribute,ot,_t,_);const et={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ot,forceKeepAttr:void 0};let ut=J.length;const ht=Yt(C.nodeName);for(;ut--;){const bt=J[ut],St=bt.name,Ce=bt.namespaceURI,Ue=bt.value,ae=Yt(St),xe=Ue;let le=St==="value"?xe:vh(xe),Bs=!1;if(et.attrName=ae,et.attrValue=le,et.keepAttr=!0,et.forceKeepAttr=void 0,Pe(Q.uponSanitizeAttribute,C,et),le=et.attrValue,Ft&&(ae==="id"||ae==="name")&&qi(le,Ct)!==0&&(We(St,C,bt),le=Ct+le,Bs=!0),Pt&&ie(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,le)){We(St,C,bt);continue}if(ae==="attributename"&&Ji(le,"href")){We(St,C,bt);continue}if(!et.forceKeepAttr){if(!et.keepAttr){We(St,C,bt);continue}if(!ne&&ie($h,le)){We(St,C,bt);continue}if($t&&(le=kn(le)),!Ps(ht,ae,le)){We(St,C,bt);continue}le=wl(ht,ae,Ce,le),le!==xe&&vl(C,St,Ce,le)&&Bs&&Xi(t.removed)}}Pe(Q.afterSanitizeAttributes,C,null)},Gn=function(C){let J=null;const et=Ns(C);for(Pe(Q.beforeSanitizeShadowDOM,C,null);J=et.nextNode();)if(Pe(Q.uponSanitizeShadowNode,J,null),xs(J,C),Ls(J),tn(J.content)&&Gn(J.content),O(J)===be.element){const ut=x(J);tn(ut)&&(lr(ut),Gn(ut))}Pe(Q.afterSanitizeShadowDOM,C,null)},lr=function(C){const J=[{node:C,shadow:null}];for(;J.length>0;){const et=J.pop();if(et.shadow){Gn(et.shadow);continue}const ut=et.node,ht=O(ut)===be.element,bt=v(ut);if(bt)for(let St=bt.length-1;St>=0;--St)J.push({node:bt[St],shadow:null});if(ht){const St=M?M(ut):null;if(typeof St=="string"&&Yt(St)==="template"){const Ce=ut.content;tn(Ce)&&J.push({node:Ce,shadow:null})}}if(ht){const St=x(ut);tn(St)&&J.push({node:null,shadow:St},{node:St,shadow:null})}}};return t.sanitize=function(C){let J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},et=null,ut=null,ht=null,bt=null;if(tt=!C,tt&&(C="<!-->"),typeof C!="string"&&!yn(C)&&(C=Nh(C),typeof C!="string"))throw Ye("dirty is not a string, aborting");if(!t.isSupported)return C;c?(k=g,ot=_):ur(J),(Q.uponSanitizeElement.length>0||Q.uponSanitizeAttribute.length>0)&&(k=ve(k)),Q.uponSanitizeAttribute.length>0&&(ot=ve(ot)),t.removed=[];const St=Dt&&typeof C!="string"&&yn(C);if(St){gl(C);const ae=q(C);if(typeof ae=="string"){const xe=Yt(ae);if(!k[xe]||wt[xe])throw Tn(C),Ye("root node is forbidden and cannot be sanitized in-place")}if($n(C))throw Tn(C),Ye("root node is clobbered and cannot be sanitized in-place");try{lr(C)}catch(xe){throw Tn(C),xe}}else if(yn(C))et=Ss("<!---->"),ut=et.ownerDocument.importNode(C,!0),ut.nodeType===be.element&&ut.nodeName==="BODY"||ut.nodeName==="HTML"?et=ut:et.appendChild(ut),lr(et);else{if(!V&&!$t&&!se&&C.indexOf("<")===-1)return j&&at?Et(C):C;if(et=Ss(C),!et)return V?null:at?ct:""}et&&$&&ze(et.firstChild);const Ce=St?C:et;try{const ae=Ns(Ce);for(;ht=ae.nextNode();)xs(ht,Ce),Ls(ht),tn(ht.content)&&Gn(ht.content)}catch(ae){throw St&&(Tn(C),Je(t.removed,xe=>{xe.element&&Un(xe.element)})),ae}if(St)return Je(t.removed,ae=>{ae.element&&Un(ae.element)}),$t&&cr(C),C;if(V){if($t&&cr(et),Z)for(bt=ft.call(et.ownerDocument);et.firstChild;)bt.appendChild(et.firstChild);else bt=et;return(ot.shadowroot||ot.shadowrootmode)&&(bt=H.call(r,bt,!0)),bt}let Ue=se?et.outerHTML:et.innerHTML;return se&&k["!doctype"]&&et.ownerDocument&&et.ownerDocument.doctype&&et.ownerDocument.doctype.name&&ie(Th,et.ownerDocument.doctype.name)&&(Ue="<!DOCTYPE "+et.ownerDocument.doctype.name+`>
`+Ue),$t&&(Ue=kn(Ue)),j&&at?Et(Ue):Ue},t.setConfig=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ur(C),c=!0,g=k,_=ot},t.clearConfig=function(){Ke=null,c=!1,g=null,_=null,j=G,ct=""},t.isValidAttribute=function(C,J,et){Ke||ur({});const ut=Yt(C),ht=Yt(J);return Ps(ut,ht,et)},t.addHook=function(C,J){typeof J=="function"&&me(Q,C)&&wn(Q[C],J)},t.removeHook=function(C,J){if(me(Q,C)){if(J!==void 0){const et=bh(Q[C],J);return et===-1?void 0:wh(Q[C],et,1)[0]}return Xi(Q[C])}},t.removeHooks=function(C){me(Q,C)&&(Q[C]=[])},t.removeAllHooks=function(){Q=au()},t}wc(),globalThis._nc_l10n_locale??=typeof document<"u"&&document.documentElement.dataset.locale||Intl.DateTimeFormat().resolvedOptions().locale.replaceAll(/-/g,"_"),globalThis._nc_l10n_language??=typeof document<"u"&&document.documentElement.lang||(globalThis.navigator?.language??"en"),globalThis._oc_l10n_registry_translations??={},globalThis._oc_l10n_registry_plural_functions??={};class zh extends of{}function vc(){return Ot.registry??=new zh,Ot.registry}function Wh(){return vc()}const Yh=Object.freeze({DEFAULT:"default",HIDDEN:"hidden"});function Hh(e){if(Jh(e),Ot.fileActions??=new Map,Ot.fileActions.has(e.id)){Ge.error(`FileAction ${e.id} already registered`,{action:e});return}Ot.fileActions.set(e.id,e),vc().dispatchTypedEvent("register:action",new CustomEvent("register:action",{detail:e}))}function Xh(){return Ot.fileActions?[...Ot.fileActions.values()]:[]}function Jh(e){if(!e.id||typeof e.id!="string")throw new Error("Invalid id");if(!e.displayName||typeof e.displayName!="function")throw new Error("Invalid displayName function");if("title"in e&&typeof e.title!="function")throw new Error("Invalid title function");if(!e.iconSvgInline||typeof e.iconSvgInline!="function")throw new Error("Invalid iconSvgInline function");if(!e.exec||typeof e.exec!="function")throw new Error("Invalid exec function");if("enabled"in e&&typeof e.enabled!="function")throw new Error("Invalid enabled function");if("execBatch"in e&&typeof e.execBatch!="function")throw new Error("Invalid execBatch function");if("order"in e&&typeof e.order!="number")throw new Error("Invalid order");if(e.destructive!==void 0&&typeof e.destructive!="boolean")throw new Error("Invalid destructive flag");if("parent"in e&&typeof e.parent!="string")throw new Error("Invalid parent");if(e.default&&!Object.values(Yh).includes(e.default))throw new Error("Invalid default");if("inline"in e&&typeof e.inline!="function")throw new Error("Invalid inline function");if("renderInline"in e&&typeof e.renderInline!="function")throw new Error("Invalid renderInline function");if("hotkey"in e&&e.hotkey!==void 0){if(typeof e.hotkey!="object")throw new Error("Invalid hotkey configuration");if(typeof e.hotkey.key!="string"||!e.hotkey.key)throw new Error("Missing or invalid hotkey key");if(typeof e.hotkey.description!="string"||!e.hotkey.description)throw new Error("Missing or invalid hotkey description")}}function qh(e){if(Qh(e),Ot.filesSidebarActions??=new Map,Ot.filesSidebarActions.has(e.id)){Ge.warn(`Sidebar action with id "${e.id}" already registered. Skipping.`);return}Ot.filesSidebarActions.set(e.id,e),Ge.debug(`New sidebar action with id "${e.id}" registered.`)}function Qh(e){if(typeof e!="object")throw new Error("Sidebar action is not an object");if(!e.id||typeof e.id!="string"||e.id!==CSS.escape(e.id))throw new Error("Sidebar actions need to have an id conforming to the HTML id attribute specifications");if(!e.displayName||typeof e.displayName!="function")throw new Error("Sidebar actions need to have a displayName function");if(!e.iconSvgInline||typeof e.iconSvgInline!="function")throw new Error("Sidebar actions need to have a iconSvgInline function");if(!e.enabled||typeof e.enabled!="function")throw new Error("Sidebar actions need to have an enabled function");if(!e.onClick||typeof e.onClick!="function")throw new Error("Sidebar actions need to have an onClick function")}function Ec(e){if(Zh(e),Ot.filesSidebarTabs??=new Map,Ot.filesSidebarTabs.has(e.id)){Ge.warn(`Sidebar tab with id "${e.id}" already registered. Skipping.`);return}Ot.filesSidebarTabs.set(e.id,e),Ge.debug(`New sidebar tab with id "${e.id}" registered.`)}function Zh(e){if(typeof e!="object")throw new Error("Sidebar tab is not an object");if(!e.id||typeof e.id!="string"||e.id!==CSS.escape(e.id))throw new Error("Sidebar tabs need to have an id conforming to the HTML id attribute specifications");if(!e.tagName||typeof e.tagName!="string")throw new Error("Sidebar tabs need to have the tagName name set");if(!e.tagName.match(/^[a-z][a-z0-9-_]+$/))throw new Error('Sidebar tab "tagName" is invalid');if(!e.displayName||typeof e.displayName!="string")throw new Error("Sidebar tabs need to have a name set");if(typeof e.iconSvgInline!="string"||!ch(e.iconSvgInline))throw new Error("Sidebar tabs need to have an valid SVG icon");if(typeof e.order!="number")throw new Error("Sidebar tabs need to have a numeric order set");if(e.enabled&&typeof e.enabled!="function")throw new Error('Sidebar tab "enabled" is not a function');if(e.onInit&&typeof e.onInit!="function")throw new Error('Sidebar tab "onInit" is not a function')}class Kh{get#e(){return window.OCA?.Files?._sidebar?.()}get available(){return!!this.#e}get isOpen(){return this.#e?.isOpen??!1}get activeTab(){return this.#e?.activeTab}get node(){return this.#e?.node}open(t,n){this.#e?.open(t,n)}close(){this.#e?.close()}setActiveTab(t){this.#e?.setActiveTab(t)}registerTab(t){Ec(t)}getTabs(t){return this.#e?.getTabs(t)??[]}getActions(t){return this.#e?.getActions(t)??[]}registerAction(t){qh(t)}}function _c(){return new Kh}function is(){return as("files_sharing","isPublic",null)??document.querySelector('input#isPublic[type="hidden"][name="isPublic"][value="1"]')!==null}function tp(){return as("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}const zn=globalThis||void 0||self;var vo={},ep={2(e){function t(o,s,u){o instanceof RegExp&&(o=n(o,u)),s instanceof RegExp&&(s=n(s,u));var i=r(o,s,u);return i&&{start:i[0],end:i[1],pre:u.slice(0,i[0]),body:u.slice(i[0]+o.length,i[1]),post:u.slice(i[1]+s.length)}}function n(o,s){var u=s.match(o);return u?u[0]:null}function r(o,s,u){var i,f,h,a,p,d=u.indexOf(o),I=u.indexOf(s,d+1),S=d;if(d>=0&&I>0){for(i=[],h=u.length;S>=0&&!p;)S==d?(i.push(S),d=u.indexOf(o,S+1)):i.length==1?p=[i.pop(),I]:((f=i.pop())<h&&(h=f,a=I),I=u.indexOf(s,S+1)),S=d<I&&d>=0?d:I;i.length&&(p=[h,a])}return p}e.exports=t,t.range=r},101(e,t,n){var r;e=n.nmd(e),(function(){var o=(e&&e.exports,typeof zn=="object"&&zn);o.global!==o&&o.window;var s=function(a){this.message=a};(s.prototype=new Error).name="InvalidCharacterError";var u=function(a){throw new s(a)},i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=/[\t\n\f\r ]/g,h={encode:function(a){a=String(a),/[^\0-\xFF]/.test(a)&&u("The string to be encoded contains characters outside of the Latin1 range.");for(var p,d,I,S,w=a.length%3,R="",v=-1,E=a.length-w;++v<E;)p=a.charCodeAt(v)<<16,d=a.charCodeAt(++v)<<8,I=a.charCodeAt(++v),R+=i.charAt((S=p+d+I)>>18&63)+i.charAt(S>>12&63)+i.charAt(S>>6&63)+i.charAt(63&S);return w==2?(p=a.charCodeAt(v)<<8,d=a.charCodeAt(++v),R+=i.charAt((S=p+d)>>10)+i.charAt(S>>4&63)+i.charAt(S<<2&63)+"="):w==1&&(S=a.charCodeAt(v),R+=i.charAt(S>>2)+i.charAt(S<<4&63)+"=="),R},decode:function(a){var p=(a=String(a).replace(f,"")).length;p%4==0&&(p=(a=a.replace(/==?$/,"")).length),(p%4==1||/[^+a-zA-Z0-9/]/.test(a))&&u("Invalid character: the string to be decoded is not correctly encoded.");for(var d,I,S=0,w="",R=-1;++R<p;)I=i.indexOf(a.charAt(R)),d=S%4?64*d+I:I,S++%4&&(w+=String.fromCharCode(255&d>>(-2*S&6)));return w},version:"1.0.0"};(r=function(){return h}.call(t,n,t,e))===void 0||(e.exports=r)})()},172(e,t){t.d=function(n){if(!n)return 0;for(var r=(n=n.toString()).length,o=n.length;o--;){var s=n.charCodeAt(o);56320<=s&&s<=57343&&o--,127<s&&s<=2047?r++:2047<s&&s<=65535&&(r+=2)}return r}},526(e){var t={utf8:{stringToBytes:function(n){return t.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(t.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var r=[],o=0;o<n.length;o++)r.push(255&n.charCodeAt(o));return r},bytesToString:function(n){for(var r=[],o=0;o<n.length;o++)r.push(String.fromCharCode(n[o]));return r.join("")}}};e.exports=t},298(e){var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(r,o){return r<<o|r>>>32-o},rotr:function(r,o){return r<<32-o|r>>>o},endian:function(r){if(r.constructor==Number)return 16711935&n.rotl(r,8)|4278255360&n.rotl(r,24);for(var o=0;o<r.length;o++)r[o]=n.endian(r[o]);return r},randomBytes:function(r){for(var o=[];r>0;r--)o.push(Math.floor(256*Math.random()));return o},bytesToWords:function(r){for(var o=[],s=0,u=0;s<r.length;s++,u+=8)o[u>>>5]|=r[s]<<24-u%32;return o},wordsToBytes:function(r){for(var o=[],s=0;s<32*r.length;s+=8)o.push(r[s>>>5]>>>24-s%32&255);return o},bytesToHex:function(r){for(var o=[],s=0;s<r.length;s++)o.push((r[s]>>>4).toString(16)),o.push((15&r[s]).toString(16));return o.join("")},hexToBytes:function(r){for(var o=[],s=0;s<r.length;s+=2)o.push(parseInt(r.substr(s,2),16));return o},bytesToBase64:function(r){for(var o=[],s=0;s<r.length;s+=3)for(var u=r[s]<<16|r[s+1]<<8|r[s+2],i=0;i<4;i++)8*s+6*i<=8*r.length?o.push(t.charAt(u>>>6*(3-i)&63)):o.push("=");return o.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var o=[],s=0,u=0;s<r.length;u=++s%4)u!=0&&o.push((t.indexOf(r.charAt(s-1))&Math.pow(2,-2*u+8)-1)<<2*u|t.indexOf(r.charAt(s))>>>6-2*u);return o}},e.exports=n},135(e){function t(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}e.exports=function(n){return n!=null&&(t(n)||(function(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&t(r.slice(0,0))})(n)||!!n._isBuffer)}},542(e,t,n){(function(){var r=n(298),o=n(526).utf8,s=n(135),u=n(526).bin,i=function(f,h){f.constructor==String?f=h&&h.encoding==="binary"?u.stringToBytes(f):o.stringToBytes(f):s(f)?f=Array.prototype.slice.call(f,0):Array.isArray(f)||f.constructor===Uint8Array||(f=f.toString());for(var a=r.bytesToWords(f),p=8*f.length,d=1732584193,I=-271733879,S=-1732584194,w=271733878,R=0;R<a.length;R++)a[R]=16711935&(a[R]<<8|a[R]>>>24)|4278255360&(a[R]<<24|a[R]>>>8);a[p>>>5]|=128<<p%32,a[14+(p+64>>>9<<4)]=p;var v=i._ff,E=i._gg,x=i._hh,N=i._ii;for(R=0;R<a.length;R+=16){var P=d,M=I,F=S,O=w;d=v(d,I,S,w,a[R+0],7,-680876936),w=v(w,d,I,S,a[R+1],12,-389564586),S=v(S,w,d,I,a[R+2],17,606105819),I=v(I,S,w,d,a[R+3],22,-1044525330),d=v(d,I,S,w,a[R+4],7,-176418897),w=v(w,d,I,S,a[R+5],12,1200080426),S=v(S,w,d,I,a[R+6],17,-1473231341),I=v(I,S,w,d,a[R+7],22,-45705983),d=v(d,I,S,w,a[R+8],7,1770035416),w=v(w,d,I,S,a[R+9],12,-1958414417),S=v(S,w,d,I,a[R+10],17,-42063),I=v(I,S,w,d,a[R+11],22,-1990404162),d=v(d,I,S,w,a[R+12],7,1804603682),w=v(w,d,I,S,a[R+13],12,-40341101),S=v(S,w,d,I,a[R+14],17,-1502002290),d=E(d,I=v(I,S,w,d,a[R+15],22,1236535329),S,w,a[R+1],5,-165796510),w=E(w,d,I,S,a[R+6],9,-1069501632),S=E(S,w,d,I,a[R+11],14,643717713),I=E(I,S,w,d,a[R+0],20,-373897302),d=E(d,I,S,w,a[R+5],5,-701558691),w=E(w,d,I,S,a[R+10],9,38016083),S=E(S,w,d,I,a[R+15],14,-660478335),I=E(I,S,w,d,a[R+4],20,-405537848),d=E(d,I,S,w,a[R+9],5,568446438),w=E(w,d,I,S,a[R+14],9,-1019803690),S=E(S,w,d,I,a[R+3],14,-187363961),I=E(I,S,w,d,a[R+8],20,1163531501),d=E(d,I,S,w,a[R+13],5,-1444681467),w=E(w,d,I,S,a[R+2],9,-51403784),S=E(S,w,d,I,a[R+7],14,1735328473),d=x(d,I=E(I,S,w,d,a[R+12],20,-1926607734),S,w,a[R+5],4,-378558),w=x(w,d,I,S,a[R+8],11,-2022574463),S=x(S,w,d,I,a[R+11],16,1839030562),I=x(I,S,w,d,a[R+14],23,-35309556),d=x(d,I,S,w,a[R+1],4,-1530992060),w=x(w,d,I,S,a[R+4],11,1272893353),S=x(S,w,d,I,a[R+7],16,-155497632),I=x(I,S,w,d,a[R+10],23,-1094730640),d=x(d,I,S,w,a[R+13],4,681279174),w=x(w,d,I,S,a[R+0],11,-358537222),S=x(S,w,d,I,a[R+3],16,-722521979),I=x(I,S,w,d,a[R+6],23,76029189),d=x(d,I,S,w,a[R+9],4,-640364487),w=x(w,d,I,S,a[R+12],11,-421815835),S=x(S,w,d,I,a[R+15],16,530742520),d=N(d,I=x(I,S,w,d,a[R+2],23,-995338651),S,w,a[R+0],6,-198630844),w=N(w,d,I,S,a[R+7],10,1126891415),S=N(S,w,d,I,a[R+14],15,-1416354905),I=N(I,S,w,d,a[R+5],21,-57434055),d=N(d,I,S,w,a[R+12],6,1700485571),w=N(w,d,I,S,a[R+3],10,-1894986606),S=N(S,w,d,I,a[R+10],15,-1051523),I=N(I,S,w,d,a[R+1],21,-2054922799),d=N(d,I,S,w,a[R+8],6,1873313359),w=N(w,d,I,S,a[R+15],10,-30611744),S=N(S,w,d,I,a[R+6],15,-1560198380),I=N(I,S,w,d,a[R+13],21,1309151649),d=N(d,I,S,w,a[R+4],6,-145523070),w=N(w,d,I,S,a[R+11],10,-1120210379),S=N(S,w,d,I,a[R+2],15,718787259),I=N(I,S,w,d,a[R+9],21,-343485551),d=d+P>>>0,I=I+M>>>0,S=S+F>>>0,w=w+O>>>0}return r.endian([d,I,S,w])};i._ff=function(f,h,a,p,d,I,S){var w=f+(h&a|~h&p)+(d>>>0)+S;return(w<<I|w>>>32-I)+h},i._gg=function(f,h,a,p,d,I,S){var w=f+(h&p|a&~p)+(d>>>0)+S;return(w<<I|w>>>32-I)+h},i._hh=function(f,h,a,p,d,I,S){var w=f+(h^a^p)+(d>>>0)+S;return(w<<I|w>>>32-I)+h},i._ii=function(f,h,a,p,d,I,S){var w=f+(a^(h|~p))+(d>>>0)+S;return(w<<I|w>>>32-I)+h},i._blocksize=16,i._digestsize=16,e.exports=function(f,h){if(f==null)throw new Error("Illegal argument "+f);var a=r.wordsToBytes(i(f,h));return h&&h.asBytes?a:h&&h.asString?u.bytesToString(a):r.bytesToHex(a)}})()},285(e,t,n){var r=n(2);e.exports=function(v,E){if(!v)return[];var x=(E=E||{}).max==null?1/0:E.max;return v.substr(0,2)==="{}"&&(v="\\{\\}"+v.substr(2)),R((function(N){return N.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(u).split("\\,").join(i).split("\\.").join(f)})(v),x,!0).map(a)};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",u="\0CLOSE"+Math.random()+"\0",i="\0COMMA"+Math.random()+"\0",f="\0PERIOD"+Math.random()+"\0";function h(v){return parseInt(v,10)==v?parseInt(v,10):v.charCodeAt(0)}function a(v){return v.split(o).join("\\").split(s).join("{").split(u).join("}").split(i).join(",").split(f).join(".")}function p(v){if(!v)return[""];var E=[],x=r("{","}",v);if(!x)return v.split(",");var N=x.pre,P=x.body,M=x.post,F=N.split(",");F[F.length-1]+="{"+P+"}";var O=p(M);return M.length&&(F[F.length-1]+=O.shift(),F.push.apply(F,O)),E.push.apply(E,F),E}function d(v){return"{"+v+"}"}function I(v){return/^-?0\d/.test(v)}function S(v,E){return v<=E}function w(v,E){return v>=E}function R(v,E,x){var N=[],P=r("{","}",v);if(!P)return[v];var M=P.pre,F=P.post.length?R(P.post,E,!1):[""];if(/\$$/.test(P.pre))for(var O=0;O<F.length&&O<E;O++){var q=M+"{"+P.body+"}"+F[O];N.push(q)}else{var j,ct,G=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(P.body),rt=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(P.body),pt=G||rt,At=P.body.indexOf(",")>=0;if(!pt&&!At)return P.post.match(/,(?!,).*\}/)?R(v=P.pre+"{"+P.body+u+P.post,E,!0):[v];if(pt)j=P.body.split(/\.\./);else if((j=p(P.body)).length===1&&(j=R(j[0],E,!1).map(d)).length===1)return F.map((function(Y){return P.pre+j[0]+Y}));if(pt){var Et=h(j[0]),lt=h(j[1]),mt=Math.max(j[0].length,j[1].length),Nt=j.length==3?Math.max(Math.abs(h(j[2])),1):1,yt=S;lt<Et&&(Nt*=-1,yt=w);var Tt=j.some(I);ct=[];for(var ft=Et;yt(ft,lt);ft+=Nt){var z;if(rt)(z=String.fromCharCode(ft))==="\\"&&(z="");else if(z=String(ft),Tt){var H=mt-z.length;if(H>0){var Q=new Array(H+1).join("0");z=ft<0?"-"+Q+z.slice(1):Q+z}}ct.push(z)}}else{ct=[];for(var T=0;T<j.length;T++)ct.push.apply(ct,R(j[T],E,!1))}for(T=0;T<ct.length;T++)for(O=0;O<F.length&&N.length<E;O++)q=M+ct[T]+F[O],(!x||pt||q)&&N.push(q)}return N}},829(e){function t(h){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t(h)}function n(h){var a=typeof Map=="function"?new Map:void 0;return n=function(p){if(p===null||(d=p,Function.toString.call(d).indexOf("[native code]")===-1))return p;var d;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(a!==void 0){if(a.has(p))return a.get(p);a.set(p,I)}function I(){return r(p,arguments,s(this).constructor)}return I.prototype=Object.create(p.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),o(I,p)},n(h)}function r(h,a,p){return r=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}})()?Reflect.construct:function(d,I,S){var w=[null];w.push.apply(w,I);var R=new(Function.bind.apply(d,w));return S&&o(R,S.prototype),R},r.apply(null,arguments)}function o(h,a){return o=Object.setPrototypeOf||function(p,d){return p.__proto__=d,p},o(h,a)}function s(h){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},s(h)}var u=(function(h){function a(p){var d;return(function(I,S){if(!(I instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),(d=(function(I,S){return!S||t(S)!=="object"&&typeof S!="function"?(function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w})(I):S})(this,s(a).call(this,p))).name="ObjectPrototypeMutationError",d}return(function(p,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(d&&d.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),d&&o(p,d)})(a,h),a})(n(Error));function i(h,a){for(var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},d=a.split("."),I=d.length,S=function(v){var E=d[v];if(!h)return{v:void 0};if(E==="+"){if(Array.isArray(h))return{v:h.map((function(N,P){var M=d.slice(v+1);return M.length>0?i(N,M.join("."),p):p(h,P,d,v)}))};var x=d.slice(0,v).join(".");throw new Error("Object at wildcard (".concat(x,") is not an array"))}h=p(h,E,d,v)},w=0;w<I;w++){var R=S(w);if(t(R)==="object")return R.v}return h}function f(h,a){return h.length===a+1}e.exports={set:function(h,a,p){if(t(h)!="object"||h===null||a===void 0)return h;if(typeof a=="number")return h[a]=p,h[a];try{return i(h,a,(function(d,I,S,w){if(d===Reflect.getPrototypeOf({}))throw new u("Attempting to mutate Object.prototype");if(!d[I]){var R=Number.isInteger(Number(S[w+1])),v=S[w+1]==="+";d[I]=R||v?[]:{}}return f(S,w)&&(d[I]=p),d[I]}))}catch(d){if(d instanceof u)throw d;return h}},get:function(h,a){if(t(h)!="object"||h===null||a===void 0)return h;if(typeof a=="number")return h[a];try{return i(h,a,(function(p,d){return p[d]}))}catch{return h}},has:function(h,a){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t(h)!="object"||h===null||a===void 0)return!1;if(typeof a=="number")return a in h;try{var d=!1;return i(h,a,(function(I,S,w,R){if(!f(w,R))return I&&I[S];d=p.own?I.hasOwnProperty(S):S in I})),d}catch{return!1}},hasOwn:function(h,a,p){return this.has(h,a,p||{own:!0})},isIn:function(h,a,p){var d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(h)!="object"||h===null||a===void 0)return!1;try{var I=!1,S=!1;return i(h,a,(function(w,R,v,E){return I=I||w===p||!!w&&w[R]===p,S=f(v,E)&&t(w)==="object"&&R in w,w&&w[R]})),d.validPath?I&&S:I}catch{return!1}},ObjectPrototypeMutationError:u}},47(e,t,n){var r=n(410),o=function(h){return typeof h=="string"};function s(h,a){for(var p=[],d=0;d<h.length;d++){var I=h[d];I&&I!=="."&&(I===".."?p.length&&p[p.length-1]!==".."?p.pop():a&&p.push(".."):p.push(I))}return p}var u=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i={};function f(h){return u.exec(h).slice(1)}i.resolve=function(){for(var h="",a=!1,p=arguments.length-1;p>=-1&&!a;p--){var d=p>=0?arguments[p]:vt.cwd();if(!o(d))throw new TypeError("Arguments to path.resolve must be strings");d&&(h=d+"/"+h,a=d.charAt(0)==="/")}return(a?"/":"")+(h=s(h.split("/"),!a).join("/"))||"."},i.normalize=function(h){var a=i.isAbsolute(h),p=h.substr(-1)==="/";return(h=s(h.split("/"),!a).join("/"))||a||(h="."),h&&p&&(h+="/"),(a?"/":"")+h},i.isAbsolute=function(h){return h.charAt(0)==="/"},i.join=function(){for(var h="",a=0;a<arguments.length;a++){var p=arguments[a];if(!o(p))throw new TypeError("Arguments to path.join must be strings");p&&(h+=h?"/"+p:p)}return i.normalize(h)},i.relative=function(h,a){function p(E){for(var x=0;x<E.length&&E[x]==="";x++);for(var N=E.length-1;N>=0&&E[N]==="";N--);return x>N?[]:E.slice(x,N+1)}h=i.resolve(h).substr(1),a=i.resolve(a).substr(1);for(var d=p(h.split("/")),I=p(a.split("/")),S=Math.min(d.length,I.length),w=S,R=0;R<S;R++)if(d[R]!==I[R]){w=R;break}var v=[];for(R=w;R<d.length;R++)v.push("..");return(v=v.concat(I.slice(w))).join("/")},i._makeLong=function(h){return h},i.dirname=function(h){var a=f(h),p=a[0],d=a[1];return p||d?(d&&(d=d.substr(0,d.length-1)),p+d):"."},i.basename=function(h,a){var p=f(h)[2];return a&&p.substr(-1*a.length)===a&&(p=p.substr(0,p.length-a.length)),p},i.extname=function(h){return f(h)[3]},i.format=function(h){if(!r.isObject(h))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof h);var a=h.root||"";if(!o(a))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof h.root);return(h.dir?h.dir+i.sep:"")+(h.base||"")},i.parse=function(h){if(!o(h))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof h);var a=f(h);if(!a||a.length!==4)throw new TypeError("Invalid path '"+h+"'");return a[1]=a[1]||"",a[2]=a[2]||"",a[3]=a[3]||"",{root:a[0],dir:a[0]+a[1].slice(0,a[1].length-1),base:a[2],ext:a[3],name:a[2].slice(0,a[2].length-a[3].length)}},i.sep="/",i.delimiter=":",e.exports=i},647(e,t){var n=Object.prototype.hasOwnProperty;function r(s){try{return decodeURIComponent(s.replace(/\+/g," "))}catch{return null}}function o(s){try{return encodeURIComponent(s)}catch{return null}}t.stringify=function(s,u){u=u||"";var i,f,h=[];for(f in typeof u!="string"&&(u="?"),s)if(n.call(s,f)){if((i=s[f])||i!=null&&!isNaN(i)||(i=""),f=o(f),i=o(i),f===null||i===null)continue;h.push(f+"="+i)}return h.length?u+h.join("&"):""},t.parse=function(s){for(var u,i=/([^=?#&]+)=?([^&]*)/g,f={};u=i.exec(s);){var h=r(u[1]),a=r(u[2]);h===null||a===null||h in f||(f[h]=a)}return f}},670(e){e.exports=function(t,n){if(n=n.split(":")[0],!(t=+t))return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}},737(e,t,n){var r=n(670),o=n(647),s=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,u=/[\n\r\t]/g,i=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,f=/:\d+$/,h=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,a=/^[a-zA-Z]:/;function p(E){return(E||"").toString().replace(s,"")}var d=[["#","hash"],["?","query"],function(E,x){return w(x.protocol)?E.replace(/\\/g,"/"):E},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],I={hash:1,query:1};function S(E){var x,N=(typeof window<"u"?window:typeof zn<"u"?zn:typeof self<"u"?self:{}).location||{},P={},M=typeof(E=E||N);if(E.protocol==="blob:")P=new v(unescape(E.pathname),{});else if(M==="string")for(x in P=new v(E,{}),I)delete P[x];else if(M==="object"){for(x in E)x in I||(P[x]=E[x]);P.slashes===void 0&&(P.slashes=i.test(E.href))}return P}function w(E){return E==="file:"||E==="ftp:"||E==="http:"||E==="https:"||E==="ws:"||E==="wss:"}function R(E,x){E=(E=p(E)).replace(u,""),x=x||{};var N,P=h.exec(E),M=P[1]?P[1].toLowerCase():"",F=!!P[2],O=!!P[3],q=0;return F?O?(N=P[2]+P[3]+P[4],q=P[2].length+P[3].length):(N=P[2]+P[4],q=P[2].length):O?(N=P[3]+P[4],q=P[3].length):N=P[4],M==="file:"?q>=2&&(N=N.slice(2)):w(M)?N=P[4]:M?F&&(N=N.slice(2)):q>=2&&w(x.protocol)&&(N=P[4]),{protocol:M,slashes:F||w(M),slashesCount:q,rest:N}}function v(E,x,N){if(E=(E=p(E)).replace(u,""),!(this instanceof v))return new v(E,x,N);var P,M,F,O,q,j,ct=d.slice(),G=typeof x,rt=this,pt=0;for(G!=="object"&&G!=="string"&&(N=x,x=null),N&&typeof N!="function"&&(N=o.parse),P=!(M=R(E||"",x=S(x))).protocol&&!M.slashes,rt.slashes=M.slashes||P&&x.slashes,rt.protocol=M.protocol||x.protocol||"",E=M.rest,(M.protocol==="file:"&&(M.slashesCount!==2||a.test(E))||!M.slashes&&(M.protocol||M.slashesCount<2||!w(rt.protocol)))&&(ct[3]=[/(.*)/,"pathname"]);pt<ct.length;pt++)typeof(O=ct[pt])!="function"?(F=O[0],j=O[1],F!=F?rt[j]=E:typeof F=="string"?~(q=F==="@"?E.lastIndexOf(F):E.indexOf(F))&&(typeof O[2]=="number"?(rt[j]=E.slice(0,q),E=E.slice(q+O[2])):(rt[j]=E.slice(q),E=E.slice(0,q))):(q=F.exec(E))&&(rt[j]=q[1],E=E.slice(0,q.index)),rt[j]=rt[j]||P&&O[3]&&x[j]||"",O[4]&&(rt[j]=rt[j].toLowerCase())):E=O(E,rt);N&&(rt.query=N(rt.query)),P&&x.slashes&&rt.pathname.charAt(0)!=="/"&&(rt.pathname!==""||x.pathname!=="")&&(rt.pathname=(function(At,Et){if(At==="")return Et;for(var lt=(Et||"/").split("/").slice(0,-1).concat(At.split("/")),mt=lt.length,Nt=lt[mt-1],yt=!1,Tt=0;mt--;)lt[mt]==="."?lt.splice(mt,1):lt[mt]===".."?(lt.splice(mt,1),Tt++):Tt&&(mt===0&&(yt=!0),lt.splice(mt,1),Tt--);return yt&&lt.unshift(""),Nt!=="."&&Nt!==".."||lt.push(""),lt.join("/")})(rt.pathname,x.pathname)),rt.pathname.charAt(0)!=="/"&&w(rt.protocol)&&(rt.pathname="/"+rt.pathname),r(rt.port,rt.protocol)||(rt.host=rt.hostname,rt.port=""),rt.username=rt.password="",rt.auth&&(~(q=rt.auth.indexOf(":"))?(rt.username=rt.auth.slice(0,q),rt.username=encodeURIComponent(decodeURIComponent(rt.username)),rt.password=rt.auth.slice(q+1),rt.password=encodeURIComponent(decodeURIComponent(rt.password))):rt.username=encodeURIComponent(decodeURIComponent(rt.auth)),rt.auth=rt.password?rt.username+":"+rt.password:rt.username),rt.origin=rt.protocol!=="file:"&&w(rt.protocol)&&rt.host?rt.protocol+"//"+rt.host:"null",rt.href=rt.toString()}v.prototype={set:function(E,x,N){var P=this;switch(E){case"query":typeof x=="string"&&x.length&&(x=(N||o.parse)(x)),P[E]=x;break;case"port":P[E]=x,r(x,P.protocol)?x&&(P.host=P.hostname+":"+x):(P.host=P.hostname,P[E]="");break;case"hostname":P[E]=x,P.port&&(x+=":"+P.port),P.host=x;break;case"host":P[E]=x,f.test(x)?(x=x.split(":"),P.port=x.pop(),P.hostname=x.join(":")):(P.hostname=x,P.port="");break;case"protocol":P.protocol=x.toLowerCase(),P.slashes=!N;break;case"pathname":case"hash":if(x){var M=E==="pathname"?"/":"#";P[E]=x.charAt(0)!==M?M+x:x}else P[E]=x;break;case"username":case"password":P[E]=encodeURIComponent(x);break;case"auth":var F=x.indexOf(":");~F?(P.username=x.slice(0,F),P.username=encodeURIComponent(decodeURIComponent(P.username)),P.password=x.slice(F+1),P.password=encodeURIComponent(decodeURIComponent(P.password))):P.username=encodeURIComponent(decodeURIComponent(x))}for(var O=0;O<d.length;O++){var q=d[O];q[4]&&(P[q[1]]=P[q[1]].toLowerCase())}return P.auth=P.password?P.username+":"+P.password:P.username,P.origin=P.protocol!=="file:"&&w(P.protocol)&&P.host?P.protocol+"//"+P.host:"null",P.href=P.toString(),P},toString:function(E){E&&typeof E=="function"||(E=o.stringify);var x,N=this,P=N.host,M=N.protocol;M&&M.charAt(M.length-1)!==":"&&(M+=":");var F=M+(N.protocol&&N.slashes||w(N.protocol)?"//":"");return N.username?(F+=N.username,N.password&&(F+=":"+N.password),F+="@"):N.password?(F+=":"+N.password,F+="@"):N.protocol!=="file:"&&w(N.protocol)&&!P&&N.pathname!=="/"&&(F+="@"),(P[P.length-1]===":"||f.test(N.hostname)&&!N.port)&&(P+=":"),F+=P+N.pathname,(x=typeof N.query=="object"?E(N.query):N.query)&&(F+=x.charAt(0)!=="?"?"?"+x:x),N.hash&&(F+=N.hash),F}},v.extractProtocol=R,v.location=S,v.trimLeft=p,v.qs=o,e.exports=v},410(){},388(){},805(){},345(){},800(){}},iu={};function kt(e){var t=iu[e];if(t!==void 0)return t.exports;var n=iu[e]={id:e,loaded:!1,exports:{}};return ep[e].call(n.exports,n,n.exports,kt),n.loaded=!0,n.exports}kt.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return kt.d(t,{a:t}),t},kt.d=(e,t)=>{for(var n in t)kt.o(t,n)&&!kt.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},kt.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),kt.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var np=kt(737),rp=kt.n(np);function Eo(e){if(!Fo(e))throw new Error("Parameter was not an error")}function Fo(e){return!!e&&typeof e=="object"&&(t=e,Object.prototype.toString.call(t)==="[object Error]")||e instanceof Error;var t}class pe extends Error{constructor(t,n){const r=[...arguments],{options:o,shortMessage:s}=(function(i){let f,h="";if(i.length===0)f={};else if(Fo(i[0]))f={cause:i[0]},h=i.slice(1).join(" ")||"";else if(i[0]&&typeof i[0]=="object")f=Object.assign({},i[0]),h=i.slice(1).join(" ")||"";else{if(typeof i[0]!="string")throw new Error("Invalid arguments passed to Layerr");f={},h=h=i.join(" ")||""}return{options:f,shortMessage:h}})(r);let u=s;if(o.cause&&(u=`${u}: ${o.cause.message}`),super(u),this.message=u,o.name&&typeof o.name=="string"?this.name=o.name:this.name="Layerr",o.cause&&Object.defineProperty(this,"_cause",{value:o.cause}),Object.defineProperty(this,"_info",{value:{}}),o.info&&typeof o.info=="object"&&Object.assign(this._info,o.info),Error.captureStackTrace){const i=o.constructorOpt||this.constructor;Error.captureStackTrace(this,i)}}static cause(t){return Eo(t),t._cause&&Fo(t._cause)?t._cause:null}static fullStack(t){Eo(t);const n=pe.cause(t);return n?`${t.stack}
caused by: ${pe.fullStack(n)}`:t.stack??""}static info(t){Eo(t);const n={},r=pe.cause(t);return r&&Object.assign(n,pe.info(r)),t._info&&Object.assign(n,t._info),n}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}var op=kt(47),qn=kt.n(op);const uu="__PATH_SEPARATOR_POSIX__",cu="__PATH_SEPARATOR_WINDOWS__";function Vt(e){try{const t=e.replace(/\//g,uu).replace(/\\\\/g,cu);return encodeURIComponent(t).split(cu).join("\\\\").split(uu).join("/")}catch(t){throw new pe(t,"Failed encoding path")}}function lu(e){return e.startsWith("/")?e:"/"+e}function Cn(e){let t=e;return t[0]!=="/"&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function sp(e){let t=new(rp())(e).pathname;return t.length<=0&&(t="/"),Cn(t)}function zt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(function(){return(function(r){var o=[];if(r.length===0)return"";if(typeof r[0]!="string")throw new TypeError("Url must be a string. Received "+r[0]);if(r[0].match(/^[^/:]+:\/*$/)&&r.length>1){var s=r.shift();r[0]=s+r[0]}r[0].match(/^file:\/\/\//)?r[0]=r[0].replace(/^([^/:]+):\/*/,"$1:///"):r[0]=r[0].replace(/^([^/:]+):\/*/,"$1://");for(var u=0;u<r.length;u++){var i=r[u];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(u>0&&(i=i.replace(/^[\/]+/,"")),i=u<r.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),o.push(i))}var f=o.join("/"),h=(f=f.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return h.shift()+(h.length>0?"?":"")+h.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(t.reduce(((r,o,s)=>((s===0||o!=="/"||o==="/"&&r[r.length-1]!=="/")&&r.push(o),r)),[]))}var ap=kt(542),_n=kt.n(ap);function fu(e,t){const n=e.url.replace("//",""),r=n.indexOf("/")==-1?"/":n.slice(n.indexOf("/")),o=e.method?e.method.toUpperCase():"GET",s=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",u=`00000000${t.nc}`.slice(-8),i=(function(d,I,S,w,R,v,E){const x=E||_n()(`${I}:${S}:${w}`);return d&&d.toLowerCase()==="md5-sess"?_n()(`${x}:${R}:${v}`):x})(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),f=_n()(`${o}:${r}`),h=s?_n()(`${i}:${t.nonce}:${u}:${t.cnonce}:${s}:${f}`):_n()(`${i}:${t.nonce}:${f}`),a={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:s,response:h,nc:u,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},p=[];for(const d in a)a[d]&&(d==="qop"||d==="nc"||d==="algorithm"?p.push(`${d}=${a[d]}`):p.push(`${d}="${a[d]}"`));return`Digest ${p.join(", ")}`}function Ac(e){return(e.headers&&e.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var ip=kt(101),Sc=kt.n(ip);function hu(e){return Sc().decode(e)}function pu(e,t){var n;return`Basic ${n=`${e}:${t}`,Sc().encode(n)}`}const du=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,up=du.fetch.bind(du);let ye=(function(e){return e.Auto="auto",e.Digest="digest",e.None="none",e.Password="password",e.Token="token",e})({}),Ve=(function(e){return e.DataTypeNoLength="data-type-no-length",e.InvalidAuthType="invalid-auth-type",e.InvalidOutputFormat="invalid-output-format",e.LinkUnsupportedAuthType="link-unsupported-auth",e.InvalidUpdateRange="invalid-update-range",e.NotSupported="not-supported",e})({});function Nc(e,t,n,r,o){switch(e.authType){case ye.Auto:t&&n&&(e.headers.Authorization=pu(t,n));break;case ye.Digest:e.digest=(function(u,i,f){return{username:u,password:i,ha1:f,nc:0,algorithm:"md5",hasDigestAuth:!1}})(t,n,o);break;case ye.None:break;case ye.Password:e.headers.Authorization=pu(t,n);break;case ye.Token:e.headers.Authorization=`${(s=r).token_type} ${s.access_token}`;break;default:throw new pe({info:{code:Ve.InvalidAuthType}},`Invalid auth type: ${e.authType}`)}var s}kt(345),kt(800);const gu="@@HOTPATCHER",cp=()=>{};function _o(e){return{original:e,methods:[e],final:!1}}class lp{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=gu}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t){let n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!t||t.__type__!==gu)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach((r=>{this.configuration.registry.hasOwnProperty(r)?n&&(this.configuration.registry[r]=Object.assign({},t.configuration.registry[r])):this.configuration.registry[r]=Object.assign({},t.configuration.registry[r])})),t._configuration=this.configuration,this}execute(t){const n=this.get(t)||cp;for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return n(...o)}get(t){const n=this.configuration.registry[t];if(!n)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${t}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return(function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];if(o.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var u=arguments.length,i=new Array(u),f=0;f<u;f++)i[f]=arguments[f];let h=i;const a=this;for(;o.length>0;)h=[o.shift().apply(a,h)];return h[0]}})(...n.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:o=!1}=r;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if(typeof n!="function")throw new Error(`Failed patching '${t}': Provided method is not a function`);if(o)this.configuration.registry[t]?this.configuration.registry[t].methods.push(n):this.configuration.registry[t]=_o(n);else if(this.isPatched(t)){const{original:s}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(_o(n),{original:s})}else this.configuration.registry[t]=_o(n);return this}patchInline(t,n){this.isPatched(t)||this.patch(t,n);for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];return this.execute(t,...o)}plugin(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((s=>{this.patch(t,s,{chain:!0})})),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if(typeof this.configuration.registry[t].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${t}`);return this.configuration.registry[t].methods=[this.configuration.registry[t].original],this}setFinal(t){if(!this.configuration.registry.hasOwnProperty(t))throw new Error(`Failed marking '${t}' as final: No method found for key`);return this.configuration.registry[t].final=!0,this}}let Ao=null;function Ic(){return Ao||(Ao=new lp),Ao}function Qn(e){return(function(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let n=t;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n})(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function mu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=null,o=[...t];for(;o.length>0;){const s=o.shift();r=r?Rc(r,s):Qn(s)}return r}function Rc(e,t){const n=Qn(e);return Object.keys(t).forEach((r=>{n.hasOwnProperty(r)?Array.isArray(t[r])?n[r]=Array.isArray(n[r])?[...n[r],...t[r]]:[...t[r]]:typeof t[r]=="object"&&t[r]?n[r]=typeof n[r]=="object"&&n[r]?Rc(n[r],t[r]):Qn(t[r]):n[r]=t[r]:n[r]=t[r]})),n}function fp(e){const t={};for(const n of e.keys())t[n]=e.get(n);return t}function Go(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===0)return{};const r={};return t.reduce(((o,s)=>(Object.keys(s).forEach((u=>{const i=u.toLowerCase();r.hasOwnProperty(i)?o[r[i]]=s[u]:(r[i]=u,o[u]=s[u])})),o)),{})}kt(805);const hp=typeof ArrayBuffer=="function",{toString:pp}=Object.prototype;function xc(e){return hp&&(e instanceof ArrayBuffer||pp.call(e)==="[object ArrayBuffer]")}function Pc(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function us(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}}function Oo(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Cc=us((function(e){const t=e._digest;return delete e._digest,t.hasDigestAuth&&(e=mu(e,{headers:{Authorization:fu(e,t)}})),Oo(Zn(e),(function(n){let r=!1;return o=function(u){return r?u:n},(s=(function(){if(n.status==401)return t.hasDigestAuth=(function(u,i){if(!Ac(u))return!1;const f=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const h=u.headers&&u.headers.get("www-authenticate")||"",a=f.exec(h);if(!a)break;i[a[1]]=a[2]||a[3]}return i.nc+=1,i.cnonce=(function(){let h="";for(let a=0;a<32;++a)h=`${h}${"abcdef0123456789"[Math.floor(16*Math.random())]}`;return h})(),!0})(n,t),(function(){if(t.hasDigestAuth)return Oo(Zn(e=mu(e,{headers:{Authorization:fu(e,t)}})),(function(u){return u.status==401?t.hasDigestAuth=!1:t.nc++,r=!0,u}))})();t.nc++})())&&s.then?s.then(o):o(s);var o,s}))})),dp=us((function(e,t){return Oo(Zn(e),(function(n){return n.ok?(t.authType=ye.Password,n):n.status==401&&Ac(n)?(t.authType=ye.Digest,Nc(t,t.username,t.password,void 0,void 0),e._digest=t.digest,Cc(e)):n}))})),Kt=us((function(e,t){return t.authType===ye.Auto?dp(e,t):e._digest?Cc(e):Zn(e)}));function te(e,t,n){const r=Qn(e);return r.headers=Go(t.headers,r.headers||{},n.headers||{}),n.data!==void 0&&(r.data=n.data),n.signal&&(r.signal=n.signal),t.httpAgent&&(r.httpAgent=t.httpAgent),t.httpsAgent&&(r.httpsAgent=t.httpsAgent),t.digest&&(r._digest=t.digest),typeof t.withCredentials=="boolean"&&(r.withCredentials=t.withCredentials),r}function Zn(e){const t=Ic();return t.patchInline("request",(n=>t.patchInline("fetch",up,n.url,(function(r){let o={};const s={method:r.method};if(r.headers&&(o=Go(o,r.headers)),r.data!==void 0){const[u,i]=(function(f){if(typeof f=="string")return[f,{}];if(Pc(f))return[f,{}];if(xc(f))return[f,{}];if(f&&typeof f=="object")return[JSON.stringify(f),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof f)})(r.data);s.body=u,o=Go(o,i)}return r.signal&&(s.signal=r.signal),r.withCredentials&&(s.credentials="include"),s.headers=o,s})(n))),e)}var gp=kt(285);const Kn=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},mp={"[: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]},An=e=>e.replace(/[[\]\\-]/g,"\\$&"),yu=e=>e.join(""),yp=(e,t)=>{const n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");const r=[],o=[];let s=n+1,u=!1,i=!1,f=!1,h=!1,a=n,p="";t:for(;s<e.length;){const w=e.charAt(s);if(w!=="!"&&w!=="^"||s!==n+1){if(w==="]"&&u&&!f){a=s+1;break}if(u=!0,w!=="\\"||f){if(w==="["&&!f){for(const[R,[v,E,x]]of Object.entries(mp))if(e.startsWith(R,s)){if(p)return["$.",!1,e.length-n,!0];s+=R.length,x?o.push(v):r.push(v),i=i||E;continue t}}f=!1,p?(w>p?r.push(An(p)+"-"+An(w)):w===p&&r.push(An(w)),p="",s++):e.startsWith("-]",s+1)?(r.push(An(w+"-")),s+=2):e.startsWith("-",s+1)?(p=w,s+=2):(r.push(An(w)),s++)}else f=!0,s++}else h=!0,s++}if(a<s)return["",!1,0,!1];if(!r.length&&!o.length)return["$.",!1,e.length-n,!0];if(o.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!h)return[(d=r[0].length===2?r[0].slice(-1):r[0],d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,a-n,!1];var d;const I="["+(h?"^":"")+yu(r)+"]",S="["+(h?"":"^")+yu(o)+"]";return[r.length&&o.length?"("+I+"|"+S+")":r.length?I:S,i,a-n,!0]},Rn=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")};var ge;const bp=new Set(["!","?","+","*","@"]),Vo=e=>bp.has(e),bu=e=>Vo(e.type),wp=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),vp=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Ep=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),wu=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),So="(?!\\.)",_p=new Set(["[","."]),Ap=new Set(["..","."]),Sp=new Set("().*{}+?[]^$\\!"),cs="[^/]",vu=cs+"*?",Eu=cs+"+?";class ls{type;#e;#r;#o=!1;#t=[];#n;#i;#c;#u=!1;#s;#a;#l=!1;constructor(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=t,t&&(this.#r=!0),this.#n=n,this.#e=this.#n?this.#n.#e:this,this.#s=this.#e===this?r:this.#e.#s,this.#c=this.#e===this?[]:this.#e.#c,t!=="!"||this.#e.#u||this.#c.push(this),this.#i=this.#n?this.#n.#t.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#t.map((t=>String(t))).join("|")+")":this.#a=this.#t.map((t=>String(t))).join("")}#y(){if(this!==this.#e)throw new Error("should only call on root");if(this.#u)return this;let t;for(this.toString(),this.#u=!0;t=this.#c.pop();){if(t.type!=="!")continue;let n=t,r=n.#n;for(;r;){for(let o=n.#i+1;!r.type&&o<r.#t.length;o++)for(const s of t.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(r.#t[o])}n=r,r=n.#n}}return this}push(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const o of n)if(o!==""){if(typeof o!="string"&&!(o instanceof ge&&o.#n===this))throw new Error("invalid part: "+o);this.#t.push(o)}}toJSON(){const t=this.type===null?this.#t.slice().map((n=>typeof n=="string"?n:n.toJSON())):[this.type,...this.#t.map((n=>n.toJSON()))];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#u&&this.#n?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#n?.isStart())return!1;if(this.#i===0)return!0;const t=this.#n;for(let n=0;n<this.#i;n++){const r=t.#t[n];if(!(r instanceof ge&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#n?.type==="!")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();const t=this.#n?this.#n.#t.length:0;return this.#i===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const n=new ge(this.type,t);for(const r of this.#t)n.copyIn(r);return n}static#f(t,n,r,o,s){const u=o.maxExtglobRecursion??2;let i=!1,f=!1,h=-1,a=!1;if(n.type===null){let w=r,R="";for(;w<t.length;){const v=t.charAt(w++);if(i||v==="\\")i=!i,R+=v;else if(f)w===h+1?v!=="^"&&v!=="!"||(a=!0):v!=="]"||w===h+2&&a||(f=!1),R+=v;else if(v!=="[")if(!o.noext&&Vo(v)&&t.charAt(w)==="("&&s<=u){n.push(R),R="";const E=new ge(v,n);w=ge.#f(t,E,w,o,s+1),n.push(E)}else R+=v;else f=!0,h=w,a=!1,R+=v}return n.push(R),w}let p=r+1,d=new ge(null,n);const I=[];let S="";for(;p<t.length;){const w=t.charAt(p++);if(i||w==="\\")i=!i,S+=w;else if(f)p===h+1?w!=="^"&&w!=="!"||(a=!0):w!=="]"||p===h+2&&a||(f=!1),S+=w;else if(w!=="[")if(Vo(w)&&t.charAt(p)==="("&&(s<=u||n&&n.#h(w))){const R=n&&n.#h(w)?0:1;d.push(S),S="";const v=new ge(w,d);d.push(v),p=ge.#f(t,v,p,o,s+R)}else if(w!=="|"){if(w===")")return S===""&&n.#t.length===0&&(n.#l=!0),d.push(S),S="",n.push(...I,d),p;S+=w}else d.push(S),S="",I.push(d),d=new ge(null,n);else f=!0,h=p,a=!1,S+=w}return n.type=null,n.#r=void 0,n.#t=[t.substring(r-1)],p}#b(t){return this.#d(t,vp)}#d(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wp;if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null)return!1;const r=t.#t[0];return!(!r||typeof r!="object"||r.type===null)&&this.#h(r.type,n)}#h(t){return!!(arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ep).get(this.type)?.includes(t)}#w(t,n){const r=t.#t[0],o=new ge(null,r,this.options);o.#t.push(""),r.push(o),this.#g(t,n)}#g(t,n){const r=t.#t[0];this.#t.splice(n,1,...r.#t);for(const o of r.#t)typeof o=="object"&&(o.#n=this);this.#a=void 0}#v(t){return!!wu.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null||this.#t.length!==1)return!1;const n=t.#t[0];return!(!n||typeof n!="object"||n.type===null)&&this.#v(n.type)}#_(t){const n=wu.get(this.type),r=t.#t[0],o=n?.get(r.type);if(!o)return!1;this.#t=r.#t;for(const s of this.#t)typeof s=="object"&&(s.#n=this);this.type=o,this.#a=void 0,this.#l=!1}#p(){if(bu(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#t.length;r++){const o=this.#t[r];typeof o=="object"&&(o.#p(),this.#d(o)?(n=!1,this.#g(o,r)):this.#b(o)?(n=!1,this.#w(o,r)):this.#E(o)&&(n=!1,this.#_(o)))}}while(!n&&++t<10)}else for(const t of this.#t)typeof t=="object"&&t.#p();this.#a=void 0}static fromGlob(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=new ge(null,void 0,n);return ge.#f(t,r,0,n,0),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();const t=this.toString(),[n,r,o,s]=this.toRegExpSource();if(!(o||this.#r||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;const u=(this.#s.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${n}$`,u),{_src:n,_glob:t})}get options(){return this.#s}toRegExpSource(t){const n=t??!!this.#s.dot;if(this.#e===this&&(this.#p(),this.#y()),!bu(this)){const f=this.isStart()&&this.isEnd(),h=this.#t.map((d=>{const[I,S,w,R]=typeof d=="string"?ge.#A(d,this.#r,f):d.toRegExpSource(t);return this.#r=this.#r||w,this.#o=this.#o||R,I})).join("");let a="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!Ap.has(this.#t[0]))){const d=_p,I=n&&d.has(h.charAt(0))||h.startsWith("\\.")&&d.has(h.charAt(2))||h.startsWith("\\.\\.")&&d.has(h.charAt(4)),S=!n&&!t&&d.has(h.charAt(0));a=I?"(?!(?:^|/)\\.\\.?(?:$|/))":S?So:""}let p="";return this.isEnd()&&this.#e.#u&&this.#n?.type==="!"&&(p="(?:$|\\/)"),[a+h+p,Rn(h),this.#r=!!this.#r,this.#o]}const r=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:";let s=this.#m(n);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){const f=this.toString(),h=this;return h.#t=[f],h.type=null,h.#r=void 0,[f,Rn(this.toString()),!1,!1]}let u=!r||t||n?"":this.#m(!0);u===s&&(u=""),u&&(s=`(?:${s})(?:${u})*?`);let i="";return i=this.type==="!"&&this.#l?(this.isStart()&&!n?So:"")+Eu:o+s+(this.type==="!"?"))"+(!this.isStart()||n||t?"":So)+vu+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&u?")":this.type==="*"&&u?")?":`)${this.type}`),[i,Rn(s),this.#r=!!this.#r,this.#o]}#m(t){return this.#t.map((n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");const[r,o,s,u]=n.toRegExpSource(t);return this.#o=this.#o||u,r})).filter((n=>!(this.isStart()&&this.isEnd()&&!n))).join("|")}static#A(t,n){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=!1,s="",u=!1,i=!1;for(let f=0;f<t.length;f++){const h=t.charAt(f);if(o)o=!1,s+=(Sp.has(h)?"\\":"")+h,i=!1;else if(h!=="\\"){if(h==="["){const[a,p,d,I]=yp(t,f);if(d){s+=a,u=u||p,f+=d-1,n=n||I,i=!1;continue}}if(h!=="*")i=!1,h!=="?"?s+=h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(s+=cs,n=!0);else{if(i)continue;i=!0,s+=r&&/^[*]+$/.test(t)?Eu:vu,n=!0}}else f===t.length-1?s+="\\\\":o=!0}return[s,Rn(t),!!n,u]}}ge=ls;const ce=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Kn(t),!(!n.nocomment&&t.charAt(0)==="#")&&new tr(t,n).match(e)},Np=/^\*+([^+@!?\*\[\(]*)$/,Ip=e=>t=>!t.startsWith(".")&&t.endsWith(e),Rp=e=>t=>t.endsWith(e),xp=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Pp=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Cp=/^\*+\.\*+$/,Lp=e=>!e.startsWith(".")&&e.includes("."),Bp=e=>e!=="."&&e!==".."&&e.includes("."),jp=/^\.\*+$/,Dp=e=>e!=="."&&e!==".."&&e.startsWith("."),Mp=/^\*+$/,Tp=e=>e.length!==0&&!e.startsWith("."),Up=e=>e.length!==0&&e!=="."&&e!=="..",kp=/^\?+([^+@!?\*\[\(]*)?$/,$p=e=>{let[t,n=""]=e;const r=Lc([t]);return n?(n=n.toLowerCase(),o=>r(o)&&o.toLowerCase().endsWith(n)):r},Fp=e=>{let[t,n=""]=e;const r=Bc([t]);return n?(n=n.toLowerCase(),o=>r(o)&&o.toLowerCase().endsWith(n)):r},Gp=e=>{let[t,n=""]=e;const r=Bc([t]);return n?o=>r(o)&&o.endsWith(n):r},Op=e=>{let[t,n=""]=e;const r=Lc([t]);return n?o=>r(o)&&o.endsWith(n):r},Lc=e=>{let[t]=e;const n=t.length;return r=>r.length===n&&!r.startsWith(".")},Bc=e=>{let[t]=e;const n=t.length;return r=>r.length===n&&r!=="."&&r!==".."},jc=typeof vt=="object"&&vt?typeof vo=="object"&&vo&&vo.__MINIMATCH_TESTING_PLATFORM__||vt.platform:"posix";ce.sep=jc==="win32"?"\\":"/";const ue=Symbol("globstar **");ce.GLOBSTAR=ue,ce.filter=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n=>ce(n,e,t)};const _e=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},e,t)};ce.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return ce;const t=ce;return Object.assign((function(n,r){return t(n,r,_e(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends t.Minimatch{constructor(n){super(n,_e(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(n){return t.defaults(_e(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,r){super(n,r,_e(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.AST.fromGlob(n,_e(e,r))}},unescape:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(n,_e(e,r))},escape:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(n,_e(e,r))},filter:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(n,_e(e,r))},defaults:n=>t.defaults(_e(e,n)),makeRe:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(n,_e(e,r))},braceExpand:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(n,_e(e,r))},match:function(n,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(n,r,_e(e,o))},sep:t.sep,GLOBSTAR:ue})};const Dc=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Kn(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:gp(e)};ce.braceExpand=Dc,ce.makeRe=function(e){return new tr(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},ce.match=function(e,t){const n=new tr(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return e=e.filter((r=>n.match(r))),n.options.nonull&&!e.length&&e.push(t),e};const _u=/[?*]|[+@!]\(.*?\)|\[|\]/;class tr{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Kn(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||jc,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.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(const t of this.set)for(const n of t)if(typeof n!="string")return!0;return!1}debug(){}make(){const t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#")return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const r=this.globSet.map((s=>this.slashSplit(s)));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let o=this.globParts.map(((s,u,i)=>{if(this.isWindows&&this.windowsNoMagicRoot){const f=!(s[0]!==""||s[1]!==""||s[2]!=="?"&&_u.test(s[2])||_u.test(s[3])),h=/^[a-z]:/i.test(s[0]);if(f)return[...s.slice(0,4),...s.slice(4).map((a=>this.parse(a)))];if(h)return[s[0],...s.slice(1).map((a=>this.parse(a)))]}return s.map((f=>this.parse(f)))}));if(this.debug(this.pattern,o),this.set=o.filter((s=>s.indexOf(!1)===-1)),this.isWindows)for(let s=0;s<this.set.length;s++){const u=this.set[s];u[0]===""&&u[1]===""&&this.globParts[s][2]==="?"&&typeof u[3]=="string"&&/^[a-z]:$/i.test(u[3])&&(u[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let o=0;o<t[r].length;o++)t[r][o]==="**"&&(t[r][o]="*");const{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=n>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o!==r&&n.splice(r,o-r)}return n}))}levelOneOptimize(t){return t.map((n=>(n=n.reduce(((r,o)=>{const s=r[r.length-1];return o==="**"&&s==="**"?r:o===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(o),r)}),[])).length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){const s=t[o];o===1&&s===""&&t[0]===""||s!=="."&&s!==""||(n=!0,t.splice(o,1),o--)}t[0]!=="."||t.length!==2||t[1]!=="."&&t[1]!==""||(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){const o=t[r-1];o&&o!=="."&&o!==".."&&o!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let o=-1;for(;(o=r.indexOf("**",o+1))!==-1;){let u=o;for(;r[u+1]==="**";)u++;u>o&&r.splice(o+1,u-o);let i=r[o+1];const f=r[o+2],h=r[o+3];if(i!==".."||!f||f==="."||f===".."||!h||h==="."||h==="..")continue;n=!0,r.splice(o,1);const a=r.slice(0);a[o]="**",t.push(a),o--}if(!this.preserveMultipleSlashes){for(let u=1;u<r.length-1;u++){const i=r[u];u===1&&i===""&&r[0]===""||i!=="."&&i!==""||(n=!0,r.splice(u,1),u--)}r[0]!=="."||r.length!==2||r[1]!=="."&&r[1]!==""||(n=!0,r.pop())}let s=0;for(;(s=r.indexOf("..",s+1))!==-1;){const u=r[s-1];if(u&&u!=="."&&u!==".."&&u!=="**"){n=!0;const i=s===1&&r[s+1]==="**"?["."]:[];r.splice(s-1,2,...i),r.length===0&&r.push(""),s-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){const o=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(o){t[n]=[],t[r]=o;break}}return t.filter((n=>n.length))}partsMatch(t,n){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=0,s=0,u=[],i="";for(;o<t.length&&s<n.length;)if(t[o]===n[s])u.push(i==="b"?n[s]:t[o]),o++,s++;else if(r&&t[o]==="**"&&n[s]===t[o+1])u.push(t[o]),o++;else if(r&&n[s]==="**"&&t[o]===n[s+1])u.push(n[s]),s++;else if(t[o]!=="*"||!n[s]||!this.options.dot&&n[s].startsWith(".")||n[s]==="**"){if(n[s]!=="*"||!t[o]||!this.options.dot&&t[o].startsWith(".")||t[o]==="**"||i==="a")return!1;i="b",u.push(n[s]),o++,s++}else{if(i==="b")return!1;i="a",u.push(t[o]),o++,s++}return t.length===n.length&&u}parseNegate(){if(this.nonegate)return;const t=this.pattern;let n=!1,r=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=0,s=0;if(this.isWindows){const i=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),f=!i&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),h=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),a=f?3:i?0:void 0,p=!h&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])?3:h?0:void 0;if(typeof a=="number"&&typeof p=="number"){const[d,I]=[t[a],n[p]];d.toLowerCase()===I.toLowerCase()&&(n[p]=d,s=p,o=a)}}const{optimizationLevel:u=1}=this.options;return u>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(ue)?this.#e(t,n,r,o,s):this.#o(t,n,r,o,s)}#e(t,n,r,o,s){const u=n.indexOf(ue,s),i=n.lastIndexOf(ue),[f,h,a]=r?[n.slice(s,u),n.slice(u+1),[]]:[n.slice(s,u),n.slice(u+1,i),n.slice(i+1)];if(f.length){const E=t.slice(o,o+f.length);if(!this.#o(E,f,r,0,0))return!1;o+=f.length}let p=0;if(a.length){if(a.length+o>t.length)return!1;let E=t.length-a.length;if(this.#o(t,a,r,E,0))p=a.length;else{if(t[t.length-1]!==""||o+a.length===t.length||(E--,!this.#o(t,a,r,E,0)))return!1;p=a.length+1}}if(!h.length){let E=!!p;for(let x=o;x<t.length-p;x++){const N=String(t[x]);if(E=!0,N==="."||N===".."||!this.options.dot&&N.startsWith("."))return!1}return r||E}const d=[[[],0]];let I=d[0],S=0;const w=[0];for(const E of h)E===ue?(w.push(S),I=[[],0],d.push(I)):(I[0].push(E),S++);let R=d.length-1;const v=t.length-p;for(const E of d)E[1]=v-(w[R--]+E[0].length);return!!this.#r(t,d,o,0,r,0,!!p)}#r(t,n,r,o,s,u,i){const f=n[o];if(!f){for(let p=r;p<t.length;p++){i=!0;const d=t[p];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1}return i}const[h,a]=f;for(;r<=a;){if(this.#o(t.slice(0,r+h.length),h,s,r,0)&&u<this.maxGlobstarRecursion){const d=this.#r(t,n,r+h.length,o+1,s,u+1,i);if(d!==!1)return d}const p=t[r];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;r++}return s||null}#o(t,n,r,o,s){let u,i,f,h;for(u=o,i=s,h=t.length,f=n.length;u<h&&i<f;u++,i++){this.debug("matchOne loop");let a,p=n[i],d=t[u];if(this.debug(n,p,d),p===!1||p===ue||(typeof p=="string"?(a=d===p,this.debug("string match",p,d,a)):(a=p.test(d),this.debug("pattern match",p,d,a)),!a))return!1}if(u===h&&i===f)return!0;if(u===h)return r;if(i===f)return u===h-1&&t[u]==="";throw new Error("wtf?")}braceExpand(){return Dc(this.pattern,this.options)}parse(t){Kn(t);const n=this.options;if(t==="**")return ue;if(t==="")return"";let r,o=null;(r=t.match(Mp))?o=n.dot?Up:Tp:(r=t.match(Np))?o=(n.nocase?n.dot?Pp:xp:n.dot?Rp:Ip)(r[1]):(r=t.match(kp))?o=(n.nocase?n.dot?Fp:$p:n.dot?Gp:Op)(r):(r=t.match(Cp))?o=n.dot?Bp:Lp:(r=t.match(jp))&&(o=Dp);const s=ls.fromGlob(t,this.options).toMMPattern();return o&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:o}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const n=this.options,r=n.noglobstar?"[^/]*?":n.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",o=new Set(n.nocase?["i"]:[]);let s=t.map((f=>{const h=f.map((a=>{if(a instanceof RegExp)for(const p of a.flags.split(""))o.add(p);return typeof a=="string"?a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):a===ue?ue:a._src}));return h.forEach(((a,p)=>{const d=h[p+1],I=h[p-1];a===ue&&I!==ue&&(I===void 0?d!==void 0&&d!==ue?h[p+1]="(?:\\/|"+r+"\\/)?"+d:h[p]=r:d===void 0?h[p-1]=I+"(?:\\/|"+r+")?":d!==ue&&(h[p-1]=I+"(?:\\/|\\/"+r+"\\/)"+d,h[p+1]=ue))})),h.filter((a=>a!==ue)).join("/")})).join("|");const[u,i]=t.length>1?["(?:",")"]:["",""];s="^"+u+s+i+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;const r=this.options;this.isWindows&&(t=t.split("\\").join("/"));const o=this.slashSplit(t);this.debug(this.pattern,"split",o);const s=this.set;this.debug(this.pattern,"set",s);let u=o[o.length-1];if(!u)for(let i=o.length-2;!u&&i>=0;i--)u=o[i];for(let i=0;i<s.length;i++){const f=s[i];let h=o;if(r.matchBase&&f.length===1&&(h=[u]),this.matchOne(h,f,n))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(t){return ce.defaults(t).Minimatch}}function fs(e){const t=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${e.status} ${e.statusText}`);return t.status=e.status,t.response=e,t}function ee(e,t){const{status:n}=t;if(n===401&&e.digest)return t;if(n>=400)throw fs(t);return t}function gn(e,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:e.headers?fp(e.headers):{},status:e.status,statusText:e.statusText}:t}ce.AST=ls,ce.Minimatch=tr,ce.escape=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},ce.unescape=Rn;const Vp=(Au=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=te({url:zt(e.remoteURL,Vt(t)),method:"COPY",headers:{Destination:zt(e.remoteURL,Vt(n)),Overwrite:r.overwrite===!1?"F":"T",Depth:r.shallow?"0":"infinity"}},e,r);return u=function(i){ee(e,i)},(s=Kt(o,e))&&s.then||(s=Promise.resolve(s)),u?s.then(u):s;var s,u},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(Au.apply(this,e))}catch(n){return Promise.reject(n)}});var Au;const Su=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",zp=new RegExp("^["+Su+"]["+Su+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function Mc(e,t){const n=[];let r=t.exec(e);for(;r;){const o=[];o.startIndex=t.lastIndex-r[0].length;const s=r.length;for(let u=0;u<s;u++)o.push(r[u]);n.push(o),r=t.exec(e)}return n}const ar=function(e){return zp.exec(e)!=null},hs=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],Tc=["__proto__","constructor","prototype"],Uc=e=>hs.includes(e)?"__"+e:e,Wp={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:Uc};function Yp(e,t){if(typeof e!="string")return;const n=e.toLowerCase();if(hs.some((r=>n===r.toLowerCase())))throw new Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);if(Tc.some((r=>n===r.toLowerCase())))throw new Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function kc(e,t){return typeof e=="boolean"?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof e=="object"&&e!==null?{enabled:e.enabled!==!1,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??1e3),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null,appliesTo:e.appliesTo??"all"}:kc(!0)}const Hp=function(e){const t=Object.assign({},Wp,e),n=[{value:t.attributeNamePrefix,name:"attributeNamePrefix"},{value:t.attributesGroupName,name:"attributesGroupName"},{value:t.textNodeName,name:"textNodeName"},{value:t.cdataPropName,name:"cdataPropName"},{value:t.commentPropName,name:"commentPropName"}];for(const{value:r,name:o}of n)r&&Yp(r,o);return t.onDangerousProperty===null&&(t.onDangerousProperty=Uc),t.processEntities=kc(t.processEntities,t.htmlEntities),t.unpairedTagsSet=new Set(t.unpairedTags),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map((r=>typeof r=="string"&&r.startsWith("*.")?".."+r.substring(2):r))),t};let zo;zo=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class Fe{constructor(t){this.tagname=t,this.child=[],this[":@"]=Object.create(null)}add(t,n){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:n})}addChild(t,n){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),n!==void 0&&(this.child[this.child.length-1][zo]={startIndex:n})}static getMetaDataSymbol(){return zo}}class Xp{constructor(t){this.suppressValidationErr=!t,this.options=t}readDocType(t,n){const r=Object.create(null);let o=0;if(t[n+3]!=="O"||t[n+4]!=="C"||t[n+5]!=="T"||t[n+6]!=="Y"||t[n+7]!=="P"||t[n+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{n+=9;let s=1,u=!1,i=!1,f="";for(;n<t.length;n++)if(t[n]!=="<"||i)if(t[n]===">"){if(i?t[n-1]==="-"&&t[n-2]==="-"&&(i=!1,s--):s--,s===0)break}else t[n]==="["?u=!0:f+=t[n];else{if(u&&He(t,"!ENTITY",n)){let h,a;if(n+=7,[h,a,n]=this.readEntityExp(t,n+1,this.suppressValidationErr),a.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&o>=this.options.maxEntityCount)throw new Error(`Entity count (${o+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);r[h]=a,o++}}else if(u&&He(t,"!ELEMENT",n)){n+=8;const{index:h}=this.readElementExp(t,n+1);n=h}else if(u&&He(t,"!ATTLIST",n))n+=8;else if(u&&He(t,"!NOTATION",n)){n+=9;const{index:h}=this.readNotationExp(t,n+1,this.suppressValidationErr);n=h}else{if(!He(t,"!--",n))throw new Error("Invalid DOCTYPE");i=!0}s++,f=""}if(s!==0)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:n}}readEntityExp(t,n){const r=n=de(t,n);for(;n<t.length&&!/\s/.test(t[n])&&t[n]!=='"'&&t[n]!=="'";)n++;let o=t.substring(r,n);if(Sn(o),n=de(t,n),!this.suppressValidationErr){if(t.substring(n,n+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[n]==="%")throw new Error("Parameter entities are not supported")}let s="";if([n,s]=this.readIdentifierVal(t,n,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&s.length>this.options.maxEntitySize)throw new Error(`Entity "${o}" size (${s.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[o,s,--n]}readNotationExp(t,n){const r=n=de(t,n);for(;n<t.length&&!/\s/.test(t[n]);)n++;let o=t.substring(r,n);!this.suppressValidationErr&&Sn(o),n=de(t,n);const s=t.substring(n,n+6).toUpperCase();if(!this.suppressValidationErr&&s!=="SYSTEM"&&s!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${s}"`);n+=s.length,n=de(t,n);let u=null,i=null;if(s==="PUBLIC")[n,u]=this.readIdentifierVal(t,n,"publicIdentifier"),t[n=de(t,n)]!=='"'&&t[n]!=="'"||([n,i]=this.readIdentifierVal(t,n,"systemIdentifier"));else if(s==="SYSTEM"&&([n,i]=this.readIdentifierVal(t,n,"systemIdentifier"),!this.suppressValidationErr&&!i))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:o,publicIdentifier:u,systemIdentifier:i,index:--n}}readIdentifierVal(t,n,r){let o="";const s=t[n];if(s!=='"'&&s!=="'")throw new Error(`Expected quoted string, found "${s}"`);const u=++n;for(;n<t.length&&t[n]!==s;)n++;if(o=t.substring(u,n),t[n]!==s)throw new Error(`Unterminated ${r} value`);return[++n,o]}readElementExp(t,n){const r=n=de(t,n);for(;n<t.length&&!/\s/.test(t[n]);)n++;let o=t.substring(r,n);if(!this.suppressValidationErr&&!ar(o))throw new Error(`Invalid element name: "${o}"`);let s="";if(t[n=de(t,n)]==="E"&&He(t,"MPTY",n))n+=4;else if(t[n]==="A"&&He(t,"NY",n))n+=2;else if(t[n]==="("){const u=++n;for(;n<t.length&&t[n]!==")";)n++;if(s=t.substring(u,n),t[n]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[n]}"`);return{elementName:o,contentModel:s.trim(),index:n}}readAttlistExp(t,n){let r=n=de(t,n);for(;n<t.length&&!/\s/.test(t[n]);)n++;let o=t.substring(r,n);for(Sn(o),r=n=de(t,n);n<t.length&&!/\s/.test(t[n]);)n++;let s=t.substring(r,n);if(!Sn(s))throw new Error(`Invalid attribute name: "${s}"`);n=de(t,n);let u="";if(t.substring(n,n+8).toUpperCase()==="NOTATION"){if(u="NOTATION",t[n=de(t,n+=8)]!=="(")throw new Error(`Expected '(', found "${t[n]}"`);n++;let f=[];for(;n<t.length&&t[n]!==")";){const h=n;for(;n<t.length&&t[n]!=="|"&&t[n]!==")";)n++;let a=t.substring(h,n);if(a=a.trim(),!Sn(a))throw new Error(`Invalid notation name: "${a}"`);f.push(a),t[n]==="|"&&(n++,n=de(t,n))}if(t[n]!==")")throw new Error("Unterminated list of notations");n++,u+=" ("+f.join("|")+")"}else{const f=n;for(;n<t.length&&!/\s/.test(t[n]);)n++;u+=t.substring(f,n);const h=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!h.includes(u.toUpperCase()))throw new Error(`Invalid attribute type: "${u}"`)}n=de(t,n);let i="";return t.substring(n,n+8).toUpperCase()==="#REQUIRED"?(i="#REQUIRED",n+=8):t.substring(n,n+7).toUpperCase()==="#IMPLIED"?(i="#IMPLIED",n+=7):[n,i]=this.readIdentifierVal(t,n,"ATTLIST"),{elementName:o,attributeName:s,attributeType:u,defaultValue:i,index:n}}}const de=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function He(e,t,n){for(let r=0;r<t.length;r++)if(t[r]!==e[n+r+1])return!1;return!0}function Sn(e){if(ar(e))return e;throw new Error(`Invalid entity name ${e}`)}const Jp=/^[-+]?0x[a-fA-F0-9]+$/,qp=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Qp={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"},Zp=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class Kp{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){const t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const n=this._matcher.path;if(n.length!==0)return n[n.length-1].values?.[t]}hasAttr(t){const n=this._matcher.path;if(n.length===0)return!1;const r=n[n.length-1];return r.values!==void 0&&t in r.values}getPosition(){const t=this._matcher.path;return t.length===0?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return t.length===0?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t){let n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this._matcher.toString(t,n)}toArray(){return this._matcher.path.map((t=>t.tag))}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class ps{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new Kp(this)}push(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const o=this.path.length;this.siblingStacks[o]||(this.siblingStacks[o]=new Map);const s=this.siblingStacks[o],u=r?`${r}:${t}`:t,i=s.get(u)||0;let f=0;for(const a of s.values())f+=a;s.set(u,i+1);const h={tag:t,position:f,counter:i};r!=null&&(h.namespace=r),n!=null&&(h.values=n),this.path.push(h)}pop(){if(this.path.length===0)return;this._pathStringCache=null;const t=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),t}updateCurrent(t){if(this.path.length>0){const n=this.path[this.path.length-1];t!=null&&(n.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(this.path.length!==0)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(this.path.length===0)return!1;const n=this.path[this.path.length-1];return n.values!==void 0&&t in n.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t){let n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];const r=t||this.separator;if(r===this.separator&&n===!0){if(this._pathStringCache!==null)return this._pathStringCache;const o=this.path.map((s=>s.namespace?`${s.namespace}:${s.tag}`:s.tag)).join(r);return this._pathStringCache=o,o}return this.path.map((o=>n&&o.namespace?`${o.namespace}:${o.tag}`:o.tag)).join(r)}toArray(){return this.path.map((t=>t.tag))}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(t){const n=t.segments;return n.length!==0&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(n):this._matchSimple(n))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let n=0;n<t.length;n++)if(!this._matchSegment(t[n],this.path[n],n===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let n=this.path.length-1,r=t.length-1;for(;r>=0&&n>=0;){const o=t[r];if(o.type==="deep-wildcard"){if(r--,r<0)return!0;const s=t[r];let u=!1;for(let i=n;i>=0;i--)if(this._matchSegment(s,this.path[i],i===this.path.length-1)){n=i-1,r--,u=!0;break}if(!u)return!1}else{if(!this._matchSegment(o,this.path[n],n===this.path.length-1))return!1;n--,r--}}return r<0}_matchSegment(t,n,r){if(t.tag!=="*"&&t.tag!==n.tag||t.namespace!==void 0&&t.namespace!=="*"&&t.namespace!==n.namespace||t.attrName!==void 0&&(!r||!n.values||!(t.attrName in n.values)||t.attrValue!==void 0&&String(n.values[t.attrName])!==String(t.attrValue)))return!1;if(t.position!==void 0){if(!r)return!1;const o=n.counter??0;if(t.position==="first"&&o!==0||t.position==="odd"&&o%2!=1||t.position==="even"&&o%2!=0||t.position==="nth"&&o!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map((t=>({...t}))),siblingStacks:this.siblingStacks.map((t=>new Map(t)))}}restore(t){this._pathStringCache=null,this.path=t.path.map((n=>({...n}))),this.siblingStacks=t.siblingStacks.map((n=>new Map(n)))}readOnly(){return this._view}}class hn{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;this.pattern=t,this.separator=n.separator||".",this.segments=this._parse(t),this.data=r,this._hasDeepWildcard=this.segments.some((o=>o.type==="deep-wildcard")),this._hasAttributeCondition=this.segments.some((o=>o.attrName!==void 0)),this._hasPositionSelector=this.segments.some((o=>o.position!==void 0))}_parse(t){const n=[];let r=0,o="";for(;r<t.length;)t[r]===this.separator?r+1<t.length&&t[r+1]===this.separator?(o.trim()&&(n.push(this._parseSegment(o.trim())),o=""),n.push({type:"deep-wildcard"}),r+=2):(o.trim()&&n.push(this._parseSegment(o.trim())),o="",r++):(o+=t[r],r++);return o.trim()&&n.push(this._parseSegment(o.trim())),n}_parseSegment(t){const n={type:"tag"};let r=null,o=t;const s=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(s&&(o=s[1]+s[3],s[2])){const a=s[2].slice(1,-1);a&&(r=a)}let u,i,f=o;if(o.includes("::")){const a=o.indexOf("::");if(u=o.substring(0,a).trim(),f=o.substring(a+2).trim(),!u)throw new Error(`Invalid namespace in pattern: ${t}`)}let h=null;if(f.includes(":")){const a=f.lastIndexOf(":"),p=f.substring(0,a).trim(),d=f.substring(a+1).trim();["first","last","odd","even"].includes(d)||/^nth\(\d+\)$/.test(d)?(i=p,h=d):i=f}else i=f;if(!i)throw new Error(`Invalid segment pattern: ${t}`);if(n.tag=i,u&&(n.namespace=u),r)if(r.includes("=")){const a=r.indexOf("=");n.attrName=r.substring(0,a).trim(),n.attrValue=r.substring(a+1).trim()}else n.attrName=r.trim();if(h){const a=h.match(/^nth\((\d+)\)$/);a?(n.position="nth",n.positionValue=parseInt(a[1],10)):n.position=h}return n}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class td{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(t){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(t.pattern))return this;if(this._patterns.add(t.pattern),t.hasDeepWildcard())return this._deepWildcards.push(t),this;const n=t.length,r=t.segments[t.segments.length-1],o=r?.tag;if(o&&o!=="*"){const s=`${n}:${o}`;this._byDepthAndTag.has(s)||this._byDepthAndTag.set(s,[]),this._byDepthAndTag.get(s).push(t)}else this._wildcardByDepth.has(n)||this._wildcardByDepth.set(n,[]),this._wildcardByDepth.get(n).push(t);return this}addAll(t){for(const n of t)this.add(n);return this}has(t){return this._patterns.has(t.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(t){return this.findMatch(t)!==null}findMatch(t){const n=t.getDepth(),r=`${n}:${t.getCurrentTag()}`,o=this._byDepthAndTag.get(r);if(o){for(let u=0;u<o.length;u++)if(t.matches(o[u]))return o[u]}const s=this._wildcardByDepth.get(n);if(s){for(let u=0;u<s.length;u++)if(t.matches(s[u]))return s[u]}for(let u=0;u<this._deepWildcards.length;u++)if(t.matches(this._deepWildcards[u]))return this._deepWildcards[u];return null}}const ed={cent:"¢",pound:"£",curren:"¤",yen:"¥",euro:"€",dollar:"$",euro:"€",fnof:"ƒ",inr:"₹",af:"؋",birr:"ብር",peso:"₱",rub:"₽",won:"₩",yuan:"¥",cedil:"¸"},$c={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},nd={nbsp:" ",copy:"©",reg:"®",trade:"™",mdash:"—",ndash:"–",hellip:"…",laquo:"«",raquo:"»",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",para:"¶",sect:"§",deg:"°",frac12:"½",frac14:"¼",frac34:"¾"},rd=new Set("!?\\\\/[]$%{}^&*()<>|+");function Nu(e){if(e[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(const t of e)if(rd.has(t))throw new Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);return e}function No(){const e=Object.create(null);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const o of n)if(o)for(const s of Object.keys(o)){const u=o[s];if(typeof u=="string")e[s]=u;else if(u&&typeof u=="object"&&u.val!==void 0){const i=u.val;typeof i=="string"&&(e[s]=i)}}return e}const Xe="external",Wn="base",Io="all",we=Object.freeze({allow:0,leave:1,remove:2,throw:3}),od=new Set([9,10,13]);class Fc{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var n;this._limit=t.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof t.postCheck=="function"?t.postCheck:o=>o,this._limitTiers=(n=this._limit.applyLimitsTo??Xe)&&n!==Xe?n===Io?new Set([Io]):n===Wn?new Set([Wn]):Array.isArray(n)?new Set(n):new Set([Xe]):new Set([Xe]),this._numericAllowed=t.numericAllowed??!0,this._baseMap=No($c,t.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(t.remove&&Array.isArray(t.remove)?t.remove:[]),this._leaveSet=new Set(t.leave&&Array.isArray(t.leave)?t.leave:[]);const r=(function(o){if(!o)return{xmlVersion:1,onLevel:we.allow,nullLevel:we.remove};const s=o.xmlVersion===1.1?1.1:1,u=we[o.onNCR]??we.allow,i=we[o.nullNCR]??we.remove;return{xmlVersion:s,onLevel:u,nullLevel:Math.max(i,we.remove)}})(t.ncr);this._ncrXmlVersion=r.xmlVersion,this._ncrOnLevel=r.onLevel,this._ncrNullLevel=r.nullLevel}setExternalEntities(t){if(t)for(const n of Object.keys(t))Nu(n);this._externalMap=No(t)}addExternalEntity(t,n){Nu(t),typeof n=="string"&&n.indexOf("&")===-1&&(this._externalMap[t]=n)}addInputEntities(t){this._totalExpansions=0,this._expandedLength=0,this._inputMap=No(t)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(t){this._ncrXmlVersion=t===1.1?1.1:1}decode(t){if(typeof t!="string"||t.length===0)return t;const n=t,r=[],o=t.length;let s=0,u=0;const i=this._maxTotalExpansions>0,f=this._maxExpandedLength>0,h=i||f;for(;u<o;){if(t.charCodeAt(u)!==38){u++;continue}let p=u+1;for(;p<o&&t.charCodeAt(p)!==59&&p-u<=32;)p++;if(p>=o||t.charCodeAt(p)!==59){u++;continue}const d=t.slice(u+1,p);if(d.length===0){u++;continue}let I,S;if(this._removeSet.has(d))I="",S===void 0&&(S=Xe);else{if(this._leaveSet.has(d)){u++;continue}if(d.charCodeAt(0)===35){const w=this._resolveNCR(d);if(w===void 0){u++;continue}I=w,S=Wn}else{const w=this._resolveName(d);I=w?.value,S=w?.tier}}if(I!==void 0){if(u>s&&r.push(t.slice(s,u)),r.push(I),s=p+1,u=s,h&&this._tierCounts(S)){if(i&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(f){const w=I.length-(d.length+2);if(w>0&&(this._expandedLength+=w,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else u++}s<o&&r.push(t.slice(s));const a=r.length===0?t:r.join("");return this._postCheck(a,n)}_tierCounts(t){return!!this._limitTiers.has(Io)||this._limitTiers.has(t)}_resolveName(t){return t in this._inputMap?{value:this._inputMap[t],tier:Xe}:t in this._externalMap?{value:this._externalMap[t],tier:Xe}:t in this._baseMap?{value:this._baseMap[t],tier:Wn}:void 0}_classifyNCR(t){return t===0?this._ncrNullLevel:t>=55296&&t<=57343||this._ncrXmlVersion===1&&t>=1&&t<=31&&!od.has(t)?we.remove:-1}_applyNCRAction(t,n,r){switch(t){case we.allow:return String.fromCodePoint(r);case we.remove:return"";case we.leave:return;case we.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${n}; (U+${r.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(r)}}_resolveNCR(t){const n=t.charCodeAt(1);let r;if(r=n===120||n===88?parseInt(t.slice(2),16):parseInt(t.slice(1),10),Number.isNaN(r)||r<0||r>1114111)return;const o=this._classifyNCR(r);if(!this._numericAllowed&&o<we.remove)return;const s=o===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,o);return this._applyNCRAction(s,t,r)}}function sd(e,t){if(!e)return{};const n=t.attributesGroupName?e[t.attributesGroupName]:e;if(!n)return{};const r={};for(const o in n)o.startsWith(t.attributeNamePrefix)?r[o.substring(t.attributeNamePrefix.length)]=n[o]:r[o]=n[o];return r}function ad(e){if(!e||typeof e!="string")return;const t=e.indexOf(":");if(t!==-1&&t>0){const n=e.substring(0,t);if(n!=="xmlns")return n}}class id{constructor(t,n){var r;this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=hd,this.parseTextData=ud,this.resolveNameSpace=cd,this.buildAttributesMap=fd,this.isItStopNode=md,this.replaceEntitiesValue=dd,this.readStopNodeData=bd,this.saveTextToParentTag=gd,this.addChild=pd,this.ignoreAttributesFn=typeof(r=this.options.ignoreAttributes)=="function"?r:Array.isArray(r)?u=>{for(const i of r)if(typeof i=="string"&&u===i||i instanceof RegExp&&i.test(u))return!0}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0;let o={...$c};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?o=this.options.htmlEntities:this.options.htmlEntities===!0&&(o={...nd,...ed}),this.entityDecoder=new Fc({namedEntities:{...o,...n},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new ps,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new td;const s=this.options.stopNodes;if(s&&s.length>0){for(let u=0;u<s.length;u++){const i=s[u];typeof i=="string"?this.stopNodeExpressionsSet.add(new hn(i)):i instanceof hn&&this.stopNodeExpressionsSet.add(i)}this.stopNodeExpressionsSet.seal()}}}function ud(e,t,n,r,o,s,u){const i=this.options;if(e!==void 0&&(i.trimValues&&!r&&(e=e.trim()),e.length>0)){u||(e=this.replaceEntitiesValue(e,t,n));const f=i.jPath?n.toString():n,h=i.tagValueProcessor(t,e,f,o,s);return h==null?e:typeof h!=typeof e||h!==e?h:i.trimValues||e.trim()===e?Gc(e,i.parseTagValue,i.numberParseOptions):e}}function cd(e){if(this.options.removeNSPrefix){const t=e.split(":"),n=e.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(e=n+t[1])}return e}const ld=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function fd(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];const o=this.options;if(r===!0||o.ignoreAttributes!==!0&&typeof e=="string"){const s=Mc(e,ld),u=s.length,i={},f=new Array(u);let h=!1;const a={};for(let I=0;I<u;I++){const S=this.resolveNameSpace(s[I][1]),w=s[I][4];if(S.length&&w!==void 0){let R=w;o.trimValues&&(R=R.trim()),R=this.replaceEntitiesValue(R,n,this.readonlyMatcher),f[I]=R,a[S]=R,h=!0}}h&&typeof t=="object"&&t.updateCurrent&&t.updateCurrent(a);const p=o.jPath?t.toString():this.readonlyMatcher;let d=!1;for(let I=0;I<u;I++){const S=this.resolveNameSpace(s[I][1]);if(this.ignoreAttributesFn(S,p))continue;let w=o.attributeNamePrefix+S;if(S.length)if(o.transformAttributeName&&(w=o.transformAttributeName(w)),w=Oc(w,o),s[I][4]!==void 0){const R=f[I],v=o.attributeValueProcessor(S,R,p);i[w]=v==null?R:typeof v!=typeof R||v!==R?v:Gc(R,o.parseAttributeValue,o.numberParseOptions),d=!0}else o.allowBooleanAttributes&&(i[w]=!0,d=!0)}if(!d)return;if(o.attributesGroupName&&!o.preserveOrder){const I={};return I[o.attributesGroupName]=i,I}return i}}const hd=function(e){e=e.replace(/\r\n?/g,`
`);const t=new Fe("!xml");let n=t,r="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;const o=this.options,s=new Xp(o.processEntities),u=e.length;for(let i=0;i<u;i++)if(e[i]==="<"){const f=e.charCodeAt(i+1);if(f===47){const h=ln(e,">",i,"Closing Tag is not closed.");let a=e.substring(i+2,h).trim();if(o.removeNSPrefix){const d=a.indexOf(":");d!==-1&&(a=a.substr(d+1))}a=Ro(o.transformTagName,a,"",o).tagName,n&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher));const p=this.matcher.getCurrentTag();if(a&&o.unpairedTagsSet.has(a))throw new Error(`Unpaired tag can not be used as closing tag: </${a}>`);p&&o.unpairedTagsSet.has(p)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,n=this.tagsNodeStack.pop(),r="",i=h}else if(f===63){let h=Wo(e,i,!1,"?>");if(!h)throw new Error("Pi Tag is not closed.");r=this.saveTextToParentTag(r,n,this.readonlyMatcher);const a=this.buildAttributesMap(h.tagExp,this.matcher,h.tagName,!0);if(a){const p=a[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(p)||1)}if(!(o.ignoreDeclaration&&h.tagName==="?xml"||o.ignorePiTags)){const p=new Fe(h.tagName);p.add(o.textNodeName,""),h.tagName!==h.tagExp&&h.attrExpPresent&&o.ignoreAttributes!==!0&&(p[":@"]=a),this.addChild(n,p,this.readonlyMatcher,i)}i=h.closeIndex+1}else if(f===33&&e.charCodeAt(i+2)===45&&e.charCodeAt(i+3)===45){const h=ln(e,"-->",i+4,"Comment is not closed.");if(o.commentPropName){const a=e.substring(i+4,h-2);r=this.saveTextToParentTag(r,n,this.readonlyMatcher),n.add(o.commentPropName,[{[o.textNodeName]:a}])}i=h}else if(f===33&&e.charCodeAt(i+2)===68){const h=s.readDocType(e,i);this.entityDecoder.addInputEntities(h.entities),i=h.i}else if(f===33&&e.charCodeAt(i+2)===91){const h=ln(e,"]]>",i,"CDATA is not closed.")-2,a=e.substring(i+9,h);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let p=this.parseTextData(a,n.tagname,this.readonlyMatcher,!0,!1,!0,!0);p==null&&(p=""),o.cdataPropName?n.add(o.cdataPropName,[{[o.textNodeName]:a}]):n.add(o.textNodeName,p),i=h+2}else{let h=Wo(e,i,o.removeNSPrefix);if(!h){const N=e.substring(Math.max(0,i-50),Math.min(u,i+50));throw new Error(`readTagExp returned undefined at position ${i}. Context: "${N}"`)}let a=h.tagName;const p=h.rawTagName;let d=h.tagExp,I=h.attrExpPresent,S=h.closeIndex;if({tagName:a,tagExp:d}=Ro(o.transformTagName,a,d,o),o.strictReservedNames&&(a===o.commentPropName||a===o.cdataPropName||a===o.textNodeName||a===o.attributesGroupName))throw new Error(`Invalid tag name: ${a}`);n&&r&&n.tagname!=="!xml"&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher,!1));const w=n;w&&o.unpairedTagsSet.has(w.tagname)&&(n=this.tagsNodeStack.pop(),this.matcher.pop());let R=!1;d.length>0&&d.lastIndexOf("/")===d.length-1&&(R=!0,a[a.length-1]==="/"?(a=a.substr(0,a.length-1),d=a):d=d.substr(0,d.length-1),I=a!==d);let v,E=null;v=ad(p),a!==t.tagname&&this.matcher.push(a,{},v),a!==d&&I&&(E=this.buildAttributesMap(d,this.matcher,a),E&&sd(E,o)),a!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());const x=i;if(this.isCurrentNodeStopNode){let N="";if(R)i=h.closeIndex;else if(o.unpairedTagsSet.has(a))i=h.closeIndex;else{const M=this.readStopNodeData(e,p,S+1);if(!M)throw new Error(`Unexpected end of ${p}`);i=M.i,N=M.tagContent}const P=new Fe(a);E&&(P[":@"]=E),P.add(o.textNodeName,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(n,P,this.readonlyMatcher,x)}else{if(R){({tagName:a,tagExp:d}=Ro(o.transformTagName,a,d,o));const N=new Fe(a);E&&(N[":@"]=E),this.addChild(n,N,this.readonlyMatcher,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(o.unpairedTagsSet.has(a)){const N=new Fe(a);E&&(N[":@"]=E),this.addChild(n,N,this.readonlyMatcher,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1,i=h.closeIndex;continue}{const N=new Fe(a);if(this.tagsNodeStack.length>o.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(n),E&&(N[":@"]=E),this.addChild(n,N,this.readonlyMatcher,x),n=N}}r="",i=S}}}else r+=e[i];return t.child};function pd(e,t,n,r){this.options.captureMetaData||(r=void 0);const o=this.options.jPath?n.toString():n,s=this.options.updateTag(t.tagname,o,t[":@"]);s===!1||(typeof s=="string"&&(t.tagname=s),e.addChild(t,r))}function dd(e,t,n){const r=this.options.processEntities;if(!r||!r.enabled)return e;if(r.allowedTags){const o=this.options.jPath?n.toString():n;if(!(Array.isArray(r.allowedTags)?r.allowedTags.includes(t):r.allowedTags(t,o)))return e}if(r.tagFilter){const o=this.options.jPath?n.toString():n;if(!r.tagFilter(t,o))return e}return this.entityDecoder.decode(e)}function gd(e,t,n,r){return e&&(r===void 0&&(r=t.child.length===0),(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&Object.keys(t[":@"]).length!==0,r))!==void 0&&e!==""&&t.add(this.options.textNodeName,e),e=""),e}function md(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function ln(e,t,n,r){const o=e.indexOf(t,n);if(o===-1)throw new Error(r);return o+t.length-1}function yd(e,t,n,r){const o=e.indexOf(t,n);if(o===-1)throw new Error(r);return o}function Wo(e,t,n){const r=(function(a,p){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",I=0;const S=a.length,w=d.charCodeAt(0),R=d.length>1?d.charCodeAt(1):-1;let v="",E=p;for(let x=p;x<S;x++){const N=a.charCodeAt(x);if(I)N===I&&(I=0);else if(N===34||N===39)I=N;else if(N===w){if(R===-1)return v+=a.substring(E,x),{data:v,index:x};if(a.charCodeAt(x+1)===R)return v+=a.substring(E,x),{data:v,index:x}}else N!==9||I||(v+=a.substring(E,x)+" ",E=x+1)}})(e,t+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!r)return;let o=r.data;const s=r.index,u=o.search(/\s/);let i=o,f=!0;u!==-1&&(i=o.substring(0,u),o=o.substring(u+1).trimStart());const h=i;if(n){const a=i.indexOf(":");a!==-1&&(i=i.substr(a+1),f=i!==r.data.substr(a+1))}return{tagName:i,tagExp:o,closeIndex:s,attrExpPresent:f,rawTagName:h}}function bd(e,t,n){const r=n;let o=1;const s=e.length;for(;n<s;n++)if(e[n]==="<"){const u=e.charCodeAt(n+1);if(u===47){const i=yd(e,">",n,`${t} is not closed`);if(e.substring(n+2,i).trim()===t&&(o--,o===0))return{tagContent:e.substring(r,n),i};n=i}else if(u===63)n=ln(e,"?>",n+1,"StopNode is not closed.");else if(u===33&&e.charCodeAt(n+2)===45&&e.charCodeAt(n+3)===45)n=ln(e,"-->",n+3,"StopNode is not closed.");else if(u===33&&e.charCodeAt(n+2)===91)n=ln(e,"]]>",n,"StopNode is not closed.")-2;else{const i=Wo(e,n,">");i&&((i&&i.tagName)===t&&i.tagExp[i.tagExp.length-1]!=="/"&&o++,n=i.closeIndex)}}}function Gc(e,t,n){if(t&&typeof e=="string"){const r=e.trim();return r==="true"||r!=="false"&&(function(o){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s=Object.assign({},Qp,s),!o||typeof o!="string")return o;let u=o.trim();if(u.length===0||s.skipLike!==void 0&&s.skipLike.test(u))return o;if(u==="0")return 0;if(s.hex&&Jp.test(u))return(function(f){if(parseInt)return parseInt(f,16);if(Number.parseInt)return Number.parseInt(f,16);if(window&&window.parseInt)return window.parseInt(f,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(u);if(isFinite(u)){if(u.includes("e")||u.includes("E"))return(function(f,h,a){if(!a.eNotation)return f;const p=h.match(Zp);if(p){let d=p[1]||"";const I=p[3].indexOf("e")===-1?"E":"e",S=p[2],w=d?f[S.length+1]===I:f[S.length]===I;return S.length>1&&w?f:(S.length!==1||!p[3].startsWith(`.${I}`)&&p[3][0]!==I)&&S.length>0?a.leadingZeros&&!w?(h=(p[1]||"")+p[3],Number(h)):f:Number(h)}return f})(o,u,s);{const f=qp.exec(u);if(f){const h=f[1]||"",a=f[2];let p=((i=f[3])&&i.indexOf(".")!==-1&&((i=i.replace(/0+$/,""))==="."?i="0":i[0]==="."?i="0"+i:i[i.length-1]==="."&&(i=i.substring(0,i.length-1))),i);const d=h?o[a.length+1]===".":o[a.length]===".";if(!s.leadingZeros&&(a.length>1||a.length===1&&!d))return o;{const I=Number(u),S=String(I);if(I===0)return I;if(S.search(/[eE]/)!==-1)return s.eNotation?I:o;if(u.indexOf(".")!==-1)return S==="0"||S===p||S===`${h}${p}`?I:o;let w=a?p:u;return a?w===S||h+w===S?I:o:w===S||w===h+S?I:o}}return o}}var i;return(function(f,h,a){const p=h===1/0;switch(a.infinity.toLowerCase()){case"null":return null;case"infinity":return h;case"string":return p?"Infinity":"-Infinity";default:return f}})(o,Number(u),s)})(e,n)}return e!==void 0?e:""}function Ro(e,t,n,r){if(e){const o=e(t);n===t&&(n=o),t=o}return{tagName:t=Oc(t,r),tagExp:n}}function Oc(e,t){if(Tc.includes(e))throw new Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return hs.includes(e)?t.onDangerousProperty(e):e}const xo=Fe.getMetaDataSymbol();function wd(e,t){if(!e||typeof e!="object")return{};if(!t)return e;const n={};for(const r in e)r.startsWith(t)?n[r.substring(t.length)]=e[r]:n[r]=e[r];return n}function vd(e,t,n,r){return Vc(e,t,n,r)}function Vc(e,t,n,r){let o;const s={};for(let u=0;u<e.length;u++){const i=e[u],f=Ed(i);if(f!==void 0&&f!==t.textNodeName){const h=wd(i[":@"]||{},t.attributeNamePrefix);n.push(f,h)}if(f===t.textNodeName)o===void 0?o=i[f]:o+=""+i[f];else{if(f===void 0)continue;if(i[f]){let h=Vc(i[f],t,n,r);const a=Ad(h,t);if(i[":@"]?_d(h,i[":@"],r,t):Object.keys(h).length!==1||h[t.textNodeName]===void 0||t.alwaysCreateTextNode?Object.keys(h).length===0&&(t.alwaysCreateTextNode?h[t.textNodeName]="":h=""):h=h[t.textNodeName],i[xo]!==void 0&&typeof h=="object"&&h!==null&&(h[xo]=i[xo]),s[f]!==void 0&&Object.prototype.hasOwnProperty.call(s,f))Array.isArray(s[f])||(s[f]=[s[f]]),s[f].push(h);else{const p=t.jPath?r.toString():r;t.isArray(f,p,a)?s[f]=[h]:s[f]=h}f!==void 0&&f!==t.textNodeName&&n.pop()}}}return typeof o=="string"?o.length>0&&(s[t.textNodeName]=o):o!==void 0&&(s[t.textNodeName]=o),s}function Ed(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];if(r!==":@")return r}}function _d(e,t,n,r){if(t){const o=Object.keys(t),s=o.length;for(let u=0;u<s;u++){const i=o[u],f=i.startsWith(r.attributeNamePrefix)?i.substring(r.attributeNamePrefix.length):i,h=r.jPath?n.toString()+"."+f:n;r.isArray(i,h,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function Ad(e,t){const{textNodeName:n}=t,r=Object.keys(e).length;return r===0||!(r!==1||!e[n]&&typeof e[n]!="boolean"&&e[n]!==0)}const Sd={allowBooleanAttributes:!1,unpairedTags:[]};function Iu(e){return e===" "||e===" "||e===`
`||e==="\r"}function Ru(e,t){const n=t;for(;t<e.length;t++)if(!(e[t]!="?"&&e[t]!=" ")){const r=e.substr(n,t-n);if(t>5&&r==="xml")return Ht("InvalidXml","XML declaration allowed only at the start of the document.",fe(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}}return t}function xu(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t<e.length;t++)if(e[t]==="-"&&e[t+1]==="-"&&e[t+2]===">"){t+=2;break}}else if(e.length>t+8&&e[t+1]==="D"&&e[t+2]==="O"&&e[t+3]==="C"&&e[t+4]==="T"&&e[t+5]==="Y"&&e[t+6]==="P"&&e[t+7]==="E"){let n=1;for(t+=8;t<e.length;t++)if(e[t]==="<")n++;else if(e[t]===">"&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]==="["&&e[t+2]==="C"&&e[t+3]==="D"&&e[t+4]==="A"&&e[t+5]==="T"&&e[t+6]==="A"&&e[t+7]==="["){for(t+=8;t<e.length;t++)if(e[t]==="]"&&e[t+1]==="]"&&e[t+2]===">"){t+=2;break}}return t}function Nd(e,t){let n="",r="",o=!1;for(;t<e.length;t++){if(e[t]==='"'||e[t]==="'")r===""?r=e[t]:r!==e[t]||(r="");else if(e[t]===">"&&r===""){o=!0;break}n+=e[t]}return r===""&&{value:n,index:t,tagClosed:o}}const Id=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Pu(e,t){const n=Mc(e,Id),r={};for(let o=0;o<n.length;o++){if(n[o][1].length===0)return Ht("InvalidAttr","Attribute '"+n[o][2]+"' has no space in starting.",Nn(n[o]));if(n[o][3]!==void 0&&n[o][4]===void 0)return Ht("InvalidAttr","Attribute '"+n[o][2]+"' is without value.",Nn(n[o]));if(n[o][3]===void 0&&!t.allowBooleanAttributes)return Ht("InvalidAttr","boolean attribute '"+n[o][2]+"' is not allowed.",Nn(n[o]));const s=n[o][2];if(!xd(s))return Ht("InvalidAttr","Attribute '"+s+"' is an invalid name.",Nn(n[o]));if(Object.prototype.hasOwnProperty.call(r,s))return Ht("InvalidAttr","Attribute '"+s+"' is repeated.",Nn(n[o]));r[s]=1}return!0}function Rd(e,t){if(e[++t]===";")return-1;if(e[t]==="#")return(function(r,o){let s=/\d/;for(r[o]==="x"&&(o++,s=/[\da-fA-F]/);o<r.length;o++){if(r[o]===";")return o;if(!r[o].match(s))break}return-1})(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(e[t]===";")break;return-1}return t}function Ht(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function xd(e){return ar(e)}function fe(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function Nn(e){return e.startIndex+e[1].length}class zc{constructor(t){this.externalEntities={},this.options=Hp(t)}parse(t,n){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(n){n===!0&&(n={});const s=(function(u,i){i=Object.assign({},Sd,i);const f=[];let h=!1,a=!1;u[0]==="\uFEFF"&&(u=u.substr(1));for(let p=0;p<u.length;p++)if(u[p]==="<"&&u[p+1]==="?"){if(p+=2,p=Ru(u,p),p.err)return p}else{if(u[p]!=="<"){if(Iu(u[p]))continue;return Ht("InvalidChar","char '"+u[p]+"' is not expected.",fe(u,p))}{let d=p;if(p++,u[p]==="!"){p=xu(u,p);continue}{let I=!1;u[p]==="/"&&(I=!0,p++);let S="";for(;p<u.length&&u[p]!==">"&&u[p]!==" "&&u[p]!==" "&&u[p]!==`
`&&u[p]!=="\r";p++)S+=u[p];if(S=S.trim(),S[S.length-1]==="/"&&(S=S.substring(0,S.length-1),p--),!ar(S)){let v;return v=S.trim().length===0?"Invalid space after '<'.":"Tag '"+S+"' is an invalid name.",Ht("InvalidTag",v,fe(u,p))}const w=Nd(u,p);if(w===!1)return Ht("InvalidAttr","Attributes for '"+S+"' have open quote.",fe(u,p));let R=w.value;if(p=w.index,R[R.length-1]==="/"){const v=p-R.length;R=R.substring(0,R.length-1);const E=Pu(R,i);if(E!==!0)return Ht(E.err.code,E.err.msg,fe(u,v+E.err.line));h=!0}else if(I){if(!w.tagClosed)return Ht("InvalidTag","Closing tag '"+S+"' doesn't have proper closing.",fe(u,p));if(R.trim().length>0)return Ht("InvalidTag","Closing tag '"+S+"' can't have attributes or invalid starting.",fe(u,d));if(f.length===0)return Ht("InvalidTag","Closing tag '"+S+"' has not been opened.",fe(u,d));{const v=f.pop();if(S!==v.tagName){let E=fe(u,v.tagStartPos);return Ht("InvalidTag","Expected closing tag '"+v.tagName+"' (opened in line "+E.line+", col "+E.col+") instead of closing tag '"+S+"'.",fe(u,d))}f.length==0&&(a=!0)}}else{const v=Pu(R,i);if(v!==!0)return Ht(v.err.code,v.err.msg,fe(u,p-R.length+v.err.line));if(a===!0)return Ht("InvalidXml","Multiple possible root nodes found.",fe(u,p));i.unpairedTags.indexOf(S)!==-1||f.push({tagName:S,tagStartPos:d}),h=!0}for(p++;p<u.length;p++)if(u[p]==="<"){if(u[p+1]==="!"){p++,p=xu(u,p);continue}if(u[p+1]!=="?")break;if(p=Ru(u,++p),p.err)return p}else if(u[p]==="&"){const v=Rd(u,p);if(v==-1)return Ht("InvalidChar","char '&' is not expected.",fe(u,p));p=v}else if(a===!0&&!Iu(u[p]))return Ht("InvalidXml","Extra text at the end",fe(u,p));u[p]==="<"&&p--}}}return h?f.length==1?Ht("InvalidTag","Unclosed tag '"+f[0].tagName+"'.",fe(u,f[0].tagStartPos)):!(f.length>0)||Ht("InvalidXml","Invalid '"+JSON.stringify(f.map((p=>p.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):Ht("InvalidXml","Start tag expected.",1)})(t,n);if(s!==!0)throw Error(`${s.err.msg}:${s.err.line}:${s.err.col}`)}const r=new id(this.options,this.externalEntities),o=r.parseXml(t);return this.options.preserveOrder||o===void 0?o:vd(o,this.options,r.matcher,r.readonlyMatcher)}addEntity(t,n){if(n.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(n==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=n}static getMetaDataSymbol(){return Fe.getMetaDataSymbol()}}var Pd=kt(829),Me=kt.n(Pd),sn=(function(e){return e.Array="array",e.Object="object",e.Original="original",e})(sn||{});function Cu(e){return typeof e=="string"?e:e.toString(".",!1)}function Wc(e,t){if(!e.endsWith("propstat.prop.displayname"))return t}function Yn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sn.Original;const r=Me().get(e,t);return n==="array"&&Array.isArray(r)===!1?[r]:n==="object"&&Array.isArray(r)?r[0]:r}function ir(e,t){return t=t??{attributeNamePrefix:"@",attributeParsers:[],tagParsers:[Wc]},new Promise((n=>{n((function(r){const{multistatus:o}=r;if(o==="")return{multistatus:{response:[]}};if(!o)throw new Error("Invalid response: No root multistatus found");const s={multistatus:Array.isArray(o)?o[0]:o};return Me().set(s,"multistatus.response",Yn(s,"multistatus.response",sn.Array)),Me().set(s,"multistatus.response",Me().get(s,"multistatus.response").map((u=>(function(i){const f=Object.assign({},i);return f.status?Me().set(f,"status",Yn(f,"status",sn.Object)):(Me().set(f,"propstat",Yn(f,"propstat",sn.Object)),Me().set(f,"propstat.prop",Yn(f,"propstat.prop",sn.Object))),f})(u)))),s})((function(r){let{attributeNamePrefix:o,attributeParsers:s,entityDecoder:u,tagParsers:i}=r;const f={allowBooleanAttributes:!0,attributeNamePrefix:o,textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,jPath:!1,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(h,a,p){const d=Cu(p);for(const I of s)try{const S=I(d,a);if(S!==a)return S}catch{}return a},tagValueProcessor(h,a,p){const d=Cu(p);for(const I of i)try{const S=I(d,a);if(S!==a)return S}catch{}return a}};return u&&(f.entityDecoder=new Fc({limit:{maxTotalExpansions:u.limit?.maxTotalExpansions??0,maxExpandedLength:u.limit?.maxExpandedLength??0}})),new zc(f)})(t).parse(e)))}))}function ds(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:r=null,getcontentlength:o="0",resourcetype:s=null,getcontenttype:u=null,getetag:i=null}=e,f=s&&typeof s=="object"&&s.collection!==void 0?"directory":"file",h={filename:t,basename:qn().basename(t),lastmod:r,size:parseInt(o,10),type:f,etag:typeof i=="string"?i.replace(/"/g,""):null};return f==="file"&&(h.mime=u&&typeof u=="string"?u.split(";")[0]:""),n&&(e.displayname!==void 0&&(e.displayname=String(e.displayname)),h.props=e),h}function Cd(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=null;try{e.multistatus.response[0].propstat&&(r=e.multistatus.response[0])}catch{}if(!r)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:o,status:s}}=r,[u,i,f]=s.split(" ",3),h=parseInt(i,10);if(h>=400){const a=new Error(`Invalid response: ${h} ${f}`);throw a.status=h,a}return ds(o,Cn(t),n)}function Ld(e){switch(String(e)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(e),10)}}function Po(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const gs=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:r=!1}=n,o=te({url:zt(e.remoteURL,Vt(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,n);return Po(Kt(o,e),(function(s){return ee(e,s),Po(s.text(),(function(u){return Po(ir(u,e.parsing),(function(i){const f=Cd(i,t,r);return gn(s,f,r)}))}))}))}));function Yc(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Bd=Hc((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=(function(s){if(!s||s==="/")return[];let u=s;const i=[];do i.push(u),u=qn().dirname(u);while(u&&u!=="/");return i})(Cn(t));r.sort(((s,u)=>s.length>u.length?1:u.length>s.length?-1:0));let o=!1;return(function(s,u,i){if(typeof s[Bu]=="function"){let w=function(R){try{for(;!(f=p.next()).done;)if((R=u(f.value))&&R.then){if(!ju(R))return void R.then(w,a||(a=he.bind(null,h=new an,2)));R=R.v}h?he(h,1,R):h=R}catch(v){he(h||(h=new an),2,v)}};var f,h,a,p=s[Bu]();if(w(),p.return){var d=function(R){try{f.done||p.return()}catch{}return R};if(h&&h.then)return h.then(d,(function(R){throw d(R)}));d()}return h}if(!("length"in s))throw new TypeError("Object is not iterable");for(var I=[],S=0;S<s.length;S++)I.push(s[S]);return(function(w,R,v){var E,x,N=-1;return(function P(M){try{for(;++N<w.length&&(!v||!v());)if((M=R(N))&&M.then){if(!ju(M))return void M.then(P,x||(x=he.bind(null,E=new an,2)));M=M.v}E?he(E,1,M):E=M}catch(F){he(E||(E=new an),2,F)}})(),E})(I,(function(w){return u(I[w])}),i)})(r,(function(s){return u=function(){return(function(f,h){try{var a=Yc(gs(e,s),(function(p){if(p.type!=="directory")throw new Error(`Path includes a file: ${t}`)}))}catch(p){return h(p)}return a&&a.then?a.then(void 0,h):a})(0,(function(f){const h=f;return(function(){if(h.status===404)return o=!0,Lu(Yo(e,s,{...n,recursive:!1}));throw f})()}))},(i=(function(){if(o)return Lu(Yo(e,s,{...n,recursive:!1}))})())&&i.then?i.then(u):u();var u,i}),(function(){return!1}))}));function Hc(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}}function jd(){}function Lu(e,t){return e&&e.then?e.then(jd):Promise.resolve()}const Bu=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function he(e,t,n){if(!e.s){if(n instanceof an){if(!n.s)return void(n.o=he.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(he.bind(null,e,t),he.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}const an=(function(){function e(){}return e.prototype.then=function(t,n){const r=new e,o=this.s;if(o){const s=1&o?t:n;if(s){try{he(r,1,s(this.v))}catch(u){he(r,2,u)}return r}return this}return this.o=function(s){try{const u=s.v;1&s.s?he(r,1,t?t(u):u):n?he(r,1,n(u)):he(r,2,u)}catch(u){he(r,2,u)}},r},e})();function ju(e){return e instanceof an&&1&e.s}const Yo=Hc((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(n.recursive===!0)return Bd(e,t,n);const r=te({url:zt(e.remoteURL,(o=Vt(t),o.endsWith("/")?o:o+"/")),method:"MKCOL"},e,n);var o;return Yc(Kt(r,e),(function(s){ee(e,s)}))}));var Dd=kt(388),Du=kt.n(Dd);const Md=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r={};if(typeof n.range=="object"&&typeof n.range.start=="number"){let i=`bytes=${n.range.start}-`;typeof n.range.end=="number"&&(i=`${i}${n.range.end}`),r.Range=i}const o=te({url:zt(e.remoteURL,Vt(t)),method:"GET",headers:r},e,n);return u=function(i){if(ee(e,i),r.Range&&i.status!==206){const f=new Error(`Invalid response code for partial request: ${i.status}`);throw f.status=i.status,f}return n.callback&&setTimeout((()=>{n.callback(i)}),0),i.body},(s=Kt(o,e))&&s.then||(s=Promise.resolve(s)),u?s.then(u):s;var s,u})),Td=()=>{},Ud=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(e,t,n){n.url||(n.url=zt(e.remoteURL,Vt(t)));const r=te(n,e,{});return s=function(u){return ee(e,u),u},(o=Kt(r,e))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s})),kd=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=te({url:zt(e.remoteURL,Vt(t)),method:"DELETE"},e,n);return s=function(u){ee(e,u)},(o=Kt(r,e))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s})),$d=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(r,o){try{var s=(u=gs(e,t,n),i=function(){return!0},f?i?i(u):u:(u&&u.then||(u=Promise.resolve(u)),i?u.then(i):u))}catch(h){return o(h)}var u,i,f;return s&&s.then?s.then(void 0,o):s})(0,(function(r){if(r.status===404)return!1;throw r}))}));function Co(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Fd=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=te({url:zt(e.remoteURL,Vt(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:n.deep?"infinity":"1"}},e,n);return Co(Kt(r,e),(function(o){return ee(e,o),Co(o.text(),(function(s){if(!s)throw new Error("Failed parsing directory contents: Empty response");return Co(ir(s,e.parsing),(function(u){const i=lu(t);let f=(function(h,a,p){let d=arguments.length>3&&arguments[3]!==void 0&&arguments[3],I=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const S=qn().join(a,"/"),{multistatus:{response:w}}=h,R=w.map((v=>{const E=(function(N){try{return N.replace(/^https?:\/\/[^\/]+/,"")}catch(P){throw new pe(P,"Failed normalising HREF")}})(v.href),{propstat:{prop:x}}=v;return ds(x,S==="/"?decodeURIComponent(Cn(E)):Cn(qn().relative(decodeURIComponent(S),decodeURIComponent(E))),d)}));return I?R:R.filter((v=>v.basename&&(v.type==="file"||v.filename!==p.replace(/\/$/,""))))})(u,lu(e.remoteBasePath||e.remotePath),i,n.details,n.includeSelf);return n.glob&&(f=(function(h,a){return h.filter((p=>ce(p.filename,a,{matchBase:!0})))})(f,n.glob)),gn(o,f,n.details)}))}))}))}));function ms(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}}const Gd=ms((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=te({url:zt(e.remoteURL,Vt(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[zd]},e,n);return er(Kt(r,e),(function(o){return ee(e,o),er(o.text(),(function(s){return gn(o,s,n.details)}))}))}));function er(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Od=ms((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=te({url:zt(e.remoteURL,Vt(t)),method:"GET"},e,n);return er(Kt(r,e),(function(o){let s;return ee(e,o),(function(u,i){var f=u();return f&&f.then?f.then(i):i()})((function(){return er(o.arrayBuffer(),(function(u){s=u}))}),(function(){return gn(o,s,n.details)}))}))})),Vd=ms((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:r="binary"}=n;if(r!=="binary"&&r!=="text")throw new pe({info:{code:Ve.InvalidOutputFormat}},`Invalid output format: ${r}`);return r==="text"?Gd(e,t,n):Od(e,t,n)})),zd=e=>e;function Wd(e,t){let n="";t.format&&t.indentBy.length>0&&(n=`
`);const r=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let o=0;o<t.stopNodes.length;o++){const s=t.stopNodes[o];typeof s=="string"?r.push(new hn(s)):s instanceof hn&&r.push(s)}return Xc(e,t,n,new ps,r)}function Xc(e,t,n,r,o){let s="",u=!1;if(t.maxNestedTags&&r.getDepth()>t.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(e)){if(e!=null){let i=e.toString();return i=Ho(i,t),i}return""}for(let i=0;i<e.length;i++){const f=e[i],h=qc(f);if(h===void 0)continue;const a=Yd(f[":@"],t);r.push(h,a);const p=Xd(r,o);if(h===t.textNodeName){let w=f[h];p||(w=t.tagValueProcessor(h,w),w=Ho(w,t)),u&&(s+=n),s+=w,u=!1,r.pop();continue}if(h===t.cdataPropName){u&&(s+=n);const w=f[h][0][t.textNodeName];s+=`<![CDATA[${String(w).replace(/\]\]>/g,"]]]]><![CDATA[>")}]]>`,u=!1,r.pop();continue}if(h===t.commentPropName){const w=f[h][0][t.textNodeName];s+=n+`<!--${String(w).replace(/--/g,"- -").replace(/-$/,"- ")}-->`,u=!0,r.pop();continue}if(h[0]==="?"){const w=Mu(f[":@"],t,p),R=h==="?xml"?"":n;let v=f[h][0][t.textNodeName];v=v.length!==0?" "+v:"",s+=R+`<${h}${v}${w}?>`,u=!0,r.pop();continue}let d=n;d!==""&&(d+=t.indentBy);const I=n+`<${h}${Mu(f[":@"],t,p)}`;let S;S=p?Jc(f[h],t):Xc(f[h],t,d,r,o),t.unpairedTags.indexOf(h)!==-1?t.suppressUnpairedNode?s+=I+">":s+=I+"/>":S&&S.length!==0||!t.suppressEmptyNode?S&&S.endsWith(">")?s+=I+`>${S}${n}</${h}>`:(s+=I+">",S&&n!==""&&(S.includes("/>")||S.includes("</"))?s+=n+t.indentBy+S+n:s+=S,s+=`</${h}>`):s+=I+"/>",u=!0,r.pop()}return s}function Yd(e,t){if(!e||t.ignoreAttributes)return null;const n={};let r=!1;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o.startsWith(t.attributeNamePrefix)?o.substr(t.attributeNamePrefix.length):o]=e[o],r=!0);return r?n:null}function Jc(e,t){if(!Array.isArray(e))return e!=null?e.toString():"";let n="";for(let r=0;r<e.length;r++){const o=e[r],s=qc(o);if(s===t.textNodeName)n+=o[s];else if(s===t.cdataPropName)n+=o[s][0][t.textNodeName];else if(s===t.commentPropName)n+=o[s][0][t.textNodeName];else{if(s&&s[0]==="?")continue;if(s){const u=Hd(o[":@"],t),i=Jc(o[s],t);i&&i.length!==0?n+=`<${s}${u}>${i}</${s}>`:n+=`<${s}${u}/>`}}}return n}function Hd(e,t){let n="";if(e&&!t.ignoreAttributes)for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let o=e[r];o===!0&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${o}"`}return n}function qc(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];if(Object.prototype.hasOwnProperty.call(e,r)&&r!==":@")return r}}function Mu(e,t,n){let r="";if(e&&!t.ignoreAttributes)for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;let s;n?s=e[o]:(s=t.attributeValueProcessor(o,e[o]),s=Ho(s,t)),s===!0&&t.suppressBooleanAttributes?r+=` ${o.substr(t.attributeNamePrefix.length)}`:r+=` ${o.substr(t.attributeNamePrefix.length)}="${s}"`}return r}function Xd(e,t){if(!t||t.length===0)return!1;for(let n=0;n<t.length;n++)if(e.matches(t[n]))return!0;return!1}function Ho(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const r=t.entities[n];e=e.replace(r.regex,r.val)}return e}const Jd={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function Se(e){if(this.options=Object.assign({},Jd,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map((n=>typeof n=="string"&&n.startsWith("*.")?".."+n.substring(2):n))),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let n=0;n<this.options.stopNodes.length;n++){const r=this.options.stopNodes[n];typeof r=="string"?this.stopNodeExpressions.push(new hn(r)):r instanceof hn&&this.stopNodeExpressions.push(r)}var t;this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=typeof(t=this.options.ignoreAttributes)=="function"?t:Array.isArray(t)?n=>{for(const r of t)if(typeof r=="string"&&n===r||r instanceof RegExp&&r.test(n))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Zd),this.processTextOrObjNode=qd,this.options.format?(this.indentate=Qd,this.tagEndChar=`>
`,this.newLine=`
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function qd(e,t,n,r){const o=this.extractAttributes(e);if(r.push(t,o),this.checkStopNode(r)){const u=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);return r.pop(),this.buildObjectNode(u,t,i,n)}const s=this.j2x(e,n+1,r);return r.pop(),e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,s.attrStr,n,r):this.buildObjectNode(s.val,t,s.attrStr,n)}function Qd(e){return this.options.indentBy.repeat(e)}function Zd(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}Se.prototype.build=function(e){if(this.options.preserveOrder)return Wd(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});const t=new ps;return this.j2x(e,0,t).val}},Se.prototype.j2x=function(e,t,n){let r="",o="";if(this.options.maxNestedTags&&n.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const s=this.options.jPath?n.toString():n,u=this.checkStopNode(n);for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i))if(e[i]===void 0)this.isAttribute(i)&&(o+="");else if(e[i]===null)this.isAttribute(i)||i===this.options.cdataPropName?o+="":i[0]==="?"?o+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)o+=this.buildTextValNode(e[i],i,"",t,n);else if(typeof e[i]!="object"){const f=this.isAttribute(i);if(f&&!this.ignoreAttributesFn(f,s))r+=this.buildAttrPairStr(f,""+e[i],u);else if(!f)if(i===this.options.textNodeName){let h=this.options.tagValueProcessor(i,""+e[i]);o+=this.replaceEntitiesValue(h)}else{n.push(i);const h=this.checkStopNode(n);if(n.pop(),h){const a=""+e[i];o+=a===""?this.indentate(t)+"<"+i+this.closeTag(i)+this.tagEndChar:this.indentate(t)+"<"+i+">"+a+"</"+i+this.tagEndChar}else o+=this.buildTextValNode(e[i],i,"",t,n)}}else if(Array.isArray(e[i])){const f=e[i].length;let h="",a="";for(let p=0;p<f;p++){const d=e[i][p];if(d!==void 0)if(d===null)i[0]==="?"?o+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(typeof d=="object")if(this.options.oneListGroup){n.push(i);const I=this.j2x(d,t+1,n);n.pop(),h+=I.val,this.options.attributesGroupName&&d.hasOwnProperty(this.options.attributesGroupName)&&(a+=I.attrStr)}else h+=this.processTextOrObjNode(d,i,t,n);else if(this.options.oneListGroup){let I=this.options.tagValueProcessor(i,d);I=this.replaceEntitiesValue(I),h+=I}else{n.push(i);const I=this.checkStopNode(n);if(n.pop(),I){const S=""+d;h+=S===""?this.indentate(t)+"<"+i+this.closeTag(i)+this.tagEndChar:this.indentate(t)+"<"+i+">"+S+"</"+i+this.tagEndChar}else h+=this.buildTextValNode(d,i,"",t,n)}}this.options.oneListGroup&&(h=this.buildObjectNode(h,i,a,t)),o+=h}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const f=Object.keys(e[i]),h=f.length;for(let a=0;a<h;a++)r+=this.buildAttrPairStr(f[a],""+e[i][f[a]],u)}else o+=this.processTextOrObjNode(e[i],i,t,n);return{attrStr:r,val:o}},Se.prototype.buildAttrPairStr=function(e,t,n){return n||(t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&t==="true"?" "+e:" "+e+'="'+t+'"'},Se.prototype.extractAttributes=function(e){if(!e||typeof e!="object")return null;const t={};let n=!1;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){const r=e[this.options.attributesGroupName];for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o.startsWith(this.options.attributeNamePrefix)?o.substring(this.options.attributeNamePrefix.length):o]=r[o],n=!0)}else for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const o=this.isAttribute(r);o&&(t[o]=e[r],n=!0)}return n?t:null},Se.prototype.buildRawContent=function(e){if(typeof e=="string")return e;if(typeof e!="object"||e===null)return String(e);if(e[this.options.textNodeName]!==void 0)return e[this.options.textNodeName];let t="";for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||this.isAttribute(n)||this.options.attributesGroupName&&n===this.options.attributesGroupName)continue;const r=e[n];if(n===this.options.textNodeName)t+=r;else if(Array.isArray(r)){for(let o of r)if(typeof o=="string"||typeof o=="number")t+=`<${n}>${o}</${n}>`;else if(typeof o=="object"&&o!==null){const s=this.buildRawContent(o),u=this.buildAttributesForStopNode(o);t+=s===""?`<${n}${u}/>`:`<${n}${u}>${s}</${n}>`}}else if(typeof r=="object"&&r!==null){const o=this.buildRawContent(r),s=this.buildAttributesForStopNode(r);t+=o===""?`<${n}${s}/>`:`<${n}${s}>${o}</${n}>`}else t+=`<${n}>${r}</${n}>`}return t},Se.prototype.buildAttributesForStopNode=function(e){if(!e||typeof e!="object")return"";let t="";if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){const n=e[this.options.attributesGroupName];for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r))continue;const o=r.startsWith(this.options.attributeNamePrefix)?r.substring(this.options.attributeNamePrefix.length):r,s=n[r];s===!0&&this.options.suppressBooleanAttributes?t+=" "+o:t+=" "+o+'="'+s+'"'}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const r=this.isAttribute(n);if(r){const o=e[n];o===!0&&this.options.suppressBooleanAttributes?t+=" "+r:t+=" "+r+'="'+o+'"'}}return t},Se.prototype.buildObjectNode=function(e,t,n,r){if(e==="")return t[0]==="?"?this.indentate(r)+"<"+t+n+"?"+this.tagEndChar:this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,s="";return t[0]==="?"&&(s="?",o=""),!n&&n!==""||e.indexOf("<")!==-1?this.options.commentPropName!==!1&&t===this.options.commentPropName&&s.length===0?this.indentate(r)+`<!--${e}-->`+this.newLine:this.indentate(r)+"<"+t+n+s+this.tagEndChar+e+this.indentate(r)+o:this.indentate(r)+"<"+t+n+s+">"+e+o}},Se.prototype.closeTag=function(e){let t="";return this.options.unpairedTags.indexOf(e)!==-1?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},Se.prototype.checkStopNode=function(e){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(e.matches(this.stopNodeExpressions[t]))return!0;return!1},Se.prototype.buildTextValNode=function(e,t,n,r,o){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName){const s=String(e).replace(/\]\]>/g,"]]]]><![CDATA[>");return this.indentate(r)+`<![CDATA[${s}]]>`+this.newLine}if(this.options.commentPropName!==!1&&t===this.options.commentPropName){const s=String(e).replace(/--/g,"- -").replace(/-$/,"- ");return this.indentate(r)+`<!--${s}-->`+this.newLine}if(t[0]==="?")return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(t,e);return s=this.replaceEntitiesValue(s),s===""?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+s+"</"+t+this.tagEndChar}},Se.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e};const Kd=Se;function tg(e){return new Kd({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(Qc({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},"d"))}function Qc(e,t){const n={...e};for(const r in n)n.hasOwnProperty(r)&&(n[r]&&typeof n[r]=="object"&&r.indexOf(":")===-1?(n[`${t}:${r}`]=Qc(n[r],t),delete n[r]):/^@_/.test(r)===!1&&(n[`${t}:${r}`]=n[r],delete n[r]));return n}function Xo(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Zc(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}}const eg=Zc((function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=te({url:zt(e.remoteURL,Vt(t)),method:"UNLOCK",headers:{"Lock-Token":n}},e,r);return Xo(Kt(o,e),(function(s){if(ee(e,s),s.status!==204&&s.status!==200)throw fs(s)}))})),ng=Zc((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:r,timeout:o=rg}=n,s={Accept:"text/plain,application/xml",Timeout:o};r&&(s.If=r);const u=te({url:zt(e.remoteURL,Vt(t)),method:"LOCK",headers:s,data:tg(e.contactHref)},e,n);return Xo(Kt(u,e),(function(i){return ee(e,i),Xo(i.text(),(function(f){const h=(d=f,new zc({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(d)),a=Me().get(h,"prop.lockdiscovery.activelock.locktoken.href"),p=Me().get(h,"prop.lockdiscovery.activelock.timeout");var d;if(!a)throw fs(i,"No lock token received: ");return{token:a,serverTimeout:p}}))}))})),rg="Infinite, Second-4100000000";function Lo(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const og=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=t.path||"/",r=te({url:zt(e.remoteURL,n),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,t);return Lo(Kt(r,e),(function(o){return ee(e,o),Lo(o.text(),(function(s){return Lo(ir(s,e.parsing),(function(u){const i=(function(f){try{const[h]=f.multistatus.response,{propstat:{prop:{"quota-used-bytes":a,"quota-available-bytes":p}}}=h;return a!==void 0&&p!==void 0?{used:parseInt(String(a),10),available:Ld(p)}:null}catch{}return null})(u);return gn(o,i,t.details)}))}))}))}));function Bo(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const sg=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:r=!1}=n,o=te({url:zt(e.remoteURL,Vt(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":e.headers["Content-Type"]||"application/xml; charset=utf-8"}},e,n);return Bo(Kt(o,e),(function(s){return ee(e,s),Bo(s.text(),(function(u){return Bo(ir(u,e.parsing),(function(i){const f=(function(h,a,p){const d={truncated:!1,results:[]};return d.truncated=h.multistatus.response.some((I=>(I.status||I.propstat?.status).split(" ",3)?.[1]==="507"&&I.href.replace(/\/$/,"").endsWith(Vt(a).replace(/\/$/,"")))),h.multistatus.response.forEach((I=>{if(I.propstat===void 0)return;const S=I.href.split("/").map(decodeURIComponent).join("/");d.results.push(ds(I.propstat.prop,S,p))})),d})(i,t,r);return gn(s,f,r)}))}))}))})),ag=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=te({url:zt(e.remoteURL,Vt(t)),method:"MOVE",headers:{Destination:zt(e.remoteURL,Vt(n)),Overwrite:r.overwrite===!1?"F":"T"}},e,r);return u=function(i){ee(e,i)},(s=Kt(o,e))&&s.then||(s=Promise.resolve(s)),u?s.then(u):s;var s,u}));var ig=kt(172);function ug(e){if(xc(e))return e.byteLength;if(Pc(e))return e.length;if(typeof e=="string")return(0,ig.d)(e);throw new pe({info:{code:Ve.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}const cg=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:o=!0,overwrite:s=!0}=r,u={"Content-Type":"application/octet-stream"};o===!1||(u["Content-Length"]=typeof o=="number"?`${o}`:`${ug(n)}`),s||(u["If-None-Match"]="*");const i=te({url:zt(e.remoteURL,Vt(t)),method:"PUT",headers:u,data:n},e,r);return h=function(a){try{ee(e,a)}catch(p){const d=p;if(d.status!==412||s)throw d;return!1}return!0},(f=Kt(i,e))&&f.then||(f=Promise.resolve(f)),h?f.then(h):f;var f,h})),Kc=(function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=te({url:zt(e.remoteURL,Vt(t)),method:"OPTIONS"},e,n);return s=function(u){try{ee(e,u)}catch(i){throw i}return{compliance:(u.headers.get("DAV")??"").split(",").map((i=>i.trim())),server:u.headers.get("Server")??""}},(o=Kt(r,e))&&o.then||(o=Promise.resolve(o)),s?o.then(s):o;var o,s}));function Pn(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const lg=ys((function(e,t,n,r,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>r||n<0)throw new pe({info:{code:Ve.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const u={"Content-Type":"application/octet-stream","Content-Length":""+(r-n+1),"Content-Range":`bytes ${n}-${r}/*`},i=te({url:zt(e.remoteURL,Vt(t)),method:"PUT",headers:u,data:o},e,s);return Pn(Kt(i,e),(function(f){ee(e,f)}))}));function Tu(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const fg=ys((function(e,t,n,r,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>r||n<0)throw new pe({info:{code:Ve.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);const u={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(r-n+1),"X-Update-Range":`bytes=${n}-${r}`},i=te({url:zt(e.remoteURL,Vt(t)),method:"PATCH",headers:u,data:o},e,s);return Pn(Kt(i,e),(function(f){ee(e,f)}))}));function ys(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(r){return Promise.reject(r)}}}const hg=ys((function(e,t,n,r,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return Pn(Kc(e,t,s),(function(u){let i=!1;return Tu((function(){if(u.compliance.includes("sabredav-partialupdate"))return Pn(fg(e,t,n,r,o,s),(function(f){return i=!0,f}))}),(function(f){let h=!1;return i?f:Tu((function(){if(u.server.includes("Apache")&&u.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return Pn(lg(e,t,n,r,o,s),(function(a){return h=!0,a}))}),(function(a){if(h)return a;throw new pe({info:{code:Ve.NotSupported}},"Not supported")}))}))}))})),pg="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function dg(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:n=null,remoteBasePath:r,contactHref:o=pg,entityDecoder:s,ha1:u,headers:i={},httpAgent:f,httpsAgent:h,password:a,token:p,username:d,withCredentials:I}=t;let S=n;S||(S=d||a?ye.Password:ye.None);const w={authType:S,remoteBasePath:r,contactHref:o,ha1:u,headers:Object.assign({},i),httpAgent:f,httpsAgent:h,password:a,parsing:{attributeNamePrefix:t.attributeNamePrefix??"@",attributeParsers:[],entityDecoder:s,tagParsers:[Wc]},remotePath:sp(e),remoteURL:e,token:p,username:d,withCredentials:I};return Nc(w,d,a,p,u),{copyFile:(R,v,E)=>Vp(w,R,v,E),createDirectory:(R,v)=>Yo(w,R,v),createReadStream:(R,v)=>(function(E,x){let N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const P=new(Du()).PassThrough;return Md(E,x,N).then((M=>{M.pipe(P)})).catch((M=>{P.emit("error",M)})),P})(w,R,v),createWriteStream:(R,v,E)=>(function(x,N){let P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Td;const F=new(Du()).PassThrough,O={};P.overwrite===!1&&(O["If-None-Match"]="*");const q=te({url:zt(x.remoteURL,Vt(N)),method:"PUT",headers:O,data:F,maxRedirects:0},x,P);return Kt(q,x).then((j=>ee(x,j))).then((j=>{setTimeout((()=>{M(j)}),0)})).catch((j=>{F.emit("error",j)})),F})(w,R,v,E),customRequest:(R,v)=>Ud(w,R,v),deleteFile:(R,v)=>kd(w,R,v),exists:(R,v)=>$d(w,R,v),getDirectoryContents:(R,v)=>Fd(w,R,v),getFileContents:(R,v)=>Vd(w,R,v),getFileDownloadLink:R=>(function(v,E){let x=zt(v.remoteURL,Vt(E));const N=/^https:/i.test(x)?"https":"http";switch(v.authType){case ye.None:break;case ye.Password:{const P=hu(v.headers.Authorization.replace(/^Basic /i,"").trim());x=x.replace(/^https?:\/\//,`${N}://${P}@`);break}default:throw new pe({info:{code:Ve.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${v.authType}`)}return x})(w,R),getFileUploadLink:R=>(function(v,E){let x=`${zt(v.remoteURL,Vt(E))}?Content-Type=application/octet-stream`;const N=/^https:/i.test(x)?"https":"http";switch(v.authType){case ye.None:break;case ye.Password:{const P=hu(v.headers.Authorization.replace(/^Basic /i,"").trim());x=x.replace(/^https?:\/\//,`${N}://${P}@`);break}default:throw new pe({info:{code:Ve.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${v.authType}`)}return x})(w,R),getHeaders:()=>Object.assign({},w.headers),getQuota:R=>og(w,R),lock:(R,v)=>ng(w,R,v),moveFile:(R,v,E)=>ag(w,R,v,E),putFileContents:(R,v,E)=>cg(w,R,v,E),partialUpdateFileContents:(R,v,E,x,N)=>hg(w,R,v,E,x,N),getDAVCompliance:R=>Kc(w,R),search:(R,v)=>sg(w,R,v),setHeaders:R=>{w.headers=Object.assign({},R)},stat:(R,v)=>gs(w,R,v),unlock:(R,v,E)=>eg(w,R,v,E),registerAttributeParser:R=>{w.parsing.attributeParsers.push(R)},registerTagParser:R=>{w.parsing.tagParsers.push(R)}}}function gg(e=""){let t=Ee.NONE;return e&&(e.includes("G")&&(t|=Ee.READ),e.includes("W")&&(t|=Ee.WRITE),e.includes("CK")&&(t|=Ee.CREATE),e.includes("NV")&&(t|=Ee.UPDATE),e.includes("D")&&(t|=Ee.DELETE),e.includes("R")&&(t|=Ee.SHARE)),t}const tl=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],el={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};function mg(e,t={nc:"http://nextcloud.org/ns"}){Ot.davNamespaces??={...el},Ot.davProperties??=[...tl];const n={...Ot.davNamespaces,...t};if(Ot.davProperties.find(o=>o===e))return Ge.warn(`${e} already registered`,{prop:e}),!1;if(e.startsWith("<")||e.split(":").length!==2)return Ge.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1;const r=e.split(":")[0];return n[r]?(Ot.davProperties.push(e),Ot.davNamespaces=n,!0):(Ge.error(`${e} namespace unknown`,{prop:e,namespaces:n}),!1)}function yg(){return Ot.davProperties??=[...tl],Ot.davProperties.map(e=>`<${e} />`).join(" ")}function bg(){return Ot.davNamespaces??={...el},Object.keys(Ot.davNamespaces).map(e=>`xmlns:${e}="${Ot.davNamespaces?.[e]}"`).join(" ")}function wg(){return is()?`/files/${tp()}`:`/files/${Ko()?.uid}`}const vg=wg();function Eg(){const e=kl("dav");return is()?e.replace("remote.php","public.php"):e}const nl=Eg();function _g(e=nl,t={}){const n=dg(e,{headers:t});function r(o){n.setHeaders({...t,"X-Requested-With":"XMLHttpRequest",requesttoken:o??""})}return Yl(r),r(zl()),Ic().patch("fetch",(o,s)=>{const u=s.headers;return u?.method&&(s.method=u.method,delete u.method),fetch(o,s)}),n}function Ag(e,t=vg,n=nl){let r=Ko()?.uid;if(is())r=r??"anonymous";else if(!r)throw new Error("No user id found");const o=e.props,s=gg(o?.permissions),u=String(o?.["owner-id"]||r),i=o.fileid||0,f=new Date(Date.parse(e.lastmod)),h=new Date(Date.parse(o.creationdate)),a={id:i,source:`${n}${e.filename}`,mtime:!isNaN(f.getTime())&&f.getTime()!==0?f:void 0,crtime:!isNaN(h.getTime())&&h.getTime()!==0?h:void 0,mime:e.mime||"application/octet-stream",displayname:o.displayname!==void 0?String(o.displayname):void 0,size:o?.size||Number.parseInt(o.getcontentlength||"0"),status:i<0?qu.FAILED:void 0,permissions:s,owner:u,root:t,attributes:{...e,...o,hasPreview:o?.["has-preview"]}};return delete a.attributes?.props,e.type==="file"?new nf(a):new rf(a)}const Jo="korean-comments-only",jo="korean_comments_action-comments-tab",Sg='<svg data-comment-state="empty" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" fill="none" stroke="currentColor" stroke-width="2"/></svg>',bs='<svg data-comment-state="has-comments" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" fill="none" stroke="currentColor" stroke-width="2"/><circle cx="8" cy="12" r="1.4"/><circle cx="12" cy="12" r="1.4"/><circle cx="16" cy="12" r="1.4"/></svg>';function rl(){return as("comments","activityEnabled",null)!==null}function Uu(e){const t=e.nodes[0]?.attributes?.["comments-count"];if(typeof t=="number")return t;if(typeof t=="string"){const n=Number.parseInt(t,10);return Number.isFinite(n)?n:0}return 0}function Ng(e){const t=e.nodes[0]?.attributes?.["comments-unread"];if(typeof t=="number")return t;if(typeof t=="string"){const n=Number.parseInt(t,10);return Number.isFinite(n)?n:0}return 0}function qo(e){const[t]=e.nodes;return e.nodes.length===1&&t!==void 0&&t.root.startsWith("/files/")&&t.permissions!==Ee.NONE&&t.fileid!==void 0&&_c().available&&rl()}const Do=new Map;async function Ig(e){const t=(Do.get(e.source)??0)+1;Do.set(e.source,t);const n=await _g().stat(`${e.root}${e.path}`,{details:!0,data:`<?xml version="1.0"?>
<d:propfind ${bg()}>
<d:prop>${yg()}</d:prop>
</d:propfind>`});if(Do.get(e.source)!==t)return;const r="data"in n?n.data:n,o=Ag(r,e.root).attributes["comments-count"],s=e.attributes["comments-count"],u=typeof s=="number"?s:typeof s=="string"?Number.parseInt(s,10):0;typeof o=="number"&&o!==u&&(e.update({"comments-count":o}),Yu("files:node:updated",e))}async function Rg(){const e=Date.now()+5e3;for(;Date.now()<e;){const t=window.OCA?.Comments?.View;if(t)return t;await new Promise(n=>window.setTimeout(n,50))}throw new Error("Nextcloud Comments view is unavailable")}function xg(){return class extends HTMLElement{commentsView;container;currentNode;mutationObserver;refreshTimers=new Map;renderGeneration=0;active=!1;folder;view;get node(){return this.currentNode}set node(e){this.currentNode=e,this.renderComments()}connectedCallback(){this.style.display="block",this.style.height="100%",this.style.overflow="auto",this.container=document.createElement("div"),this.container.className="korean-comments-action__content",this.append(this.container),typeof MutationObserver<"u"&&(this.mutationObserver=new MutationObserver(()=>this.scheduleCountRefresh()),this.mutationObserver.observe(this.container,{childList:!0,subtree:!0})),this.renderComments()}disconnectedCallback(){this.renderGeneration+=1,this.mutationObserver?.disconnect(),this.mutationObserver=void 0;for(const e of this.refreshTimers.values())window.clearTimeout(e);this.refreshTimers.clear(),this.commentsView?.$unmount(),this.commentsView=void 0,this.container=void 0,this.replaceChildren()}async renderComments(){const e=this.currentNode,t=e?.fileid;if(!this.isConnected||!this.container||!e||t===void 0)return;if(this.commentsView){await this.commentsView.update(t),this.scheduleCountRefresh();return}const n=++this.renderGeneration;try{const r=await Rg();if(n!==this.renderGeneration||!this.isConnected||!this.container)return;this.commentsView=new r("files",{el:this.container,props:{resourceId:t}}),this.scheduleCountRefresh()}catch(r){n===this.renderGeneration&&this.renderRetry(r)}}renderRetry(e){if(!this.container)return;console.error("Could not initialize the native Comments view",e);const t=document.createElement("p");t.textContent="댓글 화면을 불러오지 못했습니다.";const n=document.createElement("button");n.type="button",n.textContent="다시 시도",n.addEventListener("click",()=>{this.renderComments()}),this.container.replaceChildren(t,n)}scheduleCountRefresh(){const e=this.currentNode;if(!e)return;const t=e.source,n=this.refreshTimers.get(t);n!==void 0&&window.clearTimeout(n);const r=window.setTimeout(()=>{this.refreshTimers.delete(t),Ig(e).catch(o=>{console.error("Could not refresh the comment count",o)})},200);this.refreshTimers.set(t,r)}}}mg("oc:comments-count"),Ec({id:Jo,displayName:"댓글",iconSvgInline:bs,order:45,tagName:jo,enabled({node:e}){return rl()&&e.root.startsWith("/files/")&&e.permissions!==Ee.NONE&&e.fileid!==void 0},onInit(){return window.customElements.get(jo)||window.customElements.define(jo,xg()),Promise.resolve()}});let ol=!1;const xn={id:"korean-comments-action",displayName:()=>"",title:e=>{const t=Uu(e);return t>0?`댓글 ${t}개`:"댓글 작성"},iconSvgInline:e=>Uu(e)>0?bs:Sg,enabled(e){return qo(e)&&(!ol||Ng(e)===0)},async exec(e){const[t]=e.nodes;if(!t||!qo(e))return!1;try{const n=_c();return n.isOpen&&n.node?.source===t.source?n.setActiveTab(Jo):n.open(t,Jo),null}catch(n){return console.error("Could not open the comments-only sidebar",n),!1}},inline:()=>!0,order:-45};function sl(e){if(e.id!=="comments-unread"||typeof e.enabled!="function")return!1;const t=e.enabled;return e.displayName=xn.displayName,e.title=xn.title,e.iconSvgInline=()=>bs,e.exec=xn.exec,e.inline=xn.inline,e.enabled=n=>qo(n)&&t(n)===!0,ol=!0,!0}for(const e of Xh())sl(e);Wh().addEventListener("register:action",e=>{sl(e.detail)}),Hh(xn);
//# sourceMappingURL=korean_comments_action-main.mjs.map