@imgly/idml-importer
Version:
Import IDML files into the Creative Editor Ecosystem
1 lines • 170 kB
JavaScript
import{createRequire as P7}from"node:module";var J7=Object.create;var{getPrototypeOf:V7,defineProperty:ZQ,getOwnPropertyNames:q7}=Object;var X7=Object.prototype.hasOwnProperty;function Y7($){return this[$]}var K7,G7,j7=($,Q,J)=>{var V=$!=null&&typeof $==="object";if(V){var q=Q?K7??=new WeakMap:G7??=new WeakMap,X=q.get($);if(X)return X}J=$!=null?J7(V7($)):{};let Y=Q||!$||!$.__esModule?ZQ(J,"default",{value:$,enumerable:!0}):J;for(let K of q7($))if(!X7.call(Y,K))ZQ(Y,K,{get:Y7.bind($,K),enumerable:!0});if(V)q.set($,Y);return Y};var R=($,Q)=>()=>(Q||$((Q={exports:{}}).exports,Q),Q.exports);var H0=P7(import.meta.url);var E$=R((w3,H1)=>{if(typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0)H1.exports={nextTick:U7};else H1.exports=process;function U7($,Q,J,V){if(typeof $!=="function")throw TypeError('"callback" argument must be a function');var q=arguments.length,X,Y;switch(q){case 0:case 1:return process.nextTick($);case 2:return process.nextTick(function(){$.call(null,Q)});case 3:return process.nextTick(function(){$.call(null,Q,J)});case 4:return process.nextTick(function(){$.call(null,Q,J,V)});default:X=Array(q-1),Y=0;while(Y<X.length)X[Y++]=arguments[Y];return process.nextTick(function(){$.apply(null,X)})}}});var IQ=R((B3,NQ)=>{var W7={}.toString;NQ.exports=Array.isArray||function($){return W7.call($)=="[object Array]"}});var S$=R((Z1,RQ)=>{var z6=H0("buffer"),D0=z6.Buffer;function DQ($,Q){for(var J in $)Q[J]=$[J]}if(D0.from&&D0.alloc&&D0.allocUnsafe&&D0.allocUnsafeSlow)RQ.exports=z6;else DQ(z6,Z1),Z1.Buffer=V$;function V$($,Q,J){return D0($,Q,J)}DQ(D0,V$);V$.from=function($,Q,J){if(typeof $==="number")throw TypeError("Argument must not be a number");return D0($,Q,J)};V$.alloc=function($,Q,J){if(typeof $!=="number")throw TypeError("Argument must be a number");var V=D0($);if(Q!==void 0)if(typeof J==="string")V.fill(Q,J);else V.fill(Q);else V.fill(0);return V};V$.allocUnsafe=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return D0($)};V$.allocUnsafeSlow=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return z6.SlowBuffer($)}});var q$=R((A7)=>{function H7($){if(Array.isArray)return Array.isArray($);return L6($)==="[object Array]"}A7.isArray=H7;function Z7($){return typeof $==="boolean"}A7.isBoolean=Z7;function z7($){return $===null}A7.isNull=z7;function L7($){return $==null}A7.isNullOrUndefined=L7;function O7($){return typeof $==="number"}A7.isNumber=O7;function M7($){return typeof $==="string"}A7.isString=M7;function F7($){return typeof $==="symbol"}A7.isSymbol=F7;function N7($){return $===void 0}A7.isUndefined=N7;function I7($){return L6($)==="[object RegExp]"}A7.isRegExp=I7;function D7($){return typeof $==="object"&&$!==null}A7.isObject=D7;function R7($){return L6($)==="[object Date]"}A7.isDate=R7;function v7($){return L6($)==="[object Error]"||$ instanceof Error}A7.isError=v7;function w7($){return typeof $==="function"}A7.isFunction=w7;function B7($){return $===null||typeof $==="boolean"||typeof $==="number"||typeof $==="string"||typeof $==="symbol"||typeof $>"u"}A7.isPrimitive=B7;A7.isBuffer=H0("buffer").Buffer.isBuffer;function L6($){return Object.prototype.toString.call($)}});var vQ=R((C3,z1)=>{if(typeof Object.create==="function")z1.exports=function(Q,J){if(J)Q.super_=J,Q.prototype=Object.create(J.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}})};else z1.exports=function(Q,J){if(J){Q.super_=J;var V=function(){};V.prototype=J.prototype,Q.prototype=new V,Q.prototype.constructor=Q}}});var X$=R((T3,L1)=>{try{if(O6=H0("util"),typeof O6.inherits!=="function")throw"";L1.exports=O6.inherits}catch($){L1.exports=vQ()}var O6});var BQ=R((E3,O1)=>{function c7($,Q){if(!($ instanceof Q))throw TypeError("Cannot call a class as a function")}var wQ=S$().Buffer,x$=H0("util");function d7($,Q,J){$.copy(Q,J)}O1.exports=function(){function $(){c7(this,$),this.head=null,this.tail=null,this.length=0}return $.prototype.push=function(J){var V={data:J,next:null};if(this.length>0)this.tail.next=V;else this.head=V;this.tail=V,++this.length},$.prototype.unshift=function(J){var V={data:J,next:this.head};if(this.length===0)this.tail=V;this.head=V,++this.length},$.prototype.shift=function(){if(this.length===0)return;var J=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,J},$.prototype.clear=function(){this.head=this.tail=null,this.length=0},$.prototype.join=function(J){if(this.length===0)return"";var V=this.head,q=""+V.data;while(V=V.next)q+=J+V.data;return q},$.prototype.concat=function(J){if(this.length===0)return wQ.alloc(0);var V=wQ.allocUnsafe(J>>>0),q=this.head,X=0;while(q)d7(q.data,V,X),X+=q.data.length,q=q.next;return V},$}();if(x$&&x$.inspect&&x$.inspect.custom)O1.exports.prototype[x$.inspect.custom]=function(){var $=x$.inspect({length:this.length});return this.constructor.name+" "+$}});var M1=R((S3,AQ)=>{var M6=E$();function l7($,Q){var J=this,V=this._readableState&&this._readableState.destroyed,q=this._writableState&&this._writableState.destroyed;if(V||q){if(Q)Q($);else if($){if(!this._writableState)M6.nextTick(F6,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,M6.nextTick(F6,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(X){if(!Q&&X){if(!J._writableState)M6.nextTick(F6,J,X);else if(!J._writableState.errorEmitted)J._writableState.errorEmitted=!0,M6.nextTick(F6,J,X)}else if(Q)Q(X)}),this}function i7(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(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 F6($,Q){$.emit("error",Q)}AQ.exports={destroy:l7,undestroy:i7}});var TQ=R((x3,CQ)=>{CQ.exports=H0("util").deprecate});var N1=R((y3,hQ)=>{var c0=E$();hQ.exports=c;function SQ($){var Q=this;this.next=null,this.entry=null,this.finish=function(){P9(Q,$)}}var o7=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:c0.nextTick,Y$;c.WritableState=k$;var xQ=Object.create(q$());xQ.inherits=X$();var n7={deprecate:TQ()},yQ=H0("stream"),I6=S$().Buffer,r7=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a7($){return I6.from($)}function s7($){return I6.isBuffer($)||$ instanceof r7}var kQ=M1();xQ.inherits(c,yQ);function t7(){}function k$($,Q){Y$=Y$||d0(),$=$||{};var J=Q instanceof Y$;if(this.objectMode=!!$.objectMode,J)this.objectMode=this.objectMode||!!$.writableObjectMode;var{highWaterMark:V,writableHighWaterMark:q}=$,X=this.objectMode?16:16384;if(V||V===0)this.highWaterMark=V;else if(J&&(q||q===0))this.highWaterMark=q;else this.highWaterMark=X;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Y=$.decodeStrings===!1;this.decodeStrings=!Y,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){X9(Q,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new SQ(this)}k$.prototype.getBuffer=function(){var Q=this.bufferedRequest,J=[];while(Q)J.push(Q),Q=Q.next;return J};(function(){try{Object.defineProperty(k$.prototype,"buffer",{get:n7.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var N6;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")N6=Function.prototype[Symbol.hasInstance],Object.defineProperty(c,Symbol.hasInstance,{value:function($){if(N6.call(this,$))return!0;if(this!==c)return!1;return $&&$._writableState instanceof k$}});else N6=function($){return $ instanceof this};function c($){if(Y$=Y$||d0(),!N6.call(c,this)&&!(this instanceof Y$))return new c($);if(this._writableState=new k$($,this),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}yQ.call(this)}c.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function e7($,Q){var J=Error("write after end");$.emit("error",J),c0.nextTick(Q,J)}function $9($,Q,J,V){var q=!0,X=!1;if(J===null)X=TypeError("May not write null values to stream");else if(typeof J!=="string"&&J!==void 0&&!Q.objectMode)X=TypeError("Invalid non-string/buffer chunk");if(X)$.emit("error",X),c0.nextTick(V,X),q=!1;return q}c.prototype.write=function($,Q,J){var V=this._writableState,q=!1,X=!V.objectMode&&s7($);if(X&&!I6.isBuffer($))$=a7($);if(typeof Q==="function")J=Q,Q=null;if(X)Q="buffer";else if(!Q)Q=V.defaultEncoding;if(typeof J!=="function")J=t7;if(V.ended)e7(this,J);else if(X||$9(this,V,$,J))V.pendingcb++,q=J9(this,V,X,$,Q,J);return q};c.prototype.cork=function(){var $=this._writableState;$.corked++};c.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)gQ(this,$)}};c.prototype.setDefaultEncoding=function(Q){if(typeof Q==="string")Q=Q.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Q+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+Q);return this._writableState.defaultEncoding=Q,this};function Q9($,Q,J){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Q==="string")Q=I6.from(Q,J);return Q}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function J9($,Q,J,V,q,X){if(!J){var Y=Q9(Q,V,q);if(V!==Y)J=!0,q="buffer",V=Y}var K=Q.objectMode?1:V.length;Q.length+=K;var P=Q.length<Q.highWaterMark;if(!P)Q.needDrain=!0;if(Q.writing||Q.corked){var G=Q.lastBufferedRequest;if(Q.lastBufferedRequest={chunk:V,encoding:q,isBuf:J,callback:X,next:null},G)G.next=Q.lastBufferedRequest;else Q.bufferedRequest=Q.lastBufferedRequest;Q.bufferedRequestCount+=1}else F1($,Q,!1,K,V,q,X);return P}function F1($,Q,J,V,q,X,Y){if(Q.writelen=V,Q.writecb=Y,Q.writing=!0,Q.sync=!0,J)$._writev(q,Q.onwrite);else $._write(q,X,Q.onwrite);Q.sync=!1}function V9($,Q,J,V,q){if(--Q.pendingcb,J)c0.nextTick(q,V),c0.nextTick(y$,$,Q),$._writableState.errorEmitted=!0,$.emit("error",V);else q(V),$._writableState.errorEmitted=!0,$.emit("error",V),y$($,Q)}function q9($){$.writing=!1,$.writecb=null,$.length-=$.writelen,$.writelen=0}function X9($,Q){var J=$._writableState,V=J.sync,q=J.writecb;if(q9(J),Q)V9($,J,V,Q,q);else{var X=_Q(J);if(!X&&!J.corked&&!J.bufferProcessing&&J.bufferedRequest)gQ($,J);if(V)o7(EQ,$,J,X,q);else EQ($,J,X,q)}}function EQ($,Q,J,V){if(!J)Y9($,Q);Q.pendingcb--,V(),y$($,Q)}function Y9($,Q){if(Q.length===0&&Q.needDrain)Q.needDrain=!1,$.emit("drain")}function gQ($,Q){Q.bufferProcessing=!0;var J=Q.bufferedRequest;if($._writev&&J&&J.next){var V=Q.bufferedRequestCount,q=Array(V),X=Q.corkedRequestsFree;X.entry=J;var Y=0,K=!0;while(J){if(q[Y]=J,!J.isBuf)K=!1;J=J.next,Y+=1}if(q.allBuffers=K,F1($,Q,!0,Q.length,q,"",X.finish),Q.pendingcb++,Q.lastBufferedRequest=null,X.next)Q.corkedRequestsFree=X.next,X.next=null;else Q.corkedRequestsFree=new SQ(Q);Q.bufferedRequestCount=0}else{while(J){var{chunk:P,encoding:G,callback:j}=J,H=Q.objectMode?1:P.length;if(F1($,Q,!1,H,P,G,j),J=J.next,Q.bufferedRequestCount--,Q.writing)break}if(J===null)Q.lastBufferedRequest=null}Q.bufferedRequest=J,Q.bufferProcessing=!1}c.prototype._write=function($,Q,J){J(Error("_write() is not implemented"))};c.prototype._writev=null;c.prototype.end=function($,Q,J){var V=this._writableState;if(typeof $==="function")J=$,$=null,Q=null;else if(typeof Q==="function")J=Q,Q=null;if($!==null&&$!==void 0)this.write($,Q);if(V.corked)V.corked=1,this.uncork();if(!V.ending)j9(this,V,J)};function _Q($){return $.ending&&$.length===0&&$.bufferedRequest===null&&!$.finished&&!$.writing}function K9($,Q){$._final(function(J){if(Q.pendingcb--,J)$.emit("error",J);Q.prefinished=!0,$.emit("prefinish"),y$($,Q)})}function G9($,Q){if(!Q.prefinished&&!Q.finalCalled)if(typeof $._final==="function")Q.pendingcb++,Q.finalCalled=!0,c0.nextTick(K9,$,Q);else Q.prefinished=!0,$.emit("prefinish")}function y$($,Q){var J=_Q(Q);if(J){if(G9($,Q),Q.pendingcb===0)Q.finished=!0,$.emit("finish")}return J}function j9($,Q,J){if(Q.ending=!0,y$($,Q),J)if(Q.finished)c0.nextTick(J);else $.once("finish",J);Q.ended=!0,$.writable=!1}function P9($,Q,J){var V=$.entry;$.entry=null;while(V){var q=V.callback;Q.pendingcb--,q(J),V=V.next}Q.corkedRequestsFree.next=$}Object.defineProperty(c.prototype,"destroyed",{get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function($){if(!this._writableState)return;this._writableState.destroyed=$}});c.prototype.destroy=kQ.destroy;c.prototype._undestroy=kQ.undestroy;c.prototype._destroy=function($,Q){this.end(),Q($)}});var d0=R((k3,mQ)=>{var fQ=E$(),U9=Object.keys||function($){var Q=[];for(var J in $)Q.push(J);return Q};mQ.exports=R0;var bQ=Object.create(q$());bQ.inherits=X$();var pQ=D1(),I1=N1();bQ.inherits(R0,pQ);{D6=U9(I1.prototype);for(g$=0;g$<D6.length;g$++)if(_$=D6[g$],!R0.prototype[_$])R0.prototype[_$]=I1.prototype[_$]}var D6,_$,g$;function R0($){if(!(this instanceof R0))return new R0($);if(pQ.call(this,$),I1.call(this,$),$&&$.readable===!1)this.readable=!1;if($&&$.writable===!1)this.writable=!1;if(this.allowHalfOpen=!0,$&&$.allowHalfOpen===!1)this.allowHalfOpen=!1;this.once("end",W9)}Object.defineProperty(R0.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function W9(){if(this.allowHalfOpen||this._writableState.ended)return;fQ.nextTick(H9,this)}function H9($){$.end()}Object.defineProperty(R0.prototype,"destroyed",{get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function($){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=$,this._writableState.destroyed=$}});R0.prototype._destroy=function($,Q){this.push(null),this.end(),fQ.nextTick(Q,$)}});var w1=R((A9)=>{var v1=S$().Buffer,uQ=v1.isEncoding||function($){switch($=""+$,$&&$.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 Z9($){if(!$)return"utf8";var Q;while(!0)switch($){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 $;default:if(Q)return;$=(""+$).toLowerCase(),Q=!0}}function z9($){var Q=Z9($);if(typeof Q!=="string"&&(v1.isEncoding===uQ||!uQ($)))throw Error("Unknown encoding: "+$);return Q||$}A9.StringDecoder=h$;function h$($){this.encoding=z9($);var Q;switch(this.encoding){case"utf16le":this.text=I9,this.end=D9,Q=4;break;case"utf8":this.fillLast=M9,Q=4;break;case"base64":this.text=R9,this.end=v9,Q=3;break;default:this.write=w9,this.end=B9;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=v1.allocUnsafe(Q)}h$.prototype.write=function($){if($.length===0)return"";var Q,J;if(this.lastNeed){if(Q=this.fillLast($),Q===void 0)return"";J=this.lastNeed,this.lastNeed=0}else J=0;if(J<$.length)return Q?Q+this.text($,J):this.text($,J);return Q||""};h$.prototype.end=N9;h$.prototype.text=F9;h$.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function R1($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function L9($,Q,J){var V=Q.length-1;if(V<J)return 0;var q=R1(Q[V]);if(q>=0){if(q>0)$.lastNeed=q-1;return q}if(--V<J||q===-2)return 0;if(q=R1(Q[V]),q>=0){if(q>0)$.lastNeed=q-2;return q}if(--V<J||q===-2)return 0;if(q=R1(Q[V]),q>=0){if(q>0)if(q===2)q=0;else $.lastNeed=q-3;return q}return 0}function O9($,Q,J){if((Q[0]&192)!==128)return $.lastNeed=0,"�";if($.lastNeed>1&&Q.length>1){if((Q[1]&192)!==128)return $.lastNeed=1,"�";if($.lastNeed>2&&Q.length>2){if((Q[2]&192)!==128)return $.lastNeed=2,"�"}}}function M9($){var Q=this.lastTotal-this.lastNeed,J=O9(this,$,Q);if(J!==void 0)return J;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Q,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Q,0,$.length),this.lastNeed-=$.length}function F9($,Q){var J=L9(this,$,Q);if(!this.lastNeed)return $.toString("utf8",Q);this.lastTotal=J;var V=$.length-(J-this.lastNeed);return $.copy(this.lastChar,0,V),$.toString("utf8",Q,V)}function N9($){var Q=$&&$.length?this.write($):"";if(this.lastNeed)return Q+"�";return Q}function I9($,Q){if(($.length-Q)%2===0){var J=$.toString("utf16le",Q);if(J){var V=J.charCodeAt(J.length-1);if(V>=55296&&V<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],J.slice(0,-1)}return J}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Q,$.length-1)}function D9($){var Q=$&&$.length?this.write($):"";if(this.lastNeed){var J=this.lastTotal-this.lastNeed;return Q+this.lastChar.toString("utf16le",0,J)}return Q}function R9($,Q){var J=($.length-Q)%3;if(J===0)return $.toString("base64",Q);if(this.lastNeed=3-J,this.lastTotal=3,J===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Q,$.length-J)}function v9($){var Q=$&&$.length?this.write($):"";if(this.lastNeed)return Q+this.lastChar.toString("base64",0,3-this.lastNeed);return Q}function w9($){return $.toString(this.encoding)}function B9($){return $&&$.length?this.write($):""}});var D1=R((h3,$5)=>{var G$=E$();$5.exports=h;var T9=IQ(),f$;h.ReadableState=rQ;var _3=H0("events").EventEmitter,iQ=function($,Q){return $.listeners(Q).length},E1=H0("stream"),b$=S$().Buffer,E9=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function S9($){return b$.from($)}function x9($){return b$.isBuffer($)||$ instanceof E9}var oQ=Object.create(q$());oQ.inherits=X$();var B1=H0("util"),g=void 0;if(B1&&B1.debuglog)g=B1.debuglog("stream");else g=function(){};var y9=BQ(),nQ=M1(),K$;oQ.inherits(h,E1);var A1=["error","close","destroy","pause","resume"];function k9($,Q,J){if(typeof $.prependListener==="function")return $.prependListener(Q,J);if(!$._events||!$._events[Q])$.on(Q,J);else if(T9($._events[Q]))$._events[Q].unshift(J);else $._events[Q]=[J,$._events[Q]]}function rQ($,Q){f$=f$||d0(),$=$||{};var J=Q instanceof f$;if(this.objectMode=!!$.objectMode,J)this.objectMode=this.objectMode||!!$.readableObjectMode;var{highWaterMark:V,readableHighWaterMark:q}=$,X=this.objectMode?16:16384;if(V||V===0)this.highWaterMark=V;else if(J&&(q||q===0))this.highWaterMark=q;else this.highWaterMark=X;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y9,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.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!K$)K$=w1().StringDecoder;this.decoder=new K$($.encoding),this.encoding=$.encoding}}function h($){if(f$=f$||d0(),!(this instanceof h))return new h($);if(this._readableState=new rQ($,this),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}E1.call(this)}Object.defineProperty(h.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}});h.prototype.destroy=nQ.destroy;h.prototype._undestroy=nQ.undestroy;h.prototype._destroy=function($,Q){this.push(null),Q($)};h.prototype.push=function($,Q){var J=this._readableState,V;if(!J.objectMode){if(typeof $==="string"){if(Q=Q||J.defaultEncoding,Q!==J.encoding)$=b$.from($,Q),Q="";V=!0}}else V=!0;return aQ(this,$,Q,!1,V)};h.prototype.unshift=function($){return aQ(this,$,null,!0,!1)};function aQ($,Q,J,V,q){var X=$._readableState;if(Q===null)X.reading=!1,f9($,X);else{var Y;if(!q)Y=g9(X,Q);if(Y)$.emit("error",Y);else if(X.objectMode||Q&&Q.length>0){if(typeof Q!=="string"&&!X.objectMode&&Object.getPrototypeOf(Q)!==b$.prototype)Q=S9(Q);if(V)if(X.endEmitted)$.emit("error",Error("stream.unshift() after end event"));else C1($,X,Q,!0);else if(X.ended)$.emit("error",Error("stream.push() after EOF"));else if(X.reading=!1,X.decoder&&!J)if(Q=X.decoder.write(Q),X.objectMode||Q.length!==0)C1($,X,Q,!1);else sQ($,X);else C1($,X,Q,!1)}else if(!V)X.reading=!1}return _9(X)}function C1($,Q,J,V){if(Q.flowing&&Q.length===0&&!Q.sync)$.emit("data",J),$.read(0);else{if(Q.length+=Q.objectMode?1:J.length,V)Q.buffer.unshift(J);else Q.buffer.push(J);if(Q.needReadable)R6($)}sQ($,Q)}function g9($,Q){var J;if(!x9(Q)&&typeof Q!=="string"&&Q!==void 0&&!$.objectMode)J=TypeError("Invalid non-string/buffer chunk");return J}function _9($){return!$.ended&&($.needReadable||$.length<$.highWaterMark||$.length===0)}h.prototype.isPaused=function(){return this._readableState.flowing===!1};h.prototype.setEncoding=function($){if(!K$)K$=w1().StringDecoder;return this._readableState.decoder=new K$($),this._readableState.encoding=$,this};var cQ=8388608;function h9($){if($>=cQ)$=cQ;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function dQ($,Q){if($<=0||Q.length===0&&Q.ended)return 0;if(Q.objectMode)return 1;if($!==$)if(Q.flowing&&Q.length)return Q.buffer.head.data.length;else return Q.length;if($>Q.highWaterMark)Q.highWaterMark=h9($);if($<=Q.length)return $;if(!Q.ended)return Q.needReadable=!0,0;return Q.length}h.prototype.read=function($){g("read",$),$=parseInt($,10);var Q=this._readableState,J=$;if($!==0)Q.emittedReadable=!1;if($===0&&Q.needReadable&&(Q.length>=Q.highWaterMark||Q.ended)){if(g("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended)T1(this);else R6(this);return null}if($=dQ($,Q),$===0&&Q.ended){if(Q.length===0)T1(this);return null}var V=Q.needReadable;if(g("need readable",V),Q.length===0||Q.length-$<Q.highWaterMark)V=!0,g("length less than watermark",V);if(Q.ended||Q.reading)V=!1,g("reading or ended",V);else if(V){if(g("do read"),Q.reading=!0,Q.sync=!0,Q.length===0)Q.needReadable=!0;if(this._read(Q.highWaterMark),Q.sync=!1,!Q.reading)$=dQ(J,Q)}var q;if($>0)q=tQ($,Q);else q=null;if(q===null)Q.needReadable=!0,$=0;else Q.length-=$;if(Q.length===0){if(!Q.ended)Q.needReadable=!0;if(J!==$&&Q.ended)T1(this)}if(q!==null)this.emit("data",q);return q};function f9($,Q){if(Q.ended)return;if(Q.decoder){var J=Q.decoder.end();if(J&&J.length)Q.buffer.push(J),Q.length+=Q.objectMode?1:J.length}Q.ended=!0,R6($)}function R6($){var Q=$._readableState;if(Q.needReadable=!1,!Q.emittedReadable)if(g("emitReadable",Q.flowing),Q.emittedReadable=!0,Q.sync)G$.nextTick(lQ,$);else lQ($)}function lQ($){g("emit readable"),$.emit("readable"),S1($)}function sQ($,Q){if(!Q.readingMore)Q.readingMore=!0,G$.nextTick(b9,$,Q)}function b9($,Q){var J=Q.length;while(!Q.reading&&!Q.flowing&&!Q.ended&&Q.length<Q.highWaterMark)if(g("maybeReadMore read 0"),$.read(0),J===Q.length)break;else J=Q.length;Q.readingMore=!1}h.prototype._read=function($){this.emit("error",Error("_read() is not implemented"))};h.prototype.pipe=function($,Q){var J=this,V=this._readableState;switch(V.pipesCount){case 0:V.pipes=$;break;case 1:V.pipes=[V.pipes,$];break;default:V.pipes.push($);break}V.pipesCount+=1,g("pipe count=%d opts=%j",V.pipesCount,Q);var q=(!Q||Q.end!==!1)&&$!==process.stdout&&$!==process.stderr,X=q?K:I;if(V.endEmitted)G$.nextTick(X);else J.once("end",X);$.on("unpipe",Y);function Y(Z,L){if(g("onunpipe"),Z===J){if(L&&L.hasUnpiped===!1)L.hasUnpiped=!0,j()}}function K(){g("onend"),$.end()}var P=p9(J);$.on("drain",P);var G=!1;function j(){if(g("cleanup"),$.removeListener("close",z),$.removeListener("finish",O),$.removeListener("drain",P),$.removeListener("error",W),$.removeListener("unpipe",Y),J.removeListener("end",K),J.removeListener("end",I),J.removeListener("data",U),G=!0,V.awaitDrain&&(!$._writableState||$._writableState.needDrain))P()}var H=!1;J.on("data",U);function U(Z){g("ondata"),H=!1;var L=$.write(Z);if(L===!1&&!H){if((V.pipesCount===1&&V.pipes===$||V.pipesCount>1&&eQ(V.pipes,$)!==-1)&&!G)g("false write response, pause",V.awaitDrain),V.awaitDrain++,H=!0;J.pause()}}function W(Z){if(g("onerror",Z),I(),$.removeListener("error",W),iQ($,"error")===0)$.emit("error",Z)}k9($,"error",W);function z(){$.removeListener("finish",O),I()}$.once("close",z);function O(){g("onfinish"),$.removeListener("close",z),I()}$.once("finish",O);function I(){g("unpipe"),J.unpipe($)}if($.emit("pipe",J),!V.flowing)g("pipe resume"),J.resume();return $};function p9($){return function(){var Q=$._readableState;if(g("pipeOnDrain",Q.awaitDrain),Q.awaitDrain)Q.awaitDrain--;if(Q.awaitDrain===0&&iQ($,"data"))Q.flowing=!0,S1($)}}h.prototype.unpipe=function($){var Q=this._readableState,J={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1){if($&&$!==Q.pipes)return this;if(!$)$=Q.pipes;if(Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,$)$.emit("unpipe",this,J);return this}if(!$){var{pipes:V,pipesCount:q}=Q;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var X=0;X<q;X++)V[X].emit("unpipe",this,{hasUnpiped:!1});return this}var Y=eQ(Q.pipes,$);if(Y===-1)return this;if(Q.pipes.splice(Y,1),Q.pipesCount-=1,Q.pipesCount===1)Q.pipes=Q.pipes[0];return $.emit("unpipe",this,J),this};h.prototype.on=function($,Q){var J=E1.prototype.on.call(this,$,Q);if($==="data"){if(this._readableState.flowing!==!1)this.resume()}else if($==="readable"){var V=this._readableState;if(!V.endEmitted&&!V.readableListening){if(V.readableListening=V.needReadable=!0,V.emittedReadable=!1,!V.reading)G$.nextTick(m9,this);else if(V.length)R6(this)}}return J};h.prototype.addListener=h.prototype.on;function m9($){g("readable nexttick read 0"),$.read(0)}h.prototype.resume=function(){var $=this._readableState;if(!$.flowing)g("resume"),$.flowing=!0,u9(this,$);return this};function u9($,Q){if(!Q.resumeScheduled)Q.resumeScheduled=!0,G$.nextTick(c9,$,Q)}function c9($,Q){if(!Q.reading)g("resume read 0"),$.read(0);if(Q.resumeScheduled=!1,Q.awaitDrain=0,$.emit("resume"),S1($),Q.flowing&&!Q.reading)$.read(0)}h.prototype.pause=function(){if(g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)g("pause"),this._readableState.flowing=!1,this.emit("pause");return this};function S1($){var Q=$._readableState;g("flow",Q.flowing);while(Q.flowing&&$.read()!==null);}h.prototype.wrap=function($){var Q=this,J=this._readableState,V=!1;$.on("end",function(){if(g("wrapped end"),J.decoder&&!J.ended){var Y=J.decoder.end();if(Y&&Y.length)Q.push(Y)}Q.push(null)}),$.on("data",function(Y){if(g("wrapped data"),J.decoder)Y=J.decoder.write(Y);if(J.objectMode&&(Y===null||Y===void 0))return;else if(!J.objectMode&&(!Y||!Y.length))return;var K=Q.push(Y);if(!K)V=!0,$.pause()});for(var q in $)if(this[q]===void 0&&typeof $[q]==="function")this[q]=function(Y){return function(){return $[Y].apply($,arguments)}}(q);for(var X=0;X<A1.length;X++)$.on(A1[X],this.emit.bind(this,A1[X]));return this._read=function(Y){if(g("wrapped _read",Y),V)V=!1,$.resume()},this};Object.defineProperty(h.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});h._fromList=tQ;function tQ($,Q){if(Q.length===0)return null;var J;if(Q.objectMode)J=Q.buffer.shift();else if(!$||$>=Q.length){if(Q.decoder)J=Q.buffer.join("");else if(Q.buffer.length===1)J=Q.buffer.head.data;else J=Q.buffer.concat(Q.length);Q.buffer.clear()}else J=d9($,Q.buffer,Q.decoder);return J}function d9($,Q,J){var V;if($<Q.head.data.length)V=Q.head.data.slice(0,$),Q.head.data=Q.head.data.slice($);else if($===Q.head.data.length)V=Q.shift();else V=J?l9($,Q):i9($,Q);return V}function l9($,Q){var J=Q.head,V=1,q=J.data;$-=q.length;while(J=J.next){var X=J.data,Y=$>X.length?X.length:$;if(Y===X.length)q+=X;else q+=X.slice(0,$);if($-=Y,$===0){if(Y===X.length)if(++V,J.next)Q.head=J.next;else Q.head=Q.tail=null;else Q.head=J,J.data=X.slice(Y);break}++V}return Q.length-=V,q}function i9($,Q){var J=b$.allocUnsafe($),V=Q.head,q=1;V.data.copy(J),$-=V.data.length;while(V=V.next){var X=V.data,Y=$>X.length?X.length:$;if(X.copy(J,J.length-$,0,Y),$-=Y,$===0){if(Y===X.length)if(++q,V.next)Q.head=V.next;else Q.head=Q.tail=null;else Q.head=V,V.data=X.slice(Y);break}++q}return Q.length-=q,J}function T1($){var Q=$._readableState;if(Q.length>0)throw Error('"endReadable()" called on non-empty stream');if(!Q.endEmitted)Q.ended=!0,G$.nextTick(o9,Q,$)}function o9($,Q){if(!$.endEmitted&&$.length===0)$.endEmitted=!0,Q.readable=!1,Q.emit("end")}function eQ($,Q){for(var J=0,V=$.length;J<V;J++)if($[J]===Q)return J;return-1}});var x1=R((f3,V5)=>{V5.exports=v0;var v6=d0(),J5=Object.create(q$());J5.inherits=X$();J5.inherits(v0,v6);function n9($,Q){var J=this._transformState;J.transforming=!1;var V=J.writecb;if(!V)return this.emit("error",Error("write callback called multiple times"));if(J.writechunk=null,J.writecb=null,Q!=null)this.push(Q);V($);var q=this._readableState;if(q.reading=!1,q.needReadable||q.length<q.highWaterMark)this._read(q.highWaterMark)}function v0($){if(!(this instanceof v0))return new v0($);if(v6.call(this,$),this._transformState={afterTransform:n9.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,$){if(typeof $.transform==="function")this._transform=$.transform;if(typeof $.flush==="function")this._flush=$.flush}this.on("prefinish",r9)}function r9(){var $=this;if(typeof this._flush==="function")this._flush(function(Q,J){Q5($,Q,J)});else Q5(this,null,null)}v0.prototype.push=function($,Q){return this._transformState.needTransform=!1,v6.prototype.push.call(this,$,Q)};v0.prototype._transform=function($,Q,J){throw Error("_transform() is not implemented")};v0.prototype._write=function($,Q,J){var V=this._transformState;if(V.writecb=J,V.writechunk=$,V.writeencoding=Q,!V.transforming){var q=this._readableState;if(V.needTransform||q.needReadable||q.length<q.highWaterMark)this._read(q.highWaterMark)}};v0.prototype._read=function($){var Q=this._transformState;if(Q.writechunk!==null&&Q.writecb&&!Q.transforming)Q.transforming=!0,this._transform(Q.writechunk,Q.writeencoding,Q.afterTransform);else Q.needTransform=!0};v0.prototype._destroy=function($,Q){var J=this;v6.prototype._destroy.call(this,$,function(V){Q(V),J.emit("close")})};function Q5($,Q,J){if(Q)return $.emit("error",Q);if(J!=null)$.push(J);if($._writableState.length)throw Error("Calling transform done when ws.length != 0");if($._transformState.transforming)throw Error("Calling transform done when still transforming");return $.push(null)}});var K5=R((b3,Y5)=>{Y5.exports=p$;var q5=x1(),X5=Object.create(q$());X5.inherits=X$();X5.inherits(p$,q5);function p$($){if(!(this instanceof p$))return new p$($);q5.call(this,$)}p$.prototype._transform=function($,Q,J){J(null,$)}});var y1=R((n,w6)=>{var Z0=H0("stream");if(process.env.READABLE_STREAM==="disable"&&Z0)w6.exports=Z0,n=w6.exports=Z0.Readable,n.Readable=Z0.Readable,n.Writable=Z0.Writable,n.Duplex=Z0.Duplex,n.Transform=Z0.Transform,n.PassThrough=Z0.PassThrough,n.Stream=Z0;else n=w6.exports=D1(),n.Stream=Z0||n,n.Readable=n,n.Writable=N1(),n.Duplex=d0(),n.Transform=x1(),n.PassThrough=K5()});var w0=R((s9)=>{s9.base64=!0;s9.array=!0;s9.string=!0;s9.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";s9.nodebuffer=typeof Buffer<"u";s9.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")s9.blob=!1;else{B6=new ArrayBuffer(0);try{s9.blob=new Blob([B6],{type:"application/zip"}).size===0}catch($){try{g1=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,A6=new g1,A6.append(B6),s9.blob=A6.getBlob("application/zip").size===0}catch(Q){s9.blob=!1}}}var B6,g1,A6;try{s9.nodestream=!!y1().Readable}catch($){s9.nodestream=!1}});var _1=R((YX)=>{var qX=p(),XX=w0(),z0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";YX.encode=function($){var Q=[],J,V,q,X,Y,K,P,G=0,j=$.length,H=j,U=qX.getTypeOf($)!=="string";while(G<$.length){if(H=j-G,!U)J=$.charCodeAt(G++),V=G<j?$.charCodeAt(G++):0,q=G<j?$.charCodeAt(G++):0;else J=$[G++],V=G<j?$[G++]:0,q=G<j?$[G++]:0;X=J>>2,Y=(J&3)<<4|V>>4,K=H>1?(V&15)<<2|q>>6:64,P=H>2?q&63:64,Q.push(z0.charAt(X)+z0.charAt(Y)+z0.charAt(K)+z0.charAt(P))}return Q.join("")};YX.decode=function($){var Q,J,V,q,X,Y,K,P=0,G=0,j="data:";if($.substr(0,j.length)===j)throw Error("Invalid base64 input, it looks like a data url.");$=$.replace(/[^A-Za-z0-9+/=]/g,"");var H=$.length*3/4;if($.charAt($.length-1)===z0.charAt(64))H--;if($.charAt($.length-2)===z0.charAt(64))H--;if(H%1!==0)throw Error("Invalid base64 input, bad content length.");var U;if(XX.uint8array)U=new Uint8Array(H|0);else U=Array(H|0);while(P<$.length){if(q=z0.indexOf($.charAt(P++)),X=z0.indexOf($.charAt(P++)),Y=z0.indexOf($.charAt(P++)),K=z0.indexOf($.charAt(P++)),Q=q<<2|X>>4,J=(X&15)<<4|Y>>2,V=(Y&3)<<6|K,U[G++]=Q,Y!==64)U[G++]=J;if(K!==64)U[G++]=V}return U}});var m$=R((u3,G5)=>{G5.exports={isNode:typeof Buffer<"u",newBufferFrom:function($,Q){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from($,Q);else{if(typeof $==="number")throw Error('The "data" argument must not be a number');return new Buffer($,Q)}},allocBuffer:function($){if(Buffer.alloc)return Buffer.alloc($);else{var Q=new Buffer($);return Q.fill(0),Q}},isBuffer:function($){return Buffer.isBuffer($)},isStream:function($){return $&&typeof $.on==="function"&&typeof $.pause==="function"&&typeof $.resume==="function"}}});var U5=R((d3,P5)=>{var c3=global.MutationObserver||global.WebKitMutationObserver,j5;j5=function(){process.nextTick(HX)};var jX,PX,UX,WX,h1,u$=[];function HX(){h1=!0;var $,Q,J=u$.length;while(J){Q=u$,u$=[],$=-1;while(++$<J)Q[$]();J=u$.length}h1=!1}P5.exports=ZX;function ZX($){if(u$.push($)===1&&!h1)j5()}});var M5=R((l3,O5)=>{var W5=U5();function P$(){}var a={},H5=["REJECTED"],f1=["FULFILLED"],Z5=["PENDING"];j$=["UNHANDLED"];var j$;O5.exports=E0;function E0($){if(typeof $!=="function")throw TypeError("resolver must be a function");if(this.state=Z5,this.queue=[],this.outcome=void 0,this.handled=j$,$!==P$)z5(this,$)}E0.prototype.finally=function($){if(typeof $!=="function")return this;var Q=this.constructor;return this.then(J,V);function J(q){function X(){return q}return Q.resolve($()).then(X)}function V(q){function X(){throw q}return Q.resolve($()).then(X)}};E0.prototype.catch=function($){return this.then(null,$)};E0.prototype.then=function($,Q){if(typeof $!=="function"&&this.state===f1||typeof Q!=="function"&&this.state===H5)return this;var J=new this.constructor(P$);if(this.handled===j$)this.handled=null;if(this.state!==Z5){var V=this.state===f1?$:Q;b1(J,V,this.outcome)}else this.queue.push(new c$(J,$,Q));return J};function c$($,Q,J){if(this.promise=$,typeof Q==="function")this.onFulfilled=Q,this.callFulfilled=this.otherCallFulfilled;if(typeof J==="function")this.onRejected=J,this.callRejected=this.otherCallRejected}c$.prototype.callFulfilled=function($){a.resolve(this.promise,$)};c$.prototype.otherCallFulfilled=function($){b1(this.promise,this.onFulfilled,$)};c$.prototype.callRejected=function($){a.reject(this.promise,$)};c$.prototype.otherCallRejected=function($){b1(this.promise,this.onRejected,$)};function b1($,Q,J){W5(function(){var V;try{V=Q(J)}catch(q){return a.reject($,q)}if(V===$)a.reject($,TypeError("Cannot resolve promise with itself"));else a.resolve($,V)})}a.resolve=function($,Q){var J=L5(zX,Q);if(J.status==="error")return a.reject($,J.value);var V=J.value;if(V)z5($,V);else{$.state=f1,$.outcome=Q;var q=-1,X=$.queue.length;while(++q<X)$.queue[q].callFulfilled(Q)}return $};a.reject=function($,Q){if($.state=H5,$.outcome=Q,$.handled===j$)W5(function(){if($.handled===j$)process.emit("unhandledRejection",Q,$)});var J=-1,V=$.queue.length;while(++J<V)$.queue[J].callRejected(Q);return $};function zX($){var Q=$&&$.then;if($&&(typeof $==="object"||typeof $==="function")&&typeof Q==="function")return function(){Q.apply($,arguments)}}function z5($,Q){var J=!1;function V(K){if(J)return;J=!0,a.reject($,K)}function q(K){if(J)return;J=!0,a.resolve($,K)}function X(){Q(q,V)}var Y=L5(X);if(Y.status==="error")V(Y.value)}function L5($,Q){var J={};try{J.value=$(Q),J.status="success"}catch(V){J.status="error",J.value=V}return J}E0.resolve=LX;function LX($){if($ instanceof this)return $;return a.resolve(new this(P$),$)}E0.reject=OX;function OX($){var Q=new this(P$);return a.reject(Q,$)}E0.all=MX;function MX($){var Q=this;if(Object.prototype.toString.call($)!=="[object Array]")return this.reject(TypeError("must be an array"));var J=$.length,V=!1;if(!J)return this.resolve([]);var q=Array(J),X=0,Y=-1,K=new this(P$);while(++Y<J)P($[Y],Y);return K;function P(G,j){Q.resolve(G).then(H,function(U){if(!V)V=!0,a.reject(K,U)});function H(U){if(q[j]=U,++X===J&&!V)V=!0,a.resolve(K,q)}}}E0.race=FX;function FX($){var Q=this;if(Object.prototype.toString.call($)!=="[object Array]")return this.reject(TypeError("must be an array"));var J=$.length,V=!1;if(!J)return this.resolve([]);var q=-1,X=new this(P$);while(++q<J)Y($[q]);return X;function Y(K){Q.resolve(K).then(function(P){if(!V)V=!0,a.resolve(X,P)},function(P){if(!V)V=!0,a.reject(X,P)})}}});var U$=R((i3,F5)=>{var p1=null;if(typeof Promise<"u")p1=Promise;else p1=M5();F5.exports={Promise:p1}});var I5=R((N5)=>{(function($,Q){if($.setImmediate)return;var J=1,V={},q=!1,X=$.document,Y;function K(L){if(typeof L!=="function")L=Function(""+L);var N=Array(arguments.length-1);for(var M=0;M<N.length;M++)N[M]=arguments[M+1];var F={callback:L,args:N};return V[J]=F,Y(J),J++}function P(L){delete V[L]}function G(L){var{callback:N,args:M}=L;switch(M.length){case 0:N();break;case 1:N(M[0]);break;case 2:N(M[0],M[1]);break;case 3:N(M[0],M[1],M[2]);break;default:N.apply(Q,M);break}}function j(L){if(q)setTimeout(j,0,L);else{var N=V[L];if(N){q=!0;try{G(N)}finally{P(L),q=!1}}}}function H(){Y=function(L){process.nextTick(function(){j(L)})}}function U(){if($.postMessage&&!$.importScripts){var L=!0,N=$.onmessage;return $.onmessage=function(){L=!1},$.postMessage("","*"),$.onmessage=N,L}}function W(){var L="setImmediate$"+Math.random()+"$",N=function(M){if(M.source===$&&typeof M.data==="string"&&M.data.indexOf(L)===0)j(+M.data.slice(L.length))};if($.addEventListener)$.addEventListener("message",N,!1);else $.attachEvent("onmessage",N);Y=function(M){$.postMessage(L+M,"*")}}function z(){var L=new MessageChannel;L.port1.onmessage=function(N){var M=N.data;j(M)},Y=function(N){L.port2.postMessage(N)}}function O(){var L=X.documentElement;Y=function(N){var M=X.createElement("script");M.onreadystatechange=function(){j(N),M.onreadystatechange=null,L.removeChild(M),M=null},L.appendChild(M)}}function I(){Y=function(L){setTimeout(j,0,L)}}var Z=Object.getPrototypeOf&&Object.getPrototypeOf($);if(Z=Z&&Z.setTimeout?Z:$,{}.toString.call($.process)==="[object process]")H();else if(U())W();else if($.MessageChannel)z();else if(X&&"onreadystatechange"in X.createElement("script"))O();else I();Z.setImmediate=K,Z.clearImmediate=P})(typeof self>"u"?typeof global>"u"?N5:global:self)});var p=R((DX)=>{var S0=w0(),NX=_1(),W$=m$(),m1=U$();I5();function IX($){var Q=null;if(S0.uint8array)Q=new Uint8Array($.length);else Q=Array($.length);return T6($,Q)}DX.newBlob=function($,Q){DX.checkSupport("blob");try{return new Blob([$],{type:Q})}catch(q){try{var J=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,V=new J;return V.append($),V.getBlob(Q)}catch(X){throw Error("Bug : can't construct the Blob.")}}};function d$($){return $}function T6($,Q){for(var J=0;J<$.length;++J)Q[J]=$.charCodeAt(J)&255;return Q}var C6={stringifyByChunk:function($,Q,J){var V=[],q=0,X=$.length;if(X<=J)return String.fromCharCode.apply(null,$);while(q<X){if(Q==="array"||Q==="nodebuffer")V.push(String.fromCharCode.apply(null,$.slice(q,Math.min(q+J,X))));else V.push(String.fromCharCode.apply(null,$.subarray(q,Math.min(q+J,X))));q+=J}return V.join("")},stringifyByChar:function($){var Q="";for(var J=0;J<$.length;J++)Q+=String.fromCharCode($[J]);return Q},applyCanBeUsed:{uint8array:function(){try{return S0.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch($){return!1}}(),nodebuffer:function(){try{return S0.nodebuffer&&String.fromCharCode.apply(null,W$.allocBuffer(1)).length===1}catch($){return!1}}()}};function l$($){var Q=65536,J=DX.getTypeOf($),V=!0;if(J==="uint8array")V=C6.applyCanBeUsed.uint8array;else if(J==="nodebuffer")V=C6.applyCanBeUsed.nodebuffer;if(V)while(Q>1)try{return C6.stringifyByChunk($,J,Q)}catch(q){Q=Math.floor(Q/2)}return C6.stringifyByChar($)}DX.applyFromCharCode=l$;function E6($,Q){for(var J=0;J<$.length;J++)Q[J]=$[J];return Q}var x0={};x0.string={string:d$,array:function($){return T6($,Array($.length))},arraybuffer:function($){return x0.string.uint8array($).buffer},uint8array:function($){return T6($,new Uint8Array($.length))},nodebuffer:function($){return T6($,W$.allocBuffer($.length))}};x0.array={string:l$,array:d$,arraybuffer:function($){return new Uint8Array($).buffer},uint8array:function($){return new Uint8Array($)},nodebuffer:function($){return W$.newBufferFrom($)}};x0.arraybuffer={string:function($){return l$(new Uint8Array($))},array:function($){return E6(new Uint8Array($),Array($.byteLength))},arraybuffer:d$,uint8array:function($){return new Uint8Array($)},nodebuffer:function($){return W$.newBufferFrom(new Uint8Array($))}};x0.uint8array={string:l$,array:function($){return E6($,Array($.length))},arraybuffer:function($){return $.buffer},uint8array:d$,nodebuffer:function($){return W$.newBufferFrom($)}};x0.nodebuffer={string:l$,array:function($){return E6($,Array($.length))},arraybuffer:function($){return x0.nodebuffer.uint8array($).buffer},uint8array:function($){return E6($,new Uint8Array($.length))},nodebuffer:d$};DX.transformTo=function($,Q){if(!Q)Q="";if(!$)return Q;DX.checkSupport($);var J=DX.getTypeOf(Q),V=x0[J][$](Q);return V};DX.resolve=function($){var Q=$.split("/"),J=[];for(var V=0;V<Q.length;V++){var q=Q[V];if(q==="."||q===""&&V!==0&&V!==Q.length-1)continue;else if(q==="..")J.pop();else J.push(q)}return J.join("/")};DX.getTypeOf=function($){if(typeof $==="string")return"string";if(Object.prototype.toString.call($)==="[object Array]")return"array";if(S0.nodebuffer&&W$.isBuffer($))return"nodebuffer";if(S0.uint8array&&$ instanceof Uint8Array)return"uint8array";if(S0.arraybuffer&&$ instanceof ArrayBuffer)return"arraybuffer"};DX.checkSupport=function($){var Q=S0[$.toLowerCase()];if(!Q)throw Error($+" is not supported by this platform")};DX.MAX_VALUE_16BITS=65535;DX.MAX_VALUE_32BITS=-1;DX.pretty=function($){var Q="",J,V;for(V=0;V<($||"").length;V++)J=$.charCodeAt(V),Q+="\\x"+(J<16?"0":"")+J.toString(16).toUpperCase();return Q};DX.delay=function($,Q,J){setImmediate(function(){$.apply(J||null,Q||[])})};DX.inherits=function($,Q){var J=function(){};J.prototype=Q.prototype,$.prototype=new J};DX.extend=function(){var $={},Q,J;for(Q=0;Q<arguments.length;Q++)for(J in arguments[Q])if(Object.prototype.hasOwnProperty.call(arguments[Q],J)&&typeof $[J]>"u")$[J]=arguments[Q][J];return $};DX.prepareContent=function($,Q,J,V,q){var X=m1.Promise.resolve(Q).then(function(Y){var K=S0.blob&&(Y instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(Y))!==-1);if(K&&typeof FileReader<"u")return new m1.Promise(function(P,G){var j=new FileReader;j.onload=function(H){P(H.target.result)},j.onerror=function(H){G(H.target.error)},j.readAsArrayBuffer(Y)});else return Y});return X.then(function(Y){var K=DX.getTypeOf(Y);if(!K)return m1.Promise.reject(Error("Can't read the data of '"+$+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));if(K==="arraybuffer")Y=DX.transformTo("uint8array",Y);else if(K==="string"){if(q)Y=NX.decode(Y);else if(J){if(V!==!0)Y=IX(Y)}}return Y})}});var e=R((r3,w5)=>{function v5($){this.name=$||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}v5.prototype={push:function($){this.emit("data",$)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch($){this.emit("error",$)}return!0},error:function($){if(this.isFinished)return!1;if(this.isPaused)this.generatedError=$;else{if(this.isFinished=!0,this.emit("error",$),this.previous)this.previous.error($);this.cleanUp()}return!0},on:function($,Q){return this._listeners[$].push(Q),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function($,Q){if(this._listeners[$])for(var J=0;J<this._listeners[$].length;J++)this._listeners[$][J].call(this,Q)},pipe:function($){return $.registerPrevious(this)},registerPrevious:function($){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");this.streamInfo=$.streamInfo,this.mergeStreamInfo(),this.previous=$;var Q=this;return $.on("data",function(J){Q.processChunk(J)}),$.on("end",function(){Q.end()}),$.on("error",function(J){Q.error(J)}),this},pause:function(){if(this.isPaused||this.isFinished)return!1;if(this.isPaused=!0,this.previous)this.previous.pause();return!0},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var $=!1;if(this.generatedError)this.error(this.generatedError),$=!0;if(this.previous)this.previous.resume();return!$},flush:function(){},processChunk:function($){this.push($)},withStreamInfo:function($,Q){return this.extraStreamInfo[$]=Q,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var $ in this.extraStreamInfo){if(!Object.prototype.hasOwnProperty.call(this.extraStreamInfo,$))continue;this.streamInfo[$]=this.extraStreamInfo[$]}},lock:function(){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");if(this.isLocked=!0,this.previous)this.previous.lock()},toString:function(){var $="Worker "+this.name;if(this.previous)return this.previous+" -> "+$;else return $}};w5.exports=v5});var Z$=R((hX)=>{var H$=p(),l0=w0(),yX=m$(),S6=e(),i$=Array(256);for(L0=0;L0<256;L0++)i$[L0]=L0>=252?6:L0>=248?5:L0>=240?4:L0>=224?3:L0>=192?2:1;var L0;i$[254]=i$[254]=1;var kX=function($){var Q,J,V,q,X,Y=$.length,K=0;for(q=0;q<Y;q++){if(J=$.charCodeAt(q),(J&64512)===55296&&q+1<Y){if(V=$.charCodeAt(q+1),(V&64512)===56320)J=65536+(J-55296<<10)+(V-56320),q++}K+=J<128?1:J<2048?2:J<65536?3:4}if(l0.uint8array)Q=new Uint8Array(K);else Q=Array(K);for(X=0,q=0;X<K;q++){if(J=$.charCodeAt(q),(J&64512)===55296&&q+1<Y){if(V=$.charCodeAt(q+1),(V&64512)===56320)J=65536+(J-55296<<10)+(V-56320),q++}if(J<128)Q[X++]=J;else if(J<2048)Q[X++]=192|J>>>6,Q[X++]=128|J&63;else if(J<65536)Q[X++]=224|J>>>12,Q[X++]=128|J>>>6&63,Q[X++]=128|J&63;else Q[X++]=240|J>>>18,Q[X++]=128|J>>>12&63,Q[X++]=128|J>>>6&63,Q[X++]=128|J&63}return Q},gX=function($,Q){var J;if(Q=Q||$.length,Q>$.length)Q=$.length;J=Q-1;while(J>=0&&($[J]&192)===128)J--;if(J<0)return Q;if(J===0)return Q;return J+i$[$[J]]>Q?J:Q},_X=function($){var Q,J,V,q,X=$.length,Y=Array(X*2);for(J=0,Q=0;Q<X;){if(V=$[Q++],V<128){Y[J++]=V;continue}if(q=i$[V],q>4){Y[J++]=65533,Q+=q-1;continue}V&=q===2?31:q===3?15:7;while(q>1&&Q<X)V=V<<6|$[Q++]&63,q--;if(q>1){Y[J++]=65533;continue}if(V<65536)Y[J++]=V;else V-=65536,Y[J++]=55296|V>>10&1023,Y[J++]=56320|V&1023}if(Y.length!==J)if(Y.subarray)Y=Y.subarray(0,J);else Y.length=J;return H$.applyFromCharCode(Y)};hX.utf8encode=function(Q){if(l0.nodebuffer)return yX.newBufferFrom(Q,"utf-8");return kX(Q)};hX.utf8decode=function(Q){if(l0.nodebuffer)return H$.transformTo("nodebuffer",Q).toString("utf-8");return Q=H$.transformTo(l0.uint8array?"uint8array":"array",Q),_X(Q)};function x6(){S6.call(this,"utf-8 decode"),this.leftOver=null}H$.inherits(x6,S6);x6.prototype.processChunk=function($){var Q=H$.transformTo(l0.uint8array?"uint8array":"array",$.data);if(this.leftOver&&this.leftOver.length){if(l0.uint8array){var J=Q;Q=new Uint8Array(J.length+this.leftOver.length),Q.set(this.leftOver,0),Q.set(J,this.leftOver.length)}else Q=this.leftOver.concat(Q);this.leftOver=null}var V=gX(Q),q=Q;if(V!==Q.length)if(l0.uint8array)q=Q.subarray(0,V),this.leftOver=Q.subarray(V,Q.length);else q=Q.slice(0,V),this.leftOver=Q.slice(V,Q.length);this.push({data:hX.utf8decode(q),meta:$.meta})};x6.prototype.flush=function(){if(this.leftOver&&this.leftOver.length)this.push({data:hX.utf8decode(this.leftOver),meta:{}}),this.leftOver=null};hX.Utf8DecodeWorker=x6;function c1(){S6.call(this,"utf-8 encode")}H$.inherits(c1,S6);c1.prototype.processChunk=function($){this.push({data:hX.utf8encode($.data),meta:$.meta})};hX.Utf8EncodeWorker=c1});var E5=R((s3,T5)=>{var A5=e(),C5=p();function l1($){A5.call(this,"ConvertWorker to "+$),this.destType=$}C5.inherits(l1,A5);l1.prototype.processChunk=function($){this.push(