>1,nt=P===23?Math.pow(2,-24)-Math.pow(2,-77):0,Z=v?0:A-1,ot=v?1:-1,F=T<0||T===0&&1/T<0?1:0;for(T=Math.abs(T),isNaN(T)||T===1/0?(s=isNaN(T)?1:0,R=f):(R=Math.floor(Math.log(T)/Math.LN2),T*(M=Math.pow(2,-R))<1&&(R--,M*=2),R+X>=1?T+=nt/M:T+=nt*Math.pow(2,1-X),T*M>=2&&(R++,M/=2),R+X>=f?(s=0,R=f):R+X>=1?(s=(T*M-1)*Math.pow(2,P),R=R+X):(s=T*Math.pow(2,X-1)*Math.pow(2,P),R=0));P>=8;g[b+Z]=s&255,Z+=ot,s/=256,P-=8);for(R=R<0;g[b+Z]=R&255,Z+=ot,R/=256,j-=8);g[b+Z-ot]|=F*128},(function(g){const T=m,b=z,v=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;g.Buffer=f,g.SlowBuffer=St,g.INSPECT_MAX_BYTES=50;const P=2147483647;g.kMaxLength=P;const{Uint8Array:A,ArrayBuffer:R,SharedArrayBuffer:s}=globalThis;f.TYPED_ARRAY_SUPPORT=M(),!f.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 M(){try{const t=new A(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,A.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function j(t){if(t>P)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new A(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ot(t)}return X(t,e,r)}f.poolSize=8192;function X(t,e,r){if(typeof t=="string")return F(t,e);if(R.isView(t))return yt(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(st(t,R)||t&&st(t.buffer,R)||typeof s<"u"&&(st(t,s)||t&&st(t.buffer,s)))return dt(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const o=t.valueOf&&t.valueOf();if(o!=null&&o!==t)return f.from(o,e,r);const c=ut(t);if(c)return c;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return f.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}f.from=function(t,e,r){return X(t,e,r)},Object.setPrototypeOf(f.prototype,A.prototype),Object.setPrototypeOf(f,A);function nt(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function Z(t,e,r){return nt(t),t<=0?j(t):e!==void 0?typeof r=="string"?j(t).fill(e,r):j(t).fill(e):j(t)}f.alloc=function(t,e,r){return Z(t,e,r)};function ot(t){return nt(t),j(t<0?0:Et(t)|0)}f.allocUnsafe=function(t){return ot(t)},f.allocUnsafeSlow=function(t){return ot(t)};function F(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=It(t,e)|0;let o=j(r);const c=o.write(t,e);return c!==r&&(o=o.slice(0,c)),o}function Tt(t){const e=t.length<0?0:Et(t.length)|0,r=j(e);for(let o=0;o=P)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P.toString(16)+" bytes");return t|0}function St(t){return+t!=t&&(t=0),f.alloc(+t)}f.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==f.prototype},f.compare=function(t,e){if(st(t,A)&&(t=f.from(t,t.offset,t.byteLength)),st(e,A)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,o=e.length;for(let c=0,p=Math.min(r,o);co.length?(f.isBuffer(p)||(p=f.from(p)),p.copy(o,c)):A.prototype.set.call(o,p,c);else if(f.isBuffer(p))p.copy(o,c);else throw new TypeError('"list" argument must be an Array of Buffers');c+=p.length}return o};function It(t,e){if(f.isBuffer(t))return t.length;if(R.isView(t)||st(t,R))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&r===0)return 0;let c=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Pt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return ue(t).length;default:if(c)return o?-1:Pt(t).length;e=(""+e).toLowerCase(),c=!0}}f.byteLength=It;function At(t,e,r){let o=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return vt(this,e,r);case"utf8":case"utf-8":return Q(this,e,r);case"ascii":return it(this,e,r);case"latin1":case"binary":return Dt(this,e,r);case"base64":return tt(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nt(this,e,r);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}f.prototype._isBuffer=!0;function ft(t,e,r){const o=t[e];t[e]=t[r],t[r]=o}f.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;ee&&(t+=" ... "),""},v&&(f.prototype[v]=f.prototype.inspect),f.prototype.compare=function(t,e,r,o,c){if(st(t,A)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),r===void 0&&(r=t?t.length:0),o===void 0&&(o=0),c===void 0&&(c=this.length),e<0||r>t.length||o<0||c>this.length)throw new RangeError("out of range index");if(o>=c&&e>=r)return 0;if(o>=c)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,o>>>=0,c>>>=0,this===t)return 0;let p=c-o,I=r-e;const x=Math.min(p,I),J=this.slice(o,c),G=t.slice(e,r);for(let $=0;$2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Ft(r)&&(r=c?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(c)return-1;r=t.length-1}else if(r<0)if(c)r=0;else return-1;if(typeof e=="string"&&(e=f.from(e,o)),f.isBuffer(e))return e.length===0?-1:n(t,e,r,o,c);if(typeof e=="number")return e=e&255,typeof A.prototype.indexOf=="function"?c?A.prototype.indexOf.call(t,e,r):A.prototype.lastIndexOf.call(t,e,r):n(t,[e],r,o,c);throw new TypeError("val must be string, number or Buffer")}function n(t,e,r,o,c){let p=1,I=t.length,x=e.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(t.length<2||e.length<2)return-1;p=2,I/=2,x/=2,r/=2}function J($,H){return p===1?$[H]:$.readUInt16BE(H*p)}let G;if(c){let $=-1;for(G=r;GI&&(r=I-x),G=r;G>=0;G--){let $=!0;for(let H=0;Hc&&(o=c)):o=c;const p=e.length;o>p/2&&(o=p/2);let I;for(I=0;I>>0,isFinite(r)?(r=r>>>0,o===void 0&&(o="utf8")):(o=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const c=this.length-e;if((r===void 0||r>c)&&(r=c),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let p=!1;for(;;)switch(o){case"hex":return d(this,t,e,r);case"utf8":case"utf-8":return u(this,t,e,r);case"ascii":case"latin1":case"binary":return U(this,t,e,r);case"base64":return V(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,t,e,r);default:if(p)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),p=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function tt(t,e,r){return e===0&&r===t.length?T.fromByteArray(t):T.fromByteArray(t.slice(e,r))}function Q(t,e,r){r=Math.min(t.length,r);const o=[];let c=e;for(;c239?4:p>223?3:p>191?2:1;if(c+x<=r){let J,G,$,H;switch(x){case 1:p<128&&(I=p);break;case 2:J=t[c+1],(J&192)===128&&(H=(p&31)<<6|J&63,H>127&&(I=H));break;case 3:J=t[c+1],G=t[c+2],(J&192)===128&&(G&192)===128&&(H=(p&15)<<12|(J&63)<<6|G&63,H>2047&&(H<55296||H>57343)&&(I=H));break;case 4:J=t[c+1],G=t[c+2],$=t[c+3],(J&192)===128&&(G&192)===128&&($&192)===128&&(H=(p&15)<<18|(J&63)<<12|(G&63)<<6|$&63,H>65535&&H<1114112&&(I=H))}}I===null?(I=65533,x=1):I>65535&&(I-=65536,o.push(I>>>10&1023|55296),I=56320|I&1023),o.push(I),c+=x}return W(o)}const ct=4096;function W(t){const e=t.length;if(e<=ct)return String.fromCharCode.apply(String,t);let r="",o=0;for(;oo)&&(r=o);let c="";for(let p=e;pr&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),er)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(t,e,r){t=t>>>0,e=e>>>0,r||q(t,e,this.length);let o=this[t],c=1,p=0;for(;++p>>0,e=e>>>0,r||q(t,e,this.length);let o=this[t+--e],c=1;for(;e>0&&(c*=256);)o+=this[t+--e]*c;return o},f.prototype.readUint8=f.prototype.readUInt8=function(t,e){return t=t>>>0,e||q(t,1,this.length),this[t]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(t,e){return t=t>>>0,e||q(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(t,e){return t=t>>>0,e||q(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(t,e){return t=t>>>0,e||q(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(t,e){return t=t>>>0,e||q(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readBigUInt64LE=lt(function(t){t=t>>>0,mt(t,"offset");const e=this[t],r=this[t+7];(e===void 0||r===void 0)&&bt(t,this.length-8);const o=e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,c=this[++t]+this[++t]*2**8+this[++t]*2**16+r*2**24;return BigInt(o)+(BigInt(c)<>>0,mt(t,"offset");const e=this[t],r=this[t+7];(e===void 0||r===void 0)&&bt(t,this.length-8);const o=e*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],c=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+r;return(BigInt(o)<>>0,e=e>>>0,r||q(t,e,this.length);let o=this[t],c=1,p=0;for(;++p=c&&(o-=Math.pow(2,8*e)),o},f.prototype.readIntBE=function(t,e,r){t=t>>>0,e=e>>>0,r||q(t,e,this.length);let o=e,c=1,p=this[t+--o];for(;o>0&&(c*=256);)p+=this[t+--o]*c;return c*=128,p>=c&&(p-=Math.pow(2,8*e)),p},f.prototype.readInt8=function(t,e){return t=t>>>0,e||q(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},f.prototype.readInt16LE=function(t,e){t=t>>>0,e||q(t,2,this.length);const r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r},f.prototype.readInt16BE=function(t,e){t=t>>>0,e||q(t,2,this.length);const r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r},f.prototype.readInt32LE=function(t,e){return t=t>>>0,e||q(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t=t>>>0,e||q(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readBigInt64LE=lt(function(t){t=t>>>0,mt(t,"offset");const e=this[t],r=this[t+7];(e===void 0||r===void 0)&&bt(t,this.length-8);const o=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(r<<24);return(BigInt(o)<>>0,mt(t,"offset");const e=this[t],r=this[t+7];(e===void 0||r===void 0)&&bt(t,this.length-8);const o=(e<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(o)<>>0,e||q(t,4,this.length),b.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t=t>>>0,e||q(t,4,this.length),b.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t=t>>>0,e||q(t,8,this.length),b.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t=t>>>0,e||q(t,8,this.length),b.read(this,t,!1,52,8)};function rt(t,e,r,o,c,p){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>c||et.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(t,e,r,o){if(t=+t,e=e>>>0,r=r>>>0,!o){const I=Math.pow(2,8*r)-1;rt(this,t,e,r,I,0)}let c=1,p=0;for(this[e]=t&255;++p>>0,r=r>>>0,!o){const I=Math.pow(2,8*r)-1;rt(this,t,e,r,I,0)}let c=r-1,p=1;for(this[e+c]=t&255;--c>=0&&(p*=256);)this[e+c]=t/p&255;return e+r},f.prototype.writeUint8=f.prototype.writeUInt8=function(t,e,r){return t=+t,e=e>>>0,r||rt(this,t,e,1,255,0),this[e]=t&255,e+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=e>>>0,r||rt(this,t,e,2,65535,0),this[e]=t&255,this[e+1]=t>>>8,e+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=e>>>0,r||rt(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=t&255,e+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=e>>>0,r||rt(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255,e+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=e>>>0,r||rt(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};function ee(t,e,r,o,c){ae(e,o,c,t,r,7);let p=Number(e&BigInt(4294967295));t[r++]=p,p=p>>8,t[r++]=p,p=p>>8,t[r++]=p,p=p>>8,t[r++]=p;let I=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=I,I=I>>8,t[r++]=I,I=I>>8,t[r++]=I,I=I>>8,t[r++]=I,r}function re(t,e,r,o,c){ae(e,o,c,t,r,7);let p=Number(e&BigInt(4294967295));t[r+7]=p,p=p>>8,t[r+6]=p,p=p>>8,t[r+5]=p,p=p>>8,t[r+4]=p;let I=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=I,I=I>>8,t[r+2]=I,I=I>>8,t[r+1]=I,I=I>>8,t[r]=I,r+8}f.prototype.writeBigUInt64LE=lt(function(t,e=0){return ee(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=lt(function(t,e=0){return re(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(t,e,r,o){if(t=+t,e=e>>>0,!o){const x=Math.pow(2,8*r-1);rt(this,t,e,r,x-1,-x)}let c=0,p=1,I=0;for(this[e]=t&255;++c>0)-I&255;return e+r},f.prototype.writeIntBE=function(t,e,r,o){if(t=+t,e=e>>>0,!o){const x=Math.pow(2,8*r-1);rt(this,t,e,r,x-1,-x)}let c=r-1,p=1,I=0;for(this[e+c]=t&255;--c>=0&&(p*=256);)t<0&&I===0&&this[e+c+1]!==0&&(I=1),this[e+c]=(t/p>>0)-I&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e=e>>>0,r||rt(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=t&255,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e=e>>>0,r||rt(this,t,e,2,32767,-32768),this[e]=t&255,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e=e>>>0,r||rt(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=t&255,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e=e>>>0,r||rt(this,t,e,4,2147483647,-2147483648),this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e=e>>>0,r||rt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4},f.prototype.writeBigInt64LE=lt(function(t,e=0){return ee(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=lt(function(t,e=0){return re(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ne(t,e,r,o,c,p){if(r+o>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ie(t,e,r,o,c){return e=+e,r=r>>>0,c||ne(t,e,r,4),b.write(t,e,r,o,23,4),r+4}f.prototype.writeFloatLE=function(t,e,r){return ie(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return ie(this,t,e,!1,r)};function oe(t,e,r,o,c){return e=+e,r=r>>>0,c||ne(t,e,r,8),b.write(t,e,r,o,52,8),r+8}f.prototype.writeDoubleLE=function(t,e,r){return oe(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return oe(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,o){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),!o&&o!==0&&(o=this.length),e>=t.length&&(e=t.length),e||(e=0),o>0&&o=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-e>>0,r=r===void 0?this.length:r>>>0,t||(t=0);let c;if(typeof t=="number")for(c=e;c2**32?c=se(String(r)):typeof r=="bigint"&&(c=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(c=se(c)),c+="n"),o+=` It must be ${e}. Received ${c}`,o},RangeError);function se(t){let e="",r=t.length;const o=t[0]==="-"?1:0;for(;r>=o+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Ge(t,e,r){mt(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&bt(e,t.length-(r+1))}function ae(t,e,r,o,c,p){if(t>r||t= 0${I} and < 2${I} ** ${(p+1)*8}${I}`:x=`>= -(2${I} ** ${(p+1)*8-1}${I}) and < 2 ** ${(p+1)*8-1}${I}`,new gt.ERR_OUT_OF_RANGE("value",x,t)}Ge(o,c,p)}function mt(t,e){if(typeof t!="number")throw new gt.ERR_INVALID_ARG_TYPE(e,"number",t)}function bt(t,e,r){throw Math.floor(t)!==t?(mt(t,r),new gt.ERR_OUT_OF_RANGE("offset","an integer",t)):e<0?new gt.ERR_BUFFER_OUT_OF_BOUNDS:new gt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,t)}const ke=/[^+/0-9A-Za-z-_]/g;function je(t){if(t=t.split("=")[0],t=t.trim().replace(ke,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Pt(t,e){e=e||1/0;let r;const o=t.length;let c=null;const p=[];for(let I=0;I55295&&r<57344){if(!c){if(r>56319){(e-=3)>-1&&p.push(239,191,189);continue}else if(I+1===o){(e-=3)>-1&&p.push(239,191,189);continue}c=r;continue}if(r<56320){(e-=3)>-1&&p.push(239,191,189),c=r;continue}r=(c-55296<<10|r-56320)+65536}else c&&(e-=3)>-1&&p.push(239,191,189);if(c=null,r<128){if((e-=1)<0)break;p.push(r)}else if(r<2048){if((e-=2)<0)break;p.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;p.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;p.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return p}function Xe(t){const e=[];for(let r=0;r>8,c=r%256,p.push(c),p.push(o);return p}function ue(t){return T.toByteArray(je(t))}function Ot(t,e,r,o){let c;for(c=0;c=e.length||c>=t.length);++c)e[c+r]=t[c];return c}function st(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function Ft(t){return t!==t}const Ye=(function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const o=r*16;for(let c=0;c<16;++c)e[o+c]=t[r]+t[c]}return e})();function lt(t){return typeof BigInt>"u"?qe:t}function qe(){throw new Error("BigInt not supported")}})(a);const E=a.Buffer;l.Blob=a.Blob,l.BlobOptions=a.BlobOptions,l.Buffer=a.Buffer,l.File=a.File,l.FileOptions=a.FileOptions,l.INSPECT_MAX_BYTES=a.INSPECT_MAX_BYTES,l.SlowBuffer=a.SlowBuffer,l.TranscodeEncoding=a.TranscodeEncoding,l.atob=a.atob,l.btoa=a.btoa,l.constants=a.constants,l.default=E,l.isAscii=a.isAscii,l.isUtf8=a.isUtf8,l.kMaxLength=a.kMaxLength,l.kStringMaxLength=a.kStringMaxLength,l.resolveObjectURL=a.resolveObjectURL,l.transcode=a.transcode})(me)),me}var ye;function gr(){return ye||(ye=1,(function(l,a){var m=dr(),N=m.Buffer;function L(S,_){for(var y in S)_[y]=S[y]}N.from&&N.alloc&&N.allocUnsafe&&N.allocUnsafeSlow?l.exports=m:(L(m,a),a.Buffer=D);function D(S,_,y){return N(S,_,y)}D.prototype=Object.create(N.prototype),L(N,D),D.from=function(S,_,y){if(typeof S=="number")throw new TypeError("Argument must not be a number");return N(S,_,y)},D.alloc=function(S,_,y){if(typeof S!="number")throw new TypeError("Argument must be a number");var w=N(S);return _!==void 0?typeof y=="string"?w.fill(_,y):w.fill(_):w.fill(0),w},D.allocUnsafe=function(S){if(typeof S!="number")throw new TypeError("Argument must be a number");return N(S)},D.allocUnsafeSlow=function(S){if(typeof S!="number")throw new TypeError("Argument must be a number");return m.SlowBuffer(S)}})(kt,kt.exports)),kt.exports}var Ie;function mr(){if(Ie)return Gt;Ie=1;var l=gr().Buffer,a=l.isEncoding||function(E){switch(E=""+E,E&&E.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 m(E){if(!E)return"utf8";for(var g;;)switch(E){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 E;default:if(g)return;E=(""+E).toLowerCase(),g=!0}}function N(E){var g=m(E);if(typeof g!="string"&&(l.isEncoding===a||!a(E)))throw new Error("Unknown encoding: "+E);return g||E}Gt.StringDecoder=L;function L(E){this.encoding=N(E);var g;switch(this.encoding){case"utf16le":this.text=C,this.end=B,g=4;break;case"utf8":this.fillLast=y,g=4;break;case"base64":this.text=k,this.end=at,g=3;break;default:this.write=O,this.end=z;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=l.allocUnsafe(g)}L.prototype.write=function(E){if(E.length===0)return"";var g,T;if(this.lastNeed){if(g=this.fillLast(E),g===void 0)return"";T=this.lastNeed,this.lastNeed=0}else T=0;return T>5===6?2:E>>4===14?3:E>>3===30?4:E>>6===2?-1:-2}function S(E,g,T){var b=g.length-1;if(b=0?(v>0&&(E.lastNeed=v-1),v):--b=0?(v>0&&(E.lastNeed=v-2),v):--b=0?(v>0&&(v===2?v=0:E.lastNeed=v-3),v):0))}function _(E,g,T){if((g[0]&192)!==128)return E.lastNeed=0,"�";if(E.lastNeed>1&&g.length>1){if((g[1]&192)!==128)return E.lastNeed=1,"�";if(E.lastNeed>2&&g.length>2&&(g[2]&192)!==128)return E.lastNeed=2,"�"}}function y(E){var g=this.lastTotal-this.lastNeed,T=_(this,E);if(T!==void 0)return T;if(this.lastNeed<=E.length)return E.copy(this.lastChar,g,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,g,0,E.length),this.lastNeed-=E.length}function w(E,g){var T=S(this,E,g);if(!this.lastNeed)return E.toString("utf8",g);this.lastTotal=T;var b=E.length-(T-this.lastNeed);return E.copy(this.lastChar,0,b),E.toString("utf8",g,b)}function h(E){var g=E&&E.length?this.write(E):"";return this.lastNeed?g+"�":g}function C(E,g){if((E.length-g)%2===0){var T=E.toString("utf16le",g);if(T){var b=T.charCodeAt(T.length-1);if(b>=55296&&b<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],T.slice(0,-1)}return T}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=E[E.length-1],E.toString("utf16le",g,E.length-1)}function B(E){var g=E&&E.length?this.write(E):"";if(this.lastNeed){var T=this.lastTotal-this.lastNeed;return g+this.lastChar.toString("utf16le",0,T)}return g}function k(E,g){var T=(E.length-g)%3;return T===0?E.toString("base64",g):(this.lastNeed=3-T,this.lastTotal=3,T===1?this.lastChar[0]=E[E.length-1]:(this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1]),E.toString("base64",g,E.length-T))}function at(E){var g=E&&E.length?this.write(E):"";return this.lastNeed?g+this.lastChar.toString("base64",0,3-this.lastNeed):g}function O(E){return E.toString(this.encoding)}function z(E){return E&&E.length?this.write(E):""}return Gt}var Tr=mr();const yr=Ze(Tr);var jt={},te=(l=>(l.DEFAULT="default",l.HIDDEN="hidden",l))(te||{});class Ir{_action;constructor(a){this.validateAction(a),this._action=a}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get hotkey(){return this._action.hotkey}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get destructive(){return this._action.destructive}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(a){if(!a.id||typeof a.id!="string")throw new Error("Invalid id");if(!a.displayName||typeof a.displayName!="function")throw new Error("Invalid displayName function");if("title"in a&&typeof a.title!="function")throw new Error("Invalid title function");if(!a.iconSvgInline||typeof a.iconSvgInline!="function")throw new Error("Invalid iconSvgInline function");if(!a.exec||typeof a.exec!="function")throw new Error("Invalid exec function");if("enabled"in a&&typeof a.enabled!="function")throw new Error("Invalid enabled function");if("execBatch"in a&&typeof a.execBatch!="function")throw new Error("Invalid execBatch function");if("order"in a&&typeof a.order!="number")throw new Error("Invalid order");if(a.destructive!==void 0&&typeof a.destructive!="boolean")throw new Error("Invalid destructive flag");if("parent"in a&&typeof a.parent!="string")throw new Error("Invalid parent");if(a.default&&!Object.values(te).includes(a.default))throw new Error("Invalid default");if("inline"in a&&typeof a.inline!="function")throw new Error("Invalid inline function");if("renderInline"in a&&typeof a.renderInline!="function")throw new Error("Invalid renderInline function");if("hotkey"in a&&a.hotkey!==void 0){if(typeof a.hotkey!="object")throw new Error("Invalid hotkey configuration");if(typeof a.hotkey.key!="string"||!a.hotkey.key)throw new Error("Missing or invalid hotkey key");if(typeof a.hotkey.description!="string"||!a.hotkey.description)throw new Error("Missing or invalid hotkey description")}}}const Nr=function(l){if(typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],ge.debug("FileActions initialized")),window._nc_fileactions.find(a=>a.id===l.id)){ge.error(`FileAction ${l.id} already registered`,{action:l});return}window._nc_fileactions.push(l)};var Ne,be;function Me(){return be||(be=1,Ne=typeof Qe=="object"&&jt&&jt.NODE_DEBUG&&/\bsemver\b/i.test(jt.NODE_DEBUG)?(...l)=>console.error("SEMVER",...l):()=>{}),Ne}var Xt,we;function $e(){if(we)return Xt;we=1;const l="2.0.0",a=256,m=Number.MAX_SAFE_INTEGER||9007199254740991,N=16,L=a-6;return Xt={MAX_LENGTH:a,MAX_SAFE_COMPONENT_LENGTH:N,MAX_SAFE_BUILD_LENGTH:L,MAX_SAFE_INTEGER:m,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:l,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Xt}var Vt={exports:{}},Ae;function br(){return Ae||(Ae=1,(function(l,a){const{MAX_SAFE_COMPONENT_LENGTH:m,MAX_SAFE_BUILD_LENGTH:N,MAX_LENGTH:L}=$e(),D=Me();a=l.exports={};const S=a.re=[],_=a.safeRe=[],y=a.src=[],w=a.safeSrc=[],h=a.t={};let C=0;const B="[a-zA-Z0-9-]",k=[["\\s",1],["\\d",L],[B,N]],at=z=>{for(const[E,g]of k)z=z.split(`${E}*`).join(`${E}{0,${g}}`).split(`${E}+`).join(`${E}{1,${g}}`);return z},O=(z,E,g)=>{const T=at(E),b=C++;D(z,b,E),h[z]=b,y[b]=E,w[b]=T,S[b]=new RegExp(E,g?"g":void 0),_[b]=new RegExp(T,g?"g":void 0)};O("NUMERICIDENTIFIER","0|[1-9]\\d*"),O("NUMERICIDENTIFIERLOOSE","\\d+"),O("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${B}*`),O("MAINVERSION",`(${y[h.NUMERICIDENTIFIER]})\\.(${y[h.NUMERICIDENTIFIER]})\\.(${y[h.NUMERICIDENTIFIER]})`),O("MAINVERSIONLOOSE",`(${y[h.NUMERICIDENTIFIERLOOSE]})\\.(${y[h.NUMERICIDENTIFIERLOOSE]})\\.(${y[h.NUMERICIDENTIFIERLOOSE]})`),O("PRERELEASEIDENTIFIER",`(?:${y[h.NONNUMERICIDENTIFIER]}|${y[h.NUMERICIDENTIFIER]})`),O("PRERELEASEIDENTIFIERLOOSE",`(?:${y[h.NONNUMERICIDENTIFIER]}|${y[h.NUMERICIDENTIFIERLOOSE]})`),O("PRERELEASE",`(?:-(${y[h.PRERELEASEIDENTIFIER]}(?:\\.${y[h.PRERELEASEIDENTIFIER]})*))`),O("PRERELEASELOOSE",`(?:-?(${y[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${y[h.PRERELEASEIDENTIFIERLOOSE]})*))`),O("BUILDIDENTIFIER",`${B}+`),O("BUILD",`(?:\\+(${y[h.BUILDIDENTIFIER]}(?:\\.${y[h.BUILDIDENTIFIER]})*))`),O("FULLPLAIN",`v?${y[h.MAINVERSION]}${y[h.PRERELEASE]}?${y[h.BUILD]}?`),O("FULL",`^${y[h.FULLPLAIN]}$`),O("LOOSEPLAIN",`[v=\\s]*${y[h.MAINVERSIONLOOSE]}${y[h.PRERELEASELOOSE]}?${y[h.BUILD]}?`),O("LOOSE",`^${y[h.LOOSEPLAIN]}$`),O("GTLT","((?:<|>)?=?)"),O("XRANGEIDENTIFIERLOOSE",`${y[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),O("XRANGEIDENTIFIER",`${y[h.NUMERICIDENTIFIER]}|x|X|\\*`),O("XRANGEPLAIN",`[v=\\s]*(${y[h.XRANGEIDENTIFIER]})(?:\\.(${y[h.XRANGEIDENTIFIER]})(?:\\.(${y[h.XRANGEIDENTIFIER]})(?:${y[h.PRERELEASE]})?${y[h.BUILD]}?)?)?`),O("XRANGEPLAINLOOSE",`[v=\\s]*(${y[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[h.XRANGEIDENTIFIERLOOSE]})(?:${y[h.PRERELEASELOOSE]})?${y[h.BUILD]}?)?)?`),O("XRANGE",`^${y[h.GTLT]}\\s*${y[h.XRANGEPLAIN]}$`),O("XRANGELOOSE",`^${y[h.GTLT]}\\s*${y[h.XRANGEPLAINLOOSE]}$`),O("COERCEPLAIN",`(^|[^\\d])(\\d{1,${m}})(?:\\.(\\d{1,${m}}))?(?:\\.(\\d{1,${m}}))?`),O("COERCE",`${y[h.COERCEPLAIN]}(?:$|[^\\d])`),O("COERCEFULL",y[h.COERCEPLAIN]+`(?:${y[h.PRERELEASE]})?(?:${y[h.BUILD]})?(?:$|[^\\d])`),O("COERCERTL",y[h.COERCE],!0),O("COERCERTLFULL",y[h.COERCEFULL],!0),O("LONETILDE","(?:~>?)"),O("TILDETRIM",`(\\s*)${y[h.LONETILDE]}\\s+`,!0),a.tildeTrimReplace="$1~",O("TILDE",`^${y[h.LONETILDE]}${y[h.XRANGEPLAIN]}$`),O("TILDELOOSE",`^${y[h.LONETILDE]}${y[h.XRANGEPLAINLOOSE]}$`),O("LONECARET","(?:\\^)"),O("CARETTRIM",`(\\s*)${y[h.LONECARET]}\\s+`,!0),a.caretTrimReplace="$1^",O("CARET",`^${y[h.LONECARET]}${y[h.XRANGEPLAIN]}$`),O("CARETLOOSE",`^${y[h.LONECARET]}${y[h.XRANGEPLAINLOOSE]}$`),O("COMPARATORLOOSE",`^${y[h.GTLT]}\\s*(${y[h.LOOSEPLAIN]})$|^$`),O("COMPARATOR",`^${y[h.GTLT]}\\s*(${y[h.FULLPLAIN]})$|^$`),O("COMPARATORTRIM",`(\\s*)${y[h.GTLT]}\\s*(${y[h.LOOSEPLAIN]}|${y[h.XRANGEPLAIN]})`,!0),a.comparatorTrimReplace="$1$2$3",O("HYPHENRANGE",`^\\s*(${y[h.XRANGEPLAIN]})\\s+-\\s+(${y[h.XRANGEPLAIN]})\\s*$`),O("HYPHENRANGELOOSE",`^\\s*(${y[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${y[h.XRANGEPLAINLOOSE]})\\s*$`),O("STAR","(<|>)?=?\\s*\\*"),O("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),O("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Vt,Vt.exports)),Vt.exports}var Yt,ve;function wr(){if(ve)return Yt;ve=1;const l=Object.freeze({loose:!0}),a=Object.freeze({});return Yt=m=>m?typeof m!="object"?l:m:a,Yt}var qt,Oe;function Ar(){if(Oe)return qt;Oe=1;const l=/^[0-9]+$/,a=(m,N)=>{if(typeof m=="number"&&typeof N=="number")return m===N?0:ma(N,m)},qt}var Ht,_e;function xe(){if(_e)return Ht;_e=1;const l=Me(),{MAX_LENGTH:a,MAX_SAFE_INTEGER:m}=$e(),{safeRe:N,t:L}=br(),D=wr(),{compareIdentifiers:S}=Ar();class _{constructor(w,h){if(h=D(h),w instanceof _){if(w.loose===!!h.loose&&w.includePrerelease===!!h.includePrerelease)return w;w=w.version}else if(typeof w!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof w}".`);if(w.length>a)throw new TypeError(`version is longer than ${a} characters`);l("SemVer",w,h),this.options=h,this.loose=!!h.loose,this.includePrerelease=!!h.includePrerelease;const C=w.trim().match(h.loose?N[L.LOOSE]:N[L.FULL]);if(!C)throw new TypeError(`Invalid Version: ${w}`);if(this.raw=w,this.major=+C[1],this.minor=+C[2],this.patch=+C[3],this.major>m||this.major<0)throw new TypeError("Invalid major version");if(this.minor>m||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>m||this.patch<0)throw new TypeError("Invalid patch version");C[4]?this.prerelease=C[4].split(".").map(B=>{if(/^[0-9]+$/.test(B)){const k=+B;if(k>=0&&kw.major?1:this.minorw.minor?1:this.patchw.patch?1:0}comparePre(w){if(w instanceof _||(w=new _(w,this.options)),this.prerelease.length&&!w.prerelease.length)return-1;if(!this.prerelease.length&&w.prerelease.length)return 1;if(!this.prerelease.length&&!w.prerelease.length)return 0;let h=0;do{const C=this.prerelease[h],B=w.prerelease[h];if(l("prerelease compare",h,C,B),C===void 0&&B===void 0)return 0;if(B===void 0)return 1;if(C===void 0)return-1;if(C!==B)return S(C,B)}while(++h)}compareBuild(w){w instanceof _||(w=new _(w,this.options));let h=0;do{const C=this.build[h],B=w.build[h];if(l("build compare",h,C,B),C===void 0&&B===void 0)return 0;if(B===void 0)return 1;if(C===void 0)return-1;if(C!==B)return S(C,B)}while(++h)}inc(w,h,C){if(w.startsWith("pre")){if(!h&&C===!1)throw new Error("invalid increment argument: identifier is empty");if(h){const B=`-${h}`.match(this.options.loose?N[L.PRERELEASELOOSE]:N[L.PRERELEASE]);if(!B||B[1]!==h)throw new Error(`invalid identifier: ${h}`)}}switch(w){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",h,C);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",h,C);break;case"prepatch":this.prerelease.length=0,this.inc("patch",h,C),this.inc("pre",h,C);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",h,C),this.inc("pre",h,C);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 B=Number(C)?1:0;if(this.prerelease.length===0)this.prerelease=[B];else{let k=this.prerelease.length;for(;--k>=0;)typeof this.prerelease[k]=="number"&&(this.prerelease[k]++,k=-2);if(k===-1){if(h===this.prerelease.join(".")&&C===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(B)}}if(h){let k=[h,B];C===!1&&(k=[h]),S(this.prerelease[0],h)===0?isNaN(this.prerelease[1])&&(this.prerelease=k):this.prerelease=k}break}default:throw new Error(`invalid increment argument: ${w}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Ht=_,Ht}var Wt,Re;function vr(){if(Re)return Wt;Re=1;const l=xe();return Wt=(a,m)=>new l(a,m).major,Wt}vr();var zt,Le;function Or(){if(Le)return zt;Le=1;const l=xe();return zt=(a,m,N=!1)=>{if(a instanceof l)return a;try{return new l(a,m)}catch(L){if(!N)return null;throw L}},zt}var Zt,Ce;function _r(){if(Ce)return Zt;Ce=1;const l=Or();return Zt=(a,m)=>{const N=l(a,m);return N?N.version:null},Zt}_r();var Se={},De;function Rr(){return De||(De=1,(function(l){(function(a){a.parser=function(i,n){return new N(i,n)},a.SAXParser=N,a.SAXStream=h,a.createStream=w,a.MAX_BUFFER_LENGTH=64*1024;var m=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];a.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function N(i,n){if(!(this instanceof N))return new N(i,n);var d=this;D(d),d.q=d.c="",d.bufferCheckPosition=a.MAX_BUFFER_LENGTH,d.opt=n||{},d.opt.lowercase=d.opt.lowercase||d.opt.lowercasetags,d.looseCase=d.opt.lowercase?"toLowerCase":"toUpperCase",d.tags=[],d.closed=d.closedRoot=d.sawRoot=!1,d.tag=d.error=null,d.strict=!!i,d.noscript=!!(i||d.opt.noscript),d.state=s.BEGIN,d.strictEntities=d.opt.strictEntities,d.ENTITIES=d.strictEntities?Object.create(a.XML_ENTITIES):Object.create(a.ENTITIES),d.attribList=[],d.opt.xmlns&&(d.ns=Object.create(O)),d.opt.unquotedAttributeValues===void 0&&(d.opt.unquotedAttributeValues=!i),d.trackPosition=d.opt.position!==!1,d.trackPosition&&(d.position=d.line=d.column=0),j(d,"onready")}Object.create||(Object.create=function(i){function n(){}n.prototype=i;var d=new n;return d}),Object.keys||(Object.keys=function(i){var n=[];for(var d in i)i.hasOwnProperty(d)&&n.push(d);return n});function L(i){for(var n=Math.max(a.MAX_BUFFER_LENGTH,10),d=0,u=0,U=m.length;un)switch(m[u]){case"textNode":X(i);break;case"cdata":f(i,"oncdata",i.cdata),i.cdata="";break;case"script":f(i,"onscript",i.script),i.script="";break;default:Z(i,"Max buffer length exceeded: "+m[u])}d=Math.max(d,V)}var Y=a.MAX_BUFFER_LENGTH-d;i.bufferCheckPosition=Y+i.position}function D(i){for(var n=0,d=m.length;n"||b(i)}function A(i,n){return i.test(n)}function R(i,n){return!A(i,n)}var s=0;a.STATE={BEGIN:s++,BEGIN_WHITESPACE:s++,TEXT:s++,TEXT_ENTITY:s++,OPEN_WAKA:s++,SGML_DECL:s++,SGML_DECL_QUOTED:s++,DOCTYPE:s++,DOCTYPE_QUOTED:s++,DOCTYPE_DTD:s++,DOCTYPE_DTD_QUOTED:s++,COMMENT_STARTING:s++,COMMENT:s++,COMMENT_ENDING:s++,COMMENT_ENDED:s++,CDATA:s++,CDATA_ENDING:s++,CDATA_ENDING_2:s++,PROC_INST:s++,PROC_INST_BODY:s++,PROC_INST_ENDING:s++,OPEN_TAG:s++,OPEN_TAG_SLASH:s++,ATTRIB:s++,ATTRIB_NAME:s++,ATTRIB_NAME_SAW_WHITE:s++,ATTRIB_VALUE:s++,ATTRIB_VALUE_QUOTED:s++,ATTRIB_VALUE_CLOSED:s++,ATTRIB_VALUE_UNQUOTED:s++,ATTRIB_VALUE_ENTITY_Q:s++,ATTRIB_VALUE_ENTITY_U:s++,CLOSE_TAG:s++,CLOSE_TAG_SAW_WHITE:s++,SCRIPT:s++,SCRIPT_ENDING:s++},a.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},a.ENTITIES={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(a.ENTITIES).forEach(function(i){var n=a.ENTITIES[i],d=typeof n=="number"?String.fromCharCode(n):n;a.ENTITIES[i]=d});for(var M in a.STATE)a.STATE[a.STATE[M]]=M;s=a.STATE;function j(i,n,d){i[n]&&i[n](d)}function f(i,n,d){i.textNode&&X(i),j(i,n,d)}function X(i){i.textNode=nt(i.opt,i.textNode),i.textNode&&j(i,"ontext",i.textNode),i.textNode=""}function nt(i,n){return i.trim&&(n=n.trim()),i.normalize&&(n=n.replace(/\s+/g," ")),n}function Z(i,n){return X(i),i.trackPosition&&(n+=`
Line: `+i.line+`
Column: `+i.column+`
Char: `+i.c),n=new Error(n),i.error=n,j(i,"onerror",n),i}function ot(i){return i.sawRoot&&!i.closedRoot&&F(i,"Unclosed root tag"),i.state!==s.BEGIN&&i.state!==s.BEGIN_WHITESPACE&&i.state!==s.TEXT&&Z(i,"Unexpected end"),X(i),i.c="",i.closed=!0,j(i,"onend"),N.call(i,i.strict,i.opt),i}function F(i,n){if(typeof i!="object"||!(i instanceof N))throw new Error("bad call to strictFail");i.strict&&Z(i,n)}function Tt(i){i.strict||(i.tagName=i.tagName[i.looseCase]());var n=i.tags[i.tags.length-1]||i,d=i.tag={name:i.tagName,attributes:{}};i.opt.xmlns&&(d.ns=n.ns),i.attribList.length=0,f(i,"onopentagstart",d)}function yt(i,n){var d=i.indexOf(":"),u=d<0?["",i]:i.split(":"),U=u[0],V=u[1];return n&&i==="xmlns"&&(U="xmlns",V=""),{prefix:U,local:V}}function dt(i){if(i.strict||(i.attribName=i.attribName[i.looseCase]()),i.attribList.indexOf(i.attribName)!==-1||i.tag.attributes.hasOwnProperty(i.attribName)){i.attribName=i.attribValue="";return}if(i.opt.xmlns){var n=yt(i.attribName,!0),d=n.prefix,u=n.local;if(d==="xmlns")if(u==="xml"&&i.attribValue!==k)F(i,"xml: prefix must be bound to "+k+`
Actual: `+i.attribValue);else if(u==="xmlns"&&i.attribValue!==at)F(i,"xmlns: prefix must be bound to "+at+`
Actual: `+i.attribValue);else{var U=i.tag,V=i.tags[i.tags.length-1]||i;U.ns===V.ns&&(U.ns=Object.create(V.ns)),U.ns[u]=i.attribValue}i.attribList.push([i.attribName,i.attribValue])}else i.tag.attributes[i.attribName]=i.attribValue,f(i,"onattribute",{name:i.attribName,value:i.attribValue});i.attribName=i.attribValue=""}function ut(i,n){if(i.opt.xmlns){var d=i.tag,u=yt(i.tagName);d.prefix=u.prefix,d.local=u.local,d.uri=d.ns[u.prefix]||"",d.prefix&&!d.uri&&(F(i,"Unbound namespace prefix: "+JSON.stringify(i.tagName)),d.uri=u.prefix);var U=i.tags[i.tags.length-1]||i;d.ns&&U.ns!==d.ns&&Object.keys(d.ns).forEach(function(q){f(i,"onopennamespace",{prefix:q,uri:d.ns[q]})});for(var V=0,Y=i.attribList.length;V",i.state=s.TEXT;return}if(i.script){if(i.tagName!=="script"){i.script+=""+i.tagName+">",i.tagName="",i.state=s.SCRIPT;return}f(i,"onscript",i.script),i.script=""}var n=i.tags.length,d=i.tagName;i.strict||(d=d[i.looseCase]());for(var u=d;n--;){var U=i.tags[n];if(U.name!==u)F(i,"Unexpected close tag");else break}if(n<0){F(i,"Unmatched closing tag: "+i.tagName),i.textNode+=""+i.tagName+">",i.state=s.TEXT;return}i.tagName=d;for(var V=i.tags.length;V-- >n;){var Y=i.tag=i.tags.pop();i.tagName=i.tag.name,f(i,"onclosetag",i.tagName);var tt={};for(var Q in Y.ns)tt[Q]=Y.ns[Q];var ct=i.tags[i.tags.length-1]||i;i.opt.xmlns&&Y.ns!==ct.ns&&Object.keys(Y.ns).forEach(function(W){var it=Y.ns[W];f(i,"onclosenamespace",{prefix:W,uri:it})})}n===0&&(i.closedRoot=!0),i.tagName=i.attribValue=i.attribName="",i.attribList.length=0,i.state=s.TEXT}function St(i){var n=i.entity,d=n.toLowerCase(),u,U="";return i.ENTITIES[n]?i.ENTITIES[n]:i.ENTITIES[d]?i.ENTITIES[d]:(n=d,n.charAt(0)==="#"&&(n.charAt(1)==="x"?(n=n.slice(2),u=parseInt(n,16),U=u.toString(16)):(n=n.slice(1),u=parseInt(n,10),U=u.toString(10))),n=n.replace(/^0+/,""),isNaN(u)||U.toLowerCase()!==n?(F(i,"Invalid character entity"),"&"+i.entity+";"):String.fromCodePoint(u))}function It(i,n){n==="<"?(i.state=s.OPEN_WAKA,i.startTagPosition=i.position):b(n)||(F(i,"Non-whitespace before first tag."),i.textNode=n,i.state=s.TEXT)}function At(i,n){var d="";return n"?(f(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=s.TEXT):(v(u)&&(n.state=s.SGML_DECL_QUOTED),n.sgmlDecl+=u);continue;case s.SGML_DECL_QUOTED:u===n.q&&(n.state=s.SGML_DECL,n.q=""),n.sgmlDecl+=u;continue;case s.DOCTYPE:u===">"?(n.state=s.TEXT,f(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=u,u==="["?n.state=s.DOCTYPE_DTD:v(u)&&(n.state=s.DOCTYPE_QUOTED,n.q=u));continue;case s.DOCTYPE_QUOTED:n.doctype+=u,u===n.q&&(n.q="",n.state=s.DOCTYPE);continue;case s.DOCTYPE_DTD:u==="]"?(n.doctype+=u,n.state=s.DOCTYPE):u==="<"?(n.state=s.OPEN_WAKA,n.startTagPosition=n.position):v(u)?(n.doctype+=u,n.state=s.DOCTYPE_DTD_QUOTED,n.q=u):n.doctype+=u;continue;case s.DOCTYPE_DTD_QUOTED:n.doctype+=u,u===n.q&&(n.state=s.DOCTYPE_DTD,n.q="");continue;case s.COMMENT:u==="-"?n.state=s.COMMENT_ENDING:n.comment+=u;continue;case s.COMMENT_ENDING:u==="-"?(n.state=s.COMMENT_ENDED,n.comment=nt(n.opt,n.comment),n.comment&&f(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+u,n.state=s.COMMENT);continue;case s.COMMENT_ENDED:u!==">"?(F(n,"Malformed comment"),n.comment+="--"+u,n.state=s.COMMENT):n.doctype&&n.doctype!==!0?n.state=s.DOCTYPE_DTD:n.state=s.TEXT;continue;case s.CDATA:u==="]"?n.state=s.CDATA_ENDING:n.cdata+=u;continue;case s.CDATA_ENDING:u==="]"?n.state=s.CDATA_ENDING_2:(n.cdata+="]"+u,n.state=s.CDATA);continue;case s.CDATA_ENDING_2:u===">"?(n.cdata&&f(n,"oncdata",n.cdata),f(n,"onclosecdata"),n.cdata="",n.state=s.TEXT):u==="]"?n.cdata+="]":(n.cdata+="]]"+u,n.state=s.CDATA);continue;case s.PROC_INST:u==="?"?n.state=s.PROC_INST_ENDING:b(u)?n.state=s.PROC_INST_BODY:n.procInstName+=u;continue;case s.PROC_INST_BODY:if(!n.procInstBody&&b(u))continue;u==="?"?n.state=s.PROC_INST_ENDING:n.procInstBody+=u;continue;case s.PROC_INST_ENDING:u===">"?(f(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=s.TEXT):(n.procInstBody+="?"+u,n.state=s.PROC_INST_BODY);continue;case s.OPEN_TAG:A(E,u)?n.tagName+=u:(Tt(n),u===">"?ut(n):u==="/"?n.state=s.OPEN_TAG_SLASH:(b(u)||F(n,"Invalid character in tag name"),n.state=s.ATTRIB));continue;case s.OPEN_TAG_SLASH:u===">"?(ut(n,!0),Et(n)):(F(n,"Forward-slash in opening tag not followed by >"),n.state=s.ATTRIB);continue;case s.ATTRIB:if(b(u))continue;u===">"?ut(n):u==="/"?n.state=s.OPEN_TAG_SLASH:A(z,u)?(n.attribName=u,n.attribValue="",n.state=s.ATTRIB_NAME):F(n,"Invalid attribute name");continue;case s.ATTRIB_NAME:u==="="?n.state=s.ATTRIB_VALUE:u===">"?(F(n,"Attribute without value"),n.attribValue=n.attribName,dt(n),ut(n)):b(u)?n.state=s.ATTRIB_NAME_SAW_WHITE:A(E,u)?n.attribName+=u:F(n,"Invalid attribute name");continue;case s.ATTRIB_NAME_SAW_WHITE:if(u==="=")n.state=s.ATTRIB_VALUE;else{if(b(u))continue;F(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",f(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",u===">"?ut(n):A(z,u)?(n.attribName=u,n.state=s.ATTRIB_NAME):(F(n,"Invalid attribute name"),n.state=s.ATTRIB)}continue;case s.ATTRIB_VALUE:if(b(u))continue;v(u)?(n.q=u,n.state=s.ATTRIB_VALUE_QUOTED):(n.opt.unquotedAttributeValues||Z(n,"Unquoted attribute value"),n.state=s.ATTRIB_VALUE_UNQUOTED,n.attribValue=u);continue;case s.ATTRIB_VALUE_QUOTED:if(u!==n.q){u==="&"?n.state=s.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=u;continue}dt(n),n.q="",n.state=s.ATTRIB_VALUE_CLOSED;continue;case s.ATTRIB_VALUE_CLOSED:b(u)?n.state=s.ATTRIB:u===">"?ut(n):u==="/"?n.state=s.OPEN_TAG_SLASH:A(z,u)?(F(n,"No whitespace between attributes"),n.attribName=u,n.attribValue="",n.state=s.ATTRIB_NAME):F(n,"Invalid attribute name");continue;case s.ATTRIB_VALUE_UNQUOTED:if(!P(u)){u==="&"?n.state=s.ATTRIB_VALUE_ENTITY_U:n.attribValue+=u;continue}dt(n),u===">"?ut(n):n.state=s.ATTRIB;continue;case s.CLOSE_TAG:if(n.tagName)u===">"?Et(n):A(E,u)?n.tagName+=u:n.script?(n.script+=""+n.tagName,n.tagName="",n.state=s.SCRIPT):(b(u)||F(n,"Invalid tagname in closing tag"),n.state=s.CLOSE_TAG_SAW_WHITE);else{if(b(u))continue;R(z,u)?n.script?(n.script+=""+u,n.state=s.SCRIPT):F(n,"Invalid tagname in closing tag."):n.tagName=u}continue;case s.CLOSE_TAG_SAW_WHITE:if(b(u))continue;u===">"?Et(n):F(n,"Invalid characters in closing tag");continue;case s.TEXT_ENTITY:case s.ATTRIB_VALUE_ENTITY_Q:case s.ATTRIB_VALUE_ENTITY_U:var Y,tt;switch(n.state){case s.TEXT_ENTITY:Y=s.TEXT,tt="textNode";break;case s.ATTRIB_VALUE_ENTITY_Q:Y=s.ATTRIB_VALUE_QUOTED,tt="attribValue";break;case s.ATTRIB_VALUE_ENTITY_U:Y=s.ATTRIB_VALUE_UNQUOTED,tt="attribValue";break}if(u===";"){var Q=St(n);n.opt.unparsedEntities&&!Object.values(a.XML_ENTITIES).includes(Q)?(n.entity="",n.state=Y,n.write(Q)):(n[tt]+=Q,n.entity="",n.state=Y)}else A(n.entity.length?T:g,u)?n.entity+=u:(F(n,"Invalid character in entity name"),n[tt]+="&"+n.entity+u,n.entity="",n.state=Y);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&L(n),n}String.fromCodePoint||(function(){var i=String.fromCharCode,n=Math.floor,d=function(){var u=16384,U=[],V,Y,tt=-1,Q=arguments.length;if(!Q)return"";for(var ct="";++tt1114111||n(W)!==W)throw RangeError("Invalid code point: "+W);W<=65535?U.push(W):(W-=65536,V=(W>>10)+55296,Y=W%1024+56320,U.push(V,Y)),(tt+1===Q||U.length>u)&&(ct+=i.apply(null,U),U.length=0)}return ct};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:d,configurable:!0,writable:!0}):String.fromCodePoint=d})()})(l)})(Se)),Se}Rr();const Lr={name:"ConfirmationDialog",components:{NcButton:sr,NcModal:or},props:{title:{type:String,required:!0},resolve:{type:Function,required:!0},reject:{type:Function,required:!0},confirmText:{type:String,default:Qt("contacts","Confirm")},disabled:{type:Boolean,default:void 0}},methods:{confirm(){this.resolve()},cancel(){this.reject()}}},Cr={class:"confirm-modal"},Sr={class:"confirm-modal__buttons"};function Dr(l,a,m,N,L,D){const S=fe("NcButton"),_=fe("NcModal");return le(),ce(_,{class:"confirm-modal",onClose:D.cancel},{default:Mt(()=>[$t("div",Cr,[$t("h2",null,xt(m.title),1),Ke(l.$slots,"default",{},void 0,!0),$t("div",Sr,[tr(S,{variant:"tertiary",disabled:m.disabled,onClick:D.cancel},{default:Mt(()=>[he(xt(l.t("contacts","Cancel")),1)]),_:1},8,["disabled","onClick"]),m.resolve?(le(),ce(S,{key:0,disabled:m.disabled,variant:"primary",onClick:D.confirm},{default:Mt(()=>[he(xt(m.confirmText),1)]),_:1},8,["disabled","onClick"])):er("",!0)])])]),_:3},8,["onClose"])}const Br=Je(Lr,[["render",Dr],["__scopeId","data-v-36f53b99"]]),Pr="text/vcard",Fr="contacts-import";Nr(new Ir({id:Fr,displayName:()=>Qt("contacts","Import"),default:te.DEFAULT,enabled:l=>{if(l.length!==1)return!1;const a=l[0];return a.mime===Pr&&a.permissions&Ue.READ},iconSvgInline:()=>ur,async exec(l){let a;try{const m="confirmation-"+Math.random().toString(16).slice(2),N=document.createElement("div");N.id=m,document.body.appendChild(N),await new Promise((L,D)=>{a=rr(Br,{title:Qt("contacts","Are you sure you want to import this contact file?"),resolve:L,reject:D}),a.mixin(nr),a.mount(`#${m}`)}),window.location=ir(`/apps/contacts/import?file=${l.path}`)}catch{}finally{a?.unmount()}return null}}));
//# sourceMappingURL=contacts-files-action.mjs.map