handler-playable-sdk 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{c as qa,d as Ne,e as Ga}from"./chunk-DEUORFXE.js";import{i as ar}from"./chunk-DHSGG7NF.js";import{c as et,d as Wa,g as ic,h as Ya,j as Va,l as nc,m as rc,n as Ka,o as ac}from"./chunk-PWGHKK3J.js";import{a as Fe,b as R,c as ig}from"./chunk-Q7FPWOA3.js";var tn=R(($0,ns)=>{"use strict";typeof process=="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?ns.exports={nextTick:ag}:ns.exports=process;function ag(e,t,i,n){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var r=arguments.length,a,s;switch(r){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,i)});case 4:return process.nextTick(function(){e.call(null,t,i,n)});default:for(a=new Array(r-1),s=0;s<a.length;)a[s++]=arguments[s];return process.nextTick(function(){e.apply(null,a)})}}});var Mc=R((q0,Ic)=>{"use strict";var sg={}.toString;Ic.exports=Array.isArray||function(e){return sg.call(e)=="[object Array]"}});var rs=R((G0,Oc)=>{"use strict";Oc.exports=Fe("stream")});var nn=R((as,zc)=>{"use strict";var _r=Fe("buffer"),tt=_r.Buffer;function Dc(e,t){for(var i in e)t[i]=e[i]}tt.from&&tt.alloc&&tt.allocUnsafe&&tt.allocUnsafeSlow?zc.exports=_r:(Dc(_r,as),as.Buffer=ui);function ui(e,t,i){return tt(e,t,i)}Dc(tt,ui);ui.from=function(e,t,i){if(typeof e=="number")throw new TypeError("Argument must not be a number");return tt(e,t,i)};ui.alloc=function(e,t,i){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=tt(e);return t!==void 0?typeof i=="string"?n.fill(t,i):n.fill(t):n.fill(0),n};ui.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return tt(e)};ui.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _r.SlowBuffer(e)}});var pi=R(ae=>{"use strict";function og(e){return Array.isArray?Array.isArray(e):Er(e)==="[object Array]"}ae.isArray=og;function lg(e){return typeof e=="boolean"}ae.isBoolean=lg;function cg(e){return e===null}ae.isNull=cg;function dg(e){return e==null}ae.isNullOrUndefined=dg;function ug(e){return typeof e=="number"}ae.isNumber=ug;function pg(e){return typeof e=="string"}ae.isString=pg;function fg(e){return typeof e=="symbol"}ae.isSymbol=fg;function hg(e){return e===void 0}ae.isUndefined=hg;function gg(e){return Er(e)==="[object RegExp]"}ae.isRegExp=gg;function mg(e){return typeof e=="object"&&e!==null}ae.isObject=mg;function bg(e){return Er(e)==="[object Date]"}ae.isDate=bg;function vg(e){return Er(e)==="[object Error]"||e instanceof Error}ae.isError=vg;function yg(e){return typeof e=="function"}ae.isFunction=yg;function xg(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}ae.isPrimitive=xg;ae.isBuffer=Fe("buffer").Buffer.isBuffer;function Er(e){return Object.prototype.toString.call(e)}});var jc=R((Y0,ss)=>{"use strict";typeof Object.create=="function"?ss.exports=function(t,i){i&&(t.super_=i,t.prototype=Object.create(i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:ss.exports=function(t,i){if(i){t.super_=i;var n=function(){};n.prototype=i.prototype,t.prototype=new n,t.prototype.constructor=t}}});var fi=R((V0,ls)=>{"use strict";try{if(os=Fe("util"),typeof os.inherits!="function")throw"";ls.exports=os.inherits}catch{ls.exports=jc()}var os});var Fc=R((K0,cs)=>{"use strict";function wg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Bc=nn().Buffer,rn=Fe("util");function _g(e,t,i){e.copy(t,i)}cs.exports=(function(){function e(){wg(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(i){var n={data:i,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function(i){var n={data:i,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function(){if(this.length!==0){var i=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,i}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(i){if(this.length===0)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=i+n.data;return r},e.prototype.concat=function(i){if(this.length===0)return Bc.alloc(0);for(var n=Bc.allocUnsafe(i>>>0),r=this.head,a=0;r;)_g(r.data,n,a),a+=r.data.length,r=r.next;return n},e})();rn&&rn.inspect&&rn.inspect.custom&&(cs.exports.prototype[rn.inspect.custom]=function(){var e=rn.inspect({length:this.length});return this.constructor.name+" "+e})});var ds=R((X0,Nc)=>{"use strict";var Sr=tn();function Eg(e,t){var i=this,n=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return n||r?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Sr.nextTick(Ar,this,e)):Sr.nextTick(Ar,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?i._writableState?i._writableState.errorEmitted||(i._writableState.errorEmitted=!0,Sr.nextTick(Ar,i,a)):Sr.nextTick(Ar,i,a):t&&t(a)}),this)}function Sg(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ar(e,t){e.emit("error",t)}Nc.exports={destroy:Eg,undestroy:Sg}});var Uc=R((Z0,Hc)=>{"use strict";Hc.exports=Fe("util").deprecate});var ps=R((J0,Xc)=>{"use strict";var jt=tn();Xc.exports=X;function qc(e){var t=this;this.next=null,this.entry=null,this.finish=function(){Ug(t,e)}}var Ag=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:jt.nextTick,hi;X.WritableState=sn;var Gc=Object.create(pi());Gc.inherits=fi();var Cg={deprecate:Uc()},Wc=rs(),kr=nn().Buffer,kg=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function Tg(e){return kr.from(e)}function Lg(e){return kr.isBuffer(e)||e instanceof kg}var Yc=ds();Gc.inherits(X,Wc);function Rg(){}function sn(e,t){hi=hi||Bt(),e=e||{};var i=t instanceof hi;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,r=e.writableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:i&&(r||r===0)?this.highWaterMark=r:this.highWaterMark=a,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 s=e.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){jg(t,o)},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 qc(this)}sn.prototype.getBuffer=function(){for(var t=this.bufferedRequest,i=[];t;)i.push(t),t=t.next;return i};(function(){try{Object.defineProperty(sn.prototype,"buffer",{get:Cg.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Cr;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Cr=Function.prototype[Symbol.hasInstance],Object.defineProperty(X,Symbol.hasInstance,{value:function(e){return Cr.call(this,e)?!0:this!==X?!1:e&&e._writableState instanceof sn}})):Cr=function(e){return e instanceof this};function X(e){if(hi=hi||Bt(),!Cr.call(X,this)&&!(this instanceof hi))return new X(e);this._writableState=new sn(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Wc.call(this)}X.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Pg(e,t){var i=new Error("write after end");e.emit("error",i),jt.nextTick(t,i)}function Ig(e,t,i,n){var r=!0,a=!1;return i===null?a=new TypeError("May not write null values to stream"):typeof i!="string"&&i!==void 0&&!t.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),jt.nextTick(n,a),r=!1),r}X.prototype.write=function(e,t,i){var n=this._writableState,r=!1,a=!n.objectMode&&Lg(e);return a&&!kr.isBuffer(e)&&(e=Tg(e)),typeof t=="function"&&(i=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof i!="function"&&(i=Rg),n.ended?Pg(this,i):(a||Ig(this,n,e,i))&&(n.pendingcb++,r=Og(this,n,a,e,t,i)),r};X.prototype.cork=function(){var e=this._writableState;e.corked++};X.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Vc(this,e))};X.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function Mg(e,t,i){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=kr.from(t,i)),t}Object.defineProperty(X.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Og(e,t,i,n,r,a){if(!i){var s=Mg(t,n,r);n!==s&&(i=!0,r="buffer",n=s)}var o=t.objectMode?1:n.length;t.length+=o;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:r,isBuf:i,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else us(e,t,!1,o,n,r,a);return c}function us(e,t,i,n,r,a,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(r,t.onwrite):e._write(r,a,t.onwrite),t.sync=!1}function Dg(e,t,i,n,r){--t.pendingcb,i?(jt.nextTick(r,n),jt.nextTick(an,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(r(n),e._writableState.errorEmitted=!0,e.emit("error",n),an(e,t))}function zg(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function jg(e,t){var i=e._writableState,n=i.sync,r=i.writecb;if(zg(i),t)Dg(e,i,n,t,r);else{var a=Kc(i);!a&&!i.corked&&!i.bufferProcessing&&i.bufferedRequest&&Vc(e,i),n?Ag($c,e,i,a,r):$c(e,i,a,r)}}function $c(e,t,i,n){i||Bg(e,t),t.pendingcb--,n(),an(e,t)}function Bg(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function Vc(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var n=t.bufferedRequestCount,r=new Array(n),a=t.corkedRequestsFree;a.entry=i;for(var s=0,o=!0;i;)r[s]=i,i.isBuf||(o=!1),i=i.next,s+=1;r.allBuffers=o,us(e,t,!0,t.length,r,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new qc(t),t.bufferedRequestCount=0}else{for(;i;){var c=i.chunk,l=i.encoding,d=i.callback,u=t.objectMode?1:c.length;if(us(e,t,!1,u,c,l,d),i=i.next,t.bufferedRequestCount--,t.writing)break}i===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}X.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))};X.prototype._writev=null;X.prototype.end=function(e,t,i){var n=this._writableState;typeof e=="function"?(i=e,e=null,t=null):typeof t=="function"&&(i=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||Hg(this,n,i)};function Kc(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Fg(e,t){e._final(function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),an(e,t)})}function Ng(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,jt.nextTick(Fg,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function an(e,t){var i=Kc(t);return i&&(Ng(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),i}function Hg(e,t,i){t.ending=!0,an(e,t),i&&(t.finished?jt.nextTick(i):e.once("finish",i)),t.ended=!0,e.writable=!1}function Ug(e,t,i){var n=e.entry;for(e.entry=null;n;){var r=n.callback;t.pendingcb--,r(i),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(X.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});X.prototype.destroy=Yc.destroy;X.prototype._undestroy=Yc.undestroy;X.prototype._destroy=function(e,t){this.end(),t(e)}});var Bt=R((Q0,ed)=>{"use strict";var Zc=tn(),$g=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};ed.exports=it;var Jc=Object.create(pi());Jc.inherits=fi();var Qc=gs(),hs=ps();Jc.inherits(it,Qc);for(fs=$g(hs.prototype),Tr=0;Tr<fs.length;Tr++)Lr=fs[Tr],it.prototype[Lr]||(it.prototype[Lr]=hs.prototype[Lr]);var fs,Lr,Tr;function it(e){if(!(this instanceof it))return new it(e);Qc.call(this,e),hs.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",qg)}Object.defineProperty(it.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function qg(){this.allowHalfOpen||this._writableState.ended||Zc.nextTick(Gg,this)}function Gg(e){e.end()}Object.defineProperty(it.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});it.prototype._destroy=function(e,t){this.push(null),this.end(),Zc.nextTick(t,e)}});var vs=R(id=>{"use strict";var bs=nn().Buffer,td=bs.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 Wg(e){if(!e)return"utf8";for(var t;;)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(t)return;e=(""+e).toLowerCase(),t=!0}}function Yg(e){var t=Wg(e);if(typeof t!="string"&&(bs.isEncoding===td||!td(e)))throw new Error("Unknown encoding: "+e);return t||e}id.StringDecoder=on;function on(e){this.encoding=Yg(e);var t;switch(this.encoding){case"utf16le":this.text=Qg,this.end=em,t=4;break;case"utf8":this.fillLast=Xg,t=4;break;case"base64":this.text=tm,this.end=im,t=3;break;default:this.write=nm,this.end=rm;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=bs.allocUnsafe(t)}on.prototype.write=function(e){if(e.length===0)return"";var t,i;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<e.length?t?t+this.text(e,i):this.text(e,i):t||""};on.prototype.end=Jg;on.prototype.text=Zg;on.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function ms(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Vg(e,t,i){var n=t.length-1;if(n<i)return 0;var r=ms(t[n]);return r>=0?(r>0&&(e.lastNeed=r-1),r):--n<i||r===-2?0:(r=ms(t[n]),r>=0?(r>0&&(e.lastNeed=r-2),r):--n<i||r===-2?0:(r=ms(t[n]),r>=0?(r>0&&(r===2?r=0:e.lastNeed=r-3),r):0))}function Kg(e,t,i){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function Xg(e){var t=this.lastTotal-this.lastNeed,i=Kg(this,e,t);if(i!==void 0)return i;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Zg(e,t){var i=Vg(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var n=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function Jg(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function Qg(e,t){if((e.length-t)%2===0){var i=e.toString("utf16le",t);if(i){var n=i.charCodeAt(i.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function em(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function tm(e,t){var i=(e.length-t)%3;return i===0?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,i===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",t,e.length-i))}function im(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function nm(e){return e.toString(this.encoding)}function rm(e){return e&&e.length?this.write(e):""}});var gs=R((iw,hd)=>{"use strict";var mi=tn();hd.exports=$;var am=Mc(),ln;$.ReadableState=cd;var tw=Fe("events").EventEmitter,sd=function(e,t){return e.listeners(t).length},Es=rs(),cn=nn().Buffer,sm=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function om(e){return cn.from(e)}function lm(e){return cn.isBuffer(e)||e instanceof sm}var od=Object.create(pi());od.inherits=fi();var ys=Fe("util"),N=void 0;ys&&ys.debuglog?N=ys.debuglog("stream"):N=function(){};var cm=Fc(),ld=ds(),gi;od.inherits($,Es);var xs=["error","close","destroy","pause","resume"];function dm(e,t,i){if(typeof e.prependListener=="function")return e.prependListener(t,i);!e._events||!e._events[t]?e.on(t,i):am(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]}function cd(e,t){ln=ln||Bt(),e=e||{};var i=t instanceof ln;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=e.readableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:i&&(r||r===0)?this.highWaterMark=r:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new cm,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(gi||(gi=vs().StringDecoder),this.decoder=new gi(e.encoding),this.encoding=e.encoding)}function $(e){if(ln=ln||Bt(),!(this instanceof $))return new $(e);this._readableState=new cd(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Es.call(this)}Object.defineProperty($.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});$.prototype.destroy=ld.destroy;$.prototype._undestroy=ld.undestroy;$.prototype._destroy=function(e,t){this.push(null),t(e)};$.prototype.push=function(e,t){var i=this._readableState,n;return i.objectMode?n=!0:typeof e=="string"&&(t=t||i.defaultEncoding,t!==i.encoding&&(e=cn.from(e,t),t=""),n=!0),dd(this,e,t,!1,n)};$.prototype.unshift=function(e){return dd(this,e,null,!0,!1)};function dd(e,t,i,n,r){var a=e._readableState;if(t===null)a.reading=!1,hm(e,a);else{var s;r||(s=um(a,t)),s?e.emit("error",s):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==cn.prototype&&(t=om(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):ws(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!i?(t=a.decoder.write(t),a.objectMode||t.length!==0?ws(e,a,t,!1):ud(e,a)):ws(e,a,t,!1))):n||(a.reading=!1)}return pm(a)}function ws(e,t,i,n){t.flowing&&t.length===0&&!t.sync?(e.emit("data",i),e.read(0)):(t.length+=t.objectMode?1:i.length,n?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&Rr(e)),ud(e,t)}function um(e,t){var i;return!lm(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(i=new TypeError("Invalid non-string/buffer chunk")),i}function pm(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}$.prototype.isPaused=function(){return this._readableState.flowing===!1};$.prototype.setEncoding=function(e){return gi||(gi=vs().StringDecoder),this._readableState.decoder=new gi(e),this._readableState.encoding=e,this};var nd=8388608;function fm(e){return e>=nd?e=nd:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function rd(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=fm(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}$.prototype.read=function(e){N("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return N("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?_s(this):Rr(this),null;if(e=rd(e,t),e===0&&t.ended)return t.length===0&&_s(this),null;var n=t.needReadable;N("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,N("length less than watermark",n)),t.ended||t.reading?(n=!1,N("reading or ended",n)):n&&(N("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=rd(i,t)));var r;return e>0?r=pd(e,t):r=null,r===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&_s(this)),r!==null&&this.emit("data",r),r};function hm(e,t){if(!t.ended){if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,Rr(e)}}function Rr(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(N("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?mi.nextTick(ad,e):ad(e))}function ad(e){N("emit readable"),e.emit("readable"),Ss(e)}function ud(e,t){t.readingMore||(t.readingMore=!0,mi.nextTick(gm,e,t))}function gm(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(N("maybeReadMore read 0"),e.read(0),i!==t.length);)i=t.length;t.readingMore=!1}$.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};$.prototype.pipe=function(e,t){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,N("pipe count=%d opts=%j",n.pipesCount,t);var r=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=r?o:g;n.endEmitted?mi.nextTick(a):i.once("end",a),e.on("unpipe",s);function s(b,v){N("onunpipe"),b===i&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,d())}function o(){N("onend"),e.end()}var c=mm(i);e.on("drain",c);var l=!1;function d(){N("cleanup"),e.removeListener("close",m),e.removeListener("finish",h),e.removeListener("drain",c),e.removeListener("error",f),e.removeListener("unpipe",s),i.removeListener("end",o),i.removeListener("end",g),i.removeListener("data",p),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c()}var u=!1;i.on("data",p);function p(b){N("ondata"),u=!1;var v=e.write(b);v===!1&&!u&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&fd(n.pipes,e)!==-1)&&!l&&(N("false write response, pause",n.awaitDrain),n.awaitDrain++,u=!0),i.pause())}function f(b){N("onerror",b),g(),e.removeListener("error",f),sd(e,"error")===0&&e.emit("error",b)}dm(e,"error",f);function m(){e.removeListener("finish",h),g()}e.once("close",m);function h(){N("onfinish"),e.removeListener("close",m),g()}e.once("finish",h);function g(){N("unpipe"),i.unpipe(e)}return e.emit("pipe",i),n.flowing||(N("pipe resume"),i.resume()),e};function mm(e){return function(){var t=e._readableState;N("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&sd(e,"data")&&(t.flowing=!0,Ss(e))}}$.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<r;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=fd(t.pipes,e);return s===-1?this:(t.pipes.splice(s,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,i),this)};$.prototype.on=function(e,t){var i=Es.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&Rr(this):mi.nextTick(bm,this))}return i};$.prototype.addListener=$.prototype.on;function bm(e){N("readable nexttick read 0"),e.read(0)}$.prototype.resume=function(){var e=this._readableState;return e.flowing||(N("resume"),e.flowing=!0,vm(this,e)),this};function vm(e,t){t.resumeScheduled||(t.resumeScheduled=!0,mi.nextTick(ym,e,t))}function ym(e,t){t.reading||(N("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Ss(e),t.flowing&&!t.reading&&e.read(0)}$.prototype.pause=function(){return N("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(N("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Ss(e){var t=e._readableState;for(N("flow",t.flowing);t.flowing&&e.read()!==null;);}$.prototype.wrap=function(e){var t=this,i=this._readableState,n=!1;e.on("end",function(){if(N("wrapped end"),i.decoder&&!i.ended){var s=i.decoder.end();s&&s.length&&t.push(s)}t.push(null)}),e.on("data",function(s){if(N("wrapped data"),i.decoder&&(s=i.decoder.write(s)),!(i.objectMode&&s==null)&&!(!i.objectMode&&(!s||!s.length))){var o=t.push(s);o||(n=!0,e.pause())}});for(var r in e)this[r]===void 0&&typeof e[r]=="function"&&(this[r]=(function(s){return function(){return e[s].apply(e,arguments)}})(r));for(var a=0;a<xs.length;a++)e.on(xs[a],this.emit.bind(this,xs[a]));return this._read=function(s){N("wrapped _read",s),n&&(n=!1,e.resume())},this};Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});$._fromList=pd;function pd(e,t){if(t.length===0)return null;var i;return t.objectMode?i=t.buffer.shift():!e||e>=t.length?(t.decoder?i=t.buffer.join(""):t.buffer.length===1?i=t.buffer.head.data:i=t.buffer.concat(t.length),t.buffer.clear()):i=xm(e,t.buffer,t.decoder),i}function xm(e,t,i){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?n=t.shift():n=i?wm(e,t):_m(e,t),n}function wm(e,t){var i=t.head,n=1,r=i.data;for(e-=r.length;i=i.next;){var a=i.data,s=e>a.length?a.length:e;if(s===a.length?r+=a:r+=a.slice(0,e),e-=s,e===0){s===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(s));break}++n}return t.length-=n,r}function _m(e,t){var i=cn.allocUnsafe(e),n=t.head,r=1;for(n.data.copy(i),e-=n.data.length;n=n.next;){var a=n.data,s=e>a.length?a.length:e;if(a.copy(i,i.length-e,0,s),e-=s,e===0){s===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(s));break}++r}return t.length-=r,i}function _s(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,mi.nextTick(Em,t,e))}function Em(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function fd(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}});var As=R((nw,bd)=>{"use strict";bd.exports=nt;var Pr=Bt(),md=Object.create(pi());md.inherits=fi();md.inherits(nt,Pr);function Sm(e,t){var i=this._transformState;i.transforming=!1;var n=i.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));i.writechunk=null,i.writecb=null,t!=null&&this.push(t),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function nt(e){if(!(this instanceof nt))return new nt(e);Pr.call(this,e),this._transformState={afterTransform:Sm.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Am)}function Am(){var e=this;typeof this._flush=="function"?this._flush(function(t,i){gd(e,t,i)}):gd(this,null,null)}nt.prototype.push=function(e,t){return this._transformState.needTransform=!1,Pr.prototype.push.call(this,e,t)};nt.prototype._transform=function(e,t,i){throw new Error("_transform() is not implemented")};nt.prototype._write=function(e,t,i){var n=this._transformState;if(n.writecb=i,n.writechunk=e,n.writeencoding=t,!n.transforming){var r=this._readableState;(n.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}};nt.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};nt.prototype._destroy=function(e,t){var i=this;Pr.prototype._destroy.call(this,e,function(n){t(n),i.emit("close")})};function gd(e,t,i){if(t)return e.emit("error",t);if(i!=null&&e.push(i),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var wd=R((rw,xd)=>{"use strict";xd.exports=dn;var vd=As(),yd=Object.create(pi());yd.inherits=fi();yd.inherits(dn,vd);function dn(e){if(!(this instanceof dn))return new dn(e);vd.call(this,e)}dn.prototype._transform=function(e,t,i){i(null,e)}});var Cs=R((ne,Ir)=>{"use strict";var He=Fe("stream");process.env.READABLE_STREAM==="disable"&&He?(Ir.exports=He,ne=Ir.exports=He.Readable,ne.Readable=He.Readable,ne.Writable=He.Writable,ne.Duplex=He.Duplex,ne.Transform=He.Transform,ne.PassThrough=He.PassThrough,ne.Stream=He):(ne=Ir.exports=gs(),ne.Stream=He||ne,ne.Readable=ne,ne.Writable=ps(),ne.Duplex=Bt(),ne.Transform=As(),ne.PassThrough=wd())});var rt=R(ge=>{"use strict";ge.base64=!0;ge.array=!0;ge.string=!0;ge.arraybuffer=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined";ge.nodebuffer=typeof Buffer!="undefined";ge.uint8array=typeof Uint8Array!="undefined";if(typeof ArrayBuffer=="undefined")ge.blob=!1;else{ks=new ArrayBuffer(0);try{ge.blob=new Blob([ks],{type:"application/zip"}).size===0}catch{try{_d=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Ts=new _d,Ts.append(ks),ge.blob=Ts.getBlob("application/zip").size===0}catch{ge.blob=!1}}}var ks,_d,Ts;try{ge.nodestream=!!Cs().Readable}catch{ge.nodestream=!1}});var Rs=R(Ls=>{"use strict";var Cm=G(),km=rt(),Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Ls.encode=function(e){for(var t=[],i,n,r,a,s,o,c,l=0,d=e.length,u=d,p=Cm.getTypeOf(e)!=="string";l<e.length;)u=d-l,p?(i=e[l++],n=l<d?e[l++]:0,r=l<d?e[l++]:0):(i=e.charCodeAt(l++),n=l<d?e.charCodeAt(l++):0,r=l<d?e.charCodeAt(l++):0),a=i>>2,s=(i&3)<<4|n>>4,o=u>1?(n&15)<<2|r>>6:64,c=u>2?r&63:64,t.push(Ue.charAt(a)+Ue.charAt(s)+Ue.charAt(o)+Ue.charAt(c));return t.join("")};Ls.decode=function(e){var t,i,n,r,a,s,o,c=0,l=0,d="data:";if(e.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var u=e.length*3/4;if(e.charAt(e.length-1)===Ue.charAt(64)&&u--,e.charAt(e.length-2)===Ue.charAt(64)&&u--,u%1!==0)throw new Error("Invalid base64 input, bad content length.");var p;for(km.uint8array?p=new Uint8Array(u|0):p=new Array(u|0);c<e.length;)r=Ue.indexOf(e.charAt(c++)),a=Ue.indexOf(e.charAt(c++)),s=Ue.indexOf(e.charAt(c++)),o=Ue.indexOf(e.charAt(c++)),t=r<<2|a>>4,i=(a&15)<<4|s>>2,n=(s&3)<<6|o,p[l++]=t,s!==64&&(p[l++]=i),o!==64&&(p[l++]=n);return p}});var un=R((ow,Ed)=>{"use strict";Ed.exports={isNode:typeof Buffer!="undefined",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}}});var kd=R((lw,Cd)=>{"use strict";var Sd=global.MutationObserver||global.WebKitMutationObserver,bi;process.browser?Sd?(Ps=0,Ad=new Sd(pn),Is=global.document.createTextNode(""),Ad.observe(Is,{characterData:!0}),bi=function(){Is.data=Ps=++Ps%2}):!global.setImmediate&&typeof global.MessageChannel!="undefined"?(Ms=new global.MessageChannel,Ms.port1.onmessage=pn,bi=function(){Ms.port2.postMessage(0)}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?bi=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){pn(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},global.document.documentElement.appendChild(e)}:bi=function(){setTimeout(pn,0)}:bi=function(){process.nextTick(pn)};var Ps,Ad,Is,Ms,Os,fn=[];function pn(){Os=!0;for(var e,t,i=fn.length;i;){for(t=fn,fn=[],e=-1;++e<i;)t[e]();i=fn.length}Os=!1}Cd.exports=Tm;function Tm(e){fn.push(e)===1&&!Os&&bi()}});var Od=R((cw,Md)=>{"use strict";var Td=kd();function vi(){}var se={},Ld=["REJECTED"],Ds=["FULFILLED"],Rd=["PENDING"];process.browser||(hn=["UNHANDLED"]);var hn;Md.exports=yt;function yt(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=Rd,this.queue=[],this.outcome=void 0,process.browser||(this.handled=hn),e!==vi&&Pd(this,e)}yt.prototype.finally=function(e){if(typeof e!="function")return this;var t=this.constructor;return this.then(i,n);function i(r){function a(){return r}return t.resolve(e()).then(a)}function n(r){function a(){throw r}return t.resolve(e()).then(a)}};yt.prototype.catch=function(e){return this.then(null,e)};yt.prototype.then=function(e,t){if(typeof e!="function"&&this.state===Ds||typeof t!="function"&&this.state===Ld)return this;var i=new this.constructor(vi);if(process.browser||this.handled===hn&&(this.handled=null),this.state!==Rd){var n=this.state===Ds?e:t;zs(i,n,this.outcome)}else this.queue.push(new gn(i,e,t));return i};function gn(e,t,i){this.promise=e,typeof t=="function"&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof i=="function"&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}gn.prototype.callFulfilled=function(e){se.resolve(this.promise,e)};gn.prototype.otherCallFulfilled=function(e){zs(this.promise,this.onFulfilled,e)};gn.prototype.callRejected=function(e){se.reject(this.promise,e)};gn.prototype.otherCallRejected=function(e){zs(this.promise,this.onRejected,e)};function zs(e,t,i){Td(function(){var n;try{n=t(i)}catch(r){return se.reject(e,r)}n===e?se.reject(e,new TypeError("Cannot resolve promise with itself")):se.resolve(e,n)})}se.resolve=function(e,t){var i=Id(Lm,t);if(i.status==="error")return se.reject(e,i.value);var n=i.value;if(n)Pd(e,n);else{e.state=Ds,e.outcome=t;for(var r=-1,a=e.queue.length;++r<a;)e.queue[r].callFulfilled(t)}return e};se.reject=function(e,t){e.state=Ld,e.outcome=t,process.browser||e.handled===hn&&Td(function(){e.handled===hn&&process.emit("unhandledRejection",t,e)});for(var i=-1,n=e.queue.length;++i<n;)e.queue[i].callRejected(t);return e};function Lm(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments)}}function Pd(e,t){var i=!1;function n(o){i||(i=!0,se.reject(e,o))}function r(o){i||(i=!0,se.resolve(e,o))}function a(){t(r,n)}var s=Id(a);s.status==="error"&&n(s.value)}function Id(e,t){var i={};try{i.value=e(t),i.status="success"}catch(n){i.status="error",i.value=n}return i}yt.resolve=Rm;function Rm(e){return e instanceof this?e:se.resolve(new this(vi),e)}yt.reject=Pm;function Pm(e){var t=new this(vi);return se.reject(t,e)}yt.all=Im;function Im(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var i=e.length,n=!1;if(!i)return this.resolve([]);for(var r=new Array(i),a=0,s=-1,o=new this(vi);++s<i;)c(e[s],s);return o;function c(l,d){t.resolve(l).then(u,function(p){n||(n=!0,se.reject(o,p))});function u(p){r[d]=p,++a===i&&!n&&(n=!0,se.resolve(o,r))}}}yt.race=Mm;function Mm(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var i=e.length,n=!1;if(!i)return this.resolve([]);for(var r=-1,a=new this(vi);++r<i;)s(e[r]);return a;function s(o){t.resolve(o).then(function(c){n||(n=!0,se.resolve(a,c))},function(c){n||(n=!0,se.reject(a,c))})}}});var yi=R((dw,Dd)=>{"use strict";var js=null;typeof Promise!="undefined"?js=Promise:js=Od();Dd.exports={Promise:js}});var jd=R(zd=>{"use strict";(function(e,t){"use strict";if(e.setImmediate)return;var i=1,n={},r=!1,a=e.document,s;function o(v){typeof v!="function"&&(v=new Function(""+v));for(var y=new Array(arguments.length-1),x=0;x<y.length;x++)y[x]=arguments[x+1];var w={callback:v,args:y};return n[i]=w,s(i),i++}function c(v){delete n[v]}function l(v){var y=v.callback,x=v.args;switch(x.length){case 0:y();break;case 1:y(x[0]);break;case 2:y(x[0],x[1]);break;case 3:y(x[0],x[1],x[2]);break;default:y.apply(t,x);break}}function d(v){if(r)setTimeout(d,0,v);else{var y=n[v];if(y){r=!0;try{l(y)}finally{c(v),r=!1}}}}function u(){s=function(v){process.nextTick(function(){d(v)})}}function p(){if(e.postMessage&&!e.importScripts){var v=!0,y=e.onmessage;return e.onmessage=function(){v=!1},e.postMessage("","*"),e.onmessage=y,v}}function f(){var v="setImmediate$"+Math.random()+"$",y=function(x){x.source===e&&typeof x.data=="string"&&x.data.indexOf(v)===0&&d(+x.data.slice(v.length))};e.addEventListener?e.addEventListener("message",y,!1):e.attachEvent("onmessage",y),s=function(x){e.postMessage(v+x,"*")}}function m(){var v=new MessageChannel;v.port1.onmessage=function(y){var x=y.data;d(x)},s=function(y){v.port2.postMessage(y)}}function h(){var v=a.documentElement;s=function(y){var x=a.createElement("script");x.onreadystatechange=function(){d(y),x.onreadystatechange=null,v.removeChild(x),x=null},v.appendChild(x)}}function g(){s=function(v){setTimeout(d,0,v)}}var b=Object.getPrototypeOf&&Object.getPrototypeOf(e);b=b&&b.setTimeout?b:e,{}.toString.call(e.process)==="[object process]"?u():p()?f():e.MessageChannel?m():a&&"onreadystatechange"in a.createElement("script")?h():g(),b.setImmediate=o,b.clearImmediate=c})(typeof self=="undefined"?typeof global=="undefined"?zd:global:self)});var G=R(Z=>{"use strict";var xt=rt(),Om=Rs(),xi=un(),Bs=yi();jd();function Dm(e){var t=null;return xt.uint8array?t=new Uint8Array(e.length):t=new Array(e.length),Or(e,t)}Z.newBlob=function(e,t){Z.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var i=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,n=new i;return n.append(e),n.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};function mn(e){return e}function Or(e,t){for(var i=0;i<e.length;++i)t[i]=e.charCodeAt(i)&255;return t}var Mr={stringifyByChunk:function(e,t,i){var n=[],r=0,a=e.length;if(a<=i)return String.fromCharCode.apply(null,e);for(;r<a;)t==="array"||t==="nodebuffer"?n.push(String.fromCharCode.apply(null,e.slice(r,Math.min(r+i,a)))):n.push(String.fromCharCode.apply(null,e.subarray(r,Math.min(r+i,a)))),r+=i;return n.join("")},stringifyByChar:function(e){for(var t="",i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return t},applyCanBeUsed:{uint8array:(function(){try{return xt.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return xt.nodebuffer&&String.fromCharCode.apply(null,xi.allocBuffer(1)).length===1}catch{return!1}})()}};function bn(e){var t=65536,i=Z.getTypeOf(e),n=!0;if(i==="uint8array"?n=Mr.applyCanBeUsed.uint8array:i==="nodebuffer"&&(n=Mr.applyCanBeUsed.nodebuffer),n)for(;t>1;)try{return Mr.stringifyByChunk(e,i,t)}catch{t=Math.floor(t/2)}return Mr.stringifyByChar(e)}Z.applyFromCharCode=bn;function Dr(e,t){for(var i=0;i<e.length;i++)t[i]=e[i];return t}var wt={};wt.string={string:mn,array:function(e){return Or(e,new Array(e.length))},arraybuffer:function(e){return wt.string.uint8array(e).buffer},uint8array:function(e){return Or(e,new Uint8Array(e.length))},nodebuffer:function(e){return Or(e,xi.allocBuffer(e.length))}};wt.array={string:bn,array:mn,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return xi.newBufferFrom(e)}};wt.arraybuffer={string:function(e){return bn(new Uint8Array(e))},array:function(e){return Dr(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:mn,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return xi.newBufferFrom(new Uint8Array(e))}};wt.uint8array={string:bn,array:function(e){return Dr(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:mn,nodebuffer:function(e){return xi.newBufferFrom(e)}};wt.nodebuffer={string:bn,array:function(e){return Dr(e,new Array(e.length))},arraybuffer:function(e){return wt.nodebuffer.uint8array(e).buffer},uint8array:function(e){return Dr(e,new Uint8Array(e.length))},nodebuffer:mn};Z.transformTo=function(e,t){if(t||(t=""),!e)return t;Z.checkSupport(e);var i=Z.getTypeOf(t),n=wt[i][e](t);return n};Z.resolve=function(e){for(var t=e.split("/"),i=[],n=0;n<t.length;n++){var r=t[n];r==="."||r===""&&n!==0&&n!==t.length-1||(r===".."?i.pop():i.push(r))}return i.join("/")};Z.getTypeOf=function(e){if(typeof e=="string")return"string";if(Object.prototype.toString.call(e)==="[object Array]")return"array";if(xt.nodebuffer&&xi.isBuffer(e))return"nodebuffer";if(xt.uint8array&&e instanceof Uint8Array)return"uint8array";if(xt.arraybuffer&&e instanceof ArrayBuffer)return"arraybuffer"};Z.checkSupport=function(e){var t=xt[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")};Z.MAX_VALUE_16BITS=65535;Z.MAX_VALUE_32BITS=-1;Z.pretty=function(e){var t="",i,n;for(n=0;n<(e||"").length;n++)i=e.charCodeAt(n),t+="\\x"+(i<16?"0":"")+i.toString(16).toUpperCase();return t};Z.delay=function(e,t,i){setImmediate(function(){e.apply(i||null,t||[])})};Z.inherits=function(e,t){var i=function(){};i.prototype=t.prototype,e.prototype=new i};Z.extend=function(){var e={},t,i;for(t=0;t<arguments.length;t++)for(i in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],i)&&typeof e[i]=="undefined"&&(e[i]=arguments[t][i]);return e};Z.prepareContent=function(e,t,i,n,r){var a=Bs.Promise.resolve(t).then(function(s){var o=xt.blob&&(s instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(s))!==-1);return o&&typeof FileReader!="undefined"?new Bs.Promise(function(c,l){var d=new FileReader;d.onload=function(u){c(u.target.result)},d.onerror=function(u){l(u.target.error)},d.readAsArrayBuffer(s)}):s});return a.then(function(s){var o=Z.getTypeOf(s);return o?(o==="arraybuffer"?s=Z.transformTo("uint8array",s):o==="string"&&(r?s=Om.decode(s):i&&n!==!0&&(s=Dm(s))),s):Bs.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}});var me=R((fw,Fd)=>{"use strict";function Bd(e){this.name=e||"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}Bd.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return this.isFinished?!1:(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var i=0;i<this._listeners[e].length;i++)this._listeners[e][i].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(i){t.processChunk(i)}),e.on("end",function(){t.end()}),e.on("error",function(i){t.error(i)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};Fd.exports=Bd});var _i=R(_t=>{"use strict";var wi=G(),Ft=rt(),zm=un(),zr=me(),vn=new Array(256);for(at=0;at<256;at++)vn[at]=at>=252?6:at>=248?5:at>=240?4:at>=224?3:at>=192?2:1;var at;vn[254]=vn[254]=1;var jm=function(e){var t,i,n,r,a,s=e.length,o=0;for(r=0;r<s;r++)i=e.charCodeAt(r),(i&64512)===55296&&r+1<s&&(n=e.charCodeAt(r+1),(n&64512)===56320&&(i=65536+(i-55296<<10)+(n-56320),r++)),o+=i<128?1:i<2048?2:i<65536?3:4;for(Ft.uint8array?t=new Uint8Array(o):t=new Array(o),a=0,r=0;a<o;r++)i=e.charCodeAt(r),(i&64512)===55296&&r+1<s&&(n=e.charCodeAt(r+1),(n&64512)===56320&&(i=65536+(i-55296<<10)+(n-56320),r++)),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|i&63):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|i&63):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|i&63);return t},Bm=function(e,t){var i;for(t=t||e.length,t>e.length&&(t=e.length),i=t-1;i>=0&&(e[i]&192)===128;)i--;return i<0||i===0?t:i+vn[e[i]]>t?i:t},Fm=function(e){var t,i,n,r,a=e.length,s=new Array(a*2);for(i=0,t=0;t<a;){if(n=e[t++],n<128){s[i++]=n;continue}if(r=vn[n],r>4){s[i++]=65533,t+=r-1;continue}for(n&=r===2?31:r===3?15:7;r>1&&t<a;)n=n<<6|e[t++]&63,r--;if(r>1){s[i++]=65533;continue}n<65536?s[i++]=n:(n-=65536,s[i++]=55296|n>>10&1023,s[i++]=56320|n&1023)}return s.length!==i&&(s.subarray?s=s.subarray(0,i):s.length=i),wi.applyFromCharCode(s)};_t.utf8encode=function(t){return Ft.nodebuffer?zm.newBufferFrom(t,"utf-8"):jm(t)};_t.utf8decode=function(t){return Ft.nodebuffer?wi.transformTo("nodebuffer",t).toString("utf-8"):(t=wi.transformTo(Ft.uint8array?"uint8array":"array",t),Fm(t))};function jr(){zr.call(this,"utf-8 decode"),this.leftOver=null}wi.inherits(jr,zr);jr.prototype.processChunk=function(e){var t=wi.transformTo(Ft.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(Ft.uint8array){var i=t;t=new Uint8Array(i.length+this.leftOver.length),t.set(this.leftOver,0),t.set(i,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=Bm(t),r=t;n!==t.length&&(Ft.uint8array?(r=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(r=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:_t.utf8decode(r),meta:e.meta})};jr.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:_t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};_t.Utf8DecodeWorker=jr;function Fs(){zr.call(this,"utf-8 encode")}wi.inherits(Fs,zr);Fs.prototype.processChunk=function(e){this.push({data:_t.utf8encode(e.data),meta:e.meta})};_t.Utf8EncodeWorker=Fs});var $d=R((gw,Ud)=>{"use strict";var Nd=me(),Hd=G();function Ns(e){Nd.call(this,"ConvertWorker to "+e),this.destType=e}Hd.inherits(Ns,Nd);Ns.prototype.processChunk=function(e){this.push({data:Hd.transformTo(this.destType,e.data),meta:e.meta})};Ud.exports=Ns});var Wd=R((mw,Gd)=>{"use strict";var qd=Cs().Readable,Nm=G();Nm.inherits(Hs,qd);function Hs(e,t,i){qd.call(this,t),this._helper=e;var n=this;e.on("data",function(r,a){n.push(r)||n._helper.pause(),i&&i(a)}).on("error",function(r){n.emit("error",r)}).on("end",function(){n.push(null)})}Hs.prototype._read=function(){this._helper.resume()};Gd.exports=Hs});var Us=R((bw,Kd)=>{"use strict";var Nt=G(),Hm=$d(),Um=me(),$m=Rs(),qm=rt(),Gm=yi(),Yd=null;if(qm.nodestream)try{Yd=Wd()}catch{}function Wm(e,t,i){switch(e){case"blob":return Nt.newBlob(Nt.transformTo("arraybuffer",t),i);case"base64":return $m.encode(t);default:return Nt.transformTo(e,t)}}function Ym(e,t){var i,n=0,r=null,a=0;for(i=0;i<t.length;i++)a+=t[i].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(r=new Uint8Array(a),i=0;i<t.length;i++)r.set(t[i],n),n+=t[i].length;return r;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}function Vm(e,t){return new Gm.Promise(function(i,n){var r=[],a=e._internalType,s=e._outputType,o=e._mimeType;e.on("data",function(c,l){r.push(c),t&&t(l)}).on("error",function(c){r=[],n(c)}).on("end",function(){try{var c=Wm(s,Ym(a,r),o);i(c)}catch(l){n(l)}r=[]}).resume()})}function Vd(e,t,i){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string";break}try{this._internalType=n,this._outputType=t,this._mimeType=i,Nt.checkSupport(n),this._worker=e.pipe(new Hm(n)),e.lock()}catch(r){this._worker=new Um("error"),this._worker.error(r)}}Vd.prototype={accumulate:function(e){return Vm(this,e)},on:function(e,t){var i=this;return e==="data"?this._worker.on(e,function(n){t.call(i,n.data,n.meta)}):this._worker.on(e,function(){Nt.delay(t,arguments,i)}),this},resume:function(){return Nt.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(Nt.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new Yd(this,{objectMode:this._outputType!=="nodebuffer"},e)}};Kd.exports=Vd});var $s=R(Pe=>{"use strict";Pe.base64=!1;Pe.binary=!1;Pe.dir=!1;Pe.createFolders=!0;Pe.date=null;Pe.compression=null;Pe.compressionOptions=null;Pe.comment=null;Pe.unixPermissions=null;Pe.dosPermissions=null});var qs=R((yw,Xd)=>{"use strict";var Br=G(),Fr=me(),Km=16*1024;function Ei(e){Fr.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(i){t.dataIsReady=!0,t.data=i,t.max=i&&i.length||0,t.type=Br.getTypeOf(i),t.isPaused||t._tickAndRepeat()},function(i){t.error(i)})}Br.inherits(Ei,Fr);Ei.prototype.cleanUp=function(){Fr.prototype.cleanUp.call(this),this.data=null};Ei.prototype.resume=function(){return Fr.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,Br.delay(this._tickAndRepeat,[],this)),!0):!1};Ei.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(Br.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))};Ei.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=Km,t=null,i=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,i);break;case"uint8array":t=this.data.subarray(this.index,i);break;case"array":case"nodebuffer":t=this.data.slice(this.index,i);break}return this.index=i,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})};Xd.exports=Ei});var Nr=R((xw,Jd)=>{"use strict";var Xm=G();function Zm(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[i]=e}return t}var Zd=Zm();function Jm(e,t,i,n){var r=Zd,a=n+i;e=e^-1;for(var s=n;s<a;s++)e=e>>>8^r[(e^t[s])&255];return e^-1}function Qm(e,t,i,n){var r=Zd,a=n+i;e=e^-1;for(var s=n;s<a;s++)e=e>>>8^r[(e^t.charCodeAt(s))&255];return e^-1}Jd.exports=function(t,i){if(typeof t=="undefined"||!t.length)return 0;var n=Xm.getTypeOf(t)!=="string";return n?Jm(i|0,t,t.length,0):Qm(i|0,t,t.length,0)}});var Ws=R((ww,eu)=>{"use strict";var Qd=me(),eb=Nr(),tb=G();function Gs(){Qd.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}tb.inherits(Gs,Qd);Gs.prototype.processChunk=function(e){this.streamInfo.crc32=eb(e.data,this.streamInfo.crc32||0),this.push(e)};eu.exports=Gs});var iu=R((_w,tu)=>{"use strict";var ib=G(),Ys=me();function Vs(e){Ys.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}ib.inherits(Vs,Ys);Vs.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}Ys.prototype.processChunk.call(this,e)};tu.exports=Vs});var Hr=R((Ew,au)=>{"use strict";var nu=yi(),ru=qs(),nb=Ws(),Ks=iu();function Xs(e,t,i,n,r){this.compressedSize=e,this.uncompressedSize=t,this.crc32=i,this.compression=n,this.compressedContent=r}Xs.prototype={getContentWorker:function(){var e=new ru(nu.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Ks("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new ru(nu.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};Xs.createWorkerFrom=function(e,t,i){return e.pipe(new nb).pipe(new Ks("uncompressedSize")).pipe(t.compressWorker(i)).pipe(new Ks("compressedSize")).withStreamInfo("compression",t)};au.exports=Xs});var cu=R((Sw,lu)=>{"use strict";var rb=Us(),ab=qs(),Zs=_i(),Js=Hr(),su=me(),Qs=function(e,t,i){this.name=e,this.dir=i.dir,this.date=i.date,this.comment=i.comment,this.unixPermissions=i.unixPermissions,this.dosPermissions=i.dosPermissions,this._data=t,this._dataBinary=i.binary,this.options={compression:i.compression,compressionOptions:i.compressionOptions}};Qs.prototype={internalStream:function(e){var t=null,i="string";try{if(!e)throw new Error("No output type specified.");i=e.toLowerCase();var n=i==="string"||i==="text";(i==="binarystring"||i==="text")&&(i="string"),t=this._decompressWorker();var r=!this._dataBinary;r&&!n&&(t=t.pipe(new Zs.Utf8EncodeWorker)),!r&&n&&(t=t.pipe(new Zs.Utf8DecodeWorker))}catch(a){t=new su("error"),t.error(a)}return new rb(t,i,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Js&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var i=this._decompressWorker();return this._dataBinary||(i=i.pipe(new Zs.Utf8EncodeWorker)),Js.createWorkerFrom(i,e,t)},_decompressWorker:function(){return this._data instanceof Js?this._data.getContentWorker():this._data instanceof su?this._data:new ab(this._data)}};var ou=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],sb=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(Ur=0;Ur<ou.length;Ur++)Qs.prototype[ou[Ur]]=sb;var Ur;lu.exports=Qs});var st=R(de=>{"use strict";var ob=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function lb(e,t){return Object.prototype.hasOwnProperty.call(e,t)}de.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if(typeof i!="object")throw new TypeError(i+"must be non-object");for(var n in i)lb(i,n)&&(e[n]=i[n])}}return e};de.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var cb={arraySet:function(e,t,i,n,r){if(t.subarray&&e.subarray){e.set(t.subarray(i,i+n),r);return}for(var a=0;a<n;a++)e[r+a]=t[i+a]},flattenChunks:function(e){var t,i,n,r,a,s;for(n=0,t=0,i=e.length;t<i;t++)n+=e[t].length;for(s=new Uint8Array(n),r=0,t=0,i=e.length;t<i;t++)a=e[t],s.set(a,r),r+=a.length;return s}},db={arraySet:function(e,t,i,n,r){for(var a=0;a<n;a++)e[r+a]=t[i+a]},flattenChunks:function(e){return[].concat.apply([],e)}};de.setTyped=function(e){e?(de.Buf8=Uint8Array,de.Buf16=Uint16Array,de.Buf32=Int32Array,de.assign(de,cb)):(de.Buf8=Array,de.Buf16=Array,de.Buf32=Array,de.assign(de,db))};de.setTyped(ob)});var Iu=R(Ci=>{"use strict";var ub=st(),pb=4,du=0,uu=1,fb=2;function Ai(e){for(var t=e.length;--t>=0;)e[t]=0}var hb=0,bu=1,gb=2,mb=3,bb=258,so=29,Sn=256,xn=Sn+1+so,Si=30,oo=19,vu=2*xn+1,Ht=15,eo=16,vb=7,lo=256,yu=16,xu=17,wu=18,ro=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],$r=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],yb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],_u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],xb=512,ot=new Array((xn+2)*2);Ai(ot);var yn=new Array(Si*2);Ai(yn);var wn=new Array(xb);Ai(wn);var _n=new Array(bb-mb+1);Ai(_n);var co=new Array(so);Ai(co);var qr=new Array(Si);Ai(qr);function to(e,t,i,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}var Eu,Su,Au;function io(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Cu(e){return e<256?wn[e]:wn[256+(e>>>7)]}function En(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function pe(e,t,i){e.bi_valid>eo-i?(e.bi_buf|=t<<e.bi_valid&65535,En(e,e.bi_buf),e.bi_buf=t>>eo-e.bi_valid,e.bi_valid+=i-eo):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)}function $e(e,t,i){pe(e,i[t*2],i[t*2+1])}function ku(e,t){var i=0;do i|=e&1,e>>>=1,i<<=1;while(--t>0);return i>>>1}function wb(e){e.bi_valid===16?(En(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function _b(e,t){var i=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,d,u,p,f,m,h=0;for(p=0;p<=Ht;p++)e.bl_count[p]=0;for(i[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<vu;l++)d=e.heap[l],p=i[i[d*2+1]*2+1]+1,p>c&&(p=c,h++),i[d*2+1]=p,!(d>n)&&(e.bl_count[p]++,f=0,d>=o&&(f=s[d-o]),m=i[d*2],e.opt_len+=m*(p+f),a&&(e.static_len+=m*(r[d*2+1]+f)));if(h!==0){do{for(p=c-1;e.bl_count[p]===0;)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(p=c;p!==0;p--)for(d=e.bl_count[p];d!==0;)u=e.heap[--l],!(u>n)&&(i[u*2+1]!==p&&(e.opt_len+=(p-i[u*2+1])*i[u*2],i[u*2+1]=p),d--)}}function Tu(e,t,i){var n=new Array(Ht+1),r=0,a,s;for(a=1;a<=Ht;a++)n[a]=r=r+i[a-1]<<1;for(s=0;s<=t;s++){var o=e[s*2+1];o!==0&&(e[s*2]=ku(n[o]++,o))}}function Eb(){var e,t,i,n,r,a=new Array(Ht+1);for(i=0,n=0;n<so-1;n++)for(co[n]=i,e=0;e<1<<ro[n];e++)_n[i++]=n;for(_n[i-1]=n,r=0,n=0;n<16;n++)for(qr[n]=r,e=0;e<1<<$r[n];e++)wn[r++]=n;for(r>>=7;n<Si;n++)for(qr[n]=r<<7,e=0;e<1<<$r[n]-7;e++)wn[256+r++]=n;for(t=0;t<=Ht;t++)a[t]=0;for(e=0;e<=143;)ot[e*2+1]=8,e++,a[8]++;for(;e<=255;)ot[e*2+1]=9,e++,a[9]++;for(;e<=279;)ot[e*2+1]=7,e++,a[7]++;for(;e<=287;)ot[e*2+1]=8,e++,a[8]++;for(Tu(ot,xn+1,a),e=0;e<Si;e++)yn[e*2+1]=5,yn[e*2]=ku(e,5);Eu=new to(ot,ro,Sn+1,xn,Ht),Su=new to(yn,$r,0,Si,Ht),Au=new to(new Array(0),yb,0,oo,vb)}function Lu(e){var t;for(t=0;t<xn;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Si;t++)e.dyn_dtree[t*2]=0;for(t=0;t<oo;t++)e.bl_tree[t*2]=0;e.dyn_ltree[lo*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Ru(e){e.bi_valid>8?En(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Sb(e,t,i,n){Ru(e),n&&(En(e,i),En(e,~i)),ub.arraySet(e.pending_buf,e.window,t,i,e.pending),e.pending+=i}function pu(e,t,i,n){var r=t*2,a=i*2;return e[r]<e[a]||e[r]===e[a]&&n[t]<=n[i]}function no(e,t,i){for(var n=e.heap[i],r=i<<1;r<=e.heap_len&&(r<e.heap_len&&pu(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!pu(t,n,e.heap[r],e.depth));)e.heap[i]=e.heap[r],i=r,r<<=1;e.heap[i]=n}function fu(e,t,i){var n,r,a=0,s,o;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],r=e.pending_buf[e.l_buf+a],a++,n===0?$e(e,r,t):(s=_n[r],$e(e,s+Sn+1,t),o=ro[s],o!==0&&(r-=co[s],pe(e,r,o)),n--,s=Cu(n),$e(e,s,i),o=$r[s],o!==0&&(n-=qr[s],pe(e,n,o)));while(a<e.last_lit);$e(e,lo,t)}function ao(e,t){var i=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,a=t.stat_desc.elems,s,o,c=-1,l;for(e.heap_len=0,e.heap_max=vu,s=0;s<a;s++)i[s*2]!==0?(e.heap[++e.heap_len]=c=s,e.depth[s]=0):i[s*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,i[l*2]=1,e.depth[l]=0,e.opt_len--,r&&(e.static_len-=n[l*2+1]);for(t.max_code=c,s=e.heap_len>>1;s>=1;s--)no(e,i,s);l=a;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],no(e,i,1),o=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=o,i[l*2]=i[s*2]+i[o*2],e.depth[l]=(e.depth[s]>=e.depth[o]?e.depth[s]:e.depth[o])+1,i[s*2+1]=i[o*2+1]=l,e.heap[1]=l++,no(e,i,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],_b(e,t),Tu(i,c,e.bl_count)}function hu(e,t,i){var n,r=-1,a,s=t[1],o=0,c=7,l=4;for(s===0&&(c=138,l=3),t[(i+1)*2+1]=65535,n=0;n<=i;n++)a=s,s=t[(n+1)*2+1],!(++o<c&&a===s)&&(o<l?e.bl_tree[a*2]+=o:a!==0?(a!==r&&e.bl_tree[a*2]++,e.bl_tree[yu*2]++):o<=10?e.bl_tree[xu*2]++:e.bl_tree[wu*2]++,o=0,r=a,s===0?(c=138,l=3):a===s?(c=6,l=3):(c=7,l=4))}function gu(e,t,i){var n,r=-1,a,s=t[1],o=0,c=7,l=4;for(s===0&&(c=138,l=3),n=0;n<=i;n++)if(a=s,s=t[(n+1)*2+1],!(++o<c&&a===s)){if(o<l)do $e(e,a,e.bl_tree);while(--o!==0);else a!==0?(a!==r&&($e(e,a,e.bl_tree),o--),$e(e,yu,e.bl_tree),pe(e,o-3,2)):o<=10?($e(e,xu,e.bl_tree),pe(e,o-3,3)):($e(e,wu,e.bl_tree),pe(e,o-11,7));o=0,r=a,s===0?(c=138,l=3):a===s?(c=6,l=3):(c=7,l=4)}}function Ab(e){var t;for(hu(e,e.dyn_ltree,e.l_desc.max_code),hu(e,e.dyn_dtree,e.d_desc.max_code),ao(e,e.bl_desc),t=oo-1;t>=3&&e.bl_tree[_u[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Cb(e,t,i,n){var r;for(pe(e,t-257,5),pe(e,i-1,5),pe(e,n-4,4),r=0;r<n;r++)pe(e,e.bl_tree[_u[r]*2+1],3);gu(e,e.dyn_ltree,t-1),gu(e,e.dyn_dtree,i-1)}function kb(e){var t=4093624447,i;for(i=0;i<=31;i++,t>>>=1)if(t&1&&e.dyn_ltree[i*2]!==0)return du;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return uu;for(i=32;i<Sn;i++)if(e.dyn_ltree[i*2]!==0)return uu;return du}var mu=!1;function Tb(e){mu||(Eb(),mu=!0),e.l_desc=new io(e.dyn_ltree,Eu),e.d_desc=new io(e.dyn_dtree,Su),e.bl_desc=new io(e.bl_tree,Au),e.bi_buf=0,e.bi_valid=0,Lu(e)}function Pu(e,t,i,n){pe(e,(hb<<1)+(n?1:0),3),Sb(e,t,i,!0)}function Lb(e){pe(e,bu<<1,3),$e(e,lo,ot),wb(e)}function Rb(e,t,i,n){var r,a,s=0;e.level>0?(e.strm.data_type===fb&&(e.strm.data_type=kb(e)),ao(e,e.l_desc),ao(e,e.d_desc),s=Ab(e),r=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=r&&(r=a)):r=a=i+5,i+4<=r&&t!==-1?Pu(e,t,i,n):e.strategy===pb||a===r?(pe(e,(bu<<1)+(n?1:0),3),fu(e,ot,yn)):(pe(e,(gb<<1)+(n?1:0),3),Cb(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),fu(e,e.dyn_ltree,e.dyn_dtree)),Lu(e),n&&Ru(e)}function Pb(e,t,i){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=i&255,e.last_lit++,t===0?e.dyn_ltree[i*2]++:(e.matches++,t--,e.dyn_ltree[(_n[i]+Sn+1)*2]++,e.dyn_dtree[Cu(t)*2]++),e.last_lit===e.lit_bufsize-1}Ci._tr_init=Tb;Ci._tr_stored_block=Pu;Ci._tr_flush_block=Rb;Ci._tr_tally=Pb;Ci._tr_align=Lb});var uo=R((kw,Mu)=>{"use strict";function Ib(e,t,i,n){for(var r=e&65535|0,a=e>>>16&65535|0,s=0;i!==0;){s=i>2e3?2e3:i,i-=s;do r=r+t[n++]|0,a=a+r|0;while(--s);r%=65521,a%=65521}return r|a<<16|0}Mu.exports=Ib});var po=R((Tw,Ou)=>{"use strict";function Mb(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[i]=e}return t}var Ob=Mb();function Db(e,t,i,n){var r=Ob,a=n+i;e^=-1;for(var s=n;s<a;s++)e=e>>>8^r[(e^t[s])&255];return e^-1}Ou.exports=Db});var Gr=R((Lw,Du)=>{"use strict";Du.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var qu=R(We=>{"use strict";var ue=st(),Ee=Iu(),Fu=uo(),Et=po(),zb=Gr(),Gt=0,jb=1,Bb=3,Tt=4,zu=5,Ge=0,ju=1,Se=-2,Fb=-3,fo=-5,Nb=-1,Hb=1,Wr=2,Ub=3,$b=4,qb=0,Gb=2,Xr=8,Wb=9,Yb=15,Vb=8,Kb=29,Xb=256,go=Xb+1+Kb,Zb=30,Jb=19,Qb=2*go+1,ev=15,z=3,Ct=258,Ie=Ct+z+1,tv=32,Zr=42,mo=69,Yr=73,Vr=91,Kr=103,Ut=113,Cn=666,te=1,kn=2,$t=3,Li=4,iv=3;function kt(e,t){return e.msg=zb[t],t}function Bu(e){return(e<<1)-(e>4?9:0)}function At(e){for(var t=e.length;--t>=0;)e[t]=0}function St(e){var t=e.state,i=t.pending;i>e.avail_out&&(i=e.avail_out),i!==0&&(ue.arraySet(e.output,t.pending_buf,t.pending_out,i,e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,t.pending===0&&(t.pending_out=0))}function re(e,t){Ee._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,St(e.strm)}function B(e,t){e.pending_buf[e.pending++]=t}function An(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function nv(e,t,i,n){var r=e.avail_in;return r>n&&(r=n),r===0?0:(e.avail_in-=r,ue.arraySet(t,e.input,e.next_in,r,i),e.state.wrap===1?e.adler=Fu(e.adler,t,r,i):e.state.wrap===2&&(e.adler=Et(e.adler,t,r,i)),e.next_in+=r,e.total_in+=r,r)}function Nu(e,t){var i=e.max_chain_length,n=e.strstart,r,a,s=e.prev_length,o=e.nice_match,c=e.strstart>e.w_size-Ie?e.strstart-(e.w_size-Ie):0,l=e.window,d=e.w_mask,u=e.prev,p=e.strstart+Ct,f=l[n+s-1],m=l[n+s];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do if(r=t,!(l[r+s]!==m||l[r+s-1]!==f||l[r]!==l[n]||l[++r]!==l[n+1])){n+=2,r++;do;while(l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&n<p);if(a=Ct-(p-n),n=p-Ct,a>s){if(e.match_start=t,s=a,a>=o)break;f=l[n+s-1],m=l[n+s]}}while((t=u[t&d])>c&&--i!==0);return s<=e.lookahead?s:e.lookahead}function qt(e){var t=e.w_size,i,n,r,a,s;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ie)){ue.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,i=n;do r=e.head[--i],e.head[i]=r>=t?r-t:0;while(--n);n=t,i=n;do r=e.prev[--i],e.prev[i]=r>=t?r-t:0;while(--n);a+=t}if(e.strm.avail_in===0)break;if(n=nv(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=z)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+z-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<z)););}while(e.lookahead<Ie&&e.strm.avail_in!==0)}function rv(e,t){var i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(qt(e),e.lookahead===0&&t===Gt)return te;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+i;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,re(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ie&&(re(e,!1),e.strm.avail_out===0))return te}return e.insert=0,t===Tt?(re(e,!0),e.strm.avail_out===0?$t:Li):(e.strstart>e.block_start&&(re(e,!1),e.strm.avail_out===0),te)}function ho(e,t){for(var i,n;;){if(e.lookahead<Ie){if(qt(e),e.lookahead<Ie&&t===Gt)return te;if(e.lookahead===0)break}if(i=0,e.lookahead>=z&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),i!==0&&e.strstart-i<=e.w_size-Ie&&(e.match_length=Nu(e,i)),e.match_length>=z)if(n=Ee._tr_tally(e,e.strstart-e.match_start,e.match_length-z),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=z){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Ee._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(re(e,!1),e.strm.avail_out===0))return te}return e.insert=e.strstart<z-1?e.strstart:z-1,t===Tt?(re(e,!0),e.strm.avail_out===0?$t:Li):e.last_lit&&(re(e,!1),e.strm.avail_out===0)?te:kn}function ki(e,t){for(var i,n,r;;){if(e.lookahead<Ie){if(qt(e),e.lookahead<Ie&&t===Gt)return te;if(e.lookahead===0)break}if(i=0,e.lookahead>=z&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=z-1,i!==0&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-Ie&&(e.match_length=Nu(e,i),e.match_length<=5&&(e.strategy===Hb||e.match_length===z&&e.strstart-e.match_start>4096)&&(e.match_length=z-1)),e.prev_length>=z&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-z,n=Ee._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-z),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=r&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=z-1,e.strstart++,n&&(re(e,!1),e.strm.avail_out===0))return te}else if(e.match_available){if(n=Ee._tr_tally(e,0,e.window[e.strstart-1]),n&&re(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return te}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Ee._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<z-1?e.strstart:z-1,t===Tt?(re(e,!0),e.strm.avail_out===0?$t:Li):e.last_lit&&(re(e,!1),e.strm.avail_out===0)?te:kn}function av(e,t){for(var i,n,r,a,s=e.window;;){if(e.lookahead<=Ct){if(qt(e),e.lookahead<=Ct&&t===Gt)return te;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=z&&e.strstart>0&&(r=e.strstart-1,n=s[r],n===s[++r]&&n===s[++r]&&n===s[++r])){a=e.strstart+Ct;do;while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<a);e.match_length=Ct-(a-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=z?(i=Ee._tr_tally(e,1,e.match_length-z),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=Ee._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(re(e,!1),e.strm.avail_out===0))return te}return e.insert=0,t===Tt?(re(e,!0),e.strm.avail_out===0?$t:Li):e.last_lit&&(re(e,!1),e.strm.avail_out===0)?te:kn}function sv(e,t){for(var i;;){if(e.lookahead===0&&(qt(e),e.lookahead===0)){if(t===Gt)return te;break}if(e.match_length=0,i=Ee._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(re(e,!1),e.strm.avail_out===0))return te}return e.insert=0,t===Tt?(re(e,!0),e.strm.avail_out===0?$t:Li):e.last_lit&&(re(e,!1),e.strm.avail_out===0)?te:kn}function qe(e,t,i,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=r}var Ti;Ti=[new qe(0,0,0,0,rv),new qe(4,4,8,4,ho),new qe(4,5,16,8,ho),new qe(4,6,32,32,ho),new qe(4,4,16,16,ki),new qe(8,16,32,32,ki),new qe(8,16,128,128,ki),new qe(8,32,128,256,ki),new qe(32,128,258,1024,ki),new qe(32,258,258,4096,ki)];function ov(e){e.window_size=2*e.w_size,At(e.head),e.max_lazy_match=Ti[e.level].max_lazy,e.good_match=Ti[e.level].good_length,e.nice_match=Ti[e.level].nice_length,e.max_chain_length=Ti[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=z-1,e.match_available=0,e.ins_h=0}function lv(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Xr,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ue.Buf16(Qb*2),this.dyn_dtree=new ue.Buf16((2*Zb+1)*2),this.bl_tree=new ue.Buf16((2*Jb+1)*2),At(this.dyn_ltree),At(this.dyn_dtree),At(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ue.Buf16(ev+1),this.heap=new ue.Buf16(2*go+1),At(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ue.Buf16(2*go+1),At(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Hu(e){var t;return!e||!e.state?kt(e,Se):(e.total_in=e.total_out=0,e.data_type=Gb,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Zr:Ut,e.adler=t.wrap===2?0:1,t.last_flush=Gt,Ee._tr_init(t),Ge)}function Uu(e){var t=Hu(e);return t===Ge&&ov(e.state),t}function cv(e,t){return!e||!e.state||e.state.wrap!==2?Se:(e.state.gzhead=t,Ge)}function $u(e,t,i,n,r,a){if(!e)return Se;var s=1;if(t===Nb&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>Wb||i!==Xr||n<8||n>15||t<0||t>9||a<0||a>$b)return kt(e,Se);n===8&&(n=9);var o=new lv;return e.state=o,o.strm=e,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=r+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+z-1)/z),o.window=new ue.Buf8(o.w_size*2),o.head=new ue.Buf16(o.hash_size),o.prev=new ue.Buf16(o.w_size),o.lit_bufsize=1<<r+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new ue.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=t,o.strategy=a,o.method=i,Uu(e)}function dv(e,t){return $u(e,t,Xr,Yb,Vb,qb)}function uv(e,t){var i,n,r,a;if(!e||!e.state||t>zu||t<0)return e?kt(e,Se):Se;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Cn&&t!==Tt)return kt(e,e.avail_out===0?fo:Se);if(n.strm=e,i=n.last_flush,n.last_flush=t,n.status===Zr)if(n.wrap===2)e.adler=0,B(n,31),B(n,139),B(n,8),n.gzhead?(B(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),B(n,n.gzhead.time&255),B(n,n.gzhead.time>>8&255),B(n,n.gzhead.time>>16&255),B(n,n.gzhead.time>>24&255),B(n,n.level===9?2:n.strategy>=Wr||n.level<2?4:0),B(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(B(n,n.gzhead.extra.length&255),B(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Et(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=mo):(B(n,0),B(n,0),B(n,0),B(n,0),B(n,0),B(n,n.level===9?2:n.strategy>=Wr||n.level<2?4:0),B(n,iv),n.status=Ut);else{var s=Xr+(n.w_bits-8<<4)<<8,o=-1;n.strategy>=Wr||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,s|=o<<6,n.strstart!==0&&(s|=tv),s+=31-s%31,n.status=Ut,An(n,s),n.strstart!==0&&(An(n,e.adler>>>16),An(n,e.adler&65535)),e.adler=1}if(n.status===mo)if(n.gzhead.extra){for(r=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),St(e),r=n.pending,n.pending===n.pending_buf_size));)B(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Yr)}else n.status=Yr;if(n.status===Yr)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),St(e),r=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,B(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),a===0&&(n.gzindex=0,n.status=Vr)}else n.status=Vr;if(n.status===Vr)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),St(e),r=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,B(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),a===0&&(n.status=Kr)}else n.status=Kr;if(n.status===Kr&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&St(e),n.pending+2<=n.pending_buf_size&&(B(n,e.adler&255),B(n,e.adler>>8&255),e.adler=0,n.status=Ut)):n.status=Ut),n.pending!==0){if(St(e),e.avail_out===0)return n.last_flush=-1,Ge}else if(e.avail_in===0&&Bu(t)<=Bu(i)&&t!==Tt)return kt(e,fo);if(n.status===Cn&&e.avail_in!==0)return kt(e,fo);if(e.avail_in!==0||n.lookahead!==0||t!==Gt&&n.status!==Cn){var c=n.strategy===Wr?sv(n,t):n.strategy===Ub?av(n,t):Ti[n.level].func(n,t);if((c===$t||c===Li)&&(n.status=Cn),c===te||c===$t)return e.avail_out===0&&(n.last_flush=-1),Ge;if(c===kn&&(t===jb?Ee._tr_align(n):t!==zu&&(Ee._tr_stored_block(n,0,0,!1),t===Bb&&(At(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),St(e),e.avail_out===0))return n.last_flush=-1,Ge}return t!==Tt?Ge:n.wrap<=0?ju:(n.wrap===2?(B(n,e.adler&255),B(n,e.adler>>8&255),B(n,e.adler>>16&255),B(n,e.adler>>24&255),B(n,e.total_in&255),B(n,e.total_in>>8&255),B(n,e.total_in>>16&255),B(n,e.total_in>>24&255)):(An(n,e.adler>>>16),An(n,e.adler&65535)),St(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ge:ju)}function pv(e){var t;return!e||!e.state?Se:(t=e.state.status,t!==Zr&&t!==mo&&t!==Yr&&t!==Vr&&t!==Kr&&t!==Ut&&t!==Cn?kt(e,Se):(e.state=null,t===Ut?kt(e,Fb):Ge))}function fv(e,t){var i=t.length,n,r,a,s,o,c,l,d;if(!e||!e.state||(n=e.state,s=n.wrap,s===2||s===1&&n.status!==Zr||n.lookahead))return Se;for(s===1&&(e.adler=Fu(e.adler,t,i,0)),n.wrap=0,i>=n.w_size&&(s===0&&(At(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new ue.Buf8(n.w_size),ue.arraySet(d,t,i-n.w_size,n.w_size,0),t=d,i=n.w_size),o=e.avail_in,c=e.next_in,l=e.input,e.avail_in=i,e.next_in=0,e.input=t,qt(n);n.lookahead>=z;){r=n.strstart,a=n.lookahead-(z-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+z-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++;while(--a);n.strstart=r,n.lookahead=z-1,qt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=z-1,n.match_available=0,e.next_in=c,e.input=l,e.avail_in=o,n.wrap=s,Ge}We.deflateInit=dv;We.deflateInit2=$u;We.deflateReset=Uu;We.deflateResetKeep=Hu;We.deflateSetHeader=cv;We.deflate=uv;We.deflateEnd=pv;We.deflateSetDictionary=fv;We.deflateInfo="pako deflate (from Nodeca project)"});var bo=R(Ri=>{"use strict";var Jr=st(),Gu=!0,Wu=!0;try{String.fromCharCode.apply(null,[0])}catch{Gu=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Wu=!1}var Tn=new Jr.Buf8(256);for(lt=0;lt<256;lt++)Tn[lt]=lt>=252?6:lt>=248?5:lt>=240?4:lt>=224?3:lt>=192?2:1;var lt;Tn[254]=Tn[254]=1;Ri.string2buf=function(e){var t,i,n,r,a,s=e.length,o=0;for(r=0;r<s;r++)i=e.charCodeAt(r),(i&64512)===55296&&r+1<s&&(n=e.charCodeAt(r+1),(n&64512)===56320&&(i=65536+(i-55296<<10)+(n-56320),r++)),o+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Jr.Buf8(o),a=0,r=0;a<o;r++)i=e.charCodeAt(r),(i&64512)===55296&&r+1<s&&(n=e.charCodeAt(r+1),(n&64512)===56320&&(i=65536+(i-55296<<10)+(n-56320),r++)),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|i&63):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|i&63):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|i&63);return t};function Yu(e,t){if(t<65534&&(e.subarray&&Wu||!e.subarray&&Gu))return String.fromCharCode.apply(null,Jr.shrinkBuf(e,t));for(var i="",n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i}Ri.buf2binstring=function(e){return Yu(e,e.length)};Ri.binstring2buf=function(e){for(var t=new Jr.Buf8(e.length),i=0,n=t.length;i<n;i++)t[i]=e.charCodeAt(i);return t};Ri.buf2string=function(e,t){var i,n,r,a,s=t||e.length,o=new Array(s*2);for(n=0,i=0;i<s;){if(r=e[i++],r<128){o[n++]=r;continue}if(a=Tn[r],a>4){o[n++]=65533,i+=a-1;continue}for(r&=a===2?31:a===3?15:7;a>1&&i<s;)r=r<<6|e[i++]&63,a--;if(a>1){o[n++]=65533;continue}r<65536?o[n++]=r:(r-=65536,o[n++]=55296|r>>10&1023,o[n++]=56320|r&1023)}return Yu(o,n)};Ri.utf8border=function(e,t){var i;for(t=t||e.length,t>e.length&&(t=e.length),i=t-1;i>=0&&(e[i]&192)===128;)i--;return i<0||i===0?t:i+Tn[e[i]]>t?i:t}});var vo=R((Iw,Vu)=>{"use strict";function hv(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Vu.exports=hv});var Ju=R(Pn=>{"use strict";var Ln=qu(),Rn=st(),xo=bo(),wo=Gr(),gv=vo(),Zu=Object.prototype.toString,mv=0,yo=4,Pi=0,Ku=1,Xu=2,bv=-1,vv=0,yv=8;function Wt(e){if(!(this instanceof Wt))return new Wt(e);this.options=Rn.assign({level:bv,method:yv,chunkSize:16384,windowBits:15,memLevel:8,strategy:vv,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gv,this.strm.avail_out=0;var i=Ln.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==Pi)throw new Error(wo[i]);if(t.header&&Ln.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=xo.string2buf(t.dictionary):Zu.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,i=Ln.deflateSetDictionary(this.strm,n),i!==Pi)throw new Error(wo[i]);this._dict_set=!0}}Wt.prototype.push=function(e,t){var i=this.strm,n=this.options.chunkSize,r,a;if(this.ended)return!1;a=t===~~t?t:t===!0?yo:mv,typeof e=="string"?i.input=xo.string2buf(e):Zu.call(e)==="[object ArrayBuffer]"?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(i.avail_out===0&&(i.output=new Rn.Buf8(n),i.next_out=0,i.avail_out=n),r=Ln.deflate(i,a),r!==Ku&&r!==Pi)return this.onEnd(r),this.ended=!0,!1;(i.avail_out===0||i.avail_in===0&&(a===yo||a===Xu))&&(this.options.to==="string"?this.onData(xo.buf2binstring(Rn.shrinkBuf(i.output,i.next_out))):this.onData(Rn.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||i.avail_out===0)&&r!==Ku);return a===yo?(r=Ln.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Pi):(a===Xu&&(this.onEnd(Pi),i.avail_out=0),!0)};Wt.prototype.onData=function(e){this.chunks.push(e)};Wt.prototype.onEnd=function(e){e===Pi&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Rn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function _o(e,t){var i=new Wt(t);if(i.push(e,!0),i.err)throw i.msg||wo[i.err];return i.result}function xv(e,t){return t=t||{},t.raw=!0,_o(e,t)}function wv(e,t){return t=t||{},t.gzip=!0,_o(e,t)}Pn.Deflate=Wt;Pn.deflate=_o;Pn.deflateRaw=xv;Pn.gzip=wv});var ep=R((Ow,Qu)=>{"use strict";var Qr=30,_v=12;Qu.exports=function(t,i){var n,r,a,s,o,c,l,d,u,p,f,m,h,g,b,v,y,x,w,T,C,S,L,M,_;n=t.state,r=t.next_in,M=t.input,a=r+(t.avail_in-5),s=t.next_out,_=t.output,o=s-(i-t.avail_out),c=s+(t.avail_out-257),l=n.dmax,d=n.wsize,u=n.whave,p=n.wnext,f=n.window,m=n.hold,h=n.bits,g=n.lencode,b=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{h<15&&(m+=M[r++]<<h,h+=8,m+=M[r++]<<h,h+=8),x=g[m&v];t:for(;;){if(w=x>>>24,m>>>=w,h-=w,w=x>>>16&255,w===0)_[s++]=x&65535;else if(w&16){T=x&65535,w&=15,w&&(h<w&&(m+=M[r++]<<h,h+=8),T+=m&(1<<w)-1,m>>>=w,h-=w),h<15&&(m+=M[r++]<<h,h+=8,m+=M[r++]<<h,h+=8),x=b[m&y];i:for(;;){if(w=x>>>24,m>>>=w,h-=w,w=x>>>16&255,w&16){if(C=x&65535,w&=15,h<w&&(m+=M[r++]<<h,h+=8,h<w&&(m+=M[r++]<<h,h+=8)),C+=m&(1<<w)-1,C>l){t.msg="invalid distance too far back",n.mode=Qr;break e}if(m>>>=w,h-=w,w=s-o,C>w){if(w=C-w,w>u&&n.sane){t.msg="invalid distance too far back",n.mode=Qr;break e}if(S=0,L=f,p===0){if(S+=d-w,w<T){T-=w;do _[s++]=f[S++];while(--w);S=s-C,L=_}}else if(p<w){if(S+=d+p-w,w-=p,w<T){T-=w;do _[s++]=f[S++];while(--w);if(S=0,p<T){w=p,T-=w;do _[s++]=f[S++];while(--w);S=s-C,L=_}}}else if(S+=p-w,w<T){T-=w;do _[s++]=f[S++];while(--w);S=s-C,L=_}for(;T>2;)_[s++]=L[S++],_[s++]=L[S++],_[s++]=L[S++],T-=3;T&&(_[s++]=L[S++],T>1&&(_[s++]=L[S++]))}else{S=s-C;do _[s++]=_[S++],_[s++]=_[S++],_[s++]=_[S++],T-=3;while(T>2);T&&(_[s++]=_[S++],T>1&&(_[s++]=_[S++]))}}else if((w&64)===0){x=b[(x&65535)+(m&(1<<w)-1)];continue i}else{t.msg="invalid distance code",n.mode=Qr;break e}break}}else if((w&64)===0){x=g[(x&65535)+(m&(1<<w)-1)];continue t}else if(w&32){n.mode=_v;break e}else{t.msg="invalid literal/length code",n.mode=Qr;break e}break}}while(r<a&&s<c);T=h>>3,r-=T,h-=T<<3,m&=(1<<h)-1,t.next_in=r,t.next_out=s,t.avail_in=r<a?5+(a-r):5-(r-a),t.avail_out=s<c?257+(c-s):257-(s-c),n.hold=m,n.bits=h}});var op=R((Dw,sp)=>{"use strict";var tp=st(),Ii=15,ip=852,np=592,rp=0,Eo=1,ap=2,Ev=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Sv=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Av=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Cv=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];sp.exports=function(t,i,n,r,a,s,o,c){var l=c.bits,d=0,u=0,p=0,f=0,m=0,h=0,g=0,b=0,v=0,y=0,x,w,T,C,S,L=null,M=0,_,E=new tp.Buf16(Ii+1),A=new tp.Buf16(Ii+1),P=null,I=0,k,D,j;for(d=0;d<=Ii;d++)E[d]=0;for(u=0;u<r;u++)E[i[n+u]]++;for(m=l,f=Ii;f>=1&&E[f]===0;f--);if(m>f&&(m=f),f===0)return a[s++]=1<<24|64<<16|0,a[s++]=1<<24|64<<16|0,c.bits=1,0;for(p=1;p<f&&E[p]===0;p++);for(m<p&&(m=p),b=1,d=1;d<=Ii;d++)if(b<<=1,b-=E[d],b<0)return-1;if(b>0&&(t===rp||f!==1))return-1;for(A[1]=0,d=1;d<Ii;d++)A[d+1]=A[d]+E[d];for(u=0;u<r;u++)i[n+u]!==0&&(o[A[i[n+u]]++]=u);if(t===rp?(L=P=o,_=19):t===Eo?(L=Ev,M-=257,P=Sv,I-=257,_=256):(L=Av,P=Cv,_=-1),y=0,u=0,d=p,S=s,h=m,g=0,T=-1,v=1<<m,C=v-1,t===Eo&&v>ip||t===ap&&v>np)return 1;for(;;){k=d-g,o[u]<_?(D=0,j=o[u]):o[u]>_?(D=P[I+o[u]],j=L[M+o[u]]):(D=96,j=0),x=1<<d-g,w=1<<h,p=w;do w-=x,a[S+(y>>g)+w]=k<<24|D<<16|j|0;while(w!==0);for(x=1<<d-1;y&x;)x>>=1;if(x!==0?(y&=x-1,y+=x):y=0,u++,--E[d]===0){if(d===f)break;d=i[n+o[u]]}if(d>m&&(y&C)!==T){for(g===0&&(g=m),S+=p,h=d-g,b=1<<h;h+g<f&&(b-=E[h+g],!(b<=0));)h++,b<<=1;if(v+=1<<h,t===Eo&&v>ip||t===ap&&v>np)return 1;T=y&C,a[T]=m<<24|h<<16|S-s|0}}return y!==0&&(a[S+y]=d-g<<24|64<<16|0),c.bits=m,0}});var Up=R(Me=>{"use strict";var be=st(),Lo=uo(),Ye=po(),kv=ep(),In=op(),Tv=0,Mp=1,Op=2,lp=4,Lv=5,ea=6,Yt=0,Rv=1,Pv=2,Ae=-2,Dp=-3,Ro=-4,Iv=-5,cp=8,zp=1,dp=2,up=3,pp=4,fp=5,hp=6,gp=7,mp=8,bp=9,vp=10,na=11,ct=12,So=13,yp=14,Ao=15,xp=16,wp=17,_p=18,Ep=19,ta=20,ia=21,Sp=22,Ap=23,Cp=24,kp=25,Tp=26,Co=27,Lp=28,Rp=29,q=30,Po=31,Mv=32,Ov=852,Dv=592,zv=15,jv=zv;function Pp(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Bv(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new be.Buf16(320),this.work=new be.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function jp(e){var t;return!e||!e.state?Ae:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=zp,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new be.Buf32(Ov),t.distcode=t.distdyn=new be.Buf32(Dv),t.sane=1,t.back=-1,Yt)}function Bp(e){var t;return!e||!e.state?Ae:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,jp(e))}function Fp(e,t){var i,n;return!e||!e.state||(n=e.state,t<0?(i=0,t=-t):(i=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Ae:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,Bp(e))}function Np(e,t){var i,n;return e?(n=new Bv,e.state=n,n.window=null,i=Fp(e,t),i!==Yt&&(e.state=null),i):Ae}function Fv(e){return Np(e,jv)}var Ip=!0,ko,To;function Nv(e){if(Ip){var t;for(ko=new be.Buf32(512),To=new be.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(In(Mp,e.lens,0,288,ko,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;In(Op,e.lens,0,32,To,0,e.work,{bits:5}),Ip=!1}e.lencode=ko,e.lenbits=9,e.distcode=To,e.distbits=5}function Hp(e,t,i,n){var r,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new be.Buf8(a.wsize)),n>=a.wsize?(be.arraySet(a.window,t,i-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(r=a.wsize-a.wnext,r>n&&(r=n),be.arraySet(a.window,t,i-n,r,a.wnext),n-=r,n?(be.arraySet(a.window,t,i-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=r))),0}function Hv(e,t){var i,n,r,a,s,o,c,l,d,u,p,f,m,h,g=0,b,v,y,x,w,T,C,S,L=new be.Buf8(4),M,_,E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ae;i=e.state,i.mode===ct&&(i.mode=So),s=e.next_out,r=e.output,c=e.avail_out,a=e.next_in,n=e.input,o=e.avail_in,l=i.hold,d=i.bits,u=o,p=c,S=Yt;e:for(;;)switch(i.mode){case zp:if(i.wrap===0){i.mode=So;break}for(;d<16;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(i.wrap&2&&l===35615){i.check=0,L[0]=l&255,L[1]=l>>>8&255,i.check=Ye(i.check,L,2,0),l=0,d=0,i.mode=dp;break}if(i.flags=0,i.head&&(i.head.done=!1),!(i.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=q;break}if((l&15)!==cp){e.msg="unknown compression method",i.mode=q;break}if(l>>>=4,d-=4,C=(l&15)+8,i.wbits===0)i.wbits=C;else if(C>i.wbits){e.msg="invalid window size",i.mode=q;break}i.dmax=1<<C,e.adler=i.check=1,i.mode=l&512?vp:ct,l=0,d=0;break;case dp:for(;d<16;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(i.flags=l,(i.flags&255)!==cp){e.msg="unknown compression method",i.mode=q;break}if(i.flags&57344){e.msg="unknown header flags set",i.mode=q;break}i.head&&(i.head.text=l>>8&1),i.flags&512&&(L[0]=l&255,L[1]=l>>>8&255,i.check=Ye(i.check,L,2,0)),l=0,d=0,i.mode=up;case up:for(;d<32;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.head&&(i.head.time=l),i.flags&512&&(L[0]=l&255,L[1]=l>>>8&255,L[2]=l>>>16&255,L[3]=l>>>24&255,i.check=Ye(i.check,L,4,0)),l=0,d=0,i.mode=pp;case pp:for(;d<16;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.head&&(i.head.xflags=l&255,i.head.os=l>>8),i.flags&512&&(L[0]=l&255,L[1]=l>>>8&255,i.check=Ye(i.check,L,2,0)),l=0,d=0,i.mode=fp;case fp:if(i.flags&1024){for(;d<16;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.length=l,i.head&&(i.head.extra_len=l),i.flags&512&&(L[0]=l&255,L[1]=l>>>8&255,i.check=Ye(i.check,L,2,0)),l=0,d=0}else i.head&&(i.head.extra=null);i.mode=hp;case hp:if(i.flags&1024&&(f=i.length,f>o&&(f=o),f&&(i.head&&(C=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),be.arraySet(i.head.extra,n,a,f,C)),i.flags&512&&(i.check=Ye(i.check,n,f,a)),o-=f,a+=f,i.length-=f),i.length))break e;i.length=0,i.mode=gp;case gp:if(i.flags&2048){if(o===0)break e;f=0;do C=n[a+f++],i.head&&C&&i.length<65536&&(i.head.name+=String.fromCharCode(C));while(C&&f<o);if(i.flags&512&&(i.check=Ye(i.check,n,f,a)),o-=f,a+=f,C)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=mp;case mp:if(i.flags&4096){if(o===0)break e;f=0;do C=n[a+f++],i.head&&C&&i.length<65536&&(i.head.comment+=String.fromCharCode(C));while(C&&f<o);if(i.flags&512&&(i.check=Ye(i.check,n,f,a)),o-=f,a+=f,C)break e}else i.head&&(i.head.comment=null);i.mode=bp;case bp:if(i.flags&512){for(;d<16;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(l!==(i.check&65535)){e.msg="header crc mismatch",i.mode=q;break}l=0,d=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=ct;break;case vp:for(;d<32;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}e.adler=i.check=Pp(l),l=0,d=0,i.mode=na;case na:if(i.havedict===0)return e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,i.hold=l,i.bits=d,Pv;e.adler=i.check=1,i.mode=ct;case ct:if(t===Lv||t===ea)break e;case So:if(i.last){l>>>=d&7,d-=d&7,i.mode=Co;break}for(;d<3;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}switch(i.last=l&1,l>>>=1,d-=1,l&3){case 0:i.mode=yp;break;case 1:if(Nv(i),i.mode=ta,t===ea){l>>>=2,d-=2;break e}break;case 2:i.mode=wp;break;case 3:e.msg="invalid block type",i.mode=q}l>>>=2,d-=2;break;case yp:for(l>>>=d&7,d-=d&7;d<32;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",i.mode=q;break}if(i.length=l&65535,l=0,d=0,i.mode=Ao,t===ea)break e;case Ao:i.mode=xp;case xp:if(f=i.length,f){if(f>o&&(f=o),f>c&&(f=c),f===0)break e;be.arraySet(r,n,a,f,s),o-=f,a+=f,c-=f,s+=f,i.length-=f;break}i.mode=ct;break;case wp:for(;d<14;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(i.nlen=(l&31)+257,l>>>=5,d-=5,i.ndist=(l&31)+1,l>>>=5,d-=5,i.ncode=(l&15)+4,l>>>=4,d-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=q;break}i.have=0,i.mode=_p;case _p:for(;i.have<i.ncode;){for(;d<3;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.lens[E[i.have++]]=l&7,l>>>=3,d-=3}for(;i.have<19;)i.lens[E[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,M={bits:i.lenbits},S=In(Tv,i.lens,0,19,i.lencode,0,i.work,M),i.lenbits=M.bits,S){e.msg="invalid code lengths set",i.mode=q;break}i.have=0,i.mode=Ep;case Ep:for(;i.have<i.nlen+i.ndist;){for(;g=i.lencode[l&(1<<i.lenbits)-1],b=g>>>24,v=g>>>16&255,y=g&65535,!(b<=d);){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(y<16)l>>>=b,d-=b,i.lens[i.have++]=y;else{if(y===16){for(_=b+2;d<_;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(l>>>=b,d-=b,i.have===0){e.msg="invalid bit length repeat",i.mode=q;break}C=i.lens[i.have-1],f=3+(l&3),l>>>=2,d-=2}else if(y===17){for(_=b+3;d<_;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}l>>>=b,d-=b,C=0,f=3+(l&7),l>>>=3,d-=3}else{for(_=b+7;d<_;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}l>>>=b,d-=b,C=0,f=11+(l&127),l>>>=7,d-=7}if(i.have+f>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=q;break}for(;f--;)i.lens[i.have++]=C}}if(i.mode===q)break;if(i.lens[256]===0){e.msg="invalid code -- missing end-of-block",i.mode=q;break}if(i.lenbits=9,M={bits:i.lenbits},S=In(Mp,i.lens,0,i.nlen,i.lencode,0,i.work,M),i.lenbits=M.bits,S){e.msg="invalid literal/lengths set",i.mode=q;break}if(i.distbits=6,i.distcode=i.distdyn,M={bits:i.distbits},S=In(Op,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,M),i.distbits=M.bits,S){e.msg="invalid distances set",i.mode=q;break}if(i.mode=ta,t===ea)break e;case ta:i.mode=ia;case ia:if(o>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,i.hold=l,i.bits=d,kv(e,p),s=e.next_out,r=e.output,c=e.avail_out,a=e.next_in,n=e.input,o=e.avail_in,l=i.hold,d=i.bits,i.mode===ct&&(i.back=-1);break}for(i.back=0;g=i.lencode[l&(1<<i.lenbits)-1],b=g>>>24,v=g>>>16&255,y=g&65535,!(b<=d);){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(v&&(v&240)===0){for(x=b,w=v,T=y;g=i.lencode[T+((l&(1<<x+w)-1)>>x)],b=g>>>24,v=g>>>16&255,y=g&65535,!(x+b<=d);){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}l>>>=x,d-=x,i.back+=x}if(l>>>=b,d-=b,i.back+=b,i.length=y,v===0){i.mode=Tp;break}if(v&32){i.back=-1,i.mode=ct;break}if(v&64){e.msg="invalid literal/length code",i.mode=q;break}i.extra=v&15,i.mode=Sp;case Sp:if(i.extra){for(_=i.extra;d<_;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.length+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=Ap;case Ap:for(;g=i.distcode[l&(1<<i.distbits)-1],b=g>>>24,v=g>>>16&255,y=g&65535,!(b<=d);){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if((v&240)===0){for(x=b,w=v,T=y;g=i.distcode[T+((l&(1<<x+w)-1)>>x)],b=g>>>24,v=g>>>16&255,y=g&65535,!(x+b<=d);){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}l>>>=x,d-=x,i.back+=x}if(l>>>=b,d-=b,i.back+=b,v&64){e.msg="invalid distance code",i.mode=q;break}i.offset=y,i.extra=v&15,i.mode=Cp;case Cp:if(i.extra){for(_=i.extra;d<_;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.offset+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=q;break}i.mode=kp;case kp:if(c===0)break e;if(f=p-c,i.offset>f){if(f=i.offset-f,f>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=q;break}f>i.wnext?(f-=i.wnext,m=i.wsize-f):m=i.wnext-f,f>i.length&&(f=i.length),h=i.window}else h=r,m=s-i.offset,f=i.length;f>c&&(f=c),c-=f,i.length-=f;do r[s++]=h[m++];while(--f);i.length===0&&(i.mode=ia);break;case Tp:if(c===0)break e;r[s++]=i.length,c--,i.mode=ia;break;case Co:if(i.wrap){for(;d<32;){if(o===0)break e;o--,l|=n[a++]<<d,d+=8}if(p-=c,e.total_out+=p,i.total+=p,p&&(e.adler=i.check=i.flags?Ye(i.check,r,p,s-p):Lo(i.check,r,p,s-p)),p=c,(i.flags?l:Pp(l))!==i.check){e.msg="incorrect data check",i.mode=q;break}l=0,d=0}i.mode=Lp;case Lp:if(i.wrap&&i.flags){for(;d<32;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(l!==(i.total&4294967295)){e.msg="incorrect length check",i.mode=q;break}l=0,d=0}i.mode=Rp;case Rp:S=Rv;break e;case q:S=Dp;break e;case Po:return Ro;case Mv:default:return Ae}return e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,i.hold=l,i.bits=d,(i.wsize||p!==e.avail_out&&i.mode<q&&(i.mode<Co||t!==lp))&&Hp(e,e.output,e.next_out,p-e.avail_out)?(i.mode=Po,Ro):(u-=e.avail_in,p-=e.avail_out,e.total_in+=u,e.total_out+=p,i.total+=p,i.wrap&&p&&(e.adler=i.check=i.flags?Ye(i.check,r,p,e.next_out-p):Lo(i.check,r,p,e.next_out-p)),e.data_type=i.bits+(i.last?64:0)+(i.mode===ct?128:0)+(i.mode===ta||i.mode===Ao?256:0),(u===0&&p===0||t===lp)&&S===Yt&&(S=Iv),S)}function Uv(e){if(!e||!e.state)return Ae;var t=e.state;return t.window&&(t.window=null),e.state=null,Yt}function $v(e,t){var i;return!e||!e.state||(i=e.state,(i.wrap&2)===0)?Ae:(i.head=t,t.done=!1,Yt)}function qv(e,t){var i=t.length,n,r,a;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==na)?Ae:n.mode===na&&(r=1,r=Lo(r,t,i,0),r!==n.check)?Dp:(a=Hp(e,t,i,i),a?(n.mode=Po,Ro):(n.havedict=1,Yt))}Me.inflateReset=Bp;Me.inflateReset2=Fp;Me.inflateResetKeep=jp;Me.inflateInit=Fv;Me.inflateInit2=Np;Me.inflate=Hv;Me.inflateEnd=Uv;Me.inflateGetHeader=$v;Me.inflateSetDictionary=qv;Me.inflateInfo="pako inflate (from Nodeca project)"});var Io=R((jw,$p)=>{"use strict";$p.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var Gp=R((Bw,qp)=>{"use strict";function Gv(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}qp.exports=Gv});var Yp=R(On=>{"use strict";var Mi=Up(),Mn=st(),ra=bo(),K=Io(),Mo=Gr(),Wv=vo(),Yv=Gp(),Wp=Object.prototype.toString;function Vt(e){if(!(this instanceof Vt))return new Vt(e);this.options=Mn.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Wv,this.strm.avail_out=0;var i=Mi.inflateInit2(this.strm,t.windowBits);if(i!==K.Z_OK)throw new Error(Mo[i]);if(this.header=new Yv,Mi.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ra.string2buf(t.dictionary):Wp.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=Mi.inflateSetDictionary(this.strm,t.dictionary),i!==K.Z_OK)))throw new Error(Mo[i])}Vt.prototype.push=function(e,t){var i=this.strm,n=this.options.chunkSize,r=this.options.dictionary,a,s,o,c,l,d=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?K.Z_FINISH:K.Z_NO_FLUSH,typeof e=="string"?i.input=ra.binstring2buf(e):Wp.call(e)==="[object ArrayBuffer]"?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(i.avail_out===0&&(i.output=new Mn.Buf8(n),i.next_out=0,i.avail_out=n),a=Mi.inflate(i,K.Z_NO_FLUSH),a===K.Z_NEED_DICT&&r&&(a=Mi.inflateSetDictionary(this.strm,r)),a===K.Z_BUF_ERROR&&d===!0&&(a=K.Z_OK,d=!1),a!==K.Z_STREAM_END&&a!==K.Z_OK)return this.onEnd(a),this.ended=!0,!1;i.next_out&&(i.avail_out===0||a===K.Z_STREAM_END||i.avail_in===0&&(s===K.Z_FINISH||s===K.Z_SYNC_FLUSH))&&(this.options.to==="string"?(o=ra.utf8border(i.output,i.next_out),c=i.next_out-o,l=ra.buf2string(i.output,o),i.next_out=c,i.avail_out=n-c,c&&Mn.arraySet(i.output,i.output,o,c,0),this.onData(l)):this.onData(Mn.shrinkBuf(i.output,i.next_out))),i.avail_in===0&&i.avail_out===0&&(d=!0)}while((i.avail_in>0||i.avail_out===0)&&a!==K.Z_STREAM_END);return a===K.Z_STREAM_END&&(s=K.Z_FINISH),s===K.Z_FINISH?(a=Mi.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===K.Z_OK):(s===K.Z_SYNC_FLUSH&&(this.onEnd(K.Z_OK),i.avail_out=0),!0)};Vt.prototype.onData=function(e){this.chunks.push(e)};Vt.prototype.onEnd=function(e){e===K.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Mn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Oo(e,t){var i=new Vt(t);if(i.push(e,!0),i.err)throw i.msg||Mo[i.err];return i.result}function Vv(e,t){return t=t||{},t.raw=!0,Oo(e,t)}On.Inflate=Vt;On.inflate=Oo;On.inflateRaw=Vv;On.ungzip=Oo});var Xp=R((Nw,Kp)=>{"use strict";var Kv=st().assign,Xv=Ju(),Zv=Yp(),Jv=Io(),Vp={};Kv(Vp,Xv,Zv,Jv);Kp.exports=Vp});var Jp=R(sa=>{"use strict";var Qv=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined",ey=Xp(),Zp=G(),aa=me(),ty=Qv?"uint8array":"array";sa.magic="\b\0";function Kt(e,t){aa.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}Zp.inherits(Kt,aa);Kt.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(Zp.transformTo(ty,e.data),!1)};Kt.prototype.flush=function(){aa.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)};Kt.prototype.cleanUp=function(){aa.prototype.cleanUp.call(this),this._pako=null};Kt.prototype._createPako=function(){this._pako=new ey[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};sa.compressWorker=function(e){return new Kt("Deflate",e)};sa.uncompressWorker=function(){return new Kt("Inflate",{})}});var zo=R(Do=>{"use strict";var Qp=me();Do.STORE={magic:"\0\0",compressWorker:function(){return new Qp("STORE compression")},uncompressWorker:function(){return new Qp("STORE decompression")}};Do.DEFLATE=Jp()});var jo=R(Xt=>{"use strict";Xt.LOCAL_FILE_HEADER="PK";Xt.CENTRAL_FILE_HEADER="PK";Xt.CENTRAL_DIRECTORY_END="PK";Xt.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";Xt.ZIP64_CENTRAL_DIRECTORY_END="PK";Xt.DATA_DESCRIPTOR="PK\x07\b"});var rf=R((qw,nf)=>{"use strict";var Oi=G(),Di=me(),Bo=_i(),ef=Nr(),oa=jo(),H=function(e,t){var i="",n;for(n=0;n<t;n++)i+=String.fromCharCode(e&255),e=e>>>8;return i},iy=function(e,t){var i=e;return e||(i=t?16893:33204),(i&65535)<<16},ny=function(e){return(e||0)&63},tf=function(e,t,i,n,r,a){var s=e.file,o=e.compression,c=a!==Bo.utf8encode,l=Oi.transformTo("string",a(s.name)),d=Oi.transformTo("string",Bo.utf8encode(s.name)),u=s.comment,p=Oi.transformTo("string",a(u)),f=Oi.transformTo("string",Bo.utf8encode(u)),m=d.length!==s.name.length,h=f.length!==u.length,g,b,v="",y="",x="",w=s.dir,T=s.date,C={crc32:0,compressedSize:0,uncompressedSize:0};(!t||i)&&(C.crc32=e.crc32,C.compressedSize=e.compressedSize,C.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),!c&&(m||h)&&(S|=2048);var L=0,M=0;w&&(L|=16),r==="UNIX"?(M=798,L|=iy(s.unixPermissions,w)):(M=20,L|=ny(s.dosPermissions,w)),g=T.getUTCHours(),g=g<<6,g=g|T.getUTCMinutes(),g=g<<5,g=g|T.getUTCSeconds()/2,b=T.getUTCFullYear()-1980,b=b<<4,b=b|T.getUTCMonth()+1,b=b<<5,b=b|T.getUTCDate(),m&&(y=H(1,1)+H(ef(l),4)+d,v+="up"+H(y.length,2)+y),h&&(x=H(1,1)+H(ef(p),4)+f,v+="uc"+H(x.length,2)+x);var _="";_+=`
1
+ import{c as qa,d as Ne,e as Ga}from"./chunk-J2CL6VOZ.js";import{i as ar}from"./chunk-DHSGG7NF.js";import{c as et,d as Wa,g as ic,h as Ya,j as Va,l as nc,m as rc,n as Ka,o as ac}from"./chunk-PWGHKK3J.js";import{a as Fe,b as R,c as ig}from"./chunk-Q7FPWOA3.js";var tn=R(($0,ns)=>{"use strict";typeof process=="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?ns.exports={nextTick:ag}:ns.exports=process;function ag(e,t,i,n){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var r=arguments.length,a,s;switch(r){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,i)});case 4:return process.nextTick(function(){e.call(null,t,i,n)});default:for(a=new Array(r-1),s=0;s<a.length;)a[s++]=arguments[s];return process.nextTick(function(){e.apply(null,a)})}}});var Mc=R((q0,Ic)=>{"use strict";var sg={}.toString;Ic.exports=Array.isArray||function(e){return sg.call(e)=="[object Array]"}});var rs=R((G0,Oc)=>{"use strict";Oc.exports=Fe("stream")});var nn=R((as,zc)=>{"use strict";var _r=Fe("buffer"),tt=_r.Buffer;function Dc(e,t){for(var i in e)t[i]=e[i]}tt.from&&tt.alloc&&tt.allocUnsafe&&tt.allocUnsafeSlow?zc.exports=_r:(Dc(_r,as),as.Buffer=ui);function ui(e,t,i){return tt(e,t,i)}Dc(tt,ui);ui.from=function(e,t,i){if(typeof e=="number")throw new TypeError("Argument must not be a number");return tt(e,t,i)};ui.alloc=function(e,t,i){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=tt(e);return t!==void 0?typeof i=="string"?n.fill(t,i):n.fill(t):n.fill(0),n};ui.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return tt(e)};ui.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _r.SlowBuffer(e)}});var pi=R(ae=>{"use strict";function og(e){return Array.isArray?Array.isArray(e):Er(e)==="[object Array]"}ae.isArray=og;function lg(e){return typeof e=="boolean"}ae.isBoolean=lg;function cg(e){return e===null}ae.isNull=cg;function dg(e){return e==null}ae.isNullOrUndefined=dg;function ug(e){return typeof e=="number"}ae.isNumber=ug;function pg(e){return typeof e=="string"}ae.isString=pg;function fg(e){return typeof e=="symbol"}ae.isSymbol=fg;function hg(e){return e===void 0}ae.isUndefined=hg;function gg(e){return Er(e)==="[object RegExp]"}ae.isRegExp=gg;function mg(e){return typeof e=="object"&&e!==null}ae.isObject=mg;function bg(e){return Er(e)==="[object Date]"}ae.isDate=bg;function vg(e){return Er(e)==="[object Error]"||e instanceof Error}ae.isError=vg;function yg(e){return typeof e=="function"}ae.isFunction=yg;function xg(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}ae.isPrimitive=xg;ae.isBuffer=Fe("buffer").Buffer.isBuffer;function Er(e){return Object.prototype.toString.call(e)}});var jc=R((Y0,ss)=>{"use strict";typeof Object.create=="function"?ss.exports=function(t,i){i&&(t.super_=i,t.prototype=Object.create(i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:ss.exports=function(t,i){if(i){t.super_=i;var n=function(){};n.prototype=i.prototype,t.prototype=new n,t.prototype.constructor=t}}});var fi=R((V0,ls)=>{"use strict";try{if(os=Fe("util"),typeof os.inherits!="function")throw"";ls.exports=os.inherits}catch{ls.exports=jc()}var os});var Fc=R((K0,cs)=>{"use strict";function wg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Bc=nn().Buffer,rn=Fe("util");function _g(e,t,i){e.copy(t,i)}cs.exports=(function(){function e(){wg(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(i){var n={data:i,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function(i){var n={data:i,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function(){if(this.length!==0){var i=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,i}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(i){if(this.length===0)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=i+n.data;return r},e.prototype.concat=function(i){if(this.length===0)return Bc.alloc(0);for(var n=Bc.allocUnsafe(i>>>0),r=this.head,a=0;r;)_g(r.data,n,a),a+=r.data.length,r=r.next;return n},e})();rn&&rn.inspect&&rn.inspect.custom&&(cs.exports.prototype[rn.inspect.custom]=function(){var e=rn.inspect({length:this.length});return this.constructor.name+" "+e})});var ds=R((X0,Nc)=>{"use strict";var Sr=tn();function Eg(e,t){var i=this,n=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return n||r?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Sr.nextTick(Ar,this,e)):Sr.nextTick(Ar,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?i._writableState?i._writableState.errorEmitted||(i._writableState.errorEmitted=!0,Sr.nextTick(Ar,i,a)):Sr.nextTick(Ar,i,a):t&&t(a)}),this)}function Sg(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ar(e,t){e.emit("error",t)}Nc.exports={destroy:Eg,undestroy:Sg}});var Uc=R((Z0,Hc)=>{"use strict";Hc.exports=Fe("util").deprecate});var ps=R((J0,Xc)=>{"use strict";var jt=tn();Xc.exports=X;function qc(e){var t=this;this.next=null,this.entry=null,this.finish=function(){Ug(t,e)}}var Ag=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:jt.nextTick,hi;X.WritableState=sn;var Gc=Object.create(pi());Gc.inherits=fi();var Cg={deprecate:Uc()},Wc=rs(),kr=nn().Buffer,kg=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function Tg(e){return kr.from(e)}function Lg(e){return kr.isBuffer(e)||e instanceof kg}var Yc=ds();Gc.inherits(X,Wc);function Rg(){}function sn(e,t){hi=hi||Bt(),e=e||{};var i=t instanceof hi;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,r=e.writableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:i&&(r||r===0)?this.highWaterMark=r:this.highWaterMark=a,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 s=e.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){jg(t,o)},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 qc(this)}sn.prototype.getBuffer=function(){for(var t=this.bufferedRequest,i=[];t;)i.push(t),t=t.next;return i};(function(){try{Object.defineProperty(sn.prototype,"buffer",{get:Cg.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Cr;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Cr=Function.prototype[Symbol.hasInstance],Object.defineProperty(X,Symbol.hasInstance,{value:function(e){return Cr.call(this,e)?!0:this!==X?!1:e&&e._writableState instanceof sn}})):Cr=function(e){return e instanceof this};function X(e){if(hi=hi||Bt(),!Cr.call(X,this)&&!(this instanceof hi))return new X(e);this._writableState=new sn(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Wc.call(this)}X.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Pg(e,t){var i=new Error("write after end");e.emit("error",i),jt.nextTick(t,i)}function Ig(e,t,i,n){var r=!0,a=!1;return i===null?a=new TypeError("May not write null values to stream"):typeof i!="string"&&i!==void 0&&!t.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),jt.nextTick(n,a),r=!1),r}X.prototype.write=function(e,t,i){var n=this._writableState,r=!1,a=!n.objectMode&&Lg(e);return a&&!kr.isBuffer(e)&&(e=Tg(e)),typeof t=="function"&&(i=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof i!="function"&&(i=Rg),n.ended?Pg(this,i):(a||Ig(this,n,e,i))&&(n.pendingcb++,r=Og(this,n,a,e,t,i)),r};X.prototype.cork=function(){var e=this._writableState;e.corked++};X.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Vc(this,e))};X.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function Mg(e,t,i){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=kr.from(t,i)),t}Object.defineProperty(X.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Og(e,t,i,n,r,a){if(!i){var s=Mg(t,n,r);n!==s&&(i=!0,r="buffer",n=s)}var o=t.objectMode?1:n.length;t.length+=o;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:r,isBuf:i,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else us(e,t,!1,o,n,r,a);return c}function us(e,t,i,n,r,a,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(r,t.onwrite):e._write(r,a,t.onwrite),t.sync=!1}function Dg(e,t,i,n,r){--t.pendingcb,i?(jt.nextTick(r,n),jt.nextTick(an,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(r(n),e._writableState.errorEmitted=!0,e.emit("error",n),an(e,t))}function zg(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function jg(e,t){var i=e._writableState,n=i.sync,r=i.writecb;if(zg(i),t)Dg(e,i,n,t,r);else{var a=Kc(i);!a&&!i.corked&&!i.bufferProcessing&&i.bufferedRequest&&Vc(e,i),n?Ag($c,e,i,a,r):$c(e,i,a,r)}}function $c(e,t,i,n){i||Bg(e,t),t.pendingcb--,n(),an(e,t)}function Bg(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function Vc(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var n=t.bufferedRequestCount,r=new Array(n),a=t.corkedRequestsFree;a.entry=i;for(var s=0,o=!0;i;)r[s]=i,i.isBuf||(o=!1),i=i.next,s+=1;r.allBuffers=o,us(e,t,!0,t.length,r,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new qc(t),t.bufferedRequestCount=0}else{for(;i;){var c=i.chunk,l=i.encoding,d=i.callback,u=t.objectMode?1:c.length;if(us(e,t,!1,u,c,l,d),i=i.next,t.bufferedRequestCount--,t.writing)break}i===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}X.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))};X.prototype._writev=null;X.prototype.end=function(e,t,i){var n=this._writableState;typeof e=="function"?(i=e,e=null,t=null):typeof t=="function"&&(i=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||Hg(this,n,i)};function Kc(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Fg(e,t){e._final(function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),an(e,t)})}function Ng(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,jt.nextTick(Fg,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function an(e,t){var i=Kc(t);return i&&(Ng(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),i}function Hg(e,t,i){t.ending=!0,an(e,t),i&&(t.finished?jt.nextTick(i):e.once("finish",i)),t.ended=!0,e.writable=!1}function Ug(e,t,i){var n=e.entry;for(e.entry=null;n;){var r=n.callback;t.pendingcb--,r(i),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(X.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});X.prototype.destroy=Yc.destroy;X.prototype._undestroy=Yc.undestroy;X.prototype._destroy=function(e,t){this.end(),t(e)}});var Bt=R((Q0,ed)=>{"use strict";var Zc=tn(),$g=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};ed.exports=it;var Jc=Object.create(pi());Jc.inherits=fi();var Qc=gs(),hs=ps();Jc.inherits(it,Qc);for(fs=$g(hs.prototype),Tr=0;Tr<fs.length;Tr++)Lr=fs[Tr],it.prototype[Lr]||(it.prototype[Lr]=hs.prototype[Lr]);var fs,Lr,Tr;function it(e){if(!(this instanceof it))return new it(e);Qc.call(this,e),hs.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",qg)}Object.defineProperty(it.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function qg(){this.allowHalfOpen||this._writableState.ended||Zc.nextTick(Gg,this)}function Gg(e){e.end()}Object.defineProperty(it.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});it.prototype._destroy=function(e,t){this.push(null),this.end(),Zc.nextTick(t,e)}});var vs=R(id=>{"use strict";var bs=nn().Buffer,td=bs.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 Wg(e){if(!e)return"utf8";for(var t;;)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(t)return;e=(""+e).toLowerCase(),t=!0}}function Yg(e){var t=Wg(e);if(typeof t!="string"&&(bs.isEncoding===td||!td(e)))throw new Error("Unknown encoding: "+e);return t||e}id.StringDecoder=on;function on(e){this.encoding=Yg(e);var t;switch(this.encoding){case"utf16le":this.text=Qg,this.end=em,t=4;break;case"utf8":this.fillLast=Xg,t=4;break;case"base64":this.text=tm,this.end=im,t=3;break;default:this.write=nm,this.end=rm;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=bs.allocUnsafe(t)}on.prototype.write=function(e){if(e.length===0)return"";var t,i;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<e.length?t?t+this.text(e,i):this.text(e,i):t||""};on.prototype.end=Jg;on.prototype.text=Zg;on.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function ms(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Vg(e,t,i){var n=t.length-1;if(n<i)return 0;var r=ms(t[n]);return r>=0?(r>0&&(e.lastNeed=r-1),r):--n<i||r===-2?0:(r=ms(t[n]),r>=0?(r>0&&(e.lastNeed=r-2),r):--n<i||r===-2?0:(r=ms(t[n]),r>=0?(r>0&&(r===2?r=0:e.lastNeed=r-3),r):0))}function Kg(e,t,i){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function Xg(e){var t=this.lastTotal-this.lastNeed,i=Kg(this,e,t);if(i!==void 0)return i;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Zg(e,t){var i=Vg(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var n=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function Jg(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function Qg(e,t){if((e.length-t)%2===0){var i=e.toString("utf16le",t);if(i){var n=i.charCodeAt(i.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function em(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function tm(e,t){var i=(e.length-t)%3;return i===0?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,i===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",t,e.length-i))}function im(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function nm(e){return e.toString(this.encoding)}function rm(e){return e&&e.length?this.write(e):""}});var gs=R((iw,hd)=>{"use strict";var mi=tn();hd.exports=$;var am=Mc(),ln;$.ReadableState=cd;var tw=Fe("events").EventEmitter,sd=function(e,t){return e.listeners(t).length},Es=rs(),cn=nn().Buffer,sm=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function om(e){return cn.from(e)}function lm(e){return cn.isBuffer(e)||e instanceof sm}var od=Object.create(pi());od.inherits=fi();var ys=Fe("util"),N=void 0;ys&&ys.debuglog?N=ys.debuglog("stream"):N=function(){};var cm=Fc(),ld=ds(),gi;od.inherits($,Es);var xs=["error","close","destroy","pause","resume"];function dm(e,t,i){if(typeof e.prependListener=="function")return e.prependListener(t,i);!e._events||!e._events[t]?e.on(t,i):am(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]}function cd(e,t){ln=ln||Bt(),e=e||{};var i=t instanceof ln;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=e.readableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:i&&(r||r===0)?this.highWaterMark=r:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new cm,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(gi||(gi=vs().StringDecoder),this.decoder=new gi(e.encoding),this.encoding=e.encoding)}function $(e){if(ln=ln||Bt(),!(this instanceof $))return new $(e);this._readableState=new cd(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Es.call(this)}Object.defineProperty($.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});$.prototype.destroy=ld.destroy;$.prototype._undestroy=ld.undestroy;$.prototype._destroy=function(e,t){this.push(null),t(e)};$.prototype.push=function(e,t){var i=this._readableState,n;return i.objectMode?n=!0:typeof e=="string"&&(t=t||i.defaultEncoding,t!==i.encoding&&(e=cn.from(e,t),t=""),n=!0),dd(this,e,t,!1,n)};$.prototype.unshift=function(e){return dd(this,e,null,!0,!1)};function dd(e,t,i,n,r){var a=e._readableState;if(t===null)a.reading=!1,hm(e,a);else{var s;r||(s=um(a,t)),s?e.emit("error",s):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==cn.prototype&&(t=om(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):ws(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!i?(t=a.decoder.write(t),a.objectMode||t.length!==0?ws(e,a,t,!1):ud(e,a)):ws(e,a,t,!1))):n||(a.reading=!1)}return pm(a)}function ws(e,t,i,n){t.flowing&&t.length===0&&!t.sync?(e.emit("data",i),e.read(0)):(t.length+=t.objectMode?1:i.length,n?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&Rr(e)),ud(e,t)}function um(e,t){var i;return!lm(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(i=new TypeError("Invalid non-string/buffer chunk")),i}function pm(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}$.prototype.isPaused=function(){return this._readableState.flowing===!1};$.prototype.setEncoding=function(e){return gi||(gi=vs().StringDecoder),this._readableState.decoder=new gi(e),this._readableState.encoding=e,this};var nd=8388608;function fm(e){return e>=nd?e=nd:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function rd(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=fm(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}$.prototype.read=function(e){N("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return N("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?_s(this):Rr(this),null;if(e=rd(e,t),e===0&&t.ended)return t.length===0&&_s(this),null;var n=t.needReadable;N("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,N("length less than watermark",n)),t.ended||t.reading?(n=!1,N("reading or ended",n)):n&&(N("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=rd(i,t)));var r;return e>0?r=pd(e,t):r=null,r===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&_s(this)),r!==null&&this.emit("data",r),r};function hm(e,t){if(!t.ended){if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,Rr(e)}}function Rr(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(N("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?mi.nextTick(ad,e):ad(e))}function ad(e){N("emit readable"),e.emit("readable"),Ss(e)}function ud(e,t){t.readingMore||(t.readingMore=!0,mi.nextTick(gm,e,t))}function gm(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(N("maybeReadMore read 0"),e.read(0),i!==t.length);)i=t.length;t.readingMore=!1}$.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};$.prototype.pipe=function(e,t){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,N("pipe count=%d opts=%j",n.pipesCount,t);var r=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=r?o:g;n.endEmitted?mi.nextTick(a):i.once("end",a),e.on("unpipe",s);function s(b,v){N("onunpipe"),b===i&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,d())}function o(){N("onend"),e.end()}var c=mm(i);e.on("drain",c);var l=!1;function d(){N("cleanup"),e.removeListener("close",m),e.removeListener("finish",h),e.removeListener("drain",c),e.removeListener("error",f),e.removeListener("unpipe",s),i.removeListener("end",o),i.removeListener("end",g),i.removeListener("data",p),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c()}var u=!1;i.on("data",p);function p(b){N("ondata"),u=!1;var v=e.write(b);v===!1&&!u&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&fd(n.pipes,e)!==-1)&&!l&&(N("false write response, pause",n.awaitDrain),n.awaitDrain++,u=!0),i.pause())}function f(b){N("onerror",b),g(),e.removeListener("error",f),sd(e,"error")===0&&e.emit("error",b)}dm(e,"error",f);function m(){e.removeListener("finish",h),g()}e.once("close",m);function h(){N("onfinish"),e.removeListener("close",m),g()}e.once("finish",h);function g(){N("unpipe"),i.unpipe(e)}return e.emit("pipe",i),n.flowing||(N("pipe resume"),i.resume()),e};function mm(e){return function(){var t=e._readableState;N("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&sd(e,"data")&&(t.flowing=!0,Ss(e))}}$.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<r;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=fd(t.pipes,e);return s===-1?this:(t.pipes.splice(s,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,i),this)};$.prototype.on=function(e,t){var i=Es.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&Rr(this):mi.nextTick(bm,this))}return i};$.prototype.addListener=$.prototype.on;function bm(e){N("readable nexttick read 0"),e.read(0)}$.prototype.resume=function(){var e=this._readableState;return e.flowing||(N("resume"),e.flowing=!0,vm(this,e)),this};function vm(e,t){t.resumeScheduled||(t.resumeScheduled=!0,mi.nextTick(ym,e,t))}function ym(e,t){t.reading||(N("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Ss(e),t.flowing&&!t.reading&&e.read(0)}$.prototype.pause=function(){return N("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(N("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Ss(e){var t=e._readableState;for(N("flow",t.flowing);t.flowing&&e.read()!==null;);}$.prototype.wrap=function(e){var t=this,i=this._readableState,n=!1;e.on("end",function(){if(N("wrapped end"),i.decoder&&!i.ended){var s=i.decoder.end();s&&s.length&&t.push(s)}t.push(null)}),e.on("data",function(s){if(N("wrapped data"),i.decoder&&(s=i.decoder.write(s)),!(i.objectMode&&s==null)&&!(!i.objectMode&&(!s||!s.length))){var o=t.push(s);o||(n=!0,e.pause())}});for(var r in e)this[r]===void 0&&typeof e[r]=="function"&&(this[r]=(function(s){return function(){return e[s].apply(e,arguments)}})(r));for(var a=0;a<xs.length;a++)e.on(xs[a],this.emit.bind(this,xs[a]));return this._read=function(s){N("wrapped _read",s),n&&(n=!1,e.resume())},this};Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});$._fromList=pd;function pd(e,t){if(t.length===0)return null;var i;return t.objectMode?i=t.buffer.shift():!e||e>=t.length?(t.decoder?i=t.buffer.join(""):t.buffer.length===1?i=t.buffer.head.data:i=t.buffer.concat(t.length),t.buffer.clear()):i=xm(e,t.buffer,t.decoder),i}function xm(e,t,i){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?n=t.shift():n=i?wm(e,t):_m(e,t),n}function wm(e,t){var i=t.head,n=1,r=i.data;for(e-=r.length;i=i.next;){var a=i.data,s=e>a.length?a.length:e;if(s===a.length?r+=a:r+=a.slice(0,e),e-=s,e===0){s===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(s));break}++n}return t.length-=n,r}function _m(e,t){var i=cn.allocUnsafe(e),n=t.head,r=1;for(n.data.copy(i),e-=n.data.length;n=n.next;){var a=n.data,s=e>a.length?a.length:e;if(a.copy(i,i.length-e,0,s),e-=s,e===0){s===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(s));break}++r}return t.length-=r,i}function _s(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,mi.nextTick(Em,t,e))}function Em(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function fd(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}});var As=R((nw,bd)=>{"use strict";bd.exports=nt;var Pr=Bt(),md=Object.create(pi());md.inherits=fi();md.inherits(nt,Pr);function Sm(e,t){var i=this._transformState;i.transforming=!1;var n=i.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));i.writechunk=null,i.writecb=null,t!=null&&this.push(t),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function nt(e){if(!(this instanceof nt))return new nt(e);Pr.call(this,e),this._transformState={afterTransform:Sm.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Am)}function Am(){var e=this;typeof this._flush=="function"?this._flush(function(t,i){gd(e,t,i)}):gd(this,null,null)}nt.prototype.push=function(e,t){return this._transformState.needTransform=!1,Pr.prototype.push.call(this,e,t)};nt.prototype._transform=function(e,t,i){throw new Error("_transform() is not implemented")};nt.prototype._write=function(e,t,i){var n=this._transformState;if(n.writecb=i,n.writechunk=e,n.writeencoding=t,!n.transforming){var r=this._readableState;(n.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}};nt.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};nt.prototype._destroy=function(e,t){var i=this;Pr.prototype._destroy.call(this,e,function(n){t(n),i.emit("close")})};function gd(e,t,i){if(t)return e.emit("error",t);if(i!=null&&e.push(i),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var wd=R((rw,xd)=>{"use strict";xd.exports=dn;var vd=As(),yd=Object.create(pi());yd.inherits=fi();yd.inherits(dn,vd);function dn(e){if(!(this instanceof dn))return new dn(e);vd.call(this,e)}dn.prototype._transform=function(e,t,i){i(null,e)}});var Cs=R((ne,Ir)=>{"use strict";var He=Fe("stream");process.env.READABLE_STREAM==="disable"&&He?(Ir.exports=He,ne=Ir.exports=He.Readable,ne.Readable=He.Readable,ne.Writable=He.Writable,ne.Duplex=He.Duplex,ne.Transform=He.Transform,ne.PassThrough=He.PassThrough,ne.Stream=He):(ne=Ir.exports=gs(),ne.Stream=He||ne,ne.Readable=ne,ne.Writable=ps(),ne.Duplex=Bt(),ne.Transform=As(),ne.PassThrough=wd())});var rt=R(ge=>{"use strict";ge.base64=!0;ge.array=!0;ge.string=!0;ge.arraybuffer=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined";ge.nodebuffer=typeof Buffer!="undefined";ge.uint8array=typeof Uint8Array!="undefined";if(typeof ArrayBuffer=="undefined")ge.blob=!1;else{ks=new ArrayBuffer(0);try{ge.blob=new Blob([ks],{type:"application/zip"}).size===0}catch{try{_d=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Ts=new _d,Ts.append(ks),ge.blob=Ts.getBlob("application/zip").size===0}catch{ge.blob=!1}}}var ks,_d,Ts;try{ge.nodestream=!!Cs().Readable}catch{ge.nodestream=!1}});var Rs=R(Ls=>{"use strict";var Cm=G(),km=rt(),Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Ls.encode=function(e){for(var t=[],i,n,r,a,s,o,c,l=0,d=e.length,u=d,p=Cm.getTypeOf(e)!=="string";l<e.length;)u=d-l,p?(i=e[l++],n=l<d?e[l++]:0,r=l<d?e[l++]:0):(i=e.charCodeAt(l++),n=l<d?e.charCodeAt(l++):0,r=l<d?e.charCodeAt(l++):0),a=i>>2,s=(i&3)<<4|n>>4,o=u>1?(n&15)<<2|r>>6:64,c=u>2?r&63:64,t.push(Ue.charAt(a)+Ue.charAt(s)+Ue.charAt(o)+Ue.charAt(c));return t.join("")};Ls.decode=function(e){var t,i,n,r,a,s,o,c=0,l=0,d="data:";if(e.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var u=e.length*3/4;if(e.charAt(e.length-1)===Ue.charAt(64)&&u--,e.charAt(e.length-2)===Ue.charAt(64)&&u--,u%1!==0)throw new Error("Invalid base64 input, bad content length.");var p;for(km.uint8array?p=new Uint8Array(u|0):p=new Array(u|0);c<e.length;)r=Ue.indexOf(e.charAt(c++)),a=Ue.indexOf(e.charAt(c++)),s=Ue.indexOf(e.charAt(c++)),o=Ue.indexOf(e.charAt(c++)),t=r<<2|a>>4,i=(a&15)<<4|s>>2,n=(s&3)<<6|o,p[l++]=t,s!==64&&(p[l++]=i),o!==64&&(p[l++]=n);return p}});var un=R((ow,Ed)=>{"use strict";Ed.exports={isNode:typeof Buffer!="undefined",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}}});var kd=R((lw,Cd)=>{"use strict";var Sd=global.MutationObserver||global.WebKitMutationObserver,bi;process.browser?Sd?(Ps=0,Ad=new Sd(pn),Is=global.document.createTextNode(""),Ad.observe(Is,{characterData:!0}),bi=function(){Is.data=Ps=++Ps%2}):!global.setImmediate&&typeof global.MessageChannel!="undefined"?(Ms=new global.MessageChannel,Ms.port1.onmessage=pn,bi=function(){Ms.port2.postMessage(0)}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?bi=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){pn(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},global.document.documentElement.appendChild(e)}:bi=function(){setTimeout(pn,0)}:bi=function(){process.nextTick(pn)};var Ps,Ad,Is,Ms,Os,fn=[];function pn(){Os=!0;for(var e,t,i=fn.length;i;){for(t=fn,fn=[],e=-1;++e<i;)t[e]();i=fn.length}Os=!1}Cd.exports=Tm;function Tm(e){fn.push(e)===1&&!Os&&bi()}});var Od=R((cw,Md)=>{"use strict";var Td=kd();function vi(){}var se={},Ld=["REJECTED"],Ds=["FULFILLED"],Rd=["PENDING"];process.browser||(hn=["UNHANDLED"]);var hn;Md.exports=yt;function yt(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=Rd,this.queue=[],this.outcome=void 0,process.browser||(this.handled=hn),e!==vi&&Pd(this,e)}yt.prototype.finally=function(e){if(typeof e!="function")return this;var t=this.constructor;return this.then(i,n);function i(r){function a(){return r}return t.resolve(e()).then(a)}function n(r){function a(){throw r}return t.resolve(e()).then(a)}};yt.prototype.catch=function(e){return this.then(null,e)};yt.prototype.then=function(e,t){if(typeof e!="function"&&this.state===Ds||typeof t!="function"&&this.state===Ld)return this;var i=new this.constructor(vi);if(process.browser||this.handled===hn&&(this.handled=null),this.state!==Rd){var n=this.state===Ds?e:t;zs(i,n,this.outcome)}else this.queue.push(new gn(i,e,t));return i};function gn(e,t,i){this.promise=e,typeof t=="function"&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof i=="function"&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}gn.prototype.callFulfilled=function(e){se.resolve(this.promise,e)};gn.prototype.otherCallFulfilled=function(e){zs(this.promise,this.onFulfilled,e)};gn.prototype.callRejected=function(e){se.reject(this.promise,e)};gn.prototype.otherCallRejected=function(e){zs(this.promise,this.onRejected,e)};function zs(e,t,i){Td(function(){var n;try{n=t(i)}catch(r){return se.reject(e,r)}n===e?se.reject(e,new TypeError("Cannot resolve promise with itself")):se.resolve(e,n)})}se.resolve=function(e,t){var i=Id(Lm,t);if(i.status==="error")return se.reject(e,i.value);var n=i.value;if(n)Pd(e,n);else{e.state=Ds,e.outcome=t;for(var r=-1,a=e.queue.length;++r<a;)e.queue[r].callFulfilled(t)}return e};se.reject=function(e,t){e.state=Ld,e.outcome=t,process.browser||e.handled===hn&&Td(function(){e.handled===hn&&process.emit("unhandledRejection",t,e)});for(var i=-1,n=e.queue.length;++i<n;)e.queue[i].callRejected(t);return e};function Lm(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments)}}function Pd(e,t){var i=!1;function n(o){i||(i=!0,se.reject(e,o))}function r(o){i||(i=!0,se.resolve(e,o))}function a(){t(r,n)}var s=Id(a);s.status==="error"&&n(s.value)}function Id(e,t){var i={};try{i.value=e(t),i.status="success"}catch(n){i.status="error",i.value=n}return i}yt.resolve=Rm;function Rm(e){return e instanceof this?e:se.resolve(new this(vi),e)}yt.reject=Pm;function Pm(e){var t=new this(vi);return se.reject(t,e)}yt.all=Im;function Im(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var i=e.length,n=!1;if(!i)return this.resolve([]);for(var r=new Array(i),a=0,s=-1,o=new this(vi);++s<i;)c(e[s],s);return o;function c(l,d){t.resolve(l).then(u,function(p){n||(n=!0,se.reject(o,p))});function u(p){r[d]=p,++a===i&&!n&&(n=!0,se.resolve(o,r))}}}yt.race=Mm;function Mm(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var i=e.length,n=!1;if(!i)return this.resolve([]);for(var r=-1,a=new this(vi);++r<i;)s(e[r]);return a;function s(o){t.resolve(o).then(function(c){n||(n=!0,se.resolve(a,c))},function(c){n||(n=!0,se.reject(a,c))})}}});var yi=R((dw,Dd)=>{"use strict";var js=null;typeof Promise!="undefined"?js=Promise:js=Od();Dd.exports={Promise:js}});var jd=R(zd=>{"use strict";(function(e,t){"use strict";if(e.setImmediate)return;var i=1,n={},r=!1,a=e.document,s;function o(v){typeof v!="function"&&(v=new Function(""+v));for(var y=new Array(arguments.length-1),x=0;x<y.length;x++)y[x]=arguments[x+1];var w={callback:v,args:y};return n[i]=w,s(i),i++}function c(v){delete n[v]}function l(v){var y=v.callback,x=v.args;switch(x.length){case 0:y();break;case 1:y(x[0]);break;case 2:y(x[0],x[1]);break;case 3:y(x[0],x[1],x[2]);break;default:y.apply(t,x);break}}function d(v){if(r)setTimeout(d,0,v);else{var y=n[v];if(y){r=!0;try{l(y)}finally{c(v),r=!1}}}}function u(){s=function(v){process.nextTick(function(){d(v)})}}function p(){if(e.postMessage&&!e.importScripts){var v=!0,y=e.onmessage;return e.onmessage=function(){v=!1},e.postMessage("","*"),e.onmessage=y,v}}function f(){var v="setImmediate$"+Math.random()+"$",y=function(x){x.source===e&&typeof x.data=="string"&&x.data.indexOf(v)===0&&d(+x.data.slice(v.length))};e.addEventListener?e.addEventListener("message",y,!1):e.attachEvent("onmessage",y),s=function(x){e.postMessage(v+x,"*")}}function m(){var v=new MessageChannel;v.port1.onmessage=function(y){var x=y.data;d(x)},s=function(y){v.port2.postMessage(y)}}function h(){var v=a.documentElement;s=function(y){var x=a.createElement("script");x.onreadystatechange=function(){d(y),x.onreadystatechange=null,v.removeChild(x),x=null},v.appendChild(x)}}function g(){s=function(v){setTimeout(d,0,v)}}var b=Object.getPrototypeOf&&Object.getPrototypeOf(e);b=b&&b.setTimeout?b:e,{}.toString.call(e.process)==="[object process]"?u():p()?f():e.MessageChannel?m():a&&"onreadystatechange"in a.createElement("script")?h():g(),b.setImmediate=o,b.clearImmediate=c})(typeof self=="undefined"?typeof global=="undefined"?zd:global:self)});var G=R(Z=>{"use strict";var xt=rt(),Om=Rs(),xi=un(),Bs=yi();jd();function Dm(e){var t=null;return xt.uint8array?t=new Uint8Array(e.length):t=new Array(e.length),Or(e,t)}Z.newBlob=function(e,t){Z.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var i=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,n=new i;return n.append(e),n.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};function mn(e){return e}function Or(e,t){for(var i=0;i<e.length;++i)t[i]=e.charCodeAt(i)&255;return t}var Mr={stringifyByChunk:function(e,t,i){var n=[],r=0,a=e.length;if(a<=i)return String.fromCharCode.apply(null,e);for(;r<a;)t==="array"||t==="nodebuffer"?n.push(String.fromCharCode.apply(null,e.slice(r,Math.min(r+i,a)))):n.push(String.fromCharCode.apply(null,e.subarray(r,Math.min(r+i,a)))),r+=i;return n.join("")},stringifyByChar:function(e){for(var t="",i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return t},applyCanBeUsed:{uint8array:(function(){try{return xt.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return xt.nodebuffer&&String.fromCharCode.apply(null,xi.allocBuffer(1)).length===1}catch{return!1}})()}};function bn(e){var t=65536,i=Z.getTypeOf(e),n=!0;if(i==="uint8array"?n=Mr.applyCanBeUsed.uint8array:i==="nodebuffer"&&(n=Mr.applyCanBeUsed.nodebuffer),n)for(;t>1;)try{return Mr.stringifyByChunk(e,i,t)}catch{t=Math.floor(t/2)}return Mr.stringifyByChar(e)}Z.applyFromCharCode=bn;function Dr(e,t){for(var i=0;i<e.length;i++)t[i]=e[i];return t}var wt={};wt.string={string:mn,array:function(e){return Or(e,new Array(e.length))},arraybuffer:function(e){return wt.string.uint8array(e).buffer},uint8array:function(e){return Or(e,new Uint8Array(e.length))},nodebuffer:function(e){return Or(e,xi.allocBuffer(e.length))}};wt.array={string:bn,array:mn,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return xi.newBufferFrom(e)}};wt.arraybuffer={string:function(e){return bn(new Uint8Array(e))},array:function(e){return Dr(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:mn,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return xi.newBufferFrom(new Uint8Array(e))}};wt.uint8array={string:bn,array:function(e){return Dr(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:mn,nodebuffer:function(e){return xi.newBufferFrom(e)}};wt.nodebuffer={string:bn,array:function(e){return Dr(e,new Array(e.length))},arraybuffer:function(e){return wt.nodebuffer.uint8array(e).buffer},uint8array:function(e){return Dr(e,new Uint8Array(e.length))},nodebuffer:mn};Z.transformTo=function(e,t){if(t||(t=""),!e)return t;Z.checkSupport(e);var i=Z.getTypeOf(t),n=wt[i][e](t);return n};Z.resolve=function(e){for(var t=e.split("/"),i=[],n=0;n<t.length;n++){var r=t[n];r==="."||r===""&&n!==0&&n!==t.length-1||(r===".."?i.pop():i.push(r))}return i.join("/")};Z.getTypeOf=function(e){if(typeof e=="string")return"string";if(Object.prototype.toString.call(e)==="[object Array]")return"array";if(xt.nodebuffer&&xi.isBuffer(e))return"nodebuffer";if(xt.uint8array&&e instanceof Uint8Array)return"uint8array";if(xt.arraybuffer&&e instanceof ArrayBuffer)return"arraybuffer"};Z.checkSupport=function(e){var t=xt[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")};Z.MAX_VALUE_16BITS=65535;Z.MAX_VALUE_32BITS=-1;Z.pretty=function(e){var t="",i,n;for(n=0;n<(e||"").length;n++)i=e.charCodeAt(n),t+="\\x"+(i<16?"0":"")+i.toString(16).toUpperCase();return t};Z.delay=function(e,t,i){setImmediate(function(){e.apply(i||null,t||[])})};Z.inherits=function(e,t){var i=function(){};i.prototype=t.prototype,e.prototype=new i};Z.extend=function(){var e={},t,i;for(t=0;t<arguments.length;t++)for(i in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],i)&&typeof e[i]=="undefined"&&(e[i]=arguments[t][i]);return e};Z.prepareContent=function(e,t,i,n,r){var a=Bs.Promise.resolve(t).then(function(s){var o=xt.blob&&(s instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(s))!==-1);return o&&typeof FileReader!="undefined"?new Bs.Promise(function(c,l){var d=new FileReader;d.onload=function(u){c(u.target.result)},d.onerror=function(u){l(u.target.error)},d.readAsArrayBuffer(s)}):s});return a.then(function(s){var o=Z.getTypeOf(s);return o?(o==="arraybuffer"?s=Z.transformTo("uint8array",s):o==="string"&&(r?s=Om.decode(s):i&&n!==!0&&(s=Dm(s))),s):Bs.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}});var me=R((fw,Fd)=>{"use strict";function Bd(e){this.name=e||"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}Bd.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return this.isFinished?!1:(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var i=0;i<this._listeners[e].length;i++)this._listeners[e][i].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(i){t.processChunk(i)}),e.on("end",function(){t.end()}),e.on("error",function(i){t.error(i)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};Fd.exports=Bd});var _i=R(_t=>{"use strict";var wi=G(),Ft=rt(),zm=un(),zr=me(),vn=new Array(256);for(at=0;at<256;at++)vn[at]=at>=252?6:at>=248?5:at>=240?4:at>=224?3:at>=192?2:1;var at;vn[254]=vn[254]=1;var jm=function(e){var t,i,n,r,a,s=e.length,o=0;for(r=0;r<s;r++)i=e.charCodeAt(r),(i&64512)===55296&&r+1<s&&(n=e.charCodeAt(r+1),(n&64512)===56320&&(i=65536+(i-55296<<10)+(n-56320),r++)),o+=i<128?1:i<2048?2:i<65536?3:4;for(Ft.uint8array?t=new Uint8Array(o):t=new Array(o),a=0,r=0;a<o;r++)i=e.charCodeAt(r),(i&64512)===55296&&r+1<s&&(n=e.charCodeAt(r+1),(n&64512)===56320&&(i=65536+(i-55296<<10)+(n-56320),r++)),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|i&63):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|i&63):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|i&63);return t},Bm=function(e,t){var i;for(t=t||e.length,t>e.length&&(t=e.length),i=t-1;i>=0&&(e[i]&192)===128;)i--;return i<0||i===0?t:i+vn[e[i]]>t?i:t},Fm=function(e){var t,i,n,r,a=e.length,s=new Array(a*2);for(i=0,t=0;t<a;){if(n=e[t++],n<128){s[i++]=n;continue}if(r=vn[n],r>4){s[i++]=65533,t+=r-1;continue}for(n&=r===2?31:r===3?15:7;r>1&&t<a;)n=n<<6|e[t++]&63,r--;if(r>1){s[i++]=65533;continue}n<65536?s[i++]=n:(n-=65536,s[i++]=55296|n>>10&1023,s[i++]=56320|n&1023)}return s.length!==i&&(s.subarray?s=s.subarray(0,i):s.length=i),wi.applyFromCharCode(s)};_t.utf8encode=function(t){return Ft.nodebuffer?zm.newBufferFrom(t,"utf-8"):jm(t)};_t.utf8decode=function(t){return Ft.nodebuffer?wi.transformTo("nodebuffer",t).toString("utf-8"):(t=wi.transformTo(Ft.uint8array?"uint8array":"array",t),Fm(t))};function jr(){zr.call(this,"utf-8 decode"),this.leftOver=null}wi.inherits(jr,zr);jr.prototype.processChunk=function(e){var t=wi.transformTo(Ft.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(Ft.uint8array){var i=t;t=new Uint8Array(i.length+this.leftOver.length),t.set(this.leftOver,0),t.set(i,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=Bm(t),r=t;n!==t.length&&(Ft.uint8array?(r=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(r=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:_t.utf8decode(r),meta:e.meta})};jr.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:_t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};_t.Utf8DecodeWorker=jr;function Fs(){zr.call(this,"utf-8 encode")}wi.inherits(Fs,zr);Fs.prototype.processChunk=function(e){this.push({data:_t.utf8encode(e.data),meta:e.meta})};_t.Utf8EncodeWorker=Fs});var $d=R((gw,Ud)=>{"use strict";var Nd=me(),Hd=G();function Ns(e){Nd.call(this,"ConvertWorker to "+e),this.destType=e}Hd.inherits(Ns,Nd);Ns.prototype.processChunk=function(e){this.push({data:Hd.transformTo(this.destType,e.data),meta:e.meta})};Ud.exports=Ns});var Wd=R((mw,Gd)=>{"use strict";var qd=Cs().Readable,Nm=G();Nm.inherits(Hs,qd);function Hs(e,t,i){qd.call(this,t),this._helper=e;var n=this;e.on("data",function(r,a){n.push(r)||n._helper.pause(),i&&i(a)}).on("error",function(r){n.emit("error",r)}).on("end",function(){n.push(null)})}Hs.prototype._read=function(){this._helper.resume()};Gd.exports=Hs});var Us=R((bw,Kd)=>{"use strict";var Nt=G(),Hm=$d(),Um=me(),$m=Rs(),qm=rt(),Gm=yi(),Yd=null;if(qm.nodestream)try{Yd=Wd()}catch{}function Wm(e,t,i){switch(e){case"blob":return Nt.newBlob(Nt.transformTo("arraybuffer",t),i);case"base64":return $m.encode(t);default:return Nt.transformTo(e,t)}}function Ym(e,t){var i,n=0,r=null,a=0;for(i=0;i<t.length;i++)a+=t[i].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(r=new Uint8Array(a),i=0;i<t.length;i++)r.set(t[i],n),n+=t[i].length;return r;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}function Vm(e,t){return new Gm.Promise(function(i,n){var r=[],a=e._internalType,s=e._outputType,o=e._mimeType;e.on("data",function(c,l){r.push(c),t&&t(l)}).on("error",function(c){r=[],n(c)}).on("end",function(){try{var c=Wm(s,Ym(a,r),o);i(c)}catch(l){n(l)}r=[]}).resume()})}function Vd(e,t,i){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string";break}try{this._internalType=n,this._outputType=t,this._mimeType=i,Nt.checkSupport(n),this._worker=e.pipe(new Hm(n)),e.lock()}catch(r){this._worker=new Um("error"),this._worker.error(r)}}Vd.prototype={accumulate:function(e){return Vm(this,e)},on:function(e,t){var i=this;return e==="data"?this._worker.on(e,function(n){t.call(i,n.data,n.meta)}):this._worker.on(e,function(){Nt.delay(t,arguments,i)}),this},resume:function(){return Nt.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(Nt.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new Yd(this,{objectMode:this._outputType!=="nodebuffer"},e)}};Kd.exports=Vd});var $s=R(Pe=>{"use strict";Pe.base64=!1;Pe.binary=!1;Pe.dir=!1;Pe.createFolders=!0;Pe.date=null;Pe.compression=null;Pe.compressionOptions=null;Pe.comment=null;Pe.unixPermissions=null;Pe.dosPermissions=null});var qs=R((yw,Xd)=>{"use strict";var Br=G(),Fr=me(),Km=16*1024;function Ei(e){Fr.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(i){t.dataIsReady=!0,t.data=i,t.max=i&&i.length||0,t.type=Br.getTypeOf(i),t.isPaused||t._tickAndRepeat()},function(i){t.error(i)})}Br.inherits(Ei,Fr);Ei.prototype.cleanUp=function(){Fr.prototype.cleanUp.call(this),this.data=null};Ei.prototype.resume=function(){return Fr.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,Br.delay(this._tickAndRepeat,[],this)),!0):!1};Ei.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(Br.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))};Ei.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=Km,t=null,i=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,i);break;case"uint8array":t=this.data.subarray(this.index,i);break;case"array":case"nodebuffer":t=this.data.slice(this.index,i);break}return this.index=i,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})};Xd.exports=Ei});var Nr=R((xw,Jd)=>{"use strict";var Xm=G();function Zm(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[i]=e}return t}var Zd=Zm();function Jm(e,t,i,n){var r=Zd,a=n+i;e=e^-1;for(var s=n;s<a;s++)e=e>>>8^r[(e^t[s])&255];return e^-1}function Qm(e,t,i,n){var r=Zd,a=n+i;e=e^-1;for(var s=n;s<a;s++)e=e>>>8^r[(e^t.charCodeAt(s))&255];return e^-1}Jd.exports=function(t,i){if(typeof t=="undefined"||!t.length)return 0;var n=Xm.getTypeOf(t)!=="string";return n?Jm(i|0,t,t.length,0):Qm(i|0,t,t.length,0)}});var Ws=R((ww,eu)=>{"use strict";var Qd=me(),eb=Nr(),tb=G();function Gs(){Qd.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}tb.inherits(Gs,Qd);Gs.prototype.processChunk=function(e){this.streamInfo.crc32=eb(e.data,this.streamInfo.crc32||0),this.push(e)};eu.exports=Gs});var iu=R((_w,tu)=>{"use strict";var ib=G(),Ys=me();function Vs(e){Ys.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}ib.inherits(Vs,Ys);Vs.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}Ys.prototype.processChunk.call(this,e)};tu.exports=Vs});var Hr=R((Ew,au)=>{"use strict";var nu=yi(),ru=qs(),nb=Ws(),Ks=iu();function Xs(e,t,i,n,r){this.compressedSize=e,this.uncompressedSize=t,this.crc32=i,this.compression=n,this.compressedContent=r}Xs.prototype={getContentWorker:function(){var e=new ru(nu.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Ks("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new ru(nu.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};Xs.createWorkerFrom=function(e,t,i){return e.pipe(new nb).pipe(new Ks("uncompressedSize")).pipe(t.compressWorker(i)).pipe(new Ks("compressedSize")).withStreamInfo("compression",t)};au.exports=Xs});var cu=R((Sw,lu)=>{"use strict";var rb=Us(),ab=qs(),Zs=_i(),Js=Hr(),su=me(),Qs=function(e,t,i){this.name=e,this.dir=i.dir,this.date=i.date,this.comment=i.comment,this.unixPermissions=i.unixPermissions,this.dosPermissions=i.dosPermissions,this._data=t,this._dataBinary=i.binary,this.options={compression:i.compression,compressionOptions:i.compressionOptions}};Qs.prototype={internalStream:function(e){var t=null,i="string";try{if(!e)throw new Error("No output type specified.");i=e.toLowerCase();var n=i==="string"||i==="text";(i==="binarystring"||i==="text")&&(i="string"),t=this._decompressWorker();var r=!this._dataBinary;r&&!n&&(t=t.pipe(new Zs.Utf8EncodeWorker)),!r&&n&&(t=t.pipe(new Zs.Utf8DecodeWorker))}catch(a){t=new su("error"),t.error(a)}return new rb(t,i,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Js&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var i=this._decompressWorker();return this._dataBinary||(i=i.pipe(new Zs.Utf8EncodeWorker)),Js.createWorkerFrom(i,e,t)},_decompressWorker:function(){return this._data instanceof Js?this._data.getContentWorker():this._data instanceof su?this._data:new ab(this._data)}};var ou=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],sb=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(Ur=0;Ur<ou.length;Ur++)Qs.prototype[ou[Ur]]=sb;var Ur;lu.exports=Qs});var st=R(de=>{"use strict";var ob=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function lb(e,t){return Object.prototype.hasOwnProperty.call(e,t)}de.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if(typeof i!="object")throw new TypeError(i+"must be non-object");for(var n in i)lb(i,n)&&(e[n]=i[n])}}return e};de.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var cb={arraySet:function(e,t,i,n,r){if(t.subarray&&e.subarray){e.set(t.subarray(i,i+n),r);return}for(var a=0;a<n;a++)e[r+a]=t[i+a]},flattenChunks:function(e){var t,i,n,r,a,s;for(n=0,t=0,i=e.length;t<i;t++)n+=e[t].length;for(s=new Uint8Array(n),r=0,t=0,i=e.length;t<i;t++)a=e[t],s.set(a,r),r+=a.length;return s}},db={arraySet:function(e,t,i,n,r){for(var a=0;a<n;a++)e[r+a]=t[i+a]},flattenChunks:function(e){return[].concat.apply([],e)}};de.setTyped=function(e){e?(de.Buf8=Uint8Array,de.Buf16=Uint16Array,de.Buf32=Int32Array,de.assign(de,cb)):(de.Buf8=Array,de.Buf16=Array,de.Buf32=Array,de.assign(de,db))};de.setTyped(ob)});var Iu=R(Ci=>{"use strict";var ub=st(),pb=4,du=0,uu=1,fb=2;function Ai(e){for(var t=e.length;--t>=0;)e[t]=0}var hb=0,bu=1,gb=2,mb=3,bb=258,so=29,Sn=256,xn=Sn+1+so,Si=30,oo=19,vu=2*xn+1,Ht=15,eo=16,vb=7,lo=256,yu=16,xu=17,wu=18,ro=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],$r=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],yb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],_u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],xb=512,ot=new Array((xn+2)*2);Ai(ot);var yn=new Array(Si*2);Ai(yn);var wn=new Array(xb);Ai(wn);var _n=new Array(bb-mb+1);Ai(_n);var co=new Array(so);Ai(co);var qr=new Array(Si);Ai(qr);function to(e,t,i,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}var Eu,Su,Au;function io(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Cu(e){return e<256?wn[e]:wn[256+(e>>>7)]}function En(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function pe(e,t,i){e.bi_valid>eo-i?(e.bi_buf|=t<<e.bi_valid&65535,En(e,e.bi_buf),e.bi_buf=t>>eo-e.bi_valid,e.bi_valid+=i-eo):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)}function $e(e,t,i){pe(e,i[t*2],i[t*2+1])}function ku(e,t){var i=0;do i|=e&1,e>>>=1,i<<=1;while(--t>0);return i>>>1}function wb(e){e.bi_valid===16?(En(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function _b(e,t){var i=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,d,u,p,f,m,h=0;for(p=0;p<=Ht;p++)e.bl_count[p]=0;for(i[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<vu;l++)d=e.heap[l],p=i[i[d*2+1]*2+1]+1,p>c&&(p=c,h++),i[d*2+1]=p,!(d>n)&&(e.bl_count[p]++,f=0,d>=o&&(f=s[d-o]),m=i[d*2],e.opt_len+=m*(p+f),a&&(e.static_len+=m*(r[d*2+1]+f)));if(h!==0){do{for(p=c-1;e.bl_count[p]===0;)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(p=c;p!==0;p--)for(d=e.bl_count[p];d!==0;)u=e.heap[--l],!(u>n)&&(i[u*2+1]!==p&&(e.opt_len+=(p-i[u*2+1])*i[u*2],i[u*2+1]=p),d--)}}function Tu(e,t,i){var n=new Array(Ht+1),r=0,a,s;for(a=1;a<=Ht;a++)n[a]=r=r+i[a-1]<<1;for(s=0;s<=t;s++){var o=e[s*2+1];o!==0&&(e[s*2]=ku(n[o]++,o))}}function Eb(){var e,t,i,n,r,a=new Array(Ht+1);for(i=0,n=0;n<so-1;n++)for(co[n]=i,e=0;e<1<<ro[n];e++)_n[i++]=n;for(_n[i-1]=n,r=0,n=0;n<16;n++)for(qr[n]=r,e=0;e<1<<$r[n];e++)wn[r++]=n;for(r>>=7;n<Si;n++)for(qr[n]=r<<7,e=0;e<1<<$r[n]-7;e++)wn[256+r++]=n;for(t=0;t<=Ht;t++)a[t]=0;for(e=0;e<=143;)ot[e*2+1]=8,e++,a[8]++;for(;e<=255;)ot[e*2+1]=9,e++,a[9]++;for(;e<=279;)ot[e*2+1]=7,e++,a[7]++;for(;e<=287;)ot[e*2+1]=8,e++,a[8]++;for(Tu(ot,xn+1,a),e=0;e<Si;e++)yn[e*2+1]=5,yn[e*2]=ku(e,5);Eu=new to(ot,ro,Sn+1,xn,Ht),Su=new to(yn,$r,0,Si,Ht),Au=new to(new Array(0),yb,0,oo,vb)}function Lu(e){var t;for(t=0;t<xn;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Si;t++)e.dyn_dtree[t*2]=0;for(t=0;t<oo;t++)e.bl_tree[t*2]=0;e.dyn_ltree[lo*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Ru(e){e.bi_valid>8?En(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Sb(e,t,i,n){Ru(e),n&&(En(e,i),En(e,~i)),ub.arraySet(e.pending_buf,e.window,t,i,e.pending),e.pending+=i}function pu(e,t,i,n){var r=t*2,a=i*2;return e[r]<e[a]||e[r]===e[a]&&n[t]<=n[i]}function no(e,t,i){for(var n=e.heap[i],r=i<<1;r<=e.heap_len&&(r<e.heap_len&&pu(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!pu(t,n,e.heap[r],e.depth));)e.heap[i]=e.heap[r],i=r,r<<=1;e.heap[i]=n}function fu(e,t,i){var n,r,a=0,s,o;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],r=e.pending_buf[e.l_buf+a],a++,n===0?$e(e,r,t):(s=_n[r],$e(e,s+Sn+1,t),o=ro[s],o!==0&&(r-=co[s],pe(e,r,o)),n--,s=Cu(n),$e(e,s,i),o=$r[s],o!==0&&(n-=qr[s],pe(e,n,o)));while(a<e.last_lit);$e(e,lo,t)}function ao(e,t){var i=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,a=t.stat_desc.elems,s,o,c=-1,l;for(e.heap_len=0,e.heap_max=vu,s=0;s<a;s++)i[s*2]!==0?(e.heap[++e.heap_len]=c=s,e.depth[s]=0):i[s*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,i[l*2]=1,e.depth[l]=0,e.opt_len--,r&&(e.static_len-=n[l*2+1]);for(t.max_code=c,s=e.heap_len>>1;s>=1;s--)no(e,i,s);l=a;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],no(e,i,1),o=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=o,i[l*2]=i[s*2]+i[o*2],e.depth[l]=(e.depth[s]>=e.depth[o]?e.depth[s]:e.depth[o])+1,i[s*2+1]=i[o*2+1]=l,e.heap[1]=l++,no(e,i,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],_b(e,t),Tu(i,c,e.bl_count)}function hu(e,t,i){var n,r=-1,a,s=t[1],o=0,c=7,l=4;for(s===0&&(c=138,l=3),t[(i+1)*2+1]=65535,n=0;n<=i;n++)a=s,s=t[(n+1)*2+1],!(++o<c&&a===s)&&(o<l?e.bl_tree[a*2]+=o:a!==0?(a!==r&&e.bl_tree[a*2]++,e.bl_tree[yu*2]++):o<=10?e.bl_tree[xu*2]++:e.bl_tree[wu*2]++,o=0,r=a,s===0?(c=138,l=3):a===s?(c=6,l=3):(c=7,l=4))}function gu(e,t,i){var n,r=-1,a,s=t[1],o=0,c=7,l=4;for(s===0&&(c=138,l=3),n=0;n<=i;n++)if(a=s,s=t[(n+1)*2+1],!(++o<c&&a===s)){if(o<l)do $e(e,a,e.bl_tree);while(--o!==0);else a!==0?(a!==r&&($e(e,a,e.bl_tree),o--),$e(e,yu,e.bl_tree),pe(e,o-3,2)):o<=10?($e(e,xu,e.bl_tree),pe(e,o-3,3)):($e(e,wu,e.bl_tree),pe(e,o-11,7));o=0,r=a,s===0?(c=138,l=3):a===s?(c=6,l=3):(c=7,l=4)}}function Ab(e){var t;for(hu(e,e.dyn_ltree,e.l_desc.max_code),hu(e,e.dyn_dtree,e.d_desc.max_code),ao(e,e.bl_desc),t=oo-1;t>=3&&e.bl_tree[_u[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Cb(e,t,i,n){var r;for(pe(e,t-257,5),pe(e,i-1,5),pe(e,n-4,4),r=0;r<n;r++)pe(e,e.bl_tree[_u[r]*2+1],3);gu(e,e.dyn_ltree,t-1),gu(e,e.dyn_dtree,i-1)}function kb(e){var t=4093624447,i;for(i=0;i<=31;i++,t>>>=1)if(t&1&&e.dyn_ltree[i*2]!==0)return du;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return uu;for(i=32;i<Sn;i++)if(e.dyn_ltree[i*2]!==0)return uu;return du}var mu=!1;function Tb(e){mu||(Eb(),mu=!0),e.l_desc=new io(e.dyn_ltree,Eu),e.d_desc=new io(e.dyn_dtree,Su),e.bl_desc=new io(e.bl_tree,Au),e.bi_buf=0,e.bi_valid=0,Lu(e)}function Pu(e,t,i,n){pe(e,(hb<<1)+(n?1:0),3),Sb(e,t,i,!0)}function Lb(e){pe(e,bu<<1,3),$e(e,lo,ot),wb(e)}function Rb(e,t,i,n){var r,a,s=0;e.level>0?(e.strm.data_type===fb&&(e.strm.data_type=kb(e)),ao(e,e.l_desc),ao(e,e.d_desc),s=Ab(e),r=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=r&&(r=a)):r=a=i+5,i+4<=r&&t!==-1?Pu(e,t,i,n):e.strategy===pb||a===r?(pe(e,(bu<<1)+(n?1:0),3),fu(e,ot,yn)):(pe(e,(gb<<1)+(n?1:0),3),Cb(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),fu(e,e.dyn_ltree,e.dyn_dtree)),Lu(e),n&&Ru(e)}function Pb(e,t,i){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=i&255,e.last_lit++,t===0?e.dyn_ltree[i*2]++:(e.matches++,t--,e.dyn_ltree[(_n[i]+Sn+1)*2]++,e.dyn_dtree[Cu(t)*2]++),e.last_lit===e.lit_bufsize-1}Ci._tr_init=Tb;Ci._tr_stored_block=Pu;Ci._tr_flush_block=Rb;Ci._tr_tally=Pb;Ci._tr_align=Lb});var uo=R((kw,Mu)=>{"use strict";function Ib(e,t,i,n){for(var r=e&65535|0,a=e>>>16&65535|0,s=0;i!==0;){s=i>2e3?2e3:i,i-=s;do r=r+t[n++]|0,a=a+r|0;while(--s);r%=65521,a%=65521}return r|a<<16|0}Mu.exports=Ib});var po=R((Tw,Ou)=>{"use strict";function Mb(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[i]=e}return t}var Ob=Mb();function Db(e,t,i,n){var r=Ob,a=n+i;e^=-1;for(var s=n;s<a;s++)e=e>>>8^r[(e^t[s])&255];return e^-1}Ou.exports=Db});var Gr=R((Lw,Du)=>{"use strict";Du.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var qu=R(We=>{"use strict";var ue=st(),Ee=Iu(),Fu=uo(),Et=po(),zb=Gr(),Gt=0,jb=1,Bb=3,Tt=4,zu=5,Ge=0,ju=1,Se=-2,Fb=-3,fo=-5,Nb=-1,Hb=1,Wr=2,Ub=3,$b=4,qb=0,Gb=2,Xr=8,Wb=9,Yb=15,Vb=8,Kb=29,Xb=256,go=Xb+1+Kb,Zb=30,Jb=19,Qb=2*go+1,ev=15,z=3,Ct=258,Ie=Ct+z+1,tv=32,Zr=42,mo=69,Yr=73,Vr=91,Kr=103,Ut=113,Cn=666,te=1,kn=2,$t=3,Li=4,iv=3;function kt(e,t){return e.msg=zb[t],t}function Bu(e){return(e<<1)-(e>4?9:0)}function At(e){for(var t=e.length;--t>=0;)e[t]=0}function St(e){var t=e.state,i=t.pending;i>e.avail_out&&(i=e.avail_out),i!==0&&(ue.arraySet(e.output,t.pending_buf,t.pending_out,i,e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,t.pending===0&&(t.pending_out=0))}function re(e,t){Ee._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,St(e.strm)}function B(e,t){e.pending_buf[e.pending++]=t}function An(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function nv(e,t,i,n){var r=e.avail_in;return r>n&&(r=n),r===0?0:(e.avail_in-=r,ue.arraySet(t,e.input,e.next_in,r,i),e.state.wrap===1?e.adler=Fu(e.adler,t,r,i):e.state.wrap===2&&(e.adler=Et(e.adler,t,r,i)),e.next_in+=r,e.total_in+=r,r)}function Nu(e,t){var i=e.max_chain_length,n=e.strstart,r,a,s=e.prev_length,o=e.nice_match,c=e.strstart>e.w_size-Ie?e.strstart-(e.w_size-Ie):0,l=e.window,d=e.w_mask,u=e.prev,p=e.strstart+Ct,f=l[n+s-1],m=l[n+s];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do if(r=t,!(l[r+s]!==m||l[r+s-1]!==f||l[r]!==l[n]||l[++r]!==l[n+1])){n+=2,r++;do;while(l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&l[++n]===l[++r]&&n<p);if(a=Ct-(p-n),n=p-Ct,a>s){if(e.match_start=t,s=a,a>=o)break;f=l[n+s-1],m=l[n+s]}}while((t=u[t&d])>c&&--i!==0);return s<=e.lookahead?s:e.lookahead}function qt(e){var t=e.w_size,i,n,r,a,s;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ie)){ue.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,i=n;do r=e.head[--i],e.head[i]=r>=t?r-t:0;while(--n);n=t,i=n;do r=e.prev[--i],e.prev[i]=r>=t?r-t:0;while(--n);a+=t}if(e.strm.avail_in===0)break;if(n=nv(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=z)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+z-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<z)););}while(e.lookahead<Ie&&e.strm.avail_in!==0)}function rv(e,t){var i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(qt(e),e.lookahead===0&&t===Gt)return te;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+i;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,re(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ie&&(re(e,!1),e.strm.avail_out===0))return te}return e.insert=0,t===Tt?(re(e,!0),e.strm.avail_out===0?$t:Li):(e.strstart>e.block_start&&(re(e,!1),e.strm.avail_out===0),te)}function ho(e,t){for(var i,n;;){if(e.lookahead<Ie){if(qt(e),e.lookahead<Ie&&t===Gt)return te;if(e.lookahead===0)break}if(i=0,e.lookahead>=z&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),i!==0&&e.strstart-i<=e.w_size-Ie&&(e.match_length=Nu(e,i)),e.match_length>=z)if(n=Ee._tr_tally(e,e.strstart-e.match_start,e.match_length-z),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=z){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Ee._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(re(e,!1),e.strm.avail_out===0))return te}return e.insert=e.strstart<z-1?e.strstart:z-1,t===Tt?(re(e,!0),e.strm.avail_out===0?$t:Li):e.last_lit&&(re(e,!1),e.strm.avail_out===0)?te:kn}function ki(e,t){for(var i,n,r;;){if(e.lookahead<Ie){if(qt(e),e.lookahead<Ie&&t===Gt)return te;if(e.lookahead===0)break}if(i=0,e.lookahead>=z&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=z-1,i!==0&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-Ie&&(e.match_length=Nu(e,i),e.match_length<=5&&(e.strategy===Hb||e.match_length===z&&e.strstart-e.match_start>4096)&&(e.match_length=z-1)),e.prev_length>=z&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-z,n=Ee._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-z),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=r&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=z-1,e.strstart++,n&&(re(e,!1),e.strm.avail_out===0))return te}else if(e.match_available){if(n=Ee._tr_tally(e,0,e.window[e.strstart-1]),n&&re(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return te}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Ee._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<z-1?e.strstart:z-1,t===Tt?(re(e,!0),e.strm.avail_out===0?$t:Li):e.last_lit&&(re(e,!1),e.strm.avail_out===0)?te:kn}function av(e,t){for(var i,n,r,a,s=e.window;;){if(e.lookahead<=Ct){if(qt(e),e.lookahead<=Ct&&t===Gt)return te;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=z&&e.strstart>0&&(r=e.strstart-1,n=s[r],n===s[++r]&&n===s[++r]&&n===s[++r])){a=e.strstart+Ct;do;while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<a);e.match_length=Ct-(a-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=z?(i=Ee._tr_tally(e,1,e.match_length-z),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=Ee._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(re(e,!1),e.strm.avail_out===0))return te}return e.insert=0,t===Tt?(re(e,!0),e.strm.avail_out===0?$t:Li):e.last_lit&&(re(e,!1),e.strm.avail_out===0)?te:kn}function sv(e,t){for(var i;;){if(e.lookahead===0&&(qt(e),e.lookahead===0)){if(t===Gt)return te;break}if(e.match_length=0,i=Ee._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(re(e,!1),e.strm.avail_out===0))return te}return e.insert=0,t===Tt?(re(e,!0),e.strm.avail_out===0?$t:Li):e.last_lit&&(re(e,!1),e.strm.avail_out===0)?te:kn}function qe(e,t,i,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=r}var Ti;Ti=[new qe(0,0,0,0,rv),new qe(4,4,8,4,ho),new qe(4,5,16,8,ho),new qe(4,6,32,32,ho),new qe(4,4,16,16,ki),new qe(8,16,32,32,ki),new qe(8,16,128,128,ki),new qe(8,32,128,256,ki),new qe(32,128,258,1024,ki),new qe(32,258,258,4096,ki)];function ov(e){e.window_size=2*e.w_size,At(e.head),e.max_lazy_match=Ti[e.level].max_lazy,e.good_match=Ti[e.level].good_length,e.nice_match=Ti[e.level].nice_length,e.max_chain_length=Ti[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=z-1,e.match_available=0,e.ins_h=0}function lv(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Xr,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ue.Buf16(Qb*2),this.dyn_dtree=new ue.Buf16((2*Zb+1)*2),this.bl_tree=new ue.Buf16((2*Jb+1)*2),At(this.dyn_ltree),At(this.dyn_dtree),At(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ue.Buf16(ev+1),this.heap=new ue.Buf16(2*go+1),At(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ue.Buf16(2*go+1),At(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Hu(e){var t;return!e||!e.state?kt(e,Se):(e.total_in=e.total_out=0,e.data_type=Gb,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Zr:Ut,e.adler=t.wrap===2?0:1,t.last_flush=Gt,Ee._tr_init(t),Ge)}function Uu(e){var t=Hu(e);return t===Ge&&ov(e.state),t}function cv(e,t){return!e||!e.state||e.state.wrap!==2?Se:(e.state.gzhead=t,Ge)}function $u(e,t,i,n,r,a){if(!e)return Se;var s=1;if(t===Nb&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>Wb||i!==Xr||n<8||n>15||t<0||t>9||a<0||a>$b)return kt(e,Se);n===8&&(n=9);var o=new lv;return e.state=o,o.strm=e,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=r+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+z-1)/z),o.window=new ue.Buf8(o.w_size*2),o.head=new ue.Buf16(o.hash_size),o.prev=new ue.Buf16(o.w_size),o.lit_bufsize=1<<r+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new ue.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=t,o.strategy=a,o.method=i,Uu(e)}function dv(e,t){return $u(e,t,Xr,Yb,Vb,qb)}function uv(e,t){var i,n,r,a;if(!e||!e.state||t>zu||t<0)return e?kt(e,Se):Se;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Cn&&t!==Tt)return kt(e,e.avail_out===0?fo:Se);if(n.strm=e,i=n.last_flush,n.last_flush=t,n.status===Zr)if(n.wrap===2)e.adler=0,B(n,31),B(n,139),B(n,8),n.gzhead?(B(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),B(n,n.gzhead.time&255),B(n,n.gzhead.time>>8&255),B(n,n.gzhead.time>>16&255),B(n,n.gzhead.time>>24&255),B(n,n.level===9?2:n.strategy>=Wr||n.level<2?4:0),B(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(B(n,n.gzhead.extra.length&255),B(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Et(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=mo):(B(n,0),B(n,0),B(n,0),B(n,0),B(n,0),B(n,n.level===9?2:n.strategy>=Wr||n.level<2?4:0),B(n,iv),n.status=Ut);else{var s=Xr+(n.w_bits-8<<4)<<8,o=-1;n.strategy>=Wr||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,s|=o<<6,n.strstart!==0&&(s|=tv),s+=31-s%31,n.status=Ut,An(n,s),n.strstart!==0&&(An(n,e.adler>>>16),An(n,e.adler&65535)),e.adler=1}if(n.status===mo)if(n.gzhead.extra){for(r=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),St(e),r=n.pending,n.pending===n.pending_buf_size));)B(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Yr)}else n.status=Yr;if(n.status===Yr)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),St(e),r=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,B(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),a===0&&(n.gzindex=0,n.status=Vr)}else n.status=Vr;if(n.status===Vr)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),St(e),r=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,B(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>r&&(e.adler=Et(e.adler,n.pending_buf,n.pending-r,r)),a===0&&(n.status=Kr)}else n.status=Kr;if(n.status===Kr&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&St(e),n.pending+2<=n.pending_buf_size&&(B(n,e.adler&255),B(n,e.adler>>8&255),e.adler=0,n.status=Ut)):n.status=Ut),n.pending!==0){if(St(e),e.avail_out===0)return n.last_flush=-1,Ge}else if(e.avail_in===0&&Bu(t)<=Bu(i)&&t!==Tt)return kt(e,fo);if(n.status===Cn&&e.avail_in!==0)return kt(e,fo);if(e.avail_in!==0||n.lookahead!==0||t!==Gt&&n.status!==Cn){var c=n.strategy===Wr?sv(n,t):n.strategy===Ub?av(n,t):Ti[n.level].func(n,t);if((c===$t||c===Li)&&(n.status=Cn),c===te||c===$t)return e.avail_out===0&&(n.last_flush=-1),Ge;if(c===kn&&(t===jb?Ee._tr_align(n):t!==zu&&(Ee._tr_stored_block(n,0,0,!1),t===Bb&&(At(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),St(e),e.avail_out===0))return n.last_flush=-1,Ge}return t!==Tt?Ge:n.wrap<=0?ju:(n.wrap===2?(B(n,e.adler&255),B(n,e.adler>>8&255),B(n,e.adler>>16&255),B(n,e.adler>>24&255),B(n,e.total_in&255),B(n,e.total_in>>8&255),B(n,e.total_in>>16&255),B(n,e.total_in>>24&255)):(An(n,e.adler>>>16),An(n,e.adler&65535)),St(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ge:ju)}function pv(e){var t;return!e||!e.state?Se:(t=e.state.status,t!==Zr&&t!==mo&&t!==Yr&&t!==Vr&&t!==Kr&&t!==Ut&&t!==Cn?kt(e,Se):(e.state=null,t===Ut?kt(e,Fb):Ge))}function fv(e,t){var i=t.length,n,r,a,s,o,c,l,d;if(!e||!e.state||(n=e.state,s=n.wrap,s===2||s===1&&n.status!==Zr||n.lookahead))return Se;for(s===1&&(e.adler=Fu(e.adler,t,i,0)),n.wrap=0,i>=n.w_size&&(s===0&&(At(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new ue.Buf8(n.w_size),ue.arraySet(d,t,i-n.w_size,n.w_size,0),t=d,i=n.w_size),o=e.avail_in,c=e.next_in,l=e.input,e.avail_in=i,e.next_in=0,e.input=t,qt(n);n.lookahead>=z;){r=n.strstart,a=n.lookahead-(z-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+z-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++;while(--a);n.strstart=r,n.lookahead=z-1,qt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=z-1,n.match_available=0,e.next_in=c,e.input=l,e.avail_in=o,n.wrap=s,Ge}We.deflateInit=dv;We.deflateInit2=$u;We.deflateReset=Uu;We.deflateResetKeep=Hu;We.deflateSetHeader=cv;We.deflate=uv;We.deflateEnd=pv;We.deflateSetDictionary=fv;We.deflateInfo="pako deflate (from Nodeca project)"});var bo=R(Ri=>{"use strict";var Jr=st(),Gu=!0,Wu=!0;try{String.fromCharCode.apply(null,[0])}catch{Gu=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Wu=!1}var Tn=new Jr.Buf8(256);for(lt=0;lt<256;lt++)Tn[lt]=lt>=252?6:lt>=248?5:lt>=240?4:lt>=224?3:lt>=192?2:1;var lt;Tn[254]=Tn[254]=1;Ri.string2buf=function(e){var t,i,n,r,a,s=e.length,o=0;for(r=0;r<s;r++)i=e.charCodeAt(r),(i&64512)===55296&&r+1<s&&(n=e.charCodeAt(r+1),(n&64512)===56320&&(i=65536+(i-55296<<10)+(n-56320),r++)),o+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Jr.Buf8(o),a=0,r=0;a<o;r++)i=e.charCodeAt(r),(i&64512)===55296&&r+1<s&&(n=e.charCodeAt(r+1),(n&64512)===56320&&(i=65536+(i-55296<<10)+(n-56320),r++)),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|i&63):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|i&63):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|i&63);return t};function Yu(e,t){if(t<65534&&(e.subarray&&Wu||!e.subarray&&Gu))return String.fromCharCode.apply(null,Jr.shrinkBuf(e,t));for(var i="",n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i}Ri.buf2binstring=function(e){return Yu(e,e.length)};Ri.binstring2buf=function(e){for(var t=new Jr.Buf8(e.length),i=0,n=t.length;i<n;i++)t[i]=e.charCodeAt(i);return t};Ri.buf2string=function(e,t){var i,n,r,a,s=t||e.length,o=new Array(s*2);for(n=0,i=0;i<s;){if(r=e[i++],r<128){o[n++]=r;continue}if(a=Tn[r],a>4){o[n++]=65533,i+=a-1;continue}for(r&=a===2?31:a===3?15:7;a>1&&i<s;)r=r<<6|e[i++]&63,a--;if(a>1){o[n++]=65533;continue}r<65536?o[n++]=r:(r-=65536,o[n++]=55296|r>>10&1023,o[n++]=56320|r&1023)}return Yu(o,n)};Ri.utf8border=function(e,t){var i;for(t=t||e.length,t>e.length&&(t=e.length),i=t-1;i>=0&&(e[i]&192)===128;)i--;return i<0||i===0?t:i+Tn[e[i]]>t?i:t}});var vo=R((Iw,Vu)=>{"use strict";function hv(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Vu.exports=hv});var Ju=R(Pn=>{"use strict";var Ln=qu(),Rn=st(),xo=bo(),wo=Gr(),gv=vo(),Zu=Object.prototype.toString,mv=0,yo=4,Pi=0,Ku=1,Xu=2,bv=-1,vv=0,yv=8;function Wt(e){if(!(this instanceof Wt))return new Wt(e);this.options=Rn.assign({level:bv,method:yv,chunkSize:16384,windowBits:15,memLevel:8,strategy:vv,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gv,this.strm.avail_out=0;var i=Ln.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==Pi)throw new Error(wo[i]);if(t.header&&Ln.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=xo.string2buf(t.dictionary):Zu.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,i=Ln.deflateSetDictionary(this.strm,n),i!==Pi)throw new Error(wo[i]);this._dict_set=!0}}Wt.prototype.push=function(e,t){var i=this.strm,n=this.options.chunkSize,r,a;if(this.ended)return!1;a=t===~~t?t:t===!0?yo:mv,typeof e=="string"?i.input=xo.string2buf(e):Zu.call(e)==="[object ArrayBuffer]"?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(i.avail_out===0&&(i.output=new Rn.Buf8(n),i.next_out=0,i.avail_out=n),r=Ln.deflate(i,a),r!==Ku&&r!==Pi)return this.onEnd(r),this.ended=!0,!1;(i.avail_out===0||i.avail_in===0&&(a===yo||a===Xu))&&(this.options.to==="string"?this.onData(xo.buf2binstring(Rn.shrinkBuf(i.output,i.next_out))):this.onData(Rn.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||i.avail_out===0)&&r!==Ku);return a===yo?(r=Ln.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Pi):(a===Xu&&(this.onEnd(Pi),i.avail_out=0),!0)};Wt.prototype.onData=function(e){this.chunks.push(e)};Wt.prototype.onEnd=function(e){e===Pi&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Rn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function _o(e,t){var i=new Wt(t);if(i.push(e,!0),i.err)throw i.msg||wo[i.err];return i.result}function xv(e,t){return t=t||{},t.raw=!0,_o(e,t)}function wv(e,t){return t=t||{},t.gzip=!0,_o(e,t)}Pn.Deflate=Wt;Pn.deflate=_o;Pn.deflateRaw=xv;Pn.gzip=wv});var ep=R((Ow,Qu)=>{"use strict";var Qr=30,_v=12;Qu.exports=function(t,i){var n,r,a,s,o,c,l,d,u,p,f,m,h,g,b,v,y,x,w,T,C,S,L,M,_;n=t.state,r=t.next_in,M=t.input,a=r+(t.avail_in-5),s=t.next_out,_=t.output,o=s-(i-t.avail_out),c=s+(t.avail_out-257),l=n.dmax,d=n.wsize,u=n.whave,p=n.wnext,f=n.window,m=n.hold,h=n.bits,g=n.lencode,b=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{h<15&&(m+=M[r++]<<h,h+=8,m+=M[r++]<<h,h+=8),x=g[m&v];t:for(;;){if(w=x>>>24,m>>>=w,h-=w,w=x>>>16&255,w===0)_[s++]=x&65535;else if(w&16){T=x&65535,w&=15,w&&(h<w&&(m+=M[r++]<<h,h+=8),T+=m&(1<<w)-1,m>>>=w,h-=w),h<15&&(m+=M[r++]<<h,h+=8,m+=M[r++]<<h,h+=8),x=b[m&y];i:for(;;){if(w=x>>>24,m>>>=w,h-=w,w=x>>>16&255,w&16){if(C=x&65535,w&=15,h<w&&(m+=M[r++]<<h,h+=8,h<w&&(m+=M[r++]<<h,h+=8)),C+=m&(1<<w)-1,C>l){t.msg="invalid distance too far back",n.mode=Qr;break e}if(m>>>=w,h-=w,w=s-o,C>w){if(w=C-w,w>u&&n.sane){t.msg="invalid distance too far back",n.mode=Qr;break e}if(S=0,L=f,p===0){if(S+=d-w,w<T){T-=w;do _[s++]=f[S++];while(--w);S=s-C,L=_}}else if(p<w){if(S+=d+p-w,w-=p,w<T){T-=w;do _[s++]=f[S++];while(--w);if(S=0,p<T){w=p,T-=w;do _[s++]=f[S++];while(--w);S=s-C,L=_}}}else if(S+=p-w,w<T){T-=w;do _[s++]=f[S++];while(--w);S=s-C,L=_}for(;T>2;)_[s++]=L[S++],_[s++]=L[S++],_[s++]=L[S++],T-=3;T&&(_[s++]=L[S++],T>1&&(_[s++]=L[S++]))}else{S=s-C;do _[s++]=_[S++],_[s++]=_[S++],_[s++]=_[S++],T-=3;while(T>2);T&&(_[s++]=_[S++],T>1&&(_[s++]=_[S++]))}}else if((w&64)===0){x=b[(x&65535)+(m&(1<<w)-1)];continue i}else{t.msg="invalid distance code",n.mode=Qr;break e}break}}else if((w&64)===0){x=g[(x&65535)+(m&(1<<w)-1)];continue t}else if(w&32){n.mode=_v;break e}else{t.msg="invalid literal/length code",n.mode=Qr;break e}break}}while(r<a&&s<c);T=h>>3,r-=T,h-=T<<3,m&=(1<<h)-1,t.next_in=r,t.next_out=s,t.avail_in=r<a?5+(a-r):5-(r-a),t.avail_out=s<c?257+(c-s):257-(s-c),n.hold=m,n.bits=h}});var op=R((Dw,sp)=>{"use strict";var tp=st(),Ii=15,ip=852,np=592,rp=0,Eo=1,ap=2,Ev=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Sv=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Av=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Cv=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];sp.exports=function(t,i,n,r,a,s,o,c){var l=c.bits,d=0,u=0,p=0,f=0,m=0,h=0,g=0,b=0,v=0,y=0,x,w,T,C,S,L=null,M=0,_,E=new tp.Buf16(Ii+1),A=new tp.Buf16(Ii+1),P=null,I=0,k,D,j;for(d=0;d<=Ii;d++)E[d]=0;for(u=0;u<r;u++)E[i[n+u]]++;for(m=l,f=Ii;f>=1&&E[f]===0;f--);if(m>f&&(m=f),f===0)return a[s++]=1<<24|64<<16|0,a[s++]=1<<24|64<<16|0,c.bits=1,0;for(p=1;p<f&&E[p]===0;p++);for(m<p&&(m=p),b=1,d=1;d<=Ii;d++)if(b<<=1,b-=E[d],b<0)return-1;if(b>0&&(t===rp||f!==1))return-1;for(A[1]=0,d=1;d<Ii;d++)A[d+1]=A[d]+E[d];for(u=0;u<r;u++)i[n+u]!==0&&(o[A[i[n+u]]++]=u);if(t===rp?(L=P=o,_=19):t===Eo?(L=Ev,M-=257,P=Sv,I-=257,_=256):(L=Av,P=Cv,_=-1),y=0,u=0,d=p,S=s,h=m,g=0,T=-1,v=1<<m,C=v-1,t===Eo&&v>ip||t===ap&&v>np)return 1;for(;;){k=d-g,o[u]<_?(D=0,j=o[u]):o[u]>_?(D=P[I+o[u]],j=L[M+o[u]]):(D=96,j=0),x=1<<d-g,w=1<<h,p=w;do w-=x,a[S+(y>>g)+w]=k<<24|D<<16|j|0;while(w!==0);for(x=1<<d-1;y&x;)x>>=1;if(x!==0?(y&=x-1,y+=x):y=0,u++,--E[d]===0){if(d===f)break;d=i[n+o[u]]}if(d>m&&(y&C)!==T){for(g===0&&(g=m),S+=p,h=d-g,b=1<<h;h+g<f&&(b-=E[h+g],!(b<=0));)h++,b<<=1;if(v+=1<<h,t===Eo&&v>ip||t===ap&&v>np)return 1;T=y&C,a[T]=m<<24|h<<16|S-s|0}}return y!==0&&(a[S+y]=d-g<<24|64<<16|0),c.bits=m,0}});var Up=R(Me=>{"use strict";var be=st(),Lo=uo(),Ye=po(),kv=ep(),In=op(),Tv=0,Mp=1,Op=2,lp=4,Lv=5,ea=6,Yt=0,Rv=1,Pv=2,Ae=-2,Dp=-3,Ro=-4,Iv=-5,cp=8,zp=1,dp=2,up=3,pp=4,fp=5,hp=6,gp=7,mp=8,bp=9,vp=10,na=11,ct=12,So=13,yp=14,Ao=15,xp=16,wp=17,_p=18,Ep=19,ta=20,ia=21,Sp=22,Ap=23,Cp=24,kp=25,Tp=26,Co=27,Lp=28,Rp=29,q=30,Po=31,Mv=32,Ov=852,Dv=592,zv=15,jv=zv;function Pp(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Bv(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new be.Buf16(320),this.work=new be.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function jp(e){var t;return!e||!e.state?Ae:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=zp,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new be.Buf32(Ov),t.distcode=t.distdyn=new be.Buf32(Dv),t.sane=1,t.back=-1,Yt)}function Bp(e){var t;return!e||!e.state?Ae:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,jp(e))}function Fp(e,t){var i,n;return!e||!e.state||(n=e.state,t<0?(i=0,t=-t):(i=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Ae:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,Bp(e))}function Np(e,t){var i,n;return e?(n=new Bv,e.state=n,n.window=null,i=Fp(e,t),i!==Yt&&(e.state=null),i):Ae}function Fv(e){return Np(e,jv)}var Ip=!0,ko,To;function Nv(e){if(Ip){var t;for(ko=new be.Buf32(512),To=new be.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(In(Mp,e.lens,0,288,ko,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;In(Op,e.lens,0,32,To,0,e.work,{bits:5}),Ip=!1}e.lencode=ko,e.lenbits=9,e.distcode=To,e.distbits=5}function Hp(e,t,i,n){var r,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new be.Buf8(a.wsize)),n>=a.wsize?(be.arraySet(a.window,t,i-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(r=a.wsize-a.wnext,r>n&&(r=n),be.arraySet(a.window,t,i-n,r,a.wnext),n-=r,n?(be.arraySet(a.window,t,i-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=r))),0}function Hv(e,t){var i,n,r,a,s,o,c,l,d,u,p,f,m,h,g=0,b,v,y,x,w,T,C,S,L=new be.Buf8(4),M,_,E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ae;i=e.state,i.mode===ct&&(i.mode=So),s=e.next_out,r=e.output,c=e.avail_out,a=e.next_in,n=e.input,o=e.avail_in,l=i.hold,d=i.bits,u=o,p=c,S=Yt;e:for(;;)switch(i.mode){case zp:if(i.wrap===0){i.mode=So;break}for(;d<16;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(i.wrap&2&&l===35615){i.check=0,L[0]=l&255,L[1]=l>>>8&255,i.check=Ye(i.check,L,2,0),l=0,d=0,i.mode=dp;break}if(i.flags=0,i.head&&(i.head.done=!1),!(i.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=q;break}if((l&15)!==cp){e.msg="unknown compression method",i.mode=q;break}if(l>>>=4,d-=4,C=(l&15)+8,i.wbits===0)i.wbits=C;else if(C>i.wbits){e.msg="invalid window size",i.mode=q;break}i.dmax=1<<C,e.adler=i.check=1,i.mode=l&512?vp:ct,l=0,d=0;break;case dp:for(;d<16;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(i.flags=l,(i.flags&255)!==cp){e.msg="unknown compression method",i.mode=q;break}if(i.flags&57344){e.msg="unknown header flags set",i.mode=q;break}i.head&&(i.head.text=l>>8&1),i.flags&512&&(L[0]=l&255,L[1]=l>>>8&255,i.check=Ye(i.check,L,2,0)),l=0,d=0,i.mode=up;case up:for(;d<32;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.head&&(i.head.time=l),i.flags&512&&(L[0]=l&255,L[1]=l>>>8&255,L[2]=l>>>16&255,L[3]=l>>>24&255,i.check=Ye(i.check,L,4,0)),l=0,d=0,i.mode=pp;case pp:for(;d<16;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.head&&(i.head.xflags=l&255,i.head.os=l>>8),i.flags&512&&(L[0]=l&255,L[1]=l>>>8&255,i.check=Ye(i.check,L,2,0)),l=0,d=0,i.mode=fp;case fp:if(i.flags&1024){for(;d<16;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.length=l,i.head&&(i.head.extra_len=l),i.flags&512&&(L[0]=l&255,L[1]=l>>>8&255,i.check=Ye(i.check,L,2,0)),l=0,d=0}else i.head&&(i.head.extra=null);i.mode=hp;case hp:if(i.flags&1024&&(f=i.length,f>o&&(f=o),f&&(i.head&&(C=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),be.arraySet(i.head.extra,n,a,f,C)),i.flags&512&&(i.check=Ye(i.check,n,f,a)),o-=f,a+=f,i.length-=f),i.length))break e;i.length=0,i.mode=gp;case gp:if(i.flags&2048){if(o===0)break e;f=0;do C=n[a+f++],i.head&&C&&i.length<65536&&(i.head.name+=String.fromCharCode(C));while(C&&f<o);if(i.flags&512&&(i.check=Ye(i.check,n,f,a)),o-=f,a+=f,C)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=mp;case mp:if(i.flags&4096){if(o===0)break e;f=0;do C=n[a+f++],i.head&&C&&i.length<65536&&(i.head.comment+=String.fromCharCode(C));while(C&&f<o);if(i.flags&512&&(i.check=Ye(i.check,n,f,a)),o-=f,a+=f,C)break e}else i.head&&(i.head.comment=null);i.mode=bp;case bp:if(i.flags&512){for(;d<16;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(l!==(i.check&65535)){e.msg="header crc mismatch",i.mode=q;break}l=0,d=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=ct;break;case vp:for(;d<32;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}e.adler=i.check=Pp(l),l=0,d=0,i.mode=na;case na:if(i.havedict===0)return e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,i.hold=l,i.bits=d,Pv;e.adler=i.check=1,i.mode=ct;case ct:if(t===Lv||t===ea)break e;case So:if(i.last){l>>>=d&7,d-=d&7,i.mode=Co;break}for(;d<3;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}switch(i.last=l&1,l>>>=1,d-=1,l&3){case 0:i.mode=yp;break;case 1:if(Nv(i),i.mode=ta,t===ea){l>>>=2,d-=2;break e}break;case 2:i.mode=wp;break;case 3:e.msg="invalid block type",i.mode=q}l>>>=2,d-=2;break;case yp:for(l>>>=d&7,d-=d&7;d<32;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",i.mode=q;break}if(i.length=l&65535,l=0,d=0,i.mode=Ao,t===ea)break e;case Ao:i.mode=xp;case xp:if(f=i.length,f){if(f>o&&(f=o),f>c&&(f=c),f===0)break e;be.arraySet(r,n,a,f,s),o-=f,a+=f,c-=f,s+=f,i.length-=f;break}i.mode=ct;break;case wp:for(;d<14;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(i.nlen=(l&31)+257,l>>>=5,d-=5,i.ndist=(l&31)+1,l>>>=5,d-=5,i.ncode=(l&15)+4,l>>>=4,d-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=q;break}i.have=0,i.mode=_p;case _p:for(;i.have<i.ncode;){for(;d<3;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.lens[E[i.have++]]=l&7,l>>>=3,d-=3}for(;i.have<19;)i.lens[E[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,M={bits:i.lenbits},S=In(Tv,i.lens,0,19,i.lencode,0,i.work,M),i.lenbits=M.bits,S){e.msg="invalid code lengths set",i.mode=q;break}i.have=0,i.mode=Ep;case Ep:for(;i.have<i.nlen+i.ndist;){for(;g=i.lencode[l&(1<<i.lenbits)-1],b=g>>>24,v=g>>>16&255,y=g&65535,!(b<=d);){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(y<16)l>>>=b,d-=b,i.lens[i.have++]=y;else{if(y===16){for(_=b+2;d<_;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(l>>>=b,d-=b,i.have===0){e.msg="invalid bit length repeat",i.mode=q;break}C=i.lens[i.have-1],f=3+(l&3),l>>>=2,d-=2}else if(y===17){for(_=b+3;d<_;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}l>>>=b,d-=b,C=0,f=3+(l&7),l>>>=3,d-=3}else{for(_=b+7;d<_;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}l>>>=b,d-=b,C=0,f=11+(l&127),l>>>=7,d-=7}if(i.have+f>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=q;break}for(;f--;)i.lens[i.have++]=C}}if(i.mode===q)break;if(i.lens[256]===0){e.msg="invalid code -- missing end-of-block",i.mode=q;break}if(i.lenbits=9,M={bits:i.lenbits},S=In(Mp,i.lens,0,i.nlen,i.lencode,0,i.work,M),i.lenbits=M.bits,S){e.msg="invalid literal/lengths set",i.mode=q;break}if(i.distbits=6,i.distcode=i.distdyn,M={bits:i.distbits},S=In(Op,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,M),i.distbits=M.bits,S){e.msg="invalid distances set",i.mode=q;break}if(i.mode=ta,t===ea)break e;case ta:i.mode=ia;case ia:if(o>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,i.hold=l,i.bits=d,kv(e,p),s=e.next_out,r=e.output,c=e.avail_out,a=e.next_in,n=e.input,o=e.avail_in,l=i.hold,d=i.bits,i.mode===ct&&(i.back=-1);break}for(i.back=0;g=i.lencode[l&(1<<i.lenbits)-1],b=g>>>24,v=g>>>16&255,y=g&65535,!(b<=d);){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(v&&(v&240)===0){for(x=b,w=v,T=y;g=i.lencode[T+((l&(1<<x+w)-1)>>x)],b=g>>>24,v=g>>>16&255,y=g&65535,!(x+b<=d);){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}l>>>=x,d-=x,i.back+=x}if(l>>>=b,d-=b,i.back+=b,i.length=y,v===0){i.mode=Tp;break}if(v&32){i.back=-1,i.mode=ct;break}if(v&64){e.msg="invalid literal/length code",i.mode=q;break}i.extra=v&15,i.mode=Sp;case Sp:if(i.extra){for(_=i.extra;d<_;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.length+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=Ap;case Ap:for(;g=i.distcode[l&(1<<i.distbits)-1],b=g>>>24,v=g>>>16&255,y=g&65535,!(b<=d);){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if((v&240)===0){for(x=b,w=v,T=y;g=i.distcode[T+((l&(1<<x+w)-1)>>x)],b=g>>>24,v=g>>>16&255,y=g&65535,!(x+b<=d);){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}l>>>=x,d-=x,i.back+=x}if(l>>>=b,d-=b,i.back+=b,v&64){e.msg="invalid distance code",i.mode=q;break}i.offset=y,i.extra=v&15,i.mode=Cp;case Cp:if(i.extra){for(_=i.extra;d<_;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}i.offset+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=q;break}i.mode=kp;case kp:if(c===0)break e;if(f=p-c,i.offset>f){if(f=i.offset-f,f>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=q;break}f>i.wnext?(f-=i.wnext,m=i.wsize-f):m=i.wnext-f,f>i.length&&(f=i.length),h=i.window}else h=r,m=s-i.offset,f=i.length;f>c&&(f=c),c-=f,i.length-=f;do r[s++]=h[m++];while(--f);i.length===0&&(i.mode=ia);break;case Tp:if(c===0)break e;r[s++]=i.length,c--,i.mode=ia;break;case Co:if(i.wrap){for(;d<32;){if(o===0)break e;o--,l|=n[a++]<<d,d+=8}if(p-=c,e.total_out+=p,i.total+=p,p&&(e.adler=i.check=i.flags?Ye(i.check,r,p,s-p):Lo(i.check,r,p,s-p)),p=c,(i.flags?l:Pp(l))!==i.check){e.msg="incorrect data check",i.mode=q;break}l=0,d=0}i.mode=Lp;case Lp:if(i.wrap&&i.flags){for(;d<32;){if(o===0)break e;o--,l+=n[a++]<<d,d+=8}if(l!==(i.total&4294967295)){e.msg="incorrect length check",i.mode=q;break}l=0,d=0}i.mode=Rp;case Rp:S=Rv;break e;case q:S=Dp;break e;case Po:return Ro;case Mv:default:return Ae}return e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,i.hold=l,i.bits=d,(i.wsize||p!==e.avail_out&&i.mode<q&&(i.mode<Co||t!==lp))&&Hp(e,e.output,e.next_out,p-e.avail_out)?(i.mode=Po,Ro):(u-=e.avail_in,p-=e.avail_out,e.total_in+=u,e.total_out+=p,i.total+=p,i.wrap&&p&&(e.adler=i.check=i.flags?Ye(i.check,r,p,e.next_out-p):Lo(i.check,r,p,e.next_out-p)),e.data_type=i.bits+(i.last?64:0)+(i.mode===ct?128:0)+(i.mode===ta||i.mode===Ao?256:0),(u===0&&p===0||t===lp)&&S===Yt&&(S=Iv),S)}function Uv(e){if(!e||!e.state)return Ae;var t=e.state;return t.window&&(t.window=null),e.state=null,Yt}function $v(e,t){var i;return!e||!e.state||(i=e.state,(i.wrap&2)===0)?Ae:(i.head=t,t.done=!1,Yt)}function qv(e,t){var i=t.length,n,r,a;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==na)?Ae:n.mode===na&&(r=1,r=Lo(r,t,i,0),r!==n.check)?Dp:(a=Hp(e,t,i,i),a?(n.mode=Po,Ro):(n.havedict=1,Yt))}Me.inflateReset=Bp;Me.inflateReset2=Fp;Me.inflateResetKeep=jp;Me.inflateInit=Fv;Me.inflateInit2=Np;Me.inflate=Hv;Me.inflateEnd=Uv;Me.inflateGetHeader=$v;Me.inflateSetDictionary=qv;Me.inflateInfo="pako inflate (from Nodeca project)"});var Io=R((jw,$p)=>{"use strict";$p.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var Gp=R((Bw,qp)=>{"use strict";function Gv(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}qp.exports=Gv});var Yp=R(On=>{"use strict";var Mi=Up(),Mn=st(),ra=bo(),K=Io(),Mo=Gr(),Wv=vo(),Yv=Gp(),Wp=Object.prototype.toString;function Vt(e){if(!(this instanceof Vt))return new Vt(e);this.options=Mn.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Wv,this.strm.avail_out=0;var i=Mi.inflateInit2(this.strm,t.windowBits);if(i!==K.Z_OK)throw new Error(Mo[i]);if(this.header=new Yv,Mi.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ra.string2buf(t.dictionary):Wp.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=Mi.inflateSetDictionary(this.strm,t.dictionary),i!==K.Z_OK)))throw new Error(Mo[i])}Vt.prototype.push=function(e,t){var i=this.strm,n=this.options.chunkSize,r=this.options.dictionary,a,s,o,c,l,d=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?K.Z_FINISH:K.Z_NO_FLUSH,typeof e=="string"?i.input=ra.binstring2buf(e):Wp.call(e)==="[object ArrayBuffer]"?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(i.avail_out===0&&(i.output=new Mn.Buf8(n),i.next_out=0,i.avail_out=n),a=Mi.inflate(i,K.Z_NO_FLUSH),a===K.Z_NEED_DICT&&r&&(a=Mi.inflateSetDictionary(this.strm,r)),a===K.Z_BUF_ERROR&&d===!0&&(a=K.Z_OK,d=!1),a!==K.Z_STREAM_END&&a!==K.Z_OK)return this.onEnd(a),this.ended=!0,!1;i.next_out&&(i.avail_out===0||a===K.Z_STREAM_END||i.avail_in===0&&(s===K.Z_FINISH||s===K.Z_SYNC_FLUSH))&&(this.options.to==="string"?(o=ra.utf8border(i.output,i.next_out),c=i.next_out-o,l=ra.buf2string(i.output,o),i.next_out=c,i.avail_out=n-c,c&&Mn.arraySet(i.output,i.output,o,c,0),this.onData(l)):this.onData(Mn.shrinkBuf(i.output,i.next_out))),i.avail_in===0&&i.avail_out===0&&(d=!0)}while((i.avail_in>0||i.avail_out===0)&&a!==K.Z_STREAM_END);return a===K.Z_STREAM_END&&(s=K.Z_FINISH),s===K.Z_FINISH?(a=Mi.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===K.Z_OK):(s===K.Z_SYNC_FLUSH&&(this.onEnd(K.Z_OK),i.avail_out=0),!0)};Vt.prototype.onData=function(e){this.chunks.push(e)};Vt.prototype.onEnd=function(e){e===K.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Mn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Oo(e,t){var i=new Vt(t);if(i.push(e,!0),i.err)throw i.msg||Mo[i.err];return i.result}function Vv(e,t){return t=t||{},t.raw=!0,Oo(e,t)}On.Inflate=Vt;On.inflate=Oo;On.inflateRaw=Vv;On.ungzip=Oo});var Xp=R((Nw,Kp)=>{"use strict";var Kv=st().assign,Xv=Ju(),Zv=Yp(),Jv=Io(),Vp={};Kv(Vp,Xv,Zv,Jv);Kp.exports=Vp});var Jp=R(sa=>{"use strict";var Qv=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined",ey=Xp(),Zp=G(),aa=me(),ty=Qv?"uint8array":"array";sa.magic="\b\0";function Kt(e,t){aa.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}Zp.inherits(Kt,aa);Kt.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(Zp.transformTo(ty,e.data),!1)};Kt.prototype.flush=function(){aa.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)};Kt.prototype.cleanUp=function(){aa.prototype.cleanUp.call(this),this._pako=null};Kt.prototype._createPako=function(){this._pako=new ey[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};sa.compressWorker=function(e){return new Kt("Deflate",e)};sa.uncompressWorker=function(){return new Kt("Inflate",{})}});var zo=R(Do=>{"use strict";var Qp=me();Do.STORE={magic:"\0\0",compressWorker:function(){return new Qp("STORE compression")},uncompressWorker:function(){return new Qp("STORE decompression")}};Do.DEFLATE=Jp()});var jo=R(Xt=>{"use strict";Xt.LOCAL_FILE_HEADER="PK";Xt.CENTRAL_FILE_HEADER="PK";Xt.CENTRAL_DIRECTORY_END="PK";Xt.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";Xt.ZIP64_CENTRAL_DIRECTORY_END="PK";Xt.DATA_DESCRIPTOR="PK\x07\b"});var rf=R((qw,nf)=>{"use strict";var Oi=G(),Di=me(),Bo=_i(),ef=Nr(),oa=jo(),H=function(e,t){var i="",n;for(n=0;n<t;n++)i+=String.fromCharCode(e&255),e=e>>>8;return i},iy=function(e,t){var i=e;return e||(i=t?16893:33204),(i&65535)<<16},ny=function(e){return(e||0)&63},tf=function(e,t,i,n,r,a){var s=e.file,o=e.compression,c=a!==Bo.utf8encode,l=Oi.transformTo("string",a(s.name)),d=Oi.transformTo("string",Bo.utf8encode(s.name)),u=s.comment,p=Oi.transformTo("string",a(u)),f=Oi.transformTo("string",Bo.utf8encode(u)),m=d.length!==s.name.length,h=f.length!==u.length,g,b,v="",y="",x="",w=s.dir,T=s.date,C={crc32:0,compressedSize:0,uncompressedSize:0};(!t||i)&&(C.crc32=e.crc32,C.compressedSize=e.compressedSize,C.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),!c&&(m||h)&&(S|=2048);var L=0,M=0;w&&(L|=16),r==="UNIX"?(M=798,L|=iy(s.unixPermissions,w)):(M=20,L|=ny(s.dosPermissions,w)),g=T.getUTCHours(),g=g<<6,g=g|T.getUTCMinutes(),g=g<<5,g=g|T.getUTCSeconds()/2,b=T.getUTCFullYear()-1980,b=b<<4,b=b|T.getUTCMonth()+1,b=b<<5,b=b|T.getUTCDate(),m&&(y=H(1,1)+H(ef(l),4)+d,v+="up"+H(y.length,2)+y),h&&(x=H(1,1)+H(ef(p),4)+f,v+="uc"+H(x.length,2)+x);var _="";_+=`
2
2
  \0`,_+=H(S,2),_+=o.magic,_+=H(g,2),_+=H(b,2),_+=H(C.crc32,4),_+=H(C.compressedSize,4),_+=H(C.uncompressedSize,4),_+=H(l.length,2),_+=H(v.length,2);var E=oa.LOCAL_FILE_HEADER+_+l+v,A=oa.CENTRAL_FILE_HEADER+H(M,2)+_+H(p.length,2)+"\0\0\0\0"+H(L,4)+H(n,4)+l+v+p;return{fileRecord:E,dirRecord:A}},ry=function(e,t,i,n,r){var a="",s=Oi.transformTo("string",r(n));return a=oa.CENTRAL_DIRECTORY_END+"\0\0\0\0"+H(e,2)+H(e,2)+H(t,4)+H(i,4)+H(s.length,2)+s,a},ay=function(e){var t="";return t=oa.DATA_DESCRIPTOR+H(e.crc32,4)+H(e.compressedSize,4)+H(e.uncompressedSize,4),t};function Oe(e,t,i,n){Di.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=i,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}Oi.inherits(Oe,Di);Oe.prototype.push=function(e){var t=e.meta.percent||0,i=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,Di.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:i?(t+100*(i-n-1))/i:100}}))};Oe.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var i=tf(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:i.fileRecord,meta:{percent:0}})}else this.accumulate=!0};Oe.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,i=tf(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(i.dirRecord),t)this.push({data:ay(e),meta:{percent:100}});else for(this.push({data:i.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null};Oe.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var i=this.bytesWritten-e,n=ry(this.dirRecords.length,i,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})};Oe.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()};Oe.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(i){t.processChunk(i)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(i){t.error(i)}),this};Oe.prototype.resume=function(){if(!Di.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};Oe.prototype.error=function(e){var t=this._sources;if(!Di.prototype.error.call(this,e))return!1;for(var i=0;i<t.length;i++)try{t[i].error(e)}catch{}return!0};Oe.prototype.lock=function(){Di.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()};nf.exports=Oe});var sf=R(af=>{"use strict";var sy=zo(),oy=rf(),ly=function(e,t){var i=e||t,n=sy[i];if(!n)throw new Error(i+" is not a valid compression method !");return n};af.generateWorker=function(e,t,i){var n=new oy(t.streamFiles,i,t.platform,t.encodeFileName),r=0;try{e.forEach(function(a,s){r++;var o=ly(s.options.compression,t.compression),c=s.options.compressionOptions||t.compressionOptions||{},l=s.dir,d=s.date;s._compressWorker(o,c).withStreamInfo("file",{name:a,dir:l,date:d,comment:s.comment||"",unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions}).pipe(n)}),n.entriesCount=r}catch(a){n.error(a)}return n}});var lf=R((Ww,of)=>{"use strict";var cy=G(),la=me();function Dn(e,t){la.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}cy.inherits(Dn,la);Dn.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(i){t.push({data:i,meta:{percent:0}})}).on("error",function(i){t.isPaused?this.generatedError=i:t.error(i)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})};Dn.prototype.pause=function(){return la.prototype.pause.call(this)?(this._stream.pause(),!0):!1};Dn.prototype.resume=function(){return la.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),!0):!1};of.exports=Dn});var vf=R((Yw,bf)=>{"use strict";var dy=_i(),zn=G(),pf=me(),uy=Us(),ff=$s(),cf=Hr(),py=cu(),fy=sf(),df=un(),hy=lf(),hf=function(e,t,i){var n=zn.getTypeOf(t),r,a=zn.extend(i||{},ff);a.date=a.date||new Date,a.compression!==null&&(a.compression=a.compression.toUpperCase()),typeof a.unixPermissions=="string"&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&a.unixPermissions&16384&&(a.dir=!0),a.dosPermissions&&a.dosPermissions&16&&(a.dir=!0),a.dir&&(e=gf(e)),a.createFolders&&(r=gy(e))&&mf.call(this,r,!0);var s=n==="string"&&a.binary===!1&&a.base64===!1;(!i||typeof i.binary=="undefined")&&(a.binary=!s);var o=t instanceof cf&&t.uncompressedSize===0;(o||a.dir||!t||t.length===0)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",n="string");var c=null;t instanceof cf||t instanceof pf?c=t:df.isNode&&df.isStream(t)?c=new hy(e,t):c=zn.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var l=new py(e,c,a);this.files[e]=l},gy=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},gf=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},mf=function(e,t){return t=typeof t!="undefined"?t:ff.createFolders,e=gf(e),this.files[e]||hf.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function uf(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var my={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,i,n;for(t in this.files)n=this.files[t],i=t.slice(this.root.length,t.length),i&&t.slice(0,this.root.length)===this.root&&e(i,n)},filter:function(e){var t=[];return this.forEach(function(i,n){e(i,n)&&t.push(n)}),t},file:function(e,t,i){if(arguments.length===1)if(uf(e)){var n=e;return this.filter(function(a,s){return!s.dir&&n.test(a)})}else{var r=this.files[this.root+e];return r&&!r.dir?r:null}else e=this.root+e,hf.call(this,e,t,i);return this},folder:function(e){if(!e)return this;if(uf(e))return this.filter(function(r,a){return a.dir&&e.test(r)});var t=this.root+e,i=mf.call(this,t),n=this.clone();return n.root=i.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||(e.slice(-1)!=="/"&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var i=this.filter(function(r,a){return a.name.slice(0,e.length)===e}),n=0;n<i.length;n++)delete this.files[i[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,i={};try{if(i=zn.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:dy.utf8encode}),i.type=i.type.toLowerCase(),i.compression=i.compression.toUpperCase(),i.type==="binarystring"&&(i.type="string"),!i.type)throw new Error("No output type specified.");zn.checkSupport(i.type),(i.platform==="darwin"||i.platform==="freebsd"||i.platform==="linux"||i.platform==="sunos")&&(i.platform="UNIX"),i.platform==="win32"&&(i.platform="DOS");var n=i.comment||this.comment||"";t=fy.generateWorker(this,i,n)}catch(r){t=new pf("error"),t.error(r)}return new uy(t,i.type||"string",i.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};bf.exports=my});var Fo=R((Vw,xf)=>{"use strict";var by=G();function yf(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}yf.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t=0,i;for(this.checkOffset(e),i=this.index+e-1;i>=this.index;i--)t=(t<<8)+this.byteAt(i);return this.index+=e,t},readString:function(e){return by.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};xf.exports=yf});var No=R((Kw,_f)=>{"use strict";var wf=Fo(),vy=G();function zi(e){wf.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255}vy.inherits(zi,wf);zi.prototype.byteAt=function(e){return this.data[this.zero+e]};zi.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),i=e.charCodeAt(1),n=e.charCodeAt(2),r=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===t&&this.data[a+1]===i&&this.data[a+2]===n&&this.data[a+3]===r)return a-this.zero;return-1};zi.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),i=e.charCodeAt(1),n=e.charCodeAt(2),r=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&i===a[1]&&n===a[2]&&r===a[3]};zi.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};_f.exports=zi});var Af=R((Xw,Sf)=>{"use strict";var Ef=Fo(),yy=G();function ji(e){Ef.call(this,e)}yy.inherits(ji,Ef);ji.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};ji.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};ji.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t};ji.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};Sf.exports=ji});var Uo=R((Zw,kf)=>{"use strict";var Cf=No(),xy=G();function Ho(e){Cf.call(this,e)}xy.inherits(Ho,Cf);Ho.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};kf.exports=Ho});var Rf=R((Jw,Lf)=>{"use strict";var Tf=Uo(),wy=G();function $o(e){Tf.call(this,e)}wy.inherits($o,Tf);$o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};Lf.exports=$o});var qo=R((Qw,If)=>{"use strict";var ca=G(),Pf=rt(),_y=No(),Ey=Af(),Sy=Rf(),Ay=Uo();If.exports=function(e){var t=ca.getTypeOf(e);return ca.checkSupport(t),t==="string"&&!Pf.uint8array?new Ey(e):t==="nodebuffer"?new Sy(e):Pf.uint8array?new Ay(ca.transformTo("uint8array",e)):new _y(ca.transformTo("array",e))}});var zf=R((e1,Df)=>{"use strict";var Go=qo(),Lt=G(),Cy=Hr(),Mf=Nr(),da=_i(),ua=zo(),ky=rt(),Ty=0,Ly=3,Ry=function(e){for(var t in ua)if(Object.prototype.hasOwnProperty.call(ua,t)&&ua[t].magic===e)return ua[t];return null};function Of(e,t){this.options=e,this.loadOptions=t}Of.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(e){var t,i;if(e.skip(22),this.fileNameLength=e.readInt(2),i=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(i),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=Ry(this.compressionMethod),t===null)throw new Error("Corrupted zip : compression "+Lt.pretty(this.compressionMethod)+" unknown (inner file : "+Lt.transformTo("string",this.fileName)+")");this.decompressed=new Cy(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),e===Ty&&(this.dosPermissions=this.externalFileAttributes&63),e===Ly&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=Go(this.extraFields[1].value);this.uncompressedSize===Lt.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===Lt.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===Lt.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===Lt.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,i,n,r;for(this.extraFields||(this.extraFields={});e.index+4<t;)i=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[i]={id:i,length:n,value:r};e.setIndex(t)},handleUTF8:function(){var e=ky.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=da.utf8decode(this.fileName),this.fileCommentStr=da.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else{var i=Lt.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(i)}var n=this.findExtraFieldUnicodeComment();if(n!==null)this.fileCommentStr=n;else{var r=Lt.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(r)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=Go(e.value);return t.readInt(1)!==1||Mf(this.fileName)!==t.readInt(4)?null:da.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=Go(e.value);return t.readInt(1)!==1||Mf(this.fileComment)!==t.readInt(4)?null:da.utf8decode(t.readData(e.length-5))}return null}};Df.exports=Of});var Ff=R((t1,Bf)=>{"use strict";var Py=qo(),dt=G(),De=jo(),Iy=zf(),My=rt();function jf(e){this.files=[],this.loadOptions=e}jf.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+dt.pretty(t)+", expected "+dt.pretty(e)+")")}},isSignature:function(e,t){var i=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4),r=n===t;return this.reader.setIndex(i),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=My.uint8array?"uint8array":"array",i=dt.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(i)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e=this.zip64EndOfCentralSize-44,t=0,i,n,r;t<e;)i=this.reader.readInt(2),n=this.reader.readInt(4),r=this.reader.readData(n),this.zip64ExtensibleData[i]={id:i,length:n,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(De.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(De.CENTRAL_FILE_HEADER);)e=new Iy({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(De.CENTRAL_DIRECTORY_END);if(e<0){var t=!this.isSignature(0,De.LOCAL_FILE_HEADER);throw t?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var i=e;if(this.checkSignature(De.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===dt.MAX_VALUE_16BITS||this.diskWithCentralDirStart===dt.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===dt.MAX_VALUE_16BITS||this.centralDirRecords===dt.MAX_VALUE_16BITS||this.centralDirSize===dt.MAX_VALUE_32BITS||this.centralDirOffset===dt.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(De.ZIP64_CENTRAL_DIRECTORY_LOCATOR),e<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(De.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,De.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(De.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(De.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=i-n;if(r>0)this.isSignature(i,De.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=Py(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};Bf.exports=jf});var Uf=R((i1,Hf)=>{"use strict";var Wo=G(),pa=yi(),Oy=_i(),Dy=Ff(),zy=Ws(),Nf=un();function jy(e){return new pa.Promise(function(t,i){var n=e.decompressed.getContentWorker().pipe(new zy);n.on("error",function(r){i(r)}).on("end",function(){n.streamInfo.crc32!==e.decompressed.crc32?i(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}Hf.exports=function(e,t){var i=this;return t=Wo.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:Oy.utf8decode}),Nf.isNode&&Nf.isStream(e)?pa.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):Wo.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(n){var r=new Dy(t);return r.load(n),r}).then(function(r){var a=[pa.Promise.resolve(r)],s=r.files;if(t.checkCRC32)for(var o=0;o<s.length;o++)a.push(jy(s[o]));return pa.Promise.all(a)}).then(function(r){for(var a=r.shift(),s=a.files,o=0;o<s.length;o++){var c=s[o],l=c.fileNameStr,d=Wo.resolve(c.fileNameStr);i.file(d,c.decompressed,{binary:!0,optimizedBinaryString:!0,date:c.date,dir:c.dir,comment:c.fileCommentStr.length?c.fileCommentStr:null,unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions,createFolders:t.createFolders}),c.dir||(i.file(d).unsafeOriginalName=l)}return a.zipComment.length&&(i.comment=a.zipComment),i})}});var qf=R((n1,$f)=>{"use strict";function Ce(){if(!(this instanceof Ce))return new Ce;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new Ce;for(var t in this)typeof this[t]!="function"&&(e[t]=this[t]);return e}}Ce.prototype=vf();Ce.prototype.loadAsync=Uf();Ce.support=rt();Ce.defaults=$s();Ce.version="3.10.1";Ce.loadAsync=function(e,t){return new Ce().loadAsync(e,t)};Ce.external=yi();$f.exports=Ce});import{Application as yx}from"pixi.js";var vt={};function sr(e,t,i=!1){vt[e]||(vt[e]=[]),vt[e].push({fn:t,once:i})}function Xa(e,t){if(vt[e]){if(!t){delete vt[e];return}vt[e]=vt[e].filter(i=>i.fn!==t)}}function or(e,...t){let i=vt[e];if(i)for(let n of[...i])n.fn(...t),n.once&&Xa(e,n.fn)}function we(e,t){sr(e,t,!0)}var Q=null,Re=[],si=null;function lc(e){Q=e,Re=[],si!==null&&(clearTimeout(si),si=null)}function cc(){var e,t,i;return{endpoint:(Q==null?void 0:Q.endpoint)||"",transport:(Q==null?void 0:Q.transport)||"beacon",batchSize:(e=Q==null?void 0:Q.batchSize)!=null?e:10,flushIntervalMs:(t=Q==null?void 0:Q.flushIntervalMs)!=null?t:300,maxQueue:(i=Q==null?void 0:Q.maxQueue)!=null?i:200,debug:!!(Q!=null&&Q.debug)}}async function sc(e,t,i,n){let r=JSON.stringify(t);if(i==="beacon"&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let a=navigator.sendBeacon(e,new Blob([r],{type:"application/json"}));n&&console.log("[handler.telemetry] beacon",a,t);return}catch(a){n&&console.warn("[handler.telemetry] beacon failed, fallback to fetch",a)}try{await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:r,keepalive:!0}),n&&console.log("[handler.telemetry] fetch",t)}catch(a){n&&console.warn("[handler.telemetry] fetch failed",a)}}function Za(e,t){let i=cc();if(t&&i.endpoint){if(Re.push(e),Re.length>i.maxQueue&&(Re=Re.slice(Re.length-i.maxQueue)),Re.length>=i.batchSize){oc();return}si===null&&(si=window.setTimeout(()=>{si=null,oc()},i.flushIntervalMs))}}async function oc(){let e=cc();if(!e.endpoint||Re.length===0)return;let t=Re.splice(0,e.batchSize);await sc(e.endpoint,{events:t},e.transport,e.debug),Re.length>0&&await sc(e.endpoint,{events:Re.splice(0,e.batchSize)},e.transport,e.debug)}var _e=0,ng=_e++,dc=_e++,uc=_e++,pc=_e++,fc=_e++,hc=_e++,gc=_e++,mc=_e++,bc=_e++,vc=_e++,yc=_e++,xc=_e++,W=ng;function wc(){return W===dc}function _c(){return W===uc}function Ec(){return W===pc}function Sc(){return W===fc}function oi(){return W===hc}function li(){return W===gc}function Ac(){return W===mc}function Cc(){return W===bc}function kc(){return W===vc}function Ja(){return W===yc}function Qa(){return W===xc}function Tc(){let e=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",t=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(e==="mraid")try{mraid.getState(),W=dc;return}catch{}else if(e==="dapi")try{dapi.isReady(),W=uc;return}catch{}if(t==="facebook")try{typeof FbPlayableAd!="undefined"&&(W=pc)}catch{}else if(t==="google")try{typeof ExitApi!="undefined"&&(W=fc)}catch{}else if(t==="mintegral")window.gameReady&&(W=hc);else if(t==="tapjoy")window.TJ_API&&(W=gc);else if(t==="tiktok")window.openAppStore&&(W=mc);else if(t==="smadex")try{window.smxTracking&&(W=bc)}catch{}else if(t==="snapchat")try{window.ScPlayableAd&&(W=vc)}catch{}else t==="vungle"?W=yc:(e==="nucleo"||t==="nucleo")&&(W=xc)}import es from"lottie-web";var Lc=es;typeof window!="undefined"&&(window.lottie=es,window.__baseLottie=es);function ee(e,t){let i=(r,a)=>a===0?r:i(a,r%a),n=i(e,t);return`${e/n}:${t/n}`}var l0=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:ee(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:ee(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:ee(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:ee(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:ee(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:ee(360,780)}],c0=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:ee(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:ee(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:ee(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:ee(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:ee(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:ee(412,915)}],d0=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:ee(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:ee(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:ee(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:ee(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:ee(800,1280)}],ts=[{id:"playable-portrait",label:"Playable Portrait",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"mraid-320x480",label:"MRAID 320\xD7480",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"playable",ratio:ee(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:ee(768,1024),mraidScale:.7}];var Rc=[...ts],Pc=[{category:"playable",label:"Playable Ad",devices:ts}],is=ts[0];function ci(e){return Rc.find(t=>t.id===e)||is}function u0(e){return Rc.filter(t=>t.category===e)}var lr=class{constructor(){this.root=null;this.listContainer=null;this.searchInput=null;this.selectedId=null;this.options=null;this.retryTimer=null;this.filterMode="all"}render(){return`
3
3
  <div class="scene-panel scene-objects panel-accent-teal" data-panel="scene-objects" style="left:16px; top:72px;">
4
4
  <div class="scene-panel-header" data-panel-handle>
@@ -1296,7 +1296,7 @@ Style guidelines: ${n.summary}`;this.promptInput.value=r,this.currentPrompt=r}}c
1296
1296
  <div class="console-messages" id="console-messages"></div>
1297
1297
  </div>
1298
1298
  </div>
1299
- `,this.setupEventListeners(t),t}setupEventListeners(t){var r,a,s,o,c,l,d;let i=t.querySelector("#device-select");i==null||i.addEventListener("change",u=>{if(this.viewMode==="compare")return;let p=u.target.value;this.setDevice(p)}),Array.from(t.querySelectorAll("[data-view-toggle]")).forEach(u=>{u.addEventListener("click",()=>{let p=u.dataset.viewToggle;p&&this.setViewMode(p)})}),(r=t.querySelector("#rotate-btn"))==null||r.addEventListener("click",()=>this.toggleRotation()),(a=t.querySelector("#zoom-in-btn"))==null||a.addEventListener("click",()=>this.adjustUserZoom(.1)),(s=t.querySelector("#zoom-out-btn"))==null||s.addEventListener("click",()=>this.adjustUserZoom(-.1)),(o=t.querySelector("#refresh-btn"))==null||o.addEventListener("click",()=>this.refresh()),(c=t.querySelector("#console-toggle"))==null||c.addEventListener("click",()=>this.toggleConsole()),(l=t.querySelector("#console-close"))==null||l.addEventListener("click",()=>this.toggleConsole(!1)),(d=t.querySelector("#console-clear"))==null||d.addEventListener("click",()=>this.clearConsole())}applyDeviceFrameStyles(){Object.assign(this.frameDragger.style,{display:"flex",justifyContent:"center",alignItems:"center",transform:"translate(0px, 0px)",touchAction:"none"}),Object.assign(this.frameWrapper.style,{display:"flex",justifyContent:"center",alignItems:"center",transformOrigin:"center center",transition:"transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94)",boxShadow:"0 20px 50px rgba(0,0,0,0.5)",borderRadius:"0px",willChange:"transform"}),Object.assign(this.deviceFrame.style,{overflow:"hidden",position:"relative",borderRadius:"0px"}),Object.assign(this.gameContainer.style,{position:"relative",overflow:"hidden",minWidth:"0px",minHeight:"0px"})}setupObserversAndListeners(){this.resizeObserver=new ResizeObserver(()=>{this.resizeListenersDisabled||!this.gameReady||this.scheduleFit()}),this.resizeObserver.observe(this.previewContainer),window.addEventListener("resize",this.onWindowResize,{passive:!0})}scheduleFit(){this.rafFitHandle&&cancelAnimationFrame(this.rafFitHandle),this.rafFitHandle=requestAnimationFrame(()=>{this.rafFitHandle=null,this.fitToScreen()})}applyPresetDimensions(){let t=this.getEffectivePreset(),i=`${t.width}px`,n=`${t.height}px`;this.deviceFrame.style.width=i,this.deviceFrame.style.height=n,this.gameContainer.style.width=i,this.gameContainer.style.height=n,this.gameContainer.style.maxWidth=i,this.gameContainer.style.maxHeight=n,this.gameContainer.style.minWidth=i,this.gameContainer.style.minHeight=n,this.gameContainer.dataset.screenWidth=String(t.width),this.gameContainer.dataset.screenHeight=String(t.height),this.container.style.setProperty("--preview-screen-width",String(t.width)),this.container.style.setProperty("--preview-screen-height",String(t.height))}fitToScreen(t){if(!this.previewContainer)return;let i=this.getEffectivePreset(),n=this.getFitBounds(),r=Math.max(0,n.width),a=Math.max(0,n.height);if(r<=0||a<=0)return;this.applyPresetDimensions(),this.viewMode==="compare"&&this.applyCompareDimensions();let s=r/i.width,o=a/i.height;if(this.autoScale=Math.max(.01,Math.min(s,o)),!this.hasInitialFit){this.hasInitialFit=!0;let c=.6;this.userScaleMultiplier=c/this.autoScale}t!=null&&t.keepVisibleScale&&t.keepVisibleScale>0&&(this.userScaleMultiplier=t.keepVisibleScale/this.autoScale),this.applyTransform(),this.viewMode==="compare"&&this.fitCompareGhosts(),this.emitScreenChange()}applyTransform(){let t=this.autoScale*this.userScaleMultiplier;this.frameWrapper.style.transform=`scale(${t})`;let i=this.container.querySelector("#zoom-label");i&&(i.textContent=`${Math.round(t*100)}%`)}applyFrameDrag(){this.frameDragger.style.transform=`translate(${this.frameDragOffsetX}px, ${this.frameDragOffsetY}px)`}setupFrameDragging(){this.frameDragger.addEventListener("pointerdown",t=>{this.gameContainer.contains(t.target)||t.button===0&&(t.preventDefault(),this.frameDragActive=!0,this.frameDragStartX=t.clientX,this.frameDragStartY=t.clientY,this.frameDragOriginX=this.frameDragOffsetX,this.frameDragOriginY=this.frameDragOffsetY,window.addEventListener("pointermove",this.onFrameDragMove),window.addEventListener("pointerup",this.onFrameDragEnd))})}adjustUserZoom(t){this.userScaleMultiplier=Math.max(.1,Math.min(6,this.userScaleMultiplier+t)),this.applyTransform(),this.emitScreenChange()}toggleRotation(){var i,n;if(this.viewMode==="compare")return;let t=this.autoScale*this.userScaleMultiplier;this.isLandscape=!this.isLandscape,this.applyPresetDimensions(),this.fitToScreen({keepVisibleScale:t}),(n=(i=this.options).onDeviceChange)==null||n.call(i,this.getEffectivePreset()),this.emitScreenChange()}emitScreenChange(){if(!this.gameReady)return;let t=this.getEffectivePreset(),i={width:t.width,height:t.height,dpr:Math.max(1,Math.floor(window.devicePixelRatio||1)),presetId:t.id,isLandscape:this.isLandscape};if(window.dispatchEvent(new CustomEvent("handler-preview:screen",{detail:i})),this.viewMode==="compare"&&this.refreshCompareSnapshots(),this.isInitialized&&this.isMounted&&this.gameReady){let n=window.gameApp;if(!(n!=null&&n.renderer))return;this.ignoreNextWindowResize=!0,window.dispatchEvent(new Event("resize"))}}safeStringify(t){var n;let i=new WeakSet;try{return JSON.stringify(t,(r,a)=>{if(typeof a=="object"&&a!==null){if(i.has(a))return"[Circular]";i.add(a)}return a},2)}catch{try{if(t&&((n=t.constructor)!=null&&n.name))return`[object ${t.constructor.name}]`}catch{}return String(t)}}setupConsoleInterceptor(){let t=console.log.bind(console),i=console.warn.bind(console),n=console.error.bind(console),r=console.info.bind(console),a=(s,...o)=>{let c=o.map(d=>typeof d=="object"?this.safeStringify(d):String(d)).join(" ");this.consoleMessages.push({type:s,message:c,timestamp:new Date}),this.appendConsoleMessage(this.consoleMessages[this.consoleMessages.length-1]);let l=this.container.querySelector("#console-badge");if(l){let d=this.consoleMessages.filter(u=>u.type==="error").length;l.textContent=d>0?`${d}!`:"0",l.classList.toggle("has-errors",d>0)}};console.log=(...s)=>{t(...s),a("log",...s)},console.warn=(...s)=>{i(...s),a("warn",...s)},console.error=(...s)=>{n(...s),a("error",...s)},console.info=(...s)=>{r(...s),a("info",...s)}}appendConsoleMessage(t){let i=this.container.querySelector("#console-messages");if(!i)return;let n=document.createElement("div");n.className=`console-msg type-${t.type}`;let r=t.timestamp.toLocaleTimeString();n.innerHTML=`<span class="time">${this.escapeHtml(r)}</span> <pre>${this.escapeHtml(t.message)}</pre>`,i.appendChild(n),i.scrollTop=i.scrollHeight}escapeHtml(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}toggleConsole(t){var i;this.isConsoleOpen=t!=null?t:!this.isConsoleOpen,(i=this.consolePanel)==null||i.classList.toggle("closed",!this.isConsoleOpen)}clearConsole(){this.consoleMessages=[];let t=this.container.querySelector("#console-messages");t&&(t.innerHTML="");let i=this.container.querySelector("#console-badge");i&&(i.textContent="0")}setupCompareViewports(){Array.from(this.container.querySelectorAll("[data-viewport]")).forEach(i=>{let n=i.dataset.viewport;if(!n)return;let r=this.comparePresets.find(u=>u.id===n);if(!r)return;let a=i.querySelector("[data-compare-slot]"),s=i.querySelector("[data-compare-ghost]"),o=i.querySelector("[data-compare-wrapper]"),c=i.querySelector("[data-compare-frame]"),l=i.querySelector("[data-compare-snapshot]"),d=i.querySelector("[data-compare-focus]");!a||!s||!o||!c||(i.addEventListener("click",u=>{let p=u.target;if(p!=null&&p.closest("[data-compare-focus]")){u.preventDefault(),this.activateCompareViewport(n);return}i.classList.contains("is-active")||this.activateCompareViewport(n)}),this.compareViewports.set(n,{preset:r,root:i,slot:a,ghost:s,wrapper:o,frame:c,canvas:l,focus:d}))})}setViewMode(t){if(this.viewMode===t)return;this.viewMode=t,this.container.classList.toggle("compare-mode",t==="compare"),this.singleStage.classList.toggle("hidden",t!=="single"),this.compareStage.classList.toggle("hidden",t!=="compare");let i=this.container.querySelector("#device-select");i&&(i.disabled=t==="compare");let n=this.container.querySelector("#rotate-btn");if(n&&(n.disabled=t==="compare"),this.updateViewToggleUI(),t==="compare"){this.lastSinglePresetId=this.currentPreset.id,this.activateCompareViewport(this.activeCompareId),this.refreshCompareSnapshots(),this.startCompareSnapshots();return}this.stopCompareSnapshots(),this.singleStage.appendChild(this.frameDragger),this.setDevice(this.lastSinglePresetId,{suppressCallback:!0}),this.fitToScreen()}updateViewToggleUI(){Array.from(this.container.querySelectorAll("[data-view-toggle]")).forEach(i=>{i.classList.toggle("active",i.dataset.viewToggle===this.viewMode)})}activateCompareViewport(t){var a,s;let i=this.compareViewports.get(t);if(!i)return;let n=this.autoScale*this.userScaleMultiplier,r=this.activeCompareId;r&&r!==t&&this.captureCompareSnapshot(r),this.activeCompareId=t,this.currentPreset=i.preset,this.isLandscape=!1,i.slot.appendChild(this.frameDragger),this.frameDragOffsetX=0,this.frameDragOffsetY=0,this.applyFrameDrag(),this.compareViewports.forEach((o,c)=>{o.root.classList.toggle("is-active",c===t),o.ghost.classList.toggle("hidden",c===t),o.focus&&(o.focus.textContent=c===t?"Live":"Focus")}),this.applyPresetDimensions(),this.applyCompareDimensions(),this.fitToScreen({keepVisibleScale:n}),(s=(a=this.options).onDeviceChange)==null||s.call(a,this.getEffectivePreset())}applyCompareDimensions(){this.compareViewports.forEach(t=>{let i=t.preset,n=`${i.width}px`,r=`${i.height}px`;t.frame.style.width=n,t.frame.style.height=r,t.canvas&&(t.canvas.width=i.width,t.canvas.height=i.height)})}fitCompareGhosts(){this.compareViewports.forEach(t=>{let i=t.root.querySelector(".compare-body");if(!i)return;let n=Math.max(0,i.clientWidth-24),r=Math.max(0,i.clientHeight-24);if(n<=0||r<=0)return;let a=n/t.preset.width,s=r/t.preset.height,o=Math.max(.01,Math.min(a,s));t.wrapper.style.transform=`scale(${o})`})}captureCompareSnapshot(t){let i=this.compareViewports.get(t);if(!(i!=null&&i.canvas))return;let n=this.gameContainer.querySelector("canvas");if(!n)return;let r=i.canvas.getContext("2d");if(!r)return;let a=i.canvas.width,s=i.canvas.height,o=Math.min(a/n.width,s/n.height),c=n.width*o,l=n.height*o,d=(a-c)/2,u=(s-l)/2;r.clearRect(0,0,a,s),r.drawImage(n,d,u,c,l)}refreshCompareSnapshots(){this.compareViewports.forEach((t,i)=>{i!==this.activeCompareId&&this.captureCompareSnapshot(i)})}startCompareSnapshots(){this.compareSnapshotTimer||(this.compareSnapshotTimer=window.setInterval(()=>{this.viewMode==="compare"&&this.refreshCompareSnapshots()},500))}stopCompareSnapshots(){this.compareSnapshotTimer&&(window.clearInterval(this.compareSnapshotTimer),this.compareSnapshotTimer=null)}getFitBounds(){if(this.viewMode!=="compare")return{width:this.previewContainer.clientWidth-40,height:this.previewContainer.clientHeight-40};let t=this.compareViewports.get(this.activeCompareId),i=t==null?void 0:t.root.querySelector(".compare-body");return i?{width:i.clientWidth-24,height:i.clientHeight-24}:{width:this.previewContainer.clientWidth-40,height:this.previewContainer.clientHeight-40}}mustQuery(t){let i=this.container.querySelector(t);if(!i)throw new Error(`PreviewShell missing element: ${t}`);return i}};function Rh(e={}){let t=new xl(e);return typeof window!="undefined"&&(window.__previewShell=t),t.mount(),t}import{Sprite as ix,Container as Ph}from"pixi.js";var nx=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",wl=nx;if(typeof window!="undefined")try{let e=new XMLHttpRequest;if(e.open("GET","./build-settings.json",!1),e.send(),e.status===200&&e.responseText){let t=JSON.parse(e.responseText);t!=null&&t.buildMode&&(wl=t.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${wl}`))}}catch{}var It=class{static async create(t,i,n){var c,l,d,u,p,f,m;console.log(`[ObjectFactory] create() called for: ${t}, __BUILD_MODE__: ${wl}`);let r=(c=i==null?void 0:i.render)==null?void 0:c.asset;if(!r){console.log(`[ObjectFactory] No asset definition for: ${t}, returning empty container`);let h=new Ph;return this.applyTransform(h,i==null?void 0:i.transform),h}let a=(l=i==null?void 0:i.identity)==null?void 0:l.id;console.log(`[ObjectFactory] Calling AssetLoader.load() for: ${t}, configId: ${a}, type: ${r.type}, path: ${r.path}`);let s=await qa.load(t,r,n,a);console.log(`[ObjectFactory] AssetLoader.load() completed for: ${t}, rawAsset type: ${(d=s==null?void 0:s.constructor)==null?void 0:d.name}`);let o;if(r.type==="image")console.log("[ObjectFactory] Creating Sprite from texture:",s,"for object:",t),o=new ix(s),console.log("[ObjectFactory] Created object:",o,"type:",(u=o==null?void 0:o.constructor)==null?void 0:u.name),this.applyTransform(o,i==null?void 0:i.transform);else if(r.type==="json")if(console.log("[ObjectFactory] JSON asset for",t,"rawAsset type:",(p=s==null?void 0:s.constructor)==null?void 0:p.name,s),s&&(((f=s.constructor)==null?void 0:f.name)==="Container"||s instanceof Ph)){console.warn("[ObjectFactory] JSON asset is Container (from cache), reloading JSON directly");let h=[r.path,`/assets/${r.path}`,`assets/${r.path}`,`../assets/${r.path}`],g=!1;for(let b of h)try{let v=await fetch(b);if(v.ok){o=await v.json(),console.log("[ObjectFactory] Reloaded JSON directly from:",b,"type:",(m=o==null?void 0:o.constructor)==null?void 0:m.name),g=!0;break}}catch{continue}g||(console.error("[ObjectFactory] Failed to reload JSON from any path"),o=s)}else o=s;else o=s,o&&typeof o=="object"&&("x"in o||"position"in o)&&this.applyTransform(o,i==null?void 0:i.transform);return o}static applyTransform(t,i){var n,r,a,s;!i||!t||(i.position&&("x"in t&&"y"in t?(t.x=(n=i.position.x)!=null?n:0,t.y=(r=i.position.y)!=null?r:0):"position"in t&&t.position&&t.position.set((a=i.position.x)!=null?a:0,(s=i.position.y)!=null?s:0)),i.scale!==void 0&&"scale"in t&&t.scale&&(typeof t.scale=="object"&&"set"in t.scale?t.scale.set(i.scale):t.scale=i.scale),i.rotation!==void 0&&"rotation"in t&&(t.rotation=i.rotation),i.anchor&&"anchor"in t&&t.anchor&&Array.isArray(i.anchor)&&("set"in t.anchor?t.anchor.set(i.anchor[0],i.anchor[1]):(t.anchor.x=i.anchor[0],t.anchor.y=i.anchor[1])))}};function Ih(e){try{if(e&&typeof e.keys=="function")return Array.from(e.keys())}catch{}return[]}function Mh(e){var t;return e?((t=e.getDisplayObject)==null?void 0:t.call(e))||e.pixiObject||e:null}function rx(e,t){if(!e||!(t!=null&&t.interaction))return;let i=t.interaction,n=i.enabled!==!1&&(i.draggable===!0||i.clickable===!0);e.eventMode=n?"static":"none",e.interactive=n,n&&(e.cursor=i.draggable?"move":"pointer")}function Oh(e,t){var a,s,o,c,l;if(!e||!t)return;let i=t.transform||{};rx(e,t);let n=i.offset||i.position;n&&typeof n.x=="number"&&typeof n.y=="number"&&((a=e.position)!=null&&a.set?e.position.set(n.x,n.y):(typeof e.x=="number"&&(e.x=n.x),typeof e.y=="number"&&(e.y=n.y))),typeof i.scale=="number"&&((s=e.scale)!=null&&s.set?e.scale.set(i.scale):e.scale&&(e.scale.x=i.scale,e.scale.y=i.scale));let r=(c=i.anchor)!=null?c:(o=t.render)==null?void 0:o.anchor;r&&((l=e.anchor)!=null&&l.set)&&typeof r.x=="number"&&typeof r.y=="number"&&e.anchor.set(r.x,r.y)}function Dh(e){if(typeof window=="undefined")return;let t=e==null?void 0:e.objects,i=Ih(t);window.__editableObjectConfigs=t;let n=new Map;i.forEach(r=>n.set(r,[r])),window.__editableObjectInstances=n,window.refreshEditableConfigIndex=()=>Dh(window.__editableConfig),window.getEditableObjectList=()=>{var r;return Ih((r=window.__editableConfig)==null?void 0:r.objects)},window.getEditableObjectConfig=r=>{var a,s,o,c;return(c=(o=(s=(a=window.__editableConfig)==null?void 0:a.objects)==null?void 0:s.get)==null?void 0:o.call(s,r))!=null?c:null},window.getEditableEngineConfig=()=>{let r=window.__editableConfig;if(console.log("[BRIDGE] getEditableEngineConfig called, cfg present:",!!r),!r)return null;if(r.engine&&r.objects instanceof Map){console.log("[BRIDGE] Detected ObjectCentricConfig, flattening...");let a={...r.engine,objects:r.objects,scene:r.scene};return console.log("[BRIDGE] Returned assets:",Object.keys(a.assets||{})),a}return r}}function ax(){if(typeof window=="undefined")return;let e=i=>{let n=String(i||"").trim();return n?/^(data:|blob:|https?:)/.test(n)||n.startsWith("/")?n:`/${n.replace(/^\.\//,"")}`:""},t=async(i,n)=>{var a,s,o;let r=e(n);if(r)try{let[{Assets:c},{AssetTextures:l}]=await Promise.all([import("pixi.js"),import("./AssetTextures-AZY5VKWH.js")]),d=Date.now(),u=/^(data:|blob:)/.test(r)?r:r+(r.includes("?")?`&t=${d}`:`?t=${d}`),p=await c.load(u);if(!p)return;l[i]=p;let f=window.CustomAssets;(a=f==null?void 0:f[i])!=null&&a.texture&&(f[i].texture=p);let m=window.gameObjectManager,h=(s=m==null?void 0:m.get)==null?void 0:s.call(m,i);if(h){let g=((o=h.getDisplayObject)==null?void 0:o.call(h))||h.pixiObject||h.pixi||h;if(g!=null&&g.texture)g.texture=p;else if(g!=null&&g.children){let b=g.children.find(v=>v==null?void 0:v.texture);b!=null&&b.texture&&(b.texture=p)}}}catch(c){console.warn("[LIVE-EDIT] Failed to reload Pixi texture for",i,c)}};window.applyLiveEditOverrides=i=>{try{let n=Ya();Array.isArray(n)&&n.length&&(window.__editableConfig=i,Wa(n,{silent:!0,persist:!1}))}catch{}},window.applyEngineOverrides=i=>{try{let n=Ya();Array.isArray(n)&&n.length&&(window.__editableConfig=i,Wa(n,{silent:!0,persist:!1}))}catch{}},window.applyEditableEngineConfig=i=>{let n=window.__editableConfig;if(n!=null&&n.engine){if(i.runtime)for(let[r,a]of Object.entries(i.runtime))et({path:`runtime.${r}`,value:a},{silent:!0,persist:!0});if(i.assets)for(let[r,a]of Object.entries(i.assets))et({path:`assets.${r}`,value:a},{silent:!0,persist:!0}),typeof a=="string"&&t(r,a);if(i.splash)for(let[r,a]of Object.entries(i.splash))et({path:`splash.${r}`,value:a},{silent:!0,persist:!0});i.runtime&&Object.assign(n.engine.runtime,i.runtime),i.assets&&Object.assign(n.engine.assets,i.assets),i.splash&&Object.assign(n.engine.splash,i.splash)}}}function _l(e){let{getConfig:t,gameObjectManager:i,onObjectConfigApplied:n}=e;i&&(i.onObjectRebuildRequired=async(a,s)=>{console.log(`[LIVE-EDIT] \u{1F3D7}\uFE0F Rebuilding object ${a} due to type change...`);let o=i.get(a),c=o==null?void 0:o.pixiObject,l=c==null?void 0:c.parent,d=l==null?void 0:l.children.indexOf(c);o?i.remove(a):c&&c.destroy();let u=window.gameApp,p=await It.create(a,s,u);l&&(d!==void 0&&d!==-1?l.addChildAt(p,d):l.addChild(p));let f=i.create(a,p);return console.log(`[LIVE-EDIT] \u2705 Rebuild complete for ${a}`),f}),typeof window!="undefined"&&(ax(),window.applyEditableObjectConfig=(a,s)=>{var o,c,l;console.log("[LIVE-EDIT] \u{1F504} applyEditableObjectConfig called for:",a);try{let d=window.__editableConfig;(o=d==null?void 0:d.objects)!=null&&o.set&&(d.objects.set(a,s),console.log("[LIVE-EDIT] \u2705 Updated config in __editableConfig"));let u=(c=i==null?void 0:i.get)==null?void 0:c.call(i,a);if(console.log("[LIVE-EDIT] gameObject found?",!!u),u&&(console.log("[LIVE-EDIT] gameObject type:",(l=u.constructor)==null?void 0:l.name),console.log("[LIVE-EDIT] has updateConfig?",typeof u.updateConfig=="function"),console.log("[LIVE-EDIT] has onConfigUpdate?",typeof u.onConfigUpdate=="function")),u&&typeof u.updateConfig=="function")console.log("[LIVE-EDIT] \u2705 Calling updateConfig()"),u.updateConfig(s);else if(u&&typeof u.onConfigUpdate=="function")console.log("[LIVE-EDIT] \u2705 Calling onConfigUpdate()"),u.onConfigUpdate();else{console.log("[LIVE-EDIT] \u26A0\uFE0F No updateConfig or onConfigUpdate, applying transform directly");let p=Mh(u);Oh(p,s)}}catch(d){console.error("[LIVE-EDIT] \u274C Error in applyEditableObjectConfig:",d)}});let r={async applyObjectConfig(a,s){var d,u;console.log("[BRIDGE] \u{1F504} applyObjectConfig called for:",a);let o=t();(d=o==null?void 0:o.objects)!=null&&d.set&&(o.objects.set(a,s),console.log("[BRIDGE] \u2705 Updated config"));let c=(u=i==null?void 0:i.get)==null?void 0:u.call(i,a);if(console.log("[BRIDGE] gameObject found?",!!c),c&&(console.log("[BRIDGE] has updateConfig?",typeof c.updateConfig=="function"),console.log("[BRIDGE] has onConfigUpdate?",typeof c.onConfigUpdate=="function")),c&&typeof c.updateConfig=="function")console.log("[BRIDGE] \u2705 Calling updateConfig()"),c.updateConfig(s);else if(c&&typeof c.onConfigUpdate=="function")console.log("[BRIDGE] \u2705 Calling onConfigUpdate()"),c.onConfigUpdate();else{console.log("[BRIDGE] \u26A0\uFE0F Applying transform directly");let p=Mh(c);Oh(p,s)}let l=[a];n==null||n(a,s,l)},rebuildIndexes(){let a=t();typeof window!="undefined"&&(window.__editableConfig=a,Dh(a))}};return r.rebuildIndexes(),r}import sx from"lottie-web";Cl(Lc);typeof window!="undefined"&&!window.lottie&&(window.lottie=sx);var Hi=null,ox=async()=>{if(!Hi){let e=typeof window!="undefined"?window.INLINE_ASSETS:null,t=(e==null?void 0:e["handler.config"])||(e==null?void 0:e["handler.config.json"]);if(t)try{if(t.startsWith("data:")){let n=atob(t.split(",")[1]);Hi=JSON.parse(n)}else Hi=JSON.parse(t);return Hi}catch(n){console.warn("[CONFIG] Failed to parse inline handler.config.json:",n)}Hi=await(await fetch("./handler.config.json")).json()}return Hi},kl,Hn,Bh,Ui,Sl,Al;function q_(e){kl=e.initGame,Hn=e.CustomAssets,Bh=e.updateScreenState,Ui=e.globalResponsiveMultipliers,Sl=e.layout,Al=e.clearResponsiveElements}var Ca="web_embed",Nn="https://example.com",zh={profile_id:Ca},Mt=null,Ve=null,El={width:0,height:0},lx=!0,G_=async()=>{var c,l,d,u;document.title="Handler Pixi Game";let e=await ox();zh={...e.ids||{},profile_id:Ca},Nn=e.destination_url||((l=(c=e.export_profiles)==null?void 0:c[Ca])==null?void 0:l.destination_url)||Nn,pt.init({ids:zh,profile:Ca,destinationUrl:Nn});let t=pt.getRoot();if(typeof __PREVIEW_SHELL__!="undefined"&&__PREVIEW_SHELL__){console.log("[BOOTSTRAP] Initializing Preview Shell..."),Ve=Rh({onDeviceChange:f=>{console.log(`[PREVIEW] Device switched to ${f.width}x${f.height}, restarting game...`),jh()},onRefresh:jh});let p=Ve.getGameContainer();p&&(t=p),window.addEventListener("handler-preview:screen",f=>{var v,y,x,w,T,C,S,L,M,_,E;let m=window.gameApp,h=window.gameObjectManager,{width:g,height:b}=f.detail;if(El.width=g,El.height=b,Bh(g,b),!(!m||!m.renderer)){h&&s(m,h);try{m.renderer.resize(g,b);let A=m.view;A&&(A.style.width="100%",A.style.height="100%",A.style.display="block")}catch(A){console.warn("[SCREEN] Error resizing renderer:",A);return}if(i&&h&&Sl)try{let A=(v=window.__mainContainer)!=null?v:m.stage,P=(S=(C=(w=window.__tutorialLabel)!=null?w:(x=(y=h.get("label_1"))==null?void 0:y.getDisplayObject)==null?void 0:x.call(y))!=null?C:(T=h.get("label_1"))==null?void 0:T.pixiObject)!=null?S:h.get("label_1"),I=h.get("background_1"),k=(E=(_=(M=window.__background)!=null?M:(L=I==null?void 0:I.getDisplayObject)==null?void 0:L.call(I))!=null?_:I==null?void 0:I.pixiObject)!=null?E:I;if(A){let D=A===m.stage;Sl({mainContainer:A,label:P,background:k,backgroundTexture:(k==null?void 0:k.texture)||null,app:m},i,0,El,h,{skipMainContainerTransform:D})}}catch(A){console.warn("[SCREEN] Error in layout:",A)}}})}let i=await ar("scene.main");window.__editableConfig=i,window.__editableConfigBaseline||(window.__editableConfigBaseline=Va(i),console.log("[BOOTSTRAP] Frozen config baseline for persistence")),(u=(d=i.engine.runtime)==null?void 0:d.layout)!=null&&u.design_width_portrait||(console.warn("[BOOTSTRAP] Config layout missing, retrying..."),await new Promise(p=>setTimeout(p,100)),i=await ar("scene.main"));let n=await kl(t,i,Nn,Ve);Mt=n.app;let r=n.gameObjectManager;window.gameApp=Mt,window.gameObjectManager=r;try{window.__liveEditBridge=_l({getConfig:()=>window.__editableConfig,gameObjectManager:r,assets:Hn})}catch(p){console.warn("[BOOTSTRAP] Failed to initialize live-edit bridge",p)}Ve&&Ve.notifyGameLoaded();let a=window.__debugScale;a&&typeof a=="number"&&(Ui.scale=a,console.log(`[DEBUG] Applied persisted debug scale: ${a}`)),s(Mt,r);function s(p,f){if(lx){console.log("[RESPONSIVE] Skipping global scaling; using config-driven layout");return}if(console.log("[RESPONSIVE] ===== APPLYING GLOBAL RESPONSIVE SCALING ====="),console.log(`[RESPONSIVE] Scale multiplier: ${Ui.scale.toFixed(3)}`),p.stage){let h=function(g,b=0){if(!g||!g.children)return;let v=" ".repeat(b);g.children.forEach((y,x)=>{if(y&&y.zIndex===9999){console.log(`${v}[RESPONSIVE] Skipping debug border (zIndex 9999)`);return}if(y&&y.scale){let w=y.scale.x||1,T=y.scale.y||1;y.__originalScale||(y.__originalScale={x:w,y:T},console.log(`${v}[RESPONSIVE] Stored original scale for child[${x}]: ${w.toFixed(3)}, ${T.toFixed(3)}`));let C=y.__originalScale.x*Ui.scale,S=y.__originalScale.y*Ui.scale;typeof y.scale.set=="function"?y.scale.set(C,S):(y.scale.x=C,y.scale.y=S),console.log(`${v}[RESPONSIVE] Child[${x}] scale: ${w.toFixed(3)}\u2192${y.scale.x.toFixed(3)} (type: ${y.constructor.name})`),h(y,b+1)}else y&&console.log(`${v}[RESPONSIVE] Child[${x}] has no scale (type: ${y.constructor.name})`)})};var m=h;console.log("[RESPONSIVE] Applying scale to PIXI stage children"),h(p.stage)}else console.warn("[RESPONSIVE] No app.stage found!");console.log("[REDDEBUG] Debug border left unscaled (fixed boundaries)"),console.log("[RESPONSIVE] ===== GLOBAL RESPONSIVE SCALING COMPLETE =====")}function o(p){if(p!==void 0){Ui.scale=p,console.log(`[RESPONSIVE] Updated global scale multiplier to: ${p.toFixed(3)}`);let f=window.gameApp,m=window.gameObjectManager;f&&m?(s(f,m),f.renderer&&(f.renderer.render(f.stage),console.log("[RESPONSIVE] Forced PIXI renderer update"))):console.warn(`[RESPONSIVE] No gameApp (${!!f}) or gameObjectManager (${!!m}) found in window for live update`)}}window.updateGlobalResponsiveMultipliers=o,pt.start()},jh=async()=>{var t,i,n,r;console.log("[PREVIEW] Restarting game in 1 seconds...");let e=(t=window.gameObjectManager)==null?void 0:t.get("character_1");if(e){let a=((i=e.getDisplayObject)==null?void 0:i.call(e))||e;a&&a.scale&&console.log(`[CHARACTER] Before restart - Current scale - x: ${((n=a.scale.x)!=null?n:1).toFixed(3)}, y: ${((r=a.scale.y)!=null?r:1).toFixed(3)}`)}if(Ve){Ve.notifyGameDestroyed();try{Al&&Al()}catch(a){console.warn("Failed to clear responsive elements",a)}setTimeout(()=>{console.log("[PREVIEW] Executing restart...");let a=Ve.getGameContainer(),s=window.gameObjectManager;if(s&&typeof s.clear=="function"&&(console.log("[PREVIEW] Clearing old GameObjectManager tickers..."),s.clear()),Mt){try{Mt.destroy(!0,{children:!0,texture:!1})}catch(o){console.warn("[PREVIEW] Destroy warning:",o)}Mt=null}window.gameApp=null,window.gameObjectManager=null,a&&(a.innerHTML="");try{typeof Hn.resetScene=="function"&&Hn.resetScene()}catch(o){console.warn("Asset reset failed",o)}setTimeout(()=>{ar("scene.main").then(o=>{window.__editableConfig=o,window.__editableConfigBaseline||(window.__editableConfigBaseline=Va(o)),kl(a,o,Nn).then(c=>{Mt=c.app,window.gameApp=Mt,window.gameObjectManager=c.gameObjectManager;try{window.__liveEditBridge=_l({getConfig:()=>window.__editableConfig,gameObjectManager:window.gameObjectManager,assets:Hn})}catch(l){console.warn("[BOOTSTRAP] Failed to re-initialize live-edit bridge",l)}Ve&&Ve.notifyGameLoaded(),console.log("[PREVIEW] Game restarted successfully");try{pt.start()}catch{}})})},100)},1e3)}};var Tl="0.3.1",cx=new Set(["init","boot","view","ready","start","pause","resume","complete","error","engagement","first_interaction","retry","cta_show","cta_click","cta_dismiss","clickout","conversion","session_time","level_time","load_time","level_start","level_complete","level_fail","checkpoint","reward","tutorial_start","tutorial_complete","tutorial_skip","ab_assign","fps","memory","asset_load_start","asset_load_complete"]),Gh={mechanic_id:"TODO_mechanic_id",variant_id:"TODO_variant_id",deployment_id:"TODO_deployment_id",export_id:"TODO_export_id",profile_id:"TODO_profile_id",instance_id:"default"},Wh=Math.random().toString(36).slice(2),Gi=null,$i={...Gh},Yh="web_embed",Il={},$n,Ll=!1,Un=!1,Gn=!1,Vh=!1,zl=1,Ta=0,Pa=!1,ft=!1,qi="",Wi=Math.floor(window.innerWidth),Yi=Math.floor(window.innerHeight),Ml=Wi>Yi,ht=!1,qn=!1,Fh=!1,Nh=!1,Rl=!1,La=null,Qt=null,Ol=!1,Dl=!1,ka=new Map;function Kh(){if(!Qt)return null;let e=Date.now()-Qt;return!Number.isFinite(e)||e<0?null:e}function Pl(e){if(Ol)return;let t=Kh();t!==null&&(Ol=!0,O("session_time",{duration_ms:t,reason:e}))}function Hh(){if(Gi)return Gi;let e=document.createElement("div");return e.id="handler-root",e.setAttribute("data-handler-root","true"),document.body.appendChild(e),Gi=e,e}function Ra(e){switch(e){case"interaction":return"engagement";case"finish":return"complete";case"install":return"cta_click";default:return e}}function Xh(e,t){return{event_name:e,ts:Date.now(),session_id:Wh,deployment_id:$i.deployment_id,variant_id:$i.variant_id,export_profile_id:$i.profile_id,instance_id:$i.instance_id||"default",env:Yh==="mraid"?"mraid":"web",attribution:$n,payload:t}}function O(e,t){let i=Ra(e),n=Xh(i,t);Za(n,!!Il.analytics),or(i,n),i!==e&&or(e,n)}function Wn(){La&&(La(Wi,Yi),La=null)}function Vi(e){zl=e,O("volume",e)}function Ki(e){e&&(Vh=!0),!Gn&&(Gn=!0,O("pause"),Vi(0))}function Yn(e){!e&&Vh||Gn&&(Gn=!1,O("resume"),Vi(zl))}function Ot(e,t){Wi=Math.floor(e||window.innerWidth),Yi=Math.floor(t||window.innerHeight),Ml=Wi>Yi,O("resize",{width:Wi,height:Yi})}function dx(){if(wc())try{let e=mraid.getMaxSize();Ot(e.width,e.height);let t=()=>{mraid.isViewable()&&mraid.getState()!=="hidden"?Yn():Ki()};if(mraid.addEventListener("viewableChange",t),mraid.addEventListener("stateChange",t),mraid.addEventListener("sizeChange",()=>{let i=mraid.getMaxSize();Ot(i.width,i.height)}),mraid.getAudioVolume){let i=mraid.getAudioVolume();Vi(i?1:0)}if(mraid.addEventListener("audioVolumeChange",i=>{i!==null&&Vi(i>0?1:0)}),mraid.addEventListener("error",(i,n)=>{console.warn("mraid error:",i,"action:",n)}),Pa=!0,mraid.isViewable()&&mraid.getState()!=="hidden")ht=!0,O("boot"),O("view"),O("ready"),ft=!0,Wn();else{let i=()=>{ht=!0,O("boot"),O("view"),O("ready"),ft=!0,Wn()};mraid.addEventListener("ready",i)}}catch(e){console.warn("MRAID hook skipped",e)}}function ux(){if(_c())try{let e=dapi.getScreenSize();Ot(e.width,e.height),dapi.addEventListener("viewableChange",i=>{i.isViewable?Yn():Ki()}),dapi.addEventListener("adResized",i=>{let n=dapi.getScreenSize();Ot(i.width||n.width,i.height||n.height)});let t=dapi.getAudioVolume();if(Vi(t?1:0),dapi.addEventListener("audioVolumeChange",i=>Vi(i?1:0)),Pa=!0,dapi.isViewable())ht=!0,O("boot"),O("view"),O("ready"),ft=!0,Wn();else{let i=()=>{ht=!0,O("boot"),O("view"),O("ready"),ft=!0,Wn()};dapi.addEventListener("ready",i)}}catch(e){console.warn("DAPI hook skipped",e)}}function Uh(){let e=()=>{ht||document.visibilityState==="visible"&&(document.readyState==="complete"||document.readyState==="interactive")&&(ht=!0,O("boot"),O("view"),O("ready"),ft=!0,Wn(),qn&&(qn=!1,Ke.start()))};window.addEventListener("resize",()=>Ot()),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?(Yn(),e()):Ki()}),document.readyState==="complete"||document.readyState==="interactive"?e():window.addEventListener("load",e),Pa=!0}function px(){let e=t=>{typeof TouchEvent!="undefined"&&t instanceof TouchEvent&&(Fh=!0),!(Fh&&t instanceof MouseEvent)&&(Ta+=1,Dl||(Dl=!0,O("first_interaction",{count:Ta})),O("interaction",Ta))};document.addEventListener("mousedown",e),document.addEventListener("touchstart",e)}function $h(e){var n,r,a,s,o,c,l,d,u,p,f,m;let t=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none";if((typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed")==="google")try{(n=window.ExitApi)==null||n.exit();return}catch{}if(t==="mraid"&&typeof mraid!="undefined")mraid.open(e||"");else if(t==="dapi"&&typeof dapi!="undefined")dapi.openStoreUrl();else if(li())(a=(r=window.TJ_API)==null?void 0:r.click)==null||a.call(r);else if(Ec())(o=(s=window.FbPlayableAd)==null?void 0:s.onCTAClick)==null||o.call(s);else if(kc())(l=(c=window.ScPlayableAd)==null?void 0:c.onCTAClick)==null||l.call(c);else if(Cc())try{(u=(d=window.smxTracking)==null?void 0:d.redirect)==null||u.call(d)}catch(h){console.warn("Smadex redirect failed",h)}else if(Sc()){let h=window.ExitApi;h&&typeof h.exit=="function"?h.exit(e||qi||""):e&&window.open(e)}else oi()?(p=window.install)==null||p.call(window):Ac()?(f=window.openAppStore)==null||f.call(window):Ja()?(m=parent==null?void 0:parent.postMessage)==null||m.call(parent,"download","*"):e&&window.open(e)}function fx(){let e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed",t=i=>{if(!i)return;let n=new Image;n.src=i};if(e==="bigabid"){let i=window.BIGABID_BIDTIMEMACROS;if(!i)return;we("view",()=>t(i.mraid_viewable)),we("start",()=>t(i.game_viewable)),we("engagement",()=>t(i.engagement));let n=()=>t(i.complete);we("complete",n),sr("engagement",r=>{var a;((a=r==null?void 0:r.payload)==null?void 0:a.count)>3&&n()}),we("cta_click",()=>t(i.click))}else if(e==="inmobi"){let i=window.INMOBI_DSPMACROS;if(!i)return;we("view",()=>t(i.Ad_Load_Start)),we("start",()=>t(i.Ad_Viewable)),we("engagement",()=>t(i.First_Engagement)),we("complete",()=>t(i.Gameplay_Complete)),we("cta_click",()=>t(i.DSP_Click)),we("start",()=>{[5,10,15,20,25,30].forEach(n=>setTimeout(()=>t(i[`Spent_${n}_Seconds`]),n*1e3))})}}function hx(){if(!li())return;let e=window.TJ_API;e&&e.setPlayableAPI&&e.setPlayableAPI({skipAd:()=>{try{Ke.finish()}catch(t){console.warn("Tapjoy skip failed",t)}}})}function qh(){var t,i,n;let e=window.TJ_API;(t=e==null?void 0:e.objectiveComplete)==null||t.call(e),(i=e==null?void 0:e.playableFinished)==null||i.call(e),(n=e==null?void 0:e.gameplayFinished)==null||n.call(e)}function gx(){oi()&&(window.mintGameStart=()=>{Yn(!0),Ot()},window.mintGameClose=()=>{Ki(!0)})}function mx(){if(!Qa())return;let e=window.NUC;!e||!e.trigger||(Ke.on("cta_click",()=>{var t,i;return(i=(t=e.trigger).convert)==null?void 0:i.call(t,qi)}),Ke.on("complete",()=>{var t,i;return(i=(t=e.trigger).tryAgain)==null?void 0:i.call(t)}))}var Ke={init(e={},t){var i;if(Yh=e.profile||"web_embed",Il=e.consent||{},$i={...Gh,...e.ids||{}},Gi=e.rootEl||Gi,$n=void 0,lc((i=e.telemetry)!=null&&i.endpoint?e.telemetry:null),Qt=null,Ol=!1,Dl=!1,ka.clear(),qi=e.destinationUrl||(/android/i.test(navigator.userAgent)?"https://play.google.com/store":"https://www.apple.com/app-store/"),t&&(La=t),O("init"),document.body.oncontextmenu=()=>!1,Hh(),vx(Gi),Tc(),dx(),ux(),!Pa){if(document.readyState==="complete")Uh();else if(!Nh){Nh=!0;let n=()=>{Uh(),window.removeEventListener("load",n),document.removeEventListener("DOMContentLoaded",n)};window.addEventListener("load",n),document.addEventListener("DOMContentLoaded",n)}}px(),fx(),hx(),gx(),mx(),console.log(`%c @handler/playable-sdk %c v${Tl} `,"background: #007acc; color: #fff; font-size: 14px; padding: 4px 8px; border-top-left-radius: 4px; border-bottom-left-radius: 4px;","background: #e1e4e8; color: #333; font-size: 14px; padding: 4px 8px; border-top-right-radius: 4px; border-bottom-right-radius: 4px;"),ht&&!ft&&(O("boot"),O("view"),O("ready"),qn&&(qn=!1,Ke.start()),ft=!0),ft=ht},getRoot(){return Hh()},get version(){return Tl},get maxWidth(){return Wi},get maxHeight(){return Yi},get isLandscape(){return Ml},get isReady(){return ft},get isStarted(){return Ll},get isPaused(){return Gn},get isFinished(){return Un},get volume(){return zl},get interactions(){return Ta},on(e,t){sr(Ra(e),t)},off(e,t){Xa(Ra(e),t)},start(){var e,t;if(!Ll){if(!ht){qn=!0;return}if(Ll=!0,Qt||(Qt=Date.now()),O("start"),Ot(),oi())Ki(),(e=window.gameReady)==null||e.call(window);else if(li()){let i=window.TJ_API;(t=i==null?void 0:i.setPlayableBuild)==null||t.call(i,{orientation:Ml?"landscape":"portrait",buildID:Tl})}}},finish(){var e,t;Un||(Un=!0,O("complete"),Pl("complete"),oi()?(e=window.gameEnd)==null||e.call(window):Ja()?(t=parent==null?void 0:parent.postMessage)==null||t.call(parent,"complete","*"):li()&&qh())},install(e){if(!Un){Un=!0,li()?(qh(),setTimeout(()=>Ke.install(e),300)):(O("complete"),setTimeout(()=>Ke.install(e),0));return}Rl||(Rl=!0,setTimeout(()=>Rl=!1,500),O("cta_click"),O("conversion"),Pl("cta"),$h(e||qi))},emit(e,t){let i=Ra(e);if(!cx.has(i)&&i!=="resize"&&i!=="volume"&&!i.startsWith("custom."))throw new Error(`Event ${e} must be canonical or namespaced as custom.<mechanic_id>.<event>`);let n=Xh(i,t);Za(n,!!Il.analytics),or(i,n)},gameStart(){Ke.start()},gameEnd(){Ke.finish()},ctaClick(e,t){O("cta_click",{url:e||qi,manual:!0}),(t==null?void 0:t.open)!==!1&&$h(e||qi)},ctaShow(e){O("cta_show",e)},ctaDismiss(e){O("cta_dismiss",e)},getGameTimeMs(){return Kh()},endSession(e="manual"){Pl(e)},setAttribution(e){$n=e},abTest(e,t){if(!e)throw new Error("abTest requires experimentId");if(!Array.isArray(t)||t.length<2)throw new Error("abTest requires at least 2 variants");let i=Math.abs(bx(`${Wh}:${e}`))%t.length,n=t[i];return $n={...$n||{},experiment_id:e},$i.variant_id=n,O("ab_assign",{experiment_id:e,variant_id:n}),n},levelStart(e,t){Qt||(Qt=Date.now()),O("level_start",{level_id:e,...t})},levelComplete(e,t){O("level_complete",{level_id:e,...t})},levelFail(e,t){O("level_fail",{level_id:e,...t})},checkpoint(e,t){O("checkpoint",{checkpoint_id:e,...t})},reward(e,t){O("reward",{reward_id:e,...t})},tutorialStart(e,t){O("tutorial_start",{step_id:e,...t})},tutorialComplete(e,t){O("tutorial_complete",{step_id:e,...t})},tutorialSkip(e,t){O("tutorial_skip",{step_id:e,...t})},timerStart(e){e&&ka.set(e,Date.now())},timerEnd(e,t="custom",i){if(!e)return;let n=ka.get(e);if(!n)return;ka.delete(e);let r=Date.now()-n;if(!(!Number.isFinite(r)||r<0)){if(t==="custom"){O("engagement",{action:"timer",key:e,duration_ms:r,...i});return}O(t,{key:e,duration_ms:r,...i})}},fps(e,t){O("fps",{value:e,...t})},memory(e,t){O("memory",{bytes:e,...t})},assetLoadStart(e,t){O("asset_load_start",{asset_id:e,...t})},assetLoadComplete(e,t){O("asset_load_complete",{asset_id:e,...t})},reportError(e,t,i){O("error",{code:e,message:t,...i})},retry(){var e,t,i;if(oi())(e=window.gameRetry)==null||e.call(window);else if(Qa()){let n=window.NUC;(i=(t=n==null?void 0:n.trigger)==null?void 0:t.tryAgain)==null||i.call(t)}O("engagement",{action:"retry"})},pause(){Ki(!0)},resume(){Yn(!0)},resize(e,t){Ot(e,t)}},pt=Ke;function bx(e){let t=2166136261;for(let i=0;i<e.length;i++)t^=e.charCodeAt(i),t=Math.imul(t,16777619);return t|0}function vx(e){let t=document.createElement("script");t.type="text/javascript",t.textContent=`
1299
+ `,this.setupEventListeners(t),t}setupEventListeners(t){var r,a,s,o,c,l,d;let i=t.querySelector("#device-select");i==null||i.addEventListener("change",u=>{if(this.viewMode==="compare")return;let p=u.target.value;this.setDevice(p)}),Array.from(t.querySelectorAll("[data-view-toggle]")).forEach(u=>{u.addEventListener("click",()=>{let p=u.dataset.viewToggle;p&&this.setViewMode(p)})}),(r=t.querySelector("#rotate-btn"))==null||r.addEventListener("click",()=>this.toggleRotation()),(a=t.querySelector("#zoom-in-btn"))==null||a.addEventListener("click",()=>this.adjustUserZoom(.1)),(s=t.querySelector("#zoom-out-btn"))==null||s.addEventListener("click",()=>this.adjustUserZoom(-.1)),(o=t.querySelector("#refresh-btn"))==null||o.addEventListener("click",()=>this.refresh()),(c=t.querySelector("#console-toggle"))==null||c.addEventListener("click",()=>this.toggleConsole()),(l=t.querySelector("#console-close"))==null||l.addEventListener("click",()=>this.toggleConsole(!1)),(d=t.querySelector("#console-clear"))==null||d.addEventListener("click",()=>this.clearConsole())}applyDeviceFrameStyles(){Object.assign(this.frameDragger.style,{display:"flex",justifyContent:"center",alignItems:"center",transform:"translate(0px, 0px)",touchAction:"none"}),Object.assign(this.frameWrapper.style,{display:"flex",justifyContent:"center",alignItems:"center",transformOrigin:"center center",transition:"transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94)",boxShadow:"0 20px 50px rgba(0,0,0,0.5)",borderRadius:"0px",willChange:"transform"}),Object.assign(this.deviceFrame.style,{overflow:"hidden",position:"relative",borderRadius:"0px"}),Object.assign(this.gameContainer.style,{position:"relative",overflow:"hidden",minWidth:"0px",minHeight:"0px"})}setupObserversAndListeners(){this.resizeObserver=new ResizeObserver(()=>{this.resizeListenersDisabled||!this.gameReady||this.scheduleFit()}),this.resizeObserver.observe(this.previewContainer),window.addEventListener("resize",this.onWindowResize,{passive:!0})}scheduleFit(){this.rafFitHandle&&cancelAnimationFrame(this.rafFitHandle),this.rafFitHandle=requestAnimationFrame(()=>{this.rafFitHandle=null,this.fitToScreen()})}applyPresetDimensions(){let t=this.getEffectivePreset(),i=`${t.width}px`,n=`${t.height}px`;this.deviceFrame.style.width=i,this.deviceFrame.style.height=n,this.gameContainer.style.width=i,this.gameContainer.style.height=n,this.gameContainer.style.maxWidth=i,this.gameContainer.style.maxHeight=n,this.gameContainer.style.minWidth=i,this.gameContainer.style.minHeight=n,this.gameContainer.dataset.screenWidth=String(t.width),this.gameContainer.dataset.screenHeight=String(t.height),this.container.style.setProperty("--preview-screen-width",String(t.width)),this.container.style.setProperty("--preview-screen-height",String(t.height))}fitToScreen(t){if(!this.previewContainer)return;let i=this.getEffectivePreset(),n=this.getFitBounds(),r=Math.max(0,n.width),a=Math.max(0,n.height);if(r<=0||a<=0)return;this.applyPresetDimensions(),this.viewMode==="compare"&&this.applyCompareDimensions();let s=r/i.width,o=a/i.height;if(this.autoScale=Math.max(.01,Math.min(s,o)),!this.hasInitialFit){this.hasInitialFit=!0;let c=.6;this.userScaleMultiplier=c/this.autoScale}t!=null&&t.keepVisibleScale&&t.keepVisibleScale>0&&(this.userScaleMultiplier=t.keepVisibleScale/this.autoScale),this.applyTransform(),this.viewMode==="compare"&&this.fitCompareGhosts(),this.emitScreenChange()}applyTransform(){let t=this.autoScale*this.userScaleMultiplier;this.frameWrapper.style.transform=`scale(${t})`;let i=this.container.querySelector("#zoom-label");i&&(i.textContent=`${Math.round(t*100)}%`)}applyFrameDrag(){this.frameDragger.style.transform=`translate(${this.frameDragOffsetX}px, ${this.frameDragOffsetY}px)`}setupFrameDragging(){this.frameDragger.addEventListener("pointerdown",t=>{this.gameContainer.contains(t.target)||t.button===0&&(t.preventDefault(),this.frameDragActive=!0,this.frameDragStartX=t.clientX,this.frameDragStartY=t.clientY,this.frameDragOriginX=this.frameDragOffsetX,this.frameDragOriginY=this.frameDragOffsetY,window.addEventListener("pointermove",this.onFrameDragMove),window.addEventListener("pointerup",this.onFrameDragEnd))})}adjustUserZoom(t){this.userScaleMultiplier=Math.max(.1,Math.min(6,this.userScaleMultiplier+t)),this.applyTransform(),this.emitScreenChange()}toggleRotation(){var i,n;if(this.viewMode==="compare")return;let t=this.autoScale*this.userScaleMultiplier;this.isLandscape=!this.isLandscape,this.applyPresetDimensions(),this.fitToScreen({keepVisibleScale:t}),(n=(i=this.options).onDeviceChange)==null||n.call(i,this.getEffectivePreset()),this.emitScreenChange()}emitScreenChange(){if(!this.gameReady)return;let t=this.getEffectivePreset(),i={width:t.width,height:t.height,dpr:Math.max(1,Math.floor(window.devicePixelRatio||1)),presetId:t.id,isLandscape:this.isLandscape};if(window.dispatchEvent(new CustomEvent("handler-preview:screen",{detail:i})),this.viewMode==="compare"&&this.refreshCompareSnapshots(),this.isInitialized&&this.isMounted&&this.gameReady){let n=window.gameApp;if(!(n!=null&&n.renderer))return;this.ignoreNextWindowResize=!0,window.dispatchEvent(new Event("resize"))}}safeStringify(t){var n;let i=new WeakSet;try{return JSON.stringify(t,(r,a)=>{if(typeof a=="object"&&a!==null){if(i.has(a))return"[Circular]";i.add(a)}return a},2)}catch{try{if(t&&((n=t.constructor)!=null&&n.name))return`[object ${t.constructor.name}]`}catch{}return String(t)}}setupConsoleInterceptor(){let t=console.log.bind(console),i=console.warn.bind(console),n=console.error.bind(console),r=console.info.bind(console),a=(s,...o)=>{let c=o.map(d=>typeof d=="object"?this.safeStringify(d):String(d)).join(" ");this.consoleMessages.push({type:s,message:c,timestamp:new Date}),this.appendConsoleMessage(this.consoleMessages[this.consoleMessages.length-1]);let l=this.container.querySelector("#console-badge");if(l){let d=this.consoleMessages.filter(u=>u.type==="error").length;l.textContent=d>0?`${d}!`:"0",l.classList.toggle("has-errors",d>0)}};console.log=(...s)=>{t(...s),a("log",...s)},console.warn=(...s)=>{i(...s),a("warn",...s)},console.error=(...s)=>{n(...s),a("error",...s)},console.info=(...s)=>{r(...s),a("info",...s)}}appendConsoleMessage(t){let i=this.container.querySelector("#console-messages");if(!i)return;let n=document.createElement("div");n.className=`console-msg type-${t.type}`;let r=t.timestamp.toLocaleTimeString();n.innerHTML=`<span class="time">${this.escapeHtml(r)}</span> <pre>${this.escapeHtml(t.message)}</pre>`,i.appendChild(n),i.scrollTop=i.scrollHeight}escapeHtml(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}toggleConsole(t){var i;this.isConsoleOpen=t!=null?t:!this.isConsoleOpen,(i=this.consolePanel)==null||i.classList.toggle("closed",!this.isConsoleOpen)}clearConsole(){this.consoleMessages=[];let t=this.container.querySelector("#console-messages");t&&(t.innerHTML="");let i=this.container.querySelector("#console-badge");i&&(i.textContent="0")}setupCompareViewports(){Array.from(this.container.querySelectorAll("[data-viewport]")).forEach(i=>{let n=i.dataset.viewport;if(!n)return;let r=this.comparePresets.find(u=>u.id===n);if(!r)return;let a=i.querySelector("[data-compare-slot]"),s=i.querySelector("[data-compare-ghost]"),o=i.querySelector("[data-compare-wrapper]"),c=i.querySelector("[data-compare-frame]"),l=i.querySelector("[data-compare-snapshot]"),d=i.querySelector("[data-compare-focus]");!a||!s||!o||!c||(i.addEventListener("click",u=>{let p=u.target;if(p!=null&&p.closest("[data-compare-focus]")){u.preventDefault(),this.activateCompareViewport(n);return}i.classList.contains("is-active")||this.activateCompareViewport(n)}),this.compareViewports.set(n,{preset:r,root:i,slot:a,ghost:s,wrapper:o,frame:c,canvas:l,focus:d}))})}setViewMode(t){if(this.viewMode===t)return;this.viewMode=t,this.container.classList.toggle("compare-mode",t==="compare"),this.singleStage.classList.toggle("hidden",t!=="single"),this.compareStage.classList.toggle("hidden",t!=="compare");let i=this.container.querySelector("#device-select");i&&(i.disabled=t==="compare");let n=this.container.querySelector("#rotate-btn");if(n&&(n.disabled=t==="compare"),this.updateViewToggleUI(),t==="compare"){this.lastSinglePresetId=this.currentPreset.id,this.activateCompareViewport(this.activeCompareId),this.refreshCompareSnapshots(),this.startCompareSnapshots();return}this.stopCompareSnapshots(),this.singleStage.appendChild(this.frameDragger),this.setDevice(this.lastSinglePresetId,{suppressCallback:!0}),this.fitToScreen()}updateViewToggleUI(){Array.from(this.container.querySelectorAll("[data-view-toggle]")).forEach(i=>{i.classList.toggle("active",i.dataset.viewToggle===this.viewMode)})}activateCompareViewport(t){var a,s;let i=this.compareViewports.get(t);if(!i)return;let n=this.autoScale*this.userScaleMultiplier,r=this.activeCompareId;r&&r!==t&&this.captureCompareSnapshot(r),this.activeCompareId=t,this.currentPreset=i.preset,this.isLandscape=!1,i.slot.appendChild(this.frameDragger),this.frameDragOffsetX=0,this.frameDragOffsetY=0,this.applyFrameDrag(),this.compareViewports.forEach((o,c)=>{o.root.classList.toggle("is-active",c===t),o.ghost.classList.toggle("hidden",c===t),o.focus&&(o.focus.textContent=c===t?"Live":"Focus")}),this.applyPresetDimensions(),this.applyCompareDimensions(),this.fitToScreen({keepVisibleScale:n}),(s=(a=this.options).onDeviceChange)==null||s.call(a,this.getEffectivePreset())}applyCompareDimensions(){this.compareViewports.forEach(t=>{let i=t.preset,n=`${i.width}px`,r=`${i.height}px`;t.frame.style.width=n,t.frame.style.height=r,t.canvas&&(t.canvas.width=i.width,t.canvas.height=i.height)})}fitCompareGhosts(){this.compareViewports.forEach(t=>{let i=t.root.querySelector(".compare-body");if(!i)return;let n=Math.max(0,i.clientWidth-24),r=Math.max(0,i.clientHeight-24);if(n<=0||r<=0)return;let a=n/t.preset.width,s=r/t.preset.height,o=Math.max(.01,Math.min(a,s));t.wrapper.style.transform=`scale(${o})`})}captureCompareSnapshot(t){let i=this.compareViewports.get(t);if(!(i!=null&&i.canvas))return;let n=this.gameContainer.querySelector("canvas");if(!n)return;let r=i.canvas.getContext("2d");if(!r)return;let a=i.canvas.width,s=i.canvas.height,o=Math.min(a/n.width,s/n.height),c=n.width*o,l=n.height*o,d=(a-c)/2,u=(s-l)/2;r.clearRect(0,0,a,s),r.drawImage(n,d,u,c,l)}refreshCompareSnapshots(){this.compareViewports.forEach((t,i)=>{i!==this.activeCompareId&&this.captureCompareSnapshot(i)})}startCompareSnapshots(){this.compareSnapshotTimer||(this.compareSnapshotTimer=window.setInterval(()=>{this.viewMode==="compare"&&this.refreshCompareSnapshots()},500))}stopCompareSnapshots(){this.compareSnapshotTimer&&(window.clearInterval(this.compareSnapshotTimer),this.compareSnapshotTimer=null)}getFitBounds(){if(this.viewMode!=="compare")return{width:this.previewContainer.clientWidth-40,height:this.previewContainer.clientHeight-40};let t=this.compareViewports.get(this.activeCompareId),i=t==null?void 0:t.root.querySelector(".compare-body");return i?{width:i.clientWidth-24,height:i.clientHeight-24}:{width:this.previewContainer.clientWidth-40,height:this.previewContainer.clientHeight-40}}mustQuery(t){let i=this.container.querySelector(t);if(!i)throw new Error(`PreviewShell missing element: ${t}`);return i}};function Rh(e={}){let t=new xl(e);return typeof window!="undefined"&&(window.__previewShell=t),t.mount(),t}import{Sprite as ix,Container as Ph}from"pixi.js";var nx=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",wl=nx;if(typeof window!="undefined")try{let e=new XMLHttpRequest;if(e.open("GET","./build-settings.json",!1),e.send(),e.status===200&&e.responseText){let t=JSON.parse(e.responseText);t!=null&&t.buildMode&&(wl=t.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${wl}`))}}catch{}var It=class{static async create(t,i,n){var c,l,d,u,p,f,m;console.log(`[ObjectFactory] create() called for: ${t}, __BUILD_MODE__: ${wl}`);let r=(c=i==null?void 0:i.render)==null?void 0:c.asset;if(!r){console.log(`[ObjectFactory] No asset definition for: ${t}, returning empty container`);let h=new Ph;return this.applyTransform(h,i==null?void 0:i.transform),h}let a=(l=i==null?void 0:i.identity)==null?void 0:l.id;console.log(`[ObjectFactory] Calling AssetLoader.load() for: ${t}, configId: ${a}, type: ${r.type}, path: ${r.path}`);let s=await qa.load(t,r,n,a);console.log(`[ObjectFactory] AssetLoader.load() completed for: ${t}, rawAsset type: ${(d=s==null?void 0:s.constructor)==null?void 0:d.name}`);let o;if(r.type==="image")console.log("[ObjectFactory] Creating Sprite from texture:",s,"for object:",t),o=new ix(s),console.log("[ObjectFactory] Created object:",o,"type:",(u=o==null?void 0:o.constructor)==null?void 0:u.name),this.applyTransform(o,i==null?void 0:i.transform);else if(r.type==="json")if(console.log("[ObjectFactory] JSON asset for",t,"rawAsset type:",(p=s==null?void 0:s.constructor)==null?void 0:p.name,s),s&&(((f=s.constructor)==null?void 0:f.name)==="Container"||s instanceof Ph)){console.warn("[ObjectFactory] JSON asset is Container (from cache), reloading JSON directly");let h=[r.path,`/assets/${r.path}`,`assets/${r.path}`,`../assets/${r.path}`],g=!1;for(let b of h)try{let v=await fetch(b);if(v.ok){o=await v.json(),console.log("[ObjectFactory] Reloaded JSON directly from:",b,"type:",(m=o==null?void 0:o.constructor)==null?void 0:m.name),g=!0;break}}catch{continue}g||(console.error("[ObjectFactory] Failed to reload JSON from any path"),o=s)}else o=s;else o=s,o&&typeof o=="object"&&("x"in o||"position"in o)&&this.applyTransform(o,i==null?void 0:i.transform);return o}static applyTransform(t,i){var n,r,a,s;!i||!t||(i.position&&("x"in t&&"y"in t?(t.x=(n=i.position.x)!=null?n:0,t.y=(r=i.position.y)!=null?r:0):"position"in t&&t.position&&t.position.set((a=i.position.x)!=null?a:0,(s=i.position.y)!=null?s:0)),i.scale!==void 0&&"scale"in t&&t.scale&&(typeof t.scale=="object"&&"set"in t.scale?t.scale.set(i.scale):t.scale=i.scale),i.rotation!==void 0&&"rotation"in t&&(t.rotation=i.rotation),i.anchor&&"anchor"in t&&t.anchor&&Array.isArray(i.anchor)&&("set"in t.anchor?t.anchor.set(i.anchor[0],i.anchor[1]):(t.anchor.x=i.anchor[0],t.anchor.y=i.anchor[1])))}};function Ih(e){try{if(e&&typeof e.keys=="function")return Array.from(e.keys())}catch{}return[]}function Mh(e){var t;return e?((t=e.getDisplayObject)==null?void 0:t.call(e))||e.pixiObject||e:null}function rx(e,t){if(!e||!(t!=null&&t.interaction))return;let i=t.interaction,n=i.enabled!==!1&&(i.draggable===!0||i.clickable===!0);e.eventMode=n?"static":"none",e.interactive=n,n&&(e.cursor=i.draggable?"move":"pointer")}function Oh(e,t){var a,s,o,c,l;if(!e||!t)return;let i=t.transform||{};rx(e,t);let n=i.offset||i.position;n&&typeof n.x=="number"&&typeof n.y=="number"&&((a=e.position)!=null&&a.set?e.position.set(n.x,n.y):(typeof e.x=="number"&&(e.x=n.x),typeof e.y=="number"&&(e.y=n.y))),typeof i.scale=="number"&&((s=e.scale)!=null&&s.set?e.scale.set(i.scale):e.scale&&(e.scale.x=i.scale,e.scale.y=i.scale));let r=(c=i.anchor)!=null?c:(o=t.render)==null?void 0:o.anchor;r&&((l=e.anchor)!=null&&l.set)&&typeof r.x=="number"&&typeof r.y=="number"&&e.anchor.set(r.x,r.y)}function Dh(e){if(typeof window=="undefined")return;let t=e==null?void 0:e.objects,i=Ih(t);window.__editableObjectConfigs=t;let n=new Map;i.forEach(r=>n.set(r,[r])),window.__editableObjectInstances=n,window.refreshEditableConfigIndex=()=>Dh(window.__editableConfig),window.getEditableObjectList=()=>{var r;return Ih((r=window.__editableConfig)==null?void 0:r.objects)},window.getEditableObjectConfig=r=>{var a,s,o,c;return(c=(o=(s=(a=window.__editableConfig)==null?void 0:a.objects)==null?void 0:s.get)==null?void 0:o.call(s,r))!=null?c:null},window.getEditableEngineConfig=()=>{let r=window.__editableConfig;if(console.log("[BRIDGE] getEditableEngineConfig called, cfg present:",!!r),!r)return null;if(r.engine&&r.objects instanceof Map){console.log("[BRIDGE] Detected ObjectCentricConfig, flattening...");let a={...r.engine,objects:r.objects,scene:r.scene};return console.log("[BRIDGE] Returned assets:",Object.keys(a.assets||{})),a}return r}}function ax(){if(typeof window=="undefined")return;let e=i=>{let n=String(i||"").trim();return n?/^(data:|blob:|https?:)/.test(n)||n.startsWith("/")?n:`/${n.replace(/^\.\//,"")}`:""},t=async(i,n)=>{var a,s,o;let r=e(n);if(r)try{let[{Assets:c},{AssetTextures:l}]=await Promise.all([import("pixi.js"),import("./AssetTextures-NWHSMZNV.js")]),d=Date.now(),u=/^(data:|blob:)/.test(r)?r:r+(r.includes("?")?`&t=${d}`:`?t=${d}`),p=await c.load(u);if(!p)return;l[i]=p;let f=window.CustomAssets;(a=f==null?void 0:f[i])!=null&&a.texture&&(f[i].texture=p);let m=window.gameObjectManager,h=(s=m==null?void 0:m.get)==null?void 0:s.call(m,i);if(h){let g=((o=h.getDisplayObject)==null?void 0:o.call(h))||h.pixiObject||h.pixi||h;if(g!=null&&g.texture)g.texture=p;else if(g!=null&&g.children){let b=g.children.find(v=>v==null?void 0:v.texture);b!=null&&b.texture&&(b.texture=p)}}}catch(c){console.warn("[LIVE-EDIT] Failed to reload Pixi texture for",i,c)}};window.applyLiveEditOverrides=i=>{try{let n=Ya();Array.isArray(n)&&n.length&&(window.__editableConfig=i,Wa(n,{silent:!0,persist:!1}))}catch{}},window.applyEngineOverrides=i=>{try{let n=Ya();Array.isArray(n)&&n.length&&(window.__editableConfig=i,Wa(n,{silent:!0,persist:!1}))}catch{}},window.applyEditableEngineConfig=i=>{let n=window.__editableConfig;if(n!=null&&n.engine){if(i.runtime)for(let[r,a]of Object.entries(i.runtime))et({path:`runtime.${r}`,value:a},{silent:!0,persist:!0});if(i.assets)for(let[r,a]of Object.entries(i.assets))et({path:`assets.${r}`,value:a},{silent:!0,persist:!0}),typeof a=="string"&&t(r,a);if(i.splash)for(let[r,a]of Object.entries(i.splash))et({path:`splash.${r}`,value:a},{silent:!0,persist:!0});i.runtime&&Object.assign(n.engine.runtime,i.runtime),i.assets&&Object.assign(n.engine.assets,i.assets),i.splash&&Object.assign(n.engine.splash,i.splash)}}}function _l(e){let{getConfig:t,gameObjectManager:i,onObjectConfigApplied:n}=e;i&&(i.onObjectRebuildRequired=async(a,s)=>{console.log(`[LIVE-EDIT] \u{1F3D7}\uFE0F Rebuilding object ${a} due to type change...`);let o=i.get(a),c=o==null?void 0:o.pixiObject,l=c==null?void 0:c.parent,d=l==null?void 0:l.children.indexOf(c);o?i.remove(a):c&&c.destroy();let u=window.gameApp,p=await It.create(a,s,u);l&&(d!==void 0&&d!==-1?l.addChildAt(p,d):l.addChild(p));let f=i.create(a,p);return console.log(`[LIVE-EDIT] \u2705 Rebuild complete for ${a}`),f}),typeof window!="undefined"&&(ax(),window.applyEditableObjectConfig=(a,s)=>{var o,c,l;console.log("[LIVE-EDIT] \u{1F504} applyEditableObjectConfig called for:",a);try{let d=window.__editableConfig;(o=d==null?void 0:d.objects)!=null&&o.set&&(d.objects.set(a,s),console.log("[LIVE-EDIT] \u2705 Updated config in __editableConfig"));let u=(c=i==null?void 0:i.get)==null?void 0:c.call(i,a);if(console.log("[LIVE-EDIT] gameObject found?",!!u),u&&(console.log("[LIVE-EDIT] gameObject type:",(l=u.constructor)==null?void 0:l.name),console.log("[LIVE-EDIT] has updateConfig?",typeof u.updateConfig=="function"),console.log("[LIVE-EDIT] has onConfigUpdate?",typeof u.onConfigUpdate=="function")),u&&typeof u.updateConfig=="function")console.log("[LIVE-EDIT] \u2705 Calling updateConfig()"),u.updateConfig(s);else if(u&&typeof u.onConfigUpdate=="function")console.log("[LIVE-EDIT] \u2705 Calling onConfigUpdate()"),u.onConfigUpdate();else{console.log("[LIVE-EDIT] \u26A0\uFE0F No updateConfig or onConfigUpdate, applying transform directly");let p=Mh(u);Oh(p,s)}}catch(d){console.error("[LIVE-EDIT] \u274C Error in applyEditableObjectConfig:",d)}});let r={async applyObjectConfig(a,s){var d,u;console.log("[BRIDGE] \u{1F504} applyObjectConfig called for:",a);let o=t();(d=o==null?void 0:o.objects)!=null&&d.set&&(o.objects.set(a,s),console.log("[BRIDGE] \u2705 Updated config"));let c=(u=i==null?void 0:i.get)==null?void 0:u.call(i,a);if(console.log("[BRIDGE] gameObject found?",!!c),c&&(console.log("[BRIDGE] has updateConfig?",typeof c.updateConfig=="function"),console.log("[BRIDGE] has onConfigUpdate?",typeof c.onConfigUpdate=="function")),c&&typeof c.updateConfig=="function")console.log("[BRIDGE] \u2705 Calling updateConfig()"),c.updateConfig(s);else if(c&&typeof c.onConfigUpdate=="function")console.log("[BRIDGE] \u2705 Calling onConfigUpdate()"),c.onConfigUpdate();else{console.log("[BRIDGE] \u26A0\uFE0F Applying transform directly");let p=Mh(c);Oh(p,s)}let l=[a];n==null||n(a,s,l)},rebuildIndexes(){let a=t();typeof window!="undefined"&&(window.__editableConfig=a,Dh(a))}};return r.rebuildIndexes(),r}import sx from"lottie-web";Cl(Lc);typeof window!="undefined"&&!window.lottie&&(window.lottie=sx);var Hi=null,ox=async()=>{if(!Hi){let e=typeof window!="undefined"?window.INLINE_ASSETS:null,t=(e==null?void 0:e["handler.config"])||(e==null?void 0:e["handler.config.json"]);if(t)try{if(t.startsWith("data:")){let n=atob(t.split(",")[1]);Hi=JSON.parse(n)}else Hi=JSON.parse(t);return Hi}catch(n){console.warn("[CONFIG] Failed to parse inline handler.config.json:",n)}Hi=await(await fetch("./handler.config.json")).json()}return Hi},kl,Hn,Bh,Ui,Sl,Al;function q_(e){kl=e.initGame,Hn=e.CustomAssets,Bh=e.updateScreenState,Ui=e.globalResponsiveMultipliers,Sl=e.layout,Al=e.clearResponsiveElements}var Ca="web_embed",Nn="https://example.com",zh={profile_id:Ca},Mt=null,Ve=null,El={width:0,height:0},lx=!0,G_=async()=>{var c,l,d,u;document.title="Handler Pixi Game";let e=await ox();zh={...e.ids||{},profile_id:Ca},Nn=e.destination_url||((l=(c=e.export_profiles)==null?void 0:c[Ca])==null?void 0:l.destination_url)||Nn,pt.init({ids:zh,profile:Ca,destinationUrl:Nn});let t=pt.getRoot();if(typeof __PREVIEW_SHELL__!="undefined"&&__PREVIEW_SHELL__){console.log("[BOOTSTRAP] Initializing Preview Shell..."),Ve=Rh({onDeviceChange:f=>{console.log(`[PREVIEW] Device switched to ${f.width}x${f.height}, restarting game...`),jh()},onRefresh:jh});let p=Ve.getGameContainer();p&&(t=p),window.addEventListener("handler-preview:screen",f=>{var v,y,x,w,T,C,S,L,M,_,E;let m=window.gameApp,h=window.gameObjectManager,{width:g,height:b}=f.detail;if(El.width=g,El.height=b,Bh(g,b),!(!m||!m.renderer)){h&&s(m,h);try{m.renderer.resize(g,b);let A=m.view;A&&(A.style.width="100%",A.style.height="100%",A.style.display="block")}catch(A){console.warn("[SCREEN] Error resizing renderer:",A);return}if(i&&h&&Sl)try{let A=(v=window.__mainContainer)!=null?v:m.stage,P=(S=(C=(w=window.__tutorialLabel)!=null?w:(x=(y=h.get("label_1"))==null?void 0:y.getDisplayObject)==null?void 0:x.call(y))!=null?C:(T=h.get("label_1"))==null?void 0:T.pixiObject)!=null?S:h.get("label_1"),I=h.get("background_1"),k=(E=(_=(M=window.__background)!=null?M:(L=I==null?void 0:I.getDisplayObject)==null?void 0:L.call(I))!=null?_:I==null?void 0:I.pixiObject)!=null?E:I;if(A){let D=A===m.stage;Sl({mainContainer:A,label:P,background:k,backgroundTexture:(k==null?void 0:k.texture)||null,app:m},i,0,El,h,{skipMainContainerTransform:D})}}catch(A){console.warn("[SCREEN] Error in layout:",A)}}})}let i=await ar("scene.main");window.__editableConfig=i,window.__editableConfigBaseline||(window.__editableConfigBaseline=Va(i),console.log("[BOOTSTRAP] Frozen config baseline for persistence")),(u=(d=i.engine.runtime)==null?void 0:d.layout)!=null&&u.design_width_portrait||(console.warn("[BOOTSTRAP] Config layout missing, retrying..."),await new Promise(p=>setTimeout(p,100)),i=await ar("scene.main"));let n=await kl(t,i,Nn,Ve);Mt=n.app;let r=n.gameObjectManager;window.gameApp=Mt,window.gameObjectManager=r;try{window.__liveEditBridge=_l({getConfig:()=>window.__editableConfig,gameObjectManager:r,assets:Hn})}catch(p){console.warn("[BOOTSTRAP] Failed to initialize live-edit bridge",p)}Ve&&Ve.notifyGameLoaded();let a=window.__debugScale;a&&typeof a=="number"&&(Ui.scale=a,console.log(`[DEBUG] Applied persisted debug scale: ${a}`)),s(Mt,r);function s(p,f){if(lx){console.log("[RESPONSIVE] Skipping global scaling; using config-driven layout");return}if(console.log("[RESPONSIVE] ===== APPLYING GLOBAL RESPONSIVE SCALING ====="),console.log(`[RESPONSIVE] Scale multiplier: ${Ui.scale.toFixed(3)}`),p.stage){let h=function(g,b=0){if(!g||!g.children)return;let v=" ".repeat(b);g.children.forEach((y,x)=>{if(y&&y.zIndex===9999){console.log(`${v}[RESPONSIVE] Skipping debug border (zIndex 9999)`);return}if(y&&y.scale){let w=y.scale.x||1,T=y.scale.y||1;y.__originalScale||(y.__originalScale={x:w,y:T},console.log(`${v}[RESPONSIVE] Stored original scale for child[${x}]: ${w.toFixed(3)}, ${T.toFixed(3)}`));let C=y.__originalScale.x*Ui.scale,S=y.__originalScale.y*Ui.scale;typeof y.scale.set=="function"?y.scale.set(C,S):(y.scale.x=C,y.scale.y=S),console.log(`${v}[RESPONSIVE] Child[${x}] scale: ${w.toFixed(3)}\u2192${y.scale.x.toFixed(3)} (type: ${y.constructor.name})`),h(y,b+1)}else y&&console.log(`${v}[RESPONSIVE] Child[${x}] has no scale (type: ${y.constructor.name})`)})};var m=h;console.log("[RESPONSIVE] Applying scale to PIXI stage children"),h(p.stage)}else console.warn("[RESPONSIVE] No app.stage found!");console.log("[REDDEBUG] Debug border left unscaled (fixed boundaries)"),console.log("[RESPONSIVE] ===== GLOBAL RESPONSIVE SCALING COMPLETE =====")}function o(p){if(p!==void 0){Ui.scale=p,console.log(`[RESPONSIVE] Updated global scale multiplier to: ${p.toFixed(3)}`);let f=window.gameApp,m=window.gameObjectManager;f&&m?(s(f,m),f.renderer&&(f.renderer.render(f.stage),console.log("[RESPONSIVE] Forced PIXI renderer update"))):console.warn(`[RESPONSIVE] No gameApp (${!!f}) or gameObjectManager (${!!m}) found in window for live update`)}}window.updateGlobalResponsiveMultipliers=o,pt.start()},jh=async()=>{var t,i,n,r;console.log("[PREVIEW] Restarting game in 1 seconds...");let e=(t=window.gameObjectManager)==null?void 0:t.get("character_1");if(e){let a=((i=e.getDisplayObject)==null?void 0:i.call(e))||e;a&&a.scale&&console.log(`[CHARACTER] Before restart - Current scale - x: ${((n=a.scale.x)!=null?n:1).toFixed(3)}, y: ${((r=a.scale.y)!=null?r:1).toFixed(3)}`)}if(Ve){Ve.notifyGameDestroyed();try{Al&&Al()}catch(a){console.warn("Failed to clear responsive elements",a)}setTimeout(()=>{console.log("[PREVIEW] Executing restart...");let a=Ve.getGameContainer(),s=window.gameObjectManager;if(s&&typeof s.clear=="function"&&(console.log("[PREVIEW] Clearing old GameObjectManager tickers..."),s.clear()),Mt){try{Mt.destroy(!0,{children:!0,texture:!1})}catch(o){console.warn("[PREVIEW] Destroy warning:",o)}Mt=null}window.gameApp=null,window.gameObjectManager=null,a&&(a.innerHTML="");try{typeof Hn.resetScene=="function"&&Hn.resetScene()}catch(o){console.warn("Asset reset failed",o)}setTimeout(()=>{ar("scene.main").then(o=>{window.__editableConfig=o,window.__editableConfigBaseline||(window.__editableConfigBaseline=Va(o)),kl(a,o,Nn).then(c=>{Mt=c.app,window.gameApp=Mt,window.gameObjectManager=c.gameObjectManager;try{window.__liveEditBridge=_l({getConfig:()=>window.__editableConfig,gameObjectManager:window.gameObjectManager,assets:Hn})}catch(l){console.warn("[BOOTSTRAP] Failed to re-initialize live-edit bridge",l)}Ve&&Ve.notifyGameLoaded(),console.log("[PREVIEW] Game restarted successfully");try{pt.start()}catch{}})})},100)},1e3)}};var Tl="0.3.1",cx=new Set(["init","boot","view","ready","start","pause","resume","complete","error","engagement","first_interaction","retry","cta_show","cta_click","cta_dismiss","clickout","conversion","session_time","level_time","load_time","level_start","level_complete","level_fail","checkpoint","reward","tutorial_start","tutorial_complete","tutorial_skip","ab_assign","fps","memory","asset_load_start","asset_load_complete"]),Gh={mechanic_id:"TODO_mechanic_id",variant_id:"TODO_variant_id",deployment_id:"TODO_deployment_id",export_id:"TODO_export_id",profile_id:"TODO_profile_id",instance_id:"default"},Wh=Math.random().toString(36).slice(2),Gi=null,$i={...Gh},Yh="web_embed",Il={},$n,Ll=!1,Un=!1,Gn=!1,Vh=!1,zl=1,Ta=0,Pa=!1,ft=!1,qi="",Wi=Math.floor(window.innerWidth),Yi=Math.floor(window.innerHeight),Ml=Wi>Yi,ht=!1,qn=!1,Fh=!1,Nh=!1,Rl=!1,La=null,Qt=null,Ol=!1,Dl=!1,ka=new Map;function Kh(){if(!Qt)return null;let e=Date.now()-Qt;return!Number.isFinite(e)||e<0?null:e}function Pl(e){if(Ol)return;let t=Kh();t!==null&&(Ol=!0,O("session_time",{duration_ms:t,reason:e}))}function Hh(){if(Gi)return Gi;let e=document.createElement("div");return e.id="handler-root",e.setAttribute("data-handler-root","true"),document.body.appendChild(e),Gi=e,e}function Ra(e){switch(e){case"interaction":return"engagement";case"finish":return"complete";case"install":return"cta_click";default:return e}}function Xh(e,t){return{event_name:e,ts:Date.now(),session_id:Wh,deployment_id:$i.deployment_id,variant_id:$i.variant_id,export_profile_id:$i.profile_id,instance_id:$i.instance_id||"default",env:Yh==="mraid"?"mraid":"web",attribution:$n,payload:t}}function O(e,t){let i=Ra(e),n=Xh(i,t);Za(n,!!Il.analytics),or(i,n),i!==e&&or(e,n)}function Wn(){La&&(La(Wi,Yi),La=null)}function Vi(e){zl=e,O("volume",e)}function Ki(e){e&&(Vh=!0),!Gn&&(Gn=!0,O("pause"),Vi(0))}function Yn(e){!e&&Vh||Gn&&(Gn=!1,O("resume"),Vi(zl))}function Ot(e,t){Wi=Math.floor(e||window.innerWidth),Yi=Math.floor(t||window.innerHeight),Ml=Wi>Yi,O("resize",{width:Wi,height:Yi})}function dx(){if(wc())try{let e=mraid.getMaxSize();Ot(e.width,e.height);let t=()=>{mraid.isViewable()&&mraid.getState()!=="hidden"?Yn():Ki()};if(mraid.addEventListener("viewableChange",t),mraid.addEventListener("stateChange",t),mraid.addEventListener("sizeChange",()=>{let i=mraid.getMaxSize();Ot(i.width,i.height)}),mraid.getAudioVolume){let i=mraid.getAudioVolume();Vi(i?1:0)}if(mraid.addEventListener("audioVolumeChange",i=>{i!==null&&Vi(i>0?1:0)}),mraid.addEventListener("error",(i,n)=>{console.warn("mraid error:",i,"action:",n)}),Pa=!0,mraid.isViewable()&&mraid.getState()!=="hidden")ht=!0,O("boot"),O("view"),O("ready"),ft=!0,Wn();else{let i=()=>{ht=!0,O("boot"),O("view"),O("ready"),ft=!0,Wn()};mraid.addEventListener("ready",i)}}catch(e){console.warn("MRAID hook skipped",e)}}function ux(){if(_c())try{let e=dapi.getScreenSize();Ot(e.width,e.height),dapi.addEventListener("viewableChange",i=>{i.isViewable?Yn():Ki()}),dapi.addEventListener("adResized",i=>{let n=dapi.getScreenSize();Ot(i.width||n.width,i.height||n.height)});let t=dapi.getAudioVolume();if(Vi(t?1:0),dapi.addEventListener("audioVolumeChange",i=>Vi(i?1:0)),Pa=!0,dapi.isViewable())ht=!0,O("boot"),O("view"),O("ready"),ft=!0,Wn();else{let i=()=>{ht=!0,O("boot"),O("view"),O("ready"),ft=!0,Wn()};dapi.addEventListener("ready",i)}}catch(e){console.warn("DAPI hook skipped",e)}}function Uh(){let e=()=>{ht||document.visibilityState==="visible"&&(document.readyState==="complete"||document.readyState==="interactive")&&(ht=!0,O("boot"),O("view"),O("ready"),ft=!0,Wn(),qn&&(qn=!1,Ke.start()))};window.addEventListener("resize",()=>Ot()),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?(Yn(),e()):Ki()}),document.readyState==="complete"||document.readyState==="interactive"?e():window.addEventListener("load",e),Pa=!0}function px(){let e=t=>{typeof TouchEvent!="undefined"&&t instanceof TouchEvent&&(Fh=!0),!(Fh&&t instanceof MouseEvent)&&(Ta+=1,Dl||(Dl=!0,O("first_interaction",{count:Ta})),O("interaction",Ta))};document.addEventListener("mousedown",e),document.addEventListener("touchstart",e)}function $h(e){var n,r,a,s,o,c,l,d,u,p,f,m;let t=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none";if((typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed")==="google")try{(n=window.ExitApi)==null||n.exit();return}catch{}if(t==="mraid"&&typeof mraid!="undefined")mraid.open(e||"");else if(t==="dapi"&&typeof dapi!="undefined")dapi.openStoreUrl();else if(li())(a=(r=window.TJ_API)==null?void 0:r.click)==null||a.call(r);else if(Ec())(o=(s=window.FbPlayableAd)==null?void 0:s.onCTAClick)==null||o.call(s);else if(kc())(l=(c=window.ScPlayableAd)==null?void 0:c.onCTAClick)==null||l.call(c);else if(Cc())try{(u=(d=window.smxTracking)==null?void 0:d.redirect)==null||u.call(d)}catch(h){console.warn("Smadex redirect failed",h)}else if(Sc()){let h=window.ExitApi;h&&typeof h.exit=="function"?h.exit(e||qi||""):e&&window.open(e)}else oi()?(p=window.install)==null||p.call(window):Ac()?(f=window.openAppStore)==null||f.call(window):Ja()?(m=parent==null?void 0:parent.postMessage)==null||m.call(parent,"download","*"):e&&window.open(e)}function fx(){let e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed",t=i=>{if(!i)return;let n=new Image;n.src=i};if(e==="bigabid"){let i=window.BIGABID_BIDTIMEMACROS;if(!i)return;we("view",()=>t(i.mraid_viewable)),we("start",()=>t(i.game_viewable)),we("engagement",()=>t(i.engagement));let n=()=>t(i.complete);we("complete",n),sr("engagement",r=>{var a;((a=r==null?void 0:r.payload)==null?void 0:a.count)>3&&n()}),we("cta_click",()=>t(i.click))}else if(e==="inmobi"){let i=window.INMOBI_DSPMACROS;if(!i)return;we("view",()=>t(i.Ad_Load_Start)),we("start",()=>t(i.Ad_Viewable)),we("engagement",()=>t(i.First_Engagement)),we("complete",()=>t(i.Gameplay_Complete)),we("cta_click",()=>t(i.DSP_Click)),we("start",()=>{[5,10,15,20,25,30].forEach(n=>setTimeout(()=>t(i[`Spent_${n}_Seconds`]),n*1e3))})}}function hx(){if(!li())return;let e=window.TJ_API;e&&e.setPlayableAPI&&e.setPlayableAPI({skipAd:()=>{try{Ke.finish()}catch(t){console.warn("Tapjoy skip failed",t)}}})}function qh(){var t,i,n;let e=window.TJ_API;(t=e==null?void 0:e.objectiveComplete)==null||t.call(e),(i=e==null?void 0:e.playableFinished)==null||i.call(e),(n=e==null?void 0:e.gameplayFinished)==null||n.call(e)}function gx(){oi()&&(window.mintGameStart=()=>{Yn(!0),Ot()},window.mintGameClose=()=>{Ki(!0)})}function mx(){if(!Qa())return;let e=window.NUC;!e||!e.trigger||(Ke.on("cta_click",()=>{var t,i;return(i=(t=e.trigger).convert)==null?void 0:i.call(t,qi)}),Ke.on("complete",()=>{var t,i;return(i=(t=e.trigger).tryAgain)==null?void 0:i.call(t)}))}var Ke={init(e={},t){var i;if(Yh=e.profile||"web_embed",Il=e.consent||{},$i={...Gh,...e.ids||{}},Gi=e.rootEl||Gi,$n=void 0,lc((i=e.telemetry)!=null&&i.endpoint?e.telemetry:null),Qt=null,Ol=!1,Dl=!1,ka.clear(),qi=e.destinationUrl||(/android/i.test(navigator.userAgent)?"https://play.google.com/store":"https://www.apple.com/app-store/"),t&&(La=t),O("init"),document.body.oncontextmenu=()=>!1,Hh(),vx(Gi),Tc(),dx(),ux(),!Pa){if(document.readyState==="complete")Uh();else if(!Nh){Nh=!0;let n=()=>{Uh(),window.removeEventListener("load",n),document.removeEventListener("DOMContentLoaded",n)};window.addEventListener("load",n),document.addEventListener("DOMContentLoaded",n)}}px(),fx(),hx(),gx(),mx(),console.log(`%c @handler/playable-sdk %c v${Tl} `,"background: #007acc; color: #fff; font-size: 14px; padding: 4px 8px; border-top-left-radius: 4px; border-bottom-left-radius: 4px;","background: #e1e4e8; color: #333; font-size: 14px; padding: 4px 8px; border-top-right-radius: 4px; border-bottom-right-radius: 4px;"),ht&&!ft&&(O("boot"),O("view"),O("ready"),qn&&(qn=!1,Ke.start()),ft=!0),ft=ht},getRoot(){return Hh()},get version(){return Tl},get maxWidth(){return Wi},get maxHeight(){return Yi},get isLandscape(){return Ml},get isReady(){return ft},get isStarted(){return Ll},get isPaused(){return Gn},get isFinished(){return Un},get volume(){return zl},get interactions(){return Ta},on(e,t){sr(Ra(e),t)},off(e,t){Xa(Ra(e),t)},start(){var e,t;if(!Ll){if(!ht){qn=!0;return}if(Ll=!0,Qt||(Qt=Date.now()),O("start"),Ot(),oi())Ki(),(e=window.gameReady)==null||e.call(window);else if(li()){let i=window.TJ_API;(t=i==null?void 0:i.setPlayableBuild)==null||t.call(i,{orientation:Ml?"landscape":"portrait",buildID:Tl})}}},finish(){var e,t;Un||(Un=!0,O("complete"),Pl("complete"),oi()?(e=window.gameEnd)==null||e.call(window):Ja()?(t=parent==null?void 0:parent.postMessage)==null||t.call(parent,"complete","*"):li()&&qh())},install(e){if(!Un){Un=!0,li()?(qh(),setTimeout(()=>Ke.install(e),300)):(O("complete"),setTimeout(()=>Ke.install(e),0));return}Rl||(Rl=!0,setTimeout(()=>Rl=!1,500),O("cta_click"),O("conversion"),Pl("cta"),$h(e||qi))},emit(e,t){let i=Ra(e);if(!cx.has(i)&&i!=="resize"&&i!=="volume"&&!i.startsWith("custom."))throw new Error(`Event ${e} must be canonical or namespaced as custom.<mechanic_id>.<event>`);let n=Xh(i,t);Za(n,!!Il.analytics),or(i,n)},gameStart(){Ke.start()},gameEnd(){Ke.finish()},ctaClick(e,t){O("cta_click",{url:e||qi,manual:!0}),(t==null?void 0:t.open)!==!1&&$h(e||qi)},ctaShow(e){O("cta_show",e)},ctaDismiss(e){O("cta_dismiss",e)},getGameTimeMs(){return Kh()},endSession(e="manual"){Pl(e)},setAttribution(e){$n=e},abTest(e,t){if(!e)throw new Error("abTest requires experimentId");if(!Array.isArray(t)||t.length<2)throw new Error("abTest requires at least 2 variants");let i=Math.abs(bx(`${Wh}:${e}`))%t.length,n=t[i];return $n={...$n||{},experiment_id:e},$i.variant_id=n,O("ab_assign",{experiment_id:e,variant_id:n}),n},levelStart(e,t){Qt||(Qt=Date.now()),O("level_start",{level_id:e,...t})},levelComplete(e,t){O("level_complete",{level_id:e,...t})},levelFail(e,t){O("level_fail",{level_id:e,...t})},checkpoint(e,t){O("checkpoint",{checkpoint_id:e,...t})},reward(e,t){O("reward",{reward_id:e,...t})},tutorialStart(e,t){O("tutorial_start",{step_id:e,...t})},tutorialComplete(e,t){O("tutorial_complete",{step_id:e,...t})},tutorialSkip(e,t){O("tutorial_skip",{step_id:e,...t})},timerStart(e){e&&ka.set(e,Date.now())},timerEnd(e,t="custom",i){if(!e)return;let n=ka.get(e);if(!n)return;ka.delete(e);let r=Date.now()-n;if(!(!Number.isFinite(r)||r<0)){if(t==="custom"){O("engagement",{action:"timer",key:e,duration_ms:r,...i});return}O(t,{key:e,duration_ms:r,...i})}},fps(e,t){O("fps",{value:e,...t})},memory(e,t){O("memory",{bytes:e,...t})},assetLoadStart(e,t){O("asset_load_start",{asset_id:e,...t})},assetLoadComplete(e,t){O("asset_load_complete",{asset_id:e,...t})},reportError(e,t,i){O("error",{code:e,message:t,...i})},retry(){var e,t,i;if(oi())(e=window.gameRetry)==null||e.call(window);else if(Qa()){let n=window.NUC;(i=(t=n==null?void 0:n.trigger)==null?void 0:t.tryAgain)==null||i.call(t)}O("engagement",{action:"retry"})},pause(){Ki(!0)},resume(){Yn(!0)},resize(e,t){Ot(e,t)}},pt=Ke;function bx(e){let t=2166136261;for(let i=0;i<e.length;i++)t^=e.charCodeAt(i),t=Math.imul(t,16777619);return t|0}function vx(e){let t=document.createElement("script");t.type="text/javascript",t.textContent=`
1300
1300
  (function(){
1301
1301
  var events = ['touchstart','touchend','mousedown','keydown'];
1302
1302
  function unlock(){