@loaders.gl/tile-converter 4.0.0-alpha.20 → 4.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/converter.min.js +15 -15
- package/dist/dist.min.js +31819 -31901
- package/dist/es5/deps-installer/deps-installer.js +1 -1
- package/dist/es5/i3s-server/controllers/slpk-controller.js +2 -2
- package/dist/es5/i3s-server/controllers/slpk-controller.js.map +1 -1
- package/dist/es5/index.js +0 -7
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/es5/slpk-extractor/slpk-extractor.js +7 -8
- package/dist/es5/slpk-extractor/slpk-extractor.js.map +1 -1
- package/dist/esm/deps-installer/deps-installer.js +1 -1
- package/dist/esm/i3s-server/bin/i3s-server.min.js +70 -70
- package/dist/esm/i3s-server/controllers/slpk-controller.js +1 -1
- package/dist/esm/i3s-server/controllers/slpk-controller.js.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/esm/slpk-extractor/slpk-extractor.js +2 -3
- package/dist/esm/slpk-extractor/slpk-extractor.js.map +1 -1
- package/dist/i3s-server/controllers/slpk-controller.js +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/slpk-extractor/slpk-extractor.d.ts +1 -1
- package/dist/slpk-extractor/slpk-extractor.d.ts.map +1 -1
- package/dist/slpk-extractor/slpk-extractor.js +3 -4
- package/dist/slpk-extractor.min.js +35 -35
- package/package.json +14 -14
- package/src/i3s-server/controllers/slpk-controller.ts +1 -1
- package/src/index.ts +0 -1
- package/src/slpk-extractor/slpk-extractor.ts +2 -3
- package/dist/es5/slpk-extractor/helpers/file-handle-file.js +0 -214
- package/dist/es5/slpk-extractor/helpers/file-handle-file.js.map +0 -1
- package/dist/es5/slpk-extractor/helpers/fs-promises.js +0 -77
- package/dist/es5/slpk-extractor/helpers/fs-promises.js.map +0 -1
- package/dist/esm/slpk-extractor/helpers/file-handle-file.js +0 -54
- package/dist/esm/slpk-extractor/helpers/file-handle-file.js.map +0 -1
- package/dist/esm/slpk-extractor/helpers/fs-promises.js +0 -32
- package/dist/esm/slpk-extractor/helpers/fs-promises.js.map +0 -1
- package/dist/slpk-extractor/helpers/file-handle-file.d.ts +0 -51
- package/dist/slpk-extractor/helpers/file-handle-file.d.ts.map +0 -1
- package/dist/slpk-extractor/helpers/file-handle-file.js +0 -86
- package/dist/slpk-extractor/helpers/fs-promises.d.ts +0 -38
- package/dist/slpk-extractor/helpers/fs-promises.d.ts.map +0 -1
- package/dist/slpk-extractor/helpers/fs-promises.js +0 -51
- package/src/slpk-extractor/helpers/file-handle-file.ts +0 -109
- package/src/slpk-extractor/helpers/fs-promises.ts +0 -66
package/dist/converter.min.js
CHANGED
|
@@ -159,30 +159,30 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
159
159
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){t=t.call(e)},n:function(){var l=t.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(o)throw s}}}}function D5r(e,r){if(!!e){if(typeof e=="string")return uSe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return uSe(e,r)}}function uSe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var lSe=[new q0.Vector3([1,0,0]),new q0.Vector3([0,1,0]),new q0.Vector3([0,0,1])],cSe=new q0.Vector3,k5r=new q0.Vector3,QTt=new YN.default(new q0.Vector3(1,0,0),0),Ek=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];(0,T5r.default)(this,e),(0,_k.default)(this,"planes",void 0),this.planes=r}return(0,C5r.default)(e,[{key:"fromBoundingSphere",value:function(t){this.planes.length=2*lSe.length;var n=t.center,i=t.radius,a=0,o=sSe(lSe),s;try{for(o.s();!(s=o.n()).done;){var u=s.value,l=this.planes[a],c=this.planes[a+1];l||(l=this.planes[a]=new YN.default),c||(c=this.planes[a+1]=new YN.default);var f=cSe.copy(u).scale(-i).add(n),d=-u.dot(f);l.fromPointNormal(f,u);var p=cSe.copy(u).scale(i).add(n),h=k5r.copy(u).negate(),b=-h.dot(p);c.fromPointNormal(p,h),a+=2}}catch(v){o.e(v)}finally{o.f()}return this}},{key:"computeVisibility",value:function(t){var n=N0.INTERSECTION.INSIDE,i=sSe(this.planes),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=t.intersectPlane(o);switch(s){case N0.INTERSECTION.OUTSIDE:return N0.INTERSECTION.OUTSIDE;case N0.INTERSECTION.INTERSECTING:n=N0.INTERSECTION.INTERSECTING;break;default:}}}catch(u){i.e(u)}finally{i.f()}return n}},{key:"computeVisibilityWithPlaneMask",value:function(t,n){if((0,q0.assert)(Number.isFinite(n),"parentPlaneMask is required."),n===e.MASK_OUTSIDE||n===e.MASK_INSIDE)return n;for(var i=e.MASK_INSIDE,a=this.planes,o=0;o<this.planes.length;++o){var s=o<31?1<<o:0;if(!(o<31&&(n&s)==0)){var u=a[o],l=t.intersectPlane(u);if(l===N0.INTERSECTION.OUTSIDE)return e.MASK_OUTSIDE;l===N0.INTERSECTION.INTERSECTING&&(i|=s)}}return i}}]),e}();wk.default=Ek;(0,_k.default)(Ek,"MASK_OUTSIDE",4294967295);(0,_k.default)(Ek,"MASK_INSIDE",0);(0,_k.default)(Ek,"MASK_INDETERMINATE",2147483647)});var XN=m(Sk=>{"use strict";var R2=ln();Object.defineProperty(Sk,"__esModule",{value:!0});Sk.default=void 0;var O5r=R2(ui()),R5r=R2(li()),po=R2(Ns()),qi=Xt(),F5r=R2($N()),Lb=R2(yk()),I5r=new qi.Vector3,P5r=new qi.Vector3,B5r=new qi.Vector3,j5r=new qi.Vector3,M5r=new qi.Vector3,L5r=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,O5r.default)(this,e),(0,po.default)(this,"left",void 0),(0,po.default)(this,"_left",void 0),(0,po.default)(this,"right",void 0),(0,po.default)(this,"_right",void 0),(0,po.default)(this,"top",void 0),(0,po.default)(this,"_top",void 0),(0,po.default)(this,"bottom",void 0),(0,po.default)(this,"_bottom",void 0),(0,po.default)(this,"near",void 0),(0,po.default)(this,"_near",void 0),(0,po.default)(this,"far",void 0),(0,po.default)(this,"_far",void 0),(0,po.default)(this,"_cullingVolume",new F5r.default([new Lb.default,new Lb.default,new Lb.default,new Lb.default,new Lb.default,new Lb.default])),(0,po.default)(this,"_perspectiveMatrix",new qi.Matrix4),(0,po.default)(this,"_infinitePerspective",new qi.Matrix4);var t=r.near,n=t===void 0?1:t,i=r.far,a=i===void 0?5e8:i;this.left=r.left,this._left=void 0,this.right=r.right,this._right=void 0,this.top=r.top,this._top=void 0,this.bottom=r.bottom,this._bottom=void 0,this.near=n,this._near=n,this.far=a,this._far=a}return(0,R5r.default)(e,[{key:"clone",value:function(){return new e({right:this.right,left:this.left,top:this.top,bottom:this.bottom,near:this.near,far:this.far})}},{key:"equals",value:function(t){return t&&t instanceof e&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far}},{key:"projectionMatrix",get:function(){return this._update(),this._perspectiveMatrix}},{key:"infiniteProjectionMatrix",get:function(){return this._update(),this._infinitePerspective}},{key:"computeCullingVolume",value:function(t,n,i){(0,qi.assert)(t,"position is required."),(0,qi.assert)(n,"direction is required."),(0,qi.assert)(i,"up is required.");var a=this._cullingVolume.planes;i=I5r.copy(i).normalize();var o=P5r.copy(n).cross(i).normalize(),s=B5r.copy(n).multiplyByScalar(this.near).add(t),u=j5r.copy(n).multiplyByScalar(this.far).add(t),l=M5r;return l.copy(o).multiplyByScalar(this.left).add(s).subtract(t).cross(i),a[0].fromPointNormal(t,l),l.copy(o).multiplyByScalar(this.right).add(s).subtract(t).cross(i).negate(),a[1].fromPointNormal(t,l),l.copy(i).multiplyByScalar(this.bottom).add(s).subtract(t).cross(o).negate(),a[2].fromPointNormal(t,l),l.copy(i).multiplyByScalar(this.top).add(s).subtract(t).cross(o),a[3].fromPointNormal(t,l),l=new qi.Vector3().copy(n),a[4].fromPointNormal(s,l),l.negate(),a[5].fromPointNormal(u,l),this._cullingVolume}},{key:"getPixelDimensions",value:function(t,n,i,a){this._update(),(0,qi.assert)(Number.isFinite(t)&&Number.isFinite(n)),(0,qi.assert)(t>0),(0,qi.assert)(n>0),(0,qi.assert)(i>0),(0,qi.assert)(a);var o=1/this.near,s=this.top*o,u=2*i*s/n;s=this.right*o;var l=2*i*s/t;return a.x=l,a.y=u,a}},{key:"_update",value:function(){(0,qi.assert)(Number.isFinite(this.right)&&Number.isFinite(this.left)&&Number.isFinite(this.top)&&Number.isFinite(this.bottom)&&Number.isFinite(this.near)&&Number.isFinite(this.far));var t=this.top,n=this.bottom,i=this.right,a=this.left,o=this.near,s=this.far;(t!==this._top||n!==this._bottom||a!==this._left||i!==this._right||o!==this._near||s!==this._far)&&((0,qi.assert)(this.near>0&&this.near<this.far,"near must be greater than zero and less than far."),this._left=a,this._right=i,this._top=t,this._bottom=n,this._near=o,this._far=s,this._perspectiveMatrix=new qi.Matrix4().frustum({left:a,right:i,bottom:n,top:t,near:o,far:s}),this._infinitePerspective=new qi.Matrix4().frustum({left:a,right:i,bottom:n,top:t,near:o,far:1/0}))}}]),e}();Sk.default=L5r});var fSe=m(Tk=>{"use strict";var Ak=ln();Object.defineProperty(Tk,"__esModule",{value:!0});Tk.default=void 0;var q5r=Ak(ui()),N5r=Ak(li()),ho=Ak(Ns()),F2=Xt(),U5r=Ak(XN()),G5r=function(r){return r!==null&&typeof r!="undefined"},z5r=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,q5r.default)(this,e),(0,ho.default)(this,"_offCenterFrustum",new U5r.default),(0,ho.default)(this,"fov",void 0),(0,ho.default)(this,"_fov",void 0),(0,ho.default)(this,"_fovy",void 0),(0,ho.default)(this,"_sseDenominator",void 0),(0,ho.default)(this,"aspectRatio",void 0),(0,ho.default)(this,"_aspectRatio",void 0),(0,ho.default)(this,"near",void 0),(0,ho.default)(this,"_near",void 0),(0,ho.default)(this,"far",void 0),(0,ho.default)(this,"_far",void 0),(0,ho.default)(this,"xOffset",void 0),(0,ho.default)(this,"_xOffset",void 0),(0,ho.default)(this,"yOffset",void 0),(0,ho.default)(this,"_yOffset",void 0);var t=r.fov,n=r.aspectRatio,i=r.near,a=i===void 0?1:i,o=r.far,s=o===void 0?5e8:o,u=r.xOffset,l=u===void 0?0:u,c=r.yOffset,f=c===void 0?0:c;this.fov=t,this.aspectRatio=n,this.near=a,this.far=s,this.xOffset=l,this.yOffset=f}return(0,N5r.default)(e,[{key:"clone",value:function(){return new e({aspectRatio:this.aspectRatio,fov:this.fov,near:this.near,far:this.far})}},{key:"equals",value:function(t){return!G5r(t)||!(t instanceof e)?!1:(this._update(),t._update(),this.fov===t.fov&&this.aspectRatio===t.aspectRatio&&this.near===t.near&&this.far===t.far&&this._offCenterFrustum.equals(t._offCenterFrustum))}},{key:"projectionMatrix",get:function(){return this._update(),this._offCenterFrustum.projectionMatrix}},{key:"infiniteProjectionMatrix",get:function(){return this._update(),this._offCenterFrustum.infiniteProjectionMatrix}},{key:"fovy",get:function(){return this._update(),this._fovy}},{key:"sseDenominator",get:function(){return this._update(),this._sseDenominator}},{key:"computeCullingVolume",value:function(t,n,i){return this._update(),this._offCenterFrustum.computeCullingVolume(t,n,i)}},{key:"getPixelDimensions",value:function(t,n,i,a){return this._update(),this._offCenterFrustum.getPixelDimensions(t,n,i,a||new F2.Vector2)}},{key:"_update",value:function(){(0,F2.assert)(Number.isFinite(this.fov)&&Number.isFinite(this.aspectRatio)&&Number.isFinite(this.near)&&Number.isFinite(this.far));var t=this._offCenterFrustum;(this.fov!==this._fov||this.aspectRatio!==this._aspectRatio||this.near!==this._near||this.far!==this._far||this.xOffset!==this._xOffset||this.yOffset!==this._yOffset)&&((0,F2.assert)(this.fov>=0&&this.fov<Math.PI),(0,F2.assert)(this.aspectRatio>0),(0,F2.assert)(this.near>=0&&this.near<this.far),this._aspectRatio=this.aspectRatio,this._fov=this.fov,this._fovy=this.aspectRatio<=1?this.fov:Math.atan(Math.tan(this.fov*.5)/this.aspectRatio)*2,this._near=this.near,this._far=this.far,this._sseDenominator=2*Math.tan(.5*this._fovy),this._xOffset=this.xOffset,this._yOffset=this.yOffset,t.top=this.near*Math.tan(.5*this._fovy),t.bottom=-t.top,t.right=this.aspectRatio*t.top,t.left=-t.right,t.near=this.near,t.far=this.far,t.right+=this.xOffset,t.left+=this.xOffset,t.top+=this.yOffset,t.bottom+=this.yOffset)}}]),e}();Tk.default=z5r});var hSe=m(JN=>{"use strict";var H5r=ln();Object.defineProperty(JN,"__esModule",{value:!0});JN.default=ijr;var zs=Xt(),W5r=H5r(pk());function dSe(e,r){var t=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=V5r(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
160
160
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){t=t.call(e)},n:function(){var l=t.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(o)throw s}}}}function V5r(e,r){if(!!e){if(typeof e=="string")return pSe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return pSe(e,r)}}function pSe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var K5r=new zs.Vector3,Y5r=new zs.Vector3,$5r=new zs.Vector3,X5r=new zs.Vector3,J5r=new zs.Vector3,Q5r=new zs.Vector3,Z5r=new zs.Vector3,qb=new zs.Vector3,ejr=new zs.Vector3,rjr=new zs.Vector3,tjr=new zs.Vector3,njr=new zs.Vector3,t3t=4/3*Math.PI;function ijr(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new W5r.default;if(!e||e.length===0)return r.fromCenterRadius([0,0,0],0);var t=Z5r.copy(e[0]),n=K5r.copy(t),i=Y5r.copy(t),a=$5r.copy(t),o=X5r.copy(t),s=J5r.copy(t),u=Q5r.copy(t),l=dSe(e),c;try{for(l.s();!(c=l.n()).done;){var f=c.value;t.copy(f);var d=t.x,p=t.y,h=t.z;d<n.x&&n.copy(t),d>o.x&&o.copy(t),p<i.y&&i.copy(t),p>s.y&&s.copy(t),h<a.z&&a.copy(t),h>u.z&&u.copy(t)}}catch(ce){l.e(ce)}finally{l.f()}var b=qb.copy(o).subtract(n).magnitudeSquared(),v=qb.copy(s).subtract(i).magnitudeSquared(),y=qb.copy(u).subtract(a).magnitudeSquared(),w=n,A=o,C=b;v>C&&(C=v,w=i,A=s),y>C&&(C=y,w=a,A=u);var D=ejr;D.x=(w.x+A.x)*.5,D.y=(w.y+A.y)*.5,D.z=(w.z+A.z)*.5;var P=qb.copy(A).subtract(D).magnitudeSquared(),k=Math.sqrt(P),L=rjr;L.x=n.x,L.y=i.y,L.z=a.z;var I=tjr;I.x=o.x,I.y=s.y,I.z=u.z;var V=njr.copy(L).add(I).multiplyByScalar(.5),N=0,W=dSe(e),M;try{for(W.s();!(M=W.n()).done;){var H=M.value;t.copy(H);var X=qb.copy(t).subtract(V).magnitude();X>N&&(N=X);var ne=qb.copy(t).subtract(D).magnitudeSquared();if(ne>P){var ae=Math.sqrt(ne);k=(k+ae)*.5,P=k*k;var se=ae-k;D.x=(k*D.x+se*t.x)/ae,D.y=(k*D.y+se*t.y)/ae,D.z=(k*D.z+se*t.z)/ae}}}catch(ce){W.e(ce)}finally{W.f()}return k<N?(D.to(r.center),r.radius=k):(V.to(r.center),r.radius=N),r}});var rU=m(eU=>{"use strict";Object.defineProperty(eU,"__esModule",{value:!0});eU.default=sjr;var Sp=Xt(),ec=new Sp.Matrix3,ajr=new Sp.Matrix3,ojr=new Sp.Matrix3,Ck=new Sp.Matrix3,mSe=new Sp.Matrix3;function sjr(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=Sp._MathUtils.EPSILON20,n=10,i=0,a=0,o=ajr,s=ojr;o.identity(),s.copy(e);for(var u=t*ujr(s);a<n&&ljr(s)>u;)cjr(s,Ck),mSe.copy(Ck).transpose(),s.multiplyRight(Ck),s.multiplyLeft(mSe),o.multiplyRight(Ck),++i>2&&(++a,i=0);return r.unitary=o.toTarget(r.unitary),r.diagonal=s.toTarget(r.diagonal),r}function ujr(e){for(var r=0,t=0;t<9;++t){var n=e[t];r+=n*n}return Math.sqrt(r)}var QN=[1,0,0],ZN=[2,2,1];function ljr(e){for(var r=0,t=0;t<3;++t){var n=e[ec.getElementIndex(ZN[t],QN[t])];r+=2*n*n}return Math.sqrt(r)}function cjr(e,r){for(var t=Sp._MathUtils.EPSILON15,n=0,i=1,a=0;a<3;++a){var o=Math.abs(e[ec.getElementIndex(ZN[a],QN[a])]);o>n&&(i=a,n=o)}var s=QN[i],u=ZN[i],l=1,c=0;if(Math.abs(e[ec.getElementIndex(u,s)])>t){var f=e[ec.getElementIndex(u,u)],d=e[ec.getElementIndex(s,s)],p=e[ec.getElementIndex(u,s)],h=(f-d)/2/p,b;h<0?b=-1/(-h+Math.sqrt(1+h*h)):b=1/(h+Math.sqrt(1+h*h)),l=1/Math.sqrt(1+b*b),c=b*l}return Sp.Matrix3.IDENTITY.to(r),r[ec.getElementIndex(s,s)]=r[ec.getElementIndex(u,u)]=l,r[ec.getElementIndex(u,s)]=c,r[ec.getElementIndex(s,u)]=-c,r}});var vSe=m(kk=>{"use strict";var tU=ln();Object.defineProperty(kk,"__esModule",{value:!0});kk.makeOrientedBoundingBoxFromPoints=_jr;kk.makeAxisAlignedBoundingBoxFromPoints=Ejr;var Hs=Xt(),fjr=tU(rU()),djr=tU(VN()),pjr=tU(GN());function Dk(e,r){var t=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=hjr(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
161
161
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){t=t.call(e)},n:function(){var l=t.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(o)throw s}}}}function hjr(e,r){if(!!e){if(typeof e=="string")return gSe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return gSe(e,r)}}function gSe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var Ap=new Hs.Vector3,mjr=new Hs.Vector3,gjr=new Hs.Vector3,vjr=new Hs.Vector3,bjr=new Hs.Vector3,yjr=new Hs.Matrix3,xjr={diagonal:new Hs.Matrix3,unitary:new Hs.Matrix3};function _jr(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new djr.default;if(!e||e.length===0)return r.halfAxes=new Hs.Matrix3([0,0,0,0,0,0,0,0,0]),r.center=new Hs.Vector3,r;var t=e.length,n=new Hs.Vector3(0,0,0),i=Dk(e),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;n.add(o)}}catch(me){i.e(me)}finally{i.f()}var s=1/t;n.multiplyByScalar(s);var u=0,l=0,c=0,f=0,d=0,p=0,h=Dk(e),b;try{for(h.s();!(b=h.n()).done;){var v=b.value,y=Ap.copy(v).subtract(n);u+=y.x*y.x,l+=y.x*y.y,c+=y.x*y.z,f+=y.y*y.y,d+=y.y*y.z,p+=y.z*y.z}}catch(me){h.e(me)}finally{h.f()}u*=s,l*=s,c*=s,f*=s,d*=s,p*=s;var w=yjr;w[0]=u,w[1]=l,w[2]=c,w[3]=l,w[4]=f,w[5]=d,w[6]=c,w[7]=d,w[8]=p;var A=(0,fjr.default)(w,xjr),C=A.unitary,D=r.halfAxes.copy(C),P=D.getColumn(0,gjr),k=D.getColumn(1,vjr),L=D.getColumn(2,bjr),I=-Number.MAX_VALUE,V=-Number.MAX_VALUE,N=-Number.MAX_VALUE,W=Number.MAX_VALUE,M=Number.MAX_VALUE,H=Number.MAX_VALUE,X=Dk(e),ne;try{for(X.s();!(ne=X.n()).done;){var ae=ne.value;Ap.copy(ae),I=Math.max(Ap.dot(P),I),V=Math.max(Ap.dot(k),V),N=Math.max(Ap.dot(L),N),W=Math.min(Ap.dot(P),W),M=Math.min(Ap.dot(k),M),H=Math.min(Ap.dot(L),H)}}catch(me){X.e(me)}finally{X.f()}P=P.multiplyByScalar(.5*(W+I)),k=k.multiplyByScalar(.5*(M+V)),L=L.multiplyByScalar(.5*(H+N)),r.center.copy(P).add(k).add(L);var se=mjr.set(I-W,V-M,N-H).multiplyByScalar(.5),ce=new Hs.Matrix3([se[0],0,0,0,se[1],0,0,0,se[2]]);return r.halfAxes.multiplyRight(ce),r}function Ejr(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new pjr.default;if(!e||e.length===0)return r.minimum.set(0,0,0),r.maximum.set(0,0,0),r.center.set(0,0,0),r.halfDiagonal.set(0,0,0),r;var t=e[0][0],n=e[0][1],i=e[0][2],a=e[0][0],o=e[0][1],s=e[0][2],u=Dk(e),l;try{for(u.s();!(l=u.n()).done;){var c=l.value,f=c[0],d=c[1],p=c[2];t=Math.min(f,t),a=Math.max(f,a),n=Math.min(d,n),o=Math.max(d,o),i=Math.min(p,i),s=Math.max(p,s)}}catch(h){u.e(h)}finally{u.f()}return r.minimum.set(t,n,i),r.maximum.set(a,o,s),r.center.copy(r.minimum).add(r.maximum).scale(.5),r.halfDiagonal.copy(r.maximum).subtract(r.center),r}});var U0=m(Bo=>{"use strict";var bf=ln();Object.defineProperty(Bo,"__esModule",{value:!0});Object.defineProperty(Bo,"INTERSECTION",{enumerable:!0,get:function(){return wjr.INTERSECTION}});Object.defineProperty(Bo,"AxisAlignedBoundingBox",{enumerable:!0,get:function(){return Sjr.default}});Object.defineProperty(Bo,"BoundingSphere",{enumerable:!0,get:function(){return Ajr.default}});Object.defineProperty(Bo,"OrientedBoundingBox",{enumerable:!0,get:function(){return Tjr.default}});Object.defineProperty(Bo,"CullingVolume",{enumerable:!0,get:function(){return Cjr.default}});Object.defineProperty(Bo,"Plane",{enumerable:!0,get:function(){return Djr.default}});Object.defineProperty(Bo,"_PerspectiveOffCenterFrustum",{enumerable:!0,get:function(){return kjr.default}});Object.defineProperty(Bo,"_PerspectiveFrustum",{enumerable:!0,get:function(){return Ojr.default}});Object.defineProperty(Bo,"makeBoundingSphereFromPoints",{enumerable:!0,get:function(){return Rjr.default}});Object.defineProperty(Bo,"makeAxisAlignedBoundingBoxFromPoints",{enumerable:!0,get:function(){return bSe.makeAxisAlignedBoundingBoxFromPoints}});Object.defineProperty(Bo,"makeOrientedBoundingBoxFromPoints",{enumerable:!0,get:function(){return bSe.makeOrientedBoundingBoxFromPoints}});Object.defineProperty(Bo,"computeEigenDecomposition",{enumerable:!0,get:function(){return Fjr.default}});var wjr=Bb(),Sjr=bf(GN()),Ajr=bf(pk()),Tjr=bf(VN()),Cjr=bf($N()),Djr=bf(yk()),kjr=bf(XN()),Ojr=bf(fSe()),Rjr=bf(hSe()),bSe=vSe(),Fjr=bf(rU())});var lAe=m(Gk=>{var RU,qk,FU,Nk,eAe,IU,rAe,tAe,nAe=new Uint8Array([0]),Ia=[171,75,84,88,32,50,48,187,13,10,26,10];(function(e){e[e.NONE=0]="NONE",e[e.BASISLZ=1]="BASISLZ",e[e.ZSTD=2]="ZSTD",e[e.ZLIB=3]="ZLIB"})(RU||(RU={})),function(e){e[e.BASICFORMAT=0]="BASICFORMAT"}(qk||(qk={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ETC1S=163]="ETC1S",e[e.UASTC=166]="UASTC"}(FU||(FU={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.SRGB=1]="SRGB"}(Nk||(Nk={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.LINEAR=1]="LINEAR",e[e.SRGB=2]="SRGB",e[e.ITU=3]="ITU",e[e.NTSC=4]="NTSC",e[e.SLOG=5]="SLOG",e[e.SLOG2=6]="SLOG2"}(eAe||(eAe={})),function(e){e[e.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",e[e.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(IU||(IU={})),function(e){e[e.RGB=0]="RGB",e[e.RRR=3]="RRR",e[e.GGG=4]="GGG",e[e.AAA=15]="AAA"}(rAe||(rAe={})),function(e){e[e.RGB=0]="RGB",e[e.RGBA=3]="RGBA",e[e.RRR=4]="RRR",e[e.RRRG=5]="RRRG"}(tAe||(tAe={}));var iAe=function(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=RU.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:qk.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:FU.UNSPECIFIED,colorPrimaries:Nk.SRGB,transferFunction:Nk.SRGB,flags:IU.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null},L2=function(){function e(t,n,i,a){this._dataView=new DataView(t.buffer,t.byteOffset+n,i),this._littleEndian=a,this._offset=0}var r=e.prototype;return r._nextUint8=function(){var t=this._dataView.getUint8(this._offset);return this._offset+=1,t},r._nextUint16=function(){var t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t},r._nextUint32=function(){var t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t},r._nextUint64=function(){var t=this._dataView.getUint32(this._offset,this._littleEndian),n=this._dataView.getUint32(this._offset+4,this._littleEndian),i=t+Math.pow(2,32)*n;return this._offset+=8,i},r._skip=function(t){return this._offset+=t,this},r._scan=function(t,n){n===void 0&&(n=0);for(var i=this._offset,a=0;this._dataView.getUint8(this._offset)!==n&&a<t;)a++,this._offset++;return a<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+i,a)},e}();function PU(){return(PU=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function aAe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function oAe(e,r){var t;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(t=function(i,a){if(i){if(typeof i=="string")return aAe(i,void 0);var o=Object.prototype.toString.call(i).slice(8,-1);return o==="Object"&&i.constructor&&(o=i.constructor.name),o==="Map"||o==="Set"?Array.from(i):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?aAe(i,void 0):void 0}}(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
162
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return(t=e[Symbol.iterator]()).next.bind(t)}function sAe(e){return typeof TextEncoder!="undefined"?new TextEncoder().encode(e):Buffer.from(e)}function uAe(e){return typeof TextDecoder!="undefined"?new TextDecoder().decode(e):Buffer.from(e).toString("utf8")}function Uk(e){for(var r,t=0,n=oAe(e);!(r=n()).done;)t+=r.value.byteLength;for(var i,a=new Uint8Array(t),o=0,s=oAe(e);!(i=s()).done;){var u=i.value;a.set(new Uint8Array(u),o),o+=u.byteLength}return a}var XMr={keepWriter:!1};Gk.KTX2Container=iAe,Gk.read=function(e){var r=new Uint8Array(e.buffer,e.byteOffset,Ia.length);if(r[0]!==Ia[0]||r[1]!==Ia[1]||r[2]!==Ia[2]||r[3]!==Ia[3]||r[4]!==Ia[4]||r[5]!==Ia[5]||r[6]!==Ia[6]||r[7]!==Ia[7]||r[8]!==Ia[8]||r[9]!==Ia[9]||r[10]!==Ia[10]||r[11]!==Ia[11])throw new Error("Missing KTX 2.0 identifier.");var t=new iAe,n=17*Uint32Array.BYTES_PER_ELEMENT,i=new L2(e,Ia.length,n,!0);t.vkFormat=i._nextUint32(),t.typeSize=i._nextUint32(),t.pixelWidth=i._nextUint32(),t.pixelHeight=i._nextUint32(),t.pixelDepth=i._nextUint32(),t.layerCount=i._nextUint32(),t.faceCount=i._nextUint32();var a=i._nextUint32();t.supercompressionScheme=i._nextUint32();for(var o=i._nextUint32(),s=i._nextUint32(),u=i._nextUint32(),l=i._nextUint32(),c=i._nextUint64(),f=i._nextUint64(),d=new L2(e,Ia.length+n,3*a*8,!0),p=0;p<a;p++)t.levels.push({levelData:new Uint8Array(e.buffer,e.byteOffset+d._nextUint64(),d._nextUint64()),uncompressedByteLength:d._nextUint64()});for(var h=new L2(e,o,s,!0),b={vendorId:h._skip(4)._nextUint16(),descriptorType:h._nextUint16(),versionNumber:h._nextUint16(),descriptorBlockSize:h._nextUint16(),colorModel:h._nextUint8(),colorPrimaries:h._nextUint8(),transferFunction:h._nextUint8(),flags:h._nextUint8(),texelBlockDimension:{x:h._nextUint8()+1,y:h._nextUint8()+1,z:h._nextUint8()+1,w:h._nextUint8()+1},bytesPlane:[h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8()],samples:[]},v=(b.descriptorBlockSize/4-6)/4,y=0;y<v;y++)b.samples[y]={bitOffset:h._nextUint16(),bitLength:h._nextUint8(),channelID:h._nextUint8(),samplePosition:[h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8()],sampleLower:h._nextUint32(),sampleUpper:h._nextUint32()};t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(b);for(var w=new L2(e,u,l,!0);w._offset<l;){var A=w._nextUint32(),C=w._scan(A),D=uAe(C),P=w._scan(A-C.byteLength);t.keyValue[D]=D.match(/^ktx/i)?uAe(P):P,A%4&&w._skip(4-A%4)}if(f<=0)return t;for(var k=new L2(e,c,f,!0),L=k._nextUint16(),I=k._nextUint16(),V=k._nextUint32(),N=k._nextUint32(),W=k._nextUint32(),M=k._nextUint32(),H=[],X=0;X<a;X++)H.push({imageFlags:k._nextUint32(),rgbSliceByteOffset:k._nextUint32(),rgbSliceByteLength:k._nextUint32(),alphaSliceByteOffset:k._nextUint32(),alphaSliceByteLength:k._nextUint32()});var ne=c+k._offset,ae=ne+V,se=ae+N,ce=se+W,me=new Uint8Array(e.buffer,e.byteOffset+ne,V),Me=new Uint8Array(e.buffer,e.byteOffset+ae,N),Ie=new Uint8Array(e.buffer,e.byteOffset+se,W),Ue=new Uint8Array(e.buffer,e.byteOffset+ce,M);return t.globalData={endpointCount:L,selectorCount:I,imageDescs:H,endpointsData:me,selectorsData:Me,tablesData:Ie,extendedData:Ue},t},Gk.write=function(e,r){r===void 0&&(r={}),r=PU({},XMr,r);var t=new ArrayBuffer(0);if(e.globalData){var n=new ArrayBuffer(20+5*e.globalData.imageDescs.length*4),i=new DataView(n);i.setUint16(0,e.globalData.endpointCount,!0),i.setUint16(2,e.globalData.selectorCount,!0),i.setUint32(4,e.globalData.endpointsData.byteLength,!0),i.setUint32(8,e.globalData.selectorsData.byteLength,!0),i.setUint32(12,e.globalData.tablesData.byteLength,!0),i.setUint32(16,e.globalData.extendedData.byteLength,!0);for(var a=0;a<e.globalData.imageDescs.length;a++){var o=e.globalData.imageDescs[a];i.setUint32(20+5*a*4+0,o.imageFlags,!0),i.setUint32(20+5*a*4+4,o.rgbSliceByteOffset,!0),i.setUint32(20+5*a*4+8,o.rgbSliceByteLength,!0),i.setUint32(20+5*a*4+12,o.alphaSliceByteOffset,!0),i.setUint32(20+5*a*4+16,o.alphaSliceByteLength,!0)}t=Uk([n,e.globalData.endpointsData,e.globalData.selectorsData,e.globalData.tablesData,e.globalData.extendedData])}var s=[],u=e.keyValue;for(var l in r.keepWriter||(u=PU({},e.keyValue,{KTXwriter:"KTX-Parse v0.0.4"})),u){var c=u[l],f=sAe(l),d=typeof c=="string"?sAe(c):c,p=f.byteLength+1+d.byteLength+1,h=p%4?4-p%4:0;s.push(Uk([new Uint32Array([p]),f,nAe,d,nAe,new Uint8Array(h).fill(0)]))}var b=Uk(s),v=new ArrayBuffer(44),y=new DataView(v);if(e.dataFormatDescriptor.length!==1||e.dataFormatDescriptor[0].descriptorType!==qk.BASICFORMAT)throw new Error("Only BASICFORMAT Data Format Descriptor output supported.");var w=e.dataFormatDescriptor[0];y.setUint32(0,44,!0),y.setUint16(4,w.vendorId,!0),y.setUint16(6,w.descriptorType,!0),y.setUint16(8,w.versionNumber,!0),y.setUint16(10,w.descriptorBlockSize,!0),y.setUint8(12,w.colorModel),y.setUint8(13,w.colorPrimaries),y.setUint8(14,w.transferFunction),y.setUint8(15,w.flags),y.setUint8(16,w.texelBlockDimension.x-1),y.setUint8(17,w.texelBlockDimension.y-1),y.setUint8(18,w.texelBlockDimension.z-1),y.setUint8(19,w.texelBlockDimension.w-1);for(var A=0;A<8;A++)y.setUint8(20+A,w.bytesPlane[A]);for(var C=0;C<w.samples.length;C++){var D=w.samples[C],P=28+16*C;y.setUint16(P+0,D.bitOffset,!0),y.setUint8(P+2,D.bitLength),y.setUint8(P+3,D.channelID),y.setUint8(P+4,D.samplePosition[0]),y.setUint8(P+5,D.samplePosition[1]),y.setUint8(P+6,D.samplePosition[2]),y.setUint8(P+7,D.samplePosition[3]),y.setUint32(P+8,D.sampleLower,!0),y.setUint32(P+12,D.sampleUpper,!0)}var k=Ia.length+68+3*e.levels.length*8,L=k+v.byteLength,I=L+b.byteLength;I%8&&(I+=8-I%8);for(var V=[],N=new DataView(new ArrayBuffer(3*e.levels.length*8)),W=I+t.byteLength,M=0;M<e.levels.length;M++){var H=e.levels[M];V.push(H.levelData),N.setBigUint64(24*M+0,BigInt(W),!0),N.setBigUint64(24*M+8,BigInt(H.levelData.byteLength),!0),N.setBigUint64(24*M+16,BigInt(H.uncompressedByteLength),!0),W+=H.levelData.byteLength}var X=new ArrayBuffer(68),ne=new DataView(X);return ne.setUint32(0,e.vkFormat,!0),ne.setUint32(4,e.typeSize,!0),ne.setUint32(8,e.pixelWidth,!0),ne.setUint32(12,e.pixelHeight,!0),ne.setUint32(16,e.pixelDepth,!0),ne.setUint32(20,e.layerCount,!0),ne.setUint32(24,e.faceCount,!0),ne.setUint32(28,e.levels.length,!0),ne.setUint32(32,e.supercompressionScheme,!0),ne.setUint32(36,k,!0),ne.setUint32(40,v.byteLength,!0),ne.setUint32(44,L,!0),ne.setUint32(48,b.byteLength,!0),ne.setBigUint64(52,BigInt(I),!0),ne.setBigUint64(60,BigInt(t.byteLength),!0),new Uint8Array(Uk([new Uint8Array(Ia).buffer,X,N.buffer,v,b,new ArrayBuffer(I-(L+b.byteLength)),t].concat(V)))}});var CG=m(TG=>{"use strict";Object.defineProperty(TG,"__esModule",{value:!0});TG.default=i7r;var t7r=n7r(require("crypto"));function n7r(e){return e&&e.__esModule?e:{default:e}}var cO=new Uint8Array(256),fO=cO.length;function i7r(){return fO>cO.length-16&&(t7r.default.randomFillSync(cO),fO=0),cO.slice(fO,fO+=16)}});var qTe=m(dO=>{"use strict";Object.defineProperty(dO,"__esModule",{value:!0});dO.default=void 0;var a7r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;dO.default=a7r});var Y2=m(pO=>{"use strict";Object.defineProperty(pO,"__esModule",{value:!0});pO.default=void 0;var o7r=s7r(qTe());function s7r(e){return e&&e.__esModule?e:{default:e}}function u7r(e){return typeof e=="string"&&o7r.default.test(e)}var l7r=u7r;pO.default=l7r});var X2=m($2=>{"use strict";Object.defineProperty($2,"__esModule",{value:!0});$2.default=void 0;$2.unsafeStringify=NTe;var c7r=f7r(Y2());function f7r(e){return e&&e.__esModule?e:{default:e}}var Pa=[];for(let e=0;e<256;++e)Pa.push((e+256).toString(16).slice(1));function NTe(e,r=0){return(Pa[e[r+0]]+Pa[e[r+1]]+Pa[e[r+2]]+Pa[e[r+3]]+"-"+Pa[e[r+4]]+Pa[e[r+5]]+"-"+Pa[e[r+6]]+Pa[e[r+7]]+"-"+Pa[e[r+8]]+Pa[e[r+9]]+"-"+Pa[e[r+10]]+Pa[e[r+11]]+Pa[e[r+12]]+Pa[e[r+13]]+Pa[e[r+14]]+Pa[e[r+15]]).toLowerCase()}function d7r(e,r=0){let t=NTe(e,r);if(!(0,c7r.default)(t))throw TypeError("Stringified UUID is invalid");return t}var p7r=d7r;$2.default=p7r});var GTe=m(hO=>{"use strict";Object.defineProperty(hO,"__esModule",{value:!0});hO.default=void 0;var h7r=g7r(CG()),m7r=X2();function g7r(e){return e&&e.__esModule?e:{default:e}}var UTe,DG,kG=0,OG=0;function v7r(e,r,t){let n=r&&t||0,i=r||new Array(16);e=e||{};let a=e.node||UTe,o=e.clockseq!==void 0?e.clockseq:DG;if(a==null||o==null){let d=e.random||(e.rng||h7r.default)();a==null&&(a=UTe=[d[0]|1,d[1],d[2],d[3],d[4],d[5]]),o==null&&(o=DG=(d[6]<<8|d[7])&16383)}let s=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:OG+1,l=s-kG+(u-OG)/1e4;if(l<0&&e.clockseq===void 0&&(o=o+1&16383),(l<0||s>kG)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");kG=s,OG=u,DG=o,s+=122192928e5;let c=((s&268435455)*1e4+u)%4294967296;i[n++]=c>>>24&255,i[n++]=c>>>16&255,i[n++]=c>>>8&255,i[n++]=c&255;let f=s/4294967296*1e4&268435455;i[n++]=f>>>8&255,i[n++]=f&255,i[n++]=f>>>24&15|16,i[n++]=f>>>16&255,i[n++]=o>>>8|128,i[n++]=o&255;for(let d=0;d<6;++d)i[n+d]=a[d];return r||(0,m7r.unsafeStringify)(i)}var b7r=v7r;hO.default=b7r});var RG=m(mO=>{"use strict";Object.defineProperty(mO,"__esModule",{value:!0});mO.default=void 0;var y7r=x7r(Y2());function x7r(e){return e&&e.__esModule?e:{default:e}}function _7r(e){if(!(0,y7r.default)(e))throw TypeError("Invalid UUID");let r,t=new Uint8Array(16);return t[0]=(r=parseInt(e.slice(0,8),16))>>>24,t[1]=r>>>16&255,t[2]=r>>>8&255,t[3]=r&255,t[4]=(r=parseInt(e.slice(9,13),16))>>>8,t[5]=r&255,t[6]=(r=parseInt(e.slice(14,18),16))>>>8,t[7]=r&255,t[8]=(r=parseInt(e.slice(19,23),16))>>>8,t[9]=r&255,t[10]=(r=parseInt(e.slice(24,36),16))/1099511627776&255,t[11]=r/4294967296&255,t[12]=r>>>24&255,t[13]=r>>>16&255,t[14]=r>>>8&255,t[15]=r&255,t}var E7r=_7r;mO.default=E7r});var FG=m(X0=>{"use strict";Object.defineProperty(X0,"__esModule",{value:!0});X0.URL=X0.DNS=void 0;X0.default=C7r;var w7r=X2(),S7r=A7r(RG());function A7r(e){return e&&e.__esModule?e:{default:e}}function T7r(e){e=unescape(encodeURIComponent(e));let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t));return r}var zTe="6ba7b810-9dad-11d1-80b4-00c04fd430c8";X0.DNS=zTe;var HTe="6ba7b811-9dad-11d1-80b4-00c04fd430c8";X0.URL=HTe;function C7r(e,r,t){function n(i,a,o,s){var u;if(typeof i=="string"&&(i=T7r(i)),typeof a=="string"&&(a=(0,S7r.default)(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+i.length);if(l.set(a),l.set(i,a.length),l=t(l),l[6]=l[6]&15|r,l[8]=l[8]&63|128,o){s=s||0;for(let c=0;c<16;++c)o[s+c]=l[c];return o}return(0,w7r.unsafeStringify)(l)}try{n.name=e}catch{}return n.DNS=zTe,n.URL=HTe,n}});var WTe=m(gO=>{"use strict";Object.defineProperty(gO,"__esModule",{value:!0});gO.default=void 0;var D7r=k7r(require("crypto"));function k7r(e){return e&&e.__esModule?e:{default:e}}function O7r(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),D7r.default.createHash("md5").update(e).digest()}var R7r=O7r;gO.default=R7r});var KTe=m(vO=>{"use strict";Object.defineProperty(vO,"__esModule",{value:!0});vO.default=void 0;var F7r=VTe(FG()),I7r=VTe(WTe());function VTe(e){return e&&e.__esModule?e:{default:e}}var P7r=(0,F7r.default)("v3",48,I7r.default),B7r=P7r;vO.default=B7r});var YTe=m(bO=>{"use strict";Object.defineProperty(bO,"__esModule",{value:!0});bO.default=void 0;var j7r=M7r(require("crypto"));function M7r(e){return e&&e.__esModule?e:{default:e}}var L7r={randomUUID:j7r.default.randomUUID};bO.default=L7r});var JTe=m(yO=>{"use strict";Object.defineProperty(yO,"__esModule",{value:!0});yO.default=void 0;var $Te=XTe(YTe()),q7r=XTe(CG()),N7r=X2();function XTe(e){return e&&e.__esModule?e:{default:e}}function U7r(e,r,t){if($Te.default.randomUUID&&!r&&!e)return $Te.default.randomUUID();e=e||{};let n=e.random||(e.rng||q7r.default)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){t=t||0;for(let i=0;i<16;++i)r[t+i]=n[i];return r}return(0,N7r.unsafeStringify)(n)}var G7r=U7r;yO.default=G7r});var QTe=m(xO=>{"use strict";Object.defineProperty(xO,"__esModule",{value:!0});xO.default=void 0;var z7r=H7r(require("crypto"));function H7r(e){return e&&e.__esModule?e:{default:e}}function W7r(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),z7r.default.createHash("sha1").update(e).digest()}var V7r=W7r;xO.default=V7r});var e3e=m(_O=>{"use strict";Object.defineProperty(_O,"__esModule",{value:!0});_O.default=void 0;var K7r=ZTe(FG()),Y7r=ZTe(QTe());function ZTe(e){return e&&e.__esModule?e:{default:e}}var $7r=(0,K7r.default)("v5",80,Y7r.default),X7r=$7r;_O.default=X7r});var r3e=m(EO=>{"use strict";Object.defineProperty(EO,"__esModule",{value:!0});EO.default=void 0;var J7r="00000000-0000-0000-0000-000000000000";EO.default=J7r});var t3e=m(wO=>{"use strict";Object.defineProperty(wO,"__esModule",{value:!0});wO.default=void 0;var Q7r=Z7r(Y2());function Z7r(e){return e&&e.__esModule?e:{default:e}}function eNr(e){if(!(0,Q7r.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}var rNr=eNr;wO.default=rNr});var n3e=m(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Object.defineProperty(Ku,"NIL",{enumerable:!0,get:function(){return oNr.default}});Object.defineProperty(Ku,"parse",{enumerable:!0,get:function(){return cNr.default}});Object.defineProperty(Ku,"stringify",{enumerable:!0,get:function(){return lNr.default}});Object.defineProperty(Ku,"v1",{enumerable:!0,get:function(){return tNr.default}});Object.defineProperty(Ku,"v3",{enumerable:!0,get:function(){return nNr.default}});Object.defineProperty(Ku,"v4",{enumerable:!0,get:function(){return iNr.default}});Object.defineProperty(Ku,"v5",{enumerable:!0,get:function(){return aNr.default}});Object.defineProperty(Ku,"validate",{enumerable:!0,get:function(){return uNr.default}});Object.defineProperty(Ku,"version",{enumerable:!0,get:function(){return sNr.default}});var tNr=Af(GTe()),nNr=Af(KTe()),iNr=Af(JTe()),aNr=Af(e3e()),oNr=Af(r3e()),sNr=Af(t3e()),uNr=Af(Y2()),lNr=Af(X2()),cNr=Af(RG());function Af(e){return e&&e.__esModule?e:{default:e}}});var J2=m((rFt,a3e)=>{var i3e=e=>e==null,fNr=(e,r)=>{let t=r.split("."),n=!0,i=Object.assign({},e);return t.forEach(a=>{n=i&&n&&Object.keys(i).indexOf(a)>-1,i=i[a]}),n},dNr=(e,r)=>{let t=r.split("."),n=Object.assign({},e);return t.forEach(i=>{n=n&&!i3e(n[i])?n[i]:void 0}),n},pNr=(e,r,t)=>{let n=e,i=r.split(".");return i.forEach((a,o)=>{n[a]||(n[a]=o==i.length-1?t:{}),n=n[a]}),e};a3e.exports={has:fNr,get:dNr,set:pNr,isUndefined:i3e}});var l3e=m((tFt,u3e)=>{var hNr=J2().get,mNr=J2().set,gNr=J2().has,o3e=J2().isUndefined,vNr=(e,r,t,n,i)=>{let a=e[r].default,o=e[r].transform,s=e[r].omitValues||[],u=o?o(t,n,i):t;return o3e(u)&&!o3e(a)&&(u=a),s.indexOf(u)==-1?mNr(Object.assign({},n),r,u):n},bNr=(e,r,t)=>{let n=Object.keys(r).reduce((i,a)=>{let o=Array.isArray(r[a].path)?r[a].path.filter(u=>gNr(e,u))[0]:r[a].path,s=o?hNr(e,o):void 0;return vNr(r,a,s,i,e)},{});return t?t(n,e):n},yNr=(e,r,t)=>e.map(n=>{let i=s3e(n,r);return t?t(i,n):i}),s3e=(e,r,t)=>Array.isArray(e)?yNr(e,r,t):bNr(e,r,t);u3e.exports=s3e});var Yu=m((nFt,c3e)=>{var xNr=l3e();c3e.exports=xNr});var IG=m((iFt,f3e)=>{(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(t,n){return t<<n|t>>>32-n},rotr:function(t,n){return t<<32-n|t>>>n},endian:function(t){if(t.constructor==Number)return r.rotl(t,8)&16711935|r.rotl(t,24)&4278255360;for(var n=0;n<t.length;n++)t[n]=r.endian(t[n]);return t},randomBytes:function(t){for(var n=[];t>0;t--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(t){for(var n=[],i=0,a=0;i<t.length;i++,a+=8)n[a>>>5]|=t[i]<<24-a%32;return n},wordsToBytes:function(t){for(var n=[],i=0;i<t.length*32;i+=8)n.push(t[i>>>5]>>>24-i%32&255);return n},bytesToHex:function(t){for(var n=[],i=0;i<t.length;i++)n.push((t[i]>>>4).toString(16)),n.push((t[i]&15).toString(16));return n.join("")},hexToBytes:function(t){for(var n=[],i=0;i<t.length;i+=2)n.push(parseInt(t.substr(i,2),16));return n},bytesToBase64:function(t){for(var n=[],i=0;i<t.length;i+=3)for(var a=t[i]<<16|t[i+1]<<8|t[i+2],o=0;o<4;o++)i*8+o*6<=t.length*8?n.push(e.charAt(a>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],i=0,a=0;i<t.length;a=++i%4)a!=0&&n.push((e.indexOf(t.charAt(i-1))&Math.pow(2,-2*a+8)-1)<<a*2|e.indexOf(t.charAt(i))>>>6-a*2);return n}};f3e.exports=r})()});var BG=m((aFt,d3e)=>{var PG={utf8:{stringToBytes:function(e){return PG.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(PG.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var r=[],t=0;t<e.length;t++)r.push(e.charCodeAt(t)&255);return r},bytesToString:function(e){for(var r=[],t=0;t<e.length;t++)r.push(String.fromCharCode(e[t]));return r.join("")}}};d3e.exports=PG});var jG=m((oFt,p3e)=>{(function(){var e=IG(),r=BG().utf8,t=OI(),n=BG().bin,i=function(a,o){a.constructor==String?o&&o.encoding==="binary"?a=n.stringToBytes(a):a=r.stringToBytes(a):t(a)?a=Array.prototype.slice.call(a,0):!Array.isArray(a)&&a.constructor!==Uint8Array&&(a=a.toString());for(var s=e.bytesToWords(a),u=a.length*8,l=1732584193,c=-271733879,f=-1732584194,d=271733878,p=0;p<s.length;p++)s[p]=(s[p]<<8|s[p]>>>24)&16711935|(s[p]<<24|s[p]>>>8)&4278255360;s[u>>>5]|=128<<u%32,s[(u+64>>>9<<4)+14]=u;for(var h=i._ff,b=i._gg,v=i._hh,y=i._ii,p=0;p<s.length;p+=16){var w=l,A=c,C=f,D=d;l=h(l,c,f,d,s[p+0],7,-680876936),d=h(d,l,c,f,s[p+1],12,-389564586),f=h(f,d,l,c,s[p+2],17,606105819),c=h(c,f,d,l,s[p+3],22,-1044525330),l=h(l,c,f,d,s[p+4],7,-176418897),d=h(d,l,c,f,s[p+5],12,1200080426),f=h(f,d,l,c,s[p+6],17,-1473231341),c=h(c,f,d,l,s[p+7],22,-45705983),l=h(l,c,f,d,s[p+8],7,1770035416),d=h(d,l,c,f,s[p+9],12,-1958414417),f=h(f,d,l,c,s[p+10],17,-42063),c=h(c,f,d,l,s[p+11],22,-1990404162),l=h(l,c,f,d,s[p+12],7,1804603682),d=h(d,l,c,f,s[p+13],12,-40341101),f=h(f,d,l,c,s[p+14],17,-1502002290),c=h(c,f,d,l,s[p+15],22,1236535329),l=b(l,c,f,d,s[p+1],5,-165796510),d=b(d,l,c,f,s[p+6],9,-1069501632),f=b(f,d,l,c,s[p+11],14,643717713),c=b(c,f,d,l,s[p+0],20,-373897302),l=b(l,c,f,d,s[p+5],5,-701558691),d=b(d,l,c,f,s[p+10],9,38016083),f=b(f,d,l,c,s[p+15],14,-660478335),c=b(c,f,d,l,s[p+4],20,-405537848),l=b(l,c,f,d,s[p+9],5,568446438),d=b(d,l,c,f,s[p+14],9,-1019803690),f=b(f,d,l,c,s[p+3],14,-187363961),c=b(c,f,d,l,s[p+8],20,1163531501),l=b(l,c,f,d,s[p+13],5,-1444681467),d=b(d,l,c,f,s[p+2],9,-51403784),f=b(f,d,l,c,s[p+7],14,1735328473),c=b(c,f,d,l,s[p+12],20,-1926607734),l=v(l,c,f,d,s[p+5],4,-378558),d=v(d,l,c,f,s[p+8],11,-2022574463),f=v(f,d,l,c,s[p+11],16,1839030562),c=v(c,f,d,l,s[p+14],23,-35309556),l=v(l,c,f,d,s[p+1],4,-1530992060),d=v(d,l,c,f,s[p+4],11,1272893353),f=v(f,d,l,c,s[p+7],16,-155497632),c=v(c,f,d,l,s[p+10],23,-1094730640),l=v(l,c,f,d,s[p+13],4,681279174),d=v(d,l,c,f,s[p+0],11,-358537222),f=v(f,d,l,c,s[p+3],16,-722521979),c=v(c,f,d,l,s[p+6],23,76029189),l=v(l,c,f,d,s[p+9],4,-640364487),d=v(d,l,c,f,s[p+12],11,-421815835),f=v(f,d,l,c,s[p+15],16,530742520),c=v(c,f,d,l,s[p+2],23,-995338651),l=y(l,c,f,d,s[p+0],6,-198630844),d=y(d,l,c,f,s[p+7],10,1126891415),f=y(f,d,l,c,s[p+14],15,-1416354905),c=y(c,f,d,l,s[p+5],21,-57434055),l=y(l,c,f,d,s[p+12],6,1700485571),d=y(d,l,c,f,s[p+3],10,-1894986606),f=y(f,d,l,c,s[p+10],15,-1051523),c=y(c,f,d,l,s[p+1],21,-2054922799),l=y(l,c,f,d,s[p+8],6,1873313359),d=y(d,l,c,f,s[p+15],10,-30611744),f=y(f,d,l,c,s[p+6],15,-1560198380),c=y(c,f,d,l,s[p+13],21,1309151649),l=y(l,c,f,d,s[p+4],6,-145523070),d=y(d,l,c,f,s[p+11],10,-1120210379),f=y(f,d,l,c,s[p+2],15,718787259),c=y(c,f,d,l,s[p+9],21,-343485551),l=l+w>>>0,c=c+A>>>0,f=f+C>>>0,d=d+D>>>0}return e.endian([l,c,f,d])};i._ff=function(a,o,s,u,l,c,f){var d=a+(o&s|~o&u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},i._gg=function(a,o,s,u,l,c,f){var d=a+(o&u|s&~u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},i._hh=function(a,o,s,u,l,c,f){var d=a+(o^s^u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},i._ii=function(a,o,s,u,l,c,f){var d=a+(s^(o|~u))+(l>>>0)+f;return(d<<c|d>>>32-c)+o},i._blocksize=16,i._digestsize=16,p3e.exports=function(a,o){if(a==null)throw new Error("Illegal argument "+a);var s=e.wordsToBytes(i(a,o));return o&&o.asBytes?s:o&&o.asString?n.bytesToString(s):e.bytesToHex(s)}})()});var g3e=m((uFt,m3e)=>{var _Nr=typeof process=="object"&&process&&process.platform==="win32";m3e.exports=_Nr?{sep:"\\"}:{sep:"/"}});var MG=m((lFt,x3e)=>{"use strict";x3e.exports=v3e;function v3e(e,r,t){e instanceof RegExp&&(e=b3e(e,t)),r instanceof RegExp&&(r=b3e(r,t));var n=y3e(e,r,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+e.length,n[1]),post:t.slice(n[1]+r.length)}}function b3e(e,r){var t=r.match(e);return t?t[0]:null}v3e.range=y3e;function y3e(e,r,t){var n,i,a,o,s,u=t.indexOf(e),l=t.indexOf(r,u+1),c=u;if(u>=0&&l>0){if(e===r)return[u,l];for(n=[],a=t.length;c>=0&&!s;)c==u?(n.push(c),u=t.indexOf(e,c+1)):n.length==1?s=[n.pop(),l]:(i=n.pop(),i<a&&(a=i,o=l),l=t.indexOf(r,c+1)),c=u<l&&u>=0?u:l;n.length&&(s=[a,o])}return s}});var D3e=m((cFt,C3e)=>{var _3e=MG();C3e.exports=SNr;var E3e="\0SLASH"+Math.random()+"\0",w3e="\0OPEN"+Math.random()+"\0",LG="\0CLOSE"+Math.random()+"\0",S3e="\0COMMA"+Math.random()+"\0",A3e="\0PERIOD"+Math.random()+"\0";function qG(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function ENr(e){return e.split("\\\\").join(E3e).split("\\{").join(w3e).split("\\}").join(LG).split("\\,").join(S3e).split("\\.").join(A3e)}function wNr(e){return e.split(E3e).join("\\").split(w3e).join("{").split(LG).join("}").split(S3e).join(",").split(A3e).join(".")}function T3e(e){if(!e)return[""];var r=[],t=_3e("{","}",e);if(!t)return e.split(",");var n=t.pre,i=t.body,a=t.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var s=T3e(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),r.push.apply(r,o),r}function SNr(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),Q2(ENr(e),!0).map(wNr)):[]}function ANr(e){return"{"+e+"}"}function TNr(e){return/^-?0\d/.test(e)}function CNr(e,r){return e<=r}function DNr(e,r){return e>=r}function Q2(e,r){var t=[],n=_3e("{","}",e);if(!n)return[e];var i=n.pre,a=n.post.length?Q2(n.post,!1):[""];if(/\$$/.test(n.pre))for(var o=0;o<a.length;o++){var s=i+"{"+n.body+"}"+a[o];t.push(s)}else{var u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),c=u||l,f=n.body.indexOf(",")>=0;if(!c&&!f)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+LG+n.post,Q2(e)):[e];var d;if(c)d=n.body.split(/\.\./);else if(d=T3e(n.body),d.length===1&&(d=Q2(d[0],!1).map(ANr),d.length===1))return a.map(function(V){return n.pre+d[0]+V});var p;if(c){var h=qG(d[0]),b=qG(d[1]),v=Math.max(d[0].length,d[1].length),y=d.length==3?Math.abs(qG(d[2])):1,w=CNr,A=b<h;A&&(y*=-1,w=DNr);var C=d.some(TNr);p=[];for(var D=h;w(D,b);D+=y){var P;if(l)P=String.fromCharCode(D),P==="\\"&&(P="");else if(P=String(D),C){var k=v-P.length;if(k>0){var L=new Array(k+1).join("0");D<0?P="-"+L+P.slice(1):P=L+P}}p.push(P)}}else{p=[];for(var I=0;I<d.length;I++)p.push.apply(p,Q2(d[I],!1))}for(var I=0;I<p.length;I++)for(var o=0;o<a.length;o++){var s=i+p[I]+a[o];(!r||c||s)&&t.push(s)}}return t}});var P3e=m((dFt,HG)=>{var is=HG.exports=(e,r,t={})=>(SO(r),!t.nocomment&&r.charAt(0)==="#"?!1:new Z2(r,t).match(e));HG.exports=is;var NG=g3e();is.sep=NG.sep;var $u=Symbol("globstar **");is.GLOBSTAR=$u;var kNr=D3e(),k3e={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},UG="[^/]",GG=UG+"*?",ONr="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",RNr="(?:(?!(?:\\/|^)\\.).)*?",O3e=e=>e.split("").reduce((r,t)=>(r[t]=!0,r),{}),R3e=O3e("().*{}+?[]^$\\!"),FNr=O3e("[.("),F3e=/\/+/;is.filter=(e,r={})=>(t,n,i)=>is(t,e,r);var Pp=(e,r={})=>{let t={};return Object.keys(e).forEach(n=>t[n]=e[n]),Object.keys(r).forEach(n=>t[n]=r[n]),t};is.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return is;let r=is,t=(n,i,a)=>r(n,i,Pp(e,a));return t.Minimatch=class extends r.Minimatch{constructor(i,a){super(i,Pp(e,a))}},t.Minimatch.defaults=n=>r.defaults(Pp(e,n)).Minimatch,t.filter=(n,i)=>r.filter(n,Pp(e,i)),t.defaults=n=>r.defaults(Pp(e,n)),t.makeRe=(n,i)=>r.makeRe(n,Pp(e,i)),t.braceExpand=(n,i)=>r.braceExpand(n,Pp(e,i)),t.match=(n,i,a)=>r.match(n,i,Pp(e,a)),t};is.braceExpand=(e,r)=>I3e(e,r);var I3e=(e,r={})=>(SO(e),r.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:kNr(e)),INr=1024*64,SO=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>INr)throw new TypeError("pattern is too long")},zG=Symbol("subparse");is.makeRe=(e,r)=>new Z2(e,r||{}).makeRe();is.match=(e,r,t={})=>{let n=new Z2(r,t);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(r),e};var PNr=e=>e.replace(/\\(.)/g,"$1"),BNr=e=>e.replace(/\\([^-\]])/g,"$1"),jNr=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),MNr=e=>e.replace(/[[\]\\]/g,"\\$&"),Z2=class{constructor(r,t){SO(r),t||(t={}),this.options=t,this.set=[],this.pattern=r,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){let r=this.pattern,t=this.options;if(!t.nocomment&&r.charAt(0)==="#"){this.comment=!0;return}if(!r){this.empty=!0;return}this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,n),n=this.globParts=n.map(i=>i.split(F3e)),this.debug(this.pattern,n),n=n.map((i,a,o)=>i.map(this.parse,this)),this.debug(this.pattern,n),n=n.filter(i=>i.indexOf(!1)===-1),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;let r=this.pattern,t=!1,n=0;for(let i=0;i<r.length&&r.charAt(i)==="!";i++)t=!t,n++;n&&(this.pattern=r.slice(n)),this.negate=t}matchOne(r,t,n){var i=this.options;this.debug("matchOne",{this:this,file:r,pattern:t}),this.debug("matchOne",r.length,t.length);for(var a=0,o=0,s=r.length,u=t.length;a<s&&o<u;a++,o++){this.debug("matchOne loop");var l=t[o],c=r[a];if(this.debug(t,l,c),l===!1)return!1;if(l===$u){this.debug("GLOBSTAR",[t,l,c]);var f=a,d=o+1;if(d===u){for(this.debug("** at the end");a<s;a++)if(r[a]==="."||r[a]===".."||!i.dot&&r[a].charAt(0)===".")return!1;return!0}for(;f<s;){var p=r[f];if(this.debug(`
|
|
162
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return(t=e[Symbol.iterator]()).next.bind(t)}function sAe(e){return typeof TextEncoder!="undefined"?new TextEncoder().encode(e):Buffer.from(e)}function uAe(e){return typeof TextDecoder!="undefined"?new TextDecoder().decode(e):Buffer.from(e).toString("utf8")}function Uk(e){for(var r,t=0,n=oAe(e);!(r=n()).done;)t+=r.value.byteLength;for(var i,a=new Uint8Array(t),o=0,s=oAe(e);!(i=s()).done;){var u=i.value;a.set(new Uint8Array(u),o),o+=u.byteLength}return a}var XMr={keepWriter:!1};Gk.KTX2Container=iAe,Gk.read=function(e){var r=new Uint8Array(e.buffer,e.byteOffset,Ia.length);if(r[0]!==Ia[0]||r[1]!==Ia[1]||r[2]!==Ia[2]||r[3]!==Ia[3]||r[4]!==Ia[4]||r[5]!==Ia[5]||r[6]!==Ia[6]||r[7]!==Ia[7]||r[8]!==Ia[8]||r[9]!==Ia[9]||r[10]!==Ia[10]||r[11]!==Ia[11])throw new Error("Missing KTX 2.0 identifier.");var t=new iAe,n=17*Uint32Array.BYTES_PER_ELEMENT,i=new L2(e,Ia.length,n,!0);t.vkFormat=i._nextUint32(),t.typeSize=i._nextUint32(),t.pixelWidth=i._nextUint32(),t.pixelHeight=i._nextUint32(),t.pixelDepth=i._nextUint32(),t.layerCount=i._nextUint32(),t.faceCount=i._nextUint32();var a=i._nextUint32();t.supercompressionScheme=i._nextUint32();for(var o=i._nextUint32(),s=i._nextUint32(),u=i._nextUint32(),l=i._nextUint32(),c=i._nextUint64(),f=i._nextUint64(),d=new L2(e,Ia.length+n,3*a*8,!0),p=0;p<a;p++)t.levels.push({levelData:new Uint8Array(e.buffer,e.byteOffset+d._nextUint64(),d._nextUint64()),uncompressedByteLength:d._nextUint64()});for(var h=new L2(e,o,s,!0),b={vendorId:h._skip(4)._nextUint16(),descriptorType:h._nextUint16(),versionNumber:h._nextUint16(),descriptorBlockSize:h._nextUint16(),colorModel:h._nextUint8(),colorPrimaries:h._nextUint8(),transferFunction:h._nextUint8(),flags:h._nextUint8(),texelBlockDimension:{x:h._nextUint8()+1,y:h._nextUint8()+1,z:h._nextUint8()+1,w:h._nextUint8()+1},bytesPlane:[h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8()],samples:[]},v=(b.descriptorBlockSize/4-6)/4,y=0;y<v;y++)b.samples[y]={bitOffset:h._nextUint16(),bitLength:h._nextUint8(),channelID:h._nextUint8(),samplePosition:[h._nextUint8(),h._nextUint8(),h._nextUint8(),h._nextUint8()],sampleLower:h._nextUint32(),sampleUpper:h._nextUint32()};t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(b);for(var w=new L2(e,u,l,!0);w._offset<l;){var A=w._nextUint32(),C=w._scan(A),D=uAe(C),P=w._scan(A-C.byteLength);t.keyValue[D]=D.match(/^ktx/i)?uAe(P):P,A%4&&w._skip(4-A%4)}if(f<=0)return t;for(var k=new L2(e,c,f,!0),L=k._nextUint16(),I=k._nextUint16(),V=k._nextUint32(),N=k._nextUint32(),W=k._nextUint32(),M=k._nextUint32(),H=[],X=0;X<a;X++)H.push({imageFlags:k._nextUint32(),rgbSliceByteOffset:k._nextUint32(),rgbSliceByteLength:k._nextUint32(),alphaSliceByteOffset:k._nextUint32(),alphaSliceByteLength:k._nextUint32()});var ne=c+k._offset,ae=ne+V,se=ae+N,ce=se+W,me=new Uint8Array(e.buffer,e.byteOffset+ne,V),Me=new Uint8Array(e.buffer,e.byteOffset+ae,N),Ie=new Uint8Array(e.buffer,e.byteOffset+se,W),Ue=new Uint8Array(e.buffer,e.byteOffset+ce,M);return t.globalData={endpointCount:L,selectorCount:I,imageDescs:H,endpointsData:me,selectorsData:Me,tablesData:Ie,extendedData:Ue},t},Gk.write=function(e,r){r===void 0&&(r={}),r=PU({},XMr,r);var t=new ArrayBuffer(0);if(e.globalData){var n=new ArrayBuffer(20+5*e.globalData.imageDescs.length*4),i=new DataView(n);i.setUint16(0,e.globalData.endpointCount,!0),i.setUint16(2,e.globalData.selectorCount,!0),i.setUint32(4,e.globalData.endpointsData.byteLength,!0),i.setUint32(8,e.globalData.selectorsData.byteLength,!0),i.setUint32(12,e.globalData.tablesData.byteLength,!0),i.setUint32(16,e.globalData.extendedData.byteLength,!0);for(var a=0;a<e.globalData.imageDescs.length;a++){var o=e.globalData.imageDescs[a];i.setUint32(20+5*a*4+0,o.imageFlags,!0),i.setUint32(20+5*a*4+4,o.rgbSliceByteOffset,!0),i.setUint32(20+5*a*4+8,o.rgbSliceByteLength,!0),i.setUint32(20+5*a*4+12,o.alphaSliceByteOffset,!0),i.setUint32(20+5*a*4+16,o.alphaSliceByteLength,!0)}t=Uk([n,e.globalData.endpointsData,e.globalData.selectorsData,e.globalData.tablesData,e.globalData.extendedData])}var s=[],u=e.keyValue;for(var l in r.keepWriter||(u=PU({},e.keyValue,{KTXwriter:"KTX-Parse v0.0.4"})),u){var c=u[l],f=sAe(l),d=typeof c=="string"?sAe(c):c,p=f.byteLength+1+d.byteLength+1,h=p%4?4-p%4:0;s.push(Uk([new Uint32Array([p]),f,nAe,d,nAe,new Uint8Array(h).fill(0)]))}var b=Uk(s),v=new ArrayBuffer(44),y=new DataView(v);if(e.dataFormatDescriptor.length!==1||e.dataFormatDescriptor[0].descriptorType!==qk.BASICFORMAT)throw new Error("Only BASICFORMAT Data Format Descriptor output supported.");var w=e.dataFormatDescriptor[0];y.setUint32(0,44,!0),y.setUint16(4,w.vendorId,!0),y.setUint16(6,w.descriptorType,!0),y.setUint16(8,w.versionNumber,!0),y.setUint16(10,w.descriptorBlockSize,!0),y.setUint8(12,w.colorModel),y.setUint8(13,w.colorPrimaries),y.setUint8(14,w.transferFunction),y.setUint8(15,w.flags),y.setUint8(16,w.texelBlockDimension.x-1),y.setUint8(17,w.texelBlockDimension.y-1),y.setUint8(18,w.texelBlockDimension.z-1),y.setUint8(19,w.texelBlockDimension.w-1);for(var A=0;A<8;A++)y.setUint8(20+A,w.bytesPlane[A]);for(var C=0;C<w.samples.length;C++){var D=w.samples[C],P=28+16*C;y.setUint16(P+0,D.bitOffset,!0),y.setUint8(P+2,D.bitLength),y.setUint8(P+3,D.channelID),y.setUint8(P+4,D.samplePosition[0]),y.setUint8(P+5,D.samplePosition[1]),y.setUint8(P+6,D.samplePosition[2]),y.setUint8(P+7,D.samplePosition[3]),y.setUint32(P+8,D.sampleLower,!0),y.setUint32(P+12,D.sampleUpper,!0)}var k=Ia.length+68+3*e.levels.length*8,L=k+v.byteLength,I=L+b.byteLength;I%8&&(I+=8-I%8);for(var V=[],N=new DataView(new ArrayBuffer(3*e.levels.length*8)),W=I+t.byteLength,M=0;M<e.levels.length;M++){var H=e.levels[M];V.push(H.levelData),N.setBigUint64(24*M+0,BigInt(W),!0),N.setBigUint64(24*M+8,BigInt(H.levelData.byteLength),!0),N.setBigUint64(24*M+16,BigInt(H.uncompressedByteLength),!0),W+=H.levelData.byteLength}var X=new ArrayBuffer(68),ne=new DataView(X);return ne.setUint32(0,e.vkFormat,!0),ne.setUint32(4,e.typeSize,!0),ne.setUint32(8,e.pixelWidth,!0),ne.setUint32(12,e.pixelHeight,!0),ne.setUint32(16,e.pixelDepth,!0),ne.setUint32(20,e.layerCount,!0),ne.setUint32(24,e.faceCount,!0),ne.setUint32(28,e.levels.length,!0),ne.setUint32(32,e.supercompressionScheme,!0),ne.setUint32(36,k,!0),ne.setUint32(40,v.byteLength,!0),ne.setUint32(44,L,!0),ne.setUint32(48,b.byteLength,!0),ne.setBigUint64(52,BigInt(I),!0),ne.setBigUint64(60,BigInt(t.byteLength),!0),new Uint8Array(Uk([new Uint8Array(Ia).buffer,X,N.buffer,v,b,new ArrayBuffer(I-(L+b.byteLength)),t].concat(V)))}});var Y2=m((ZOt,wG)=>{"use strict";typeof process=="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?wG.exports={nextTick:e7r}:wG.exports=process;function e7r(e,r,t,n){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,a,o;switch(i){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,r)});case 3:return process.nextTick(function(){e.call(null,r,t)});case 4:return process.nextTick(function(){e.call(null,r,t,n)});default:for(a=new Array(i-1),o=0;o<a.length;)a[o++]=arguments[o];return process.nextTick(function(){e.apply(null,a)})}}});var jTe=m((eRt,BTe)=>{var r7r={}.toString;BTe.exports=Array.isArray||function(e){return r7r.call(e)=="[object Array]"}});var SG=m((rRt,MTe)=>{MTe.exports=require("stream")});var $2=m((AG,qTe)=>{var cO=require("buffer"),Af=cO.Buffer;function LTe(e,r){for(var t in e)r[t]=e[t]}Af.from&&Af.alloc&&Af.allocUnsafe&&Af.allocUnsafeSlow?qTe.exports=cO:(LTe(cO,AG),AG.Buffer=cy);function cy(e,r,t){return Af(e,r,t)}LTe(Af,cy);cy.from=function(e,r,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Af(e,r,t)};cy.alloc=function(e,r,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Af(e);return r!==void 0?typeof t=="string"?n.fill(r,t):n.fill(r):n.fill(0),n};cy.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Af(e)};cy.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return cO.SlowBuffer(e)}});var UTe=m((tRt,TG)=>{"use strict";function t7r(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var NTe=$2().Buffer,X2=require("util");function n7r(e,r,t){e.copy(r,t)}TG.exports=function(){function e(){t7r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i},e.prototype.concat=function(t){if(this.length===0)return NTe.alloc(0);for(var n=NTe.allocUnsafe(t>>>0),i=this.head,a=0;i;)n7r(i.data,n,a),a+=i.data.length,i=i.next;return n},e}();X2&&X2.inspect&&X2.inspect.custom&&(TG.exports.prototype[X2.inspect.custom]=function(){var e=X2.inspect({length:this.length});return this.constructor.name+" "+e})});var CG=m((nRt,GTe)=>{"use strict";var fO=Y2();function i7r(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,fO.nextTick(dO,this,e)):fO.nextTick(dO,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!r&&a?t._writableState?t._writableState.errorEmitted||(t._writableState.errorEmitted=!0,fO.nextTick(dO,t,a)):fO.nextTick(dO,t,a):r&&r(a)}),this)}function a7r(){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 dO(e,r){e.emit("error",r)}GTe.exports={destroy:i7r,undestroy:a7r}});var kG=m((iRt,XTe)=>{"use strict";var X0=Y2();XTe.exports=Ni;function zTe(e){var r=this;this.next=null,this.entry=null,this.finish=function(){w7r(r,e)}}var o7r=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:X0.nextTick,fy;Ni.WritableState=J2;var HTe=Object.create(Ua());HTe.inherits=at();var s7r={deprecate:d0()},WTe=SG(),pO=$2().Buffer,u7r=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function l7r(e){return pO.from(e)}function c7r(e){return pO.isBuffer(e)||e instanceof u7r}var VTe=CG();HTe.inherits(Ni,WTe);function f7r(){}function J2(e,r){fy=fy||J0(),e=e||{};var t=r instanceof fy;this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,i=e.writableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:t&&(i||i===0)?this.highWaterMark=i: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 o=e.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){b7r(r,s)},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 zTe(this)}J2.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(J2.prototype,"buffer",{get:s7r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var hO;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(hO=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ni,Symbol.hasInstance,{value:function(e){return hO.call(this,e)?!0:this!==Ni?!1:e&&e._writableState instanceof J2}})):hO=function(e){return e instanceof this};function Ni(e){if(fy=fy||J0(),!hO.call(Ni,this)&&!(this instanceof fy))return new Ni(e);this._writableState=new J2(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)),WTe.call(this)}Ni.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function d7r(e,r){var t=new Error("write after end");e.emit("error",t),X0.nextTick(r,t)}function p7r(e,r,t,n){var i=!0,a=!1;return t===null?a=new TypeError("May not write null values to stream"):typeof t!="string"&&t!==void 0&&!r.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),X0.nextTick(n,a),i=!1),i}Ni.prototype.write=function(e,r,t){var n=this._writableState,i=!1,a=!n.objectMode&&c7r(e);return a&&!pO.isBuffer(e)&&(e=l7r(e)),typeof r=="function"&&(t=r,r=null),a?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=f7r),n.ended?d7r(this,t):(a||p7r(this,n,e,t))&&(n.pendingcb++,i=m7r(this,n,a,e,r,t)),i};Ni.prototype.cork=function(){var e=this._writableState;e.corked++};Ni.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&YTe(this,e))};Ni.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+r);return this._writableState.defaultEncoding=r,this};function h7r(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=pO.from(r,t)),r}Object.defineProperty(Ni.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m7r(e,r,t,n,i,a){if(!t){var o=h7r(r,n,i);n!==o&&(t=!0,i="buffer",n=o)}var s=r.objectMode?1:n.length;r.length+=s;var u=r.length<r.highWaterMark;if(u||(r.needDrain=!0),r.writing||r.corked){var l=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:a,next:null},l?l.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else DG(e,r,!1,s,n,i,a);return u}function DG(e,r,t,n,i,a,o){r.writelen=n,r.writecb=o,r.writing=!0,r.sync=!0,t?e._writev(i,r.onwrite):e._write(i,a,r.onwrite),r.sync=!1}function g7r(e,r,t,n,i){--r.pendingcb,t?(X0.nextTick(i,n),X0.nextTick(Q2,e,r),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),Q2(e,r))}function v7r(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function b7r(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(v7r(t),r)g7r(e,t,n,r,i);else{var a=$Te(t);!a&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&YTe(e,t),n?o7r(KTe,e,t,a,i):KTe(e,t,a,i)}}function KTe(e,r,t,n){t||y7r(e,r),r.pendingcb--,n(),Q2(e,r)}function y7r(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function YTe(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),a=r.corkedRequestsFree;a.entry=t;for(var o=0,s=!0;t;)i[o]=t,t.isBuf||(s=!1),t=t.next,o+=1;i.allBuffers=s,DG(e,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new zTe(r),r.bufferedRequestCount=0}else{for(;t;){var u=t.chunk,l=t.encoding,c=t.callback,f=r.objectMode?1:u.length;if(DG(e,r,!1,f,u,l,c),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}Ni.prototype._write=function(e,r,t){t(new Error("_write() is not implemented"))};Ni.prototype._writev=null;Ni.prototype.end=function(e,r,t){var n=this._writableState;typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||E7r(this,n,t)};function $Te(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function x7r(e,r){e._final(function(t){r.pendingcb--,t&&e.emit("error",t),r.prefinished=!0,e.emit("prefinish"),Q2(e,r)})}function _7r(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"?(r.pendingcb++,r.finalCalled=!0,X0.nextTick(x7r,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function Q2(e,r){var t=$Te(r);return t&&(_7r(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"))),t}function E7r(e,r,t){r.ending=!0,Q2(e,r),t&&(r.finished?X0.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function w7r(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(Ni.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){!this._writableState||(this._writableState.destroyed=e)}});Ni.prototype.destroy=VTe.destroy;Ni.prototype._undestroy=VTe.undestroy;Ni.prototype._destroy=function(e,r){this.end(),r(e)}});var J0=m((aRt,e3e)=>{"use strict";var JTe=Y2(),S7r=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};e3e.exports=Tf;var QTe=Object.create(Ua());QTe.inherits=at();var ZTe=FG(),OG=kG();QTe.inherits(Tf,ZTe);for(RG=S7r(OG.prototype),mO=0;mO<RG.length;mO++)gO=RG[mO],Tf.prototype[gO]||(Tf.prototype[gO]=OG.prototype[gO]);var RG,gO,mO;function Tf(e){if(!(this instanceof Tf))return new Tf(e);ZTe.call(this,e),OG.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",A7r)}Object.defineProperty(Tf.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function A7r(){this.allowHalfOpen||this._writableState.ended||JTe.nextTick(T7r,this)}function T7r(e){e.end()}Object.defineProperty(Tf.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)}});Tf.prototype._destroy=function(e,r){this.push(null),this.end(),JTe.nextTick(r,e)}});var BG=m(t3e=>{"use strict";var IG=$2().Buffer,r3e=IG.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 C7r(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function D7r(e){var r=C7r(e);if(typeof r!="string"&&(IG.isEncoding===r3e||!r3e(e)))throw new Error("Unknown encoding: "+e);return r||e}t3e.StringDecoder=Z2;function Z2(e){this.encoding=D7r(e);var r;switch(this.encoding){case"utf16le":this.text=P7r,this.end=B7r,r=4;break;case"utf8":this.fillLast=R7r,r=4;break;case"base64":this.text=j7r,this.end=M7r,r=3;break;default:this.write=L7r,this.end=q7r;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=IG.allocUnsafe(r)}Z2.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""};Z2.prototype.end=I7r;Z2.prototype.text=F7r;Z2.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 PG(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function k7r(e,r,t){var n=r.length-1;if(n<t)return 0;var i=PG(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=PG(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=PG(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function O7r(e,r,t){if((r[0]&192)!=128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!=128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!=128)return e.lastNeed=2,"\uFFFD"}}function R7r(e){var r=this.lastTotal-this.lastNeed,t=O7r(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function F7r(e,r){var t=k7r(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",r,n)}function I7r(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function P7r(e,r){if((e.length-r)%2==0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.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],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function B7r(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function j7r(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function M7r(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function L7r(e){return e.toString(this.encoding)}function q7r(e){return e&&e.length?this.write(e):""}});var FG=m((uRt,h3e)=>{"use strict";var dy=Y2();h3e.exports=Mn;var N7r=jTe(),eE;Mn.ReadableState=o3e;var sRt=require("events").EventEmitter,n3e=function(e,r){return e.listeners(r).length},jG=SG(),rE=$2().Buffer,U7r=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function G7r(e){return rE.from(e)}function z7r(e){return rE.isBuffer(e)||e instanceof U7r}var i3e=Object.create(Ua());i3e.inherits=at();var MG=require("util"),rn=void 0;MG&&MG.debuglog?rn=MG.debuglog("stream"):rn=function(){};var H7r=UTe(),a3e=CG(),py;i3e.inherits(Mn,jG);var LG=["error","close","destroy","pause","resume"];function W7r(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):N7r(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function o3e(e,r){eE=eE||J0(),e=e||{};var t=r instanceof eE;this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=e.readableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:t&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new H7r,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&&(py||(py=BG().StringDecoder),this.decoder=new py(e.encoding),this.encoding=e.encoding)}function Mn(e){if(eE=eE||J0(),!(this instanceof Mn))return new Mn(e);this._readableState=new o3e(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),jG.call(this)}Object.defineProperty(Mn.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){!this._readableState||(this._readableState.destroyed=e)}});Mn.prototype.destroy=a3e.destroy;Mn.prototype._undestroy=a3e.undestroy;Mn.prototype._destroy=function(e,r){this.push(null),r(e)};Mn.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=rE.from(e,r),r=""),n=!0),s3e(this,e,r,!1,n)};Mn.prototype.unshift=function(e){return s3e(this,e,null,!0,!1)};function s3e(e,r,t,n,i){var a=e._readableState;if(r===null)a.reading=!1,$7r(e,a);else{var o;i||(o=V7r(a,r)),o?e.emit("error",o):a.objectMode||r&&r.length>0?(typeof r!="string"&&!a.objectMode&&Object.getPrototypeOf(r)!==rE.prototype&&(r=G7r(r)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):qG(e,a,r,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!t?(r=a.decoder.write(r),a.objectMode||r.length!==0?qG(e,a,r,!1):f3e(e,a)):qG(e,a,r,!1))):n||(a.reading=!1)}return K7r(a)}function qG(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(e.emit("data",t),e.read(0)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&vO(e)),f3e(e,r)}function V7r(e,r){var t;return!z7r(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new TypeError("Invalid non-string/buffer chunk")),t}function K7r(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Mn.prototype.isPaused=function(){return this._readableState.flowing===!1};Mn.prototype.setEncoding=function(e){return py||(py=BG().StringDecoder),this._readableState.decoder=new py(e),this._readableState.encoding=e,this};var u3e=8388608;function Y7r(e){return e>=u3e?e=u3e:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function l3e(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=Y7r(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}Mn.prototype.read=function(e){rn("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&(r.length>=r.highWaterMark||r.ended))return rn("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?UG(this):vO(this),null;if(e=l3e(e,r),e===0&&r.ended)return r.length===0&&UG(this),null;var n=r.needReadable;rn("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,rn("length less than watermark",n)),r.ended||r.reading?(n=!1,rn("reading or ended",n)):n&&(rn("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=l3e(t,r)));var i;return e>0?i=d3e(e,r):i=null,i===null?(r.needReadable=!0,e=0):r.length-=e,r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&UG(this)),i!==null&&this.emit("data",i),i};function $7r(e,r){if(!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,vO(e)}}function vO(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(rn("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?dy.nextTick(c3e,e):c3e(e))}function c3e(e){rn("emit readable"),e.emit("readable"),NG(e)}function f3e(e,r){r.readingMore||(r.readingMore=!0,dy.nextTick(X7r,e,r))}function X7r(e,r){for(var t=r.length;!r.reading&&!r.flowing&&!r.ended&&r.length<r.highWaterMark&&(rn("maybeReadMore read 0"),e.read(0),t!==r.length);)t=r.length;r.readingMore=!1}Mn.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Mn.prototype.pipe=function(e,r){var t=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,rn("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:v;n.endEmitted?dy.nextTick(a):t.once("end",a),e.on("unpipe",o);function o(y,w){rn("onunpipe"),y===t&&w&&w.hasUnpiped===!1&&(w.hasUnpiped=!0,c())}function s(){rn("onend"),e.end()}var u=J7r(t);e.on("drain",u);var l=!1;function c(){rn("cleanup"),e.removeListener("close",h),e.removeListener("finish",b),e.removeListener("drain",u),e.removeListener("error",p),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",v),t.removeListener("data",d),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var f=!1;t.on("data",d);function d(y){rn("ondata"),f=!1;var w=e.write(y);w===!1&&!f&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&p3e(n.pipes,e)!==-1)&&!l&&(rn("false write response, pause",n.awaitDrain),n.awaitDrain++,f=!0),t.pause())}function p(y){rn("onerror",y),v(),e.removeListener("error",p),n3e(e,"error")===0&&e.emit("error",y)}W7r(e,"error",p);function h(){e.removeListener("finish",b),v()}e.once("close",h);function b(){rn("onfinish"),e.removeListener("close",h),v()}e.once("finish",b);function v(){rn("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(rn("pipe resume"),t.resume()),e};function J7r(e){return function(){var r=e._readableState;rn("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&n3e(e,"data")&&(r.flowing=!0,NG(e))}}Mn.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=p3e(r.pipes,e);return o===-1?this:(r.pipes.splice(o,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};Mn.prototype.on=function(e,r){var t=jG.prototype.on.call(this,e,r);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&&vO(this):dy.nextTick(Q7r,this))}return t};Mn.prototype.addListener=Mn.prototype.on;function Q7r(e){rn("readable nexttick read 0"),e.read(0)}Mn.prototype.resume=function(){var e=this._readableState;return e.flowing||(rn("resume"),e.flowing=!0,Z7r(this,e)),this};function Z7r(e,r){r.resumeScheduled||(r.resumeScheduled=!0,dy.nextTick(eNr,e,r))}function eNr(e,r){r.reading||(rn("resume read 0"),e.read(0)),r.resumeScheduled=!1,r.awaitDrain=0,e.emit("resume"),NG(e),r.flowing&&!r.reading&&e.read(0)}Mn.prototype.pause=function(){return rn("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(rn("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function NG(e){var r=e._readableState;for(rn("flow",r.flowing);r.flowing&&e.read()!==null;);}Mn.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(rn("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(rn("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var s=r.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(o){return function(){return e[o].apply(e,arguments)}}(i));for(var a=0;a<LG.length;a++)e.on(LG[a],this.emit.bind(this,LG[a]));return this._read=function(o){rn("wrapped _read",o),n&&(n=!1,e.resume())},this};Object.defineProperty(Mn.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Mn._fromList=d3e;function d3e(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.head.data:t=r.buffer.concat(r.length),r.buffer.clear()):t=rNr(e,r.buffer,r.decoder),t}function rNr(e,r,t){var n;return e<r.head.data.length?(n=r.head.data.slice(0,e),r.head.data=r.head.data.slice(e)):e===r.head.data.length?n=r.shift():n=t?tNr(e,r):nNr(e,r),n}function tNr(e,r){var t=r.head,n=1,i=t.data;for(e-=i.length;t=t.next;){var a=t.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),e-=o,e===0){o===a.length?(++n,t.next?r.head=t.next:r.head=r.tail=null):(r.head=t,t.data=a.slice(o));break}++n}return r.length-=n,i}function nNr(e,r){var t=rE.allocUnsafe(e),n=r.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,o),e-=o,e===0){o===a.length?(++i,n.next?r.head=n.next:r.head=r.tail=null):(r.head=n,n.data=a.slice(o));break}++i}return r.length-=i,t}function UG(e){var r=e._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,dy.nextTick(iNr,r,e))}function iNr(e,r){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"))}function p3e(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var GG=m((lRt,v3e)=>{"use strict";v3e.exports=Cf;var bO=J0(),m3e=Object.create(Ua());m3e.inherits=at();m3e.inherits(Cf,bO);function aNr(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Cf(e){if(!(this instanceof Cf))return new Cf(e);bO.call(this,e),this._transformState={afterTransform:aNr.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",oNr)}function oNr(){var e=this;typeof this._flush=="function"?this._flush(function(r,t){g3e(e,r,t)}):g3e(this,null,null)}Cf.prototype.push=function(e,r){return this._transformState.needTransform=!1,bO.prototype.push.call(this,e,r)};Cf.prototype._transform=function(e,r,t){throw new Error("_transform() is not implemented")};Cf.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Cf.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&r.writecb&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};Cf.prototype._destroy=function(e,r){var t=this;bO.prototype._destroy.call(this,e,function(n){r(n),t.emit("close")})};function g3e(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),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 _3e=m((cRt,x3e)=>{"use strict";x3e.exports=tE;var b3e=GG(),y3e=Object.create(Ua());y3e.inherits=at();y3e.inherits(tE,b3e);function tE(e){if(!(this instanceof tE))return new tE(e);b3e.call(this,e)}tE.prototype._transform=function(e,r,t){t(null,e)}});var nE=m((Pa,yO)=>{var oc=require("stream");process.env.READABLE_STREAM==="disable"&&oc?(yO.exports=oc,Pa=yO.exports=oc.Readable,Pa.Readable=oc.Readable,Pa.Writable=oc.Writable,Pa.Duplex=oc.Duplex,Pa.Transform=oc.Transform,Pa.PassThrough=oc.PassThrough,Pa.Stream=oc):(Pa=yO.exports=FG(),Pa.Stream=oc||Pa,Pa.Readable=Pa,Pa.Writable=kG(),Pa.Duplex=J0(),Pa.Transform=GG(),Pa.PassThrough=_3e())});var Df=m(is=>{"use strict";is.base64=!0;is.array=!0;is.string=!0;is.arraybuffer=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined";is.nodebuffer=typeof Buffer!="undefined";is.uint8array=typeof Uint8Array!="undefined";if(typeof ArrayBuffer=="undefined")is.blob=!1;else{zG=new ArrayBuffer(0);try{is.blob=new Blob([zG],{type:"application/zip"}).size===0}catch{try{E3e=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,HG=new E3e,HG.append(zG),is.blob=HG.getBlob("application/zip").size===0}catch{is.blob=!1}}}var zG,E3e,HG;try{is.nodestream=!!nE().Readable}catch{is.nodestream=!1}});var VG=m(WG=>{"use strict";var sNr=Jn(),uNr=Df(),sc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";WG.encode=function(e){for(var r=[],t,n,i,a,o,s,u,l=0,c=e.length,f=c,d=sNr.getTypeOf(e)!=="string";l<e.length;)f=c-l,d?(t=e[l++],n=l<c?e[l++]:0,i=l<c?e[l++]:0):(t=e.charCodeAt(l++),n=l<c?e.charCodeAt(l++):0,i=l<c?e.charCodeAt(l++):0),a=t>>2,o=(t&3)<<4|n>>4,s=f>1?(n&15)<<2|i>>6:64,u=f>2?i&63:64,r.push(sc.charAt(a)+sc.charAt(o)+sc.charAt(s)+sc.charAt(u));return r.join("")};WG.decode=function(e){var r,t,n,i,a,o,s,u=0,l=0,c="data:";if(e.substr(0,c.length)===c)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var f=e.length*3/4;if(e.charAt(e.length-1)===sc.charAt(64)&&f--,e.charAt(e.length-2)===sc.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");var d;for(uNr.uint8array?d=new Uint8Array(f|0):d=new Array(f|0);u<e.length;)i=sc.indexOf(e.charAt(u++)),a=sc.indexOf(e.charAt(u++)),o=sc.indexOf(e.charAt(u++)),s=sc.indexOf(e.charAt(u++)),r=i<<2|a>>4,t=(a&15)<<4|o>>2,n=(o&3)<<6|s,d[l++]=r,o!==64&&(d[l++]=t),s!==64&&(d[l++]=n);return d}});var iE=m((pRt,w3e)=>{"use strict";w3e.exports={isNode:typeof Buffer!="undefined",newBufferFrom:function(e,r){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,r);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,r)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var r=new Buffer(e);return r.fill(0),r},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 C3e=m((hRt,T3e)=>{"use strict";var S3e=global.MutationObserver||global.WebKitMutationObserver,hy;process.browser?S3e?(KG=0,A3e=new S3e(oE),YG=global.document.createTextNode(""),A3e.observe(YG,{characterData:!0}),hy=function(){YG.data=KG=++KG%2}):!global.setImmediate&&typeof global.MessageChannel!="undefined"?($G=new global.MessageChannel,$G.port1.onmessage=oE,hy=function(){$G.port2.postMessage(0)}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?hy=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){oE(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},global.document.documentElement.appendChild(e)}:hy=function(){setTimeout(oE,0)}:hy=function(){process.nextTick(oE)};var KG,A3e,YG,$G,XG,aE=[];function oE(){XG=!0;for(var e,r,t=aE.length;t;){for(r=aE,aE=[],e=-1;++e<t;)r[e]();t=aE.length}XG=!1}T3e.exports=lNr;function lNr(e){aE.push(e)===1&&!XG&&hy()}});var P3e=m((mRt,I3e)=>{"use strict";var D3e=C3e();function my(){}var eo={},k3e=["REJECTED"],JG=["FULFILLED"],O3e=["PENDING"];process.browser||(sE=["UNHANDLED"]);var sE;I3e.exports=Fp;function Fp(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=O3e,this.queue=[],this.outcome=void 0,process.browser||(this.handled=sE),e!==my&&R3e(this,e)}Fp.prototype.finally=function(e){if(typeof e!="function")return this;var r=this.constructor;return this.then(t,n);function t(i){function a(){return i}return r.resolve(e()).then(a)}function n(i){function a(){throw i}return r.resolve(e()).then(a)}};Fp.prototype.catch=function(e){return this.then(null,e)};Fp.prototype.then=function(e,r){if(typeof e!="function"&&this.state===JG||typeof r!="function"&&this.state===k3e)return this;var t=new this.constructor(my);if(process.browser||this.handled===sE&&(this.handled=null),this.state!==O3e){var n=this.state===JG?e:r;QG(t,n,this.outcome)}else this.queue.push(new uE(t,e,r));return t};function uE(e,r,t){this.promise=e,typeof r=="function"&&(this.onFulfilled=r,this.callFulfilled=this.otherCallFulfilled),typeof t=="function"&&(this.onRejected=t,this.callRejected=this.otherCallRejected)}uE.prototype.callFulfilled=function(e){eo.resolve(this.promise,e)};uE.prototype.otherCallFulfilled=function(e){QG(this.promise,this.onFulfilled,e)};uE.prototype.callRejected=function(e){eo.reject(this.promise,e)};uE.prototype.otherCallRejected=function(e){QG(this.promise,this.onRejected,e)};function QG(e,r,t){D3e(function(){var n;try{n=r(t)}catch(i){return eo.reject(e,i)}n===e?eo.reject(e,new TypeError("Cannot resolve promise with itself")):eo.resolve(e,n)})}eo.resolve=function(e,r){var t=F3e(cNr,r);if(t.status==="error")return eo.reject(e,t.value);var n=t.value;if(n)R3e(e,n);else{e.state=JG,e.outcome=r;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(r)}return e};eo.reject=function(e,r){e.state=k3e,e.outcome=r,process.browser||e.handled===sE&&D3e(function(){e.handled===sE&&process.emit("unhandledRejection",r,e)});for(var t=-1,n=e.queue.length;++t<n;)e.queue[t].callRejected(r);return e};function cNr(e){var r=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof r=="function")return function(){r.apply(e,arguments)}}function R3e(e,r){var t=!1;function n(s){t||(t=!0,eo.reject(e,s))}function i(s){t||(t=!0,eo.resolve(e,s))}function a(){r(i,n)}var o=F3e(a);o.status==="error"&&n(o.value)}function F3e(e,r){var t={};try{t.value=e(r),t.status="success"}catch(n){t.status="error",t.value=n}return t}Fp.resolve=fNr;function fNr(e){return e instanceof this?e:eo.resolve(new this(my),e)}Fp.reject=dNr;function dNr(e){var r=new this(my);return eo.reject(r,e)}Fp.all=pNr;function pNr(e){var r=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var t=e.length,n=!1;if(!t)return this.resolve([]);for(var i=new Array(t),a=0,o=-1,s=new this(my);++o<t;)u(e[o],o);return s;function u(l,c){r.resolve(l).then(f,function(d){n||(n=!0,eo.reject(s,d))});function f(d){i[c]=d,++a===t&&!n&&(n=!0,eo.resolve(s,i))}}}Fp.race=hNr;function hNr(e){var r=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var t=e.length,n=!1;if(!t)return this.resolve([]);for(var i=-1,a=new this(my);++i<t;)o(e[i]);return a;function o(s){r.resolve(s).then(function(u){n||(n=!0,eo.resolve(a,u))},function(u){n||(n=!0,eo.reject(a,u))})}}});var gy=m((gRt,B3e)=>{"use strict";var ZG=null;typeof Promise!="undefined"?ZG=Promise:ZG=P3e();B3e.exports={Promise:ZG}});var M3e=m(j3e=>{(function(e,r){"use strict";if(e.setImmediate)return;var t=1,n={},i=!1,a=e.document,o;function s(w){typeof w!="function"&&(w=new Function(""+w));for(var A=new Array(arguments.length-1),C=0;C<A.length;C++)A[C]=arguments[C+1];var D={callback:w,args:A};return n[t]=D,o(t),t++}function u(w){delete n[w]}function l(w){var A=w.callback,C=w.args;switch(C.length){case 0:A();break;case 1:A(C[0]);break;case 2:A(C[0],C[1]);break;case 3:A(C[0],C[1],C[2]);break;default:A.apply(r,C);break}}function c(w){if(i)setTimeout(c,0,w);else{var A=n[w];if(A){i=!0;try{l(A)}finally{u(w),i=!1}}}}function f(){o=function(w){process.nextTick(function(){c(w)})}}function d(){if(e.postMessage&&!e.importScripts){var w=!0,A=e.onmessage;return e.onmessage=function(){w=!1},e.postMessage("","*"),e.onmessage=A,w}}function p(){var w="setImmediate$"+Math.random()+"$",A=function(C){C.source===e&&typeof C.data=="string"&&C.data.indexOf(w)===0&&c(+C.data.slice(w.length))};e.addEventListener?e.addEventListener("message",A,!1):e.attachEvent("onmessage",A),o=function(C){e.postMessage(w+C,"*")}}function h(){var w=new MessageChannel;w.port1.onmessage=function(A){var C=A.data;c(C)},o=function(A){w.port2.postMessage(A)}}function b(){var w=a.documentElement;o=function(A){var C=a.createElement("script");C.onreadystatechange=function(){c(A),C.onreadystatechange=null,w.removeChild(C),C=null},w.appendChild(C)}}function v(){o=function(w){setTimeout(c,0,w)}}var y=Object.getPrototypeOf&&Object.getPrototypeOf(e);y=y&&y.setTimeout?y:e,{}.toString.call(e.process)==="[object process]"?f():d()?p():e.MessageChannel?h():a&&"onreadystatechange"in a.createElement("script")?b():v(),y.setImmediate=s,y.clearImmediate=u})(typeof self=="undefined"?typeof global=="undefined"?j3e:global:self)});var Jn=m(Ui=>{"use strict";var Ip=Df(),mNr=VG(),vy=iE(),ez=gy();M3e();function gNr(e){var r=null;return Ip.uint8array?r=new Uint8Array(e.length):r=new Array(e.length),xO(e,r)}Ui.newBlob=function(e,r){Ui.checkSupport("blob");try{return new Blob([e],{type:r})}catch{try{var t=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,n=new t;return n.append(e),n.getBlob(r)}catch{throw new Error("Bug : can't construct the Blob.")}}};function lE(e){return e}function xO(e,r){for(var t=0;t<e.length;++t)r[t]=e.charCodeAt(t)&255;return r}var _O={stringifyByChunk:function(e,r,t){var n=[],i=0,a=e.length;if(a<=t)return String.fromCharCode.apply(null,e);for(;i<a;)r==="array"||r==="nodebuffer"?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+t,a)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+t,a)))),i+=t;return n.join("")},stringifyByChar:function(e){for(var r="",t=0;t<e.length;t++)r+=String.fromCharCode(e[t]);return r},applyCanBeUsed:{uint8array:function(){try{return Ip.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return Ip.nodebuffer&&String.fromCharCode.apply(null,vy.allocBuffer(1)).length===1}catch{return!1}}()}};function cE(e){var r=65536,t=Ui.getTypeOf(e),n=!0;if(t==="uint8array"?n=_O.applyCanBeUsed.uint8array:t==="nodebuffer"&&(n=_O.applyCanBeUsed.nodebuffer),n)for(;r>1;)try{return _O.stringifyByChunk(e,t,r)}catch{r=Math.floor(r/2)}return _O.stringifyByChar(e)}Ui.applyFromCharCode=cE;function EO(e,r){for(var t=0;t<e.length;t++)r[t]=e[t];return r}var Pp={};Pp.string={string:lE,array:function(e){return xO(e,new Array(e.length))},arraybuffer:function(e){return Pp.string.uint8array(e).buffer},uint8array:function(e){return xO(e,new Uint8Array(e.length))},nodebuffer:function(e){return xO(e,vy.allocBuffer(e.length))}};Pp.array={string:cE,array:lE,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return vy.newBufferFrom(e)}};Pp.arraybuffer={string:function(e){return cE(new Uint8Array(e))},array:function(e){return EO(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:lE,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return vy.newBufferFrom(new Uint8Array(e))}};Pp.uint8array={string:cE,array:function(e){return EO(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:lE,nodebuffer:function(e){return vy.newBufferFrom(e)}};Pp.nodebuffer={string:cE,array:function(e){return EO(e,new Array(e.length))},arraybuffer:function(e){return Pp.nodebuffer.uint8array(e).buffer},uint8array:function(e){return EO(e,new Uint8Array(e.length))},nodebuffer:lE};Ui.transformTo=function(e,r){if(r||(r=""),!e)return r;Ui.checkSupport(e);var t=Ui.getTypeOf(r),n=Pp[t][e](r);return n};Ui.resolve=function(e){for(var r=e.split("/"),t=[],n=0;n<r.length;n++){var i=r[n];i==="."||i===""&&n!==0&&n!==r.length-1||(i===".."?t.pop():t.push(i))}return t.join("/")};Ui.getTypeOf=function(e){if(typeof e=="string")return"string";if(Object.prototype.toString.call(e)==="[object Array]")return"array";if(Ip.nodebuffer&&vy.isBuffer(e))return"nodebuffer";if(Ip.uint8array&&e instanceof Uint8Array)return"uint8array";if(Ip.arraybuffer&&e instanceof ArrayBuffer)return"arraybuffer"};Ui.checkSupport=function(e){var r=Ip[e.toLowerCase()];if(!r)throw new Error(e+" is not supported by this platform")};Ui.MAX_VALUE_16BITS=65535;Ui.MAX_VALUE_32BITS=-1;Ui.pretty=function(e){var r="",t,n;for(n=0;n<(e||"").length;n++)t=e.charCodeAt(n),r+="\\x"+(t<16?"0":"")+t.toString(16).toUpperCase();return r};Ui.delay=function(e,r,t){setImmediate(function(){e.apply(t||null,r||[])})};Ui.inherits=function(e,r){var t=function(){};t.prototype=r.prototype,e.prototype=new t};Ui.extend=function(){var e={},r,t;for(r=0;r<arguments.length;r++)for(t in arguments[r])Object.prototype.hasOwnProperty.call(arguments[r],t)&&typeof e[t]=="undefined"&&(e[t]=arguments[r][t]);return e};Ui.prepareContent=function(e,r,t,n,i){var a=ez.Promise.resolve(r).then(function(o){var s=Ip.blob&&(o instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(o))!==-1);return s&&typeof FileReader!="undefined"?new ez.Promise(function(u,l){var c=new FileReader;c.onload=function(f){u(f.target.result)},c.onerror=function(f){l(f.target.error)},c.readAsArrayBuffer(o)}):o});return a.then(function(o){var s=Ui.getTypeOf(o);return s?(s==="arraybuffer"?o=Ui.transformTo("uint8array",o):s==="string"&&(i?o=mNr.decode(o):t&&n!==!0&&(o=gNr(o))),o):ez.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}});var as=m((yRt,q3e)=>{"use strict";function L3e(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}L3e.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,r){return this._listeners[e].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,r){if(this._listeners[e])for(var t=0;t<this._listeners[e].length;t++)this._listeners[e][t].call(this,r)},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 r=this;return e.on("data",function(t){r.processChunk(t)}),e.on("end",function(){r.end()}),e.on("error",function(t){r.error(t)}),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,r){return this.extraStreamInfo[e]=r,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}};q3e.exports=L3e});var yy=m(Bp=>{"use strict";var by=Jn(),Q0=Df(),vNr=iE(),wO=as(),fE=new Array(256);for(kf=0;kf<256;kf++)fE[kf]=kf>=252?6:kf>=248?5:kf>=240?4:kf>=224?3:kf>=192?2:1;var kf;fE[254]=fE[254]=1;var bNr=function(e){var r,t,n,i,a,o=e.length,s=0;for(i=0;i<o;i++)t=e.charCodeAt(i),(t&64512)==55296&&i+1<o&&(n=e.charCodeAt(i+1),(n&64512)==56320&&(t=65536+(t-55296<<10)+(n-56320),i++)),s+=t<128?1:t<2048?2:t<65536?3:4;for(Q0.uint8array?r=new Uint8Array(s):r=new Array(s),a=0,i=0;a<s;i++)t=e.charCodeAt(i),(t&64512)==55296&&i+1<o&&(n=e.charCodeAt(i+1),(n&64512)==56320&&(t=65536+(t-55296<<10)+(n-56320),i++)),t<128?r[a++]=t:t<2048?(r[a++]=192|t>>>6,r[a++]=128|t&63):t<65536?(r[a++]=224|t>>>12,r[a++]=128|t>>>6&63,r[a++]=128|t&63):(r[a++]=240|t>>>18,r[a++]=128|t>>>12&63,r[a++]=128|t>>>6&63,r[a++]=128|t&63);return r},yNr=function(e,r){var t;for(r=r||e.length,r>e.length&&(r=e.length),t=r-1;t>=0&&(e[t]&192)==128;)t--;return t<0||t===0?r:t+fE[e[t]]>r?t:r},xNr=function(e){var r,t,n,i,a=e.length,o=new Array(a*2);for(t=0,r=0;r<a;){if(n=e[r++],n<128){o[t++]=n;continue}if(i=fE[n],i>4){o[t++]=65533,r+=i-1;continue}for(n&=i===2?31:i===3?15:7;i>1&&r<a;)n=n<<6|e[r++]&63,i--;if(i>1){o[t++]=65533;continue}n<65536?o[t++]=n:(n-=65536,o[t++]=55296|n>>10&1023,o[t++]=56320|n&1023)}return o.length!==t&&(o.subarray?o=o.subarray(0,t):o.length=t),by.applyFromCharCode(o)};Bp.utf8encode=function(r){return Q0.nodebuffer?vNr.newBufferFrom(r,"utf-8"):bNr(r)};Bp.utf8decode=function(r){return Q0.nodebuffer?by.transformTo("nodebuffer",r).toString("utf-8"):(r=by.transformTo(Q0.uint8array?"uint8array":"array",r),xNr(r))};function SO(){wO.call(this,"utf-8 decode"),this.leftOver=null}by.inherits(SO,wO);SO.prototype.processChunk=function(e){var r=by.transformTo(Q0.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(Q0.uint8array){var t=r;r=new Uint8Array(t.length+this.leftOver.length),r.set(this.leftOver,0),r.set(t,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var n=yNr(r),i=r;n!==r.length&&(Q0.uint8array?(i=r.subarray(0,n),this.leftOver=r.subarray(n,r.length)):(i=r.slice(0,n),this.leftOver=r.slice(n,r.length))),this.push({data:Bp.utf8decode(i),meta:e.meta})};SO.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:Bp.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};Bp.Utf8DecodeWorker=SO;function rz(){wO.call(this,"utf-8 encode")}by.inherits(rz,wO);rz.prototype.processChunk=function(e){this.push({data:Bp.utf8encode(e.data),meta:e.meta})};Bp.Utf8EncodeWorker=rz});var z3e=m((_Rt,G3e)=>{"use strict";var N3e=as(),U3e=Jn();function tz(e){N3e.call(this,"ConvertWorker to "+e),this.destType=e}U3e.inherits(tz,N3e);tz.prototype.processChunk=function(e){this.push({data:U3e.transformTo(this.destType,e.data),meta:e.meta})};G3e.exports=tz});var V3e=m((ERt,W3e)=>{"use strict";var H3e=nE().Readable,_Nr=Jn();_Nr.inherits(nz,H3e);function nz(e,r,t){H3e.call(this,r),this._helper=e;var n=this;e.on("data",function(i,a){n.push(i)||n._helper.pause(),t&&t(a)}).on("error",function(i){n.emit("error",i)}).on("end",function(){n.push(null)})}nz.prototype._read=function(){this._helper.resume()};W3e.exports=nz});var iz=m((wRt,$3e)=>{"use strict";var Z0=Jn(),ENr=z3e(),wNr=as(),SNr=VG(),ANr=Df(),TNr=gy(),K3e=null;if(ANr.nodestream)try{K3e=V3e()}catch{}function CNr(e,r,t){switch(e){case"blob":return Z0.newBlob(Z0.transformTo("arraybuffer",r),t);case"base64":return SNr.encode(r);default:return Z0.transformTo(e,r)}}function DNr(e,r){var t,n=0,i=null,a=0;for(t=0;t<r.length;t++)a+=r[t].length;switch(e){case"string":return r.join("");case"array":return Array.prototype.concat.apply([],r);case"uint8array":for(i=new Uint8Array(a),t=0;t<r.length;t++)i.set(r[t],n),n+=r[t].length;return i;case"nodebuffer":return Buffer.concat(r);default:throw new Error("concat : unsupported type '"+e+"'")}}function kNr(e,r){return new TNr.Promise(function(t,n){var i=[],a=e._internalType,o=e._outputType,s=e._mimeType;e.on("data",function(u,l){i.push(u),r&&r(l)}).on("error",function(u){i=[],n(u)}).on("end",function(){try{var u=CNr(o,DNr(a,i),s);t(u)}catch(l){n(l)}i=[]}).resume()})}function Y3e(e,r,t){var n=r;switch(r){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string";break}try{this._internalType=n,this._outputType=r,this._mimeType=t,Z0.checkSupport(n),this._worker=e.pipe(new ENr(n)),e.lock()}catch(i){this._worker=new wNr("error"),this._worker.error(i)}}Y3e.prototype={accumulate:function(e){return kNr(this,e)},on:function(e,r){var t=this;return e==="data"?this._worker.on(e,function(n){r.call(t,n.data,n.meta)}):this._worker.on(e,function(){Z0.delay(r,arguments,t)}),this},resume:function(){return Z0.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(Z0.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new K3e(this,{objectMode:this._outputType!=="nodebuffer"},e)}};$3e.exports=Y3e});var az=m(Ku=>{"use strict";Ku.base64=!1;Ku.binary=!1;Ku.dir=!1;Ku.createFolders=!0;Ku.date=null;Ku.compression=null;Ku.compressionOptions=null;Ku.comment=null;Ku.unixPermissions=null;Ku.dosPermissions=null});var oz=m((ARt,X3e)=>{"use strict";var AO=Jn(),TO=as(),ONr=16*1024;function xy(e){TO.call(this,"DataWorker");var r=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(t){r.dataIsReady=!0,r.data=t,r.max=t&&t.length||0,r.type=AO.getTypeOf(t),r.isPaused||r._tickAndRepeat()},function(t){r.error(t)})}AO.inherits(xy,TO);xy.prototype.cleanUp=function(){TO.prototype.cleanUp.call(this),this.data=null};xy.prototype.resume=function(){return TO.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,AO.delay(this._tickAndRepeat,[],this)),!0):!1};xy.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(AO.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))};xy.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=ONr,r=null,t=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case"string":r=this.data.substring(this.index,t);break;case"uint8array":r=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":r=this.data.slice(this.index,t);break}return this.index=t,this.push({data:r,meta:{percent:this.max?this.index/this.max*100:0}})};X3e.exports=xy});var CO=m((TRt,Q3e)=>{"use strict";var RNr=Jn();function FNr(){for(var e,r=[],t=0;t<256;t++){e=t;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r}var J3e=FNr();function INr(e,r,t,n){var i=J3e,a=n+t;e=e^-1;for(var o=n;o<a;o++)e=e>>>8^i[(e^r[o])&255];return e^-1}function PNr(e,r,t,n){var i=J3e,a=n+t;e=e^-1;for(var o=n;o<a;o++)e=e>>>8^i[(e^r.charCodeAt(o))&255];return e^-1}Q3e.exports=function(r,t){if(typeof r=="undefined"||!r.length)return 0;var n=RNr.getTypeOf(r)!=="string";return n?INr(t|0,r,r.length,0):PNr(t|0,r,r.length,0)}});var uz=m((CRt,e6e)=>{"use strict";var Z3e=as(),BNr=CO(),jNr=Jn();function sz(){Z3e.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}jNr.inherits(sz,Z3e);sz.prototype.processChunk=function(e){this.streamInfo.crc32=BNr(e.data,this.streamInfo.crc32||0),this.push(e)};e6e.exports=sz});var t6e=m((DRt,r6e)=>{"use strict";var MNr=Jn(),lz=as();function cz(e){lz.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}MNr.inherits(cz,lz);cz.prototype.processChunk=function(e){if(e){var r=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=r+e.data.length}lz.prototype.processChunk.call(this,e)};r6e.exports=cz});var DO=m((kRt,a6e)=>{"use strict";var n6e=gy(),i6e=oz(),LNr=uz(),fz=t6e();function dz(e,r,t,n,i){this.compressedSize=e,this.uncompressedSize=r,this.crc32=t,this.compression=n,this.compressedContent=i}dz.prototype={getContentWorker:function(){var e=new i6e(n6e.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new fz("data_length")),r=this;return e.on("end",function(){if(this.streamInfo.data_length!==r.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i6e(n6e.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};dz.createWorkerFrom=function(e,r,t){return e.pipe(new LNr).pipe(new fz("uncompressedSize")).pipe(r.compressWorker(t)).pipe(new fz("compressedSize")).withStreamInfo("compression",r)};a6e.exports=dz});var l6e=m((ORt,u6e)=>{"use strict";var qNr=iz(),NNr=oz(),pz=yy(),hz=DO(),o6e=as(),mz=function(e,r,t){this.name=e,this.dir=t.dir,this.date=t.date,this.comment=t.comment,this.unixPermissions=t.unixPermissions,this.dosPermissions=t.dosPermissions,this._data=r,this._dataBinary=t.binary,this.options={compression:t.compression,compressionOptions:t.compressionOptions}};mz.prototype={internalStream:function(e){var r=null,t="string";try{if(!e)throw new Error("No output type specified.");t=e.toLowerCase();var n=t==="string"||t==="text";(t==="binarystring"||t==="text")&&(t="string"),r=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(r=r.pipe(new pz.Utf8EncodeWorker)),!i&&n&&(r=r.pipe(new pz.Utf8DecodeWorker))}catch(a){r=new o6e("error"),r.error(a)}return new qNr(r,t,"")},async:function(e,r){return this.internalStream(e).accumulate(r)},nodeStream:function(e,r){return this.internalStream(e||"nodebuffer").toNodejsStream(r)},_compressWorker:function(e,r){if(this._data instanceof hz&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var t=this._decompressWorker();return this._dataBinary||(t=t.pipe(new pz.Utf8EncodeWorker)),hz.createWorkerFrom(t,e,r)},_decompressWorker:function(){return this._data instanceof hz?this._data.getContentWorker():this._data instanceof o6e?this._data:new NNr(this._data)}};var s6e=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],UNr=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(kO=0;kO<s6e.length;kO++)mz.prototype[s6e[kO]]=UNr;var kO;u6e.exports=mz});var Of=m(go=>{"use strict";var GNr=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function zNr(e,r){return Object.prototype.hasOwnProperty.call(e,r)}go.assign=function(e){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var t=r.shift();if(!!t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(var n in t)zNr(t,n)&&(e[n]=t[n])}}return e};go.shrinkBuf=function(e,r){return e.length===r?e:e.subarray?e.subarray(0,r):(e.length=r,e)};var HNr={arraySet:function(e,r,t,n,i){if(r.subarray&&e.subarray){e.set(r.subarray(t,t+n),i);return}for(var a=0;a<n;a++)e[i+a]=r[t+a]},flattenChunks:function(e){var r,t,n,i,a,o;for(n=0,r=0,t=e.length;r<t;r++)n+=e[r].length;for(o=new Uint8Array(n),i=0,r=0,t=e.length;r<t;r++)a=e[r],o.set(a,i),i+=a.length;return o}},WNr={arraySet:function(e,r,t,n,i){for(var a=0;a<n;a++)e[i+a]=r[t+a]},flattenChunks:function(e){return[].concat.apply([],e)}};go.setTyped=function(e){e?(go.Buf8=Uint8Array,go.Buf16=Uint16Array,go.Buf32=Int32Array,go.assign(go,HNr)):(go.Buf8=Array,go.Buf16=Array,go.Buf32=Array,go.assign(go,WNr))};go.setTyped(GNr)});var F6e=m(wy=>{"use strict";var VNr=Of(),KNr=4,c6e=0,f6e=1,YNr=2;function _y(e){for(var r=e.length;--r>=0;)e[r]=0}var $Nr=0,d6e=1,XNr=2,JNr=3,QNr=258,gz=29,dE=256,pE=dE+1+gz,Ey=30,vz=19,p6e=2*pE+1,em=15,bz=16,ZNr=7,yz=256,h6e=16,m6e=17,g6e=18,xz=[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],OO=[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],eUr=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],v6e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],rUr=512,Rf=new Array((pE+2)*2);_y(Rf);var hE=new Array(Ey*2);_y(hE);var mE=new Array(rUr);_y(mE);var gE=new Array(QNr-JNr+1);_y(gE);var _z=new Array(gz);_y(_z);var RO=new Array(Ey);_y(RO);function Ez(e,r,t,n,i){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var b6e,y6e,x6e;function wz(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function _6e(e){return e<256?mE[e]:mE[256+(e>>>7)]}function vE(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Lo(e,r,t){e.bi_valid>bz-t?(e.bi_buf|=r<<e.bi_valid&65535,vE(e,e.bi_buf),e.bi_buf=r>>bz-e.bi_valid,e.bi_valid+=t-bz):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=t)}function uc(e,r,t){Lo(e,t[r*2],t[r*2+1])}function E6e(e,r){var t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1}function tUr(e){e.bi_valid===16?(vE(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 nUr(e,r){var t=r.dyn_tree,n=r.max_code,i=r.stat_desc.static_tree,a=r.stat_desc.has_stree,o=r.stat_desc.extra_bits,s=r.stat_desc.extra_base,u=r.stat_desc.max_length,l,c,f,d,p,h,b=0;for(d=0;d<=em;d++)e.bl_count[d]=0;for(t[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<p6e;l++)c=e.heap[l],d=t[t[c*2+1]*2+1]+1,d>u&&(d=u,b++),t[c*2+1]=d,!(c>n)&&(e.bl_count[d]++,p=0,c>=s&&(p=o[c-s]),h=t[c*2],e.opt_len+=h*(d+p),a&&(e.static_len+=h*(i[c*2+1]+p)));if(b!==0){do{for(d=u-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[u]--,b-=2}while(b>0);for(d=u;d!==0;d--)for(c=e.bl_count[d];c!==0;)f=e.heap[--l],!(f>n)&&(t[f*2+1]!==d&&(e.opt_len+=(d-t[f*2+1])*t[f*2],t[f*2+1]=d),c--)}}function w6e(e,r,t){var n=new Array(em+1),i=0,a,o;for(a=1;a<=em;a++)n[a]=i=i+t[a-1]<<1;for(o=0;o<=r;o++){var s=e[o*2+1];s!==0&&(e[o*2]=E6e(n[s]++,s))}}function iUr(){var e,r,t,n,i,a=new Array(em+1);for(t=0,n=0;n<gz-1;n++)for(_z[n]=t,e=0;e<1<<xz[n];e++)gE[t++]=n;for(gE[t-1]=n,i=0,n=0;n<16;n++)for(RO[n]=i,e=0;e<1<<OO[n];e++)mE[i++]=n;for(i>>=7;n<Ey;n++)for(RO[n]=i<<7,e=0;e<1<<OO[n]-7;e++)mE[256+i++]=n;for(r=0;r<=em;r++)a[r]=0;for(e=0;e<=143;)Rf[e*2+1]=8,e++,a[8]++;for(;e<=255;)Rf[e*2+1]=9,e++,a[9]++;for(;e<=279;)Rf[e*2+1]=7,e++,a[7]++;for(;e<=287;)Rf[e*2+1]=8,e++,a[8]++;for(w6e(Rf,pE+1,a),e=0;e<Ey;e++)hE[e*2+1]=5,hE[e*2]=E6e(e,5);b6e=new Ez(Rf,xz,dE+1,pE,em),y6e=new Ez(hE,OO,0,Ey,em),x6e=new Ez(new Array(0),eUr,0,vz,ZNr)}function S6e(e){var r;for(r=0;r<pE;r++)e.dyn_ltree[r*2]=0;for(r=0;r<Ey;r++)e.dyn_dtree[r*2]=0;for(r=0;r<vz;r++)e.bl_tree[r*2]=0;e.dyn_ltree[yz*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function A6e(e){e.bi_valid>8?vE(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 aUr(e,r,t,n){A6e(e),n&&(vE(e,t),vE(e,~t)),VNr.arraySet(e.pending_buf,e.window,r,t,e.pending),e.pending+=t}function T6e(e,r,t,n){var i=r*2,a=t*2;return e[i]<e[a]||e[i]===e[a]&&n[r]<=n[t]}function Sz(e,r,t){for(var n=e.heap[t],i=t<<1;i<=e.heap_len&&(i<e.heap_len&&T6e(r,e.heap[i+1],e.heap[i],e.depth)&&i++,!T6e(r,n,e.heap[i],e.depth));)e.heap[t]=e.heap[i],t=i,i<<=1;e.heap[t]=n}function C6e(e,r,t){var n,i,a=0,o,s;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],i=e.pending_buf[e.l_buf+a],a++,n===0?uc(e,i,r):(o=gE[i],uc(e,o+dE+1,r),s=xz[o],s!==0&&(i-=_z[o],Lo(e,i,s)),n--,o=_6e(n),uc(e,o,t),s=OO[o],s!==0&&(n-=RO[o],Lo(e,n,s)));while(a<e.last_lit);uc(e,yz,r)}function Az(e,r){var t=r.dyn_tree,n=r.stat_desc.static_tree,i=r.stat_desc.has_stree,a=r.stat_desc.elems,o,s,u=-1,l;for(e.heap_len=0,e.heap_max=p6e,o=0;o<a;o++)t[o*2]!==0?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):t[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,t[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=n[l*2+1]);for(r.max_code=u,o=e.heap_len>>1;o>=1;o--)Sz(e,t,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Sz(e,t,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,t[l*2]=t[o*2]+t[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,t[o*2+1]=t[s*2+1]=l,e.heap[1]=l++,Sz(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],nUr(e,r),w6e(t,u,e.bl_count)}function D6e(e,r,t){var n,i=-1,a,o=r[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),r[(t+1)*2+1]=65535,n=0;n<=t;n++)a=o,o=r[(n+1)*2+1],!(++s<u&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[h6e*2]++):s<=10?e.bl_tree[m6e*2]++:e.bl_tree[g6e*2]++,s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4))}function k6e(e,r,t){var n,i=-1,a,o=r[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),n=0;n<=t;n++)if(a=o,o=r[(n+1)*2+1],!(++s<u&&a===o)){if(s<l)do uc(e,a,e.bl_tree);while(--s!=0);else a!==0?(a!==i&&(uc(e,a,e.bl_tree),s--),uc(e,h6e,e.bl_tree),Lo(e,s-3,2)):s<=10?(uc(e,m6e,e.bl_tree),Lo(e,s-3,3)):(uc(e,g6e,e.bl_tree),Lo(e,s-11,7));s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4)}}function oUr(e){var r;for(D6e(e,e.dyn_ltree,e.l_desc.max_code),D6e(e,e.dyn_dtree,e.d_desc.max_code),Az(e,e.bl_desc),r=vz-1;r>=3&&e.bl_tree[v6e[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function sUr(e,r,t,n){var i;for(Lo(e,r-257,5),Lo(e,t-1,5),Lo(e,n-4,4),i=0;i<n;i++)Lo(e,e.bl_tree[v6e[i]*2+1],3);k6e(e,e.dyn_ltree,r-1),k6e(e,e.dyn_dtree,t-1)}function uUr(e){var r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return c6e;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return f6e;for(t=32;t<dE;t++)if(e.dyn_ltree[t*2]!==0)return f6e;return c6e}var O6e=!1;function lUr(e){O6e||(iUr(),O6e=!0),e.l_desc=new wz(e.dyn_ltree,b6e),e.d_desc=new wz(e.dyn_dtree,y6e),e.bl_desc=new wz(e.bl_tree,x6e),e.bi_buf=0,e.bi_valid=0,S6e(e)}function R6e(e,r,t,n){Lo(e,($Nr<<1)+(n?1:0),3),aUr(e,r,t,!0)}function cUr(e){Lo(e,d6e<<1,3),uc(e,yz,Rf),tUr(e)}function fUr(e,r,t,n){var i,a,o=0;e.level>0?(e.strm.data_type===YNr&&(e.strm.data_type=uUr(e)),Az(e,e.l_desc),Az(e,e.d_desc),o=oUr(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=t+5,t+4<=i&&r!==-1?R6e(e,r,t,n):e.strategy===KNr||a===i?(Lo(e,(d6e<<1)+(n?1:0),3),C6e(e,Rf,hE)):(Lo(e,(XNr<<1)+(n?1:0),3),sUr(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),C6e(e,e.dyn_ltree,e.dyn_dtree)),S6e(e),n&&A6e(e)}function dUr(e,r,t){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=t&255,e.last_lit++,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(gE[t]+dE+1)*2]++,e.dyn_dtree[_6e(r)*2]++),e.last_lit===e.lit_bufsize-1}wy._tr_init=lUr;wy._tr_stored_block=R6e;wy._tr_flush_block=fUr;wy._tr_tally=dUr;wy._tr_align=cUr});var Tz=m((IRt,I6e)=>{"use strict";function pUr(e,r,t,n){for(var i=e&65535|0,a=e>>>16&65535|0,o=0;t!==0;){o=t>2e3?2e3:t,t-=o;do i=i+r[n++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0}I6e.exports=pUr});var Cz=m((PRt,P6e)=>{"use strict";function hUr(){for(var e,r=[],t=0;t<256;t++){e=t;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r}var mUr=hUr();function gUr(e,r,t,n){var i=mUr,a=n+t;e^=-1;for(var o=n;o<a;o++)e=e>>>8^i[(e^r[o])&255];return e^-1}P6e.exports=gUr});var FO=m((BRt,B6e)=>{"use strict";B6e.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 H6e=m(fc=>{"use strict";var vo=Of(),Js=F6e(),j6e=Tz(),jp=Cz(),vUr=FO(),rm=0,bUr=1,yUr=3,Mp=4,M6e=5,lc=0,L6e=1,Qs=-2,xUr=-3,Dz=-5,_Ur=-1,EUr=1,IO=2,wUr=3,SUr=4,AUr=0,TUr=2,PO=8,CUr=9,DUr=15,kUr=8,OUr=29,RUr=256,kz=RUr+1+OUr,FUr=30,IUr=19,PUr=2*kz+1,BUr=15,jt=3,Lp=258,Yu=Lp+jt+1,jUr=32,BO=42,Oz=69,jO=73,MO=91,LO=103,tm=113,bE=666,ta=1,yE=2,nm=3,Sy=4,MUr=3;function qp(e,r){return e.msg=vUr[r],r}function q6e(e){return(e<<1)-(e>4?9:0)}function Np(e){for(var r=e.length;--r>=0;)e[r]=0}function Up(e){var r=e.state,t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(vo.arraySet(e.output,r.pending_buf,r.pending_out,t,e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))}function Ba(e,r){Js._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Up(e.strm)}function Qt(e,r){e.pending_buf[e.pending++]=r}function xE(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function LUr(e,r,t,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,vo.arraySet(r,e.input,e.next_in,i,t),e.state.wrap===1?e.adler=j6e(e.adler,r,i,t):e.state.wrap===2&&(e.adler=jp(e.adler,r,i,t)),e.next_in+=i,e.total_in+=i,i)}function N6e(e,r){var t=e.max_chain_length,n=e.strstart,i,a,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-Yu?e.strstart-(e.w_size-Yu):0,l=e.window,c=e.w_mask,f=e.prev,d=e.strstart+Lp,p=l[n+o-1],h=l[n+o];e.prev_length>=e.good_match&&(t>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=r,!(l[i+o]!==h||l[i+o-1]!==p||l[i]!==l[n]||l[++i]!==l[n+1])){n+=2,i++;do;while(l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&n<d);if(a=Lp-(d-n),n=d-Lp,a>o){if(e.match_start=r,o=a,a>=s)break;p=l[n+o-1],h=l[n+o]}}while((r=f[r&c])>u&&--t!=0);return o<=e.lookahead?o:e.lookahead}function im(e){var r=e.w_size,t,n,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-Yu)){vo.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,n=e.hash_size,t=n;do i=e.head[--t],e.head[t]=i>=r?i-r:0;while(--n);n=r,t=n;do i=e.prev[--t],e.prev[t]=i>=r?i-r:0;while(--n);a+=r}if(e.strm.avail_in===0)break;if(n=LUr(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=jt)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+jt-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<jt)););}while(e.lookahead<Yu&&e.strm.avail_in!==0)}function qUr(e,r){var t=65535;for(t>e.pending_buf_size-5&&(t=e.pending_buf_size-5);;){if(e.lookahead<=1){if(im(e),e.lookahead===0&&r===rm)return ta;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+t;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Ba(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Yu&&(Ba(e,!1),e.strm.avail_out===0))return ta}return e.insert=0,r===Mp?(Ba(e,!0),e.strm.avail_out===0?nm:Sy):(e.strstart>e.block_start&&(Ba(e,!1),e.strm.avail_out===0),ta)}function Rz(e,r){for(var t,n;;){if(e.lookahead<Yu){if(im(e),e.lookahead<Yu&&r===rm)return ta;if(e.lookahead===0)break}if(t=0,e.lookahead>=jt&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+jt-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-Yu&&(e.match_length=N6e(e,t)),e.match_length>=jt)if(n=Js._tr_tally(e,e.strstart-e.match_start,e.match_length-jt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=jt){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+jt-1])&e.hash_mask,t=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=Js._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Ba(e,!1),e.strm.avail_out===0))return ta}return e.insert=e.strstart<jt-1?e.strstart:jt-1,r===Mp?(Ba(e,!0),e.strm.avail_out===0?nm:Sy):e.last_lit&&(Ba(e,!1),e.strm.avail_out===0)?ta:yE}function Ay(e,r){for(var t,n,i;;){if(e.lookahead<Yu){if(im(e),e.lookahead<Yu&&r===rm)return ta;if(e.lookahead===0)break}if(t=0,e.lookahead>=jt&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+jt-1])&e.hash_mask,t=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=jt-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-Yu&&(e.match_length=N6e(e,t),e.match_length<=5&&(e.strategy===EUr||e.match_length===jt&&e.strstart-e.match_start>4096)&&(e.match_length=jt-1)),e.prev_length>=jt&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-jt,n=Js._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-jt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+jt-1])&e.hash_mask,t=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=jt-1,e.strstart++,n&&(Ba(e,!1),e.strm.avail_out===0))return ta}else if(e.match_available){if(n=Js._tr_tally(e,0,e.window[e.strstart-1]),n&&Ba(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return ta}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Js._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<jt-1?e.strstart:jt-1,r===Mp?(Ba(e,!0),e.strm.avail_out===0?nm:Sy):e.last_lit&&(Ba(e,!1),e.strm.avail_out===0)?ta:yE}function NUr(e,r){for(var t,n,i,a,o=e.window;;){if(e.lookahead<=Lp){if(im(e),e.lookahead<=Lp&&r===rm)return ta;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=jt&&e.strstart>0&&(i=e.strstart-1,n=o[i],n===o[++i]&&n===o[++i]&&n===o[++i])){a=e.strstart+Lp;do;while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<a);e.match_length=Lp-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=jt?(t=Js._tr_tally(e,1,e.match_length-jt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=Js._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(Ba(e,!1),e.strm.avail_out===0))return ta}return e.insert=0,r===Mp?(Ba(e,!0),e.strm.avail_out===0?nm:Sy):e.last_lit&&(Ba(e,!1),e.strm.avail_out===0)?ta:yE}function UUr(e,r){for(var t;;){if(e.lookahead===0&&(im(e),e.lookahead===0)){if(r===rm)return ta;break}if(e.match_length=0,t=Js._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(Ba(e,!1),e.strm.avail_out===0))return ta}return e.insert=0,r===Mp?(Ba(e,!0),e.strm.avail_out===0?nm:Sy):e.last_lit&&(Ba(e,!1),e.strm.avail_out===0)?ta:yE}function cc(e,r,t,n,i){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=n,this.func=i}var Ty;Ty=[new cc(0,0,0,0,qUr),new cc(4,4,8,4,Rz),new cc(4,5,16,8,Rz),new cc(4,6,32,32,Rz),new cc(4,4,16,16,Ay),new cc(8,16,32,32,Ay),new cc(8,16,128,128,Ay),new cc(8,32,128,256,Ay),new cc(32,128,258,1024,Ay),new cc(32,258,258,4096,Ay)];function GUr(e){e.window_size=2*e.w_size,Np(e.head),e.max_lazy_match=Ty[e.level].max_lazy,e.good_match=Ty[e.level].good_length,e.nice_match=Ty[e.level].nice_length,e.max_chain_length=Ty[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=jt-1,e.match_available=0,e.ins_h=0}function zUr(){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=PO,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 vo.Buf16(PUr*2),this.dyn_dtree=new vo.Buf16((2*FUr+1)*2),this.bl_tree=new vo.Buf16((2*IUr+1)*2),Np(this.dyn_ltree),Np(this.dyn_dtree),Np(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new vo.Buf16(BUr+1),this.heap=new vo.Buf16(2*kz+1),Np(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new vo.Buf16(2*kz+1),Np(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 U6e(e){var r;return!e||!e.state?qp(e,Qs):(e.total_in=e.total_out=0,e.data_type=TUr,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?BO:tm,e.adler=r.wrap===2?0:1,r.last_flush=rm,Js._tr_init(r),lc)}function G6e(e){var r=U6e(e);return r===lc&&GUr(e.state),r}function HUr(e,r){return!e||!e.state||e.state.wrap!==2?Qs:(e.state.gzhead=r,lc)}function z6e(e,r,t,n,i,a){if(!e)return Qs;var o=1;if(r===_Ur&&(r=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),i<1||i>CUr||t!==PO||n<8||n>15||r<0||r>9||a<0||a>SUr)return qp(e,Qs);n===8&&(n=9);var s=new zUr;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+jt-1)/jt),s.window=new vo.Buf8(s.w_size*2),s.head=new vo.Buf16(s.hash_size),s.prev=new vo.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new vo.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=r,s.strategy=a,s.method=t,G6e(e)}function WUr(e,r){return z6e(e,r,PO,DUr,kUr,AUr)}function VUr(e,r){var t,n,i,a;if(!e||!e.state||r>M6e||r<0)return e?qp(e,Qs):Qs;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===bE&&r!==Mp)return qp(e,e.avail_out===0?Dz:Qs);if(n.strm=e,t=n.last_flush,n.last_flush=r,n.status===BO)if(n.wrap===2)e.adler=0,Qt(n,31),Qt(n,139),Qt(n,8),n.gzhead?(Qt(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)),Qt(n,n.gzhead.time&255),Qt(n,n.gzhead.time>>8&255),Qt(n,n.gzhead.time>>16&255),Qt(n,n.gzhead.time>>24&255),Qt(n,n.level===9?2:n.strategy>=IO||n.level<2?4:0),Qt(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Qt(n,n.gzhead.extra.length&255),Qt(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=jp(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Oz):(Qt(n,0),Qt(n,0),Qt(n,0),Qt(n,0),Qt(n,0),Qt(n,n.level===9?2:n.strategy>=IO||n.level<2?4:0),Qt(n,MUr),n.status=tm);else{var o=PO+(n.w_bits-8<<4)<<8,s=-1;n.strategy>=IO||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,o|=s<<6,n.strstart!==0&&(o|=jUr),o+=31-o%31,n.status=tm,xE(n,o),n.strstart!==0&&(xE(n,e.adler>>>16),xE(n,e.adler&65535)),e.adler=1}if(n.status===Oz)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=jp(e.adler,n.pending_buf,n.pending-i,i)),Up(e),i=n.pending,n.pending===n.pending_buf_size));)Qt(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=jp(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=jO)}else n.status=jO;if(n.status===jO)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=jp(e.adler,n.pending_buf,n.pending-i,i)),Up(e),i=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,Qt(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=jp(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.gzindex=0,n.status=MO)}else n.status=MO;if(n.status===MO)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=jp(e.adler,n.pending_buf,n.pending-i,i)),Up(e),i=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,Qt(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=jp(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.status=LO)}else n.status=LO;if(n.status===LO&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Up(e),n.pending+2<=n.pending_buf_size&&(Qt(n,e.adler&255),Qt(n,e.adler>>8&255),e.adler=0,n.status=tm)):n.status=tm),n.pending!==0){if(Up(e),e.avail_out===0)return n.last_flush=-1,lc}else if(e.avail_in===0&&q6e(r)<=q6e(t)&&r!==Mp)return qp(e,Dz);if(n.status===bE&&e.avail_in!==0)return qp(e,Dz);if(e.avail_in!==0||n.lookahead!==0||r!==rm&&n.status!==bE){var u=n.strategy===IO?UUr(n,r):n.strategy===wUr?NUr(n,r):Ty[n.level].func(n,r);if((u===nm||u===Sy)&&(n.status=bE),u===ta||u===nm)return e.avail_out===0&&(n.last_flush=-1),lc;if(u===yE&&(r===bUr?Js._tr_align(n):r!==M6e&&(Js._tr_stored_block(n,0,0,!1),r===yUr&&(Np(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Up(e),e.avail_out===0))return n.last_flush=-1,lc}return r!==Mp?lc:n.wrap<=0?L6e:(n.wrap===2?(Qt(n,e.adler&255),Qt(n,e.adler>>8&255),Qt(n,e.adler>>16&255),Qt(n,e.adler>>24&255),Qt(n,e.total_in&255),Qt(n,e.total_in>>8&255),Qt(n,e.total_in>>16&255),Qt(n,e.total_in>>24&255)):(xE(n,e.adler>>>16),xE(n,e.adler&65535)),Up(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?lc:L6e)}function KUr(e){var r;return!e||!e.state?Qs:(r=e.state.status,r!==BO&&r!==Oz&&r!==jO&&r!==MO&&r!==LO&&r!==tm&&r!==bE?qp(e,Qs):(e.state=null,r===tm?qp(e,xUr):lc))}function YUr(e,r){var t=r.length,n,i,a,o,s,u,l,c;if(!e||!e.state||(n=e.state,o=n.wrap,o===2||o===1&&n.status!==BO||n.lookahead))return Qs;for(o===1&&(e.adler=j6e(e.adler,r,t,0)),n.wrap=0,t>=n.w_size&&(o===0&&(Np(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new vo.Buf8(n.w_size),vo.arraySet(c,r,t-n.w_size,n.w_size,0),r=c,t=n.w_size),s=e.avail_in,u=e.next_in,l=e.input,e.avail_in=t,e.next_in=0,e.input=r,im(n);n.lookahead>=jt;){i=n.strstart,a=n.lookahead-(jt-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+jt-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++;while(--a);n.strstart=i,n.lookahead=jt-1,im(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=jt-1,n.match_available=0,e.next_in=u,e.input=l,e.avail_in=s,n.wrap=o,lc}fc.deflateInit=WUr;fc.deflateInit2=z6e;fc.deflateReset=G6e;fc.deflateResetKeep=U6e;fc.deflateSetHeader=HUr;fc.deflate=VUr;fc.deflateEnd=KUr;fc.deflateSetDictionary=YUr;fc.deflateInfo="pako deflate (from Nodeca project)"});var Fz=m(Cy=>{"use strict";var qO=Of(),W6e=!0,V6e=!0;try{String.fromCharCode.apply(null,[0])}catch{W6e=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{V6e=!1}var _E=new qO.Buf8(256);for(Ff=0;Ff<256;Ff++)_E[Ff]=Ff>=252?6:Ff>=248?5:Ff>=240?4:Ff>=224?3:Ff>=192?2:1;var Ff;_E[254]=_E[254]=1;Cy.string2buf=function(e){var r,t,n,i,a,o=e.length,s=0;for(i=0;i<o;i++)t=e.charCodeAt(i),(t&64512)==55296&&i+1<o&&(n=e.charCodeAt(i+1),(n&64512)==56320&&(t=65536+(t-55296<<10)+(n-56320),i++)),s+=t<128?1:t<2048?2:t<65536?3:4;for(r=new qO.Buf8(s),a=0,i=0;a<s;i++)t=e.charCodeAt(i),(t&64512)==55296&&i+1<o&&(n=e.charCodeAt(i+1),(n&64512)==56320&&(t=65536+(t-55296<<10)+(n-56320),i++)),t<128?r[a++]=t:t<2048?(r[a++]=192|t>>>6,r[a++]=128|t&63):t<65536?(r[a++]=224|t>>>12,r[a++]=128|t>>>6&63,r[a++]=128|t&63):(r[a++]=240|t>>>18,r[a++]=128|t>>>12&63,r[a++]=128|t>>>6&63,r[a++]=128|t&63);return r};function K6e(e,r){if(r<65534&&(e.subarray&&V6e||!e.subarray&&W6e))return String.fromCharCode.apply(null,qO.shrinkBuf(e,r));for(var t="",n=0;n<r;n++)t+=String.fromCharCode(e[n]);return t}Cy.buf2binstring=function(e){return K6e(e,e.length)};Cy.binstring2buf=function(e){for(var r=new qO.Buf8(e.length),t=0,n=r.length;t<n;t++)r[t]=e.charCodeAt(t);return r};Cy.buf2string=function(e,r){var t,n,i,a,o=r||e.length,s=new Array(o*2);for(n=0,t=0;t<o;){if(i=e[t++],i<128){s[n++]=i;continue}if(a=_E[i],a>4){s[n++]=65533,t+=a-1;continue}for(i&=a===2?31:a===3?15:7;a>1&&t<o;)i=i<<6|e[t++]&63,a--;if(a>1){s[n++]=65533;continue}i<65536?s[n++]=i:(i-=65536,s[n++]=55296|i>>10&1023,s[n++]=56320|i&1023)}return K6e(s,n)};Cy.utf8border=function(e,r){var t;for(r=r||e.length,r>e.length&&(r=e.length),t=r-1;t>=0&&(e[t]&192)==128;)t--;return t<0||t===0?r:t+_E[e[t]]>r?t:r}});var Iz=m((LRt,Y6e)=>{"use strict";function $Ur(){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}Y6e.exports=$Ur});var Q6e=m(SE=>{"use strict";var EE=H6e(),wE=Of(),Pz=Fz(),Bz=FO(),XUr=Iz(),$6e=Object.prototype.toString,JUr=0,jz=4,Dy=0,X6e=1,J6e=2,QUr=-1,ZUr=0,eGr=8;function am(e){if(!(this instanceof am))return new am(e);this.options=wE.assign({level:QUr,method:eGr,chunkSize:16384,windowBits:15,memLevel:8,strategy:ZUr,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new XUr,this.strm.avail_out=0;var t=EE.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==Dy)throw new Error(Bz[t]);if(r.header&&EE.deflateSetHeader(this.strm,r.header),r.dictionary){var n;if(typeof r.dictionary=="string"?n=Pz.string2buf(r.dictionary):$6e.call(r.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(r.dictionary):n=r.dictionary,t=EE.deflateSetDictionary(this.strm,n),t!==Dy)throw new Error(Bz[t]);this._dict_set=!0}}am.prototype.push=function(e,r){var t=this.strm,n=this.options.chunkSize,i,a;if(this.ended)return!1;a=r===~~r?r:r===!0?jz:JUr,typeof e=="string"?t.input=Pz.string2buf(e):$6e.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new wE.Buf8(n),t.next_out=0,t.avail_out=n),i=EE.deflate(t,a),i!==X6e&&i!==Dy)return this.onEnd(i),this.ended=!0,!1;(t.avail_out===0||t.avail_in===0&&(a===jz||a===J6e))&&(this.options.to==="string"?this.onData(Pz.buf2binstring(wE.shrinkBuf(t.output,t.next_out))):this.onData(wE.shrinkBuf(t.output,t.next_out)))}while((t.avail_in>0||t.avail_out===0)&&i!==X6e);return a===jz?(i=EE.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Dy):(a===J6e&&(this.onEnd(Dy),t.avail_out=0),!0)};am.prototype.onData=function(e){this.chunks.push(e)};am.prototype.onEnd=function(e){e===Dy&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=wE.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Mz(e,r){var t=new am(r);if(t.push(e,!0),t.err)throw t.msg||Bz[t.err];return t.result}function rGr(e,r){return r=r||{},r.raw=!0,Mz(e,r)}function tGr(e,r){return r=r||{},r.gzip=!0,Mz(e,r)}SE.Deflate=am;SE.deflate=Mz;SE.deflateRaw=rGr;SE.gzip=tGr});var eCe=m((NRt,Z6e)=>{"use strict";var NO=30,nGr=12;Z6e.exports=function(r,t){var n,i,a,o,s,u,l,c,f,d,p,h,b,v,y,w,A,C,D,P,k,L,I,V,N;n=r.state,i=r.next_in,V=r.input,a=i+(r.avail_in-5),o=r.next_out,N=r.output,s=o-(t-r.avail_out),u=o+(r.avail_out-257),l=n.dmax,c=n.wsize,f=n.whave,d=n.wnext,p=n.window,h=n.hold,b=n.bits,v=n.lencode,y=n.distcode,w=(1<<n.lenbits)-1,A=(1<<n.distbits)-1;e:do{b<15&&(h+=V[i++]<<b,b+=8,h+=V[i++]<<b,b+=8),C=v[h&w];r:for(;;){if(D=C>>>24,h>>>=D,b-=D,D=C>>>16&255,D===0)N[o++]=C&65535;else if(D&16){P=C&65535,D&=15,D&&(b<D&&(h+=V[i++]<<b,b+=8),P+=h&(1<<D)-1,h>>>=D,b-=D),b<15&&(h+=V[i++]<<b,b+=8,h+=V[i++]<<b,b+=8),C=y[h&A];t:for(;;){if(D=C>>>24,h>>>=D,b-=D,D=C>>>16&255,D&16){if(k=C&65535,D&=15,b<D&&(h+=V[i++]<<b,b+=8,b<D&&(h+=V[i++]<<b,b+=8)),k+=h&(1<<D)-1,k>l){r.msg="invalid distance too far back",n.mode=NO;break e}if(h>>>=D,b-=D,D=o-s,k>D){if(D=k-D,D>f&&n.sane){r.msg="invalid distance too far back",n.mode=NO;break e}if(L=0,I=p,d===0){if(L+=c-D,D<P){P-=D;do N[o++]=p[L++];while(--D);L=o-k,I=N}}else if(d<D){if(L+=c+d-D,D-=d,D<P){P-=D;do N[o++]=p[L++];while(--D);if(L=0,d<P){D=d,P-=D;do N[o++]=p[L++];while(--D);L=o-k,I=N}}}else if(L+=d-D,D<P){P-=D;do N[o++]=p[L++];while(--D);L=o-k,I=N}for(;P>2;)N[o++]=I[L++],N[o++]=I[L++],N[o++]=I[L++],P-=3;P&&(N[o++]=I[L++],P>1&&(N[o++]=I[L++]))}else{L=o-k;do N[o++]=N[L++],N[o++]=N[L++],N[o++]=N[L++],P-=3;while(P>2);P&&(N[o++]=N[L++],P>1&&(N[o++]=N[L++]))}}else if((D&64)==0){C=y[(C&65535)+(h&(1<<D)-1)];continue t}else{r.msg="invalid distance code",n.mode=NO;break e}break}}else if((D&64)==0){C=v[(C&65535)+(h&(1<<D)-1)];continue r}else if(D&32){n.mode=nGr;break e}else{r.msg="invalid literal/length code",n.mode=NO;break e}break}}while(i<a&&o<u);P=b>>3,i-=P,b-=P<<3,h&=(1<<b)-1,r.next_in=i,r.next_out=o,r.avail_in=i<a?5+(a-i):5-(i-a),r.avail_out=o<u?257+(u-o):257-(o-u),n.hold=h,n.bits=b}});var sCe=m((URt,oCe)=>{"use strict";var rCe=Of(),ky=15,tCe=852,nCe=592,iCe=0,Lz=1,aCe=2,iGr=[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],aGr=[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],oGr=[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],sGr=[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];oCe.exports=function(r,t,n,i,a,o,s,u){var l=u.bits,c=0,f=0,d=0,p=0,h=0,b=0,v=0,y=0,w=0,A=0,C,D,P,k,L,I=null,V=0,N,W=new rCe.Buf16(ky+1),M=new rCe.Buf16(ky+1),H=null,X=0,ne,ae,se;for(c=0;c<=ky;c++)W[c]=0;for(f=0;f<i;f++)W[t[n+f]]++;for(h=l,p=ky;p>=1&&W[p]===0;p--);if(h>p&&(h=p),p===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,u.bits=1,0;for(d=1;d<p&&W[d]===0;d++);for(h<d&&(h=d),y=1,c=1;c<=ky;c++)if(y<<=1,y-=W[c],y<0)return-1;if(y>0&&(r===iCe||p!==1))return-1;for(M[1]=0,c=1;c<ky;c++)M[c+1]=M[c]+W[c];for(f=0;f<i;f++)t[n+f]!==0&&(s[M[t[n+f]]++]=f);if(r===iCe?(I=H=s,N=19):r===Lz?(I=iGr,V-=257,H=aGr,X-=257,N=256):(I=oGr,H=sGr,N=-1),A=0,f=0,c=d,L=o,b=h,v=0,P=-1,w=1<<h,k=w-1,r===Lz&&w>tCe||r===aCe&&w>nCe)return 1;for(;;){ne=c-v,s[f]<N?(ae=0,se=s[f]):s[f]>N?(ae=H[X+s[f]],se=I[V+s[f]]):(ae=32+64,se=0),C=1<<c-v,D=1<<b,d=D;do D-=C,a[L+(A>>v)+D]=ne<<24|ae<<16|se|0;while(D!==0);for(C=1<<c-1;A&C;)C>>=1;if(C!==0?(A&=C-1,A+=C):A=0,f++,--W[c]==0){if(c===p)break;c=t[n+s[f]]}if(c>h&&(A&k)!==P){for(v===0&&(v=h),L+=d,b=c-v,y=1<<b;b+v<p&&(y-=W[b+v],!(y<=0));)b++,y<<=1;if(w+=1<<b,r===Lz&&w>tCe||r===aCe&&w>nCe)return 1;P=A&k,a[P]=h<<24|b<<16|L-o|0}}return A!==0&&(a[L+A]=c-v<<24|64<<16|0),u.bits=h,0}});var GCe=m($u=>{"use strict";var os=Of(),qz=Tz(),dc=Cz(),uGr=eCe(),AE=sCe(),lGr=0,uCe=1,lCe=2,cCe=4,cGr=5,UO=6,om=0,fGr=1,dGr=2,Zs=-2,fCe=-3,Nz=-4,pGr=-5,dCe=8,pCe=1,hCe=2,mCe=3,gCe=4,vCe=5,bCe=6,yCe=7,xCe=8,_Ce=9,ECe=10,GO=11,If=12,Uz=13,wCe=14,Gz=15,SCe=16,ACe=17,TCe=18,CCe=19,zO=20,HO=21,DCe=22,kCe=23,OCe=24,RCe=25,FCe=26,zz=27,ICe=28,PCe=29,Nn=30,Hz=31,hGr=32,mGr=852,gGr=592,vGr=15,bGr=vGr;function BCe(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function yGr(){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 os.Buf16(320),this.work=new os.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function jCe(e){var r;return!e||!e.state?Zs:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=pCe,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new os.Buf32(mGr),r.distcode=r.distdyn=new os.Buf32(gGr),r.sane=1,r.back=-1,om)}function MCe(e){var r;return!e||!e.state?Zs:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,jCe(e))}function LCe(e,r){var t,n;return!e||!e.state||(n=e.state,r<0?(t=0,r=-r):(t=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?Zs:(n.window!==null&&n.wbits!==r&&(n.window=null),n.wrap=t,n.wbits=r,MCe(e))}function qCe(e,r){var t,n;return e?(n=new yGr,e.state=n,n.window=null,t=LCe(e,r),t!==om&&(e.state=null),t):Zs}function xGr(e){return qCe(e,bGr)}var NCe=!0,Wz,Vz;function _Gr(e){if(NCe){var r;for(Wz=new os.Buf32(512),Vz=new os.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(AE(uCe,e.lens,0,288,Wz,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;AE(lCe,e.lens,0,32,Vz,0,e.work,{bits:5}),NCe=!1}e.lencode=Wz,e.lenbits=9,e.distcode=Vz,e.distbits=5}function UCe(e,r,t,n){var i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new os.Buf8(a.wsize)),n>=a.wsize?(os.arraySet(a.window,r,t-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),os.arraySet(a.window,r,t-n,i,a.wnext),n-=i,n?(os.arraySet(a.window,r,t-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function EGr(e,r){var t,n,i,a,o,s,u,l,c,f,d,p,h,b,v=0,y,w,A,C,D,P,k,L,I=new os.Buf8(4),V,N,W=[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 Zs;t=e.state,t.mode===If&&(t.mode=Uz),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,l=t.hold,c=t.bits,f=s,d=u,L=om;e:for(;;)switch(t.mode){case pCe:if(t.wrap===0){t.mode=Uz;break}for(;c<16;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(t.wrap&2&&l===35615){t.check=0,I[0]=l&255,I[1]=l>>>8&255,t.check=dc(t.check,I,2,0),l=0,c=0,t.mode=hCe;break}if(t.flags=0,t.head&&(t.head.done=!1),!(t.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",t.mode=Nn;break}if((l&15)!==dCe){e.msg="unknown compression method",t.mode=Nn;break}if(l>>>=4,c-=4,k=(l&15)+8,t.wbits===0)t.wbits=k;else if(k>t.wbits){e.msg="invalid window size",t.mode=Nn;break}t.dmax=1<<k,e.adler=t.check=1,t.mode=l&512?ECe:If,l=0,c=0;break;case hCe:for(;c<16;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(t.flags=l,(t.flags&255)!==dCe){e.msg="unknown compression method",t.mode=Nn;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=Nn;break}t.head&&(t.head.text=l>>8&1),t.flags&512&&(I[0]=l&255,I[1]=l>>>8&255,t.check=dc(t.check,I,2,0)),l=0,c=0,t.mode=mCe;case mCe:for(;c<32;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.head&&(t.head.time=l),t.flags&512&&(I[0]=l&255,I[1]=l>>>8&255,I[2]=l>>>16&255,I[3]=l>>>24&255,t.check=dc(t.check,I,4,0)),l=0,c=0,t.mode=gCe;case gCe:for(;c<16;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.head&&(t.head.xflags=l&255,t.head.os=l>>8),t.flags&512&&(I[0]=l&255,I[1]=l>>>8&255,t.check=dc(t.check,I,2,0)),l=0,c=0,t.mode=vCe;case vCe:if(t.flags&1024){for(;c<16;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.length=l,t.head&&(t.head.extra_len=l),t.flags&512&&(I[0]=l&255,I[1]=l>>>8&255,t.check=dc(t.check,I,2,0)),l=0,c=0}else t.head&&(t.head.extra=null);t.mode=bCe;case bCe:if(t.flags&1024&&(p=t.length,p>s&&(p=s),p&&(t.head&&(k=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),os.arraySet(t.head.extra,n,a,p,k)),t.flags&512&&(t.check=dc(t.check,n,p,a)),s-=p,a+=p,t.length-=p),t.length))break e;t.length=0,t.mode=yCe;case yCe:if(t.flags&2048){if(s===0)break e;p=0;do k=n[a+p++],t.head&&k&&t.length<65536&&(t.head.name+=String.fromCharCode(k));while(k&&p<s);if(t.flags&512&&(t.check=dc(t.check,n,p,a)),s-=p,a+=p,k)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=xCe;case xCe:if(t.flags&4096){if(s===0)break e;p=0;do k=n[a+p++],t.head&&k&&t.length<65536&&(t.head.comment+=String.fromCharCode(k));while(k&&p<s);if(t.flags&512&&(t.check=dc(t.check,n,p,a)),s-=p,a+=p,k)break e}else t.head&&(t.head.comment=null);t.mode=_Ce;case _Ce:if(t.flags&512){for(;c<16;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(l!==(t.check&65535)){e.msg="header crc mismatch",t.mode=Nn;break}l=0,c=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=If;break;case ECe:for(;c<32;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}e.adler=t.check=BCe(l),l=0,c=0,t.mode=GO;case GO:if(t.havedict===0)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,t.hold=l,t.bits=c,dGr;e.adler=t.check=1,t.mode=If;case If:if(r===cGr||r===UO)break e;case Uz:if(t.last){l>>>=c&7,c-=c&7,t.mode=zz;break}for(;c<3;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}switch(t.last=l&1,l>>>=1,c-=1,l&3){case 0:t.mode=wCe;break;case 1:if(_Gr(t),t.mode=zO,r===UO){l>>>=2,c-=2;break e}break;case 2:t.mode=ACe;break;case 3:e.msg="invalid block type",t.mode=Nn}l>>>=2,c-=2;break;case wCe:for(l>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if((l&65535)!=(l>>>16^65535)){e.msg="invalid stored block lengths",t.mode=Nn;break}if(t.length=l&65535,l=0,c=0,t.mode=Gz,r===UO)break e;case Gz:t.mode=SCe;case SCe:if(p=t.length,p){if(p>s&&(p=s),p>u&&(p=u),p===0)break e;os.arraySet(i,n,a,p,o),s-=p,a+=p,u-=p,o+=p,t.length-=p;break}t.mode=If;break;case ACe:for(;c<14;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(t.nlen=(l&31)+257,l>>>=5,c-=5,t.ndist=(l&31)+1,l>>>=5,c-=5,t.ncode=(l&15)+4,l>>>=4,c-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=Nn;break}t.have=0,t.mode=TCe;case TCe:for(;t.have<t.ncode;){for(;c<3;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.lens[W[t.have++]]=l&7,l>>>=3,c-=3}for(;t.have<19;)t.lens[W[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,V={bits:t.lenbits},L=AE(lGr,t.lens,0,19,t.lencode,0,t.work,V),t.lenbits=V.bits,L){e.msg="invalid code lengths set",t.mode=Nn;break}t.have=0,t.mode=CCe;case CCe:for(;t.have<t.nlen+t.ndist;){for(;v=t.lencode[l&(1<<t.lenbits)-1],y=v>>>24,w=v>>>16&255,A=v&65535,!(y<=c);){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(A<16)l>>>=y,c-=y,t.lens[t.have++]=A;else{if(A===16){for(N=y+2;c<N;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(l>>>=y,c-=y,t.have===0){e.msg="invalid bit length repeat",t.mode=Nn;break}k=t.lens[t.have-1],p=3+(l&3),l>>>=2,c-=2}else if(A===17){for(N=y+3;c<N;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}l>>>=y,c-=y,k=0,p=3+(l&7),l>>>=3,c-=3}else{for(N=y+7;c<N;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}l>>>=y,c-=y,k=0,p=11+(l&127),l>>>=7,c-=7}if(t.have+p>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=Nn;break}for(;p--;)t.lens[t.have++]=k}}if(t.mode===Nn)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=Nn;break}if(t.lenbits=9,V={bits:t.lenbits},L=AE(uCe,t.lens,0,t.nlen,t.lencode,0,t.work,V),t.lenbits=V.bits,L){e.msg="invalid literal/lengths set",t.mode=Nn;break}if(t.distbits=6,t.distcode=t.distdyn,V={bits:t.distbits},L=AE(lCe,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,V),t.distbits=V.bits,L){e.msg="invalid distances set",t.mode=Nn;break}if(t.mode=zO,r===UO)break e;case zO:t.mode=HO;case HO:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,t.hold=l,t.bits=c,uGr(e,d),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,l=t.hold,c=t.bits,t.mode===If&&(t.back=-1);break}for(t.back=0;v=t.lencode[l&(1<<t.lenbits)-1],y=v>>>24,w=v>>>16&255,A=v&65535,!(y<=c);){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(w&&(w&240)==0){for(C=y,D=w,P=A;v=t.lencode[P+((l&(1<<C+D)-1)>>C)],y=v>>>24,w=v>>>16&255,A=v&65535,!(C+y<=c);){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}l>>>=C,c-=C,t.back+=C}if(l>>>=y,c-=y,t.back+=y,t.length=A,w===0){t.mode=FCe;break}if(w&32){t.back=-1,t.mode=If;break}if(w&64){e.msg="invalid literal/length code",t.mode=Nn;break}t.extra=w&15,t.mode=DCe;case DCe:if(t.extra){for(N=t.extra;c<N;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.length+=l&(1<<t.extra)-1,l>>>=t.extra,c-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=kCe;case kCe:for(;v=t.distcode[l&(1<<t.distbits)-1],y=v>>>24,w=v>>>16&255,A=v&65535,!(y<=c);){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if((w&240)==0){for(C=y,D=w,P=A;v=t.distcode[P+((l&(1<<C+D)-1)>>C)],y=v>>>24,w=v>>>16&255,A=v&65535,!(C+y<=c);){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}l>>>=C,c-=C,t.back+=C}if(l>>>=y,c-=y,t.back+=y,w&64){e.msg="invalid distance code",t.mode=Nn;break}t.offset=A,t.extra=w&15,t.mode=OCe;case OCe:if(t.extra){for(N=t.extra;c<N;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.offset+=l&(1<<t.extra)-1,l>>>=t.extra,c-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=Nn;break}t.mode=RCe;case RCe:if(u===0)break e;if(p=d-u,t.offset>p){if(p=t.offset-p,p>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=Nn;break}p>t.wnext?(p-=t.wnext,h=t.wsize-p):h=t.wnext-p,p>t.length&&(p=t.length),b=t.window}else b=i,h=o-t.offset,p=t.length;p>u&&(p=u),u-=p,t.length-=p;do i[o++]=b[h++];while(--p);t.length===0&&(t.mode=HO);break;case FCe:if(u===0)break e;i[o++]=t.length,u--,t.mode=HO;break;case zz:if(t.wrap){for(;c<32;){if(s===0)break e;s--,l|=n[a++]<<c,c+=8}if(d-=u,e.total_out+=d,t.total+=d,d&&(e.adler=t.check=t.flags?dc(t.check,i,d,o-d):qz(t.check,i,d,o-d)),d=u,(t.flags?l:BCe(l))!==t.check){e.msg="incorrect data check",t.mode=Nn;break}l=0,c=0}t.mode=ICe;case ICe:if(t.wrap&&t.flags){for(;c<32;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(l!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=Nn;break}l=0,c=0}t.mode=PCe;case PCe:L=fGr;break e;case Nn:L=fCe;break e;case Hz:return Nz;case hGr:default:return Zs}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,t.hold=l,t.bits=c,(t.wsize||d!==e.avail_out&&t.mode<Nn&&(t.mode<zz||r!==cCe))&&UCe(e,e.output,e.next_out,d-e.avail_out)?(t.mode=Hz,Nz):(f-=e.avail_in,d-=e.avail_out,e.total_in+=f,e.total_out+=d,t.total+=d,t.wrap&&d&&(e.adler=t.check=t.flags?dc(t.check,i,d,e.next_out-d):qz(t.check,i,d,e.next_out-d)),e.data_type=t.bits+(t.last?64:0)+(t.mode===If?128:0)+(t.mode===zO||t.mode===Gz?256:0),(f===0&&d===0||r===cCe)&&L===om&&(L=pGr),L)}function wGr(e){if(!e||!e.state)return Zs;var r=e.state;return r.window&&(r.window=null),e.state=null,om}function SGr(e,r){var t;return!e||!e.state||(t=e.state,(t.wrap&2)==0)?Zs:(t.head=r,r.done=!1,om)}function AGr(e,r){var t=r.length,n,i,a;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==GO)?Zs:n.mode===GO&&(i=1,i=qz(i,r,t,0),i!==n.check)?fCe:(a=UCe(e,r,t,t),a?(n.mode=Hz,Nz):(n.havedict=1,om))}$u.inflateReset=MCe;$u.inflateReset2=LCe;$u.inflateResetKeep=jCe;$u.inflateInit=xGr;$u.inflateInit2=qCe;$u.inflate=EGr;$u.inflateEnd=wGr;$u.inflateGetHeader=SGr;$u.inflateSetDictionary=AGr;$u.inflateInfo="pako inflate (from Nodeca project)"});var Kz=m((zRt,zCe)=>{"use strict";zCe.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 WCe=m((HRt,HCe)=>{"use strict";function TGr(){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}HCe.exports=TGr});var KCe=m(CE=>{"use strict";var Oy=GCe(),TE=Of(),WO=Fz(),Ci=Kz(),Yz=FO(),CGr=Iz(),DGr=WCe(),VCe=Object.prototype.toString;function sm(e){if(!(this instanceof sm))return new sm(e);this.options=TE.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15)==0&&(r.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new CGr,this.strm.avail_out=0;var t=Oy.inflateInit2(this.strm,r.windowBits);if(t!==Ci.Z_OK)throw new Error(Yz[t]);if(this.header=new DGr,Oy.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=WO.string2buf(r.dictionary):VCe.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=Oy.inflateSetDictionary(this.strm,r.dictionary),t!==Ci.Z_OK)))throw new Error(Yz[t])}sm.prototype.push=function(e,r){var t=this.strm,n=this.options.chunkSize,i=this.options.dictionary,a,o,s,u,l,c=!1;if(this.ended)return!1;o=r===~~r?r:r===!0?Ci.Z_FINISH:Ci.Z_NO_FLUSH,typeof e=="string"?t.input=WO.binstring2buf(e):VCe.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new TE.Buf8(n),t.next_out=0,t.avail_out=n),a=Oy.inflate(t,Ci.Z_NO_FLUSH),a===Ci.Z_NEED_DICT&&i&&(a=Oy.inflateSetDictionary(this.strm,i)),a===Ci.Z_BUF_ERROR&&c===!0&&(a=Ci.Z_OK,c=!1),a!==Ci.Z_STREAM_END&&a!==Ci.Z_OK)return this.onEnd(a),this.ended=!0,!1;t.next_out&&(t.avail_out===0||a===Ci.Z_STREAM_END||t.avail_in===0&&(o===Ci.Z_FINISH||o===Ci.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=WO.utf8border(t.output,t.next_out),u=t.next_out-s,l=WO.buf2string(t.output,s),t.next_out=u,t.avail_out=n-u,u&&TE.arraySet(t.output,t.output,s,u,0),this.onData(l)):this.onData(TE.shrinkBuf(t.output,t.next_out))),t.avail_in===0&&t.avail_out===0&&(c=!0)}while((t.avail_in>0||t.avail_out===0)&&a!==Ci.Z_STREAM_END);return a===Ci.Z_STREAM_END&&(o=Ci.Z_FINISH),o===Ci.Z_FINISH?(a=Oy.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Ci.Z_OK):(o===Ci.Z_SYNC_FLUSH&&(this.onEnd(Ci.Z_OK),t.avail_out=0),!0)};sm.prototype.onData=function(e){this.chunks.push(e)};sm.prototype.onEnd=function(e){e===Ci.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=TE.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function $z(e,r){var t=new sm(r);if(t.push(e,!0),t.err)throw t.msg||Yz[t.err];return t.result}function kGr(e,r){return r=r||{},r.raw=!0,$z(e,r)}CE.Inflate=sm;CE.inflate=$z;CE.inflateRaw=kGr;CE.ungzip=$z});var XCe=m((VRt,$Ce)=>{"use strict";var OGr=Of().assign,RGr=Q6e(),FGr=KCe(),IGr=Kz(),YCe={};OGr(YCe,RGr,FGr,IGr);$Ce.exports=YCe});var QCe=m(KO=>{"use strict";var PGr=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined",BGr=XCe(),JCe=Jn(),VO=as(),jGr=PGr?"uint8array":"array";KO.magic="\b\0";function um(e,r){VO.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=r,this.meta={}}JCe.inherits(um,VO);um.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(JCe.transformTo(jGr,e.data),!1)};um.prototype.flush=function(){VO.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)};um.prototype.cleanUp=function(){VO.prototype.cleanUp.call(this),this._pako=null};um.prototype._createPako=function(){this._pako=new BGr[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(r){e.push({data:r,meta:e.meta})}};KO.compressWorker=function(e){return new um("Deflate",e)};KO.uncompressWorker=function(){return new um("Inflate",{})}});var Jz=m(Xz=>{"use strict";var ZCe=as();Xz.STORE={magic:"\0\0",compressWorker:function(){return new ZCe("STORE compression")},uncompressWorker:function(){return new ZCe("STORE decompression")}};Xz.DEFLATE=QCe()});var Qz=m(lm=>{"use strict";lm.LOCAL_FILE_HEADER="PK";lm.CENTRAL_FILE_HEADER="PK";lm.CENTRAL_DIRECTORY_END="PK";lm.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";lm.ZIP64_CENTRAL_DIRECTORY_END="PK";lm.DATA_DESCRIPTOR="PK\x07\b"});var n8e=m((XRt,t8e)=>{"use strict";var Ry=Jn(),Fy=as(),Zz=yy(),e8e=CO(),YO=Qz(),Pn=function(e,r){var t="",n;for(n=0;n<r;n++)t+=String.fromCharCode(e&255),e=e>>>8;return t},MGr=function(e,r){var t=e;return e||(t=r?16893:33204),(t&65535)<<16},LGr=function(e){return(e||0)&63},r8e=function(e,r,t,n,i,a){var o=e.file,s=e.compression,u=a!==Zz.utf8encode,l=Ry.transformTo("string",a(o.name)),c=Ry.transformTo("string",Zz.utf8encode(o.name)),f=o.comment,d=Ry.transformTo("string",a(f)),p=Ry.transformTo("string",Zz.utf8encode(f)),h=c.length!==o.name.length,b=p.length!==f.length,v,y,w="",A="",C="",D=o.dir,P=o.date,k={crc32:0,compressedSize:0,uncompressedSize:0};(!r||t)&&(k.crc32=e.crc32,k.compressedSize=e.compressedSize,k.uncompressedSize=e.uncompressedSize);var L=0;r&&(L|=8),!u&&(h||b)&&(L|=2048);var I=0,V=0;D&&(I|=16),i==="UNIX"?(V=798,I|=MGr(o.unixPermissions,D)):(V=20,I|=LGr(o.dosPermissions,D)),v=P.getUTCHours(),v=v<<6,v=v|P.getUTCMinutes(),v=v<<5,v=v|P.getUTCSeconds()/2,y=P.getUTCFullYear()-1980,y=y<<4,y=y|P.getUTCMonth()+1,y=y<<5,y=y|P.getUTCDate(),h&&(A=Pn(1,1)+Pn(e8e(l),4)+c,w+="up"+Pn(A.length,2)+A),b&&(C=Pn(1,1)+Pn(e8e(d),4)+p,w+="uc"+Pn(C.length,2)+C);var N="";N+=`
|
|
163
|
+
\0`,N+=Pn(L,2),N+=s.magic,N+=Pn(v,2),N+=Pn(y,2),N+=Pn(k.crc32,4),N+=Pn(k.compressedSize,4),N+=Pn(k.uncompressedSize,4),N+=Pn(l.length,2),N+=Pn(w.length,2);var W=YO.LOCAL_FILE_HEADER+N+l+w,M=YO.CENTRAL_FILE_HEADER+Pn(V,2)+N+Pn(d.length,2)+"\0\0\0\0"+Pn(I,4)+Pn(n,4)+l+w+d;return{fileRecord:W,dirRecord:M}},qGr=function(e,r,t,n,i){var a="",o=Ry.transformTo("string",i(n));return a=YO.CENTRAL_DIRECTORY_END+"\0\0\0\0"+Pn(e,2)+Pn(e,2)+Pn(r,4)+Pn(t,4)+Pn(o.length,2)+o,a},NGr=function(e){var r="";return r=YO.DATA_DESCRIPTOR+Pn(e.crc32,4)+Pn(e.compressedSize,4)+Pn(e.uncompressedSize,4),r};function Xu(e,r,t,n){Fy.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=r,this.zipPlatform=t,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}Ry.inherits(Xu,Fy);Xu.prototype.push=function(e){var r=e.meta.percent||0,t=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,Fy.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:t?(r+100*(t-n-1))/t:100}}))};Xu.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var r=this.streamFiles&&!e.file.dir;if(r){var t=r8e(e,r,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0};Xu.prototype.closedSource=function(e){this.accumulate=!1;var r=this.streamFiles&&!e.file.dir,t=r8e(e,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(t.dirRecord),r)this.push({data:NGr(e),meta:{percent:100}});else for(this.push({data:t.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null};Xu.prototype.flush=function(){for(var e=this.bytesWritten,r=0;r<this.dirRecords.length;r++)this.push({data:this.dirRecords[r],meta:{percent:100}});var t=this.bytesWritten-e,n=qGr(this.dirRecords.length,t,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})};Xu.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()};Xu.prototype.registerPrevious=function(e){this._sources.push(e);var r=this;return e.on("data",function(t){r.processChunk(t)}),e.on("end",function(){r.closedSource(r.previous.streamInfo),r._sources.length?r.prepareNextSource():r.end()}),e.on("error",function(t){r.error(t)}),this};Xu.prototype.resume=function(){if(!Fy.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};Xu.prototype.error=function(e){var r=this._sources;if(!Fy.prototype.error.call(this,e))return!1;for(var t=0;t<r.length;t++)try{r[t].error(e)}catch{}return!0};Xu.prototype.lock=function(){Fy.prototype.lock.call(this);for(var e=this._sources,r=0;r<e.length;r++)e[r].lock()};t8e.exports=Xu});var a8e=m(i8e=>{"use strict";var UGr=Jz(),GGr=n8e(),zGr=function(e,r){var t=e||r,n=UGr[t];if(!n)throw new Error(t+" is not a valid compression method !");return n};i8e.generateWorker=function(e,r,t){var n=new GGr(r.streamFiles,t,r.platform,r.encodeFileName),i=0;try{e.forEach(function(a,o){i++;var s=zGr(o.options.compression,r.compression),u=o.options.compressionOptions||r.compressionOptions||{},l=o.dir,c=o.date;o._compressWorker(s,u).withStreamInfo("file",{name:a,dir:l,date:c,comment:o.comment||"",unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions}).pipe(n)}),n.entriesCount=i}catch(a){n.error(a)}return n}});var s8e=m((QRt,o8e)=>{"use strict";var HGr=Jn(),$O=as();function DE(e,r){$O.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(r)}HGr.inherits(DE,$O);DE.prototype._bindStream=function(e){var r=this;this._stream=e,e.pause(),e.on("data",function(t){r.push({data:t,meta:{percent:0}})}).on("error",function(t){r.isPaused?this.generatedError=t:r.error(t)}).on("end",function(){r.isPaused?r._upstreamEnded=!0:r.end()})};DE.prototype.pause=function(){return $O.prototype.pause.call(this)?(this._stream.pause(),!0):!1};DE.prototype.resume=function(){return $O.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),!0):!1};o8e.exports=DE});var v8e=m((ZRt,g8e)=>{"use strict";var WGr=yy(),kE=Jn(),u8e=as(),VGr=iz(),l8e=az(),c8e=DO(),KGr=l6e(),YGr=a8e(),f8e=iE(),$Gr=s8e(),d8e=function(e,r,t){var n=kE.getTypeOf(r),i,a=kE.extend(t||{},l8e);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=p8e(e)),a.createFolders&&(i=XGr(e))&&h8e.call(this,i,!0);var o=n==="string"&&a.binary===!1&&a.base64===!1;(!t||typeof t.binary=="undefined")&&(a.binary=!o);var s=r instanceof c8e&&r.uncompressedSize===0;(s||a.dir||!r||r.length===0)&&(a.base64=!1,a.binary=!0,r="",a.compression="STORE",n="string");var u=null;r instanceof c8e||r instanceof u8e?u=r:f8e.isNode&&f8e.isStream(r)?u=new $Gr(e,r):u=kE.prepareContent(e,r,a.binary,a.optimizedBinaryString,a.base64);var l=new KGr(e,u,a);this.files[e]=l},XGr=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var r=e.lastIndexOf("/");return r>0?e.substring(0,r):""},p8e=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},h8e=function(e,r){return r=typeof r!="undefined"?r:l8e.createFolders,e=p8e(e),this.files[e]||d8e.call(this,e,null,{dir:!0,createFolders:r}),this.files[e]};function m8e(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var JGr={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var r,t,n;for(r in this.files)n=this.files[r],t=r.slice(this.root.length,r.length),t&&r.slice(0,this.root.length)===this.root&&e(t,n)},filter:function(e){var r=[];return this.forEach(function(t,n){e(t,n)&&r.push(n)}),r},file:function(e,r,t){if(arguments.length===1)if(m8e(e)){var n=e;return this.filter(function(a,o){return!o.dir&&n.test(a)})}else{var i=this.files[this.root+e];return i&&!i.dir?i:null}else e=this.root+e,d8e.call(this,e,r,t);return this},folder:function(e){if(!e)return this;if(m8e(e))return this.filter(function(i,a){return a.dir&&e.test(i)});var r=this.root+e,t=h8e.call(this,r),n=this.clone();return n.root=t.name,n},remove:function(e){e=this.root+e;var r=this.files[e];if(r||(e.slice(-1)!=="/"&&(e+="/"),r=this.files[e]),r&&!r.dir)delete this.files[e];else for(var t=this.filter(function(i,a){return a.name.slice(0,e.length)===e}),n=0;n<t.length;n++)delete this.files[t[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 r,t={};try{if(t=kE.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:WGr.utf8encode}),t.type=t.type.toLowerCase(),t.compression=t.compression.toUpperCase(),t.type==="binarystring"&&(t.type="string"),!t.type)throw new Error("No output type specified.");kE.checkSupport(t.type),(t.platform==="darwin"||t.platform==="freebsd"||t.platform==="linux"||t.platform==="sunos")&&(t.platform="UNIX"),t.platform==="win32"&&(t.platform="DOS");var n=t.comment||this.comment||"";r=YGr.generateWorker(this,t,n)}catch(i){r=new u8e("error"),r.error(i)}return new VGr(r,t.type||"string",t.mimeType)},generateAsync:function(e,r){return this.generateInternalStream(e).accumulate(r)},generateNodeStream:function(e,r){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(r)}};g8e.exports=JGr});var eH=m((eFt,y8e)=>{"use strict";var QGr=Jn();function b8e(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}b8e.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 r=0,t;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return QGr.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))}};y8e.exports=b8e});var rH=m((rFt,_8e)=>{"use strict";var x8e=eH(),ZGr=Jn();function Iy(e){x8e.call(this,e);for(var r=0;r<this.data.length;r++)e[r]=e[r]&255}ZGr.inherits(Iy,x8e);Iy.prototype.byteAt=function(e){return this.data[this.zero+e]};Iy.prototype.lastIndexOfSignature=function(e){for(var r=e.charCodeAt(0),t=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===r&&this.data[a+1]===t&&this.data[a+2]===n&&this.data[a+3]===i)return a-this.zero;return-1};Iy.prototype.readAndCheckSignature=function(e){var r=e.charCodeAt(0),t=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),a=this.readData(4);return r===a[0]&&t===a[1]&&n===a[2]&&i===a[3]};Iy.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};_8e.exports=Iy});var S8e=m((tFt,w8e)=>{"use strict";var E8e=eH(),ezr=Jn();function Py(e){E8e.call(this,e)}ezr.inherits(Py,E8e);Py.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};Py.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};Py.prototype.readAndCheckSignature=function(e){var r=this.readData(4);return e===r};Py.prototype.readData=function(e){this.checkOffset(e);var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};w8e.exports=Py});var nH=m((nFt,T8e)=>{"use strict";var A8e=rH(),rzr=Jn();function tH(e){A8e.call(this,e)}rzr.inherits(tH,A8e);tH.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var r=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};T8e.exports=tH});var k8e=m((iFt,D8e)=>{"use strict";var C8e=nH(),tzr=Jn();function iH(e){C8e.call(this,e)}tzr.inherits(iH,C8e);iH.prototype.readData=function(e){this.checkOffset(e);var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};D8e.exports=iH});var aH=m((aFt,R8e)=>{"use strict";var XO=Jn(),O8e=Df(),nzr=rH(),izr=S8e(),azr=k8e(),ozr=nH();R8e.exports=function(e){var r=XO.getTypeOf(e);return XO.checkSupport(r),r==="string"&&!O8e.uint8array?new izr(e):r==="nodebuffer"?new azr(e):O8e.uint8array?new ozr(XO.transformTo("uint8array",e)):new nzr(XO.transformTo("array",e))}});var B8e=m((oFt,P8e)=>{"use strict";var oH=aH(),Gp=Jn(),szr=DO(),F8e=CO(),JO=yy(),QO=Jz(),uzr=Df(),lzr=0,czr=3,fzr=function(e){for(var r in QO)if(!!Object.prototype.hasOwnProperty.call(QO,r)&&QO[r].magic===e)return QO[r];return null};function I8e(e,r){this.options=e,this.loadOptions=r}I8e.prototype={isEncrypted:function(){return(this.bitFlag&1)==1},useUTF8:function(){return(this.bitFlag&2048)==2048},readLocalPart:function(e){var r,t;if(e.skip(22),this.fileNameLength=e.readInt(2),t=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(t),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(r=fzr(this.compressionMethod),r===null)throw new Error("Corrupted zip : compression "+Gp.pretty(this.compressionMethod)+" unknown (inner file : "+Gp.transformTo("string",this.fileName)+")");this.decompressed=new szr(this.compressedSize,this.uncompressedSize,this.crc32,r,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 r=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(r),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===lzr&&(this.dosPermissions=this.externalFileAttributes&63),e===czr&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(){if(!!this.extraFields[1]){var e=oH(this.extraFields[1].value);this.uncompressedSize===Gp.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===Gp.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===Gp.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===Gp.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var r=e.index+this.extraFieldsLength,t,n,i;for(this.extraFields||(this.extraFields={});e.index+4<r;)t=e.readInt(2),n=e.readInt(2),i=e.readData(n),this.extraFields[t]={id:t,length:n,value:i};e.setIndex(r)},handleUTF8:function(){var e=uzr.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=JO.utf8decode(this.fileName),this.fileCommentStr=JO.utf8decode(this.fileComment);else{var r=this.findExtraFieldUnicodePath();if(r!==null)this.fileNameStr=r;else{var t=Gp.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(t)}var n=this.findExtraFieldUnicodeComment();if(n!==null)this.fileCommentStr=n;else{var i=Gp.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var r=oH(e.value);return r.readInt(1)!==1||F8e(this.fileName)!==r.readInt(4)?null:JO.utf8decode(r.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var r=oH(e.value);return r.readInt(1)!==1||F8e(this.fileComment)!==r.readInt(4)?null:JO.utf8decode(r.readData(e.length-5))}return null}};P8e.exports=I8e});var L8e=m((sFt,M8e)=>{"use strict";var dzr=aH(),Pf=Jn(),Ju=Qz(),pzr=B8e(),hzr=Df();function j8e(e){this.files=[],this.loadOptions=e}j8e.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var r=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+Pf.pretty(r)+", expected "+Pf.pretty(e)+")")}},isSignature:function(e,r){var t=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4),i=n===r;return this.reader.setIndex(t),i},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),r=hzr.uint8array?"uint8array":"array",t=Pf.transformTo(r,e);this.zipComment=this.loadOptions.decodeFileName(t)},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,r=0,t,n,i;r<e;)t=this.reader.readInt(2),n=this.reader.readInt(4),i=this.reader.readData(n),this.zip64ExtensibleData[t]={id:t,length:n,value:i}},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,r;for(e=0;e<this.files.length;e++)r=this.files[e],this.reader.setIndex(r.localHeaderOffset),this.checkSignature(Ju.LOCAL_FILE_HEADER),r.readLocalPart(this.reader),r.handleUTF8(),r.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(Ju.CENTRAL_FILE_HEADER);)e=new pzr({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(Ju.CENTRAL_DIRECTORY_END);if(e<0){var r=!this.isSignature(0,Ju.LOCAL_FILE_HEADER);throw r?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 t=e;if(this.checkSignature(Ju.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===Pf.MAX_VALUE_16BITS||this.diskWithCentralDirStart===Pf.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===Pf.MAX_VALUE_16BITS||this.centralDirRecords===Pf.MAX_VALUE_16BITS||this.centralDirSize===Pf.MAX_VALUE_32BITS||this.centralDirOffset===Pf.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(Ju.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(Ju.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,Ju.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(Ju.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(Ju.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var i=t-n;if(i>0)this.isSignature(t,Ju.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(e){this.reader=dzr(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};M8e.exports=j8e});var U8e=m((uFt,N8e)=>{"use strict";var sH=Jn(),ZO=gy(),mzr=yy(),gzr=L8e(),vzr=uz(),q8e=iE();function bzr(e){return new ZO.Promise(function(r,t){var n=e.decompressed.getContentWorker().pipe(new vzr);n.on("error",function(i){t(i)}).on("end",function(){n.streamInfo.crc32!==e.decompressed.crc32?t(new Error("Corrupted zip : CRC32 mismatch")):r()}).resume()})}N8e.exports=function(e,r){var t=this;return r=sH.extend(r||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:mzr.utf8decode}),q8e.isNode&&q8e.isStream(e)?ZO.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):sH.prepareContent("the loaded zip file",e,!0,r.optimizedBinaryString,r.base64).then(function(n){var i=new gzr(r);return i.load(n),i}).then(function(i){var a=[ZO.Promise.resolve(i)],o=i.files;if(r.checkCRC32)for(var s=0;s<o.length;s++)a.push(bzr(o[s]));return ZO.Promise.all(a)}).then(function(i){for(var a=i.shift(),o=a.files,s=0;s<o.length;s++){var u=o[s],l=u.fileNameStr,c=sH.resolve(u.fileNameStr);t.file(c,u.decompressed,{binary:!0,optimizedBinaryString:!0,date:u.date,dir:u.dir,comment:u.fileCommentStr.length?u.fileCommentStr:null,unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions,createFolders:r.createFolders}),u.dir||(t.file(c).unsafeOriginalName=l)}return a.zipComment.length&&(t.comment=a.zipComment),t})}});var uH=m((lFt,G8e)=>{"use strict";function eu(){if(!(this instanceof eu))return new eu;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 eu;for(var r in this)typeof this[r]!="function"&&(e[r]=this[r]);return e}}eu.prototype=v8e();eu.prototype.loadAsync=U8e();eu.support=Df();eu.defaults=az();eu.version="3.10.1";eu.loadAsync=function(e,r){return new eu().loadAsync(e,r)};eu.external=gy();G8e.exports=eu});var cH=m((fFt,H8e)=>{(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(t,n){return t<<n|t>>>32-n},rotr:function(t,n){return t<<32-n|t>>>n},endian:function(t){if(t.constructor==Number)return r.rotl(t,8)&16711935|r.rotl(t,24)&4278255360;for(var n=0;n<t.length;n++)t[n]=r.endian(t[n]);return t},randomBytes:function(t){for(var n=[];t>0;t--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(t){for(var n=[],i=0,a=0;i<t.length;i++,a+=8)n[a>>>5]|=t[i]<<24-a%32;return n},wordsToBytes:function(t){for(var n=[],i=0;i<t.length*32;i+=8)n.push(t[i>>>5]>>>24-i%32&255);return n},bytesToHex:function(t){for(var n=[],i=0;i<t.length;i++)n.push((t[i]>>>4).toString(16)),n.push((t[i]&15).toString(16));return n.join("")},hexToBytes:function(t){for(var n=[],i=0;i<t.length;i+=2)n.push(parseInt(t.substr(i,2),16));return n},bytesToBase64:function(t){for(var n=[],i=0;i<t.length;i+=3)for(var a=t[i]<<16|t[i+1]<<8|t[i+2],o=0;o<4;o++)i*8+o*6<=t.length*8?n.push(e.charAt(a>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],i=0,a=0;i<t.length;a=++i%4)a!=0&&n.push((e.indexOf(t.charAt(i-1))&Math.pow(2,-2*a+8)-1)<<a*2|e.indexOf(t.charAt(i))>>>6-a*2);return n}};H8e.exports=r})()});var dH=m((dFt,W8e)=>{var fH={utf8:{stringToBytes:function(e){return fH.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(fH.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var r=[],t=0;t<e.length;t++)r.push(e.charCodeAt(t)&255);return r},bytesToString:function(e){for(var r=[],t=0;t<e.length;t++)r.push(String.fromCharCode(e[t]));return r.join("")}}};W8e.exports=fH});var pH=m((pFt,V8e)=>{(function(){var e=cH(),r=dH().utf8,t=OI(),n=dH().bin,i=function(a,o){a.constructor==String?o&&o.encoding==="binary"?a=n.stringToBytes(a):a=r.stringToBytes(a):t(a)?a=Array.prototype.slice.call(a,0):!Array.isArray(a)&&a.constructor!==Uint8Array&&(a=a.toString());for(var s=e.bytesToWords(a),u=a.length*8,l=1732584193,c=-271733879,f=-1732584194,d=271733878,p=0;p<s.length;p++)s[p]=(s[p]<<8|s[p]>>>24)&16711935|(s[p]<<24|s[p]>>>8)&4278255360;s[u>>>5]|=128<<u%32,s[(u+64>>>9<<4)+14]=u;for(var h=i._ff,b=i._gg,v=i._hh,y=i._ii,p=0;p<s.length;p+=16){var w=l,A=c,C=f,D=d;l=h(l,c,f,d,s[p+0],7,-680876936),d=h(d,l,c,f,s[p+1],12,-389564586),f=h(f,d,l,c,s[p+2],17,606105819),c=h(c,f,d,l,s[p+3],22,-1044525330),l=h(l,c,f,d,s[p+4],7,-176418897),d=h(d,l,c,f,s[p+5],12,1200080426),f=h(f,d,l,c,s[p+6],17,-1473231341),c=h(c,f,d,l,s[p+7],22,-45705983),l=h(l,c,f,d,s[p+8],7,1770035416),d=h(d,l,c,f,s[p+9],12,-1958414417),f=h(f,d,l,c,s[p+10],17,-42063),c=h(c,f,d,l,s[p+11],22,-1990404162),l=h(l,c,f,d,s[p+12],7,1804603682),d=h(d,l,c,f,s[p+13],12,-40341101),f=h(f,d,l,c,s[p+14],17,-1502002290),c=h(c,f,d,l,s[p+15],22,1236535329),l=b(l,c,f,d,s[p+1],5,-165796510),d=b(d,l,c,f,s[p+6],9,-1069501632),f=b(f,d,l,c,s[p+11],14,643717713),c=b(c,f,d,l,s[p+0],20,-373897302),l=b(l,c,f,d,s[p+5],5,-701558691),d=b(d,l,c,f,s[p+10],9,38016083),f=b(f,d,l,c,s[p+15],14,-660478335),c=b(c,f,d,l,s[p+4],20,-405537848),l=b(l,c,f,d,s[p+9],5,568446438),d=b(d,l,c,f,s[p+14],9,-1019803690),f=b(f,d,l,c,s[p+3],14,-187363961),c=b(c,f,d,l,s[p+8],20,1163531501),l=b(l,c,f,d,s[p+13],5,-1444681467),d=b(d,l,c,f,s[p+2],9,-51403784),f=b(f,d,l,c,s[p+7],14,1735328473),c=b(c,f,d,l,s[p+12],20,-1926607734),l=v(l,c,f,d,s[p+5],4,-378558),d=v(d,l,c,f,s[p+8],11,-2022574463),f=v(f,d,l,c,s[p+11],16,1839030562),c=v(c,f,d,l,s[p+14],23,-35309556),l=v(l,c,f,d,s[p+1],4,-1530992060),d=v(d,l,c,f,s[p+4],11,1272893353),f=v(f,d,l,c,s[p+7],16,-155497632),c=v(c,f,d,l,s[p+10],23,-1094730640),l=v(l,c,f,d,s[p+13],4,681279174),d=v(d,l,c,f,s[p+0],11,-358537222),f=v(f,d,l,c,s[p+3],16,-722521979),c=v(c,f,d,l,s[p+6],23,76029189),l=v(l,c,f,d,s[p+9],4,-640364487),d=v(d,l,c,f,s[p+12],11,-421815835),f=v(f,d,l,c,s[p+15],16,530742520),c=v(c,f,d,l,s[p+2],23,-995338651),l=y(l,c,f,d,s[p+0],6,-198630844),d=y(d,l,c,f,s[p+7],10,1126891415),f=y(f,d,l,c,s[p+14],15,-1416354905),c=y(c,f,d,l,s[p+5],21,-57434055),l=y(l,c,f,d,s[p+12],6,1700485571),d=y(d,l,c,f,s[p+3],10,-1894986606),f=y(f,d,l,c,s[p+10],15,-1051523),c=y(c,f,d,l,s[p+1],21,-2054922799),l=y(l,c,f,d,s[p+8],6,1873313359),d=y(d,l,c,f,s[p+15],10,-30611744),f=y(f,d,l,c,s[p+6],15,-1560198380),c=y(c,f,d,l,s[p+13],21,1309151649),l=y(l,c,f,d,s[p+4],6,-145523070),d=y(d,l,c,f,s[p+11],10,-1120210379),f=y(f,d,l,c,s[p+2],15,718787259),c=y(c,f,d,l,s[p+9],21,-343485551),l=l+w>>>0,c=c+A>>>0,f=f+C>>>0,d=d+D>>>0}return e.endian([l,c,f,d])};i._ff=function(a,o,s,u,l,c,f){var d=a+(o&s|~o&u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},i._gg=function(a,o,s,u,l,c,f){var d=a+(o&u|s&~u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},i._hh=function(a,o,s,u,l,c,f){var d=a+(o^s^u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},i._ii=function(a,o,s,u,l,c,f){var d=a+(s^(o|~u))+(l>>>0)+f;return(d<<c|d>>>32-c)+o},i._blocksize=16,i._digestsize=16,V8e.exports=function(a,o){if(a==null)throw new Error("Illegal argument "+a);var s=e.wordsToBytes(i(a,o));return o&&o.asBytes?s:o&&o.asString?n.bytesToString(s):e.bytesToHex(s)}})()});var bH=m(vH=>{"use strict";Object.defineProperty(vH,"__esModule",{value:!0});vH.default=Tzr;var Szr=Azr(require("crypto"));function Azr(e){return e&&e.__esModule?e:{default:e}}var eR=new Uint8Array(256),rR=eR.length;function Tzr(){return rR>eR.length-16&&(Szr.default.randomFillSync(eR),rR=0),eR.slice(rR,rR+=16)}});var J8e=m(tR=>{"use strict";Object.defineProperty(tR,"__esModule",{value:!0});tR.default=void 0;var Czr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;tR.default=Czr});var OE=m(nR=>{"use strict";Object.defineProperty(nR,"__esModule",{value:!0});nR.default=void 0;var Dzr=kzr(J8e());function kzr(e){return e&&e.__esModule?e:{default:e}}function Ozr(e){return typeof e=="string"&&Dzr.default.test(e)}var Rzr=Ozr;nR.default=Rzr});var FE=m(RE=>{"use strict";Object.defineProperty(RE,"__esModule",{value:!0});RE.default=void 0;RE.unsafeStringify=Q8e;var Fzr=Izr(OE());function Izr(e){return e&&e.__esModule?e:{default:e}}var ja=[];for(let e=0;e<256;++e)ja.push((e+256).toString(16).slice(1));function Q8e(e,r=0){return(ja[e[r+0]]+ja[e[r+1]]+ja[e[r+2]]+ja[e[r+3]]+"-"+ja[e[r+4]]+ja[e[r+5]]+"-"+ja[e[r+6]]+ja[e[r+7]]+"-"+ja[e[r+8]]+ja[e[r+9]]+"-"+ja[e[r+10]]+ja[e[r+11]]+ja[e[r+12]]+ja[e[r+13]]+ja[e[r+14]]+ja[e[r+15]]).toLowerCase()}function Pzr(e,r=0){let t=Q8e(e,r);if(!(0,Fzr.default)(t))throw TypeError("Stringified UUID is invalid");return t}var Bzr=Pzr;RE.default=Bzr});var eDe=m(iR=>{"use strict";Object.defineProperty(iR,"__esModule",{value:!0});iR.default=void 0;var jzr=Lzr(bH()),Mzr=FE();function Lzr(e){return e&&e.__esModule?e:{default:e}}var Z8e,yH,xH=0,_H=0;function qzr(e,r,t){let n=r&&t||0,i=r||new Array(16);e=e||{};let a=e.node||Z8e,o=e.clockseq!==void 0?e.clockseq:yH;if(a==null||o==null){let d=e.random||(e.rng||jzr.default)();a==null&&(a=Z8e=[d[0]|1,d[1],d[2],d[3],d[4],d[5]]),o==null&&(o=yH=(d[6]<<8|d[7])&16383)}let s=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:_H+1,l=s-xH+(u-_H)/1e4;if(l<0&&e.clockseq===void 0&&(o=o+1&16383),(l<0||s>xH)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");xH=s,_H=u,yH=o,s+=122192928e5;let c=((s&268435455)*1e4+u)%4294967296;i[n++]=c>>>24&255,i[n++]=c>>>16&255,i[n++]=c>>>8&255,i[n++]=c&255;let f=s/4294967296*1e4&268435455;i[n++]=f>>>8&255,i[n++]=f&255,i[n++]=f>>>24&15|16,i[n++]=f>>>16&255,i[n++]=o>>>8|128,i[n++]=o&255;for(let d=0;d<6;++d)i[n+d]=a[d];return r||(0,Mzr.unsafeStringify)(i)}var Nzr=qzr;iR.default=Nzr});var EH=m(aR=>{"use strict";Object.defineProperty(aR,"__esModule",{value:!0});aR.default=void 0;var Uzr=Gzr(OE());function Gzr(e){return e&&e.__esModule?e:{default:e}}function zzr(e){if(!(0,Uzr.default)(e))throw TypeError("Invalid UUID");let r,t=new Uint8Array(16);return t[0]=(r=parseInt(e.slice(0,8),16))>>>24,t[1]=r>>>16&255,t[2]=r>>>8&255,t[3]=r&255,t[4]=(r=parseInt(e.slice(9,13),16))>>>8,t[5]=r&255,t[6]=(r=parseInt(e.slice(14,18),16))>>>8,t[7]=r&255,t[8]=(r=parseInt(e.slice(19,23),16))>>>8,t[9]=r&255,t[10]=(r=parseInt(e.slice(24,36),16))/1099511627776&255,t[11]=r/4294967296&255,t[12]=r>>>24&255,t[13]=r>>>16&255,t[14]=r>>>8&255,t[15]=r&255,t}var Hzr=zzr;aR.default=Hzr});var wH=m(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});cm.URL=cm.DNS=void 0;cm.default=$zr;var Wzr=FE(),Vzr=Kzr(EH());function Kzr(e){return e&&e.__esModule?e:{default:e}}function Yzr(e){e=unescape(encodeURIComponent(e));let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t));return r}var rDe="6ba7b810-9dad-11d1-80b4-00c04fd430c8";cm.DNS=rDe;var tDe="6ba7b811-9dad-11d1-80b4-00c04fd430c8";cm.URL=tDe;function $zr(e,r,t){function n(i,a,o,s){var u;if(typeof i=="string"&&(i=Yzr(i)),typeof a=="string"&&(a=(0,Vzr.default)(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+i.length);if(l.set(a),l.set(i,a.length),l=t(l),l[6]=l[6]&15|r,l[8]=l[8]&63|128,o){s=s||0;for(let c=0;c<16;++c)o[s+c]=l[c];return o}return(0,Wzr.unsafeStringify)(l)}try{n.name=e}catch{}return n.DNS=rDe,n.URL=tDe,n}});var nDe=m(oR=>{"use strict";Object.defineProperty(oR,"__esModule",{value:!0});oR.default=void 0;var Xzr=Jzr(require("crypto"));function Jzr(e){return e&&e.__esModule?e:{default:e}}function Qzr(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),Xzr.default.createHash("md5").update(e).digest()}var Zzr=Qzr;oR.default=Zzr});var aDe=m(sR=>{"use strict";Object.defineProperty(sR,"__esModule",{value:!0});sR.default=void 0;var eHr=iDe(wH()),rHr=iDe(nDe());function iDe(e){return e&&e.__esModule?e:{default:e}}var tHr=(0,eHr.default)("v3",48,rHr.default),nHr=tHr;sR.default=nHr});var oDe=m(uR=>{"use strict";Object.defineProperty(uR,"__esModule",{value:!0});uR.default=void 0;var iHr=aHr(require("crypto"));function aHr(e){return e&&e.__esModule?e:{default:e}}var oHr={randomUUID:iHr.default.randomUUID};uR.default=oHr});var lDe=m(lR=>{"use strict";Object.defineProperty(lR,"__esModule",{value:!0});lR.default=void 0;var sDe=uDe(oDe()),sHr=uDe(bH()),uHr=FE();function uDe(e){return e&&e.__esModule?e:{default:e}}function lHr(e,r,t){if(sDe.default.randomUUID&&!r&&!e)return sDe.default.randomUUID();e=e||{};let n=e.random||(e.rng||sHr.default)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){t=t||0;for(let i=0;i<16;++i)r[t+i]=n[i];return r}return(0,uHr.unsafeStringify)(n)}var cHr=lHr;lR.default=cHr});var cDe=m(cR=>{"use strict";Object.defineProperty(cR,"__esModule",{value:!0});cR.default=void 0;var fHr=dHr(require("crypto"));function dHr(e){return e&&e.__esModule?e:{default:e}}function pHr(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),fHr.default.createHash("sha1").update(e).digest()}var hHr=pHr;cR.default=hHr});var dDe=m(fR=>{"use strict";Object.defineProperty(fR,"__esModule",{value:!0});fR.default=void 0;var mHr=fDe(wH()),gHr=fDe(cDe());function fDe(e){return e&&e.__esModule?e:{default:e}}var vHr=(0,mHr.default)("v5",80,gHr.default),bHr=vHr;fR.default=bHr});var pDe=m(dR=>{"use strict";Object.defineProperty(dR,"__esModule",{value:!0});dR.default=void 0;var yHr="00000000-0000-0000-0000-000000000000";dR.default=yHr});var hDe=m(pR=>{"use strict";Object.defineProperty(pR,"__esModule",{value:!0});pR.default=void 0;var xHr=_Hr(OE());function _Hr(e){return e&&e.__esModule?e:{default:e}}function EHr(e){if(!(0,xHr.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}var wHr=EHr;pR.default=wHr});var mDe=m(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});Object.defineProperty(Qu,"NIL",{enumerable:!0,get:function(){return DHr.default}});Object.defineProperty(Qu,"parse",{enumerable:!0,get:function(){return FHr.default}});Object.defineProperty(Qu,"stringify",{enumerable:!0,get:function(){return RHr.default}});Object.defineProperty(Qu,"v1",{enumerable:!0,get:function(){return SHr.default}});Object.defineProperty(Qu,"v3",{enumerable:!0,get:function(){return AHr.default}});Object.defineProperty(Qu,"v4",{enumerable:!0,get:function(){return THr.default}});Object.defineProperty(Qu,"v5",{enumerable:!0,get:function(){return CHr.default}});Object.defineProperty(Qu,"validate",{enumerable:!0,get:function(){return OHr.default}});Object.defineProperty(Qu,"version",{enumerable:!0,get:function(){return kHr.default}});var SHr=Bf(eDe()),AHr=Bf(aDe()),THr=Bf(lDe()),CHr=Bf(dDe()),DHr=Bf(pDe()),kHr=Bf(hDe()),OHr=Bf(OE()),RHr=Bf(FE()),FHr=Bf(EH());function Bf(e){return e&&e.__esModule?e:{default:e}}});var IE=m((b4t,vDe)=>{var gDe=e=>e==null,IHr=(e,r)=>{let t=r.split("."),n=!0,i=Object.assign({},e);return t.forEach(a=>{n=i&&n&&Object.keys(i).indexOf(a)>-1,i=i[a]}),n},PHr=(e,r)=>{let t=r.split("."),n=Object.assign({},e);return t.forEach(i=>{n=n&&!gDe(n[i])?n[i]:void 0}),n},BHr=(e,r,t)=>{let n=e,i=r.split(".");return i.forEach((a,o)=>{n[a]||(n[a]=o==i.length-1?t:{}),n=n[a]}),e};vDe.exports={has:IHr,get:PHr,set:BHr,isUndefined:gDe}});var _De=m((y4t,xDe)=>{var jHr=IE().get,MHr=IE().set,LHr=IE().has,bDe=IE().isUndefined,qHr=(e,r,t,n,i)=>{let a=e[r].default,o=e[r].transform,s=e[r].omitValues||[],u=o?o(t,n,i):t;return bDe(u)&&!bDe(a)&&(u=a),s.indexOf(u)==-1?MHr(Object.assign({},n),r,u):n},NHr=(e,r,t)=>{let n=Object.keys(r).reduce((i,a)=>{let o=Array.isArray(r[a].path)?r[a].path.filter(u=>LHr(e,u))[0]:r[a].path,s=o?jHr(e,o):void 0;return qHr(r,a,s,i,e)},{});return t?t(n,e):n},UHr=(e,r,t)=>e.map(n=>{let i=yDe(n,r);return t?t(i,n):i}),yDe=(e,r,t)=>Array.isArray(e)?UHr(e,r,t):NHr(e,r,t);xDe.exports=yDe});var Zu=m((x4t,EDe)=>{var GHr=_De();EDe.exports=GHr});var ADe=m((E4t,SDe)=>{var zHr=typeof process=="object"&&process&&process.platform==="win32";SDe.exports=zHr?{sep:"\\"}:{sep:"/"}});var SH=m((w4t,kDe)=>{"use strict";kDe.exports=TDe;function TDe(e,r,t){e instanceof RegExp&&(e=CDe(e,t)),r instanceof RegExp&&(r=CDe(r,t));var n=DDe(e,r,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+e.length,n[1]),post:t.slice(n[1]+r.length)}}function CDe(e,r){var t=r.match(e);return t?t[0]:null}TDe.range=DDe;function DDe(e,r,t){var n,i,a,o,s,u=t.indexOf(e),l=t.indexOf(r,u+1),c=u;if(u>=0&&l>0){if(e===r)return[u,l];for(n=[],a=t.length;c>=0&&!s;)c==u?(n.push(c),u=t.indexOf(e,c+1)):n.length==1?s=[n.pop(),l]:(i=n.pop(),i<a&&(a=i,o=l),l=t.indexOf(r,c+1)),c=u<l&&u>=0?u:l;n.length&&(s=[a,o])}return s}});var MDe=m((S4t,jDe)=>{var ODe=SH();jDe.exports=VHr;var RDe="\0SLASH"+Math.random()+"\0",FDe="\0OPEN"+Math.random()+"\0",AH="\0CLOSE"+Math.random()+"\0",IDe="\0COMMA"+Math.random()+"\0",PDe="\0PERIOD"+Math.random()+"\0";function TH(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function HHr(e){return e.split("\\\\").join(RDe).split("\\{").join(FDe).split("\\}").join(AH).split("\\,").join(IDe).split("\\.").join(PDe)}function WHr(e){return e.split(RDe).join("\\").split(FDe).join("{").split(AH).join("}").split(IDe).join(",").split(PDe).join(".")}function BDe(e){if(!e)return[""];var r=[],t=ODe("{","}",e);if(!t)return e.split(",");var n=t.pre,i=t.body,a=t.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var s=BDe(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),r.push.apply(r,o),r}function VHr(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),PE(HHr(e),!0).map(WHr)):[]}function KHr(e){return"{"+e+"}"}function YHr(e){return/^-?0\d/.test(e)}function $Hr(e,r){return e<=r}function XHr(e,r){return e>=r}function PE(e,r){var t=[],n=ODe("{","}",e);if(!n)return[e];var i=n.pre,a=n.post.length?PE(n.post,!1):[""];if(/\$$/.test(n.pre))for(var o=0;o<a.length;o++){var s=i+"{"+n.body+"}"+a[o];t.push(s)}else{var u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),c=u||l,f=n.body.indexOf(",")>=0;if(!c&&!f)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+AH+n.post,PE(e)):[e];var d;if(c)d=n.body.split(/\.\./);else if(d=BDe(n.body),d.length===1&&(d=PE(d[0],!1).map(KHr),d.length===1))return a.map(function(V){return n.pre+d[0]+V});var p;if(c){var h=TH(d[0]),b=TH(d[1]),v=Math.max(d[0].length,d[1].length),y=d.length==3?Math.abs(TH(d[2])):1,w=$Hr,A=b<h;A&&(y*=-1,w=XHr);var C=d.some(YHr);p=[];for(var D=h;w(D,b);D+=y){var P;if(l)P=String.fromCharCode(D),P==="\\"&&(P="");else if(P=String(D),C){var k=v-P.length;if(k>0){var L=new Array(k+1).join("0");D<0?P="-"+L+P.slice(1):P=L+P}}p.push(P)}}else{p=[];for(var I=0;I<d.length;I++)p.push.apply(p,PE(d[I],!1))}for(var I=0;I<p.length;I++)for(var o=0;o<a.length;o++){var s=i+p[I]+a[o];(!r||c||s)&&t.push(s)}}return t}});var zDe=m((T4t,RH)=>{var ss=RH.exports=(e,r,t={})=>(hR(r),!t.nocomment&&r.charAt(0)==="#"?!1:new BE(r,t).match(e));RH.exports=ss;var CH=ADe();ss.sep=CH.sep;var el=Symbol("globstar **");ss.GLOBSTAR=el;var JHr=MDe(),LDe={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},DH="[^/]",kH=DH+"*?",QHr="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ZHr="(?:(?!(?:\\/|^)\\.).)*?",qDe=e=>e.split("").reduce((r,t)=>(r[t]=!0,r),{}),NDe=qDe("().*{}+?[]^$\\!"),eWr=qDe("[.("),UDe=/\/+/;ss.filter=(e,r={})=>(t,n,i)=>ss(t,e,r);var Wp=(e,r={})=>{let t={};return Object.keys(e).forEach(n=>t[n]=e[n]),Object.keys(r).forEach(n=>t[n]=r[n]),t};ss.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return ss;let r=ss,t=(n,i,a)=>r(n,i,Wp(e,a));return t.Minimatch=class extends r.Minimatch{constructor(i,a){super(i,Wp(e,a))}},t.Minimatch.defaults=n=>r.defaults(Wp(e,n)).Minimatch,t.filter=(n,i)=>r.filter(n,Wp(e,i)),t.defaults=n=>r.defaults(Wp(e,n)),t.makeRe=(n,i)=>r.makeRe(n,Wp(e,i)),t.braceExpand=(n,i)=>r.braceExpand(n,Wp(e,i)),t.match=(n,i,a)=>r.match(n,i,Wp(e,a)),t};ss.braceExpand=(e,r)=>GDe(e,r);var GDe=(e,r={})=>(hR(e),r.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:JHr(e)),rWr=1024*64,hR=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>rWr)throw new TypeError("pattern is too long")},OH=Symbol("subparse");ss.makeRe=(e,r)=>new BE(e,r||{}).makeRe();ss.match=(e,r,t={})=>{let n=new BE(r,t);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(r),e};var tWr=e=>e.replace(/\\(.)/g,"$1"),nWr=e=>e.replace(/\\([^-\]])/g,"$1"),iWr=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),aWr=e=>e.replace(/[[\]\\]/g,"\\$&"),BE=class{constructor(r,t){hR(r),t||(t={}),this.options=t,this.set=[],this.pattern=r,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){let r=this.pattern,t=this.options;if(!t.nocomment&&r.charAt(0)==="#"){this.comment=!0;return}if(!r){this.empty=!0;return}this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,n),n=this.globParts=n.map(i=>i.split(UDe)),this.debug(this.pattern,n),n=n.map((i,a,o)=>i.map(this.parse,this)),this.debug(this.pattern,n),n=n.filter(i=>i.indexOf(!1)===-1),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;let r=this.pattern,t=!1,n=0;for(let i=0;i<r.length&&r.charAt(i)==="!";i++)t=!t,n++;n&&(this.pattern=r.slice(n)),this.negate=t}matchOne(r,t,n){var i=this.options;this.debug("matchOne",{this:this,file:r,pattern:t}),this.debug("matchOne",r.length,t.length);for(var a=0,o=0,s=r.length,u=t.length;a<s&&o<u;a++,o++){this.debug("matchOne loop");var l=t[o],c=r[a];if(this.debug(t,l,c),l===!1)return!1;if(l===el){this.debug("GLOBSTAR",[t,l,c]);var f=a,d=o+1;if(d===u){for(this.debug("** at the end");a<s;a++)if(r[a]==="."||r[a]===".."||!i.dot&&r[a].charAt(0)===".")return!1;return!0}for(;f<s;){var p=r[f];if(this.debug(`
|
|
163
164
|
globstar while`,r,f,t,d,p),this.matchOne(r.slice(f),t.slice(d),n))return this.debug("globstar found match!",f,s,p),!0;if(p==="."||p===".."||!i.dot&&p.charAt(0)==="."){this.debug("dot detected!",r,f,t,d);break}this.debug("globstar swallow a segment, and continue"),f++}return!!(n&&(this.debug(`
|
|
164
|
-
>>> no match, partial?`,r,f,t,d),f===s))}var h;if(typeof l=="string"?(h=c===l,this.debug("string match",l,c,h)):(h=c.match(l),this.debug("pattern match",l,c,h)),!h)return!1}if(a===s&&o===u)return!0;if(a===s)return n;if(o===u)return a===s-1&&r[a]==="";throw new Error("wtf?")}braceExpand(){return
|
|
165
|
-
%s`,k,k,h,i);let L=h.type==="*"?GG:h.type==="?"?UG:"\\"+h.type;a=!0,i=i.slice(0,h.reStart)+L+"\\("+k}C(),o&&(i+="\\\\");let D=FNr[i.charAt(0)];for(let k=u.length-1;k>-1;k--){let L=u[k],I=i.slice(0,L.reStart),V=i.slice(L.reStart,L.reEnd-8),N=i.slice(L.reEnd),W=i.slice(L.reEnd-8,L.reEnd)+N,M=I.split(")").length,H=I.split("(").length-M,X=N;for(let ae=0;ae<H;ae++)X=X.replace(/\)[+*?]?/,"");N=X;let ne=N===""&&t!==zG?"(?:$|\\/)":"";i=I+V+N+ne+W}if(i!==""&&a&&(i="(?=.)"+i),D&&(i=w()+i),t===zG)return[i,a];if(n.nocase&&!a&&(a=r.toUpperCase()!==r.toLowerCase()),!a)return PNr(r);let P=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",P),{_glob:r,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let r=this.set;if(!r.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?GG:t.dot?ONr:RNr,i=t.nocase?"i":"",a=r.map(o=>(o=o.map(s=>typeof s=="string"?jNr(s):s===$u?$u:s._src).reduce((s,u)=>(s[s.length-1]===$u&&u===$u||s.push(u),s),[]),o.forEach((s,u)=>{s!==$u||o[u-1]===$u||(u===0?o.length>1?o[u+1]="(?:\\/|"+n+"\\/)?"+o[u+1]:o[u]=n:u===o.length-1?o[u-1]+="(?:\\/|"+n+")?":(o[u-1]+="(?:\\/|\\/"+n+"\\/)"+o[u+1],o[u+1]=$u))}),o.filter(s=>s!==$u).join("/"))).join("|");a="^(?:"+a+")$",this.negate&&(a="^(?!"+a+").*$");try{this.regexp=new RegExp(a,i)}catch{this.regexp=!1}return this.regexp}match(r,t=this.partial){if(this.debug("match",r,this.pattern),this.comment)return!1;if(this.empty)return r==="";if(r==="/"&&t)return!0;let n=this.options;NG.sep!=="/"&&(r=r.split(NG.sep).join("/")),r=r.split(F3e),this.debug(this.pattern,"split",r);let i=this.set;this.debug(this.pattern,"set",i);let a;for(let o=r.length-1;o>=0&&(a=r[o],!a);o--);for(let o=0;o<i.length;o++){let s=i[o],u=r;if(n.matchBase&&s.length===1&&(u=[a]),this.matchOne(u,s,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(r){return is.defaults(r).Minimatch}};is.Minimatch=Z2});var q3e=m((pFt,L3e)=>{L3e.exports=M3e;var WG=require("fs"),{EventEmitter:LNr}=require("events"),{Minimatch:VG}=P3e(),{resolve:qNr}=require("path");function NNr(e,r){return new Promise((t,n)=>{WG.readdir(e,{withFileTypes:!0},(i,a)=>{if(i)switch(i.code){case"ENOTDIR":r?n(i):t([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":t([]);break;case"ELOOP":default:n(i);break}else t(a)})})}function B3e(e,r){return new Promise((t,n)=>{(r?WG.stat:WG.lstat)(e,(a,o)=>{if(a)switch(a.code){case"ENOENT":t(r?B3e(e,!1):null);break;default:t(null);break}else t(o)})})}async function*j3e(e,r,t,n,i,a){let o=await NNr(r+e,a);for(let s of o){let u=s.name;u===void 0&&(u=s,n=!0);let l=e+"/"+u,c=l.slice(1),f=r+"/"+c,d=null;(n||t)&&(d=await B3e(f,t)),!d&&s.name!==void 0&&(d=s),d===null&&(d={isDirectory:()=>!1}),d.isDirectory()?i(c)||(yield{relative:c,absolute:f,stats:d},yield*j3e(l,r,t,n,i,!1)):yield{relative:c,absolute:f,stats:d}}}async function*UNr(e,r,t,n){yield*j3e("",e,r,t,n,!0)}function GNr(e){return{pattern:e.pattern,dot:!!e.dot,noglobstar:!!e.noglobstar,matchBase:!!e.matchBase,nocase:!!e.nocase,ignore:e.ignore,skip:e.skip,follow:!!e.follow,stat:!!e.stat,nodir:!!e.nodir,mark:!!e.mark,silent:!!e.silent,absolute:!!e.absolute}}var KG=class extends LNr{constructor(r,t,n){super();if(typeof t=="function"&&(n=t,t=null),this.options=GNr(t||{}),this.matchers=[],this.options.pattern){let i=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=i.map(a=>new VG(a,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let i=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=i.map(a=>new VG(a,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let i=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=i.map(a=>new VG(a,{dot:!0}))}this.iterator=UNr(qNr(r||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on("match",i=>this._matches.push(this.options.absolute?i.absolute:i.relative)),this.on("error",i=>n(i)),this.on("end",()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(r){return this.skipMatchers.some(t=>t.match(r))}_fileMatches(r,t){let n=r+(t?"/":"");return(this.matchers.length===0||this.matchers.some(i=>i.match(n)))&&!this.ignoreMatchers.some(i=>i.match(n))&&(!this.options.nodir||!t)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(r=>{if(r.done)this.emit("end");else{let t=r.value.stats.isDirectory();if(this._fileMatches(r.value.relative,t)){let n=r.value.relative,i=r.value.absolute;this.options.mark&&t&&(n+="/",i+="/"),this.options.stat?this.emit("match",{relative:n,absolute:i,stat:r.value.stats}):this.emit("match",{relative:n,absolute:i})}this._next(this.iterator)}}).catch(r=>{this.abort(),this.emit("error",r),!r.code&&!this.options.silent&&console.error(r)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};function M3e(e,r,t){return new KG(e,r,t)}M3e.ReaddirGlob=KG});var U3e=m((AO,N3e)=>{(function(e,r){typeof AO=="object"&&typeof N3e!="undefined"?r(AO):typeof define=="function"&&define.amd?define(["exports"],r):r(e.async={})})(AO,function(e){"use strict";function r(Y,...G){return(...$)=>Y(...G,...$)}function t(Y){return function(...G){var $=G.pop();return Y.call(this,G,$)}}var n=typeof queueMicrotask=="function"&&queueMicrotask,i=typeof setImmediate=="function"&&setImmediate,a=typeof process=="object"&&typeof process.nextTick=="function";function o(Y){setTimeout(Y,0)}function s(Y){return(G,...$)=>Y(()=>G(...$))}var u;n?u=queueMicrotask:i?u=setImmediate:a?u=process.nextTick:u=o;var l=s(u);function c(Y){return p(Y)?function(...G){let $=G.pop(),te=Y.apply(this,G);return f(te,$)}:t(function(G,$){var te;try{te=Y.apply(this,G)}catch(de){return $(de)}if(te&&typeof te.then=="function")return f(te,$);$(null,te)})}function f(Y,G){return Y.then($=>{d(G,null,$)},$=>{d(G,$&&$.message?$:new Error($))})}function d(Y,G,$){try{Y(G,$)}catch(te){l(de=>{throw de},te)}}function p(Y){return Y[Symbol.toStringTag]==="AsyncFunction"}function h(Y){return Y[Symbol.toStringTag]==="AsyncGenerator"}function b(Y){return typeof Y[Symbol.asyncIterator]=="function"}function v(Y){if(typeof Y!="function")throw new Error("expected a function");return p(Y)?c(Y):Y}function y(Y,G=Y.length){if(!G)throw new Error("arity is undefined");function $(...te){return typeof te[G-1]=="function"?Y.apply(this,te):new Promise((de,ge)=>{te[G-1]=(xe,...Se)=>{if(xe)return ge(xe);de(Se.length>1?Se:Se[0])},Y.apply(this,te)})}return $}function w(Y){return function($,...te){return y(function(ge){var xe=this;return Y($,(Se,Be)=>{v(Se).apply(xe,te.concat(Be))},ge)})}}function A(Y,G,$,te){G=G||[];var de=[],ge=0,xe=v($);return Y(G,(Se,Be,wr)=>{var gt=ge++;xe(Se,(At,vt)=>{de[gt]=vt,wr(At)})},Se=>{te(Se,de)})}function C(Y){return Y&&typeof Y.length=="number"&&Y.length>=0&&Y.length%1==0}let D={};function P(Y){function G(...$){if(Y!==null){var te=Y;Y=null,te.apply(this,$)}}return Object.assign(G,Y),G}function k(Y){return Y[Symbol.iterator]&&Y[Symbol.iterator]()}function L(Y){var G=-1,$=Y.length;return function(){return++G<$?{value:Y[G],key:G}:null}}function I(Y){var G=-1;return function(){var te=Y.next();return te.done?null:(G++,{value:te.value,key:G})}}function V(Y){var G=Y?Object.keys(Y):[],$=-1,te=G.length;return function de(){var ge=G[++$];return ge==="__proto__"?de():$<te?{value:Y[ge],key:ge}:null}}function N(Y){if(C(Y))return L(Y);var G=k(Y);return G?I(G):V(Y)}function W(Y){return function(...G){if(Y===null)throw new Error("Callback was already called.");var $=Y;Y=null,$.apply(this,G)}}function M(Y,G,$,te){let de=!1,ge=!1,xe=!1,Se=0,Be=0;function wr(){Se>=G||xe||de||(xe=!0,Y.next().then(({value:vt,done:Oi})=>{if(!(ge||de)){if(xe=!1,Oi){de=!0,Se<=0&&te(null);return}Se++,$(vt,Be,gt),Be++,wr()}}).catch(At))}function gt(vt,Oi){if(Se-=1,!ge){if(vt)return At(vt);if(vt===!1){de=!0,ge=!0;return}if(Oi===D||de&&Se<=0)return de=!0,te(null);wr()}}function At(vt){ge||(xe=!1,de=!0,te(vt))}wr()}var H=Y=>(G,$,te)=>{if(te=P(te),Y<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!G)return te(null);if(h(G))return M(G,Y,$,te);if(b(G))return M(G[Symbol.asyncIterator](),Y,$,te);var de=N(G),ge=!1,xe=!1,Se=0,Be=!1;function wr(At,vt){if(!xe)if(Se-=1,At)ge=!0,te(At);else if(At===!1)ge=!0,xe=!0;else{if(vt===D||ge&&Se<=0)return ge=!0,te(null);Be||gt()}}function gt(){for(Be=!0;Se<Y&&!ge;){var At=de();if(At===null){ge=!0,Se<=0&&te(null);return}Se+=1,$(At.value,At.key,W(wr))}Be=!1}gt()};function X(Y,G,$,te){return H(G)(Y,v($),te)}var ne=y(X,4);function ae(Y,G,$){$=P($);var te=0,de=0,{length:ge}=Y,xe=!1;ge===0&&$(null);function Se(Be,wr){Be===!1&&(xe=!0),xe!==!0&&(Be?$(Be):(++de===ge||wr===D)&&$(null))}for(;te<ge;te++)G(Y[te],te,W(Se))}function se(Y,G,$){return ne(Y,1/0,G,$)}function ce(Y,G,$){var te=C(Y)?ae:se;return te(Y,v(G),$)}var me=y(ce,3);function Me(Y,G,$){return A(me,Y,G,$)}var Ie=y(Me,3),Ue=w(Ie);function ie(Y,G,$){return ne(Y,1,G,$)}var De=y(ie,3);function mr(Y,G,$){return A(De,Y,G,$)}var lr=y(mr,3),cr=w(lr);let gr=Symbol("promiseCallback");function Ke(){let Y,G;function $(te,...de){if(te)return G(te);Y(de.length>1?de:de[0])}return $[gr]=new Promise((te,de)=>{Y=te,G=de}),$}function ke(Y,G,$){typeof G!="number"&&($=G,G=null),$=P($||Ke());var te=Object.keys(Y).length;if(!te)return $(null);G||(G=te);var de={},ge=0,xe=!1,Se=!1,Be=Object.create(null),wr=[],gt=[],At={};Object.keys(Y).forEach(Sr=>{var zr=Y[Sr];if(!Array.isArray(zr)){vt(Sr,[zr]),gt.push(Sr);return}var mt=zr.slice(0,zr.length-1),yn=mt.length;if(yn===0){vt(Sr,zr),gt.push(Sr);return}At[Sr]=yn,mt.forEach(vi=>{if(!Y[vi])throw new Error("async.auto task `"+Sr+"` has a non-existent dependency `"+vi+"` in "+mt.join(", "));ds(vi,()=>{yn--,yn===0&&vt(Sr,zr)})})}),Mt(),Oi();function vt(Sr,zr){wr.push(()=>Xf(Sr,zr))}function Oi(){if(!xe){if(wr.length===0&&ge===0)return $(null,de);for(;wr.length&&ge<G;){var Sr=wr.shift();Sr()}}}function ds(Sr,zr){var mt=Be[Sr];mt||(mt=Be[Sr]=[]),mt.push(zr)}function ps(Sr){var zr=Be[Sr]||[];zr.forEach(mt=>mt()),Oi()}function Xf(Sr,zr){if(!Se){var mt=W((vi,...no)=>{if(ge--,vi===!1){xe=!0;return}if(no.length<2&&([no]=no),vi){var Jf={};if(Object.keys(de).forEach(Sc=>{Jf[Sc]=de[Sc]}),Jf[Sr]=no,Se=!0,Be=Object.create(null),xe)return;$(vi,Jf)}else de[Sr]=no,ps(Sr)});ge++;var yn=v(zr[zr.length-1]);zr.length>1?yn(de,mt):yn(mt)}}function Mt(){for(var Sr,zr=0;gt.length;)Sr=gt.pop(),zr++,Nr(Sr).forEach(mt=>{--At[mt]==0&>.push(mt)});if(zr!==te)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function Nr(Sr){var zr=[];return Object.keys(Y).forEach(mt=>{let yn=Y[mt];Array.isArray(yn)&&yn.indexOf(Sr)>=0&&zr.push(mt)}),zr}return $[gr]}var qe=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,Ar=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,Xe=/,/,kr=/(=.+)?(\s*)$/;function St(Y){let G="",$=0,te=Y.indexOf("*/");for(;$<Y.length;)if(Y[$]==="/"&&Y[$+1]==="/"){let de=Y.indexOf(`
|
|
165
|
+
>>> no match, partial?`,r,f,t,d),f===s))}var h;if(typeof l=="string"?(h=c===l,this.debug("string match",l,c,h)):(h=c.match(l),this.debug("pattern match",l,c,h)),!h)return!1}if(a===s&&o===u)return!0;if(a===s)return n;if(o===u)return a===s-1&&r[a]==="";throw new Error("wtf?")}braceExpand(){return GDe(this.pattern,this.options)}parse(r,t){hR(r);let n=this.options;if(r==="**")if(n.noglobstar)r="*";else return el;if(r==="")return"";let i="",a=!1,o=!1,s=[],u=[],l,c=!1,f=-1,d=-1,p,h,b,v=r.charAt(0)===".",y=n.dot||v,w=()=>v?"":y?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",A=k=>k.charAt(0)==="."?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",C=()=>{if(l){switch(l){case"*":i+=kH,a=!0;break;case"?":i+=DH,a=!0;break;default:i+="\\"+l;break}this.debug("clearStateChar %j %j",l,i),l=!1}};for(let k=0,L;k<r.length&&(L=r.charAt(k));k++){if(this.debug("%s %s %s %j",r,k,i,L),o){if(L==="/")return!1;NDe[L]&&(i+="\\"),i+=L,o=!1;continue}switch(L){case"/":return!1;case"\\":if(c&&r.charAt(k+1)==="-"){i+=L;continue}C(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",r,k,i,L),c){this.debug(" in class"),L==="!"&&k===d+1&&(L="^"),i+=L;continue}this.debug("call clearStateChar %j",l),C(),l=L,n.noext&&C();continue;case"(":{if(c){i+="(";continue}if(!l){i+="\\(";continue}let I={type:l,start:k-1,reStart:i.length,open:LDe[l].open,close:LDe[l].close};this.debug(this.pattern," ",I),s.push(I),i+=I.open,I.start===0&&I.type!=="!"&&(v=!0,i+=A(r.slice(k+1))),this.debug("plType %j %j",l,i),l=!1;continue}case")":{let I=s[s.length-1];if(c||!I){i+="\\)";continue}s.pop(),C(),a=!0,h=I,i+=h.close,h.type==="!"&&u.push(Object.assign(h,{reEnd:i.length}));continue}case"|":{let I=s[s.length-1];if(c||!I){i+="\\|";continue}C(),i+="|",I.start===0&&I.type!=="!"&&(v=!0,i+=A(r.slice(k+1)));continue}case"[":if(C(),c){i+="\\"+L;continue}c=!0,d=k,f=i.length,i+=L;continue;case"]":if(k===d+1||!c){i+="\\"+L;continue}p=r.substring(d+1,k);try{RegExp("["+aWr(nWr(p))+"]"),i+=L}catch{i=i.substring(0,f)+"(?:$.)"}a=!0,c=!1;continue;default:C(),NDe[L]&&!(L==="^"&&c)&&(i+="\\"),i+=L;break}}for(c&&(p=r.slice(d+1),b=this.parse(p,OH),i=i.substring(0,f)+"\\["+b[0],a=a||b[1]),h=s.pop();h;h=s.pop()){let k;k=i.slice(h.reStart+h.open.length),this.debug("setting tail",i,h),k=k.replace(/((?:\\{2}){0,64})(\\?)\|/g,(I,V,N)=>(N||(N="\\"),V+V+N+"|")),this.debug(`tail=%j
|
|
166
|
+
%s`,k,k,h,i);let L=h.type==="*"?kH:h.type==="?"?DH:"\\"+h.type;a=!0,i=i.slice(0,h.reStart)+L+"\\("+k}C(),o&&(i+="\\\\");let D=eWr[i.charAt(0)];for(let k=u.length-1;k>-1;k--){let L=u[k],I=i.slice(0,L.reStart),V=i.slice(L.reStart,L.reEnd-8),N=i.slice(L.reEnd),W=i.slice(L.reEnd-8,L.reEnd)+N,M=I.split(")").length,H=I.split("(").length-M,X=N;for(let ae=0;ae<H;ae++)X=X.replace(/\)[+*?]?/,"");N=X;let ne=N===""&&t!==OH?"(?:$|\\/)":"";i=I+V+N+ne+W}if(i!==""&&a&&(i="(?=.)"+i),D&&(i=w()+i),t===OH)return[i,a];if(n.nocase&&!a&&(a=r.toUpperCase()!==r.toLowerCase()),!a)return tWr(r);let P=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",P),{_glob:r,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let r=this.set;if(!r.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?kH:t.dot?QHr:ZHr,i=t.nocase?"i":"",a=r.map(o=>(o=o.map(s=>typeof s=="string"?iWr(s):s===el?el:s._src).reduce((s,u)=>(s[s.length-1]===el&&u===el||s.push(u),s),[]),o.forEach((s,u)=>{s!==el||o[u-1]===el||(u===0?o.length>1?o[u+1]="(?:\\/|"+n+"\\/)?"+o[u+1]:o[u]=n:u===o.length-1?o[u-1]+="(?:\\/|"+n+")?":(o[u-1]+="(?:\\/|\\/"+n+"\\/)"+o[u+1],o[u+1]=el))}),o.filter(s=>s!==el).join("/"))).join("|");a="^(?:"+a+")$",this.negate&&(a="^(?!"+a+").*$");try{this.regexp=new RegExp(a,i)}catch{this.regexp=!1}return this.regexp}match(r,t=this.partial){if(this.debug("match",r,this.pattern),this.comment)return!1;if(this.empty)return r==="";if(r==="/"&&t)return!0;let n=this.options;CH.sep!=="/"&&(r=r.split(CH.sep).join("/")),r=r.split(UDe),this.debug(this.pattern,"split",r);let i=this.set;this.debug(this.pattern,"set",i);let a;for(let o=r.length-1;o>=0&&(a=r[o],!a);o--);for(let o=0;o<i.length;o++){let s=i[o],u=r;if(n.matchBase&&s.length===1&&(u=[a]),this.matchOne(u,s,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(r){return ss.defaults(r).Minimatch}};ss.Minimatch=BE});var YDe=m((C4t,KDe)=>{KDe.exports=VDe;var FH=require("fs"),{EventEmitter:oWr}=require("events"),{Minimatch:IH}=zDe(),{resolve:sWr}=require("path");function uWr(e,r){return new Promise((t,n)=>{FH.readdir(e,{withFileTypes:!0},(i,a)=>{if(i)switch(i.code){case"ENOTDIR":r?n(i):t([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":t([]);break;case"ELOOP":default:n(i);break}else t(a)})})}function HDe(e,r){return new Promise((t,n)=>{(r?FH.stat:FH.lstat)(e,(a,o)=>{if(a)switch(a.code){case"ENOENT":t(r?HDe(e,!1):null);break;default:t(null);break}else t(o)})})}async function*WDe(e,r,t,n,i,a){let o=await uWr(r+e,a);for(let s of o){let u=s.name;u===void 0&&(u=s,n=!0);let l=e+"/"+u,c=l.slice(1),f=r+"/"+c,d=null;(n||t)&&(d=await HDe(f,t)),!d&&s.name!==void 0&&(d=s),d===null&&(d={isDirectory:()=>!1}),d.isDirectory()?i(c)||(yield{relative:c,absolute:f,stats:d},yield*WDe(l,r,t,n,i,!1)):yield{relative:c,absolute:f,stats:d}}}async function*lWr(e,r,t,n){yield*WDe("",e,r,t,n,!0)}function cWr(e){return{pattern:e.pattern,dot:!!e.dot,noglobstar:!!e.noglobstar,matchBase:!!e.matchBase,nocase:!!e.nocase,ignore:e.ignore,skip:e.skip,follow:!!e.follow,stat:!!e.stat,nodir:!!e.nodir,mark:!!e.mark,silent:!!e.silent,absolute:!!e.absolute}}var PH=class extends oWr{constructor(r,t,n){super();if(typeof t=="function"&&(n=t,t=null),this.options=cWr(t||{}),this.matchers=[],this.options.pattern){let i=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=i.map(a=>new IH(a,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let i=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=i.map(a=>new IH(a,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let i=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=i.map(a=>new IH(a,{dot:!0}))}this.iterator=lWr(sWr(r||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on("match",i=>this._matches.push(this.options.absolute?i.absolute:i.relative)),this.on("error",i=>n(i)),this.on("end",()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(r){return this.skipMatchers.some(t=>t.match(r))}_fileMatches(r,t){let n=r+(t?"/":"");return(this.matchers.length===0||this.matchers.some(i=>i.match(n)))&&!this.ignoreMatchers.some(i=>i.match(n))&&(!this.options.nodir||!t)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(r=>{if(r.done)this.emit("end");else{let t=r.value.stats.isDirectory();if(this._fileMatches(r.value.relative,t)){let n=r.value.relative,i=r.value.absolute;this.options.mark&&t&&(n+="/",i+="/"),this.options.stat?this.emit("match",{relative:n,absolute:i,stat:r.value.stats}):this.emit("match",{relative:n,absolute:i})}this._next(this.iterator)}}).catch(r=>{this.abort(),this.emit("error",r),!r.code&&!this.options.silent&&console.error(r)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};function VDe(e,r,t){return new PH(e,r,t)}VDe.ReaddirGlob=PH});var XDe=m((mR,$De)=>{(function(e,r){typeof mR=="object"&&typeof $De!="undefined"?r(mR):typeof define=="function"&&define.amd?define(["exports"],r):r(e.async={})})(mR,function(e){"use strict";function r(Y,...G){return(...$)=>Y(...G,...$)}function t(Y){return function(...G){var $=G.pop();return Y.call(this,G,$)}}var n=typeof queueMicrotask=="function"&&queueMicrotask,i=typeof setImmediate=="function"&&setImmediate,a=typeof process=="object"&&typeof process.nextTick=="function";function o(Y){setTimeout(Y,0)}function s(Y){return(G,...$)=>Y(()=>G(...$))}var u;n?u=queueMicrotask:i?u=setImmediate:a?u=process.nextTick:u=o;var l=s(u);function c(Y){return p(Y)?function(...G){let $=G.pop(),te=Y.apply(this,G);return f(te,$)}:t(function(G,$){var te;try{te=Y.apply(this,G)}catch(de){return $(de)}if(te&&typeof te.then=="function")return f(te,$);$(null,te)})}function f(Y,G){return Y.then($=>{d(G,null,$)},$=>{d(G,$&&$.message?$:new Error($))})}function d(Y,G,$){try{Y(G,$)}catch(te){l(de=>{throw de},te)}}function p(Y){return Y[Symbol.toStringTag]==="AsyncFunction"}function h(Y){return Y[Symbol.toStringTag]==="AsyncGenerator"}function b(Y){return typeof Y[Symbol.asyncIterator]=="function"}function v(Y){if(typeof Y!="function")throw new Error("expected a function");return p(Y)?c(Y):Y}function y(Y,G=Y.length){if(!G)throw new Error("arity is undefined");function $(...te){return typeof te[G-1]=="function"?Y.apply(this,te):new Promise((de,ge)=>{te[G-1]=(xe,...Se)=>{if(xe)return ge(xe);de(Se.length>1?Se:Se[0])},Y.apply(this,te)})}return $}function w(Y){return function($,...te){return y(function(ge){var xe=this;return Y($,(Se,Be)=>{v(Se).apply(xe,te.concat(Be))},ge)})}}function A(Y,G,$,te){G=G||[];var de=[],ge=0,xe=v($);return Y(G,(Se,Be,wr)=>{var gt=ge++;xe(Se,(At,vt)=>{de[gt]=vt,wr(At)})},Se=>{te(Se,de)})}function C(Y){return Y&&typeof Y.length=="number"&&Y.length>=0&&Y.length%1==0}let D={};function P(Y){function G(...$){if(Y!==null){var te=Y;Y=null,te.apply(this,$)}}return Object.assign(G,Y),G}function k(Y){return Y[Symbol.iterator]&&Y[Symbol.iterator]()}function L(Y){var G=-1,$=Y.length;return function(){return++G<$?{value:Y[G],key:G}:null}}function I(Y){var G=-1;return function(){var te=Y.next();return te.done?null:(G++,{value:te.value,key:G})}}function V(Y){var G=Y?Object.keys(Y):[],$=-1,te=G.length;return function de(){var ge=G[++$];return ge==="__proto__"?de():$<te?{value:Y[ge],key:ge}:null}}function N(Y){if(C(Y))return L(Y);var G=k(Y);return G?I(G):V(Y)}function W(Y){return function(...G){if(Y===null)throw new Error("Callback was already called.");var $=Y;Y=null,$.apply(this,G)}}function M(Y,G,$,te){let de=!1,ge=!1,xe=!1,Se=0,Be=0;function wr(){Se>=G||xe||de||(xe=!0,Y.next().then(({value:vt,done:Oi})=>{if(!(ge||de)){if(xe=!1,Oi){de=!0,Se<=0&&te(null);return}Se++,$(vt,Be,gt),Be++,wr()}}).catch(At))}function gt(vt,Oi){if(Se-=1,!ge){if(vt)return At(vt);if(vt===!1){de=!0,ge=!0;return}if(Oi===D||de&&Se<=0)return de=!0,te(null);wr()}}function At(vt){ge||(xe=!1,de=!0,te(vt))}wr()}var H=Y=>(G,$,te)=>{if(te=P(te),Y<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!G)return te(null);if(h(G))return M(G,Y,$,te);if(b(G))return M(G[Symbol.asyncIterator](),Y,$,te);var de=N(G),ge=!1,xe=!1,Se=0,Be=!1;function wr(At,vt){if(!xe)if(Se-=1,At)ge=!0,te(At);else if(At===!1)ge=!0,xe=!0;else{if(vt===D||ge&&Se<=0)return ge=!0,te(null);Be||gt()}}function gt(){for(Be=!0;Se<Y&&!ge;){var At=de();if(At===null){ge=!0,Se<=0&&te(null);return}Se+=1,$(At.value,At.key,W(wr))}Be=!1}gt()};function X(Y,G,$,te){return H(G)(Y,v($),te)}var ne=y(X,4);function ae(Y,G,$){$=P($);var te=0,de=0,{length:ge}=Y,xe=!1;ge===0&&$(null);function Se(Be,wr){Be===!1&&(xe=!0),xe!==!0&&(Be?$(Be):(++de===ge||wr===D)&&$(null))}for(;te<ge;te++)G(Y[te],te,W(Se))}function se(Y,G,$){return ne(Y,1/0,G,$)}function ce(Y,G,$){var te=C(Y)?ae:se;return te(Y,v(G),$)}var me=y(ce,3);function Me(Y,G,$){return A(me,Y,G,$)}var Ie=y(Me,3),Ue=w(Ie);function ie(Y,G,$){return ne(Y,1,G,$)}var De=y(ie,3);function mr(Y,G,$){return A(De,Y,G,$)}var lr=y(mr,3),cr=w(lr);let gr=Symbol("promiseCallback");function Ke(){let Y,G;function $(te,...de){if(te)return G(te);Y(de.length>1?de:de[0])}return $[gr]=new Promise((te,de)=>{Y=te,G=de}),$}function ke(Y,G,$){typeof G!="number"&&($=G,G=null),$=P($||Ke());var te=Object.keys(Y).length;if(!te)return $(null);G||(G=te);var de={},ge=0,xe=!1,Se=!1,Be=Object.create(null),wr=[],gt=[],At={};Object.keys(Y).forEach(Sr=>{var zr=Y[Sr];if(!Array.isArray(zr)){vt(Sr,[zr]),gt.push(Sr);return}var mt=zr.slice(0,zr.length-1),yn=mt.length;if(yn===0){vt(Sr,zr),gt.push(Sr);return}At[Sr]=yn,mt.forEach(vi=>{if(!Y[vi])throw new Error("async.auto task `"+Sr+"` has a non-existent dependency `"+vi+"` in "+mt.join(", "));ds(vi,()=>{yn--,yn===0&&vt(Sr,zr)})})}),Mt(),Oi();function vt(Sr,zr){wr.push(()=>Xf(Sr,zr))}function Oi(){if(!xe){if(wr.length===0&&ge===0)return $(null,de);for(;wr.length&&ge<G;){var Sr=wr.shift();Sr()}}}function ds(Sr,zr){var mt=Be[Sr];mt||(mt=Be[Sr]=[]),mt.push(zr)}function ps(Sr){var zr=Be[Sr]||[];zr.forEach(mt=>mt()),Oi()}function Xf(Sr,zr){if(!Se){var mt=W((vi,...no)=>{if(ge--,vi===!1){xe=!0;return}if(no.length<2&&([no]=no),vi){var Jf={};if(Object.keys(de).forEach(Sc=>{Jf[Sc]=de[Sc]}),Jf[Sr]=no,Se=!0,Be=Object.create(null),xe)return;$(vi,Jf)}else de[Sr]=no,ps(Sr)});ge++;var yn=v(zr[zr.length-1]);zr.length>1?yn(de,mt):yn(mt)}}function Mt(){for(var Sr,zr=0;gt.length;)Sr=gt.pop(),zr++,Nr(Sr).forEach(mt=>{--At[mt]==0&>.push(mt)});if(zr!==te)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function Nr(Sr){var zr=[];return Object.keys(Y).forEach(mt=>{let yn=Y[mt];Array.isArray(yn)&&yn.indexOf(Sr)>=0&&zr.push(mt)}),zr}return $[gr]}var qe=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,Ar=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,Xe=/,/,kr=/(=.+)?(\s*)$/;function St(Y){let G="",$=0,te=Y.indexOf("*/");for(;$<Y.length;)if(Y[$]==="/"&&Y[$+1]==="/"){let de=Y.indexOf(`
|
|
166
167
|
`,$);$=de===-1?Y.length:de}else if(te!==-1&&Y[$]==="/"&&Y[$+1]==="*"){let de=Y.indexOf("*/",$);de!==-1?($=de+2,te=Y.indexOf("*/",$)):(G+=Y[$],$++)}else G+=Y[$],$++;return G}function qt(Y){let G=St(Y.toString()),$=G.match(qe);if($||($=G.match(Ar)),!$)throw new Error(`could not parse args in autoInject
|
|
167
168
|
Source:
|
|
168
|
-
`+G);let[,te]=$;return te.replace(/\s/g,"").split(Xe).map(de=>de.replace(kr,"").trim())}function pe(Y,G){var $={};return Object.keys(Y).forEach(te=>{var de=Y[te],ge,xe=p(de),Se=!xe&&de.length===1||xe&&de.length===0;if(Array.isArray(de))ge=[...de],de=ge.pop(),$[te]=ge.concat(ge.length>0?Be:de);else if(Se)$[te]=de;else{if(ge=qt(de),de.length===0&&!xe&&ge.length===0)throw new Error("autoInject task functions require explicit parameters.");xe||ge.pop(),$[te]=ge.concat(Be)}function Be(wr,gt){var At=ge.map(vt=>wr[vt]);At.push(gt),v(de)(...At)}}),ke($,G)}class rr{constructor(){this.head=this.tail=null,this.length=0}removeLink(G){return G.prev?G.prev.next=G.next:this.head=G.next,G.next?G.next.prev=G.prev:this.tail=G.prev,G.prev=G.next=null,this.length-=1,G}empty(){for(;this.head;)this.shift();return this}insertAfter(G,$){$.prev=G,$.next=G.next,G.next?G.next.prev=$:this.tail=$,G.next=$,this.length+=1}insertBefore(G,$){$.prev=G.prev,$.next=G,G.prev?G.prev.next=$:this.head=$,G.prev=$,this.length+=1}unshift(G){this.head?this.insertBefore(this.head,G):fr(this,G)}push(G){this.tail?this.insertAfter(this.tail,G):fr(this,G)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var G=this.head;G;)yield G.data,G=G.next}remove(G){for(var $=this.head;$;){var{next:te}=$;G($)&&this.removeLink($),$=te}return this}}function fr(Y,G){Y.length=1,Y.head=Y.tail=G}function or(Y,G,$){if(G==null)G=1;else if(G===0)throw new RangeError("Concurrency must not be zero");var te=v(Y),de=0,ge=[];let xe={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function Se(Nr,Sr){xe[Nr].push(Sr)}function Be(Nr,Sr){let zr=(...mt)=>{wr(Nr,zr),Sr(...mt)};xe[Nr].push(zr)}function wr(Nr,Sr){if(!Nr)return Object.keys(xe).forEach(zr=>xe[zr]=[]);if(!Sr)return xe[Nr]=[];xe[Nr]=xe[Nr].filter(zr=>zr!==Sr)}function gt(Nr,...Sr){xe[Nr].forEach(zr=>zr(...Sr))}var At=!1;function vt(Nr,Sr,zr,mt){if(mt!=null&&typeof mt!="function")throw new Error("task callback must be a function");Mt.started=!0;var yn,vi;function no(Sc,...Ac){if(Sc)return zr?vi(Sc):yn();if(Ac.length<=1)return yn(Ac[0]);yn(Ac)}var Jf=Mt._createTaskItem(Nr,zr?no:mt||no);if(Sr?Mt._tasks.unshift(Jf):Mt._tasks.push(Jf),At||(At=!0,l(()=>{At=!1,Mt.process()})),zr||!mt)return new Promise((Sc,Ac)=>{yn=Sc,vi=Ac})}function Oi(Nr){return function(Sr,...zr){de-=1;for(var mt=0,yn=Nr.length;mt<yn;mt++){var vi=Nr[mt],no=ge.indexOf(vi);no===0?ge.shift():no>0&&ge.splice(no,1),vi.callback(Sr,...zr),Sr!=null&>("error",Sr,vi.data)}de<=Mt.concurrency-Mt.buffer&>("unsaturated"),Mt.idle()&>("drain"),Mt.process()}}function ds(Nr){return Nr.length===0&&Mt.idle()?(l(()=>gt("drain")),!0):!1}let ps=Nr=>Sr=>{if(!Sr)return new Promise((zr,mt)=>{Be(Nr,(yn,vi)=>{if(yn)return mt(yn);zr(vi)})});wr(Nr),Se(Nr,Sr)};var Xf=!1,Mt={_tasks:new rr,_createTaskItem(Nr,Sr){return{data:Nr,callback:Sr}},*[Symbol.iterator](){yield*Mt._tasks[Symbol.iterator]()},concurrency:G,payload:$,buffer:G/4,started:!1,paused:!1,push(Nr,Sr){return Array.isArray(Nr)?ds(Nr)?void 0:Nr.map(zr=>vt(zr,!1,!1,Sr)):vt(Nr,!1,!1,Sr)},pushAsync(Nr,Sr){return Array.isArray(Nr)?ds(Nr)?void 0:Nr.map(zr=>vt(zr,!1,!0,Sr)):vt(Nr,!1,!0,Sr)},kill(){wr(),Mt._tasks.empty()},unshift(Nr,Sr){return Array.isArray(Nr)?ds(Nr)?void 0:Nr.map(zr=>vt(zr,!0,!1,Sr)):vt(Nr,!0,!1,Sr)},unshiftAsync(Nr,Sr){return Array.isArray(Nr)?ds(Nr)?void 0:Nr.map(zr=>vt(zr,!0,!0,Sr)):vt(Nr,!0,!0,Sr)},remove(Nr){Mt._tasks.remove(Nr)},process(){if(!Xf){for(Xf=!0;!Mt.paused&&de<Mt.concurrency&&Mt._tasks.length;){var Nr=[],Sr=[],zr=Mt._tasks.length;Mt.payload&&(zr=Math.min(zr,Mt.payload));for(var mt=0;mt<zr;mt++){var yn=Mt._tasks.shift();Nr.push(yn),ge.push(yn),Sr.push(yn.data)}de+=1,Mt._tasks.length===0&>("empty"),de===Mt.concurrency&>("saturated");var vi=W(Oi(Nr));te(Sr,vi)}Xf=!1}},length(){return Mt._tasks.length},running(){return de},workersList(){return ge},idle(){return Mt._tasks.length+de===0},pause(){Mt.paused=!0},resume(){Mt.paused!==!1&&(Mt.paused=!1,l(Mt.process))}};return Object.defineProperties(Mt,{saturated:{writable:!1,value:ps("saturated")},unsaturated:{writable:!1,value:ps("unsaturated")},empty:{writable:!1,value:ps("empty")},drain:{writable:!1,value:ps("drain")},error:{writable:!1,value:ps("error")}}),Mt}function dr(Y,G){return or(Y,1,G)}function vr(Y,G,$){return or(Y,G,$)}function Cr(Y,G,$,te){te=P(te);var de=v($);return De(Y,(ge,xe,Se)=>{de(G,ge,(Be,wr)=>{G=wr,Se(Be)})},ge=>te(ge,G))}var Ir=y(Cr,4);function dt(...Y){var G=Y.map(v);return function(...$){var te=this,de=$[$.length-1];return typeof de=="function"?$.pop():de=Ke(),Ir(G,$,(ge,xe,Se)=>{xe.apply(te,ge.concat((Be,...wr)=>{Se(Be,wr)}))},(ge,xe)=>de(ge,...xe)),de[gr]}}function Hr(...Y){return dt(...Y.reverse())}function Pe(Y,G,$,te){return A(H(G),Y,$,te)}var ur=y(Pe,4);function Lr(Y,G,$,te){var de=v($);return ur(Y,G,(ge,xe)=>{de(ge,(Se,...Be)=>Se?xe(Se):xe(Se,Be))},(ge,xe)=>{for(var Se=[],Be=0;Be<xe.length;Be++)xe[Be]&&(Se=Se.concat(...xe[Be]));return te(ge,Se)})}var rt=y(Lr,4);function jr(Y,G,$){return rt(Y,1/0,G,$)}var Gr=y(jr,3);function Xr(Y,G,$){return rt(Y,1,G,$)}var Er=y(Xr,3);function Fr(...Y){return function(...G){var $=G.pop();return $(null,...Y)}}function ot(Y,G){return($,te,de,ge)=>{var xe=!1,Se;let Be=v(de);$(te,(wr,gt,At)=>{Be(wr,(vt,Oi)=>{if(vt||vt===!1)return At(vt);if(Y(Oi)&&!Se)return xe=!0,Se=G(!0,wr),At(null,D);At()})},wr=>{if(wr)return ge(wr);ge(null,xe?Se:G(!1))})}}function pt(Y,G,$){return ot(te=>te,(te,de)=>de)(me,Y,G,$)}var En=y(pt,3);function Zn(Y,G,$,te){return ot(de=>de,(de,ge)=>ge)(H(G),Y,$,te)}var ei=y(Zn,4);function ia(Y,G,$){return ot(te=>te,(te,de)=>de)(H(1),Y,G,$)}var Kt=y(ia,3);function fn(Y){return(G,...$)=>v(G)(...$,(te,...de)=>{typeof console=="object"&&(te?console.error&&console.error(te):console[Y]&&de.forEach(ge=>console[Y](ge)))})}var wn=fn("dir");function ri(Y,G,$){$=W($);var te=v(Y),de=v(G),ge;function xe(Be,...wr){if(Be)return $(Be);Be!==!1&&(ge=wr,de(...wr,Se))}function Se(Be,wr){if(Be)return $(Be);if(Be!==!1){if(!wr)return $(null,...ge);te(xe)}}return Se(null,!0)}var dn=y(ri,3);function Di(Y,G,$){let te=v(G);return dn(Y,(...de)=>{let ge=de.pop();te(...de,(xe,Se)=>ge(xe,!Se))},$)}function ti(Y){return(G,$,te)=>Y(G,te)}function pn(Y,G,$){return me(Y,ti(v(G)),$)}var aa=y(pn,3);function O(Y,G,$,te){return H(G)(Y,ti(v($)),te)}var T=y(O,4);function S(Y,G,$){return T(Y,1,G,$)}var x=y(S,3);function R(Y){return p(Y)?Y:function(...G){var $=G.pop(),te=!0;G.push((...de)=>{te?l(()=>$(...de)):$(...de)}),Y.apply(this,G),te=!1}}function K(Y,G,$){return ot(te=>!te,te=>!te)(me,Y,G,$)}var Z=y(K,3);function le(Y,G,$,te){return ot(de=>!de,de=>!de)(H(G),Y,$,te)}var ve=y(le,4);function Oe(Y,G,$){return ot(te=>!te,te=>!te)(De,Y,G,$)}var Re=y(Oe,3);function ar(Y,G,$,te){var de=new Array(G.length);Y(G,(ge,xe,Se)=>{$(ge,(Be,wr)=>{de[xe]=!!wr,Se(Be)})},ge=>{if(ge)return te(ge);for(var xe=[],Se=0;Se<G.length;Se++)de[Se]&&xe.push(G[Se]);te(null,xe)})}function Le(Y,G,$,te){var de=[];Y(G,(ge,xe,Se)=>{$(ge,(Be,wr)=>{if(Be)return Se(Be);wr&&de.push({index:xe,value:ge}),Se(Be)})},ge=>{if(ge)return te(ge);te(null,de.sort((xe,Se)=>xe.index-Se.index).map(xe=>xe.value))})}function nr(Y,G,$,te){var de=C(G)?ar:Le;return de(Y,G,v($),te)}function tr(Y,G,$){return nr(me,Y,G,$)}var Ge=y(tr,3);function Qe(Y,G,$,te){return nr(H(G),Y,$,te)}var Ye=y(Qe,4);function xr(Y,G,$){return nr(De,Y,G,$)}var pr=y(xr,3);function Je(Y,G){var $=W(G),te=v(R(Y));function de(ge){if(ge)return $(ge);ge!==!1&&te(de)}return de()}var He=y(Je,2);function Ve(Y,G,$,te){var de=v($);return ur(Y,G,(ge,xe)=>{de(ge,(Se,Be)=>Se?xe(Se):xe(Se,{key:Be,val:ge}))},(ge,xe)=>{for(var Se={},{hasOwnProperty:Be}=Object.prototype,wr=0;wr<xe.length;wr++)if(xe[wr]){var{key:gt}=xe[wr],{val:At}=xe[wr];Be.call(Se,gt)?Se[gt].push(At):Se[gt]=[At]}return te(ge,Se)})}var Ze=y(Ve,4);function ir(Y,G,$){return Ze(Y,1/0,G,$)}function Fe(Y,G,$){return Ze(Y,1,G,$)}var fe=fn("log");function he(Y,G,$,te){te=P(te);var de={},ge=v($);return H(G)(Y,(xe,Se,Be)=>{ge(xe,Se,(wr,gt)=>{if(wr)return Be(wr);de[Se]=gt,Be(wr)})},xe=>te(xe,de))}var Ce=y(he,4);function Ee(Y,G,$){return Ce(Y,1/0,G,$)}function be(Y,G,$){return Ce(Y,1,G,$)}function _e(Y,G=$=>$){var $=Object.create(null),te=Object.create(null),de=v(Y),ge=t((xe,Se)=>{var Be=G(...xe);Be in $?l(()=>Se(null,...$[Be])):Be in te?te[Be].push(Se):(te[Be]=[Se],de(...xe,(wr,...gt)=>{wr||($[Be]=gt);var At=te[Be];delete te[Be];for(var vt=0,Oi=At.length;vt<Oi;vt++)At[vt](wr,...gt)}))});return ge.memo=$,ge.unmemoized=Y,ge}var sr;a?sr=process.nextTick:i?sr=setImmediate:sr=o;var Pr=s(sr),yr=y((Y,G,$)=>{var te=C(G)?[]:{};Y(G,(de,ge,xe)=>{v(de)((Se,...Be)=>{Be.length<2&&([Be]=Be),te[ge]=Be,xe(Se)})},de=>$(de,te))},3);function Tr(Y,G){return yr(me,Y,G)}function Q(Y,G,$){return yr(H(G),Y,$)}function Wr(Y,G){var $=v(Y);return or((te,de)=>{$(te[0],de)},G,1)}class st{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(G){let $;for(;G>0&&tt(this.heap[G],this.heap[$=qr(G)]);){let te=this.heap[G];this.heap[G]=this.heap[$],this.heap[$]=te,G=$}}percDown(G){let $;for(;($=Zr(G))<this.heap.length&&($+1<this.heap.length&&tt(this.heap[$+1],this.heap[$])&&($=$+1),!tt(this.heap[G],this.heap[$]));){let te=this.heap[G];this.heap[G]=this.heap[$],this.heap[$]=te,G=$}}push(G){G.pushCount=++this.pushCount,this.heap.push(G),this.percUp(this.heap.length-1)}unshift(G){return this.heap.push(G)}shift(){let[G]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),G}toArray(){return[...this]}*[Symbol.iterator](){for(let G=0;G<this.heap.length;G++)yield this.heap[G].data}remove(G){let $=0;for(let te=0;te<this.heap.length;te++)G(this.heap[te])||(this.heap[$]=this.heap[te],$++);this.heap.splice($);for(let te=qr(this.heap.length-1);te>=0;te--)this.percDown(te);return this}}function Zr(Y){return(Y<<1)+1}function qr(Y){return(Y+1>>1)-1}function tt(Y,G){return Y.priority!==G.priority?Y.priority<G.priority:Y.pushCount<G.pushCount}function et(Y,G){var $=Wr(Y,G),{push:te,pushAsync:de}=$;$._tasks=new st,$._createTaskItem=({data:xe,priority:Se},Be)=>({data:xe,priority:Se,callback:Be});function ge(xe,Se){return Array.isArray(xe)?xe.map(Be=>({data:Be,priority:Se})):{data:xe,priority:Se}}return $.push=function(xe,Se=0,Be){return te(ge(xe,Se),Be)},$.pushAsync=function(xe,Se=0,Be){return de(ge(xe,Se),Be)},delete $.unshift,delete $.unshiftAsync,$}function hn(Y,G){if(G=P(G),!Array.isArray(Y))return G(new TypeError("First argument to race must be an array of functions"));if(!Y.length)return G();for(var $=0,te=Y.length;$<te;$++)v(Y[$])(G)}var ut=y(hn,2);function F(Y,G,$,te){var de=[...Y].reverse();return Ir(de,G,$,te)}function j(Y){var G=v(Y);return t(function(te,de){return te.push((ge,...xe)=>{let Se={};if(ge&&(Se.error=ge),xe.length>0){var Be=xe;xe.length<=1&&([Be]=xe),Se.value=Be}de(null,Se)}),G.apply(this,te)})}function z(Y){var G;return Array.isArray(Y)?G=Y.map(j):(G={},Object.keys(Y).forEach($=>{G[$]=j.call(this,Y[$])})),G}function re(Y,G,$,te){let de=v($);return nr(Y,G,(ge,xe)=>{de(ge,(Se,Be)=>{xe(Se,!Be)})},te)}function ye(Y,G,$){return re(me,Y,G,$)}var we=y(ye,3);function Ne(Y,G,$,te){return re(H(G),Y,$,te)}var er=y(Ne,4);function ht(Y,G,$){return re(De,Y,G,$)}var mn=y(ht,3);function ki(Y){return function(){return Y}}let gi=5,oa=0;function yo(Y,G,$){var te={times:gi,intervalFunc:ki(oa)};if(arguments.length<3&&typeof Y=="function"?($=G||Ke(),G=Y):(sa(te,Y),$=$||Ke()),typeof G!="function")throw new Error("Invalid arguments for async.retry");var de=v(G),ge=1;function xe(){de((Se,...Be)=>{Se!==!1&&(Se&&ge++<te.times&&(typeof te.errorFilter!="function"||te.errorFilter(Se))?setTimeout(xe,te.intervalFunc(ge-1)):$(Se,...Be))})}return xe(),$[gr]}function sa(Y,G){if(typeof G=="object")Y.times=+G.times||gi,Y.intervalFunc=typeof G.interval=="function"?G.interval:ki(+G.interval||oa),Y.errorFilter=G.errorFilter;else if(typeof G=="number"||typeof G=="string")Y.times=+G||gi;else throw new Error("Invalid arguments for async.retry")}function wa(Y,G){G||(G=Y,Y=null);let $=Y&&Y.arity||G.length;p(G)&&($+=1);var te=v(G);return t((de,ge)=>{(de.length<$-1||ge==null)&&(de.push(ge),ge=Ke());function xe(Se){te(...de,Se)}return Y?yo(Y,xe,ge):yo(xe,ge),ge[gr]})}function il(Y,G){return yr(De,Y,G)}function No(Y,G,$){return ot(Boolean,te=>te)(me,Y,G,$)}var fu=y(No,3);function Uo(Y,G,$,te){return ot(Boolean,de=>de)(H(G),Y,$,te)}var Lm=y(Uo,4);function v4(Y,G,$){return ot(Boolean,te=>te)(De,Y,G,$)}var qm=y(v4,3);function Nm(Y,G,$){var te=v(G);return Ie(Y,(ge,xe)=>{te(ge,(Se,Be)=>{if(Se)return xe(Se);xe(Se,{value:ge,criteria:Be})})},(ge,xe)=>{if(ge)return $(ge);$(null,xe.sort(de).map(Se=>Se.value))});function de(ge,xe){var Se=ge.criteria,Be=xe.criteria;return Se<Be?-1:Se>Be?1:0}}var Um=y(Nm,3);function Ec(Y,G,$){var te=v(Y);return t((de,ge)=>{var xe=!1,Se;function Be(){var wr=Y.name||"anonymous",gt=new Error('Callback function "'+wr+'" timed out.');gt.code="ETIMEDOUT",$&&(gt.info=$),xe=!0,ge(gt)}de.push((...wr)=>{xe||(ge(...wr),clearTimeout(Se))}),Se=setTimeout(Be,G),te(...de)})}function wc(Y){for(var G=Array(Y);Y--;)G[Y]=Y;return G}function Gm(Y,G,$,te){var de=v($);return ur(wc(Y),G,de,te)}function _x(Y,G,$){return Gm(Y,1/0,G,$)}function Vw(Y,G,$){return Gm(Y,1,G,$)}function Kw(Y,G,$,te){arguments.length<=3&&typeof G=="function"&&(te=$,$=G,G=Array.isArray(Y)?[]:{}),te=P(te||Ke());var de=v($);return me(Y,(ge,xe,Se)=>{de(G,ge,xe,Se)},ge=>te(ge,G)),te[gr]}function Yw(Y,G){var $=null,te;return x(Y,(de,ge)=>{v(de)((xe,...Se)=>{if(xe===!1)return ge(xe);Se.length<2?[te]=Se:te=Se,$=xe,ge(xe?null:{})})},()=>G($,te))}var $w=y(Yw);function Ex(Y){return(...G)=>(Y.unmemoized||Y)(...G)}function Xw(Y,G,$){$=W($);var te=v(G),de=v(Y),ge=[];function xe(Be,...wr){if(Be)return $(Be);ge=wr,Be!==!1&&de(Se)}function Se(Be,wr){if(Be)return $(Be);if(Be!==!1){if(!wr)return $(null,...ge);te(xe)}}return de(Se)}var $f=y(Xw,3);function al(Y,G,$){let te=v(Y);return $f(de=>te((ge,xe)=>de(ge,!xe)),G,$)}function wx(Y,G){if(G=P(G),!Array.isArray(Y))return G(new Error("First argument to waterfall must be an array of functions"));if(!Y.length)return G();var $=0;function te(ge){var xe=v(Y[$++]);xe(...ge,W(de))}function de(ge,...xe){if(ge!==!1){if(ge||$===Y.length)return G(ge,...xe);te(xe)}}te([])}var Sx=y(wx),b4={apply:r,applyEach:Ue,applyEachSeries:cr,asyncify:c,auto:ke,autoInject:pe,cargo:dr,cargoQueue:vr,compose:Hr,concat:Gr,concatLimit:rt,concatSeries:Er,constant:Fr,detect:En,detectLimit:ei,detectSeries:Kt,dir:wn,doUntil:Di,doWhilst:dn,each:aa,eachLimit:T,eachOf:me,eachOfLimit:ne,eachOfSeries:De,eachSeries:x,ensureAsync:R,every:Z,everyLimit:ve,everySeries:Re,filter:Ge,filterLimit:Ye,filterSeries:pr,forever:He,groupBy:ir,groupByLimit:Ze,groupBySeries:Fe,log:fe,map:Ie,mapLimit:ur,mapSeries:lr,mapValues:Ee,mapValuesLimit:Ce,mapValuesSeries:be,memoize:_e,nextTick:Pr,parallel:Tr,parallelLimit:Q,priorityQueue:et,queue:Wr,race:ut,reduce:Ir,reduceRight:F,reflect:j,reflectAll:z,reject:we,rejectLimit:er,rejectSeries:mn,retry:yo,retryable:wa,seq:dt,series:il,setImmediate:l,some:fu,someLimit:Lm,someSeries:qm,sortBy:Um,timeout:Ec,times:_x,timesLimit:Gm,timesSeries:Vw,transform:Kw,tryEach:$w,unmemoize:Ex,until:al,waterfall:Sx,whilst:$f,all:Z,allLimit:ve,allSeries:Re,any:fu,anyLimit:Lm,anySeries:qm,find:En,findLimit:ei,findSeries:Kt,flatMap:Gr,flatMapLimit:rt,flatMapSeries:Er,forEach:aa,forEachSeries:x,forEachLimit:T,forEachOf:me,forEachOfSeries:De,forEachOfLimit:ne,inject:Ir,foldl:Ir,foldr:F,select:Ge,selectLimit:Ye,selectSeries:pr,wrapSync:c,during:$f,doDuring:dn};e.default=b4,e.apply=r,e.applyEach=Ue,e.applyEachSeries=cr,e.asyncify=c,e.auto=ke,e.autoInject=pe,e.cargo=dr,e.cargoQueue=vr,e.compose=Hr,e.concat=Gr,e.concatLimit=rt,e.concatSeries=Er,e.constant=Fr,e.detect=En,e.detectLimit=ei,e.detectSeries=Kt,e.dir=wn,e.doUntil=Di,e.doWhilst=dn,e.each=aa,e.eachLimit=T,e.eachOf=me,e.eachOfLimit=ne,e.eachOfSeries=De,e.eachSeries=x,e.ensureAsync=R,e.every=Z,e.everyLimit=ve,e.everySeries=Re,e.filter=Ge,e.filterLimit=Ye,e.filterSeries=pr,e.forever=He,e.groupBy=ir,e.groupByLimit=Ze,e.groupBySeries=Fe,e.log=fe,e.map=Ie,e.mapLimit=ur,e.mapSeries=lr,e.mapValues=Ee,e.mapValuesLimit=Ce,e.mapValuesSeries=be,e.memoize=_e,e.nextTick=Pr,e.parallel=Tr,e.parallelLimit=Q,e.priorityQueue=et,e.queue=Wr,e.race=ut,e.reduce=Ir,e.reduceRight=F,e.reflect=j,e.reflectAll=z,e.reject=we,e.rejectLimit=er,e.rejectSeries=mn,e.retry=yo,e.retryable=wa,e.seq=dt,e.series=il,e.setImmediate=l,e.some=fu,e.someLimit=Lm,e.someSeries=qm,e.sortBy=Um,e.timeout=Ec,e.times=_x,e.timesLimit=Gm,e.timesSeries=Vw,e.transform=Kw,e.tryEach=$w,e.unmemoize=Ex,e.until=al,e.waterfall=Sx,e.whilst=$f,e.all=Z,e.allLimit=ve,e.allSeries=Re,e.any=fu,e.anyLimit=Lm,e.anySeries=qm,e.find=En,e.findLimit=ei,e.findSeries=Kt,e.flatMap=Gr,e.flatMapLimit=rt,e.flatMapSeries=Er,e.forEach=aa,e.forEachSeries=x,e.forEachLimit=T,e.forEachOf=me,e.forEachOfSeries=De,e.forEachOfLimit=ne,e.inject=Ir,e.foldl=Ir,e.foldr=F,e.select=Ge,e.selectLimit=Ye,e.selectSeries=pr,e.wrapSync=c,e.during=$f,e.doDuring=dn,Object.defineProperty(e,"__esModule",{value:!0})})});var z3e=m((hFt,G3e)=>{var Bp=require("constants"),zNr=process.cwd,TO=null,HNr=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return TO||(TO=zNr.call(process)),TO};try{process.cwd()}catch{}typeof process.chdir=="function"&&(YG=process.chdir,process.chdir=function(e){TO=null,YG.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,YG));var YG;G3e.exports=WNr;function WNr(e){Bp.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&r(e),e.lutimes||t(e),e.chown=a(e.chown),e.fchown=a(e.fchown),e.lchown=a(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=o(e.chownSync),e.fchownSync=o(e.fchownSync),e.lchownSync=o(e.lchownSync),e.chmodSync=i(e.chmodSync),e.fchmodSync=i(e.fchmodSync),e.lchmodSync=i(e.lchmodSync),e.stat=s(e.stat),e.fstat=s(e.fstat),e.lstat=s(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(c,f,d){d&&process.nextTick(d)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(c,f,d,p){p&&process.nextTick(p)},e.lchownSync=function(){}),HNr==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(c){function f(d,p,h){var b=Date.now(),v=0;c(d,p,function y(w){if(w&&(w.code==="EACCES"||w.code==="EPERM"||w.code==="EBUSY")&&Date.now()-b<6e4){setTimeout(function(){e.stat(p,function(A,C){A&&A.code==="ENOENT"?c(d,p,y):h(w)})},v),v<100&&(v+=10);return}h&&h(w)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,c),f}(e.rename)),e.read=typeof e.read!="function"?e.read:function(c){function f(d,p,h,b,v,y){var w;if(y&&typeof y=="function"){var A=0;w=function(C,D,P){if(C&&C.code==="EAGAIN"&&A<10)return A++,c.call(e,d,p,h,b,v,w);y.apply(this,arguments)}}return c.call(e,d,p,h,b,v,w)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,c),f}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(c){return function(f,d,p,h,b){for(var v=0;;)try{return c.call(e,f,d,p,h,b)}catch(y){if(y.code==="EAGAIN"&&v<10){v++;continue}throw y}}}(e.readSync);function r(c){c.lchmod=function(f,d,p){c.open(f,Bp.O_WRONLY|Bp.O_SYMLINK,d,function(h,b){if(h){p&&p(h);return}c.fchmod(b,d,function(v){c.close(b,function(y){p&&p(v||y)})})})},c.lchmodSync=function(f,d){var p=c.openSync(f,Bp.O_WRONLY|Bp.O_SYMLINK,d),h=!0,b;try{b=c.fchmodSync(p,d),h=!1}finally{if(h)try{c.closeSync(p)}catch{}else c.closeSync(p)}return b}}function t(c){Bp.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(f,d,p,h){c.open(f,Bp.O_SYMLINK,function(b,v){if(b){h&&h(b);return}c.futimes(v,d,p,function(y){c.close(v,function(w){h&&h(y||w)})})})},c.lutimesSync=function(f,d,p){var h=c.openSync(f,Bp.O_SYMLINK),b,v=!0;try{b=c.futimesSync(h,d,p),v=!1}finally{if(v)try{c.closeSync(h)}catch{}else c.closeSync(h)}return b}):c.futimes&&(c.lutimes=function(f,d,p,h){h&&process.nextTick(h)},c.lutimesSync=function(){})}function n(c){return c&&function(f,d,p){return c.call(e,f,d,function(h){l(h)&&(h=null),p&&p.apply(this,arguments)})}}function i(c){return c&&function(f,d){try{return c.call(e,f,d)}catch(p){if(!l(p))throw p}}}function a(c){return c&&function(f,d,p,h){return c.call(e,f,d,p,function(b){l(b)&&(b=null),h&&h.apply(this,arguments)})}}function o(c){return c&&function(f,d,p){try{return c.call(e,f,d,p)}catch(h){if(!l(h))throw h}}}function s(c){return c&&function(f,d,p){typeof d=="function"&&(p=d,d=null);function h(b,v){v&&(v.uid<0&&(v.uid+=4294967296),v.gid<0&&(v.gid+=4294967296)),p&&p.apply(this,arguments)}return d?c.call(e,f,d,h):c.call(e,f,h)}}function u(c){return c&&function(f,d){var p=d?c.call(e,f,d):c.call(e,f);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function l(c){if(!c||c.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var V3e=m((mFt,W3e)=>{var H3e=require("stream").Stream;W3e.exports=VNr;function VNr(e){return{ReadStream:r,WriteStream:t};function r(n,i){if(!(this instanceof r))return new r(n,i);H3e.call(this);var a=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var o=Object.keys(i),s=0,u=o.length;s<u;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(c,f){if(c){a.emit("error",c),a.readable=!1;return}a.fd=f,a.emit("open",f),a._read()})}function t(n,i){if(!(this instanceof t))return new t(n,i);H3e.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var u=a[o];this[u]=i[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Y3e=m((gFt,K3e)=>{"use strict";K3e.exports=YNr;var KNr=Object.getPrototypeOf||function(e){return e.__proto__};function YNr(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var r={__proto__:KNr(e)};else var r=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}),r}});var QG=m((vFt,JG)=>{var Jn=require("fs"),$Nr=z3e(),XNr=V3e(),JNr=Y3e(),CO=require("util"),Ba,DO;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ba=Symbol.for("graceful-fs.queue"),DO=Symbol.for("graceful-fs.previous")):(Ba="___graceful-fs.queue",DO="___graceful-fs.previous");function QNr(){}function $3e(e,r){Object.defineProperty(e,Ba,{get:function(){return r}})}var J0=QNr;CO.debuglog?J0=CO.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(J0=function(){var e=CO.format.apply(CO,arguments);e="GFS4: "+e.split(/\n/).join(`
|
|
169
|
-
GFS4: `),console.error(e)});Jn[Ba]||(X3e=global[Ba]||[],$3e(Jn,X3e),Jn.close=function(e){function r(t,n){return e.call(Jn,t,function(i){i||J3e(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(r,DO,{value:e}),r}(Jn.close),Jn.closeSync=function(e){function r(t){e.apply(Jn,arguments),J3e()}return Object.defineProperty(r,DO,{value:e}),r}(Jn.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){J0(Jn[Ba]),require("assert").equal(Jn[Ba].length,0)}));var X3e;global[Ba]||$3e(global,Jn[Ba]);JG.exports=$G(JNr(Jn));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Jn.__patched&&(JG.exports=$G(Jn),Jn.__patched=!0);function $G(e){$Nr(e),e.gracefulify=$G,e.createReadStream=D,e.createWriteStream=P;var r=e.readFile;e.readFile=t;function t(I,V,N){return typeof V=="function"&&(N=V,V=null),W(I,V,N);function W(M,H,X,ne){return r(M,H,function(ae){ae&&(ae.code==="EMFILE"||ae.code==="ENFILE")?cy([W,[M,H,X],ae,ne||Date.now(),Date.now()]):typeof X=="function"&&X.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=i;function i(I,V,N,W){return typeof N=="function"&&(W=N,N=null),M(I,V,N,W);function M(H,X,ne,ae,se){return n(H,X,ne,function(ce){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?cy([M,[H,X,ne,ae],ce,se||Date.now(),Date.now()]):typeof ae=="function"&&ae.apply(this,arguments)})}}var a=e.appendFile;a&&(e.appendFile=o);function o(I,V,N,W){return typeof N=="function"&&(W=N,N=null),M(I,V,N,W);function M(H,X,ne,ae,se){return a(H,X,ne,function(ce){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?cy([M,[H,X,ne,ae],ce,se||Date.now(),Date.now()]):typeof ae=="function"&&ae.apply(this,arguments)})}}var s=e.copyFile;s&&(e.copyFile=u);function u(I,V,N,W){return typeof N=="function"&&(W=N,N=0),M(I,V,N,W);function M(H,X,ne,ae,se){return s(H,X,ne,function(ce){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?cy([M,[H,X,ne,ae],ce,se||Date.now(),Date.now()]):typeof ae=="function"&&ae.apply(this,arguments)})}}var l=e.readdir;e.readdir=f;var c=/^v[0-5]\./;function f(I,V,N){typeof V=="function"&&(N=V,V=null);var W=c.test(process.version)?function(X,ne,ae,se){return l(X,M(X,ne,ae,se))}:function(X,ne,ae,se){return l(X,ne,M(X,ne,ae,se))};return W(I,V,N);function M(H,X,ne,ae){return function(se,ce){se&&(se.code==="EMFILE"||se.code==="ENFILE")?cy([W,[H,X,ne],se,ae||Date.now(),Date.now()]):(ce&&ce.sort&&ce.sort(),typeof ne=="function"&&ne.call(this,se,ce))}}}if(process.version.substr(0,4)==="v0.8"){var d=XNr(e);y=d.ReadStream,A=d.WriteStream}var p=e.ReadStream;p&&(y.prototype=Object.create(p.prototype),y.prototype.open=w);var h=e.WriteStream;h&&(A.prototype=Object.create(h.prototype),A.prototype.open=C),Object.defineProperty(e,"ReadStream",{get:function(){return y},set:function(I){y=I},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return A},set:function(I){A=I},enumerable:!0,configurable:!0});var b=y;Object.defineProperty(e,"FileReadStream",{get:function(){return b},set:function(I){b=I},enumerable:!0,configurable:!0});var v=A;Object.defineProperty(e,"FileWriteStream",{get:function(){return v},set:function(I){v=I},enumerable:!0,configurable:!0});function y(I,V){return this instanceof y?(p.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function w(){var I=this;L(I.path,I.flags,I.mode,function(V,N){V?(I.autoClose&&I.destroy(),I.emit("error",V)):(I.fd=N,I.emit("open",N),I.read())})}function A(I,V){return this instanceof A?(h.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function C(){var I=this;L(I.path,I.flags,I.mode,function(V,N){V?(I.destroy(),I.emit("error",V)):(I.fd=N,I.emit("open",N))})}function D(I,V){return new e.ReadStream(I,V)}function P(I,V){return new e.WriteStream(I,V)}var k=e.open;e.open=L;function L(I,V,N,W){return typeof N=="function"&&(W=N,N=null),M(I,V,N,W);function M(H,X,ne,ae,se){return k(H,X,ne,function(ce,me){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?cy([M,[H,X,ne,ae],ce,se||Date.now(),Date.now()]):typeof ae=="function"&&ae.apply(this,arguments)})}}return e}function cy(e){J0("ENQUEUE",e[0].name,e[1]),Jn[Ba].push(e),XG()}var kO;function J3e(){for(var e=Date.now(),r=0;r<Jn[Ba].length;++r)Jn[Ba][r].length>2&&(Jn[Ba][r][3]=e,Jn[Ba][r][4]=e);XG()}function XG(){if(clearTimeout(kO),kO=void 0,Jn[Ba].length!==0){var e=Jn[Ba].shift(),r=e[0],t=e[1],n=e[2],i=e[3],a=e[4];if(i===void 0)J0("RETRY",r.name,t),r.apply(null,t);else if(Date.now()-i>=6e4){J0("TIMEOUT",r.name,t);var o=t.pop();typeof o=="function"&&o.call(null,n)}else{var s=Date.now()-a,u=Math.max(a-i,1),l=Math.min(u*1.2,100);s>=l?(J0("RETRY",r.name,t),r.apply(null,t.concat([i]))):Jn[Ba].push(e)}kO===void 0&&(kO=setTimeout(XG,0))}}});var eE=m((bFt,ZG)=>{"use strict";typeof process=="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?ZG.exports={nextTick:ZNr}:ZG.exports=process;function ZNr(e,r,t,n){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,a,o;switch(i){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,r)});case 3:return process.nextTick(function(){e.call(null,r,t)});case 4:return process.nextTick(function(){e.call(null,r,t,n)});default:for(a=new Array(i-1),o=0;o<a.length;)a[o++]=arguments[o];return process.nextTick(function(){e.apply(null,a)})}}});var Z3e=m((yFt,Q3e)=>{var eUr={}.toString;Q3e.exports=Array.isArray||function(e){return eUr.call(e)=="[object Array]"}});var ez=m((xFt,e6e)=>{e6e.exports=require("stream")});var rE=m((rz,t6e)=>{var OO=require("buffer"),Cf=OO.Buffer;function r6e(e,r){for(var t in e)r[t]=e[t]}Cf.from&&Cf.alloc&&Cf.allocUnsafe&&Cf.allocUnsafeSlow?t6e.exports=OO:(r6e(OO,rz),rz.Buffer=fy);function fy(e,r,t){return Cf(e,r,t)}r6e(Cf,fy);fy.from=function(e,r,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Cf(e,r,t)};fy.alloc=function(e,r,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Cf(e);return r!==void 0?typeof t=="string"?n.fill(r,t):n.fill(r):n.fill(0),n};fy.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Cf(e)};fy.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return OO.SlowBuffer(e)}});var i6e=m((_Ft,tz)=>{"use strict";function rUr(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var n6e=rE().Buffer,tE=require("util");function tUr(e,r,t){e.copy(r,t)}tz.exports=function(){function e(){rUr(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i},e.prototype.concat=function(t){if(this.length===0)return n6e.alloc(0);for(var n=n6e.allocUnsafe(t>>>0),i=this.head,a=0;i;)tUr(i.data,n,a),a+=i.data.length,i=i.next;return n},e}();tE&&tE.inspect&&tE.inspect.custom&&(tz.exports.prototype[tE.inspect.custom]=function(){var e=tE.inspect({length:this.length});return this.constructor.name+" "+e})});var nz=m((EFt,a6e)=>{"use strict";var RO=eE();function nUr(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,RO.nextTick(FO,this,e)):RO.nextTick(FO,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!r&&a?t._writableState?t._writableState.errorEmitted||(t._writableState.errorEmitted=!0,RO.nextTick(FO,t,a)):RO.nextTick(FO,t,a):r&&r(a)}),this)}function iUr(){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 FO(e,r){e.emit("error",r)}a6e.exports={destroy:nUr,undestroy:iUr}});var az=m((wFt,p6e)=>{"use strict";var Q0=eE();p6e.exports=Ni;function o6e(e){var r=this;this.next=null,this.entry=null,this.finish=function(){EUr(r,e)}}var aUr=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Q0.nextTick,dy;Ni.WritableState=nE;var s6e=Object.create(Ua());s6e.inherits=at();var oUr={deprecate:d0()},u6e=ez(),IO=rE().Buffer,sUr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function uUr(e){return IO.from(e)}function lUr(e){return IO.isBuffer(e)||e instanceof sUr}var l6e=nz();s6e.inherits(Ni,u6e);function cUr(){}function nE(e,r){dy=dy||Z0(),e=e||{};var t=r instanceof dy;this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,i=e.writableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:t&&(i||i===0)?this.highWaterMark=i: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 o=e.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){vUr(r,s)},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 o6e(this)}nE.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(nE.prototype,"buffer",{get:oUr.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var PO;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(PO=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ni,Symbol.hasInstance,{value:function(e){return PO.call(this,e)?!0:this!==Ni?!1:e&&e._writableState instanceof nE}})):PO=function(e){return e instanceof this};function Ni(e){if(dy=dy||Z0(),!PO.call(Ni,this)&&!(this instanceof dy))return new Ni(e);this._writableState=new nE(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)),u6e.call(this)}Ni.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function fUr(e,r){var t=new Error("write after end");e.emit("error",t),Q0.nextTick(r,t)}function dUr(e,r,t,n){var i=!0,a=!1;return t===null?a=new TypeError("May not write null values to stream"):typeof t!="string"&&t!==void 0&&!r.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),Q0.nextTick(n,a),i=!1),i}Ni.prototype.write=function(e,r,t){var n=this._writableState,i=!1,a=!n.objectMode&&lUr(e);return a&&!IO.isBuffer(e)&&(e=uUr(e)),typeof r=="function"&&(t=r,r=null),a?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=cUr),n.ended?fUr(this,t):(a||dUr(this,n,e,t))&&(n.pendingcb++,i=hUr(this,n,a,e,r,t)),i};Ni.prototype.cork=function(){var e=this._writableState;e.corked++};Ni.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&f6e(this,e))};Ni.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+r);return this._writableState.defaultEncoding=r,this};function pUr(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=IO.from(r,t)),r}Object.defineProperty(Ni.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function hUr(e,r,t,n,i,a){if(!t){var o=pUr(r,n,i);n!==o&&(t=!0,i="buffer",n=o)}var s=r.objectMode?1:n.length;r.length+=s;var u=r.length<r.highWaterMark;if(u||(r.needDrain=!0),r.writing||r.corked){var l=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:a,next:null},l?l.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else iz(e,r,!1,s,n,i,a);return u}function iz(e,r,t,n,i,a,o){r.writelen=n,r.writecb=o,r.writing=!0,r.sync=!0,t?e._writev(i,r.onwrite):e._write(i,a,r.onwrite),r.sync=!1}function mUr(e,r,t,n,i){--r.pendingcb,t?(Q0.nextTick(i,n),Q0.nextTick(iE,e,r),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),iE(e,r))}function gUr(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function vUr(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(gUr(t),r)mUr(e,t,n,r,i);else{var a=d6e(t);!a&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&f6e(e,t),n?aUr(c6e,e,t,a,i):c6e(e,t,a,i)}}function c6e(e,r,t,n){t||bUr(e,r),r.pendingcb--,n(),iE(e,r)}function bUr(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function f6e(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),a=r.corkedRequestsFree;a.entry=t;for(var o=0,s=!0;t;)i[o]=t,t.isBuf||(s=!1),t=t.next,o+=1;i.allBuffers=s,iz(e,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new o6e(r),r.bufferedRequestCount=0}else{for(;t;){var u=t.chunk,l=t.encoding,c=t.callback,f=r.objectMode?1:u.length;if(iz(e,r,!1,f,u,l,c),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}Ni.prototype._write=function(e,r,t){t(new Error("_write() is not implemented"))};Ni.prototype._writev=null;Ni.prototype.end=function(e,r,t){var n=this._writableState;typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||_Ur(this,n,t)};function d6e(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function yUr(e,r){e._final(function(t){r.pendingcb--,t&&e.emit("error",t),r.prefinished=!0,e.emit("prefinish"),iE(e,r)})}function xUr(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"?(r.pendingcb++,r.finalCalled=!0,Q0.nextTick(yUr,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function iE(e,r){var t=d6e(r);return t&&(xUr(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"))),t}function _Ur(e,r,t){r.ending=!0,iE(e,r),t&&(r.finished?Q0.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function EUr(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(Ni.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){!this._writableState||(this._writableState.destroyed=e)}});Ni.prototype.destroy=l6e.destroy;Ni.prototype._undestroy=l6e.undestroy;Ni.prototype._destroy=function(e,r){this.end(),r(e)}});var Z0=m((SFt,v6e)=>{"use strict";var h6e=eE(),wUr=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};v6e.exports=Df;var m6e=Object.create(Ua());m6e.inherits=at();var g6e=uz(),oz=az();m6e.inherits(Df,g6e);for(sz=wUr(oz.prototype),BO=0;BO<sz.length;BO++)jO=sz[BO],Df.prototype[jO]||(Df.prototype[jO]=oz.prototype[jO]);var sz,jO,BO;function Df(e){if(!(this instanceof Df))return new Df(e);g6e.call(this,e),oz.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",SUr)}Object.defineProperty(Df.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function SUr(){this.allowHalfOpen||this._writableState.ended||h6e.nextTick(AUr,this)}function AUr(e){e.end()}Object.defineProperty(Df.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)}});Df.prototype._destroy=function(e,r){this.push(null),this.end(),h6e.nextTick(r,e)}});var fz=m(y6e=>{"use strict";var lz=rE().Buffer,b6e=lz.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 TUr(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function CUr(e){var r=TUr(e);if(typeof r!="string"&&(lz.isEncoding===b6e||!b6e(e)))throw new Error("Unknown encoding: "+e);return r||e}y6e.StringDecoder=aE;function aE(e){this.encoding=CUr(e);var r;switch(this.encoding){case"utf16le":this.text=IUr,this.end=PUr,r=4;break;case"utf8":this.fillLast=OUr,r=4;break;case"base64":this.text=BUr,this.end=jUr,r=3;break;default:this.write=MUr,this.end=LUr;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=lz.allocUnsafe(r)}aE.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""};aE.prototype.end=FUr;aE.prototype.text=RUr;aE.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 cz(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function DUr(e,r,t){var n=r.length-1;if(n<t)return 0;var i=cz(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=cz(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=cz(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function kUr(e,r,t){if((r[0]&192)!=128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!=128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!=128)return e.lastNeed=2,"\uFFFD"}}function OUr(e){var r=this.lastTotal-this.lastNeed,t=kUr(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function RUr(e,r){var t=DUr(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",r,n)}function FUr(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function IUr(e,r){if((e.length-r)%2==0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.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],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function PUr(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function BUr(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function jUr(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function MUr(e){return e.toString(this.encoding)}function LUr(e){return e&&e.length?this.write(e):""}});var uz=m((CFt,R6e)=>{"use strict";var py=eE();R6e.exports=Mn;var qUr=Z3e(),oE;Mn.ReadableState=w6e;var TFt=require("events").EventEmitter,x6e=function(e,r){return e.listeners(r).length},dz=ez(),sE=rE().Buffer,NUr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function UUr(e){return sE.from(e)}function GUr(e){return sE.isBuffer(e)||e instanceof NUr}var _6e=Object.create(Ua());_6e.inherits=at();var pz=require("util"),rn=void 0;pz&&pz.debuglog?rn=pz.debuglog("stream"):rn=function(){};var zUr=i6e(),E6e=nz(),hy;_6e.inherits(Mn,dz);var hz=["error","close","destroy","pause","resume"];function HUr(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):qUr(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function w6e(e,r){oE=oE||Z0(),e=e||{};var t=r instanceof oE;this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=e.readableHighWaterMark,a=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:t&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new zUr,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&&(hy||(hy=fz().StringDecoder),this.decoder=new hy(e.encoding),this.encoding=e.encoding)}function Mn(e){if(oE=oE||Z0(),!(this instanceof Mn))return new Mn(e);this._readableState=new w6e(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),dz.call(this)}Object.defineProperty(Mn.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){!this._readableState||(this._readableState.destroyed=e)}});Mn.prototype.destroy=E6e.destroy;Mn.prototype._undestroy=E6e.undestroy;Mn.prototype._destroy=function(e,r){this.push(null),r(e)};Mn.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=sE.from(e,r),r=""),n=!0),S6e(this,e,r,!1,n)};Mn.prototype.unshift=function(e){return S6e(this,e,null,!0,!1)};function S6e(e,r,t,n,i){var a=e._readableState;if(r===null)a.reading=!1,YUr(e,a);else{var o;i||(o=WUr(a,r)),o?e.emit("error",o):a.objectMode||r&&r.length>0?(typeof r!="string"&&!a.objectMode&&Object.getPrototypeOf(r)!==sE.prototype&&(r=UUr(r)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):mz(e,a,r,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!t?(r=a.decoder.write(r),a.objectMode||r.length!==0?mz(e,a,r,!1):D6e(e,a)):mz(e,a,r,!1))):n||(a.reading=!1)}return VUr(a)}function mz(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(e.emit("data",t),e.read(0)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&MO(e)),D6e(e,r)}function WUr(e,r){var t;return!GUr(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new TypeError("Invalid non-string/buffer chunk")),t}function VUr(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Mn.prototype.isPaused=function(){return this._readableState.flowing===!1};Mn.prototype.setEncoding=function(e){return hy||(hy=fz().StringDecoder),this._readableState.decoder=new hy(e),this._readableState.encoding=e,this};var A6e=8388608;function KUr(e){return e>=A6e?e=A6e:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function T6e(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=KUr(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}Mn.prototype.read=function(e){rn("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&(r.length>=r.highWaterMark||r.ended))return rn("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?vz(this):MO(this),null;if(e=T6e(e,r),e===0&&r.ended)return r.length===0&&vz(this),null;var n=r.needReadable;rn("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,rn("length less than watermark",n)),r.ended||r.reading?(n=!1,rn("reading or ended",n)):n&&(rn("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=T6e(t,r)));var i;return e>0?i=k6e(e,r):i=null,i===null?(r.needReadable=!0,e=0):r.length-=e,r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&vz(this)),i!==null&&this.emit("data",i),i};function YUr(e,r){if(!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,MO(e)}}function MO(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(rn("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?py.nextTick(C6e,e):C6e(e))}function C6e(e){rn("emit readable"),e.emit("readable"),gz(e)}function D6e(e,r){r.readingMore||(r.readingMore=!0,py.nextTick($Ur,e,r))}function $Ur(e,r){for(var t=r.length;!r.reading&&!r.flowing&&!r.ended&&r.length<r.highWaterMark&&(rn("maybeReadMore read 0"),e.read(0),t!==r.length);)t=r.length;r.readingMore=!1}Mn.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Mn.prototype.pipe=function(e,r){var t=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,rn("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:v;n.endEmitted?py.nextTick(a):t.once("end",a),e.on("unpipe",o);function o(y,w){rn("onunpipe"),y===t&&w&&w.hasUnpiped===!1&&(w.hasUnpiped=!0,c())}function s(){rn("onend"),e.end()}var u=XUr(t);e.on("drain",u);var l=!1;function c(){rn("cleanup"),e.removeListener("close",h),e.removeListener("finish",b),e.removeListener("drain",u),e.removeListener("error",p),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",v),t.removeListener("data",d),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var f=!1;t.on("data",d);function d(y){rn("ondata"),f=!1;var w=e.write(y);w===!1&&!f&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&O6e(n.pipes,e)!==-1)&&!l&&(rn("false write response, pause",n.awaitDrain),n.awaitDrain++,f=!0),t.pause())}function p(y){rn("onerror",y),v(),e.removeListener("error",p),x6e(e,"error")===0&&e.emit("error",y)}HUr(e,"error",p);function h(){e.removeListener("finish",b),v()}e.once("close",h);function b(){rn("onfinish"),e.removeListener("close",h),v()}e.once("finish",b);function v(){rn("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(rn("pipe resume"),t.resume()),e};function XUr(e){return function(){var r=e._readableState;rn("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&x6e(e,"data")&&(r.flowing=!0,gz(e))}}Mn.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=O6e(r.pipes,e);return o===-1?this:(r.pipes.splice(o,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};Mn.prototype.on=function(e,r){var t=dz.prototype.on.call(this,e,r);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&&MO(this):py.nextTick(JUr,this))}return t};Mn.prototype.addListener=Mn.prototype.on;function JUr(e){rn("readable nexttick read 0"),e.read(0)}Mn.prototype.resume=function(){var e=this._readableState;return e.flowing||(rn("resume"),e.flowing=!0,QUr(this,e)),this};function QUr(e,r){r.resumeScheduled||(r.resumeScheduled=!0,py.nextTick(ZUr,e,r))}function ZUr(e,r){r.reading||(rn("resume read 0"),e.read(0)),r.resumeScheduled=!1,r.awaitDrain=0,e.emit("resume"),gz(e),r.flowing&&!r.reading&&e.read(0)}Mn.prototype.pause=function(){return rn("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(rn("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function gz(e){var r=e._readableState;for(rn("flow",r.flowing);r.flowing&&e.read()!==null;);}Mn.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(rn("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(rn("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var s=r.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(o){return function(){return e[o].apply(e,arguments)}}(i));for(var a=0;a<hz.length;a++)e.on(hz[a],this.emit.bind(this,hz[a]));return this._read=function(o){rn("wrapped _read",o),n&&(n=!1,e.resume())},this};Object.defineProperty(Mn.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Mn._fromList=k6e;function k6e(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.head.data:t=r.buffer.concat(r.length),r.buffer.clear()):t=eGr(e,r.buffer,r.decoder),t}function eGr(e,r,t){var n;return e<r.head.data.length?(n=r.head.data.slice(0,e),r.head.data=r.head.data.slice(e)):e===r.head.data.length?n=r.shift():n=t?rGr(e,r):tGr(e,r),n}function rGr(e,r){var t=r.head,n=1,i=t.data;for(e-=i.length;t=t.next;){var a=t.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),e-=o,e===0){o===a.length?(++n,t.next?r.head=t.next:r.head=r.tail=null):(r.head=t,t.data=a.slice(o));break}++n}return r.length-=n,i}function tGr(e,r){var t=sE.allocUnsafe(e),n=r.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,o),e-=o,e===0){o===a.length?(++i,n.next?r.head=n.next:r.head=r.tail=null):(r.head=n,n.data=a.slice(o));break}++i}return r.length-=i,t}function vz(e){var r=e._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,py.nextTick(nGr,r,e))}function nGr(e,r){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"))}function O6e(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var bz=m((DFt,P6e)=>{"use strict";P6e.exports=kf;var LO=Z0(),F6e=Object.create(Ua());F6e.inherits=at();F6e.inherits(kf,LO);function iGr(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function kf(e){if(!(this instanceof kf))return new kf(e);LO.call(this,e),this._transformState={afterTransform:iGr.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",aGr)}function aGr(){var e=this;typeof this._flush=="function"?this._flush(function(r,t){I6e(e,r,t)}):I6e(this,null,null)}kf.prototype.push=function(e,r){return this._transformState.needTransform=!1,LO.prototype.push.call(this,e,r)};kf.prototype._transform=function(e,r,t){throw new Error("_transform() is not implemented")};kf.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};kf.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&r.writecb&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};kf.prototype._destroy=function(e,r){var t=this;LO.prototype._destroy.call(this,e,function(n){r(n),t.emit("close")})};function I6e(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),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 L6e=m((kFt,M6e)=>{"use strict";M6e.exports=uE;var B6e=bz(),j6e=Object.create(Ua());j6e.inherits=at();j6e.inherits(uE,B6e);function uE(e){if(!(this instanceof uE))return new uE(e);B6e.call(this,e)}uE.prototype._transform=function(e,r,t){t(null,e)}});var lE=m((ja,qO)=>{var sc=require("stream");process.env.READABLE_STREAM==="disable"&&sc?(qO.exports=sc,ja=qO.exports=sc.Readable,ja.Readable=sc.Readable,ja.Writable=sc.Writable,ja.Duplex=sc.Duplex,ja.Transform=sc.Transform,ja.PassThrough=sc.PassThrough,ja.Stream=sc):(ja=qO.exports=uz(),ja.Stream=sc||ja,ja.Readable=ja,ja.Writable=az(),ja.Duplex=Z0(),ja.Transform=bz(),ja.PassThrough=L6e())});var N6e=m((OFt,q6e)=>{q6e.exports=lE().PassThrough});var H6e=m((RFt,z6e)=>{var U6e=require("util"),NO=N6e();z6e.exports={Readable:UO,Writable:GO};U6e.inherits(UO,NO);U6e.inherits(GO,NO);function G6e(e,r,t){e[r]=function(){return delete e[r],t.apply(this,arguments),this[r].apply(this,arguments)}}function UO(e,r){if(!(this instanceof UO))return new UO(e,r);NO.call(this,r),G6e(this,"_read",function(){var t=e.call(this,r),n=this.emit.bind(this,"error");t.on("error",n),t.pipe(this)}),this.emit("readable")}function GO(e,r){if(!(this instanceof GO))return new GO(e,r);NO.call(this,r),G6e(this,"_write",function(){var t=e.call(this,r),n=this.emit.bind(this,"error");t.on("error",n),this.pipe(t)}),this.emit("writable")}});var yz=m((FFt,W6e)=>{W6e.exports=function(e,r){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var t=e.length;if(t<=1)return e;var n="";if(t>4&&e[3]==="\\"){var i=e[2];(i==="?"||i===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),n="//")}var a=e.split(/[/\\]+/);return r!==!1&&a[a.length-1]===""&&a.pop(),n+a.join("/")}});var Z6e=m((IFt,Q6e)=>{var V6e=9007199254740991,oGr="[object Arguments]",sGr="[object Function]",uGr="[object GeneratorFunction]",lGr=/^(?:0|[1-9]\d*)$/;function K6e(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function cGr(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var cE=Object.prototype,fE=cE.hasOwnProperty,Y6e=cE.toString,fGr=cE.propertyIsEnumerable,$6e=Math.max;function dGr(e,r){var t=EGr(e)||_Gr(e)?cGr(e.length,String):[],n=t.length,i=!!n;for(var a in e)(r||fE.call(e,a))&&!(i&&(a=="length"||J6e(a,n)))&&t.push(a);return t}function pGr(e,r,t,n){return e===void 0||xz(e,cE[t])&&!fE.call(n,t)?r:e}function hGr(e,r,t){var n=e[r];(!(fE.call(e,r)&&xz(n,t))||t===void 0&&!(r in e))&&(e[r]=t)}function mGr(e){if(!Ez(e))return xGr(e);var r=yGr(e),t=[];for(var n in e)n=="constructor"&&(r||!fE.call(e,n))||t.push(n);return t}function X6e(e,r){return r=$6e(r===void 0?e.length-1:r,0),function(){for(var t=arguments,n=-1,i=$6e(t.length-r,0),a=Array(i);++n<i;)a[n]=t[r+n];n=-1;for(var o=Array(r+1);++n<r;)o[n]=t[n];return o[r]=a,K6e(e,this,o)}}function gGr(e,r,t,n){t||(t={});for(var i=-1,a=r.length;++i<a;){var o=r[i],s=n?n(t[o],e[o],o,t,e):void 0;hGr(t,o,s===void 0?e[o]:s)}return t}function vGr(e){return X6e(function(r,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&bGr(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),r=Object(r);++n<i;){var s=t[n];s&&e(r,s,n,a)}return r})}function J6e(e,r){return r=r??V6e,!!r&&(typeof e=="number"||lGr.test(e))&&e>-1&&e%1==0&&e<r}function bGr(e,r,t){if(!Ez(t))return!1;var n=typeof r;return(n=="number"?_z(t)&&J6e(r,t.length):n=="string"&&r in t)?xz(t[r],e):!1}function yGr(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||cE;return e===t}function xGr(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}function xz(e,r){return e===r||e!==e&&r!==r}function _Gr(e){return wGr(e)&&fE.call(e,"callee")&&(!fGr.call(e,"callee")||Y6e.call(e)==oGr)}var EGr=Array.isArray;function _z(e){return e!=null&&AGr(e.length)&&!SGr(e)}function wGr(e){return TGr(e)&&_z(e)}function SGr(e){var r=Ez(e)?Y6e.call(e):"";return r==sGr||r==uGr}function AGr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=V6e}function Ez(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function TGr(e){return!!e&&typeof e=="object"}var CGr=vGr(function(e,r,t,n){gGr(r,kGr(r),e,n)}),DGr=X6e(function(e){return e.push(void 0,pGr),K6e(CGr,void 0,e)});function kGr(e){return _z(e)?dGr(e,!0):mGr(e)}Q6e.exports=DGr});var aCe=m((PFt,iCe)=>{var OGr=9007199254740991,RGr="[object Arguments]",FGr="[object Function]",IGr="[object GeneratorFunction]",PGr=typeof global=="object"&&global&&global.Object===Object&&global,BGr=typeof self=="object"&&self&&self.Object===Object&&self,jGr=PGr||BGr||Function("return this")();function MGr(e,r){for(var t=-1,n=r.length,i=e.length;++t<n;)e[i+t]=r[t];return e}var wz=Object.prototype,LGr=wz.hasOwnProperty,eCe=wz.toString,rCe=jGr.Symbol,qGr=wz.propertyIsEnumerable,tCe=rCe?rCe.isConcatSpreadable:void 0;function nCe(e,r,t,n,i){var a=-1,o=e.length;for(t||(t=NGr),i||(i=[]);++a<o;){var s=e[a];r>0&&t(s)?r>1?nCe(s,r-1,t,n,i):MGr(i,s):n||(i[i.length]=s)}return i}function NGr(e){return zGr(e)||GGr(e)||!!(tCe&&e&&e[tCe])}function UGr(e){var r=e?e.length:0;return r?nCe(e,1):[]}function GGr(e){return WGr(e)&&LGr.call(e,"callee")&&(!qGr.call(e,"callee")||eCe.call(e)==RGr)}var zGr=Array.isArray;function HGr(e){return e!=null&&KGr(e.length)&&!VGr(e)}function WGr(e){return $Gr(e)&&HGr(e)}function VGr(e){var r=YGr(e)?eCe.call(e):"";return r==FGr||r==IGr}function KGr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=OGr}function YGr(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function $Gr(e){return!!e&&typeof e=="object"}iCe.exports=UGr});var vCe=m((BFt,gCe)=>{var XGr=200,Sz="__lodash_hash_undefined__",JGr=9007199254740991,QGr="[object Arguments]",ZGr="[object Function]",ezr="[object GeneratorFunction]",rzr=/[\\^$.*+?()[\]{}|]/g,tzr=/^\[object .+?Constructor\]$/,nzr=typeof global=="object"&&global&&global.Object===Object&&global,izr=typeof self=="object"&&self&&self.Object===Object&&self,Az=nzr||izr||Function("return this")();function azr(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function ozr(e,r){var t=e?e.length:0;return!!t&&fzr(e,r,0)>-1}function szr(e,r,t){for(var n=-1,i=e?e.length:0;++n<i;)if(t(r,e[n]))return!0;return!1}function uzr(e,r){for(var t=-1,n=e?e.length:0,i=Array(n);++t<n;)i[t]=r(e[t],t,e);return i}function lzr(e,r){for(var t=-1,n=r.length,i=e.length;++t<n;)e[i+t]=r[t];return e}function czr(e,r,t,n){for(var i=e.length,a=t+(n?1:-1);n?a--:++a<i;)if(r(e[a],a,e))return a;return-1}function fzr(e,r,t){if(r!==r)return czr(e,dzr,t);for(var n=t-1,i=e.length;++n<i;)if(e[n]===r)return n;return-1}function dzr(e){return e!==e}function pzr(e){return function(r){return e(r)}}function hzr(e,r){return e.has(r)}function mzr(e,r){return e==null?void 0:e[r]}function gzr(e){var r=!1;if(e!=null&&typeof e.toString!="function")try{r=!!(e+"")}catch{}return r}var vzr=Array.prototype,bzr=Function.prototype,Tz=Object.prototype,Cz=Az["__core-js_shared__"],oCe=function(){var e=/[^.]+$/.exec(Cz&&Cz.keys&&Cz.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),sCe=bzr.toString,zO=Tz.hasOwnProperty,uCe=Tz.toString,yzr=RegExp("^"+sCe.call(zO).replace(rzr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lCe=Az.Symbol,xzr=Tz.propertyIsEnumerable,_zr=vzr.splice,cCe=lCe?lCe.isConcatSpreadable:void 0,fCe=Math.max,Ezr=pCe(Az,"Map"),dE=pCe(Object,"create");function em(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function wzr(){this.__data__=dE?dE(null):{}}function Szr(e){return this.has(e)&&delete this.__data__[e]}function Azr(e){var r=this.__data__;if(dE){var t=r[e];return t===Sz?void 0:t}return zO.call(r,e)?r[e]:void 0}function Tzr(e){var r=this.__data__;return dE?r[e]!==void 0:zO.call(r,e)}function Czr(e,r){var t=this.__data__;return t[e]=dE&&r===void 0?Sz:r,this}em.prototype.clear=wzr;em.prototype.delete=Szr;em.prototype.get=Azr;em.prototype.has=Tzr;em.prototype.set=Czr;function my(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function Dzr(){this.__data__=[]}function kzr(e){var r=this.__data__,t=WO(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():_zr.call(r,t,1),!0}function Ozr(e){var r=this.__data__,t=WO(r,e);return t<0?void 0:r[t][1]}function Rzr(e){return WO(this.__data__,e)>-1}function Fzr(e,r){var t=this.__data__,n=WO(t,e);return n<0?t.push([e,r]):t[n][1]=r,this}my.prototype.clear=Dzr;my.prototype.delete=kzr;my.prototype.get=Ozr;my.prototype.has=Rzr;my.prototype.set=Fzr;function gy(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function Izr(){this.__data__={hash:new em,map:new(Ezr||my),string:new em}}function Pzr(e){return VO(this,e).delete(e)}function Bzr(e){return VO(this,e).get(e)}function jzr(e){return VO(this,e).has(e)}function Mzr(e,r){return VO(this,e).set(e,r),this}gy.prototype.clear=Izr;gy.prototype.delete=Pzr;gy.prototype.get=Bzr;gy.prototype.has=jzr;gy.prototype.set=Mzr;function HO(e){var r=-1,t=e?e.length:0;for(this.__data__=new gy;++r<t;)this.add(e[r])}function Lzr(e){return this.__data__.set(e,Sz),this}function qzr(e){return this.__data__.has(e)}HO.prototype.add=HO.prototype.push=Lzr;HO.prototype.has=qzr;function WO(e,r){for(var t=e.length;t--;)if(Yzr(e[t][0],r))return t;return-1}function Nzr(e,r,t,n){var i=-1,a=ozr,o=!0,s=e.length,u=[],l=r.length;if(!s)return u;t&&(r=uzr(r,pzr(t))),n?(a=szr,o=!1):r.length>=XGr&&(a=hzr,o=!1,r=new HO(r));e:for(;++i<s;){var c=e[i],f=t?t(c):c;if(c=n||c!==0?c:0,o&&f===f){for(var d=l;d--;)if(r[d]===f)continue e;u.push(c)}else a(r,f,n)||u.push(c)}return u}function dCe(e,r,t,n,i){var a=-1,o=e.length;for(t||(t=zzr),i||(i=[]);++a<o;){var s=e[a];r>0&&t(s)?r>1?dCe(s,r-1,t,n,i):lzr(i,s):n||(i[i.length]=s)}return i}function Uzr(e){if(!mCe(e)||Wzr(e))return!1;var r=hCe(e)||gzr(e)?yzr:tzr;return r.test(Vzr(e))}function Gzr(e,r){return r=fCe(r===void 0?e.length-1:r,0),function(){for(var t=arguments,n=-1,i=fCe(t.length-r,0),a=Array(i);++n<i;)a[n]=t[r+n];n=-1;for(var o=Array(r+1);++n<r;)o[n]=t[n];return o[r]=a,azr(e,this,o)}}function VO(e,r){var t=e.__data__;return Hzr(r)?t[typeof r=="string"?"string":"hash"]:t.map}function pCe(e,r){var t=mzr(e,r);return Uzr(t)?t:void 0}function zzr(e){return Xzr(e)||$zr(e)||!!(cCe&&e&&e[cCe])}function Hzr(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function Wzr(e){return!!oCe&&oCe in e}function Vzr(e){if(e!=null){try{return sCe.call(e)}catch{}try{return e+""}catch{}}return""}var Kzr=Gzr(function(e,r){return Dz(e)?Nzr(e,dCe(r,1,Dz,!0)):[]});function Yzr(e,r){return e===r||e!==e&&r!==r}function $zr(e){return Dz(e)&&zO.call(e,"callee")&&(!xzr.call(e,"callee")||uCe.call(e)==QGr)}var Xzr=Array.isArray;function Jzr(e){return e!=null&&Qzr(e.length)&&!hCe(e)}function Dz(e){return Zzr(e)&&Jzr(e)}function hCe(e){var r=mCe(e)?uCe.call(e):"";return r==ZGr||r==ezr}function Qzr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=JGr}function mCe(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function Zzr(e){return!!e&&typeof e=="object"}gCe.exports=Kzr});var OCe=m((jFt,kCe)=>{var eHr=200,kz="__lodash_hash_undefined__",rHr=1/0,tHr=9007199254740991,nHr="[object Arguments]",iHr="[object Function]",aHr="[object GeneratorFunction]",oHr=/[\\^$.*+?()[\]{}|]/g,sHr=/^\[object .+?Constructor\]$/,uHr=typeof global=="object"&&global&&global.Object===Object&&global,lHr=typeof self=="object"&&self&&self.Object===Object&&self,KO=uHr||lHr||Function("return this")();function cHr(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function fHr(e,r){var t=e?e.length:0;return!!t&&mHr(e,r,0)>-1}function dHr(e,r,t){for(var n=-1,i=e?e.length:0;++n<i;)if(t(r,e[n]))return!0;return!1}function pHr(e,r){for(var t=-1,n=r.length,i=e.length;++t<n;)e[i+t]=r[t];return e}function hHr(e,r,t,n){for(var i=e.length,a=t+(n?1:-1);n?a--:++a<i;)if(r(e[a],a,e))return a;return-1}function mHr(e,r,t){if(r!==r)return hHr(e,gHr,t);for(var n=t-1,i=e.length;++n<i;)if(e[n]===r)return n;return-1}function gHr(e){return e!==e}function vHr(e,r){return e.has(r)}function bHr(e,r){return e==null?void 0:e[r]}function yHr(e){var r=!1;if(e!=null&&typeof e.toString!="function")try{r=!!(e+"")}catch{}return r}function bCe(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var xHr=Array.prototype,_Hr=Function.prototype,Oz=Object.prototype,Rz=KO["__core-js_shared__"],yCe=function(){var e=/[^.]+$/.exec(Rz&&Rz.keys&&Rz.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),xCe=_Hr.toString,YO=Oz.hasOwnProperty,_Ce=Oz.toString,EHr=RegExp("^"+xCe.call(YO).replace(oHr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ECe=KO.Symbol,wHr=Oz.propertyIsEnumerable,SHr=xHr.splice,wCe=ECe?ECe.isConcatSpreadable:void 0,SCe=Math.max,AHr=Iz(KO,"Map"),Fz=Iz(KO,"Set"),pE=Iz(Object,"create");function rm(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function THr(){this.__data__=pE?pE(null):{}}function CHr(e){return this.has(e)&&delete this.__data__[e]}function DHr(e){var r=this.__data__;if(pE){var t=r[e];return t===kz?void 0:t}return YO.call(r,e)?r[e]:void 0}function kHr(e){var r=this.__data__;return pE?r[e]!==void 0:YO.call(r,e)}function OHr(e,r){var t=this.__data__;return t[e]=pE&&r===void 0?kz:r,this}rm.prototype.clear=THr;rm.prototype.delete=CHr;rm.prototype.get=DHr;rm.prototype.has=kHr;rm.prototype.set=OHr;function vy(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function RHr(){this.__data__=[]}function FHr(e){var r=this.__data__,t=XO(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():SHr.call(r,t,1),!0}function IHr(e){var r=this.__data__,t=XO(r,e);return t<0?void 0:r[t][1]}function PHr(e){return XO(this.__data__,e)>-1}function BHr(e,r){var t=this.__data__,n=XO(t,e);return n<0?t.push([e,r]):t[n][1]=r,this}vy.prototype.clear=RHr;vy.prototype.delete=FHr;vy.prototype.get=IHr;vy.prototype.has=PHr;vy.prototype.set=BHr;function by(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function jHr(){this.__data__={hash:new rm,map:new(AHr||vy),string:new rm}}function MHr(e){return JO(this,e).delete(e)}function LHr(e){return JO(this,e).get(e)}function qHr(e){return JO(this,e).has(e)}function NHr(e,r){return JO(this,e).set(e,r),this}by.prototype.clear=jHr;by.prototype.delete=MHr;by.prototype.get=LHr;by.prototype.has=qHr;by.prototype.set=NHr;function $O(e){var r=-1,t=e?e.length:0;for(this.__data__=new by;++r<t;)this.add(e[r])}function UHr(e){return this.__data__.set(e,kz),this}function GHr(e){return this.__data__.has(e)}$O.prototype.add=$O.prototype.push=UHr;$O.prototype.has=GHr;function XO(e,r){for(var t=e.length;t--;)if(QHr(e[t][0],r))return t;return-1}function ACe(e,r,t,n,i){var a=-1,o=e.length;for(t||(t=KHr),i||(i=[]);++a<o;){var s=e[a];r>0&&t(s)?r>1?ACe(s,r-1,t,n,i):pHr(i,s):n||(i[i.length]=s)}return i}function zHr(e){if(!DCe(e)||$Hr(e))return!1;var r=CCe(e)||yHr(e)?EHr:sHr;return r.test(XHr(e))}function HHr(e,r){return r=SCe(r===void 0?e.length-1:r,0),function(){for(var t=arguments,n=-1,i=SCe(t.length-r,0),a=Array(i);++n<i;)a[n]=t[r+n];n=-1;for(var o=Array(r+1);++n<r;)o[n]=t[n];return o[r]=a,cHr(e,this,o)}}function WHr(e,r,t){var n=-1,i=fHr,a=e.length,o=!0,s=[],u=s;if(t)o=!1,i=dHr;else if(a>=eHr){var l=r?null:VHr(e);if(l)return bCe(l);o=!1,i=vHr,u=new $O}else u=r?[]:s;e:for(;++n<a;){var c=e[n],f=r?r(c):c;if(c=t||c!==0?c:0,o&&f===f){for(var d=u.length;d--;)if(u[d]===f)continue e;r&&u.push(f),s.push(c)}else i(u,f,t)||(u!==s&&u.push(f),s.push(c))}return s}var VHr=Fz&&1/bCe(new Fz([,-0]))[1]==rHr?function(e){return new Fz(e)}:iWr;function JO(e,r){var t=e.__data__;return YHr(r)?t[typeof r=="string"?"string":"hash"]:t.map}function Iz(e,r){var t=bHr(e,r);return zHr(t)?t:void 0}function KHr(e){return eWr(e)||ZHr(e)||!!(wCe&&e&&e[wCe])}function YHr(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function $Hr(e){return!!yCe&&yCe in e}function XHr(e){if(e!=null){try{return xCe.call(e)}catch{}try{return e+""}catch{}}return""}var JHr=HHr(function(e){return WHr(ACe(e,1,TCe,!0))});function QHr(e,r){return e===r||e!==e&&r!==r}function ZHr(e){return TCe(e)&&YO.call(e,"callee")&&(!wHr.call(e,"callee")||_Ce.call(e)==nHr)}var eWr=Array.isArray;function rWr(e){return e!=null&&tWr(e.length)&&!CCe(e)}function TCe(e){return nWr(e)&&rWr(e)}function CCe(e){var r=DCe(e)?_Ce.call(e):"";return r==iHr||r==aHr}function tWr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tHr}function DCe(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function nWr(e){return!!e&&typeof e=="object"}function iWr(){}kCe.exports=JHr});var PCe=m((MFt,ICe)=>{var aWr="[object Object]";function oWr(e){var r=!1;if(e!=null&&typeof e.toString!="function")try{r=!!(e+"")}catch{}return r}function sWr(e,r){return function(t){return e(r(t))}}var uWr=Function.prototype,RCe=Object.prototype,FCe=uWr.toString,lWr=RCe.hasOwnProperty,cWr=FCe.call(Object),fWr=RCe.toString,dWr=sWr(Object.getPrototypeOf,Object);function pWr(e){return!!e&&typeof e=="object"}function hWr(e){if(!pWr(e)||fWr.call(e)!=aWr||oWr(e))return!1;var r=dWr(e);if(r===null)return!0;var t=lWr.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&FCe.call(t)==cWr}ICe.exports=hWr});var BCe=m(Pz=>{var tm=require("path"),jp=process.platform==="win32",Mp=require("fs"),mWr=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function gWr(){var e;if(mWr){var r=new Error;e=t}else e=n;return e;function t(i){i&&(r.message=i.message,i=r,n(i))}function n(i){if(i){if(process.throwDeprecation)throw i;if(!process.noDeprecation){var a="fs: missing callback "+(i.stack||i.message);process.traceDeprecation?console.trace(a):console.error(a)}}}}function vWr(e){return typeof e=="function"?e:gWr()}var LFt=tm.normalize;jp?Of=/(.*?)(?:[\/\\]+|$)/g:Of=/(.*?)(?:[\/]+|$)/g;var Of;jp?hE=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:hE=/^[\/]*/;var hE;Pz.realpathSync=function(r,t){if(r=tm.resolve(r),t&&Object.prototype.hasOwnProperty.call(t,r))return t[r];var n=r,i={},a={},o,s,u,l;c();function c(){var v=hE.exec(r);o=v[0].length,s=v[0],u=v[0],l="",jp&&!a[u]&&(Mp.lstatSync(u),a[u]=!0)}for(;o<r.length;){Of.lastIndex=o;var f=Of.exec(r);if(l=s,s+=f[0],u=l+f[1],o=Of.lastIndex,!(a[u]||t&&t[u]===u)){var d;if(t&&Object.prototype.hasOwnProperty.call(t,u))d=t[u];else{var p=Mp.lstatSync(u);if(!p.isSymbolicLink()){a[u]=!0,t&&(t[u]=u);continue}var h=null;if(!jp){var b=p.dev.toString(32)+":"+p.ino.toString(32);i.hasOwnProperty(b)&&(h=i[b])}h===null&&(Mp.statSync(u),h=Mp.readlinkSync(u)),d=tm.resolve(l,h),t&&(t[u]=d),jp||(i[b]=h)}r=tm.resolve(d,r.slice(o)),c()}}return t&&(t[n]=r),r};Pz.realpath=function(r,t,n){if(typeof n!="function"&&(n=vWr(t),t=null),r=tm.resolve(r),t&&Object.prototype.hasOwnProperty.call(t,r))return process.nextTick(n.bind(null,null,t[r]));var i=r,a={},o={},s,u,l,c;f();function f(){var v=hE.exec(r);s=v[0].length,u=v[0],l=v[0],c="",jp&&!o[l]?Mp.lstat(l,function(y){if(y)return n(y);o[l]=!0,d()}):process.nextTick(d)}function d(){if(s>=r.length)return t&&(t[i]=r),n(null,r);Of.lastIndex=s;var v=Of.exec(r);return c=u,u+=v[0],l=c+v[1],s=Of.lastIndex,o[l]||t&&t[l]===l?process.nextTick(d):t&&Object.prototype.hasOwnProperty.call(t,l)?b(t[l]):Mp.lstat(l,p)}function p(v,y){if(v)return n(v);if(!y.isSymbolicLink())return o[l]=!0,t&&(t[l]=l),process.nextTick(d);if(!jp){var w=y.dev.toString(32)+":"+y.ino.toString(32);if(a.hasOwnProperty(w))return h(null,a[w],l)}Mp.stat(l,function(A){if(A)return n(A);Mp.readlink(l,function(C,D){jp||(a[w]=D),h(C,D)})})}function h(v,y,w){if(v)return n(v);var A=tm.resolve(c,y);t&&(t[w]=A),b(A)}function b(v){r=tm.resolve(v,r.slice(s)),f()}}});var Lz=m((NFt,qCe)=>{qCe.exports=Lp;Lp.realpath=Lp;Lp.sync=Mz;Lp.realpathSync=Mz;Lp.monkeypatch=yWr;Lp.unmonkeypatch=xWr;var yy=require("fs"),Bz=yy.realpath,jz=yy.realpathSync,bWr=process.version,jCe=/^v[0-5]\./.test(bWr),MCe=BCe();function LCe(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function Lp(e,r,t){if(jCe)return Bz(e,r,t);typeof r=="function"&&(t=r,r=null),Bz(e,r,function(n,i){LCe(n)?MCe.realpath(e,r,t):t(n,i)})}function Mz(e,r){if(jCe)return jz(e,r);try{return jz(e,r)}catch(t){if(LCe(t))return MCe.realpathSync(e,r);throw t}}function yWr(){yy.realpath=Lp,yy.realpathSync=Mz}function xWr(){yy.realpath=Bz,yy.realpathSync=jz}});var UCe=m((UFt,NCe)=>{NCe.exports=function(e,r){for(var t=[],n=0;n<e.length;n++){var i=r(e[n],n);_Wr(i)?t.push.apply(t,i):t.push(i)}return t};var _Wr=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}});var $Ce=m((GFt,YCe)=>{var EWr=UCe(),GCe=MG();YCe.exports=AWr;var zCe="\0SLASH"+Math.random()+"\0",HCe="\0OPEN"+Math.random()+"\0",qz="\0CLOSE"+Math.random()+"\0",WCe="\0COMMA"+Math.random()+"\0",VCe="\0PERIOD"+Math.random()+"\0";function Nz(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function wWr(e){return e.split("\\\\").join(zCe).split("\\{").join(HCe).split("\\}").join(qz).split("\\,").join(WCe).split("\\.").join(VCe)}function SWr(e){return e.split(zCe).join("\\").split(HCe).join("{").split(qz).join("}").split(WCe).join(",").split(VCe).join(".")}function KCe(e){if(!e)return[""];var r=[],t=GCe("{","}",e);if(!t)return e.split(",");var n=t.pre,i=t.body,a=t.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var s=KCe(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),r.push.apply(r,o),r}function AWr(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),xy(wWr(e),!0).map(SWr)):[]}function TWr(e){return"{"+e+"}"}function CWr(e){return/^-?0\d/.test(e)}function DWr(e,r){return e<=r}function kWr(e,r){return e>=r}function xy(e,r){var t=[],n=GCe("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),o=i||a,s=n.body.indexOf(",")>=0;if(!o&&!s)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+qz+n.post,xy(e)):[e];var u;if(o)u=n.body.split(/\.\./);else if(u=KCe(n.body),u.length===1&&(u=xy(u[0],!1).map(TWr),u.length===1)){var c=n.post.length?xy(n.post,!1):[""];return c.map(function(N){return n.pre+u[0]+N})}var l=n.pre,c=n.post.length?xy(n.post,!1):[""],f;if(o){var d=Nz(u[0]),p=Nz(u[1]),h=Math.max(u[0].length,u[1].length),b=u.length==3?Math.abs(Nz(u[2])):1,v=DWr,y=p<d;y&&(b*=-1,v=kWr);var w=u.some(CWr);f=[];for(var A=d;v(A,p);A+=b){var C;if(a)C=String.fromCharCode(A),C==="\\"&&(C="");else if(C=String(A),w){var D=h-C.length;if(D>0){var P=new Array(D+1).join("0");A<0?C="-"+P+C.slice(1):C=P+C}}f.push(C)}}else f=EWr(u,function(V){return xy(V,!1)});for(var k=0;k<f.length;k++)for(var L=0;L<c.length;L++){var I=l+f[k]+c[L];(!r||o||I)&&t.push(I)}return t}});var eR=m((zFt,e8e)=>{e8e.exports=as;as.Minimatch=Ma;var mE=function(){try{return require("path")}catch{}}()||{sep:"/"};as.sep=mE.sep;var Uz=as.GLOBSTAR=Ma.GLOBSTAR={},OWr=$Ce(),XCe={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Gz="[^/]",zz=Gz+"*?",RWr="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",FWr="(?:(?!(?:\\/|^)\\.).)*?",JCe=IWr("().*{}+?[]^$\\!");function IWr(e){return e.split("").reduce(function(r,t){return r[t]=!0,r},{})}var QCe=/\/+/;as.filter=PWr;function PWr(e,r){return r=r||{},function(t,n,i){return as(t,e,r)}}function qp(e,r){r=r||{};var t={};return Object.keys(e).forEach(function(n){t[n]=e[n]}),Object.keys(r).forEach(function(n){t[n]=r[n]}),t}as.defaults=function(e){if(!e||typeof e!="object"||!Object.keys(e).length)return as;var r=as,t=function(i,a,o){return r(i,a,qp(e,o))};return t.Minimatch=function(i,a){return new r.Minimatch(i,qp(e,a))},t.Minimatch.defaults=function(i){return r.defaults(qp(e,i)).Minimatch},t.filter=function(i,a){return r.filter(i,qp(e,a))},t.defaults=function(i){return r.defaults(qp(e,i))},t.makeRe=function(i,a){return r.makeRe(i,qp(e,a))},t.braceExpand=function(i,a){return r.braceExpand(i,qp(e,a))},t.match=function(n,i,a){return r.match(n,i,qp(e,a))},t};Ma.defaults=function(e){return as.defaults(e).Minimatch};function as(e,r,t){return QO(r),t||(t={}),!t.nocomment&&r.charAt(0)==="#"?!1:new Ma(r,t).match(e)}function Ma(e,r){if(!(this instanceof Ma))return new Ma(e,r);QO(e),r||(r={}),e=e.trim(),!r.allowWindowsEscape&&mE.sep!=="/"&&(e=e.split(mE.sep).join("/")),this.options=r,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}Ma.prototype.debug=function(){};Ma.prototype.make=BWr;function BWr(){var e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();r.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,t),t=this.globParts=t.map(function(n){return n.split(QCe)}),this.debug(this.pattern,t),t=t.map(function(n,i,a){return n.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(n){return n.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}Ma.prototype.parseNegate=jWr;function jWr(){var e=this.pattern,r=!1,t=this.options,n=0;if(!t.nonegate){for(var i=0,a=e.length;i<a&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.substr(n)),this.negate=r}}as.braceExpand=function(e,r){return ZCe(e,r)};Ma.prototype.braceExpand=ZCe;function ZCe(e,r){return r||(this instanceof Ma?r=this.options:r={}),e=typeof e=="undefined"?this.pattern:e,QO(e),r.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:OWr(e)}var MWr=1024*64,QO=function(e){if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>MWr)throw new TypeError("pattern is too long")};Ma.prototype.parse=LWr;var ZO={};function LWr(e,r){QO(e);var t=this.options;if(e==="**")if(t.noglobstar)e="*";else return Uz;if(e==="")return"";var n="",i=!!t.nocase,a=!1,o=[],s=[],u,l=!1,c=-1,f=-1,d=e.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",p=this;function h(){if(u){switch(u){case"*":n+=zz,i=!0;break;case"?":n+=Gz,i=!0;break;default:n+="\\"+u;break}p.debug("clearStateChar %j %j",u,n),u=!1}}for(var b=0,v=e.length,y;b<v&&(y=e.charAt(b));b++){if(this.debug("%s %s %s %j",e,b,n,y),a&&JCe[y]){n+="\\"+y,a=!1;continue}switch(y){case"/":return!1;case"\\":h(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,b,n,y),l){this.debug(" in class"),y==="!"&&b===f+1&&(y="^"),n+=y;continue}p.debug("call clearStateChar %j",u),h(),u=y,t.noext&&h();continue;case"(":if(l){n+="(";continue}if(!u){n+="\\(";continue}o.push({type:u,start:b-1,reStart:n.length,open:XCe[u].open,close:XCe[u].close}),n+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,n),u=!1;continue;case")":if(l||!o.length){n+="\\)";continue}h(),i=!0;var w=o.pop();n+=w.close,w.type==="!"&&s.push(w),w.reEnd=n.length;continue;case"|":if(l||!o.length||a){n+="\\|",a=!1;continue}h(),n+="|";continue;case"[":if(h(),l){n+="\\"+y;continue}l=!0,f=b,c=n.length,n+=y;continue;case"]":if(b===f+1||!l){n+="\\"+y,a=!1;continue}var A=e.substring(f+1,b);try{RegExp("["+A+"]")}catch{var C=this.parse(A,ZO);n=n.substr(0,c)+"\\["+C[0]+"\\]",i=i||C[1],l=!1;continue}i=!0,l=!1,n+=y;continue;default:h(),a?a=!1:JCe[y]&&!(y==="^"&&l)&&(n+="\\"),n+=y}}for(l&&(A=e.substr(f+1),C=this.parse(A,ZO),n=n.substr(0,c)+"\\["+C[0],i=i||C[1]),w=o.pop();w;w=o.pop()){var D=n.slice(w.reStart+w.open.length);this.debug("setting tail",n,w),D=D.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(me,Me,Ie){return Ie||(Ie="\\"),Me+Me+Ie+"|"}),this.debug(`tail=%j
|
|
170
|
-
%s`,D,D,w,n);var P=w.type==="*"?
|
|
169
|
+
`+G);let[,te]=$;return te.replace(/\s/g,"").split(Xe).map(de=>de.replace(kr,"").trim())}function pe(Y,G){var $={};return Object.keys(Y).forEach(te=>{var de=Y[te],ge,xe=p(de),Se=!xe&&de.length===1||xe&&de.length===0;if(Array.isArray(de))ge=[...de],de=ge.pop(),$[te]=ge.concat(ge.length>0?Be:de);else if(Se)$[te]=de;else{if(ge=qt(de),de.length===0&&!xe&&ge.length===0)throw new Error("autoInject task functions require explicit parameters.");xe||ge.pop(),$[te]=ge.concat(Be)}function Be(wr,gt){var At=ge.map(vt=>wr[vt]);At.push(gt),v(de)(...At)}}),ke($,G)}class rr{constructor(){this.head=this.tail=null,this.length=0}removeLink(G){return G.prev?G.prev.next=G.next:this.head=G.next,G.next?G.next.prev=G.prev:this.tail=G.prev,G.prev=G.next=null,this.length-=1,G}empty(){for(;this.head;)this.shift();return this}insertAfter(G,$){$.prev=G,$.next=G.next,G.next?G.next.prev=$:this.tail=$,G.next=$,this.length+=1}insertBefore(G,$){$.prev=G.prev,$.next=G,G.prev?G.prev.next=$:this.head=$,G.prev=$,this.length+=1}unshift(G){this.head?this.insertBefore(this.head,G):fr(this,G)}push(G){this.tail?this.insertAfter(this.tail,G):fr(this,G)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var G=this.head;G;)yield G.data,G=G.next}remove(G){for(var $=this.head;$;){var{next:te}=$;G($)&&this.removeLink($),$=te}return this}}function fr(Y,G){Y.length=1,Y.head=Y.tail=G}function or(Y,G,$){if(G==null)G=1;else if(G===0)throw new RangeError("Concurrency must not be zero");var te=v(Y),de=0,ge=[];let xe={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function Se(Nr,Sr){xe[Nr].push(Sr)}function Be(Nr,Sr){let zr=(...mt)=>{wr(Nr,zr),Sr(...mt)};xe[Nr].push(zr)}function wr(Nr,Sr){if(!Nr)return Object.keys(xe).forEach(zr=>xe[zr]=[]);if(!Sr)return xe[Nr]=[];xe[Nr]=xe[Nr].filter(zr=>zr!==Sr)}function gt(Nr,...Sr){xe[Nr].forEach(zr=>zr(...Sr))}var At=!1;function vt(Nr,Sr,zr,mt){if(mt!=null&&typeof mt!="function")throw new Error("task callback must be a function");Mt.started=!0;var yn,vi;function no(Sc,...Ac){if(Sc)return zr?vi(Sc):yn();if(Ac.length<=1)return yn(Ac[0]);yn(Ac)}var Jf=Mt._createTaskItem(Nr,zr?no:mt||no);if(Sr?Mt._tasks.unshift(Jf):Mt._tasks.push(Jf),At||(At=!0,l(()=>{At=!1,Mt.process()})),zr||!mt)return new Promise((Sc,Ac)=>{yn=Sc,vi=Ac})}function Oi(Nr){return function(Sr,...zr){de-=1;for(var mt=0,yn=Nr.length;mt<yn;mt++){var vi=Nr[mt],no=ge.indexOf(vi);no===0?ge.shift():no>0&&ge.splice(no,1),vi.callback(Sr,...zr),Sr!=null&>("error",Sr,vi.data)}de<=Mt.concurrency-Mt.buffer&>("unsaturated"),Mt.idle()&>("drain"),Mt.process()}}function ds(Nr){return Nr.length===0&&Mt.idle()?(l(()=>gt("drain")),!0):!1}let ps=Nr=>Sr=>{if(!Sr)return new Promise((zr,mt)=>{Be(Nr,(yn,vi)=>{if(yn)return mt(yn);zr(vi)})});wr(Nr),Se(Nr,Sr)};var Xf=!1,Mt={_tasks:new rr,_createTaskItem(Nr,Sr){return{data:Nr,callback:Sr}},*[Symbol.iterator](){yield*Mt._tasks[Symbol.iterator]()},concurrency:G,payload:$,buffer:G/4,started:!1,paused:!1,push(Nr,Sr){return Array.isArray(Nr)?ds(Nr)?void 0:Nr.map(zr=>vt(zr,!1,!1,Sr)):vt(Nr,!1,!1,Sr)},pushAsync(Nr,Sr){return Array.isArray(Nr)?ds(Nr)?void 0:Nr.map(zr=>vt(zr,!1,!0,Sr)):vt(Nr,!1,!0,Sr)},kill(){wr(),Mt._tasks.empty()},unshift(Nr,Sr){return Array.isArray(Nr)?ds(Nr)?void 0:Nr.map(zr=>vt(zr,!0,!1,Sr)):vt(Nr,!0,!1,Sr)},unshiftAsync(Nr,Sr){return Array.isArray(Nr)?ds(Nr)?void 0:Nr.map(zr=>vt(zr,!0,!0,Sr)):vt(Nr,!0,!0,Sr)},remove(Nr){Mt._tasks.remove(Nr)},process(){if(!Xf){for(Xf=!0;!Mt.paused&&de<Mt.concurrency&&Mt._tasks.length;){var Nr=[],Sr=[],zr=Mt._tasks.length;Mt.payload&&(zr=Math.min(zr,Mt.payload));for(var mt=0;mt<zr;mt++){var yn=Mt._tasks.shift();Nr.push(yn),ge.push(yn),Sr.push(yn.data)}de+=1,Mt._tasks.length===0&>("empty"),de===Mt.concurrency&>("saturated");var vi=W(Oi(Nr));te(Sr,vi)}Xf=!1}},length(){return Mt._tasks.length},running(){return de},workersList(){return ge},idle(){return Mt._tasks.length+de===0},pause(){Mt.paused=!0},resume(){Mt.paused!==!1&&(Mt.paused=!1,l(Mt.process))}};return Object.defineProperties(Mt,{saturated:{writable:!1,value:ps("saturated")},unsaturated:{writable:!1,value:ps("unsaturated")},empty:{writable:!1,value:ps("empty")},drain:{writable:!1,value:ps("drain")},error:{writable:!1,value:ps("error")}}),Mt}function dr(Y,G){return or(Y,1,G)}function vr(Y,G,$){return or(Y,G,$)}function Cr(Y,G,$,te){te=P(te);var de=v($);return De(Y,(ge,xe,Se)=>{de(G,ge,(Be,wr)=>{G=wr,Se(Be)})},ge=>te(ge,G))}var Ir=y(Cr,4);function dt(...Y){var G=Y.map(v);return function(...$){var te=this,de=$[$.length-1];return typeof de=="function"?$.pop():de=Ke(),Ir(G,$,(ge,xe,Se)=>{xe.apply(te,ge.concat((Be,...wr)=>{Se(Be,wr)}))},(ge,xe)=>de(ge,...xe)),de[gr]}}function Hr(...Y){return dt(...Y.reverse())}function Pe(Y,G,$,te){return A(H(G),Y,$,te)}var ur=y(Pe,4);function Lr(Y,G,$,te){var de=v($);return ur(Y,G,(ge,xe)=>{de(ge,(Se,...Be)=>Se?xe(Se):xe(Se,Be))},(ge,xe)=>{for(var Se=[],Be=0;Be<xe.length;Be++)xe[Be]&&(Se=Se.concat(...xe[Be]));return te(ge,Se)})}var rt=y(Lr,4);function jr(Y,G,$){return rt(Y,1/0,G,$)}var Gr=y(jr,3);function Xr(Y,G,$){return rt(Y,1,G,$)}var Er=y(Xr,3);function Fr(...Y){return function(...G){var $=G.pop();return $(null,...Y)}}function ot(Y,G){return($,te,de,ge)=>{var xe=!1,Se;let Be=v(de);$(te,(wr,gt,At)=>{Be(wr,(vt,Oi)=>{if(vt||vt===!1)return At(vt);if(Y(Oi)&&!Se)return xe=!0,Se=G(!0,wr),At(null,D);At()})},wr=>{if(wr)return ge(wr);ge(null,xe?Se:G(!1))})}}function pt(Y,G,$){return ot(te=>te,(te,de)=>de)(me,Y,G,$)}var En=y(pt,3);function Zn(Y,G,$,te){return ot(de=>de,(de,ge)=>ge)(H(G),Y,$,te)}var ei=y(Zn,4);function ia(Y,G,$){return ot(te=>te,(te,de)=>de)(H(1),Y,G,$)}var Kt=y(ia,3);function fn(Y){return(G,...$)=>v(G)(...$,(te,...de)=>{typeof console=="object"&&(te?console.error&&console.error(te):console[Y]&&de.forEach(ge=>console[Y](ge)))})}var wn=fn("dir");function ri(Y,G,$){$=W($);var te=v(Y),de=v(G),ge;function xe(Be,...wr){if(Be)return $(Be);Be!==!1&&(ge=wr,de(...wr,Se))}function Se(Be,wr){if(Be)return $(Be);if(Be!==!1){if(!wr)return $(null,...ge);te(xe)}}return Se(null,!0)}var dn=y(ri,3);function Di(Y,G,$){let te=v(G);return dn(Y,(...de)=>{let ge=de.pop();te(...de,(xe,Se)=>ge(xe,!Se))},$)}function ti(Y){return(G,$,te)=>Y(G,te)}function pn(Y,G,$){return me(Y,ti(v(G)),$)}var aa=y(pn,3);function O(Y,G,$,te){return H(G)(Y,ti(v($)),te)}var T=y(O,4);function S(Y,G,$){return T(Y,1,G,$)}var x=y(S,3);function R(Y){return p(Y)?Y:function(...G){var $=G.pop(),te=!0;G.push((...de)=>{te?l(()=>$(...de)):$(...de)}),Y.apply(this,G),te=!1}}function K(Y,G,$){return ot(te=>!te,te=>!te)(me,Y,G,$)}var Z=y(K,3);function le(Y,G,$,te){return ot(de=>!de,de=>!de)(H(G),Y,$,te)}var ve=y(le,4);function Oe(Y,G,$){return ot(te=>!te,te=>!te)(De,Y,G,$)}var Re=y(Oe,3);function ar(Y,G,$,te){var de=new Array(G.length);Y(G,(ge,xe,Se)=>{$(ge,(Be,wr)=>{de[xe]=!!wr,Se(Be)})},ge=>{if(ge)return te(ge);for(var xe=[],Se=0;Se<G.length;Se++)de[Se]&&xe.push(G[Se]);te(null,xe)})}function Le(Y,G,$,te){var de=[];Y(G,(ge,xe,Se)=>{$(ge,(Be,wr)=>{if(Be)return Se(Be);wr&&de.push({index:xe,value:ge}),Se(Be)})},ge=>{if(ge)return te(ge);te(null,de.sort((xe,Se)=>xe.index-Se.index).map(xe=>xe.value))})}function nr(Y,G,$,te){var de=C(G)?ar:Le;return de(Y,G,v($),te)}function tr(Y,G,$){return nr(me,Y,G,$)}var Ge=y(tr,3);function Qe(Y,G,$,te){return nr(H(G),Y,$,te)}var Ye=y(Qe,4);function xr(Y,G,$){return nr(De,Y,G,$)}var pr=y(xr,3);function Je(Y,G){var $=W(G),te=v(R(Y));function de(ge){if(ge)return $(ge);ge!==!1&&te(de)}return de()}var He=y(Je,2);function Ve(Y,G,$,te){var de=v($);return ur(Y,G,(ge,xe)=>{de(ge,(Se,Be)=>Se?xe(Se):xe(Se,{key:Be,val:ge}))},(ge,xe)=>{for(var Se={},{hasOwnProperty:Be}=Object.prototype,wr=0;wr<xe.length;wr++)if(xe[wr]){var{key:gt}=xe[wr],{val:At}=xe[wr];Be.call(Se,gt)?Se[gt].push(At):Se[gt]=[At]}return te(ge,Se)})}var Ze=y(Ve,4);function ir(Y,G,$){return Ze(Y,1/0,G,$)}function Fe(Y,G,$){return Ze(Y,1,G,$)}var fe=fn("log");function he(Y,G,$,te){te=P(te);var de={},ge=v($);return H(G)(Y,(xe,Se,Be)=>{ge(xe,Se,(wr,gt)=>{if(wr)return Be(wr);de[Se]=gt,Be(wr)})},xe=>te(xe,de))}var Ce=y(he,4);function Ee(Y,G,$){return Ce(Y,1/0,G,$)}function be(Y,G,$){return Ce(Y,1,G,$)}function _e(Y,G=$=>$){var $=Object.create(null),te=Object.create(null),de=v(Y),ge=t((xe,Se)=>{var Be=G(...xe);Be in $?l(()=>Se(null,...$[Be])):Be in te?te[Be].push(Se):(te[Be]=[Se],de(...xe,(wr,...gt)=>{wr||($[Be]=gt);var At=te[Be];delete te[Be];for(var vt=0,Oi=At.length;vt<Oi;vt++)At[vt](wr,...gt)}))});return ge.memo=$,ge.unmemoized=Y,ge}var sr;a?sr=process.nextTick:i?sr=setImmediate:sr=o;var Pr=s(sr),yr=y((Y,G,$)=>{var te=C(G)?[]:{};Y(G,(de,ge,xe)=>{v(de)((Se,...Be)=>{Be.length<2&&([Be]=Be),te[ge]=Be,xe(Se)})},de=>$(de,te))},3);function Tr(Y,G){return yr(me,Y,G)}function Q(Y,G,$){return yr(H(G),Y,$)}function Wr(Y,G){var $=v(Y);return or((te,de)=>{$(te[0],de)},G,1)}class st{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(G){let $;for(;G>0&&tt(this.heap[G],this.heap[$=qr(G)]);){let te=this.heap[G];this.heap[G]=this.heap[$],this.heap[$]=te,G=$}}percDown(G){let $;for(;($=Zr(G))<this.heap.length&&($+1<this.heap.length&&tt(this.heap[$+1],this.heap[$])&&($=$+1),!tt(this.heap[G],this.heap[$]));){let te=this.heap[G];this.heap[G]=this.heap[$],this.heap[$]=te,G=$}}push(G){G.pushCount=++this.pushCount,this.heap.push(G),this.percUp(this.heap.length-1)}unshift(G){return this.heap.push(G)}shift(){let[G]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),G}toArray(){return[...this]}*[Symbol.iterator](){for(let G=0;G<this.heap.length;G++)yield this.heap[G].data}remove(G){let $=0;for(let te=0;te<this.heap.length;te++)G(this.heap[te])||(this.heap[$]=this.heap[te],$++);this.heap.splice($);for(let te=qr(this.heap.length-1);te>=0;te--)this.percDown(te);return this}}function Zr(Y){return(Y<<1)+1}function qr(Y){return(Y+1>>1)-1}function tt(Y,G){return Y.priority!==G.priority?Y.priority<G.priority:Y.pushCount<G.pushCount}function et(Y,G){var $=Wr(Y,G),{push:te,pushAsync:de}=$;$._tasks=new st,$._createTaskItem=({data:xe,priority:Se},Be)=>({data:xe,priority:Se,callback:Be});function ge(xe,Se){return Array.isArray(xe)?xe.map(Be=>({data:Be,priority:Se})):{data:xe,priority:Se}}return $.push=function(xe,Se=0,Be){return te(ge(xe,Se),Be)},$.pushAsync=function(xe,Se=0,Be){return de(ge(xe,Se),Be)},delete $.unshift,delete $.unshiftAsync,$}function hn(Y,G){if(G=P(G),!Array.isArray(Y))return G(new TypeError("First argument to race must be an array of functions"));if(!Y.length)return G();for(var $=0,te=Y.length;$<te;$++)v(Y[$])(G)}var ut=y(hn,2);function F(Y,G,$,te){var de=[...Y].reverse();return Ir(de,G,$,te)}function j(Y){var G=v(Y);return t(function(te,de){return te.push((ge,...xe)=>{let Se={};if(ge&&(Se.error=ge),xe.length>0){var Be=xe;xe.length<=1&&([Be]=xe),Se.value=Be}de(null,Se)}),G.apply(this,te)})}function z(Y){var G;return Array.isArray(Y)?G=Y.map(j):(G={},Object.keys(Y).forEach($=>{G[$]=j.call(this,Y[$])})),G}function re(Y,G,$,te){let de=v($);return nr(Y,G,(ge,xe)=>{de(ge,(Se,Be)=>{xe(Se,!Be)})},te)}function ye(Y,G,$){return re(me,Y,G,$)}var we=y(ye,3);function Ne(Y,G,$,te){return re(H(G),Y,$,te)}var er=y(Ne,4);function ht(Y,G,$){return re(De,Y,G,$)}var mn=y(ht,3);function ki(Y){return function(){return Y}}let gi=5,oa=0;function yo(Y,G,$){var te={times:gi,intervalFunc:ki(oa)};if(arguments.length<3&&typeof Y=="function"?($=G||Ke(),G=Y):(sa(te,Y),$=$||Ke()),typeof G!="function")throw new Error("Invalid arguments for async.retry");var de=v(G),ge=1;function xe(){de((Se,...Be)=>{Se!==!1&&(Se&&ge++<te.times&&(typeof te.errorFilter!="function"||te.errorFilter(Se))?setTimeout(xe,te.intervalFunc(ge-1)):$(Se,...Be))})}return xe(),$[gr]}function sa(Y,G){if(typeof G=="object")Y.times=+G.times||gi,Y.intervalFunc=typeof G.interval=="function"?G.interval:ki(+G.interval||oa),Y.errorFilter=G.errorFilter;else if(typeof G=="number"||typeof G=="string")Y.times=+G||gi;else throw new Error("Invalid arguments for async.retry")}function wa(Y,G){G||(G=Y,Y=null);let $=Y&&Y.arity||G.length;p(G)&&($+=1);var te=v(G);return t((de,ge)=>{(de.length<$-1||ge==null)&&(de.push(ge),ge=Ke());function xe(Se){te(...de,Se)}return Y?yo(Y,xe,ge):yo(xe,ge),ge[gr]})}function il(Y,G){return yr(De,Y,G)}function No(Y,G,$){return ot(Boolean,te=>te)(me,Y,G,$)}var fu=y(No,3);function Uo(Y,G,$,te){return ot(Boolean,de=>de)(H(G),Y,$,te)}var Lm=y(Uo,4);function v4(Y,G,$){return ot(Boolean,te=>te)(De,Y,G,$)}var qm=y(v4,3);function Nm(Y,G,$){var te=v(G);return Ie(Y,(ge,xe)=>{te(ge,(Se,Be)=>{if(Se)return xe(Se);xe(Se,{value:ge,criteria:Be})})},(ge,xe)=>{if(ge)return $(ge);$(null,xe.sort(de).map(Se=>Se.value))});function de(ge,xe){var Se=ge.criteria,Be=xe.criteria;return Se<Be?-1:Se>Be?1:0}}var Um=y(Nm,3);function Ec(Y,G,$){var te=v(Y);return t((de,ge)=>{var xe=!1,Se;function Be(){var wr=Y.name||"anonymous",gt=new Error('Callback function "'+wr+'" timed out.');gt.code="ETIMEDOUT",$&&(gt.info=$),xe=!0,ge(gt)}de.push((...wr)=>{xe||(ge(...wr),clearTimeout(Se))}),Se=setTimeout(Be,G),te(...de)})}function wc(Y){for(var G=Array(Y);Y--;)G[Y]=Y;return G}function Gm(Y,G,$,te){var de=v($);return ur(wc(Y),G,de,te)}function _x(Y,G,$){return Gm(Y,1/0,G,$)}function Vw(Y,G,$){return Gm(Y,1,G,$)}function Kw(Y,G,$,te){arguments.length<=3&&typeof G=="function"&&(te=$,$=G,G=Array.isArray(Y)?[]:{}),te=P(te||Ke());var de=v($);return me(Y,(ge,xe,Se)=>{de(G,ge,xe,Se)},ge=>te(ge,G)),te[gr]}function Yw(Y,G){var $=null,te;return x(Y,(de,ge)=>{v(de)((xe,...Se)=>{if(xe===!1)return ge(xe);Se.length<2?[te]=Se:te=Se,$=xe,ge(xe?null:{})})},()=>G($,te))}var $w=y(Yw);function Ex(Y){return(...G)=>(Y.unmemoized||Y)(...G)}function Xw(Y,G,$){$=W($);var te=v(G),de=v(Y),ge=[];function xe(Be,...wr){if(Be)return $(Be);ge=wr,Be!==!1&&de(Se)}function Se(Be,wr){if(Be)return $(Be);if(Be!==!1){if(!wr)return $(null,...ge);te(xe)}}return de(Se)}var $f=y(Xw,3);function al(Y,G,$){let te=v(Y);return $f(de=>te((ge,xe)=>de(ge,!xe)),G,$)}function wx(Y,G){if(G=P(G),!Array.isArray(Y))return G(new Error("First argument to waterfall must be an array of functions"));if(!Y.length)return G();var $=0;function te(ge){var xe=v(Y[$++]);xe(...ge,W(de))}function de(ge,...xe){if(ge!==!1){if(ge||$===Y.length)return G(ge,...xe);te(xe)}}te([])}var Sx=y(wx),b4={apply:r,applyEach:Ue,applyEachSeries:cr,asyncify:c,auto:ke,autoInject:pe,cargo:dr,cargoQueue:vr,compose:Hr,concat:Gr,concatLimit:rt,concatSeries:Er,constant:Fr,detect:En,detectLimit:ei,detectSeries:Kt,dir:wn,doUntil:Di,doWhilst:dn,each:aa,eachLimit:T,eachOf:me,eachOfLimit:ne,eachOfSeries:De,eachSeries:x,ensureAsync:R,every:Z,everyLimit:ve,everySeries:Re,filter:Ge,filterLimit:Ye,filterSeries:pr,forever:He,groupBy:ir,groupByLimit:Ze,groupBySeries:Fe,log:fe,map:Ie,mapLimit:ur,mapSeries:lr,mapValues:Ee,mapValuesLimit:Ce,mapValuesSeries:be,memoize:_e,nextTick:Pr,parallel:Tr,parallelLimit:Q,priorityQueue:et,queue:Wr,race:ut,reduce:Ir,reduceRight:F,reflect:j,reflectAll:z,reject:we,rejectLimit:er,rejectSeries:mn,retry:yo,retryable:wa,seq:dt,series:il,setImmediate:l,some:fu,someLimit:Lm,someSeries:qm,sortBy:Um,timeout:Ec,times:_x,timesLimit:Gm,timesSeries:Vw,transform:Kw,tryEach:$w,unmemoize:Ex,until:al,waterfall:Sx,whilst:$f,all:Z,allLimit:ve,allSeries:Re,any:fu,anyLimit:Lm,anySeries:qm,find:En,findLimit:ei,findSeries:Kt,flatMap:Gr,flatMapLimit:rt,flatMapSeries:Er,forEach:aa,forEachSeries:x,forEachLimit:T,forEachOf:me,forEachOfSeries:De,forEachOfLimit:ne,inject:Ir,foldl:Ir,foldr:F,select:Ge,selectLimit:Ye,selectSeries:pr,wrapSync:c,during:$f,doDuring:dn};e.default=b4,e.apply=r,e.applyEach=Ue,e.applyEachSeries=cr,e.asyncify=c,e.auto=ke,e.autoInject=pe,e.cargo=dr,e.cargoQueue=vr,e.compose=Hr,e.concat=Gr,e.concatLimit=rt,e.concatSeries=Er,e.constant=Fr,e.detect=En,e.detectLimit=ei,e.detectSeries=Kt,e.dir=wn,e.doUntil=Di,e.doWhilst=dn,e.each=aa,e.eachLimit=T,e.eachOf=me,e.eachOfLimit=ne,e.eachOfSeries=De,e.eachSeries=x,e.ensureAsync=R,e.every=Z,e.everyLimit=ve,e.everySeries=Re,e.filter=Ge,e.filterLimit=Ye,e.filterSeries=pr,e.forever=He,e.groupBy=ir,e.groupByLimit=Ze,e.groupBySeries=Fe,e.log=fe,e.map=Ie,e.mapLimit=ur,e.mapSeries=lr,e.mapValues=Ee,e.mapValuesLimit=Ce,e.mapValuesSeries=be,e.memoize=_e,e.nextTick=Pr,e.parallel=Tr,e.parallelLimit=Q,e.priorityQueue=et,e.queue=Wr,e.race=ut,e.reduce=Ir,e.reduceRight=F,e.reflect=j,e.reflectAll=z,e.reject=we,e.rejectLimit=er,e.rejectSeries=mn,e.retry=yo,e.retryable=wa,e.seq=dt,e.series=il,e.setImmediate=l,e.some=fu,e.someLimit=Lm,e.someSeries=qm,e.sortBy=Um,e.timeout=Ec,e.times=_x,e.timesLimit=Gm,e.timesSeries=Vw,e.transform=Kw,e.tryEach=$w,e.unmemoize=Ex,e.until=al,e.waterfall=Sx,e.whilst=$f,e.all=Z,e.allLimit=ve,e.allSeries=Re,e.any=fu,e.anyLimit=Lm,e.anySeries=qm,e.find=En,e.findLimit=ei,e.findSeries=Kt,e.flatMap=Gr,e.flatMapLimit=rt,e.flatMapSeries=Er,e.forEach=aa,e.forEachSeries=x,e.forEachLimit=T,e.forEachOf=me,e.forEachOfSeries=De,e.forEachOfLimit=ne,e.inject=Ir,e.foldl=Ir,e.foldr=F,e.select=Ge,e.selectLimit=Ye,e.selectSeries=pr,e.wrapSync=c,e.during=$f,e.doDuring=dn,Object.defineProperty(e,"__esModule",{value:!0})})});var QDe=m((D4t,JDe)=>{var Vp=require("constants"),fWr=process.cwd,gR=null,dWr=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return gR||(gR=fWr.call(process)),gR};try{process.cwd()}catch{}typeof process.chdir=="function"&&(BH=process.chdir,process.chdir=function(e){gR=null,BH.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,BH));var BH;JDe.exports=pWr;function pWr(e){Vp.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&r(e),e.lutimes||t(e),e.chown=a(e.chown),e.fchown=a(e.fchown),e.lchown=a(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=o(e.chownSync),e.fchownSync=o(e.fchownSync),e.lchownSync=o(e.lchownSync),e.chmodSync=i(e.chmodSync),e.fchmodSync=i(e.fchmodSync),e.lchmodSync=i(e.lchmodSync),e.stat=s(e.stat),e.fstat=s(e.fstat),e.lstat=s(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(c,f,d){d&&process.nextTick(d)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(c,f,d,p){p&&process.nextTick(p)},e.lchownSync=function(){}),dWr==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(c){function f(d,p,h){var b=Date.now(),v=0;c(d,p,function y(w){if(w&&(w.code==="EACCES"||w.code==="EPERM"||w.code==="EBUSY")&&Date.now()-b<6e4){setTimeout(function(){e.stat(p,function(A,C){A&&A.code==="ENOENT"?c(d,p,y):h(w)})},v),v<100&&(v+=10);return}h&&h(w)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,c),f}(e.rename)),e.read=typeof e.read!="function"?e.read:function(c){function f(d,p,h,b,v,y){var w;if(y&&typeof y=="function"){var A=0;w=function(C,D,P){if(C&&C.code==="EAGAIN"&&A<10)return A++,c.call(e,d,p,h,b,v,w);y.apply(this,arguments)}}return c.call(e,d,p,h,b,v,w)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,c),f}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(c){return function(f,d,p,h,b){for(var v=0;;)try{return c.call(e,f,d,p,h,b)}catch(y){if(y.code==="EAGAIN"&&v<10){v++;continue}throw y}}}(e.readSync);function r(c){c.lchmod=function(f,d,p){c.open(f,Vp.O_WRONLY|Vp.O_SYMLINK,d,function(h,b){if(h){p&&p(h);return}c.fchmod(b,d,function(v){c.close(b,function(y){p&&p(v||y)})})})},c.lchmodSync=function(f,d){var p=c.openSync(f,Vp.O_WRONLY|Vp.O_SYMLINK,d),h=!0,b;try{b=c.fchmodSync(p,d),h=!1}finally{if(h)try{c.closeSync(p)}catch{}else c.closeSync(p)}return b}}function t(c){Vp.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(f,d,p,h){c.open(f,Vp.O_SYMLINK,function(b,v){if(b){h&&h(b);return}c.futimes(v,d,p,function(y){c.close(v,function(w){h&&h(y||w)})})})},c.lutimesSync=function(f,d,p){var h=c.openSync(f,Vp.O_SYMLINK),b,v=!0;try{b=c.futimesSync(h,d,p),v=!1}finally{if(v)try{c.closeSync(h)}catch{}else c.closeSync(h)}return b}):c.futimes&&(c.lutimes=function(f,d,p,h){h&&process.nextTick(h)},c.lutimesSync=function(){})}function n(c){return c&&function(f,d,p){return c.call(e,f,d,function(h){l(h)&&(h=null),p&&p.apply(this,arguments)})}}function i(c){return c&&function(f,d){try{return c.call(e,f,d)}catch(p){if(!l(p))throw p}}}function a(c){return c&&function(f,d,p,h){return c.call(e,f,d,p,function(b){l(b)&&(b=null),h&&h.apply(this,arguments)})}}function o(c){return c&&function(f,d,p){try{return c.call(e,f,d,p)}catch(h){if(!l(h))throw h}}}function s(c){return c&&function(f,d,p){typeof d=="function"&&(p=d,d=null);function h(b,v){v&&(v.uid<0&&(v.uid+=4294967296),v.gid<0&&(v.gid+=4294967296)),p&&p.apply(this,arguments)}return d?c.call(e,f,d,h):c.call(e,f,h)}}function u(c){return c&&function(f,d){var p=d?c.call(e,f,d):c.call(e,f);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function l(c){if(!c||c.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var rke=m((k4t,eke)=>{var ZDe=require("stream").Stream;eke.exports=hWr;function hWr(e){return{ReadStream:r,WriteStream:t};function r(n,i){if(!(this instanceof r))return new r(n,i);ZDe.call(this);var a=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var o=Object.keys(i),s=0,u=o.length;s<u;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(c,f){if(c){a.emit("error",c),a.readable=!1;return}a.fd=f,a.emit("open",f),a._read()})}function t(n,i){if(!(this instanceof t))return new t(n,i);ZDe.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var u=a[o];this[u]=i[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var nke=m((O4t,tke)=>{"use strict";tke.exports=gWr;var mWr=Object.getPrototypeOf||function(e){return e.__proto__};function gWr(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var r={__proto__:mWr(e)};else var r=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}),r}});var qH=m((R4t,LH)=>{var Qn=require("fs"),vWr=QDe(),bWr=rke(),yWr=nke(),vR=require("util"),Ma,bR;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ma=Symbol.for("graceful-fs.queue"),bR=Symbol.for("graceful-fs.previous")):(Ma="___graceful-fs.queue",bR="___graceful-fs.previous");function xWr(){}function ike(e,r){Object.defineProperty(e,Ma,{get:function(){return r}})}var fm=xWr;vR.debuglog?fm=vR.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(fm=function(){var e=vR.format.apply(vR,arguments);e="GFS4: "+e.split(/\n/).join(`
|
|
170
|
+
GFS4: `),console.error(e)});Qn[Ma]||(ake=global[Ma]||[],ike(Qn,ake),Qn.close=function(e){function r(t,n){return e.call(Qn,t,function(i){i||oke(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(r,bR,{value:e}),r}(Qn.close),Qn.closeSync=function(e){function r(t){e.apply(Qn,arguments),oke()}return Object.defineProperty(r,bR,{value:e}),r}(Qn.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){fm(Qn[Ma]),require("assert").equal(Qn[Ma].length,0)}));var ake;global[Ma]||ike(global,Qn[Ma]);LH.exports=jH(yWr(Qn));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Qn.__patched&&(LH.exports=jH(Qn),Qn.__patched=!0);function jH(e){vWr(e),e.gracefulify=jH,e.createReadStream=D,e.createWriteStream=P;var r=e.readFile;e.readFile=t;function t(I,V,N){return typeof V=="function"&&(N=V,V=null),W(I,V,N);function W(M,H,X,ne){return r(M,H,function(ae){ae&&(ae.code==="EMFILE"||ae.code==="ENFILE")?By([W,[M,H,X],ae,ne||Date.now(),Date.now()]):typeof X=="function"&&X.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=i;function i(I,V,N,W){return typeof N=="function"&&(W=N,N=null),M(I,V,N,W);function M(H,X,ne,ae,se){return n(H,X,ne,function(ce){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?By([M,[H,X,ne,ae],ce,se||Date.now(),Date.now()]):typeof ae=="function"&&ae.apply(this,arguments)})}}var a=e.appendFile;a&&(e.appendFile=o);function o(I,V,N,W){return typeof N=="function"&&(W=N,N=null),M(I,V,N,W);function M(H,X,ne,ae,se){return a(H,X,ne,function(ce){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?By([M,[H,X,ne,ae],ce,se||Date.now(),Date.now()]):typeof ae=="function"&&ae.apply(this,arguments)})}}var s=e.copyFile;s&&(e.copyFile=u);function u(I,V,N,W){return typeof N=="function"&&(W=N,N=0),M(I,V,N,W);function M(H,X,ne,ae,se){return s(H,X,ne,function(ce){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?By([M,[H,X,ne,ae],ce,se||Date.now(),Date.now()]):typeof ae=="function"&&ae.apply(this,arguments)})}}var l=e.readdir;e.readdir=f;var c=/^v[0-5]\./;function f(I,V,N){typeof V=="function"&&(N=V,V=null);var W=c.test(process.version)?function(X,ne,ae,se){return l(X,M(X,ne,ae,se))}:function(X,ne,ae,se){return l(X,ne,M(X,ne,ae,se))};return W(I,V,N);function M(H,X,ne,ae){return function(se,ce){se&&(se.code==="EMFILE"||se.code==="ENFILE")?By([W,[H,X,ne],se,ae||Date.now(),Date.now()]):(ce&&ce.sort&&ce.sort(),typeof ne=="function"&&ne.call(this,se,ce))}}}if(process.version.substr(0,4)==="v0.8"){var d=bWr(e);y=d.ReadStream,A=d.WriteStream}var p=e.ReadStream;p&&(y.prototype=Object.create(p.prototype),y.prototype.open=w);var h=e.WriteStream;h&&(A.prototype=Object.create(h.prototype),A.prototype.open=C),Object.defineProperty(e,"ReadStream",{get:function(){return y},set:function(I){y=I},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return A},set:function(I){A=I},enumerable:!0,configurable:!0});var b=y;Object.defineProperty(e,"FileReadStream",{get:function(){return b},set:function(I){b=I},enumerable:!0,configurable:!0});var v=A;Object.defineProperty(e,"FileWriteStream",{get:function(){return v},set:function(I){v=I},enumerable:!0,configurable:!0});function y(I,V){return this instanceof y?(p.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function w(){var I=this;L(I.path,I.flags,I.mode,function(V,N){V?(I.autoClose&&I.destroy(),I.emit("error",V)):(I.fd=N,I.emit("open",N),I.read())})}function A(I,V){return this instanceof A?(h.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function C(){var I=this;L(I.path,I.flags,I.mode,function(V,N){V?(I.destroy(),I.emit("error",V)):(I.fd=N,I.emit("open",N))})}function D(I,V){return new e.ReadStream(I,V)}function P(I,V){return new e.WriteStream(I,V)}var k=e.open;e.open=L;function L(I,V,N,W){return typeof N=="function"&&(W=N,N=null),M(I,V,N,W);function M(H,X,ne,ae,se){return k(H,X,ne,function(ce,me){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?By([M,[H,X,ne,ae],ce,se||Date.now(),Date.now()]):typeof ae=="function"&&ae.apply(this,arguments)})}}return e}function By(e){fm("ENQUEUE",e[0].name,e[1]),Qn[Ma].push(e),MH()}var yR;function oke(){for(var e=Date.now(),r=0;r<Qn[Ma].length;++r)Qn[Ma][r].length>2&&(Qn[Ma][r][3]=e,Qn[Ma][r][4]=e);MH()}function MH(){if(clearTimeout(yR),yR=void 0,Qn[Ma].length!==0){var e=Qn[Ma].shift(),r=e[0],t=e[1],n=e[2],i=e[3],a=e[4];if(i===void 0)fm("RETRY",r.name,t),r.apply(null,t);else if(Date.now()-i>=6e4){fm("TIMEOUT",r.name,t);var o=t.pop();typeof o=="function"&&o.call(null,n)}else{var s=Date.now()-a,u=Math.max(a-i,1),l=Math.min(u*1.2,100);s>=l?(fm("RETRY",r.name,t),r.apply(null,t.concat([i]))):Qn[Ma].push(e)}yR===void 0&&(yR=setTimeout(MH,0))}}});var uke=m((F4t,ske)=>{ske.exports=nE().PassThrough});var dke=m((I4t,fke)=>{var lke=require("util"),xR=uke();fke.exports={Readable:_R,Writable:ER};lke.inherits(_R,xR);lke.inherits(ER,xR);function cke(e,r,t){e[r]=function(){return delete e[r],t.apply(this,arguments),this[r].apply(this,arguments)}}function _R(e,r){if(!(this instanceof _R))return new _R(e,r);xR.call(this,r),cke(this,"_read",function(){var t=e.call(this,r),n=this.emit.bind(this,"error");t.on("error",n),t.pipe(this)}),this.emit("readable")}function ER(e,r){if(!(this instanceof ER))return new ER(e,r);xR.call(this,r),cke(this,"_write",function(){var t=e.call(this,r),n=this.emit.bind(this,"error");t.on("error",n),this.pipe(t)}),this.emit("writable")}});var NH=m((P4t,pke)=>{pke.exports=function(e,r){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var t=e.length;if(t<=1)return e;var n="";if(t>4&&e[3]==="\\"){var i=e[2];(i==="?"||i===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),n="//")}var a=e.split(/[/\\]+/);return r!==!1&&a[a.length-1]===""&&a.pop(),n+a.join("/")}});var _ke=m((B4t,xke)=>{var hke=9007199254740991,_Wr="[object Arguments]",EWr="[object Function]",wWr="[object GeneratorFunction]",SWr=/^(?:0|[1-9]\d*)$/;function mke(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function AWr(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var jE=Object.prototype,ME=jE.hasOwnProperty,gke=jE.toString,TWr=jE.propertyIsEnumerable,vke=Math.max;function CWr(e,r){var t=MWr(e)||jWr(e)?AWr(e.length,String):[],n=t.length,i=!!n;for(var a in e)(r||ME.call(e,a))&&!(i&&(a=="length"||yke(a,n)))&&t.push(a);return t}function DWr(e,r,t,n){return e===void 0||UH(e,jE[t])&&!ME.call(n,t)?r:e}function kWr(e,r,t){var n=e[r];(!(ME.call(e,r)&&UH(n,t))||t===void 0&&!(r in e))&&(e[r]=t)}function OWr(e){if(!zH(e))return BWr(e);var r=PWr(e),t=[];for(var n in e)n=="constructor"&&(r||!ME.call(e,n))||t.push(n);return t}function bke(e,r){return r=vke(r===void 0?e.length-1:r,0),function(){for(var t=arguments,n=-1,i=vke(t.length-r,0),a=Array(i);++n<i;)a[n]=t[r+n];n=-1;for(var o=Array(r+1);++n<r;)o[n]=t[n];return o[r]=a,mke(e,this,o)}}function RWr(e,r,t,n){t||(t={});for(var i=-1,a=r.length;++i<a;){var o=r[i],s=n?n(t[o],e[o],o,t,e):void 0;kWr(t,o,s===void 0?e[o]:s)}return t}function FWr(e){return bke(function(r,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&IWr(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),r=Object(r);++n<i;){var s=t[n];s&&e(r,s,n,a)}return r})}function yke(e,r){return r=r??hke,!!r&&(typeof e=="number"||SWr.test(e))&&e>-1&&e%1==0&&e<r}function IWr(e,r,t){if(!zH(t))return!1;var n=typeof r;return(n=="number"?GH(t)&&yke(r,t.length):n=="string"&&r in t)?UH(t[r],e):!1}function PWr(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||jE;return e===t}function BWr(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}function UH(e,r){return e===r||e!==e&&r!==r}function jWr(e){return LWr(e)&&ME.call(e,"callee")&&(!TWr.call(e,"callee")||gke.call(e)==_Wr)}var MWr=Array.isArray;function GH(e){return e!=null&&NWr(e.length)&&!qWr(e)}function LWr(e){return UWr(e)&&GH(e)}function qWr(e){var r=zH(e)?gke.call(e):"";return r==EWr||r==wWr}function NWr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hke}function zH(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function UWr(e){return!!e&&typeof e=="object"}var GWr=FWr(function(e,r,t,n){RWr(r,HWr(r),e,n)}),zWr=bke(function(e){return e.push(void 0,DWr),mke(GWr,void 0,e)});function HWr(e){return GH(e)?CWr(e,!0):OWr(e)}xke.exports=zWr});var Cke=m((j4t,Tke)=>{var WWr=9007199254740991,VWr="[object Arguments]",KWr="[object Function]",YWr="[object GeneratorFunction]",$Wr=typeof global=="object"&&global&&global.Object===Object&&global,XWr=typeof self=="object"&&self&&self.Object===Object&&self,JWr=$Wr||XWr||Function("return this")();function QWr(e,r){for(var t=-1,n=r.length,i=e.length;++t<n;)e[i+t]=r[t];return e}var HH=Object.prototype,ZWr=HH.hasOwnProperty,Eke=HH.toString,wke=JWr.Symbol,eVr=HH.propertyIsEnumerable,Ske=wke?wke.isConcatSpreadable:void 0;function Ake(e,r,t,n,i){var a=-1,o=e.length;for(t||(t=rVr),i||(i=[]);++a<o;){var s=e[a];r>0&&t(s)?r>1?Ake(s,r-1,t,n,i):QWr(i,s):n||(i[i.length]=s)}return i}function rVr(e){return iVr(e)||nVr(e)||!!(Ske&&e&&e[Ske])}function tVr(e){var r=e?e.length:0;return r?Ake(e,1):[]}function nVr(e){return oVr(e)&&ZWr.call(e,"callee")&&(!eVr.call(e,"callee")||Eke.call(e)==VWr)}var iVr=Array.isArray;function aVr(e){return e!=null&&uVr(e.length)&&!sVr(e)}function oVr(e){return cVr(e)&&aVr(e)}function sVr(e){var r=lVr(e)?Eke.call(e):"";return r==KWr||r==YWr}function uVr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=WWr}function lVr(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function cVr(e){return!!e&&typeof e=="object"}Tke.exports=tVr});var qke=m((M4t,Lke)=>{var fVr=200,WH="__lodash_hash_undefined__",dVr=9007199254740991,pVr="[object Arguments]",hVr="[object Function]",mVr="[object GeneratorFunction]",gVr=/[\\^$.*+?()[\]{}|]/g,vVr=/^\[object .+?Constructor\]$/,bVr=typeof global=="object"&&global&&global.Object===Object&&global,yVr=typeof self=="object"&&self&&self.Object===Object&&self,VH=bVr||yVr||Function("return this")();function xVr(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function _Vr(e,r){var t=e?e.length:0;return!!t&&TVr(e,r,0)>-1}function EVr(e,r,t){for(var n=-1,i=e?e.length:0;++n<i;)if(t(r,e[n]))return!0;return!1}function wVr(e,r){for(var t=-1,n=e?e.length:0,i=Array(n);++t<n;)i[t]=r(e[t],t,e);return i}function SVr(e,r){for(var t=-1,n=r.length,i=e.length;++t<n;)e[i+t]=r[t];return e}function AVr(e,r,t,n){for(var i=e.length,a=t+(n?1:-1);n?a--:++a<i;)if(r(e[a],a,e))return a;return-1}function TVr(e,r,t){if(r!==r)return AVr(e,CVr,t);for(var n=t-1,i=e.length;++n<i;)if(e[n]===r)return n;return-1}function CVr(e){return e!==e}function DVr(e){return function(r){return e(r)}}function kVr(e,r){return e.has(r)}function OVr(e,r){return e==null?void 0:e[r]}function RVr(e){var r=!1;if(e!=null&&typeof e.toString!="function")try{r=!!(e+"")}catch{}return r}var FVr=Array.prototype,IVr=Function.prototype,KH=Object.prototype,YH=VH["__core-js_shared__"],Dke=function(){var e=/[^.]+$/.exec(YH&&YH.keys&&YH.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),kke=IVr.toString,wR=KH.hasOwnProperty,Oke=KH.toString,PVr=RegExp("^"+kke.call(wR).replace(gVr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rke=VH.Symbol,BVr=KH.propertyIsEnumerable,jVr=FVr.splice,Fke=Rke?Rke.isConcatSpreadable:void 0,Ike=Math.max,MVr=Bke(VH,"Map"),LE=Bke(Object,"create");function dm(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function LVr(){this.__data__=LE?LE(null):{}}function qVr(e){return this.has(e)&&delete this.__data__[e]}function NVr(e){var r=this.__data__;if(LE){var t=r[e];return t===WH?void 0:t}return wR.call(r,e)?r[e]:void 0}function UVr(e){var r=this.__data__;return LE?r[e]!==void 0:wR.call(r,e)}function GVr(e,r){var t=this.__data__;return t[e]=LE&&r===void 0?WH:r,this}dm.prototype.clear=LVr;dm.prototype.delete=qVr;dm.prototype.get=NVr;dm.prototype.has=UVr;dm.prototype.set=GVr;function jy(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function zVr(){this.__data__=[]}function HVr(e){var r=this.__data__,t=AR(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():jVr.call(r,t,1),!0}function WVr(e){var r=this.__data__,t=AR(r,e);return t<0?void 0:r[t][1]}function VVr(e){return AR(this.__data__,e)>-1}function KVr(e,r){var t=this.__data__,n=AR(t,e);return n<0?t.push([e,r]):t[n][1]=r,this}jy.prototype.clear=zVr;jy.prototype.delete=HVr;jy.prototype.get=WVr;jy.prototype.has=VVr;jy.prototype.set=KVr;function My(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function YVr(){this.__data__={hash:new dm,map:new(MVr||jy),string:new dm}}function $Vr(e){return TR(this,e).delete(e)}function XVr(e){return TR(this,e).get(e)}function JVr(e){return TR(this,e).has(e)}function QVr(e,r){return TR(this,e).set(e,r),this}My.prototype.clear=YVr;My.prototype.delete=$Vr;My.prototype.get=XVr;My.prototype.has=JVr;My.prototype.set=QVr;function SR(e){var r=-1,t=e?e.length:0;for(this.__data__=new My;++r<t;)this.add(e[r])}function ZVr(e){return this.__data__.set(e,WH),this}function eKr(e){return this.__data__.has(e)}SR.prototype.add=SR.prototype.push=ZVr;SR.prototype.has=eKr;function AR(e,r){for(var t=e.length;t--;)if(lKr(e[t][0],r))return t;return-1}function rKr(e,r,t,n){var i=-1,a=_Vr,o=!0,s=e.length,u=[],l=r.length;if(!s)return u;t&&(r=wVr(r,DVr(t))),n?(a=EVr,o=!1):r.length>=fVr&&(a=kVr,o=!1,r=new SR(r));e:for(;++i<s;){var c=e[i],f=t?t(c):c;if(c=n||c!==0?c:0,o&&f===f){for(var d=l;d--;)if(r[d]===f)continue e;u.push(c)}else a(r,f,n)||u.push(c)}return u}function Pke(e,r,t,n,i){var a=-1,o=e.length;for(t||(t=iKr),i||(i=[]);++a<o;){var s=e[a];r>0&&t(s)?r>1?Pke(s,r-1,t,n,i):SVr(i,s):n||(i[i.length]=s)}return i}function tKr(e){if(!Mke(e)||oKr(e))return!1;var r=jke(e)||RVr(e)?PVr:vVr;return r.test(sKr(e))}function nKr(e,r){return r=Ike(r===void 0?e.length-1:r,0),function(){for(var t=arguments,n=-1,i=Ike(t.length-r,0),a=Array(i);++n<i;)a[n]=t[r+n];n=-1;for(var o=Array(r+1);++n<r;)o[n]=t[n];return o[r]=a,xVr(e,this,o)}}function TR(e,r){var t=e.__data__;return aKr(r)?t[typeof r=="string"?"string":"hash"]:t.map}function Bke(e,r){var t=OVr(e,r);return tKr(t)?t:void 0}function iKr(e){return fKr(e)||cKr(e)||!!(Fke&&e&&e[Fke])}function aKr(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function oKr(e){return!!Dke&&Dke in e}function sKr(e){if(e!=null){try{return kke.call(e)}catch{}try{return e+""}catch{}}return""}var uKr=nKr(function(e,r){return $H(e)?rKr(e,Pke(r,1,$H,!0)):[]});function lKr(e,r){return e===r||e!==e&&r!==r}function cKr(e){return $H(e)&&wR.call(e,"callee")&&(!BVr.call(e,"callee")||Oke.call(e)==pVr)}var fKr=Array.isArray;function dKr(e){return e!=null&&pKr(e.length)&&!jke(e)}function $H(e){return hKr(e)&&dKr(e)}function jke(e){var r=Mke(e)?Oke.call(e):"";return r==hVr||r==mVr}function pKr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=dVr}function Mke(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function hKr(e){return!!e&&typeof e=="object"}Lke.exports=uKr});var Qke=m((L4t,Jke)=>{var mKr=200,XH="__lodash_hash_undefined__",gKr=1/0,vKr=9007199254740991,bKr="[object Arguments]",yKr="[object Function]",xKr="[object GeneratorFunction]",_Kr=/[\\^$.*+?()[\]{}|]/g,EKr=/^\[object .+?Constructor\]$/,wKr=typeof global=="object"&&global&&global.Object===Object&&global,SKr=typeof self=="object"&&self&&self.Object===Object&&self,CR=wKr||SKr||Function("return this")();function AKr(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function TKr(e,r){var t=e?e.length:0;return!!t&&OKr(e,r,0)>-1}function CKr(e,r,t){for(var n=-1,i=e?e.length:0;++n<i;)if(t(r,e[n]))return!0;return!1}function DKr(e,r){for(var t=-1,n=r.length,i=e.length;++t<n;)e[i+t]=r[t];return e}function kKr(e,r,t,n){for(var i=e.length,a=t+(n?1:-1);n?a--:++a<i;)if(r(e[a],a,e))return a;return-1}function OKr(e,r,t){if(r!==r)return kKr(e,RKr,t);for(var n=t-1,i=e.length;++n<i;)if(e[n]===r)return n;return-1}function RKr(e){return e!==e}function FKr(e,r){return e.has(r)}function IKr(e,r){return e==null?void 0:e[r]}function PKr(e){var r=!1;if(e!=null&&typeof e.toString!="function")try{r=!!(e+"")}catch{}return r}function Nke(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var BKr=Array.prototype,jKr=Function.prototype,JH=Object.prototype,QH=CR["__core-js_shared__"],Uke=function(){var e=/[^.]+$/.exec(QH&&QH.keys&&QH.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Gke=jKr.toString,DR=JH.hasOwnProperty,zke=JH.toString,MKr=RegExp("^"+Gke.call(DR).replace(_Kr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hke=CR.Symbol,LKr=JH.propertyIsEnumerable,qKr=BKr.splice,Wke=Hke?Hke.isConcatSpreadable:void 0,Vke=Math.max,NKr=eW(CR,"Map"),ZH=eW(CR,"Set"),qE=eW(Object,"create");function pm(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function UKr(){this.__data__=qE?qE(null):{}}function GKr(e){return this.has(e)&&delete this.__data__[e]}function zKr(e){var r=this.__data__;if(qE){var t=r[e];return t===XH?void 0:t}return DR.call(r,e)?r[e]:void 0}function HKr(e){var r=this.__data__;return qE?r[e]!==void 0:DR.call(r,e)}function WKr(e,r){var t=this.__data__;return t[e]=qE&&r===void 0?XH:r,this}pm.prototype.clear=UKr;pm.prototype.delete=GKr;pm.prototype.get=zKr;pm.prototype.has=HKr;pm.prototype.set=WKr;function Ly(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function VKr(){this.__data__=[]}function KKr(e){var r=this.__data__,t=OR(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():qKr.call(r,t,1),!0}function YKr(e){var r=this.__data__,t=OR(r,e);return t<0?void 0:r[t][1]}function $Kr(e){return OR(this.__data__,e)>-1}function XKr(e,r){var t=this.__data__,n=OR(t,e);return n<0?t.push([e,r]):t[n][1]=r,this}Ly.prototype.clear=VKr;Ly.prototype.delete=KKr;Ly.prototype.get=YKr;Ly.prototype.has=$Kr;Ly.prototype.set=XKr;function qy(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}function JKr(){this.__data__={hash:new pm,map:new(NKr||Ly),string:new pm}}function QKr(e){return RR(this,e).delete(e)}function ZKr(e){return RR(this,e).get(e)}function eYr(e){return RR(this,e).has(e)}function rYr(e,r){return RR(this,e).set(e,r),this}qy.prototype.clear=JKr;qy.prototype.delete=QKr;qy.prototype.get=ZKr;qy.prototype.has=eYr;qy.prototype.set=rYr;function kR(e){var r=-1,t=e?e.length:0;for(this.__data__=new qy;++r<t;)this.add(e[r])}function tYr(e){return this.__data__.set(e,XH),this}function nYr(e){return this.__data__.has(e)}kR.prototype.add=kR.prototype.push=tYr;kR.prototype.has=nYr;function OR(e,r){for(var t=e.length;t--;)if(pYr(e[t][0],r))return t;return-1}function Kke(e,r,t,n,i){var a=-1,o=e.length;for(t||(t=uYr),i||(i=[]);++a<o;){var s=e[a];r>0&&t(s)?r>1?Kke(s,r-1,t,n,i):DKr(i,s):n||(i[i.length]=s)}return i}function iYr(e){if(!Xke(e)||cYr(e))return!1;var r=$ke(e)||PKr(e)?MKr:EKr;return r.test(fYr(e))}function aYr(e,r){return r=Vke(r===void 0?e.length-1:r,0),function(){for(var t=arguments,n=-1,i=Vke(t.length-r,0),a=Array(i);++n<i;)a[n]=t[r+n];n=-1;for(var o=Array(r+1);++n<r;)o[n]=t[n];return o[r]=a,AKr(e,this,o)}}function oYr(e,r,t){var n=-1,i=TKr,a=e.length,o=!0,s=[],u=s;if(t)o=!1,i=CKr;else if(a>=mKr){var l=r?null:sYr(e);if(l)return Nke(l);o=!1,i=FKr,u=new kR}else u=r?[]:s;e:for(;++n<a;){var c=e[n],f=r?r(c):c;if(c=t||c!==0?c:0,o&&f===f){for(var d=u.length;d--;)if(u[d]===f)continue e;r&&u.push(f),s.push(c)}else i(u,f,t)||(u!==s&&u.push(f),s.push(c))}return s}var sYr=ZH&&1/Nke(new ZH([,-0]))[1]==gKr?function(e){return new ZH(e)}:yYr;function RR(e,r){var t=e.__data__;return lYr(r)?t[typeof r=="string"?"string":"hash"]:t.map}function eW(e,r){var t=IKr(e,r);return iYr(t)?t:void 0}function uYr(e){return mYr(e)||hYr(e)||!!(Wke&&e&&e[Wke])}function lYr(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function cYr(e){return!!Uke&&Uke in e}function fYr(e){if(e!=null){try{return Gke.call(e)}catch{}try{return e+""}catch{}}return""}var dYr=aYr(function(e){return oYr(Kke(e,1,Yke,!0))});function pYr(e,r){return e===r||e!==e&&r!==r}function hYr(e){return Yke(e)&&DR.call(e,"callee")&&(!LKr.call(e,"callee")||zke.call(e)==bKr)}var mYr=Array.isArray;function gYr(e){return e!=null&&vYr(e.length)&&!$ke(e)}function Yke(e){return bYr(e)&&gYr(e)}function $ke(e){var r=Xke(e)?zke.call(e):"";return r==yKr||r==xKr}function vYr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vKr}function Xke(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function bYr(e){return!!e&&typeof e=="object"}function yYr(){}Jke.exports=dYr});var tOe=m((q4t,rOe)=>{var xYr="[object Object]";function _Yr(e){var r=!1;if(e!=null&&typeof e.toString!="function")try{r=!!(e+"")}catch{}return r}function EYr(e,r){return function(t){return e(r(t))}}var wYr=Function.prototype,Zke=Object.prototype,eOe=wYr.toString,SYr=Zke.hasOwnProperty,AYr=eOe.call(Object),TYr=Zke.toString,CYr=EYr(Object.getPrototypeOf,Object);function DYr(e){return!!e&&typeof e=="object"}function kYr(e){if(!DYr(e)||TYr.call(e)!=xYr||_Yr(e))return!1;var r=CYr(e);if(r===null)return!0;var t=SYr.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&eOe.call(t)==AYr}rOe.exports=kYr});var nOe=m(rW=>{var hm=require("path"),Kp=process.platform==="win32",Yp=require("fs"),OYr=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function RYr(){var e;if(OYr){var r=new Error;e=t}else e=n;return e;function t(i){i&&(r.message=i.message,i=r,n(i))}function n(i){if(i){if(process.throwDeprecation)throw i;if(!process.noDeprecation){var a="fs: missing callback "+(i.stack||i.message);process.traceDeprecation?console.trace(a):console.error(a)}}}}function FYr(e){return typeof e=="function"?e:RYr()}var N4t=hm.normalize;Kp?Mf=/(.*?)(?:[\/\\]+|$)/g:Mf=/(.*?)(?:[\/]+|$)/g;var Mf;Kp?NE=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:NE=/^[\/]*/;var NE;rW.realpathSync=function(r,t){if(r=hm.resolve(r),t&&Object.prototype.hasOwnProperty.call(t,r))return t[r];var n=r,i={},a={},o,s,u,l;c();function c(){var v=NE.exec(r);o=v[0].length,s=v[0],u=v[0],l="",Kp&&!a[u]&&(Yp.lstatSync(u),a[u]=!0)}for(;o<r.length;){Mf.lastIndex=o;var f=Mf.exec(r);if(l=s,s+=f[0],u=l+f[1],o=Mf.lastIndex,!(a[u]||t&&t[u]===u)){var d;if(t&&Object.prototype.hasOwnProperty.call(t,u))d=t[u];else{var p=Yp.lstatSync(u);if(!p.isSymbolicLink()){a[u]=!0,t&&(t[u]=u);continue}var h=null;if(!Kp){var b=p.dev.toString(32)+":"+p.ino.toString(32);i.hasOwnProperty(b)&&(h=i[b])}h===null&&(Yp.statSync(u),h=Yp.readlinkSync(u)),d=hm.resolve(l,h),t&&(t[u]=d),Kp||(i[b]=h)}r=hm.resolve(d,r.slice(o)),c()}}return t&&(t[n]=r),r};rW.realpath=function(r,t,n){if(typeof n!="function"&&(n=FYr(t),t=null),r=hm.resolve(r),t&&Object.prototype.hasOwnProperty.call(t,r))return process.nextTick(n.bind(null,null,t[r]));var i=r,a={},o={},s,u,l,c;f();function f(){var v=NE.exec(r);s=v[0].length,u=v[0],l=v[0],c="",Kp&&!o[l]?Yp.lstat(l,function(y){if(y)return n(y);o[l]=!0,d()}):process.nextTick(d)}function d(){if(s>=r.length)return t&&(t[i]=r),n(null,r);Mf.lastIndex=s;var v=Mf.exec(r);return c=u,u+=v[0],l=c+v[1],s=Mf.lastIndex,o[l]||t&&t[l]===l?process.nextTick(d):t&&Object.prototype.hasOwnProperty.call(t,l)?b(t[l]):Yp.lstat(l,p)}function p(v,y){if(v)return n(v);if(!y.isSymbolicLink())return o[l]=!0,t&&(t[l]=l),process.nextTick(d);if(!Kp){var w=y.dev.toString(32)+":"+y.ino.toString(32);if(a.hasOwnProperty(w))return h(null,a[w],l)}Yp.stat(l,function(A){if(A)return n(A);Yp.readlink(l,function(C,D){Kp||(a[w]=D),h(C,D)})})}function h(v,y,w){if(v)return n(v);var A=hm.resolve(c,y);t&&(t[w]=A),b(A)}function b(v){r=hm.resolve(v,r.slice(s)),f()}}});var aW=m((G4t,sOe)=>{sOe.exports=$p;$p.realpath=$p;$p.sync=iW;$p.realpathSync=iW;$p.monkeypatch=PYr;$p.unmonkeypatch=BYr;var Ny=require("fs"),tW=Ny.realpath,nW=Ny.realpathSync,IYr=process.version,iOe=/^v[0-5]\./.test(IYr),aOe=nOe();function oOe(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function $p(e,r,t){if(iOe)return tW(e,r,t);typeof r=="function"&&(t=r,r=null),tW(e,r,function(n,i){oOe(n)?aOe.realpath(e,r,t):t(n,i)})}function iW(e,r){if(iOe)return nW(e,r);try{return nW(e,r)}catch(t){if(oOe(t))return aOe.realpathSync(e,r);throw t}}function PYr(){Ny.realpath=$p,Ny.realpathSync=iW}function BYr(){Ny.realpath=tW,Ny.realpathSync=nW}});var lOe=m((z4t,uOe)=>{uOe.exports=function(e,r){for(var t=[],n=0;n<e.length;n++){var i=r(e[n],n);jYr(i)?t.push.apply(t,i):t.push(i)}return t};var jYr=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}});var vOe=m((H4t,gOe)=>{var MYr=lOe(),cOe=SH();gOe.exports=NYr;var fOe="\0SLASH"+Math.random()+"\0",dOe="\0OPEN"+Math.random()+"\0",oW="\0CLOSE"+Math.random()+"\0",pOe="\0COMMA"+Math.random()+"\0",hOe="\0PERIOD"+Math.random()+"\0";function sW(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function LYr(e){return e.split("\\\\").join(fOe).split("\\{").join(dOe).split("\\}").join(oW).split("\\,").join(pOe).split("\\.").join(hOe)}function qYr(e){return e.split(fOe).join("\\").split(dOe).join("{").split(oW).join("}").split(pOe).join(",").split(hOe).join(".")}function mOe(e){if(!e)return[""];var r=[],t=cOe("{","}",e);if(!t)return e.split(",");var n=t.pre,i=t.body,a=t.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var s=mOe(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),r.push.apply(r,o),r}function NYr(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),Uy(LYr(e),!0).map(qYr)):[]}function UYr(e){return"{"+e+"}"}function GYr(e){return/^-?0\d/.test(e)}function zYr(e,r){return e<=r}function HYr(e,r){return e>=r}function Uy(e,r){var t=[],n=cOe("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),o=i||a,s=n.body.indexOf(",")>=0;if(!o&&!s)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+oW+n.post,Uy(e)):[e];var u;if(o)u=n.body.split(/\.\./);else if(u=mOe(n.body),u.length===1&&(u=Uy(u[0],!1).map(UYr),u.length===1)){var c=n.post.length?Uy(n.post,!1):[""];return c.map(function(N){return n.pre+u[0]+N})}var l=n.pre,c=n.post.length?Uy(n.post,!1):[""],f;if(o){var d=sW(u[0]),p=sW(u[1]),h=Math.max(u[0].length,u[1].length),b=u.length==3?Math.abs(sW(u[2])):1,v=zYr,y=p<d;y&&(b*=-1,v=HYr);var w=u.some(GYr);f=[];for(var A=d;v(A,p);A+=b){var C;if(a)C=String.fromCharCode(A),C==="\\"&&(C="");else if(C=String(A),w){var D=h-C.length;if(D>0){var P=new Array(D+1).join("0");A<0?C="-"+P+C.slice(1):C=P+C}}f.push(C)}}else f=MYr(u,function(V){return Uy(V,!1)});for(var k=0;k<f.length;k++)for(var L=0;L<c.length;L++){var I=l+f[k]+c[L];(!r||o||I)&&t.push(I)}return t}});var PR=m((W4t,EOe)=>{EOe.exports=us;us.Minimatch=La;var UE=function(){try{return require("path")}catch{}}()||{sep:"/"};us.sep=UE.sep;var uW=us.GLOBSTAR=La.GLOBSTAR={},WYr=vOe(),bOe={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},lW="[^/]",cW=lW+"*?",VYr="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",KYr="(?:(?!(?:\\/|^)\\.).)*?",yOe=YYr("().*{}+?[]^$\\!");function YYr(e){return e.split("").reduce(function(r,t){return r[t]=!0,r},{})}var xOe=/\/+/;us.filter=$Yr;function $Yr(e,r){return r=r||{},function(t,n,i){return us(t,e,r)}}function Xp(e,r){r=r||{};var t={};return Object.keys(e).forEach(function(n){t[n]=e[n]}),Object.keys(r).forEach(function(n){t[n]=r[n]}),t}us.defaults=function(e){if(!e||typeof e!="object"||!Object.keys(e).length)return us;var r=us,t=function(i,a,o){return r(i,a,Xp(e,o))};return t.Minimatch=function(i,a){return new r.Minimatch(i,Xp(e,a))},t.Minimatch.defaults=function(i){return r.defaults(Xp(e,i)).Minimatch},t.filter=function(i,a){return r.filter(i,Xp(e,a))},t.defaults=function(i){return r.defaults(Xp(e,i))},t.makeRe=function(i,a){return r.makeRe(i,Xp(e,a))},t.braceExpand=function(i,a){return r.braceExpand(i,Xp(e,a))},t.match=function(n,i,a){return r.match(n,i,Xp(e,a))},t};La.defaults=function(e){return us.defaults(e).Minimatch};function us(e,r,t){return FR(r),t||(t={}),!t.nocomment&&r.charAt(0)==="#"?!1:new La(r,t).match(e)}function La(e,r){if(!(this instanceof La))return new La(e,r);FR(e),r||(r={}),e=e.trim(),!r.allowWindowsEscape&&UE.sep!=="/"&&(e=e.split(UE.sep).join("/")),this.options=r,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}La.prototype.debug=function(){};La.prototype.make=XYr;function XYr(){var e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();r.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,t),t=this.globParts=t.map(function(n){return n.split(xOe)}),this.debug(this.pattern,t),t=t.map(function(n,i,a){return n.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(n){return n.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}La.prototype.parseNegate=JYr;function JYr(){var e=this.pattern,r=!1,t=this.options,n=0;if(!t.nonegate){for(var i=0,a=e.length;i<a&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.substr(n)),this.negate=r}}us.braceExpand=function(e,r){return _Oe(e,r)};La.prototype.braceExpand=_Oe;function _Oe(e,r){return r||(this instanceof La?r=this.options:r={}),e=typeof e=="undefined"?this.pattern:e,FR(e),r.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:WYr(e)}var QYr=1024*64,FR=function(e){if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>QYr)throw new TypeError("pattern is too long")};La.prototype.parse=ZYr;var IR={};function ZYr(e,r){FR(e);var t=this.options;if(e==="**")if(t.noglobstar)e="*";else return uW;if(e==="")return"";var n="",i=!!t.nocase,a=!1,o=[],s=[],u,l=!1,c=-1,f=-1,d=e.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",p=this;function h(){if(u){switch(u){case"*":n+=cW,i=!0;break;case"?":n+=lW,i=!0;break;default:n+="\\"+u;break}p.debug("clearStateChar %j %j",u,n),u=!1}}for(var b=0,v=e.length,y;b<v&&(y=e.charAt(b));b++){if(this.debug("%s %s %s %j",e,b,n,y),a&&yOe[y]){n+="\\"+y,a=!1;continue}switch(y){case"/":return!1;case"\\":h(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,b,n,y),l){this.debug(" in class"),y==="!"&&b===f+1&&(y="^"),n+=y;continue}p.debug("call clearStateChar %j",u),h(),u=y,t.noext&&h();continue;case"(":if(l){n+="(";continue}if(!u){n+="\\(";continue}o.push({type:u,start:b-1,reStart:n.length,open:bOe[u].open,close:bOe[u].close}),n+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,n),u=!1;continue;case")":if(l||!o.length){n+="\\)";continue}h(),i=!0;var w=o.pop();n+=w.close,w.type==="!"&&s.push(w),w.reEnd=n.length;continue;case"|":if(l||!o.length||a){n+="\\|",a=!1;continue}h(),n+="|";continue;case"[":if(h(),l){n+="\\"+y;continue}l=!0,f=b,c=n.length,n+=y;continue;case"]":if(b===f+1||!l){n+="\\"+y,a=!1;continue}var A=e.substring(f+1,b);try{RegExp("["+A+"]")}catch{var C=this.parse(A,IR);n=n.substr(0,c)+"\\["+C[0]+"\\]",i=i||C[1],l=!1;continue}i=!0,l=!1,n+=y;continue;default:h(),a?a=!1:yOe[y]&&!(y==="^"&&l)&&(n+="\\"),n+=y}}for(l&&(A=e.substr(f+1),C=this.parse(A,IR),n=n.substr(0,c)+"\\["+C[0],i=i||C[1]),w=o.pop();w;w=o.pop()){var D=n.slice(w.reStart+w.open.length);this.debug("setting tail",n,w),D=D.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(me,Me,Ie){return Ie||(Ie="\\"),Me+Me+Ie+"|"}),this.debug(`tail=%j
|
|
171
|
+
%s`,D,D,w,n);var P=w.type==="*"?cW:w.type==="?"?lW:"\\"+w.type;i=!0,n=n.slice(0,w.reStart)+P+"\\("+D}h(),a&&(n+="\\\\");var k=!1;switch(n.charAt(0)){case"[":case".":case"(":k=!0}for(var L=s.length-1;L>-1;L--){var I=s[L],V=n.slice(0,I.reStart),N=n.slice(I.reStart,I.reEnd-8),W=n.slice(I.reEnd-8,I.reEnd),M=n.slice(I.reEnd);W+=M;var H=V.split("(").length-1,X=M;for(b=0;b<H;b++)X=X.replace(/\)[+*?]?/,"");M=X;var ne="";M===""&&r!==IR&&(ne="$");var ae=V+N+M+ne+W;n=ae}if(n!==""&&i&&(n="(?=.)"+n),k&&(n=d+n),r===IR)return[n,i];if(!i)return r$r(e);var se=t.nocase?"i":"";try{var ce=new RegExp("^"+n+"$",se)}catch{return new RegExp("$.")}return ce._glob=e,ce._src=n,ce}us.makeRe=function(e,r){return new La(e,r||{}).makeRe()};La.prototype.makeRe=e$r;function e$r(){if(this.regexp||this.regexp===!1)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var r=this.options,t=r.noglobstar?cW:r.dot?VYr:KYr,n=r.nocase?"i":"",i=e.map(function(a){return a.map(function(o){return o===uW?t:typeof o=="string"?t$r(o):o._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}us.match=function(e,r,t){t=t||{};var n=new La(r,t);return e=e.filter(function(i){return n.match(i)}),n.options.nonull&&!e.length&&e.push(r),e};La.prototype.match=function(r,t){if(typeof t=="undefined"&&(t=this.partial),this.debug("match",r,this.pattern),this.comment)return!1;if(this.empty)return r==="";if(r==="/"&&t)return!0;var n=this.options;UE.sep!=="/"&&(r=r.split(UE.sep).join("/")),r=r.split(xOe),this.debug(this.pattern,"split",r);var i=this.set;this.debug(this.pattern,"set",i);var a,o;for(o=r.length-1;o>=0&&(a=r[o],!a);o--);for(o=0;o<i.length;o++){var s=i[o],u=r;n.matchBase&&s.length===1&&(u=[a]);var l=this.matchOne(u,s,t);if(l)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};La.prototype.matchOne=function(e,r,t){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var i=0,a=0,o=e.length,s=r.length;i<o&&a<s;i++,a++){this.debug("matchOne loop");var u=r[a],l=e[i];if(this.debug(r,u,l),u===!1)return!1;if(u===uW){this.debug("GLOBSTAR",[r,u,l]);var c=i,f=a+1;if(f===s){for(this.debug("** at the end");i<o;i++)if(e[i]==="."||e[i]===".."||!n.dot&&e[i].charAt(0)===".")return!1;return!0}for(;c<o;){var d=e[c];if(this.debug(`
|
|
171
172
|
globstar while`,e,c,r,f,d),this.matchOne(e.slice(c),r.slice(f),t))return this.debug("globstar found match!",c,o,d),!0;if(d==="."||d===".."||!n.dot&&d.charAt(0)==="."){this.debug("dot detected!",e,c,r,f);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(t&&(this.debug(`
|
|
172
|
-
>>> no match, partial?`,e,c,r,f),c===o))}var p;if(typeof u=="string"?(p=l===u,this.debug("string match",u,l,p)):(p=l.match(u),this.debug("pattern match",u,l,p)),!p)return!1}if(i===o&&a===s)return!0;if(i===o)return t;if(a===s)return i===o-1&&e[i]==="";throw new Error("wtf?")};function
|
|
173
|
-
See: https://github.com/isaacs/node-glob/issues/167`);return new
|
|
174
|
-
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof ta))return new ta(e,r);if(QWr(this,e,r),this.noprocess)return this;var t=this.minimatch.set.length;this.matches=new Array(t);for(var n=0;n<t;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}ta.prototype._finish=function(){if(s8e.ok(this instanceof ta),this.realpath){var e=this;this.matches.forEach(function(r,t){var n=e.matches[t]=Object.create(null);for(var i in r)try{i=e._makeAbs(i);var a=JWr.realpathSync(i,e.realpathCache);n[a]=!0}catch(o){if(o.syscall==="stat")n[e._makeAbs(i)]=!0;else throw o}})}nm.finish(this)};ta.prototype._process=function(e,r,t){s8e.ok(this instanceof ta);for(var n=0;typeof e[n]=="string";)n++;var i;switch(n){case e.length:this._processSimple(e.join("/"),r);return;case 0:i=null;break;default:i=e.slice(0,n).join("/");break}var a=e.slice(n),o;i===null?o=".":((nR(i)||nR(e.map(function(l){return typeof l=="string"?l:"[*]"}).join("/")))&&(!i||!nR(i))&&(i="/"+i),o=i);var s=this._makeAbs(o);if(!ZWr(this,o)){var u=a[0]===o8e.GLOBSTAR;u?this._processGlobStar(i,o,s,a,r,t):this._processReaddir(i,o,s,a,r,t)}};ta.prototype._processReaddir=function(e,r,t,n,i,a){var o=this._readdir(t,a);if(!!o){for(var s=n[0],u=!!this.minimatch.negate,l=s._glob,c=this.dot||l.charAt(0)===".",f=[],d=0;d<o.length;d++){var p=o[d];if(p.charAt(0)!=="."||c){var h;u&&!e?h=!p.match(s):h=p.match(s),h&&f.push(p)}}var b=f.length;if(b!==0){if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var d=0;d<b;d++){var p=f[d];e&&(e.slice(-1)!=="/"?p=e+"/"+p:p=e+p),p.charAt(0)==="/"&&!this.nomount&&(p=Vz.join(this.root,p)),this._emitMatch(i,p)}return}n.shift();for(var d=0;d<b;d++){var p=f[d],v;e?v=[e,p]:v=[p],this._process(v.concat(n),i,a)}}}};ta.prototype._emitMatch=function(e,r){if(!eVr(this,r)){var t=this._makeAbs(r);if(this.mark&&(r=this._mark(r)),this.absolute&&(r=t),!this.matches[e][r]){if(this.nodir){var n=this.cache[t];if(n==="DIR"||Array.isArray(n))return}this.matches[e][r]=!0,this.stat&&this._stat(r)}}};ta.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var r,t,n;try{t=this.fs.lstatSync(e)}catch(a){if(a.code==="ENOENT")return null}var i=t&&t.isSymbolicLink();return this.symlinks[e]=i,!i&&t&&!t.isDirectory()?this.cache[e]="FILE":r=this._readdir(e,!1),r};ta.prototype._readdir=function(e,r){var t;if(r&&!Kz(this.symlinks,e))return this._readdirInGlobStar(e);if(Kz(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(i){return this._readdirError(e,i),null}};ta.prototype._readdirEntries=function(e,r){if(!this.mark&&!this.stat)for(var t=0;t<r.length;t++){var n=r[t];e==="/"?n=e+n:n=e+"/"+n,this.cache[n]=!0}return this.cache[e]=r,r};ta.prototype._readdirError=function(e,r){switch(r.code){case"ENOTSUP":case"ENOTDIR":var t=this._makeAbs(e);if(this.cache[t]="FILE",t===this.cwdAbs){var n=new Error(r.code+" invalid cwd "+this.cwd);throw n.path=this.cwd,n.code=r.code,n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw r;this.silent||console.error("glob error",r);break}};ta.prototype._processGlobStar=function(e,r,t,n,i,a){var o=this._readdir(t,a);if(!!o){var s=n.slice(1),u=e?[e]:[],l=u.concat(s);this._process(l,i,!1);var c=o.length,f=this.symlinks[t];if(!(f&&a))for(var d=0;d<c;d++){var p=o[d];if(!(p.charAt(0)==="."&&!this.dot)){var h=u.concat(o[d],s);this._process(h,i,!0);var b=u.concat(o[d],n);this._process(b,i,!0)}}}};ta.prototype._processSimple=function(e,r){var t=this._stat(e);if(this.matches[r]||(this.matches[r]=Object.create(null)),!!t){if(e&&nR(e)&&!this.nomount){var n=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=Vz.join(this.root,e):(e=Vz.resolve(this.root,e),n&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(r,e)}};ta.prototype._stat=function(e){var r=this._makeAbs(e),t=e.slice(-1)==="/";if(e.length>this.maxLength)return!1;if(!this.stat&&Kz(this.cache,r)){var o=this.cache[r];if(Array.isArray(o)&&(o="DIR"),!t||o==="DIR")return o;if(t&&o==="FILE")return!1}var n,i=this.statCache[r];if(!i){var a;try{a=this.fs.lstatSync(r)}catch(s){if(s&&(s.code==="ENOENT"||s.code==="ENOTDIR"))return this.statCache[r]=!1,!1}if(a&&a.isSymbolicLink())try{i=this.fs.statSync(r)}catch{i=a}else i=a}this.statCache[r]=i;var o=!0;return i&&(o=i.isDirectory()?"DIR":"FILE"),this.cache[r]=this.cache[r]||o,t&&o==="FILE"?!1:o};ta.prototype._mark=function(e){return nm.mark(this,e)};ta.prototype._makeAbs=function(e){return nm.makeAbs(this,e)}});var $z=m((XFt,d8e)=>{d8e.exports=f8e;function f8e(e,r){if(e&&r)return f8e(e)(r);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){t[n]=e[n]}),t;function t(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var a=e.apply(this,n),o=n[n.length-1];return typeof a=="function"&&a!==o&&Object.keys(o).forEach(function(s){a[s]=o[s]}),a}}});var aR=m((JFt,Xz)=>{var p8e=$z();Xz.exports=p8e(iR);Xz.exports.strict=p8e(h8e);iR.proto=iR(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return iR(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return h8e(this)},configurable:!0})});function iR(e){var r=function(){return r.called?r.value:(r.called=!0,r.value=e.apply(this,arguments))};return r.called=!1,r}function h8e(e){var r=function(){if(r.called)throw new Error(r.onceError);return r.called=!0,r.value=e.apply(this,arguments)},t=e.name||"Function wrapped with `once`";return r.onceError=t+" shouldn't be called more than once",r.called=!1,r}});var g8e=m((QFt,m8e)=>{var rVr=$z(),vE=Object.create(null),tVr=aR();m8e.exports=rVr(nVr);function nVr(e,r){return vE[e]?(vE[e].push(r),null):(vE[e]=[r],iVr(e))}function iVr(e){return tVr(function r(){var t=vE[e],n=t.length,i=aVr(arguments);try{for(var a=0;a<n;a++)t[a].apply(null,i)}finally{t.length>n?(t.splice(0,n),process.nextTick(function(){r.apply(null,i)})):delete vE[e]}})}function aVr(e){for(var r=e.length,t=[],n=0;n<r;n++)t[n]=e[n];return t}});var Yz=m((r4t,b8e)=>{b8e.exports=am;var oVr=Lz(),v8e=eR(),ZFt=v8e.Minimatch,sVr=at(),uVr=require("events").EventEmitter,Jz=require("path"),Qz=require("assert"),bE=tR(),Zz=c8e(),im=Wz(),lVr=im.setopts,eH=im.ownProp,rH=g8e(),e4t=require("util"),cVr=im.childrenIgnored,fVr=im.isIgnored,dVr=aR();function am(e,r,t){if(typeof r=="function"&&(t=r,r={}),r||(r={}),r.sync){if(t)throw new TypeError("callback provided to sync glob");return Zz(e,r)}return new cn(e,r,t)}am.sync=Zz;var pVr=am.GlobSync=Zz.GlobSync;am.glob=am;function hVr(e,r){if(r===null||typeof r!="object")return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e}am.hasMagic=function(e,r){var t=hVr({},r);t.noprocess=!0;var n=new cn(e,t),i=n.minimatch.set;if(!e)return!1;if(i.length>1)return!0;for(var a=0;a<i[0].length;a++)if(typeof i[0][a]!="string")return!0;return!1};am.Glob=cn;sVr(cn,uVr);function cn(e,r,t){if(typeof r=="function"&&(t=r,r=null),r&&r.sync){if(t)throw new TypeError("callback provided to sync glob");return new pVr(e,r)}if(!(this instanceof cn))return new cn(e,r,t);lVr(this,e,r),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),typeof t=="function"&&(t=dVr(t),this.on("error",t),this.on("end",function(u){t(null,u)}));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(n===0)return s();for(var a=!0,o=0;o<n;o++)this._process(this.minimatch.set[o],o,!1,s);a=!1;function s(){--i._processing,i._processing<=0&&(a?process.nextTick(function(){i._finish()}):i._finish())}}cn.prototype._finish=function(){if(Qz(this instanceof cn),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();im.finish(this),this.emit("end",this.found)}};cn.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var e=this.matches.length;if(e===0)return this._finish();for(var r=this,t=0;t<this.matches.length;t++)this._realpathSet(t,n);function n(){--e==0&&r._finish()}};cn.prototype._realpathSet=function(e,r){var t=this.matches[e];if(!t)return r();var n=Object.keys(t),i=this,a=n.length;if(a===0)return r();var o=this.matches[e]=Object.create(null);n.forEach(function(s,u){s=i._makeAbs(s),oVr.realpath(s,i.realpathCache,function(l,c){l?l.syscall==="stat"?o[s]=!0:i.emit("error",l):o[c]=!0,--a==0&&(i.matches[e]=o,r())})})};cn.prototype._mark=function(e){return im.mark(this,e)};cn.prototype._makeAbs=function(e){return im.makeAbs(this,e)};cn.prototype.abort=function(){this.aborted=!0,this.emit("abort")};cn.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};cn.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var r=0;r<e.length;r++){var t=e[r];this._emitMatch(t[0],t[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var r=0;r<n.length;r++){var i=n[r];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}};cn.prototype._process=function(e,r,t,n){if(Qz(this instanceof cn),Qz(typeof n=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([e,r,t,n]);return}for(var i=0;typeof e[i]=="string";)i++;var a;switch(i){case e.length:this._processSimple(e.join("/"),r,n);return;case 0:a=null;break;default:a=e.slice(0,i).join("/");break}var o=e.slice(i),s;a===null?s=".":((bE(a)||bE(e.map(function(c){return typeof c=="string"?c:"[*]"}).join("/")))&&(!a||!bE(a))&&(a="/"+a),s=a);var u=this._makeAbs(s);if(cVr(this,s))return n();var l=o[0]===v8e.GLOBSTAR;l?this._processGlobStar(a,s,u,o,r,t,n):this._processReaddir(a,s,u,o,r,t,n)}};cn.prototype._processReaddir=function(e,r,t,n,i,a,o){var s=this;this._readdir(t,a,function(u,l){return s._processReaddir2(e,r,t,n,i,a,l,o)})};cn.prototype._processReaddir2=function(e,r,t,n,i,a,o,s){if(!o)return s();for(var u=n[0],l=!!this.minimatch.negate,c=u._glob,f=this.dot||c.charAt(0)===".",d=[],p=0;p<o.length;p++){var h=o[p];if(h.charAt(0)!=="."||f){var b;l&&!e?b=!h.match(u):b=h.match(u),b&&d.push(h)}}var v=d.length;if(v===0)return s();if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var p=0;p<v;p++){var h=d[p];e&&(e!=="/"?h=e+"/"+h:h=e+h),h.charAt(0)==="/"&&!this.nomount&&(h=Jz.join(this.root,h)),this._emitMatch(i,h)}return s()}n.shift();for(var p=0;p<v;p++){var h=d[p],y;e&&(e!=="/"?h=e+"/"+h:h=e+h),this._process([h].concat(n),i,a,s)}s()};cn.prototype._emitMatch=function(e,r){if(!this.aborted&&!fVr(this,r)){if(this.paused){this._emitQueue.push([e,r]);return}var t=bE(r)?r:this._makeAbs(r);if(this.mark&&(r=this._mark(r)),this.absolute&&(r=t),!this.matches[e][r]){if(this.nodir){var n=this.cache[t];if(n==="DIR"||Array.isArray(n))return}this.matches[e][r]=!0;var i=this.statCache[t];i&&this.emit("stat",r,i),this.emit("match",r)}}};cn.prototype._readdirInGlobStar=function(e,r){if(this.aborted)return;if(this.follow)return this._readdir(e,!1,r);var t="lstat\0"+e,n=this,i=rH(t,a);i&&n.fs.lstat(e,i);function a(o,s){if(o&&o.code==="ENOENT")return r();var u=s&&s.isSymbolicLink();n.symlinks[e]=u,!u&&s&&!s.isDirectory()?(n.cache[e]="FILE",r()):n._readdir(e,!1,r)}};cn.prototype._readdir=function(e,r,t){if(!this.aborted&&(t=rH("readdir\0"+e+"\0"+r,t),!!t)){if(r&&!eH(this.symlinks,e))return this._readdirInGlobStar(e,t);if(eH(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return t();if(Array.isArray(n))return t(null,n)}var i=this;i.fs.readdir(e,mVr(this,e,t))}};function mVr(e,r,t){return function(n,i){n?e._readdirError(r,n,t):e._readdirEntries(r,i,t)}}cn.prototype._readdirEntries=function(e,r,t){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<r.length;n++){var i=r[n];e==="/"?i=e+i:i=e+"/"+i,this.cache[i]=!0}return this.cache[e]=r,t(null,r)}};cn.prototype._readdirError=function(e,r,t){if(!this.aborted){switch(r.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(r.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=r.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",r),this.abort()),this.silent||console.error("glob error",r);break}return t()}};cn.prototype._processGlobStar=function(e,r,t,n,i,a,o){var s=this;this._readdir(t,a,function(u,l){s._processGlobStar2(e,r,t,n,i,a,l,o)})};cn.prototype._processGlobStar2=function(e,r,t,n,i,a,o,s){if(!o)return s();var u=n.slice(1),l=e?[e]:[],c=l.concat(u);this._process(c,i,!1,s);var f=this.symlinks[t],d=o.length;if(f&&a)return s();for(var p=0;p<d;p++){var h=o[p];if(!(h.charAt(0)==="."&&!this.dot)){var b=l.concat(o[p],u);this._process(b,i,!0,s);var v=l.concat(o[p],n);this._process(v,i,!0,s)}}s()};cn.prototype._processSimple=function(e,r,t){var n=this;this._stat(e,function(i,a){n._processSimple2(e,r,i,a,t)})};cn.prototype._processSimple2=function(e,r,t,n,i){if(this.matches[r]||(this.matches[r]=Object.create(null)),!n)return i();if(e&&bE(e)&&!this.nomount){var a=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=Jz.join(this.root,e):(e=Jz.resolve(this.root,e),a&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(r,e),i()};cn.prototype._stat=function(e,r){var t=this._makeAbs(e),n=e.slice(-1)==="/";if(e.length>this.maxLength)return r();if(!this.stat&&eH(this.cache,t)){var i=this.cache[t];if(Array.isArray(i)&&(i="DIR"),!n||i==="DIR")return r(null,i);if(n&&i==="FILE")return r()}var a,o=this.statCache[t];if(o!==void 0){if(o===!1)return r(null,o);var s=o.isDirectory()?"DIR":"FILE";return n&&s==="FILE"?r():r(null,s,o)}var u=this,l=rH("stat\0"+t,c);l&&u.fs.lstat(t,l);function c(f,d){if(d&&d.isSymbolicLink())return u.fs.stat(t,function(p,h){p?u._stat2(e,t,null,d,r):u._stat2(e,t,p,h,r)});u._stat2(e,t,f,d,r)}};cn.prototype._stat2=function(e,r,t,n,i){if(t&&(t.code==="ENOENT"||t.code==="ENOTDIR"))return this.statCache[r]=!1,i();var a=e.slice(-1)==="/";if(this.statCache[r]=n,r.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,!1,n);var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[r]=this.cache[r]||o,a&&o==="FILE"?i():i(null,o,n)}});var E8e=m((t4t,_8e)=>{var y8e=QG(),Ey=require("path"),tH=aCe(),gVr=vCe(),vVr=OCe(),bVr=PCe(),yVr=Yz(),om=_8e.exports={},x8e=/[\/\\]/g,xVr=function(e,r){var t=[];return tH(e).forEach(function(n){var i=n.indexOf("!")===0;i&&(n=n.slice(1));var a=r(n);i?t=gVr(t,a):t=vVr(t,a)}),t};om.exists=function(){var e=Ey.join.apply(Ey,arguments);return y8e.existsSync(e)};om.expand=function(...e){var r=bVr(e[0])?e.shift():{},t=Array.isArray(e[0])?e[0]:e;if(t.length===0)return[];var n=xVr(t,function(i){return yVr.sync(i,r)});return r.filter&&(n=n.filter(function(i){i=Ey.join(r.cwd||"",i);try{return typeof r.filter=="function"?r.filter(i):y8e.statSync(i)[r.filter]()}catch{return!1}})),n};om.expandMapping=function(e,r,t){t=Object.assign({rename:function(a,o){return Ey.join(a||"",o)}},t);var n=[],i={};return om.expand(t,e).forEach(function(a){var o=a;t.flatten&&(o=Ey.basename(o)),t.ext&&(o=o.replace(/(\.[^\/]*)?$/,t.ext));var s=t.rename(r,o,t);t.cwd&&(a=Ey.join(t.cwd,a)),s=s.replace(x8e,"/"),a=a.replace(x8e,"/"),i[s]?i[s].src.push(a):(n.push({src:[a],dest:s}),i[s]=n[n.length-1])}),n};om.normalizeFilesArray=function(e){var r=[];return e.forEach(function(t){var n;("src"in t||"dest"in t)&&r.push(t)}),r.length===0?[]:(r=_(r).chain().forEach(function(t){!("src"in t)||!t.src||(Array.isArray(t.src)?t.src=tH(t.src):t.src=[t.src])}).map(function(t){var n=Object.assign({},t);if(delete n.src,delete n.dest,t.expand)return om.expandMapping(t.src,t.dest,n).map(function(a){var o=Object.assign({},t);return o.orig=Object.assign({},t),o.src=a.src,o.dest=a.dest,["expand","cwd","flatten","rename","ext"].forEach(function(s){delete o[s]}),o});var i=Object.assign({},t);return i.orig=Object.assign({},t),"src"in i&&Object.defineProperty(i,"src",{enumerable:!0,get:function a(){var o;return"result"in a||(o=t.src,o=Array.isArray(o)?tH(o):[o],a.result=om.expand(n,o)),a.result}}),"dest"in i&&(i.dest=t.dest),i}).flatten().value(),r)}});var wy=m((i4t,A8e)=>{var nH=QG(),w8e=require("path"),n4t=require("util"),_Vr=H6e(),S8e=yz(),EVr=Z6e(),wVr=require("stream").Stream,SVr=lE().PassThrough,os=A8e.exports={};os.file=E8e();os.collectStream=function(e,r){var t=[],n=0;e.on("error",r),e.on("data",function(i){t.push(i),n+=i.length}),e.on("end",function(){var i=new Buffer(n),a=0;t.forEach(function(o){o.copy(i,a),a+=o.length}),r(null,i)})};os.dateify=function(e){return e=e||new Date,e instanceof Date?e=e:typeof e=="string"?e=new Date(e):e=new Date,e};os.defaults=function(e,r,t){var n=arguments;return n[0]=n[0]||{},EVr(...n)};os.isStream=function(e){return e instanceof wVr};os.lazyReadStream=function(e){return new _Vr.Readable(function(){return nH.createReadStream(e)})};os.normalizeInputSource=function(e){if(e===null)return new Buffer(0);if(typeof e=="string")return new Buffer(e);if(os.isStream(e)&&!e._readableState){var r=new SVr;return e.pipe(r),r}return e};os.sanitizePath=function(e){return S8e(e,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};os.trailingSlashIt=function(e){return e.slice(-1)!=="/"?e+"/":e};os.unixifyPath=function(e){return S8e(e,!1).replace(/^\w+:/,"")};os.walkdir=function(e,r,t){var n=[];typeof r=="function"&&(t=r,r=e),nH.readdir(e,function(i,a){var o=0,s,u;if(i)return t(i);(function l(){if(s=a[o++],!s)return t(null,n);u=w8e.join(e,s),nH.stat(u,function(c,f){n.push({path:u,relative:w8e.relative(r,u).replace(/\\/g,"/"),stats:f}),f&&f.isDirectory()?os.walkdir(u,r,function(d,p){p.forEach(function(h){n.push(h)}),l()}):l()})})()})}});var k8e=m((C8e,D8e)=>{var AVr=require("util"),TVr={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function T8e(e,r){Error.captureStackTrace(this,this.constructor),this.message=TVr[e]||e,this.code=e,this.data=r}AVr.inherits(T8e,Error);C8e=D8e.exports=T8e});var iH=m((a4t,O8e)=>{O8e.exports=require("stream")});var j8e=m((o4t,B8e)=>{"use strict";function R8e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function F8e(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?R8e(Object(t),!0).forEach(function(n){CVr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function CVr(e,r,t){return r=P8e(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function DVr(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function I8e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,P8e(n.key),n)}}function kVr(e,r,t){return r&&I8e(e.prototype,r),t&&I8e(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function P8e(e){var r=OVr(e,"string");return typeof r=="symbol"?r:String(r)}function OVr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var RVr=require("buffer"),oR=RVr.Buffer,FVr=require("util"),aH=FVr.inspect,IVr=aH&&aH.custom||"inspect";function PVr(e,r,t){oR.prototype.copy.call(e,r,t)}B8e.exports=function(){function e(){DVr(this,e),this.head=null,this.tail=null,this.length=0}return kVr(e,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(this.length===0)return oR.alloc(0);for(var n=oR.allocUnsafe(t>>>0),i=this.head,a=0;i;)PVr(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):t===this.head.data.length?i=this.shift():i=n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,a=n.data;for(t-=a.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?a+=o:a+=o.slice(0,t),t-=s,t===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(t){var n=oR.allocUnsafe(t),i=this.head,a=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,t===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:IVr,value:function(t,n){return aH(this,F8e(F8e({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var sH=m((s4t,L8e)=>{"use strict";function BVr(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(oH,this,e)):process.nextTick(oH,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!r&&a?t._writableState?t._writableState.errorEmitted?process.nextTick(sR,t):(t._writableState.errorEmitted=!0,process.nextTick(M8e,t,a)):process.nextTick(M8e,t,a):r?(process.nextTick(sR,t),r(a)):process.nextTick(sR,t)}),this)}function M8e(e,r){oH(e,r),sR(e)}function sR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function jVr(){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 oH(e,r){e.emit("error",r)}function MVr(e,r){var t=e._readableState,n=e._writableState;t&&t.autoDestroy||n&&n.autoDestroy?e.destroy(r):e.emit("error",r)}L8e.exports={destroy:BVr,undestroy:jVr,errorOrDestroy:MVr}});var Up=m((u4t,U8e)=>{"use strict";var q8e={};function Js(e,r,t){t||(t=Error);function n(a,o,s){return typeof r=="string"?r:r(a,o,s)}class i extends t{constructor(o,s,u){super(n(o,s,u))}}i.prototype.name=t.name,i.prototype.code=e,q8e[e]=i}function N8e(e,r){if(Array.isArray(e)){let t=e.length;return e=e.map(n=>String(n)),t>2?`one of ${r} ${e.slice(0,t-1).join(", ")}, or `+e[t-1]:t===2?`one of ${r} ${e[0]} or ${e[1]}`:`of ${r} ${e[0]}`}else return`of ${r} ${String(e)}`}function LVr(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function qVr(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function NVr(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}Js("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);Js("ERR_INVALID_ARG_TYPE",function(e,r,t){let n;typeof r=="string"&&LVr(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";let i;if(qVr(e," argument"))i=`The ${e} ${n} ${N8e(r,"type")}`;else{let a=NVr(e,".")?"property":"argument";i=`The "${e}" ${a} ${n} ${N8e(r,"type")}`}return i+=`. Received type ${typeof t}`,i},TypeError);Js("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Js("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Js("ERR_STREAM_PREMATURE_CLOSE","Premature close");Js("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Js("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Js("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Js("ERR_STREAM_WRITE_AFTER_END","write after end");Js("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Js("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Js("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");U8e.exports.codes=q8e});var uH=m((l4t,G8e)=>{"use strict";var UVr=Up().codes.ERR_INVALID_OPT_VALUE;function GVr(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function zVr(e,r,t,n){var i=GVr(r,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?t:"highWaterMark";throw new UVr(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}G8e.exports={getHighWaterMark:zVr}});var fH=m((c4t,Y8e)=>{"use strict";Y8e.exports=fi;function z8e(e){var r=this;this.next=null,this.entry=null,this.finish=function(){gKr(r,e)}}var Sy;fi.WritableState=yE;var HVr={deprecate:d0()},H8e=iH(),uR=require("buffer").Buffer,WVr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function VVr(e){return uR.from(e)}function KVr(e){return uR.isBuffer(e)||e instanceof WVr}var lH=sH(),YVr=uH(),$Vr=YVr.getHighWaterMark,Gp=Up().codes,XVr=Gp.ERR_INVALID_ARG_TYPE,JVr=Gp.ERR_METHOD_NOT_IMPLEMENTED,QVr=Gp.ERR_MULTIPLE_CALLBACK,ZVr=Gp.ERR_STREAM_CANNOT_PIPE,eKr=Gp.ERR_STREAM_DESTROYED,rKr=Gp.ERR_STREAM_NULL_VALUES,tKr=Gp.ERR_STREAM_WRITE_AFTER_END,nKr=Gp.ERR_UNKNOWN_ENCODING,Ay=lH.errorOrDestroy;at()(fi,H8e);function iKr(){}function yE(e,r,t){Sy=Sy||sm(),e=e||{},typeof t!="boolean"&&(t=r instanceof Sy),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=$Vr(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){fKr(r,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new z8e(this)}yE.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(yE.prototype,"buffer",{get:HVr.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var lR;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(lR=Function.prototype[Symbol.hasInstance],Object.defineProperty(fi,Symbol.hasInstance,{value:function(r){return lR.call(this,r)?!0:this!==fi?!1:r&&r._writableState instanceof yE}})):lR=function(r){return r instanceof this};function fi(e){Sy=Sy||sm();var r=this instanceof Sy;if(!r&&!lR.call(fi,this))return new fi(e);this._writableState=new yE(e,this,r),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)),H8e.call(this)}fi.prototype.pipe=function(){Ay(this,new ZVr)};function aKr(e,r){var t=new tKr;Ay(e,t),process.nextTick(r,t)}function oKr(e,r,t,n){var i;return t===null?i=new rKr:typeof t!="string"&&!r.objectMode&&(i=new XVr("chunk",["string","Buffer"],t)),i?(Ay(e,i),process.nextTick(n,i),!1):!0}fi.prototype.write=function(e,r,t){var n=this._writableState,i=!1,a=!n.objectMode&&KVr(e);return a&&!uR.isBuffer(e)&&(e=VVr(e)),typeof r=="function"&&(t=r,r=null),a?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=iKr),n.ending?aKr(this,t):(a||oKr(this,n,e,t))&&(n.pendingcb++,i=uKr(this,n,a,e,r,t)),i};fi.prototype.cork=function(){this._writableState.corked++};fi.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&V8e(this,e))};fi.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new nKr(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(fi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function sKr(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=uR.from(r,t)),r}Object.defineProperty(fi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function uKr(e,r,t,n,i,a){if(!t){var o=sKr(r,n,i);n!==o&&(t=!0,i="buffer",n=o)}var s=r.objectMode?1:n.length;r.length+=s;var u=r.length<r.highWaterMark;if(u||(r.needDrain=!0),r.writing||r.corked){var l=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:a,next:null},l?l.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else cH(e,r,!1,s,n,i,a);return u}function cH(e,r,t,n,i,a,o){r.writelen=n,r.writecb=o,r.writing=!0,r.sync=!0,r.destroyed?r.onwrite(new eKr("write")):t?e._writev(i,r.onwrite):e._write(i,a,r.onwrite),r.sync=!1}function lKr(e,r,t,n,i){--r.pendingcb,t?(process.nextTick(i,n),process.nextTick(xE,e,r),e._writableState.errorEmitted=!0,Ay(e,n)):(i(n),e._writableState.errorEmitted=!0,Ay(e,n),xE(e,r))}function cKr(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function fKr(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(typeof i!="function")throw new QVr;if(cKr(t),r)lKr(e,t,n,r,i);else{var a=K8e(t)||e.destroyed;!a&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&V8e(e,t),n?process.nextTick(W8e,e,t,a,i):W8e(e,t,a,i)}}function W8e(e,r,t,n){t||dKr(e,r),r.pendingcb--,n(),xE(e,r)}function dKr(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function V8e(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),a=r.corkedRequestsFree;a.entry=t;for(var o=0,s=!0;t;)i[o]=t,t.isBuf||(s=!1),t=t.next,o+=1;i.allBuffers=s,cH(e,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new z8e(r),r.bufferedRequestCount=0}else{for(;t;){var u=t.chunk,l=t.encoding,c=t.callback,f=r.objectMode?1:u.length;if(cH(e,r,!1,f,u,l,c),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}fi.prototype._write=function(e,r,t){t(new JVr("_write()"))};fi.prototype._writev=null;fi.prototype.end=function(e,r,t){var n=this._writableState;return typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||mKr(this,n,t),this};Object.defineProperty(fi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function K8e(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function pKr(e,r){e._final(function(t){r.pendingcb--,t&&Ay(e,t),r.prefinished=!0,e.emit("prefinish"),xE(e,r)})}function hKr(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"&&!r.destroyed?(r.pendingcb++,r.finalCalled=!0,process.nextTick(pKr,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function xE(e,r){var t=K8e(r);if(t&&(hKr(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"),r.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return t}function mKr(e,r,t){r.ending=!0,xE(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function gKr(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(fi.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(r){!this._writableState||(this._writableState.destroyed=r)}});fi.prototype.destroy=lH.destroy;fi.prototype._undestroy=lH.undestroy;fi.prototype._destroy=function(e,r){r(e)}});var sm=m((f4t,X8e)=>{"use strict";var vKr=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};X8e.exports=uc;var $8e=hH(),dH=fH();at()(uc,$8e);for(pH=vKr(dH.prototype),cR=0;cR<pH.length;cR++)fR=pH[cR],uc.prototype[fR]||(uc.prototype[fR]=dH.prototype[fR]);var pH,fR,cR;function uc(e){if(!(this instanceof uc))return new uc(e);$8e.call(this,e),dH.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",bKr)))}Object.defineProperty(uc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(uc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(uc.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function bKr(){this._writableState.ended||process.nextTick(yKr,this)}function yKr(e){e.end()}Object.defineProperty(uc.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(r){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=r,this._writableState.destroyed=r)}})});var vH=m(Q8e=>{"use strict";var mH=vu().Buffer,J8e=mH.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 xKr(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function _Kr(e){var r=xKr(e);if(typeof r!="string"&&(mH.isEncoding===J8e||!J8e(e)))throw new Error("Unknown encoding: "+e);return r||e}Q8e.StringDecoder=_E;function _E(e){this.encoding=_Kr(e);var r;switch(this.encoding){case"utf16le":this.text=CKr,this.end=DKr,r=4;break;case"utf8":this.fillLast=SKr,r=4;break;case"base64":this.text=kKr,this.end=OKr,r=3;break;default:this.write=RKr,this.end=FKr;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=mH.allocUnsafe(r)}_E.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""};_E.prototype.end=TKr;_E.prototype.text=AKr;_E.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 gH(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function EKr(e,r,t){var n=r.length-1;if(n<t)return 0;var i=gH(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=gH(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=gH(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function wKr(e,r,t){if((r[0]&192)!=128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!=128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!=128)return e.lastNeed=2,"\uFFFD"}}function SKr(e){var r=this.lastTotal-this.lastNeed,t=wKr(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function AKr(e,r){var t=EKr(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",r,n)}function TKr(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function CKr(e,r){if((e.length-r)%2==0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.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],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function DKr(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function kKr(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function OKr(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function RKr(e){return e.toString(this.encoding)}function FKr(e){return e&&e.length?this.write(e):""}});var dR=m((p4t,rDe)=>{"use strict";var Z8e=Up().codes.ERR_STREAM_PREMATURE_CLOSE;function IKr(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e.apply(this,n)}}}function PKr(){}function BKr(e){return e.setHeader&&typeof e.abort=="function"}function eDe(e,r,t){if(typeof r=="function")return eDe(e,null,r);r||(r={}),t=IKr(t||PKr);var n=r.readable||r.readable!==!1&&e.readable,i=r.writable||r.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){i=!1,o=!0,n||t.call(e)},u=e._readableState&&e._readableState.endEmitted,l=function(){n=!1,u=!0,i||t.call(e)},c=function(h){t.call(e,h)},f=function(){var h;if(n&&!u)return(!e._readableState||!e._readableState.ended)&&(h=new Z8e),t.call(e,h);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(h=new Z8e),t.call(e,h)},d=function(){e.req.on("finish",s)};return BKr(e)?(e.on("complete",s),e.on("abort",f),e.req?d():e.on("request",d)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",s),r.error!==!1&&e.on("error",c),e.on("close",f),function(){e.removeListener("complete",s),e.removeListener("abort",f),e.removeListener("request",d),e.req&&e.req.removeListener("finish",s),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",s),e.removeListener("end",l),e.removeListener("error",c),e.removeListener("close",f)}}rDe.exports=eDe});var nDe=m((h4t,tDe)=>{"use strict";var pR;function zp(e,r,t){return r=jKr(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function jKr(e){var r=MKr(e,"string");return typeof r=="symbol"?r:String(r)}function MKr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var LKr=dR(),Hp=Symbol("lastResolve"),um=Symbol("lastReject"),EE=Symbol("error"),hR=Symbol("ended"),lm=Symbol("lastPromise"),bH=Symbol("handlePromise"),cm=Symbol("stream");function Wp(e,r){return{value:e,done:r}}function qKr(e){var r=e[Hp];if(r!==null){var t=e[cm].read();t!==null&&(e[lm]=null,e[Hp]=null,e[um]=null,r(Wp(t,!1)))}}function NKr(e){process.nextTick(qKr,e)}function UKr(e,r){return function(t,n){e.then(function(){if(r[hR]){t(Wp(void 0,!0));return}r[bH](t,n)},n)}}var GKr=Object.getPrototypeOf(function(){}),zKr=Object.setPrototypeOf((pR={get stream(){return this[cm]},next:function(){var r=this,t=this[EE];if(t!==null)return Promise.reject(t);if(this[hR])return Promise.resolve(Wp(void 0,!0));if(this[cm].destroyed)return new Promise(function(o,s){process.nextTick(function(){r[EE]?s(r[EE]):o(Wp(void 0,!0))})});var n=this[lm],i;if(n)i=new Promise(UKr(n,this));else{var a=this[cm].read();if(a!==null)return Promise.resolve(Wp(a,!1));i=new Promise(this[bH])}return this[lm]=i,i}},zp(pR,Symbol.asyncIterator,function(){return this}),zp(pR,"return",function(){var r=this;return new Promise(function(t,n){r[cm].destroy(null,function(i){if(i){n(i);return}t(Wp(void 0,!0))})})}),pR),GKr),HKr=function(r){var t,n=Object.create(zKr,(t={},zp(t,cm,{value:r,writable:!0}),zp(t,Hp,{value:null,writable:!0}),zp(t,um,{value:null,writable:!0}),zp(t,EE,{value:null,writable:!0}),zp(t,hR,{value:r._readableState.endEmitted,writable:!0}),zp(t,bH,{value:function(a,o){var s=n[cm].read();s?(n[lm]=null,n[Hp]=null,n[um]=null,a(Wp(s,!1))):(n[Hp]=a,n[um]=o)},writable:!0}),t));return n[lm]=null,LKr(r,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[um];a!==null&&(n[lm]=null,n[Hp]=null,n[um]=null,a(i)),n[EE]=i;return}var o=n[Hp];o!==null&&(n[lm]=null,n[Hp]=null,n[um]=null,o(Wp(void 0,!0))),n[hR]=!0}),r.on("readable",NKr.bind(null,n)),n};tDe.exports=HKr});var sDe=m((m4t,oDe)=>{"use strict";function iDe(e,r,t,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){t(l);return}s.done?r(u):Promise.resolve(u).then(n,i)}function WKr(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var a=e.apply(r,t);function o(u){iDe(a,n,i,o,s,"next",u)}function s(u){iDe(a,n,i,o,s,"throw",u)}o(void 0)})}}function aDe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function VKr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?aDe(Object(t),!0).forEach(function(n){KKr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):aDe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function KKr(e,r,t){return r=YKr(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function YKr(e){var r=$Kr(e,"string");return typeof r=="symbol"?r:String(r)}function $Kr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var XKr=Up().codes.ERR_INVALID_ARG_TYPE;function JKr(e,r,t){var n;if(r&&typeof r.next=="function")n=r;else if(r&&r[Symbol.asyncIterator])n=r[Symbol.asyncIterator]();else if(r&&r[Symbol.iterator])n=r[Symbol.iterator]();else throw new XKr("iterable",["Iterable"],r);var i=new e(VKr({objectMode:!0},t)),a=!1;i._read=function(){a||(a=!0,o())};function o(){return s.apply(this,arguments)}function s(){return s=WKr(function*(){try{var u=yield n.next(),l=u.value,c=u.done;c?i.push(null):i.push(yield l)?o():a=!1}catch(f){i.destroy(f)}}),s.apply(this,arguments)}return i}oDe.exports=JKr});var hH=m((v4t,vDe)=>{"use strict";vDe.exports=zt;var Ty;zt.ReadableState=lDe;var g4t=require("events").EventEmitter,uDe=function(r,t){return r.listeners(t).length},wE=iH(),mR=require("buffer").Buffer,QKr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function ZKr(e){return mR.from(e)}function eYr(e){return mR.isBuffer(e)||e instanceof QKr}var yH=require("util"),yt;yH&&yH.debuglog?yt=yH.debuglog("stream"):yt=function(){};var rYr=j8e(),xH=sH(),tYr=uH(),nYr=tYr.getHighWaterMark,gR=Up().codes,iYr=gR.ERR_INVALID_ARG_TYPE,aYr=gR.ERR_STREAM_PUSH_AFTER_EOF,oYr=gR.ERR_METHOD_NOT_IMPLEMENTED,sYr=gR.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Cy,_H,EH;at()(zt,wE);var SE=xH.errorOrDestroy,wH=["error","close","destroy","pause","resume"];function uYr(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Array.isArray(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function lDe(e,r,t){Ty=Ty||sm(),e=e||{},typeof t!="boolean"&&(t=r instanceof Ty),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=nYr(this,e,"readableHighWaterMark",t),this.buffer=new rYr,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Cy||(Cy=vH().StringDecoder),this.decoder=new Cy(e.encoding),this.encoding=e.encoding)}function zt(e){if(Ty=Ty||sm(),!(this instanceof zt))return new zt(e);var r=this instanceof Ty;this._readableState=new lDe(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),wE.call(this)}Object.defineProperty(zt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){!this._readableState||(this._readableState.destroyed=r)}});zt.prototype.destroy=xH.destroy;zt.prototype._undestroy=xH.undestroy;zt.prototype._destroy=function(e,r){r(e)};zt.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=mR.from(e,r),r=""),n=!0),cDe(this,e,r,!1,n)};zt.prototype.unshift=function(e){return cDe(this,e,null,!0,!1)};function cDe(e,r,t,n,i){yt("readableAddChunk",r);var a=e._readableState;if(r===null)a.reading=!1,fYr(e,a);else{var o;if(i||(o=lYr(a,r)),o)SE(e,o);else if(a.objectMode||r&&r.length>0)if(typeof r!="string"&&!a.objectMode&&Object.getPrototypeOf(r)!==mR.prototype&&(r=ZKr(r)),n)a.endEmitted?SE(e,new sYr):SH(e,a,r,!0);else if(a.ended)SE(e,new aYr);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!t?(r=a.decoder.write(r),a.objectMode||r.length!==0?SH(e,a,r,!1):AH(e,a)):SH(e,a,r,!1)}else n||(a.reading=!1,AH(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function SH(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,e.emit("data",t)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&vR(e)),AH(e,r)}function lYr(e,r){var t;return!eYr(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new iYr("chunk",["string","Buffer","Uint8Array"],r)),t}zt.prototype.isPaused=function(){return this._readableState.flowing===!1};zt.prototype.setEncoding=function(e){Cy||(Cy=vH().StringDecoder);var r=new Cy(e);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var t=this._readableState.buffer.head,n="";t!==null;)n+=r.write(t.data),t=t.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var fDe=1073741824;function cYr(e){return e>=fDe?e=fDe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function dDe(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=cYr(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}zt.prototype.read=function(e){yt("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return yt("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?CH(this):vR(this),null;if(e=dDe(e,r),e===0&&r.ended)return r.length===0&&CH(this),null;var n=r.needReadable;yt("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,yt("length less than watermark",n)),r.ended||r.reading?(n=!1,yt("reading or ended",n)):n&&(yt("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=dDe(t,r)));var i;return e>0?i=mDe(e,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&CH(this)),i!==null&&this.emit("data",i),i};function fYr(e,r){if(yt("onEofChunk"),!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.sync?vR(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,pDe(e)))}}function vR(e){var r=e._readableState;yt("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(yt("emitReadable",r.flowing),r.emittedReadable=!0,process.nextTick(pDe,e))}function pDe(e){var r=e._readableState;yt("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,TH(e)}function AH(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(dYr,e,r))}function dYr(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var t=r.length;if(yt("maybeReadMore read 0"),e.read(0),t===r.length)break}r.readingMore=!1}zt.prototype._read=function(e){SE(this,new oYr("_read()"))};zt.prototype.pipe=function(e,r){var t=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,yt("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:b;n.endEmitted?process.nextTick(a):t.once("end",a),e.on("unpipe",o);function o(v,y){yt("onunpipe"),v===t&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,c())}function s(){yt("onend"),e.end()}var u=pYr(t);e.on("drain",u);var l=!1;function c(){yt("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",b),t.removeListener("data",f),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}t.on("data",f);function f(v){yt("ondata");var y=e.write(v);yt("dest.write",y),y===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&gDe(n.pipes,e)!==-1)&&!l&&(yt("false write response, pause",n.awaitDrain),n.awaitDrain++),t.pause())}function d(v){yt("onerror",v),b(),e.removeListener("error",d),uDe(e,"error")===0&&SE(e,v)}uYr(e,"error",d);function p(){e.removeListener("finish",h),b()}e.once("close",p);function h(){yt("onfinish"),e.removeListener("close",p),b()}e.once("finish",h);function b(){yt("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(yt("pipe resume"),t.resume()),e};function pYr(e){return function(){var t=e._readableState;yt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&uDe(e,"data")&&(t.flowing=!0,TH(e))}}zt.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=gDe(r.pipes,e);return o===-1?this:(r.pipes.splice(o,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};zt.prototype.on=function(e,r){var t=wE.prototype.on.call(this,e,r),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,yt("on readable",n.length,n.reading),n.length?vR(this):n.reading||process.nextTick(hYr,this)),t};zt.prototype.addListener=zt.prototype.on;zt.prototype.removeListener=function(e,r){var t=wE.prototype.removeListener.call(this,e,r);return e==="readable"&&process.nextTick(hDe,this),t};zt.prototype.removeAllListeners=function(e){var r=wE.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(hDe,this),r};function hDe(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:e.listenerCount("data")>0&&e.resume()}function hYr(e){yt("readable nexttick read 0"),e.read(0)}zt.prototype.resume=function(){var e=this._readableState;return e.flowing||(yt("resume"),e.flowing=!e.readableListening,mYr(this,e)),e.paused=!1,this};function mYr(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(gYr,e,r))}function gYr(e,r){yt("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),TH(e),r.flowing&&!r.reading&&e.read(0)}zt.prototype.pause=function(){return yt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(yt("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function TH(e){var r=e._readableState;for(yt("flow",r.flowing);r.flowing&&e.read()!==null;);}zt.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(yt("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(yt("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var s=r.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a<wH.length;a++)e.on(wH[a],this.emit.bind(this,wH[a]));return this._read=function(o){yt("wrapped _read",o),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(zt.prototype[Symbol.asyncIterator]=function(){return _H===void 0&&(_H=nDe()),_H(this)});Object.defineProperty(zt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(zt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(zt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}});zt._fromList=mDe;Object.defineProperty(zt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function mDe(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.first():t=r.buffer.concat(r.length),r.buffer.clear()):t=r.buffer.consume(e,r.decoder),t}function CH(e){var r=e._readableState;yt("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,process.nextTick(vYr,r,e))}function vYr(e,r){if(yt("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var t=r._writableState;(!t||t.autoDestroy&&t.finished)&&r.destroy()}}typeof Symbol=="function"&&(zt.from=function(e,r){return EH===void 0&&(EH=sDe()),EH(zt,e,r)});function gDe(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var DH=m((b4t,yDe)=>{"use strict";yDe.exports=Rf;var bR=Up().codes,bYr=bR.ERR_METHOD_NOT_IMPLEMENTED,yYr=bR.ERR_MULTIPLE_CALLBACK,xYr=bR.ERR_TRANSFORM_ALREADY_TRANSFORMING,_Yr=bR.ERR_TRANSFORM_WITH_LENGTH_0,yR=sm();at()(Rf,yR);function EYr(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(n===null)return this.emit("error",new yYr);t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Rf(e){if(!(this instanceof Rf))return new Rf(e);yR.call(this,e),this._transformState={afterTransform:EYr.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",wYr)}function wYr(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(r,t){bDe(e,r,t)}):bDe(this,null,null)}Rf.prototype.push=function(e,r){return this._transformState.needTransform=!1,yR.prototype.push.call(this,e,r)};Rf.prototype._transform=function(e,r,t){t(new bYr("_transform()"))};Rf.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Rf.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};Rf.prototype._destroy=function(e,r){yR.prototype._destroy.call(this,e,function(t){r(t)})};function bDe(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),e._writableState.length)throw new _Yr;if(e._transformState.transforming)throw new xYr;return e.push(null)}});var EDe=m((y4t,_De)=>{"use strict";_De.exports=AE;var xDe=DH();at()(AE,xDe);function AE(e){if(!(this instanceof AE))return new AE(e);xDe.call(this,e)}AE.prototype._transform=function(e,r,t){t(null,e)}});var CDe=m((x4t,TDe)=>{"use strict";var kH;function SYr(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var wDe=Up().codes,AYr=wDe.ERR_MISSING_ARGS,TYr=wDe.ERR_STREAM_DESTROYED;function SDe(e){if(e)throw e}function CYr(e){return e.setHeader&&typeof e.abort=="function"}function DYr(e,r,t,n){n=SYr(n);var i=!1;e.on("close",function(){i=!0}),kH===void 0&&(kH=dR()),kH(e,{readable:r,writable:t},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,CYr(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new TYr("pipe"))}}}function ADe(e){e()}function kYr(e,r){return e.pipe(r)}function OYr(e){return!e.length||typeof e[e.length-1]!="function"?SDe:e.pop()}function RYr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=OYr(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new AYr("streams");var i,a=r.map(function(o,s){var u=s<r.length-1,l=s>0;return DYr(o,u,l,function(c){i||(i=c),c&&a.forEach(ADe),!u&&(a.forEach(ADe),n(i))})});return r.reduce(kYr)}TDe.exports=RYr});var OH=m((Qs,CE)=>{var TE=require("stream");process.env.READABLE_STREAM==="disable"&&TE?(CE.exports=TE.Readable,Object.assign(CE.exports,TE),CE.exports.Stream=TE):(Qs=CE.exports=hH(),Qs.Stream=TE||Qs,Qs.Readable=Qs,Qs.Writable=fH(),Qs.Duplex=sm(),Qs.Transform=DH(),Qs.PassThrough=EDe(),Qs.finished=dR(),Qs.pipeline=CDe())});var FDe=m((_4t,RDe)=>{var RH=require("fs"),DDe=q3e(),kDe=U3e(),FH=require("path"),lc=wy(),FYr=require("util").inherits,di=k8e(),ODe=OH().Transform,IH=process.platform==="win32",Qt=function(e,r){if(!(this instanceof Qt))return new Qt(e,r);typeof e!="string"&&(r=e,e="zip"),r=this.options=lc.defaults(r,{highWaterMark:1024*1024,statConcurrency:4}),ODe.call(this,r),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=kDe.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=kDe.queue(this._onStatQueueTask.bind(this),r.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};FYr(Qt,ODe);Qt.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()};Qt.prototype._append=function(e,r){r=r||{};var t={source:null,filepath:e};r.name||(r.name=e),r.sourcePath=e,t.data=r,this._entriesCount++,r.stats&&r.stats instanceof RH.Stats?(t=this._updateQueueTaskWithStats(t,r.stats),t&&(r.stats.size&&(this._fsEntriesTotalBytes+=r.stats.size),this._queue.push(t))):this._statQueue.push(t)};Qt.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)};Qt.prototype._maybeFinalize=function(){return this._state.finalizing||this._state.finalized||this._state.aborted?!1:this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()?(this._finalize(),!0):!1};Qt.prototype._moduleAppend=function(e,r,t){if(this._state.aborted){t();return}this._module.append(e,r,function(n){if(this._task=null,this._state.aborted){this._shutdown();return}if(n){this.emit("error",n),setImmediate(t);return}this.emit("entry",r),this._entriesProcessedCount++,r.stats&&r.stats.size&&(this._fsEntriesProcessedBytes+=r.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(t)}.bind(this))};Qt.prototype._moduleFinalize=function(){typeof this._module.finalize=="function"?this._module.finalize():typeof this._module.end=="function"?this._module.end():this.emit("error",new di("NOENDMETHOD"))};Qt.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0};Qt.prototype._moduleSupports=function(e){return!this._module.supports||!this._module.supports[e]?!1:this._module.supports[e]};Qt.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1};Qt.prototype._normalizeEntryData=function(e,r){e=lc.defaults(e,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),r&&e.stats===!1&&(e.stats=r);var t=e.type==="directory";return e.name&&(typeof e.prefix=="string"&&e.prefix!==""&&(e.name=e.prefix+"/"+e.name,e.prefix=null),e.name=lc.sanitizePath(e.name),e.type!=="symlink"&&e.name.slice(-1)==="/"?(t=!0,e.type="directory"):t&&(e.name+="/")),typeof e.mode=="number"?IH?e.mode&=511:e.mode&=4095:e.stats&&e.mode===null?(IH?e.mode=e.stats.mode&511:e.mode=e.stats.mode&4095,IH&&t&&(e.mode=493)):e.mode===null&&(e.mode=t?493:420),e.stats&&e.date===null?e.date=e.stats.mtime:e.date=lc.dateify(e.date),e};Qt.prototype._onModuleError=function(e){this.emit("error",e)};Qt.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()};Qt.prototype._onQueueTask=function(e,r){var t=()=>{e.data.callback&&e.data.callback(),r()};if(this._state.finalizing||this._state.finalized||this._state.aborted){t();return}this._task=e,this._moduleAppend(e.source,e.data,t)};Qt.prototype._onStatQueueTask=function(e,r){if(this._state.finalizing||this._state.finalized||this._state.aborted){r();return}RH.lstat(e.filepath,function(t,n){if(this._state.aborted){setImmediate(r);return}if(t){this._entriesCount--,this.emit("warning",t),setImmediate(r);return}e=this._updateQueueTaskWithStats(e,n),e&&(n.size&&(this._fsEntriesTotalBytes+=n.size),this._queue.push(e)),setImmediate(r)}.bind(this))};Qt.prototype._shutdown=function(){this._moduleUnpipe(),this.end()};Qt.prototype._transform=function(e,r,t){e&&(this._pointer+=e.length),t(null,e)};Qt.prototype._updateQueueTaskWithStats=function(e,r){if(r.isFile())e.data.type="file",e.data.sourceType="stream",e.source=lc.lazyReadStream(e.filepath);else if(r.isDirectory()&&this._moduleSupports("directory"))e.data.name=lc.trailingSlashIt(e.data.name),e.data.type="directory",e.data.sourcePath=lc.trailingSlashIt(e.filepath),e.data.sourceType="buffer",e.source=Buffer.concat([]);else if(r.isSymbolicLink()&&this._moduleSupports("symlink")){var t=RH.readlinkSync(e.filepath),n=FH.dirname(e.filepath);e.data.type="symlink",e.data.linkname=FH.relative(n,FH.resolve(n,t)),e.data.sourceType="buffer",e.source=Buffer.concat([])}else return r.isDirectory()?this.emit("warning",new di("DIRECTORYNOTSUPPORTED",e.data)):r.isSymbolicLink()?this.emit("warning",new di("SYMLINKNOTSUPPORTED",e.data)):this.emit("warning",new di("ENTRYNOTSUPPORTED",e.data)),null;return e.data=this._normalizeEntryData(e.data,r),e};Qt.prototype.abort=function(){return this._state.aborted||this._state.finalized?this:(this._abort(),this)};Qt.prototype.append=function(e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new di("QUEUECLOSED")),this;if(r=this._normalizeEntryData(r),typeof r.name!="string"||r.name.length===0)return this.emit("error",new di("ENTRYNAMEREQUIRED")),this;if(r.type==="directory"&&!this._moduleSupports("directory"))return this.emit("error",new di("DIRECTORYNOTSUPPORTED",{name:r.name})),this;if(e=lc.normalizeInputSource(e),Buffer.isBuffer(e))r.sourceType="buffer";else if(lc.isStream(e))r.sourceType="stream";else return this.emit("error",new di("INPUTSTEAMBUFFERREQUIRED",{name:r.name})),this;return this._entriesCount++,this._queue.push({data:r,source:e}),this};Qt.prototype.directory=function(e,r,t){if(this._state.finalize||this._state.aborted)return this.emit("error",new di("QUEUECLOSED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new di("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,r===!1?r="":typeof r!="string"&&(r=e);var n=!1;typeof t=="function"?(n=t,t={}):typeof t!="object"&&(t={});var i={stat:!0,dot:!0};function a(){this._pending--,this._maybeFinalize()}function o(l){this.emit("error",l)}function s(l){u.pause();var c=!1,f=Object.assign({},t);f.name=l.relative,f.prefix=r,f.stats=l.stat,f.callback=u.resume.bind(u);try{if(n){if(f=n(f),f===!1)c=!0;else if(typeof f!="object")throw new di("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:e})}}catch(d){this.emit("error",d);return}if(c){u.resume();return}this._append(l.absolute,f)}var u=DDe(e,i);return u.on("error",o.bind(this)),u.on("match",s.bind(this)),u.on("end",a.bind(this)),this};Qt.prototype.file=function(e,r){return this._state.finalize||this._state.aborted?(this.emit("error",new di("QUEUECLOSED")),this):typeof e!="string"||e.length===0?(this.emit("error",new di("FILEFILEPATHREQUIRED")),this):(this._append(e,r),this)};Qt.prototype.glob=function(e,r,t){this._pending++,r=lc.defaults(r,{stat:!0,pattern:e});function n(){this._pending--,this._maybeFinalize()}function i(s){this.emit("error",s)}function a(s){o.pause();var u=Object.assign({},t);u.callback=o.resume.bind(o),u.stats=s.stat,u.name=s.relative,this._append(s.absolute,u)}var o=DDe(r.cwd||".",r);return o.on("error",i.bind(this)),o.on("match",a.bind(this)),o.on("end",n.bind(this)),this};Qt.prototype.finalize=function(){if(this._state.aborted){var e=new di("ABORTED");return this.emit("error",e),Promise.reject(e)}if(this._state.finalize){var r=new di("FINALIZING");return this.emit("error",r),Promise.reject(r)}this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var t=this;return new Promise(function(n,i){var a;t._module.on("end",function(){a||n()}),t._module.on("error",function(o){a=!0,i(o)})})};Qt.prototype.setFormat=function(e){return this._format?(this.emit("error",new di("FORMATSET")),this):(this._format=e,this)};Qt.prototype.setModule=function(e){return this._state.aborted?(this.emit("error",new di("ABORTED")),this):this._state.module?(this.emit("error",new di("MODULESET")),this):(this._module=e,this._modulePipe(),this)};Qt.prototype.symlink=function(e,r,t){if(this._state.finalize||this._state.aborted)return this.emit("error",new di("QUEUECLOSED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new di("SYMLINKFILEPATHREQUIRED")),this;if(typeof r!="string"||r.length===0)return this.emit("error",new di("SYMLINKTARGETREQUIRED",{filepath:e})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new di("SYMLINKNOTSUPPORTED",{filepath:e})),this;var n={};return n.type="symlink",n.name=e.replace(/\\/g,"/"),n.linkname=r.replace(/\\/g,"/"),n.sourceType="buffer",typeof t=="number"&&(n.mode=t),this._entriesCount++,this._queue.push({data:n,source:Buffer.concat([])}),this};Qt.prototype.pointer=function(){return this._pointer};Qt.prototype.use=function(e){return this._streams.push(e),this};RDe.exports=Qt});var _R=m((E4t,IDe)=>{var xR=IDe.exports=function(){};xR.prototype.getName=function(){};xR.prototype.getSize=function(){};xR.prototype.getLastModifiedDate=function(){};xR.prototype.isDirectory=function(){}});var ER=m((w4t,PDe)=>{var Zs=PDe.exports={};Zs.dateToDos=function(e,r){r=r||!1;var t=r?e.getFullYear():e.getUTCFullYear();if(t<1980)return 2162688;if(t>=2044)return 2141175677;var n={year:t,month:r?e.getMonth():e.getUTCMonth(),date:r?e.getDate():e.getUTCDate(),hours:r?e.getHours():e.getUTCHours(),minutes:r?e.getMinutes():e.getUTCMinutes(),seconds:r?e.getSeconds():e.getUTCSeconds()};return n.year-1980<<25|n.month+1<<21|n.date<<16|n.hours<<11|n.minutes<<5|n.seconds/2};Zs.dosToDate=function(e){return new Date((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1)};Zs.fromDosTime=function(e){return Zs.dosToDate(e.readUInt32LE(0))};Zs.getEightBytes=function(e){var r=Buffer.alloc(8);return r.writeUInt32LE(e%4294967296,0),r.writeUInt32LE(e/4294967296|0,4),r};Zs.getShortBytes=function(e){var r=Buffer.alloc(2);return r.writeUInt16LE((e&65535)>>>0,0),r};Zs.getShortBytesValue=function(e,r){return e.readUInt16LE(r)};Zs.getLongBytes=function(e){var r=Buffer.alloc(4);return r.writeUInt32LE((e&4294967295)>>>0,0),r};Zs.getLongBytesValue=function(e,r){return e.readUInt32LE(r)};Zs.toDosTime=function(e){return Zs.getLongBytes(Zs.dateToDos(e))}});var PH=m((S4t,NDe)=>{var BDe=ER(),jDe=1<<3,MDe=1<<0,IYr=1<<2,PYr=1<<1,LDe=1<<6,qDe=1<<11,La=NDe.exports=function(){return this instanceof La?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new La};La.prototype.encode=function(){return BDe.getShortBytes((this.descriptor?jDe:0)|(this.utf8?qDe:0)|(this.encryption?MDe:0)|(this.strongEncryption?LDe:0))};La.prototype.parse=function(e,r){var t=BDe.getShortBytesValue(e,r),n=new La;return n.useDataDescriptor((t&jDe)!=0),n.useUTF8ForNames((t&qDe)!=0),n.useStrongEncryption((t&LDe)!=0),n.useEncryption((t&MDe)!=0),n.setSlidingDictionarySize((t&PYr)!=0?8192:4096),n.setNumberOfShannonFanoTrees((t&IYr)!=0?3:2),n};La.prototype.setNumberOfShannonFanoTrees=function(e){this.numberOfShannonFanoTrees=e};La.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees};La.prototype.setSlidingDictionarySize=function(e){this.slidingDictionarySize=e};La.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize};La.prototype.useDataDescriptor=function(e){this.descriptor=e};La.prototype.usesDataDescriptor=function(){return this.descriptor};La.prototype.useEncryption=function(e){this.encryption=e};La.prototype.usesEncryption=function(){return this.encryption};La.prototype.useStrongEncryption=function(e){this.strongEncryption=e};La.prototype.usesStrongEncryption=function(){return this.strongEncryption};La.prototype.useUTF8ForNames=function(e){this.utf8=e};La.prototype.usesUTF8ForNames=function(){return this.utf8}});var GDe=m((A4t,UDe)=>{UDe.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}});var BH=m((T4t,zDe)=>{zDe.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}});var jH=m((C4t,YDe)=>{var BYr=require("util").inherits,jYr=yz(),HDe=_R(),WDe=PH(),VDe=GDe(),go=BH(),KDe=ER(),xt=YDe.exports=function(e){if(!(this instanceof xt))return new xt(e);HDe.call(this),this.platform=go.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new WDe,this.crc=0,this.time=-1,this.minver=go.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,e&&this.setName(e)};BYr(xt,HDe);xt.prototype.getCentralDirectoryExtra=function(){return this.getExtra()};xt.prototype.getComment=function(){return this.comment!==null?this.comment:""};xt.prototype.getCompressedSize=function(){return this.csize};xt.prototype.getCrc=function(){return this.crc};xt.prototype.getExternalAttributes=function(){return this.exattr};xt.prototype.getExtra=function(){return this.extra!==null?this.extra:go.EMPTY};xt.prototype.getGeneralPurposeBit=function(){return this.gpb};xt.prototype.getInternalAttributes=function(){return this.inattr};xt.prototype.getLastModifiedDate=function(){return this.getTime()};xt.prototype.getLocalFileDataExtra=function(){return this.getExtra()};xt.prototype.getMethod=function(){return this.method};xt.prototype.getName=function(){return this.name};xt.prototype.getPlatform=function(){return this.platform};xt.prototype.getSize=function(){return this.size};xt.prototype.getTime=function(){return this.time!==-1?KDe.dosToDate(this.time):-1};xt.prototype.getTimeDos=function(){return this.time!==-1?this.time:0};xt.prototype.getUnixMode=function(){return this.platform!==go.PLATFORM_UNIX?0:this.getExternalAttributes()>>go.SHORT_SHIFT&go.SHORT_MASK};xt.prototype.getVersionNeededToExtract=function(){return this.minver};xt.prototype.setComment=function(e){Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=e};xt.prototype.setCompressedSize=function(e){if(e<0)throw new Error("invalid entry compressed size");this.csize=e};xt.prototype.setCrc=function(e){if(e<0)throw new Error("invalid entry crc32");this.crc=e};xt.prototype.setExternalAttributes=function(e){this.exattr=e>>>0};xt.prototype.setExtra=function(e){this.extra=e};xt.prototype.setGeneralPurposeBit=function(e){if(!(e instanceof WDe))throw new Error("invalid entry GeneralPurposeBit");this.gpb=e};xt.prototype.setInternalAttributes=function(e){this.inattr=e};xt.prototype.setMethod=function(e){if(e<0)throw new Error("invalid entry compression method");this.method=e};xt.prototype.setName=function(e,r=!1){e=jYr(e,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),r&&(e=`/${e}`),Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=e};xt.prototype.setPlatform=function(e){this.platform=e};xt.prototype.setSize=function(e){if(e<0)throw new Error("invalid entry size");this.size=e};xt.prototype.setTime=function(e,r){if(!(e instanceof Date))throw new Error("invalid entry time");this.time=KDe.dateToDos(e,r)};xt.prototype.setUnixMode=function(e){e|=this.isDirectory()?go.S_IFDIR:go.S_IFREG;var r=0;r|=e<<go.SHORT_SHIFT|(this.isDirectory()?go.S_DOS_D:go.S_DOS_A),this.setExternalAttributes(r),this.mode=e&go.MODE_MASK,this.platform=go.PLATFORM_UNIX};xt.prototype.setVersionNeededToExtract=function(e){this.minver=e};xt.prototype.isDirectory=function(){return this.getName().slice(-1)==="/"};xt.prototype.isUnixSymlink=function(){return(this.getUnixMode()&VDe.FILE_TYPE_FLAG)===VDe.LINK_FLAG};xt.prototype.isZip64=function(){return this.csize>go.ZIP64_MAGIC||this.size>go.ZIP64_MAGIC}});var MH=m((D4t,$De)=>{$De.exports=require("stream")});var rke=m((k4t,eke)=>{"use strict";function XDe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function JDe(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?XDe(Object(t),!0).forEach(function(n){MYr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):XDe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function MYr(e,r,t){return r=ZDe(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function LYr(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function QDe(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ZDe(n.key),n)}}function qYr(e,r,t){return r&&QDe(e.prototype,r),t&&QDe(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZDe(e){var r=NYr(e,"string");return typeof r=="symbol"?r:String(r)}function NYr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var UYr=require("buffer"),wR=UYr.Buffer,GYr=require("util"),LH=GYr.inspect,zYr=LH&&LH.custom||"inspect";function HYr(e,r,t){wR.prototype.copy.call(e,r,t)}eke.exports=function(){function e(){LYr(this,e),this.head=null,this.tail=null,this.length=0}return qYr(e,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(this.length===0)return wR.alloc(0);for(var n=wR.allocUnsafe(t>>>0),i=this.head,a=0;i;)HYr(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):t===this.head.data.length?i=this.shift():i=n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,a=n.data;for(t-=a.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?a+=o:a+=o.slice(0,t),t-=s,t===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(t){var n=wR.allocUnsafe(t),i=this.head,a=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,t===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:zYr,value:function(t,n){return LH(this,JDe(JDe({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var NH=m((O4t,nke)=>{"use strict";function WYr(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(qH,this,e)):process.nextTick(qH,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!r&&a?t._writableState?t._writableState.errorEmitted?process.nextTick(SR,t):(t._writableState.errorEmitted=!0,process.nextTick(tke,t,a)):process.nextTick(tke,t,a):r?(process.nextTick(SR,t),r(a)):process.nextTick(SR,t)}),this)}function tke(e,r){qH(e,r),SR(e)}function SR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function VYr(){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 qH(e,r){e.emit("error",r)}function KYr(e,r){var t=e._readableState,n=e._writableState;t&&t.autoDestroy||n&&n.autoDestroy?e.destroy(r):e.emit("error",r)}nke.exports={destroy:WYr,undestroy:VYr,errorOrDestroy:KYr}});var Vp=m((R4t,oke)=>{"use strict";var ike={};function eu(e,r,t){t||(t=Error);function n(a,o,s){return typeof r=="string"?r:r(a,o,s)}class i extends t{constructor(o,s,u){super(n(o,s,u))}}i.prototype.name=t.name,i.prototype.code=e,ike[e]=i}function ake(e,r){if(Array.isArray(e)){let t=e.length;return e=e.map(n=>String(n)),t>2?`one of ${r} ${e.slice(0,t-1).join(", ")}, or `+e[t-1]:t===2?`one of ${r} ${e[0]} or ${e[1]}`:`of ${r} ${e[0]}`}else return`of ${r} ${String(e)}`}function YYr(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function $Yr(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function XYr(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}eu("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);eu("ERR_INVALID_ARG_TYPE",function(e,r,t){let n;typeof r=="string"&&YYr(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";let i;if($Yr(e," argument"))i=`The ${e} ${n} ${ake(r,"type")}`;else{let a=XYr(e,".")?"property":"argument";i=`The "${e}" ${a} ${n} ${ake(r,"type")}`}return i+=`. Received type ${typeof t}`,i},TypeError);eu("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");eu("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});eu("ERR_STREAM_PREMATURE_CLOSE","Premature close");eu("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});eu("ERR_MULTIPLE_CALLBACK","Callback called multiple times");eu("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");eu("ERR_STREAM_WRITE_AFTER_END","write after end");eu("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);eu("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);eu("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");oke.exports.codes=ike});var UH=m((F4t,ske)=>{"use strict";var JYr=Vp().codes.ERR_INVALID_OPT_VALUE;function QYr(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function ZYr(e,r,t,n){var i=QYr(r,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?t:"highWaterMark";throw new JYr(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}ske.exports={getHighWaterMark:ZYr}});var HH=m((I4t,pke)=>{"use strict";pke.exports=pi;function uke(e){var r=this;this.next=null,this.entry=null,this.finish=function(){T$r(r,e)}}var Dy;pi.WritableState=DE;var e$r={deprecate:d0()},lke=MH(),AR=require("buffer").Buffer,r$r=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function t$r(e){return AR.from(e)}function n$r(e){return AR.isBuffer(e)||e instanceof r$r}var GH=NH(),i$r=UH(),a$r=i$r.getHighWaterMark,Kp=Vp().codes,o$r=Kp.ERR_INVALID_ARG_TYPE,s$r=Kp.ERR_METHOD_NOT_IMPLEMENTED,u$r=Kp.ERR_MULTIPLE_CALLBACK,l$r=Kp.ERR_STREAM_CANNOT_PIPE,c$r=Kp.ERR_STREAM_DESTROYED,f$r=Kp.ERR_STREAM_NULL_VALUES,d$r=Kp.ERR_STREAM_WRITE_AFTER_END,p$r=Kp.ERR_UNKNOWN_ENCODING,ky=GH.errorOrDestroy;at()(pi,lke);function h$r(){}function DE(e,r,t){Dy=Dy||fm(),e=e||{},typeof t!="boolean"&&(t=r instanceof Dy),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=a$r(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){_$r(r,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new uke(this)}DE.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(DE.prototype,"buffer",{get:e$r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var TR;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(TR=Function.prototype[Symbol.hasInstance],Object.defineProperty(pi,Symbol.hasInstance,{value:function(r){return TR.call(this,r)?!0:this!==pi?!1:r&&r._writableState instanceof DE}})):TR=function(r){return r instanceof this};function pi(e){Dy=Dy||fm();var r=this instanceof Dy;if(!r&&!TR.call(pi,this))return new pi(e);this._writableState=new DE(e,this,r),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)),lke.call(this)}pi.prototype.pipe=function(){ky(this,new l$r)};function m$r(e,r){var t=new d$r;ky(e,t),process.nextTick(r,t)}function g$r(e,r,t,n){var i;return t===null?i=new f$r:typeof t!="string"&&!r.objectMode&&(i=new o$r("chunk",["string","Buffer"],t)),i?(ky(e,i),process.nextTick(n,i),!1):!0}pi.prototype.write=function(e,r,t){var n=this._writableState,i=!1,a=!n.objectMode&&n$r(e);return a&&!AR.isBuffer(e)&&(e=t$r(e)),typeof r=="function"&&(t=r,r=null),a?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=h$r),n.ending?m$r(this,t):(a||g$r(this,n,e,t))&&(n.pendingcb++,i=b$r(this,n,a,e,r,t)),i};pi.prototype.cork=function(){this._writableState.corked++};pi.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&fke(this,e))};pi.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new p$r(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(pi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function v$r(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=AR.from(r,t)),r}Object.defineProperty(pi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function b$r(e,r,t,n,i,a){if(!t){var o=v$r(r,n,i);n!==o&&(t=!0,i="buffer",n=o)}var s=r.objectMode?1:n.length;r.length+=s;var u=r.length<r.highWaterMark;if(u||(r.needDrain=!0),r.writing||r.corked){var l=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:a,next:null},l?l.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else zH(e,r,!1,s,n,i,a);return u}function zH(e,r,t,n,i,a,o){r.writelen=n,r.writecb=o,r.writing=!0,r.sync=!0,r.destroyed?r.onwrite(new c$r("write")):t?e._writev(i,r.onwrite):e._write(i,a,r.onwrite),r.sync=!1}function y$r(e,r,t,n,i){--r.pendingcb,t?(process.nextTick(i,n),process.nextTick(kE,e,r),e._writableState.errorEmitted=!0,ky(e,n)):(i(n),e._writableState.errorEmitted=!0,ky(e,n),kE(e,r))}function x$r(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function _$r(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(typeof i!="function")throw new u$r;if(x$r(t),r)y$r(e,t,n,r,i);else{var a=dke(t)||e.destroyed;!a&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&fke(e,t),n?process.nextTick(cke,e,t,a,i):cke(e,t,a,i)}}function cke(e,r,t,n){t||E$r(e,r),r.pendingcb--,n(),kE(e,r)}function E$r(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function fke(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),a=r.corkedRequestsFree;a.entry=t;for(var o=0,s=!0;t;)i[o]=t,t.isBuf||(s=!1),t=t.next,o+=1;i.allBuffers=s,zH(e,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new uke(r),r.bufferedRequestCount=0}else{for(;t;){var u=t.chunk,l=t.encoding,c=t.callback,f=r.objectMode?1:u.length;if(zH(e,r,!1,f,u,l,c),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}pi.prototype._write=function(e,r,t){t(new s$r("_write()"))};pi.prototype._writev=null;pi.prototype.end=function(e,r,t){var n=this._writableState;return typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||A$r(this,n,t),this};Object.defineProperty(pi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function dke(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function w$r(e,r){e._final(function(t){r.pendingcb--,t&&ky(e,t),r.prefinished=!0,e.emit("prefinish"),kE(e,r)})}function S$r(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"&&!r.destroyed?(r.pendingcb++,r.finalCalled=!0,process.nextTick(w$r,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function kE(e,r){var t=dke(r);if(t&&(S$r(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"),r.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return t}function A$r(e,r,t){r.ending=!0,kE(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function T$r(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(pi.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(r){!this._writableState||(this._writableState.destroyed=r)}});pi.prototype.destroy=GH.destroy;pi.prototype._undestroy=GH.undestroy;pi.prototype._destroy=function(e,r){r(e)}});var fm=m((P4t,mke)=>{"use strict";var C$r=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};mke.exports=cc;var hke=KH(),WH=HH();at()(cc,hke);for(VH=C$r(WH.prototype),CR=0;CR<VH.length;CR++)DR=VH[CR],cc.prototype[DR]||(cc.prototype[DR]=WH.prototype[DR]);var VH,DR,CR;function cc(e){if(!(this instanceof cc))return new cc(e);hke.call(this,e),WH.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",D$r)))}Object.defineProperty(cc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(cc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(cc.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function D$r(){this._writableState.ended||process.nextTick(k$r,this)}function k$r(e){e.end()}Object.defineProperty(cc.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(r){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=r,this._writableState.destroyed=r)}})});var XH=m(vke=>{"use strict";var YH=vu().Buffer,gke=YH.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 O$r(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function R$r(e){var r=O$r(e);if(typeof r!="string"&&(YH.isEncoding===gke||!gke(e)))throw new Error("Unknown encoding: "+e);return r||e}vke.StringDecoder=OE;function OE(e){this.encoding=R$r(e);var r;switch(this.encoding){case"utf16le":this.text=M$r,this.end=L$r,r=4;break;case"utf8":this.fillLast=P$r,r=4;break;case"base64":this.text=q$r,this.end=N$r,r=3;break;default:this.write=U$r,this.end=G$r;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=YH.allocUnsafe(r)}OE.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""};OE.prototype.end=j$r;OE.prototype.text=B$r;OE.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 $H(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function F$r(e,r,t){var n=r.length-1;if(n<t)return 0;var i=$H(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=$H(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=$H(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function I$r(e,r,t){if((r[0]&192)!=128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!=128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!=128)return e.lastNeed=2,"\uFFFD"}}function P$r(e){var r=this.lastTotal-this.lastNeed,t=I$r(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function B$r(e,r){var t=F$r(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",r,n)}function j$r(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function M$r(e,r){if((e.length-r)%2==0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.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],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function L$r(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function q$r(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function N$r(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function U$r(e){return e.toString(this.encoding)}function G$r(e){return e&&e.length?this.write(e):""}});var kR=m((j4t,xke)=>{"use strict";var bke=Vp().codes.ERR_STREAM_PREMATURE_CLOSE;function z$r(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e.apply(this,n)}}}function H$r(){}function W$r(e){return e.setHeader&&typeof e.abort=="function"}function yke(e,r,t){if(typeof r=="function")return yke(e,null,r);r||(r={}),t=z$r(t||H$r);var n=r.readable||r.readable!==!1&&e.readable,i=r.writable||r.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){i=!1,o=!0,n||t.call(e)},u=e._readableState&&e._readableState.endEmitted,l=function(){n=!1,u=!0,i||t.call(e)},c=function(h){t.call(e,h)},f=function(){var h;if(n&&!u)return(!e._readableState||!e._readableState.ended)&&(h=new bke),t.call(e,h);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(h=new bke),t.call(e,h)},d=function(){e.req.on("finish",s)};return W$r(e)?(e.on("complete",s),e.on("abort",f),e.req?d():e.on("request",d)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",s),r.error!==!1&&e.on("error",c),e.on("close",f),function(){e.removeListener("complete",s),e.removeListener("abort",f),e.removeListener("request",d),e.req&&e.req.removeListener("finish",s),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",s),e.removeListener("end",l),e.removeListener("error",c),e.removeListener("close",f)}}xke.exports=yke});var Eke=m((M4t,_ke)=>{"use strict";var OR;function Yp(e,r,t){return r=V$r(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function V$r(e){var r=K$r(e,"string");return typeof r=="symbol"?r:String(r)}function K$r(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Y$r=kR(),$p=Symbol("lastResolve"),dm=Symbol("lastReject"),RE=Symbol("error"),RR=Symbol("ended"),pm=Symbol("lastPromise"),JH=Symbol("handlePromise"),hm=Symbol("stream");function Xp(e,r){return{value:e,done:r}}function $$r(e){var r=e[$p];if(r!==null){var t=e[hm].read();t!==null&&(e[pm]=null,e[$p]=null,e[dm]=null,r(Xp(t,!1)))}}function X$r(e){process.nextTick($$r,e)}function J$r(e,r){return function(t,n){e.then(function(){if(r[RR]){t(Xp(void 0,!0));return}r[JH](t,n)},n)}}var Q$r=Object.getPrototypeOf(function(){}),Z$r=Object.setPrototypeOf((OR={get stream(){return this[hm]},next:function(){var r=this,t=this[RE];if(t!==null)return Promise.reject(t);if(this[RR])return Promise.resolve(Xp(void 0,!0));if(this[hm].destroyed)return new Promise(function(o,s){process.nextTick(function(){r[RE]?s(r[RE]):o(Xp(void 0,!0))})});var n=this[pm],i;if(n)i=new Promise(J$r(n,this));else{var a=this[hm].read();if(a!==null)return Promise.resolve(Xp(a,!1));i=new Promise(this[JH])}return this[pm]=i,i}},Yp(OR,Symbol.asyncIterator,function(){return this}),Yp(OR,"return",function(){var r=this;return new Promise(function(t,n){r[hm].destroy(null,function(i){if(i){n(i);return}t(Xp(void 0,!0))})})}),OR),Q$r),eXr=function(r){var t,n=Object.create(Z$r,(t={},Yp(t,hm,{value:r,writable:!0}),Yp(t,$p,{value:null,writable:!0}),Yp(t,dm,{value:null,writable:!0}),Yp(t,RE,{value:null,writable:!0}),Yp(t,RR,{value:r._readableState.endEmitted,writable:!0}),Yp(t,JH,{value:function(a,o){var s=n[hm].read();s?(n[pm]=null,n[$p]=null,n[dm]=null,a(Xp(s,!1))):(n[$p]=a,n[dm]=o)},writable:!0}),t));return n[pm]=null,Y$r(r,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[dm];a!==null&&(n[pm]=null,n[$p]=null,n[dm]=null,a(i)),n[RE]=i;return}var o=n[$p];o!==null&&(n[pm]=null,n[$p]=null,n[dm]=null,o(Xp(void 0,!0))),n[RR]=!0}),r.on("readable",X$r.bind(null,n)),n};_ke.exports=eXr});var Tke=m((L4t,Ake)=>{"use strict";function wke(e,r,t,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){t(l);return}s.done?r(u):Promise.resolve(u).then(n,i)}function rXr(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var a=e.apply(r,t);function o(u){wke(a,n,i,o,s,"next",u)}function s(u){wke(a,n,i,o,s,"throw",u)}o(void 0)})}}function Ske(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function tXr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ske(Object(t),!0).forEach(function(n){nXr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ske(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function nXr(e,r,t){return r=iXr(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function iXr(e){var r=aXr(e,"string");return typeof r=="symbol"?r:String(r)}function aXr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var oXr=Vp().codes.ERR_INVALID_ARG_TYPE;function sXr(e,r,t){var n;if(r&&typeof r.next=="function")n=r;else if(r&&r[Symbol.asyncIterator])n=r[Symbol.asyncIterator]();else if(r&&r[Symbol.iterator])n=r[Symbol.iterator]();else throw new oXr("iterable",["Iterable"],r);var i=new e(tXr({objectMode:!0},t)),a=!1;i._read=function(){a||(a=!0,o())};function o(){return s.apply(this,arguments)}function s(){return s=rXr(function*(){try{var u=yield n.next(),l=u.value,c=u.done;c?i.push(null):i.push(yield l)?o():a=!1}catch(f){i.destroy(f)}}),s.apply(this,arguments)}return i}Ake.exports=sXr});var KH=m((N4t,jke)=>{"use strict";jke.exports=Ht;var Oy;Ht.ReadableState=Dke;var q4t=require("events").EventEmitter,Cke=function(r,t){return r.listeners(t).length},FE=MH(),FR=require("buffer").Buffer,uXr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function lXr(e){return FR.from(e)}function cXr(e){return FR.isBuffer(e)||e instanceof uXr}var QH=require("util"),_t;QH&&QH.debuglog?_t=QH.debuglog("stream"):_t=function(){};var fXr=rke(),ZH=NH(),dXr=UH(),pXr=dXr.getHighWaterMark,IR=Vp().codes,hXr=IR.ERR_INVALID_ARG_TYPE,mXr=IR.ERR_STREAM_PUSH_AFTER_EOF,gXr=IR.ERR_METHOD_NOT_IMPLEMENTED,vXr=IR.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ry,eW,rW;at()(Ht,FE);var IE=ZH.errorOrDestroy,tW=["error","close","destroy","pause","resume"];function bXr(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Array.isArray(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function Dke(e,r,t){Oy=Oy||fm(),e=e||{},typeof t!="boolean"&&(t=r instanceof Oy),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=pXr(this,e,"readableHighWaterMark",t),this.buffer=new fXr,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Ry||(Ry=XH().StringDecoder),this.decoder=new Ry(e.encoding),this.encoding=e.encoding)}function Ht(e){if(Oy=Oy||fm(),!(this instanceof Ht))return new Ht(e);var r=this instanceof Oy;this._readableState=new Dke(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),FE.call(this)}Object.defineProperty(Ht.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){!this._readableState||(this._readableState.destroyed=r)}});Ht.prototype.destroy=ZH.destroy;Ht.prototype._undestroy=ZH.undestroy;Ht.prototype._destroy=function(e,r){r(e)};Ht.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=FR.from(e,r),r=""),n=!0),kke(this,e,r,!1,n)};Ht.prototype.unshift=function(e){return kke(this,e,null,!0,!1)};function kke(e,r,t,n,i){_t("readableAddChunk",r);var a=e._readableState;if(r===null)a.reading=!1,_Xr(e,a);else{var o;if(i||(o=yXr(a,r)),o)IE(e,o);else if(a.objectMode||r&&r.length>0)if(typeof r!="string"&&!a.objectMode&&Object.getPrototypeOf(r)!==FR.prototype&&(r=lXr(r)),n)a.endEmitted?IE(e,new vXr):nW(e,a,r,!0);else if(a.ended)IE(e,new mXr);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!t?(r=a.decoder.write(r),a.objectMode||r.length!==0?nW(e,a,r,!1):iW(e,a)):nW(e,a,r,!1)}else n||(a.reading=!1,iW(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function nW(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,e.emit("data",t)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&PR(e)),iW(e,r)}function yXr(e,r){var t;return!cXr(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new hXr("chunk",["string","Buffer","Uint8Array"],r)),t}Ht.prototype.isPaused=function(){return this._readableState.flowing===!1};Ht.prototype.setEncoding=function(e){Ry||(Ry=XH().StringDecoder);var r=new Ry(e);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var t=this._readableState.buffer.head,n="";t!==null;)n+=r.write(t.data),t=t.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var Oke=1073741824;function xXr(e){return e>=Oke?e=Oke:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Rke(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=xXr(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}Ht.prototype.read=function(e){_t("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return _t("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?oW(this):PR(this),null;if(e=Rke(e,r),e===0&&r.ended)return r.length===0&&oW(this),null;var n=r.needReadable;_t("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,_t("length less than watermark",n)),r.ended||r.reading?(n=!1,_t("reading or ended",n)):n&&(_t("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=Rke(t,r)));var i;return e>0?i=Pke(e,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&oW(this)),i!==null&&this.emit("data",i),i};function _Xr(e,r){if(_t("onEofChunk"),!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.sync?PR(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,Fke(e)))}}function PR(e){var r=e._readableState;_t("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(_t("emitReadable",r.flowing),r.emittedReadable=!0,process.nextTick(Fke,e))}function Fke(e){var r=e._readableState;_t("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,aW(e)}function iW(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(EXr,e,r))}function EXr(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var t=r.length;if(_t("maybeReadMore read 0"),e.read(0),t===r.length)break}r.readingMore=!1}Ht.prototype._read=function(e){IE(this,new gXr("_read()"))};Ht.prototype.pipe=function(e,r){var t=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,_t("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:b;n.endEmitted?process.nextTick(a):t.once("end",a),e.on("unpipe",o);function o(v,y){_t("onunpipe"),v===t&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,c())}function s(){_t("onend"),e.end()}var u=wXr(t);e.on("drain",u);var l=!1;function c(){_t("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",b),t.removeListener("data",f),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}t.on("data",f);function f(v){_t("ondata");var y=e.write(v);_t("dest.write",y),y===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&Bke(n.pipes,e)!==-1)&&!l&&(_t("false write response, pause",n.awaitDrain),n.awaitDrain++),t.pause())}function d(v){_t("onerror",v),b(),e.removeListener("error",d),Cke(e,"error")===0&&IE(e,v)}bXr(e,"error",d);function p(){e.removeListener("finish",h),b()}e.once("close",p);function h(){_t("onfinish"),e.removeListener("close",p),b()}e.once("finish",h);function b(){_t("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(_t("pipe resume"),t.resume()),e};function wXr(e){return function(){var t=e._readableState;_t("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&Cke(e,"data")&&(t.flowing=!0,aW(e))}}Ht.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=Bke(r.pipes,e);return o===-1?this:(r.pipes.splice(o,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};Ht.prototype.on=function(e,r){var t=FE.prototype.on.call(this,e,r),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,_t("on readable",n.length,n.reading),n.length?PR(this):n.reading||process.nextTick(SXr,this)),t};Ht.prototype.addListener=Ht.prototype.on;Ht.prototype.removeListener=function(e,r){var t=FE.prototype.removeListener.call(this,e,r);return e==="readable"&&process.nextTick(Ike,this),t};Ht.prototype.removeAllListeners=function(e){var r=FE.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(Ike,this),r};function Ike(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:e.listenerCount("data")>0&&e.resume()}function SXr(e){_t("readable nexttick read 0"),e.read(0)}Ht.prototype.resume=function(){var e=this._readableState;return e.flowing||(_t("resume"),e.flowing=!e.readableListening,AXr(this,e)),e.paused=!1,this};function AXr(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(TXr,e,r))}function TXr(e,r){_t("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),aW(e),r.flowing&&!r.reading&&e.read(0)}Ht.prototype.pause=function(){return _t("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_t("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function aW(e){var r=e._readableState;for(_t("flow",r.flowing);r.flowing&&e.read()!==null;);}Ht.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(_t("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(_t("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var s=r.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a<tW.length;a++)e.on(tW[a],this.emit.bind(this,tW[a]));return this._read=function(o){_t("wrapped _read",o),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(Ht.prototype[Symbol.asyncIterator]=function(){return eW===void 0&&(eW=Eke()),eW(this)});Object.defineProperty(Ht.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Ht.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Ht.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}});Ht._fromList=Pke;Object.defineProperty(Ht.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Pke(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.first():t=r.buffer.concat(r.length),r.buffer.clear()):t=r.buffer.consume(e,r.decoder),t}function oW(e){var r=e._readableState;_t("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,process.nextTick(CXr,r,e))}function CXr(e,r){if(_t("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var t=r._writableState;(!t||t.autoDestroy&&t.finished)&&r.destroy()}}typeof Symbol=="function"&&(Ht.from=function(e,r){return rW===void 0&&(rW=Tke()),rW(Ht,e,r)});function Bke(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var sW=m((U4t,Lke)=>{"use strict";Lke.exports=Ff;var BR=Vp().codes,DXr=BR.ERR_METHOD_NOT_IMPLEMENTED,kXr=BR.ERR_MULTIPLE_CALLBACK,OXr=BR.ERR_TRANSFORM_ALREADY_TRANSFORMING,RXr=BR.ERR_TRANSFORM_WITH_LENGTH_0,jR=fm();at()(Ff,jR);function FXr(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(n===null)return this.emit("error",new kXr);t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Ff(e){if(!(this instanceof Ff))return new Ff(e);jR.call(this,e),this._transformState={afterTransform:FXr.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",IXr)}function IXr(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(r,t){Mke(e,r,t)}):Mke(this,null,null)}Ff.prototype.push=function(e,r){return this._transformState.needTransform=!1,jR.prototype.push.call(this,e,r)};Ff.prototype._transform=function(e,r,t){t(new DXr("_transform()"))};Ff.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Ff.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};Ff.prototype._destroy=function(e,r){jR.prototype._destroy.call(this,e,function(t){r(t)})};function Mke(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),e._writableState.length)throw new RXr;if(e._transformState.transforming)throw new OXr;return e.push(null)}});var Uke=m((G4t,Nke)=>{"use strict";Nke.exports=PE;var qke=sW();at()(PE,qke);function PE(e){if(!(this instanceof PE))return new PE(e);qke.call(this,e)}PE.prototype._transform=function(e,r,t){t(null,e)}});var Vke=m((z4t,Wke)=>{"use strict";var uW;function PXr(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var Gke=Vp().codes,BXr=Gke.ERR_MISSING_ARGS,jXr=Gke.ERR_STREAM_DESTROYED;function zke(e){if(e)throw e}function MXr(e){return e.setHeader&&typeof e.abort=="function"}function LXr(e,r,t,n){n=PXr(n);var i=!1;e.on("close",function(){i=!0}),uW===void 0&&(uW=kR()),uW(e,{readable:r,writable:t},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,MXr(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new jXr("pipe"))}}}function Hke(e){e()}function qXr(e,r){return e.pipe(r)}function NXr(e){return!e.length||typeof e[e.length-1]!="function"?zke:e.pop()}function UXr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=NXr(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new BXr("streams");var i,a=r.map(function(o,s){var u=s<r.length-1,l=s>0;return LXr(o,u,l,function(c){i||(i=c),c&&a.forEach(Hke),!u&&(a.forEach(Hke),n(i))})});return r.reduce(qXr)}Wke.exports=UXr});var lW=m((ru,jE)=>{var BE=require("stream");process.env.READABLE_STREAM==="disable"&&BE?(jE.exports=BE.Readable,Object.assign(jE.exports,BE),jE.exports.Stream=BE):(ru=jE.exports=KH(),ru.Stream=BE||ru,ru.Readable=ru,ru.Writable=HH(),ru.Duplex=fm(),ru.Transform=sW(),ru.PassThrough=Uke(),ru.finished=kR(),ru.pipeline=Vke())});var fW=m((H4t,Kke)=>{var GXr=require("stream").Stream,zXr=lW().PassThrough,cW=Kke.exports={};cW.isStream=function(e){return e instanceof GXr};cW.normalizeInputSource=function(e){if(e===null)return Buffer.alloc(0);if(typeof e=="string")return Buffer.from(e);if(cW.isStream(e)&&!e._readableState){var r=new zXr;return e.pipe(r),r}return e}});var pW=m((W4t,$ke)=>{var HXr=require("util").inherits,dW=lW().Transform,WXr=_R(),Yke=fW(),ss=$ke.exports=function(e){if(!(this instanceof ss))return new ss(e);dW.call(this,e),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};HXr(ss,dW);ss.prototype._appendBuffer=function(e,r,t){};ss.prototype._appendStream=function(e,r,t){};ss.prototype._emitErrorCallback=function(e){e&&this.emit("error",e)};ss.prototype._finish=function(e){};ss.prototype._normalizeEntry=function(e){};ss.prototype._transform=function(e,r,t){t(null,e)};ss.prototype.entry=function(e,r,t){if(r=r||null,typeof t!="function"&&(t=this._emitErrorCallback.bind(this)),!(e instanceof WXr)){t(new Error("not a valid instance of ArchiveEntry"));return}if(this._archive.finish||this._archive.finished){t(new Error("unacceptable entry after finish"));return}if(this._archive.processing){t(new Error("already processing an entry"));return}if(this._archive.processing=!0,this._normalizeEntry(e),this._entry=e,r=Yke.normalizeInputSource(r),Buffer.isBuffer(r))this._appendBuffer(e,r,t);else if(Yke.isStream(r))this._appendStream(e,r,t);else{this._archive.processing=!1,t(new Error("input source must be valid Stream or Buffer instance"));return}return this};ss.prototype.finish=function(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()};ss.prototype.getBytesWritten=function(){return this.offset};ss.prototype.write=function(e,r){return e&&(this.offset+=e.length),dW.prototype.write.call(this,e,r)}});var vW=m((V4t,Jke)=>{var Jp=require("buffer").Buffer,hW=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array!="undefined"&&(hW=new Int32Array(hW));function Xke(e){if(Jp.isBuffer(e))return e;var r=typeof Jp.alloc=="function"&&typeof Jp.from=="function";if(typeof e=="number")return r?Jp.alloc(e):new Jp(e);if(typeof e=="string")return r?Jp.from(e):new Jp(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function VXr(e){var r=Xke(4);return r.writeInt32BE(e,0),r}function mW(e,r){e=Xke(e),Jp.isBuffer(r)&&(r=r.readUInt32BE(0));for(var t=~~r^-1,n=0;n<e.length;n++)t=hW[(t^e[n])&255]^t>>>8;return t^-1}function gW(){return VXr(mW.apply(null,arguments))}gW.signed=function(){return mW.apply(null,arguments)};gW.unsigned=function(){return mW.apply(null,arguments)>>>0};Jke.exports=gW});var bW=m((K4t,Qke)=>{Qke.exports=require("stream")});var iOe=m((Y4t,nOe)=>{"use strict";function Zke(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function eOe(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Zke(Object(t),!0).forEach(function(n){KXr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Zke(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function KXr(e,r,t){return r=tOe(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function YXr(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function rOe(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tOe(n.key),n)}}function $Xr(e,r,t){return r&&rOe(e.prototype,r),t&&rOe(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tOe(e){var r=XXr(e,"string");return typeof r=="symbol"?r:String(r)}function XXr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var JXr=require("buffer"),MR=JXr.Buffer,QXr=require("util"),yW=QXr.inspect,ZXr=yW&&yW.custom||"inspect";function eJr(e,r,t){MR.prototype.copy.call(e,r,t)}nOe.exports=function(){function e(){YXr(this,e),this.head=null,this.tail=null,this.length=0}return $Xr(e,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(this.length===0)return MR.alloc(0);for(var n=MR.allocUnsafe(t>>>0),i=this.head,a=0;i;)eJr(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):t===this.head.data.length?i=this.shift():i=n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,a=n.data;for(t-=a.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?a+=o:a+=o.slice(0,t),t-=s,t===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(t){var n=MR.allocUnsafe(t),i=this.head,a=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,t===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:ZXr,value:function(t,n){return yW(this,eOe(eOe({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var _W=m(($4t,oOe)=>{"use strict";function rJr(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(xW,this,e)):process.nextTick(xW,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!r&&a?t._writableState?t._writableState.errorEmitted?process.nextTick(LR,t):(t._writableState.errorEmitted=!0,process.nextTick(aOe,t,a)):process.nextTick(aOe,t,a):r?(process.nextTick(LR,t),r(a)):process.nextTick(LR,t)}),this)}function aOe(e,r){xW(e,r),LR(e)}function LR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function tJr(){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 xW(e,r){e.emit("error",r)}function nJr(e,r){var t=e._readableState,n=e._writableState;t&&t.autoDestroy||n&&n.autoDestroy?e.destroy(r):e.emit("error",r)}oOe.exports={destroy:rJr,undestroy:tJr,errorOrDestroy:nJr}});var Qp=m((X4t,lOe)=>{"use strict";var sOe={};function tu(e,r,t){t||(t=Error);function n(a,o,s){return typeof r=="string"?r:r(a,o,s)}class i extends t{constructor(o,s,u){super(n(o,s,u))}}i.prototype.name=t.name,i.prototype.code=e,sOe[e]=i}function uOe(e,r){if(Array.isArray(e)){let t=e.length;return e=e.map(n=>String(n)),t>2?`one of ${r} ${e.slice(0,t-1).join(", ")}, or `+e[t-1]:t===2?`one of ${r} ${e[0]} or ${e[1]}`:`of ${r} ${e[0]}`}else return`of ${r} ${String(e)}`}function iJr(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function aJr(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function oJr(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}tu("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);tu("ERR_INVALID_ARG_TYPE",function(e,r,t){let n;typeof r=="string"&&iJr(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";let i;if(aJr(e," argument"))i=`The ${e} ${n} ${uOe(r,"type")}`;else{let a=oJr(e,".")?"property":"argument";i=`The "${e}" ${a} ${n} ${uOe(r,"type")}`}return i+=`. Received type ${typeof t}`,i},TypeError);tu("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");tu("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});tu("ERR_STREAM_PREMATURE_CLOSE","Premature close");tu("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});tu("ERR_MULTIPLE_CALLBACK","Callback called multiple times");tu("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");tu("ERR_STREAM_WRITE_AFTER_END","write after end");tu("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);tu("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);tu("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");lOe.exports.codes=sOe});var EW=m((J4t,cOe)=>{"use strict";var sJr=Qp().codes.ERR_INVALID_OPT_VALUE;function uJr(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function lJr(e,r,t,n){var i=uJr(r,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?t:"highWaterMark";throw new sJr(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}cOe.exports={getHighWaterMark:lJr}});var AW=m((Q4t,gOe)=>{"use strict";gOe.exports=hi;function fOe(e){var r=this;this.next=null,this.entry=null,this.finish=function(){jJr(r,e)}}var Fy;hi.WritableState=ME;var cJr={deprecate:d0()},dOe=bW(),qR=require("buffer").Buffer,fJr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function dJr(e){return qR.from(e)}function pJr(e){return qR.isBuffer(e)||e instanceof fJr}var wW=_W(),hJr=EW(),mJr=hJr.getHighWaterMark,Zp=Qp().codes,gJr=Zp.ERR_INVALID_ARG_TYPE,vJr=Zp.ERR_METHOD_NOT_IMPLEMENTED,bJr=Zp.ERR_MULTIPLE_CALLBACK,yJr=Zp.ERR_STREAM_CANNOT_PIPE,xJr=Zp.ERR_STREAM_DESTROYED,_Jr=Zp.ERR_STREAM_NULL_VALUES,EJr=Zp.ERR_STREAM_WRITE_AFTER_END,wJr=Zp.ERR_UNKNOWN_ENCODING,Iy=wW.errorOrDestroy;at()(hi,dOe);function SJr(){}function ME(e,r,t){Fy=Fy||mm(),e=e||{},typeof t!="boolean"&&(t=r instanceof Fy),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=mJr(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){RJr(r,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new fOe(this)}ME.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(ME.prototype,"buffer",{get:cJr.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var NR;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(NR=Function.prototype[Symbol.hasInstance],Object.defineProperty(hi,Symbol.hasInstance,{value:function(r){return NR.call(this,r)?!0:this!==hi?!1:r&&r._writableState instanceof ME}})):NR=function(r){return r instanceof this};function hi(e){Fy=Fy||mm();var r=this instanceof Fy;if(!r&&!NR.call(hi,this))return new hi(e);this._writableState=new ME(e,this,r),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)),dOe.call(this)}hi.prototype.pipe=function(){Iy(this,new yJr)};function AJr(e,r){var t=new EJr;Iy(e,t),process.nextTick(r,t)}function TJr(e,r,t,n){var i;return t===null?i=new _Jr:typeof t!="string"&&!r.objectMode&&(i=new gJr("chunk",["string","Buffer"],t)),i?(Iy(e,i),process.nextTick(n,i),!1):!0}hi.prototype.write=function(e,r,t){var n=this._writableState,i=!1,a=!n.objectMode&&pJr(e);return a&&!qR.isBuffer(e)&&(e=dJr(e)),typeof r=="function"&&(t=r,r=null),a?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=SJr),n.ending?AJr(this,t):(a||TJr(this,n,e,t))&&(n.pendingcb++,i=DJr(this,n,a,e,r,t)),i};hi.prototype.cork=function(){this._writableState.corked++};hi.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&hOe(this,e))};hi.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new wJr(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(hi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function CJr(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=qR.from(r,t)),r}Object.defineProperty(hi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function DJr(e,r,t,n,i,a){if(!t){var o=CJr(r,n,i);n!==o&&(t=!0,i="buffer",n=o)}var s=r.objectMode?1:n.length;r.length+=s;var u=r.length<r.highWaterMark;if(u||(r.needDrain=!0),r.writing||r.corked){var l=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:a,next:null},l?l.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else SW(e,r,!1,s,n,i,a);return u}function SW(e,r,t,n,i,a,o){r.writelen=n,r.writecb=o,r.writing=!0,r.sync=!0,r.destroyed?r.onwrite(new xJr("write")):t?e._writev(i,r.onwrite):e._write(i,a,r.onwrite),r.sync=!1}function kJr(e,r,t,n,i){--r.pendingcb,t?(process.nextTick(i,n),process.nextTick(LE,e,r),e._writableState.errorEmitted=!0,Iy(e,n)):(i(n),e._writableState.errorEmitted=!0,Iy(e,n),LE(e,r))}function OJr(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function RJr(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(typeof i!="function")throw new bJr;if(OJr(t),r)kJr(e,t,n,r,i);else{var a=mOe(t)||e.destroyed;!a&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&hOe(e,t),n?process.nextTick(pOe,e,t,a,i):pOe(e,t,a,i)}}function pOe(e,r,t,n){t||FJr(e,r),r.pendingcb--,n(),LE(e,r)}function FJr(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function hOe(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),a=r.corkedRequestsFree;a.entry=t;for(var o=0,s=!0;t;)i[o]=t,t.isBuf||(s=!1),t=t.next,o+=1;i.allBuffers=s,SW(e,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new fOe(r),r.bufferedRequestCount=0}else{for(;t;){var u=t.chunk,l=t.encoding,c=t.callback,f=r.objectMode?1:u.length;if(SW(e,r,!1,f,u,l,c),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}hi.prototype._write=function(e,r,t){t(new vJr("_write()"))};hi.prototype._writev=null;hi.prototype.end=function(e,r,t){var n=this._writableState;return typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||BJr(this,n,t),this};Object.defineProperty(hi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function mOe(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function IJr(e,r){e._final(function(t){r.pendingcb--,t&&Iy(e,t),r.prefinished=!0,e.emit("prefinish"),LE(e,r)})}function PJr(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"&&!r.destroyed?(r.pendingcb++,r.finalCalled=!0,process.nextTick(IJr,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function LE(e,r){var t=mOe(r);if(t&&(PJr(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"),r.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return t}function BJr(e,r,t){r.ending=!0,LE(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function jJr(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(hi.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(r){!this._writableState||(this._writableState.destroyed=r)}});hi.prototype.destroy=wW.destroy;hi.prototype._undestroy=wW.undestroy;hi.prototype._destroy=function(e,r){r(e)}});var mm=m((Z4t,bOe)=>{"use strict";var MJr=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};bOe.exports=fc;var vOe=DW(),TW=AW();at()(fc,vOe);for(CW=MJr(TW.prototype),UR=0;UR<CW.length;UR++)GR=CW[UR],fc.prototype[GR]||(fc.prototype[GR]=TW.prototype[GR]);var CW,GR,UR;function fc(e){if(!(this instanceof fc))return new fc(e);vOe.call(this,e),TW.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",LJr)))}Object.defineProperty(fc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(fc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(fc.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function LJr(){this._writableState.ended||process.nextTick(qJr,this)}function qJr(e){e.end()}Object.defineProperty(fc.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(r){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=r,this._writableState.destroyed=r)}})});var RW=m(xOe=>{"use strict";var kW=vu().Buffer,yOe=kW.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 NJr(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function UJr(e){var r=NJr(e);if(typeof r!="string"&&(kW.isEncoding===yOe||!yOe(e)))throw new Error("Unknown encoding: "+e);return r||e}xOe.StringDecoder=qE;function qE(e){this.encoding=UJr(e);var r;switch(this.encoding){case"utf16le":this.text=KJr,this.end=YJr,r=4;break;case"utf8":this.fillLast=HJr,r=4;break;case"base64":this.text=$Jr,this.end=XJr,r=3;break;default:this.write=JJr,this.end=QJr;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=kW.allocUnsafe(r)}qE.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""};qE.prototype.end=VJr;qE.prototype.text=WJr;qE.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 OW(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function GJr(e,r,t){var n=r.length-1;if(n<t)return 0;var i=OW(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=OW(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=OW(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function zJr(e,r,t){if((r[0]&192)!=128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!=128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!=128)return e.lastNeed=2,"\uFFFD"}}function HJr(e){var r=this.lastTotal-this.lastNeed,t=zJr(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function WJr(e,r){var t=GJr(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",r,n)}function VJr(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function KJr(e,r){if((e.length-r)%2==0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.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],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function YJr(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function $Jr(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function XJr(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function JJr(e){return e.toString(this.encoding)}function QJr(e){return e&&e.length?this.write(e):""}});var zR=m((rIt,wOe)=>{"use strict";var _Oe=Qp().codes.ERR_STREAM_PREMATURE_CLOSE;function ZJr(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e.apply(this,n)}}}function eQr(){}function rQr(e){return e.setHeader&&typeof e.abort=="function"}function EOe(e,r,t){if(typeof r=="function")return EOe(e,null,r);r||(r={}),t=ZJr(t||eQr);var n=r.readable||r.readable!==!1&&e.readable,i=r.writable||r.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){i=!1,o=!0,n||t.call(e)},u=e._readableState&&e._readableState.endEmitted,l=function(){n=!1,u=!0,i||t.call(e)},c=function(h){t.call(e,h)},f=function(){var h;if(n&&!u)return(!e._readableState||!e._readableState.ended)&&(h=new _Oe),t.call(e,h);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(h=new _Oe),t.call(e,h)},d=function(){e.req.on("finish",s)};return rQr(e)?(e.on("complete",s),e.on("abort",f),e.req?d():e.on("request",d)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",s),r.error!==!1&&e.on("error",c),e.on("close",f),function(){e.removeListener("complete",s),e.removeListener("abort",f),e.removeListener("request",d),e.req&&e.req.removeListener("finish",s),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",s),e.removeListener("end",l),e.removeListener("error",c),e.removeListener("close",f)}}wOe.exports=EOe});var AOe=m((tIt,SOe)=>{"use strict";var HR;function eh(e,r,t){return r=tQr(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function tQr(e){var r=nQr(e,"string");return typeof r=="symbol"?r:String(r)}function nQr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var iQr=zR(),rh=Symbol("lastResolve"),gm=Symbol("lastReject"),NE=Symbol("error"),WR=Symbol("ended"),vm=Symbol("lastPromise"),FW=Symbol("handlePromise"),bm=Symbol("stream");function th(e,r){return{value:e,done:r}}function aQr(e){var r=e[rh];if(r!==null){var t=e[bm].read();t!==null&&(e[vm]=null,e[rh]=null,e[gm]=null,r(th(t,!1)))}}function oQr(e){process.nextTick(aQr,e)}function sQr(e,r){return function(t,n){e.then(function(){if(r[WR]){t(th(void 0,!0));return}r[FW](t,n)},n)}}var uQr=Object.getPrototypeOf(function(){}),lQr=Object.setPrototypeOf((HR={get stream(){return this[bm]},next:function(){var r=this,t=this[NE];if(t!==null)return Promise.reject(t);if(this[WR])return Promise.resolve(th(void 0,!0));if(this[bm].destroyed)return new Promise(function(o,s){process.nextTick(function(){r[NE]?s(r[NE]):o(th(void 0,!0))})});var n=this[vm],i;if(n)i=new Promise(sQr(n,this));else{var a=this[bm].read();if(a!==null)return Promise.resolve(th(a,!1));i=new Promise(this[FW])}return this[vm]=i,i}},eh(HR,Symbol.asyncIterator,function(){return this}),eh(HR,"return",function(){var r=this;return new Promise(function(t,n){r[bm].destroy(null,function(i){if(i){n(i);return}t(th(void 0,!0))})})}),HR),uQr),cQr=function(r){var t,n=Object.create(lQr,(t={},eh(t,bm,{value:r,writable:!0}),eh(t,rh,{value:null,writable:!0}),eh(t,gm,{value:null,writable:!0}),eh(t,NE,{value:null,writable:!0}),eh(t,WR,{value:r._readableState.endEmitted,writable:!0}),eh(t,FW,{value:function(a,o){var s=n[bm].read();s?(n[vm]=null,n[rh]=null,n[gm]=null,a(th(s,!1))):(n[rh]=a,n[gm]=o)},writable:!0}),t));return n[vm]=null,iQr(r,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[gm];a!==null&&(n[vm]=null,n[rh]=null,n[gm]=null,a(i)),n[NE]=i;return}var o=n[rh];o!==null&&(n[vm]=null,n[rh]=null,n[gm]=null,o(th(void 0,!0))),n[WR]=!0}),r.on("readable",oQr.bind(null,n)),n};SOe.exports=cQr});var kOe=m((nIt,DOe)=>{"use strict";function TOe(e,r,t,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){t(l);return}s.done?r(u):Promise.resolve(u).then(n,i)}function fQr(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var a=e.apply(r,t);function o(u){TOe(a,n,i,o,s,"next",u)}function s(u){TOe(a,n,i,o,s,"throw",u)}o(void 0)})}}function COe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function dQr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?COe(Object(t),!0).forEach(function(n){pQr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):COe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function pQr(e,r,t){return r=hQr(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function hQr(e){var r=mQr(e,"string");return typeof r=="symbol"?r:String(r)}function mQr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var gQr=Qp().codes.ERR_INVALID_ARG_TYPE;function vQr(e,r,t){var n;if(r&&typeof r.next=="function")n=r;else if(r&&r[Symbol.asyncIterator])n=r[Symbol.asyncIterator]();else if(r&&r[Symbol.iterator])n=r[Symbol.iterator]();else throw new gQr("iterable",["Iterable"],r);var i=new e(dQr({objectMode:!0},t)),a=!1;i._read=function(){a||(a=!0,o())};function o(){return s.apply(this,arguments)}function s(){return s=fQr(function*(){try{var u=yield n.next(),l=u.value,c=u.done;c?i.push(null):i.push(yield l)?o():a=!1}catch(f){i.destroy(f)}}),s.apply(this,arguments)}return i}DOe.exports=vQr});var DW=m((aIt,qOe)=>{"use strict";qOe.exports=Wt;var Py;Wt.ReadableState=ROe;var iIt=require("events").EventEmitter,OOe=function(r,t){return r.listeners(t).length},UE=bW(),VR=require("buffer").Buffer,bQr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function yQr(e){return VR.from(e)}function xQr(e){return VR.isBuffer(e)||e instanceof bQr}var IW=require("util"),Et;IW&&IW.debuglog?Et=IW.debuglog("stream"):Et=function(){};var _Qr=iOe(),PW=_W(),EQr=EW(),wQr=EQr.getHighWaterMark,KR=Qp().codes,SQr=KR.ERR_INVALID_ARG_TYPE,AQr=KR.ERR_STREAM_PUSH_AFTER_EOF,TQr=KR.ERR_METHOD_NOT_IMPLEMENTED,CQr=KR.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,By,BW,jW;at()(Wt,UE);var GE=PW.errorOrDestroy,MW=["error","close","destroy","pause","resume"];function DQr(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Array.isArray(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function ROe(e,r,t){Py=Py||mm(),e=e||{},typeof t!="boolean"&&(t=r instanceof Py),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=wQr(this,e,"readableHighWaterMark",t),this.buffer=new _Qr,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(By||(By=RW().StringDecoder),this.decoder=new By(e.encoding),this.encoding=e.encoding)}function Wt(e){if(Py=Py||mm(),!(this instanceof Wt))return new Wt(e);var r=this instanceof Py;this._readableState=new ROe(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),UE.call(this)}Object.defineProperty(Wt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){!this._readableState||(this._readableState.destroyed=r)}});Wt.prototype.destroy=PW.destroy;Wt.prototype._undestroy=PW.undestroy;Wt.prototype._destroy=function(e,r){r(e)};Wt.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=VR.from(e,r),r=""),n=!0),FOe(this,e,r,!1,n)};Wt.prototype.unshift=function(e){return FOe(this,e,null,!0,!1)};function FOe(e,r,t,n,i){Et("readableAddChunk",r);var a=e._readableState;if(r===null)a.reading=!1,RQr(e,a);else{var o;if(i||(o=kQr(a,r)),o)GE(e,o);else if(a.objectMode||r&&r.length>0)if(typeof r!="string"&&!a.objectMode&&Object.getPrototypeOf(r)!==VR.prototype&&(r=yQr(r)),n)a.endEmitted?GE(e,new CQr):LW(e,a,r,!0);else if(a.ended)GE(e,new AQr);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!t?(r=a.decoder.write(r),a.objectMode||r.length!==0?LW(e,a,r,!1):qW(e,a)):LW(e,a,r,!1)}else n||(a.reading=!1,qW(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function LW(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,e.emit("data",t)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&YR(e)),qW(e,r)}function kQr(e,r){var t;return!xQr(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new SQr("chunk",["string","Buffer","Uint8Array"],r)),t}Wt.prototype.isPaused=function(){return this._readableState.flowing===!1};Wt.prototype.setEncoding=function(e){By||(By=RW().StringDecoder);var r=new By(e);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var t=this._readableState.buffer.head,n="";t!==null;)n+=r.write(t.data),t=t.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var IOe=1073741824;function OQr(e){return e>=IOe?e=IOe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function POe(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=OQr(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}Wt.prototype.read=function(e){Et("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return Et("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?UW(this):YR(this),null;if(e=POe(e,r),e===0&&r.ended)return r.length===0&&UW(this),null;var n=r.needReadable;Et("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,Et("length less than watermark",n)),r.ended||r.reading?(n=!1,Et("reading or ended",n)):n&&(Et("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=POe(t,r)));var i;return e>0?i=MOe(e,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&UW(this)),i!==null&&this.emit("data",i),i};function RQr(e,r){if(Et("onEofChunk"),!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.sync?YR(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,BOe(e)))}}function YR(e){var r=e._readableState;Et("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(Et("emitReadable",r.flowing),r.emittedReadable=!0,process.nextTick(BOe,e))}function BOe(e){var r=e._readableState;Et("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,NW(e)}function qW(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(FQr,e,r))}function FQr(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var t=r.length;if(Et("maybeReadMore read 0"),e.read(0),t===r.length)break}r.readingMore=!1}Wt.prototype._read=function(e){GE(this,new TQr("_read()"))};Wt.prototype.pipe=function(e,r){var t=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,Et("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:b;n.endEmitted?process.nextTick(a):t.once("end",a),e.on("unpipe",o);function o(v,y){Et("onunpipe"),v===t&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,c())}function s(){Et("onend"),e.end()}var u=IQr(t);e.on("drain",u);var l=!1;function c(){Et("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",b),t.removeListener("data",f),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}t.on("data",f);function f(v){Et("ondata");var y=e.write(v);Et("dest.write",y),y===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&LOe(n.pipes,e)!==-1)&&!l&&(Et("false write response, pause",n.awaitDrain),n.awaitDrain++),t.pause())}function d(v){Et("onerror",v),b(),e.removeListener("error",d),OOe(e,"error")===0&&GE(e,v)}DQr(e,"error",d);function p(){e.removeListener("finish",h),b()}e.once("close",p);function h(){Et("onfinish"),e.removeListener("close",p),b()}e.once("finish",h);function b(){Et("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(Et("pipe resume"),t.resume()),e};function IQr(e){return function(){var t=e._readableState;Et("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&OOe(e,"data")&&(t.flowing=!0,NW(e))}}Wt.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=LOe(r.pipes,e);return o===-1?this:(r.pipes.splice(o,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};Wt.prototype.on=function(e,r){var t=UE.prototype.on.call(this,e,r),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Et("on readable",n.length,n.reading),n.length?YR(this):n.reading||process.nextTick(PQr,this)),t};Wt.prototype.addListener=Wt.prototype.on;Wt.prototype.removeListener=function(e,r){var t=UE.prototype.removeListener.call(this,e,r);return e==="readable"&&process.nextTick(jOe,this),t};Wt.prototype.removeAllListeners=function(e){var r=UE.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(jOe,this),r};function jOe(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:e.listenerCount("data")>0&&e.resume()}function PQr(e){Et("readable nexttick read 0"),e.read(0)}Wt.prototype.resume=function(){var e=this._readableState;return e.flowing||(Et("resume"),e.flowing=!e.readableListening,BQr(this,e)),e.paused=!1,this};function BQr(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(jQr,e,r))}function jQr(e,r){Et("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),NW(e),r.flowing&&!r.reading&&e.read(0)}Wt.prototype.pause=function(){return Et("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Et("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function NW(e){var r=e._readableState;for(Et("flow",r.flowing);r.flowing&&e.read()!==null;);}Wt.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(Et("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(Et("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var s=r.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a<MW.length;a++)e.on(MW[a],this.emit.bind(this,MW[a]));return this._read=function(o){Et("wrapped _read",o),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(Wt.prototype[Symbol.asyncIterator]=function(){return BW===void 0&&(BW=AOe()),BW(this)});Object.defineProperty(Wt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Wt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Wt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}});Wt._fromList=MOe;Object.defineProperty(Wt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function MOe(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.first():t=r.buffer.concat(r.length),r.buffer.clear()):t=r.buffer.consume(e,r.decoder),t}function UW(e){var r=e._readableState;Et("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,process.nextTick(MQr,r,e))}function MQr(e,r){if(Et("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var t=r._writableState;(!t||t.autoDestroy&&t.finished)&&r.destroy()}}typeof Symbol=="function"&&(Wt.from=function(e,r){return jW===void 0&&(jW=kOe()),jW(Wt,e,r)});function LOe(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var GW=m((oIt,UOe)=>{"use strict";UOe.exports=If;var $R=Qp().codes,LQr=$R.ERR_METHOD_NOT_IMPLEMENTED,qQr=$R.ERR_MULTIPLE_CALLBACK,NQr=$R.ERR_TRANSFORM_ALREADY_TRANSFORMING,UQr=$R.ERR_TRANSFORM_WITH_LENGTH_0,XR=mm();at()(If,XR);function GQr(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(n===null)return this.emit("error",new qQr);t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function If(e){if(!(this instanceof If))return new If(e);XR.call(this,e),this._transformState={afterTransform:GQr.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",zQr)}function zQr(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(r,t){NOe(e,r,t)}):NOe(this,null,null)}If.prototype.push=function(e,r){return this._transformState.needTransform=!1,XR.prototype.push.call(this,e,r)};If.prototype._transform=function(e,r,t){t(new LQr("_transform()"))};If.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};If.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};If.prototype._destroy=function(e,r){XR.prototype._destroy.call(this,e,function(t){r(t)})};function NOe(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),e._writableState.length)throw new UQr;if(e._transformState.transforming)throw new NQr;return e.push(null)}});var HOe=m((sIt,zOe)=>{"use strict";zOe.exports=zE;var GOe=GW();at()(zE,GOe);function zE(e){if(!(this instanceof zE))return new zE(e);GOe.call(this,e)}zE.prototype._transform=function(e,r,t){t(null,e)}});var $Oe=m((uIt,YOe)=>{"use strict";var zW;function HQr(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var WOe=Qp().codes,WQr=WOe.ERR_MISSING_ARGS,VQr=WOe.ERR_STREAM_DESTROYED;function VOe(e){if(e)throw e}function KQr(e){return e.setHeader&&typeof e.abort=="function"}function YQr(e,r,t,n){n=HQr(n);var i=!1;e.on("close",function(){i=!0}),zW===void 0&&(zW=zR()),zW(e,{readable:r,writable:t},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,KQr(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new VQr("pipe"))}}}function KOe(e){e()}function $Qr(e,r){return e.pipe(r)}function XQr(e){return!e.length||typeof e[e.length-1]!="function"?VOe:e.pop()}function JQr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=XQr(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new WQr("streams");var i,a=r.map(function(o,s){var u=s<r.length-1,l=s>0;return YQr(o,u,l,function(c){i||(i=c),c&&a.forEach(KOe),!u&&(a.forEach(KOe),n(i))})});return r.reduce($Qr)}YOe.exports=JQr});var XOe=m((nu,WE)=>{var HE=require("stream");process.env.READABLE_STREAM==="disable"&&HE?(WE.exports=HE.Readable,Object.assign(WE.exports,HE),WE.exports.Stream=HE):(nu=WE.exports=DW(),nu.Stream=HE||nu,nu.Readable=nu,nu.Writable=AW(),nu.Duplex=mm(),nu.Transform=GW(),nu.PassThrough=HOe(),nu.finished=zR(),nu.pipeline=$Oe())});var WW=m(HW=>{var JOe;(function(e){typeof DO_NOT_EXPORT_CRC=="undefined"?typeof HW=="object"?e(HW):typeof define=="function"&&define.amd?define(function(){var r={};return e(r),r}):e(JOe={}):e(JOe={})})(function(e){e.version="1.2.2";function r(){for(var k=0,L=new Array(256),I=0;I!=256;++I)k=I,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,L[I]=k;return typeof Int32Array!="undefined"?new Int32Array(L):L}var t=r();function n(k){var L=0,I=0,V=0,N=typeof Int32Array!="undefined"?new Int32Array(4096):new Array(4096);for(V=0;V!=256;++V)N[V]=k[V];for(V=0;V!=256;++V)for(I=k[V],L=256+V;L<4096;L+=256)I=N[L]=I>>>8^k[I&255];var W=[];for(V=1;V!=16;++V)W[V-1]=typeof Int32Array!="undefined"?N.subarray(V*256,V*256+256):N.slice(V*256,V*256+256);return W}var i=n(t),a=i[0],o=i[1],s=i[2],u=i[3],l=i[4],c=i[5],f=i[6],d=i[7],p=i[8],h=i[9],b=i[10],v=i[11],y=i[12],w=i[13],A=i[14];function C(k,L){for(var I=L^-1,V=0,N=k.length;V<N;)I=I>>>8^t[(I^k.charCodeAt(V++))&255];return~I}function D(k,L){for(var I=L^-1,V=k.length-15,N=0;N<V;)I=A[k[N++]^I&255]^w[k[N++]^I>>8&255]^y[k[N++]^I>>16&255]^v[k[N++]^I>>>24]^b[k[N++]]^h[k[N++]]^p[k[N++]]^d[k[N++]]^f[k[N++]]^c[k[N++]]^l[k[N++]]^u[k[N++]]^s[k[N++]]^o[k[N++]]^a[k[N++]]^t[k[N++]];for(V+=15;N<V;)I=I>>>8^t[(I^k[N++])&255];return~I}function P(k,L){for(var I=L^-1,V=0,N=k.length,W=0,M=0;V<N;)W=k.charCodeAt(V++),W<128?I=I>>>8^t[(I^W)&255]:W<2048?(I=I>>>8^t[(I^(192|W>>6&31))&255],I=I>>>8^t[(I^(128|W&63))&255]):W>=55296&&W<57344?(W=(W&1023)+64,M=k.charCodeAt(V++)&1023,I=I>>>8^t[(I^(240|W>>8&7))&255],I=I>>>8^t[(I^(128|W>>2&63))&255],I=I>>>8^t[(I^(128|M>>6&15|(W&3)<<4))&255],I=I>>>8^t[(I^(128|M&63))&255]):(I=I>>>8^t[(I^(224|W>>12&15))&255],I=I>>>8^t[(I^(128|W>>6&63))&255],I=I>>>8^t[(I^(128|W&63))&255]);return~I}e.table=t,e.bstr=C,e.buf=D,e.str=P})});var eRe=m((cIt,ZOe)=>{"use strict";var{Transform:QQr}=XOe(),ZQr=WW(),QOe=class extends QQr{constructor(r){super(r);this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(r,t,n){r&&(this.checksum=ZQr.buf(r,this.checksum)>>>0,this.rawSize+=r.length),n(null,r)}digest(r){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),r?t.toString(r):t}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};ZOe.exports=QOe});var nRe=m((fIt,tRe)=>{"use strict";var{DeflateRaw:eZr}=require("zlib"),rZr=WW(),rRe=class extends eZr{constructor(r){super(r);this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(r,t){return r&&(this.compressedSize+=r.length),super.push(r,t)}_transform(r,t,n){r&&(this.checksum=rZr.buf(r,this.checksum)>>>0,this.rawSize+=r.length),super._transform(r,t,n)}digest(r){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),r?t.toString(r):t}hex(){return this.digest("hex").toUpperCase()}size(r=!1){return r?this.compressedSize:this.rawSize}};tRe.exports=rRe});var VW=m((dIt,iRe)=>{"use strict";iRe.exports={CRC32Stream:eRe(),DeflateCRC32Stream:nRe()}});var sRe=m((gIt,oRe)=>{var tZr=require("util").inherits,nZr=vW(),{CRC32Stream:iZr}=VW(),{DeflateCRC32Stream:aZr}=VW(),aRe=pW(),pIt=jH(),hIt=PH(),ct=BH(),mIt=fW(),Vr=ER(),Ea=oRe.exports=function(e){if(!(this instanceof Ea))return new Ea(e);e=this.options=this._defaults(e),aRe.call(this,e),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:e.forceZip64,forceLocalTime:e.forceLocalTime}};tZr(Ea,aRe);Ea.prototype._afterAppend=function(e){this._entries.push(e),e.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(e),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()};Ea.prototype._appendBuffer=function(e,r,t){r.length===0&&e.setMethod(ct.METHOD_STORED);var n=e.getMethod();if(n===ct.METHOD_STORED&&(e.setSize(r.length),e.setCompressedSize(r.length),e.setCrc(nZr.unsigned(r))),this._writeLocalFileHeader(e),n===ct.METHOD_STORED){this.write(r),this._afterAppend(e),t(null,e);return}else if(n===ct.METHOD_DEFLATED){this._smartStream(e,t).end(r);return}else{t(new Error("compression method "+n+" not implemented"));return}};Ea.prototype._appendStream=function(e,r,t){e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(ct.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(e);var n=this._smartStream(e,t);r.once("error",function(i){n.emit("error",i),n.end()}),r.pipe(n)};Ea.prototype._defaults=function(e){return typeof e!="object"&&(e={}),typeof e.zlib!="object"&&(e.zlib={}),typeof e.zlib.level!="number"&&(e.zlib.level=ct.ZLIB_BEST_SPEED),e.forceZip64=!!e.forceZip64,e.forceLocalTime=!!e.forceLocalTime,e};Ea.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(e){this._writeCentralFileHeader(e)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()};Ea.prototype._normalizeEntry=function(e){e.getMethod()===-1&&e.setMethod(ct.METHOD_DEFLATED),e.getMethod()===ct.METHOD_DEFLATED&&(e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(ct.MIN_VERSION_DATA_DESCRIPTOR)),e.getTime()===-1&&e.setTime(new Date,this._archive.forceLocalTime),e._offsets={file:0,data:0,contents:0}};Ea.prototype._smartStream=function(e,r){var t=e.getMethod()===ct.METHOD_DEFLATED,n=t?new aZr(this.options.zlib):new iZr,i=null;function a(){var o=n.digest().readUInt32BE(0);e.setCrc(o),e.setSize(n.size()),e.setCompressedSize(n.size(!0)),this._afterAppend(e),r(i,e)}return n.once("end",a.bind(this)),n.once("error",function(o){i=o}),n.pipe(this,{end:!1}),n};Ea.prototype._writeCentralDirectoryEnd=function(){var e=this._entries.length,r=this._archive.centralLength,t=this._archive.centralOffset;this.isZip64()&&(e=ct.ZIP64_MAGIC_SHORT,r=ct.ZIP64_MAGIC,t=ct.ZIP64_MAGIC),this.write(Vr.getLongBytes(ct.SIG_EOCD)),this.write(ct.SHORT_ZERO),this.write(ct.SHORT_ZERO),this.write(Vr.getShortBytes(e)),this.write(Vr.getShortBytes(e)),this.write(Vr.getLongBytes(r)),this.write(Vr.getLongBytes(t));var n=this.getComment(),i=Buffer.byteLength(n);this.write(Vr.getShortBytes(i)),this.write(n)};Ea.prototype._writeCentralDirectoryZip64=function(){this.write(Vr.getLongBytes(ct.SIG_ZIP64_EOCD)),this.write(Vr.getEightBytes(44)),this.write(Vr.getShortBytes(ct.MIN_VERSION_ZIP64)),this.write(Vr.getShortBytes(ct.MIN_VERSION_ZIP64)),this.write(ct.LONG_ZERO),this.write(ct.LONG_ZERO),this.write(Vr.getEightBytes(this._entries.length)),this.write(Vr.getEightBytes(this._entries.length)),this.write(Vr.getEightBytes(this._archive.centralLength)),this.write(Vr.getEightBytes(this._archive.centralOffset)),this.write(Vr.getLongBytes(ct.SIG_ZIP64_EOCD_LOC)),this.write(ct.LONG_ZERO),this.write(Vr.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(Vr.getLongBytes(1))};Ea.prototype._writeCentralFileHeader=function(e){var r=e.getGeneralPurposeBit(),t=e.getMethod(),n=e._offsets,i=e.getSize(),a=e.getCompressedSize();if(e.isZip64()||n.file>ct.ZIP64_MAGIC){i=ct.ZIP64_MAGIC,a=ct.ZIP64_MAGIC,e.setVersionNeededToExtract(ct.MIN_VERSION_ZIP64);var o=Buffer.concat([Vr.getShortBytes(ct.ZIP64_EXTRA_ID),Vr.getShortBytes(24),Vr.getEightBytes(e.getSize()),Vr.getEightBytes(e.getCompressedSize()),Vr.getEightBytes(n.file)],28);e.setExtra(o)}this.write(Vr.getLongBytes(ct.SIG_CFH)),this.write(Vr.getShortBytes(e.getPlatform()<<8|ct.VERSION_MADEBY)),this.write(Vr.getShortBytes(e.getVersionNeededToExtract())),this.write(r.encode()),this.write(Vr.getShortBytes(t)),this.write(Vr.getLongBytes(e.getTimeDos())),this.write(Vr.getLongBytes(e.getCrc())),this.write(Vr.getLongBytes(a)),this.write(Vr.getLongBytes(i));var s=e.getName(),u=e.getComment(),l=e.getCentralDirectoryExtra();r.usesUTF8ForNames()&&(s=Buffer.from(s),u=Buffer.from(u)),this.write(Vr.getShortBytes(s.length)),this.write(Vr.getShortBytes(l.length)),this.write(Vr.getShortBytes(u.length)),this.write(ct.SHORT_ZERO),this.write(Vr.getShortBytes(e.getInternalAttributes())),this.write(Vr.getLongBytes(e.getExternalAttributes())),n.file>ct.ZIP64_MAGIC?this.write(Vr.getLongBytes(ct.ZIP64_MAGIC)):this.write(Vr.getLongBytes(n.file)),this.write(s),this.write(l),this.write(u)};Ea.prototype._writeDataDescriptor=function(e){this.write(Vr.getLongBytes(ct.SIG_DD)),this.write(Vr.getLongBytes(e.getCrc())),e.isZip64()?(this.write(Vr.getEightBytes(e.getCompressedSize())),this.write(Vr.getEightBytes(e.getSize()))):(this.write(Vr.getLongBytes(e.getCompressedSize())),this.write(Vr.getLongBytes(e.getSize())))};Ea.prototype._writeLocalFileHeader=function(e){var r=e.getGeneralPurposeBit(),t=e.getMethod(),n=e.getName(),i=e.getLocalFileDataExtra();e.isZip64()&&(r.useDataDescriptor(!0),e.setVersionNeededToExtract(ct.MIN_VERSION_ZIP64)),r.usesUTF8ForNames()&&(n=Buffer.from(n)),e._offsets.file=this.offset,this.write(Vr.getLongBytes(ct.SIG_LFH)),this.write(Vr.getShortBytes(e.getVersionNeededToExtract())),this.write(r.encode()),this.write(Vr.getShortBytes(t)),this.write(Vr.getLongBytes(e.getTimeDos())),e._offsets.data=this.offset,r.usesDataDescriptor()?(this.write(ct.LONG_ZERO),this.write(ct.LONG_ZERO),this.write(ct.LONG_ZERO)):(this.write(Vr.getLongBytes(e.getCrc())),this.write(Vr.getLongBytes(e.getCompressedSize())),this.write(Vr.getLongBytes(e.getSize()))),this.write(Vr.getShortBytes(n.length)),this.write(Vr.getShortBytes(i.length)),this.write(n),this.write(i),e._offsets.contents=this.offset};Ea.prototype.getComment=function(e){return this._archive.comment!==null?this._archive.comment:""};Ea.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>ct.ZIP64_MAGIC_SHORT||this._archive.centralLength>ct.ZIP64_MAGIC||this._archive.centralOffset>ct.ZIP64_MAGIC};Ea.prototype.setComment=function(e){this._archive.comment=e}});var KW=m((vIt,uRe)=>{uRe.exports={ArchiveEntry:_R(),ZipArchiveEntry:jH(),ArchiveOutputStream:pW(),ZipArchiveOutputStream:sRe()}});var cRe=m((bIt,lRe)=>{var oZr=require("util").inherits,YW=KW().ZipArchiveOutputStream,sZr=KW().ZipArchiveEntry,$W=wy(),jy=lRe.exports=function(e){if(!(this instanceof jy))return new jy(e);e=this.options=e||{},e.zlib=e.zlib||{},YW.call(this,e),typeof e.level=="number"&&e.level>=0&&(e.zlib.level=e.level,delete e.level),!e.forceZip64&&typeof e.zlib.level=="number"&&e.zlib.level===0&&(e.store=!0),e.namePrependSlash=e.namePrependSlash||!1,e.comment&&e.comment.length>0&&this.setComment(e.comment)};oZr(jy,YW);jy.prototype._normalizeFileData=function(e){e=$W.defaults(e,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var r=e.type==="directory",t=e.type==="symlink";return e.name&&(e.name=$W.sanitizePath(e.name),!t&&e.name.slice(-1)==="/"?(r=!0,e.type="directory"):r&&(e.name+="/")),(r||t)&&(e.store=!0),e.date=$W.dateify(e.date),e};jy.prototype.entry=function(e,r,t){if(typeof t!="function"&&(t=this._emitErrorCallback.bind(this)),r=this._normalizeFileData(r),r.type!=="file"&&r.type!=="directory"&&r.type!=="symlink"){t(new Error(r.type+" entries not currently supported"));return}if(typeof r.name!="string"||r.name.length===0){t(new Error("entry name must be a non-empty string value"));return}if(r.type==="symlink"&&typeof r.linkname!="string"){t(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var n=new sZr(r.name);return n.setTime(r.date,this.options.forceLocalTime),r.namePrependSlash&&n.setName(r.name,!0),r.store&&n.setMethod(0),r.comment.length>0&&n.setComment(r.comment),r.type==="symlink"&&typeof r.mode!="number"&&(r.mode=40960),typeof r.mode=="number"&&(r.type==="symlink"&&(r.mode|=40960),n.setUnixMode(r.mode)),r.type==="symlink"&&typeof r.linkname=="string"&&(e=Buffer.from(r.linkname)),YW.prototype.entry.call(this,n,e,t)};jy.prototype.finalize=function(){this.finish()}});var dRe=m((yIt,fRe)=>{var uZr=cRe(),lZr=wy(),nh=function(e){if(!(this instanceof nh))return new nh(e);e=this.options=lZr.defaults(e,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new uZr(e)};nh.prototype.append=function(e,r,t){this.engine.entry(e,r,t)};nh.prototype.finalize=function(){this.engine.finalize()};nh.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};nh.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)};nh.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)};fRe.exports=nh});var QW=m(Ly=>{var cZr=Buffer.alloc,fZr="0000000000000000000",dZr="7777777777777777777",pRe="0".charCodeAt(0),hRe=Buffer.from("ustar\0","binary"),pZr=Buffer.from("00","binary"),hZr=Buffer.from("ustar ","binary"),mZr=Buffer.from(" \0","binary"),gZr=parseInt("7777",8),VE=257,XW=263,vZr=function(e,r,t){return typeof e!="number"?t:(e=~~e,e>=r?r:e>=0||(e+=r,e>=0)?e:0)},bZr=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},yZr=function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},mRe=function(e,r,t,n){for(;t<n;t++)if(e[t]===r)return t;return n},gRe=function(e){for(var r=8*32,t=0;t<148;t++)r+=e[t];for(var n=156;n<512;n++)r+=e[n];return r},ih=function(e,r){return e=e.toString(8),e.length>r?dZr.slice(0,r)+" ":fZr.slice(0,r-e.length)+e+" "};function xZr(e){var r;if(e[0]===128)r=!0;else if(e[0]===255)r=!1;else return null;for(var t=[],n=e.length-1;n>0;n--){var i=e[n];r?t.push(i):t.push(255-i)}var a=0,o=t.length;for(n=0;n<o;n++)a+=t[n]*Math.pow(256,n);return r?a:-1*a}var ah=function(e,r,t){if(e=e.slice(r,r+t),r=0,e[r]&128)return xZr(e);for(;r<e.length&&e[r]===32;)r++;for(var n=vZr(mRe(e,32,r,e.length),e.length,e.length);r<n&&e[r]===0;)r++;return n===r?0:parseInt(e.slice(r,n).toString(),8)},My=function(e,r,t,n){return e.slice(r,mRe(e,0,r,r+t)).toString(n)},JW=function(e){var r=Buffer.byteLength(e),t=Math.floor(Math.log(r)/Math.log(10))+1;return r+t>=Math.pow(10,t)&&t++,r+t+e};Ly.decodeLongPath=function(e,r){return My(e,0,e.length,r)};Ly.encodePax=function(e){var r="";e.name&&(r+=JW(" path="+e.name+`
|
|
175
|
-
`)),e.linkname&&(r+=
|
|
176
|
-
`));var t=e.pax;if(t)for(var n in t)r+=
|
|
177
|
-
`);return Buffer.from(r)};Ly.decodePax=function(e){for(var r={};e.length;){for(var t=0;t<e.length&&e[t]!==32;)t++;var n=parseInt(e.slice(0,t).toString(),10);if(!n)return r;var i=e.slice(t+1,n-1).toString(),a=i.indexOf("=");if(a===-1)return r;r[i.slice(0,a)]=i.slice(a+1),e=e.slice(n)}return r};Ly.encode=function(e){var r=cZr(512),t=e.name,n="";if(e.typeflag===5&&t[t.length-1]!=="/"&&(t+="/"),Buffer.byteLength(t)!==t.length)return null;for(;Buffer.byteLength(t)>100;){var i=t.indexOf("/");if(i===-1)return null;n+=n?"/"+t.slice(0,i):t.slice(0,i),t=t.slice(i+1)}return Buffer.byteLength(t)>100||Buffer.byteLength(n)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(r.write(t),r.write(ih(e.mode&gZr,6),100),r.write(ih(e.uid,6),108),r.write(ih(e.gid,6),116),r.write(ih(e.size,11),124),r.write(ih(e.mtime.getTime()/1e3|0,11),136),r[156]=pRe+yZr(e.type),e.linkname&&r.write(e.linkname,157),hRe.copy(r,VE),pZr.copy(r,XW),e.uname&&r.write(e.uname,265),e.gname&&r.write(e.gname,297),r.write(ih(e.devmajor||0,6),329),r.write(ih(e.devminor||0,6),337),n&&r.write(n,345),r.write(ih(gRe(r),6),148),r)};Ly.decode=function(e,r,t){var n=e[156]===0?0:e[156]-pRe,i=My(e,0,100,r),a=ah(e,100,8),o=ah(e,108,8),s=ah(e,116,8),u=ah(e,124,12),l=ah(e,136,12),c=bZr(n),f=e[157]===0?null:My(e,157,100,r),d=My(e,265,32),p=My(e,297,32),h=ah(e,329,8),b=ah(e,337,8),v=gRe(e);if(v===8*32)return null;if(v!==ah(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(hRe.compare(e,VE,VE+6)===0)e[345]&&(i=My(e,345,155,r)+"/"+i);else if(!(hZr.compare(e,VE,VE+6)===0&&mZr.compare(e,XW,XW+2)===0)){if(!t)throw new Error("Invalid tar header: unknown format.")}return n===0&&i&&i[i.length-1]==="/"&&(n=5),{name:i,mode:a,uid:o,gid:s,size:u,mtime:new Date(1e3*l),type:c,linkname:f,uname:d,gname:p,devmajor:h,devminor:b}}});var ZW=m((_It,vRe)=>{vRe.exports=require("stream")});var wRe=m((EIt,ERe)=>{"use strict";function bRe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function yRe(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?bRe(Object(t),!0).forEach(function(n){_Zr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bRe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _Zr(e,r,t){return r=_Re(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function EZr(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function xRe(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_Re(n.key),n)}}function wZr(e,r,t){return r&&xRe(e.prototype,r),t&&xRe(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _Re(e){var r=SZr(e,"string");return typeof r=="symbol"?r:String(r)}function SZr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var AZr=require("buffer"),JR=AZr.Buffer,TZr=require("util"),eV=TZr.inspect,CZr=eV&&eV.custom||"inspect";function DZr(e,r,t){JR.prototype.copy.call(e,r,t)}ERe.exports=function(){function e(){EZr(this,e),this.head=null,this.tail=null,this.length=0}return wZr(e,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(this.length===0)return JR.alloc(0);for(var n=JR.allocUnsafe(t>>>0),i=this.head,a=0;i;)DZr(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):t===this.head.data.length?i=this.shift():i=n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,a=n.data;for(t-=a.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?a+=o:a+=o.slice(0,t),t-=s,t===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(t){var n=JR.allocUnsafe(t),i=this.head,a=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,t===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:CZr,value:function(t,n){return eV(this,yRe(yRe({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var tV=m((wIt,ARe)=>{"use strict";function kZr(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(rV,this,e)):process.nextTick(rV,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!r&&a?t._writableState?t._writableState.errorEmitted?process.nextTick(QR,t):(t._writableState.errorEmitted=!0,process.nextTick(SRe,t,a)):process.nextTick(SRe,t,a):r?(process.nextTick(QR,t),r(a)):process.nextTick(QR,t)}),this)}function SRe(e,r){rV(e,r),QR(e)}function QR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function OZr(){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 rV(e,r){e.emit("error",r)}function RZr(e,r){var t=e._readableState,n=e._writableState;t&&t.autoDestroy||n&&n.autoDestroy?e.destroy(r):e.emit("error",r)}ARe.exports={destroy:kZr,undestroy:OZr,errorOrDestroy:RZr}});var oh=m((SIt,DRe)=>{"use strict";var TRe={};function iu(e,r,t){t||(t=Error);function n(a,o,s){return typeof r=="string"?r:r(a,o,s)}class i extends t{constructor(o,s,u){super(n(o,s,u))}}i.prototype.name=t.name,i.prototype.code=e,TRe[e]=i}function CRe(e,r){if(Array.isArray(e)){let t=e.length;return e=e.map(n=>String(n)),t>2?`one of ${r} ${e.slice(0,t-1).join(", ")}, or `+e[t-1]:t===2?`one of ${r} ${e[0]} or ${e[1]}`:`of ${r} ${e[0]}`}else return`of ${r} ${String(e)}`}function FZr(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function IZr(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function PZr(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}iu("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);iu("ERR_INVALID_ARG_TYPE",function(e,r,t){let n;typeof r=="string"&&FZr(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";let i;if(IZr(e," argument"))i=`The ${e} ${n} ${CRe(r,"type")}`;else{let a=PZr(e,".")?"property":"argument";i=`The "${e}" ${a} ${n} ${CRe(r,"type")}`}return i+=`. Received type ${typeof t}`,i},TypeError);iu("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");iu("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});iu("ERR_STREAM_PREMATURE_CLOSE","Premature close");iu("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});iu("ERR_MULTIPLE_CALLBACK","Callback called multiple times");iu("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");iu("ERR_STREAM_WRITE_AFTER_END","write after end");iu("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);iu("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);iu("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");DRe.exports.codes=TRe});var nV=m((AIt,kRe)=>{"use strict";var BZr=oh().codes.ERR_INVALID_OPT_VALUE;function jZr(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function MZr(e,r,t,n){var i=jZr(r,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?t:"highWaterMark";throw new BZr(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}kRe.exports={getHighWaterMark:MZr}});var oV=m((TIt,BRe)=>{"use strict";BRe.exports=mi;function ORe(e){var r=this;this.next=null,this.entry=null,this.finish=function(){fet(r,e)}}var qy;mi.WritableState=KE;var LZr={deprecate:d0()},RRe=ZW(),ZR=require("buffer").Buffer,qZr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function NZr(e){return ZR.from(e)}function UZr(e){return ZR.isBuffer(e)||e instanceof qZr}var iV=tV(),GZr=nV(),zZr=GZr.getHighWaterMark,sh=oh().codes,HZr=sh.ERR_INVALID_ARG_TYPE,WZr=sh.ERR_METHOD_NOT_IMPLEMENTED,VZr=sh.ERR_MULTIPLE_CALLBACK,KZr=sh.ERR_STREAM_CANNOT_PIPE,YZr=sh.ERR_STREAM_DESTROYED,$Zr=sh.ERR_STREAM_NULL_VALUES,XZr=sh.ERR_STREAM_WRITE_AFTER_END,JZr=sh.ERR_UNKNOWN_ENCODING,Ny=iV.errorOrDestroy;at()(mi,RRe);function QZr(){}function KE(e,r,t){qy=qy||ym(),e=e||{},typeof t!="boolean"&&(t=r instanceof qy),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=zZr(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){aet(r,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ORe(this)}KE.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(KE.prototype,"buffer",{get:LZr.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var eF;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(eF=Function.prototype[Symbol.hasInstance],Object.defineProperty(mi,Symbol.hasInstance,{value:function(r){return eF.call(this,r)?!0:this!==mi?!1:r&&r._writableState instanceof KE}})):eF=function(r){return r instanceof this};function mi(e){qy=qy||ym();var r=this instanceof qy;if(!r&&!eF.call(mi,this))return new mi(e);this._writableState=new KE(e,this,r),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)),RRe.call(this)}mi.prototype.pipe=function(){Ny(this,new KZr)};function ZZr(e,r){var t=new XZr;Ny(e,t),process.nextTick(r,t)}function eet(e,r,t,n){var i;return t===null?i=new $Zr:typeof t!="string"&&!r.objectMode&&(i=new HZr("chunk",["string","Buffer"],t)),i?(Ny(e,i),process.nextTick(n,i),!1):!0}mi.prototype.write=function(e,r,t){var n=this._writableState,i=!1,a=!n.objectMode&&UZr(e);return a&&!ZR.isBuffer(e)&&(e=NZr(e)),typeof r=="function"&&(t=r,r=null),a?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=QZr),n.ending?ZZr(this,t):(a||eet(this,n,e,t))&&(n.pendingcb++,i=tet(this,n,a,e,r,t)),i};mi.prototype.cork=function(){this._writableState.corked++};mi.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&IRe(this,e))};mi.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new JZr(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(mi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ret(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=ZR.from(r,t)),r}Object.defineProperty(mi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function tet(e,r,t,n,i,a){if(!t){var o=ret(r,n,i);n!==o&&(t=!0,i="buffer",n=o)}var s=r.objectMode?1:n.length;r.length+=s;var u=r.length<r.highWaterMark;if(u||(r.needDrain=!0),r.writing||r.corked){var l=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:a,next:null},l?l.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else aV(e,r,!1,s,n,i,a);return u}function aV(e,r,t,n,i,a,o){r.writelen=n,r.writecb=o,r.writing=!0,r.sync=!0,r.destroyed?r.onwrite(new YZr("write")):t?e._writev(i,r.onwrite):e._write(i,a,r.onwrite),r.sync=!1}function net(e,r,t,n,i){--r.pendingcb,t?(process.nextTick(i,n),process.nextTick(YE,e,r),e._writableState.errorEmitted=!0,Ny(e,n)):(i(n),e._writableState.errorEmitted=!0,Ny(e,n),YE(e,r))}function iet(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function aet(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(typeof i!="function")throw new VZr;if(iet(t),r)net(e,t,n,r,i);else{var a=PRe(t)||e.destroyed;!a&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&IRe(e,t),n?process.nextTick(FRe,e,t,a,i):FRe(e,t,a,i)}}function FRe(e,r,t,n){t||oet(e,r),r.pendingcb--,n(),YE(e,r)}function oet(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function IRe(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),a=r.corkedRequestsFree;a.entry=t;for(var o=0,s=!0;t;)i[o]=t,t.isBuf||(s=!1),t=t.next,o+=1;i.allBuffers=s,aV(e,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new ORe(r),r.bufferedRequestCount=0}else{for(;t;){var u=t.chunk,l=t.encoding,c=t.callback,f=r.objectMode?1:u.length;if(aV(e,r,!1,f,u,l,c),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}mi.prototype._write=function(e,r,t){t(new WZr("_write()"))};mi.prototype._writev=null;mi.prototype.end=function(e,r,t){var n=this._writableState;return typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||cet(this,n,t),this};Object.defineProperty(mi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function PRe(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function set(e,r){e._final(function(t){r.pendingcb--,t&&Ny(e,t),r.prefinished=!0,e.emit("prefinish"),YE(e,r)})}function uet(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"&&!r.destroyed?(r.pendingcb++,r.finalCalled=!0,process.nextTick(set,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function YE(e,r){var t=PRe(r);if(t&&(uet(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"),r.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return t}function cet(e,r,t){r.ending=!0,YE(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function fet(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(mi.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(r){!this._writableState||(this._writableState.destroyed=r)}});mi.prototype.destroy=iV.destroy;mi.prototype._undestroy=iV.undestroy;mi.prototype._destroy=function(e,r){r(e)}});var ym=m((CIt,MRe)=>{"use strict";var det=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};MRe.exports=dc;var jRe=lV(),sV=oV();at()(dc,jRe);for(uV=det(sV.prototype),rF=0;rF<uV.length;rF++)tF=uV[rF],dc.prototype[tF]||(dc.prototype[tF]=sV.prototype[tF]);var uV,tF,rF;function dc(e){if(!(this instanceof dc))return new dc(e);jRe.call(this,e),sV.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",pet)))}Object.defineProperty(dc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(dc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(dc.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function pet(){this._writableState.ended||process.nextTick(het,this)}function het(e){e.end()}Object.defineProperty(dc.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(r){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=r,this._writableState.destroyed=r)}})});var dV=m(qRe=>{"use strict";var cV=vu().Buffer,LRe=cV.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 met(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function get(e){var r=met(e);if(typeof r!="string"&&(cV.isEncoding===LRe||!LRe(e)))throw new Error("Unknown encoding: "+e);return r||e}qRe.StringDecoder=$E;function $E(e){this.encoding=get(e);var r;switch(this.encoding){case"utf16le":this.text=Eet,this.end=wet,r=4;break;case"utf8":this.fillLast=yet,r=4;break;case"base64":this.text=Aet,this.end=Tet,r=3;break;default:this.write=Cet,this.end=Det;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=cV.allocUnsafe(r)}$E.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""};$E.prototype.end=_et;$E.prototype.text=xet;$E.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 fV(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function vet(e,r,t){var n=r.length-1;if(n<t)return 0;var i=fV(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=fV(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=fV(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function bet(e,r,t){if((r[0]&192)!=128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!=128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!=128)return e.lastNeed=2,"\uFFFD"}}function yet(e){var r=this.lastTotal-this.lastNeed,t=bet(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function xet(e,r){var t=vet(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",r,n)}function _et(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function Eet(e,r){if((e.length-r)%2==0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.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],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function wet(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function Aet(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function Tet(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function Cet(e){return e.toString(this.encoding)}function Det(e){return e&&e.length?this.write(e):""}});var nF=m((kIt,GRe)=>{"use strict";var NRe=oh().codes.ERR_STREAM_PREMATURE_CLOSE;function ket(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e.apply(this,n)}}}function Oet(){}function Ret(e){return e.setHeader&&typeof e.abort=="function"}function URe(e,r,t){if(typeof r=="function")return URe(e,null,r);r||(r={}),t=ket(t||Oet);var n=r.readable||r.readable!==!1&&e.readable,i=r.writable||r.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){i=!1,o=!0,n||t.call(e)},u=e._readableState&&e._readableState.endEmitted,l=function(){n=!1,u=!0,i||t.call(e)},c=function(h){t.call(e,h)},f=function(){var h;if(n&&!u)return(!e._readableState||!e._readableState.ended)&&(h=new NRe),t.call(e,h);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(h=new NRe),t.call(e,h)},d=function(){e.req.on("finish",s)};return Ret(e)?(e.on("complete",s),e.on("abort",f),e.req?d():e.on("request",d)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",s),r.error!==!1&&e.on("error",c),e.on("close",f),function(){e.removeListener("complete",s),e.removeListener("abort",f),e.removeListener("request",d),e.req&&e.req.removeListener("finish",s),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",s),e.removeListener("end",l),e.removeListener("error",c),e.removeListener("close",f)}}GRe.exports=URe});var HRe=m((OIt,zRe)=>{"use strict";var iF;function uh(e,r,t){return r=Fet(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Fet(e){var r=Iet(e,"string");return typeof r=="symbol"?r:String(r)}function Iet(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Pet=nF(),lh=Symbol("lastResolve"),xm=Symbol("lastReject"),XE=Symbol("error"),aF=Symbol("ended"),_m=Symbol("lastPromise"),pV=Symbol("handlePromise"),Em=Symbol("stream");function ch(e,r){return{value:e,done:r}}function Bet(e){var r=e[lh];if(r!==null){var t=e[Em].read();t!==null&&(e[_m]=null,e[lh]=null,e[xm]=null,r(ch(t,!1)))}}function jet(e){process.nextTick(Bet,e)}function Met(e,r){return function(t,n){e.then(function(){if(r[aF]){t(ch(void 0,!0));return}r[pV](t,n)},n)}}var Let=Object.getPrototypeOf(function(){}),qet=Object.setPrototypeOf((iF={get stream(){return this[Em]},next:function(){var r=this,t=this[XE];if(t!==null)return Promise.reject(t);if(this[aF])return Promise.resolve(ch(void 0,!0));if(this[Em].destroyed)return new Promise(function(o,s){process.nextTick(function(){r[XE]?s(r[XE]):o(ch(void 0,!0))})});var n=this[_m],i;if(n)i=new Promise(Met(n,this));else{var a=this[Em].read();if(a!==null)return Promise.resolve(ch(a,!1));i=new Promise(this[pV])}return this[_m]=i,i}},uh(iF,Symbol.asyncIterator,function(){return this}),uh(iF,"return",function(){var r=this;return new Promise(function(t,n){r[Em].destroy(null,function(i){if(i){n(i);return}t(ch(void 0,!0))})})}),iF),Let),Net=function(r){var t,n=Object.create(qet,(t={},uh(t,Em,{value:r,writable:!0}),uh(t,lh,{value:null,writable:!0}),uh(t,xm,{value:null,writable:!0}),uh(t,XE,{value:null,writable:!0}),uh(t,aF,{value:r._readableState.endEmitted,writable:!0}),uh(t,pV,{value:function(a,o){var s=n[Em].read();s?(n[_m]=null,n[lh]=null,n[xm]=null,a(ch(s,!1))):(n[lh]=a,n[xm]=o)},writable:!0}),t));return n[_m]=null,Pet(r,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[xm];a!==null&&(n[_m]=null,n[lh]=null,n[xm]=null,a(i)),n[XE]=i;return}var o=n[lh];o!==null&&(n[_m]=null,n[lh]=null,n[xm]=null,o(ch(void 0,!0))),n[aF]=!0}),r.on("readable",jet.bind(null,n)),n};zRe.exports=Net});var YRe=m((RIt,KRe)=>{"use strict";function WRe(e,r,t,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){t(l);return}s.done?r(u):Promise.resolve(u).then(n,i)}function Uet(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var a=e.apply(r,t);function o(u){WRe(a,n,i,o,s,"next",u)}function s(u){WRe(a,n,i,o,s,"throw",u)}o(void 0)})}}function VRe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function Get(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?VRe(Object(t),!0).forEach(function(n){zet(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):VRe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function zet(e,r,t){return r=Het(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Het(e){var r=Wet(e,"string");return typeof r=="symbol"?r:String(r)}function Wet(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Vet=oh().codes.ERR_INVALID_ARG_TYPE;function Ket(e,r,t){var n;if(r&&typeof r.next=="function")n=r;else if(r&&r[Symbol.asyncIterator])n=r[Symbol.asyncIterator]();else if(r&&r[Symbol.iterator])n=r[Symbol.iterator]();else throw new Vet("iterable",["Iterable"],r);var i=new e(Get({objectMode:!0},t)),a=!1;i._read=function(){a||(a=!0,o())};function o(){return s.apply(this,arguments)}function s(){return s=Uet(function*(){try{var u=yield n.next(),l=u.value,c=u.done;c?i.push(null):i.push(yield l)?o():a=!1}catch(f){i.destroy(f)}}),s.apply(this,arguments)}return i}KRe.exports=Ket});var lV=m((IIt,iFe)=>{"use strict";iFe.exports=Vt;var Uy;Vt.ReadableState=XRe;var FIt=require("events").EventEmitter,$Re=function(r,t){return r.listeners(t).length},JE=ZW(),oF=require("buffer").Buffer,Yet=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function $et(e){return oF.from(e)}function Xet(e){return oF.isBuffer(e)||e instanceof Yet}var hV=require("util"),wt;hV&&hV.debuglog?wt=hV.debuglog("stream"):wt=function(){};var Jet=wRe(),mV=tV(),Qet=nV(),Zet=Qet.getHighWaterMark,sF=oh().codes,ert=sF.ERR_INVALID_ARG_TYPE,rrt=sF.ERR_STREAM_PUSH_AFTER_EOF,trt=sF.ERR_METHOD_NOT_IMPLEMENTED,nrt=sF.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Gy,gV,vV;at()(Vt,JE);var QE=mV.errorOrDestroy,bV=["error","close","destroy","pause","resume"];function irt(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Array.isArray(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function XRe(e,r,t){Uy=Uy||ym(),e=e||{},typeof t!="boolean"&&(t=r instanceof Uy),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Zet(this,e,"readableHighWaterMark",t),this.buffer=new Jet,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Gy||(Gy=dV().StringDecoder),this.decoder=new Gy(e.encoding),this.encoding=e.encoding)}function Vt(e){if(Uy=Uy||ym(),!(this instanceof Vt))return new Vt(e);var r=this instanceof Uy;this._readableState=new XRe(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),JE.call(this)}Object.defineProperty(Vt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){!this._readableState||(this._readableState.destroyed=r)}});Vt.prototype.destroy=mV.destroy;Vt.prototype._undestroy=mV.undestroy;Vt.prototype._destroy=function(e,r){r(e)};Vt.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=oF.from(e,r),r=""),n=!0),JRe(this,e,r,!1,n)};Vt.prototype.unshift=function(e){return JRe(this,e,null,!0,!1)};function JRe(e,r,t,n,i){wt("readableAddChunk",r);var a=e._readableState;if(r===null)a.reading=!1,srt(e,a);else{var o;if(i||(o=art(a,r)),o)QE(e,o);else if(a.objectMode||r&&r.length>0)if(typeof r!="string"&&!a.objectMode&&Object.getPrototypeOf(r)!==oF.prototype&&(r=$et(r)),n)a.endEmitted?QE(e,new nrt):yV(e,a,r,!0);else if(a.ended)QE(e,new rrt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!t?(r=a.decoder.write(r),a.objectMode||r.length!==0?yV(e,a,r,!1):xV(e,a)):yV(e,a,r,!1)}else n||(a.reading=!1,xV(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function yV(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,e.emit("data",t)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&uF(e)),xV(e,r)}function art(e,r){var t;return!Xet(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new ert("chunk",["string","Buffer","Uint8Array"],r)),t}Vt.prototype.isPaused=function(){return this._readableState.flowing===!1};Vt.prototype.setEncoding=function(e){Gy||(Gy=dV().StringDecoder);var r=new Gy(e);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var t=this._readableState.buffer.head,n="";t!==null;)n+=r.write(t.data),t=t.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var QRe=1073741824;function ort(e){return e>=QRe?e=QRe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function ZRe(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=ort(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}Vt.prototype.read=function(e){wt("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return wt("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?EV(this):uF(this),null;if(e=ZRe(e,r),e===0&&r.ended)return r.length===0&&EV(this),null;var n=r.needReadable;wt("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,wt("length less than watermark",n)),r.ended||r.reading?(n=!1,wt("reading or ended",n)):n&&(wt("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=ZRe(t,r)));var i;return e>0?i=tFe(e,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&EV(this)),i!==null&&this.emit("data",i),i};function srt(e,r){if(wt("onEofChunk"),!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.sync?uF(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,eFe(e)))}}function uF(e){var r=e._readableState;wt("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(wt("emitReadable",r.flowing),r.emittedReadable=!0,process.nextTick(eFe,e))}function eFe(e){var r=e._readableState;wt("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,_V(e)}function xV(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(urt,e,r))}function urt(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var t=r.length;if(wt("maybeReadMore read 0"),e.read(0),t===r.length)break}r.readingMore=!1}Vt.prototype._read=function(e){QE(this,new trt("_read()"))};Vt.prototype.pipe=function(e,r){var t=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,wt("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:b;n.endEmitted?process.nextTick(a):t.once("end",a),e.on("unpipe",o);function o(v,y){wt("onunpipe"),v===t&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,c())}function s(){wt("onend"),e.end()}var u=lrt(t);e.on("drain",u);var l=!1;function c(){wt("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",b),t.removeListener("data",f),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}t.on("data",f);function f(v){wt("ondata");var y=e.write(v);wt("dest.write",y),y===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&nFe(n.pipes,e)!==-1)&&!l&&(wt("false write response, pause",n.awaitDrain),n.awaitDrain++),t.pause())}function d(v){wt("onerror",v),b(),e.removeListener("error",d),$Re(e,"error")===0&&QE(e,v)}irt(e,"error",d);function p(){e.removeListener("finish",h),b()}e.once("close",p);function h(){wt("onfinish"),e.removeListener("close",p),b()}e.once("finish",h);function b(){wt("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(wt("pipe resume"),t.resume()),e};function lrt(e){return function(){var t=e._readableState;wt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&$Re(e,"data")&&(t.flowing=!0,_V(e))}}Vt.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=nFe(r.pipes,e);return o===-1?this:(r.pipes.splice(o,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};Vt.prototype.on=function(e,r){var t=JE.prototype.on.call(this,e,r),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,wt("on readable",n.length,n.reading),n.length?uF(this):n.reading||process.nextTick(crt,this)),t};Vt.prototype.addListener=Vt.prototype.on;Vt.prototype.removeListener=function(e,r){var t=JE.prototype.removeListener.call(this,e,r);return e==="readable"&&process.nextTick(rFe,this),t};Vt.prototype.removeAllListeners=function(e){var r=JE.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(rFe,this),r};function rFe(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:e.listenerCount("data")>0&&e.resume()}function crt(e){wt("readable nexttick read 0"),e.read(0)}Vt.prototype.resume=function(){var e=this._readableState;return e.flowing||(wt("resume"),e.flowing=!e.readableListening,frt(this,e)),e.paused=!1,this};function frt(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(drt,e,r))}function drt(e,r){wt("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),_V(e),r.flowing&&!r.reading&&e.read(0)}Vt.prototype.pause=function(){return wt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(wt("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function _V(e){var r=e._readableState;for(wt("flow",r.flowing);r.flowing&&e.read()!==null;);}Vt.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(wt("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(wt("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var s=r.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a<bV.length;a++)e.on(bV[a],this.emit.bind(this,bV[a]));return this._read=function(o){wt("wrapped _read",o),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(Vt.prototype[Symbol.asyncIterator]=function(){return gV===void 0&&(gV=HRe()),gV(this)});Object.defineProperty(Vt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Vt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Vt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}});Vt._fromList=tFe;Object.defineProperty(Vt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function tFe(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.first():t=r.buffer.concat(r.length),r.buffer.clear()):t=r.buffer.consume(e,r.decoder),t}function EV(e){var r=e._readableState;wt("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,process.nextTick(prt,r,e))}function prt(e,r){if(wt("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var t=r._writableState;(!t||t.autoDestroy&&t.finished)&&r.destroy()}}typeof Symbol=="function"&&(Vt.from=function(e,r){return vV===void 0&&(vV=YRe()),vV(Vt,e,r)});function nFe(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var wV=m((PIt,oFe)=>{"use strict";oFe.exports=Pf;var lF=oh().codes,hrt=lF.ERR_METHOD_NOT_IMPLEMENTED,mrt=lF.ERR_MULTIPLE_CALLBACK,grt=lF.ERR_TRANSFORM_ALREADY_TRANSFORMING,vrt=lF.ERR_TRANSFORM_WITH_LENGTH_0,cF=ym();at()(Pf,cF);function brt(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(n===null)return this.emit("error",new mrt);t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Pf(e){if(!(this instanceof Pf))return new Pf(e);cF.call(this,e),this._transformState={afterTransform:brt.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",yrt)}function yrt(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(r,t){aFe(e,r,t)}):aFe(this,null,null)}Pf.prototype.push=function(e,r){return this._transformState.needTransform=!1,cF.prototype.push.call(this,e,r)};Pf.prototype._transform=function(e,r,t){t(new hrt("_transform()"))};Pf.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Pf.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};Pf.prototype._destroy=function(e,r){cF.prototype._destroy.call(this,e,function(t){r(t)})};function aFe(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),e._writableState.length)throw new vrt;if(e._transformState.transforming)throw new grt;return e.push(null)}});var lFe=m((BIt,uFe)=>{"use strict";uFe.exports=ZE;var sFe=wV();at()(ZE,sFe);function ZE(e){if(!(this instanceof ZE))return new ZE(e);sFe.call(this,e)}ZE.prototype._transform=function(e,r,t){t(null,e)}});var hFe=m((jIt,pFe)=>{"use strict";var SV;function xrt(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var cFe=oh().codes,_rt=cFe.ERR_MISSING_ARGS,Ert=cFe.ERR_STREAM_DESTROYED;function fFe(e){if(e)throw e}function wrt(e){return e.setHeader&&typeof e.abort=="function"}function Srt(e,r,t,n){n=xrt(n);var i=!1;e.on("close",function(){i=!0}),SV===void 0&&(SV=nF()),SV(e,{readable:r,writable:t},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,wrt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new Ert("pipe"))}}}function dFe(e){e()}function Art(e,r){return e.pipe(r)}function Trt(e){return!e.length||typeof e[e.length-1]!="function"?fFe:e.pop()}function Crt(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=Trt(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new _rt("streams");var i,a=r.map(function(o,s){var u=s<r.length-1,l=s>0;return Srt(o,u,l,function(c){i||(i=c),c&&a.forEach(dFe),!u&&(a.forEach(dFe),n(i))})});return r.reduce(Art)}pFe.exports=Crt});var tw=m((au,rw)=>{var ew=require("stream");process.env.READABLE_STREAM==="disable"&&ew?(rw.exports=ew.Readable,Object.assign(rw.exports,ew),rw.exports.Stream=ew):(au=rw.exports=lV(),au.Stream=ew||au,au.Readable=au,au.Writable=oV(),au.Duplex=ym(),au.Transform=wV(),au.PassThrough=lFe(),au.finished=nF(),au.pipeline=hFe())});var _Fe=m((MIt,xFe)=>{var mFe=require("util"),Drt=dq(),nw=QW(),gFe=tw().Writable,vFe=tw().PassThrough,bFe=function(){},yFe=function(e){return e&=511,e&&512-e},krt=function(e,r){var t=new fF(e,r);return t.end(),t},Ort=function(e,r){return r.path&&(e.name=r.path),r.linkpath&&(e.linkname=r.linkpath),r.size&&(e.size=parseInt(r.size,10)),e.pax=r,e},fF=function(e,r){this._parent=e,this.offset=r,vFe.call(this,{autoDestroy:!1})};mFe.inherits(fF,vFe);fF.prototype.destroy=function(e){this._parent.destroy(e)};var Bf=function(e){if(!(this instanceof Bf))return new Bf(e);gFe.call(this,e),e=e||{},this._offset=0,this._buffer=Drt(),this._missing=0,this._partial=!1,this._onparse=bFe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var r=this,t=r._buffer,n=function(){r._continue()},i=function(d){if(r._locked=!1,d)return r.destroy(d);r._stream||n()},a=function(){r._stream=null;var d=yFe(r._header.size);d?r._parse(d,o):r._parse(512,f),r._locked||n()},o=function(){r._buffer.consume(yFe(r._header.size)),r._parse(512,f),n()},s=function(){var d=r._header.size;r._paxGlobal=nw.decodePax(t.slice(0,d)),t.consume(d),a()},u=function(){var d=r._header.size;r._pax=nw.decodePax(t.slice(0,d)),r._paxGlobal&&(r._pax=Object.assign({},r._paxGlobal,r._pax)),t.consume(d),a()},l=function(){var d=r._header.size;this._gnuLongPath=nw.decodeLongPath(t.slice(0,d),e.filenameEncoding),t.consume(d),a()},c=function(){var d=r._header.size;this._gnuLongLinkPath=nw.decodeLongPath(t.slice(0,d),e.filenameEncoding),t.consume(d),a()},f=function(){var d=r._offset,p;try{p=r._header=nw.decode(t.slice(0,512),e.filenameEncoding,e.allowUnknownFormat)}catch(h){r.emit("error",h)}if(t.consume(512),!p){r._parse(512,f),n();return}if(p.type==="gnu-long-path"){r._parse(p.size,l),n();return}if(p.type==="gnu-long-link-path"){r._parse(p.size,c),n();return}if(p.type==="pax-global-header"){r._parse(p.size,s),n();return}if(p.type==="pax-header"){r._parse(p.size,u),n();return}if(r._gnuLongPath&&(p.name=r._gnuLongPath,r._gnuLongPath=null),r._gnuLongLinkPath&&(p.linkname=r._gnuLongLinkPath,r._gnuLongLinkPath=null),r._pax&&(r._header=p=Ort(p,r._pax),r._pax=null),r._locked=!0,!p.size||p.type==="directory"){r._parse(512,f),r.emit("entry",p,krt(r,d),i);return}r._stream=new fF(r,d),r.emit("entry",p,r._stream,i),r._parse(p.size,a),n()};this._onheader=f,this._parse(512,f)};mFe.inherits(Bf,gFe);Bf.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};Bf.prototype._parse=function(e,r){this._destroyed||(this._offset+=e,this._missing=e,r===this._onheader&&(this._partial=!1),this._onparse=r)};Bf.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=bFe,this._overflow?this._write(this._overflow,void 0,e):e()}};Bf.prototype._write=function(e,r,t){if(!this._destroyed){var n=this._stream,i=this._buffer,a=this._missing;if(e.length&&(this._partial=!0),e.length<a)return this._missing-=e.length,this._overflow=null,n?n.write(e,t):(i.append(e),t());this._cb=t,this._missing=0;var o=null;e.length>a&&(o=e.slice(a),e=e.slice(0,a)),n?n.end(e):i.append(e),this._overflow=o,this._onparse()}};Bf.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};xFe.exports=Bf});var wFe=m((LIt,EFe)=>{EFe.exports=require("fs").constants||require("constants")});var TFe=m((qIt,AFe)=>{var Rrt=aR(),Frt=function(){},Irt=function(e){return e.setHeader&&typeof e.abort=="function"},Prt=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},SFe=function(e,r,t){if(typeof r=="function")return SFe(e,null,r);r||(r={}),t=Rrt(t||Frt);var n=e._writableState,i=e._readableState,a=r.readable||r.readable!==!1&&e.readable,o=r.writable||r.writable!==!1&&e.writable,s=!1,u=function(){e.writable||l()},l=function(){o=!1,a||t.call(e)},c=function(){a=!1,o||t.call(e)},f=function(v){t.call(e,v?new Error("exited with error code: "+v):null)},d=function(v){t.call(e,v)},p=function(){process.nextTick(h)},h=function(){if(!s){if(a&&!(i&&i.ended&&!i.destroyed))return t.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return t.call(e,new Error("premature close"))}},b=function(){e.req.on("finish",l)};return Irt(e)?(e.on("complete",l),e.on("abort",p),e.req?b():e.on("request",b)):o&&!n&&(e.on("end",u),e.on("close",u)),Prt(e)&&e.on("exit",f),e.on("end",c),e.on("finish",l),r.error!==!1&&e.on("error",d),e.on("close",p),function(){s=!0,e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",b),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("exit",f),e.removeListener("end",c),e.removeListener("error",d),e.removeListener("close",p)}};AFe.exports=SFe});var RFe=m((NIt,OFe)=>{var zy=wFe(),CFe=TFe(),dF=at(),Brt=Buffer.alloc,DFe=tw().Readable,Hy=tw().Writable,jrt=require("string_decoder").StringDecoder,pF=QW(),Mrt=parseInt("755",8),Lrt=parseInt("644",8),kFe=Brt(1024),AV=function(){},TV=function(e,r){r&=511,r&&e.push(kFe.slice(0,512-r))};function qrt(e){switch(e&zy.S_IFMT){case zy.S_IFBLK:return"block-device";case zy.S_IFCHR:return"character-device";case zy.S_IFDIR:return"directory";case zy.S_IFIFO:return"fifo";case zy.S_IFLNK:return"symlink"}return"file"}var hF=function(e){Hy.call(this),this.written=0,this._to=e,this._destroyed=!1};dF(hF,Hy);hF.prototype._write=function(e,r,t){if(this.written+=e.length,this._to.push(e))return t();this._to._drain=t};hF.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var mF=function(){Hy.call(this),this.linkname="",this._decoder=new jrt("utf-8"),this._destroyed=!1};dF(mF,Hy);mF.prototype._write=function(e,r,t){this.linkname+=this._decoder.write(e),t()};mF.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var iw=function(){Hy.call(this),this._destroyed=!1};dF(iw,Hy);iw.prototype._write=function(e,r,t){t(new Error("No body allowed for this entry"))};iw.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var pc=function(e){if(!(this instanceof pc))return new pc(e);DFe.call(this,e),this._drain=AV,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};dF(pc,DFe);pc.prototype.entry=function(e,r,t){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof r=="function"&&(t=r,r=null),t||(t=AV);var n=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=qrt(e.mode)),e.mode||(e.mode=e.type==="directory"?Mrt:Lrt),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof r=="string"&&(r=Buffer.from(r)),Buffer.isBuffer(r)){e.size=r.length,this._encode(e);var i=this.push(r);return TV(n,e.size),i?process.nextTick(t):this._drain=t,new iw}if(e.type==="symlink"&&!e.linkname){var a=new mF;return CFe(a,function(s){if(s)return n.destroy(),t(s);e.linkname=a.linkname,n._encode(e),t()}),a}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(t),new iw;var o=new hF(this);return this._stream=o,CFe(o,function(s){if(n._stream=null,s)return n.destroy(),t(s);if(o.written!==e.size)return n.destroy(),t(new Error("size mismatch"));TV(n,e.size),n._finalizing&&n.finalize(),t()}),o}};pc.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(kFe),this.push(null))};pc.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};pc.prototype._encode=function(e){if(!e.pax){var r=pF.encode(e);if(r){this.push(r);return}}this._encodePax(e)};pc.prototype._encodePax=function(e){var r=pF.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),t={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:r.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(pF.encode(t)),this.push(r),TV(this,r.length),t.size=e.size,t.type=e.type,this.push(pF.encode(t))};pc.prototype._read=function(e){var r=this._drain;this._drain=AV,r()};OFe.exports=pc});var FFe=m(CV=>{CV.extract=_Fe();CV.pack=RFe()});var BFe=m((GIt,PFe)=>{var Nrt=require("zlib"),Urt=FFe(),IFe=wy(),jf=function(e){if(!(this instanceof jf))return new jf(e);e=this.options=IFe.defaults(e,{gzip:!1}),typeof e.gzipOptions!="object"&&(e.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=Urt.pack(e),this.compressor=!1,e.gzip&&(this.compressor=Nrt.createGzip(e.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};jf.prototype._onCompressorError=function(e){this.engine.emit("error",e)};jf.prototype.append=function(e,r,t){var n=this;r.mtime=r.date;function i(o,s){if(o){t(o);return}n.engine.entry(r,s,function(u){t(u,r)})}if(r.sourceType==="buffer")i(null,e);else if(r.sourceType==="stream"&&r.stats){r.size=r.stats.size;var a=n.engine.entry(r,function(o){t(o,r)});e.pipe(a)}else r.sourceType==="stream"&&IFe.collectStream(e,i)};jf.prototype.finalize=function(){this.engine.finalize()};jf.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};jf.prototype.pipe=function(e,r){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(e,r):this.engine.pipe.apply(this.engine,arguments)};jf.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)};PFe.exports=jf});var qFe=m((zIt,LFe)=>{var Grt=require("util").inherits,jFe=OH().Transform,zrt=vW(),MFe=wy(),fh=function(e){if(!(this instanceof fh))return new fh(e);e=this.options=MFe.defaults(e,{}),jFe.call(this,e),this.supports={directory:!0,symlink:!0},this.files=[]};Grt(fh,jFe);fh.prototype._transform=function(e,r,t){t(null,e)};fh.prototype._writeStringified=function(){var e=JSON.stringify(this.files);this.write(e)};fh.prototype.append=function(e,r,t){var n=this;r.crc32=0;function i(a,o){if(a){t(a);return}r.size=o.length||0,r.crc32=zrt.unsigned(o),n.files.push(r),t(null,r)}r.sourceType==="buffer"?i(null,e):r.sourceType==="stream"&&MFe.collectStream(e,i)};fh.prototype.finalize=function(){this._writeStringified(),this.end()};LFe.exports=fh});var UFe=m((HIt,NFe)=>{var Hrt=FDe(),aw={},dh=function(e,r){return dh.create(e,r)};dh.create=function(e,r){if(aw[e]){var t=new Hrt(e,r);return t.setFormat(e),t.setModule(new aw[e](r)),t}else throw new Error("create("+e+"): format not registered")};dh.registerFormat=function(e,r){if(aw[e])throw new Error("register("+e+"): format already registered");if(typeof r!="function")throw new Error("register("+e+"): format module invalid");if(typeof r.prototype.append!="function"||typeof r.prototype.finalize!="function")throw new Error("register("+e+"): format module missing methods");aw[e]=r};dh.isRegisteredFormat=function(e){return!!aw[e]};dh.registerFormat("zip",dRe());dh.registerFormat("tar",BFe());dh.registerFormat("json",qFe());NFe.exports=dh});var Mf=m(us=>{"use strict";us.base64=!0;us.array=!0;us.string=!0;us.arraybuffer=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined";us.nodebuffer=typeof Buffer!="undefined";us.uint8array=typeof Uint8Array!="undefined";if(typeof ArrayBuffer=="undefined")us.blob=!1;else{DV=new ArrayBuffer(0);try{us.blob=new Blob([DV],{type:"application/zip"}).size===0}catch{try{GFe=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,kV=new GFe,kV.append(DV),us.blob=kV.getBlob("application/zip").size===0}catch{us.blob=!1}}}var DV,GFe,kV;try{us.nodestream=!!lE().Readable}catch{us.nodestream=!1}});var RV=m(OV=>{"use strict";var Wrt=Qn(),Vrt=Mf(),hc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";OV.encode=function(e){for(var r=[],t,n,i,a,o,s,u,l=0,c=e.length,f=c,d=Wrt.getTypeOf(e)!=="string";l<e.length;)f=c-l,d?(t=e[l++],n=l<c?e[l++]:0,i=l<c?e[l++]:0):(t=e.charCodeAt(l++),n=l<c?e.charCodeAt(l++):0,i=l<c?e.charCodeAt(l++):0),a=t>>2,o=(t&3)<<4|n>>4,s=f>1?(n&15)<<2|i>>6:64,u=f>2?i&63:64,r.push(hc.charAt(a)+hc.charAt(o)+hc.charAt(s)+hc.charAt(u));return r.join("")};OV.decode=function(e){var r,t,n,i,a,o,s,u=0,l=0,c="data:";if(e.substr(0,c.length)===c)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var f=e.length*3/4;if(e.charAt(e.length-1)===hc.charAt(64)&&f--,e.charAt(e.length-2)===hc.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");var d;for(Vrt.uint8array?d=new Uint8Array(f|0):d=new Array(f|0);u<e.length;)i=hc.indexOf(e.charAt(u++)),a=hc.indexOf(e.charAt(u++)),o=hc.indexOf(e.charAt(u++)),s=hc.indexOf(e.charAt(u++)),r=i<<2|a>>4,t=(a&15)<<4|o>>2,n=(o&3)<<6|s,d[l++]=r,o!==64&&(d[l++]=t),s!==64&&(d[l++]=n);return d}});var ow=m((KIt,zFe)=>{"use strict";zFe.exports={isNode:typeof Buffer!="undefined",newBufferFrom:function(e,r){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,r);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,r)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var r=new Buffer(e);return r.fill(0),r},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 KFe=m((YIt,VFe)=>{"use strict";var HFe=global.MutationObserver||global.WebKitMutationObserver,Wy;process.browser?HFe?(FV=0,WFe=new HFe(uw),IV=global.document.createTextNode(""),WFe.observe(IV,{characterData:!0}),Wy=function(){IV.data=FV=++FV%2}):!global.setImmediate&&typeof global.MessageChannel!="undefined"?(PV=new global.MessageChannel,PV.port1.onmessage=uw,Wy=function(){PV.port2.postMessage(0)}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?Wy=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){uw(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},global.document.documentElement.appendChild(e)}:Wy=function(){setTimeout(uw,0)}:Wy=function(){process.nextTick(uw)};var FV,WFe,IV,PV,BV,sw=[];function uw(){BV=!0;for(var e,r,t=sw.length;t;){for(r=sw,sw=[],e=-1;++e<t;)r[e]();t=sw.length}BV=!1}VFe.exports=Krt;function Krt(e){sw.push(e)===1&&!BV&&Wy()}});var e4e=m(($It,ZFe)=>{"use strict";var YFe=KFe();function Vy(){}var eo={},$Fe=["REJECTED"],jV=["FULFILLED"],XFe=["PENDING"];process.browser||(lw=["UNHANDLED"]);var lw;ZFe.exports=ph;function ph(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=XFe,this.queue=[],this.outcome=void 0,process.browser||(this.handled=lw),e!==Vy&&JFe(this,e)}ph.prototype.finally=function(e){if(typeof e!="function")return this;var r=this.constructor;return this.then(t,n);function t(i){function a(){return i}return r.resolve(e()).then(a)}function n(i){function a(){throw i}return r.resolve(e()).then(a)}};ph.prototype.catch=function(e){return this.then(null,e)};ph.prototype.then=function(e,r){if(typeof e!="function"&&this.state===jV||typeof r!="function"&&this.state===$Fe)return this;var t=new this.constructor(Vy);if(process.browser||this.handled===lw&&(this.handled=null),this.state!==XFe){var n=this.state===jV?e:r;MV(t,n,this.outcome)}else this.queue.push(new cw(t,e,r));return t};function cw(e,r,t){this.promise=e,typeof r=="function"&&(this.onFulfilled=r,this.callFulfilled=this.otherCallFulfilled),typeof t=="function"&&(this.onRejected=t,this.callRejected=this.otherCallRejected)}cw.prototype.callFulfilled=function(e){eo.resolve(this.promise,e)};cw.prototype.otherCallFulfilled=function(e){MV(this.promise,this.onFulfilled,e)};cw.prototype.callRejected=function(e){eo.reject(this.promise,e)};cw.prototype.otherCallRejected=function(e){MV(this.promise,this.onRejected,e)};function MV(e,r,t){YFe(function(){var n;try{n=r(t)}catch(i){return eo.reject(e,i)}n===e?eo.reject(e,new TypeError("Cannot resolve promise with itself")):eo.resolve(e,n)})}eo.resolve=function(e,r){var t=QFe(Yrt,r);if(t.status==="error")return eo.reject(e,t.value);var n=t.value;if(n)JFe(e,n);else{e.state=jV,e.outcome=r;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(r)}return e};eo.reject=function(e,r){e.state=$Fe,e.outcome=r,process.browser||e.handled===lw&&YFe(function(){e.handled===lw&&process.emit("unhandledRejection",r,e)});for(var t=-1,n=e.queue.length;++t<n;)e.queue[t].callRejected(r);return e};function Yrt(e){var r=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof r=="function")return function(){r.apply(e,arguments)}}function JFe(e,r){var t=!1;function n(s){t||(t=!0,eo.reject(e,s))}function i(s){t||(t=!0,eo.resolve(e,s))}function a(){r(i,n)}var o=QFe(a);o.status==="error"&&n(o.value)}function QFe(e,r){var t={};try{t.value=e(r),t.status="success"}catch(n){t.status="error",t.value=n}return t}ph.resolve=$rt;function $rt(e){return e instanceof this?e:eo.resolve(new this(Vy),e)}ph.reject=Xrt;function Xrt(e){var r=new this(Vy);return eo.reject(r,e)}ph.all=Jrt;function Jrt(e){var r=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var t=e.length,n=!1;if(!t)return this.resolve([]);for(var i=new Array(t),a=0,o=-1,s=new this(Vy);++o<t;)u(e[o],o);return s;function u(l,c){r.resolve(l).then(f,function(d){n||(n=!0,eo.reject(s,d))});function f(d){i[c]=d,++a===t&&!n&&(n=!0,eo.resolve(s,i))}}}ph.race=Qrt;function Qrt(e){var r=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var t=e.length,n=!1;if(!t)return this.resolve([]);for(var i=-1,a=new this(Vy);++i<t;)o(e[i]);return a;function o(s){r.resolve(s).then(function(u){n||(n=!0,eo.resolve(a,u))},function(u){n||(n=!0,eo.reject(a,u))})}}});var Ky=m((XIt,r4e)=>{"use strict";var LV=null;typeof Promise!="undefined"?LV=Promise:LV=e4e();r4e.exports={Promise:LV}});var n4e=m(t4e=>{(function(e,r){"use strict";if(e.setImmediate)return;var t=1,n={},i=!1,a=e.document,o;function s(w){typeof w!="function"&&(w=new Function(""+w));for(var A=new Array(arguments.length-1),C=0;C<A.length;C++)A[C]=arguments[C+1];var D={callback:w,args:A};return n[t]=D,o(t),t++}function u(w){delete n[w]}function l(w){var A=w.callback,C=w.args;switch(C.length){case 0:A();break;case 1:A(C[0]);break;case 2:A(C[0],C[1]);break;case 3:A(C[0],C[1],C[2]);break;default:A.apply(r,C);break}}function c(w){if(i)setTimeout(c,0,w);else{var A=n[w];if(A){i=!0;try{l(A)}finally{u(w),i=!1}}}}function f(){o=function(w){process.nextTick(function(){c(w)})}}function d(){if(e.postMessage&&!e.importScripts){var w=!0,A=e.onmessage;return e.onmessage=function(){w=!1},e.postMessage("","*"),e.onmessage=A,w}}function p(){var w="setImmediate$"+Math.random()+"$",A=function(C){C.source===e&&typeof C.data=="string"&&C.data.indexOf(w)===0&&c(+C.data.slice(w.length))};e.addEventListener?e.addEventListener("message",A,!1):e.attachEvent("onmessage",A),o=function(C){e.postMessage(w+C,"*")}}function h(){var w=new MessageChannel;w.port1.onmessage=function(A){var C=A.data;c(C)},o=function(A){w.port2.postMessage(A)}}function b(){var w=a.documentElement;o=function(A){var C=a.createElement("script");C.onreadystatechange=function(){c(A),C.onreadystatechange=null,w.removeChild(C),C=null},w.appendChild(C)}}function v(){o=function(w){setTimeout(c,0,w)}}var y=Object.getPrototypeOf&&Object.getPrototypeOf(e);y=y&&y.setTimeout?y:e,{}.toString.call(e.process)==="[object process]"?f():d()?p():e.MessageChannel?h():a&&"onreadystatechange"in a.createElement("script")?b():v(),y.setImmediate=s,y.clearImmediate=u})(typeof self=="undefined"?typeof global=="undefined"?t4e:global:self)});var Qn=m(Ui=>{"use strict";var hh=Mf(),Zrt=RV(),Yy=ow(),qV=Ky();n4e();function ett(e){var r=null;return hh.uint8array?r=new Uint8Array(e.length):r=new Array(e.length),gF(e,r)}Ui.newBlob=function(e,r){Ui.checkSupport("blob");try{return new Blob([e],{type:r})}catch{try{var t=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,n=new t;return n.append(e),n.getBlob(r)}catch{throw new Error("Bug : can't construct the Blob.")}}};function fw(e){return e}function gF(e,r){for(var t=0;t<e.length;++t)r[t]=e.charCodeAt(t)&255;return r}var vF={stringifyByChunk:function(e,r,t){var n=[],i=0,a=e.length;if(a<=t)return String.fromCharCode.apply(null,e);for(;i<a;)r==="array"||r==="nodebuffer"?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+t,a)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+t,a)))),i+=t;return n.join("")},stringifyByChar:function(e){for(var r="",t=0;t<e.length;t++)r+=String.fromCharCode(e[t]);return r},applyCanBeUsed:{uint8array:function(){try{return hh.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return hh.nodebuffer&&String.fromCharCode.apply(null,Yy.allocBuffer(1)).length===1}catch{return!1}}()}};function dw(e){var r=65536,t=Ui.getTypeOf(e),n=!0;if(t==="uint8array"?n=vF.applyCanBeUsed.uint8array:t==="nodebuffer"&&(n=vF.applyCanBeUsed.nodebuffer),n)for(;r>1;)try{return vF.stringifyByChunk(e,t,r)}catch{r=Math.floor(r/2)}return vF.stringifyByChar(e)}Ui.applyFromCharCode=dw;function bF(e,r){for(var t=0;t<e.length;t++)r[t]=e[t];return r}var mh={};mh.string={string:fw,array:function(e){return gF(e,new Array(e.length))},arraybuffer:function(e){return mh.string.uint8array(e).buffer},uint8array:function(e){return gF(e,new Uint8Array(e.length))},nodebuffer:function(e){return gF(e,Yy.allocBuffer(e.length))}};mh.array={string:dw,array:fw,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return Yy.newBufferFrom(e)}};mh.arraybuffer={string:function(e){return dw(new Uint8Array(e))},array:function(e){return bF(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:fw,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return Yy.newBufferFrom(new Uint8Array(e))}};mh.uint8array={string:dw,array:function(e){return bF(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:fw,nodebuffer:function(e){return Yy.newBufferFrom(e)}};mh.nodebuffer={string:dw,array:function(e){return bF(e,new Array(e.length))},arraybuffer:function(e){return mh.nodebuffer.uint8array(e).buffer},uint8array:function(e){return bF(e,new Uint8Array(e.length))},nodebuffer:fw};Ui.transformTo=function(e,r){if(r||(r=""),!e)return r;Ui.checkSupport(e);var t=Ui.getTypeOf(r),n=mh[t][e](r);return n};Ui.resolve=function(e){for(var r=e.split("/"),t=[],n=0;n<r.length;n++){var i=r[n];i==="."||i===""&&n!==0&&n!==r.length-1||(i===".."?t.pop():t.push(i))}return t.join("/")};Ui.getTypeOf=function(e){if(typeof e=="string")return"string";if(Object.prototype.toString.call(e)==="[object Array]")return"array";if(hh.nodebuffer&&Yy.isBuffer(e))return"nodebuffer";if(hh.uint8array&&e instanceof Uint8Array)return"uint8array";if(hh.arraybuffer&&e instanceof ArrayBuffer)return"arraybuffer"};Ui.checkSupport=function(e){var r=hh[e.toLowerCase()];if(!r)throw new Error(e+" is not supported by this platform")};Ui.MAX_VALUE_16BITS=65535;Ui.MAX_VALUE_32BITS=-1;Ui.pretty=function(e){var r="",t,n;for(n=0;n<(e||"").length;n++)t=e.charCodeAt(n),r+="\\x"+(t<16?"0":"")+t.toString(16).toUpperCase();return r};Ui.delay=function(e,r,t){setImmediate(function(){e.apply(t||null,r||[])})};Ui.inherits=function(e,r){var t=function(){};t.prototype=r.prototype,e.prototype=new t};Ui.extend=function(){var e={},r,t;for(r=0;r<arguments.length;r++)for(t in arguments[r])Object.prototype.hasOwnProperty.call(arguments[r],t)&&typeof e[t]=="undefined"&&(e[t]=arguments[r][t]);return e};Ui.prepareContent=function(e,r,t,n,i){var a=qV.Promise.resolve(r).then(function(o){var s=hh.blob&&(o instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(o))!==-1);return s&&typeof FileReader!="undefined"?new qV.Promise(function(u,l){var c=new FileReader;c.onload=function(f){u(f.target.result)},c.onerror=function(f){l(f.target.error)},c.readAsArrayBuffer(o)}):o});return a.then(function(o){var s=Ui.getTypeOf(o);return s?(s==="arraybuffer"?o=Ui.transformTo("uint8array",o):s==="string"&&(i?o=Zrt.decode(o):t&&n!==!0&&(o=ett(o))),o):qV.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}});var ls=m((ZIt,a4e)=>{"use strict";function i4e(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}i4e.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,r){return this._listeners[e].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,r){if(this._listeners[e])for(var t=0;t<this._listeners[e].length;t++)this._listeners[e][t].call(this,r)},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 r=this;return e.on("data",function(t){r.processChunk(t)}),e.on("end",function(){r.end()}),e.on("error",function(t){r.error(t)}),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,r){return this.extraStreamInfo[e]=r,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}};a4e.exports=i4e});var Xy=m(gh=>{"use strict";var $y=Qn(),wm=Mf(),rtt=ow(),yF=ls(),pw=new Array(256);for(Lf=0;Lf<256;Lf++)pw[Lf]=Lf>=252?6:Lf>=248?5:Lf>=240?4:Lf>=224?3:Lf>=192?2:1;var Lf;pw[254]=pw[254]=1;var ttt=function(e){var r,t,n,i,a,o=e.length,s=0;for(i=0;i<o;i++)t=e.charCodeAt(i),(t&64512)==55296&&i+1<o&&(n=e.charCodeAt(i+1),(n&64512)==56320&&(t=65536+(t-55296<<10)+(n-56320),i++)),s+=t<128?1:t<2048?2:t<65536?3:4;for(wm.uint8array?r=new Uint8Array(s):r=new Array(s),a=0,i=0;a<s;i++)t=e.charCodeAt(i),(t&64512)==55296&&i+1<o&&(n=e.charCodeAt(i+1),(n&64512)==56320&&(t=65536+(t-55296<<10)+(n-56320),i++)),t<128?r[a++]=t:t<2048?(r[a++]=192|t>>>6,r[a++]=128|t&63):t<65536?(r[a++]=224|t>>>12,r[a++]=128|t>>>6&63,r[a++]=128|t&63):(r[a++]=240|t>>>18,r[a++]=128|t>>>12&63,r[a++]=128|t>>>6&63,r[a++]=128|t&63);return r},ntt=function(e,r){var t;for(r=r||e.length,r>e.length&&(r=e.length),t=r-1;t>=0&&(e[t]&192)==128;)t--;return t<0||t===0?r:t+pw[e[t]]>r?t:r},itt=function(e){var r,t,n,i,a=e.length,o=new Array(a*2);for(t=0,r=0;r<a;){if(n=e[r++],n<128){o[t++]=n;continue}if(i=pw[n],i>4){o[t++]=65533,r+=i-1;continue}for(n&=i===2?31:i===3?15:7;i>1&&r<a;)n=n<<6|e[r++]&63,i--;if(i>1){o[t++]=65533;continue}n<65536?o[t++]=n:(n-=65536,o[t++]=55296|n>>10&1023,o[t++]=56320|n&1023)}return o.length!==t&&(o.subarray?o=o.subarray(0,t):o.length=t),$y.applyFromCharCode(o)};gh.utf8encode=function(r){return wm.nodebuffer?rtt.newBufferFrom(r,"utf-8"):ttt(r)};gh.utf8decode=function(r){return wm.nodebuffer?$y.transformTo("nodebuffer",r).toString("utf-8"):(r=$y.transformTo(wm.uint8array?"uint8array":"array",r),itt(r))};function xF(){yF.call(this,"utf-8 decode"),this.leftOver=null}$y.inherits(xF,yF);xF.prototype.processChunk=function(e){var r=$y.transformTo(wm.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(wm.uint8array){var t=r;r=new Uint8Array(t.length+this.leftOver.length),r.set(this.leftOver,0),r.set(t,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var n=ntt(r),i=r;n!==r.length&&(wm.uint8array?(i=r.subarray(0,n),this.leftOver=r.subarray(n,r.length)):(i=r.slice(0,n),this.leftOver=r.slice(n,r.length))),this.push({data:gh.utf8decode(i),meta:e.meta})};xF.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:gh.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};gh.Utf8DecodeWorker=xF;function NV(){yF.call(this,"utf-8 encode")}$y.inherits(NV,yF);NV.prototype.processChunk=function(e){this.push({data:gh.utf8encode(e.data),meta:e.meta})};gh.Utf8EncodeWorker=NV});var l4e=m((rPt,u4e)=>{"use strict";var o4e=ls(),s4e=Qn();function UV(e){o4e.call(this,"ConvertWorker to "+e),this.destType=e}s4e.inherits(UV,o4e);UV.prototype.processChunk=function(e){this.push({data:s4e.transformTo(this.destType,e.data),meta:e.meta})};u4e.exports=UV});var d4e=m((tPt,f4e)=>{"use strict";var c4e=lE().Readable,att=Qn();att.inherits(GV,c4e);function GV(e,r,t){c4e.call(this,r),this._helper=e;var n=this;e.on("data",function(i,a){n.push(i)||n._helper.pause(),t&&t(a)}).on("error",function(i){n.emit("error",i)}).on("end",function(){n.push(null)})}GV.prototype._read=function(){this._helper.resume()};f4e.exports=GV});var zV=m((nPt,m4e)=>{"use strict";var Sm=Qn(),ott=l4e(),stt=ls(),utt=RV(),ltt=Mf(),ctt=Ky(),p4e=null;if(ltt.nodestream)try{p4e=d4e()}catch{}function ftt(e,r,t){switch(e){case"blob":return Sm.newBlob(Sm.transformTo("arraybuffer",r),t);case"base64":return utt.encode(r);default:return Sm.transformTo(e,r)}}function dtt(e,r){var t,n=0,i=null,a=0;for(t=0;t<r.length;t++)a+=r[t].length;switch(e){case"string":return r.join("");case"array":return Array.prototype.concat.apply([],r);case"uint8array":for(i=new Uint8Array(a),t=0;t<r.length;t++)i.set(r[t],n),n+=r[t].length;return i;case"nodebuffer":return Buffer.concat(r);default:throw new Error("concat : unsupported type '"+e+"'")}}function ptt(e,r){return new ctt.Promise(function(t,n){var i=[],a=e._internalType,o=e._outputType,s=e._mimeType;e.on("data",function(u,l){i.push(u),r&&r(l)}).on("error",function(u){i=[],n(u)}).on("end",function(){try{var u=ftt(o,dtt(a,i),s);t(u)}catch(l){n(l)}i=[]}).resume()})}function h4e(e,r,t){var n=r;switch(r){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string";break}try{this._internalType=n,this._outputType=r,this._mimeType=t,Sm.checkSupport(n),this._worker=e.pipe(new ott(n)),e.lock()}catch(i){this._worker=new stt("error"),this._worker.error(i)}}h4e.prototype={accumulate:function(e){return ptt(this,e)},on:function(e,r){var t=this;return e==="data"?this._worker.on(e,function(n){r.call(t,n.data,n.meta)}):this._worker.on(e,function(){Sm.delay(r,arguments,t)}),this},resume:function(){return Sm.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(Sm.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new p4e(this,{objectMode:this._outputType!=="nodebuffer"},e)}};m4e.exports=h4e});var HV=m(Xu=>{"use strict";Xu.base64=!1;Xu.binary=!1;Xu.dir=!1;Xu.createFolders=!0;Xu.date=null;Xu.compression=null;Xu.compressionOptions=null;Xu.comment=null;Xu.unixPermissions=null;Xu.dosPermissions=null});var WV=m((aPt,g4e)=>{"use strict";var _F=Qn(),EF=ls(),htt=16*1024;function Jy(e){EF.call(this,"DataWorker");var r=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(t){r.dataIsReady=!0,r.data=t,r.max=t&&t.length||0,r.type=_F.getTypeOf(t),r.isPaused||r._tickAndRepeat()},function(t){r.error(t)})}_F.inherits(Jy,EF);Jy.prototype.cleanUp=function(){EF.prototype.cleanUp.call(this),this.data=null};Jy.prototype.resume=function(){return EF.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,_F.delay(this._tickAndRepeat,[],this)),!0):!1};Jy.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(_F.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))};Jy.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=htt,r=null,t=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case"string":r=this.data.substring(this.index,t);break;case"uint8array":r=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":r=this.data.slice(this.index,t);break}return this.index=t,this.push({data:r,meta:{percent:this.max?this.index/this.max*100:0}})};g4e.exports=Jy});var wF=m((oPt,b4e)=>{"use strict";var mtt=Qn();function gtt(){for(var e,r=[],t=0;t<256;t++){e=t;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r}var v4e=gtt();function vtt(e,r,t,n){var i=v4e,a=n+t;e=e^-1;for(var o=n;o<a;o++)e=e>>>8^i[(e^r[o])&255];return e^-1}function btt(e,r,t,n){var i=v4e,a=n+t;e=e^-1;for(var o=n;o<a;o++)e=e>>>8^i[(e^r.charCodeAt(o))&255];return e^-1}b4e.exports=function(r,t){if(typeof r=="undefined"||!r.length)return 0;var n=mtt.getTypeOf(r)!=="string";return n?vtt(t|0,r,r.length,0):btt(t|0,r,r.length,0)}});var KV=m((sPt,x4e)=>{"use strict";var y4e=ls(),ytt=wF(),xtt=Qn();function VV(){y4e.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}xtt.inherits(VV,y4e);VV.prototype.processChunk=function(e){this.streamInfo.crc32=ytt(e.data,this.streamInfo.crc32||0),this.push(e)};x4e.exports=VV});var E4e=m((uPt,_4e)=>{"use strict";var _tt=Qn(),YV=ls();function $V(e){YV.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}_tt.inherits($V,YV);$V.prototype.processChunk=function(e){if(e){var r=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=r+e.data.length}YV.prototype.processChunk.call(this,e)};_4e.exports=$V});var SF=m((lPt,A4e)=>{"use strict";var w4e=Ky(),S4e=WV(),Ett=KV(),XV=E4e();function JV(e,r,t,n,i){this.compressedSize=e,this.uncompressedSize=r,this.crc32=t,this.compression=n,this.compressedContent=i}JV.prototype={getContentWorker:function(){var e=new S4e(w4e.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new XV("data_length")),r=this;return e.on("end",function(){if(this.streamInfo.data_length!==r.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new S4e(w4e.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};JV.createWorkerFrom=function(e,r,t){return e.pipe(new Ett).pipe(new XV("uncompressedSize")).pipe(r.compressWorker(t)).pipe(new XV("compressedSize")).withStreamInfo("compression",r)};A4e.exports=JV});var k4e=m((cPt,D4e)=>{"use strict";var wtt=zV(),Stt=WV(),QV=Xy(),ZV=SF(),T4e=ls(),eK=function(e,r,t){this.name=e,this.dir=t.dir,this.date=t.date,this.comment=t.comment,this.unixPermissions=t.unixPermissions,this.dosPermissions=t.dosPermissions,this._data=r,this._dataBinary=t.binary,this.options={compression:t.compression,compressionOptions:t.compressionOptions}};eK.prototype={internalStream:function(e){var r=null,t="string";try{if(!e)throw new Error("No output type specified.");t=e.toLowerCase();var n=t==="string"||t==="text";(t==="binarystring"||t==="text")&&(t="string"),r=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(r=r.pipe(new QV.Utf8EncodeWorker)),!i&&n&&(r=r.pipe(new QV.Utf8DecodeWorker))}catch(a){r=new T4e("error"),r.error(a)}return new wtt(r,t,"")},async:function(e,r){return this.internalStream(e).accumulate(r)},nodeStream:function(e,r){return this.internalStream(e||"nodebuffer").toNodejsStream(r)},_compressWorker:function(e,r){if(this._data instanceof ZV&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var t=this._decompressWorker();return this._dataBinary||(t=t.pipe(new QV.Utf8EncodeWorker)),ZV.createWorkerFrom(t,e,r)},_decompressWorker:function(){return this._data instanceof ZV?this._data.getContentWorker():this._data instanceof T4e?this._data:new Stt(this._data)}};var C4e=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Att=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(AF=0;AF<C4e.length;AF++)eK.prototype[C4e[AF]]=Att;var AF;D4e.exports=eK});var qf=m(vo=>{"use strict";var Ttt=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function Ctt(e,r){return Object.prototype.hasOwnProperty.call(e,r)}vo.assign=function(e){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var t=r.shift();if(!!t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(var n in t)Ctt(t,n)&&(e[n]=t[n])}}return e};vo.shrinkBuf=function(e,r){return e.length===r?e:e.subarray?e.subarray(0,r):(e.length=r,e)};var Dtt={arraySet:function(e,r,t,n,i){if(r.subarray&&e.subarray){e.set(r.subarray(t,t+n),i);return}for(var a=0;a<n;a++)e[i+a]=r[t+a]},flattenChunks:function(e){var r,t,n,i,a,o;for(n=0,r=0,t=e.length;r<t;r++)n+=e[r].length;for(o=new Uint8Array(n),i=0,r=0,t=e.length;r<t;r++)a=e[r],o.set(a,i),i+=a.length;return o}},ktt={arraySet:function(e,r,t,n,i){for(var a=0;a<n;a++)e[i+a]=r[t+a]},flattenChunks:function(e){return[].concat.apply([],e)}};vo.setTyped=function(e){e?(vo.Buf8=Uint8Array,vo.Buf16=Uint16Array,vo.Buf32=Int32Array,vo.assign(vo,Dtt)):(vo.Buf8=Array,vo.Buf16=Array,vo.Buf32=Array,vo.assign(vo,ktt))};vo.setTyped(Ttt)});var Q4e=m(ex=>{"use strict";var Ott=qf(),Rtt=4,O4e=0,R4e=1,Ftt=2;function Qy(e){for(var r=e.length;--r>=0;)e[r]=0}var Itt=0,F4e=1,Ptt=2,Btt=3,jtt=258,rK=29,hw=256,mw=hw+1+rK,Zy=30,tK=19,I4e=2*mw+1,Am=15,nK=16,Mtt=7,iK=256,P4e=16,B4e=17,j4e=18,aK=[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],TF=[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],Ltt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],M4e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],qtt=512,Nf=new Array((mw+2)*2);Qy(Nf);var gw=new Array(Zy*2);Qy(gw);var vw=new Array(qtt);Qy(vw);var bw=new Array(jtt-Btt+1);Qy(bw);var oK=new Array(rK);Qy(oK);var CF=new Array(Zy);Qy(CF);function sK(e,r,t,n,i){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var L4e,q4e,N4e;function uK(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function U4e(e){return e<256?vw[e]:vw[256+(e>>>7)]}function yw(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Lo(e,r,t){e.bi_valid>nK-t?(e.bi_buf|=r<<e.bi_valid&65535,yw(e,e.bi_buf),e.bi_buf=r>>nK-e.bi_valid,e.bi_valid+=t-nK):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=t)}function mc(e,r,t){Lo(e,t[r*2],t[r*2+1])}function G4e(e,r){var t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1}function Ntt(e){e.bi_valid===16?(yw(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 Utt(e,r){var t=r.dyn_tree,n=r.max_code,i=r.stat_desc.static_tree,a=r.stat_desc.has_stree,o=r.stat_desc.extra_bits,s=r.stat_desc.extra_base,u=r.stat_desc.max_length,l,c,f,d,p,h,b=0;for(d=0;d<=Am;d++)e.bl_count[d]=0;for(t[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<I4e;l++)c=e.heap[l],d=t[t[c*2+1]*2+1]+1,d>u&&(d=u,b++),t[c*2+1]=d,!(c>n)&&(e.bl_count[d]++,p=0,c>=s&&(p=o[c-s]),h=t[c*2],e.opt_len+=h*(d+p),a&&(e.static_len+=h*(i[c*2+1]+p)));if(b!==0){do{for(d=u-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[u]--,b-=2}while(b>0);for(d=u;d!==0;d--)for(c=e.bl_count[d];c!==0;)f=e.heap[--l],!(f>n)&&(t[f*2+1]!==d&&(e.opt_len+=(d-t[f*2+1])*t[f*2],t[f*2+1]=d),c--)}}function z4e(e,r,t){var n=new Array(Am+1),i=0,a,o;for(a=1;a<=Am;a++)n[a]=i=i+t[a-1]<<1;for(o=0;o<=r;o++){var s=e[o*2+1];s!==0&&(e[o*2]=G4e(n[s]++,s))}}function Gtt(){var e,r,t,n,i,a=new Array(Am+1);for(t=0,n=0;n<rK-1;n++)for(oK[n]=t,e=0;e<1<<aK[n];e++)bw[t++]=n;for(bw[t-1]=n,i=0,n=0;n<16;n++)for(CF[n]=i,e=0;e<1<<TF[n];e++)vw[i++]=n;for(i>>=7;n<Zy;n++)for(CF[n]=i<<7,e=0;e<1<<TF[n]-7;e++)vw[256+i++]=n;for(r=0;r<=Am;r++)a[r]=0;for(e=0;e<=143;)Nf[e*2+1]=8,e++,a[8]++;for(;e<=255;)Nf[e*2+1]=9,e++,a[9]++;for(;e<=279;)Nf[e*2+1]=7,e++,a[7]++;for(;e<=287;)Nf[e*2+1]=8,e++,a[8]++;for(z4e(Nf,mw+1,a),e=0;e<Zy;e++)gw[e*2+1]=5,gw[e*2]=G4e(e,5);L4e=new sK(Nf,aK,hw+1,mw,Am),q4e=new sK(gw,TF,0,Zy,Am),N4e=new sK(new Array(0),Ltt,0,tK,Mtt)}function H4e(e){var r;for(r=0;r<mw;r++)e.dyn_ltree[r*2]=0;for(r=0;r<Zy;r++)e.dyn_dtree[r*2]=0;for(r=0;r<tK;r++)e.bl_tree[r*2]=0;e.dyn_ltree[iK*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function W4e(e){e.bi_valid>8?yw(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 ztt(e,r,t,n){W4e(e),n&&(yw(e,t),yw(e,~t)),Ott.arraySet(e.pending_buf,e.window,r,t,e.pending),e.pending+=t}function V4e(e,r,t,n){var i=r*2,a=t*2;return e[i]<e[a]||e[i]===e[a]&&n[r]<=n[t]}function lK(e,r,t){for(var n=e.heap[t],i=t<<1;i<=e.heap_len&&(i<e.heap_len&&V4e(r,e.heap[i+1],e.heap[i],e.depth)&&i++,!V4e(r,n,e.heap[i],e.depth));)e.heap[t]=e.heap[i],t=i,i<<=1;e.heap[t]=n}function K4e(e,r,t){var n,i,a=0,o,s;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],i=e.pending_buf[e.l_buf+a],a++,n===0?mc(e,i,r):(o=bw[i],mc(e,o+hw+1,r),s=aK[o],s!==0&&(i-=oK[o],Lo(e,i,s)),n--,o=U4e(n),mc(e,o,t),s=TF[o],s!==0&&(n-=CF[o],Lo(e,n,s)));while(a<e.last_lit);mc(e,iK,r)}function cK(e,r){var t=r.dyn_tree,n=r.stat_desc.static_tree,i=r.stat_desc.has_stree,a=r.stat_desc.elems,o,s,u=-1,l;for(e.heap_len=0,e.heap_max=I4e,o=0;o<a;o++)t[o*2]!==0?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):t[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,t[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=n[l*2+1]);for(r.max_code=u,o=e.heap_len>>1;o>=1;o--)lK(e,t,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],lK(e,t,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,t[l*2]=t[o*2]+t[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,t[o*2+1]=t[s*2+1]=l,e.heap[1]=l++,lK(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Utt(e,r),z4e(t,u,e.bl_count)}function Y4e(e,r,t){var n,i=-1,a,o=r[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),r[(t+1)*2+1]=65535,n=0;n<=t;n++)a=o,o=r[(n+1)*2+1],!(++s<u&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[P4e*2]++):s<=10?e.bl_tree[B4e*2]++:e.bl_tree[j4e*2]++,s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4))}function $4e(e,r,t){var n,i=-1,a,o=r[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),n=0;n<=t;n++)if(a=o,o=r[(n+1)*2+1],!(++s<u&&a===o)){if(s<l)do mc(e,a,e.bl_tree);while(--s!=0);else a!==0?(a!==i&&(mc(e,a,e.bl_tree),s--),mc(e,P4e,e.bl_tree),Lo(e,s-3,2)):s<=10?(mc(e,B4e,e.bl_tree),Lo(e,s-3,3)):(mc(e,j4e,e.bl_tree),Lo(e,s-11,7));s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4)}}function Htt(e){var r;for(Y4e(e,e.dyn_ltree,e.l_desc.max_code),Y4e(e,e.dyn_dtree,e.d_desc.max_code),cK(e,e.bl_desc),r=tK-1;r>=3&&e.bl_tree[M4e[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function Wtt(e,r,t,n){var i;for(Lo(e,r-257,5),Lo(e,t-1,5),Lo(e,n-4,4),i=0;i<n;i++)Lo(e,e.bl_tree[M4e[i]*2+1],3);$4e(e,e.dyn_ltree,r-1),$4e(e,e.dyn_dtree,t-1)}function Vtt(e){var r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return O4e;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return R4e;for(t=32;t<hw;t++)if(e.dyn_ltree[t*2]!==0)return R4e;return O4e}var X4e=!1;function Ktt(e){X4e||(Gtt(),X4e=!0),e.l_desc=new uK(e.dyn_ltree,L4e),e.d_desc=new uK(e.dyn_dtree,q4e),e.bl_desc=new uK(e.bl_tree,N4e),e.bi_buf=0,e.bi_valid=0,H4e(e)}function J4e(e,r,t,n){Lo(e,(Itt<<1)+(n?1:0),3),ztt(e,r,t,!0)}function Ytt(e){Lo(e,F4e<<1,3),mc(e,iK,Nf),Ntt(e)}function $tt(e,r,t,n){var i,a,o=0;e.level>0?(e.strm.data_type===Ftt&&(e.strm.data_type=Vtt(e)),cK(e,e.l_desc),cK(e,e.d_desc),o=Htt(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=t+5,t+4<=i&&r!==-1?J4e(e,r,t,n):e.strategy===Rtt||a===i?(Lo(e,(F4e<<1)+(n?1:0),3),K4e(e,Nf,gw)):(Lo(e,(Ptt<<1)+(n?1:0),3),Wtt(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),K4e(e,e.dyn_ltree,e.dyn_dtree)),H4e(e),n&&W4e(e)}function Xtt(e,r,t){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=t&255,e.last_lit++,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(bw[t]+hw+1)*2]++,e.dyn_dtree[U4e(r)*2]++),e.last_lit===e.lit_bufsize-1}ex._tr_init=Ktt;ex._tr_stored_block=J4e;ex._tr_flush_block=$tt;ex._tr_tally=Xtt;ex._tr_align=Ytt});var fK=m((pPt,Z4e)=>{"use strict";function Jtt(e,r,t,n){for(var i=e&65535|0,a=e>>>16&65535|0,o=0;t!==0;){o=t>2e3?2e3:t,t-=o;do i=i+r[n++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0}Z4e.exports=Jtt});var dK=m((hPt,eIe)=>{"use strict";function Qtt(){for(var e,r=[],t=0;t<256;t++){e=t;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r}var Ztt=Qtt();function ent(e,r,t,n){var i=Ztt,a=n+t;e^=-1;for(var o=n;o<a;o++)e=e>>>8^i[(e^r[o])&255];return e^-1}eIe.exports=ent});var DF=m((mPt,rIe)=>{"use strict";rIe.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 cIe=m(bc=>{"use strict";var bo=qf(),ou=Q4e(),tIe=fK(),vh=dK(),rnt=DF(),Tm=0,tnt=1,nnt=3,bh=4,nIe=5,gc=0,iIe=1,su=-2,int=-3,pK=-5,ant=-1,ont=1,kF=2,snt=3,unt=4,lnt=0,cnt=2,OF=8,fnt=9,dnt=15,pnt=8,hnt=29,mnt=256,hK=mnt+1+hnt,gnt=30,vnt=19,bnt=2*hK+1,ynt=15,jt=3,yh=258,Ju=yh+jt+1,xnt=32,RF=42,mK=69,FF=73,IF=91,PF=103,Cm=113,xw=666,na=1,_w=2,Dm=3,rx=4,_nt=3;function xh(e,r){return e.msg=rnt[r],r}function aIe(e){return(e<<1)-(e>4?9:0)}function _h(e){for(var r=e.length;--r>=0;)e[r]=0}function Eh(e){var r=e.state,t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(bo.arraySet(e.output,r.pending_buf,r.pending_out,t,e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))}function qa(e,r){ou._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Eh(e.strm)}function Zt(e,r){e.pending_buf[e.pending++]=r}function Ew(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function Ent(e,r,t,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,bo.arraySet(r,e.input,e.next_in,i,t),e.state.wrap===1?e.adler=tIe(e.adler,r,i,t):e.state.wrap===2&&(e.adler=vh(e.adler,r,i,t)),e.next_in+=i,e.total_in+=i,i)}function oIe(e,r){var t=e.max_chain_length,n=e.strstart,i,a,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-Ju?e.strstart-(e.w_size-Ju):0,l=e.window,c=e.w_mask,f=e.prev,d=e.strstart+yh,p=l[n+o-1],h=l[n+o];e.prev_length>=e.good_match&&(t>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=r,!(l[i+o]!==h||l[i+o-1]!==p||l[i]!==l[n]||l[++i]!==l[n+1])){n+=2,i++;do;while(l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&n<d);if(a=yh-(d-n),n=d-yh,a>o){if(e.match_start=r,o=a,a>=s)break;p=l[n+o-1],h=l[n+o]}}while((r=f[r&c])>u&&--t!=0);return o<=e.lookahead?o:e.lookahead}function km(e){var r=e.w_size,t,n,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-Ju)){bo.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,n=e.hash_size,t=n;do i=e.head[--t],e.head[t]=i>=r?i-r:0;while(--n);n=r,t=n;do i=e.prev[--t],e.prev[t]=i>=r?i-r:0;while(--n);a+=r}if(e.strm.avail_in===0)break;if(n=Ent(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=jt)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+jt-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<jt)););}while(e.lookahead<Ju&&e.strm.avail_in!==0)}function wnt(e,r){var t=65535;for(t>e.pending_buf_size-5&&(t=e.pending_buf_size-5);;){if(e.lookahead<=1){if(km(e),e.lookahead===0&&r===Tm)return na;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+t;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,qa(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ju&&(qa(e,!1),e.strm.avail_out===0))return na}return e.insert=0,r===bh?(qa(e,!0),e.strm.avail_out===0?Dm:rx):(e.strstart>e.block_start&&(qa(e,!1),e.strm.avail_out===0),na)}function gK(e,r){for(var t,n;;){if(e.lookahead<Ju){if(km(e),e.lookahead<Ju&&r===Tm)return na;if(e.lookahead===0)break}if(t=0,e.lookahead>=jt&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+jt-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-Ju&&(e.match_length=oIe(e,t)),e.match_length>=jt)if(n=ou._tr_tally(e,e.strstart-e.match_start,e.match_length-jt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=jt){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+jt-1])&e.hash_mask,t=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=ou._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(qa(e,!1),e.strm.avail_out===0))return na}return e.insert=e.strstart<jt-1?e.strstart:jt-1,r===bh?(qa(e,!0),e.strm.avail_out===0?Dm:rx):e.last_lit&&(qa(e,!1),e.strm.avail_out===0)?na:_w}function tx(e,r){for(var t,n,i;;){if(e.lookahead<Ju){if(km(e),e.lookahead<Ju&&r===Tm)return na;if(e.lookahead===0)break}if(t=0,e.lookahead>=jt&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+jt-1])&e.hash_mask,t=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=jt-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-Ju&&(e.match_length=oIe(e,t),e.match_length<=5&&(e.strategy===ont||e.match_length===jt&&e.strstart-e.match_start>4096)&&(e.match_length=jt-1)),e.prev_length>=jt&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-jt,n=ou._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-jt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+jt-1])&e.hash_mask,t=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=jt-1,e.strstart++,n&&(qa(e,!1),e.strm.avail_out===0))return na}else if(e.match_available){if(n=ou._tr_tally(e,0,e.window[e.strstart-1]),n&&qa(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return na}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=ou._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<jt-1?e.strstart:jt-1,r===bh?(qa(e,!0),e.strm.avail_out===0?Dm:rx):e.last_lit&&(qa(e,!1),e.strm.avail_out===0)?na:_w}function Snt(e,r){for(var t,n,i,a,o=e.window;;){if(e.lookahead<=yh){if(km(e),e.lookahead<=yh&&r===Tm)return na;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=jt&&e.strstart>0&&(i=e.strstart-1,n=o[i],n===o[++i]&&n===o[++i]&&n===o[++i])){a=e.strstart+yh;do;while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<a);e.match_length=yh-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=jt?(t=ou._tr_tally(e,1,e.match_length-jt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=ou._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(qa(e,!1),e.strm.avail_out===0))return na}return e.insert=0,r===bh?(qa(e,!0),e.strm.avail_out===0?Dm:rx):e.last_lit&&(qa(e,!1),e.strm.avail_out===0)?na:_w}function Ant(e,r){for(var t;;){if(e.lookahead===0&&(km(e),e.lookahead===0)){if(r===Tm)return na;break}if(e.match_length=0,t=ou._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(qa(e,!1),e.strm.avail_out===0))return na}return e.insert=0,r===bh?(qa(e,!0),e.strm.avail_out===0?Dm:rx):e.last_lit&&(qa(e,!1),e.strm.avail_out===0)?na:_w}function vc(e,r,t,n,i){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=n,this.func=i}var nx;nx=[new vc(0,0,0,0,wnt),new vc(4,4,8,4,gK),new vc(4,5,16,8,gK),new vc(4,6,32,32,gK),new vc(4,4,16,16,tx),new vc(8,16,32,32,tx),new vc(8,16,128,128,tx),new vc(8,32,128,256,tx),new vc(32,128,258,1024,tx),new vc(32,258,258,4096,tx)];function Tnt(e){e.window_size=2*e.w_size,_h(e.head),e.max_lazy_match=nx[e.level].max_lazy,e.good_match=nx[e.level].good_length,e.nice_match=nx[e.level].nice_length,e.max_chain_length=nx[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=jt-1,e.match_available=0,e.ins_h=0}function Cnt(){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=OF,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 bo.Buf16(bnt*2),this.dyn_dtree=new bo.Buf16((2*gnt+1)*2),this.bl_tree=new bo.Buf16((2*vnt+1)*2),_h(this.dyn_ltree),_h(this.dyn_dtree),_h(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new bo.Buf16(ynt+1),this.heap=new bo.Buf16(2*hK+1),_h(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new bo.Buf16(2*hK+1),_h(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 sIe(e){var r;return!e||!e.state?xh(e,su):(e.total_in=e.total_out=0,e.data_type=cnt,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?RF:Cm,e.adler=r.wrap===2?0:1,r.last_flush=Tm,ou._tr_init(r),gc)}function uIe(e){var r=sIe(e);return r===gc&&Tnt(e.state),r}function Dnt(e,r){return!e||!e.state||e.state.wrap!==2?su:(e.state.gzhead=r,gc)}function lIe(e,r,t,n,i,a){if(!e)return su;var o=1;if(r===ant&&(r=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),i<1||i>fnt||t!==OF||n<8||n>15||r<0||r>9||a<0||a>unt)return xh(e,su);n===8&&(n=9);var s=new Cnt;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+jt-1)/jt),s.window=new bo.Buf8(s.w_size*2),s.head=new bo.Buf16(s.hash_size),s.prev=new bo.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new bo.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=r,s.strategy=a,s.method=t,uIe(e)}function knt(e,r){return lIe(e,r,OF,dnt,pnt,lnt)}function Ont(e,r){var t,n,i,a;if(!e||!e.state||r>nIe||r<0)return e?xh(e,su):su;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===xw&&r!==bh)return xh(e,e.avail_out===0?pK:su);if(n.strm=e,t=n.last_flush,n.last_flush=r,n.status===RF)if(n.wrap===2)e.adler=0,Zt(n,31),Zt(n,139),Zt(n,8),n.gzhead?(Zt(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)),Zt(n,n.gzhead.time&255),Zt(n,n.gzhead.time>>8&255),Zt(n,n.gzhead.time>>16&255),Zt(n,n.gzhead.time>>24&255),Zt(n,n.level===9?2:n.strategy>=kF||n.level<2?4:0),Zt(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Zt(n,n.gzhead.extra.length&255),Zt(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=vh(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=mK):(Zt(n,0),Zt(n,0),Zt(n,0),Zt(n,0),Zt(n,0),Zt(n,n.level===9?2:n.strategy>=kF||n.level<2?4:0),Zt(n,_nt),n.status=Cm);else{var o=OF+(n.w_bits-8<<4)<<8,s=-1;n.strategy>=kF||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,o|=s<<6,n.strstart!==0&&(o|=xnt),o+=31-o%31,n.status=Cm,Ew(n,o),n.strstart!==0&&(Ew(n,e.adler>>>16),Ew(n,e.adler&65535)),e.adler=1}if(n.status===mK)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=vh(e.adler,n.pending_buf,n.pending-i,i)),Eh(e),i=n.pending,n.pending===n.pending_buf_size));)Zt(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=vh(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=FF)}else n.status=FF;if(n.status===FF)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=vh(e.adler,n.pending_buf,n.pending-i,i)),Eh(e),i=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,Zt(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=vh(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.gzindex=0,n.status=IF)}else n.status=IF;if(n.status===IF)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=vh(e.adler,n.pending_buf,n.pending-i,i)),Eh(e),i=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,Zt(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=vh(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.status=PF)}else n.status=PF;if(n.status===PF&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Eh(e),n.pending+2<=n.pending_buf_size&&(Zt(n,e.adler&255),Zt(n,e.adler>>8&255),e.adler=0,n.status=Cm)):n.status=Cm),n.pending!==0){if(Eh(e),e.avail_out===0)return n.last_flush=-1,gc}else if(e.avail_in===0&&aIe(r)<=aIe(t)&&r!==bh)return xh(e,pK);if(n.status===xw&&e.avail_in!==0)return xh(e,pK);if(e.avail_in!==0||n.lookahead!==0||r!==Tm&&n.status!==xw){var u=n.strategy===kF?Ant(n,r):n.strategy===snt?Snt(n,r):nx[n.level].func(n,r);if((u===Dm||u===rx)&&(n.status=xw),u===na||u===Dm)return e.avail_out===0&&(n.last_flush=-1),gc;if(u===_w&&(r===tnt?ou._tr_align(n):r!==nIe&&(ou._tr_stored_block(n,0,0,!1),r===nnt&&(_h(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Eh(e),e.avail_out===0))return n.last_flush=-1,gc}return r!==bh?gc:n.wrap<=0?iIe:(n.wrap===2?(Zt(n,e.adler&255),Zt(n,e.adler>>8&255),Zt(n,e.adler>>16&255),Zt(n,e.adler>>24&255),Zt(n,e.total_in&255),Zt(n,e.total_in>>8&255),Zt(n,e.total_in>>16&255),Zt(n,e.total_in>>24&255)):(Ew(n,e.adler>>>16),Ew(n,e.adler&65535)),Eh(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?gc:iIe)}function Rnt(e){var r;return!e||!e.state?su:(r=e.state.status,r!==RF&&r!==mK&&r!==FF&&r!==IF&&r!==PF&&r!==Cm&&r!==xw?xh(e,su):(e.state=null,r===Cm?xh(e,int):gc))}function Fnt(e,r){var t=r.length,n,i,a,o,s,u,l,c;if(!e||!e.state||(n=e.state,o=n.wrap,o===2||o===1&&n.status!==RF||n.lookahead))return su;for(o===1&&(e.adler=tIe(e.adler,r,t,0)),n.wrap=0,t>=n.w_size&&(o===0&&(_h(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new bo.Buf8(n.w_size),bo.arraySet(c,r,t-n.w_size,n.w_size,0),r=c,t=n.w_size),s=e.avail_in,u=e.next_in,l=e.input,e.avail_in=t,e.next_in=0,e.input=r,km(n);n.lookahead>=jt;){i=n.strstart,a=n.lookahead-(jt-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+jt-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++;while(--a);n.strstart=i,n.lookahead=jt-1,km(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=jt-1,n.match_available=0,e.next_in=u,e.input=l,e.avail_in=s,n.wrap=o,gc}bc.deflateInit=knt;bc.deflateInit2=lIe;bc.deflateReset=uIe;bc.deflateResetKeep=sIe;bc.deflateSetHeader=Dnt;bc.deflate=Ont;bc.deflateEnd=Rnt;bc.deflateSetDictionary=Fnt;bc.deflateInfo="pako deflate (from Nodeca project)"});var vK=m(ix=>{"use strict";var BF=qf(),fIe=!0,dIe=!0;try{String.fromCharCode.apply(null,[0])}catch{fIe=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{dIe=!1}var ww=new BF.Buf8(256);for(Uf=0;Uf<256;Uf++)ww[Uf]=Uf>=252?6:Uf>=248?5:Uf>=240?4:Uf>=224?3:Uf>=192?2:1;var Uf;ww[254]=ww[254]=1;ix.string2buf=function(e){var r,t,n,i,a,o=e.length,s=0;for(i=0;i<o;i++)t=e.charCodeAt(i),(t&64512)==55296&&i+1<o&&(n=e.charCodeAt(i+1),(n&64512)==56320&&(t=65536+(t-55296<<10)+(n-56320),i++)),s+=t<128?1:t<2048?2:t<65536?3:4;for(r=new BF.Buf8(s),a=0,i=0;a<s;i++)t=e.charCodeAt(i),(t&64512)==55296&&i+1<o&&(n=e.charCodeAt(i+1),(n&64512)==56320&&(t=65536+(t-55296<<10)+(n-56320),i++)),t<128?r[a++]=t:t<2048?(r[a++]=192|t>>>6,r[a++]=128|t&63):t<65536?(r[a++]=224|t>>>12,r[a++]=128|t>>>6&63,r[a++]=128|t&63):(r[a++]=240|t>>>18,r[a++]=128|t>>>12&63,r[a++]=128|t>>>6&63,r[a++]=128|t&63);return r};function pIe(e,r){if(r<65534&&(e.subarray&&dIe||!e.subarray&&fIe))return String.fromCharCode.apply(null,BF.shrinkBuf(e,r));for(var t="",n=0;n<r;n++)t+=String.fromCharCode(e[n]);return t}ix.buf2binstring=function(e){return pIe(e,e.length)};ix.binstring2buf=function(e){for(var r=new BF.Buf8(e.length),t=0,n=r.length;t<n;t++)r[t]=e.charCodeAt(t);return r};ix.buf2string=function(e,r){var t,n,i,a,o=r||e.length,s=new Array(o*2);for(n=0,t=0;t<o;){if(i=e[t++],i<128){s[n++]=i;continue}if(a=ww[i],a>4){s[n++]=65533,t+=a-1;continue}for(i&=a===2?31:a===3?15:7;a>1&&t<o;)i=i<<6|e[t++]&63,a--;if(a>1){s[n++]=65533;continue}i<65536?s[n++]=i:(i-=65536,s[n++]=55296|i>>10&1023,s[n++]=56320|i&1023)}return pIe(s,n)};ix.utf8border=function(e,r){var t;for(r=r||e.length,r>e.length&&(r=e.length),t=r-1;t>=0&&(e[t]&192)==128;)t--;return t<0||t===0?r:t+ww[e[t]]>r?t:r}});var bK=m((bPt,hIe)=>{"use strict";function Int(){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}hIe.exports=Int});var bIe=m(Tw=>{"use strict";var Sw=cIe(),Aw=qf(),yK=vK(),xK=DF(),Pnt=bK(),mIe=Object.prototype.toString,Bnt=0,_K=4,ax=0,gIe=1,vIe=2,jnt=-1,Mnt=0,Lnt=8;function Om(e){if(!(this instanceof Om))return new Om(e);this.options=Aw.assign({level:jnt,method:Lnt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Mnt,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Pnt,this.strm.avail_out=0;var t=Sw.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==ax)throw new Error(xK[t]);if(r.header&&Sw.deflateSetHeader(this.strm,r.header),r.dictionary){var n;if(typeof r.dictionary=="string"?n=yK.string2buf(r.dictionary):mIe.call(r.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(r.dictionary):n=r.dictionary,t=Sw.deflateSetDictionary(this.strm,n),t!==ax)throw new Error(xK[t]);this._dict_set=!0}}Om.prototype.push=function(e,r){var t=this.strm,n=this.options.chunkSize,i,a;if(this.ended)return!1;a=r===~~r?r:r===!0?_K:Bnt,typeof e=="string"?t.input=yK.string2buf(e):mIe.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new Aw.Buf8(n),t.next_out=0,t.avail_out=n),i=Sw.deflate(t,a),i!==gIe&&i!==ax)return this.onEnd(i),this.ended=!0,!1;(t.avail_out===0||t.avail_in===0&&(a===_K||a===vIe))&&(this.options.to==="string"?this.onData(yK.buf2binstring(Aw.shrinkBuf(t.output,t.next_out))):this.onData(Aw.shrinkBuf(t.output,t.next_out)))}while((t.avail_in>0||t.avail_out===0)&&i!==gIe);return a===_K?(i=Sw.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ax):(a===vIe&&(this.onEnd(ax),t.avail_out=0),!0)};Om.prototype.onData=function(e){this.chunks.push(e)};Om.prototype.onEnd=function(e){e===ax&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Aw.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function EK(e,r){var t=new Om(r);if(t.push(e,!0),t.err)throw t.msg||xK[t.err];return t.result}function qnt(e,r){return r=r||{},r.raw=!0,EK(e,r)}function Nnt(e,r){return r=r||{},r.gzip=!0,EK(e,r)}Tw.Deflate=Om;Tw.deflate=EK;Tw.deflateRaw=qnt;Tw.gzip=Nnt});var xIe=m((xPt,yIe)=>{"use strict";var jF=30,Unt=12;yIe.exports=function(r,t){var n,i,a,o,s,u,l,c,f,d,p,h,b,v,y,w,A,C,D,P,k,L,I,V,N;n=r.state,i=r.next_in,V=r.input,a=i+(r.avail_in-5),o=r.next_out,N=r.output,s=o-(t-r.avail_out),u=o+(r.avail_out-257),l=n.dmax,c=n.wsize,f=n.whave,d=n.wnext,p=n.window,h=n.hold,b=n.bits,v=n.lencode,y=n.distcode,w=(1<<n.lenbits)-1,A=(1<<n.distbits)-1;e:do{b<15&&(h+=V[i++]<<b,b+=8,h+=V[i++]<<b,b+=8),C=v[h&w];r:for(;;){if(D=C>>>24,h>>>=D,b-=D,D=C>>>16&255,D===0)N[o++]=C&65535;else if(D&16){P=C&65535,D&=15,D&&(b<D&&(h+=V[i++]<<b,b+=8),P+=h&(1<<D)-1,h>>>=D,b-=D),b<15&&(h+=V[i++]<<b,b+=8,h+=V[i++]<<b,b+=8),C=y[h&A];t:for(;;){if(D=C>>>24,h>>>=D,b-=D,D=C>>>16&255,D&16){if(k=C&65535,D&=15,b<D&&(h+=V[i++]<<b,b+=8,b<D&&(h+=V[i++]<<b,b+=8)),k+=h&(1<<D)-1,k>l){r.msg="invalid distance too far back",n.mode=jF;break e}if(h>>>=D,b-=D,D=o-s,k>D){if(D=k-D,D>f&&n.sane){r.msg="invalid distance too far back",n.mode=jF;break e}if(L=0,I=p,d===0){if(L+=c-D,D<P){P-=D;do N[o++]=p[L++];while(--D);L=o-k,I=N}}else if(d<D){if(L+=c+d-D,D-=d,D<P){P-=D;do N[o++]=p[L++];while(--D);if(L=0,d<P){D=d,P-=D;do N[o++]=p[L++];while(--D);L=o-k,I=N}}}else if(L+=d-D,D<P){P-=D;do N[o++]=p[L++];while(--D);L=o-k,I=N}for(;P>2;)N[o++]=I[L++],N[o++]=I[L++],N[o++]=I[L++],P-=3;P&&(N[o++]=I[L++],P>1&&(N[o++]=I[L++]))}else{L=o-k;do N[o++]=N[L++],N[o++]=N[L++],N[o++]=N[L++],P-=3;while(P>2);P&&(N[o++]=N[L++],P>1&&(N[o++]=N[L++]))}}else if((D&64)==0){C=y[(C&65535)+(h&(1<<D)-1)];continue t}else{r.msg="invalid distance code",n.mode=jF;break e}break}}else if((D&64)==0){C=v[(C&65535)+(h&(1<<D)-1)];continue r}else if(D&32){n.mode=Unt;break e}else{r.msg="invalid literal/length code",n.mode=jF;break e}break}}while(i<a&&o<u);P=b>>3,i-=P,b-=P<<3,h&=(1<<b)-1,r.next_in=i,r.next_out=o,r.avail_in=i<a?5+(a-i):5-(i-a),r.avail_out=o<u?257+(u-o):257-(o-u),n.hold=h,n.bits=b}});var CIe=m((_Pt,TIe)=>{"use strict";var _Ie=qf(),ox=15,EIe=852,wIe=592,SIe=0,wK=1,AIe=2,Gnt=[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],znt=[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],Hnt=[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],Wnt=[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];TIe.exports=function(r,t,n,i,a,o,s,u){var l=u.bits,c=0,f=0,d=0,p=0,h=0,b=0,v=0,y=0,w=0,A=0,C,D,P,k,L,I=null,V=0,N,W=new _Ie.Buf16(ox+1),M=new _Ie.Buf16(ox+1),H=null,X=0,ne,ae,se;for(c=0;c<=ox;c++)W[c]=0;for(f=0;f<i;f++)W[t[n+f]]++;for(h=l,p=ox;p>=1&&W[p]===0;p--);if(h>p&&(h=p),p===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,u.bits=1,0;for(d=1;d<p&&W[d]===0;d++);for(h<d&&(h=d),y=1,c=1;c<=ox;c++)if(y<<=1,y-=W[c],y<0)return-1;if(y>0&&(r===SIe||p!==1))return-1;for(M[1]=0,c=1;c<ox;c++)M[c+1]=M[c]+W[c];for(f=0;f<i;f++)t[n+f]!==0&&(s[M[t[n+f]]++]=f);if(r===SIe?(I=H=s,N=19):r===wK?(I=Gnt,V-=257,H=znt,X-=257,N=256):(I=Hnt,H=Wnt,N=-1),A=0,f=0,c=d,L=o,b=h,v=0,P=-1,w=1<<h,k=w-1,r===wK&&w>EIe||r===AIe&&w>wIe)return 1;for(;;){ne=c-v,s[f]<N?(ae=0,se=s[f]):s[f]>N?(ae=H[X+s[f]],se=I[V+s[f]]):(ae=32+64,se=0),C=1<<c-v,D=1<<b,d=D;do D-=C,a[L+(A>>v)+D]=ne<<24|ae<<16|se|0;while(D!==0);for(C=1<<c-1;A&C;)C>>=1;if(C!==0?(A&=C-1,A+=C):A=0,f++,--W[c]==0){if(c===p)break;c=t[n+s[f]]}if(c>h&&(A&k)!==P){for(v===0&&(v=h),L+=d,b=c-v,y=1<<b;b+v<p&&(y-=W[b+v],!(y<=0));)b++,y<<=1;if(w+=1<<b,r===wK&&w>EIe||r===AIe&&w>wIe)return 1;P=A&k,a[P]=h<<24|b<<16|L-o|0}}return A!==0&&(a[L+A]=c-v<<24|64<<16|0),u.bits=h,0}});var uPe=m(Qu=>{"use strict";var cs=qf(),SK=fK(),yc=dK(),Vnt=xIe(),Cw=CIe(),Knt=0,DIe=1,kIe=2,OIe=4,Ynt=5,MF=6,Rm=0,$nt=1,Xnt=2,uu=-2,RIe=-3,AK=-4,Jnt=-5,FIe=8,IIe=1,PIe=2,BIe=3,jIe=4,MIe=5,LIe=6,qIe=7,NIe=8,UIe=9,GIe=10,LF=11,Gf=12,TK=13,zIe=14,CK=15,HIe=16,WIe=17,VIe=18,KIe=19,qF=20,NF=21,YIe=22,$Ie=23,XIe=24,JIe=25,QIe=26,DK=27,ZIe=28,ePe=29,Nn=30,kK=31,Qnt=32,Znt=852,eit=592,rit=15,tit=rit;function rPe(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function nit(){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 cs.Buf16(320),this.work=new cs.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function tPe(e){var r;return!e||!e.state?uu:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=IIe,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new cs.Buf32(Znt),r.distcode=r.distdyn=new cs.Buf32(eit),r.sane=1,r.back=-1,Rm)}function nPe(e){var r;return!e||!e.state?uu:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,tPe(e))}function iPe(e,r){var t,n;return!e||!e.state||(n=e.state,r<0?(t=0,r=-r):(t=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?uu:(n.window!==null&&n.wbits!==r&&(n.window=null),n.wrap=t,n.wbits=r,nPe(e))}function aPe(e,r){var t,n;return e?(n=new nit,e.state=n,n.window=null,t=iPe(e,r),t!==Rm&&(e.state=null),t):uu}function iit(e){return aPe(e,tit)}var oPe=!0,OK,RK;function ait(e){if(oPe){var r;for(OK=new cs.Buf32(512),RK=new cs.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(Cw(DIe,e.lens,0,288,OK,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Cw(kIe,e.lens,0,32,RK,0,e.work,{bits:5}),oPe=!1}e.lencode=OK,e.lenbits=9,e.distcode=RK,e.distbits=5}function sPe(e,r,t,n){var i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new cs.Buf8(a.wsize)),n>=a.wsize?(cs.arraySet(a.window,r,t-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),cs.arraySet(a.window,r,t-n,i,a.wnext),n-=i,n?(cs.arraySet(a.window,r,t-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function oit(e,r){var t,n,i,a,o,s,u,l,c,f,d,p,h,b,v=0,y,w,A,C,D,P,k,L,I=new cs.Buf8(4),V,N,W=[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 uu;t=e.state,t.mode===Gf&&(t.mode=TK),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,l=t.hold,c=t.bits,f=s,d=u,L=Rm;e:for(;;)switch(t.mode){case IIe:if(t.wrap===0){t.mode=TK;break}for(;c<16;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(t.wrap&2&&l===35615){t.check=0,I[0]=l&255,I[1]=l>>>8&255,t.check=yc(t.check,I,2,0),l=0,c=0,t.mode=PIe;break}if(t.flags=0,t.head&&(t.head.done=!1),!(t.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",t.mode=Nn;break}if((l&15)!==FIe){e.msg="unknown compression method",t.mode=Nn;break}if(l>>>=4,c-=4,k=(l&15)+8,t.wbits===0)t.wbits=k;else if(k>t.wbits){e.msg="invalid window size",t.mode=Nn;break}t.dmax=1<<k,e.adler=t.check=1,t.mode=l&512?GIe:Gf,l=0,c=0;break;case PIe:for(;c<16;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(t.flags=l,(t.flags&255)!==FIe){e.msg="unknown compression method",t.mode=Nn;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=Nn;break}t.head&&(t.head.text=l>>8&1),t.flags&512&&(I[0]=l&255,I[1]=l>>>8&255,t.check=yc(t.check,I,2,0)),l=0,c=0,t.mode=BIe;case BIe:for(;c<32;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.head&&(t.head.time=l),t.flags&512&&(I[0]=l&255,I[1]=l>>>8&255,I[2]=l>>>16&255,I[3]=l>>>24&255,t.check=yc(t.check,I,4,0)),l=0,c=0,t.mode=jIe;case jIe:for(;c<16;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.head&&(t.head.xflags=l&255,t.head.os=l>>8),t.flags&512&&(I[0]=l&255,I[1]=l>>>8&255,t.check=yc(t.check,I,2,0)),l=0,c=0,t.mode=MIe;case MIe:if(t.flags&1024){for(;c<16;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.length=l,t.head&&(t.head.extra_len=l),t.flags&512&&(I[0]=l&255,I[1]=l>>>8&255,t.check=yc(t.check,I,2,0)),l=0,c=0}else t.head&&(t.head.extra=null);t.mode=LIe;case LIe:if(t.flags&1024&&(p=t.length,p>s&&(p=s),p&&(t.head&&(k=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),cs.arraySet(t.head.extra,n,a,p,k)),t.flags&512&&(t.check=yc(t.check,n,p,a)),s-=p,a+=p,t.length-=p),t.length))break e;t.length=0,t.mode=qIe;case qIe:if(t.flags&2048){if(s===0)break e;p=0;do k=n[a+p++],t.head&&k&&t.length<65536&&(t.head.name+=String.fromCharCode(k));while(k&&p<s);if(t.flags&512&&(t.check=yc(t.check,n,p,a)),s-=p,a+=p,k)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=NIe;case NIe:if(t.flags&4096){if(s===0)break e;p=0;do k=n[a+p++],t.head&&k&&t.length<65536&&(t.head.comment+=String.fromCharCode(k));while(k&&p<s);if(t.flags&512&&(t.check=yc(t.check,n,p,a)),s-=p,a+=p,k)break e}else t.head&&(t.head.comment=null);t.mode=UIe;case UIe:if(t.flags&512){for(;c<16;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(l!==(t.check&65535)){e.msg="header crc mismatch",t.mode=Nn;break}l=0,c=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=Gf;break;case GIe:for(;c<32;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}e.adler=t.check=rPe(l),l=0,c=0,t.mode=LF;case LF:if(t.havedict===0)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,t.hold=l,t.bits=c,Xnt;e.adler=t.check=1,t.mode=Gf;case Gf:if(r===Ynt||r===MF)break e;case TK:if(t.last){l>>>=c&7,c-=c&7,t.mode=DK;break}for(;c<3;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}switch(t.last=l&1,l>>>=1,c-=1,l&3){case 0:t.mode=zIe;break;case 1:if(ait(t),t.mode=qF,r===MF){l>>>=2,c-=2;break e}break;case 2:t.mode=WIe;break;case 3:e.msg="invalid block type",t.mode=Nn}l>>>=2,c-=2;break;case zIe:for(l>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if((l&65535)!=(l>>>16^65535)){e.msg="invalid stored block lengths",t.mode=Nn;break}if(t.length=l&65535,l=0,c=0,t.mode=CK,r===MF)break e;case CK:t.mode=HIe;case HIe:if(p=t.length,p){if(p>s&&(p=s),p>u&&(p=u),p===0)break e;cs.arraySet(i,n,a,p,o),s-=p,a+=p,u-=p,o+=p,t.length-=p;break}t.mode=Gf;break;case WIe:for(;c<14;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(t.nlen=(l&31)+257,l>>>=5,c-=5,t.ndist=(l&31)+1,l>>>=5,c-=5,t.ncode=(l&15)+4,l>>>=4,c-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=Nn;break}t.have=0,t.mode=VIe;case VIe:for(;t.have<t.ncode;){for(;c<3;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.lens[W[t.have++]]=l&7,l>>>=3,c-=3}for(;t.have<19;)t.lens[W[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,V={bits:t.lenbits},L=Cw(Knt,t.lens,0,19,t.lencode,0,t.work,V),t.lenbits=V.bits,L){e.msg="invalid code lengths set",t.mode=Nn;break}t.have=0,t.mode=KIe;case KIe:for(;t.have<t.nlen+t.ndist;){for(;v=t.lencode[l&(1<<t.lenbits)-1],y=v>>>24,w=v>>>16&255,A=v&65535,!(y<=c);){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(A<16)l>>>=y,c-=y,t.lens[t.have++]=A;else{if(A===16){for(N=y+2;c<N;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(l>>>=y,c-=y,t.have===0){e.msg="invalid bit length repeat",t.mode=Nn;break}k=t.lens[t.have-1],p=3+(l&3),l>>>=2,c-=2}else if(A===17){for(N=y+3;c<N;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}l>>>=y,c-=y,k=0,p=3+(l&7),l>>>=3,c-=3}else{for(N=y+7;c<N;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}l>>>=y,c-=y,k=0,p=11+(l&127),l>>>=7,c-=7}if(t.have+p>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=Nn;break}for(;p--;)t.lens[t.have++]=k}}if(t.mode===Nn)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=Nn;break}if(t.lenbits=9,V={bits:t.lenbits},L=Cw(DIe,t.lens,0,t.nlen,t.lencode,0,t.work,V),t.lenbits=V.bits,L){e.msg="invalid literal/lengths set",t.mode=Nn;break}if(t.distbits=6,t.distcode=t.distdyn,V={bits:t.distbits},L=Cw(kIe,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,V),t.distbits=V.bits,L){e.msg="invalid distances set",t.mode=Nn;break}if(t.mode=qF,r===MF)break e;case qF:t.mode=NF;case NF:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,t.hold=l,t.bits=c,Vnt(e,d),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,l=t.hold,c=t.bits,t.mode===Gf&&(t.back=-1);break}for(t.back=0;v=t.lencode[l&(1<<t.lenbits)-1],y=v>>>24,w=v>>>16&255,A=v&65535,!(y<=c);){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(w&&(w&240)==0){for(C=y,D=w,P=A;v=t.lencode[P+((l&(1<<C+D)-1)>>C)],y=v>>>24,w=v>>>16&255,A=v&65535,!(C+y<=c);){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}l>>>=C,c-=C,t.back+=C}if(l>>>=y,c-=y,t.back+=y,t.length=A,w===0){t.mode=QIe;break}if(w&32){t.back=-1,t.mode=Gf;break}if(w&64){e.msg="invalid literal/length code",t.mode=Nn;break}t.extra=w&15,t.mode=YIe;case YIe:if(t.extra){for(N=t.extra;c<N;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.length+=l&(1<<t.extra)-1,l>>>=t.extra,c-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=$Ie;case $Ie:for(;v=t.distcode[l&(1<<t.distbits)-1],y=v>>>24,w=v>>>16&255,A=v&65535,!(y<=c);){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if((w&240)==0){for(C=y,D=w,P=A;v=t.distcode[P+((l&(1<<C+D)-1)>>C)],y=v>>>24,w=v>>>16&255,A=v&65535,!(C+y<=c);){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}l>>>=C,c-=C,t.back+=C}if(l>>>=y,c-=y,t.back+=y,w&64){e.msg="invalid distance code",t.mode=Nn;break}t.offset=A,t.extra=w&15,t.mode=XIe;case XIe:if(t.extra){for(N=t.extra;c<N;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}t.offset+=l&(1<<t.extra)-1,l>>>=t.extra,c-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=Nn;break}t.mode=JIe;case JIe:if(u===0)break e;if(p=d-u,t.offset>p){if(p=t.offset-p,p>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=Nn;break}p>t.wnext?(p-=t.wnext,h=t.wsize-p):h=t.wnext-p,p>t.length&&(p=t.length),b=t.window}else b=i,h=o-t.offset,p=t.length;p>u&&(p=u),u-=p,t.length-=p;do i[o++]=b[h++];while(--p);t.length===0&&(t.mode=NF);break;case QIe:if(u===0)break e;i[o++]=t.length,u--,t.mode=NF;break;case DK:if(t.wrap){for(;c<32;){if(s===0)break e;s--,l|=n[a++]<<c,c+=8}if(d-=u,e.total_out+=d,t.total+=d,d&&(e.adler=t.check=t.flags?yc(t.check,i,d,o-d):SK(t.check,i,d,o-d)),d=u,(t.flags?l:rPe(l))!==t.check){e.msg="incorrect data check",t.mode=Nn;break}l=0,c=0}t.mode=ZIe;case ZIe:if(t.wrap&&t.flags){for(;c<32;){if(s===0)break e;s--,l+=n[a++]<<c,c+=8}if(l!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=Nn;break}l=0,c=0}t.mode=ePe;case ePe:L=$nt;break e;case Nn:L=RIe;break e;case kK:return AK;case Qnt:default:return uu}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,t.hold=l,t.bits=c,(t.wsize||d!==e.avail_out&&t.mode<Nn&&(t.mode<DK||r!==OIe))&&sPe(e,e.output,e.next_out,d-e.avail_out)?(t.mode=kK,AK):(f-=e.avail_in,d-=e.avail_out,e.total_in+=f,e.total_out+=d,t.total+=d,t.wrap&&d&&(e.adler=t.check=t.flags?yc(t.check,i,d,e.next_out-d):SK(t.check,i,d,e.next_out-d)),e.data_type=t.bits+(t.last?64:0)+(t.mode===Gf?128:0)+(t.mode===qF||t.mode===CK?256:0),(f===0&&d===0||r===OIe)&&L===Rm&&(L=Jnt),L)}function sit(e){if(!e||!e.state)return uu;var r=e.state;return r.window&&(r.window=null),e.state=null,Rm}function uit(e,r){var t;return!e||!e.state||(t=e.state,(t.wrap&2)==0)?uu:(t.head=r,r.done=!1,Rm)}function lit(e,r){var t=r.length,n,i,a;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==LF)?uu:n.mode===LF&&(i=1,i=SK(i,r,t,0),i!==n.check)?RIe:(a=sPe(e,r,t,t),a?(n.mode=kK,AK):(n.havedict=1,Rm))}Qu.inflateReset=nPe;Qu.inflateReset2=iPe;Qu.inflateResetKeep=tPe;Qu.inflateInit=iit;Qu.inflateInit2=aPe;Qu.inflate=oit;Qu.inflateEnd=sit;Qu.inflateGetHeader=uit;Qu.inflateSetDictionary=lit;Qu.inflateInfo="pako inflate (from Nodeca project)"});var FK=m((wPt,lPe)=>{"use strict";lPe.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 fPe=m((SPt,cPe)=>{"use strict";function cit(){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}cPe.exports=cit});var pPe=m(kw=>{"use strict";var sx=uPe(),Dw=qf(),UF=vK(),Ci=FK(),IK=DF(),fit=bK(),dit=fPe(),dPe=Object.prototype.toString;function Fm(e){if(!(this instanceof Fm))return new Fm(e);this.options=Dw.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15)==0&&(r.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new fit,this.strm.avail_out=0;var t=sx.inflateInit2(this.strm,r.windowBits);if(t!==Ci.Z_OK)throw new Error(IK[t]);if(this.header=new dit,sx.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=UF.string2buf(r.dictionary):dPe.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=sx.inflateSetDictionary(this.strm,r.dictionary),t!==Ci.Z_OK)))throw new Error(IK[t])}Fm.prototype.push=function(e,r){var t=this.strm,n=this.options.chunkSize,i=this.options.dictionary,a,o,s,u,l,c=!1;if(this.ended)return!1;o=r===~~r?r:r===!0?Ci.Z_FINISH:Ci.Z_NO_FLUSH,typeof e=="string"?t.input=UF.binstring2buf(e):dPe.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new Dw.Buf8(n),t.next_out=0,t.avail_out=n),a=sx.inflate(t,Ci.Z_NO_FLUSH),a===Ci.Z_NEED_DICT&&i&&(a=sx.inflateSetDictionary(this.strm,i)),a===Ci.Z_BUF_ERROR&&c===!0&&(a=Ci.Z_OK,c=!1),a!==Ci.Z_STREAM_END&&a!==Ci.Z_OK)return this.onEnd(a),this.ended=!0,!1;t.next_out&&(t.avail_out===0||a===Ci.Z_STREAM_END||t.avail_in===0&&(o===Ci.Z_FINISH||o===Ci.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=UF.utf8border(t.output,t.next_out),u=t.next_out-s,l=UF.buf2string(t.output,s),t.next_out=u,t.avail_out=n-u,u&&Dw.arraySet(t.output,t.output,s,u,0),this.onData(l)):this.onData(Dw.shrinkBuf(t.output,t.next_out))),t.avail_in===0&&t.avail_out===0&&(c=!0)}while((t.avail_in>0||t.avail_out===0)&&a!==Ci.Z_STREAM_END);return a===Ci.Z_STREAM_END&&(o=Ci.Z_FINISH),o===Ci.Z_FINISH?(a=sx.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Ci.Z_OK):(o===Ci.Z_SYNC_FLUSH&&(this.onEnd(Ci.Z_OK),t.avail_out=0),!0)};Fm.prototype.onData=function(e){this.chunks.push(e)};Fm.prototype.onEnd=function(e){e===Ci.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Dw.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function PK(e,r){var t=new Fm(r);if(t.push(e,!0),t.err)throw t.msg||IK[t.err];return t.result}function pit(e,r){return r=r||{},r.raw=!0,PK(e,r)}kw.Inflate=Fm;kw.inflate=PK;kw.inflateRaw=pit;kw.ungzip=PK});var gPe=m((TPt,mPe)=>{"use strict";var hit=qf().assign,mit=bIe(),git=pPe(),vit=FK(),hPe={};hit(hPe,mit,git,vit);mPe.exports=hPe});var bPe=m(zF=>{"use strict";var bit=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined",yit=gPe(),vPe=Qn(),GF=ls(),xit=bit?"uint8array":"array";zF.magic="\b\0";function Im(e,r){GF.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=r,this.meta={}}vPe.inherits(Im,GF);Im.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(vPe.transformTo(xit,e.data),!1)};Im.prototype.flush=function(){GF.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)};Im.prototype.cleanUp=function(){GF.prototype.cleanUp.call(this),this._pako=null};Im.prototype._createPako=function(){this._pako=new yit[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(r){e.push({data:r,meta:e.meta})}};zF.compressWorker=function(e){return new Im("Deflate",e)};zF.uncompressWorker=function(){return new Im("Inflate",{})}});var jK=m(BK=>{"use strict";var yPe=ls();BK.STORE={magic:"\0\0",compressWorker:function(){return new yPe("STORE compression")},uncompressWorker:function(){return new yPe("STORE decompression")}};BK.DEFLATE=bPe()});var MK=m(Pm=>{"use strict";Pm.LOCAL_FILE_HEADER="PK";Pm.CENTRAL_FILE_HEADER="PK";Pm.CENTRAL_DIRECTORY_END="PK";Pm.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";Pm.ZIP64_CENTRAL_DIRECTORY_END="PK";Pm.DATA_DESCRIPTOR="PK\x07\b"});var wPe=m((OPt,EPe)=>{"use strict";var ux=Qn(),lx=ls(),LK=Xy(),xPe=wF(),HF=MK(),Pn=function(e,r){var t="",n;for(n=0;n<r;n++)t+=String.fromCharCode(e&255),e=e>>>8;return t},_it=function(e,r){var t=e;return e||(t=r?16893:33204),(t&65535)<<16},Eit=function(e){return(e||0)&63},_Pe=function(e,r,t,n,i,a){var o=e.file,s=e.compression,u=a!==LK.utf8encode,l=ux.transformTo("string",a(o.name)),c=ux.transformTo("string",LK.utf8encode(o.name)),f=o.comment,d=ux.transformTo("string",a(f)),p=ux.transformTo("string",LK.utf8encode(f)),h=c.length!==o.name.length,b=p.length!==f.length,v,y,w="",A="",C="",D=o.dir,P=o.date,k={crc32:0,compressedSize:0,uncompressedSize:0};(!r||t)&&(k.crc32=e.crc32,k.compressedSize=e.compressedSize,k.uncompressedSize=e.uncompressedSize);var L=0;r&&(L|=8),!u&&(h||b)&&(L|=2048);var I=0,V=0;D&&(I|=16),i==="UNIX"?(V=798,I|=_it(o.unixPermissions,D)):(V=20,I|=Eit(o.dosPermissions,D)),v=P.getUTCHours(),v=v<<6,v=v|P.getUTCMinutes(),v=v<<5,v=v|P.getUTCSeconds()/2,y=P.getUTCFullYear()-1980,y=y<<4,y=y|P.getUTCMonth()+1,y=y<<5,y=y|P.getUTCDate(),h&&(A=Pn(1,1)+Pn(xPe(l),4)+c,w+="up"+Pn(A.length,2)+A),b&&(C=Pn(1,1)+Pn(xPe(d),4)+p,w+="uc"+Pn(C.length,2)+C);var N="";N+=`
|
|
178
|
-
\0`,N+=Pn(L,2),N+=s.magic,N+=Pn(v,2),N+=Pn(y,2),N+=Pn(k.crc32,4),N+=Pn(k.compressedSize,4),N+=Pn(k.uncompressedSize,4),N+=Pn(l.length,2),N+=Pn(w.length,2);var W=HF.LOCAL_FILE_HEADER+N+l+w,M=HF.CENTRAL_FILE_HEADER+Pn(V,2)+N+Pn(d.length,2)+"\0\0\0\0"+Pn(I,4)+Pn(n,4)+l+w+d;return{fileRecord:W,dirRecord:M}},wit=function(e,r,t,n,i){var a="",o=ux.transformTo("string",i(n));return a=HF.CENTRAL_DIRECTORY_END+"\0\0\0\0"+Pn(e,2)+Pn(e,2)+Pn(r,4)+Pn(t,4)+Pn(o.length,2)+o,a},Sit=function(e){var r="";return r=HF.DATA_DESCRIPTOR+Pn(e.crc32,4)+Pn(e.compressedSize,4)+Pn(e.uncompressedSize,4),r};function Zu(e,r,t,n){lx.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=r,this.zipPlatform=t,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}ux.inherits(Zu,lx);Zu.prototype.push=function(e){var r=e.meta.percent||0,t=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,lx.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:t?(r+100*(t-n-1))/t:100}}))};Zu.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var r=this.streamFiles&&!e.file.dir;if(r){var t=_Pe(e,r,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0};Zu.prototype.closedSource=function(e){this.accumulate=!1;var r=this.streamFiles&&!e.file.dir,t=_Pe(e,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(t.dirRecord),r)this.push({data:Sit(e),meta:{percent:100}});else for(this.push({data:t.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null};Zu.prototype.flush=function(){for(var e=this.bytesWritten,r=0;r<this.dirRecords.length;r++)this.push({data:this.dirRecords[r],meta:{percent:100}});var t=this.bytesWritten-e,n=wit(this.dirRecords.length,t,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})};Zu.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()};Zu.prototype.registerPrevious=function(e){this._sources.push(e);var r=this;return e.on("data",function(t){r.processChunk(t)}),e.on("end",function(){r.closedSource(r.previous.streamInfo),r._sources.length?r.prepareNextSource():r.end()}),e.on("error",function(t){r.error(t)}),this};Zu.prototype.resume=function(){if(!lx.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};Zu.prototype.error=function(e){var r=this._sources;if(!lx.prototype.error.call(this,e))return!1;for(var t=0;t<r.length;t++)try{r[t].error(e)}catch{}return!0};Zu.prototype.lock=function(){lx.prototype.lock.call(this);for(var e=this._sources,r=0;r<e.length;r++)e[r].lock()};EPe.exports=Zu});var APe=m(SPe=>{"use strict";var Ait=jK(),Tit=wPe(),Cit=function(e,r){var t=e||r,n=Ait[t];if(!n)throw new Error(t+" is not a valid compression method !");return n};SPe.generateWorker=function(e,r,t){var n=new Tit(r.streamFiles,t,r.platform,r.encodeFileName),i=0;try{e.forEach(function(a,o){i++;var s=Cit(o.options.compression,r.compression),u=o.options.compressionOptions||r.compressionOptions||{},l=o.dir,c=o.date;o._compressWorker(s,u).withStreamInfo("file",{name:a,dir:l,date:c,comment:o.comment||"",unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions}).pipe(n)}),n.entriesCount=i}catch(a){n.error(a)}return n}});var CPe=m((FPt,TPe)=>{"use strict";var Dit=Qn(),WF=ls();function Ow(e,r){WF.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(r)}Dit.inherits(Ow,WF);Ow.prototype._bindStream=function(e){var r=this;this._stream=e,e.pause(),e.on("data",function(t){r.push({data:t,meta:{percent:0}})}).on("error",function(t){r.isPaused?this.generatedError=t:r.error(t)}).on("end",function(){r.isPaused?r._upstreamEnded=!0:r.end()})};Ow.prototype.pause=function(){return WF.prototype.pause.call(this)?(this._stream.pause(),!0):!1};Ow.prototype.resume=function(){return WF.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),!0):!1};TPe.exports=Ow});var MPe=m((IPt,jPe)=>{"use strict";var kit=Xy(),Rw=Qn(),DPe=ls(),Oit=zV(),kPe=HV(),OPe=SF(),Rit=k4e(),Fit=APe(),RPe=ow(),Iit=CPe(),FPe=function(e,r,t){var n=Rw.getTypeOf(r),i,a=Rw.extend(t||{},kPe);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=IPe(e)),a.createFolders&&(i=Pit(e))&&PPe.call(this,i,!0);var o=n==="string"&&a.binary===!1&&a.base64===!1;(!t||typeof t.binary=="undefined")&&(a.binary=!o);var s=r instanceof OPe&&r.uncompressedSize===0;(s||a.dir||!r||r.length===0)&&(a.base64=!1,a.binary=!0,r="",a.compression="STORE",n="string");var u=null;r instanceof OPe||r instanceof DPe?u=r:RPe.isNode&&RPe.isStream(r)?u=new Iit(e,r):u=Rw.prepareContent(e,r,a.binary,a.optimizedBinaryString,a.base64);var l=new Rit(e,u,a);this.files[e]=l},Pit=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var r=e.lastIndexOf("/");return r>0?e.substring(0,r):""},IPe=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},PPe=function(e,r){return r=typeof r!="undefined"?r:kPe.createFolders,e=IPe(e),this.files[e]||FPe.call(this,e,null,{dir:!0,createFolders:r}),this.files[e]};function BPe(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Bit={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var r,t,n;for(r in this.files)n=this.files[r],t=r.slice(this.root.length,r.length),t&&r.slice(0,this.root.length)===this.root&&e(t,n)},filter:function(e){var r=[];return this.forEach(function(t,n){e(t,n)&&r.push(n)}),r},file:function(e,r,t){if(arguments.length===1)if(BPe(e)){var n=e;return this.filter(function(a,o){return!o.dir&&n.test(a)})}else{var i=this.files[this.root+e];return i&&!i.dir?i:null}else e=this.root+e,FPe.call(this,e,r,t);return this},folder:function(e){if(!e)return this;if(BPe(e))return this.filter(function(i,a){return a.dir&&e.test(i)});var r=this.root+e,t=PPe.call(this,r),n=this.clone();return n.root=t.name,n},remove:function(e){e=this.root+e;var r=this.files[e];if(r||(e.slice(-1)!=="/"&&(e+="/"),r=this.files[e]),r&&!r.dir)delete this.files[e];else for(var t=this.filter(function(i,a){return a.name.slice(0,e.length)===e}),n=0;n<t.length;n++)delete this.files[t[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 r,t={};try{if(t=Rw.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:kit.utf8encode}),t.type=t.type.toLowerCase(),t.compression=t.compression.toUpperCase(),t.type==="binarystring"&&(t.type="string"),!t.type)throw new Error("No output type specified.");Rw.checkSupport(t.type),(t.platform==="darwin"||t.platform==="freebsd"||t.platform==="linux"||t.platform==="sunos")&&(t.platform="UNIX"),t.platform==="win32"&&(t.platform="DOS");var n=t.comment||this.comment||"";r=Fit.generateWorker(this,t,n)}catch(i){r=new DPe("error"),r.error(i)}return new Oit(r,t.type||"string",t.mimeType)},generateAsync:function(e,r){return this.generateInternalStream(e).accumulate(r)},generateNodeStream:function(e,r){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(r)}};jPe.exports=Bit});var qK=m((PPt,qPe)=>{"use strict";var jit=Qn();function LPe(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}LPe.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 r=0,t;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return jit.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))}};qPe.exports=LPe});var NK=m((BPt,UPe)=>{"use strict";var NPe=qK(),Mit=Qn();function cx(e){NPe.call(this,e);for(var r=0;r<this.data.length;r++)e[r]=e[r]&255}Mit.inherits(cx,NPe);cx.prototype.byteAt=function(e){return this.data[this.zero+e]};cx.prototype.lastIndexOfSignature=function(e){for(var r=e.charCodeAt(0),t=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===r&&this.data[a+1]===t&&this.data[a+2]===n&&this.data[a+3]===i)return a-this.zero;return-1};cx.prototype.readAndCheckSignature=function(e){var r=e.charCodeAt(0),t=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),a=this.readData(4);return r===a[0]&&t===a[1]&&n===a[2]&&i===a[3]};cx.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};UPe.exports=cx});var HPe=m((jPt,zPe)=>{"use strict";var GPe=qK(),Lit=Qn();function fx(e){GPe.call(this,e)}Lit.inherits(fx,GPe);fx.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};fx.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};fx.prototype.readAndCheckSignature=function(e){var r=this.readData(4);return e===r};fx.prototype.readData=function(e){this.checkOffset(e);var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};zPe.exports=fx});var GK=m((MPt,VPe)=>{"use strict";var WPe=NK(),qit=Qn();function UK(e){WPe.call(this,e)}qit.inherits(UK,WPe);UK.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var r=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};VPe.exports=UK});var $Pe=m((LPt,YPe)=>{"use strict";var KPe=GK(),Nit=Qn();function zK(e){KPe.call(this,e)}Nit.inherits(zK,KPe);zK.prototype.readData=function(e){this.checkOffset(e);var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};YPe.exports=zK});var HK=m((qPt,JPe)=>{"use strict";var VF=Qn(),XPe=Mf(),Uit=NK(),Git=HPe(),zit=$Pe(),Hit=GK();JPe.exports=function(e){var r=VF.getTypeOf(e);return VF.checkSupport(r),r==="string"&&!XPe.uint8array?new Git(e):r==="nodebuffer"?new zit(e):XPe.uint8array?new Hit(VF.transformTo("uint8array",e)):new Uit(VF.transformTo("array",e))}});var rBe=m((NPt,eBe)=>{"use strict";var WK=HK(),wh=Qn(),Wit=SF(),QPe=wF(),KF=Xy(),YF=jK(),Vit=Mf(),Kit=0,Yit=3,$it=function(e){for(var r in YF)if(!!Object.prototype.hasOwnProperty.call(YF,r)&&YF[r].magic===e)return YF[r];return null};function ZPe(e,r){this.options=e,this.loadOptions=r}ZPe.prototype={isEncrypted:function(){return(this.bitFlag&1)==1},useUTF8:function(){return(this.bitFlag&2048)==2048},readLocalPart:function(e){var r,t;if(e.skip(22),this.fileNameLength=e.readInt(2),t=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(t),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(r=$it(this.compressionMethod),r===null)throw new Error("Corrupted zip : compression "+wh.pretty(this.compressionMethod)+" unknown (inner file : "+wh.transformTo("string",this.fileName)+")");this.decompressed=new Wit(this.compressedSize,this.uncompressedSize,this.crc32,r,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 r=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(r),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===Kit&&(this.dosPermissions=this.externalFileAttributes&63),e===Yit&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(){if(!!this.extraFields[1]){var e=WK(this.extraFields[1].value);this.uncompressedSize===wh.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===wh.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===wh.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===wh.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var r=e.index+this.extraFieldsLength,t,n,i;for(this.extraFields||(this.extraFields={});e.index+4<r;)t=e.readInt(2),n=e.readInt(2),i=e.readData(n),this.extraFields[t]={id:t,length:n,value:i};e.setIndex(r)},handleUTF8:function(){var e=Vit.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=KF.utf8decode(this.fileName),this.fileCommentStr=KF.utf8decode(this.fileComment);else{var r=this.findExtraFieldUnicodePath();if(r!==null)this.fileNameStr=r;else{var t=wh.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(t)}var n=this.findExtraFieldUnicodeComment();if(n!==null)this.fileCommentStr=n;else{var i=wh.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var r=WK(e.value);return r.readInt(1)!==1||QPe(this.fileName)!==r.readInt(4)?null:KF.utf8decode(r.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var r=WK(e.value);return r.readInt(1)!==1||QPe(this.fileComment)!==r.readInt(4)?null:KF.utf8decode(r.readData(e.length-5))}return null}};eBe.exports=ZPe});var iBe=m((UPt,nBe)=>{"use strict";var Xit=HK(),zf=Qn(),el=MK(),Jit=rBe(),Qit=Mf();function tBe(e){this.files=[],this.loadOptions=e}tBe.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var r=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+zf.pretty(r)+", expected "+zf.pretty(e)+")")}},isSignature:function(e,r){var t=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4),i=n===r;return this.reader.setIndex(t),i},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),r=Qit.uint8array?"uint8array":"array",t=zf.transformTo(r,e);this.zipComment=this.loadOptions.decodeFileName(t)},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,r=0,t,n,i;r<e;)t=this.reader.readInt(2),n=this.reader.readInt(4),i=this.reader.readData(n),this.zip64ExtensibleData[t]={id:t,length:n,value:i}},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,r;for(e=0;e<this.files.length;e++)r=this.files[e],this.reader.setIndex(r.localHeaderOffset),this.checkSignature(el.LOCAL_FILE_HEADER),r.readLocalPart(this.reader),r.handleUTF8(),r.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(el.CENTRAL_FILE_HEADER);)e=new Jit({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(el.CENTRAL_DIRECTORY_END);if(e<0){var r=!this.isSignature(0,el.LOCAL_FILE_HEADER);throw r?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 t=e;if(this.checkSignature(el.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===zf.MAX_VALUE_16BITS||this.diskWithCentralDirStart===zf.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===zf.MAX_VALUE_16BITS||this.centralDirRecords===zf.MAX_VALUE_16BITS||this.centralDirSize===zf.MAX_VALUE_32BITS||this.centralDirOffset===zf.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(el.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(el.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,el.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(el.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(el.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var i=t-n;if(i>0)this.isSignature(t,el.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(e){this.reader=Xit(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};nBe.exports=tBe});var sBe=m((GPt,oBe)=>{"use strict";var VK=Qn(),$F=Ky(),Zit=Xy(),eat=iBe(),rat=KV(),aBe=ow();function tat(e){return new $F.Promise(function(r,t){var n=e.decompressed.getContentWorker().pipe(new rat);n.on("error",function(i){t(i)}).on("end",function(){n.streamInfo.crc32!==e.decompressed.crc32?t(new Error("Corrupted zip : CRC32 mismatch")):r()}).resume()})}oBe.exports=function(e,r){var t=this;return r=VK.extend(r||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:Zit.utf8decode}),aBe.isNode&&aBe.isStream(e)?$F.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):VK.prepareContent("the loaded zip file",e,!0,r.optimizedBinaryString,r.base64).then(function(n){var i=new eat(r);return i.load(n),i}).then(function(i){var a=[$F.Promise.resolve(i)],o=i.files;if(r.checkCRC32)for(var s=0;s<o.length;s++)a.push(tat(o[s]));return $F.Promise.all(a)}).then(function(i){for(var a=i.shift(),o=a.files,s=0;s<o.length;s++){var u=o[s],l=u.fileNameStr,c=VK.resolve(u.fileNameStr);t.file(c,u.decompressed,{binary:!0,optimizedBinaryString:!0,date:u.date,dir:u.dir,comment:u.fileCommentStr.length?u.fileCommentStr:null,unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions,createFolders:r.createFolders}),u.dir||(t.file(c).unsafeOriginalName=l)}return a.zipComment.length&&(t.comment=a.zipComment),t})}});var KK=m((zPt,uBe)=>{"use strict";function lu(){if(!(this instanceof lu))return new lu;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 lu;for(var r in this)typeof this[r]!="function"&&(e[r]=this[r]);return e}}lu.prototype=MPe();lu.prototype.loadAsync=sBe();lu.support=Mf();lu.defaults=HV();lu.version="3.10.1";lu.loadAsync=function(e,r){return new lu().loadAsync(e,r)};lu.external=Ky();uBe.exports=lu});var VBe=m((RBt,Wf)=>{var pot=fo().default;function WBe(){"use strict";Wf.exports=WBe=function(){return e},Wf.exports.__esModule=!0,Wf.exports.default=Wf.exports;var e={},r=Object.prototype,t=r.hasOwnProperty,n=Object.defineProperty||function(W,M,H){W[M]=H.value},i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(W,M,H){return Object.defineProperty(W,M,{value:H,enumerable:!0,configurable:!0,writable:!0}),W[M]}try{u({},"")}catch{u=function(H,X,ne){return H[X]=ne}}function l(W,M,H,X){var ne=M&&M.prototype instanceof d?M:d,ae=Object.create(ne.prototype),se=new I(X||[]);return n(ae,"_invoke",{value:D(W,H,se)}),ae}function c(W,M,H){try{return{type:"normal",arg:W.call(M,H)}}catch(X){return{type:"throw",arg:X}}}e.wrap=l;var f={};function d(){}function p(){}function h(){}var b={};u(b,a,function(){return this});var v=Object.getPrototypeOf,y=v&&v(v(V([])));y&&y!==r&&t.call(y,a)&&(b=y);var w=h.prototype=d.prototype=Object.create(b);function A(W){["next","throw","return"].forEach(function(M){u(W,M,function(H){return this._invoke(M,H)})})}function C(W,M){function H(ne,ae,se,ce){var me=c(W[ne],W,ae);if(me.type!=="throw"){var Me=me.arg,Ie=Me.value;return Ie&&pot(Ie)=="object"&&t.call(Ie,"__await")?M.resolve(Ie.__await).then(function(Ue){H("next",Ue,se,ce)},function(Ue){H("throw",Ue,se,ce)}):M.resolve(Ie).then(function(Ue){Me.value=Ue,se(Me)},function(Ue){return H("throw",Ue,se,ce)})}ce(me.arg)}var X;n(this,"_invoke",{value:function(ae,se){function ce(){return new M(function(me,Me){H(ae,se,me,Me)})}return X=X?X.then(ce,ce):ce()}})}function D(W,M,H){var X="suspendedStart";return function(ne,ae){if(X==="executing")throw new Error("Generator is already running");if(X==="completed"){if(ne==="throw")throw ae;return N()}for(H.method=ne,H.arg=ae;;){var se=H.delegate;if(se){var ce=P(se,H);if(ce){if(ce===f)continue;return ce}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(X==="suspendedStart")throw X="completed",H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);X="executing";var me=c(W,M,H);if(me.type==="normal"){if(X=H.done?"completed":"suspendedYield",me.arg===f)continue;return{value:me.arg,done:H.done}}me.type==="throw"&&(X="completed",H.method="throw",H.arg=me.arg)}}}function P(W,M){var H=M.method,X=W.iterator[H];if(X===void 0)return M.delegate=null,H==="throw"&&W.iterator.return&&(M.method="return",M.arg=void 0,P(W,M),M.method==="throw")||H!=="return"&&(M.method="throw",M.arg=new TypeError("The iterator does not provide a '"+H+"' method")),f;var ne=c(X,W.iterator,M.arg);if(ne.type==="throw")return M.method="throw",M.arg=ne.arg,M.delegate=null,f;var ae=ne.arg;return ae?ae.done?(M[W.resultName]=ae.value,M.next=W.nextLoc,M.method!=="return"&&(M.method="next",M.arg=void 0),M.delegate=null,f):ae:(M.method="throw",M.arg=new TypeError("iterator result is not an object"),M.delegate=null,f)}function k(W){var M={tryLoc:W[0]};1 in W&&(M.catchLoc=W[1]),2 in W&&(M.finallyLoc=W[2],M.afterLoc=W[3]),this.tryEntries.push(M)}function L(W){var M=W.completion||{};M.type="normal",delete M.arg,W.completion=M}function I(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(k,this),this.reset(!0)}function V(W){if(W){var M=W[a];if(M)return M.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var H=-1,X=function ne(){for(;++H<W.length;)if(t.call(W,H))return ne.value=W[H],ne.done=!1,ne;return ne.value=void 0,ne.done=!0,ne};return X.next=X}}return{next:N}}function N(){return{value:void 0,done:!0}}return p.prototype=h,n(w,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=u(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(W){var M=typeof W=="function"&&W.constructor;return!!M&&(M===p||(M.displayName||M.name)==="GeneratorFunction")},e.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,h):(W.__proto__=h,u(W,s,"GeneratorFunction")),W.prototype=Object.create(w),W},e.awrap=function(W){return{__await:W}},A(C.prototype),u(C.prototype,o,function(){return this}),e.AsyncIterator=C,e.async=function(W,M,H,X,ne){ne===void 0&&(ne=Promise);var ae=new C(l(W,M,H,X),ne);return e.isGeneratorFunction(M)?ae:ae.next().then(function(se){return se.done?se.value:ae.next()})},A(w),u(w,s,"Generator"),u(w,a,function(){return this}),u(w,"toString",function(){return"[object Generator]"}),e.keys=function(W){var M=Object(W),H=[];for(var X in M)H.push(X);return H.reverse(),function ne(){for(;H.length;){var ae=H.pop();if(ae in M)return ne.value=ae,ne.done=!1,ne}return ne.done=!0,ne}},e.values=V,I.prototype={constructor:I,reset:function(M){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!M)for(var H in this)H.charAt(0)==="t"&&t.call(this,H)&&!isNaN(+H.slice(1))&&(this[H]=void 0)},stop:function(){this.done=!0;var M=this.tryEntries[0].completion;if(M.type==="throw")throw M.arg;return this.rval},dispatchException:function(M){if(this.done)throw M;var H=this;function X(Me,Ie){return se.type="throw",se.arg=M,H.next=Me,Ie&&(H.method="next",H.arg=void 0),!!Ie}for(var ne=this.tryEntries.length-1;ne>=0;--ne){var ae=this.tryEntries[ne],se=ae.completion;if(ae.tryLoc==="root")return X("end");if(ae.tryLoc<=this.prev){var ce=t.call(ae,"catchLoc"),me=t.call(ae,"finallyLoc");if(ce&&me){if(this.prev<ae.catchLoc)return X(ae.catchLoc,!0);if(this.prev<ae.finallyLoc)return X(ae.finallyLoc)}else if(ce){if(this.prev<ae.catchLoc)return X(ae.catchLoc,!0)}else{if(!me)throw new Error("try statement without catch or finally");if(this.prev<ae.finallyLoc)return X(ae.finallyLoc)}}}},abrupt:function(M,H){for(var X=this.tryEntries.length-1;X>=0;--X){var ne=this.tryEntries[X];if(ne.tryLoc<=this.prev&&t.call(ne,"finallyLoc")&&this.prev<ne.finallyLoc){var ae=ne;break}}ae&&(M==="break"||M==="continue")&&ae.tryLoc<=H&&H<=ae.finallyLoc&&(ae=null);var se=ae?ae.completion:{};return se.type=M,se.arg=H,ae?(this.method="next",this.next=ae.finallyLoc,f):this.complete(se)},complete:function(M,H){if(M.type==="throw")throw M.arg;return M.type==="break"||M.type==="continue"?this.next=M.arg:M.type==="return"?(this.rval=this.arg=M.arg,this.method="return",this.next="end"):M.type==="normal"&&H&&(this.next=H),f},finish:function(M){for(var H=this.tryEntries.length-1;H>=0;--H){var X=this.tryEntries[H];if(X.finallyLoc===M)return this.complete(X.completion,X.afterLoc),L(X),f}},catch:function(M){for(var H=this.tryEntries.length-1;H>=0;--H){var X=this.tryEntries[H];if(X.tryLoc===M){var ne=X.completion;if(ne.type==="throw"){var ae=ne.arg;L(X)}return ae}}throw new Error("illegal catch attempt")},delegateYield:function(M,H,X){return this.delegate={iterator:V(M),resultName:H,nextLoc:X},this.method==="next"&&(this.arg=void 0),f}},e}Wf.exports=WBe,Wf.exports.__esModule=!0,Wf.exports.default=Wf.exports});var YBe=m((FBt,KBe)=>{var n4=VBe()();KBe.exports=n4;try{regeneratorRuntime=n4}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=n4:Function("r","regeneratorRuntime = r")(n4)}});var aY=m(i4=>{"use strict";var nY=ln();Object.defineProperty(i4,"__esModule",{value:!0});i4.default=void 0;var hot=nY(ui()),mot=nY(li()),Th=nY(Ns()),got=240,vot=[9,-18,-88,0,96,90,0,0,-60,-20,-9,18,8,0,-96,30,0,0,60,-20,9,-88,-18,90,96,0,-20,-60,0,0,186,-42,-42,-150,-96,-150,60,60,60,60,54,162,-78,30,-24,-90,-60,60,-60,60,-9,-32,18,30,24,0,20,-60,0,0,-9,8,18,30,-96,0,-20,60,0,0,54,-78,162,-90,-24,30,60,-60,60,-60,-54,78,78,90,144,90,-60,-60,-60,-60,9,-8,-18,-30,-24,0,20,60,0,0,-9,18,-32,0,24,30,0,0,-60,20,9,-18,-8,0,-24,-30,0,0,60,20],bot=372,yot=[0,0,-131,0,138,144,0,0,-102,-31,0,0,7,0,-138,42,0,0,102,-31,62,0,-31,0,0,-62,0,0,0,31,124,0,-62,0,0,-124,0,0,0,62,124,0,-62,0,0,-124,0,0,0,62,62,0,-31,0,0,-62,0,0,0,31,0,0,45,0,-183,-9,0,93,18,0,0,0,216,0,33,87,0,-93,12,-93,0,0,156,0,153,99,0,-93,-12,-93,0,0,-45,0,-3,9,0,93,-18,0,0,0,-55,0,48,42,0,0,-84,31,0,0,-7,0,-48,-42,0,0,84,31],xot=372,_ot=[18,-36,-122,0,120,135,0,0,-84,-31,-18,36,-2,0,-120,51,0,0,84,-31,36,-165,-27,93,147,-9,0,-93,18,0,210,45,-111,-93,-57,-192,0,93,12,93,162,141,-75,-93,-129,-180,0,93,-12,93,-36,-21,27,93,39,9,0,-93,-18,0,0,0,62,0,0,31,0,0,0,-31,0,0,124,0,0,62,0,0,0,-62,0,0,124,0,0,62,0,0,0,-62,0,0,62,0,0,31,0,0,0,-31,-18,36,-64,0,66,51,0,0,-102,31,18,-36,2,0,-66,-51,0,0,102,31],Eot=12,iY=(3+1)*(3+2)/2,wot=2,Sot=function(){function e(r){(0,hot.default)(this,e),(0,Th.default)(this,"_v00",0),(0,Th.default)(this,"_v01",0),(0,Th.default)(this,"_v10",0),(0,Th.default)(this,"_v11",0),(0,Th.default)(this,"_t",[]),(0,Th.default)(this,"_ix",void 0),(0,Th.default)(this,"_iy",void 0),(0,Th.default)(this,"options",void 0),this.options=r,this._ix=this.options._width,this._iy=this.options._height}return(0,mot.default)(e,[{key:"getHeight",value:function(t,n){if(t=Math.abs(t)>90?NaN:t,isNaN(t)||isNaN(n))return NaN;var i=Aot(n,360);n=i!==-180?i:180;var a=n*this.options._rlonres,o=-t*this.options._rlatres,s=Math.floor(a),u=Math.min(Math.round((this.options._height-1)/2-1),Math.floor(o));a-=s,o-=u,u+=(this.options._height-1)/2,s+=s<0?this.options._width:s>=this.options._width?-this.options._width:0;var l=0,c=0,f=0,d=0,p=new Array(iY);if(s===this._ix&&u===this._iy)this.options.cubic?p=this._t:(l=this._v00,c=this._v01,f=this._v10,d=this._v11);else if(!this.options.cubic)l=this._rawval(s,u),c=this._rawval(s+1,u),f=this._rawval(s,u+1),d=this._rawval(s+1,u+1);else{var h=[this._rawval(s,u-1),this._rawval(s+1,u-1),this._rawval(s-1,u),this._rawval(s,u),this._rawval(s+1,u),this._rawval(s+2,u),this._rawval(s-1,u+1),this._rawval(s,u+1),this._rawval(s+1,u+1),this._rawval(s+2,u+1),this._rawval(s,u+2),this._rawval(s+1,u+2)],b=yot;u!==0&&(b=u===this.options._height-2?_ot:vot);var v=bot;u!==0&&(v=u===this.options._height-2?xot:got);for(var y=0;y<iY;++y){p[y]=0;for(var w=0;w<Eot;++w)p[y]+=h[w]*b[iY*w+y];p[y]/=v}}if(!this.options.cubic){var A=(1-a)*l+a*c,C=(1-a)*f+a*d,D=(1-o)*A+o*C,P=this.options._offset+this.options._scale*D;return this._ix=s,this._iy=u,this._v00=l,this._v01=c,this._v10=f,this._v11=d,P}var k=p[0]+a*(p[1]+a*(p[3]+a*p[6]))+o*(p[2]+a*(p[4]+a*p[7])+o*(p[5]+a*p[8]+o*p[9]));return k=this.options._offset+this.options._scale*k,this._ix=s,this._iy=u,this._t=p,k}},{key:"_rawval",value:function(t,n){t<0?t+=this.options._width:t>=this.options._width&&(t-=this.options._width),(n<0||n>=this.options._height)&&(n=n<0?-n:2*(this.options._height-1)-n,t+=(t<this.options._width/2?1:-1)*this.options._width/2);var i=this.options._datastart+wot*(n*this.options._swidth+t),a=this.options.data[i],o=this.options.data[i+1],s=a<<8|o;return s}}]),e}();i4.default=Sot;function Aot(e,r){r=Math.abs(r);var t=$Be(e,r);return 2*Math.abs(t)===r?t-=$Be(e,2*r)-t:2*Math.abs(t)>r&&(t+=t<0?r:-r),t}function $Be(e,r){return e-Math.floor(e/r)*r}});var r5e=m(oY=>{"use strict";var XBe=ln();Object.defineProperty(oY,"__esModule",{value:!0});oY.parsePGM=Fot;var JBe=XBe(YBe()),Tot=XBe(aY());function Cot(e,r){var t=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Dot(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
179
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){t=t.call(e)},n:function(){var l=t.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(o)throw s}}}}function Dot(e,r){if(!!e){if(typeof e=="string")return QBe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return QBe(e,r)}}function QBe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var kot=JBe.default.mark(ZBe),Oot=10,Rot=65535;function Fot(e,r){var t=ZBe(e),n=t.next();if(n.done||n.value.line!=="P5")throw new Error("Geoid model file: File not in PGM format");var i=Number.MAX_VALUE,a=0,o=-1,s=-1,u="NONE",l="UNKNOWN",c=0,f=0,d=null,p=null;do{n=t.next();var h=n.value.line;if(!!h.length)if(h[0]==="#"){var b=h.split(" "),v=b[0],y=b[1];if(v!=="#"||!y)continue;var w=b.length>2?b.slice(2):[];if(y==="Description")u=w.join(" ");else if(y==="DateTime")l=w.join(" ");else if(y==="Offset"){if(!b[2])throw new Error("Geoid model file: Error reading offset");i=parseInt(b[2],10)}else if(y==="Scale"){if(!b[2])throw new Error("Geoid model file: Error reading scale");a=parseFloat(b[2])}else y===(r.cubic?"MaxCubicError":"MaxBilinearError")?isFinite(parseFloat(b[2]))&&(o=parseFloat(b[2])):y===(r.cubic?"RMSCubicError":"RMSBilinearError")&&isFinite(parseFloat(b[2]))&&(s=parseFloat(b[2]))}else{var A=h.split(" ");if(A=A.filter(function(k){return k!==""}),c=parseInt(A[0],10),f=parseInt(A[1],10),!(c&&f))throw new Error("Geoid model file: Error reading raster size");break}}while(!n.done);n=t.next();var C=parseInt(n.value.line,10);if(n.done)throw new Error("Geoid model file: Error reading maxval");if(C!==Rot)throw new Error("Geoid model file: Incorrect value of maxval");if(d=n.value.offset,p=c,i===Number.MAX_VALUE)throw new Error("Geoid model file: Offset not set");if(a===0)throw new Error("Geoid model file: Scale not set");if(a<0)throw new Error("Geoid model file: Scale must be positive");if(f<2||c<2)throw new Error("Geoid model file: Raster size too small");if(c&1)throw new Error("Geoid model file: Raster width is odd");if(!(f&1))throw new Error("Geoid model file: Raster height is even");var D=c/360,P=(f-1)/180;return new Tot.default({cubic:r.cubic,_width:c,_height:f,_rlonres:D,_rlatres:P,_offset:i,_scale:a,_swidth:p,_datastart:d,_maxerror:o,_rmserror:s,_description:u,_datetime:l,data:e})}function ZBe(e){var r,t,n,i;return JBe.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:r=0;case 1:if(t=e.indexOf(Oot,r),t===-1){o.next=9;break}return n=e.subarray(r,t),r=t+1,o.next=7,{offset:r,line:e5e(n)};case 7:o.next=13;break;case 9:return i=e.subarray(r,e.length),r=e.length,o.next=13,{offset:r,line:e5e(i)};case 13:if(r<e.length){o.next=1;break}case 14:return o.abrupt("return",{offset:r,line:""});case 15:case"end":return o.stop()}},kot)}function e5e(e){var r="",t=Cot(e),n;try{for(t.s();!(n=t.n()).done;){var i=n.value;r+=String.fromCharCode(i)}}catch(a){t.e(a)}finally{t.f()}return r}});var t5e=m(a4=>{"use strict";var Iot=ln();Object.defineProperty(a4,"__esModule",{value:!0});Object.defineProperty(a4,"parsePGM",{enumerable:!0,get:function(){return Pot.parsePGM}});Object.defineProperty(a4,"Geoid",{enumerable:!0,get:function(){return Bot.default}});var Pot=r5e(),Bot=Iot(aY())});var b5e=m(c4=>{"use strict";Object.defineProperty(c4,"__esModule",{value:!0});c4.default=void 0;var dst={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,TEXTURE_WIDTH:4096,TEXTURE_HEIGHT:4097,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,MAX_3D_TEXTURE_SIZE:32883,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,MAX_TEXTURE_LOD_BIAS:34045,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,RASTERIZER_DISCARD:35977,VERTEX_ARRAY_BINDING:34229,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,MAX_ELEMENT_INDEX:36203,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,RGB9_E5:35901,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2UI:36975,TEXTURE_IMMUTABLE_FORMAT:37167,TEXTURE_IMMUTABLE_LEVELS:33503,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,UNSIGNED_INT_24_8:34042,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,INT_2_10_10_10_REV:36255,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,MAX_SAMPLES:36183,SAMPLER_BINDING:35097,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,UNSIGNED_NORMALIZED:35863,SIGNED_NORMALIZED:36764,VERTEX_ATTRIB_ARRAY_INTEGER:35069,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,DEPTH24_STENCIL8:35056,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,COLOR:6144,DEPTH:6145,STENCIL:6146,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,INVALID_INDEX:4294967295,TIMEOUT_IGNORED:-1,MAX_CLIENT_WAIT_TIMEOUT_WEBGL:37447,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,UNMASKED_VENDOR_WEBGL:37445,UNMASKED_RENDERER_WEBGL:37446,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,TEXTURE_MAX_ANISOTROPY_EXT:34046,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35986,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,UNSIGNED_INT_24_8_WEBGL:34042,HALF_FLOAT_OES:36193,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863,MIN_EXT:32775,MAX_EXT:32776,SRGB_EXT:35904,SRGB_ALPHA_EXT:35906,SRGB8_ALPHA8_EXT:35907,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067,COLOR_ATTACHMENT4_WEBGL:36068,COLOR_ATTACHMENT5_WEBGL:36069,COLOR_ATTACHMENT6_WEBGL:36070,COLOR_ATTACHMENT7_WEBGL:36071,COLOR_ATTACHMENT8_WEBGL:36072,COLOR_ATTACHMENT9_WEBGL:36073,COLOR_ATTACHMENT10_WEBGL:36074,COLOR_ATTACHMENT11_WEBGL:36075,COLOR_ATTACHMENT12_WEBGL:36076,COLOR_ATTACHMENT13_WEBGL:36077,COLOR_ATTACHMENT14_WEBGL:36078,COLOR_ATTACHMENT15_WEBGL:36079,DRAW_BUFFER0_WEBGL:34853,DRAW_BUFFER1_WEBGL:34854,DRAW_BUFFER2_WEBGL:34855,DRAW_BUFFER3_WEBGL:34856,DRAW_BUFFER4_WEBGL:34857,DRAW_BUFFER5_WEBGL:34858,DRAW_BUFFER6_WEBGL:34859,DRAW_BUFFER7_WEBGL:34860,DRAW_BUFFER8_WEBGL:34861,DRAW_BUFFER9_WEBGL:34862,DRAW_BUFFER10_WEBGL:34863,DRAW_BUFFER11_WEBGL:34864,DRAW_BUFFER12_WEBGL:34865,DRAW_BUFFER13_WEBGL:34866,DRAW_BUFFER14_WEBGL:34867,DRAW_BUFFER15_WEBGL:34868,MAX_COLOR_ATTACHMENTS_WEBGL:36063,MAX_DRAW_BUFFERS_WEBGL:34852,VERTEX_ARRAY_BINDING_OES:34229,QUERY_COUNTER_BITS_EXT:34916,CURRENT_QUERY_EXT:34917,QUERY_RESULT_EXT:34918,QUERY_RESULT_AVAILABLE_EXT:34919,TIME_ELAPSED_EXT:35007,TIMESTAMP_EXT:36392,GPU_DISJOINT_EXT:36795};c4.default=dst});var ll=typeof process!="object"||String(process)!=="[object process]"||process.browser,A4={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},Fi=A4.global||A4.self||A4.window;var JY={ibm866:[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],"iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],"iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],"iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],"iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],"iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],"iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],"iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],"iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],"koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],"koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],macintosh:[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],"windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],"windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],"windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],"windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],"windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],"windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],"x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]};global["encoding-indexes"]=JY||{};function it(e,r,t){return r<=e&&e<=t}function Nje(e,r){return e.indexOf(r)!==-1}var Dc=Math.floor;function oS(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function Uje(e){for(var r=String(e),t=r.length,n=0,i=[];n<t;){var a=r.charCodeAt(n);if(a<55296||a>57343)i.push(a);else if(56320<=a&&a<=57343)i.push(65533);else if(55296<=a&&a<=56319)if(n===t-1)i.push(65533);else{var o=r.charCodeAt(n+1);if(56320<=o&&o<=57343){var s=a&1023,u=o&1023;i.push(65536+(s<<10)+u),n+=1}else i.push(65533)}n+=1}return i}function Gje(e){for(var r="",t=0;t<e.length;++t){var n=e[t];n<=65535?r+=String.fromCharCode(n):(n-=65536,r+=String.fromCharCode((n>>10)+55296,(n&1023)+56320))}return r}function hs(e){return 0<=e&&e<=127}var ms=hs,Ft=-1;function T4(e){this.tokens=[].slice.call(e),this.tokens.reverse()}T4.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():Ft},prepend:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.push(r.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.unshift(r.shift());else this.tokens.unshift(e)}};var Sn=-1;function It(e,r){if(e)throw TypeError("Decoder error");return r||65533}function hu(e){throw TypeError("The code point "+e+" could not be encoded.")}function zje(){}zje.prototype={handler:function(e,r){}};function Hje(){}Hje.prototype={handler:function(e,r){}};function C4(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(D4,e)?D4[e]:null}var QY=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],D4={};QY.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(t){D4[t]=r})})});var _o={},Eo={};function Km(e,r){return r&&r[e]||null}function Ym(e,r){var t=r.indexOf(e);return t===-1?null:t}function io(e){if(!("encoding-indexes"in global))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return global["encoding-indexes"][e]}function Wje(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,t=0,n=io("gb18030-ranges"),i;for(i=0;i<n.length;++i){var a=n[i];if(a[0]<=e)r=a[0],t=a[1];else break}return t+e-r}function Vje(e){if(e===59335)return 7457;var r=0,t=0,n=io("gb18030-ranges"),i;for(i=0;i<n.length;++i){var a=n[i];if(a[1]<=e)r=a[1],t=a[0];else break}return t+e-r}function Kje(e){k4=k4||io("jis0208").map(function(t,n){return it(n,8272,8835)?null:t});var r=k4;return r.indexOf(e)}var k4;function Yje(e){O4=O4||io("big5").map(function(t,n){return n<(161-129)*157?null:t});var r=O4;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):Ym(e,r)}var O4,ZY="utf-8";function Rh(e,r){if(!(this instanceof Rh))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):ZY,r=oS(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var t=C4(e);if(t===null||t.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Eo[t.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var n=this;return n._encoding=t,Boolean(r.fatal)&&(n._error_mode="fatal"),Boolean(r.ignoreBOM)&&(n._ignoreBOM=!0),Object.defineProperty||(this.encoding=n._encoding.name.toLowerCase(),this.fatal=n._error_mode==="fatal",this.ignoreBOM=n._ignoreBOM),n}Object.defineProperty&&(Object.defineProperty(Rh.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(Rh.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(Rh.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));Rh.prototype.decode=function(r,t){var n;typeof r=="object"&&r instanceof ArrayBuffer?n=new Uint8Array(r):typeof r=="object"&&"buffer"in r&&r.buffer instanceof ArrayBuffer?n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):n=new Uint8Array(0),t=oS(t),this._do_not_flush||(this._decoder=Eo[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(t.stream);for(var i=new T4(n),a=[],o;;){var s=i.read();if(s===Ft||(o=this._decoder.handler(i,s),o===Sn))break;o!==null&&(Array.isArray(o)?a.push.apply(a,o):a.push(o))}if(!this._do_not_flush){do{if(o=this._decoder.handler(i,i.read()),o===Sn)break;o!==null&&(Array.isArray(o)?a.push.apply(a,o):a.push(o))}while(!i.endOfStream());this._decoder=null}function u(l){return Nje(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(l.length>0&&l[0]===65279?(this._BOMseen=!0,l.shift()):l.length>0&&(this._BOMseen=!0)),Gje(l)}return u.call(this,a)};function Px(e,r){if(!(this instanceof Px))throw TypeError("Called as a function. Did you forget 'new'?");r=oS(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var t=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):ZY;var n=C4(e);if(n===null||n.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!_o[n.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");t._encoding=n}else t._encoding=C4("utf-8"),e!==void 0&&"console"in global&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=t._encoding.name.toLowerCase()),t}Object.defineProperty&&Object.defineProperty(Px.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Px.prototype.encode=function(r,t){r=r===void 0?"":String(r),t=oS(t),this._do_not_flush||(this._encoder=_o[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(t.stream);for(var n=new T4(Uje(r)),i=[],a;;){var o=n.read();if(o===Ft||(a=this._encoder.handler(n,o),a===Sn))break;Array.isArray(a)?i.push.apply(i,a):i.push(a)}if(!this._do_not_flush){for(;a=this._encoder.handler(n,n.read()),a!==Sn;)Array.isArray(a)?i.push.apply(i,a):i.push(a);this._encoder=null}return new Uint8Array(i)};function $je(e){var r=e.fatal,t=0,n=0,i=0,a=128,o=191;this.handler=function(s,u){if(u===Ft&&i!==0)return i=0,It(r);if(u===Ft)return Sn;if(i===0){if(it(u,0,127))return u;if(it(u,194,223))i=1,t=u&31;else if(it(u,224,239))u===224&&(a=160),u===237&&(o=159),i=2,t=u&15;else if(it(u,240,244))u===240&&(a=144),u===244&&(o=143),i=3,t=u&7;else return It(r);return null}if(!it(u,a,o))return t=i=n=0,a=128,o=191,s.prepend(u),It(r);if(a=128,o=191,t=t<<6|u&63,n+=1,n!==i)return null;var l=t;return t=i=n=0,l}}function Xje(e){var r=e.fatal;this.handler=function(t,n){if(n===Ft)return Sn;if(ms(n))return n;var i,a;it(n,128,2047)?(i=1,a=192):it(n,2048,65535)?(i=2,a=224):it(n,65536,1114111)&&(i=3,a=240);for(var o=[(n>>6*i)+a];i>0;){var s=n>>6*(i-1);o.push(128|s&63),i-=1}return o}}_o["UTF-8"]=function(e){return new Xje(e)};Eo["UTF-8"]=function(e){return new $je(e)};function Jje(e,r){var t=r.fatal;this.handler=function(n,i){if(i===Ft)return Sn;if(hs(i))return i;var a=e[i-128];return a===null?It(t):a}}function Qje(e,r){var t=r.fatal;this.handler=function(n,i){if(i===Ft)return Sn;if(ms(i))return i;var a=Ym(i,e);return a===null&&hu(i),a+128}}(function(){"encoding-indexes"in global&&QY.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var t=r.name,n=io(t.toLowerCase());Eo[t]=function(i){return new Jje(n,i)},_o[t]=function(i){return new Qje(n,i)}})})})();Eo.GBK=function(e){return new e$(e)};_o.GBK=function(e){return new r$(e,!0)};function e$(e){var r=e.fatal,t=0,n=0,i=0;this.handler=function(a,o){if(o===Ft&&t===0&&n===0&&i===0)return Sn;o===Ft&&(t!==0||n!==0||i!==0)&&(t=0,n=0,i=0,It(r));var s;if(i!==0){s=null,it(o,48,57)&&(s=Wje((((t-129)*10+n-48)*126+i-129)*10+o-48));var u=[n,i,o];return t=0,n=0,i=0,s===null?(a.prepend(u),It(r)):s}if(n!==0)return it(o,129,254)?(i=o,null):(a.prepend([n,o]),t=0,n=0,It(r));if(t!==0){if(it(o,48,57))return n=o,null;var l=t,c=null;t=0;var f=o<127?64:65;return(it(o,64,126)||it(o,128,254))&&(c=(l-129)*190+(o-f)),s=c===null?null:Km(c,io("gb18030")),s===null&&hs(o)&&a.prepend(o),s===null?It(r):s}return hs(o)?o:o===128?8364:it(o,129,254)?(t=o,null):It(r)}}function r$(e,r){var t=e.fatal;this.handler=function(n,i){if(i===Ft)return Sn;if(ms(i))return i;if(i===58853)return hu(i);if(r&&i===8364)return 128;var a=Ym(i,io("gb18030"));if(a!==null){var o=Dc(a/190)+129,s=a%190,u=s<63?64:65;return[o,s+u]}if(r)return hu(i);a=Vje(i);var l=Dc(a/10/126/10);a=a-l*10*126*10;var c=Dc(a/10/126);a=a-c*10*126;var f=Dc(a/10),d=a-f*10;return[l+129,c+48,f+129,d+48]}}_o.gb18030=function(e){return new r$(e)};Eo.gb18030=function(e){return new e$(e)};function Zje(e){var r=e.fatal,t=0;this.handler=function(n,i){if(i===Ft&&t!==0)return t=0,It(r);if(i===Ft&&t===0)return Sn;if(t!==0){var a=t,o=null;t=0;var s=i<127?64:98;switch((it(i,64,126)||it(i,161,254))&&(o=(a-129)*157+(i-s)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var u=o===null?null:Km(o,io("big5"));return u===null&&hs(i)&&n.prepend(i),u===null?It(r):u}return hs(i)?i:it(i,129,254)?(t=i,null):It(r)}}function eMe(e){var r=e.fatal;this.handler=function(t,n){if(n===Ft)return Sn;if(ms(n))return n;var i=Yje(n);if(i===null)return hu(n);var a=Dc(i/157)+129;if(a<161)return hu(n);var o=i%157,s=o<63?64:98;return[a,o+s]}}_o.Big5=function(e){return new eMe(e)};Eo.Big5=function(e){return new Zje(e)};function rMe(e){var r=e.fatal,t=!1,n=0;this.handler=function(i,a){if(a===Ft&&n!==0)return n=0,It(r);if(a===Ft&&n===0)return Sn;if(n===142&&it(a,161,223))return n=0,65377-161+a;if(n===143&&it(a,161,254))return t=!0,n=a,null;if(n!==0){var o=n;n=0;var s=null;return it(o,161,254)&&it(a,161,254)&&(s=Km((o-161)*94+(a-161),io(t?"jis0212":"jis0208"))),t=!1,it(a,161,254)||i.prepend(a),s===null?It(r):s}return hs(a)?a:a===142||a===143||it(a,161,254)?(n=a,null):It(r)}}function tMe(e){var r=e.fatal;this.handler=function(t,n){if(n===Ft)return Sn;if(ms(n))return n;if(n===165)return 92;if(n===8254)return 126;if(it(n,65377,65439))return[142,n-65377+161];n===8722&&(n=65293);var i=Ym(n,io("jis0208"));if(i===null)return hu(n);var a=Dc(i/94)+161,o=i%94+161;return[a,o]}}_o["EUC-JP"]=function(e){return new tMe(e)};Eo["EUC-JP"]=function(e){return new rMe(e)};function nMe(e){var r=e.fatal,t={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},n=t.ASCII,i=t.ASCII,a=0,o=!1;this.handler=function(s,u){switch(n){default:case t.ASCII:return u===27?(n=t.EscapeStart,null):it(u,0,127)&&u!==14&&u!==15&&u!==27?(o=!1,u):u===Ft?Sn:(o=!1,It(r));case t.Roman:return u===27?(n=t.EscapeStart,null):u===92?(o=!1,165):u===126?(o=!1,8254):it(u,0,127)&&u!==14&&u!==15&&u!==27&&u!==92&&u!==126?(o=!1,u):u===Ft?Sn:(o=!1,It(r));case t.Katakana:return u===27?(n=t.EscapeStart,null):it(u,33,95)?(o=!1,65377-33+u):u===Ft?Sn:(o=!1,It(r));case t.LeadByte:return u===27?(n=t.EscapeStart,null):it(u,33,126)?(o=!1,a=u,n=t.TrailByte,null):u===Ft?Sn:(o=!1,It(r));case t.TrailByte:if(u===27)return n=t.EscapeStart,It(r);if(it(u,33,126)){n=t.LeadByte;var l=(a-33)*94+u-33,c=Km(l,io("jis0208"));return c===null?It(r):c}return u===Ft?(n=t.LeadByte,s.prepend(u),It(r)):(n=t.LeadByte,It(r));case t.EscapeStart:return u===36||u===40?(a=u,n=t.Escape,null):(s.prepend(u),o=!1,n=i,It(r));case t.Escape:var f=a;a=0;var d=null;if(f===40&&u===66&&(d=t.ASCII),f===40&&u===74&&(d=t.Roman),f===40&&u===73&&(d=t.Katakana),f===36&&(u===64||u===66)&&(d=t.LeadByte),d!==null){n=n=d;var p=o;return o=!0,p?It(r):null}return s.prepend([f,u]),o=!1,n=i,It(r)}}}function iMe(e){var r=e.fatal,t={ASCII:0,Roman:1,jis0208:2},n=t.ASCII;this.handler=function(i,a){if(a===Ft&&n!==t.ASCII)return i.prepend(a),n=t.ASCII,[27,40,66];if(a===Ft&&n===t.ASCII)return Sn;if((n===t.ASCII||n===t.Roman)&&(a===14||a===15||a===27))return hu(65533);if(n===t.ASCII&&ms(a))return a;if(n===t.Roman&&(ms(a)&&a!==92&&a!==126||a==165||a==8254)){if(ms(a))return a;if(a===165)return 92;if(a===8254)return 126}if(ms(a)&&n!==t.ASCII)return i.prepend(a),n=t.ASCII,[27,40,66];if((a===165||a===8254)&&n!==t.Roman)return i.prepend(a),n=t.Roman,[27,40,74];a===8722&&(a=65293);var o=Ym(a,io("jis0208"));if(o===null)return hu(a);if(n!==t.jis0208)return i.prepend(a),n=t.jis0208,[27,36,66];var s=Dc(o/94)+33,u=o%94+33;return[s,u]}}_o["ISO-2022-JP"]=function(e){return new iMe(e)};Eo["ISO-2022-JP"]=function(e){return new nMe(e)};function aMe(e){var r=e.fatal,t=0;this.handler=function(n,i){if(i===Ft&&t!==0)return t=0,It(r);if(i===Ft&&t===0)return Sn;if(t!==0){var a=t,o=null;t=0;var s=i<127?64:65,u=a<160?129:193;if((it(i,64,126)||it(i,128,252))&&(o=(a-u)*188+i-s),it(o,8836,10715))return 57344-8836+o;var l=o===null?null:Km(o,io("jis0208"));return l===null&&hs(i)&&n.prepend(i),l===null?It(r):l}return hs(i)||i===128?i:it(i,161,223)?65377-161+i:it(i,129,159)||it(i,224,252)?(t=i,null):It(r)}}function oMe(e){var r=e.fatal;this.handler=function(t,n){if(n===Ft)return Sn;if(ms(n)||n===128)return n;if(n===165)return 92;if(n===8254)return 126;if(it(n,65377,65439))return n-65377+161;n===8722&&(n=65293);var i=Kje(n);if(i===null)return hu(n);var a=Dc(i/188),o=a<31?129:193,s=i%188,u=s<63?64:65;return[a+o,s+u]}}_o.Shift_JIS=function(e){return new oMe(e)};Eo.Shift_JIS=function(e){return new aMe(e)};function sMe(e){var r=e.fatal,t=0;this.handler=function(n,i){if(i===Ft&&t!==0)return t=0,It(r);if(i===Ft&&t===0)return Sn;if(t!==0){var a=t,o=null;t=0,it(i,65,254)&&(o=(a-129)*190+(i-65));var s=o===null?null:Km(o,io("euc-kr"));return o===null&&hs(i)&&n.prepend(i),s===null?It(r):s}return hs(i)?i:it(i,129,254)?(t=i,null):It(r)}}function uMe(e){var r=e.fatal;this.handler=function(t,n){if(n===Ft)return Sn;if(ms(n))return n;var i=Ym(n,io("euc-kr"));if(i===null)return hu(n);var a=Dc(i/190)+129,o=i%190+65;return[a,o]}}_o["EUC-KR"]=function(e){return new uMe(e)};Eo["EUC-KR"]=function(e){return new sMe(e)};function sS(e,r){var t=e>>8,n=e&255;return r?[t,n]:[n,t]}function t$(e,r){var t=r.fatal,n=null,i=null;this.handler=function(a,o){if(o===Ft&&(n!==null||i!==null))return It(t);if(o===Ft&&n===null&&i===null)return Sn;if(n===null)return n=o,null;var s;if(e?s=(n<<8)+o:s=(o<<8)+n,n=null,i!==null){var u=i;return i=null,it(s,56320,57343)?65536+(u-55296)*1024+(s-56320):(a.prepend(sS(s,e)),It(t))}return it(s,55296,56319)?(i=s,null):it(s,56320,57343)?It(t):s}}function n$(e,r){var t=r.fatal;this.handler=function(n,i){if(i===Ft)return Sn;if(it(i,0,65535))return sS(i,e);var a=sS((i-65536>>10)+55296,e),o=sS((i-65536&1023)+56320,e);return a.concat(o)}}_o["UTF-16BE"]=function(e){return new n$(!0,e)};Eo["UTF-16BE"]=function(e){return new t$(!0,e)};_o["UTF-16LE"]=function(e){return new n$(!1,e)};Eo["UTF-16LE"]=function(e){return new t$(!1,e)};function lMe(e){var r=e.fatal;this.handler=function(t,n){return n===Ft?Sn:hs(n)?n:63360+n-128}}function cMe(e){var r=e.fatal;this.handler=function(t,n){return n===Ft?Sn:ms(n)?n:it(n,63360,63487)?n-63360+128:hu(n)}}_o["x-user-defined"]=function(e){return new cMe(e)};Eo["x-user-defined"]=function(e){return new lMe(e)};var fMe="rejected",dMe="fulfilled";function i$(e){let r=e.map(t=>t.then(n=>({status:dMe,value:n})).catch(n=>({status:fMe,reason:n})));return Promise.all(r)}function uS(e){return Buffer.from(e).toString("base64")}function R4(e){return Buffer.from(e,"base64").toString("ascii")}var cl=class{constructor(r){this.map={},r instanceof cl?r.forEach((t,n)=>this.append(n,t)):Array.isArray(r)?r.forEach(t=>this.append(t[0],t[1])):r&&Object.getOwnPropertyNames(r).forEach(t=>this.append(t,r[t]))}append(r,t){r=Bx(r),t=a$(t);let n=this.map[r];this.map[r]=n?`${n}, ${t}`:t}delete(r){delete this.map[Bx(r)]}get(r){return r=Bx(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(Bx(r))}set(r,t){this.map[Bx(r)]=a$(t)}forEach(r,t=null){for(let n in this.map)this.map.hasOwnProperty(n)&&(t?r.call(t,this.map[n],n,this):r(this.map[n],n,this))}keys(){let r=[];return this.forEach(function(t,n){r.push(n)}),F4(r)}values(){let r=[];return this.forEach(function(t){r.push(t)}),F4(r)}entries(){let r=[];return this.forEach(function(t,n){r.push([n,t])}),F4(r)}*[Symbol.iterator](){yield*this.entries()}};function Bx(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e)||e==="")throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a$(e){return typeof e!="string"&&(e=String(e)),e}function F4(e){let r={next(){let t=e.shift();return{done:t===void 0,value:t}}};return r[Symbol.iterator]=function(){return r},r}function I4(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var lS=$e(require("zlib"));var pMe=e=>e&&e instanceof ArrayBuffer,hMe=e=>e&&e instanceof Buffer;function o$(e){let r=e.indexOf(","),t,n;return e.slice(r-7,r)===";base64"?(t=Buffer.from(e.slice(r+1),"base64"),n=e.slice(5,r-7).trim()):(t=Buffer.from(decodeURIComponent(e.slice(r+1))),n=e.slice(5,r).trim()),n?n.startsWith(";")&&(n=`text/plain${n}`):n="text/plain;charset=US-ASCII",{arrayBuffer:P4(t),mimeType:n}}function P4(e){if(pMe(e))return e;if(hMe(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}function s$(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(lS.default.createBrotliDecompress());case"gzip":return e.pipe(lS.default.createGunzip());case"deflate":return e.pipe(lS.default.createDeflate());default:return e}}async function u$(e){let r=[];return await new Promise((t,n)=>{e.on("error",i=>n(i)),e.on("readable",()=>e.read()),e.on("data",i=>{typeof i=="string"&&n(new Error("Read stream not binary")),r.push(P4(i))}),e.on("end",()=>{let i=mMe(r);t(i)})})}function mMe(e){let r=e.map(a=>a instanceof ArrayBuffer?new Uint8Array(a):a),t=r.reduce((a,o)=>a+o.byteLength,0),n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n.buffer}var j4=$e(require("stream")),gMe=e=>typeof e=="boolean",l$=e=>typeof e=="function",vMe=e=>e!==null&&typeof e=="object",B4=e=>vMe(e)&&l$(e.read)&&l$(e.pipe)&&gMe(e.readable),nd=class{constructor(r,t){this.bodyUsed=!1;let{headers:n,status:i=200,statusText:a="OK",url:o}=t||{};this.url=o,this.ok=i===200,this.status=i,this.statusText=a,this.headers=new cl((t==null?void 0:t.headers)||{}),B4(r)?this._body=s$(r,n):typeof r=="string"?this._body=j4.Readable.from([new TextEncoder().encode(r)]):this._body=j4.Readable.from([r||new ArrayBuffer(0)])}get body(){return I4(!this.bodyUsed),I4(B4(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return B4(this._body)?await u$(this._body):this._body||new ArrayBuffer(0)}async text(){let r=await this.arrayBuffer();return new TextDecoder().decode(r)}async json(){let r=await this.text();return JSON.parse(r)}async blob(){if(typeof Blob=="undefined")throw new Error("Blob polyfill not installed");return new Blob([await this.arrayBuffer()])}};var c$=$e(require("http")),f$=$e(require("https"));var M4=e=>e.startsWith("data:"),bMe=e=>e.startsWith("http:")||e.startsWith("https:");async function jx(e,r){try{if(globalThis.fetch!==jx&&(bMe(e)||M4(e)))return await fetch(e,r);if(M4(e)){let{arrayBuffer:l,mimeType:c}=o$(e);return new nd(l,{headers:{"content-type":c},url:e})}let t={},n=e;e.endsWith(".gz")&&(e=e.slice(0,-3),t["content-encoding"]="gzip");let i=await yMe(n,r),a=wMe(e,i,t),{status:o,statusText:s}=EMe(i),u=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&a.has("location")&&u){let l=xMe(e,a.get("location"));return await jx(l,r)}return new nd(i,{headers:a,status:o,statusText:s,url:e})}catch(t){return new nd(null,{status:400,statusText:String(t),url:e})}}async function yMe(e,r){return await new Promise((t,n)=>{let i=_Me(e,r),a=e.startsWith("https:")?f$.default.request(i,o=>t(o)):c$.default.request(i,o=>t(o));a.on("error",o=>n(o)),a.end()})}function xMe(e,r){if(r.startsWith("http"))return r;let t=new URL(e);return t.pathname=r,t.href}function _Me(e,r){let t=(r==null?void 0:r.headers)||{},n={};for(let a of Object.keys(t))n[a.toLowerCase()]=t[a];n["accept-encoding"]=n["accept-encoding"]||"gzip,br,deflate";let i=new URL(e);return ze(oe(oe({hostname:i.hostname,path:i.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:n,port:i.port})}function EMe(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function wMe(e,r,t={}){let n={};if(r&&r.headers){let i=r.headers;for(let a in i){let o=i[a];n[a.toLowerCase()]=String(o)}}if(!n["content-length"]){let i=SMe(e);Number.isFinite(i)&&(n["content-length"]=i)}return Object.assign(n,t),new cl(n)}function SMe(e){return M4(e)?e.length-"data:".length:null}var aQ=$e(nQ()),oQ=$e(Hx());function iQ(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function Lqe(e,r){let t=r.type?r.type.replace("image/",""):"jpeg",n=(0,oQ.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,aQ.default)(n,t,r)}function MI(e,r){let t=Lqe(e,r);return new Promise(n=>{let i=[];t.on("data",a=>i.push(a)),t.on("end",()=>{let a=Buffer.concat(i);n(iQ(a))})})}var qse=$e(Lse()),Nse=["image/png","image/jpeg","image/gif"];async function U5(e,r){if(!r)throw new Error("MIMEType is required to parse image under Node.js");let t=e instanceof Buffer?e:Buffer.from(e);return await XXe(t,r)}function XXe(e,r){return new Promise(t=>(0,qse.default)(e,r,(n,i)=>{if(n)throw n;let a=[...i.shape],o=i.shape.length===4?i.shape.shift():1,s=i.data instanceof Buffer?new Uint8Array(i.data):i.data;t({shape:a,data:s,width:i.shape[0],height:i.shape[1],components:i.shape[2],layers:o?[o]:[]})}))}var zse=$e(Gse());delete global.ReadableStream;var G5=class extends zse.ReadableStream{};var z5=class{constructor(r){this.isWorking=!1;this.isCancelled=!1;this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:t}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let n;try{n=t.next()}catch(i){r.error(i);break}n&&(!n.done&&!this.isCancelled?r.enqueue(n.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var H5=class extends G5{constructor(r){super(new z5(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let t=this.getReader();yield*this._chunks,t.releaseLock()}};var Xh=class{constructor(r=[],t={}){this.parts=[],this.size=0;for(let n of r)if(typeof n=="string"){let i=new TextEncoder().encode(n);this.parts.push(i),this.size+=i.byteLength}else if(n instanceof Xh)this.size+=n.size,this.parts.push(...n.parts);else if(n instanceof ArrayBuffer)this.parts.push(new Uint8Array(n)),this.size+=n.byteLength;else if(n instanceof Uint8Array)this.parts.push(n),this.size+=n.byteLength;else if(ArrayBuffer.isView(n)){let{buffer:i,byteOffset:a,byteLength:o}=n;this.parts.push(new Uint8Array(i,a,o)),this.size+=o}else{let i=new TextEncoder().encode(String(n));this.parts.push(i),this.size+=i.byteLength}this.type=JXe(t.type)}slice(r=0,t=this.size,n=""){let{size:i,parts:a}=this,o=r<0?Math.max(i+r,0):Math.min(r,i),s=t<0?Math.max(i+t,0):Math.min(t,i),u=Math.max(s-o,0),l=new Xh([],{type:n});if(u===0)return l;let c=0,f=[];for(let d of a){let{byteLength:p}=d;if(o>0&&p<=o)o-=p,s-=p;else{let h=d.subarray(o,Math.min(p,s));if(f.push(h),c+=h.byteLength,o=0,c>=u)break}}return l.parts=f,l.size=c,l}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,t="";for(let n of this.parts)t+=r.decode(n);return t}stream(){return new H5(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),t=new Uint8Array(r),n=0;for(let i of this.parts)t.set(i,n),n+=i.byteLength;return r}};function JXe(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var W5=class extends Xh{constructor(r,t,n={}){super(r,n);this.name="";this.webkitRelativePath="";this.name=String(t).replace(/\//g,":"),this.lastModified=(n==null?void 0:n.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};var ZXe=!ll||!("TextEncoder"in Fi);ZXe&&(Fi.TextEncoder=Px);var eJe=!ll||!("TextDecoder"in Fi);eJe&&(Fi.TextDecoder=Rh);!ll&&!("atob"in Fi)&&uS&&(Fi.atob=uS);!ll&&!("btoa"in Fi)&&R4&&(Fi.btoa=R4);!ll&&!("Headers"in Fi)&&cl&&(Fi.Headers=cl);!ll&&!("Response"in Fi)&&nd&&(Fi.Response=nd);!ll&&!("fetch"in Fi)&&jx&&(Fi.fetch=jx);!ll&&!("_encodeImageNode"in Fi)&&MI&&(Fi._encodeImageNode=MI);!ll&&!("_parseImageNode"in Fi)&&U5&&(Fi._parseImageNode=U5,Fi._imageFormatsNode=Nse);"allSettled"in Promise||(Promise.allSettled=i$);var eje=$e(require("path")),rje=$e(c_e());function Qr(e,r){if(!e)throw new Error(r||"loader assertion failed.")}var Hl={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},f_e=Hl.self||Hl.window||Hl.global||{},d_e=Hl.window||Hl.self||Hl.global||{},p_e=Hl.global||Hl.self||Hl.window||{},h_e=Hl.document||{};var wi=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var m_e=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),M8r=m_e&&parseFloat(m_e[1])||0;var pp="4.0.0-alpha.20";function xa(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var Wl={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},_2t=Wl.self||Wl.window||Wl.global||{},E2t=Wl.window||Wl.self||Wl.global||{},g_e=Wl.global||Wl.self||Wl.window||{},w2t=Wl.document||{};var co=typeof process!="object"||String(process)!=="[object process]"||process.browser,$_=typeof importScripts=="function",v_e=typeof window!="undefined"&&typeof window.orientation!="undefined",b_e=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),S2t=b_e&&parseFloat(b_e[1])||0;var oD=class{constructor(r,t){this.isRunning=!0;this._resolve=()=>{};this._reject=()=>{};this.name=r,this.workerThread=t,this.result=new Promise((n,i)=>{this._resolve=n,this._reject=i})}postMessage(r,t){this.workerThread.postMessage({source:"loaders.gl",type:r,payload:t})}done(r){xa(this.isRunning),this.isRunning=!1,this._resolve(r)}error(r){xa(this.isRunning),this.isRunning=!1,this._reject(r)}};var db={};xo(db,{NodeWorker:()=>X_});var y_e=$e(require("worker_threads"));Ix(db,$e(require("worker_threads")));var X_=y_e.Worker;var p7=new Map;function x_e(e){xa(e.source&&!e.url||!e.source&&e.url);let r=p7.get(e.source||e.url);return r||(e.url&&(r=L8r(e.url),p7.set(e.url,r)),e.source&&(r=__e(e.source),p7.set(e.source,r))),xa(r),r}function L8r(e){if(!e.startsWith("http"))return e;let r=q8r(e);return __e(r)}function __e(e){let r=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(r)}function q8r(e){return`try {
|
|
173
|
+
>>> no match, partial?`,e,c,r,f),c===o))}var p;if(typeof u=="string"?(p=l===u,this.debug("string match",u,l,p)):(p=l.match(u),this.debug("pattern match",u,l,p)),!p)return!1}if(i===o&&a===s)return!0;if(i===o)return t;if(a===s)return i===o-1&&e[i]==="";throw new Error("wtf?")};function r$r(e){return e.replace(/\\(.)/g,"$1")}function t$r(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var jR=m((V4t,BR)=>{"use strict";function wOe(e){return e.charAt(0)==="/"}function SOe(e){var r=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,t=r.exec(e),n=t[1]||"",i=Boolean(n&&n.charAt(1)!==":");return Boolean(t[2]||i)}BR.exports=process.platform==="win32"?SOe:wOe;BR.exports.posix=wOe;BR.exports.win32=SOe});var dW=m(Jp=>{Jp.setopts=u$r;Jp.ownProp=AOe;Jp.makeAbs=GE;Jp.finish=l$r;Jp.mark=c$r;Jp.isIgnored=COe;Jp.childrenIgnored=f$r;function AOe(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var n$r=require("fs"),Gy=require("path"),i$r=PR(),TOe=jR(),fW=i$r.Minimatch;function a$r(e,r){return e.localeCompare(r,"en")}function o$r(e,r){e.ignore=r.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]),e.ignore.length&&(e.ignore=e.ignore.map(s$r))}function s$r(e){var r=null;if(e.slice(-3)==="/**"){var t=e.replace(/(\/\*\*)+$/,"");r=new fW(t,{dot:!0})}return{matcher:new fW(e,{dot:!0}),gmatcher:r}}function u$r(e,r,t){if(t||(t={}),t.matchBase&&r.indexOf("/")===-1){if(t.noglobstar)throw new Error("base matching requires globstar");r="**/"+r}e.silent=!!t.silent,e.pattern=r,e.strict=t.strict!==!1,e.realpath=!!t.realpath,e.realpathCache=t.realpathCache||Object.create(null),e.follow=!!t.follow,e.dot=!!t.dot,e.mark=!!t.mark,e.nodir=!!t.nodir,e.nodir&&(e.mark=!0),e.sync=!!t.sync,e.nounique=!!t.nounique,e.nonull=!!t.nonull,e.nosort=!!t.nosort,e.nocase=!!t.nocase,e.stat=!!t.stat,e.noprocess=!!t.noprocess,e.absolute=!!t.absolute,e.fs=t.fs||n$r,e.maxLength=t.maxLength||1/0,e.cache=t.cache||Object.create(null),e.statCache=t.statCache||Object.create(null),e.symlinks=t.symlinks||Object.create(null),o$r(e,t),e.changedCwd=!1;var n=process.cwd();AOe(t,"cwd")?(e.cwd=Gy.resolve(t.cwd),e.changedCwd=e.cwd!==n):e.cwd=n,e.root=t.root||Gy.resolve(e.cwd,"/"),e.root=Gy.resolve(e.root),process.platform==="win32"&&(e.root=e.root.replace(/\\/g,"/")),e.cwdAbs=TOe(e.cwd)?e.cwd:GE(e,e.cwd),process.platform==="win32"&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/")),e.nomount=!!t.nomount,t.nonegate=!0,t.nocomment=!0,t.allowWindowsEscape=!1,e.minimatch=new fW(r,t),e.options=e.minimatch.options}function l$r(e){for(var r=e.nounique,t=r?[]:Object.create(null),n=0,i=e.matches.length;n<i;n++){var a=e.matches[n];if(!a||Object.keys(a).length===0){if(e.nonull){var o=e.minimatch.globSet[n];r?t.push(o):t[o]=!0}}else{var s=Object.keys(a);r?t.push.apply(t,s):s.forEach(function(u){t[u]=!0})}}if(r||(t=Object.keys(t)),e.nosort||(t=t.sort(a$r)),e.mark){for(var n=0;n<t.length;n++)t[n]=e._mark(t[n]);e.nodir&&(t=t.filter(function(u){var l=!/\/$/.test(u),c=e.cache[u]||e.cache[GE(e,u)];return l&&c&&(l=c!=="DIR"&&!Array.isArray(c)),l}))}e.ignore.length&&(t=t.filter(function(u){return!COe(e,u)})),e.found=t}function c$r(e,r){var t=GE(e,r),n=e.cache[t],i=r;if(n){var a=n==="DIR"||Array.isArray(n),o=r.slice(-1)==="/";if(a&&!o?i+="/":!a&&o&&(i=i.slice(0,-1)),i!==r){var s=GE(e,i);e.statCache[s]=e.statCache[t],e.cache[s]=e.cache[t]}}return i}function GE(e,r){var t=r;return r.charAt(0)==="/"?t=Gy.join(e.root,r):TOe(r)||r===""?t=r:e.changedCwd?t=Gy.resolve(e.cwd,r):t=Gy.resolve(r),process.platform==="win32"&&(t=t.replace(/\\/g,"/")),t}function COe(e,r){return e.ignore.length?e.ignore.some(function(t){return t.matcher.match(r)||!!(t.gmatcher&&t.gmatcher.match(r))}):!1}function f$r(e,r){return e.ignore.length?e.ignore.some(function(t){return!!(t.gmatcher&&t.gmatcher.match(r))}):!1}});var FOe=m((J4t,ROe)=>{ROe.exports=OOe;OOe.GlobSync=na;var d$r=aW(),DOe=PR(),Y4t=DOe.Minimatch,$4t=mW().Glob,X4t=require("util"),pW=require("path"),kOe=require("assert"),MR=jR(),mm=dW(),p$r=mm.setopts,hW=mm.ownProp,h$r=mm.childrenIgnored,m$r=mm.isIgnored;function OOe(e,r){if(typeof r=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
|
|
174
|
+
See: https://github.com/isaacs/node-glob/issues/167`);return new na(e,r).found}function na(e,r){if(!e)throw new Error("must provide pattern");if(typeof r=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
|
|
175
|
+
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof na))return new na(e,r);if(p$r(this,e,r),this.noprocess)return this;var t=this.minimatch.set.length;this.matches=new Array(t);for(var n=0;n<t;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}na.prototype._finish=function(){if(kOe.ok(this instanceof na),this.realpath){var e=this;this.matches.forEach(function(r,t){var n=e.matches[t]=Object.create(null);for(var i in r)try{i=e._makeAbs(i);var a=d$r.realpathSync(i,e.realpathCache);n[a]=!0}catch(o){if(o.syscall==="stat")n[e._makeAbs(i)]=!0;else throw o}})}mm.finish(this)};na.prototype._process=function(e,r,t){kOe.ok(this instanceof na);for(var n=0;typeof e[n]=="string";)n++;var i;switch(n){case e.length:this._processSimple(e.join("/"),r);return;case 0:i=null;break;default:i=e.slice(0,n).join("/");break}var a=e.slice(n),o;i===null?o=".":((MR(i)||MR(e.map(function(l){return typeof l=="string"?l:"[*]"}).join("/")))&&(!i||!MR(i))&&(i="/"+i),o=i);var s=this._makeAbs(o);if(!h$r(this,o)){var u=a[0]===DOe.GLOBSTAR;u?this._processGlobStar(i,o,s,a,r,t):this._processReaddir(i,o,s,a,r,t)}};na.prototype._processReaddir=function(e,r,t,n,i,a){var o=this._readdir(t,a);if(!!o){for(var s=n[0],u=!!this.minimatch.negate,l=s._glob,c=this.dot||l.charAt(0)===".",f=[],d=0;d<o.length;d++){var p=o[d];if(p.charAt(0)!=="."||c){var h;u&&!e?h=!p.match(s):h=p.match(s),h&&f.push(p)}}var b=f.length;if(b!==0){if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var d=0;d<b;d++){var p=f[d];e&&(e.slice(-1)!=="/"?p=e+"/"+p:p=e+p),p.charAt(0)==="/"&&!this.nomount&&(p=pW.join(this.root,p)),this._emitMatch(i,p)}return}n.shift();for(var d=0;d<b;d++){var p=f[d],v;e?v=[e,p]:v=[p],this._process(v.concat(n),i,a)}}}};na.prototype._emitMatch=function(e,r){if(!m$r(this,r)){var t=this._makeAbs(r);if(this.mark&&(r=this._mark(r)),this.absolute&&(r=t),!this.matches[e][r]){if(this.nodir){var n=this.cache[t];if(n==="DIR"||Array.isArray(n))return}this.matches[e][r]=!0,this.stat&&this._stat(r)}}};na.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var r,t,n;try{t=this.fs.lstatSync(e)}catch(a){if(a.code==="ENOENT")return null}var i=t&&t.isSymbolicLink();return this.symlinks[e]=i,!i&&t&&!t.isDirectory()?this.cache[e]="FILE":r=this._readdir(e,!1),r};na.prototype._readdir=function(e,r){var t;if(r&&!hW(this.symlinks,e))return this._readdirInGlobStar(e);if(hW(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(i){return this._readdirError(e,i),null}};na.prototype._readdirEntries=function(e,r){if(!this.mark&&!this.stat)for(var t=0;t<r.length;t++){var n=r[t];e==="/"?n=e+n:n=e+"/"+n,this.cache[n]=!0}return this.cache[e]=r,r};na.prototype._readdirError=function(e,r){switch(r.code){case"ENOTSUP":case"ENOTDIR":var t=this._makeAbs(e);if(this.cache[t]="FILE",t===this.cwdAbs){var n=new Error(r.code+" invalid cwd "+this.cwd);throw n.path=this.cwd,n.code=r.code,n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw r;this.silent||console.error("glob error",r);break}};na.prototype._processGlobStar=function(e,r,t,n,i,a){var o=this._readdir(t,a);if(!!o){var s=n.slice(1),u=e?[e]:[],l=u.concat(s);this._process(l,i,!1);var c=o.length,f=this.symlinks[t];if(!(f&&a))for(var d=0;d<c;d++){var p=o[d];if(!(p.charAt(0)==="."&&!this.dot)){var h=u.concat(o[d],s);this._process(h,i,!0);var b=u.concat(o[d],n);this._process(b,i,!0)}}}};na.prototype._processSimple=function(e,r){var t=this._stat(e);if(this.matches[r]||(this.matches[r]=Object.create(null)),!!t){if(e&&MR(e)&&!this.nomount){var n=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=pW.join(this.root,e):(e=pW.resolve(this.root,e),n&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(r,e)}};na.prototype._stat=function(e){var r=this._makeAbs(e),t=e.slice(-1)==="/";if(e.length>this.maxLength)return!1;if(!this.stat&&hW(this.cache,r)){var o=this.cache[r];if(Array.isArray(o)&&(o="DIR"),!t||o==="DIR")return o;if(t&&o==="FILE")return!1}var n,i=this.statCache[r];if(!i){var a;try{a=this.fs.lstatSync(r)}catch(s){if(s&&(s.code==="ENOENT"||s.code==="ENOTDIR"))return this.statCache[r]=!1,!1}if(a&&a.isSymbolicLink())try{i=this.fs.statSync(r)}catch{i=a}else i=a}this.statCache[r]=i;var o=!0;return i&&(o=i.isDirectory()?"DIR":"FILE"),this.cache[r]=this.cache[r]||o,t&&o==="FILE"?!1:o};na.prototype._mark=function(e){return mm.mark(this,e)};na.prototype._makeAbs=function(e){return mm.makeAbs(this,e)}});var gW=m((Q4t,POe)=>{POe.exports=IOe;function IOe(e,r){if(e&&r)return IOe(e)(r);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){t[n]=e[n]}),t;function t(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var a=e.apply(this,n),o=n[n.length-1];return typeof a=="function"&&a!==o&&Object.keys(o).forEach(function(s){a[s]=o[s]}),a}}});var qR=m((Z4t,vW)=>{var BOe=gW();vW.exports=BOe(LR);vW.exports.strict=BOe(jOe);LR.proto=LR(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return LR(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return jOe(this)},configurable:!0})});function LR(e){var r=function(){return r.called?r.value:(r.called=!0,r.value=e.apply(this,arguments))};return r.called=!1,r}function jOe(e){var r=function(){if(r.called)throw new Error(r.onceError);return r.called=!0,r.value=e.apply(this,arguments)},t=e.name||"Function wrapped with `once`";return r.onceError=t+" shouldn't be called more than once",r.called=!1,r}});var LOe=m((eIt,MOe)=>{var g$r=gW(),zE=Object.create(null),v$r=qR();MOe.exports=g$r(b$r);function b$r(e,r){return zE[e]?(zE[e].push(r),null):(zE[e]=[r],y$r(e))}function y$r(e){return v$r(function r(){var t=zE[e],n=t.length,i=x$r(arguments);try{for(var a=0;a<n;a++)t[a].apply(null,i)}finally{t.length>n?(t.splice(0,n),process.nextTick(function(){r.apply(null,i)})):delete zE[e]}})}function x$r(e){for(var r=e.length,t=[],n=0;n<r;n++)t[n]=e[n];return t}});var mW=m((nIt,NOe)=>{NOe.exports=vm;var _$r=aW(),qOe=PR(),rIt=qOe.Minimatch,E$r=at(),w$r=require("events").EventEmitter,bW=require("path"),yW=require("assert"),HE=jR(),xW=FOe(),gm=dW(),S$r=gm.setopts,_W=gm.ownProp,EW=LOe(),tIt=require("util"),A$r=gm.childrenIgnored,T$r=gm.isIgnored,C$r=qR();function vm(e,r,t){if(typeof r=="function"&&(t=r,r={}),r||(r={}),r.sync){if(t)throw new TypeError("callback provided to sync glob");return xW(e,r)}return new cn(e,r,t)}vm.sync=xW;var D$r=vm.GlobSync=xW.GlobSync;vm.glob=vm;function k$r(e,r){if(r===null||typeof r!="object")return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e}vm.hasMagic=function(e,r){var t=k$r({},r);t.noprocess=!0;var n=new cn(e,t),i=n.minimatch.set;if(!e)return!1;if(i.length>1)return!0;for(var a=0;a<i[0].length;a++)if(typeof i[0][a]!="string")return!0;return!1};vm.Glob=cn;E$r(cn,w$r);function cn(e,r,t){if(typeof r=="function"&&(t=r,r=null),r&&r.sync){if(t)throw new TypeError("callback provided to sync glob");return new D$r(e,r)}if(!(this instanceof cn))return new cn(e,r,t);S$r(this,e,r),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),typeof t=="function"&&(t=C$r(t),this.on("error",t),this.on("end",function(u){t(null,u)}));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(n===0)return s();for(var a=!0,o=0;o<n;o++)this._process(this.minimatch.set[o],o,!1,s);a=!1;function s(){--i._processing,i._processing<=0&&(a?process.nextTick(function(){i._finish()}):i._finish())}}cn.prototype._finish=function(){if(yW(this instanceof cn),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();gm.finish(this),this.emit("end",this.found)}};cn.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var e=this.matches.length;if(e===0)return this._finish();for(var r=this,t=0;t<this.matches.length;t++)this._realpathSet(t,n);function n(){--e==0&&r._finish()}};cn.prototype._realpathSet=function(e,r){var t=this.matches[e];if(!t)return r();var n=Object.keys(t),i=this,a=n.length;if(a===0)return r();var o=this.matches[e]=Object.create(null);n.forEach(function(s,u){s=i._makeAbs(s),_$r.realpath(s,i.realpathCache,function(l,c){l?l.syscall==="stat"?o[s]=!0:i.emit("error",l):o[c]=!0,--a==0&&(i.matches[e]=o,r())})})};cn.prototype._mark=function(e){return gm.mark(this,e)};cn.prototype._makeAbs=function(e){return gm.makeAbs(this,e)};cn.prototype.abort=function(){this.aborted=!0,this.emit("abort")};cn.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};cn.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var r=0;r<e.length;r++){var t=e[r];this._emitMatch(t[0],t[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var r=0;r<n.length;r++){var i=n[r];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}};cn.prototype._process=function(e,r,t,n){if(yW(this instanceof cn),yW(typeof n=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([e,r,t,n]);return}for(var i=0;typeof e[i]=="string";)i++;var a;switch(i){case e.length:this._processSimple(e.join("/"),r,n);return;case 0:a=null;break;default:a=e.slice(0,i).join("/");break}var o=e.slice(i),s;a===null?s=".":((HE(a)||HE(e.map(function(c){return typeof c=="string"?c:"[*]"}).join("/")))&&(!a||!HE(a))&&(a="/"+a),s=a);var u=this._makeAbs(s);if(A$r(this,s))return n();var l=o[0]===qOe.GLOBSTAR;l?this._processGlobStar(a,s,u,o,r,t,n):this._processReaddir(a,s,u,o,r,t,n)}};cn.prototype._processReaddir=function(e,r,t,n,i,a,o){var s=this;this._readdir(t,a,function(u,l){return s._processReaddir2(e,r,t,n,i,a,l,o)})};cn.prototype._processReaddir2=function(e,r,t,n,i,a,o,s){if(!o)return s();for(var u=n[0],l=!!this.minimatch.negate,c=u._glob,f=this.dot||c.charAt(0)===".",d=[],p=0;p<o.length;p++){var h=o[p];if(h.charAt(0)!=="."||f){var b;l&&!e?b=!h.match(u):b=h.match(u),b&&d.push(h)}}var v=d.length;if(v===0)return s();if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var p=0;p<v;p++){var h=d[p];e&&(e!=="/"?h=e+"/"+h:h=e+h),h.charAt(0)==="/"&&!this.nomount&&(h=bW.join(this.root,h)),this._emitMatch(i,h)}return s()}n.shift();for(var p=0;p<v;p++){var h=d[p],y;e&&(e!=="/"?h=e+"/"+h:h=e+h),this._process([h].concat(n),i,a,s)}s()};cn.prototype._emitMatch=function(e,r){if(!this.aborted&&!T$r(this,r)){if(this.paused){this._emitQueue.push([e,r]);return}var t=HE(r)?r:this._makeAbs(r);if(this.mark&&(r=this._mark(r)),this.absolute&&(r=t),!this.matches[e][r]){if(this.nodir){var n=this.cache[t];if(n==="DIR"||Array.isArray(n))return}this.matches[e][r]=!0;var i=this.statCache[t];i&&this.emit("stat",r,i),this.emit("match",r)}}};cn.prototype._readdirInGlobStar=function(e,r){if(this.aborted)return;if(this.follow)return this._readdir(e,!1,r);var t="lstat\0"+e,n=this,i=EW(t,a);i&&n.fs.lstat(e,i);function a(o,s){if(o&&o.code==="ENOENT")return r();var u=s&&s.isSymbolicLink();n.symlinks[e]=u,!u&&s&&!s.isDirectory()?(n.cache[e]="FILE",r()):n._readdir(e,!1,r)}};cn.prototype._readdir=function(e,r,t){if(!this.aborted&&(t=EW("readdir\0"+e+"\0"+r,t),!!t)){if(r&&!_W(this.symlinks,e))return this._readdirInGlobStar(e,t);if(_W(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return t();if(Array.isArray(n))return t(null,n)}var i=this;i.fs.readdir(e,O$r(this,e,t))}};function O$r(e,r,t){return function(n,i){n?e._readdirError(r,n,t):e._readdirEntries(r,i,t)}}cn.prototype._readdirEntries=function(e,r,t){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<r.length;n++){var i=r[n];e==="/"?i=e+i:i=e+"/"+i,this.cache[i]=!0}return this.cache[e]=r,t(null,r)}};cn.prototype._readdirError=function(e,r,t){if(!this.aborted){switch(r.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(r.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=r.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",r),this.abort()),this.silent||console.error("glob error",r);break}return t()}};cn.prototype._processGlobStar=function(e,r,t,n,i,a,o){var s=this;this._readdir(t,a,function(u,l){s._processGlobStar2(e,r,t,n,i,a,l,o)})};cn.prototype._processGlobStar2=function(e,r,t,n,i,a,o,s){if(!o)return s();var u=n.slice(1),l=e?[e]:[],c=l.concat(u);this._process(c,i,!1,s);var f=this.symlinks[t],d=o.length;if(f&&a)return s();for(var p=0;p<d;p++){var h=o[p];if(!(h.charAt(0)==="."&&!this.dot)){var b=l.concat(o[p],u);this._process(b,i,!0,s);var v=l.concat(o[p],n);this._process(v,i,!0,s)}}s()};cn.prototype._processSimple=function(e,r,t){var n=this;this._stat(e,function(i,a){n._processSimple2(e,r,i,a,t)})};cn.prototype._processSimple2=function(e,r,t,n,i){if(this.matches[r]||(this.matches[r]=Object.create(null)),!n)return i();if(e&&HE(e)&&!this.nomount){var a=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=bW.join(this.root,e):(e=bW.resolve(this.root,e),a&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(r,e),i()};cn.prototype._stat=function(e,r){var t=this._makeAbs(e),n=e.slice(-1)==="/";if(e.length>this.maxLength)return r();if(!this.stat&&_W(this.cache,t)){var i=this.cache[t];if(Array.isArray(i)&&(i="DIR"),!n||i==="DIR")return r(null,i);if(n&&i==="FILE")return r()}var a,o=this.statCache[t];if(o!==void 0){if(o===!1)return r(null,o);var s=o.isDirectory()?"DIR":"FILE";return n&&s==="FILE"?r():r(null,s,o)}var u=this,l=EW("stat\0"+t,c);l&&u.fs.lstat(t,l);function c(f,d){if(d&&d.isSymbolicLink())return u.fs.stat(t,function(p,h){p?u._stat2(e,t,null,d,r):u._stat2(e,t,p,h,r)});u._stat2(e,t,f,d,r)}};cn.prototype._stat2=function(e,r,t,n,i){if(t&&(t.code==="ENOENT"||t.code==="ENOTDIR"))return this.statCache[r]=!1,i();var a=e.slice(-1)==="/";if(this.statCache[r]=n,r.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,!1,n);var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[r]=this.cache[r]||o,a&&o==="FILE"?i():i(null,o,n)}});var HOe=m((iIt,zOe)=>{var UOe=qH(),zy=require("path"),wW=Cke(),R$r=qke(),F$r=Qke(),I$r=tOe(),P$r=mW(),bm=zOe.exports={},GOe=/[\/\\]/g,B$r=function(e,r){var t=[];return wW(e).forEach(function(n){var i=n.indexOf("!")===0;i&&(n=n.slice(1));var a=r(n);i?t=R$r(t,a):t=F$r(t,a)}),t};bm.exists=function(){var e=zy.join.apply(zy,arguments);return UOe.existsSync(e)};bm.expand=function(...e){var r=I$r(e[0])?e.shift():{},t=Array.isArray(e[0])?e[0]:e;if(t.length===0)return[];var n=B$r(t,function(i){return P$r.sync(i,r)});return r.filter&&(n=n.filter(function(i){i=zy.join(r.cwd||"",i);try{return typeof r.filter=="function"?r.filter(i):UOe.statSync(i)[r.filter]()}catch{return!1}})),n};bm.expandMapping=function(e,r,t){t=Object.assign({rename:function(a,o){return zy.join(a||"",o)}},t);var n=[],i={};return bm.expand(t,e).forEach(function(a){var o=a;t.flatten&&(o=zy.basename(o)),t.ext&&(o=o.replace(/(\.[^\/]*)?$/,t.ext));var s=t.rename(r,o,t);t.cwd&&(a=zy.join(t.cwd,a)),s=s.replace(GOe,"/"),a=a.replace(GOe,"/"),i[s]?i[s].src.push(a):(n.push({src:[a],dest:s}),i[s]=n[n.length-1])}),n};bm.normalizeFilesArray=function(e){var r=[];return e.forEach(function(t){var n;("src"in t||"dest"in t)&&r.push(t)}),r.length===0?[]:(r=_(r).chain().forEach(function(t){!("src"in t)||!t.src||(Array.isArray(t.src)?t.src=wW(t.src):t.src=[t.src])}).map(function(t){var n=Object.assign({},t);if(delete n.src,delete n.dest,t.expand)return bm.expandMapping(t.src,t.dest,n).map(function(a){var o=Object.assign({},t);return o.orig=Object.assign({},t),o.src=a.src,o.dest=a.dest,["expand","cwd","flatten","rename","ext"].forEach(function(s){delete o[s]}),o});var i=Object.assign({},t);return i.orig=Object.assign({},t),"src"in i&&Object.defineProperty(i,"src",{enumerable:!0,get:function a(){var o;return"result"in a||(o=t.src,o=Array.isArray(o)?wW(o):[o],a.result=bm.expand(n,o)),a.result}}),"dest"in i&&(i.dest=t.dest),i}).flatten().value(),r)}});var Hy=m((oIt,KOe)=>{var SW=qH(),WOe=require("path"),aIt=require("util"),j$r=dke(),VOe=NH(),M$r=_ke(),L$r=require("stream").Stream,q$r=nE().PassThrough,ls=KOe.exports={};ls.file=HOe();ls.collectStream=function(e,r){var t=[],n=0;e.on("error",r),e.on("data",function(i){t.push(i),n+=i.length}),e.on("end",function(){var i=new Buffer(n),a=0;t.forEach(function(o){o.copy(i,a),a+=o.length}),r(null,i)})};ls.dateify=function(e){return e=e||new Date,e instanceof Date?e=e:typeof e=="string"?e=new Date(e):e=new Date,e};ls.defaults=function(e,r,t){var n=arguments;return n[0]=n[0]||{},M$r(...n)};ls.isStream=function(e){return e instanceof L$r};ls.lazyReadStream=function(e){return new j$r.Readable(function(){return SW.createReadStream(e)})};ls.normalizeInputSource=function(e){if(e===null)return new Buffer(0);if(typeof e=="string")return new Buffer(e);if(ls.isStream(e)&&!e._readableState){var r=new q$r;return e.pipe(r),r}return e};ls.sanitizePath=function(e){return VOe(e,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};ls.trailingSlashIt=function(e){return e.slice(-1)!=="/"?e+"/":e};ls.unixifyPath=function(e){return VOe(e,!1).replace(/^\w+:/,"")};ls.walkdir=function(e,r,t){var n=[];typeof r=="function"&&(t=r,r=e),SW.readdir(e,function(i,a){var o=0,s,u;if(i)return t(i);(function l(){if(s=a[o++],!s)return t(null,n);u=WOe.join(e,s),SW.stat(u,function(c,f){n.push({path:u,relative:WOe.relative(r,u).replace(/\\/g,"/"),stats:f}),f&&f.isDirectory()?ls.walkdir(u,r,function(d,p){p.forEach(function(h){n.push(h)}),l()}):l()})})()})}});var JOe=m(($Oe,XOe)=>{var N$r=require("util"),U$r={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function YOe(e,r){Error.captureStackTrace(this,this.constructor),this.message=U$r[e]||e,this.code=e,this.data=r}N$r.inherits(YOe,Error);$Oe=XOe.exports=YOe});var AW=m((sIt,QOe)=>{QOe.exports=require("stream")});var iRe=m((uIt,nRe)=>{"use strict";function ZOe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function eRe(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ZOe(Object(t),!0).forEach(function(n){G$r(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ZOe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function G$r(e,r,t){return r=tRe(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function z$r(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function rRe(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tRe(n.key),n)}}function H$r(e,r,t){return r&&rRe(e.prototype,r),t&&rRe(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tRe(e){var r=W$r(e,"string");return typeof r=="symbol"?r:String(r)}function W$r(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var V$r=require("buffer"),NR=V$r.Buffer,K$r=require("util"),TW=K$r.inspect,Y$r=TW&&TW.custom||"inspect";function $$r(e,r,t){NR.prototype.copy.call(e,r,t)}nRe.exports=function(){function e(){z$r(this,e),this.head=null,this.tail=null,this.length=0}return H$r(e,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(this.length===0)return NR.alloc(0);for(var n=NR.allocUnsafe(t>>>0),i=this.head,a=0;i;)$$r(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):t===this.head.data.length?i=this.shift():i=n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,a=n.data;for(t-=a.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?a+=o:a+=o.slice(0,t),t-=s,t===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(t){var n=NR.allocUnsafe(t),i=this.head,a=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,t===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:Y$r,value:function(t,n){return TW(this,eRe(eRe({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var DW=m((lIt,oRe)=>{"use strict";function X$r(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(CW,this,e)):process.nextTick(CW,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!r&&a?t._writableState?t._writableState.errorEmitted?process.nextTick(UR,t):(t._writableState.errorEmitted=!0,process.nextTick(aRe,t,a)):process.nextTick(aRe,t,a):r?(process.nextTick(UR,t),r(a)):process.nextTick(UR,t)}),this)}function aRe(e,r){CW(e,r),UR(e)}function UR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function J$r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function CW(e,r){e.emit("error",r)}function Q$r(e,r){var t=e._readableState,n=e._writableState;t&&t.autoDestroy||n&&n.autoDestroy?e.destroy(r):e.emit("error",r)}oRe.exports={destroy:X$r,undestroy:J$r,errorOrDestroy:Q$r}});var Qp=m((cIt,lRe)=>{"use strict";var sRe={};function ru(e,r,t){t||(t=Error);function n(a,o,s){return typeof r=="string"?r:r(a,o,s)}class i extends t{constructor(o,s,u){super(n(o,s,u))}}i.prototype.name=t.name,i.prototype.code=e,sRe[e]=i}function uRe(e,r){if(Array.isArray(e)){let t=e.length;return e=e.map(n=>String(n)),t>2?`one of ${r} ${e.slice(0,t-1).join(", ")}, or `+e[t-1]:t===2?`one of ${r} ${e[0]} or ${e[1]}`:`of ${r} ${e[0]}`}else return`of ${r} ${String(e)}`}function Z$r(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function eXr(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function rXr(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}ru("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);ru("ERR_INVALID_ARG_TYPE",function(e,r,t){let n;typeof r=="string"&&Z$r(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";let i;if(eXr(e," argument"))i=`The ${e} ${n} ${uRe(r,"type")}`;else{let a=rXr(e,".")?"property":"argument";i=`The "${e}" ${a} ${n} ${uRe(r,"type")}`}return i+=`. Received type ${typeof t}`,i},TypeError);ru("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ru("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});ru("ERR_STREAM_PREMATURE_CLOSE","Premature close");ru("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});ru("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ru("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ru("ERR_STREAM_WRITE_AFTER_END","write after end");ru("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ru("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);ru("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");lRe.exports.codes=sRe});var kW=m((fIt,cRe)=>{"use strict";var tXr=Qp().codes.ERR_INVALID_OPT_VALUE;function nXr(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function iXr(e,r,t,n){var i=nXr(r,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?t:"highWaterMark";throw new tXr(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}cRe.exports={getHighWaterMark:iXr}});var FW=m((dIt,gRe)=>{"use strict";gRe.exports=fi;function fRe(e){var r=this;this.next=null,this.entry=null,this.finish=function(){RXr(r,e)}}var Wy;fi.WritableState=WE;var aXr={deprecate:d0()},dRe=AW(),GR=require("buffer").Buffer,oXr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function sXr(e){return GR.from(e)}function uXr(e){return GR.isBuffer(e)||e instanceof oXr}var OW=DW(),lXr=kW(),cXr=lXr.getHighWaterMark,Zp=Qp().codes,fXr=Zp.ERR_INVALID_ARG_TYPE,dXr=Zp.ERR_METHOD_NOT_IMPLEMENTED,pXr=Zp.ERR_MULTIPLE_CALLBACK,hXr=Zp.ERR_STREAM_CANNOT_PIPE,mXr=Zp.ERR_STREAM_DESTROYED,gXr=Zp.ERR_STREAM_NULL_VALUES,vXr=Zp.ERR_STREAM_WRITE_AFTER_END,bXr=Zp.ERR_UNKNOWN_ENCODING,Vy=OW.errorOrDestroy;at()(fi,dRe);function yXr(){}function WE(e,r,t){Wy=Wy||ym(),e=e||{},typeof t!="boolean"&&(t=r instanceof Wy),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=cXr(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){TXr(r,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new fRe(this)}WE.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(WE.prototype,"buffer",{get:aXr.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var zR;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(zR=Function.prototype[Symbol.hasInstance],Object.defineProperty(fi,Symbol.hasInstance,{value:function(r){return zR.call(this,r)?!0:this!==fi?!1:r&&r._writableState instanceof WE}})):zR=function(r){return r instanceof this};function fi(e){Wy=Wy||ym();var r=this instanceof Wy;if(!r&&!zR.call(fi,this))return new fi(e);this._writableState=new WE(e,this,r),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)),dRe.call(this)}fi.prototype.pipe=function(){Vy(this,new hXr)};function xXr(e,r){var t=new vXr;Vy(e,t),process.nextTick(r,t)}function _Xr(e,r,t,n){var i;return t===null?i=new gXr:typeof t!="string"&&!r.objectMode&&(i=new fXr("chunk",["string","Buffer"],t)),i?(Vy(e,i),process.nextTick(n,i),!1):!0}fi.prototype.write=function(e,r,t){var n=this._writableState,i=!1,a=!n.objectMode&&uXr(e);return a&&!GR.isBuffer(e)&&(e=sXr(e)),typeof r=="function"&&(t=r,r=null),a?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=yXr),n.ending?xXr(this,t):(a||_Xr(this,n,e,t))&&(n.pendingcb++,i=wXr(this,n,a,e,r,t)),i};fi.prototype.cork=function(){this._writableState.corked++};fi.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&hRe(this,e))};fi.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new bXr(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(fi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function EXr(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=GR.from(r,t)),r}Object.defineProperty(fi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function wXr(e,r,t,n,i,a){if(!t){var o=EXr(r,n,i);n!==o&&(t=!0,i="buffer",n=o)}var s=r.objectMode?1:n.length;r.length+=s;var u=r.length<r.highWaterMark;if(u||(r.needDrain=!0),r.writing||r.corked){var l=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:a,next:null},l?l.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else RW(e,r,!1,s,n,i,a);return u}function RW(e,r,t,n,i,a,o){r.writelen=n,r.writecb=o,r.writing=!0,r.sync=!0,r.destroyed?r.onwrite(new mXr("write")):t?e._writev(i,r.onwrite):e._write(i,a,r.onwrite),r.sync=!1}function SXr(e,r,t,n,i){--r.pendingcb,t?(process.nextTick(i,n),process.nextTick(VE,e,r),e._writableState.errorEmitted=!0,Vy(e,n)):(i(n),e._writableState.errorEmitted=!0,Vy(e,n),VE(e,r))}function AXr(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function TXr(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(typeof i!="function")throw new pXr;if(AXr(t),r)SXr(e,t,n,r,i);else{var a=mRe(t)||e.destroyed;!a&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&hRe(e,t),n?process.nextTick(pRe,e,t,a,i):pRe(e,t,a,i)}}function pRe(e,r,t,n){t||CXr(e,r),r.pendingcb--,n(),VE(e,r)}function CXr(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function hRe(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),a=r.corkedRequestsFree;a.entry=t;for(var o=0,s=!0;t;)i[o]=t,t.isBuf||(s=!1),t=t.next,o+=1;i.allBuffers=s,RW(e,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new fRe(r),r.bufferedRequestCount=0}else{for(;t;){var u=t.chunk,l=t.encoding,c=t.callback,f=r.objectMode?1:u.length;if(RW(e,r,!1,f,u,l,c),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}fi.prototype._write=function(e,r,t){t(new dXr("_write()"))};fi.prototype._writev=null;fi.prototype.end=function(e,r,t){var n=this._writableState;return typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||OXr(this,n,t),this};Object.defineProperty(fi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function mRe(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function DXr(e,r){e._final(function(t){r.pendingcb--,t&&Vy(e,t),r.prefinished=!0,e.emit("prefinish"),VE(e,r)})}function kXr(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"&&!r.destroyed?(r.pendingcb++,r.finalCalled=!0,process.nextTick(DXr,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function VE(e,r){var t=mRe(r);if(t&&(kXr(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"),r.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return t}function OXr(e,r,t){r.ending=!0,VE(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function RXr(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(fi.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(r){!this._writableState||(this._writableState.destroyed=r)}});fi.prototype.destroy=OW.destroy;fi.prototype._undestroy=OW.undestroy;fi.prototype._destroy=function(e,r){r(e)}});var ym=m((pIt,bRe)=>{"use strict";var FXr=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};bRe.exports=hc;var vRe=BW(),IW=FW();at()(hc,vRe);for(PW=FXr(IW.prototype),HR=0;HR<PW.length;HR++)WR=PW[HR],hc.prototype[WR]||(hc.prototype[WR]=IW.prototype[WR]);var PW,WR,HR;function hc(e){if(!(this instanceof hc))return new hc(e);vRe.call(this,e),IW.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",IXr)))}Object.defineProperty(hc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(hc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(hc.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function IXr(){this._writableState.ended||process.nextTick(PXr,this)}function PXr(e){e.end()}Object.defineProperty(hc.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(r){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=r,this._writableState.destroyed=r)}})});var LW=m(xRe=>{"use strict";var jW=vu().Buffer,yRe=jW.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 BXr(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function jXr(e){var r=BXr(e);if(typeof r!="string"&&(jW.isEncoding===yRe||!yRe(e)))throw new Error("Unknown encoding: "+e);return r||e}xRe.StringDecoder=KE;function KE(e){this.encoding=jXr(e);var r;switch(this.encoding){case"utf16le":this.text=GXr,this.end=zXr,r=4;break;case"utf8":this.fillLast=qXr,r=4;break;case"base64":this.text=HXr,this.end=WXr,r=3;break;default:this.write=VXr,this.end=KXr;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=jW.allocUnsafe(r)}KE.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""};KE.prototype.end=UXr;KE.prototype.text=NXr;KE.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 MW(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function MXr(e,r,t){var n=r.length-1;if(n<t)return 0;var i=MW(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=MW(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=MW(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function LXr(e,r,t){if((r[0]&192)!=128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!=128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!=128)return e.lastNeed=2,"\uFFFD"}}function qXr(e){var r=this.lastTotal-this.lastNeed,t=LXr(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function NXr(e,r){var t=MXr(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",r,n)}function UXr(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function GXr(e,r){if((e.length-r)%2==0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.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],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function zXr(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function HXr(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function WXr(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function VXr(e){return e.toString(this.encoding)}function KXr(e){return e&&e.length?this.write(e):""}});var VR=m((mIt,wRe)=>{"use strict";var _Re=Qp().codes.ERR_STREAM_PREMATURE_CLOSE;function YXr(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e.apply(this,n)}}}function $Xr(){}function XXr(e){return e.setHeader&&typeof e.abort=="function"}function ERe(e,r,t){if(typeof r=="function")return ERe(e,null,r);r||(r={}),t=YXr(t||$Xr);var n=r.readable||r.readable!==!1&&e.readable,i=r.writable||r.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){i=!1,o=!0,n||t.call(e)},u=e._readableState&&e._readableState.endEmitted,l=function(){n=!1,u=!0,i||t.call(e)},c=function(h){t.call(e,h)},f=function(){var h;if(n&&!u)return(!e._readableState||!e._readableState.ended)&&(h=new _Re),t.call(e,h);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(h=new _Re),t.call(e,h)},d=function(){e.req.on("finish",s)};return XXr(e)?(e.on("complete",s),e.on("abort",f),e.req?d():e.on("request",d)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",s),r.error!==!1&&e.on("error",c),e.on("close",f),function(){e.removeListener("complete",s),e.removeListener("abort",f),e.removeListener("request",d),e.req&&e.req.removeListener("finish",s),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",s),e.removeListener("end",l),e.removeListener("error",c),e.removeListener("close",f)}}wRe.exports=ERe});var ARe=m((gIt,SRe)=>{"use strict";var KR;function eh(e,r,t){return r=JXr(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function JXr(e){var r=QXr(e,"string");return typeof r=="symbol"?r:String(r)}function QXr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var ZXr=VR(),rh=Symbol("lastResolve"),xm=Symbol("lastReject"),YE=Symbol("error"),YR=Symbol("ended"),_m=Symbol("lastPromise"),qW=Symbol("handlePromise"),Em=Symbol("stream");function th(e,r){return{value:e,done:r}}function eJr(e){var r=e[rh];if(r!==null){var t=e[Em].read();t!==null&&(e[_m]=null,e[rh]=null,e[xm]=null,r(th(t,!1)))}}function rJr(e){process.nextTick(eJr,e)}function tJr(e,r){return function(t,n){e.then(function(){if(r[YR]){t(th(void 0,!0));return}r[qW](t,n)},n)}}var nJr=Object.getPrototypeOf(function(){}),iJr=Object.setPrototypeOf((KR={get stream(){return this[Em]},next:function(){var r=this,t=this[YE];if(t!==null)return Promise.reject(t);if(this[YR])return Promise.resolve(th(void 0,!0));if(this[Em].destroyed)return new Promise(function(o,s){process.nextTick(function(){r[YE]?s(r[YE]):o(th(void 0,!0))})});var n=this[_m],i;if(n)i=new Promise(tJr(n,this));else{var a=this[Em].read();if(a!==null)return Promise.resolve(th(a,!1));i=new Promise(this[qW])}return this[_m]=i,i}},eh(KR,Symbol.asyncIterator,function(){return this}),eh(KR,"return",function(){var r=this;return new Promise(function(t,n){r[Em].destroy(null,function(i){if(i){n(i);return}t(th(void 0,!0))})})}),KR),nJr),aJr=function(r){var t,n=Object.create(iJr,(t={},eh(t,Em,{value:r,writable:!0}),eh(t,rh,{value:null,writable:!0}),eh(t,xm,{value:null,writable:!0}),eh(t,YE,{value:null,writable:!0}),eh(t,YR,{value:r._readableState.endEmitted,writable:!0}),eh(t,qW,{value:function(a,o){var s=n[Em].read();s?(n[_m]=null,n[rh]=null,n[xm]=null,a(th(s,!1))):(n[rh]=a,n[xm]=o)},writable:!0}),t));return n[_m]=null,ZXr(r,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[xm];a!==null&&(n[_m]=null,n[rh]=null,n[xm]=null,a(i)),n[YE]=i;return}var o=n[rh];o!==null&&(n[_m]=null,n[rh]=null,n[xm]=null,o(th(void 0,!0))),n[YR]=!0}),r.on("readable",rJr.bind(null,n)),n};SRe.exports=aJr});var kRe=m((vIt,DRe)=>{"use strict";function TRe(e,r,t,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){t(l);return}s.done?r(u):Promise.resolve(u).then(n,i)}function oJr(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var a=e.apply(r,t);function o(u){TRe(a,n,i,o,s,"next",u)}function s(u){TRe(a,n,i,o,s,"throw",u)}o(void 0)})}}function CRe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function sJr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?CRe(Object(t),!0).forEach(function(n){uJr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):CRe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function uJr(e,r,t){return r=lJr(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function lJr(e){var r=cJr(e,"string");return typeof r=="symbol"?r:String(r)}function cJr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var fJr=Qp().codes.ERR_INVALID_ARG_TYPE;function dJr(e,r,t){var n;if(r&&typeof r.next=="function")n=r;else if(r&&r[Symbol.asyncIterator])n=r[Symbol.asyncIterator]();else if(r&&r[Symbol.iterator])n=r[Symbol.iterator]();else throw new fJr("iterable",["Iterable"],r);var i=new e(sJr({objectMode:!0},t)),a=!1;i._read=function(){a||(a=!0,o())};function o(){return s.apply(this,arguments)}function s(){return s=oJr(function*(){try{var u=yield n.next(),l=u.value,c=u.done;c?i.push(null):i.push(yield l)?o():a=!1}catch(f){i.destroy(f)}}),s.apply(this,arguments)}return i}DRe.exports=dJr});var BW=m((yIt,qRe)=>{"use strict";qRe.exports=zt;var Ky;zt.ReadableState=RRe;var bIt=require("events").EventEmitter,ORe=function(r,t){return r.listeners(t).length},$E=AW(),$R=require("buffer").Buffer,pJr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function hJr(e){return $R.from(e)}function mJr(e){return $R.isBuffer(e)||e instanceof pJr}var NW=require("util"),yt;NW&&NW.debuglog?yt=NW.debuglog("stream"):yt=function(){};var gJr=iRe(),UW=DW(),vJr=kW(),bJr=vJr.getHighWaterMark,XR=Qp().codes,yJr=XR.ERR_INVALID_ARG_TYPE,xJr=XR.ERR_STREAM_PUSH_AFTER_EOF,_Jr=XR.ERR_METHOD_NOT_IMPLEMENTED,EJr=XR.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Yy,GW,zW;at()(zt,$E);var XE=UW.errorOrDestroy,HW=["error","close","destroy","pause","resume"];function wJr(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Array.isArray(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function RRe(e,r,t){Ky=Ky||ym(),e=e||{},typeof t!="boolean"&&(t=r instanceof Ky),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=bJr(this,e,"readableHighWaterMark",t),this.buffer=new gJr,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Yy||(Yy=LW().StringDecoder),this.decoder=new Yy(e.encoding),this.encoding=e.encoding)}function zt(e){if(Ky=Ky||ym(),!(this instanceof zt))return new zt(e);var r=this instanceof Ky;this._readableState=new RRe(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),$E.call(this)}Object.defineProperty(zt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){!this._readableState||(this._readableState.destroyed=r)}});zt.prototype.destroy=UW.destroy;zt.prototype._undestroy=UW.undestroy;zt.prototype._destroy=function(e,r){r(e)};zt.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=$R.from(e,r),r=""),n=!0),FRe(this,e,r,!1,n)};zt.prototype.unshift=function(e){return FRe(this,e,null,!0,!1)};function FRe(e,r,t,n,i){yt("readableAddChunk",r);var a=e._readableState;if(r===null)a.reading=!1,TJr(e,a);else{var o;if(i||(o=SJr(a,r)),o)XE(e,o);else if(a.objectMode||r&&r.length>0)if(typeof r!="string"&&!a.objectMode&&Object.getPrototypeOf(r)!==$R.prototype&&(r=hJr(r)),n)a.endEmitted?XE(e,new EJr):WW(e,a,r,!0);else if(a.ended)XE(e,new xJr);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!t?(r=a.decoder.write(r),a.objectMode||r.length!==0?WW(e,a,r,!1):VW(e,a)):WW(e,a,r,!1)}else n||(a.reading=!1,VW(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function WW(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,e.emit("data",t)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&JR(e)),VW(e,r)}function SJr(e,r){var t;return!mJr(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new yJr("chunk",["string","Buffer","Uint8Array"],r)),t}zt.prototype.isPaused=function(){return this._readableState.flowing===!1};zt.prototype.setEncoding=function(e){Yy||(Yy=LW().StringDecoder);var r=new Yy(e);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var t=this._readableState.buffer.head,n="";t!==null;)n+=r.write(t.data),t=t.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var IRe=1073741824;function AJr(e){return e>=IRe?e=IRe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function PRe(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=AJr(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}zt.prototype.read=function(e){yt("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return yt("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?YW(this):JR(this),null;if(e=PRe(e,r),e===0&&r.ended)return r.length===0&&YW(this),null;var n=r.needReadable;yt("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,yt("length less than watermark",n)),r.ended||r.reading?(n=!1,yt("reading or ended",n)):n&&(yt("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=PRe(t,r)));var i;return e>0?i=MRe(e,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&YW(this)),i!==null&&this.emit("data",i),i};function TJr(e,r){if(yt("onEofChunk"),!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.sync?JR(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,BRe(e)))}}function JR(e){var r=e._readableState;yt("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(yt("emitReadable",r.flowing),r.emittedReadable=!0,process.nextTick(BRe,e))}function BRe(e){var r=e._readableState;yt("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,KW(e)}function VW(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(CJr,e,r))}function CJr(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var t=r.length;if(yt("maybeReadMore read 0"),e.read(0),t===r.length)break}r.readingMore=!1}zt.prototype._read=function(e){XE(this,new _Jr("_read()"))};zt.prototype.pipe=function(e,r){var t=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,yt("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:b;n.endEmitted?process.nextTick(a):t.once("end",a),e.on("unpipe",o);function o(v,y){yt("onunpipe"),v===t&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,c())}function s(){yt("onend"),e.end()}var u=DJr(t);e.on("drain",u);var l=!1;function c(){yt("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",b),t.removeListener("data",f),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}t.on("data",f);function f(v){yt("ondata");var y=e.write(v);yt("dest.write",y),y===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&LRe(n.pipes,e)!==-1)&&!l&&(yt("false write response, pause",n.awaitDrain),n.awaitDrain++),t.pause())}function d(v){yt("onerror",v),b(),e.removeListener("error",d),ORe(e,"error")===0&&XE(e,v)}wJr(e,"error",d);function p(){e.removeListener("finish",h),b()}e.once("close",p);function h(){yt("onfinish"),e.removeListener("close",p),b()}e.once("finish",h);function b(){yt("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(yt("pipe resume"),t.resume()),e};function DJr(e){return function(){var t=e._readableState;yt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&ORe(e,"data")&&(t.flowing=!0,KW(e))}}zt.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=LRe(r.pipes,e);return o===-1?this:(r.pipes.splice(o,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};zt.prototype.on=function(e,r){var t=$E.prototype.on.call(this,e,r),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,yt("on readable",n.length,n.reading),n.length?JR(this):n.reading||process.nextTick(kJr,this)),t};zt.prototype.addListener=zt.prototype.on;zt.prototype.removeListener=function(e,r){var t=$E.prototype.removeListener.call(this,e,r);return e==="readable"&&process.nextTick(jRe,this),t};zt.prototype.removeAllListeners=function(e){var r=$E.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(jRe,this),r};function jRe(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:e.listenerCount("data")>0&&e.resume()}function kJr(e){yt("readable nexttick read 0"),e.read(0)}zt.prototype.resume=function(){var e=this._readableState;return e.flowing||(yt("resume"),e.flowing=!e.readableListening,OJr(this,e)),e.paused=!1,this};function OJr(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(RJr,e,r))}function RJr(e,r){yt("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),KW(e),r.flowing&&!r.reading&&e.read(0)}zt.prototype.pause=function(){return yt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(yt("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function KW(e){var r=e._readableState;for(yt("flow",r.flowing);r.flowing&&e.read()!==null;);}zt.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(yt("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(yt("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var s=r.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a<HW.length;a++)e.on(HW[a],this.emit.bind(this,HW[a]));return this._read=function(o){yt("wrapped _read",o),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(zt.prototype[Symbol.asyncIterator]=function(){return GW===void 0&&(GW=ARe()),GW(this)});Object.defineProperty(zt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(zt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(zt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}});zt._fromList=MRe;Object.defineProperty(zt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function MRe(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.first():t=r.buffer.concat(r.length),r.buffer.clear()):t=r.buffer.consume(e,r.decoder),t}function YW(e){var r=e._readableState;yt("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,process.nextTick(FJr,r,e))}function FJr(e,r){if(yt("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var t=r._writableState;(!t||t.autoDestroy&&t.finished)&&r.destroy()}}typeof Symbol=="function"&&(zt.from=function(e,r){return zW===void 0&&(zW=kRe()),zW(zt,e,r)});function LRe(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var $W=m((xIt,URe)=>{"use strict";URe.exports=Lf;var QR=Qp().codes,IJr=QR.ERR_METHOD_NOT_IMPLEMENTED,PJr=QR.ERR_MULTIPLE_CALLBACK,BJr=QR.ERR_TRANSFORM_ALREADY_TRANSFORMING,jJr=QR.ERR_TRANSFORM_WITH_LENGTH_0,ZR=ym();at()(Lf,ZR);function MJr(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(n===null)return this.emit("error",new PJr);t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Lf(e){if(!(this instanceof Lf))return new Lf(e);ZR.call(this,e),this._transformState={afterTransform:MJr.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",LJr)}function LJr(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(r,t){NRe(e,r,t)}):NRe(this,null,null)}Lf.prototype.push=function(e,r){return this._transformState.needTransform=!1,ZR.prototype.push.call(this,e,r)};Lf.prototype._transform=function(e,r,t){t(new IJr("_transform()"))};Lf.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Lf.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};Lf.prototype._destroy=function(e,r){ZR.prototype._destroy.call(this,e,function(t){r(t)})};function NRe(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),e._writableState.length)throw new jJr;if(e._transformState.transforming)throw new BJr;return e.push(null)}});var HRe=m((_It,zRe)=>{"use strict";zRe.exports=JE;var GRe=$W();at()(JE,GRe);function JE(e){if(!(this instanceof JE))return new JE(e);GRe.call(this,e)}JE.prototype._transform=function(e,r,t){t(null,e)}});var $Re=m((EIt,YRe)=>{"use strict";var XW;function qJr(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var WRe=Qp().codes,NJr=WRe.ERR_MISSING_ARGS,UJr=WRe.ERR_STREAM_DESTROYED;function VRe(e){if(e)throw e}function GJr(e){return e.setHeader&&typeof e.abort=="function"}function zJr(e,r,t,n){n=qJr(n);var i=!1;e.on("close",function(){i=!0}),XW===void 0&&(XW=VR()),XW(e,{readable:r,writable:t},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,GJr(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new UJr("pipe"))}}}function KRe(e){e()}function HJr(e,r){return e.pipe(r)}function WJr(e){return!e.length||typeof e[e.length-1]!="function"?VRe:e.pop()}function VJr(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=WJr(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new NJr("streams");var i,a=r.map(function(o,s){var u=s<r.length-1,l=s>0;return zJr(o,u,l,function(c){i||(i=c),c&&a.forEach(KRe),!u&&(a.forEach(KRe),n(i))})});return r.reduce(HJr)}YRe.exports=VJr});var JW=m((tu,ZE)=>{var QE=require("stream");process.env.READABLE_STREAM==="disable"&&QE?(ZE.exports=QE.Readable,Object.assign(ZE.exports,QE),ZE.exports.Stream=QE):(tu=ZE.exports=BW(),tu.Stream=QE||tu,tu.Readable=tu,tu.Writable=FW(),tu.Duplex=ym(),tu.Transform=$W(),tu.PassThrough=HRe(),tu.finished=VR(),tu.pipeline=$Re())});var eFe=m((wIt,ZRe)=>{var QW=require("fs"),XRe=YDe(),JRe=XDe(),ZW=require("path"),mc=Hy(),KJr=require("util").inherits,di=JOe(),QRe=JW().Transform,eV=process.platform==="win32",Zt=function(e,r){if(!(this instanceof Zt))return new Zt(e,r);typeof e!="string"&&(r=e,e="zip"),r=this.options=mc.defaults(r,{highWaterMark:1024*1024,statConcurrency:4}),QRe.call(this,r),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=JRe.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=JRe.queue(this._onStatQueueTask.bind(this),r.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};KJr(Zt,QRe);Zt.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()};Zt.prototype._append=function(e,r){r=r||{};var t={source:null,filepath:e};r.name||(r.name=e),r.sourcePath=e,t.data=r,this._entriesCount++,r.stats&&r.stats instanceof QW.Stats?(t=this._updateQueueTaskWithStats(t,r.stats),t&&(r.stats.size&&(this._fsEntriesTotalBytes+=r.stats.size),this._queue.push(t))):this._statQueue.push(t)};Zt.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)};Zt.prototype._maybeFinalize=function(){return this._state.finalizing||this._state.finalized||this._state.aborted?!1:this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()?(this._finalize(),!0):!1};Zt.prototype._moduleAppend=function(e,r,t){if(this._state.aborted){t();return}this._module.append(e,r,function(n){if(this._task=null,this._state.aborted){this._shutdown();return}if(n){this.emit("error",n),setImmediate(t);return}this.emit("entry",r),this._entriesProcessedCount++,r.stats&&r.stats.size&&(this._fsEntriesProcessedBytes+=r.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(t)}.bind(this))};Zt.prototype._moduleFinalize=function(){typeof this._module.finalize=="function"?this._module.finalize():typeof this._module.end=="function"?this._module.end():this.emit("error",new di("NOENDMETHOD"))};Zt.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0};Zt.prototype._moduleSupports=function(e){return!this._module.supports||!this._module.supports[e]?!1:this._module.supports[e]};Zt.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1};Zt.prototype._normalizeEntryData=function(e,r){e=mc.defaults(e,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),r&&e.stats===!1&&(e.stats=r);var t=e.type==="directory";return e.name&&(typeof e.prefix=="string"&&e.prefix!==""&&(e.name=e.prefix+"/"+e.name,e.prefix=null),e.name=mc.sanitizePath(e.name),e.type!=="symlink"&&e.name.slice(-1)==="/"?(t=!0,e.type="directory"):t&&(e.name+="/")),typeof e.mode=="number"?eV?e.mode&=511:e.mode&=4095:e.stats&&e.mode===null?(eV?e.mode=e.stats.mode&511:e.mode=e.stats.mode&4095,eV&&t&&(e.mode=493)):e.mode===null&&(e.mode=t?493:420),e.stats&&e.date===null?e.date=e.stats.mtime:e.date=mc.dateify(e.date),e};Zt.prototype._onModuleError=function(e){this.emit("error",e)};Zt.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()};Zt.prototype._onQueueTask=function(e,r){var t=()=>{e.data.callback&&e.data.callback(),r()};if(this._state.finalizing||this._state.finalized||this._state.aborted){t();return}this._task=e,this._moduleAppend(e.source,e.data,t)};Zt.prototype._onStatQueueTask=function(e,r){if(this._state.finalizing||this._state.finalized||this._state.aborted){r();return}QW.lstat(e.filepath,function(t,n){if(this._state.aborted){setImmediate(r);return}if(t){this._entriesCount--,this.emit("warning",t),setImmediate(r);return}e=this._updateQueueTaskWithStats(e,n),e&&(n.size&&(this._fsEntriesTotalBytes+=n.size),this._queue.push(e)),setImmediate(r)}.bind(this))};Zt.prototype._shutdown=function(){this._moduleUnpipe(),this.end()};Zt.prototype._transform=function(e,r,t){e&&(this._pointer+=e.length),t(null,e)};Zt.prototype._updateQueueTaskWithStats=function(e,r){if(r.isFile())e.data.type="file",e.data.sourceType="stream",e.source=mc.lazyReadStream(e.filepath);else if(r.isDirectory()&&this._moduleSupports("directory"))e.data.name=mc.trailingSlashIt(e.data.name),e.data.type="directory",e.data.sourcePath=mc.trailingSlashIt(e.filepath),e.data.sourceType="buffer",e.source=Buffer.concat([]);else if(r.isSymbolicLink()&&this._moduleSupports("symlink")){var t=QW.readlinkSync(e.filepath),n=ZW.dirname(e.filepath);e.data.type="symlink",e.data.linkname=ZW.relative(n,ZW.resolve(n,t)),e.data.sourceType="buffer",e.source=Buffer.concat([])}else return r.isDirectory()?this.emit("warning",new di("DIRECTORYNOTSUPPORTED",e.data)):r.isSymbolicLink()?this.emit("warning",new di("SYMLINKNOTSUPPORTED",e.data)):this.emit("warning",new di("ENTRYNOTSUPPORTED",e.data)),null;return e.data=this._normalizeEntryData(e.data,r),e};Zt.prototype.abort=function(){return this._state.aborted||this._state.finalized?this:(this._abort(),this)};Zt.prototype.append=function(e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new di("QUEUECLOSED")),this;if(r=this._normalizeEntryData(r),typeof r.name!="string"||r.name.length===0)return this.emit("error",new di("ENTRYNAMEREQUIRED")),this;if(r.type==="directory"&&!this._moduleSupports("directory"))return this.emit("error",new di("DIRECTORYNOTSUPPORTED",{name:r.name})),this;if(e=mc.normalizeInputSource(e),Buffer.isBuffer(e))r.sourceType="buffer";else if(mc.isStream(e))r.sourceType="stream";else return this.emit("error",new di("INPUTSTEAMBUFFERREQUIRED",{name:r.name})),this;return this._entriesCount++,this._queue.push({data:r,source:e}),this};Zt.prototype.directory=function(e,r,t){if(this._state.finalize||this._state.aborted)return this.emit("error",new di("QUEUECLOSED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new di("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,r===!1?r="":typeof r!="string"&&(r=e);var n=!1;typeof t=="function"?(n=t,t={}):typeof t!="object"&&(t={});var i={stat:!0,dot:!0};function a(){this._pending--,this._maybeFinalize()}function o(l){this.emit("error",l)}function s(l){u.pause();var c=!1,f=Object.assign({},t);f.name=l.relative,f.prefix=r,f.stats=l.stat,f.callback=u.resume.bind(u);try{if(n){if(f=n(f),f===!1)c=!0;else if(typeof f!="object")throw new di("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:e})}}catch(d){this.emit("error",d);return}if(c){u.resume();return}this._append(l.absolute,f)}var u=XRe(e,i);return u.on("error",o.bind(this)),u.on("match",s.bind(this)),u.on("end",a.bind(this)),this};Zt.prototype.file=function(e,r){return this._state.finalize||this._state.aborted?(this.emit("error",new di("QUEUECLOSED")),this):typeof e!="string"||e.length===0?(this.emit("error",new di("FILEFILEPATHREQUIRED")),this):(this._append(e,r),this)};Zt.prototype.glob=function(e,r,t){this._pending++,r=mc.defaults(r,{stat:!0,pattern:e});function n(){this._pending--,this._maybeFinalize()}function i(s){this.emit("error",s)}function a(s){o.pause();var u=Object.assign({},t);u.callback=o.resume.bind(o),u.stats=s.stat,u.name=s.relative,this._append(s.absolute,u)}var o=XRe(r.cwd||".",r);return o.on("error",i.bind(this)),o.on("match",a.bind(this)),o.on("end",n.bind(this)),this};Zt.prototype.finalize=function(){if(this._state.aborted){var e=new di("ABORTED");return this.emit("error",e),Promise.reject(e)}if(this._state.finalize){var r=new di("FINALIZING");return this.emit("error",r),Promise.reject(r)}this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var t=this;return new Promise(function(n,i){var a;t._module.on("end",function(){a||n()}),t._module.on("error",function(o){a=!0,i(o)})})};Zt.prototype.setFormat=function(e){return this._format?(this.emit("error",new di("FORMATSET")),this):(this._format=e,this)};Zt.prototype.setModule=function(e){return this._state.aborted?(this.emit("error",new di("ABORTED")),this):this._state.module?(this.emit("error",new di("MODULESET")),this):(this._module=e,this._modulePipe(),this)};Zt.prototype.symlink=function(e,r,t){if(this._state.finalize||this._state.aborted)return this.emit("error",new di("QUEUECLOSED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new di("SYMLINKFILEPATHREQUIRED")),this;if(typeof r!="string"||r.length===0)return this.emit("error",new di("SYMLINKTARGETREQUIRED",{filepath:e})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new di("SYMLINKNOTSUPPORTED",{filepath:e})),this;var n={};return n.type="symlink",n.name=e.replace(/\\/g,"/"),n.linkname=r.replace(/\\/g,"/"),n.sourceType="buffer",typeof t=="number"&&(n.mode=t),this._entriesCount++,this._queue.push({data:n,source:Buffer.concat([])}),this};Zt.prototype.pointer=function(){return this._pointer};Zt.prototype.use=function(e){return this._streams.push(e),this};ZRe.exports=Zt});var rF=m((SIt,rFe)=>{var eF=rFe.exports=function(){};eF.prototype.getName=function(){};eF.prototype.getSize=function(){};eF.prototype.getLastModifiedDate=function(){};eF.prototype.isDirectory=function(){}});var tF=m((AIt,tFe)=>{var nu=tFe.exports={};nu.dateToDos=function(e,r){r=r||!1;var t=r?e.getFullYear():e.getUTCFullYear();if(t<1980)return 2162688;if(t>=2044)return 2141175677;var n={year:t,month:r?e.getMonth():e.getUTCMonth(),date:r?e.getDate():e.getUTCDate(),hours:r?e.getHours():e.getUTCHours(),minutes:r?e.getMinutes():e.getUTCMinutes(),seconds:r?e.getSeconds():e.getUTCSeconds()};return n.year-1980<<25|n.month+1<<21|n.date<<16|n.hours<<11|n.minutes<<5|n.seconds/2};nu.dosToDate=function(e){return new Date((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1)};nu.fromDosTime=function(e){return nu.dosToDate(e.readUInt32LE(0))};nu.getEightBytes=function(e){var r=Buffer.alloc(8);return r.writeUInt32LE(e%4294967296,0),r.writeUInt32LE(e/4294967296|0,4),r};nu.getShortBytes=function(e){var r=Buffer.alloc(2);return r.writeUInt16LE((e&65535)>>>0,0),r};nu.getShortBytesValue=function(e,r){return e.readUInt16LE(r)};nu.getLongBytes=function(e){var r=Buffer.alloc(4);return r.writeUInt32LE((e&4294967295)>>>0,0),r};nu.getLongBytesValue=function(e,r){return e.readUInt32LE(r)};nu.toDosTime=function(e){return nu.getLongBytes(nu.dateToDos(e))}});var rV=m((TIt,uFe)=>{var nFe=tF(),iFe=1<<3,aFe=1<<0,YJr=1<<2,$Jr=1<<1,oFe=1<<6,sFe=1<<11,qa=uFe.exports=function(){return this instanceof qa?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new qa};qa.prototype.encode=function(){return nFe.getShortBytes((this.descriptor?iFe:0)|(this.utf8?sFe:0)|(this.encryption?aFe:0)|(this.strongEncryption?oFe:0))};qa.prototype.parse=function(e,r){var t=nFe.getShortBytesValue(e,r),n=new qa;return n.useDataDescriptor((t&iFe)!=0),n.useUTF8ForNames((t&sFe)!=0),n.useStrongEncryption((t&oFe)!=0),n.useEncryption((t&aFe)!=0),n.setSlidingDictionarySize((t&$Jr)!=0?8192:4096),n.setNumberOfShannonFanoTrees((t&YJr)!=0?3:2),n};qa.prototype.setNumberOfShannonFanoTrees=function(e){this.numberOfShannonFanoTrees=e};qa.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees};qa.prototype.setSlidingDictionarySize=function(e){this.slidingDictionarySize=e};qa.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize};qa.prototype.useDataDescriptor=function(e){this.descriptor=e};qa.prototype.usesDataDescriptor=function(){return this.descriptor};qa.prototype.useEncryption=function(e){this.encryption=e};qa.prototype.usesEncryption=function(){return this.encryption};qa.prototype.useStrongEncryption=function(e){this.strongEncryption=e};qa.prototype.usesStrongEncryption=function(){return this.strongEncryption};qa.prototype.useUTF8ForNames=function(e){this.utf8=e};qa.prototype.usesUTF8ForNames=function(){return this.utf8}});var cFe=m((CIt,lFe)=>{lFe.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}});var tV=m((DIt,fFe)=>{fFe.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}});var nV=m((kIt,gFe)=>{var XJr=require("util").inherits,JJr=NH(),dFe=rF(),pFe=rV(),hFe=cFe(),bo=tV(),mFe=tF(),xt=gFe.exports=function(e){if(!(this instanceof xt))return new xt(e);dFe.call(this),this.platform=bo.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new pFe,this.crc=0,this.time=-1,this.minver=bo.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,e&&this.setName(e)};XJr(xt,dFe);xt.prototype.getCentralDirectoryExtra=function(){return this.getExtra()};xt.prototype.getComment=function(){return this.comment!==null?this.comment:""};xt.prototype.getCompressedSize=function(){return this.csize};xt.prototype.getCrc=function(){return this.crc};xt.prototype.getExternalAttributes=function(){return this.exattr};xt.prototype.getExtra=function(){return this.extra!==null?this.extra:bo.EMPTY};xt.prototype.getGeneralPurposeBit=function(){return this.gpb};xt.prototype.getInternalAttributes=function(){return this.inattr};xt.prototype.getLastModifiedDate=function(){return this.getTime()};xt.prototype.getLocalFileDataExtra=function(){return this.getExtra()};xt.prototype.getMethod=function(){return this.method};xt.prototype.getName=function(){return this.name};xt.prototype.getPlatform=function(){return this.platform};xt.prototype.getSize=function(){return this.size};xt.prototype.getTime=function(){return this.time!==-1?mFe.dosToDate(this.time):-1};xt.prototype.getTimeDos=function(){return this.time!==-1?this.time:0};xt.prototype.getUnixMode=function(){return this.platform!==bo.PLATFORM_UNIX?0:this.getExternalAttributes()>>bo.SHORT_SHIFT&bo.SHORT_MASK};xt.prototype.getVersionNeededToExtract=function(){return this.minver};xt.prototype.setComment=function(e){Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=e};xt.prototype.setCompressedSize=function(e){if(e<0)throw new Error("invalid entry compressed size");this.csize=e};xt.prototype.setCrc=function(e){if(e<0)throw new Error("invalid entry crc32");this.crc=e};xt.prototype.setExternalAttributes=function(e){this.exattr=e>>>0};xt.prototype.setExtra=function(e){this.extra=e};xt.prototype.setGeneralPurposeBit=function(e){if(!(e instanceof pFe))throw new Error("invalid entry GeneralPurposeBit");this.gpb=e};xt.prototype.setInternalAttributes=function(e){this.inattr=e};xt.prototype.setMethod=function(e){if(e<0)throw new Error("invalid entry compression method");this.method=e};xt.prototype.setName=function(e,r=!1){e=JJr(e,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),r&&(e=`/${e}`),Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=e};xt.prototype.setPlatform=function(e){this.platform=e};xt.prototype.setSize=function(e){if(e<0)throw new Error("invalid entry size");this.size=e};xt.prototype.setTime=function(e,r){if(!(e instanceof Date))throw new Error("invalid entry time");this.time=mFe.dateToDos(e,r)};xt.prototype.setUnixMode=function(e){e|=this.isDirectory()?bo.S_IFDIR:bo.S_IFREG;var r=0;r|=e<<bo.SHORT_SHIFT|(this.isDirectory()?bo.S_DOS_D:bo.S_DOS_A),this.setExternalAttributes(r),this.mode=e&bo.MODE_MASK,this.platform=bo.PLATFORM_UNIX};xt.prototype.setVersionNeededToExtract=function(e){this.minver=e};xt.prototype.isDirectory=function(){return this.getName().slice(-1)==="/"};xt.prototype.isUnixSymlink=function(){return(this.getUnixMode()&hFe.FILE_TYPE_FLAG)===hFe.LINK_FLAG};xt.prototype.isZip64=function(){return this.csize>bo.ZIP64_MAGIC||this.size>bo.ZIP64_MAGIC}});var iV=m((OIt,vFe)=>{vFe.exports=require("stream")});var wFe=m((RIt,EFe)=>{"use strict";function bFe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function yFe(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?bFe(Object(t),!0).forEach(function(n){QJr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bFe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function QJr(e,r,t){return r=_Fe(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ZJr(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function xFe(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_Fe(n.key),n)}}function eQr(e,r,t){return r&&xFe(e.prototype,r),t&&xFe(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _Fe(e){var r=rQr(e,"string");return typeof r=="symbol"?r:String(r)}function rQr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var tQr=require("buffer"),nF=tQr.Buffer,nQr=require("util"),aV=nQr.inspect,iQr=aV&&aV.custom||"inspect";function aQr(e,r,t){nF.prototype.copy.call(e,r,t)}EFe.exports=function(){function e(){ZJr(this,e),this.head=null,this.tail=null,this.length=0}return eQr(e,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(this.length===0)return nF.alloc(0);for(var n=nF.allocUnsafe(t>>>0),i=this.head,a=0;i;)aQr(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):t===this.head.data.length?i=this.shift():i=n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,a=n.data;for(t-=a.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?a+=o:a+=o.slice(0,t),t-=s,t===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(t){var n=nF.allocUnsafe(t),i=this.head,a=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,t===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:iQr,value:function(t,n){return aV(this,yFe(yFe({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var sV=m((FIt,AFe)=>{"use strict";function oQr(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(oV,this,e)):process.nextTick(oV,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!r&&a?t._writableState?t._writableState.errorEmitted?process.nextTick(iF,t):(t._writableState.errorEmitted=!0,process.nextTick(SFe,t,a)):process.nextTick(SFe,t,a):r?(process.nextTick(iF,t),r(a)):process.nextTick(iF,t)}),this)}function SFe(e,r){oV(e,r),iF(e)}function iF(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function sQr(){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 oV(e,r){e.emit("error",r)}function uQr(e,r){var t=e._readableState,n=e._writableState;t&&t.autoDestroy||n&&n.autoDestroy?e.destroy(r):e.emit("error",r)}AFe.exports={destroy:oQr,undestroy:sQr,errorOrDestroy:uQr}});var nh=m((IIt,DFe)=>{"use strict";var TFe={};function iu(e,r,t){t||(t=Error);function n(a,o,s){return typeof r=="string"?r:r(a,o,s)}class i extends t{constructor(o,s,u){super(n(o,s,u))}}i.prototype.name=t.name,i.prototype.code=e,TFe[e]=i}function CFe(e,r){if(Array.isArray(e)){let t=e.length;return e=e.map(n=>String(n)),t>2?`one of ${r} ${e.slice(0,t-1).join(", ")}, or `+e[t-1]:t===2?`one of ${r} ${e[0]} or ${e[1]}`:`of ${r} ${e[0]}`}else return`of ${r} ${String(e)}`}function lQr(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function cQr(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function fQr(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}iu("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);iu("ERR_INVALID_ARG_TYPE",function(e,r,t){let n;typeof r=="string"&&lQr(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";let i;if(cQr(e," argument"))i=`The ${e} ${n} ${CFe(r,"type")}`;else{let a=fQr(e,".")?"property":"argument";i=`The "${e}" ${a} ${n} ${CFe(r,"type")}`}return i+=`. Received type ${typeof t}`,i},TypeError);iu("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");iu("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});iu("ERR_STREAM_PREMATURE_CLOSE","Premature close");iu("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});iu("ERR_MULTIPLE_CALLBACK","Callback called multiple times");iu("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");iu("ERR_STREAM_WRITE_AFTER_END","write after end");iu("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);iu("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);iu("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");DFe.exports.codes=TFe});var uV=m((PIt,kFe)=>{"use strict";var dQr=nh().codes.ERR_INVALID_OPT_VALUE;function pQr(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function hQr(e,r,t,n){var i=pQr(r,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?t:"highWaterMark";throw new dQr(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}kFe.exports={getHighWaterMark:hQr}});var fV=m((BIt,BFe)=>{"use strict";BFe.exports=pi;function OFe(e){var r=this;this.next=null,this.entry=null,this.finish=function(){UQr(r,e)}}var $y;pi.WritableState=ew;var mQr={deprecate:d0()},RFe=iV(),aF=require("buffer").Buffer,gQr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function vQr(e){return aF.from(e)}function bQr(e){return aF.isBuffer(e)||e instanceof gQr}var lV=sV(),yQr=uV(),xQr=yQr.getHighWaterMark,ih=nh().codes,_Qr=ih.ERR_INVALID_ARG_TYPE,EQr=ih.ERR_METHOD_NOT_IMPLEMENTED,wQr=ih.ERR_MULTIPLE_CALLBACK,SQr=ih.ERR_STREAM_CANNOT_PIPE,AQr=ih.ERR_STREAM_DESTROYED,TQr=ih.ERR_STREAM_NULL_VALUES,CQr=ih.ERR_STREAM_WRITE_AFTER_END,DQr=ih.ERR_UNKNOWN_ENCODING,Xy=lV.errorOrDestroy;at()(pi,RFe);function kQr(){}function ew(e,r,t){$y=$y||wm(),e=e||{},typeof t!="boolean"&&(t=r instanceof $y),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=xQr(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){jQr(r,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new OFe(this)}ew.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(ew.prototype,"buffer",{get:mQr.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var oF;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(oF=Function.prototype[Symbol.hasInstance],Object.defineProperty(pi,Symbol.hasInstance,{value:function(r){return oF.call(this,r)?!0:this!==pi?!1:r&&r._writableState instanceof ew}})):oF=function(r){return r instanceof this};function pi(e){$y=$y||wm();var r=this instanceof $y;if(!r&&!oF.call(pi,this))return new pi(e);this._writableState=new ew(e,this,r),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)),RFe.call(this)}pi.prototype.pipe=function(){Xy(this,new SQr)};function OQr(e,r){var t=new CQr;Xy(e,t),process.nextTick(r,t)}function RQr(e,r,t,n){var i;return t===null?i=new TQr:typeof t!="string"&&!r.objectMode&&(i=new _Qr("chunk",["string","Buffer"],t)),i?(Xy(e,i),process.nextTick(n,i),!1):!0}pi.prototype.write=function(e,r,t){var n=this._writableState,i=!1,a=!n.objectMode&&bQr(e);return a&&!aF.isBuffer(e)&&(e=vQr(e)),typeof r=="function"&&(t=r,r=null),a?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=kQr),n.ending?OQr(this,t):(a||RQr(this,n,e,t))&&(n.pendingcb++,i=IQr(this,n,a,e,r,t)),i};pi.prototype.cork=function(){this._writableState.corked++};pi.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&IFe(this,e))};pi.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new DQr(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(pi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function FQr(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=aF.from(r,t)),r}Object.defineProperty(pi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function IQr(e,r,t,n,i,a){if(!t){var o=FQr(r,n,i);n!==o&&(t=!0,i="buffer",n=o)}var s=r.objectMode?1:n.length;r.length+=s;var u=r.length<r.highWaterMark;if(u||(r.needDrain=!0),r.writing||r.corked){var l=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:a,next:null},l?l.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else cV(e,r,!1,s,n,i,a);return u}function cV(e,r,t,n,i,a,o){r.writelen=n,r.writecb=o,r.writing=!0,r.sync=!0,r.destroyed?r.onwrite(new AQr("write")):t?e._writev(i,r.onwrite):e._write(i,a,r.onwrite),r.sync=!1}function PQr(e,r,t,n,i){--r.pendingcb,t?(process.nextTick(i,n),process.nextTick(rw,e,r),e._writableState.errorEmitted=!0,Xy(e,n)):(i(n),e._writableState.errorEmitted=!0,Xy(e,n),rw(e,r))}function BQr(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function jQr(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(typeof i!="function")throw new wQr;if(BQr(t),r)PQr(e,t,n,r,i);else{var a=PFe(t)||e.destroyed;!a&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&IFe(e,t),n?process.nextTick(FFe,e,t,a,i):FFe(e,t,a,i)}}function FFe(e,r,t,n){t||MQr(e,r),r.pendingcb--,n(),rw(e,r)}function MQr(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function IFe(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),a=r.corkedRequestsFree;a.entry=t;for(var o=0,s=!0;t;)i[o]=t,t.isBuf||(s=!1),t=t.next,o+=1;i.allBuffers=s,cV(e,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new OFe(r),r.bufferedRequestCount=0}else{for(;t;){var u=t.chunk,l=t.encoding,c=t.callback,f=r.objectMode?1:u.length;if(cV(e,r,!1,f,u,l,c),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}pi.prototype._write=function(e,r,t){t(new EQr("_write()"))};pi.prototype._writev=null;pi.prototype.end=function(e,r,t){var n=this._writableState;return typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||NQr(this,n,t),this};Object.defineProperty(pi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function PFe(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function LQr(e,r){e._final(function(t){r.pendingcb--,t&&Xy(e,t),r.prefinished=!0,e.emit("prefinish"),rw(e,r)})}function qQr(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"&&!r.destroyed?(r.pendingcb++,r.finalCalled=!0,process.nextTick(LQr,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function rw(e,r){var t=PFe(r);if(t&&(qQr(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"),r.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return t}function NQr(e,r,t){r.ending=!0,rw(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function UQr(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(pi.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(r){!this._writableState||(this._writableState.destroyed=r)}});pi.prototype.destroy=lV.destroy;pi.prototype._undestroy=lV.undestroy;pi.prototype._destroy=function(e,r){r(e)}});var wm=m((jIt,MFe)=>{"use strict";var GQr=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};MFe.exports=gc;var jFe=hV(),dV=fV();at()(gc,jFe);for(pV=GQr(dV.prototype),sF=0;sF<pV.length;sF++)uF=pV[sF],gc.prototype[uF]||(gc.prototype[uF]=dV.prototype[uF]);var pV,uF,sF;function gc(e){if(!(this instanceof gc))return new gc(e);jFe.call(this,e),dV.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",zQr)))}Object.defineProperty(gc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(gc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(gc.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function zQr(){this._writableState.ended||process.nextTick(HQr,this)}function HQr(e){e.end()}Object.defineProperty(gc.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(r){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=r,this._writableState.destroyed=r)}})});var vV=m(qFe=>{"use strict";var mV=vu().Buffer,LFe=mV.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 WQr(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function VQr(e){var r=WQr(e);if(typeof r!="string"&&(mV.isEncoding===LFe||!LFe(e)))throw new Error("Unknown encoding: "+e);return r||e}qFe.StringDecoder=tw;function tw(e){this.encoding=VQr(e);var r;switch(this.encoding){case"utf16le":this.text=QQr,this.end=ZQr,r=4;break;case"utf8":this.fillLast=$Qr,r=4;break;case"base64":this.text=eZr,this.end=rZr,r=3;break;default:this.write=tZr,this.end=nZr;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=mV.allocUnsafe(r)}tw.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""};tw.prototype.end=JQr;tw.prototype.text=XQr;tw.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 gV(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function KQr(e,r,t){var n=r.length-1;if(n<t)return 0;var i=gV(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=gV(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=gV(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function YQr(e,r,t){if((r[0]&192)!=128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!=128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!=128)return e.lastNeed=2,"\uFFFD"}}function $Qr(e){var r=this.lastTotal-this.lastNeed,t=YQr(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function XQr(e,r){var t=KQr(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",r,n)}function JQr(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function QQr(e,r){if((e.length-r)%2==0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.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],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function ZQr(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function eZr(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function rZr(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function tZr(e){return e.toString(this.encoding)}function nZr(e){return e&&e.length?this.write(e):""}});var lF=m((LIt,GFe)=>{"use strict";var NFe=nh().codes.ERR_STREAM_PREMATURE_CLOSE;function iZr(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e.apply(this,n)}}}function aZr(){}function oZr(e){return e.setHeader&&typeof e.abort=="function"}function UFe(e,r,t){if(typeof r=="function")return UFe(e,null,r);r||(r={}),t=iZr(t||aZr);var n=r.readable||r.readable!==!1&&e.readable,i=r.writable||r.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){i=!1,o=!0,n||t.call(e)},u=e._readableState&&e._readableState.endEmitted,l=function(){n=!1,u=!0,i||t.call(e)},c=function(h){t.call(e,h)},f=function(){var h;if(n&&!u)return(!e._readableState||!e._readableState.ended)&&(h=new NFe),t.call(e,h);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(h=new NFe),t.call(e,h)},d=function(){e.req.on("finish",s)};return oZr(e)?(e.on("complete",s),e.on("abort",f),e.req?d():e.on("request",d)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",s),r.error!==!1&&e.on("error",c),e.on("close",f),function(){e.removeListener("complete",s),e.removeListener("abort",f),e.removeListener("request",d),e.req&&e.req.removeListener("finish",s),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",s),e.removeListener("end",l),e.removeListener("error",c),e.removeListener("close",f)}}GFe.exports=UFe});var HFe=m((qIt,zFe)=>{"use strict";var cF;function ah(e,r,t){return r=sZr(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function sZr(e){var r=uZr(e,"string");return typeof r=="symbol"?r:String(r)}function uZr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var lZr=lF(),oh=Symbol("lastResolve"),Sm=Symbol("lastReject"),nw=Symbol("error"),fF=Symbol("ended"),Am=Symbol("lastPromise"),bV=Symbol("handlePromise"),Tm=Symbol("stream");function sh(e,r){return{value:e,done:r}}function cZr(e){var r=e[oh];if(r!==null){var t=e[Tm].read();t!==null&&(e[Am]=null,e[oh]=null,e[Sm]=null,r(sh(t,!1)))}}function fZr(e){process.nextTick(cZr,e)}function dZr(e,r){return function(t,n){e.then(function(){if(r[fF]){t(sh(void 0,!0));return}r[bV](t,n)},n)}}var pZr=Object.getPrototypeOf(function(){}),hZr=Object.setPrototypeOf((cF={get stream(){return this[Tm]},next:function(){var r=this,t=this[nw];if(t!==null)return Promise.reject(t);if(this[fF])return Promise.resolve(sh(void 0,!0));if(this[Tm].destroyed)return new Promise(function(o,s){process.nextTick(function(){r[nw]?s(r[nw]):o(sh(void 0,!0))})});var n=this[Am],i;if(n)i=new Promise(dZr(n,this));else{var a=this[Tm].read();if(a!==null)return Promise.resolve(sh(a,!1));i=new Promise(this[bV])}return this[Am]=i,i}},ah(cF,Symbol.asyncIterator,function(){return this}),ah(cF,"return",function(){var r=this;return new Promise(function(t,n){r[Tm].destroy(null,function(i){if(i){n(i);return}t(sh(void 0,!0))})})}),cF),pZr),mZr=function(r){var t,n=Object.create(hZr,(t={},ah(t,Tm,{value:r,writable:!0}),ah(t,oh,{value:null,writable:!0}),ah(t,Sm,{value:null,writable:!0}),ah(t,nw,{value:null,writable:!0}),ah(t,fF,{value:r._readableState.endEmitted,writable:!0}),ah(t,bV,{value:function(a,o){var s=n[Tm].read();s?(n[Am]=null,n[oh]=null,n[Sm]=null,a(sh(s,!1))):(n[oh]=a,n[Sm]=o)},writable:!0}),t));return n[Am]=null,lZr(r,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[Sm];a!==null&&(n[Am]=null,n[oh]=null,n[Sm]=null,a(i)),n[nw]=i;return}var o=n[oh];o!==null&&(n[Am]=null,n[oh]=null,n[Sm]=null,o(sh(void 0,!0))),n[fF]=!0}),r.on("readable",fZr.bind(null,n)),n};zFe.exports=mZr});var YFe=m((NIt,KFe)=>{"use strict";function WFe(e,r,t,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){t(l);return}s.done?r(u):Promise.resolve(u).then(n,i)}function gZr(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var a=e.apply(r,t);function o(u){WFe(a,n,i,o,s,"next",u)}function s(u){WFe(a,n,i,o,s,"throw",u)}o(void 0)})}}function VFe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function vZr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?VFe(Object(t),!0).forEach(function(n){bZr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):VFe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function bZr(e,r,t){return r=yZr(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function yZr(e){var r=xZr(e,"string");return typeof r=="symbol"?r:String(r)}function xZr(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var _Zr=nh().codes.ERR_INVALID_ARG_TYPE;function EZr(e,r,t){var n;if(r&&typeof r.next=="function")n=r;else if(r&&r[Symbol.asyncIterator])n=r[Symbol.asyncIterator]();else if(r&&r[Symbol.iterator])n=r[Symbol.iterator]();else throw new _Zr("iterable",["Iterable"],r);var i=new e(vZr({objectMode:!0},t)),a=!1;i._read=function(){a||(a=!0,o())};function o(){return s.apply(this,arguments)}function s(){return s=gZr(function*(){try{var u=yield n.next(),l=u.value,c=u.done;c?i.push(null):i.push(yield l)?o():a=!1}catch(f){i.destroy(f)}}),s.apply(this,arguments)}return i}KFe.exports=EZr});var hV=m((GIt,i4e)=>{"use strict";i4e.exports=Ht;var Jy;Ht.ReadableState=XFe;var UIt=require("events").EventEmitter,$Fe=function(r,t){return r.listeners(t).length},iw=iV(),dF=require("buffer").Buffer,wZr=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function SZr(e){return dF.from(e)}function AZr(e){return dF.isBuffer(e)||e instanceof wZr}var yV=require("util"),_t;yV&&yV.debuglog?_t=yV.debuglog("stream"):_t=function(){};var TZr=wFe(),xV=sV(),CZr=uV(),DZr=CZr.getHighWaterMark,pF=nh().codes,kZr=pF.ERR_INVALID_ARG_TYPE,OZr=pF.ERR_STREAM_PUSH_AFTER_EOF,RZr=pF.ERR_METHOD_NOT_IMPLEMENTED,FZr=pF.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Qy,_V,EV;at()(Ht,iw);var aw=xV.errorOrDestroy,wV=["error","close","destroy","pause","resume"];function IZr(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Array.isArray(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function XFe(e,r,t){Jy=Jy||wm(),e=e||{},typeof t!="boolean"&&(t=r instanceof Jy),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=DZr(this,e,"readableHighWaterMark",t),this.buffer=new TZr,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Qy||(Qy=vV().StringDecoder),this.decoder=new Qy(e.encoding),this.encoding=e.encoding)}function Ht(e){if(Jy=Jy||wm(),!(this instanceof Ht))return new Ht(e);var r=this instanceof Jy;this._readableState=new XFe(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),iw.call(this)}Object.defineProperty(Ht.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){!this._readableState||(this._readableState.destroyed=r)}});Ht.prototype.destroy=xV.destroy;Ht.prototype._undestroy=xV.undestroy;Ht.prototype._destroy=function(e,r){r(e)};Ht.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=dF.from(e,r),r=""),n=!0),JFe(this,e,r,!1,n)};Ht.prototype.unshift=function(e){return JFe(this,e,null,!0,!1)};function JFe(e,r,t,n,i){_t("readableAddChunk",r);var a=e._readableState;if(r===null)a.reading=!1,jZr(e,a);else{var o;if(i||(o=PZr(a,r)),o)aw(e,o);else if(a.objectMode||r&&r.length>0)if(typeof r!="string"&&!a.objectMode&&Object.getPrototypeOf(r)!==dF.prototype&&(r=SZr(r)),n)a.endEmitted?aw(e,new FZr):SV(e,a,r,!0);else if(a.ended)aw(e,new OZr);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!t?(r=a.decoder.write(r),a.objectMode||r.length!==0?SV(e,a,r,!1):AV(e,a)):SV(e,a,r,!1)}else n||(a.reading=!1,AV(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function SV(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,e.emit("data",t)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&hF(e)),AV(e,r)}function PZr(e,r){var t;return!AZr(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new kZr("chunk",["string","Buffer","Uint8Array"],r)),t}Ht.prototype.isPaused=function(){return this._readableState.flowing===!1};Ht.prototype.setEncoding=function(e){Qy||(Qy=vV().StringDecoder);var r=new Qy(e);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var t=this._readableState.buffer.head,n="";t!==null;)n+=r.write(t.data),t=t.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var QFe=1073741824;function BZr(e){return e>=QFe?e=QFe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function ZFe(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=BZr(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}Ht.prototype.read=function(e){_t("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return _t("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?CV(this):hF(this),null;if(e=ZFe(e,r),e===0&&r.ended)return r.length===0&&CV(this),null;var n=r.needReadable;_t("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,_t("length less than watermark",n)),r.ended||r.reading?(n=!1,_t("reading or ended",n)):n&&(_t("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=ZFe(t,r)));var i;return e>0?i=t4e(e,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&CV(this)),i!==null&&this.emit("data",i),i};function jZr(e,r){if(_t("onEofChunk"),!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.sync?hF(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,e4e(e)))}}function hF(e){var r=e._readableState;_t("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(_t("emitReadable",r.flowing),r.emittedReadable=!0,process.nextTick(e4e,e))}function e4e(e){var r=e._readableState;_t("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,TV(e)}function AV(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(MZr,e,r))}function MZr(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var t=r.length;if(_t("maybeReadMore read 0"),e.read(0),t===r.length)break}r.readingMore=!1}Ht.prototype._read=function(e){aw(this,new RZr("_read()"))};Ht.prototype.pipe=function(e,r){var t=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,_t("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:b;n.endEmitted?process.nextTick(a):t.once("end",a),e.on("unpipe",o);function o(v,y){_t("onunpipe"),v===t&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,c())}function s(){_t("onend"),e.end()}var u=LZr(t);e.on("drain",u);var l=!1;function c(){_t("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",b),t.removeListener("data",f),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}t.on("data",f);function f(v){_t("ondata");var y=e.write(v);_t("dest.write",y),y===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&n4e(n.pipes,e)!==-1)&&!l&&(_t("false write response, pause",n.awaitDrain),n.awaitDrain++),t.pause())}function d(v){_t("onerror",v),b(),e.removeListener("error",d),$Fe(e,"error")===0&&aw(e,v)}IZr(e,"error",d);function p(){e.removeListener("finish",h),b()}e.once("close",p);function h(){_t("onfinish"),e.removeListener("close",p),b()}e.once("finish",h);function b(){_t("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(_t("pipe resume"),t.resume()),e};function LZr(e){return function(){var t=e._readableState;_t("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&$Fe(e,"data")&&(t.flowing=!0,TV(e))}}Ht.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=n4e(r.pipes,e);return o===-1?this:(r.pipes.splice(o,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};Ht.prototype.on=function(e,r){var t=iw.prototype.on.call(this,e,r),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,_t("on readable",n.length,n.reading),n.length?hF(this):n.reading||process.nextTick(qZr,this)),t};Ht.prototype.addListener=Ht.prototype.on;Ht.prototype.removeListener=function(e,r){var t=iw.prototype.removeListener.call(this,e,r);return e==="readable"&&process.nextTick(r4e,this),t};Ht.prototype.removeAllListeners=function(e){var r=iw.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(r4e,this),r};function r4e(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:e.listenerCount("data")>0&&e.resume()}function qZr(e){_t("readable nexttick read 0"),e.read(0)}Ht.prototype.resume=function(){var e=this._readableState;return e.flowing||(_t("resume"),e.flowing=!e.readableListening,NZr(this,e)),e.paused=!1,this};function NZr(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(UZr,e,r))}function UZr(e,r){_t("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),TV(e),r.flowing&&!r.reading&&e.read(0)}Ht.prototype.pause=function(){return _t("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_t("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function TV(e){var r=e._readableState;for(_t("flow",r.flowing);r.flowing&&e.read()!==null;);}Ht.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(_t("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(_t("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var s=r.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a<wV.length;a++)e.on(wV[a],this.emit.bind(this,wV[a]));return this._read=function(o){_t("wrapped _read",o),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(Ht.prototype[Symbol.asyncIterator]=function(){return _V===void 0&&(_V=HFe()),_V(this)});Object.defineProperty(Ht.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Ht.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Ht.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}});Ht._fromList=t4e;Object.defineProperty(Ht.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function t4e(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.first():t=r.buffer.concat(r.length),r.buffer.clear()):t=r.buffer.consume(e,r.decoder),t}function CV(e){var r=e._readableState;_t("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,process.nextTick(GZr,r,e))}function GZr(e,r){if(_t("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var t=r._writableState;(!t||t.autoDestroy&&t.finished)&&r.destroy()}}typeof Symbol=="function"&&(Ht.from=function(e,r){return EV===void 0&&(EV=YFe()),EV(Ht,e,r)});function n4e(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var DV=m((zIt,o4e)=>{"use strict";o4e.exports=qf;var mF=nh().codes,zZr=mF.ERR_METHOD_NOT_IMPLEMENTED,HZr=mF.ERR_MULTIPLE_CALLBACK,WZr=mF.ERR_TRANSFORM_ALREADY_TRANSFORMING,VZr=mF.ERR_TRANSFORM_WITH_LENGTH_0,gF=wm();at()(qf,gF);function KZr(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(n===null)return this.emit("error",new HZr);t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function qf(e){if(!(this instanceof qf))return new qf(e);gF.call(this,e),this._transformState={afterTransform:KZr.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",YZr)}function YZr(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(r,t){a4e(e,r,t)}):a4e(this,null,null)}qf.prototype.push=function(e,r){return this._transformState.needTransform=!1,gF.prototype.push.call(this,e,r)};qf.prototype._transform=function(e,r,t){t(new zZr("_transform()"))};qf.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};qf.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};qf.prototype._destroy=function(e,r){gF.prototype._destroy.call(this,e,function(t){r(t)})};function a4e(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),e._writableState.length)throw new VZr;if(e._transformState.transforming)throw new WZr;return e.push(null)}});var l4e=m((HIt,u4e)=>{"use strict";u4e.exports=ow;var s4e=DV();at()(ow,s4e);function ow(e){if(!(this instanceof ow))return new ow(e);s4e.call(this,e)}ow.prototype._transform=function(e,r,t){t(null,e)}});var h4e=m((WIt,p4e)=>{"use strict";var kV;function $Zr(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var c4e=nh().codes,XZr=c4e.ERR_MISSING_ARGS,JZr=c4e.ERR_STREAM_DESTROYED;function f4e(e){if(e)throw e}function QZr(e){return e.setHeader&&typeof e.abort=="function"}function ZZr(e,r,t,n){n=$Zr(n);var i=!1;e.on("close",function(){i=!0}),kV===void 0&&(kV=lF()),kV(e,{readable:r,writable:t},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,QZr(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new JZr("pipe"))}}}function d4e(e){e()}function eet(e,r){return e.pipe(r)}function ret(e){return!e.length||typeof e[e.length-1]!="function"?f4e:e.pop()}function tet(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=ret(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new XZr("streams");var i,a=r.map(function(o,s){var u=s<r.length-1,l=s>0;return ZZr(o,u,l,function(c){i||(i=c),c&&a.forEach(d4e),!u&&(a.forEach(d4e),n(i))})});return r.reduce(eet)}p4e.exports=tet});var OV=m((au,uw)=>{var sw=require("stream");process.env.READABLE_STREAM==="disable"&&sw?(uw.exports=sw.Readable,Object.assign(uw.exports,sw),uw.exports.Stream=sw):(au=uw.exports=hV(),au.Stream=sw||au,au.Readable=au,au.Writable=fV(),au.Duplex=wm(),au.Transform=DV(),au.PassThrough=l4e(),au.finished=lF(),au.pipeline=h4e())});var FV=m((VIt,m4e)=>{var net=require("stream").Stream,iet=OV().PassThrough,RV=m4e.exports={};RV.isStream=function(e){return e instanceof net};RV.normalizeInputSource=function(e){if(e===null)return Buffer.alloc(0);if(typeof e=="string")return Buffer.from(e);if(RV.isStream(e)&&!e._readableState){var r=new iet;return e.pipe(r),r}return e}});var PV=m((KIt,v4e)=>{var aet=require("util").inherits,IV=OV().Transform,oet=rF(),g4e=FV(),cs=v4e.exports=function(e){if(!(this instanceof cs))return new cs(e);IV.call(this,e),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};aet(cs,IV);cs.prototype._appendBuffer=function(e,r,t){};cs.prototype._appendStream=function(e,r,t){};cs.prototype._emitErrorCallback=function(e){e&&this.emit("error",e)};cs.prototype._finish=function(e){};cs.prototype._normalizeEntry=function(e){};cs.prototype._transform=function(e,r,t){t(null,e)};cs.prototype.entry=function(e,r,t){if(r=r||null,typeof t!="function"&&(t=this._emitErrorCallback.bind(this)),!(e instanceof oet)){t(new Error("not a valid instance of ArchiveEntry"));return}if(this._archive.finish||this._archive.finished){t(new Error("unacceptable entry after finish"));return}if(this._archive.processing){t(new Error("already processing an entry"));return}if(this._archive.processing=!0,this._normalizeEntry(e),this._entry=e,r=g4e.normalizeInputSource(r),Buffer.isBuffer(r))this._appendBuffer(e,r,t);else if(g4e.isStream(r))this._appendStream(e,r,t);else{this._archive.processing=!1,t(new Error("input source must be valid Stream or Buffer instance"));return}return this};cs.prototype.finish=function(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()};cs.prototype.getBytesWritten=function(){return this.offset};cs.prototype.write=function(e,r){return e&&(this.offset+=e.length),IV.prototype.write.call(this,e,r)}});var LV=m((YIt,y4e)=>{var uh=require("buffer").Buffer,BV=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array!="undefined"&&(BV=new Int32Array(BV));function b4e(e){if(uh.isBuffer(e))return e;var r=typeof uh.alloc=="function"&&typeof uh.from=="function";if(typeof e=="number")return r?uh.alloc(e):new uh(e);if(typeof e=="string")return r?uh.from(e):new uh(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function set(e){var r=b4e(4);return r.writeInt32BE(e,0),r}function jV(e,r){e=b4e(e),uh.isBuffer(r)&&(r=r.readUInt32BE(0));for(var t=~~r^-1,n=0;n<e.length;n++)t=BV[(t^e[n])&255]^t>>>8;return t^-1}function MV(){return set(jV.apply(null,arguments))}MV.signed=function(){return jV.apply(null,arguments)};MV.unsigned=function(){return jV.apply(null,arguments)>>>0};y4e.exports=MV});var qV=m(($It,x4e)=>{x4e.exports=require("stream")});var T4e=m((XIt,A4e)=>{"use strict";function _4e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function E4e(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?_4e(Object(t),!0).forEach(function(n){uet(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_4e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function uet(e,r,t){return r=S4e(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function cet(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function w4e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S4e(n.key),n)}}function fet(e,r,t){return r&&w4e(e.prototype,r),t&&w4e(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function S4e(e){var r=det(e,"string");return typeof r=="symbol"?r:String(r)}function det(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var pet=require("buffer"),vF=pet.Buffer,het=require("util"),NV=het.inspect,met=NV&&NV.custom||"inspect";function get(e,r,t){vF.prototype.copy.call(e,r,t)}A4e.exports=function(){function e(){cet(this,e),this.head=null,this.tail=null,this.length=0}return fet(e,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(this.length===0)return vF.alloc(0);for(var n=vF.allocUnsafe(t>>>0),i=this.head,a=0;i;)get(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):t===this.head.data.length?i=this.shift():i=n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,a=n.data;for(t-=a.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?a+=o:a+=o.slice(0,t),t-=s,t===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(t){var n=vF.allocUnsafe(t),i=this.head,a=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,t===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:met,value:function(t,n){return NV(this,E4e(E4e({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var GV=m((JIt,D4e)=>{"use strict";function vet(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(UV,this,e)):process.nextTick(UV,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!r&&a?t._writableState?t._writableState.errorEmitted?process.nextTick(bF,t):(t._writableState.errorEmitted=!0,process.nextTick(C4e,t,a)):process.nextTick(C4e,t,a):r?(process.nextTick(bF,t),r(a)):process.nextTick(bF,t)}),this)}function C4e(e,r){UV(e,r),bF(e)}function bF(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function bet(){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 UV(e,r){e.emit("error",r)}function yet(e,r){var t=e._readableState,n=e._writableState;t&&t.autoDestroy||n&&n.autoDestroy?e.destroy(r):e.emit("error",r)}D4e.exports={destroy:vet,undestroy:bet,errorOrDestroy:yet}});var lh=m((QIt,R4e)=>{"use strict";var k4e={};function ou(e,r,t){t||(t=Error);function n(a,o,s){return typeof r=="string"?r:r(a,o,s)}class i extends t{constructor(o,s,u){super(n(o,s,u))}}i.prototype.name=t.name,i.prototype.code=e,k4e[e]=i}function O4e(e,r){if(Array.isArray(e)){let t=e.length;return e=e.map(n=>String(n)),t>2?`one of ${r} ${e.slice(0,t-1).join(", ")}, or `+e[t-1]:t===2?`one of ${r} ${e[0]} or ${e[1]}`:`of ${r} ${e[0]}`}else return`of ${r} ${String(e)}`}function xet(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function _et(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function Eet(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}ou("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);ou("ERR_INVALID_ARG_TYPE",function(e,r,t){let n;typeof r=="string"&&xet(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";let i;if(_et(e," argument"))i=`The ${e} ${n} ${O4e(r,"type")}`;else{let a=Eet(e,".")?"property":"argument";i=`The "${e}" ${a} ${n} ${O4e(r,"type")}`}return i+=`. Received type ${typeof t}`,i},TypeError);ou("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ou("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});ou("ERR_STREAM_PREMATURE_CLOSE","Premature close");ou("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});ou("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ou("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ou("ERR_STREAM_WRITE_AFTER_END","write after end");ou("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ou("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);ou("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");R4e.exports.codes=k4e});var zV=m((ZIt,F4e)=>{"use strict";var wet=lh().codes.ERR_INVALID_OPT_VALUE;function Aet(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function Tet(e,r,t,n){var i=Aet(r,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?t:"highWaterMark";throw new wet(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}F4e.exports={getHighWaterMark:Tet}});var VV=m((ePt,L4e)=>{"use strict";L4e.exports=hi;function I4e(e){var r=this;this.next=null,this.entry=null,this.finish=function(){Zet(r,e)}}var Zy;hi.WritableState=lw;var Cet={deprecate:d0()},P4e=qV(),yF=require("buffer").Buffer,Det=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function ket(e){return yF.from(e)}function Oet(e){return yF.isBuffer(e)||e instanceof Det}var HV=GV(),Ret=zV(),Fet=Ret.getHighWaterMark,ch=lh().codes,Iet=ch.ERR_INVALID_ARG_TYPE,Pet=ch.ERR_METHOD_NOT_IMPLEMENTED,Bet=ch.ERR_MULTIPLE_CALLBACK,jet=ch.ERR_STREAM_CANNOT_PIPE,Met=ch.ERR_STREAM_DESTROYED,Let=ch.ERR_STREAM_NULL_VALUES,qet=ch.ERR_STREAM_WRITE_AFTER_END,Net=ch.ERR_UNKNOWN_ENCODING,ex=HV.errorOrDestroy;at()(hi,P4e);function Uet(){}function lw(e,r,t){Zy=Zy||Cm(),e=e||{},typeof t!="boolean"&&(t=r instanceof Zy),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=Fet(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){Yet(r,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new I4e(this)}lw.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(lw.prototype,"buffer",{get:Cet.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var xF;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(xF=Function.prototype[Symbol.hasInstance],Object.defineProperty(hi,Symbol.hasInstance,{value:function(r){return xF.call(this,r)?!0:this!==hi?!1:r&&r._writableState instanceof lw}})):xF=function(r){return r instanceof this};function hi(e){Zy=Zy||Cm();var r=this instanceof Zy;if(!r&&!xF.call(hi,this))return new hi(e);this._writableState=new lw(e,this,r),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)),P4e.call(this)}hi.prototype.pipe=function(){ex(this,new jet)};function Get(e,r){var t=new qet;ex(e,t),process.nextTick(r,t)}function zet(e,r,t,n){var i;return t===null?i=new Let:typeof t!="string"&&!r.objectMode&&(i=new Iet("chunk",["string","Buffer"],t)),i?(ex(e,i),process.nextTick(n,i),!1):!0}hi.prototype.write=function(e,r,t){var n=this._writableState,i=!1,a=!n.objectMode&&Oet(e);return a&&!yF.isBuffer(e)&&(e=ket(e)),typeof r=="function"&&(t=r,r=null),a?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=Uet),n.ending?Get(this,t):(a||zet(this,n,e,t))&&(n.pendingcb++,i=Wet(this,n,a,e,r,t)),i};hi.prototype.cork=function(){this._writableState.corked++};hi.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&j4e(this,e))};hi.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new Net(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(hi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Het(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=yF.from(r,t)),r}Object.defineProperty(hi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Wet(e,r,t,n,i,a){if(!t){var o=Het(r,n,i);n!==o&&(t=!0,i="buffer",n=o)}var s=r.objectMode?1:n.length;r.length+=s;var u=r.length<r.highWaterMark;if(u||(r.needDrain=!0),r.writing||r.corked){var l=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:a,next:null},l?l.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else WV(e,r,!1,s,n,i,a);return u}function WV(e,r,t,n,i,a,o){r.writelen=n,r.writecb=o,r.writing=!0,r.sync=!0,r.destroyed?r.onwrite(new Met("write")):t?e._writev(i,r.onwrite):e._write(i,a,r.onwrite),r.sync=!1}function Vet(e,r,t,n,i){--r.pendingcb,t?(process.nextTick(i,n),process.nextTick(cw,e,r),e._writableState.errorEmitted=!0,ex(e,n)):(i(n),e._writableState.errorEmitted=!0,ex(e,n),cw(e,r))}function Ket(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Yet(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(typeof i!="function")throw new Bet;if(Ket(t),r)Vet(e,t,n,r,i);else{var a=M4e(t)||e.destroyed;!a&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&j4e(e,t),n?process.nextTick(B4e,e,t,a,i):B4e(e,t,a,i)}}function B4e(e,r,t,n){t||$et(e,r),r.pendingcb--,n(),cw(e,r)}function $et(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function j4e(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),a=r.corkedRequestsFree;a.entry=t;for(var o=0,s=!0;t;)i[o]=t,t.isBuf||(s=!1),t=t.next,o+=1;i.allBuffers=s,WV(e,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new I4e(r),r.bufferedRequestCount=0}else{for(;t;){var u=t.chunk,l=t.encoding,c=t.callback,f=r.objectMode?1:u.length;if(WV(e,r,!1,f,u,l,c),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}hi.prototype._write=function(e,r,t){t(new Pet("_write()"))};hi.prototype._writev=null;hi.prototype.end=function(e,r,t){var n=this._writableState;return typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||Qet(this,n,t),this};Object.defineProperty(hi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function M4e(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Xet(e,r){e._final(function(t){r.pendingcb--,t&&ex(e,t),r.prefinished=!0,e.emit("prefinish"),cw(e,r)})}function Jet(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"&&!r.destroyed?(r.pendingcb++,r.finalCalled=!0,process.nextTick(Xet,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function cw(e,r){var t=M4e(r);if(t&&(Jet(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"),r.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return t}function Qet(e,r,t){r.ending=!0,cw(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function Zet(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(hi.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(r){!this._writableState||(this._writableState.destroyed=r)}});hi.prototype.destroy=HV.destroy;hi.prototype._undestroy=HV.undestroy;hi.prototype._destroy=function(e,r){r(e)}});var Cm=m((rPt,N4e)=>{"use strict";var ert=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};N4e.exports=vc;var q4e=$V(),KV=VV();at()(vc,q4e);for(YV=ert(KV.prototype),_F=0;_F<YV.length;_F++)EF=YV[_F],vc.prototype[EF]||(vc.prototype[EF]=KV.prototype[EF]);var YV,EF,_F;function vc(e){if(!(this instanceof vc))return new vc(e);q4e.call(this,e),KV.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",rrt)))}Object.defineProperty(vc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(vc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(vc.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function rrt(){this._writableState.ended||process.nextTick(trt,this)}function trt(e){e.end()}Object.defineProperty(vc.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(r){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=r,this._writableState.destroyed=r)}})});var QV=m(G4e=>{"use strict";var XV=vu().Buffer,U4e=XV.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 nrt(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function irt(e){var r=nrt(e);if(typeof r!="string"&&(XV.isEncoding===U4e||!U4e(e)))throw new Error("Unknown encoding: "+e);return r||e}G4e.StringDecoder=fw;function fw(e){this.encoding=irt(e);var r;switch(this.encoding){case"utf16le":this.text=crt,this.end=frt,r=4;break;case"utf8":this.fillLast=srt,r=4;break;case"base64":this.text=drt,this.end=prt,r=3;break;default:this.write=hrt,this.end=mrt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=XV.allocUnsafe(r)}fw.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""};fw.prototype.end=lrt;fw.prototype.text=urt;fw.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 JV(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function art(e,r,t){var n=r.length-1;if(n<t)return 0;var i=JV(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=JV(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=JV(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function ort(e,r,t){if((r[0]&192)!=128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!=128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!=128)return e.lastNeed=2,"\uFFFD"}}function srt(e){var r=this.lastTotal-this.lastNeed,t=ort(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function urt(e,r){var t=art(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",r,n)}function lrt(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function crt(e,r){if((e.length-r)%2==0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.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],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function frt(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function drt(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function prt(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function hrt(e){return e.toString(this.encoding)}function mrt(e){return e&&e.length?this.write(e):""}});var wF=m((nPt,W4e)=>{"use strict";var z4e=lh().codes.ERR_STREAM_PREMATURE_CLOSE;function grt(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e.apply(this,n)}}}function vrt(){}function brt(e){return e.setHeader&&typeof e.abort=="function"}function H4e(e,r,t){if(typeof r=="function")return H4e(e,null,r);r||(r={}),t=grt(t||vrt);var n=r.readable||r.readable!==!1&&e.readable,i=r.writable||r.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){i=!1,o=!0,n||t.call(e)},u=e._readableState&&e._readableState.endEmitted,l=function(){n=!1,u=!0,i||t.call(e)},c=function(h){t.call(e,h)},f=function(){var h;if(n&&!u)return(!e._readableState||!e._readableState.ended)&&(h=new z4e),t.call(e,h);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(h=new z4e),t.call(e,h)},d=function(){e.req.on("finish",s)};return brt(e)?(e.on("complete",s),e.on("abort",f),e.req?d():e.on("request",d)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",s),r.error!==!1&&e.on("error",c),e.on("close",f),function(){e.removeListener("complete",s),e.removeListener("abort",f),e.removeListener("request",d),e.req&&e.req.removeListener("finish",s),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",s),e.removeListener("end",l),e.removeListener("error",c),e.removeListener("close",f)}}W4e.exports=H4e});var K4e=m((iPt,V4e)=>{"use strict";var SF;function fh(e,r,t){return r=yrt(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function yrt(e){var r=xrt(e,"string");return typeof r=="symbol"?r:String(r)}function xrt(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var _rt=wF(),dh=Symbol("lastResolve"),Dm=Symbol("lastReject"),dw=Symbol("error"),AF=Symbol("ended"),km=Symbol("lastPromise"),ZV=Symbol("handlePromise"),Om=Symbol("stream");function ph(e,r){return{value:e,done:r}}function Ert(e){var r=e[dh];if(r!==null){var t=e[Om].read();t!==null&&(e[km]=null,e[dh]=null,e[Dm]=null,r(ph(t,!1)))}}function wrt(e){process.nextTick(Ert,e)}function Srt(e,r){return function(t,n){e.then(function(){if(r[AF]){t(ph(void 0,!0));return}r[ZV](t,n)},n)}}var Art=Object.getPrototypeOf(function(){}),Trt=Object.setPrototypeOf((SF={get stream(){return this[Om]},next:function(){var r=this,t=this[dw];if(t!==null)return Promise.reject(t);if(this[AF])return Promise.resolve(ph(void 0,!0));if(this[Om].destroyed)return new Promise(function(o,s){process.nextTick(function(){r[dw]?s(r[dw]):o(ph(void 0,!0))})});var n=this[km],i;if(n)i=new Promise(Srt(n,this));else{var a=this[Om].read();if(a!==null)return Promise.resolve(ph(a,!1));i=new Promise(this[ZV])}return this[km]=i,i}},fh(SF,Symbol.asyncIterator,function(){return this}),fh(SF,"return",function(){var r=this;return new Promise(function(t,n){r[Om].destroy(null,function(i){if(i){n(i);return}t(ph(void 0,!0))})})}),SF),Art),Crt=function(r){var t,n=Object.create(Trt,(t={},fh(t,Om,{value:r,writable:!0}),fh(t,dh,{value:null,writable:!0}),fh(t,Dm,{value:null,writable:!0}),fh(t,dw,{value:null,writable:!0}),fh(t,AF,{value:r._readableState.endEmitted,writable:!0}),fh(t,ZV,{value:function(a,o){var s=n[Om].read();s?(n[km]=null,n[dh]=null,n[Dm]=null,a(ph(s,!1))):(n[dh]=a,n[Dm]=o)},writable:!0}),t));return n[km]=null,_rt(r,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[Dm];a!==null&&(n[km]=null,n[dh]=null,n[Dm]=null,a(i)),n[dw]=i;return}var o=n[dh];o!==null&&(n[km]=null,n[dh]=null,n[Dm]=null,o(ph(void 0,!0))),n[AF]=!0}),r.on("readable",wrt.bind(null,n)),n};V4e.exports=Crt});var J4e=m((aPt,X4e)=>{"use strict";function Y4e(e,r,t,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){t(l);return}s.done?r(u):Promise.resolve(u).then(n,i)}function Drt(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var a=e.apply(r,t);function o(u){Y4e(a,n,i,o,s,"next",u)}function s(u){Y4e(a,n,i,o,s,"throw",u)}o(void 0)})}}function $4e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function krt(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?$4e(Object(t),!0).forEach(function(n){Ort(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$4e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ort(e,r,t){return r=Rrt(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Rrt(e){var r=Frt(e,"string");return typeof r=="symbol"?r:String(r)}function Frt(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Irt=lh().codes.ERR_INVALID_ARG_TYPE;function Prt(e,r,t){var n;if(r&&typeof r.next=="function")n=r;else if(r&&r[Symbol.asyncIterator])n=r[Symbol.asyncIterator]();else if(r&&r[Symbol.iterator])n=r[Symbol.iterator]();else throw new Irt("iterable",["Iterable"],r);var i=new e(krt({objectMode:!0},t)),a=!1;i._read=function(){a||(a=!0,o())};function o(){return s.apply(this,arguments)}function s(){return s=Drt(function*(){try{var u=yield n.next(),l=u.value,c=u.done;c?i.push(null):i.push(yield l)?o():a=!1}catch(f){i.destroy(f)}}),s.apply(this,arguments)}return i}X4e.exports=Prt});var $V=m((sPt,sIe)=>{"use strict";sIe.exports=Wt;var rx;Wt.ReadableState=Z4e;var oPt=require("events").EventEmitter,Q4e=function(r,t){return r.listeners(t).length},pw=qV(),TF=require("buffer").Buffer,Brt=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function jrt(e){return TF.from(e)}function Mrt(e){return TF.isBuffer(e)||e instanceof Brt}var eK=require("util"),Et;eK&&eK.debuglog?Et=eK.debuglog("stream"):Et=function(){};var Lrt=T4e(),rK=GV(),qrt=zV(),Nrt=qrt.getHighWaterMark,CF=lh().codes,Urt=CF.ERR_INVALID_ARG_TYPE,Grt=CF.ERR_STREAM_PUSH_AFTER_EOF,zrt=CF.ERR_METHOD_NOT_IMPLEMENTED,Hrt=CF.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,tx,tK,nK;at()(Wt,pw);var hw=rK.errorOrDestroy,iK=["error","close","destroy","pause","resume"];function Wrt(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Array.isArray(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function Z4e(e,r,t){rx=rx||Cm(),e=e||{},typeof t!="boolean"&&(t=r instanceof rx),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Nrt(this,e,"readableHighWaterMark",t),this.buffer=new Lrt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(tx||(tx=QV().StringDecoder),this.decoder=new tx(e.encoding),this.encoding=e.encoding)}function Wt(e){if(rx=rx||Cm(),!(this instanceof Wt))return new Wt(e);var r=this instanceof rx;this._readableState=new Z4e(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),pw.call(this)}Object.defineProperty(Wt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){!this._readableState||(this._readableState.destroyed=r)}});Wt.prototype.destroy=rK.destroy;Wt.prototype._undestroy=rK.undestroy;Wt.prototype._destroy=function(e,r){r(e)};Wt.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=TF.from(e,r),r=""),n=!0),eIe(this,e,r,!1,n)};Wt.prototype.unshift=function(e){return eIe(this,e,null,!0,!1)};function eIe(e,r,t,n,i){Et("readableAddChunk",r);var a=e._readableState;if(r===null)a.reading=!1,Yrt(e,a);else{var o;if(i||(o=Vrt(a,r)),o)hw(e,o);else if(a.objectMode||r&&r.length>0)if(typeof r!="string"&&!a.objectMode&&Object.getPrototypeOf(r)!==TF.prototype&&(r=jrt(r)),n)a.endEmitted?hw(e,new Hrt):aK(e,a,r,!0);else if(a.ended)hw(e,new Grt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!t?(r=a.decoder.write(r),a.objectMode||r.length!==0?aK(e,a,r,!1):oK(e,a)):aK(e,a,r,!1)}else n||(a.reading=!1,oK(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function aK(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,e.emit("data",t)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&DF(e)),oK(e,r)}function Vrt(e,r){var t;return!Mrt(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new Urt("chunk",["string","Buffer","Uint8Array"],r)),t}Wt.prototype.isPaused=function(){return this._readableState.flowing===!1};Wt.prototype.setEncoding=function(e){tx||(tx=QV().StringDecoder);var r=new tx(e);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var t=this._readableState.buffer.head,n="";t!==null;)n+=r.write(t.data),t=t.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var rIe=1073741824;function Krt(e){return e>=rIe?e=rIe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function tIe(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=Krt(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}Wt.prototype.read=function(e){Et("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return Et("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?uK(this):DF(this),null;if(e=tIe(e,r),e===0&&r.ended)return r.length===0&&uK(this),null;var n=r.needReadable;Et("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,Et("length less than watermark",n)),r.ended||r.reading?(n=!1,Et("reading or ended",n)):n&&(Et("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=tIe(t,r)));var i;return e>0?i=aIe(e,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&uK(this)),i!==null&&this.emit("data",i),i};function Yrt(e,r){if(Et("onEofChunk"),!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.sync?DF(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,nIe(e)))}}function DF(e){var r=e._readableState;Et("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(Et("emitReadable",r.flowing),r.emittedReadable=!0,process.nextTick(nIe,e))}function nIe(e){var r=e._readableState;Et("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,sK(e)}function oK(e,r){r.readingMore||(r.readingMore=!0,process.nextTick($rt,e,r))}function $rt(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var t=r.length;if(Et("maybeReadMore read 0"),e.read(0),t===r.length)break}r.readingMore=!1}Wt.prototype._read=function(e){hw(this,new zrt("_read()"))};Wt.prototype.pipe=function(e,r){var t=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,Et("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:b;n.endEmitted?process.nextTick(a):t.once("end",a),e.on("unpipe",o);function o(v,y){Et("onunpipe"),v===t&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,c())}function s(){Et("onend"),e.end()}var u=Xrt(t);e.on("drain",u);var l=!1;function c(){Et("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",b),t.removeListener("data",f),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}t.on("data",f);function f(v){Et("ondata");var y=e.write(v);Et("dest.write",y),y===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&oIe(n.pipes,e)!==-1)&&!l&&(Et("false write response, pause",n.awaitDrain),n.awaitDrain++),t.pause())}function d(v){Et("onerror",v),b(),e.removeListener("error",d),Q4e(e,"error")===0&&hw(e,v)}Wrt(e,"error",d);function p(){e.removeListener("finish",h),b()}e.once("close",p);function h(){Et("onfinish"),e.removeListener("close",p),b()}e.once("finish",h);function b(){Et("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(Et("pipe resume"),t.resume()),e};function Xrt(e){return function(){var t=e._readableState;Et("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&Q4e(e,"data")&&(t.flowing=!0,sK(e))}}Wt.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=oIe(r.pipes,e);return o===-1?this:(r.pipes.splice(o,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};Wt.prototype.on=function(e,r){var t=pw.prototype.on.call(this,e,r),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Et("on readable",n.length,n.reading),n.length?DF(this):n.reading||process.nextTick(Jrt,this)),t};Wt.prototype.addListener=Wt.prototype.on;Wt.prototype.removeListener=function(e,r){var t=pw.prototype.removeListener.call(this,e,r);return e==="readable"&&process.nextTick(iIe,this),t};Wt.prototype.removeAllListeners=function(e){var r=pw.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(iIe,this),r};function iIe(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:e.listenerCount("data")>0&&e.resume()}function Jrt(e){Et("readable nexttick read 0"),e.read(0)}Wt.prototype.resume=function(){var e=this._readableState;return e.flowing||(Et("resume"),e.flowing=!e.readableListening,Qrt(this,e)),e.paused=!1,this};function Qrt(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(Zrt,e,r))}function Zrt(e,r){Et("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),sK(e),r.flowing&&!r.reading&&e.read(0)}Wt.prototype.pause=function(){return Et("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Et("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function sK(e){var r=e._readableState;for(Et("flow",r.flowing);r.flowing&&e.read()!==null;);}Wt.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(Et("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(Et("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var s=r.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a<iK.length;a++)e.on(iK[a],this.emit.bind(this,iK[a]));return this._read=function(o){Et("wrapped _read",o),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(Wt.prototype[Symbol.asyncIterator]=function(){return tK===void 0&&(tK=K4e()),tK(this)});Object.defineProperty(Wt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Wt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Wt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}});Wt._fromList=aIe;Object.defineProperty(Wt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function aIe(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.first():t=r.buffer.concat(r.length),r.buffer.clear()):t=r.buffer.consume(e,r.decoder),t}function uK(e){var r=e._readableState;Et("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,process.nextTick(ett,r,e))}function ett(e,r){if(Et("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var t=r._writableState;(!t||t.autoDestroy&&t.finished)&&r.destroy()}}typeof Symbol=="function"&&(Wt.from=function(e,r){return nK===void 0&&(nK=J4e()),nK(Wt,e,r)});function oIe(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var lK=m((uPt,lIe)=>{"use strict";lIe.exports=Nf;var kF=lh().codes,rtt=kF.ERR_METHOD_NOT_IMPLEMENTED,ttt=kF.ERR_MULTIPLE_CALLBACK,ntt=kF.ERR_TRANSFORM_ALREADY_TRANSFORMING,itt=kF.ERR_TRANSFORM_WITH_LENGTH_0,OF=Cm();at()(Nf,OF);function att(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(n===null)return this.emit("error",new ttt);t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Nf(e){if(!(this instanceof Nf))return new Nf(e);OF.call(this,e),this._transformState={afterTransform:att.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",ott)}function ott(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(r,t){uIe(e,r,t)}):uIe(this,null,null)}Nf.prototype.push=function(e,r){return this._transformState.needTransform=!1,OF.prototype.push.call(this,e,r)};Nf.prototype._transform=function(e,r,t){t(new rtt("_transform()"))};Nf.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Nf.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};Nf.prototype._destroy=function(e,r){OF.prototype._destroy.call(this,e,function(t){r(t)})};function uIe(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),e._writableState.length)throw new itt;if(e._transformState.transforming)throw new ntt;return e.push(null)}});var dIe=m((lPt,fIe)=>{"use strict";fIe.exports=mw;var cIe=lK();at()(mw,cIe);function mw(e){if(!(this instanceof mw))return new mw(e);cIe.call(this,e)}mw.prototype._transform=function(e,r,t){t(null,e)}});var vIe=m((cPt,gIe)=>{"use strict";var cK;function stt(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var pIe=lh().codes,utt=pIe.ERR_MISSING_ARGS,ltt=pIe.ERR_STREAM_DESTROYED;function hIe(e){if(e)throw e}function ctt(e){return e.setHeader&&typeof e.abort=="function"}function ftt(e,r,t,n){n=stt(n);var i=!1;e.on("close",function(){i=!0}),cK===void 0&&(cK=wF()),cK(e,{readable:r,writable:t},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,ctt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new ltt("pipe"))}}}function mIe(e){e()}function dtt(e,r){return e.pipe(r)}function ptt(e){return!e.length||typeof e[e.length-1]!="function"?hIe:e.pop()}function htt(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=ptt(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new utt("streams");var i,a=r.map(function(o,s){var u=s<r.length-1,l=s>0;return ftt(o,u,l,function(c){i||(i=c),c&&a.forEach(mIe),!u&&(a.forEach(mIe),n(i))})});return r.reduce(dtt)}gIe.exports=htt});var bIe=m((su,vw)=>{var gw=require("stream");process.env.READABLE_STREAM==="disable"&&gw?(vw.exports=gw.Readable,Object.assign(vw.exports,gw),vw.exports.Stream=gw):(su=vw.exports=$V(),su.Stream=gw||su,su.Readable=su,su.Writable=VV(),su.Duplex=Cm(),su.Transform=lK(),su.PassThrough=dIe(),su.finished=wF(),su.pipeline=vIe())});var dK=m(fK=>{var yIe;(function(e){typeof DO_NOT_EXPORT_CRC=="undefined"?typeof fK=="object"?e(fK):typeof define=="function"&&define.amd?define(function(){var r={};return e(r),r}):e(yIe={}):e(yIe={})})(function(e){e.version="1.2.2";function r(){for(var k=0,L=new Array(256),I=0;I!=256;++I)k=I,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,L[I]=k;return typeof Int32Array!="undefined"?new Int32Array(L):L}var t=r();function n(k){var L=0,I=0,V=0,N=typeof Int32Array!="undefined"?new Int32Array(4096):new Array(4096);for(V=0;V!=256;++V)N[V]=k[V];for(V=0;V!=256;++V)for(I=k[V],L=256+V;L<4096;L+=256)I=N[L]=I>>>8^k[I&255];var W=[];for(V=1;V!=16;++V)W[V-1]=typeof Int32Array!="undefined"?N.subarray(V*256,V*256+256):N.slice(V*256,V*256+256);return W}var i=n(t),a=i[0],o=i[1],s=i[2],u=i[3],l=i[4],c=i[5],f=i[6],d=i[7],p=i[8],h=i[9],b=i[10],v=i[11],y=i[12],w=i[13],A=i[14];function C(k,L){for(var I=L^-1,V=0,N=k.length;V<N;)I=I>>>8^t[(I^k.charCodeAt(V++))&255];return~I}function D(k,L){for(var I=L^-1,V=k.length-15,N=0;N<V;)I=A[k[N++]^I&255]^w[k[N++]^I>>8&255]^y[k[N++]^I>>16&255]^v[k[N++]^I>>>24]^b[k[N++]]^h[k[N++]]^p[k[N++]]^d[k[N++]]^f[k[N++]]^c[k[N++]]^l[k[N++]]^u[k[N++]]^s[k[N++]]^o[k[N++]]^a[k[N++]]^t[k[N++]];for(V+=15;N<V;)I=I>>>8^t[(I^k[N++])&255];return~I}function P(k,L){for(var I=L^-1,V=0,N=k.length,W=0,M=0;V<N;)W=k.charCodeAt(V++),W<128?I=I>>>8^t[(I^W)&255]:W<2048?(I=I>>>8^t[(I^(192|W>>6&31))&255],I=I>>>8^t[(I^(128|W&63))&255]):W>=55296&&W<57344?(W=(W&1023)+64,M=k.charCodeAt(V++)&1023,I=I>>>8^t[(I^(240|W>>8&7))&255],I=I>>>8^t[(I^(128|W>>2&63))&255],I=I>>>8^t[(I^(128|M>>6&15|(W&3)<<4))&255],I=I>>>8^t[(I^(128|M&63))&255]):(I=I>>>8^t[(I^(224|W>>12&15))&255],I=I>>>8^t[(I^(128|W>>6&63))&255],I=I>>>8^t[(I^(128|W&63))&255]);return~I}e.table=t,e.bstr=C,e.buf=D,e.str=P})});var EIe=m((dPt,_Ie)=>{"use strict";var{Transform:mtt}=bIe(),gtt=dK(),xIe=class extends mtt{constructor(r){super(r);this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(r,t,n){r&&(this.checksum=gtt.buf(r,this.checksum)>>>0,this.rawSize+=r.length),n(null,r)}digest(r){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),r?t.toString(r):t}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};_Ie.exports=xIe});var AIe=m((pPt,SIe)=>{"use strict";var{DeflateRaw:vtt}=require("zlib"),btt=dK(),wIe=class extends vtt{constructor(r){super(r);this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(r,t){return r&&(this.compressedSize+=r.length),super.push(r,t)}_transform(r,t,n){r&&(this.checksum=btt.buf(r,this.checksum)>>>0,this.rawSize+=r.length),super._transform(r,t,n)}digest(r){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),r?t.toString(r):t}hex(){return this.digest("hex").toUpperCase()}size(r=!1){return r?this.compressedSize:this.rawSize}};SIe.exports=wIe});var pK=m((hPt,TIe)=>{"use strict";TIe.exports={CRC32Stream:EIe(),DeflateCRC32Stream:AIe()}});var kIe=m((bPt,DIe)=>{var ytt=require("util").inherits,xtt=LV(),{CRC32Stream:_tt}=pK(),{DeflateCRC32Stream:Ett}=pK(),CIe=PV(),mPt=nV(),gPt=rV(),ct=tV(),vPt=FV(),Vr=tF(),Ea=DIe.exports=function(e){if(!(this instanceof Ea))return new Ea(e);e=this.options=this._defaults(e),CIe.call(this,e),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:e.forceZip64,forceLocalTime:e.forceLocalTime}};ytt(Ea,CIe);Ea.prototype._afterAppend=function(e){this._entries.push(e),e.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(e),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()};Ea.prototype._appendBuffer=function(e,r,t){r.length===0&&e.setMethod(ct.METHOD_STORED);var n=e.getMethod();if(n===ct.METHOD_STORED&&(e.setSize(r.length),e.setCompressedSize(r.length),e.setCrc(xtt.unsigned(r))),this._writeLocalFileHeader(e),n===ct.METHOD_STORED){this.write(r),this._afterAppend(e),t(null,e);return}else if(n===ct.METHOD_DEFLATED){this._smartStream(e,t).end(r);return}else{t(new Error("compression method "+n+" not implemented"));return}};Ea.prototype._appendStream=function(e,r,t){e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(ct.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(e);var n=this._smartStream(e,t);r.once("error",function(i){n.emit("error",i),n.end()}),r.pipe(n)};Ea.prototype._defaults=function(e){return typeof e!="object"&&(e={}),typeof e.zlib!="object"&&(e.zlib={}),typeof e.zlib.level!="number"&&(e.zlib.level=ct.ZLIB_BEST_SPEED),e.forceZip64=!!e.forceZip64,e.forceLocalTime=!!e.forceLocalTime,e};Ea.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(e){this._writeCentralFileHeader(e)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()};Ea.prototype._normalizeEntry=function(e){e.getMethod()===-1&&e.setMethod(ct.METHOD_DEFLATED),e.getMethod()===ct.METHOD_DEFLATED&&(e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(ct.MIN_VERSION_DATA_DESCRIPTOR)),e.getTime()===-1&&e.setTime(new Date,this._archive.forceLocalTime),e._offsets={file:0,data:0,contents:0}};Ea.prototype._smartStream=function(e,r){var t=e.getMethod()===ct.METHOD_DEFLATED,n=t?new Ett(this.options.zlib):new _tt,i=null;function a(){var o=n.digest().readUInt32BE(0);e.setCrc(o),e.setSize(n.size()),e.setCompressedSize(n.size(!0)),this._afterAppend(e),r(i,e)}return n.once("end",a.bind(this)),n.once("error",function(o){i=o}),n.pipe(this,{end:!1}),n};Ea.prototype._writeCentralDirectoryEnd=function(){var e=this._entries.length,r=this._archive.centralLength,t=this._archive.centralOffset;this.isZip64()&&(e=ct.ZIP64_MAGIC_SHORT,r=ct.ZIP64_MAGIC,t=ct.ZIP64_MAGIC),this.write(Vr.getLongBytes(ct.SIG_EOCD)),this.write(ct.SHORT_ZERO),this.write(ct.SHORT_ZERO),this.write(Vr.getShortBytes(e)),this.write(Vr.getShortBytes(e)),this.write(Vr.getLongBytes(r)),this.write(Vr.getLongBytes(t));var n=this.getComment(),i=Buffer.byteLength(n);this.write(Vr.getShortBytes(i)),this.write(n)};Ea.prototype._writeCentralDirectoryZip64=function(){this.write(Vr.getLongBytes(ct.SIG_ZIP64_EOCD)),this.write(Vr.getEightBytes(44)),this.write(Vr.getShortBytes(ct.MIN_VERSION_ZIP64)),this.write(Vr.getShortBytes(ct.MIN_VERSION_ZIP64)),this.write(ct.LONG_ZERO),this.write(ct.LONG_ZERO),this.write(Vr.getEightBytes(this._entries.length)),this.write(Vr.getEightBytes(this._entries.length)),this.write(Vr.getEightBytes(this._archive.centralLength)),this.write(Vr.getEightBytes(this._archive.centralOffset)),this.write(Vr.getLongBytes(ct.SIG_ZIP64_EOCD_LOC)),this.write(ct.LONG_ZERO),this.write(Vr.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(Vr.getLongBytes(1))};Ea.prototype._writeCentralFileHeader=function(e){var r=e.getGeneralPurposeBit(),t=e.getMethod(),n=e._offsets,i=e.getSize(),a=e.getCompressedSize();if(e.isZip64()||n.file>ct.ZIP64_MAGIC){i=ct.ZIP64_MAGIC,a=ct.ZIP64_MAGIC,e.setVersionNeededToExtract(ct.MIN_VERSION_ZIP64);var o=Buffer.concat([Vr.getShortBytes(ct.ZIP64_EXTRA_ID),Vr.getShortBytes(24),Vr.getEightBytes(e.getSize()),Vr.getEightBytes(e.getCompressedSize()),Vr.getEightBytes(n.file)],28);e.setExtra(o)}this.write(Vr.getLongBytes(ct.SIG_CFH)),this.write(Vr.getShortBytes(e.getPlatform()<<8|ct.VERSION_MADEBY)),this.write(Vr.getShortBytes(e.getVersionNeededToExtract())),this.write(r.encode()),this.write(Vr.getShortBytes(t)),this.write(Vr.getLongBytes(e.getTimeDos())),this.write(Vr.getLongBytes(e.getCrc())),this.write(Vr.getLongBytes(a)),this.write(Vr.getLongBytes(i));var s=e.getName(),u=e.getComment(),l=e.getCentralDirectoryExtra();r.usesUTF8ForNames()&&(s=Buffer.from(s),u=Buffer.from(u)),this.write(Vr.getShortBytes(s.length)),this.write(Vr.getShortBytes(l.length)),this.write(Vr.getShortBytes(u.length)),this.write(ct.SHORT_ZERO),this.write(Vr.getShortBytes(e.getInternalAttributes())),this.write(Vr.getLongBytes(e.getExternalAttributes())),n.file>ct.ZIP64_MAGIC?this.write(Vr.getLongBytes(ct.ZIP64_MAGIC)):this.write(Vr.getLongBytes(n.file)),this.write(s),this.write(l),this.write(u)};Ea.prototype._writeDataDescriptor=function(e){this.write(Vr.getLongBytes(ct.SIG_DD)),this.write(Vr.getLongBytes(e.getCrc())),e.isZip64()?(this.write(Vr.getEightBytes(e.getCompressedSize())),this.write(Vr.getEightBytes(e.getSize()))):(this.write(Vr.getLongBytes(e.getCompressedSize())),this.write(Vr.getLongBytes(e.getSize())))};Ea.prototype._writeLocalFileHeader=function(e){var r=e.getGeneralPurposeBit(),t=e.getMethod(),n=e.getName(),i=e.getLocalFileDataExtra();e.isZip64()&&(r.useDataDescriptor(!0),e.setVersionNeededToExtract(ct.MIN_VERSION_ZIP64)),r.usesUTF8ForNames()&&(n=Buffer.from(n)),e._offsets.file=this.offset,this.write(Vr.getLongBytes(ct.SIG_LFH)),this.write(Vr.getShortBytes(e.getVersionNeededToExtract())),this.write(r.encode()),this.write(Vr.getShortBytes(t)),this.write(Vr.getLongBytes(e.getTimeDos())),e._offsets.data=this.offset,r.usesDataDescriptor()?(this.write(ct.LONG_ZERO),this.write(ct.LONG_ZERO),this.write(ct.LONG_ZERO)):(this.write(Vr.getLongBytes(e.getCrc())),this.write(Vr.getLongBytes(e.getCompressedSize())),this.write(Vr.getLongBytes(e.getSize()))),this.write(Vr.getShortBytes(n.length)),this.write(Vr.getShortBytes(i.length)),this.write(n),this.write(i),e._offsets.contents=this.offset};Ea.prototype.getComment=function(e){return this._archive.comment!==null?this._archive.comment:""};Ea.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>ct.ZIP64_MAGIC_SHORT||this._archive.centralLength>ct.ZIP64_MAGIC||this._archive.centralOffset>ct.ZIP64_MAGIC};Ea.prototype.setComment=function(e){this._archive.comment=e}});var hK=m((yPt,OIe)=>{OIe.exports={ArchiveEntry:rF(),ZipArchiveEntry:nV(),ArchiveOutputStream:PV(),ZipArchiveOutputStream:kIe()}});var FIe=m((xPt,RIe)=>{var wtt=require("util").inherits,mK=hK().ZipArchiveOutputStream,Stt=hK().ZipArchiveEntry,gK=Hy(),nx=RIe.exports=function(e){if(!(this instanceof nx))return new nx(e);e=this.options=e||{},e.zlib=e.zlib||{},mK.call(this,e),typeof e.level=="number"&&e.level>=0&&(e.zlib.level=e.level,delete e.level),!e.forceZip64&&typeof e.zlib.level=="number"&&e.zlib.level===0&&(e.store=!0),e.namePrependSlash=e.namePrependSlash||!1,e.comment&&e.comment.length>0&&this.setComment(e.comment)};wtt(nx,mK);nx.prototype._normalizeFileData=function(e){e=gK.defaults(e,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var r=e.type==="directory",t=e.type==="symlink";return e.name&&(e.name=gK.sanitizePath(e.name),!t&&e.name.slice(-1)==="/"?(r=!0,e.type="directory"):r&&(e.name+="/")),(r||t)&&(e.store=!0),e.date=gK.dateify(e.date),e};nx.prototype.entry=function(e,r,t){if(typeof t!="function"&&(t=this._emitErrorCallback.bind(this)),r=this._normalizeFileData(r),r.type!=="file"&&r.type!=="directory"&&r.type!=="symlink"){t(new Error(r.type+" entries not currently supported"));return}if(typeof r.name!="string"||r.name.length===0){t(new Error("entry name must be a non-empty string value"));return}if(r.type==="symlink"&&typeof r.linkname!="string"){t(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var n=new Stt(r.name);return n.setTime(r.date,this.options.forceLocalTime),r.namePrependSlash&&n.setName(r.name,!0),r.store&&n.setMethod(0),r.comment.length>0&&n.setComment(r.comment),r.type==="symlink"&&typeof r.mode!="number"&&(r.mode=40960),typeof r.mode=="number"&&(r.type==="symlink"&&(r.mode|=40960),n.setUnixMode(r.mode)),r.type==="symlink"&&typeof r.linkname=="string"&&(e=Buffer.from(r.linkname)),mK.prototype.entry.call(this,n,e,t)};nx.prototype.finalize=function(){this.finish()}});var PIe=m((_Pt,IIe)=>{var Att=FIe(),Ttt=Hy(),hh=function(e){if(!(this instanceof hh))return new hh(e);e=this.options=Ttt.defaults(e,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new Att(e)};hh.prototype.append=function(e,r,t){this.engine.entry(e,r,t)};hh.prototype.finalize=function(){this.engine.finalize()};hh.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};hh.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)};hh.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)};IIe.exports=hh});var yK=m(ax=>{var Ctt=Buffer.alloc,Dtt="0000000000000000000",ktt="7777777777777777777",BIe="0".charCodeAt(0),jIe=Buffer.from("ustar\0","binary"),Ott=Buffer.from("00","binary"),Rtt=Buffer.from("ustar ","binary"),Ftt=Buffer.from(" \0","binary"),Itt=parseInt("7777",8),bw=257,vK=263,Ptt=function(e,r,t){return typeof e!="number"?t:(e=~~e,e>=r?r:e>=0||(e+=r,e>=0)?e:0)},Btt=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},jtt=function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},MIe=function(e,r,t,n){for(;t<n;t++)if(e[t]===r)return t;return n},LIe=function(e){for(var r=8*32,t=0;t<148;t++)r+=e[t];for(var n=156;n<512;n++)r+=e[n];return r},mh=function(e,r){return e=e.toString(8),e.length>r?ktt.slice(0,r)+" ":Dtt.slice(0,r-e.length)+e+" "};function Mtt(e){var r;if(e[0]===128)r=!0;else if(e[0]===255)r=!1;else return null;for(var t=[],n=e.length-1;n>0;n--){var i=e[n];r?t.push(i):t.push(255-i)}var a=0,o=t.length;for(n=0;n<o;n++)a+=t[n]*Math.pow(256,n);return r?a:-1*a}var gh=function(e,r,t){if(e=e.slice(r,r+t),r=0,e[r]&128)return Mtt(e);for(;r<e.length&&e[r]===32;)r++;for(var n=Ptt(MIe(e,32,r,e.length),e.length,e.length);r<n&&e[r]===0;)r++;return n===r?0:parseInt(e.slice(r,n).toString(),8)},ix=function(e,r,t,n){return e.slice(r,MIe(e,0,r,r+t)).toString(n)},bK=function(e){var r=Buffer.byteLength(e),t=Math.floor(Math.log(r)/Math.log(10))+1;return r+t>=Math.pow(10,t)&&t++,r+t+e};ax.decodeLongPath=function(e,r){return ix(e,0,e.length,r)};ax.encodePax=function(e){var r="";e.name&&(r+=bK(" path="+e.name+`
|
|
176
|
+
`)),e.linkname&&(r+=bK(" linkpath="+e.linkname+`
|
|
177
|
+
`));var t=e.pax;if(t)for(var n in t)r+=bK(" "+n+"="+t[n]+`
|
|
178
|
+
`);return Buffer.from(r)};ax.decodePax=function(e){for(var r={};e.length;){for(var t=0;t<e.length&&e[t]!==32;)t++;var n=parseInt(e.slice(0,t).toString(),10);if(!n)return r;var i=e.slice(t+1,n-1).toString(),a=i.indexOf("=");if(a===-1)return r;r[i.slice(0,a)]=i.slice(a+1),e=e.slice(n)}return r};ax.encode=function(e){var r=Ctt(512),t=e.name,n="";if(e.typeflag===5&&t[t.length-1]!=="/"&&(t+="/"),Buffer.byteLength(t)!==t.length)return null;for(;Buffer.byteLength(t)>100;){var i=t.indexOf("/");if(i===-1)return null;n+=n?"/"+t.slice(0,i):t.slice(0,i),t=t.slice(i+1)}return Buffer.byteLength(t)>100||Buffer.byteLength(n)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(r.write(t),r.write(mh(e.mode&Itt,6),100),r.write(mh(e.uid,6),108),r.write(mh(e.gid,6),116),r.write(mh(e.size,11),124),r.write(mh(e.mtime.getTime()/1e3|0,11),136),r[156]=BIe+jtt(e.type),e.linkname&&r.write(e.linkname,157),jIe.copy(r,bw),Ott.copy(r,vK),e.uname&&r.write(e.uname,265),e.gname&&r.write(e.gname,297),r.write(mh(e.devmajor||0,6),329),r.write(mh(e.devminor||0,6),337),n&&r.write(n,345),r.write(mh(LIe(r),6),148),r)};ax.decode=function(e,r,t){var n=e[156]===0?0:e[156]-BIe,i=ix(e,0,100,r),a=gh(e,100,8),o=gh(e,108,8),s=gh(e,116,8),u=gh(e,124,12),l=gh(e,136,12),c=Btt(n),f=e[157]===0?null:ix(e,157,100,r),d=ix(e,265,32),p=ix(e,297,32),h=gh(e,329,8),b=gh(e,337,8),v=LIe(e);if(v===8*32)return null;if(v!==gh(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(jIe.compare(e,bw,bw+6)===0)e[345]&&(i=ix(e,345,155,r)+"/"+i);else if(!(Rtt.compare(e,bw,bw+6)===0&&Ftt.compare(e,vK,vK+2)===0)){if(!t)throw new Error("Invalid tar header: unknown format.")}return n===0&&i&&i[i.length-1]==="/"&&(n=5),{name:i,mode:a,uid:o,gid:s,size:u,mtime:new Date(1e3*l),type:c,linkname:f,uname:d,gname:p,devmajor:h,devminor:b}}});var xK=m((wPt,qIe)=>{qIe.exports=require("stream")});var WIe=m((SPt,HIe)=>{"use strict";function NIe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function UIe(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?NIe(Object(t),!0).forEach(function(n){Ltt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):NIe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ltt(e,r,t){return r=zIe(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function qtt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function GIe(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zIe(n.key),n)}}function Ntt(e,r,t){return r&&GIe(e.prototype,r),t&&GIe(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zIe(e){var r=Utt(e,"string");return typeof r=="symbol"?r:String(r)}function Utt(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Gtt=require("buffer"),RF=Gtt.Buffer,ztt=require("util"),_K=ztt.inspect,Htt=_K&&_K.custom||"inspect";function Wtt(e,r,t){RF.prototype.copy.call(e,r,t)}HIe.exports=function(){function e(){qtt(this,e),this.head=null,this.tail=null,this.length=0}return Ntt(e,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(this.length===0)return RF.alloc(0);for(var n=RF.allocUnsafe(t>>>0),i=this.head,a=0;i;)Wtt(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):t===this.head.data.length?i=this.shift():i=n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,a=n.data;for(t-=a.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?a+=o:a+=o.slice(0,t),t-=s,t===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(t){var n=RF.allocUnsafe(t),i=this.head,a=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,t===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:Htt,value:function(t,n){return _K(this,UIe(UIe({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var wK=m((APt,KIe)=>{"use strict";function Vtt(e,r){var t=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(EK,this,e)):process.nextTick(EK,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!r&&a?t._writableState?t._writableState.errorEmitted?process.nextTick(FF,t):(t._writableState.errorEmitted=!0,process.nextTick(VIe,t,a)):process.nextTick(VIe,t,a):r?(process.nextTick(FF,t),r(a)):process.nextTick(FF,t)}),this)}function VIe(e,r){EK(e,r),FF(e)}function FF(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Ktt(){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 EK(e,r){e.emit("error",r)}function Ytt(e,r){var t=e._readableState,n=e._writableState;t&&t.autoDestroy||n&&n.autoDestroy?e.destroy(r):e.emit("error",r)}KIe.exports={destroy:Vtt,undestroy:Ktt,errorOrDestroy:Ytt}});var vh=m((TPt,XIe)=>{"use strict";var YIe={};function uu(e,r,t){t||(t=Error);function n(a,o,s){return typeof r=="string"?r:r(a,o,s)}class i extends t{constructor(o,s,u){super(n(o,s,u))}}i.prototype.name=t.name,i.prototype.code=e,YIe[e]=i}function $Ie(e,r){if(Array.isArray(e)){let t=e.length;return e=e.map(n=>String(n)),t>2?`one of ${r} ${e.slice(0,t-1).join(", ")}, or `+e[t-1]:t===2?`one of ${r} ${e[0]} or ${e[1]}`:`of ${r} ${e[0]}`}else return`of ${r} ${String(e)}`}function $tt(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function Xtt(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function Jtt(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}uu("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);uu("ERR_INVALID_ARG_TYPE",function(e,r,t){let n;typeof r=="string"&&$tt(r,"not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";let i;if(Xtt(e," argument"))i=`The ${e} ${n} ${$Ie(r,"type")}`;else{let a=Jtt(e,".")?"property":"argument";i=`The "${e}" ${a} ${n} ${$Ie(r,"type")}`}return i+=`. Received type ${typeof t}`,i},TypeError);uu("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");uu("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});uu("ERR_STREAM_PREMATURE_CLOSE","Premature close");uu("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});uu("ERR_MULTIPLE_CALLBACK","Callback called multiple times");uu("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");uu("ERR_STREAM_WRITE_AFTER_END","write after end");uu("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);uu("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);uu("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");XIe.exports.codes=YIe});var SK=m((CPt,JIe)=>{"use strict";var Qtt=vh().codes.ERR_INVALID_OPT_VALUE;function Ztt(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function ent(e,r,t,n){var i=Ztt(r,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?t:"highWaterMark";throw new Qtt(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}JIe.exports={getHighWaterMark:ent}});var CK=m((DPt,nPe)=>{"use strict";nPe.exports=mi;function QIe(e){var r=this;this.next=null,this.entry=null,this.finish=function(){Cnt(r,e)}}var ox;mi.WritableState=yw;var rnt={deprecate:d0()},ZIe=xK(),IF=require("buffer").Buffer,tnt=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function nnt(e){return IF.from(e)}function int(e){return IF.isBuffer(e)||e instanceof tnt}var AK=wK(),ant=SK(),ont=ant.getHighWaterMark,bh=vh().codes,snt=bh.ERR_INVALID_ARG_TYPE,unt=bh.ERR_METHOD_NOT_IMPLEMENTED,lnt=bh.ERR_MULTIPLE_CALLBACK,cnt=bh.ERR_STREAM_CANNOT_PIPE,fnt=bh.ERR_STREAM_DESTROYED,dnt=bh.ERR_STREAM_NULL_VALUES,pnt=bh.ERR_STREAM_WRITE_AFTER_END,hnt=bh.ERR_UNKNOWN_ENCODING,sx=AK.errorOrDestroy;at()(mi,ZIe);function mnt(){}function yw(e,r,t){ox=ox||Rm(),e=e||{},typeof t!="boolean"&&(t=r instanceof ox),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=ont(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){Ent(r,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new QIe(this)}yw.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty(yw.prototype,"buffer",{get:rnt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var PF;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(PF=Function.prototype[Symbol.hasInstance],Object.defineProperty(mi,Symbol.hasInstance,{value:function(r){return PF.call(this,r)?!0:this!==mi?!1:r&&r._writableState instanceof yw}})):PF=function(r){return r instanceof this};function mi(e){ox=ox||Rm();var r=this instanceof ox;if(!r&&!PF.call(mi,this))return new mi(e);this._writableState=new yw(e,this,r),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)),ZIe.call(this)}mi.prototype.pipe=function(){sx(this,new cnt)};function gnt(e,r){var t=new pnt;sx(e,t),process.nextTick(r,t)}function vnt(e,r,t,n){var i;return t===null?i=new dnt:typeof t!="string"&&!r.objectMode&&(i=new snt("chunk",["string","Buffer"],t)),i?(sx(e,i),process.nextTick(n,i),!1):!0}mi.prototype.write=function(e,r,t){var n=this._writableState,i=!1,a=!n.objectMode&&int(e);return a&&!IF.isBuffer(e)&&(e=nnt(e)),typeof r=="function"&&(t=r,r=null),a?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=mnt),n.ending?gnt(this,t):(a||vnt(this,n,e,t))&&(n.pendingcb++,i=ynt(this,n,a,e,r,t)),i};mi.prototype.cork=function(){this._writableState.corked++};mi.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&rPe(this,e))};mi.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new hnt(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(mi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function bnt(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=IF.from(r,t)),r}Object.defineProperty(mi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ynt(e,r,t,n,i,a){if(!t){var o=bnt(r,n,i);n!==o&&(t=!0,i="buffer",n=o)}var s=r.objectMode?1:n.length;r.length+=s;var u=r.length<r.highWaterMark;if(u||(r.needDrain=!0),r.writing||r.corked){var l=r.lastBufferedRequest;r.lastBufferedRequest={chunk:n,encoding:i,isBuf:t,callback:a,next:null},l?l.next=r.lastBufferedRequest:r.bufferedRequest=r.lastBufferedRequest,r.bufferedRequestCount+=1}else TK(e,r,!1,s,n,i,a);return u}function TK(e,r,t,n,i,a,o){r.writelen=n,r.writecb=o,r.writing=!0,r.sync=!0,r.destroyed?r.onwrite(new fnt("write")):t?e._writev(i,r.onwrite):e._write(i,a,r.onwrite),r.sync=!1}function xnt(e,r,t,n,i){--r.pendingcb,t?(process.nextTick(i,n),process.nextTick(xw,e,r),e._writableState.errorEmitted=!0,sx(e,n)):(i(n),e._writableState.errorEmitted=!0,sx(e,n),xw(e,r))}function _nt(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Ent(e,r){var t=e._writableState,n=t.sync,i=t.writecb;if(typeof i!="function")throw new lnt;if(_nt(t),r)xnt(e,t,n,r,i);else{var a=tPe(t)||e.destroyed;!a&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&rPe(e,t),n?process.nextTick(ePe,e,t,a,i):ePe(e,t,a,i)}}function ePe(e,r,t,n){t||wnt(e,r),r.pendingcb--,n(),xw(e,r)}function wnt(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function rPe(e,r){r.bufferProcessing=!0;var t=r.bufferedRequest;if(e._writev&&t&&t.next){var n=r.bufferedRequestCount,i=new Array(n),a=r.corkedRequestsFree;a.entry=t;for(var o=0,s=!0;t;)i[o]=t,t.isBuf||(s=!1),t=t.next,o+=1;i.allBuffers=s,TK(e,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new QIe(r),r.bufferedRequestCount=0}else{for(;t;){var u=t.chunk,l=t.encoding,c=t.callback,f=r.objectMode?1:u.length;if(TK(e,r,!1,f,u,l,c),t=t.next,r.bufferedRequestCount--,r.writing)break}t===null&&(r.lastBufferedRequest=null)}r.bufferedRequest=t,r.bufferProcessing=!1}mi.prototype._write=function(e,r,t){t(new unt("_write()"))};mi.prototype._writev=null;mi.prototype.end=function(e,r,t){var n=this._writableState;return typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),e!=null&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||Tnt(this,n,t),this};Object.defineProperty(mi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function tPe(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Snt(e,r){e._final(function(t){r.pendingcb--,t&&sx(e,t),r.prefinished=!0,e.emit("prefinish"),xw(e,r)})}function Ant(e,r){!r.prefinished&&!r.finalCalled&&(typeof e._final=="function"&&!r.destroyed?(r.pendingcb++,r.finalCalled=!0,process.nextTick(Snt,e,r)):(r.prefinished=!0,e.emit("prefinish")))}function xw(e,r){var t=tPe(r);if(t&&(Ant(e,r),r.pendingcb===0&&(r.finished=!0,e.emit("finish"),r.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return t}function Tnt(e,r,t){r.ending=!0,xw(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1}function Cnt(e,r,t){var n=e.entry;for(e.entry=null;n;){var i=n.callback;r.pendingcb--,i(t),n=n.next}r.corkedRequestsFree.next=e}Object.defineProperty(mi.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(r){!this._writableState||(this._writableState.destroyed=r)}});mi.prototype.destroy=AK.destroy;mi.prototype._undestroy=AK.undestroy;mi.prototype._destroy=function(e,r){r(e)}});var Rm=m((kPt,aPe)=>{"use strict";var Dnt=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};aPe.exports=bc;var iPe=OK(),DK=CK();at()(bc,iPe);for(kK=Dnt(DK.prototype),BF=0;BF<kK.length;BF++)jF=kK[BF],bc.prototype[jF]||(bc.prototype[jF]=DK.prototype[jF]);var kK,jF,BF;function bc(e){if(!(this instanceof bc))return new bc(e);iPe.call(this,e),DK.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",knt)))}Object.defineProperty(bc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(bc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(bc.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function knt(){this._writableState.ended||process.nextTick(Ont,this)}function Ont(e){e.end()}Object.defineProperty(bc.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(r){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=r,this._writableState.destroyed=r)}})});var IK=m(sPe=>{"use strict";var RK=vu().Buffer,oPe=RK.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 Rnt(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function Fnt(e){var r=Rnt(e);if(typeof r!="string"&&(RK.isEncoding===oPe||!oPe(e)))throw new Error("Unknown encoding: "+e);return r||e}sPe.StringDecoder=_w;function _w(e){this.encoding=Fnt(e);var r;switch(this.encoding){case"utf16le":this.text=Lnt,this.end=qnt,r=4;break;case"utf8":this.fillLast=Bnt,r=4;break;case"base64":this.text=Nnt,this.end=Unt,r=3;break;default:this.write=Gnt,this.end=znt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=RK.allocUnsafe(r)}_w.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""};_w.prototype.end=Mnt;_w.prototype.text=jnt;_w.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 FK(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function Int(e,r,t){var n=r.length-1;if(n<t)return 0;var i=FK(r[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<t||i===-2?0:(i=FK(r[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<t||i===-2?0:(i=FK(r[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function Pnt(e,r,t){if((r[0]&192)!=128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!=128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!=128)return e.lastNeed=2,"\uFFFD"}}function Bnt(e){var r=this.lastTotal-this.lastNeed,t=Pnt(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function jnt(e,r){var t=Int(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",r,n)}function Mnt(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function Lnt(e,r){if((e.length-r)%2==0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.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],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function qnt(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function Nnt(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function Unt(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function Gnt(e){return e.toString(this.encoding)}function znt(e){return e&&e.length?this.write(e):""}});var MF=m((RPt,cPe)=>{"use strict";var uPe=vh().codes.ERR_STREAM_PREMATURE_CLOSE;function Hnt(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e.apply(this,n)}}}function Wnt(){}function Vnt(e){return e.setHeader&&typeof e.abort=="function"}function lPe(e,r,t){if(typeof r=="function")return lPe(e,null,r);r||(r={}),t=Hnt(t||Wnt);var n=r.readable||r.readable!==!1&&e.readable,i=r.writable||r.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){i=!1,o=!0,n||t.call(e)},u=e._readableState&&e._readableState.endEmitted,l=function(){n=!1,u=!0,i||t.call(e)},c=function(h){t.call(e,h)},f=function(){var h;if(n&&!u)return(!e._readableState||!e._readableState.ended)&&(h=new uPe),t.call(e,h);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(h=new uPe),t.call(e,h)},d=function(){e.req.on("finish",s)};return Vnt(e)?(e.on("complete",s),e.on("abort",f),e.req?d():e.on("request",d)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",s),r.error!==!1&&e.on("error",c),e.on("close",f),function(){e.removeListener("complete",s),e.removeListener("abort",f),e.removeListener("request",d),e.req&&e.req.removeListener("finish",s),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",s),e.removeListener("end",l),e.removeListener("error",c),e.removeListener("close",f)}}cPe.exports=lPe});var dPe=m((FPt,fPe)=>{"use strict";var LF;function yh(e,r,t){return r=Knt(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Knt(e){var r=Ynt(e,"string");return typeof r=="symbol"?r:String(r)}function Ynt(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var $nt=MF(),xh=Symbol("lastResolve"),Fm=Symbol("lastReject"),Ew=Symbol("error"),qF=Symbol("ended"),Im=Symbol("lastPromise"),PK=Symbol("handlePromise"),Pm=Symbol("stream");function _h(e,r){return{value:e,done:r}}function Xnt(e){var r=e[xh];if(r!==null){var t=e[Pm].read();t!==null&&(e[Im]=null,e[xh]=null,e[Fm]=null,r(_h(t,!1)))}}function Jnt(e){process.nextTick(Xnt,e)}function Qnt(e,r){return function(t,n){e.then(function(){if(r[qF]){t(_h(void 0,!0));return}r[PK](t,n)},n)}}var Znt=Object.getPrototypeOf(function(){}),eit=Object.setPrototypeOf((LF={get stream(){return this[Pm]},next:function(){var r=this,t=this[Ew];if(t!==null)return Promise.reject(t);if(this[qF])return Promise.resolve(_h(void 0,!0));if(this[Pm].destroyed)return new Promise(function(o,s){process.nextTick(function(){r[Ew]?s(r[Ew]):o(_h(void 0,!0))})});var n=this[Im],i;if(n)i=new Promise(Qnt(n,this));else{var a=this[Pm].read();if(a!==null)return Promise.resolve(_h(a,!1));i=new Promise(this[PK])}return this[Im]=i,i}},yh(LF,Symbol.asyncIterator,function(){return this}),yh(LF,"return",function(){var r=this;return new Promise(function(t,n){r[Pm].destroy(null,function(i){if(i){n(i);return}t(_h(void 0,!0))})})}),LF),Znt),rit=function(r){var t,n=Object.create(eit,(t={},yh(t,Pm,{value:r,writable:!0}),yh(t,xh,{value:null,writable:!0}),yh(t,Fm,{value:null,writable:!0}),yh(t,Ew,{value:null,writable:!0}),yh(t,qF,{value:r._readableState.endEmitted,writable:!0}),yh(t,PK,{value:function(a,o){var s=n[Pm].read();s?(n[Im]=null,n[xh]=null,n[Fm]=null,a(_h(s,!1))):(n[xh]=a,n[Fm]=o)},writable:!0}),t));return n[Im]=null,$nt(r,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[Fm];a!==null&&(n[Im]=null,n[xh]=null,n[Fm]=null,a(i)),n[Ew]=i;return}var o=n[xh];o!==null&&(n[Im]=null,n[xh]=null,n[Fm]=null,o(_h(void 0,!0))),n[qF]=!0}),r.on("readable",Jnt.bind(null,n)),n};fPe.exports=rit});var gPe=m((IPt,mPe)=>{"use strict";function pPe(e,r,t,n,i,a,o){try{var s=e[a](o),u=s.value}catch(l){t(l);return}s.done?r(u):Promise.resolve(u).then(n,i)}function tit(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var a=e.apply(r,t);function o(u){pPe(a,n,i,o,s,"next",u)}function s(u){pPe(a,n,i,o,s,"throw",u)}o(void 0)})}}function hPe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function nit(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?hPe(Object(t),!0).forEach(function(n){iit(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hPe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function iit(e,r,t){return r=ait(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ait(e){var r=oit(e,"string");return typeof r=="symbol"?r:String(r)}function oit(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var sit=vh().codes.ERR_INVALID_ARG_TYPE;function uit(e,r,t){var n;if(r&&typeof r.next=="function")n=r;else if(r&&r[Symbol.asyncIterator])n=r[Symbol.asyncIterator]();else if(r&&r[Symbol.iterator])n=r[Symbol.iterator]();else throw new sit("iterable",["Iterable"],r);var i=new e(nit({objectMode:!0},t)),a=!1;i._read=function(){a||(a=!0,o())};function o(){return s.apply(this,arguments)}function s(){return s=tit(function*(){try{var u=yield n.next(),l=u.value,c=u.done;c?i.push(null):i.push(yield l)?o():a=!1}catch(f){i.destroy(f)}}),s.apply(this,arguments)}return i}mPe.exports=uit});var OK=m((BPt,TPe)=>{"use strict";TPe.exports=Vt;var ux;Vt.ReadableState=bPe;var PPt=require("events").EventEmitter,vPe=function(r,t){return r.listeners(t).length},ww=xK(),NF=require("buffer").Buffer,lit=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function cit(e){return NF.from(e)}function fit(e){return NF.isBuffer(e)||e instanceof lit}var BK=require("util"),wt;BK&&BK.debuglog?wt=BK.debuglog("stream"):wt=function(){};var dit=WIe(),jK=wK(),pit=SK(),hit=pit.getHighWaterMark,UF=vh().codes,mit=UF.ERR_INVALID_ARG_TYPE,git=UF.ERR_STREAM_PUSH_AFTER_EOF,vit=UF.ERR_METHOD_NOT_IMPLEMENTED,bit=UF.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,lx,MK,LK;at()(Vt,ww);var Sw=jK.errorOrDestroy,qK=["error","close","destroy","pause","resume"];function yit(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Array.isArray(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function bPe(e,r,t){ux=ux||Rm(),e=e||{},typeof t!="boolean"&&(t=r instanceof ux),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=hit(this,e,"readableHighWaterMark",t),this.buffer=new dit,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(lx||(lx=IK().StringDecoder),this.decoder=new lx(e.encoding),this.encoding=e.encoding)}function Vt(e){if(ux=ux||Rm(),!(this instanceof Vt))return new Vt(e);var r=this instanceof ux;this._readableState=new bPe(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),ww.call(this)}Object.defineProperty(Vt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){!this._readableState||(this._readableState.destroyed=r)}});Vt.prototype.destroy=jK.destroy;Vt.prototype._undestroy=jK.undestroy;Vt.prototype._destroy=function(e,r){r(e)};Vt.prototype.push=function(e,r){var t=this._readableState,n;return t.objectMode?n=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=NF.from(e,r),r=""),n=!0),yPe(this,e,r,!1,n)};Vt.prototype.unshift=function(e){return yPe(this,e,null,!0,!1)};function yPe(e,r,t,n,i){wt("readableAddChunk",r);var a=e._readableState;if(r===null)a.reading=!1,Eit(e,a);else{var o;if(i||(o=xit(a,r)),o)Sw(e,o);else if(a.objectMode||r&&r.length>0)if(typeof r!="string"&&!a.objectMode&&Object.getPrototypeOf(r)!==NF.prototype&&(r=cit(r)),n)a.endEmitted?Sw(e,new bit):NK(e,a,r,!0);else if(a.ended)Sw(e,new git);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!t?(r=a.decoder.write(r),a.objectMode||r.length!==0?NK(e,a,r,!1):UK(e,a)):NK(e,a,r,!1)}else n||(a.reading=!1,UK(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function NK(e,r,t,n){r.flowing&&r.length===0&&!r.sync?(r.awaitDrain=0,e.emit("data",t)):(r.length+=r.objectMode?1:t.length,n?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&GF(e)),UK(e,r)}function xit(e,r){var t;return!fit(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(t=new mit("chunk",["string","Buffer","Uint8Array"],r)),t}Vt.prototype.isPaused=function(){return this._readableState.flowing===!1};Vt.prototype.setEncoding=function(e){lx||(lx=IK().StringDecoder);var r=new lx(e);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var t=this._readableState.buffer.head,n="";t!==null;)n+=r.write(t.data),t=t.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var xPe=1073741824;function _it(e){return e>=xPe?e=xPe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function _Pe(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=_it(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}Vt.prototype.read=function(e){wt("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return wt("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?zK(this):GF(this),null;if(e=_Pe(e,r),e===0&&r.ended)return r.length===0&&zK(this),null;var n=r.needReadable;wt("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,wt("length less than watermark",n)),r.ended||r.reading?(n=!1,wt("reading or ended",n)):n&&(wt("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=_Pe(t,r)));var i;return e>0?i=SPe(e,r):i=null,i===null?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&zK(this)),i!==null&&this.emit("data",i),i};function Eit(e,r){if(wt("onEofChunk"),!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.sync?GF(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,EPe(e)))}}function GF(e){var r=e._readableState;wt("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(wt("emitReadable",r.flowing),r.emittedReadable=!0,process.nextTick(EPe,e))}function EPe(e){var r=e._readableState;wt("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,GK(e)}function UK(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(wit,e,r))}function wit(e,r){for(;!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0);){var t=r.length;if(wt("maybeReadMore read 0"),e.read(0),t===r.length)break}r.readingMore=!1}Vt.prototype._read=function(e){Sw(this,new vit("_read()"))};Vt.prototype.pipe=function(e,r){var t=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,wt("pipe count=%d opts=%j",n.pipesCount,r);var i=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:b;n.endEmitted?process.nextTick(a):t.once("end",a),e.on("unpipe",o);function o(v,y){wt("onunpipe"),v===t&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,c())}function s(){wt("onend"),e.end()}var u=Sit(t);e.on("drain",u);var l=!1;function c(){wt("cleanup"),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",b),t.removeListener("data",f),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}t.on("data",f);function f(v){wt("ondata");var y=e.write(v);wt("dest.write",y),y===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&APe(n.pipes,e)!==-1)&&!l&&(wt("false write response, pause",n.awaitDrain),n.awaitDrain++),t.pause())}function d(v){wt("onerror",v),b(),e.removeListener("error",d),vPe(e,"error")===0&&Sw(e,v)}yit(e,"error",d);function p(){e.removeListener("finish",h),b()}e.once("close",p);function h(){wt("onfinish"),e.removeListener("close",p),b()}e.once("finish",h);function b(){wt("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(wt("pipe resume"),t.resume()),e};function Sit(e){return function(){var t=e._readableState;wt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&vPe(e,"data")&&(t.flowing=!0,GK(e))}}Vt.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var n=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=APe(r.pipes,e);return o===-1?this:(r.pipes.splice(o,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this,t),this)};Vt.prototype.on=function(e,r){var t=ww.prototype.on.call(this,e,r),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,wt("on readable",n.length,n.reading),n.length?GF(this):n.reading||process.nextTick(Ait,this)),t};Vt.prototype.addListener=Vt.prototype.on;Vt.prototype.removeListener=function(e,r){var t=ww.prototype.removeListener.call(this,e,r);return e==="readable"&&process.nextTick(wPe,this),t};Vt.prototype.removeAllListeners=function(e){var r=ww.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(wPe,this),r};function wPe(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:e.listenerCount("data")>0&&e.resume()}function Ait(e){wt("readable nexttick read 0"),e.read(0)}Vt.prototype.resume=function(){var e=this._readableState;return e.flowing||(wt("resume"),e.flowing=!e.readableListening,Tit(this,e)),e.paused=!1,this};function Tit(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(Cit,e,r))}function Cit(e,r){wt("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),GK(e),r.flowing&&!r.reading&&e.read(0)}Vt.prototype.pause=function(){return wt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(wt("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function GK(e){var r=e._readableState;for(wt("flow",r.flowing);r.flowing&&e.read()!==null;);}Vt.prototype.wrap=function(e){var r=this,t=this._readableState,n=!1;e.on("end",function(){if(wt("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(wt("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var s=r.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a<qK.length;a++)e.on(qK[a],this.emit.bind(this,qK[a]));return this._read=function(o){wt("wrapped _read",o),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(Vt.prototype[Symbol.asyncIterator]=function(){return MK===void 0&&(MK=dPe()),MK(this)});Object.defineProperty(Vt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Vt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Vt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(r){this._readableState&&(this._readableState.flowing=r)}});Vt._fromList=SPe;Object.defineProperty(Vt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function SPe(e,r){if(r.length===0)return null;var t;return r.objectMode?t=r.buffer.shift():!e||e>=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.first():t=r.buffer.concat(r.length),r.buffer.clear()):t=r.buffer.consume(e,r.decoder),t}function zK(e){var r=e._readableState;wt("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,process.nextTick(Dit,r,e))}function Dit(e,r){if(wt("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var t=r._writableState;(!t||t.autoDestroy&&t.finished)&&r.destroy()}}typeof Symbol=="function"&&(Vt.from=function(e,r){return LK===void 0&&(LK=gPe()),LK(Vt,e,r)});function APe(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var HK=m((jPt,DPe)=>{"use strict";DPe.exports=Uf;var zF=vh().codes,kit=zF.ERR_METHOD_NOT_IMPLEMENTED,Oit=zF.ERR_MULTIPLE_CALLBACK,Rit=zF.ERR_TRANSFORM_ALREADY_TRANSFORMING,Fit=zF.ERR_TRANSFORM_WITH_LENGTH_0,HF=Rm();at()(Uf,HF);function Iit(e,r){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(n===null)return this.emit("error",new Oit);t.writechunk=null,t.writecb=null,r!=null&&this.push(r),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Uf(e){if(!(this instanceof Uf))return new Uf(e);HF.call(this,e),this._transformState={afterTransform:Iit.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",Pit)}function Pit(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(r,t){CPe(e,r,t)}):CPe(this,null,null)}Uf.prototype.push=function(e,r){return this._transformState.needTransform=!1,HF.prototype.push.call(this,e,r)};Uf.prototype._transform=function(e,r,t){t(new kit("_transform()"))};Uf.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Uf.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};Uf.prototype._destroy=function(e,r){HF.prototype._destroy.call(this,e,function(t){r(t)})};function CPe(e,r,t){if(r)return e.emit("error",r);if(t!=null&&e.push(t),e._writableState.length)throw new Fit;if(e._transformState.transforming)throw new Rit;return e.push(null)}});var RPe=m((MPt,OPe)=>{"use strict";OPe.exports=Aw;var kPe=HK();at()(Aw,kPe);function Aw(e){if(!(this instanceof Aw))return new Aw(e);kPe.call(this,e)}Aw.prototype._transform=function(e,r,t){t(null,e)}});var jPe=m((LPt,BPe)=>{"use strict";var WK;function Bit(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var FPe=vh().codes,jit=FPe.ERR_MISSING_ARGS,Mit=FPe.ERR_STREAM_DESTROYED;function IPe(e){if(e)throw e}function Lit(e){return e.setHeader&&typeof e.abort=="function"}function qit(e,r,t,n){n=Bit(n);var i=!1;e.on("close",function(){i=!0}),WK===void 0&&(WK=MF()),WK(e,{readable:r,writable:t},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,Lit(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new Mit("pipe"))}}}function PPe(e){e()}function Nit(e,r){return e.pipe(r)}function Uit(e){return!e.length||typeof e[e.length-1]!="function"?IPe:e.pop()}function Git(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=Uit(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new jit("streams");var i,a=r.map(function(o,s){var u=s<r.length-1,l=s>0;return qit(o,u,l,function(c){i||(i=c),c&&a.forEach(PPe),!u&&(a.forEach(PPe),n(i))})});return r.reduce(Nit)}BPe.exports=Git});var Dw=m((lu,Cw)=>{var Tw=require("stream");process.env.READABLE_STREAM==="disable"&&Tw?(Cw.exports=Tw.Readable,Object.assign(Cw.exports,Tw),Cw.exports.Stream=Tw):(lu=Cw.exports=OK(),lu.Stream=Tw||lu,lu.Readable=lu,lu.Writable=CK(),lu.Duplex=Rm(),lu.Transform=HK(),lu.PassThrough=RPe(),lu.finished=MF(),lu.pipeline=jPe())});var zPe=m((qPt,GPe)=>{var MPe=require("util"),zit=dq(),kw=yK(),LPe=Dw().Writable,qPe=Dw().PassThrough,NPe=function(){},UPe=function(e){return e&=511,e&&512-e},Hit=function(e,r){var t=new WF(e,r);return t.end(),t},Wit=function(e,r){return r.path&&(e.name=r.path),r.linkpath&&(e.linkname=r.linkpath),r.size&&(e.size=parseInt(r.size,10)),e.pax=r,e},WF=function(e,r){this._parent=e,this.offset=r,qPe.call(this,{autoDestroy:!1})};MPe.inherits(WF,qPe);WF.prototype.destroy=function(e){this._parent.destroy(e)};var Gf=function(e){if(!(this instanceof Gf))return new Gf(e);LPe.call(this,e),e=e||{},this._offset=0,this._buffer=zit(),this._missing=0,this._partial=!1,this._onparse=NPe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var r=this,t=r._buffer,n=function(){r._continue()},i=function(d){if(r._locked=!1,d)return r.destroy(d);r._stream||n()},a=function(){r._stream=null;var d=UPe(r._header.size);d?r._parse(d,o):r._parse(512,f),r._locked||n()},o=function(){r._buffer.consume(UPe(r._header.size)),r._parse(512,f),n()},s=function(){var d=r._header.size;r._paxGlobal=kw.decodePax(t.slice(0,d)),t.consume(d),a()},u=function(){var d=r._header.size;r._pax=kw.decodePax(t.slice(0,d)),r._paxGlobal&&(r._pax=Object.assign({},r._paxGlobal,r._pax)),t.consume(d),a()},l=function(){var d=r._header.size;this._gnuLongPath=kw.decodeLongPath(t.slice(0,d),e.filenameEncoding),t.consume(d),a()},c=function(){var d=r._header.size;this._gnuLongLinkPath=kw.decodeLongPath(t.slice(0,d),e.filenameEncoding),t.consume(d),a()},f=function(){var d=r._offset,p;try{p=r._header=kw.decode(t.slice(0,512),e.filenameEncoding,e.allowUnknownFormat)}catch(h){r.emit("error",h)}if(t.consume(512),!p){r._parse(512,f),n();return}if(p.type==="gnu-long-path"){r._parse(p.size,l),n();return}if(p.type==="gnu-long-link-path"){r._parse(p.size,c),n();return}if(p.type==="pax-global-header"){r._parse(p.size,s),n();return}if(p.type==="pax-header"){r._parse(p.size,u),n();return}if(r._gnuLongPath&&(p.name=r._gnuLongPath,r._gnuLongPath=null),r._gnuLongLinkPath&&(p.linkname=r._gnuLongLinkPath,r._gnuLongLinkPath=null),r._pax&&(r._header=p=Wit(p,r._pax),r._pax=null),r._locked=!0,!p.size||p.type==="directory"){r._parse(512,f),r.emit("entry",p,Hit(r,d),i);return}r._stream=new WF(r,d),r.emit("entry",p,r._stream,i),r._parse(p.size,a),n()};this._onheader=f,this._parse(512,f)};MPe.inherits(Gf,LPe);Gf.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};Gf.prototype._parse=function(e,r){this._destroyed||(this._offset+=e,this._missing=e,r===this._onheader&&(this._partial=!1),this._onparse=r)};Gf.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=NPe,this._overflow?this._write(this._overflow,void 0,e):e()}};Gf.prototype._write=function(e,r,t){if(!this._destroyed){var n=this._stream,i=this._buffer,a=this._missing;if(e.length&&(this._partial=!0),e.length<a)return this._missing-=e.length,this._overflow=null,n?n.write(e,t):(i.append(e),t());this._cb=t,this._missing=0;var o=null;e.length>a&&(o=e.slice(a),e=e.slice(0,a)),n?n.end(e):i.append(e),this._overflow=o,this._onparse()}};Gf.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};GPe.exports=Gf});var WPe=m((NPt,HPe)=>{HPe.exports=require("fs").constants||require("constants")});var YPe=m((UPt,KPe)=>{var Vit=qR(),Kit=function(){},Yit=function(e){return e.setHeader&&typeof e.abort=="function"},$it=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},VPe=function(e,r,t){if(typeof r=="function")return VPe(e,null,r);r||(r={}),t=Vit(t||Kit);var n=e._writableState,i=e._readableState,a=r.readable||r.readable!==!1&&e.readable,o=r.writable||r.writable!==!1&&e.writable,s=!1,u=function(){e.writable||l()},l=function(){o=!1,a||t.call(e)},c=function(){a=!1,o||t.call(e)},f=function(v){t.call(e,v?new Error("exited with error code: "+v):null)},d=function(v){t.call(e,v)},p=function(){process.nextTick(h)},h=function(){if(!s){if(a&&!(i&&i.ended&&!i.destroyed))return t.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return t.call(e,new Error("premature close"))}},b=function(){e.req.on("finish",l)};return Yit(e)?(e.on("complete",l),e.on("abort",p),e.req?b():e.on("request",b)):o&&!n&&(e.on("end",u),e.on("close",u)),$it(e)&&e.on("exit",f),e.on("end",c),e.on("finish",l),r.error!==!1&&e.on("error",d),e.on("close",p),function(){s=!0,e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",b),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("exit",f),e.removeListener("end",c),e.removeListener("error",d),e.removeListener("close",p)}};KPe.exports=VPe});var ZPe=m((GPt,QPe)=>{var cx=WPe(),$Pe=YPe(),VF=at(),Xit=Buffer.alloc,XPe=Dw().Readable,fx=Dw().Writable,Jit=require("string_decoder").StringDecoder,KF=yK(),Qit=parseInt("755",8),Zit=parseInt("644",8),JPe=Xit(1024),VK=function(){},KK=function(e,r){r&=511,r&&e.push(JPe.slice(0,512-r))};function eat(e){switch(e&cx.S_IFMT){case cx.S_IFBLK:return"block-device";case cx.S_IFCHR:return"character-device";case cx.S_IFDIR:return"directory";case cx.S_IFIFO:return"fifo";case cx.S_IFLNK:return"symlink"}return"file"}var YF=function(e){fx.call(this),this.written=0,this._to=e,this._destroyed=!1};VF(YF,fx);YF.prototype._write=function(e,r,t){if(this.written+=e.length,this._to.push(e))return t();this._to._drain=t};YF.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var $F=function(){fx.call(this),this.linkname="",this._decoder=new Jit("utf-8"),this._destroyed=!1};VF($F,fx);$F.prototype._write=function(e,r,t){this.linkname+=this._decoder.write(e),t()};$F.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Ow=function(){fx.call(this),this._destroyed=!1};VF(Ow,fx);Ow.prototype._write=function(e,r,t){t(new Error("No body allowed for this entry"))};Ow.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var yc=function(e){if(!(this instanceof yc))return new yc(e);XPe.call(this,e),this._drain=VK,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};VF(yc,XPe);yc.prototype.entry=function(e,r,t){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof r=="function"&&(t=r,r=null),t||(t=VK);var n=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=eat(e.mode)),e.mode||(e.mode=e.type==="directory"?Qit:Zit),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof r=="string"&&(r=Buffer.from(r)),Buffer.isBuffer(r)){e.size=r.length,this._encode(e);var i=this.push(r);return KK(n,e.size),i?process.nextTick(t):this._drain=t,new Ow}if(e.type==="symlink"&&!e.linkname){var a=new $F;return $Pe(a,function(s){if(s)return n.destroy(),t(s);e.linkname=a.linkname,n._encode(e),t()}),a}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(t),new Ow;var o=new YF(this);return this._stream=o,$Pe(o,function(s){if(n._stream=null,s)return n.destroy(),t(s);if(o.written!==e.size)return n.destroy(),t(new Error("size mismatch"));KK(n,e.size),n._finalizing&&n.finalize(),t()}),o}};yc.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(JPe),this.push(null))};yc.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};yc.prototype._encode=function(e){if(!e.pax){var r=KF.encode(e);if(r){this.push(r);return}}this._encodePax(e)};yc.prototype._encodePax=function(e){var r=KF.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),t={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:r.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(KF.encode(t)),this.push(r),KK(this,r.length),t.size=e.size,t.type=e.type,this.push(KF.encode(t))};yc.prototype._read=function(e){var r=this._drain;this._drain=VK,r()};QPe.exports=yc});var eBe=m(YK=>{YK.extract=zPe();YK.pack=ZPe()});var nBe=m((HPt,tBe)=>{var rat=require("zlib"),tat=eBe(),rBe=Hy(),zf=function(e){if(!(this instanceof zf))return new zf(e);e=this.options=rBe.defaults(e,{gzip:!1}),typeof e.gzipOptions!="object"&&(e.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=tat.pack(e),this.compressor=!1,e.gzip&&(this.compressor=rat.createGzip(e.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};zf.prototype._onCompressorError=function(e){this.engine.emit("error",e)};zf.prototype.append=function(e,r,t){var n=this;r.mtime=r.date;function i(o,s){if(o){t(o);return}n.engine.entry(r,s,function(u){t(u,r)})}if(r.sourceType==="buffer")i(null,e);else if(r.sourceType==="stream"&&r.stats){r.size=r.stats.size;var a=n.engine.entry(r,function(o){t(o,r)});e.pipe(a)}else r.sourceType==="stream"&&rBe.collectStream(e,i)};zf.prototype.finalize=function(){this.engine.finalize()};zf.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};zf.prototype.pipe=function(e,r){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(e,r):this.engine.pipe.apply(this.engine,arguments)};zf.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)};tBe.exports=zf});var sBe=m((WPt,oBe)=>{var nat=require("util").inherits,iBe=JW().Transform,iat=LV(),aBe=Hy(),Eh=function(e){if(!(this instanceof Eh))return new Eh(e);e=this.options=aBe.defaults(e,{}),iBe.call(this,e),this.supports={directory:!0,symlink:!0},this.files=[]};nat(Eh,iBe);Eh.prototype._transform=function(e,r,t){t(null,e)};Eh.prototype._writeStringified=function(){var e=JSON.stringify(this.files);this.write(e)};Eh.prototype.append=function(e,r,t){var n=this;r.crc32=0;function i(a,o){if(a){t(a);return}r.size=o.length||0,r.crc32=iat.unsigned(o),n.files.push(r),t(null,r)}r.sourceType==="buffer"?i(null,e):r.sourceType==="stream"&&aBe.collectStream(e,i)};Eh.prototype.finalize=function(){this._writeStringified(),this.end()};oBe.exports=Eh});var lBe=m((VPt,uBe)=>{var aat=eFe(),Rw={},wh=function(e,r){return wh.create(e,r)};wh.create=function(e,r){if(Rw[e]){var t=new aat(e,r);return t.setFormat(e),t.setModule(new Rw[e](r)),t}else throw new Error("create("+e+"): format not registered")};wh.registerFormat=function(e,r){if(Rw[e])throw new Error("register("+e+"): format already registered");if(typeof r!="function")throw new Error("register("+e+"): format module invalid");if(typeof r.prototype.append!="function"||typeof r.prototype.finalize!="function")throw new Error("register("+e+"): format module missing methods");Rw[e]=r};wh.isRegisteredFormat=function(e){return!!Rw[e]};wh.registerFormat("zip",PIe());wh.registerFormat("tar",nBe());wh.registerFormat("json",sBe());uBe.exports=wh});var KBe=m((PBt,Wf)=>{var got=fo().default;function VBe(){"use strict";Wf.exports=VBe=function(){return e},Wf.exports.__esModule=!0,Wf.exports.default=Wf.exports;var e={},r=Object.prototype,t=r.hasOwnProperty,n=Object.defineProperty||function(W,M,H){W[M]=H.value},i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(W,M,H){return Object.defineProperty(W,M,{value:H,enumerable:!0,configurable:!0,writable:!0}),W[M]}try{u({},"")}catch{u=function(H,X,ne){return H[X]=ne}}function l(W,M,H,X){var ne=M&&M.prototype instanceof d?M:d,ae=Object.create(ne.prototype),se=new I(X||[]);return n(ae,"_invoke",{value:D(W,H,se)}),ae}function c(W,M,H){try{return{type:"normal",arg:W.call(M,H)}}catch(X){return{type:"throw",arg:X}}}e.wrap=l;var f={};function d(){}function p(){}function h(){}var b={};u(b,a,function(){return this});var v=Object.getPrototypeOf,y=v&&v(v(V([])));y&&y!==r&&t.call(y,a)&&(b=y);var w=h.prototype=d.prototype=Object.create(b);function A(W){["next","throw","return"].forEach(function(M){u(W,M,function(H){return this._invoke(M,H)})})}function C(W,M){function H(ne,ae,se,ce){var me=c(W[ne],W,ae);if(me.type!=="throw"){var Me=me.arg,Ie=Me.value;return Ie&&got(Ie)=="object"&&t.call(Ie,"__await")?M.resolve(Ie.__await).then(function(Ue){H("next",Ue,se,ce)},function(Ue){H("throw",Ue,se,ce)}):M.resolve(Ie).then(function(Ue){Me.value=Ue,se(Me)},function(Ue){return H("throw",Ue,se,ce)})}ce(me.arg)}var X;n(this,"_invoke",{value:function(ae,se){function ce(){return new M(function(me,Me){H(ae,se,me,Me)})}return X=X?X.then(ce,ce):ce()}})}function D(W,M,H){var X="suspendedStart";return function(ne,ae){if(X==="executing")throw new Error("Generator is already running");if(X==="completed"){if(ne==="throw")throw ae;return N()}for(H.method=ne,H.arg=ae;;){var se=H.delegate;if(se){var ce=P(se,H);if(ce){if(ce===f)continue;return ce}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(X==="suspendedStart")throw X="completed",H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);X="executing";var me=c(W,M,H);if(me.type==="normal"){if(X=H.done?"completed":"suspendedYield",me.arg===f)continue;return{value:me.arg,done:H.done}}me.type==="throw"&&(X="completed",H.method="throw",H.arg=me.arg)}}}function P(W,M){var H=M.method,X=W.iterator[H];if(X===void 0)return M.delegate=null,H==="throw"&&W.iterator.return&&(M.method="return",M.arg=void 0,P(W,M),M.method==="throw")||H!=="return"&&(M.method="throw",M.arg=new TypeError("The iterator does not provide a '"+H+"' method")),f;var ne=c(X,W.iterator,M.arg);if(ne.type==="throw")return M.method="throw",M.arg=ne.arg,M.delegate=null,f;var ae=ne.arg;return ae?ae.done?(M[W.resultName]=ae.value,M.next=W.nextLoc,M.method!=="return"&&(M.method="next",M.arg=void 0),M.delegate=null,f):ae:(M.method="throw",M.arg=new TypeError("iterator result is not an object"),M.delegate=null,f)}function k(W){var M={tryLoc:W[0]};1 in W&&(M.catchLoc=W[1]),2 in W&&(M.finallyLoc=W[2],M.afterLoc=W[3]),this.tryEntries.push(M)}function L(W){var M=W.completion||{};M.type="normal",delete M.arg,W.completion=M}function I(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(k,this),this.reset(!0)}function V(W){if(W){var M=W[a];if(M)return M.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var H=-1,X=function ne(){for(;++H<W.length;)if(t.call(W,H))return ne.value=W[H],ne.done=!1,ne;return ne.value=void 0,ne.done=!0,ne};return X.next=X}}return{next:N}}function N(){return{value:void 0,done:!0}}return p.prototype=h,n(w,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=u(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(W){var M=typeof W=="function"&&W.constructor;return!!M&&(M===p||(M.displayName||M.name)==="GeneratorFunction")},e.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,h):(W.__proto__=h,u(W,s,"GeneratorFunction")),W.prototype=Object.create(w),W},e.awrap=function(W){return{__await:W}},A(C.prototype),u(C.prototype,o,function(){return this}),e.AsyncIterator=C,e.async=function(W,M,H,X,ne){ne===void 0&&(ne=Promise);var ae=new C(l(W,M,H,X),ne);return e.isGeneratorFunction(M)?ae:ae.next().then(function(se){return se.done?se.value:ae.next()})},A(w),u(w,s,"Generator"),u(w,a,function(){return this}),u(w,"toString",function(){return"[object Generator]"}),e.keys=function(W){var M=Object(W),H=[];for(var X in M)H.push(X);return H.reverse(),function ne(){for(;H.length;){var ae=H.pop();if(ae in M)return ne.value=ae,ne.done=!1,ne}return ne.done=!0,ne}},e.values=V,I.prototype={constructor:I,reset:function(M){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!M)for(var H in this)H.charAt(0)==="t"&&t.call(this,H)&&!isNaN(+H.slice(1))&&(this[H]=void 0)},stop:function(){this.done=!0;var M=this.tryEntries[0].completion;if(M.type==="throw")throw M.arg;return this.rval},dispatchException:function(M){if(this.done)throw M;var H=this;function X(Me,Ie){return se.type="throw",se.arg=M,H.next=Me,Ie&&(H.method="next",H.arg=void 0),!!Ie}for(var ne=this.tryEntries.length-1;ne>=0;--ne){var ae=this.tryEntries[ne],se=ae.completion;if(ae.tryLoc==="root")return X("end");if(ae.tryLoc<=this.prev){var ce=t.call(ae,"catchLoc"),me=t.call(ae,"finallyLoc");if(ce&&me){if(this.prev<ae.catchLoc)return X(ae.catchLoc,!0);if(this.prev<ae.finallyLoc)return X(ae.finallyLoc)}else if(ce){if(this.prev<ae.catchLoc)return X(ae.catchLoc,!0)}else{if(!me)throw new Error("try statement without catch or finally");if(this.prev<ae.finallyLoc)return X(ae.finallyLoc)}}}},abrupt:function(M,H){for(var X=this.tryEntries.length-1;X>=0;--X){var ne=this.tryEntries[X];if(ne.tryLoc<=this.prev&&t.call(ne,"finallyLoc")&&this.prev<ne.finallyLoc){var ae=ne;break}}ae&&(M==="break"||M==="continue")&&ae.tryLoc<=H&&H<=ae.finallyLoc&&(ae=null);var se=ae?ae.completion:{};return se.type=M,se.arg=H,ae?(this.method="next",this.next=ae.finallyLoc,f):this.complete(se)},complete:function(M,H){if(M.type==="throw")throw M.arg;return M.type==="break"||M.type==="continue"?this.next=M.arg:M.type==="return"?(this.rval=this.arg=M.arg,this.method="return",this.next="end"):M.type==="normal"&&H&&(this.next=H),f},finish:function(M){for(var H=this.tryEntries.length-1;H>=0;--H){var X=this.tryEntries[H];if(X.finallyLoc===M)return this.complete(X.completion,X.afterLoc),L(X),f}},catch:function(M){for(var H=this.tryEntries.length-1;H>=0;--H){var X=this.tryEntries[H];if(X.tryLoc===M){var ne=X.completion;if(ne.type==="throw"){var ae=ne.arg;L(X)}return ae}}throw new Error("illegal catch attempt")},delegateYield:function(M,H,X){return this.delegate={iterator:V(M),resultName:H,nextLoc:X},this.method==="next"&&(this.arg=void 0),f}},e}Wf.exports=VBe,Wf.exports.__esModule=!0,Wf.exports.default=Wf.exports});var $Be=m((BBt,YBe)=>{var n4=KBe()();YBe.exports=n4;try{regeneratorRuntime=n4}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=n4:Function("r","regeneratorRuntime = r")(n4)}});var oY=m(i4=>{"use strict";var iY=ln();Object.defineProperty(i4,"__esModule",{value:!0});i4.default=void 0;var vot=iY(ui()),bot=iY(li()),Th=iY(Ns()),yot=240,xot=[9,-18,-88,0,96,90,0,0,-60,-20,-9,18,8,0,-96,30,0,0,60,-20,9,-88,-18,90,96,0,-20,-60,0,0,186,-42,-42,-150,-96,-150,60,60,60,60,54,162,-78,30,-24,-90,-60,60,-60,60,-9,-32,18,30,24,0,20,-60,0,0,-9,8,18,30,-96,0,-20,60,0,0,54,-78,162,-90,-24,30,60,-60,60,-60,-54,78,78,90,144,90,-60,-60,-60,-60,9,-8,-18,-30,-24,0,20,60,0,0,-9,18,-32,0,24,30,0,0,-60,20,9,-18,-8,0,-24,-30,0,0,60,20],_ot=372,Eot=[0,0,-131,0,138,144,0,0,-102,-31,0,0,7,0,-138,42,0,0,102,-31,62,0,-31,0,0,-62,0,0,0,31,124,0,-62,0,0,-124,0,0,0,62,124,0,-62,0,0,-124,0,0,0,62,62,0,-31,0,0,-62,0,0,0,31,0,0,45,0,-183,-9,0,93,18,0,0,0,216,0,33,87,0,-93,12,-93,0,0,156,0,153,99,0,-93,-12,-93,0,0,-45,0,-3,9,0,93,-18,0,0,0,-55,0,48,42,0,0,-84,31,0,0,-7,0,-48,-42,0,0,84,31],wot=372,Sot=[18,-36,-122,0,120,135,0,0,-84,-31,-18,36,-2,0,-120,51,0,0,84,-31,36,-165,-27,93,147,-9,0,-93,18,0,210,45,-111,-93,-57,-192,0,93,12,93,162,141,-75,-93,-129,-180,0,93,-12,93,-36,-21,27,93,39,9,0,-93,-18,0,0,0,62,0,0,31,0,0,0,-31,0,0,124,0,0,62,0,0,0,-62,0,0,124,0,0,62,0,0,0,-62,0,0,62,0,0,31,0,0,0,-31,-18,36,-64,0,66,51,0,0,-102,31,18,-36,2,0,-66,-51,0,0,102,31],Aot=12,aY=(3+1)*(3+2)/2,Tot=2,Cot=function(){function e(r){(0,vot.default)(this,e),(0,Th.default)(this,"_v00",0),(0,Th.default)(this,"_v01",0),(0,Th.default)(this,"_v10",0),(0,Th.default)(this,"_v11",0),(0,Th.default)(this,"_t",[]),(0,Th.default)(this,"_ix",void 0),(0,Th.default)(this,"_iy",void 0),(0,Th.default)(this,"options",void 0),this.options=r,this._ix=this.options._width,this._iy=this.options._height}return(0,bot.default)(e,[{key:"getHeight",value:function(t,n){if(t=Math.abs(t)>90?NaN:t,isNaN(t)||isNaN(n))return NaN;var i=Dot(n,360);n=i!==-180?i:180;var a=n*this.options._rlonres,o=-t*this.options._rlatres,s=Math.floor(a),u=Math.min(Math.round((this.options._height-1)/2-1),Math.floor(o));a-=s,o-=u,u+=(this.options._height-1)/2,s+=s<0?this.options._width:s>=this.options._width?-this.options._width:0;var l=0,c=0,f=0,d=0,p=new Array(aY);if(s===this._ix&&u===this._iy)this.options.cubic?p=this._t:(l=this._v00,c=this._v01,f=this._v10,d=this._v11);else if(!this.options.cubic)l=this._rawval(s,u),c=this._rawval(s+1,u),f=this._rawval(s,u+1),d=this._rawval(s+1,u+1);else{var h=[this._rawval(s,u-1),this._rawval(s+1,u-1),this._rawval(s-1,u),this._rawval(s,u),this._rawval(s+1,u),this._rawval(s+2,u),this._rawval(s-1,u+1),this._rawval(s,u+1),this._rawval(s+1,u+1),this._rawval(s+2,u+1),this._rawval(s,u+2),this._rawval(s+1,u+2)],b=Eot;u!==0&&(b=u===this.options._height-2?Sot:xot);var v=_ot;u!==0&&(v=u===this.options._height-2?wot:yot);for(var y=0;y<aY;++y){p[y]=0;for(var w=0;w<Aot;++w)p[y]+=h[w]*b[aY*w+y];p[y]/=v}}if(!this.options.cubic){var A=(1-a)*l+a*c,C=(1-a)*f+a*d,D=(1-o)*A+o*C,P=this.options._offset+this.options._scale*D;return this._ix=s,this._iy=u,this._v00=l,this._v01=c,this._v10=f,this._v11=d,P}var k=p[0]+a*(p[1]+a*(p[3]+a*p[6]))+o*(p[2]+a*(p[4]+a*p[7])+o*(p[5]+a*p[8]+o*p[9]));return k=this.options._offset+this.options._scale*k,this._ix=s,this._iy=u,this._t=p,k}},{key:"_rawval",value:function(t,n){t<0?t+=this.options._width:t>=this.options._width&&(t-=this.options._width),(n<0||n>=this.options._height)&&(n=n<0?-n:2*(this.options._height-1)-n,t+=(t<this.options._width/2?1:-1)*this.options._width/2);var i=this.options._datastart+Tot*(n*this.options._swidth+t),a=this.options.data[i],o=this.options.data[i+1],s=a<<8|o;return s}}]),e}();i4.default=Cot;function Dot(e,r){r=Math.abs(r);var t=XBe(e,r);return 2*Math.abs(t)===r?t-=XBe(e,2*r)-t:2*Math.abs(t)>r&&(t+=t<0?r:-r),t}function XBe(e,r){return e-Math.floor(e/r)*r}});var t5e=m(sY=>{"use strict";var JBe=ln();Object.defineProperty(sY,"__esModule",{value:!0});sY.parsePGM=Bot;var QBe=JBe($Be()),kot=JBe(oY());function Oot(e,r){var t=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Rot(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
179
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){t=t.call(e)},n:function(){var l=t.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(o)throw s}}}}function Rot(e,r){if(!!e){if(typeof e=="string")return ZBe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ZBe(e,r)}}function ZBe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var Fot=QBe.default.mark(e5e),Iot=10,Pot=65535;function Bot(e,r){var t=e5e(e),n=t.next();if(n.done||n.value.line!=="P5")throw new Error("Geoid model file: File not in PGM format");var i=Number.MAX_VALUE,a=0,o=-1,s=-1,u="NONE",l="UNKNOWN",c=0,f=0,d=null,p=null;do{n=t.next();var h=n.value.line;if(!!h.length)if(h[0]==="#"){var b=h.split(" "),v=b[0],y=b[1];if(v!=="#"||!y)continue;var w=b.length>2?b.slice(2):[];if(y==="Description")u=w.join(" ");else if(y==="DateTime")l=w.join(" ");else if(y==="Offset"){if(!b[2])throw new Error("Geoid model file: Error reading offset");i=parseInt(b[2],10)}else if(y==="Scale"){if(!b[2])throw new Error("Geoid model file: Error reading scale");a=parseFloat(b[2])}else y===(r.cubic?"MaxCubicError":"MaxBilinearError")?isFinite(parseFloat(b[2]))&&(o=parseFloat(b[2])):y===(r.cubic?"RMSCubicError":"RMSBilinearError")&&isFinite(parseFloat(b[2]))&&(s=parseFloat(b[2]))}else{var A=h.split(" ");if(A=A.filter(function(k){return k!==""}),c=parseInt(A[0],10),f=parseInt(A[1],10),!(c&&f))throw new Error("Geoid model file: Error reading raster size");break}}while(!n.done);n=t.next();var C=parseInt(n.value.line,10);if(n.done)throw new Error("Geoid model file: Error reading maxval");if(C!==Pot)throw new Error("Geoid model file: Incorrect value of maxval");if(d=n.value.offset,p=c,i===Number.MAX_VALUE)throw new Error("Geoid model file: Offset not set");if(a===0)throw new Error("Geoid model file: Scale not set");if(a<0)throw new Error("Geoid model file: Scale must be positive");if(f<2||c<2)throw new Error("Geoid model file: Raster size too small");if(c&1)throw new Error("Geoid model file: Raster width is odd");if(!(f&1))throw new Error("Geoid model file: Raster height is even");var D=c/360,P=(f-1)/180;return new kot.default({cubic:r.cubic,_width:c,_height:f,_rlonres:D,_rlatres:P,_offset:i,_scale:a,_swidth:p,_datastart:d,_maxerror:o,_rmserror:s,_description:u,_datetime:l,data:e})}function e5e(e){var r,t,n,i;return QBe.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:r=0;case 1:if(t=e.indexOf(Iot,r),t===-1){o.next=9;break}return n=e.subarray(r,t),r=t+1,o.next=7,{offset:r,line:r5e(n)};case 7:o.next=13;break;case 9:return i=e.subarray(r,e.length),r=e.length,o.next=13,{offset:r,line:r5e(i)};case 13:if(r<e.length){o.next=1;break}case 14:return o.abrupt("return",{offset:r,line:""});case 15:case"end":return o.stop()}},Fot)}function r5e(e){var r="",t=Oot(e),n;try{for(t.s();!(n=t.n()).done;){var i=n.value;r+=String.fromCharCode(i)}}catch(a){t.e(a)}finally{t.f()}return r}});var n5e=m(a4=>{"use strict";var jot=ln();Object.defineProperty(a4,"__esModule",{value:!0});Object.defineProperty(a4,"parsePGM",{enumerable:!0,get:function(){return Mot.parsePGM}});Object.defineProperty(a4,"Geoid",{enumerable:!0,get:function(){return Lot.default}});var Mot=t5e(),Lot=jot(oY())});var y5e=m(c4=>{"use strict";Object.defineProperty(c4,"__esModule",{value:!0});c4.default=void 0;var mst={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,TEXTURE_WIDTH:4096,TEXTURE_HEIGHT:4097,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,MAX_3D_TEXTURE_SIZE:32883,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,MAX_TEXTURE_LOD_BIAS:34045,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,RASTERIZER_DISCARD:35977,VERTEX_ARRAY_BINDING:34229,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,MAX_ELEMENT_INDEX:36203,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,RGB9_E5:35901,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2UI:36975,TEXTURE_IMMUTABLE_FORMAT:37167,TEXTURE_IMMUTABLE_LEVELS:33503,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,UNSIGNED_INT_24_8:34042,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,INT_2_10_10_10_REV:36255,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,MAX_SAMPLES:36183,SAMPLER_BINDING:35097,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,UNSIGNED_NORMALIZED:35863,SIGNED_NORMALIZED:36764,VERTEX_ATTRIB_ARRAY_INTEGER:35069,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,DEPTH24_STENCIL8:35056,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,COLOR:6144,DEPTH:6145,STENCIL:6146,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,INVALID_INDEX:4294967295,TIMEOUT_IGNORED:-1,MAX_CLIENT_WAIT_TIMEOUT_WEBGL:37447,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,UNMASKED_VENDOR_WEBGL:37445,UNMASKED_RENDERER_WEBGL:37446,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,TEXTURE_MAX_ANISOTROPY_EXT:34046,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35986,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,UNSIGNED_INT_24_8_WEBGL:34042,HALF_FLOAT_OES:36193,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863,MIN_EXT:32775,MAX_EXT:32776,SRGB_EXT:35904,SRGB_ALPHA_EXT:35906,SRGB8_ALPHA8_EXT:35907,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067,COLOR_ATTACHMENT4_WEBGL:36068,COLOR_ATTACHMENT5_WEBGL:36069,COLOR_ATTACHMENT6_WEBGL:36070,COLOR_ATTACHMENT7_WEBGL:36071,COLOR_ATTACHMENT8_WEBGL:36072,COLOR_ATTACHMENT9_WEBGL:36073,COLOR_ATTACHMENT10_WEBGL:36074,COLOR_ATTACHMENT11_WEBGL:36075,COLOR_ATTACHMENT12_WEBGL:36076,COLOR_ATTACHMENT13_WEBGL:36077,COLOR_ATTACHMENT14_WEBGL:36078,COLOR_ATTACHMENT15_WEBGL:36079,DRAW_BUFFER0_WEBGL:34853,DRAW_BUFFER1_WEBGL:34854,DRAW_BUFFER2_WEBGL:34855,DRAW_BUFFER3_WEBGL:34856,DRAW_BUFFER4_WEBGL:34857,DRAW_BUFFER5_WEBGL:34858,DRAW_BUFFER6_WEBGL:34859,DRAW_BUFFER7_WEBGL:34860,DRAW_BUFFER8_WEBGL:34861,DRAW_BUFFER9_WEBGL:34862,DRAW_BUFFER10_WEBGL:34863,DRAW_BUFFER11_WEBGL:34864,DRAW_BUFFER12_WEBGL:34865,DRAW_BUFFER13_WEBGL:34866,DRAW_BUFFER14_WEBGL:34867,DRAW_BUFFER15_WEBGL:34868,MAX_COLOR_ATTACHMENTS_WEBGL:36063,MAX_DRAW_BUFFERS_WEBGL:34852,VERTEX_ARRAY_BINDING_OES:34229,QUERY_COUNTER_BITS_EXT:34916,CURRENT_QUERY_EXT:34917,QUERY_RESULT_EXT:34918,QUERY_RESULT_AVAILABLE_EXT:34919,TIME_ELAPSED_EXT:35007,TIMESTAMP_EXT:36392,GPU_DISJOINT_EXT:36795};c4.default=mst});var ll=typeof process!="object"||String(process)!=="[object process]"||process.browser,A4={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},Fi=A4.global||A4.self||A4.window;var JY={ibm866:[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],"iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],"iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],"iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],"iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],"iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],"iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],"iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],"iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],"koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],"koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],macintosh:[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],"windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],"windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],"windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],"windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],"windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],"windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],"x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]};global["encoding-indexes"]=JY||{};function it(e,r,t){return r<=e&&e<=t}function Nje(e,r){return e.indexOf(r)!==-1}var Dc=Math.floor;function oS(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function Uje(e){for(var r=String(e),t=r.length,n=0,i=[];n<t;){var a=r.charCodeAt(n);if(a<55296||a>57343)i.push(a);else if(56320<=a&&a<=57343)i.push(65533);else if(55296<=a&&a<=56319)if(n===t-1)i.push(65533);else{var o=r.charCodeAt(n+1);if(56320<=o&&o<=57343){var s=a&1023,u=o&1023;i.push(65536+(s<<10)+u),n+=1}else i.push(65533)}n+=1}return i}function Gje(e){for(var r="",t=0;t<e.length;++t){var n=e[t];n<=65535?r+=String.fromCharCode(n):(n-=65536,r+=String.fromCharCode((n>>10)+55296,(n&1023)+56320))}return r}function hs(e){return 0<=e&&e<=127}var ms=hs,Ft=-1;function T4(e){this.tokens=[].slice.call(e),this.tokens.reverse()}T4.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():Ft},prepend:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.push(r.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.unshift(r.shift());else this.tokens.unshift(e)}};var Sn=-1;function It(e,r){if(e)throw TypeError("Decoder error");return r||65533}function hu(e){throw TypeError("The code point "+e+" could not be encoded.")}function zje(){}zje.prototype={handler:function(e,r){}};function Hje(){}Hje.prototype={handler:function(e,r){}};function C4(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(D4,e)?D4[e]:null}var QY=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],D4={};QY.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(t){D4[t]=r})})});var _o={},Eo={};function Km(e,r){return r&&r[e]||null}function Ym(e,r){var t=r.indexOf(e);return t===-1?null:t}function io(e){if(!("encoding-indexes"in global))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return global["encoding-indexes"][e]}function Wje(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,t=0,n=io("gb18030-ranges"),i;for(i=0;i<n.length;++i){var a=n[i];if(a[0]<=e)r=a[0],t=a[1];else break}return t+e-r}function Vje(e){if(e===59335)return 7457;var r=0,t=0,n=io("gb18030-ranges"),i;for(i=0;i<n.length;++i){var a=n[i];if(a[1]<=e)r=a[1],t=a[0];else break}return t+e-r}function Kje(e){k4=k4||io("jis0208").map(function(t,n){return it(n,8272,8835)?null:t});var r=k4;return r.indexOf(e)}var k4;function Yje(e){O4=O4||io("big5").map(function(t,n){return n<(161-129)*157?null:t});var r=O4;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):Ym(e,r)}var O4,ZY="utf-8";function Rh(e,r){if(!(this instanceof Rh))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):ZY,r=oS(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var t=C4(e);if(t===null||t.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Eo[t.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var n=this;return n._encoding=t,Boolean(r.fatal)&&(n._error_mode="fatal"),Boolean(r.ignoreBOM)&&(n._ignoreBOM=!0),Object.defineProperty||(this.encoding=n._encoding.name.toLowerCase(),this.fatal=n._error_mode==="fatal",this.ignoreBOM=n._ignoreBOM),n}Object.defineProperty&&(Object.defineProperty(Rh.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(Rh.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(Rh.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));Rh.prototype.decode=function(r,t){var n;typeof r=="object"&&r instanceof ArrayBuffer?n=new Uint8Array(r):typeof r=="object"&&"buffer"in r&&r.buffer instanceof ArrayBuffer?n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):n=new Uint8Array(0),t=oS(t),this._do_not_flush||(this._decoder=Eo[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(t.stream);for(var i=new T4(n),a=[],o;;){var s=i.read();if(s===Ft||(o=this._decoder.handler(i,s),o===Sn))break;o!==null&&(Array.isArray(o)?a.push.apply(a,o):a.push(o))}if(!this._do_not_flush){do{if(o=this._decoder.handler(i,i.read()),o===Sn)break;o!==null&&(Array.isArray(o)?a.push.apply(a,o):a.push(o))}while(!i.endOfStream());this._decoder=null}function u(l){return Nje(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(l.length>0&&l[0]===65279?(this._BOMseen=!0,l.shift()):l.length>0&&(this._BOMseen=!0)),Gje(l)}return u.call(this,a)};function Px(e,r){if(!(this instanceof Px))throw TypeError("Called as a function. Did you forget 'new'?");r=oS(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var t=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):ZY;var n=C4(e);if(n===null||n.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!_o[n.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");t._encoding=n}else t._encoding=C4("utf-8"),e!==void 0&&"console"in global&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=t._encoding.name.toLowerCase()),t}Object.defineProperty&&Object.defineProperty(Px.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Px.prototype.encode=function(r,t){r=r===void 0?"":String(r),t=oS(t),this._do_not_flush||(this._encoder=_o[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(t.stream);for(var n=new T4(Uje(r)),i=[],a;;){var o=n.read();if(o===Ft||(a=this._encoder.handler(n,o),a===Sn))break;Array.isArray(a)?i.push.apply(i,a):i.push(a)}if(!this._do_not_flush){for(;a=this._encoder.handler(n,n.read()),a!==Sn;)Array.isArray(a)?i.push.apply(i,a):i.push(a);this._encoder=null}return new Uint8Array(i)};function $je(e){var r=e.fatal,t=0,n=0,i=0,a=128,o=191;this.handler=function(s,u){if(u===Ft&&i!==0)return i=0,It(r);if(u===Ft)return Sn;if(i===0){if(it(u,0,127))return u;if(it(u,194,223))i=1,t=u&31;else if(it(u,224,239))u===224&&(a=160),u===237&&(o=159),i=2,t=u&15;else if(it(u,240,244))u===240&&(a=144),u===244&&(o=143),i=3,t=u&7;else return It(r);return null}if(!it(u,a,o))return t=i=n=0,a=128,o=191,s.prepend(u),It(r);if(a=128,o=191,t=t<<6|u&63,n+=1,n!==i)return null;var l=t;return t=i=n=0,l}}function Xje(e){var r=e.fatal;this.handler=function(t,n){if(n===Ft)return Sn;if(ms(n))return n;var i,a;it(n,128,2047)?(i=1,a=192):it(n,2048,65535)?(i=2,a=224):it(n,65536,1114111)&&(i=3,a=240);for(var o=[(n>>6*i)+a];i>0;){var s=n>>6*(i-1);o.push(128|s&63),i-=1}return o}}_o["UTF-8"]=function(e){return new Xje(e)};Eo["UTF-8"]=function(e){return new $je(e)};function Jje(e,r){var t=r.fatal;this.handler=function(n,i){if(i===Ft)return Sn;if(hs(i))return i;var a=e[i-128];return a===null?It(t):a}}function Qje(e,r){var t=r.fatal;this.handler=function(n,i){if(i===Ft)return Sn;if(ms(i))return i;var a=Ym(i,e);return a===null&&hu(i),a+128}}(function(){"encoding-indexes"in global&&QY.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var t=r.name,n=io(t.toLowerCase());Eo[t]=function(i){return new Jje(n,i)},_o[t]=function(i){return new Qje(n,i)}})})})();Eo.GBK=function(e){return new e$(e)};_o.GBK=function(e){return new r$(e,!0)};function e$(e){var r=e.fatal,t=0,n=0,i=0;this.handler=function(a,o){if(o===Ft&&t===0&&n===0&&i===0)return Sn;o===Ft&&(t!==0||n!==0||i!==0)&&(t=0,n=0,i=0,It(r));var s;if(i!==0){s=null,it(o,48,57)&&(s=Wje((((t-129)*10+n-48)*126+i-129)*10+o-48));var u=[n,i,o];return t=0,n=0,i=0,s===null?(a.prepend(u),It(r)):s}if(n!==0)return it(o,129,254)?(i=o,null):(a.prepend([n,o]),t=0,n=0,It(r));if(t!==0){if(it(o,48,57))return n=o,null;var l=t,c=null;t=0;var f=o<127?64:65;return(it(o,64,126)||it(o,128,254))&&(c=(l-129)*190+(o-f)),s=c===null?null:Km(c,io("gb18030")),s===null&&hs(o)&&a.prepend(o),s===null?It(r):s}return hs(o)?o:o===128?8364:it(o,129,254)?(t=o,null):It(r)}}function r$(e,r){var t=e.fatal;this.handler=function(n,i){if(i===Ft)return Sn;if(ms(i))return i;if(i===58853)return hu(i);if(r&&i===8364)return 128;var a=Ym(i,io("gb18030"));if(a!==null){var o=Dc(a/190)+129,s=a%190,u=s<63?64:65;return[o,s+u]}if(r)return hu(i);a=Vje(i);var l=Dc(a/10/126/10);a=a-l*10*126*10;var c=Dc(a/10/126);a=a-c*10*126;var f=Dc(a/10),d=a-f*10;return[l+129,c+48,f+129,d+48]}}_o.gb18030=function(e){return new r$(e)};Eo.gb18030=function(e){return new e$(e)};function Zje(e){var r=e.fatal,t=0;this.handler=function(n,i){if(i===Ft&&t!==0)return t=0,It(r);if(i===Ft&&t===0)return Sn;if(t!==0){var a=t,o=null;t=0;var s=i<127?64:98;switch((it(i,64,126)||it(i,161,254))&&(o=(a-129)*157+(i-s)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var u=o===null?null:Km(o,io("big5"));return u===null&&hs(i)&&n.prepend(i),u===null?It(r):u}return hs(i)?i:it(i,129,254)?(t=i,null):It(r)}}function eMe(e){var r=e.fatal;this.handler=function(t,n){if(n===Ft)return Sn;if(ms(n))return n;var i=Yje(n);if(i===null)return hu(n);var a=Dc(i/157)+129;if(a<161)return hu(n);var o=i%157,s=o<63?64:98;return[a,o+s]}}_o.Big5=function(e){return new eMe(e)};Eo.Big5=function(e){return new Zje(e)};function rMe(e){var r=e.fatal,t=!1,n=0;this.handler=function(i,a){if(a===Ft&&n!==0)return n=0,It(r);if(a===Ft&&n===0)return Sn;if(n===142&&it(a,161,223))return n=0,65377-161+a;if(n===143&&it(a,161,254))return t=!0,n=a,null;if(n!==0){var o=n;n=0;var s=null;return it(o,161,254)&&it(a,161,254)&&(s=Km((o-161)*94+(a-161),io(t?"jis0212":"jis0208"))),t=!1,it(a,161,254)||i.prepend(a),s===null?It(r):s}return hs(a)?a:a===142||a===143||it(a,161,254)?(n=a,null):It(r)}}function tMe(e){var r=e.fatal;this.handler=function(t,n){if(n===Ft)return Sn;if(ms(n))return n;if(n===165)return 92;if(n===8254)return 126;if(it(n,65377,65439))return[142,n-65377+161];n===8722&&(n=65293);var i=Ym(n,io("jis0208"));if(i===null)return hu(n);var a=Dc(i/94)+161,o=i%94+161;return[a,o]}}_o["EUC-JP"]=function(e){return new tMe(e)};Eo["EUC-JP"]=function(e){return new rMe(e)};function nMe(e){var r=e.fatal,t={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},n=t.ASCII,i=t.ASCII,a=0,o=!1;this.handler=function(s,u){switch(n){default:case t.ASCII:return u===27?(n=t.EscapeStart,null):it(u,0,127)&&u!==14&&u!==15&&u!==27?(o=!1,u):u===Ft?Sn:(o=!1,It(r));case t.Roman:return u===27?(n=t.EscapeStart,null):u===92?(o=!1,165):u===126?(o=!1,8254):it(u,0,127)&&u!==14&&u!==15&&u!==27&&u!==92&&u!==126?(o=!1,u):u===Ft?Sn:(o=!1,It(r));case t.Katakana:return u===27?(n=t.EscapeStart,null):it(u,33,95)?(o=!1,65377-33+u):u===Ft?Sn:(o=!1,It(r));case t.LeadByte:return u===27?(n=t.EscapeStart,null):it(u,33,126)?(o=!1,a=u,n=t.TrailByte,null):u===Ft?Sn:(o=!1,It(r));case t.TrailByte:if(u===27)return n=t.EscapeStart,It(r);if(it(u,33,126)){n=t.LeadByte;var l=(a-33)*94+u-33,c=Km(l,io("jis0208"));return c===null?It(r):c}return u===Ft?(n=t.LeadByte,s.prepend(u),It(r)):(n=t.LeadByte,It(r));case t.EscapeStart:return u===36||u===40?(a=u,n=t.Escape,null):(s.prepend(u),o=!1,n=i,It(r));case t.Escape:var f=a;a=0;var d=null;if(f===40&&u===66&&(d=t.ASCII),f===40&&u===74&&(d=t.Roman),f===40&&u===73&&(d=t.Katakana),f===36&&(u===64||u===66)&&(d=t.LeadByte),d!==null){n=n=d;var p=o;return o=!0,p?It(r):null}return s.prepend([f,u]),o=!1,n=i,It(r)}}}function iMe(e){var r=e.fatal,t={ASCII:0,Roman:1,jis0208:2},n=t.ASCII;this.handler=function(i,a){if(a===Ft&&n!==t.ASCII)return i.prepend(a),n=t.ASCII,[27,40,66];if(a===Ft&&n===t.ASCII)return Sn;if((n===t.ASCII||n===t.Roman)&&(a===14||a===15||a===27))return hu(65533);if(n===t.ASCII&&ms(a))return a;if(n===t.Roman&&(ms(a)&&a!==92&&a!==126||a==165||a==8254)){if(ms(a))return a;if(a===165)return 92;if(a===8254)return 126}if(ms(a)&&n!==t.ASCII)return i.prepend(a),n=t.ASCII,[27,40,66];if((a===165||a===8254)&&n!==t.Roman)return i.prepend(a),n=t.Roman,[27,40,74];a===8722&&(a=65293);var o=Ym(a,io("jis0208"));if(o===null)return hu(a);if(n!==t.jis0208)return i.prepend(a),n=t.jis0208,[27,36,66];var s=Dc(o/94)+33,u=o%94+33;return[s,u]}}_o["ISO-2022-JP"]=function(e){return new iMe(e)};Eo["ISO-2022-JP"]=function(e){return new nMe(e)};function aMe(e){var r=e.fatal,t=0;this.handler=function(n,i){if(i===Ft&&t!==0)return t=0,It(r);if(i===Ft&&t===0)return Sn;if(t!==0){var a=t,o=null;t=0;var s=i<127?64:65,u=a<160?129:193;if((it(i,64,126)||it(i,128,252))&&(o=(a-u)*188+i-s),it(o,8836,10715))return 57344-8836+o;var l=o===null?null:Km(o,io("jis0208"));return l===null&&hs(i)&&n.prepend(i),l===null?It(r):l}return hs(i)||i===128?i:it(i,161,223)?65377-161+i:it(i,129,159)||it(i,224,252)?(t=i,null):It(r)}}function oMe(e){var r=e.fatal;this.handler=function(t,n){if(n===Ft)return Sn;if(ms(n)||n===128)return n;if(n===165)return 92;if(n===8254)return 126;if(it(n,65377,65439))return n-65377+161;n===8722&&(n=65293);var i=Kje(n);if(i===null)return hu(n);var a=Dc(i/188),o=a<31?129:193,s=i%188,u=s<63?64:65;return[a+o,s+u]}}_o.Shift_JIS=function(e){return new oMe(e)};Eo.Shift_JIS=function(e){return new aMe(e)};function sMe(e){var r=e.fatal,t=0;this.handler=function(n,i){if(i===Ft&&t!==0)return t=0,It(r);if(i===Ft&&t===0)return Sn;if(t!==0){var a=t,o=null;t=0,it(i,65,254)&&(o=(a-129)*190+(i-65));var s=o===null?null:Km(o,io("euc-kr"));return o===null&&hs(i)&&n.prepend(i),s===null?It(r):s}return hs(i)?i:it(i,129,254)?(t=i,null):It(r)}}function uMe(e){var r=e.fatal;this.handler=function(t,n){if(n===Ft)return Sn;if(ms(n))return n;var i=Ym(n,io("euc-kr"));if(i===null)return hu(n);var a=Dc(i/190)+129,o=i%190+65;return[a,o]}}_o["EUC-KR"]=function(e){return new uMe(e)};Eo["EUC-KR"]=function(e){return new sMe(e)};function sS(e,r){var t=e>>8,n=e&255;return r?[t,n]:[n,t]}function t$(e,r){var t=r.fatal,n=null,i=null;this.handler=function(a,o){if(o===Ft&&(n!==null||i!==null))return It(t);if(o===Ft&&n===null&&i===null)return Sn;if(n===null)return n=o,null;var s;if(e?s=(n<<8)+o:s=(o<<8)+n,n=null,i!==null){var u=i;return i=null,it(s,56320,57343)?65536+(u-55296)*1024+(s-56320):(a.prepend(sS(s,e)),It(t))}return it(s,55296,56319)?(i=s,null):it(s,56320,57343)?It(t):s}}function n$(e,r){var t=r.fatal;this.handler=function(n,i){if(i===Ft)return Sn;if(it(i,0,65535))return sS(i,e);var a=sS((i-65536>>10)+55296,e),o=sS((i-65536&1023)+56320,e);return a.concat(o)}}_o["UTF-16BE"]=function(e){return new n$(!0,e)};Eo["UTF-16BE"]=function(e){return new t$(!0,e)};_o["UTF-16LE"]=function(e){return new n$(!1,e)};Eo["UTF-16LE"]=function(e){return new t$(!1,e)};function lMe(e){var r=e.fatal;this.handler=function(t,n){return n===Ft?Sn:hs(n)?n:63360+n-128}}function cMe(e){var r=e.fatal;this.handler=function(t,n){return n===Ft?Sn:ms(n)?n:it(n,63360,63487)?n-63360+128:hu(n)}}_o["x-user-defined"]=function(e){return new cMe(e)};Eo["x-user-defined"]=function(e){return new lMe(e)};var fMe="rejected",dMe="fulfilled";function i$(e){let r=e.map(t=>t.then(n=>({status:dMe,value:n})).catch(n=>({status:fMe,reason:n})));return Promise.all(r)}function uS(e){return Buffer.from(e).toString("base64")}function R4(e){return Buffer.from(e,"base64").toString("ascii")}var cl=class{constructor(r){this.map={},r instanceof cl?r.forEach((t,n)=>this.append(n,t)):Array.isArray(r)?r.forEach(t=>this.append(t[0],t[1])):r&&Object.getOwnPropertyNames(r).forEach(t=>this.append(t,r[t]))}append(r,t){r=Bx(r),t=a$(t);let n=this.map[r];this.map[r]=n?`${n}, ${t}`:t}delete(r){delete this.map[Bx(r)]}get(r){return r=Bx(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(Bx(r))}set(r,t){this.map[Bx(r)]=a$(t)}forEach(r,t=null){for(let n in this.map)this.map.hasOwnProperty(n)&&(t?r.call(t,this.map[n],n,this):r(this.map[n],n,this))}keys(){let r=[];return this.forEach(function(t,n){r.push(n)}),F4(r)}values(){let r=[];return this.forEach(function(t){r.push(t)}),F4(r)}entries(){let r=[];return this.forEach(function(t,n){r.push([n,t])}),F4(r)}*[Symbol.iterator](){yield*this.entries()}};function Bx(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e)||e==="")throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a$(e){return typeof e!="string"&&(e=String(e)),e}function F4(e){let r={next(){let t=e.shift();return{done:t===void 0,value:t}}};return r[Symbol.iterator]=function(){return r},r}function I4(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var lS=$e(require("zlib"));var pMe=e=>e&&e instanceof ArrayBuffer,hMe=e=>e&&e instanceof Buffer;function o$(e){let r=e.indexOf(","),t,n;return e.slice(r-7,r)===";base64"?(t=Buffer.from(e.slice(r+1),"base64"),n=e.slice(5,r-7).trim()):(t=Buffer.from(decodeURIComponent(e.slice(r+1))),n=e.slice(5,r).trim()),n?n.startsWith(";")&&(n=`text/plain${n}`):n="text/plain;charset=US-ASCII",{arrayBuffer:P4(t),mimeType:n}}function P4(e){if(pMe(e))return e;if(hMe(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}function s$(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(lS.default.createBrotliDecompress());case"gzip":return e.pipe(lS.default.createGunzip());case"deflate":return e.pipe(lS.default.createDeflate());default:return e}}async function u$(e){let r=[];return await new Promise((t,n)=>{e.on("error",i=>n(i)),e.on("readable",()=>e.read()),e.on("data",i=>{typeof i=="string"&&n(new Error("Read stream not binary")),r.push(P4(i))}),e.on("end",()=>{let i=mMe(r);t(i)})})}function mMe(e){let r=e.map(a=>a instanceof ArrayBuffer?new Uint8Array(a):a),t=r.reduce((a,o)=>a+o.byteLength,0),n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n.buffer}var j4=$e(require("stream")),gMe=e=>typeof e=="boolean",l$=e=>typeof e=="function",vMe=e=>e!==null&&typeof e=="object",B4=e=>vMe(e)&&l$(e.read)&&l$(e.pipe)&&gMe(e.readable),nd=class{constructor(r,t){this.bodyUsed=!1;let{headers:n,status:i=200,statusText:a="OK",url:o}=t||{};this.url=o,this.ok=i===200,this.status=i,this.statusText=a,this.headers=new cl((t==null?void 0:t.headers)||{}),B4(r)?this._body=s$(r,n):typeof r=="string"?this._body=j4.Readable.from([new TextEncoder().encode(r)]):this._body=j4.Readable.from([r||new ArrayBuffer(0)])}get body(){return I4(!this.bodyUsed),I4(B4(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return B4(this._body)?await u$(this._body):this._body||new ArrayBuffer(0)}async text(){let r=await this.arrayBuffer();return new TextDecoder().decode(r)}async json(){let r=await this.text();return JSON.parse(r)}async blob(){if(typeof Blob=="undefined")throw new Error("Blob polyfill not installed");return new Blob([await this.arrayBuffer()])}};var c$=$e(require("http")),f$=$e(require("https"));var M4=e=>e.startsWith("data:"),bMe=e=>e.startsWith("http:")||e.startsWith("https:");async function jx(e,r){try{if(globalThis.fetch!==jx&&(bMe(e)||M4(e)))return await fetch(e,r);if(M4(e)){let{arrayBuffer:l,mimeType:c}=o$(e);return new nd(l,{headers:{"content-type":c},url:e})}let t={},n=e;e.endsWith(".gz")&&(e=e.slice(0,-3),t["content-encoding"]="gzip");let i=await yMe(n,r),a=wMe(e,i,t),{status:o,statusText:s}=EMe(i),u=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&a.has("location")&&u){let l=xMe(e,a.get("location"));return await jx(l,r)}return new nd(i,{headers:a,status:o,statusText:s,url:e})}catch(t){return new nd(null,{status:400,statusText:String(t),url:e})}}async function yMe(e,r){return await new Promise((t,n)=>{let i=_Me(e,r),a=e.startsWith("https:")?f$.default.request(i,o=>t(o)):c$.default.request(i,o=>t(o));a.on("error",o=>n(o)),a.end()})}function xMe(e,r){if(r.startsWith("http"))return r;let t=new URL(e);return t.pathname=r,t.href}function _Me(e,r){let t=(r==null?void 0:r.headers)||{},n={};for(let a of Object.keys(t))n[a.toLowerCase()]=t[a];n["accept-encoding"]=n["accept-encoding"]||"gzip,br,deflate";let i=new URL(e);return ze(oe(oe({hostname:i.hostname,path:i.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:n,port:i.port})}function EMe(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function wMe(e,r,t={}){let n={};if(r&&r.headers){let i=r.headers;for(let a in i){let o=i[a];n[a.toLowerCase()]=String(o)}}if(!n["content-length"]){let i=SMe(e);Number.isFinite(i)&&(n["content-length"]=i)}return Object.assign(n,t),new cl(n)}function SMe(e){return M4(e)?e.length-"data:".length:null}var aQ=$e(nQ()),oQ=$e(Hx());function iQ(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function Lqe(e,r){let t=r.type?r.type.replace("image/",""):"jpeg",n=(0,oQ.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,aQ.default)(n,t,r)}function MI(e,r){let t=Lqe(e,r);return new Promise(n=>{let i=[];t.on("data",a=>i.push(a)),t.on("end",()=>{let a=Buffer.concat(i);n(iQ(a))})})}var qse=$e(Lse()),Nse=["image/png","image/jpeg","image/gif"];async function U5(e,r){if(!r)throw new Error("MIMEType is required to parse image under Node.js");let t=e instanceof Buffer?e:Buffer.from(e);return await XXe(t,r)}function XXe(e,r){return new Promise(t=>(0,qse.default)(e,r,(n,i)=>{if(n)throw n;let a=[...i.shape],o=i.shape.length===4?i.shape.shift():1,s=i.data instanceof Buffer?new Uint8Array(i.data):i.data;t({shape:a,data:s,width:i.shape[0],height:i.shape[1],components:i.shape[2],layers:o?[o]:[]})}))}var zse=$e(Gse());delete global.ReadableStream;var G5=class extends zse.ReadableStream{};var z5=class{constructor(r){this.isWorking=!1;this.isCancelled=!1;this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:t}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let n;try{n=t.next()}catch(i){r.error(i);break}n&&(!n.done&&!this.isCancelled?r.enqueue(n.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var H5=class extends G5{constructor(r){super(new z5(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let t=this.getReader();yield*this._chunks,t.releaseLock()}};var Xh=class{constructor(r=[],t={}){this.parts=[],this.size=0;for(let n of r)if(typeof n=="string"){let i=new TextEncoder().encode(n);this.parts.push(i),this.size+=i.byteLength}else if(n instanceof Xh)this.size+=n.size,this.parts.push(...n.parts);else if(n instanceof ArrayBuffer)this.parts.push(new Uint8Array(n)),this.size+=n.byteLength;else if(n instanceof Uint8Array)this.parts.push(n),this.size+=n.byteLength;else if(ArrayBuffer.isView(n)){let{buffer:i,byteOffset:a,byteLength:o}=n;this.parts.push(new Uint8Array(i,a,o)),this.size+=o}else{let i=new TextEncoder().encode(String(n));this.parts.push(i),this.size+=i.byteLength}this.type=JXe(t.type)}slice(r=0,t=this.size,n=""){let{size:i,parts:a}=this,o=r<0?Math.max(i+r,0):Math.min(r,i),s=t<0?Math.max(i+t,0):Math.min(t,i),u=Math.max(s-o,0),l=new Xh([],{type:n});if(u===0)return l;let c=0,f=[];for(let d of a){let{byteLength:p}=d;if(o>0&&p<=o)o-=p,s-=p;else{let h=d.subarray(o,Math.min(p,s));if(f.push(h),c+=h.byteLength,o=0,c>=u)break}}return l.parts=f,l.size=c,l}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,t="";for(let n of this.parts)t+=r.decode(n);return t}stream(){return new H5(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),t=new Uint8Array(r),n=0;for(let i of this.parts)t.set(i,n),n+=i.byteLength;return r}};function JXe(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var W5=class extends Xh{constructor(r,t,n={}){super(r,n);this.name="";this.webkitRelativePath="";this.name=String(t).replace(/\//g,":"),this.lastModified=(n==null?void 0:n.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};var ZXe=!ll||!("TextEncoder"in Fi);ZXe&&(Fi.TextEncoder=Px);var eJe=!ll||!("TextDecoder"in Fi);eJe&&(Fi.TextDecoder=Rh);!ll&&!("atob"in Fi)&&uS&&(Fi.atob=uS);!ll&&!("btoa"in Fi)&&R4&&(Fi.btoa=R4);!ll&&!("Headers"in Fi)&&cl&&(Fi.Headers=cl);!ll&&!("Response"in Fi)&&nd&&(Fi.Response=nd);!ll&&!("fetch"in Fi)&&jx&&(Fi.fetch=jx);!ll&&!("_encodeImageNode"in Fi)&&MI&&(Fi._encodeImageNode=MI);!ll&&!("_parseImageNode"in Fi)&&U5&&(Fi._parseImageNode=U5,Fi._imageFormatsNode=Nse);"allSettled"in Promise||(Promise.allSettled=i$);var eje=$e(require("path")),rje=$e(c_e());function Qr(e,r){if(!e)throw new Error(r||"loader assertion failed.")}var Hl={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},f_e=Hl.self||Hl.window||Hl.global||{},d_e=Hl.window||Hl.self||Hl.global||{},p_e=Hl.global||Hl.self||Hl.window||{},h_e=Hl.document||{};var wi=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var m_e=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),M8r=m_e&&parseFloat(m_e[1])||0;var pp="4.0.0-alpha.21";function xa(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var Wl={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},_2t=Wl.self||Wl.window||Wl.global||{},E2t=Wl.window||Wl.self||Wl.global||{},g_e=Wl.global||Wl.self||Wl.window||{},w2t=Wl.document||{};var co=typeof process!="object"||String(process)!=="[object process]"||process.browser,$_=typeof importScripts=="function",v_e=typeof window!="undefined"&&typeof window.orientation!="undefined",b_e=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),S2t=b_e&&parseFloat(b_e[1])||0;var oD=class{constructor(r,t){this.isRunning=!0;this._resolve=()=>{};this._reject=()=>{};this.name=r,this.workerThread=t,this.result=new Promise((n,i)=>{this._resolve=n,this._reject=i})}postMessage(r,t){this.workerThread.postMessage({source:"loaders.gl",type:r,payload:t})}done(r){xa(this.isRunning),this.isRunning=!1,this._resolve(r)}error(r){xa(this.isRunning),this.isRunning=!1,this._reject(r)}};var db={};xo(db,{NodeWorker:()=>X_});var y_e=$e(require("worker_threads"));Ix(db,$e(require("worker_threads")));var X_=y_e.Worker;var p7=new Map;function x_e(e){xa(e.source&&!e.url||!e.source&&e.url);let r=p7.get(e.source||e.url);return r||(e.url&&(r=L8r(e.url),p7.set(e.url,r)),e.source&&(r=__e(e.source),p7.set(e.source,r))),xa(r),r}function L8r(e){if(!e.startsWith("http"))return e;let r=q8r(e);return __e(r)}function __e(e){let r=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(r)}function q8r(e){return`try {
|
|
180
180
|
importScripts('${e}');
|
|
181
181
|
} catch (error) {
|
|
182
182
|
console.error(error);
|
|
183
183
|
throw error;
|
|
184
184
|
}`}function h7(e,r=!0,t){let n=t||new Set;if(e){if(E_e(e))n.add(e);else if(E_e(e.buffer))n.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let i in e)h7(e[i],r,n)}}return t===void 0?Array.from(n):[]}function E_e(e){return e?e instanceof ArrayBuffer||typeof MessagePort!="undefined"&&e instanceof MessagePort||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas:!1}function m7(e){if(e===null)return{};let r=Object.assign({},e);return Object.keys(r).forEach(t=>{typeof e[t]=="object"&&!ArrayBuffer.isView(e[t])&&!(e[t]instanceof Array)?r[t]=m7(e[t]):typeof r[t]=="function"||r[t]instanceof RegExp?r[t]={}:r[t]=e[t]}),r}var g7=()=>{},S0=class{constructor(r){this.terminated=!1;this._loadableURL="";let{name:t,source:n,url:i}=r;xa(n||i),this.name=t,this.source=n,this.url=i,this.onMessage=g7,this.onError=a=>console.log(a),this.worker=co?this._createBrowserWorker():this._createNodeWorker()}static isSupported(){return typeof Worker!="undefined"&&co||typeof X_!="undefined"&&!co}destroy(){this.onMessage=g7,this.onError=g7,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(r,t){t=t||h7(r),this.worker.postMessage(r,t)}_getErrorFromErrorEvent(r){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,r.message&&(t+=`${r.message} in `),r.lineno&&(t+=`:${r.lineno}:${r.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=x_e({source:this.source,url:this.url});let r=new Worker(this._loadableURL,{name:this.name});return r.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},r.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},r.onmessageerror=t=>console.error(t),r}_createNodeWorker(){let r;if(this.url){let n=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;r=new X_(n,{eval:!1})}else if(this.source)r=new X_(this.source,{eval:!0});else throw new Error("no worker");return r.on("message",t=>{this.onMessage(t)}),r.on("error",t=>{this.onError(t)}),r.on("exit",t=>{}),r}};var sD=class{constructor(r){this.name="unnamed";this.maxConcurrency=1;this.maxMobileConcurrency=1;this.onDebug=()=>{};this.reuseWorkers=!0;this.props={};this.jobQueue=[];this.idleQueue=[];this.count=0;this.isDestroyed=!1;this.source=r.source,this.url=r.url,this.setProps(r)}static isSupported(){return S0.isSupported()}destroy(){this.idleQueue.forEach(r=>r.destroy()),this.isDestroyed=!0}setProps(r){this.props=oe(oe({},this.props),r),r.name!==void 0&&(this.name=r.name),r.maxConcurrency!==void 0&&(this.maxConcurrency=r.maxConcurrency),r.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=r.maxMobileConcurrency),r.reuseWorkers!==void 0&&(this.reuseWorkers=r.reuseWorkers),r.onDebug!==void 0&&(this.onDebug=r.onDebug)}async startJob(r,t=(i,a,o)=>i.done(o),n=(i,a)=>i.error(a)){let i=new Promise(a=>(this.jobQueue.push({name:r,onMessage:t,onError:n,onStart:a}),this));return this._startQueuedJob(),await i}async _startQueuedJob(){if(!this.jobQueue.length)return;let r=this._getAvailableWorker();if(!r)return;let t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:r,backlog:this.jobQueue.length});let n=new oD(t.name,r);r.onMessage=i=>t.onMessage(n,i.type,i.payload),r.onError=i=>t.onError(n,i),t.onStart(n);try{await n.result}finally{this.returnWorkerToQueue(r)}}}returnWorkerToQueue(r){!co||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(r.destroy(),this.count--):this.idleQueue.push(r),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;let r=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new S0({name:r,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return v_e?this.maxMobileConcurrency:this.maxConcurrency}};var N8r={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}},Mi=class{constructor(r){this.workerPools=new Map;this.props=oe({},N8r),this.setProps(r),this.workerPools=new Map}static isSupported(){return S0.isSupported()}static getWorkerFarm(r={}){return Mi._workerFarm=Mi._workerFarm||new Mi({}),Mi._workerFarm.setProps(r),Mi._workerFarm}destroy(){for(let r of this.workerPools.values())r.destroy();this.workerPools=new Map}setProps(r){this.props=oe(oe({},this.props),r);for(let t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(r){let{name:t,source:n,url:i}=r,a=this.workerPools.get(t);return a||(a=new sD({name:t,source:n,url:i}),a.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,a)),a}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}};var w_e="beta",S_e=typeof pp!="undefined"?pp:w_e;function A_e(e){let r=e.version!==S_e?` (worker-utils@${S_e})`:"";return`${e.name}@${e.version}${r}`}function J_(e,r={}){let t=r[e.id]||{},n=co?`${e.id}-worker.js`:`${e.id}-worker-node.js`,i=t.workerUrl;if(!i&&e.id==="compression"&&(i=r.workerUrl),r._workerType==="test"&&(i=`modules/${e.module}/dist/${n}`),!i){let a=e.version;a==="latest"&&(a=w_e);let o=a?`@${a}`:"";i=`https://unpkg.com/@loaders.gl/${e.module}${o}/dist/${n}`}return xa(i),i}async function v7(e,r,t={},n={}){let i=A_e(e),a=Mi.getWorkerFarm(t),{source:o}=t,s={name:i,source:o};o||(s.url=J_(e,t));let u=a.getWorkerPool(s),l=t.jobName||e.name,c=await u.startJob(l,U8r.bind(null,n)),f=m7(t);return c.postMessage("process",{input:r,options:f}),(await c.result).result}async function U8r(e,r,t,n){switch(t){case"done":r.done(n);break;case"error":r.error(new Error(n.error));break;case"process":let{id:i,input:a,options:o}=n;try{if(!e.process){r.postMessage("error",{id:i,error:"Worker not set up to process on main thread"});return}let s=await e.process(a,o);r.postMessage("done",{id:i,result:s})}catch(s){let u=s instanceof Error?s.message:"unknown error";r.postMessage("error",{id:i,error:u})}break;default:console.warn(`process-on-worker: unknown message ${t}`)}}function b7(e,r=pp){xa(e,"no worker provided");let t=e.version;return!(!r||!t)}var S7={};xo(S7,{readFileAsArrayBuffer:()=>_7,readFileAsText:()=>E7,requireFromFile:()=>w7,requireFromString:()=>uD});var y7=$e(require("module")),T_e=$e(require("path")),x7=$e(require("fs"));async function _7(e){return e.startsWith("http")?await(await fetch(e)).arrayBuffer():x7.default.readFileSync(e).buffer}async function E7(e){return e.startsWith("http")?await(await fetch(e)).text():x7.default.readFileSync(e,"utf8")}async function w7(e){if(e.startsWith("http")){let t=await(await fetch(e)).text();return uD(t)}return e.startsWith("/")||(e=`${process.cwd()}/${e}`),require(e)}function uD(e,r="",t){if(typeof r=="object"&&(t=r,r=""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let n=y7.default._nodeModulePaths(T_e.default.dirname(r)),i=module.parent,a=new y7.default(r,i);return a.filename=r,a.paths=[].concat((t==null?void 0:t.prependPaths)||[]).concat(n).concat((t==null?void 0:t.appendPaths)||[]),a._compile(e,r),i&&i.children&&i.children.splice(i.children.indexOf(a),1),a.exports}var G8r="beta",z8r=typeof pp!="undefined"?pp:G8r,A7={};async function Vl(e,r=null,t={},n=null){return r&&(e=C_e(e,r,t,n)),A7[e]=A7[e]||H8r(e),await A7[e]}function C_e(e,r,t={},n=null){if(!t.useLocalLibraries&&e.startsWith("http"))return e;n=n||e;let i=t.modules||{};return i[n]?i[n]:co?t.CDN?(xa(t.CDN.startsWith("http")),`${t.CDN}/${r}@${z8r}/dist/libs/${n}`):$_?`../src/libs/${n}`:`modules/${r}/src/libs/${n}`:`modules/${r}/dist/libs/${n}`}async function H8r(e){if(e.endsWith("wasm"))return await V8r(e);if(!co)try{return S7&&w7&&await w7(e)}catch{return null}if($_)return importScripts(e);let r=await K8r(e);return W8r(r,e)}function W8r(e,r){if(!co)return uD&&uD(e,r);if($_)return eval.call(g_e,e),null;let t=document.createElement("script");t.id=r;try{t.appendChild(document.createTextNode(e))}catch{t.text=e}return document.body.appendChild(t),null}async function V8r(e){return!_7||e.startsWith("http")?await(await fetch(e)).arrayBuffer():await _7(e)}async function K8r(e){return!E7||e.startsWith("http")?await(await fetch(e)).text():await E7(e)}var O_e=$e(require("child_process"));var D_e=$e(require("child_process"));function k_e(e=3e3){return new Promise(r=>{D_e.default.exec("lsof -i -P -n | grep LISTEN",(t,n)=>{if(t){r(e);return}let i=[],a=/:(\d+) \(LISTEN\)/;n.split(`
|
|
185
|
-
`).forEach(s=>{let u=a.exec(s);u&&i.push(Number(u[1]))});let o=e;for(;i.includes(o);)o++;r(o)})})}var R_e={command:"",arguments:[],port:5e3,autoPort:!0,wait:2e3,onSuccess:e=>{console.log(`Started ${e.props.command}`)}},hp=class{constructor({id:r="browser-driver"}={}){this.props=oe({},R_e);this.childProcess=null;this.port=0;this.id=r}async start(r){r=oe(oe({},R_e),r),this.props=r;let t=[...r.arguments];return this.port=Number(r.port),r.portArg&&(r.autoPort&&(this.port=await k_e(r.port)),t.push(r.portArg,String(this.port))),await new Promise((n,i)=>{try{this._setTimeout(()=>{r.onSuccess&&r.onSuccess(this),n({})}),console.log(`Spawning ${r.command} ${r.arguments.join(" ")}`);let a=O_e.spawn(r.command,t,r.spawn);this.childProcess=a,a.stdout.on("data",o=>{console.log(o.toString())}),a.stderr.on("data",o=>{console.log(`Child process wrote to stderr: "${o}".`),r.ignoreStderr||(this._clearTimeout(),i(new Error(o)))}),a.on("error",o=>{console.log(`Child process errored with ${o}`),this._clearTimeout(),i(o)}),a.on("close",o=>{console.log(`Child process exited with ${o}`),this.childProcess=null,this._clearTimeout(),n({})})}catch(a){i(a)}})}async stop(){this.childProcess&&(this.childProcess.kill(),this.childProcess=null)}async exit(r=0){try{await this.stop(),process.exit(r)}catch(t){console.error(t.message||t),process.exit(1)}}_setTimeout(r){Number(this.props.wait)>0&&(this.successTimer=setTimeout(r,this.props.wait))}_clearTimeout(){this.successTimer&&clearTimeout(this.successTimer)}};function T7(e,r){return!Mi.isSupported()||!co&&!(r==null?void 0:r._nodeWorkers)?!1:e.worker&&(r==null?void 0:r.worker)}async function C7(e,r,t,n,i){let a=e.id,o=J_(e,t),u=Mi.getWorkerFarm(t).getWorkerPool({name:a,url:o});t=JSON.parse(JSON.stringify(t)),n=JSON.parse(JSON.stringify(n||{}));let l=await u.startJob("process-on-worker",Y8r.bind(null,i));return l.postMessage("process",{input:r,options:t,context:n}),await(await l.result).result}async function Y8r(e,r,t,n){switch(t){case"done":r.done(n);break;case"error":r.error(new Error(n.error));break;case"process":let{id:i,input:a,options:o}=n;try{let s=await e(a,o);r.postMessage("done",{id:i,result:s})}catch(s){let u=s instanceof Error?s.message:"unknown error";r.postMessage("error",{id:i,error:u})}break;default:console.warn(`parse-with-worker unknown message ${t}`)}}function D7(e,r){return!Mi.isSupported()||!wi&&!(r==null?void 0:r._nodeWorkers)?!1:e.worker&&(r==null?void 0:r.worker)}function F_e(e,r=5){return typeof e=="string"?e.slice(0,r):ArrayBuffer.isView(e)?I_e(e.buffer,e.byteOffset,r):e instanceof ArrayBuffer?I_e(e,0,r):""}function I_e(e,r,t){if(e.byteLength<=r+t)return"";let n=new DataView(e),i="";for(let a=0;a<t;a++)i+=String.fromCharCode(n.getUint8(r+a));return i}function k7(e){try{return JSON.parse(e)}catch{throw new Error(`Failed to parse JSON from data starting with "${F_e(e)}"`)}}function O7(e,r,t){if(t=t||e.byteLength,e.byteLength<t||r.byteLength<t)return!1;let n=new Uint8Array(e),i=new Uint8Array(r);for(let a=0;a<n.length;++a)if(n[a]!==i[a])return!1;return!0}function Kl(...e){let r=e.map(a=>a instanceof ArrayBuffer?new Uint8Array(a):a),t=r.reduce((a,o)=>a+o.byteLength,0),n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n.buffer}function _a(...e){let r=e,t=r&&r.length>1&&r[0].constructor||null;if(!t)throw new Error('"concatenateTypedArrays" - incorrect quantity of arguments or arguments have incompatible data types');let n=r.reduce((o,s)=>o+s.length,0),i=new t(n),a=0;for(let o of r)i.set(o,a),a+=o.length;return i}function A0(e,r,t){let n=t!==void 0?new Uint8Array(e).subarray(r,r+t):new Uint8Array(e).subarray(r);return new Uint8Array(n).buffer}function $o(e,r){return Qr(e>=0),Qr(r>0),e+(r-1)&~(r-1)}function R7(e,r,t){let n;if(e instanceof ArrayBuffer)n=new Uint8Array(e);else{let i=e.byteOffset,a=e.byteLength;n=new Uint8Array(e.buffer||e.arrayBuffer,i,a)}return r.set(n,t),t+$o(n.byteLength,4)}function F7(e,r){let t=e.length,i=Math.ceil(t/r)*r-t,a="";for(let o=0;o<i;++o)a+=" ";return e+a}function pb(e,r,t,n){if(e)for(let i=0;i<n;i++)e.setUint8(r+i,t.charCodeAt(i));return r+n}function Q_(e,r,t,n){if(e)for(let i=0;i<n;i++)e.setUint8(r+i,t[i]);return r+n}function lD(e,r,t,n){let i=$o(t.byteLength,n),a=i-t.byteLength;if(e){let o=new Uint8Array(e.buffer,e.byteOffset+r,t.byteLength),s=new Uint8Array(t);o.set(s);for(let u=0;u<a;++u)e.setUint8(r+t.byteLength+u,32)}return r+=i,r}function hb(e,r,t,n){let a=new TextEncoder().encode(t);return r=lD(e,r,a,n),r}async function I7(e){let r=[];for await(let t of e)r.push(t);return Kl(...r)}function mp(e){return mp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},mp(e)}function P7(e,r){if(mp(e)!=="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(mp(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function B7(e){var r=P7(e,"string");return mp(r)==="symbol"?r:String(r)}function Io(e,r,t){return r=B7(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var $8r="",P_e={};function gp(e){for(let r in P_e)if(e.startsWith(r)){let t=P_e[r];e=e.replace(r,t)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${$8r}${e}`),e}var X8r="4.0.0-alpha.20",j7={name:"JSON",id:"json",module:"json",version:X8r,extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:B_e,parse:async e=>B_e(new TextDecoder().decode(e)),options:{}};function B_e(e){return JSON.parse(e)}function cD(e){return Buffer.isBuffer(e)?new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer:e}function M7(e){if(Buffer.isBuffer(e))return e;if(ArrayBuffer.isView(e)&&(e=e.buffer),typeof Buffer!="undefined"&&e instanceof ArrayBuffer)return Buffer.from(e);throw new Error("toBuffer")}function j_e(e){return e&&typeof e=="object"&&e.isBuffer}function L7(e){return M7?M7(e):e}function fD(e){if(j_e(e))return cD(e);if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function q7(e){return(r,t)=>new Promise((n,i)=>e(r,t,(a,o)=>a?i(a):n(o)))}function M_e(e){return(r,t,n)=>new Promise((i,a)=>e(r,t,n,(o,s)=>o?a(o):i(s)))}var of={};xo(of,{dirname:()=>Q8r,filename:()=>J8r,join:()=>Z8r,resolve:()=>eDr});function L_e(){var r;if(typeof process!="undefined"&&typeof process.cwd!="undefined")return process.cwd();let e=(r=window.location)==null?void 0:r.pathname;return(e==null?void 0:e.slice(0,e.lastIndexOf("/")+1))||""}function J8r(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(r+1):""}function Q8r(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(0,r):""}function Z8r(...e){let r="/";return e=e.map((t,n)=>(n&&(t=t.replace(new RegExp(`^${r}`),"")),n!==e.length-1&&(t=t.replace(new RegExp(`${r}$`),"")),t)),e.join(r)}function eDr(...e){let r=[];for(let a=0;a<e.length;a++)r[a]=e[a];let t="",n=!1,i;for(let a=r.length-1;a>=-1&&!n;a--){let o;a>=0?o=r[a]:(i===void 0&&(i=L_e()),o=i),o.length!==0&&(t=`${o}/${t}`,n=o.charCodeAt(0)===Z_)}return t=rDr(t,!n),n?`/${t}`:t.length>0?t:"."}var Z_=47,N7=46;function rDr(e,r){let t="",n=-1,i=0,a,o=!1;for(let s=0;s<=e.length;++s){if(s<e.length)a=e.charCodeAt(s);else{if(a===Z_)break;a=Z_}if(a===Z_){if(!(n===s-1||i===1))if(n!==s-1&&i===2){if(t.length<2||!o||t.charCodeAt(t.length-1)!==N7||t.charCodeAt(t.length-2)!==N7){if(t.length>2){let u=t.length-1,l=u;for(;l>=0&&t.charCodeAt(l)!==Z_;--l);if(l!==u){t=l===-1?"":t.slice(0,l),n=s,i=0,o=!1;continue}}else if(t.length===2||t.length===1){t="",n=s,i=0,o=!1;continue}}r&&(t.length>0?t+="/..":t="..",o=!0)}else{let u=e.slice(n+1,s);t.length>0?t+=`/${u}`:t=u,o=!1}n=s,i=0}else a===N7&&i!==-1?++i:i=-1}return t}var T0={};xo(T0,{_readToArrayBuffer:()=>tDr,close:()=>K_e,createReadStream:()=>$_e,createWriteStream:()=>X_e,fstat:()=>Y_e,isSupported:()=>J_e,open:()=>V_e,read:()=>U7,readFile:()=>G_e,readFileSync:()=>z_e,readdir:()=>q_e,stat:()=>N_e,statSync:()=>U_e,writeFile:()=>H_e,writeFileSync:()=>W_e});var Xa=$e(require("fs"));var q_e,N_e,U_e,G_e,z_e,H_e,W_e,V_e,K_e,U7,Y_e,$_e,X_e,J_e=Boolean(Xa.default);try{q_e=q7(Xa.default.readdir),N_e=q7(Xa.default.stat),U_e=Xa.default.statSync,G_e=Xa.default.readFile,z_e=Xa.default.readFileSync,H_e=M_e(Xa.default.writeFile),W_e=Xa.default.writeFileSync,V_e=Xa.default.open,K_e=e=>new Promise((r,t)=>Xa.default.close(e,n=>n?t(n):r())),U7=Xa.default.read,Y_e=Xa.default.fstat,$_e=Xa.default.createReadStream,X_e=Xa.default.createWriteStream,J_e=Boolean(Xa.default)}catch{}async function tDr(e,r,t){let n=Buffer.alloc(t),{bytesRead:i}=await U7(e,n,0,t,r);if(i!==t)throw new Error("fs.read failed");return cD(n)}var iDr=e=>typeof e=="boolean",e2=e=>typeof e=="function",C0=e=>e!==null&&typeof e=="object",G7=e=>C0(e)&&e.constructor==={}.constructor;var Q_e=e=>e&&typeof e[Symbol.iterator]=="function",Z_e=e=>e&&typeof e[Symbol.asyncIterator]=="function";var Bs=e=>typeof Response!="undefined"&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json;var js=e=>typeof Blob!="undefined"&&e instanceof Blob,e2e=e=>e&&typeof e=="object"&&e.isBuffer;var aDr=e=>typeof ReadableStream!="undefined"&&e instanceof ReadableStream||C0(e)&&e2(e.tee)&&e2(e.cancel)&&e2(e.getReader);var oDr=e=>C0(e)&&e2(e.read)&&e2(e.pipe)&&iDr(e.readable),dD=e=>aDr(e)||oDr(e);var sDr=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,uDr=/^([-\w.]+\/[-\w.+]+)/;function r2e(e){let r=uDr.exec(e);return r?r[1]:e}function z7(e){let r=sDr.exec(e);return r?r[1]:""}var t2e=/\?.*/;function n2e(e){let r=e.match(t2e);return r&&r[0]}function mb(e){return e.replace(t2e,"")}function D0(e){return Bs(e)?e.url:js(e)?e.name||"":typeof e=="string"?e:""}function r2(e){if(Bs(e)){let r=e,t=r.headers.get("content-type")||"",n=mb(r.url);return r2e(t)||z7(n)}return js(e)?e.type||"":typeof e=="string"?z7(e):""}function i2e(e){return Bs(e)?e.headers["content-length"]||-1:js(e)?e.size:typeof e=="string"?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}async function pD(e){if(Bs(e))return e;let r={},t=i2e(e);t>=0&&(r["content-length"]=String(t));let n=D0(e),i=r2(e);i&&(r["content-type"]=i);let a=await cDr(e);a&&(r["x-first-bytes"]=a),typeof e=="string"&&(e=new TextEncoder().encode(e));let o=new Response(e,{headers:r});return Object.defineProperty(o,"url",{value:n}),o}async function a2e(e){if(!e.ok){let r=await lDr(e);throw new Error(r)}}async function lDr(e){let r=`Failed to fetch resource ${e.url} (${e.status}): `;try{let t=e.headers.get("Content-Type"),n=e.statusText;t.includes("application/json")&&(n+=` ${await e.text()}`),r+=n,r=r.length>60?`${r.slice(0,60)}...`:r}catch{}return r}async function cDr(e){let r=5;if(typeof e=="string")return`data:,${e.slice(0,r)}`;if(e instanceof Blob){let t=e.slice(0,5);return await new Promise(n=>{let i=new FileReader;i.onload=a=>{var o;return n((o=a==null?void 0:a.target)==null?void 0:o.result)},i.readAsDataURL(t)})}if(e instanceof ArrayBuffer){let t=e.slice(0,r);return`data:base64,${fDr(t)}`}return null}function fDr(e){let r="",t=new Uint8Array(e);for(let n=0;n<t.byteLength;n++)r+=String.fromCharCode(t[n]);return btoa(r)}var t2={};xo(t2,{fetchFileNode:()=>o2e});async function o2e(e,r){let t=/^file:\/\//;e.replace(t,"/");let n=e.split("?")[0];try{let i=await new Promise((l,c)=>{let f=T0.createReadStream(n,{encoding:null});f.once("readable",()=>l(f)),f.on("error",d=>c(d))}),a=200,o="OK",s=dDr(n),u=new Response(i,{headers:s,status:a,statusText:o});return Object.defineProperty(u,"url",{value:e}),u}catch(i){let a=i.message,o=400,s=a,u={},l=new Response(a,{headers:u,status:o,statusText:s});return Object.defineProperty(l,"url",{value:e}),l}}function dDr(e){let r={};if(!r["content-length"]){let t=T0.statSync(e);r["content-length"]=t.size}return e.endsWith(".gz")&&(e=e.slice(0,-3),r["content-encoding"]="gzip"),new Headers(r)}function pDr(e){return!hDr(e)&&!mDr(e)}function hDr(e){return e.startsWith("http:")||e.startsWith("https:")}function mDr(e){return e.startsWith("data:")}async function Xo(e,r){if(typeof e=="string"){let t=gp(e);return pDr(t)&&(t2==null?void 0:t2.fetchFileNode)?o2e(t,r):await fetch(t,r)}return await pD(e)}async function s2e(e,r,t){e=gp(e),wi||await T0.writeFile(e,L7(r),{flag:"w"}),Qr(!1)}function H7(e){if(typeof window!="undefined"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process!="undefined"&&typeof process.versions=="object"&&Boolean(process.versions.electron))return!0;let r=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent,t=e||r;return!!(t&&t.indexOf("Electron")>=0)}function Lu(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||H7()}var gDr=globalThis.self||globalThis.window||globalThis.global,gb=globalThis.window||globalThis.self||globalThis.global,vDr=globalThis.document||{},k0=globalThis.process||{},bDr=globalThis.console,Nwt=globalThis.navigator||{};var hD="4.0.0-alpha.20",zwt=Lu();function yDr(e){try{let r=window[e],t="__storage_test__";return r.setItem(t,t),r.removeItem(t),r}catch{return null}}var W7=class{constructor(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"sessionStorage";Io(this,"storage",void 0),Io(this,"id",void 0),Io(this,"config",void 0),this.storage=yDr(n),this.id=r,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(r){if(Object.assign(this.config,r),this.storage){let t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let r={};if(this.storage){let t=this.storage.getItem(this.id);r=t?JSON.parse(t):{}}return Object.assign(this.config,r),this}};function u2e(e){let r;return e<10?r="".concat(e.toFixed(2),"ms"):e<100?r="".concat(e.toFixed(1),"ms"):e<1e3?r="".concat(e.toFixed(0),"ms"):r="".concat((e/1e3).toFixed(2),"s"),r}function l2e(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8,t=Math.max(r-e.length,0);return"".concat(" ".repeat(t)).concat(e)}function mD(e,r,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,i=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>n&&(t=Math.min(t,n/e.width));let a=e.width*t,o=e.height*t,s=["font-size:1px;","padding:".concat(Math.floor(o/2),"px ").concat(Math.floor(a/2),"px;"),"line-height:".concat(o,"px;"),"background:url(".concat(i,");"),"background-size:".concat(a,"px ").concat(o,"px;"),"color:transparent;"].join("");return["".concat(r," %c+"),s]}var gD;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(gD||(gD={}));var xDr=10;function c2e(e){return typeof e!="string"?e:(e=e.toUpperCase(),gD[e]||gD.WHITE)}function f2e(e,r,t){if(!Lu&&typeof e=="string"){if(r){let n=c2e(r);e="[".concat(n,"m").concat(e,"[39m")}if(t){let n=c2e(t);e="[".concat(n+xDr,"m").concat(e,"[49m")}}return e}function d2e(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"],t=Object.getPrototypeOf(e),n=Object.getOwnPropertyNames(t),i=e;for(let a of n){let o=i[a];typeof o=="function"&&(r.find(s=>a===s)||(i[a]=o.bind(e)))}}function vb(e,r){if(!e)throw new Error(r||"Assertion failed")}function O0(){let e;if(Lu()&&gb.performance){var r,t;e=gb===null||gb===void 0||(r=gb.performance)===null||r===void 0||(t=r.now)===null||t===void 0?void 0:t.call(r)}else if("hrtime"in k0){var n;let i=k0===null||k0===void 0||(n=k0.hrtime)===null||n===void 0?void 0:n.call(k0);e=i[0]*1e3+i[1]/1e6}else e=Date.now();return e}var bb={debug:Lu()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},_Dr={enabled:!0,level:0};function Ms(){}var p2e={},h2e={once:!0},sf=class{constructor(){let{id:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};Io(this,"id",void 0),Io(this,"VERSION",hD),Io(this,"_startTs",O0()),Io(this,"_deltaTs",O0()),Io(this,"_storage",void 0),Io(this,"userData",{}),Io(this,"LOG_THROTTLE_TIMEOUT",0),this.id=r,this.userData={},this._storage=new W7("__probe-".concat(this.id,"__"),_Dr),this.timeStamp("".concat(this.id," started")),d2e(this),Object.seal(this)}set level(r){this.setLevel(r)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((O0()-this._startTs).toPrecision(10))}getDelta(){return Number((O0()-this._deltaTs).toPrecision(10))}set priority(r){this.level=r}get priority(){return this.level}getPriority(){return this.level}enable(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:r}),this}setLevel(r){return this._storage.setConfiguration({level:r}),this}get(r){return this._storage.config[r]}set(r,t){this._storage.setConfiguration({[r]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(r,t){vb(r,t)}warn(r){return this._getLogFunction(0,r,bb.warn,arguments,h2e)}error(r){return this._getLogFunction(0,r,bb.error,arguments)}deprecated(r,t){return this.warn("`".concat(r,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(r,t){return this.error("`".concat(r,"` has been removed. Use `").concat(t,"` instead"))}probe(r,t){return this._getLogFunction(r,t,bb.log,arguments,{time:!0,once:!0})}log(r,t){return this._getLogFunction(r,t,bb.debug,arguments)}info(r,t){return this._getLogFunction(r,t,console.info,arguments)}once(r,t){return this._getLogFunction(r,t,bb.debug||bb.info,arguments,h2e)}table(r,t,n){return t?this._getLogFunction(r,t,console.table||Ms,n&&[n],{tag:ADr(t)}):Ms}image(r){let{logLevel:t,priority:n,image:i,message:a="",scale:o=1}=r;return this._shouldLog(t||n)?Lu()?SDr({image:i,message:a,scale:o}):wDr({image:i,message:a,scale:o}):Ms}time(r,t){return this._getLogFunction(r,t,console.time?console.time:console.info)}timeEnd(r,t){return this._getLogFunction(r,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(r,t){return this._getLogFunction(r,t,console.timeStamp||Ms)}group(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1},i=g2e({logLevel:r,message:t,opts:n}),{collapsed:a}=n;return i.method=(a?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(r,t,Object.assign({},n,{collapsed:!0}))}groupEnd(r){return this._getLogFunction(r,"",console.groupEnd||Ms)}withGroup(r,t,n){this.group(r,t)();try{n()}finally{this.groupEnd(r)()}}trace(){console.trace&&console.trace()}_shouldLog(r){return this.isEnabled()&&this.getLevel()>=m2e(r)}_getLogFunction(r,t,n,i,a){if(this._shouldLog(r)){a=g2e({logLevel:r,message:t,args:i,opts:a}),n=n||a.method,vb(n),a.total=this.getTotal(),a.delta=this.getDelta(),this._deltaTs=O0();let o=a.tag||a.message;if(a.once&&o)if(!p2e[o])p2e[o]=O0();else return Ms;return t=EDr(this.id,a.message,a),n.bind(console,t,...a.args)}return Ms}};Io(sf,"VERSION",hD);function m2e(e){if(!e)return 0;let r;switch(typeof e){case"number":r=e;break;case"object":r=e.logLevel||e.priority||0;break;default:return 0}return vb(Number.isFinite(r)&&r>=0),r}function g2e(e){let{logLevel:r,message:t}=e;e.logLevel=m2e(r);let n=e.args?Array.from(e.args):[];for(;n.length&&n.shift()!==t;);switch(typeof r){case"string":case"function":t!==void 0&&n.unshift(t),e.message=r;break;case"object":Object.assign(e,r);break;default:}typeof e.message=="function"&&(e.message=e.message());let i=typeof e.message;return vb(i==="string"||i==="object"),Object.assign(e,{args:n},e.opts)}function EDr(e,r,t){if(typeof r=="string"){let n=t.time?l2e(u2e(t.total)):"";r=t.time?"".concat(e,": ").concat(n," ").concat(r):"".concat(e,": ").concat(r),r=f2e(r,t.color,t.background)}return r}function wDr(e){let{image:r,message:t="",scale:n=1}=e;return console.warn("removed"),Ms}function SDr(e){let{image:r,message:t="",scale:n=1}=e;if(typeof r=="string"){let a=new Image;return a.onload=()=>{let o=mD(a,t,n);console.log(...o)},a.src=r,Ms}let i=r.nodeName||"";if(i.toLowerCase()==="img")return console.log(...mD(r,t,n)),Ms;if(i.toLowerCase()==="canvas"){let a=new Image;return a.onload=()=>console.log(...mD(a,t,n)),a.src=r.toDataURL(),Ms}return Ms}function ADr(e){for(let r in e)for(let t in e[r])return t||"untitled";return"empty"}var gSt=new sf({id:"@probe.gl/log"});var V7=new sf({id:"loaders.gl"}),K7=class{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}},Y7=class{constructor(){this.console=console}log(...r){return this.console.log.bind(this.console,...r)}info(...r){return this.console.info.bind(this.console,...r)}warn(...r){return this.console.warn.bind(this.console,...r)}error(...r){return this.console.error.bind(this.console,...r)}};var $7={fetch:null,mimeType:void 0,nothrow:!1,log:new Y7,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:wi,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},v2e={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function X7(){globalThis.loaders=globalThis.loaders||{};let{loaders:e}=globalThis;return e._state=e._state||{},e._state}var yb=()=>{let e=X7();return e.globalOptions=e.globalOptions||oe({},$7),e.globalOptions};function b2e(e,r,t,n){return t=t||[],t=Array.isArray(t)?t:[t],TDr(e,t),DDr(r,e,n)}function TDr(e,r){y2e(e,null,$7,v2e,r);for(let t of r){let n=e&&e[t.id]||{},i=t.options&&t.options[t.id]||{},a=t.deprecatedOptions&&t.deprecatedOptions[t.id]||{};y2e(n,t.id,i,a,r)}}function y2e(e,r,t,n,i){let a=r||"Top level",o=r?`${r}.`:"";for(let s in e){let u=!r&&C0(e[s]),l=s==="baseUri"&&!r,c=s==="workerUrl"&&r;if(!(s in t)&&!l&&!c){if(s in n)V7.warn(`${a} loader option '${o}${s}' no longer supported, use '${n[s]}'`)();else if(!u){let f=CDr(s,i);V7.warn(`${a} loader option '${o}${s}' not recognized. ${f}`)()}}}}function CDr(e,r){let t=e.toLowerCase(),n="";for(let i of r)for(let a in i.options){if(e===a)return`Did you mean '${i.id}.${a}'?`;let o=a.toLowerCase();(t.startsWith(o)||o.startsWith(t))&&(n=n||`Did you mean '${i.id}.${a}'?`)}return n}function DDr(e,r,t){let n=e.options||{},i=oe({},n);return kDr(i,t),i.log===null&&(i.log=new K7),x2e(i,yb()),x2e(i,r),i}function x2e(e,r){for(let t in r)if(t in r){let n=r[t];G7(n)&&G7(e[t])?e[t]=oe(oe({},e[t]),r[t]):e[t]=r[t]}}function kDr(e,r){r&&!("baseUri"in e)&&(e.baseUri=r)}function n2(e){return e?(Array.isArray(e)&&(e=e[0]),Array.isArray(e==null?void 0:e.extensions)):!1}function J7(e){Qr(e,"null loader"),Qr(n2(e),"invalid loader");let r;return Array.isArray(e)&&(r=e[1],e=e[0],e=ze(oe({},e),{options:oe(oe({},e.options),r)})),((e==null?void 0:e.parseTextSync)||(e==null?void 0:e.parseText))&&(e.text=!0),e.text||(e.binary=!0),e}var ODr=()=>{let e=X7();return e.loaderRegistry=e.loaderRegistry||[],e.loaderRegistry};function _2e(){return ODr()}var E2e=new sf({id:"loaders.gl"});var RDr=/\.([^.]+)$/;async function w2e(e,r=[],t,n){if(!A2e(e))return null;let i=S2e(e,r,ze(oe({},t),{nothrow:!0}),n);if(i)return i;if(js(e)&&(e=await e.slice(0,10).arrayBuffer(),i=S2e(e,r,t,n)),!i&&!(t==null?void 0:t.nothrow))throw new Error(T2e(e));return i}function S2e(e,r=[],t,n){if(!A2e(e))return null;if(r&&!Array.isArray(r))return J7(r);let i=[];r&&(i=i.concat(r)),(t==null?void 0:t.ignoreRegisteredLoaders)||i.push(..._2e()),IDr(i);let a=FDr(e,i,t,n);if(!a&&!(t==null?void 0:t.nothrow))throw new Error(T2e(e));return a}function FDr(e,r,t,n){let i=D0(e),a=r2(e),o=mb(i)||(n==null?void 0:n.url),s=null,u="";return(t==null?void 0:t.mimeType)&&(s=Q7(r,t==null?void 0:t.mimeType),u=`match forced by supplied MIME type ${t==null?void 0:t.mimeType}`),s=s||PDr(r,o),u=u||(s?`matched url ${o}`:""),s=s||Q7(r,a),u=u||(s?`matched MIME type ${a}`:""),s=s||jDr(r,e),u=u||(s?`matched initial data ${D2e(e)}`:""),s=s||Q7(r,t==null?void 0:t.fallbackMimeType),u=u||(s?`matched fallback MIME type ${a}`:""),u&&E2e.log(1,`selectLoader selected ${s==null?void 0:s.name}: ${u}.`),s}function A2e(e){return!(e instanceof Response&&e.status===204)}function T2e(e){let r=D0(e),t=r2(e),n="No valid loader found (";n+=r?`${of.filename(r)}, `:"no url provided, ",n+=`MIME type: ${t?`"${t}"`:"not provided"}, `;let i=e?D2e(e):"";return n+=i?` first bytes: "${i}"`:"first bytes: not available",n+=")",n}function IDr(e){for(let r of e)J7(r)}function PDr(e,r){let t=r&&RDr.exec(r),n=t&&t[1];return n?BDr(e,n):null}function BDr(e,r){r=r.toLowerCase();for(let t of e)for(let n of t.extensions)if(n.toLowerCase()===r)return t;return null}function Q7(e,r){for(let t of e)if(t.mimeTypes&&t.mimeTypes.includes(r)||r===`application/x.${t.id}`)return t;return null}function jDr(e,r){if(!r)return null;for(let t of e)if(typeof r=="string"){if(MDr(r,t))return t}else if(ArrayBuffer.isView(r)){if(C2e(r.buffer,r.byteOffset,t))return t}else if(r instanceof ArrayBuffer&&C2e(r,0,t))return t;return null}function MDr(e,r){return r.testText?r.testText(e):(Array.isArray(r.tests)?r.tests:[r.tests]).some(n=>e.startsWith(n))}function C2e(e,r,t){return(Array.isArray(t.tests)?t.tests:[t.tests]).some(i=>LDr(e,r,t,i))}function LDr(e,r,t,n){if(n instanceof ArrayBuffer)return O7(n,e,n.byteLength);switch(typeof n){case"function":return n(e,t);case"string":let i=Z7(e,r,n.length);return n===i;default:return!1}}function D2e(e,r=5){return typeof e=="string"?e.slice(0,r):ArrayBuffer.isView(e)?Z7(e.buffer,e.byteOffset,r):e instanceof ArrayBuffer?Z7(e,0,r):""}function Z7(e,r,t){if(e.byteLength<r+t)return"";let n=new DataView(e),i="";for(let a=0;a<t;a++)i+=String.fromCharCode(n.getUint8(r+a));return i}var qDr=256*1024;function*k2e(e,r){let t=(r==null?void 0:r.chunkSize)||qDr,n=0,i=new TextEncoder;for(;n<e.length;){let a=Math.min(e.length-n,t),o=e.slice(n,n+a);n+=a,yield i.encode(o)}}var NDr=256*1024;function*O2e(e,r={}){let{chunkSize:t=NDr}=r,n=0;for(;n<e.byteLength;){let i=Math.min(e.byteLength-n,t),a=new ArrayBuffer(i),o=new Uint8Array(e,n,i);new Uint8Array(a).set(o),n+=i,yield a}}var UDr=1024*1024;async function*R2e(e,r){let t=(r==null?void 0:r.chunkSize)||UDr,n=0;for(;n<e.size;){let i=n+t,a=await e.slice(n,i).arrayBuffer();n=i,yield a}}function eN(e,r){return wi?GDr(e,r):zDr(e,r)}async function*GDr(e,r){let t=e.getReader(),n;try{for(;;){let i=n||t.read();(r==null?void 0:r._streamReadAhead)&&(n=t.read());let{done:a,value:o}=await i;if(a)return;yield fD(o)}}catch{t.releaseLock()}}async function*zDr(e,r){for await(let t of e)yield fD(t)}function F2e(e,r){if(typeof e=="string")return k2e(e,r);if(e instanceof ArrayBuffer)return O2e(e,r);if(js(e))return R2e(e,r);if(dD(e))return eN(e,r);if(Bs(e))return eN(e.body,r);throw new Error("makeIterator")}var I2e="Cannot convert supplied data type";function HDr(e,r,t){if(r.text&&typeof e=="string")return e;if(e2e(e)&&(e=e.buffer),e instanceof ArrayBuffer){let n=e;return r.text&&!r.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(e)){if(r.text&&!r.binary)return new TextDecoder("utf8").decode(e);let n=e.buffer,i=e.byteLength||e.length;return(e.byteOffset!==0||i!==n.byteLength)&&(n=n.slice(e.byteOffset,e.byteOffset+i)),n}throw new Error(I2e)}async function P2e(e,r,t){let n=e instanceof ArrayBuffer||ArrayBuffer.isView(e);if(typeof e=="string"||n)return HDr(e,r,t);if(js(e)&&(e=await pD(e)),Bs(e)){let i=e;return await a2e(i),r.binary?await i.arrayBuffer():await i.text()}if(dD(e)&&(e=F2e(e,t)),Q_e(e)||Z_e(e))return I7(e);throw new Error(I2e)}function vD(e,r){let t=yb(),n=e||t;return typeof n.fetch=="function"?n.fetch:C0(n.fetch)?i=>Xo(i,n.fetch):(r==null?void 0:r.fetch)?r==null?void 0:r.fetch:Xo}function B2e(e,r,t){if(t)return t;let n=oe({fetch:vD(r,e)},e);if(n.url){let i=mb(n.url);n.baseUrl=i,n.queryString=n2e(n.url),n.filename=of.filename(i),n.baseUrl=of.dirname(i)}return Array.isArray(n.loaders)||(n.loaders=null),n}function j2e(e,r){if(!r&&e&&!Array.isArray(e))return e;let t;if(e&&(t=Array.isArray(e)?e:[e]),r&&r.loaders){let n=Array.isArray(r.loaders)?r.loaders:[r.loaders];t=t?[...t,...n]:n}return t&&t.length?t:null}async function Jo(e,r,t,n){xa(!n||typeof n=="object"),r&&!Array.isArray(r)&&!n2(r)&&(n=void 0,t=r,r=void 0),e=await e,t=t||{};let i=D0(e),o=j2e(r,n),s=await w2e(e,o,t);return s?(t=b2e(t,s,o,i),n=B2e({url:i,parse:Jo,loaders:o},t,n||null),await WDr(s,e,t,n)):null}async function WDr(e,r,t,n){if(b7(e),Bs(r)){let i=r,{ok:a,redirected:o,status:s,statusText:u,type:l,url:c}=i,f=Object.fromEntries(i.headers.entries());n.response={headers:f,ok:a,redirected:o,status:s,statusText:u,type:l,url:c}}if(r=await P2e(r,e,t),e.parseTextSync&&typeof r=="string")return t.dataType="text",e.parseTextSync(r,t,n,e);if(T7(e,t))return await C7(e,r,t,n,Jo);if(e.parseText&&typeof r=="string")return await e.parseText(r,t,n,e);if(e.parse)return await e.parse(r,t,n,e);throw xa(!e.parseSync),new Error(`${e.id} loader - no parser found and worker is disabled`)}async function un(e,r,t,n){let i,a;!Array.isArray(r)&&!n2(r)?(i=[],a=r,n=void 0):(i=r,a=t);let o=vD(a),s=e;return typeof e=="string"&&(s=await o(e)),js(e)&&(s=await o(e)),Array.isArray(i)?await Jo(s,i,a):await Jo(s,i,a)}async function xb(e,r,t){let n=yb();if(t=oe(oe({},n),t),D7(r,t))return await v7(r,e,t);if(r.encode)return await r.encode(e,t);if(r.encodeSync)return r.encodeSync(e,t);if(r.encodeText)return new TextEncoder().encode(await r.encodeText(e,t));if(r.encodeInBatches){let i=M2e(e,r,t),a=[];for await(let o of i)a.push(o);return Kl(...a)}if(!wi&&r.encodeURLtoURL){let i=q2e("input");await s2e(i,e);let a=q2e("output"),o=await L2e(i,a,r,t);return(await Xo(o)).arrayBuffer()}throw new Error("Writer could not encode data")}function bD(e,r,t){if(r.encodeSync)return r.encodeSync(e,t);throw new Error("Writer could not synchronously encode data")}function M2e(e,r,t){if(r.encodeInBatches){let n=VDr(e);return r.encodeInBatches(n,t)}throw new Error("Writer could not encode data in batches")}async function L2e(e,r,t,n){if(e=gp(e),r=gp(r),wi||!t.encodeURLtoURL)throw new Error;return await t.encodeURLtoURL(e,r,n)}function VDr(e){return[{table:e,start:0,end:e.length}]}function q2e(e){return`/tmp/${e}`}var Tp;(function(t){t[t.ADD=1]="ADD",t[t.REPLACE=2]="REPLACE"})(Tp||(Tp={}));var rc;(function(i){i.EMPTY="empty",i.SCENEGRAPH="scenegraph",i.POINTCLOUD="pointcloud",i.MESH="mesh"})(rc||(rc={}));var G0;(function(t){t.I3S="I3S",t.TILES3D="TILES3D"})(G0||(G0={}));var yf;(function(t){t.GEOMETRIC_ERROR="geometricError",t.MAX_SCREEN_THRESHOLD="maxScreenThreshold"})(yf||(yf={}));var Xn=$e(Xt()),Ok=$e(U0()),nU=$e(Gs());function ySe(e){return e!=null}var l3t=new Xn.Vector3,Ijr=new Xn.Vector3,Pjr=new Xn.Vector3,Bjr=new Xn.Vector3;function Rk(e,r,t){if(Qr(e,"3D Tile: boundingVolume must be defined"),e.box)return jjr(e.box,r,t);if(e.region){let[n,i,a,o,s,u]=e.region,l=nU.Ellipsoid.WGS84.cartographicToCartesian([(0,Xn.degrees)(n),(0,Xn.degrees)(o),s],Pjr),c=nU.Ellipsoid.WGS84.cartographicToCartesian([(0,Xn.degrees)(a),(0,Xn.degrees)(i),u],Bjr),f=new Xn.Vector3().addVectors(l,c).multiplyScalar(.5),d=new Xn.Vector3().subVectors(l,c).len()/2;return xSe([f[0],f[1],f[2],d],new Xn.Matrix4)}if(e.sphere)return xSe(e.sphere,r,t);throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box")}function jjr(e,r,t){let n=new Xn.Vector3(e[0],e[1],e[2]);r.transform(n,n);let i=[];if(e.length===10){let l=e.slice(3,6),c=new Xn.Quaternion;c.fromArray(e,6);let f=new Xn.Vector3([1,0,0]),d=new Xn.Vector3([0,1,0]),p=new Xn.Vector3([0,0,1]);f.transformByQuaternion(c),f.scale(l[0]),d.transformByQuaternion(c),d.scale(l[1]),p.transformByQuaternion(c),p.scale(l[2]),i=[...f.toArray(),...d.toArray(),...p.toArray()]}else i=[...e.slice(3,6),...e.slice(6,9),...e.slice(9,12)];let a=r.transformAsVector(i.slice(0,3)),o=r.transformAsVector(i.slice(3,6)),s=r.transformAsVector(i.slice(6,9)),u=new Xn.Matrix3([a[0],a[1],a[2],o[0],o[1],o[2],s[0],s[1],s[2]]);return ySe(t)?(t.center=n,t.halfAxes=u,t):new Ok.OrientedBoundingBox(n,u)}function xSe(e,r,t){let n=new Xn.Vector3(e[0],e[1],e[2]);r.transform(n,n);let i=r.getScale(Ijr),a=Math.max(Math.max(i[0],i[1]),i[2]),o=e[3]*a;return ySe(t)?(t.center=n,t.radius=o,t):new Ok.BoundingSphere(n,o)}var Nb="4.0.0-alpha.20";var Ws={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect",GLTF:"glTF"},g3t=Object.keys(Ws),Cp={BATCHED_MODEL:[98,51,100,109],INSTANCED_MODEL:[105,51,100,109],POINT_CLOUD:[112,110,116,115],COMPOSITE:[99,109,112,116]};function iU(e,r,t){Qr(e instanceof ArrayBuffer);let n=new TextDecoder("utf8"),i=new Uint8Array(e,r,t);return n.decode(i)}function _Se(e,r=0){let t=new DataView(e);return`${String.fromCharCode(t.getUint8(r+0))}${String.fromCharCode(t.getUint8(r+1))}${String.fromCharCode(t.getUint8(r+2))}${String.fromCharCode(t.getUint8(r+3))}`}var Fk="4.0.0-alpha.20";var Mjr={draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},ESe={name:"Draco",id:"draco",module:"draco",version:Fk,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:Mjr};function wSe(e){switch(e.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function aU(e){let r=1/0,t=1/0,n=1/0,i=-1/0,a=-1/0,o=-1/0,s=e.POSITION?e.POSITION.value:[],u=s&&s.length;for(let l=0;l<u;l+=3){let c=s[l],f=s[l+1],d=s[l+2];r=c<r?c:r,t=f<t?f:t,n=d<n?d:n,i=c>i?c:i,a=f>a?f:a,o=d>o?d:o}return[[r,t,n],[i,a,o]]}function oU(e,r,t){let n=wSe(r.value),i=t||SSe(r);return{name:e,type:{type:"fixed-size-list",listSize:r.size,children:[{name:"value",type:n}]},nullable:!1,metadata:i}}function SSe(e){let r={};return"byteOffset"in e&&(r.byteOffset=e.byteOffset.toString(10)),"byteStride"in e&&(r.byteStride=e.byteStride.toString(10)),"normalized"in e&&(r.normalized=e.normalized.toString()),r}function ASe(e,r,t){let n=CSe(r.metadata),i=[],a=Ljr(r.attributes);for(let o in e){let s=e[o],u=TSe(o,s,a[o]);i.push(u)}if(t){let o=TSe("indices",t);i.push(o)}return{fields:i,metadata:n}}function Ljr(e){let r={};for(let t in e){let n=e[t];r[n.name||"undefined"]=n}return r}function TSe(e,r,t){let n=t?CSe(t.metadata):void 0;return oU(e,r,n)}function CSe(e){Object.entries(e);let r={};for(let t in e)r[`${t}.string`]=JSON.stringify(e[t]);return r}var DSe={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},qjr={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},Njr=4,Ik=class{constructor(r){this.draco=r,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(r,t={}){let n=new this.draco.DecoderBuffer;n.Init(new Int8Array(r),r.byteLength),this._disableAttributeTransforms(t);let i=this.decoder.GetEncodedGeometryType(n),a=i===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let o;switch(i){case this.draco.TRIANGULAR_MESH:o=this.decoder.DecodeBufferToMesh(n,a);break;case this.draco.POINT_CLOUD:o=this.decoder.DecodeBufferToPointCloud(n,a);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!o.ok()||!a.ptr){let d=`DRACO decompression failed: ${o.error_msg()}`;throw new Error(d)}let s=this._getDracoLoaderData(a,i,t),u=this._getMeshData(a,s,t),l=aU(u.attributes),c=ASe(u.attributes,s,u.indices);return ze(oe({loader:"draco",loaderData:s,header:{vertexCount:a.num_points(),boundingBox:l}},u),{schema:c})}finally{this.draco.destroy(n),a&&this.draco.destroy(a)}}_getDracoLoaderData(r,t,n){let i=this._getTopLevelMetadata(r),a=this._getDracoAttributes(r,n);return{geometry_type:t,num_attributes:r.num_attributes(),num_points:r.num_points(),num_faces:r instanceof this.draco.Mesh?r.num_faces():0,metadata:i,attributes:a}}_getDracoAttributes(r,t){let n={};for(let i=0;i<r.num_attributes();i++){let a=this.decoder.GetAttribute(r,i),o=this._getAttributeMetadata(r,i);n[a.unique_id()]={unique_id:a.unique_id(),attribute_type:a.attribute_type(),data_type:a.data_type(),num_components:a.num_components(),byte_offset:a.byte_offset(),byte_stride:a.byte_stride(),normalized:a.normalized(),attribute_index:i,metadata:o};let s=this._getQuantizationTransform(a,t);s&&(n[a.unique_id()].quantization_transform=s);let u=this._getOctahedronTransform(a,t);u&&(n[a.unique_id()].octahedron_transform=u)}return n}_getMeshData(r,t,n){let i=this._getMeshAttributes(t,r,n);if(!i.POSITION)throw new Error("DRACO: No position attribute found.");if(r instanceof this.draco.Mesh)switch(n.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:i,indices:{value:this._getTriangleStripIndices(r),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:i,indices:{value:this._getTriangleListIndices(r),size:1}}}return{topology:"point-list",mode:0,attributes:i}}_getMeshAttributes(r,t,n){let i={};for(let a of Object.values(r.attributes)){let o=this._deduceAttributeName(a,n);a.name=o;let{value:s,size:u}=this._getAttributeValues(t,a);i[o]={value:s,size:u,byteOffset:a.byte_offset,byteStride:a.byte_stride,normalized:a.normalized}}return i}_getTriangleListIndices(r){let n=r.num_faces()*3,i=n*Njr,a=this.draco._malloc(i);try{return this.decoder.GetTrianglesUInt32Array(r,i,a),new Uint32Array(this.draco.HEAPF32.buffer,a,n).slice()}finally{this.draco._free(a)}}_getTriangleStripIndices(r){let t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(r,t),zjr(t)}finally{this.draco.destroy(t)}}_getAttributeValues(r,t){let n=qjr[t.data_type],i=t.num_components,o=r.num_points()*i,s=o*n.BYTES_PER_ELEMENT,u=Ujr(this.draco,n),l,c=this.draco._malloc(s);try{let f=this.decoder.GetAttribute(r,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(r,f,u,s,c),l=new n(this.draco.HEAPF32.buffer,c,o).slice()}finally{this.draco._free(c)}return{value:l,size:i}}_deduceAttributeName(r,t){let n=r.unique_id;for(let[o,s]of Object.entries(t.extraAttributes||{}))if(s===n)return o;let i=r.attribute_type;for(let o in DSe)if(this.draco[o]===i)return DSe[o];let a=t.attributeNameEntry||"name";return r.metadata[a]?r.metadata[a].string:`CUSTOM_ATTRIBUTE_${n}`}_getTopLevelMetadata(r){let t=this.decoder.GetMetadata(r);return this._getDracoMetadata(t)}_getAttributeMetadata(r,t){let n=this.decoder.GetAttributeMetadata(r,t);return this._getDracoMetadata(n)}_getDracoMetadata(r){if(!r||!r.ptr)return{};let t={},n=this.metadataQuerier.NumEntries(r);for(let i=0;i<n;i++){let a=this.metadataQuerier.GetEntryName(r,i);t[a]=this._getDracoMetadataField(r,a)}return t}_getDracoMetadataField(r,t){let n=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(r,t,n);let i=Gjr(n);return{int:this.metadataQuerier.GetIntEntry(r,t),string:this.metadataQuerier.GetStringEntry(r,t),double:this.metadataQuerier.GetDoubleEntry(r,t),intArray:i}}finally{this.draco.destroy(n)}}_disableAttributeTransforms(r){let{quantizedAttributes:t=[],octahedronAttributes:n=[]}=r,i=[...t,...n];for(let a of i)this.decoder.SkipAttributeTransform(this.draco[a])}_getQuantizationTransform(r,t){let{quantizedAttributes:n=[]}=t,i=r.attribute_type();if(n.map(o=>this.decoder[o]).includes(i)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits(),range:o.range(),min_values:new Float32Array([1,2,3]).map(s=>o.min_value(s))}}finally{this.draco.destroy(o)}}return null}_getOctahedronTransform(r,t){let{octahedronAttributes:n=[]}=t,i=r.attribute_type();if(n.map(o=>this.decoder[o]).includes(i)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits()}}finally{this.draco.destroy(o)}}return null}};function Ujr(e,r){switch(r){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32;default:return e.DT_INVALID}}function Gjr(e){let r=e.size(),t=new Int32Array(r);for(let n=0;n<r;n++)t[n]=e.GetValue(n);return t}function zjr(e){let r=e.size(),t=new Int32Array(r);for(let n=0;n<r;n++)t[n]=e.GetValue(n);return t}var Hjr="1.5.5",Wjr="1.4.1",sU=`https://www.gstatic.com/draco/versioned/decoders/${Hjr}`,ci={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},Dp={[ci.DECODER]:`${sU}/${ci.DECODER}`,[ci.DECODER_WASM]:`${sU}/${ci.DECODER_WASM}`,[ci.FALLBACK_DECODER]:`${sU}/${ci.FALLBACK_DECODER}`,[ci.ENCODER]:`https://raw.githubusercontent.com/google/draco/${Wjr}/javascript/${ci.ENCODER}`},I2;async function kSe(e){let r=e.modules||{};return r.draco3d?I2=I2||r.draco3d.createDecoderModule({}).then(t=>({draco:t})):I2=I2||Vjr(e),await I2}async function Vjr(e){let r,t;switch(e.draco&&e.draco.decoderType){case"js":r=await Vl(Dp[ci.FALLBACK_DECODER],"draco",e,ci.FALLBACK_DECODER);break;case"wasm":default:[r,t]=await Promise.all([await Vl(Dp[ci.DECODER],"draco",e,ci.DECODER),await Vl(Dp[ci.DECODER_WASM],"draco",e,ci.DECODER_WASM)])}return r=r||globalThis.DracoDecoderModule,await Kjr(r,t)}function Kjr(e,r){let t={};return r&&(t.wasmBinary=r),new Promise(n=>{e(ze(oe({},t),{onModuleLoaded:i=>n({draco:i})}))})}var uU={id:"draco-writer",name:"Draco compressed geometry writer",module:"draco",version:Fk,worker:!0,options:{draco:{},source:null}};var Ub=ze(oe({},ESe),{parse:Yjr});async function Yjr(e,r){let{draco:t}=await kSe(r),n=new Ik(t);try{return n.parseSync(e,r==null?void 0:r.draco)}finally{n.destroy()}}var $jr={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Ti={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},nt=oe(oe({},$jr),Ti);var lU={[Ti.DOUBLE]:Float64Array,[Ti.FLOAT]:Float32Array,[Ti.UNSIGNED_SHORT]:Uint16Array,[Ti.UNSIGNED_INT]:Uint32Array,[Ti.UNSIGNED_BYTE]:Uint8Array,[Ti.BYTE]:Int8Array,[Ti.SHORT]:Int16Array,[Ti.INT]:Int32Array},Xjr={DOUBLE:Ti.DOUBLE,FLOAT:Ti.FLOAT,UNSIGNED_SHORT:Ti.UNSIGNED_SHORT,UNSIGNED_INT:Ti.UNSIGNED_INT,UNSIGNED_BYTE:Ti.UNSIGNED_BYTE,BYTE:Ti.BYTE,SHORT:Ti.SHORT,INT:Ti.INT},cU="Failed to convert GL type",mo=class{static fromTypedArray(r){r=ArrayBuffer.isView(r)?r.constructor:r;for(let t in lU)if(lU[t]===r)return t;throw new Error(cU)}static fromName(r){let t=Xjr[r];if(!t)throw new Error(cU);return t}static getArrayType(r){switch(r){case Ti.UNSIGNED_SHORT_5_6_5:case Ti.UNSIGNED_SHORT_4_4_4_4:case Ti.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:let t=lU[r];if(!t)throw new Error(cU);return t}}static getByteSize(r){return mo.getArrayType(r).BYTES_PER_ELEMENT}static validate(r){return Boolean(mo.getArrayType(r))}static createTypedArray(r,t,n=0,i){i===void 0&&(i=(t.byteLength-n)/mo.getByteSize(r));let a=mo.getArrayType(r);return new a(t,n,i)}};function OSe(e,r){if(!e)throw new Error(`math.gl assertion failed. ${r}`)}function fU(e,r=[0,0,0]){let t=e>>11&31,n=e>>5&63,i=e&31;return r[0]=t<<3,r[1]=n<<2,r[2]=i<<3,r}var xf=$e(Xt());var Q3t=1/256;var Z3t=new xf.Vector2,e6t=new xf.Vector3,r6t=new xf.Vector2,t6t=new xf.Vector2,n6t=new Uint8Array(1);function RSe(e,r=255){return(0,xf.clamp)(e,0,r)/r*2-1}function FSe(e){return e<0?-1:1}function ISe(e,r,t,n){if(OSe(n),e<0||e>t||r<0||r>t)throw new Error(`x and y must be unsigned normalized integers between 0 and ${t}`);if(n.x=RSe(e,t),n.y=RSe(r,t),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){let i=n.x;n.x=(1-Math.abs(n.y))*FSe(i),n.y=(1-Math.abs(i))*FSe(n.y)}return n.normalize()}function dU(e,r,t){return ISe(e,r,255,t)}var mU=$e(Xt());var kp=class{constructor(r,t){this.featuresLength=0;this._cachedTypedArrays={};this.json=r,this.buffer=t}getExtension(r){return this.json.extensions&&this.json.extensions[r]}hasProperty(r){return Boolean(this.json[r])}getGlobalProperty(r,t=nt.UNSIGNED_INT,n=1){let i=this.json[r];return i&&Number.isFinite(i.byteOffset)?this._getTypedArrayFromBinary(r,t,n,1,i.byteOffset):i}getPropertyArray(r,t,n){let i=this.json[r];return i&&Number.isFinite(i.byteOffset)?("componentType"in i&&(t=mo.fromName(i.componentType)),this._getTypedArrayFromBinary(r,t,n,this.featuresLength,i.byteOffset)):this._getTypedArrayFromArray(r,t,i)}getProperty(r,t,n,i,a){let o=this.json[r];if(!o)return o;let s=this.getPropertyArray(r,t,n);if(n===1)return s[i];for(let u=0;u<n;++u)a[u]=s[n*i+u];return a}_getTypedArrayFromBinary(r,t,n,i,a){let o=this._cachedTypedArrays,s=o[r];return s||(s=mo.createTypedArray(t,this.buffer.buffer,this.buffer.byteOffset+a,i*n),o[r]=s),s}_getTypedArrayFromArray(r,t,n){let i=this._cachedTypedArrays,a=i[r];return a||(a=mo.createTypedArray(t,n),i[r]=a),a}};var Jjr={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Qjr={SCALAR:(e,r)=>e[r],VEC2:(e,r)=>[e[2*r+0],e[2*r+1]],VEC3:(e,r)=>[e[3*r+0],e[3*r+1],e[3*r+2]],VEC4:(e,r)=>[e[4*r+0],e[4*r+1],e[4*r+2],e[4*r+3]],MAT2:(e,r)=>[e[4*r+0],e[4*r+1],e[4*r+2],e[4*r+3]],MAT3:(e,r)=>[e[9*r+0],e[9*r+1],e[9*r+2],e[9*r+3],e[9*r+4],e[9*r+5],e[9*r+6],e[9*r+7],e[9*r+8]],MAT4:(e,r)=>[e[16*r+0],e[16*r+1],e[16*r+2],e[16*r+3],e[16*r+4],e[16*r+5],e[16*r+6],e[16*r+7],e[16*r+8],e[16*r+9],e[16*r+10],e[16*r+11],e[16*r+12],e[16*r+13],e[16*r+14],e[16*r+15]]},Zjr={SCALAR:(e,r,t)=>{r[t]=e},VEC2:(e,r,t)=>{r[2*t+0]=e[0],r[2*t+1]=e[1]},VEC3:(e,r,t)=>{r[3*t+0]=e[0],r[3*t+1]=e[1],r[3*t+2]=e[2]},VEC4:(e,r,t)=>{r[4*t+0]=e[0],r[4*t+1]=e[1],r[4*t+2]=e[2],r[4*t+3]=e[3]},MAT2:(e,r,t)=>{r[4*t+0]=e[0],r[4*t+1]=e[1],r[4*t+2]=e[2],r[4*t+3]=e[3]},MAT3:(e,r,t)=>{r[9*t+0]=e[0],r[9*t+1]=e[1],r[9*t+2]=e[2],r[9*t+3]=e[3],r[9*t+4]=e[4],r[9*t+5]=e[5],r[9*t+6]=e[6],r[9*t+7]=e[7],r[9*t+8]=e[8],r[9*t+9]=e[9]},MAT4:(e,r,t)=>{r[16*t+0]=e[0],r[16*t+1]=e[1],r[16*t+2]=e[2],r[16*t+3]=e[3],r[16*t+4]=e[4],r[16*t+5]=e[5],r[16*t+6]=e[6],r[16*t+7]=e[7],r[16*t+8]=e[8],r[16*t+9]=e[9],r[16*t+10]=e[10],r[16*t+11]=e[11],r[16*t+12]=e[12],r[16*t+13]=e[13],r[16*t+14]=e[14],r[16*t+15]=e[15]}};function PSe(e,r,t,n){let{componentType:i}=e;Qr(e.componentType);let a=typeof i=="string"?mo.fromName(i):i,o=Jjr[e.type],s=Qjr[e.type],u=Zjr[e.type];return t+=e.byteOffset,{values:mo.createTypedArray(a,r,t,o*n),type:a,size:o,unpacker:s,packer:u}}var tc=e=>e!==void 0;function BSe(e,r,t){if(!r)return null;let n=e.getExtension("3DTILES_batch_table_hierarchy"),i=r.HIERARCHY;return i&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),r.extensions=r.extensions||{},r.extensions["3DTILES_batch_table_hierarchy"]=i,n=i),n?eMr(n,t):null}function eMr(e,r){let t,n,i,a=e.instancesLength,o=e.classes,s=e.classIds,u=e.parentCounts,l=e.parentIds,c=a;tc(s.byteOffset)&&(s.componentType=defaultValue(s.componentType,GL.UNSIGNED_SHORT),s.type=AttributeType.SCALAR,i=getBinaryAccessor(s),s=i.createArrayBufferView(r.buffer,r.byteOffset+s.byteOffset,a));let f;if(tc(u))for(tc(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,i=getBinaryAccessor(u),u=i.createArrayBufferView(r.buffer,r.byteOffset+u.byteOffset,a)),f=new Uint16Array(a),c=0,t=0;t<a;++t)f[t]=c,c+=u[t];tc(l)&&tc(l.byteOffset)&&(l.componentType=defaultValue(l.componentType,GL.UNSIGNED_SHORT),l.type=AttributeType.SCALAR,i=getBinaryAccessor(l),l=i.createArrayBufferView(r.buffer,r.byteOffset+l.byteOffset,c));let d=o.length;for(t=0;t<d;++t){let v=o[t].length,y=o[t].instances,w=getBinaryProperties(v,y,r);o[t].instances=combine(w,y)}let p=new Array(d).fill(0),h=new Uint16Array(a);for(t=0;t<a;++t)n=s[t],h[t]=p[n],++p[n];let b={classes:o,classIds:s,classIndexes:h,parentCounts:u,parentIndexes:f,parentIds:l};return nMr(b),b}function Gb(e,r,t){if(!e)return;let n=e.parentCounts;return e.parentIds?t(e,r):n>0?rMr(e,r,t):tMr(e,r,t)}function rMr(e,r,t){let n=e.classIds,i=e.parentCounts,a=e.parentIds,o=e.parentIndexes,s=n.length,u=scratchVisited;u.length=Math.max(u.length,s);let l=++marker,c=scratchStack;for(c.length=0,c.push(r);c.length>0;){if(r=c.pop(),u[r]===l)continue;u[r]=l;let f=t(e,r);if(tc(f))return f;let d=i[r],p=o[r];for(let h=0;h<d;++h){let b=a[p+h];b!==r&&c.push(b)}}return null}function tMr(e,r,t){let n=!0;for(;n;){let i=t(e,r);if(tc(i))return i;let a=e.parentIds[r];n=a!==r,r=a}throw new Error("traverseHierarchySingleParent")}function nMr(e){let r=[],n=e.classIds.length;for(let i=0;i<n;++i)jSe(e,i,stack)}function jSe(e,r,t){let n=e.parentCounts,i=e.parentIds,a=e.parentIndexes,s=e.classIds.length;if(!tc(i))return;assert(r<s,`Parent index ${r} exceeds the total number of instances: ${s}`),assert(t.indexOf(r)===-1,"Circular dependency detected in the batch table hierarchy."),t.push(r);let u=tc(n)?n[r]:1,l=tc(n)?a[r]:r;for(let c=0;c<u;++c){let f=i[l+c];f!==r&&jSe(e,f,t)}t.pop(r)}function jo(e){return e!=null}var Pk=(e,r)=>e,iMr={HIERARCHY:!0,extensions:!0,extras:!0},zb=class{constructor(r,t,n,i={}){var a;Qr(n>=0),this.json=r||{},this.binary=t,this.featureCount=n,this._extensions=((a=this.json)==null?void 0:a.extensions)||{},this._properties={};for(let o in this.json)iMr[o]||(this._properties[o]=this.json[o]);this._binaryProperties=this._initializeBinaryProperties(),i["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=BSe(this,this.json,this.binary))}getExtension(r){return this.json&&this.json.extensions&&this.json.extensions[r]}memorySizeInBytes(){return 0}isClass(r,t){if(this._checkBatchId(r),Qr(typeof t=="string",t),this._hierarchy){let n=Gb(this._hierarchy,r,(i,a)=>{let o=i.classIds[a];return i.classes[o].name===t});return jo(n)}return!1}isExactClass(r,t){return Qr(typeof t=="string",t),this.getExactClassName(r)===t}getExactClassName(r){if(this._checkBatchId(r),this._hierarchy){let t=this._hierarchy.classIds[r];return this._hierarchy.classes[t].name}}hasProperty(r,t){return this._checkBatchId(r),Qr(typeof t=="string",t),jo(this._properties[t])||this._hasPropertyInHierarchy(r,t)}getPropertyNames(r,t){this._checkBatchId(r),t=jo(t)?t:[],t.length=0;let n=Object.keys(this._properties);return t.push(...n),this._hierarchy&&this._getPropertyNamesInHierarchy(r,t),t}getProperty(r,t){if(this._checkBatchId(r),Qr(typeof t=="string",t),this._binaryProperties){let i=this._binaryProperties[t];if(jo(i))return this._getBinaryProperty(i,r)}let n=this._properties[t];if(jo(n))return Pk(n[r],!0);if(this._hierarchy){let i=this._getHierarchyProperty(r,t);if(jo(i))return i}}setProperty(r,t,n){let i=this.featureCount;if(this._checkBatchId(r),Qr(typeof t=="string",t),this._binaryProperties){let o=this._binaryProperties[t];if(o){this._setBinaryProperty(o,r,n);return}}if(this._hierarchy&&this._setHierarchyProperty(this,r,t,n))return;let a=this._properties[t];jo(a)||(this._properties[t]=new Array(i),a=this._properties[t]),a[r]=Pk(n,!0)}_checkBatchId(r){if(!(r>=0&&r<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}_getBinaryProperty(r,t){return r.unpack(r.typedArray,t)}_setBinaryProperty(r,t,n){r.pack(n,r.typedArray,t)}_initializeBinaryProperties(){let r=null;for(let t in this._properties){let n=this._properties[t],i=this._initializeBinaryProperty(t,n);i&&(r=r||{},r[t]=i)}return r}_initializeBinaryProperty(r,t){if("byteOffset"in t){let n=t;Qr(this.binary,`Property ${r} requires a batch table binary.`),Qr(n.type,`Property ${r} requires a type.`);let i=PSe(n,this.binary.buffer,this.binary.byteOffset|0,this.featureCount);return{typedArray:i.values,componentCount:i.size,unpack:i.unpacker,pack:i.packer}}return null}_hasPropertyInHierarchy(r,t){if(!this._hierarchy)return!1;let n=Gb(this._hierarchy,r,(i,a)=>{let o=i.classIds[a],s=i.classes[o].instances;return jo(s[t])});return jo(n)}_getPropertyNamesInHierarchy(r,t){Gb(this._hierarchy,r,(n,i)=>{let a=n.classIds[i],o=n.classes[a].instances;for(let s in o)o.hasOwnProperty(s)&&t.indexOf(s)===-1&&t.push(s)})}_getHierarchyProperty(r,t){return Gb(this._hierarchy,r,(n,i)=>{let a=n.classIds[i],o=n.classes[a],s=n.classIndexes[i],u=o.instances[t];return jo(u)?jo(u.typedArray)?this._getBinaryProperty(u,s):Pk(u[s],!0):null})}_setHierarchyProperty(r,t,n,i){let a=Gb(this._hierarchy,t,(o,s)=>{let u=o.classIds[s],l=o.classes[u],c=o.classIndexes[s],f=l.instances[n];return jo(f)?(Qr(s===t,`Inherited property "${n}" is read-only.`),jo(f.typedArray)?this._setBinaryProperty(f,c,i):f[c]=Pk(i,!0),!0):!1});return jo(a)}};var pU=4;function Op(e,r,t=0){let n=new DataView(r);if(e.magic=n.getUint32(t,!0),t+=pU,e.version=n.getUint32(t,!0),t+=pU,e.byteLength=n.getUint32(t,!0),t+=pU,e.version!==1)throw new Error(`3D Tile Version ${e.version} not supported`);return t}var Hb=4,MSe="b3dm tile in legacy format.";function Wb(e,r,t){let n=new DataView(r),i;e.header=e.header||{};let a=n.getUint32(t,!0);t+=Hb;let o=n.getUint32(t,!0);t+=Hb;let s=n.getUint32(t,!0);t+=Hb;let u=n.getUint32(t,!0);return t+=Hb,s>=570425344?(t-=Hb*2,i=a,s=o,u=0,a=0,o=0,console.warn(MSe)):u>=570425344&&(t-=Hb,i=s,s=a,u=o,a=0,o=0,console.warn(MSe)),e.header.featureTableJsonByteLength=a,e.header.featureTableBinaryByteLength=o,e.header.batchTableJsonByteLength=s,e.header.batchTableBinaryByteLength=u,e.header.batchLength=i,t}function Vb(e,r,t,n){return t=aMr(e,r,t,n),t=oMr(e,r,t,n),t}function aMr(e,r,t,n){let{featureTableJsonByteLength:i,featureTableBinaryByteLength:a,batchLength:o}=e.header||{};if(e.featureTableJson={BATCH_LENGTH:o||0},i&&i>0){let s=iU(r,t,i);e.featureTableJson=JSON.parse(s)}return t+=i||0,e.featureTableBinary=new Uint8Array(r,t,a),t+=a||0,t}function oMr(e,r,t,n){let{batchTableJsonByteLength:i,batchTableBinaryByteLength:a}=e.header||{};if(i&&i>0){let o=iU(r,t,i);e.batchTableJson=JSON.parse(o),t+=i,a&&a>0&&(e.batchTableBinary=new Uint8Array(r,t,a),e.batchTableBinary=new Uint8Array(e.batchTableBinary),t+=a)}return t}function hU(e,r,t){if(!r&&(!e||!e.batchIds||!t))return null;let{batchIds:n,isRGB565:i,pointCount:a=0}=e;if(n&&t){let o=new Uint8ClampedArray(a*3);for(let s=0;s<a;s++){let u=n[s],c=t.getProperty(u,"dimensions").map(f=>f*255);o[s*3]=c[0],o[s*3+1]=c[1],o[s*3+2]=c[2]}return{type:nt.UNSIGNED_BYTE,value:o,size:3,normalized:!0}}if(r&&i){let o=new Uint8ClampedArray(a*3);for(let s=0;s<a;s++){let u=fU(r[s]);o[s*3]=u[0],o[s*3+1]=u[1],o[s*3+2]=u[2]}return{type:nt.UNSIGNED_BYTE,value:o,size:3,normalized:!0}}return r&&r.length===a*3?{type:nt.UNSIGNED_BYTE,value:r,size:3,normalized:!0}:{type:nt.UNSIGNED_BYTE,value:r||new Uint8ClampedArray,size:4,normalized:!0}}var LSe=$e(Xt());var qSe=new LSe.Vector3;function NSe(e,r){if(!r)return null;if(e.isOctEncoded16P){let t=new Float32Array((e.pointsLength||0)*3);for(let n=0;n<(e.pointsLength||0);n++)dU(r[n*2],r[n*2+1],qSe),qSe.toArray(t,n*3);return{type:nt.FLOAT,size:2,value:t}}return{type:nt.FLOAT,size:2,value:r}}var USe=$e(Xt());function GSe(e,r,t){return e.isQuantized?t["3d-tiles"]&&t["3d-tiles"].decodeQuantizedPositions?(e.isQuantized=!1,sMr(e,r)):{type:nt.UNSIGNED_SHORT,value:r,size:3,normalized:!0}:r}function sMr(e,r){let t=new USe.Vector3,n=new Float32Array(e.pointCount*3);for(let i=0;i<e.pointCount;i++)t.set(r[i*3],r[i*3+1],r[i*3+2]).scale(1/e.quantizedRange).multiply(e.quantizedVolumeScale).add(e.quantizedVolumeOffset).toArray(n,i*3);return n}async function zSe(e,r,t,n,i){t=Op(e,r,t),t=Wb(e,r,t),t=Vb(e,r,t,n),uMr(e);let{featureTable:a,batchTable:o}=lMr(e);return await hMr(e,a,o,n,i),cMr(e,a,n),fMr(e,a,o),dMr(e,a),t}function uMr(e){e.attributes={positions:null,colors:null,normals:null,batchIds:null},e.isQuantized=!1,e.isTranslucent=!1,e.isRGB565=!1,e.isOctEncoded16P=!1}function lMr(e){let r=new kp(e.featureTableJson,e.featureTableBinary),t=r.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(t))throw new Error("POINTS_LENGTH must be defined");r.featuresLength=t,e.featuresLength=t,e.pointsLength=t,e.pointCount=t,e.rtcCenter=r.getGlobalProperty("RTC_CENTER",nt.FLOAT,3);let n=pMr(e,r);return{featureTable:r,batchTable:n}}function cMr(e,r,t){if(e.attributes=e.attributes||{positions:null,colors:null,normals:null,batchIds:null},!e.attributes.positions){if(r.hasProperty("POSITION"))e.attributes.positions=r.getPropertyArray("POSITION",nt.FLOAT,3);else if(r.hasProperty("POSITION_QUANTIZED")){let n=r.getPropertyArray("POSITION_QUANTIZED",nt.UNSIGNED_SHORT,3);if(e.isQuantized=!0,e.quantizedRange=(1<<16)-1,e.quantizedVolumeScale=r.getGlobalProperty("QUANTIZED_VOLUME_SCALE",nt.FLOAT,3),!e.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(e.quantizedVolumeOffset=r.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",nt.FLOAT,3),!e.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");e.attributes.positions=GSe(e,n,t)}}if(!e.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}function fMr(e,r,t){if(e.attributes=e.attributes||{positions:null,colors:null,normals:null,batchIds:null},!e.attributes.colors){let n=null;r.hasProperty("RGBA")?(n=r.getPropertyArray("RGBA",nt.UNSIGNED_BYTE,4),e.isTranslucent=!0):r.hasProperty("RGB")?n=r.getPropertyArray("RGB",nt.UNSIGNED_BYTE,3):r.hasProperty("RGB565")&&(n=r.getPropertyArray("RGB565",nt.UNSIGNED_SHORT,1),e.isRGB565=!0),e.attributes.colors=hU(e,n,t)}r.hasProperty("CONSTANT_RGBA")&&(e.constantRGBA=r.getGlobalProperty("CONSTANT_RGBA",nt.UNSIGNED_BYTE,4))}function dMr(e,r){if(e.attributes=e.attributes||{positions:null,colors:null,normals:null,batchIds:null},!e.attributes.normals){let t=null;r.hasProperty("NORMAL")?t=r.getPropertyArray("NORMAL",nt.FLOAT,3):r.hasProperty("NORMAL_OCT16P")&&(t=r.getPropertyArray("NORMAL_OCT16P",nt.UNSIGNED_BYTE,2),e.isOctEncoded16P=!0),e.attributes.normals=NSe(e,t)}}function pMr(e,r){let t=null;if(!e.batchIds&&r.hasProperty("BATCH_ID")&&(e.batchIds=r.getPropertyArray("BATCH_ID",nt.UNSIGNED_SHORT,1),e.batchIds)){let n=r.getGlobalProperty("BATCH_LENGTH");if(!n)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");let{batchTableJson:i,batchTableBinary:a}=e;t=new zb(i,a,n)}return t}async function hMr(e,r,t,n,i){let a,o,s,u=e.batchTableJson&&e.batchTableJson.extensions&&e.batchTableJson.extensions["3DTILES_draco_point_compression"];u&&(s=u.properties);let l=r.getExtension("3DTILES_draco_point_compression");if(l){o=l.properties;let f=l.byteOffset,d=l.byteLength;if(!o||!Number.isFinite(f)||!d)throw new Error("Draco properties, byteOffset, and byteLength must be defined");a=(e.featureTableBinary||[]).slice(f,f+d),e.hasPositions=Number.isFinite(o.POSITION),e.hasColors=Number.isFinite(o.RGB)||Number.isFinite(o.RGBA),e.hasNormals=Number.isFinite(o.NORMAL),e.hasBatchIds=Number.isFinite(o.BATCH_ID),e.isTranslucent=Number.isFinite(o.RGBA)}if(!a)return!0;let c={buffer:a,properties:oe(oe({},o),s),featureTableProperties:o,batchTableProperties:s,dequantizeInShader:!1};return await mMr(e,c,n,i)}async function mMr(e,r,t,n){if(!n)return;let{parse:i}=n,a=ze(oe({},t),{draco:ze(oe({},t==null?void 0:t.draco),{extraAttributes:r.batchTableProperties||{}})});delete a["3d-tiles"];let o=await i(r.buffer,Ub,a),s=o.attributes.POSITION&&o.attributes.POSITION.value,u=o.attributes.COLOR_0&&o.attributes.COLOR_0.value,l=o.attributes.NORMAL&&o.attributes.NORMAL.value,c=o.attributes.BATCH_ID&&o.attributes.BATCH_ID.value,f=s&&o.attributes.POSITION.value.quantization,d=l&&o.attributes.NORMAL.value.quantization;if(f){let h=o.POSITION.data.quantization,b=h.range;e.quantizedVolumeScale=new mU.Vector3(b,b,b),e.quantizedVolumeOffset=new mU.Vector3(h.minValues),e.quantizedRange=(1<<h.quantizationBits)-1,e.isQuantizedDraco=!0}d&&(e.octEncodedRange=(1<<o.NORMAL.data.quantization.quantizationBits)-1,e.isOctEncodedDraco=!0);let p={};if(r.batchTableProperties)for(let h of Object.keys(r.batchTableProperties))o.attributes[h]&&o.attributes[h].value&&(p[h.toLowerCase()]=o.attributes[h].value);e.attributes=oe({positions:s,colors:hU(e,u,void 0),normals:l,batchIds:c},p)}var Bk="4.0.0-alpha.20";var jk="4.0.0-alpha.20";var{_parseImageNode:gMr}=globalThis,gU=typeof Image!="undefined",vU=typeof ImageBitmap!="undefined",vMr=Boolean(gMr),bU=wi?!0:vMr;function HSe(e){switch(e){case"auto":return vU||gU||bU;case"imagebitmap":return vU;case"image":return gU;case"data":return bU;default:throw new Error(`@loaders.gl/images: image ${e} not supported in this environment`)}}function WSe(){if(vU)return"imagebitmap";if(gU)return"image";if(bU)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function VSe(e){let r=bMr(e);if(!r)throw new Error("Not an image");return r}function yU(e){return Kb(e)}function Kb(e){switch(VSe(e)){case"data":return e;case"image":case"imagebitmap":let r=document.createElement("canvas"),t=r.getContext("2d");if(!t)throw new Error("getImageData");return r.width=e.width,r.height=e.height,t.drawImage(e,0,0),t.getImageData(0,0,e.width,e.height);default:throw new Error("getImageData")}}function bMr(e){return typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap?"imagebitmap":typeof Image!="undefined"&&e instanceof Image?"image":e&&typeof e=="object"&&e.data&&e.width&&e.height?"data":null}var yMr=/^data:image\/svg\+xml/,xMr=/\.svg((\?|#).*)?$/;function Mk(e){return e&&(yMr.test(e)||xMr.test(e))}function KSe(e,r){if(Mk(r)){let n=new TextDecoder().decode(e);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(n=unescape(encodeURIComponent(n)))}catch(a){throw new Error(a.message)}return`data:image/svg+xml;base64,${btoa(n)}`}return xU(e,r)}function xU(e,r){if(Mk(r))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}async function P2(e,r,t){let n=KSe(e,t),i=self.URL||self.webkitURL,a=typeof n!="string"&&i.createObjectURL(n);try{return await _Mr(a||n,r)}finally{a&&i.revokeObjectURL(a)}}async function _Mr(e,r){let t=new Image;return t.src=e,r.image&&r.image.decode&&t.decode?(await t.decode(),t):await new Promise((n,i)=>{try{t.onload=()=>n(t),t.onerror=a=>i(new Error(`Could not load image ${e}: ${a}`))}catch(a){i(a)}})}var EMr={},YSe=!0;async function _U(e,r,t){let n;Mk(t)?n=await P2(e,r,t):n=xU(e,t);let i=r&&r.imagebitmap;return await wMr(n,i)}async function wMr(e,r=null){if((SMr(r)||!YSe)&&(r=null),r)try{return await createImageBitmap(e,r)}catch(t){console.warn(t),YSe=!1}return await createImageBitmap(e)}function SMr(e){for(let r in e||EMr)return!1;return!0}function $Se(e){return!DMr(e,"ftyp",4)||(e[8]&96)==0?null:AMr(e)}function AMr(e){switch(TMr(e,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function TMr(e,r,t){return String.fromCharCode(...e.slice(r,t))}function CMr(e){return[...e].map(r=>r.charCodeAt(0))}function DMr(e,r,t=0){let n=CMr(r);for(let i=0;i<n.length;++i)if(n[i]!==e[i+t])return!1;return!0}var nc=!1,B2=!0;function z0(e){let r=j2(e);return OMr(r)||IMr(r)||RMr(r)||FMr(r)||kMr(r)}function kMr(e){let r=new Uint8Array(e instanceof DataView?e.buffer:e),t=$Se(r);return t?{mimeType:t.mimeType,width:0,height:0}:null}function OMr(e){let r=j2(e);return r.byteLength>=24&&r.getUint32(0,nc)===2303741511?{mimeType:"image/png",width:r.getUint32(16,nc),height:r.getUint32(20,nc)}:null}function RMr(e){let r=j2(e);return r.byteLength>=10&&r.getUint32(0,nc)===1195984440?{mimeType:"image/gif",width:r.getUint16(6,B2),height:r.getUint16(8,B2)}:null}function FMr(e){let r=j2(e);return r.byteLength>=14&&r.getUint16(0,nc)===16973&&r.getUint32(2,B2)===r.byteLength?{mimeType:"image/bmp",width:r.getUint32(18,B2),height:r.getUint32(22,B2)}:null}function IMr(e){let r=j2(e);if(!(r.byteLength>=3&&r.getUint16(0,nc)===65496&&r.getUint8(2)===255))return null;let{tableMarkers:n,sofMarkers:i}=PMr(),a=2;for(;a+9<r.byteLength;){let o=r.getUint16(a,nc);if(i.has(o))return{mimeType:"image/jpeg",height:r.getUint16(a+5,nc),width:r.getUint16(a+7,nc)};if(!n.has(o))return null;a+=2,a+=r.getUint16(a,nc)}return null}function PMr(){let e=new Set([65499,65476,65484,65501,65534]);for(let t=65504;t<65520;++t)e.add(t);let r=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:r}}function j2(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}async function EU(e,r){let{mimeType:t}=z0(e)||{},n=globalThis._parseImageNode;return Qr(n),await n(e,t)}async function wU(e,r,t){r=r||{};let i=(r.image||{}).type||"auto",{url:a}=t||{},o=BMr(i),s;switch(o){case"imagebitmap":s=await _U(e,r,a);break;case"image":s=await P2(e,r,a);break;case"data":s=await EU(e,r);break;default:Qr(!1)}return i==="data"&&(s=Kb(s)),s}function BMr(e){switch(e){case"auto":case"data":return WSe();default:return HSe(e),e}}var jMr=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],MMr=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],LMr={image:{type:"auto",decode:!0}},Yb={id:"image",module:"images",name:"Images",version:jk,mimeTypes:MMr,extensions:jMr,parse:wU,tests:[e=>Boolean(z0(new DataView(e)))],options:LMr};var{_encodeImageNode:XSe}=globalThis;async function JSe(e,r){return r=r||{},r.image=r.image||{},XSe?XSe(e,{type:r.image.mimeType}):qMr(e,r)}var QSe=!0;async function qMr(e,r){let{mimeType:t,jpegQuality:n}=r.image,{width:i,height:a}=yU(e),o=document.createElement("canvas");o.width=i,o.height=a,NMr(e,o);let s=await new Promise(u=>{if(n&&QSe)try{o.toBlob(u,t,n);return}catch{QSe=!1}o.toBlob(u,t)});if(!s)throw new Error("image encoding failed");return await s.arrayBuffer()}function NMr(e,r,t=0,n=0){if(t===0&&n===0&&typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap){let a=r.getContext("bitmaprenderer");if(a)return a.transferFromImageBitmap(e),r}let i=r.getContext("2d");if(e.data){let a=new Uint8ClampedArray(e.data),o=new ImageData(a,e.width,e.height);return i.putImageData(o,0,0),r}return i.drawImage(e,0,0),r}var SU={name:"Images",id:"image",module:"images",version:jk,extensions:["jpeg"],options:{image:{mimeType:"image/png",jpegQuality:null}},encode:JSe};var AU={};function TU(e){if(AU[e]===void 0){let r=wi?GMr(e):UMr(e);AU[e]=r}return AU[e]}function UMr(e){let r=["image/png","image/jpeg","image/gif"],{_parseImageNode:t,_imageFormatsNode:n=r}=globalThis;return Boolean(t)&&n.includes(e)}function GMr(e){switch(e){case"image/avif":case"image/webp":return zMr(e);default:return!0}}function zMr(e){try{return document.createElement("canvas").toDataURL(e).indexOf(`data:${e}`)===0}catch{return!1}}var $b="4.0.0-alpha.20";var ic={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"},CU;async function DU(e){let r=e.modules||{};return r.basis?r.basis:(CU=CU||HMr(e),await CU)}async function HMr(e){let r=null,t=null;return[r,t]=await Promise.all([await Vl(ic.TRANSCODER,"textures",e),await Vl(ic.TRANSCODER_WASM,"textures",e)]),r=r||globalThis.BASIS,await WMr(r,t)}function WMr(e,r){let t={};return r&&(t.wasmBinary=r),new Promise(n=>{e(t).then(i=>{let{BasisFile:a,initializeBasis:o}=i;o(),n({BasisFile:a})})})}var kU;async function OU(e){let r=e.modules||{};return r.basisEncoder?r.basisEncoder:(kU=kU||VMr(e),await kU)}async function VMr(e){let r=null,t=null;return[r,t]=await Promise.all([await Vl(ic.ENCODER,"textures",e),await Vl(ic.ENCODER_WASM,"textures",e)]),r=r||globalThis.BASIS,await KMr(r,t)}function KMr(e,r){let t={};return r&&(t.wasmBinary=r),new Promise(n=>{e(t).then(i=>{let{BasisFile:a,KTX2File:o,initializeBasis:s,BasisEncoder:u}=i;s(),n({BasisFile:a,KTX2File:o,BasisEncoder:u})})})}var Te={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919};var YMr=["","WEBKIT_","MOZ_"],ZSe={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"},Lk=null;function M2(e){if(!Lk){e=e||$Mr()||void 0,Lk=new Set;for(let r of YMr)for(let t in ZSe)if(e&&e.getExtension(`${r}${t}`)){let n=ZSe[t];Lk.add(n)}}return Lk}function $Mr(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}var fAe=$e(lAe());function Xb(e,r){let t=new Array(r.mipMapLevels),n=r.width,i=r.height,a=0;for(let o=0;o<r.mipMapLevels;++o){let s=QMr(r,n,i,e,o),u=JMr(e,o,a,s);t[o]={compressed:!0,format:r.internalFormat,data:u,width:n,height:i,levelSize:s},n=Math.max(1,n>>1),i=Math.max(1,i>>1),a+=s}return t}function JMr(e,r,t,n){return Array.isArray(e)?e[r].levelData:new Uint8Array(e.buffer,e.byteOffset+t,n)}function QMr(e,r,t,n,i){return Array.isArray(n)?e.sizeFunction(n[i]):e.sizeFunction(r,t)}var ZMr={131:Te.COMPRESSED_RGB_S3TC_DXT1_EXT,132:Te.COMPRESSED_SRGB_S3TC_DXT1_EXT,133:Te.COMPRESSED_RGBA_S3TC_DXT1_EXT,134:Te.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,135:Te.COMPRESSED_RGBA_S3TC_DXT3_EXT,136:Te.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,137:Te.COMPRESSED_RGBA_S3TC_DXT5_EXT,138:Te.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,139:Te.COMPRESSED_RED_RGTC1_EXT,140:Te.COMPRESSED_SIGNED_RED_RGTC1_EXT,141:Te.COMPRESSED_RED_GREEN_RGTC2_EXT,142:Te.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,147:Te.COMPRESSED_RGB8_ETC2,148:Te.COMPRESSED_SRGB8_ETC2,149:Te.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,150:Te.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,151:Te.COMPRESSED_RGBA8_ETC2_EAC,152:Te.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,153:Te.COMPRESSED_R11_EAC,154:Te.COMPRESSED_SIGNED_R11_EAC,155:Te.COMPRESSED_RG11_EAC,156:Te.COMPRESSED_SIGNED_RG11_EAC,157:Te.COMPRESSED_RGBA_ASTC_4x4_KHR,158:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,159:Te.COMPRESSED_RGBA_ASTC_5x4_KHR,160:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,161:Te.COMPRESSED_RGBA_ASTC_5x5_KHR,162:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,163:Te.COMPRESSED_RGBA_ASTC_6x5_KHR,164:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,165:Te.COMPRESSED_RGBA_ASTC_6x6_KHR,166:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,167:Te.COMPRESSED_RGBA_ASTC_8x5_KHR,168:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,169:Te.COMPRESSED_RGBA_ASTC_8x6_KHR,170:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,171:Te.COMPRESSED_RGBA_ASTC_8x8_KHR,172:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,173:Te.COMPRESSED_RGBA_ASTC_10x5_KHR,174:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,175:Te.COMPRESSED_RGBA_ASTC_10x6_KHR,176:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,177:Te.COMPRESSED_RGBA_ASTC_10x8_KHR,178:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,179:Te.COMPRESSED_RGBA_ASTC_10x10_KHR,180:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,181:Te.COMPRESSED_RGBA_ASTC_12x10_KHR,182:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,183:Te.COMPRESSED_RGBA_ASTC_12x12_KHR,184:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,1000054e3:Te.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,1000054001:Te.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,1000066e3:Te.COMPRESSED_RGBA_ASTC_4x4_KHR,1000066001:Te.COMPRESSED_RGBA_ASTC_5x4_KHR,1000066002:Te.COMPRESSED_RGBA_ASTC_5x5_KHR,1000066003:Te.COMPRESSED_RGBA_ASTC_6x5_KHR,1000066004:Te.COMPRESSED_RGBA_ASTC_6x6_KHR,1000066005:Te.COMPRESSED_RGBA_ASTC_8x5_KHR,1000066006:Te.COMPRESSED_RGBA_ASTC_8x6_KHR,1000066007:Te.COMPRESSED_RGBA_ASTC_8x8_KHR,1000066008:Te.COMPRESSED_RGBA_ASTC_10x5_KHR,1000066009:Te.COMPRESSED_RGBA_ASTC_10x6_KHR,1000066010:Te.COMPRESSED_RGBA_ASTC_10x8_KHR,1000066011:Te.COMPRESSED_RGBA_ASTC_10x10_KHR,1000066012:Te.COMPRESSED_RGBA_ASTC_12x10_KHR,1000066013:Te.COMPRESSED_RGBA_ASTC_12x12_KHR};function cAe(e){return ZMr[e]}var rs=[171,75,84,88,32,50,48,187,13,10,26,10];function zk(e){let r=new Uint8Array(e);return!(r.byteLength<rs.length||r[0]!==rs[0]||r[1]!==rs[1]||r[2]!==rs[2]||r[3]!==rs[3]||r[4]!==rs[4]||r[5]!==rs[5]||r[6]!==rs[6]||r[7]!==rs[7]||r[8]!==rs[8]||r[9]!==rs[9]||r[10]!==rs[10]||r[11]!==rs[11])}function dAe(e){let r=new Uint8Array(e),t=(0,fAe.read)(r),n=Math.max(1,t.levels.length),i=t.pixelWidth,a=t.pixelHeight,o=cAe(t.vkFormat);return Xb(t.levels,{mipMapLevels:n,width:i,height:a,sizeFunction:s=>s.uncompressedByteLength,internalFormat:o})}var e9r={etc1:{basisFormat:0,compressed:!0,format:Te.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:Te.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:Te.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:Te.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:Te.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:Te.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};async function q2(e,r){if(r.basis.containerFormat==="auto"){if(zk(e)){let n=await OU(r);return pAe(n.KTX2File,e,r)}let{BasisFile:t}=await DU(r);return BU(t,e,r)}switch(r.basis.module){case"encoder":let t=await OU(r);switch(r.basis.containerFormat){case"ktx2":return pAe(t.KTX2File,e,r);case"basis":default:return BU(t.BasisFile,e,r)}case"transcoder":default:let{BasisFile:n}=await DU(r);return BU(n,e,r)}}function BU(e,r,t){let n=new e(new Uint8Array(r));try{if(!n.startTranscoding())throw new Error("Failed to start basis transcoding");let i=n.getNumImages(),a=[];for(let o=0;o<i;o++){let s=n.getNumLevels(o),u=[];for(let l=0;l<s;l++)u.push(r9r(n,o,l,t));a.push(u)}return a}finally{n.close(),n.delete()}}function r9r(e,r,t,n){let i=e.getImageWidth(r,t),a=e.getImageHeight(r,t),o=e.getHasAlpha(),{compressed:s,format:u,basisFormat:l}=hAe(n,o),c=e.getImageTranscodedSizeInBytes(r,t,l),f=new Uint8Array(c);if(!e.transcodeImage(f,r,t,l,0,0))throw new Error("failed to start Basis transcoding");return{width:i,height:a,data:f,compressed:s,format:u,hasAlpha:o}}function pAe(e,r,t){let n=new e(new Uint8Array(r));try{if(!n.startTranscoding())throw new Error("failed to start KTX2 transcoding");let i=n.getLevels(),a=[];for(let o=0;o<i;o++){a.push(t9r(n,o,t));break}return[a]}finally{n.close(),n.delete()}}function t9r(e,r,t){let{alphaFlag:n,height:i,width:a}=e.getImageLevelInfo(r,0,0),{compressed:o,format:s,basisFormat:u}=hAe(t,n),l=e.getImageTranscodedSizeInBytes(r,0,0,u),c=new Uint8Array(l);if(!e.transcodeImage(c,r,0,0,u,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:a,height:i,data:c,compressed:o,levelSize:l,hasAlpha:n,format:s}}function hAe(e,r){let t=e&&e.basis&&e.basis.format;return t==="auto"&&(t=Jb()),typeof t=="object"&&(t=r?t.alpha:t.noAlpha),t=t.toLowerCase(),e9r[t]}function Jb(){let e=M2();return e.has("astc")?"astc-4x4":e.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:e.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:e.has("etc1")?"etc1":e.has("etc2")?"etc2":"rgb565"}var mAe={name:"Basis",id:"basis",module:"textures",version:$b,worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},H0=ze(oe({},mAe),{parse:q2});var ts={MAGIC_NUMBER:542327876,HEADER_LENGTH:31,MAGIC_NUMBER_INDEX:0,HEADER_SIZE_INDEX:1,HEADER_FLAGS_INDEX:2,HEADER_HEIGHT_INDEX:3,HEADER_WIDTH_INDEX:4,MIPMAPCOUNT_INDEX:7,HEADER_PF_FLAGS_INDEX:20,HEADER_PF_FOURCC_INDEX:21,DDSD_MIPMAPCOUNT:131072,DDPF_FOURCC:4},n9r={DXT1:Te.COMPRESSED_RGB_S3TC_DXT1_EXT,DXT3:Te.COMPRESSED_RGBA_S3TC_DXT3_EXT,DXT5:Te.COMPRESSED_RGBA_S3TC_DXT5_EXT,"ATC ":Te.COMPRESSED_RGB_ATC_WEBGL,ATCA:Te.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,ATCI:Te.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL},i9r=bAe,a9r=Hk,o9r=Hk,s9r={DXT1:bAe,DXT3:Hk,DXT5:Hk,"ATC ":i9r,ATCA:a9r,ATCI:o9r};function gAe(e){return new Uint32Array(e,0,ts.HEADER_LENGTH)[ts.MAGIC_NUMBER_INDEX]===ts.MAGIC_NUMBER}function vAe(e){let r=new Int32Array(e,0,ts.HEADER_LENGTH),t=r[ts.HEADER_PF_FOURCC_INDEX];Qr(Boolean(r[ts.HEADER_PF_FLAGS_INDEX]&ts.DDPF_FOURCC),"DDS: Unsupported format, must contain a FourCC code");let n=u9r(t),i=n9r[n],a=s9r[n];Qr(i&&a,`DDS: Unknown pixel format ${t}`);let o=1;r[ts.HEADER_FLAGS_INDEX]&ts.DDSD_MIPMAPCOUNT&&(o=Math.max(1,r[ts.MIPMAPCOUNT_INDEX]));let s=r[ts.HEADER_WIDTH_INDEX],u=r[ts.HEADER_HEIGHT_INDEX],l=r[ts.HEADER_SIZE_INDEX]+4,c=new Uint8Array(e,l);return Xb(c,{mipMapLevels:o,width:s,height:u,sizeFunction:a,internalFormat:i})}function bAe(e,r){return(e+3>>2)*(r+3>>2)*8}function Hk(e,r){return(e+3>>2)*(r+3>>2)*16}function u9r(e){return String.fromCharCode(e&255,e>>8&255,e>>16&255,e>>24&255)}var Vs={MAGIC_NUMBER:55727696,MAGIC_NUMBER_EXTRA:1347834371,HEADER_LENGTH:13,HEADER_SIZE:52,MAGIC_NUMBER_INDEX:0,PIXEL_FORMAT_INDEX:2,COLOUR_SPACE_INDEX:4,HEIGHT_INDEX:6,WIDTH_INDEX:7,MIPMAPCOUNT_INDEX:11,METADATA_SIZE_INDEX:12},l9r={0:[Te.COMPRESSED_RGB_PVRTC_2BPPV1_IMG],1:[Te.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG],2:[Te.COMPRESSED_RGB_PVRTC_4BPPV1_IMG],3:[Te.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG],6:[Te.COMPRESSED_RGB_ETC1_WEBGL],7:[Te.COMPRESSED_RGB_S3TC_DXT1_EXT],9:[Te.COMPRESSED_RGBA_S3TC_DXT3_EXT],11:[Te.COMPRESSED_RGBA_S3TC_DXT5_EXT],22:[Te.COMPRESSED_RGB8_ETC2],23:[Te.COMPRESSED_RGBA8_ETC2_EAC],24:[Te.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2],25:[Te.COMPRESSED_R11_EAC],26:[Te.COMPRESSED_RG11_EAC],27:[Te.COMPRESSED_RGBA_ASTC_4X4_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR],28:[Te.COMPRESSED_RGBA_ASTC_5X4_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR],29:[Te.COMPRESSED_RGBA_ASTC_5X5_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR],30:[Te.COMPRESSED_RGBA_ASTC_6X5_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR],31:[Te.COMPRESSED_RGBA_ASTC_6X6_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR],32:[Te.COMPRESSED_RGBA_ASTC_8X5_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR],33:[Te.COMPRESSED_RGBA_ASTC_8X6_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR],34:[Te.COMPRESSED_RGBA_ASTC_8X8_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR],35:[Te.COMPRESSED_RGBA_ASTC_10X5_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR],36:[Te.COMPRESSED_RGBA_ASTC_10X6_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR],37:[Te.COMPRESSED_RGBA_ASTC_10X8_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR],38:[Te.COMPRESSED_RGBA_ASTC_10X10_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR],39:[Te.COMPRESSED_RGBA_ASTC_12X10_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR],40:[Te.COMPRESSED_RGBA_ASTC_12X12_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR]},c9r={0:_Ae,1:_Ae,2:EAe,3:EAe,6:N2,7:N2,9:U2,11:U2,22:N2,23:U2,24:N2,25:N2,26:U2,27:U2,28:f9r,29:d9r,30:p9r,31:h9r,32:m9r,33:g9r,34:v9r,35:b9r,36:y9r,37:x9r,38:_9r,39:E9r,40:w9r};function yAe(e){let t=new Uint32Array(e,0,Vs.HEADER_LENGTH)[Vs.MAGIC_NUMBER_INDEX];return t===Vs.MAGIC_NUMBER||t===Vs.MAGIC_NUMBER_EXTRA}function xAe(e){let r=new Uint32Array(e,0,Vs.HEADER_LENGTH),t=r[Vs.PIXEL_FORMAT_INDEX],n=r[Vs.COLOUR_SPACE_INDEX],i=l9r[t]||[],a=i.length>1&&n?i[1]:i[0],o=c9r[t],s=r[Vs.MIPMAPCOUNT_INDEX],u=r[Vs.WIDTH_INDEX],l=r[Vs.HEIGHT_INDEX],c=Vs.HEADER_SIZE+r[Vs.METADATA_SIZE_INDEX],f=new Uint8Array(e,c);return Xb(f,{mipMapLevels:s,width:u,height:l,sizeFunction:o,internalFormat:a})}function _Ae(e,r){return e=Math.max(e,16),r=Math.max(r,8),e*r/4}function EAe(e,r){return e=Math.max(e,8),r=Math.max(r,8),e*r/2}function N2(e,r){return Math.floor((e+3)/4)*Math.floor((r+3)/4)*8}function U2(e,r){return Math.floor((e+3)/4)*Math.floor((r+3)/4)*16}function f9r(e,r){return Math.floor((e+4)/5)*Math.floor((r+3)/4)*16}function d9r(e,r){return Math.floor((e+4)/5)*Math.floor((r+4)/5)*16}function p9r(e,r){return Math.floor((e+5)/6)*Math.floor((r+4)/5)*16}function h9r(e,r){return Math.floor((e+5)/6)*Math.floor((r+5)/6)*16}function m9r(e,r){return Math.floor((e+7)/8)*Math.floor((r+4)/5)*16}function g9r(e,r){return Math.floor((e+7)/8)*Math.floor((r+5)/6)*16}function v9r(e,r){return Math.floor((e+7)/8)*Math.floor((r+7)/8)*16}function b9r(e,r){return Math.floor((e+9)/10)*Math.floor((r+4)/5)*16}function y9r(e,r){return Math.floor((e+9)/10)*Math.floor((r+5)/6)*16}function x9r(e,r){return Math.floor((e+9)/10)*Math.floor((r+7)/8)*16}function _9r(e,r){return Math.floor((e+9)/10)*Math.floor((r+9)/10)*16}function E9r(e,r){return Math.floor((e+11)/12)*Math.floor((r+9)/10)*16}function w9r(e,r){return Math.floor((e+11)/12)*Math.floor((r+11)/12)*16}function wAe(e){if(zk(e))return dAe(e);if(gAe(e))return vAe(e);if(yAe(e))return xAe(e);throw new Error("Texture container format not recognized")}var S9r={"compressed-texture":{libraryPath:"libs/",useBasis:!1}},SAe={name:"Texture Containers",id:"compressed-texture",module:"textures",version:$b,worker:!0,extensions:["ktx","ktx2","dds","pvr"],mimeTypes:["image/ktx2","image/ktx","image/vnd-ms.dds","image/x-dds","application/octet-stream"],binary:!0,options:S9r},Wk=ze(oe({},SAe),{parse:async(e,r)=>r["compressed-texture"].useBasis?(r.basis=ze(oe({format:{alpha:"BC3",noAlpha:"BC1"}},r.basis),{containerFormat:"ktx2",module:"encoder"}),(await q2(e,r))[0]):wAe(e)});var jU={name:"Basis Universal Supercompressed GPU Texture",id:"ktx2-basis-writer",module:"textures",version:$b,extensions:["ktx2"],worker:!0,options:{useSRGB:!1,qualityLevel:10,encodeUASTC:!1,mipmaps:!1}};function ra(e,r){if(!e)throw new Error(r||"assert failed: gltf")}var Qb=!0,AAe=1735152710,MU=12,Vk=8,A9r=1313821514,T9r=5130562,C9r=0,D9r=0,k9r=1;function O9r(e,r=0){return`${String.fromCharCode(e.getUint8(r+0))}${String.fromCharCode(e.getUint8(r+1))}${String.fromCharCode(e.getUint8(r+2))}${String.fromCharCode(e.getUint8(r+3))}`}function TAe(e,r=0,t={}){let n=new DataView(e),{magic:i=AAe}=t,a=n.getUint32(r,!1);return a===i||a===AAe}function CAe(e,r,t=0,n={}){let i=new DataView(r),a=O9r(i,t+0),o=i.getUint32(t+4,Qb),s=i.getUint32(t+8,Qb);switch(Object.assign(e,{header:{byteOffset:t,byteLength:s,hasBinChunk:!1},type:a,version:o,json:{},binChunks:[]}),t+=MU,e.version){case 1:return R9r(e,i,t);case 2:return F9r(e,i,t,n={});default:throw new Error(`Invalid GLB version ${e.version}. Only supports version 1 and 2.`)}}function R9r(e,r,t){Qr(e.header.byteLength>MU+Vk);let n=r.getUint32(t+0,Qb),i=r.getUint32(t+4,Qb);return t+=Vk,Qr(i===C9r),LU(e,r,t,n),t+=n,t+=qU(e,r,t,e.header.byteLength),t}function F9r(e,r,t,n){return Qr(e.header.byteLength>MU+Vk),I9r(e,r,t,n),t+e.header.byteLength}function I9r(e,r,t,n){for(;t+8<=e.header.byteLength;){let i=r.getUint32(t+0,Qb),a=r.getUint32(t+4,Qb);switch(t+=Vk,a){case A9r:LU(e,r,t,i);break;case T9r:qU(e,r,t,i);break;case D9r:n.strict||LU(e,r,t,i);break;case k9r:n.strict||qU(e,r,t,i);break;default:break}t+=$o(i,4)}return t}function LU(e,r,t,n){let i=new Uint8Array(r.buffer,t,n),o=new TextDecoder("utf8").decode(i);return e.json=JSON.parse(o),$o(n,4)}function qU(e,r,t,n){return e.header.hasBinChunk=!0,e.binChunks.push({byteOffset:t,byteLength:n,arrayBuffer:r.buffer}),$o(n,4)}function NU(e,r){if(e.startsWith("data:")||e.startsWith("http:")||e.startsWith("https:"))return e;let n=r.baseUri||r.uri;if(!n)throw new Error(`'baseUri' must be provided to resolve relative url ${e}`);return n.substr(0,n.lastIndexOf("/")+1)+e}function DAe(e,r,t){let n=e.bufferViews[t];ra(n);let i=n.buffer,a=r[i];ra(a);let o=(n.byteOffset||0)+a.byteOffset;return new Uint8Array(a.arrayBuffer,o,n.byteLength)}var GU={};xo(GU,{decode:()=>Q9r,name:()=>J9r});var P9r=1.33,kAe=["SCALAR","VEC2","VEC3","VEC4"],B9r=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],j9r=new Map(B9r),M9r={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},L9r={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q9r={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Kk(e){return kAe[e-1]||kAe[0]}function Zb(e){let r=j9r.get(e.constructor);if(!r)throw new Error("Illegal typed array");return r}function ey(e,r){let t=q9r[e.componentType],n=M9r[e.type],i=L9r[e.componentType],a=e.count*n,o=e.count*n*i;return ra(o>=0&&o<=r.byteLength),{ArrayType:t,length:a,byteLength:o}}function G2(e){let{images:r,bufferViews:t}=e;r=r||[],t=t||[];let n=r.map(o=>o.bufferView);t=t.filter(o=>!n.includes(o));let i=t.reduce((o,s)=>o+s.byteLength,0),a=r.reduce((o,s)=>{let{width:u,height:l}=s.image;return o+u*l},0);return i+Math.ceil(4*a*P9r)}function N9r(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}var _n=class{constructor(r){this.gltf={json:(r==null?void 0:r.json)||N9r(),buffers:(r==null?void 0:r.buffers)||[],images:(r==null?void 0:r.images)||[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(r){return this.json[r]}getExtraData(r){return(this.json.extras||{})[r]}hasExtension(r){let t=this.getUsedExtensions().find(i=>i===r),n=this.getRequiredExtensions().find(i=>i===r);return typeof t=="string"||typeof n=="string"}getExtension(r){let t=this.getUsedExtensions().find(i=>i===r),n=this.json.extensions||{};return t?n[r]:null}getRequiredExtension(r){return this.getRequiredExtensions().find(n=>n===r)?this.getExtension(r):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(r,t){return(r.extensions||{})[t]}getScene(r){return this.getObject("scenes",r)}getNode(r){return this.getObject("nodes",r)}getSkin(r){return this.getObject("skins",r)}getMesh(r){return this.getObject("meshes",r)}getMaterial(r){return this.getObject("materials",r)}getAccessor(r){return this.getObject("accessors",r)}getTexture(r){return this.getObject("textures",r)}getSampler(r){return this.getObject("samplers",r)}getImage(r){return this.getObject("images",r)}getBufferView(r){return this.getObject("bufferViews",r)}getBuffer(r){return this.getObject("buffers",r)}getObject(r,t){if(typeof t=="object")return t;let n=this.json[r]&&this.json[r][t];if(!n)throw new Error(`glTF file error: Could not find ${r}[${t}]`);return n}getTypedArrayForBufferView(r){r=this.getBufferView(r);let t=r.buffer,n=this.gltf.buffers[t];ra(n);let i=(r.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,i,r.byteLength)}getTypedArrayForAccessor(r){r=this.getAccessor(r);let t=this.getBufferView(r.bufferView),i=this.getBuffer(t.buffer).data,{ArrayType:a,length:o}=ey(r,t),s=t.byteOffset+r.byteOffset;return new a(i,s,o)}getTypedArrayForImageData(r){r=this.getAccessor(r);let t=this.getBufferView(r.bufferView),i=this.getBuffer(t.buffer).data,a=t.byteOffset||0;return new Uint8Array(i,a,t.byteLength)}addApplicationData(r,t){return this.json[r]=t,this}addExtraData(r,t){return this.json.extras=this.json.extras||{},this.json.extras[r]=t,this}addObjectExtension(r,t,n){return r.extensions=r.extensions||{},r.extensions[t]=n,this.registerUsedExtension(t),this}setObjectExtension(r,t,n){let i=r.extensions||{};i[t]=n}removeObjectExtension(r,t){let n=(r==null?void 0:r.extensions)||{};if(n[t]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];let i=this.json.extensionsRemoved;i.includes(t)||i.push(t)}delete n[t]}addExtension(r,t={}){return ra(t),this.json.extensions=this.json.extensions||{},this.json.extensions[r]=t,this.registerUsedExtension(r),t}addRequiredExtension(r,t={}){return ra(t),this.addExtension(r,t),this.registerRequiredExtension(r),t}registerUsedExtension(r){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===r)||this.json.extensionsUsed.push(r)}registerRequiredExtension(r){this.registerUsedExtension(r),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===r)||this.json.extensionsRequired.push(r)}removeExtension(r){var t;if((t=this.json.extensions)==null?void 0:t[r]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];let n=this.json.extensionsRemoved;n.includes(r)||n.push(r)}this.json.extensions&&delete this.json.extensions[r],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,r),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,r)}setDefaultScene(r){this.json.scene=r}addScene(r){let{nodeIndices:t}=r;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(r){let{meshIndex:t,matrix:n}=r;this.json.nodes=this.json.nodes||[];let i={mesh:t};return n&&(i.matrix=n),this.json.nodes.push(i),this.json.nodes.length-1}addMesh(r){let{attributes:t,indices:n,material:i,mode:a=4}=r,s={primitives:[{attributes:this._addAttributes(t),mode:a}]};if(n){let u=this._addIndices(n);s.primitives[0].indices=u}return Number.isFinite(i)&&(s.primitives[0].material=i),this.json.meshes=this.json.meshes||[],this.json.meshes.push(s),this.json.meshes.length-1}addPointCloud(r){let n={primitives:[{attributes:this._addAttributes(r),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(n),this.json.meshes.length-1}addImage(r,t){let n=z0(r),i=t||(n==null?void 0:n.mimeType),o={bufferView:this.addBufferView(r),mimeType:i};return this.json.images=this.json.images||[],this.json.images.push(o),this.json.images.length-1}addBufferView(r,t=0,n=this.byteLength){let i=r.byteLength;ra(Number.isFinite(i)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(r);let a={buffer:t,byteOffset:n,byteLength:i};return this.byteLength+=$o(i,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(a),this.json.bufferViews.length-1}addAccessor(r,t){let n={bufferView:r,type:Kk(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}addBinaryBuffer(r,t={size:3}){let n=this.addBufferView(r),i={min:t.min,max:t.max};(!i.min||!i.max)&&(i=this._getAccessorMinMax(r,t.size));let a={size:t.size,componentType:Zb(r),count:Math.round(r.length/t.size),min:i.min,max:i.max};return this.addAccessor(n,Object.assign(a,t))}addTexture(r){let{imageIndex:t}=r,n={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(n),this.json.textures.length-1}addMaterial(r){return this.json.materials=this.json.materials||[],this.json.materials.push(r),this.json.materials.length-1}createBinaryChunk(){var a,o;this.gltf.buffers=[];let r=this.byteLength,t=new ArrayBuffer(r),n=new Uint8Array(t),i=0;for(let s of this.sourceBuffers||[])i=R7(s,n,i);((o=(a=this.json)==null?void 0:a.buffers)==null?void 0:o[0])?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=t,this.sourceBuffers=[t]}_removeStringFromArray(r,t){let n=!0;for(;n;){let i=r.indexOf(t);i>-1?r.splice(i,1):n=!1}}_addAttributes(r={}){let t={};for(let n in r){let i=r[n],a=this._getGltfAttributeName(n),o=this.addBinaryBuffer(i.value,i);t[a]=o}return t}_addIndices(r){return this.addBinaryBuffer(r,{size:1})}_getGltfAttributeName(r){switch(r.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return r}}_getAccessorMinMax(r,t){let n={min:null,max:null};if(r.length<t)return n;n.min=[],n.max=[];let i=r.subarray(0,t);for(let a of i)n.min.push(a),n.max.push(a);for(let a=t;a<r.length;a+=t)for(let o=0;o<t;o++)n.min[0+o]=Math.min(n.min[0+o],r[a+o]),n.max[0+o]=Math.max(n.max[0+o],r[a+o]);return n}};var U9r="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",G9r="B9h9z9tFBBBF8dL9gBB9gLaaaaaFa9gEaaaB9gGaaB9gFaFaEQSBBFBFFGEGEGIILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBNn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBcI9z9iqlBMc/j9JSIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMkRIbaG97FaK978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAnDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAnDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBRnCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBHiCFD9tAiAPD9OD9hD9RHiDQBTFtGmEYIPLdKeOnH8ZAIAQJDBIBHpCFD9tApAPD9OD9hD9RHpAIASJDBIBHyCFD9tAyAPD9OD9hD9RHyDQBTFtGmEYIPLdKeOnH8cDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAnD9uHnDyBjGBAEAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnA8ZA8cDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNiV8ZcpMyS8cQ8df8eb8fHdApAyDQNiV8ZcpMyS8cQ8df8eb8fHiDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/xLGEaK978jUUUUBCAlHE8kUUUUBGXGXAGCI9HQBGXAFC98ZHI9FQBABRGCBRLEXAGAGDBBBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMBBAGCTJRGALCIJHLAI9JQBMMAIAF9PQFAEAFCEZHLCGWHGqCBCTAGl/8MBAEABAICGWJHIAG/8cBBGXAL9FQBAEAEDBIBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMIBMAIAEAG/8cBBSFMABAFC98ZHGT+HUUUBAGAF9PQBAEAFCEZHICEWHLJCBCAALl/8MBAEABAGCEWJHGAL/8cBBAEAIT+HUUUBAGAEAL/8cBBMAECAJ8kUUUUBM+yEGGaO97GXAF9FQBCBRGEXABCTJHEAEDBBBHICBDtHLCUU98D8cFCUU98D8cEHKD9OABDBBBHOAIDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAOAIDQBFGENVcMTtmYi8ZpyHICTD+sFD/6FHND/gFAICTD+rFCTD+sFD/6FHVD/gFD/kFD/lFHI9DB/+g6DYAVAIALD+2FHLAVCUUUU94DtHcD9OD9RD/kFHVAVD/mFAIAID/mFANALANAcD9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHLD/kFCTD+rFAVAND/mFALD/kFCggEDtD9OD9QHVAIAND/mFALD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHIDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAOAKD9OAVAIDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM94FEa8jUUUUBCAlHE8kUUUUBABAFC98ZHIT+JUUUBGXAIAF9PQBAEAFCEZHLCEWHFJCBCAAFl/8MBAEABAICEWJHBAF/8cBBAEALT+JUUUBABAEAF/8cBBMAECAJ8kUUUUBM/hEIGaF97FaL978jUUUUBCTlRGGXAF9FQBCBREEXAGABDBBBHIABCTJHLDBBBHKDQILKOSQfbPden8c8d8e8fHOCTD+sFHNCID+rFDMIBAB9DBBU8/DY9D/zI818/DYANCEDtD9QD/6FD/nFHNAIAKDQBFGENVcMTtmYi8ZpyHICTD+rFCTD+sFD/6FD/mFHKAKD/mFANAICTD+sFD/6FD/mFHVAVD/mFANAOCTD+rFCTD+sFD/6FD/mFHOAOD/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHND/mF9DBBX9LDYHID/kFCggEDtHcD9OAVAND/mFAID/kFCTD+rFD9QHVAOAND/mFAID/kFCTD+rFAKAND/mFAID/kFAcD9OD9QHNDQBFTtGEmYILPdKOenHID8dBAGDBIBDyB+t+J83EBABCNJAID8dFAGDBIBDyF+t+J83EBALAVANDQNVi8ZcMpySQ8c8dfb8e8fHND8dBAGDBIBDyG+t+J83EBABCiJAND8dFAGDBIBDyE+t+J83EBABCAJRBAECIJHEAF9JQBMMM/3FGEaF978jUUUUBCoBlREGXAGCGrAF9sHIC98ZHL9FQBCBRGABRFEXAFAFDBBBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBAFCTJRFAGCIJHGAL9JQBMMGXALAI9PQBAEAICEZHGCGWHFqCBCoBAFl/8MBAEABALCGWJHLAF/8cBBGXAG9FQBAEAEDBIBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMIBMALAEAF/8cBBMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",z9r=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),H9r=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),W9r={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},V9r={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function OAe(e,r,t,n,i,a="NONE"){let o=await K9r();X9r(o,o.exports[V9r[i]],e,r,t,n,o.exports[W9r[a||"NONE"]])}var UU;async function K9r(){return UU||(UU=Y9r()),UU}async function Y9r(){let e=U9r;WebAssembly.validate(z9r)&&(e=G9r,console.log("Warning: meshopt_decoder is using experimental SIMD support"));let r=await WebAssembly.instantiate($9r(e),{});return await r.instance.exports.__wasm_call_ctors(),r.instance}function $9r(e){let r=new Uint8Array(e.length);for(let n=0;n<e.length;++n){let i=e.charCodeAt(n);r[n]=i>96?i-71:i>64?i-65:i>47?i+4:i>46?63:62}let t=0;for(let n=0;n<e.length;++n)r[t++]=r[n]<60?H9r[r[n]]:(r[n]-60)*64+r[++n];return r.buffer.slice(0,t)}function X9r(e,r,t,n,i,a,o){let s=e.exports.sbrk,u=n+3&~3,l=s(u*i),c=s(a.length),f=new Uint8Array(e.exports.memory.buffer);f.set(a,c);let d=r(l,n,i,c,a.length);if(d===0&&o&&o(l,u,i),t.set(f.subarray(l,l+n*i)),s(l-s(0)),d!==0)throw new Error(`Malformed buffer data: ${d}`)}var Yk="EXT_meshopt_compression",J9r=Yk;async function Q9r(e,r){var i,a;let t=new _n(e);if(!((i=r==null?void 0:r.gltf)==null?void 0:i.decompressMeshes)||!((a=r.gltf)==null?void 0:a.loadBuffers))return;let n=[];for(let o of e.json.bufferViews||[])n.push(Z9r(t,o));await Promise.all(n),t.removeExtension(Yk)}async function Z9r(e,r){let t=e.getObjectExtension(r,Yk);if(t){let{byteOffset:n=0,byteLength:i=0,byteStride:a,count:o,mode:s,filter:u="NONE",buffer:l}=t,c=e.gltf.buffers[l],f=new Uint8Array(c.arrayBuffer,c.byteOffset+n,i),d=new Uint8Array(e.gltf.buffers[r.buffer].arrayBuffer,r.byteOffset,r.byteLength);await OAe(d,o,a,f,s,u),e.removeObjectExtension(r,Yk)}}var zU={};xo(zU,{name:()=>eLr,preprocess:()=>rLr});var ry="EXT_texture_webp",eLr=ry;function rLr(e,r){let t=new _n(e);if(!TU("image/webp")){if(t.getRequiredExtensions().includes(ry))throw new Error(`gltf: Required extension ${ry} not supported by browser`);return}let{json:n}=t;for(let i of n.textures||[]){let a=t.getObjectExtension(i,ry);a&&(i.source=a.source),t.removeObjectExtension(i,ry)}t.removeExtension(ry)}var HU={};xo(HU,{name:()=>tLr,preprocess:()=>nLr});var $k="KHR_texture_basisu",tLr=$k;function nLr(e,r){let t=new _n(e),{json:n}=t;for(let i of n.textures||[]){let a=t.getObjectExtension(i,$k);a&&(i.source=a.source,t.removeObjectExtension(i,$k))}t.removeExtension($k)}var VU={};xo(VU,{decode:()=>uLr,encode:()=>lLr,name:()=>oLr,preprocess:()=>sLr});function RAe(e){let r={};for(let t in e){let n=e[t];if(t!=="indices"){let i=WU(n);r[t]=i}}return r}function WU(e){let{buffer:r,size:t,count:n}=iLr(e);return{value:r,size:t,byteOffset:0,count:n,type:Kk(t),componentType:Zb(r)}}function iLr(e){let r=e,t=1,n=0;return e&&e.value&&(r=e.value,t=e.size||1),r&&(ArrayBuffer.isView(r)||(r=aLr(r,Float32Array)),n=r.length/t),{buffer:r,size:t,count:n}}function aLr(e,r,t=!1){return e?Array.isArray(e)?new r(e):t&&!(e instanceof r)?new r(e):e:null}var Rp="KHR_draco_mesh_compression",oLr=Rp;function sLr(e,r,t){let n=new _n(e);for(let i of FAe(n))n.getObjectExtension(i,Rp)}async function uLr(e,r,t){var a;if(!((a=r==null?void 0:r.gltf)==null?void 0:a.decompressMeshes))return;let n=new _n(e),i=[];for(let o of FAe(n))n.getObjectExtension(o,Rp)&&i.push(cLr(n,o,r,t));await Promise.all(i),n.removeExtension(Rp)}function lLr(e,r={}){let t=new _n(e);for(let n of t.json.meshes||[])fLr(n,r),t.addRequiredExtension(Rp)}async function cLr(e,r,t,n){let i=e.getObjectExtension(r,Rp);if(!i)return;let a=e.getTypedArrayForBufferView(i.bufferView),o=A0(a.buffer,a.byteOffset),{parse:s}=n,u=oe({},t);delete u["3d-tiles"];let l=await s(o,Ub,u,n),c=RAe(l.attributes);for(let[f,d]of Object.entries(c))if(f in r.attributes){let p=r.attributes[f],h=e.getAccessor(p);(h==null?void 0:h.min)&&(h==null?void 0:h.max)&&(d.min=h.min,d.max=h.max)}r.attributes=c,l.indices&&(r.indices=WU(l.indices)),e.removeObjectExtension(r,Rp),dLr(r)}function fLr(e,r,t=4,n,i){var c;if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");let a=n.DracoWriter.encodeSync({attributes:e}),o=(c=i==null?void 0:i.parseSync)==null?void 0:c.call(i,{attributes:e}),s=n._addFauxAttributes(o.attributes),u=n.addBufferView(a);return{primitives:[{attributes:s,mode:t,extensions:{[Rp]:{bufferView:u,attributes:s}}}]}}function dLr(e){if(!e.attributes&&Object.keys(e.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*FAe(e){for(let r of e.json.meshes||[])for(let t of r.primitives)yield t}var YU={};xo(YU,{decode:()=>gLr,name:()=>pLr});var ty=$e(Xt());var IAe={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},PAe={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4};var KU="KHR_texture_transform",pLr=KU,Xk=new ty.Vector3,hLr=new ty.Matrix3,mLr=new ty.Matrix3;async function gLr(e,r){var a;if(!new _n(e).hasExtension(KU)||!((a=r.gltf)==null?void 0:a.loadBuffers))return;let i=e.json.materials||[];for(let o=0;o<i.length;o++)vLr(o,e)}function vLr(e,r){var l,c,f;let t=[],n=(l=r.json.materials)==null?void 0:l[e],i=(c=n==null?void 0:n.pbrMetallicRoughness)==null?void 0:c.baseColorTexture;i&&z2(r,e,i,t);let a=n==null?void 0:n.emissiveTexture;a&&z2(r,e,a,t);let o=n==null?void 0:n.normalTexture;o&&z2(r,e,o,t);let s=n==null?void 0:n.occlusionTexture;s&&z2(r,e,s,t);let u=(f=n==null?void 0:n.pbrMetallicRoughness)==null?void 0:f.metallicRoughnessTexture;u&&z2(r,e,u,t)}function z2(e,r,t,n){let i=bLr(t,n);if(!i)return;let a=e.json.meshes||[];for(let o of a)for(let s of o.primitives){let u=s.material;Number.isFinite(u)&&r===u&&yLr(e,s,i)}}function bLr(e,r){var o;let t=(o=e.extensions)==null?void 0:o[KU],{texCoord:n=0}=e,{texCoord:i=n}=t;if(!(r.findIndex(([s,u])=>s===n&&u===i)!==-1)){let s=ELr(t);return n!==i&&(e.texCoord=i),r.push([n,i]),{originalTexCoord:n,texCoord:i,matrix:s}}return null}function yLr(e,r,t){var s,u;let{originalTexCoord:n,texCoord:i,matrix:a}=t,o=r.attributes[`TEXCOORD_${n}`];if(Number.isFinite(o)){let l=(s=e.json.accessors)==null?void 0:s[o];if(l&&l.bufferView){let c=(u=e.json.bufferViews)==null?void 0:u[l.bufferView];if(c){let{arrayBuffer:f,byteOffset:d}=e.buffers[c.buffer],p=(d||0)+(l.byteOffset||0)+(c.byteOffset||0),{ArrayType:h,length:b}=ey(l,c),v=PAe[l.componentType],y=IAe[l.type],w=c.byteStride||v*y,A=new Float32Array(b);for(let C=0;C<l.count;C++){let D=new h(f,p+C*w,2);Xk.set(D[0],D[1],1),Xk.transformByMatrix3(a),A.set([Xk[0],Xk[1]],C*y)}n===i?xLr(l,c,e.buffers,A):_Lr(i,l,r,e,A)}}}}function xLr(e,r,t,n){e.componentType=5126,t.push({arrayBuffer:n.buffer,byteOffset:0,byteLength:n.buffer.byteLength}),r.buffer=t.length-1,r.byteLength=n.buffer.byteLength,r.byteOffset=0,delete r.byteStride}function _Lr(e,r,t,n,i){n.buffers.push({arrayBuffer:i.buffer,byteOffset:0,byteLength:i.buffer.byteLength});let a=n.json.bufferViews;if(!a)return;a.push({buffer:n.buffers.length-1,byteLength:i.buffer.byteLength,byteOffset:0});let o=n.json.accessors;!o||(o.push({bufferView:(a==null?void 0:a.length)-1,byteOffset:0,componentType:5126,count:r.count,type:"VEC2"}),t.attributes[`TEXCOORD_${e}`]=o.length-1)}function ELr(e){let{offset:r=[0,0],rotation:t=0,scale:n=[1,1]}=e,i=new ty.Matrix3().set(1,0,0,0,1,0,r[0],r[1],1),a=hLr.set(Math.cos(t),Math.sin(t),0,-Math.sin(t),Math.cos(t),0,0,0,1),o=mLr.set(n[0],0,0,0,n[1],0,0,0,1);return i.multiplyRight(a).multiplyRight(o)}var $U={};xo($U,{decode:()=>SLr,encode:()=>ALr,name:()=>wLr});var W0="KHR_lights_punctual",wLr=W0;async function SLr(e){let r=new _n(e),{json:t}=r,n=r.getExtension(W0);n&&(r.json.lights=n.lights,r.removeExtension(W0));for(let i of t.nodes||[]){let a=r.getObjectExtension(i,W0);a&&(i.light=a.light),r.removeObjectExtension(i,W0)}}async function ALr(e){let r=new _n(e),{json:t}=r;if(t.lights){let n=r.addExtension(W0);ra(!n.lights),n.lights=t.lights,delete t.lights}if(r.json.lights){for(let n of r.json.lights){let i=n.node;r.addObjectExtension(i,W0,n)}delete r.json.lights}}var XU={};xo(XU,{decode:()=>CLr,encode:()=>DLr,name:()=>TLr});var H2="KHR_materials_unlit",TLr=H2;async function CLr(e){let r=new _n(e),{json:t}=r;for(let n of t.materials||[])n.extensions&&n.extensions.KHR_materials_unlit&&(n.unlit=!0),r.removeObjectExtension(n,H2);r.removeExtension(H2)}function DLr(e){let r=new _n(e),{json:t}=r;if(r.materials)for(let n of t.materials||[])n.unlit&&(delete n.unlit,r.addObjectExtension(n,H2,{}),r.addExtension(H2))}var JU={};xo(JU,{decode:()=>OLr,encode:()=>RLr,name:()=>kLr});var W2="KHR_techniques_webgl",kLr=W2;async function OLr(e){let r=new _n(e),{json:t}=r,n=r.getExtension(W2);if(n){let i=FLr(n,r);for(let a of t.materials||[]){let o=r.getObjectExtension(a,W2);o&&(a.technique=Object.assign({},o,i[o.technique]),a.technique.values=ILr(a.technique,r)),r.removeObjectExtension(a,W2)}r.removeExtension(W2)}}async function RLr(e,r){}function FLr(e,r){let{programs:t=[],shaders:n=[],techniques:i=[]}=e,a=new TextDecoder;return n.forEach(o=>{if(Number.isFinite(o.bufferView))o.code=a.decode(r.getTypedArrayForBufferView(o.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),t.forEach(o=>{o.fragmentShader=n[o.fragmentShader],o.vertexShader=n[o.vertexShader]}),i.forEach(o=>{o.program=t[o.program]}),i}function ILr(e,r){let t=Object.assign({},e.values);return Object.keys(e.uniforms||{}).forEach(n=>{e.uniforms[n].value&&!(n in t)&&(t[n]=e.uniforms[n].value)}),Object.keys(t).forEach(n=>{typeof t[n]=="object"&&t[n].index!==void 0&&(t[n].texture=r.getTexture(t[n].index))}),t}var QU={};xo(QU,{decode:()=>BLr,name:()=>PLr});var BAe="EXT_feature_metadata",PLr=BAe;async function BLr(e,r){let t=new _n(e);jLr(t,r)}function jLr(e,r){var o,s;let t=e.getExtension(BAe);if(!t)return;let n=(o=t.schema)==null?void 0:o.classes,{featureTables:i}=t;if(n&&i)for(let u in n){let l=n[u],c=WLr(i,u);c&&MLr(e,c,l)}let{featureTextures:a}=t;if(n&&a&&((s=r.gltf)==null?void 0:s.loadImages))for(let u in n){let l=n[u],c=VLr(a,u);c&&LLr(e,c,l)}}function MLr(e,r,t){var n;for(let i in t.properties){let a=t.properties[i],o=(n=r==null?void 0:r.properties)==null?void 0:n[i],s=r.count;if(o){let u=qLr(e,a,s,o);o.data=u}}}function LLr(e,r,t){var i;let n=r.class;for(let a in t.properties){let o=(i=r==null?void 0:r.properties)==null?void 0:i[a];if(o){let s=NLr(e,o,n);o.data=s}}}function qLr(e,r,t,n){let i=n.bufferView,a=e.getTypedArrayForBufferView(i);switch(r.type){case"STRING":{let o=n.stringOffsetBufferView,s=e.getTypedArrayForBufferView(o);return KLr(a,s,t)}default:}return a}function NLr(e,r,t){let n=e.gltf.json;if(!n.meshes)return[];let i=[];for(let a of n.meshes)for(let o of a.primitives)ULr(e,t,r,i,o);return i}function ULr(e,r,t,n,i){var C,D,P;let a=e.gltf.json,o=[],s=`TEXCOORD_${t.texture.texCoord}`,u=i.attributes[s],l=e.getBufferView(u),c=e.getTypedArrayForBufferView(l),f=new Float32Array(c.buffer,c.byteOffset,c.length/4),d=t.texture.index,p=(C=a.textures)==null?void 0:C[d],h=p==null?void 0:p.source;if(typeof h!="undefined"){let k=(D=a.images)==null?void 0:D[h],L=k==null?void 0:k.mimeType,I=(P=e.gltf.images)==null?void 0:P[h];if(I)for(let V=0;V<f.length;V+=2){let N=GLr(I,L,f,V,t.channels);o.push(N)}}let b=[];for(let k of o){let L=n.findIndex(I=>I===k);L===-1&&(L=n.push(k)-1),b.push(L)}let v=new Uint32Array(b),y=e.gltf.buffers.push({arrayBuffer:v.buffer,byteOffset:0,byteLength:v.byteLength})-1,w=e.addBufferView(v,y,0),A=e.addAccessor(w,{size:1,componentType:Zb(v),count:v.length});i.attributes[r]=A}function GLr(e,r,t,n,i){let a={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},o=t[n],s=t[n+1],u=1;r&&(r.indexOf("image/jpeg")!==-1||r.indexOf("image/png")!==-1)&&(u=4);let l=HLr(o,s,e,u),c=0;for(let f of i){let d=a[f];c|=zLr(e,l+d.offset)<<d.shift}return c}function zLr(e,r){let t=Kb(e);if(t.data.length<=r)throw new Error(`${t.data.length} <= ${r}`);return t.data[r]}function HLr(e,r,t,n=1){let i=t.width,a=jAe(e)*(i-1),o=Math.round(a),s=t.height,u=jAe(r)*(s-1),l=Math.round(u),c=t.components?t.components:n;return(l*i+o)*c}function jAe(e){return(e%1+1)%1}function WLr(e,r){for(let t in e){let n=e[t];if(n.class===r)return n}return null}function VLr(e,r){for(let t in e){let n=e[t];if(n.class===r)return n}return null}function KLr(e,r,t){let n=[],i=new TextDecoder("utf8"),a=0,o=4;for(let s=0;s<t;s++){let u=r[(s+1)*o]-r[s*o],l=e.subarray(a,u+a),c=i.decode(l);n.push(c),a+=u}return n}var MAe=[GU,zU,HU,VU,$U,XU,JU,YU,QU];function LAe(e,r={},t){var i;let n=MAe.filter(a=>NAe(a.name,r));for(let a of n)(i=a.preprocess)==null||i.call(a,e,r,t)}async function qAe(e,r={},t){var i;let n=MAe.filter(a=>NAe(a.name,r));for(let a of n)await((i=a.decode)==null?void 0:i.call(a,e,r,t))}function NAe(e,r){var i;let t=((i=r==null?void 0:r.gltf)==null?void 0:i.excludeExtensions)||{};return!(e in t&&!t[e])}var ZU="KHR_binary_glTF";function UAe(e){let r=new _n(e),{json:t}=r;for(let n of t.images||[]){let i=r.getObjectExtension(n,ZU);i&&Object.assign(n,i),r.removeObjectExtension(n,ZU)}t.buffers&&t.buffers[0]&&delete t.buffers[0].uri,r.removeExtension(ZU)}var GAe={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},YLr={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"},zAe=class{constructor(){this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}normalize(r,t){this.json=r.json;let n=r.json;switch(n.asset&&n.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${n.asset.version}`);return}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(n),this._convertTopLevelObjectsToArrays(n),UAe(r),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n),this._updateMaterial(n)}_addAsset(r){r.asset=r.asset||{},r.asset.version="2.0",r.asset.generator=r.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(r){for(let t in GAe)this._convertTopLevelObjectToArray(r,t)}_convertTopLevelObjectToArray(r,t){let n=r[t];if(!(!n||Array.isArray(n))){r[t]=[];for(let i in n){let a=n[i];a.id=a.id||i;let o=r[t].length;r[t].push(a),this.idToIndexMap[t][i]=o}}}_convertObjectIdsToArrayIndices(r){for(let t in GAe)this._convertIdsToIndices(r,t);"scene"in r&&(r.scene=this._convertIdToIndex(r.scene,"scene"));for(let t of r.textures)this._convertTextureIds(t);for(let t of r.meshes)this._convertMeshIds(t);for(let t of r.nodes)this._convertNodeIds(t);for(let t of r.scenes)this._convertSceneIds(t)}_convertTextureIds(r){r.source&&(r.source=this._convertIdToIndex(r.source,"image"))}_convertMeshIds(r){for(let t of r.primitives){let{attributes:n,indices:i,material:a}=t;for(let o in n)n[o]=this._convertIdToIndex(n[o],"accessor");i&&(t.indices=this._convertIdToIndex(i,"accessor")),a&&(t.material=this._convertIdToIndex(a,"material"))}}_convertNodeIds(r){r.children&&(r.children=r.children.map(t=>this._convertIdToIndex(t,"node"))),r.meshes&&(r.meshes=r.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(r){r.nodes&&(r.nodes=r.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(r,t){r[t]||(console.warn(`gltf v1: json doesn't contain attribute ${t}`),r[t]=[]);for(let n of r[t])for(let i in n){let a=n[i],o=this._convertIdToIndex(a,i);n[i]=o}}_convertIdToIndex(r,t){let n=YLr[t];if(n in this.idToIndexMap){let i=this.idToIndexMap[n][r];if(!Number.isFinite(i))throw new Error(`gltf v1: failed to resolve ${t} with id ${r}`);return i}return r}_updateObjects(r){for(let t of this.json.buffers)delete t.type}_updateMaterial(r){var t,n,i;for(let a of r.materials){a.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};let o=((t=a.values)==null?void 0:t.tex)||((n=a.values)==null?void 0:n.texture2d_0)||((i=a.values)==null?void 0:i.diffuseTex),s=r.textures.findIndex(u=>u.id===o);s!==-1&&(a.pbrMetallicRoughness.baseColorTexture={index:s})}}};function HAe(e,r={}){return new zAe().normalize(e,r)}async function WAe(e,r,t=0,n,i){var a,o,s;return $Lr(e,r,t,n),HAe(e,{normalize:(a=n==null?void 0:n.gltf)==null?void 0:a.normalize}),LAe(e,n,i),((o=n==null?void 0:n.gltf)==null?void 0:o.loadBuffers)&&e.json.buffers&&await XLr(e,n,i),((s=n==null?void 0:n.gltf)==null?void 0:s.loadImages)&&await JLr(e,n,i),await qAe(e,n,i),e}function $Lr(e,r,t,n){if(n.uri&&(e.baseUri=n.uri),r instanceof ArrayBuffer&&!TAe(r,t,n)&&(r=new TextDecoder().decode(r)),typeof r=="string")e.json=k7(r);else if(r instanceof ArrayBuffer){let o={};t=CAe(o,r,t,n.glb),ra(o.type==="glTF",`Invalid GLB magic string ${o.type}`),e._glb=o,e.json=o.json}else ra(!1,"GLTF: must be ArrayBuffer or string");let i=e.json.buffers||[];if(e.buffers=new Array(i.length).fill(null),e._glb&&e._glb.header.hasBinChunk){let{binChunks:o}=e._glb;e.buffers[0]={arrayBuffer:o[0].arrayBuffer,byteOffset:o[0].byteOffset,byteLength:o[0].byteLength}}let a=e.json.images||[];e.images=new Array(a.length).fill({})}async function XLr(e,r,t){var i,a;let n=e.json.buffers||[];for(let o=0;o<n.length;++o){let s=n[o];if(s.uri){let{fetch:u}=t;ra(u);let l=NU(s.uri,r),c=await((i=t==null?void 0:t.fetch)==null?void 0:i.call(t,l)),f=await((a=c==null?void 0:c.arrayBuffer)==null?void 0:a.call(c));e.buffers[o]={arrayBuffer:f,byteOffset:0,byteLength:f.byteLength},delete s.uri}else e.buffers[o]===null&&(e.buffers[o]={arrayBuffer:new ArrayBuffer(s.byteLength),byteOffset:0,byteLength:s.byteLength})}}async function JLr(e,r,t){let n=QLr(e),i=e.json.images||[],a=[];for(let o of n)a.push(ZLr(e,i[o],o,r,t));return await Promise.all(a)}function QLr(e){let r=new Set,t=e.json.textures||[];for(let n of t)n.source!==void 0&&r.add(n.source);return Array.from(r).sort()}async function ZLr(e,r,t,n,i){let{fetch:a,parse:o}=i,s;if(r.uri&&!r.hasOwnProperty("bufferView")){let l=NU(r.uri,n);s=await(await a(l)).arrayBuffer(),r.bufferView={data:s}}if(Number.isFinite(r.bufferView)){let l=DAe(e.json,e.buffers,r.bufferView);s=A0(l.buffer,l.byteOffset,l.byteLength)}ra(s,"glTF image has no data");let u=await o(s,[Yb,H0],ze(oe({},n),{mimeType:r.mimeType,basis:n.basis||{format:Jb()}}),i);u&&u[0]&&(u={compressed:!0,mipmaps:!1,width:u[0].width,height:u[0].height,data:u[0]}),e.images=e.images||[],e.images[t]=u}var _f={name:"glTF",id:"gltf",module:"gltf",version:Bk,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:eqr,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes",postProcess:"removed in v4"}}};async function eqr(e,r={},t){r=oe(oe({},_f.options),r),r.gltf=oe(oe({},_f.options.gltf),r.gltf);let{byteOffset:n=0}=r;return await WAe({},e,n,r,t)}var rqr=1179937895,tqr=1313821514,nqr=5130562,ac=!0;function VAe(e,r,t=0,n={}){let{magic:i=rqr,version:a=2,json:o={},binary:s}=e,u=t;r&&(r.setUint32(t+0,i,ac),r.setUint32(t+4,a,ac),r.setUint32(t+8,0,ac));let l=t+8;t+=12;let c=t;r&&(r.setUint32(t+0,0,ac),r.setUint32(t+4,tqr,ac)),t+=8;let f=JSON.stringify(o);if(t=hb(r,t,f,4),r){let d=t-c-8;r.setUint32(c+0,d,ac)}if(s){let d=t;if(r&&(r.setUint32(t+0,0,ac),r.setUint32(t+4,nqr,ac)),t+=8,t=lD(r,t,s,4),r){let p=t-d-8;r.setUint32(d+0,p,ac)}}if(r){let d=t-u;r.setUint32(l,d,ac)}return t}function eG(e,r,t,n){return iqr(e),VAe(e,r,t,n)}function iqr(e,{firstBuffer:r=0}={}){if(e.buffers&&e.buffers.length>r)throw new Error("encodeGLTF: multiple buffers not yet implemented")}var rG={name:"glTF",id:"gltf",module:"gltf",version:Bk,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,encodeSync:aqr,options:{gltf:{}}};function aqr(e,r={}){let{byteOffset:t=0}=r,n=eG(e,null,t,r),i=new ArrayBuffer(n),a=new DataView(i);return eG(e,a,t,r),i}var oqr={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},sqr={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ks={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},uqr={magFilter:Ks.TEXTURE_MAG_FILTER,minFilter:Ks.TEXTURE_MIN_FILTER,wrapS:Ks.TEXTURE_WRAP_S,wrapT:Ks.TEXTURE_WRAP_T},lqr={[Ks.TEXTURE_MAG_FILTER]:Ks.LINEAR,[Ks.TEXTURE_MIN_FILTER]:Ks.NEAREST_MIPMAP_LINEAR,[Ks.TEXTURE_WRAP_S]:Ks.REPEAT,[Ks.TEXTURE_WRAP_T]:Ks.REPEAT};function cqr(){return{id:"default-sampler",parameters:lqr}}function fqr(e){return sqr[e]}function dqr(e){return oqr[e]}var KAe=class{constructor(){this.baseUri="";this.buffers=[];this.images=[]}postProcess(r,t={}){let{json:n,buffers:i=[],images:a=[]}=r,{baseUri:o=""}=r;return ra(n),this.baseUri=o,this.buffers=i,this.images=a,this.jsonUnprocessed=n,this.json=this._resolveTree(r.json,t),this.json}_resolveTree(r,t={}){let n=oe({},r);return this.json=n,r.bufferViews&&(n.bufferViews=r.bufferViews.map((i,a)=>this._resolveBufferView(i,a))),r.images&&(n.images=r.images.map((i,a)=>this._resolveImage(i,a))),r.samplers&&(n.samplers=r.samplers.map((i,a)=>this._resolveSampler(i,a))),r.textures&&(n.textures=r.textures.map((i,a)=>this._resolveTexture(i,a))),r.accessors&&(n.accessors=r.accessors.map((i,a)=>this._resolveAccessor(i,a))),r.materials&&(n.materials=r.materials.map((i,a)=>this._resolveMaterial(i,a))),r.meshes&&(n.meshes=r.meshes.map((i,a)=>this._resolveMesh(i,a))),r.nodes&&(n.nodes=r.nodes.map((i,a)=>this._resolveNode(i,a)),n.nodes=n.nodes.map((i,a)=>this._resolveNodeChildren(i))),r.skins&&(n.skins=r.skins.map((i,a)=>this._resolveSkin(i,a))),r.scenes&&(n.scenes=r.scenes.map((i,a)=>this._resolveScene(i,a))),typeof this.json.scene=="number"&&n.scenes&&(n.scene=n.scenes[this.json.scene]),n}getScene(r){return this._get(this.json.scenes,r)}getNode(r){return this._get(this.json.nodes,r)}getSkin(r){return this._get(this.json.skins,r)}getMesh(r){return this._get(this.json.meshes,r)}getMaterial(r){return this._get(this.json.materials,r)}getAccessor(r){return this._get(this.json.accessors,r)}getCamera(r){return this._get(this.json.cameras,r)}getTexture(r){return this._get(this.json.textures,r)}getSampler(r){return this._get(this.json.samplers,r)}getImage(r){return this._get(this.json.images,r)}getBufferView(r){return this._get(this.json.bufferViews,r)}getBuffer(r){return this._get(this.json.buffers,r)}_get(r,t){if(typeof t=="object")return t;let n=r&&r[t];return n||console.warn(`glTF file error: Could not find ${r}[${t}]`),n}_resolveScene(r,t){return ze(oe({},r),{id:r.id||`scene-${t}`,nodes:(r.nodes||[]).map(n=>this.getNode(n))})}_resolveNode(r,t){let n=ze(oe({},r),{id:(r==null?void 0:r.id)||`node-${t}`});return r.mesh!==void 0&&(n.mesh=this.getMesh(r.mesh)),r.camera!==void 0&&(n.camera=this.getCamera(r.camera)),r.skin!==void 0&&(n.skin=this.getSkin(r.skin)),r.meshes!==void 0&&r.meshes.length&&(n.mesh=r.meshes.reduce((i,a)=>{let o=this.getMesh(a);return i.id=o.id,i.primitives=i.primitives.concat(o.primitives),i},{primitives:[]})),n}_resolveNodeChildren(r){return r.children&&(r.children=r.children.map(t=>this.getNode(t))),r}_resolveSkin(r,t){let n=typeof r.inverseBindMatrices=="number"?this.getAccessor(r.inverseBindMatrices):void 0;return ze(oe({},r),{id:r.id||`skin-${t}`,inverseBindMatrices:n})}_resolveMesh(r,t){let n=ze(oe({},r),{id:r.id||`mesh-${t}`,primitives:[]});return r.primitives&&(n.primitives=r.primitives.map(i=>{let a=ze(oe({},i),{attributes:{},indices:void 0,material:void 0}),o=i.attributes;for(let s in o)a.attributes[s]=this.getAccessor(o[s]);return i.indices!==void 0&&(a.indices=this.getAccessor(i.indices)),i.material!==void 0&&(a.material=this.getMaterial(i.material)),a})),n}_resolveMaterial(r,t){let n=ze(oe({},r),{id:r.id||`material-${t}`});if(n.normalTexture&&(n.normalTexture=oe({},n.normalTexture),n.normalTexture.texture=this.getTexture(n.normalTexture.index)),n.occlusionTexture&&(n.occlusionTexture=oe({},n.occlusionTexture),n.occlusionTexture.texture=this.getTexture(n.occlusionTexture.index)),n.emissiveTexture&&(n.emissiveTexture=oe({},n.emissiveTexture),n.emissiveTexture.texture=this.getTexture(n.emissiveTexture.index)),n.emissiveFactor||(n.emissiveFactor=n.emissiveTexture?[1,1,1]:[0,0,0]),n.pbrMetallicRoughness){n.pbrMetallicRoughness=oe({},n.pbrMetallicRoughness);let i=n.pbrMetallicRoughness;i.baseColorTexture&&(i.baseColorTexture=oe({},i.baseColorTexture),i.baseColorTexture.texture=this.getTexture(i.baseColorTexture.index)),i.metallicRoughnessTexture&&(i.metallicRoughnessTexture=oe({},i.metallicRoughnessTexture),i.metallicRoughnessTexture.texture=this.getTexture(i.metallicRoughnessTexture.index))}return n}_resolveAccessor(r,t){let n=fqr(r.componentType),i=dqr(r.type),a=n*i,o=ze(oe({},r),{id:r.id||`accessor-${t}`,bytesPerComponent:n,components:i,bytesPerElement:a,value:void 0,bufferView:void 0,sparse:void 0});if(r.bufferView!==void 0&&(o.bufferView=this.getBufferView(r.bufferView)),o.bufferView){let s=o.bufferView.buffer,{ArrayType:u,byteLength:l}=ey(o,o.bufferView),c=(o.bufferView.byteOffset||0)+(o.byteOffset||0)+s.byteOffset,f=s.arrayBuffer.slice(c,c+l);o.bufferView.byteStride&&(f=this._getValueFromInterleavedBuffer(s,c,o.bufferView.byteStride,o.bytesPerElement,o.count)),o.value=new u(f)}return o}_getValueFromInterleavedBuffer(r,t,n,i,a){let o=new Uint8Array(a*i);for(let s=0;s<a;s++){let u=t+s*n;o.set(new Uint8Array(r.arrayBuffer.slice(u,u+i)),s*i)}return o.buffer}_resolveTexture(r,t){return ze(oe({},r),{id:r.id||`texture-${t}`,sampler:typeof r.sampler=="number"?this.getSampler(r.sampler):cqr(),source:typeof r.source=="number"?this.getImage(r.source):void 0})}_resolveSampler(r,t){let n=ze(oe({id:r.id||`sampler-${t}`},r),{parameters:{}});for(let i in n){let a=this._enumSamplerParameter(i);a!==void 0&&(n.parameters[a]=n[i])}return n}_enumSamplerParameter(r){return uqr[r]}_resolveImage(r,t){let n=ze(oe({},r),{id:r.id||`image-${t}`,image:null,bufferView:r.bufferView!==void 0?this.getBufferView(r.bufferView):void 0}),i=this.images[t];return i&&(n.image=i),n}_resolveBufferView(r,t){let n=r.buffer,i=this.buffers[n].arrayBuffer,a=this.buffers[n].byteOffset||0;return r.byteOffset&&(a+=r.byteOffset),ze(oe({id:`bufferView-${t}`},r),{buffer:this.buffers[n],data:new Uint8Array(i,a,r.byteLength)})}_resolveCamera(r,t){let n=ze(oe({},r),{id:r.id||`camera-${t}`});return n.perspective,n.orthographic,n}};function V2(e,r){return new KAe().postProcess(e,r)}var Jk={URI:0,EMBEDDED:1};function Qk(e,r,t,n){e.rotateYtoZ=!0;let i=(e.byteOffset||0)+(e.byteLength||0)-t;if(i===0)throw new Error("glTF byte length must be greater than 0.");return e.gltfUpAxis=(n==null?void 0:n["3d-tiles"])&&n["3d-tiles"].assetGltfUpAxis?n["3d-tiles"].assetGltfUpAxis:"Y",e.gltfArrayBuffer=A0(r,t,i),e.gltfByteOffset=0,e.gltfByteLength=i,t%4==0||console.warn(`${e.type}: embedded glb is not aligned to a 4-byte boundary.`),(e.byteOffset||0)+(e.byteLength||0)}async function Zk(e,r,t,n){let i=(t==null?void 0:t["3d-tiles"])||{};if(pqr(e,r,t),i.loadGLTF){if(!n)return;let{parse:a,fetch:o}=n;if(e.gltfUrl){let s=await o(e.gltfUrl,t);e.gltfArrayBuffer=await s.arrayBuffer(),e.gltfByteOffset=0}if(e.gltfArrayBuffer){let s=await a(e.gltfArrayBuffer,_f,t,n);e.gltf=V2(s),e.gpuMemoryUsageInBytes=G2(e.gltf),delete e.gltfArrayBuffer,delete e.gltfByteOffset,delete e.gltfByteLength}}}function pqr(e,r,t){switch(r){case Jk.URI:if(e.gltfArrayBuffer){let n=new Uint8Array(e.gltfArrayBuffer,e.gltfByteOffset),a=new TextDecoder().decode(n);e.gltfUrl=a.replace(/[\s\0]+$/,"")}delete e.gltfArrayBuffer,delete e.gltfByteOffset,delete e.gltfByteLength;break;case Jk.EMBEDDED:break;default:throw new Error("b3dm: Illegal glTF format field")}}async function YAe(e,r,t,n,i){var o;t=hqr(e,r,t,n,i),await Zk(e,Jk.EMBEDDED,n,i);let a=(o=e==null?void 0:e.gltf)==null?void 0:o.extensions;return a&&a.CESIUM_RTC&&(e.rtcCenter=a.CESIUM_RTC.center),t}function hqr(e,r,t,n,i){t=Op(e,r,t),t=Wb(e,r,t),t=Vb(e,r,t,n),t=Qk(e,r,t,n);let a=new kp(e.featureTableJson,e.featureTableBinary);return e.rtcCenter=a.getGlobalProperty("RTC_CENTER",nt.FLOAT,3),t}var ns=$e(Xt()),$Ae=$e(Gs());async function XAe(e,r,t,n,i){return t=mqr(e,r,t,n,i),await Zk(e,e.gltfFormat||0,n,i),t}function mqr(e,r,t,n,i){var l;if(t=Op(e,r,t),e.version!==1)throw new Error(`Instanced 3D Model version ${e.version} is not supported`);t=Wb(e,r,t);let a=new DataView(r);if(e.gltfFormat=a.getUint32(t,!0),t+=4,t=Vb(e,r,t,n),t=Qk(e,r,t,n),!((l=e==null?void 0:e.header)==null?void 0:l.featureTableJsonByteLength)||e.header.featureTableJsonByteLength===0)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");let o=new kp(e.featureTableJson,e.featureTableBinary),s=o.getGlobalProperty("INSTANCES_LENGTH");if(o.featuresLength=s,!Number.isFinite(s))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");e.eastNorthUp=o.getGlobalProperty("EAST_NORTH_UP"),e.rtcCenter=o.getGlobalProperty("RTC_CENTER",nt.FLOAT,3);let u=new zb(e.batchTableJson,e.batchTableBinary,s);return gqr(e,o,u,s),t}function gqr(e,r,t,n){let i=new Array(n),a=new ns.Vector3,o=new ns.Vector3,s=new ns.Vector3,u=new ns.Vector3,l=new ns.Matrix3,c=new ns.Quaternion,f=new ns.Vector3,d={},p=new ns.Matrix4,h=[],b=[],v=[],y=[];for(let w=0;w<n;w++){let A;if(r.hasProperty("POSITION"))A=r.getProperty("POSITION",nt.FLOAT,3,w,a);else if(r.hasProperty("POSITION_QUANTIZED")){A=r.getProperty("POSITION_QUANTIZED",nt.UNSIGNED_SHORT,3,w,a);let V=r.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",nt.FLOAT,3);if(!V)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");let N=r.getGlobalProperty("QUANTIZED_VOLUME_SCALE",nt.FLOAT,3);if(!N)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let W=65535;for(let M=0;M<3;M++)A[M]=A[M]/W*N[M]+V[M]}if(!A)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");a.copy(A),d.translation=a,e.normalUp=r.getProperty("NORMAL_UP",nt.FLOAT,3,w,h),e.normalRight=r.getProperty("NORMAL_RIGHT",nt.FLOAT,3,w,b);let C=!1;if(e.normalUp){if(!e.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");e.hasCustomOrientation=!0}else{if(e.octNormalUp=r.getProperty("NORMAL_UP_OCT32P",nt.UNSIGNED_SHORT,2,w,h),e.octNormalRight=r.getProperty("NORMAL_RIGHT_OCT32P",nt.UNSIGNED_SHORT,2,w,b),e.octNormalUp)throw e.octNormalRight?new Error("i3dm: oct-encoded orientation not implemented"):new Error("i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P");e.eastNorthUp?($Ae.Ellipsoid.WGS84.eastNorthUpToFixedFrame(a,p),p.getRotationMatrix3(l)):l.identity()}C&&(u.copy(o).cross(s).normalize(),l.setColumn(0,o),l.setColumn(1,s),l.setColumn(2,u)),c.fromMatrix3(l),d.rotation=c,f.set(1,1,1);let D=r.getProperty("SCALE",nt.FLOAT,1,w,v);Number.isFinite(D)&&f.multiplyByScalar(D);let P=r.getProperty("SCALE_NON_UNIFORM",nt.FLOAT,3,w,h);P&&f.scale(P),d.scale=f;let k=r.getProperty("BATCH_ID",nt.UNSIGNED_SHORT,1,w,y);k===void 0&&(k=w);let L=new ns.Matrix4().fromQuaternion(d.rotation);p.identity(),p.translate(d.translation),p.multiplyRight(L),p.scale(d.scale);let I=p.clone();i[w]={modelMatrix:I,batchId:k}}e.instances=i}async function JAe(e,r,t,n,i,a){t=Op(e,r,t);let o=new DataView(r);for(e.tilesLength=o.getUint32(t,!0),t+=4,e.tiles=[];e.tiles.length<e.tilesLength&&(e.byteLength||0)-t>12;){let s={};e.tiles.push(s),t=await a(r,t,n,i,s)}return t}async function QAe(e,r,t,n){var i;if(e.rotateYtoZ=!0,e.gltfUpAxis=(t==null?void 0:t["3d-tiles"])&&t["3d-tiles"].assetGltfUpAxis?t["3d-tiles"].assetGltfUpAxis:"Y",(i=t==null?void 0:t["3d-tiles"])==null?void 0:i.loadGLTF){if(!n)return;let{parse:a}=n,o=await a(r,_f,t,n);e.gltf=V2(o),e.gpuMemoryUsageInBytes=G2(e.gltf)}else e.gltfArrayBuffer=r}async function tG(e,r=0,t,n,i={}){switch(i.byteOffset=r,i.type=_Se(e,r),i.type){case Ws.COMPOSITE:return await JAe(i,e,r,t,n,tG);case Ws.BATCHED_3D_MODEL:return await YAe(i,e,r,t,n);case Ws.GLTF:return await QAe(i,e,t,n);case Ws.INSTANCED_3D_MODEL:return await XAe(i,e,r,t,n);case Ws.POINT_CLOUD:return await zSe(i,e,r,t,n);default:throw new Error(`3DTileLoader: unknown type ${i.type}`)}}var vqr=1952609651,bqr=1;async function nG(e,r,t){if(new Uint32Array(e.slice(0,4))[0]!==vqr)throw new Error("Wrong subtree file magic number");if(new Uint32Array(e.slice(4,8))[0]!==bqr)throw new Error("Wrong subtree file verson, must be 1");let a=ZAe(e.slice(8,16)),o=new Uint8Array(e,24,a),u=new TextDecoder("utf8").decode(o),l=JSON.parse(u),c=ZAe(e.slice(16,24)),f=new ArrayBuffer(0);if(c&&(f=e.slice(24+a)),await eO(l,l.tileAvailability,f,t),Array.isArray(l.contentAvailability))for(let d of l.contentAvailability)await eO(l,d,f,t);else await eO(l,l.contentAvailability,f,t);return await eO(l,l.childSubtreeAvailability,f,t),l}async function eO(e,r,t,n){let i=Number.isFinite(r.bitstream)?r.bitstream:r.bufferView;if(typeof i!="number")return;let a=e.bufferViews[i],o=e.buffers[a.buffer];if(!(n==null?void 0:n.baseUrl))throw new Error("Url is not provided");if(!n.fetch)throw new Error("fetch is not provided");if(o.uri){let s=`${(n==null?void 0:n.baseUrl)||""}/${o.uri}`,l=await(await n.fetch(s)).arrayBuffer();r.explicitBitstream=new Uint8Array(l,a.byteOffset,a.byteLength);return}r.explicitBitstream=new Uint8Array(t,a.byteOffset,a.byteLength)}function ZAe(e){let r=new DataView(e),t=r.getUint32(0,!0),n=r.getUint32(4,!0);return t+2**32*n}var rO={id:"3d-tiles-subtree",name:"3D Tiles Subtree",module:"3d-tiles",version:Nb,extensions:["subtree"],mimeTypes:["application/octet-stream"],tests:["subtree"],parse:nG,options:{}};function iG(e){if(typeof window!="undefined"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process!="undefined"&&typeof process.versions=="object"&&Boolean(process.versions.electron))return!0;let r=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent,t=e||r;return!!(t&&t.indexOf("Electron")>=0)}function Hu(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||iG()}var yqr=globalThis.self||globalThis.window||globalThis.global,ny=globalThis.window||globalThis.self||globalThis.global,xqr=globalThis.document||{},V0=globalThis.process||{},_qr=globalThis.console,Tkt=globalThis.navigator||{};var tO="4.0.0-alpha.20",kkt=Hu();function Eqr(e){try{let r=window[e],t="__storage_test__";return r.setItem(t,t),r.removeItem(t),r}catch{return null}}var aG=class{constructor(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"sessionStorage";this.storage=void 0,this.id=void 0,this.config=void 0,this.storage=Eqr(n),this.id=r,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(r){if(Object.assign(this.config,r),this.storage){let t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let r={};if(this.storage){let t=this.storage.getItem(this.id);r=t?JSON.parse(t):{}}return Object.assign(this.config,r),this}};function eTe(e){let r;return e<10?r="".concat(e.toFixed(2),"ms"):e<100?r="".concat(e.toFixed(1),"ms"):e<1e3?r="".concat(e.toFixed(0),"ms"):r="".concat((e/1e3).toFixed(2),"s"),r}function rTe(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8,t=Math.max(r-e.length,0);return"".concat(" ".repeat(t)).concat(e)}function nO(e,r,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,i=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>n&&(t=Math.min(t,n/e.width));let a=e.width*t,o=e.height*t,s=["font-size:1px;","padding:".concat(Math.floor(o/2),"px ").concat(Math.floor(a/2),"px;"),"line-height:".concat(o,"px;"),"background:url(".concat(i,");"),"background-size:".concat(a,"px ").concat(o,"px;"),"color:transparent;"].join("");return["".concat(r," %c+"),s]}var iO;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(iO||(iO={}));var wqr=10;function tTe(e){return typeof e!="string"?e:(e=e.toUpperCase(),iO[e]||iO.WHITE)}function nTe(e,r,t){if(!Hu&&typeof e=="string"){if(r){let n=tTe(r);e="[".concat(n,"m").concat(e,"[39m")}if(t){let n=tTe(t);e="[".concat(n+wqr,"m").concat(e,"[49m")}}return e}function iTe(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"],t=Object.getPrototypeOf(e),n=Object.getOwnPropertyNames(t),i=e;for(let a of n){let o=i[a];typeof o=="function"&&(r.find(s=>a===s)||(i[a]=o.bind(e)))}}function iy(e,r){if(!e)throw new Error(r||"Assertion failed")}function K0(){let e;if(Hu()&&ny.performance){var r,t;e=ny===null||ny===void 0||(r=ny.performance)===null||r===void 0||(t=r.now)===null||t===void 0?void 0:t.call(r)}else if("hrtime"in V0){var n;let i=V0===null||V0===void 0||(n=V0.hrtime)===null||n===void 0?void 0:n.call(V0);e=i[0]*1e3+i[1]/1e6}else e=Date.now();return e}var ay={debug:Hu()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Sqr={enabled:!0,level:0};function Ys(){}var aTe={},oTe={once:!0},aO=class{constructor(){let{id:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};this.id=void 0,this.VERSION=tO,this._startTs=K0(),this._deltaTs=K0(),this._storage=void 0,this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=r,this.userData={},this._storage=new aG("__probe-".concat(this.id,"__"),Sqr),this.timeStamp("".concat(this.id," started")),iTe(this),Object.seal(this)}set level(r){this.setLevel(r)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((K0()-this._startTs).toPrecision(10))}getDelta(){return Number((K0()-this._deltaTs).toPrecision(10))}set priority(r){this.level=r}get priority(){return this.level}getPriority(){return this.level}enable(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:r}),this}setLevel(r){return this._storage.setConfiguration({level:r}),this}get(r){return this._storage.config[r]}set(r,t){this._storage.setConfiguration({[r]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(r,t){iy(r,t)}warn(r){return this._getLogFunction(0,r,ay.warn,arguments,oTe)}error(r){return this._getLogFunction(0,r,ay.error,arguments)}deprecated(r,t){return this.warn("`".concat(r,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(r,t){return this.error("`".concat(r,"` has been removed. Use `").concat(t,"` instead"))}probe(r,t){return this._getLogFunction(r,t,ay.log,arguments,{time:!0,once:!0})}log(r,t){return this._getLogFunction(r,t,ay.debug,arguments)}info(r,t){return this._getLogFunction(r,t,console.info,arguments)}once(r,t){return this._getLogFunction(r,t,ay.debug||ay.info,arguments,oTe)}table(r,t,n){return t?this._getLogFunction(r,t,console.table||Ys,n&&[n],{tag:Dqr(t)}):Ys}image(r){let{logLevel:t,priority:n,image:i,message:a="",scale:o=1}=r;return this._shouldLog(t||n)?Hu()?Cqr({image:i,message:a,scale:o}):Tqr({image:i,message:a,scale:o}):Ys}time(r,t){return this._getLogFunction(r,t,console.time?console.time:console.info)}timeEnd(r,t){return this._getLogFunction(r,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(r,t){return this._getLogFunction(r,t,console.timeStamp||Ys)}group(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1},i=uTe({logLevel:r,message:t,opts:n}),{collapsed:a}=n;return i.method=(a?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(r,t,Object.assign({},n,{collapsed:!0}))}groupEnd(r){return this._getLogFunction(r,"",console.groupEnd||Ys)}withGroup(r,t,n){this.group(r,t)();try{n()}finally{this.groupEnd(r)()}}trace(){console.trace&&console.trace()}_shouldLog(r){return this.isEnabled()&&this.getLevel()>=sTe(r)}_getLogFunction(r,t,n,i,a){if(this._shouldLog(r)){a=uTe({logLevel:r,message:t,args:i,opts:a}),n=n||a.method,iy(n),a.total=this.getTotal(),a.delta=this.getDelta(),this._deltaTs=K0();let o=a.tag||a.message;if(a.once&&o)if(!aTe[o])aTe[o]=K0();else return Ys;return t=Aqr(this.id,a.message,a),n.bind(console,t,...a.args)}return Ys}};aO.VERSION=tO;function sTe(e){if(!e)return 0;let r;switch(typeof e){case"number":r=e;break;case"object":r=e.logLevel||e.priority||0;break;default:return 0}return iy(Number.isFinite(r)&&r>=0),r}function uTe(e){let{logLevel:r,message:t}=e;e.logLevel=sTe(r);let n=e.args?Array.from(e.args):[];for(;n.length&&n.shift()!==t;);switch(typeof r){case"string":case"function":t!==void 0&&n.unshift(t),e.message=r;break;case"object":Object.assign(e,r);break;default:}typeof e.message=="function"&&(e.message=e.message());let i=typeof e.message;return iy(i==="string"||i==="object"),Object.assign(e,{args:n},e.opts)}function Aqr(e,r,t){if(typeof r=="string"){let n=t.time?rTe(eTe(t.total)):"";r=t.time?"".concat(e,": ").concat(n," ").concat(r):"".concat(e,": ").concat(r),r=nTe(r,t.color,t.background)}return r}function Tqr(e){let{image:r,message:t="",scale:n=1}=e;return console.warn("removed"),Ys}function Cqr(e){let{image:r,message:t="",scale:n=1}=e;if(typeof r=="string"){let a=new Image;return a.onload=()=>{let o=nO(a,t,n);console.log(...o)},a.src=r,Ys}let i=r.nodeName||"";if(i.toLowerCase()==="img")return console.log(...nO(r,t,n)),Ys;if(i.toLowerCase()==="canvas"){let a=new Image;return a.onload=()=>console.log(...nO(a,t,n)),a.src=r.toDataURL(),Ys}return Ys}function Dqr(e){for(let r in e)for(let t in e[r])return t||"untitled";return"empty"}var oG=new aO({id:"@probe.gl/log"});var $s=null;try{$s=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function In(e,r,t){this.low=e|0,this.high=r|0,this.unsigned=!!t}In.prototype.__isLong__;Object.defineProperty(In.prototype,"__isLong__",{value:!0});function Za(e){return(e&&e.__isLong__)===!0}function lTe(e){var r=Math.clz32(e&-e);return e?31-r:r}In.isLong=Za;var cTe={},fTe={};function Y0(e,r){var t,n,i;return r?(e>>>=0,(i=0<=e&&e<256)&&(n=fTe[e],n)?n:(t=Jt(e,0,!0),i&&(fTe[e]=t),t)):(e|=0,(i=-128<=e&&e<128)&&(n=cTe[e],n)?n:(t=Jt(e,e<0?-1:0,!1),i&&(cTe[e]=t),t))}In.fromInt=Y0;function Xs(e,r){if(isNaN(e))return r?Ef:Vu;if(r){if(e<0)return Ef;if(e>=pTe)return bTe}else{if(e<=-hTe)return Mo;if(e+1>=hTe)return vTe}return e<0?Xs(-e,r).neg():Jt(e%oy|0,e/oy|0,r)}In.fromNumber=Xs;function Jt(e,r,t){return new In(e,r,t)}In.fromBits=Jt;var oO=Math.pow;function sG(e,r,t){if(e.length===0)throw Error("empty string");if(typeof r=="number"?(t=r,r=!1):r=!!r,e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return r?Ef:Vu;if(t=t||10,t<2||36<t)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(n===0)return sG(e.substring(1),r,t).neg();for(var i=Xs(oO(t,8)),a=Vu,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),u=parseInt(e.substring(o,o+s),t);if(s<8){var l=Xs(oO(t,s));a=a.mul(l).add(Xs(u))}else a=a.mul(i),a=a.add(Xs(u))}return a.unsigned=r,a}In.fromString=sG;function Wu(e,r){return typeof e=="number"?Xs(e,r):typeof e=="string"?sG(e,r):Jt(e.low,e.high,typeof r=="boolean"?r:e.unsigned)}In.fromValue=Wu;var dTe=1<<16,kqr=1<<24,oy=dTe*dTe,pTe=oy*oy,hTe=pTe/2,mTe=Y0(kqr),Vu=Y0(0);In.ZERO=Vu;var Ef=Y0(0,!0);In.UZERO=Ef;var sy=Y0(1);In.ONE=sy;var gTe=Y0(1,!0);In.UONE=gTe;var uG=Y0(-1);In.NEG_ONE=uG;var vTe=Jt(4294967295|0,2147483647|0,!1);In.MAX_VALUE=vTe;var bTe=Jt(4294967295|0,4294967295|0,!0);In.MAX_UNSIGNED_VALUE=bTe;var Mo=Jt(0,2147483648|0,!1);In.MIN_VALUE=Mo;var We=In.prototype;We.toInt=function(){return this.unsigned?this.low>>>0:this.low};We.toNumber=function(){return this.unsigned?(this.high>>>0)*oy+(this.low>>>0):this.high*oy+(this.low>>>0)};We.toString=function(r){if(r=r||10,r<2||36<r)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(Mo)){var t=Xs(r),n=this.div(t),i=n.mul(t).sub(this);return n.toString(r)+i.toInt().toString(r)}else return"-"+this.neg().toString(r);for(var a=Xs(oO(r,6),this.unsigned),o=this,s="";;){var u=o.div(a),l=o.sub(u.mul(a)).toInt()>>>0,c=l.toString(r);if(o=u,o.isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}};We.getHighBits=function(){return this.high};We.getHighBitsUnsigned=function(){return this.high>>>0};We.getLowBits=function(){return this.low};We.getLowBitsUnsigned=function(){return this.low>>>0};We.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Mo)?64:this.neg().getNumBitsAbs();for(var r=this.high!=0?this.high:this.low,t=31;t>0&&(r&1<<t)==0;t--);return this.high!=0?t+33:t+1};We.isZero=function(){return this.high===0&&this.low===0};We.eqz=We.isZero;We.isNegative=function(){return!this.unsigned&&this.high<0};We.isPositive=function(){return this.unsigned||this.high>=0};We.isOdd=function(){return(this.low&1)==1};We.isEven=function(){return(this.low&1)==0};We.equals=function(r){return Za(r)||(r=Wu(r)),this.unsigned!==r.unsigned&&this.high>>>31==1&&r.high>>>31==1?!1:this.high===r.high&&this.low===r.low};We.eq=We.equals;We.notEquals=function(r){return!this.eq(r)};We.neq=We.notEquals;We.ne=We.notEquals;We.lessThan=function(r){return this.comp(r)<0};We.lt=We.lessThan;We.lessThanOrEqual=function(r){return this.comp(r)<=0};We.lte=We.lessThanOrEqual;We.le=We.lessThanOrEqual;We.greaterThan=function(r){return this.comp(r)>0};We.gt=We.greaterThan;We.greaterThanOrEqual=function(r){return this.comp(r)>=0};We.gte=We.greaterThanOrEqual;We.ge=We.greaterThanOrEqual;We.compare=function(r){if(Za(r)||(r=Wu(r)),this.eq(r))return 0;var t=this.isNegative(),n=r.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?r.high>>>0>this.high>>>0||r.high===this.high&&r.low>>>0>this.low>>>0?-1:1:this.sub(r).isNegative()?-1:1};We.comp=We.compare;We.negate=function(){return!this.unsigned&&this.eq(Mo)?Mo:this.not().add(sy)};We.neg=We.negate;We.add=function(r){Za(r)||(r=Wu(r));var t=this.high>>>16,n=this.high&65535,i=this.low>>>16,a=this.low&65535,o=r.high>>>16,s=r.high&65535,u=r.low>>>16,l=r.low&65535,c=0,f=0,d=0,p=0;return p+=a+l,d+=p>>>16,p&=65535,d+=i+u,f+=d>>>16,d&=65535,f+=n+s,c+=f>>>16,f&=65535,c+=t+o,c&=65535,Jt(d<<16|p,c<<16|f,this.unsigned)};We.subtract=function(r){return Za(r)||(r=Wu(r)),this.add(r.neg())};We.sub=We.subtract;We.multiply=function(r){if(this.isZero())return this;if(Za(r)||(r=Wu(r)),$s){var t=$s.mul(this.low,this.high,r.low,r.high);return Jt(t,$s.get_high(),this.unsigned)}if(r.isZero())return this.unsigned?Ef:Vu;if(this.eq(Mo))return r.isOdd()?Mo:Vu;if(r.eq(Mo))return this.isOdd()?Mo:Vu;if(this.isNegative())return r.isNegative()?this.neg().mul(r.neg()):this.neg().mul(r).neg();if(r.isNegative())return this.mul(r.neg()).neg();if(this.lt(mTe)&&r.lt(mTe))return Xs(this.toNumber()*r.toNumber(),this.unsigned);var n=this.high>>>16,i=this.high&65535,a=this.low>>>16,o=this.low&65535,s=r.high>>>16,u=r.high&65535,l=r.low>>>16,c=r.low&65535,f=0,d=0,p=0,h=0;return h+=o*c,p+=h>>>16,h&=65535,p+=a*c,d+=p>>>16,p&=65535,p+=o*l,d+=p>>>16,p&=65535,d+=i*c,f+=d>>>16,d&=65535,d+=a*l,f+=d>>>16,d&=65535,d+=o*u,f+=d>>>16,d&=65535,f+=n*c+i*l+a*u+o*s,f&=65535,Jt(p<<16|h,f<<16|d,this.unsigned)};We.mul=We.multiply;We.divide=function(r){if(Za(r)||(r=Wu(r)),r.isZero())throw Error("division by zero");if($s){if(!this.unsigned&&this.high===-2147483648&&r.low===-1&&r.high===-1)return this;var t=(this.unsigned?$s.div_u:$s.div_s)(this.low,this.high,r.low,r.high);return Jt(t,$s.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Ef:Vu;var n,i,a;if(this.unsigned){if(r.unsigned||(r=r.toUnsigned()),r.gt(this))return Ef;if(r.gt(this.shru(1)))return gTe;a=Ef}else{if(this.eq(Mo)){if(r.eq(sy)||r.eq(uG))return Mo;if(r.eq(Mo))return sy;var o=this.shr(1);return n=o.div(r).shl(1),n.eq(Vu)?r.isNegative()?sy:uG:(i=this.sub(r.mul(n)),a=n.add(i.div(r)),a)}else if(r.eq(Mo))return this.unsigned?Ef:Vu;if(this.isNegative())return r.isNegative()?this.neg().div(r.neg()):this.neg().div(r).neg();if(r.isNegative())return this.div(r.neg()).neg();a=Vu}for(i=this;i.gte(r);){n=Math.max(1,Math.floor(i.toNumber()/r.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),u=s<=48?1:oO(2,s-48),l=Xs(n),c=l.mul(r);c.isNegative()||c.gt(i);)n-=u,l=Xs(n,this.unsigned),c=l.mul(r);l.isZero()&&(l=sy),a=a.add(l),i=i.sub(c)}return a};We.div=We.divide;We.modulo=function(r){if(Za(r)||(r=Wu(r)),$s){var t=(this.unsigned?$s.rem_u:$s.rem_s)(this.low,this.high,r.low,r.high);return Jt(t,$s.get_high(),this.unsigned)}return this.sub(this.div(r).mul(r))};We.mod=We.modulo;We.rem=We.modulo;We.not=function(){return Jt(~this.low,~this.high,this.unsigned)};We.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};We.clz=We.countLeadingZeros;We.countTrailingZeros=function(){return this.low?lTe(this.low):lTe(this.high)+32};We.ctz=We.countTrailingZeros;We.and=function(r){return Za(r)||(r=Wu(r)),Jt(this.low&r.low,this.high&r.high,this.unsigned)};We.or=function(r){return Za(r)||(r=Wu(r)),Jt(this.low|r.low,this.high|r.high,this.unsigned)};We.xor=function(r){return Za(r)||(r=Wu(r)),Jt(this.low^r.low,this.high^r.high,this.unsigned)};We.shiftLeft=function(r){return Za(r)&&(r=r.toInt()),(r&=63)==0?this:r<32?Jt(this.low<<r,this.high<<r|this.low>>>32-r,this.unsigned):Jt(0,this.low<<r-32,this.unsigned)};We.shl=We.shiftLeft;We.shiftRight=function(r){return Za(r)&&(r=r.toInt()),(r&=63)==0?this:r<32?Jt(this.low>>>r|this.high<<32-r,this.high>>r,this.unsigned):Jt(this.high>>r-32,this.high>=0?0:-1,this.unsigned)};We.shr=We.shiftRight;We.shiftRightUnsigned=function(r){return Za(r)&&(r=r.toInt()),(r&=63)==0?this:r<32?Jt(this.low>>>r|this.high<<32-r,this.high>>>r,this.unsigned):r===32?Jt(this.high,0,this.unsigned):Jt(this.high>>>r-32,0,this.unsigned)};We.shru=We.shiftRightUnsigned;We.shr_u=We.shiftRightUnsigned;We.rotateLeft=function(r){var t;return Za(r)&&(r=r.toInt()),(r&=63)==0?this:r===32?Jt(this.high,this.low,this.unsigned):r<32?(t=32-r,Jt(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned)):(r-=32,t=32-r,Jt(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned))};We.rotl=We.rotateLeft;We.rotateRight=function(r){var t;return Za(r)&&(r=r.toInt()),(r&=63)==0?this:r===32?Jt(this.high,this.low,this.unsigned):r<32?(t=32-r,Jt(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned)):(r-=32,t=32-r,Jt(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned))};We.rotr=We.rotateRight;We.toSigned=function(){return this.unsigned?Jt(this.low,this.high,!1):this};We.toUnsigned=function(){return this.unsigned?this:Jt(this.low,this.high,!0)};We.toBytes=function(r){return r?this.toBytesLE():this.toBytesBE()};We.toBytesLE=function(){var r=this.high,t=this.low;return[t&255,t>>>8&255,t>>>16&255,t>>>24,r&255,r>>>8&255,r>>>16&255,r>>>24]};We.toBytesBE=function(){var r=this.high,t=this.low;return[r>>>24,r>>>16&255,r>>>8&255,r&255,t>>>24,t>>>16&255,t>>>8&255,t&255]};In.fromBytes=function(r,t,n){return n?In.fromBytesLE(r,t):In.fromBytesBE(r,t)};In.fromBytesLE=function(r,t){return new In(r[0]|r[1]<<8|r[2]<<16|r[3]<<24,r[4]|r[5]<<8|r[6]<<16|r[7]<<24,t)};In.fromBytesBE=function(r,t){return new In(r[4]<<24|r[5]<<16|r[6]<<8|r[7],r[0]<<24|r[1]<<16|r[2]<<8|r[3],t)};var uy=In;var Oqr=16;function K2(e){e==="X"&&(e="");let r=e.padEnd(Oqr,"0");return uy.fromString(r,!0,16)}function lG(e){if(e.isZero())return"X";let r=e.countTrailingZeros(),t=r%4;r=(r-t)/4;let n=r;r*=4;let a=e.shiftRightUnsigned(r).toString(16).replace(/0+$/,"");return Array(17-n-a.length).join("0")+a}function cG(e,r){let t=Rqr(e).shiftRightUnsigned(2);return e.add(uy.fromNumber(2*r+1-4).multiply(t))}function Rqr(e){return e.and(e.not().add(1))}var Fqr=3,Iqr=30,Pqr=2*Iqr+1,yTe=180/Math.PI;function xTe(e){if(e.length===0)throw new Error(`Invalid Hilbert quad key ${e}`);let r=e.split("/"),t=parseInt(r[0],10),n=r[1],i=n.length,a=0,o=[0,0];for(let s=i-1;s>=0;s--){a=i-s;let u=n[s],l=0,c=0;u==="1"?c=1:u==="2"?(l=1,c=1):u==="3"&&(l=1);let f=Math.pow(2,a-1);Bqr(f,o,l,c),o[0]+=f*l,o[1]+=f*c}if(t%2==1){let s=o[0];o[0]=o[1],o[1]=s}return{face:t,ij:o,level:a}}function _Te(e){if(e.isZero())return"";let r=e.toString(2);for(;r.length<Fqr+Pqr;)r="0"+r;let t=r.lastIndexOf("1"),n=r.substring(0,3),i=r.substring(3,t),a=i.length/2,o=uy.fromString(n,!0,2).toString(10),s="";if(a!==0)for(s=uy.fromString(i,!0,2).toString(4);s.length<a;)s="0"+s;return`${o}/${s}`}function fG(e,r,t){let n=1<<r;return[(e[0]+t[0])/n,(e[1]+t[1])/n]}function ETe(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function dG(e){return[ETe(e[0]),ETe(e[1])]}function pG(e,[r,t]){switch(e){case 0:return[1,r,t];case 1:return[-r,1,t];case 2:return[-r,-t,1];case 3:return[-1,-t,-r];case 4:return[t,-1,-r];case 5:return[t,r,-1];default:throw new Error("Invalid face")}}function hG([e,r,t]){let n=Math.atan2(t,Math.sqrt(e*e+r*r));return[Math.atan2(r,e)*yTe,n*yTe]}function Bqr(e,r,t,n){if(n===0){t===1&&(r[0]=e-1-r[0],r[1]=e-1-r[1]);let i=r[0];r[0]=r[1],r[1]=i}}function wTe(e){let r=fG(e.ij,e.level,[.5,.5]),t=dG(r),n=pG(e.face,t);return hG(n)}var jqr=100;function mG(e){let{face:r,ij:t,level:n}=e,i=[[0,0],[0,1],[1,1],[1,0],[0,0]],a=Math.max(1,Math.ceil(jqr*Math.pow(2,-n))),o=new Float64Array(4*a*2+2),s=0,u=0;for(let l=0;l<4;l++){let c=i[l].slice(0),f=i[l+1],d=(f[0]-c[0])/a,p=(f[1]-c[1])/a;for(let h=0;h<a;h++){c[0]+=d,c[1]+=p;let b=fG(t,n,c),v=dG(b),y=pG(r,v),w=hG(y);Math.abs(w[1])>89.999&&(w[0]=u);let A=w[0]-u;w[0]+=A>180?-360:A<-180?360:0,o[s++]=w[0],o[s++]=w[1],u=w[0]}}return o[s++]=o[0],o[s++]=o[1],o}function ly(e){let r=Mqr(e);return xTe(r)}function Mqr(e){if(e.indexOf("/")>0)return e;let r=K2(e);return _Te(r)}function gG(e){let r=ly(e);return wTe(r)}function STe(e){let r;if(e.face===2||e.face===5){let t=null,n=0;for(let i=0;i<4;i++){let a=`${e.face}/${i}`,o=ly(a),s=mG(o);(typeof t=="undefined"||t===null)&&(t=new Float64Array(4*s.length)),t.set(s,n),n+=s.length}r=ATe(t)}else{let t=mG(e);r=ATe(t)}return r}function ATe(e){if(e.length%2!=0)throw new Error("Invalid corners");let r=[],t=[];for(let n=0;n<e.length;n+=2)r.push(e[n]),t.push(e[n+1]);return r.sort((n,i)=>n-i),t.sort((n,i)=>n-i),{west:r[0],east:r[r.length-1],north:t[t.length-1],south:t[0]}}var wf=$e(Xt());function vG(e,r){let t=(r==null?void 0:r.minimumHeight)||0,n=(r==null?void 0:r.maximumHeight)||0,i=ly(e),a=STe(i),o=a.west,s=a.south,u=a.east,l=a.north,c=[];return c.push(new wf.Vector3(o,l,t)),c.push(new wf.Vector3(u,l,t)),c.push(new wf.Vector3(u,s,t)),c.push(new wf.Vector3(o,s,t)),c.push(new wf.Vector3(o,l,n)),c.push(new wf.Vector3(u,l,n)),c.push(new wf.Vector3(u,s,n)),c.push(new wf.Vector3(o,s,n)),c}var TTe=$e(Xt()),CTe=$e(U0());var DTe=$e(Gs());function sO(e){let r=e.token,t={minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight},n=vG(r,t),i=gG(r),a=i[0],o=i[1],s=DTe.Ellipsoid.WGS84.cartographicToCartesian([a,o,t.maximumHeight]),u=new TTe.Vector3(s[0],s[1],s[2]);n.push(u);let l=(0,CTe.makeOrientedBoundingBoxFromPoints)(n);return[...l.center,...l.halfAxes]}var Lqr=4,qqr=8,Nqr={QUADTREE:Lqr,OCTREE:qqr};function Uqr(e,r,t){if(e==null?void 0:e.box){let n=K2(e.s2VolumeInfo.token),i=cG(n,r),a=lG(i),o=oe({},e.s2VolumeInfo);switch(o.token=a,t){case"OCTREE":let l=e.s2VolumeInfo,c=l.maximumHeight-l.minimumHeight,f=c/2,d=l.minimumHeight+c/2;l.minimumHeight=d-f,l.maximumHeight=d+f;break;default:break}return{box:sO(o),s2VolumeInfo:o}}}async function bG(e){let{implicitOptions:r,parentData:t={mortonIndex:0,x:0,y:0,z:0},childIndex:n=0,globalData:i={level:0,mortonIndex:0,x:0,y:0,z:0},s2VolumeBox:a,loaderOptions:o}=e,{subtree:s,level:u=0}=e,{subdivisionScheme:l,subtreeLevels:c,maximumLevel:f,contentUrlTemplate:d,subtreesUriTemplate:p,basePath:h}=r,b={children:[],lodMetricValue:0,contentUrl:""};if(!f)return oG.once(`Missing 'maximumLevel' or 'availableLevels' property. The subtree ${d} won't be loaded...`),b;let v=u+i.level;if(v>f)return b;let y=Nqr[l],w=Math.log2(y),A=n&1,C=n>>1&1,D=n>>2&1,P=(y**u-1)/(y-1),k=$0(t.mortonIndex,n,w),L=P+k,I=$0(t.x,A,1),V=$0(t.y,C,1),N=$0(t.z,D,1),W=!1;u>=c&&(W=yG(s.childSubtreeAvailability,k));let M=$0(i.x,I,u*w),H=$0(i.y,V,u*w),X=$0(i.z,N,u*w);if(W){let me=`${h}/${p}`,Me=uO(me,v,M,H,X);s=await un(Me,rO,o),i.mortonIndex=k,i.x=I,i.y=V,i.z=N,i.level=u,k=0,L=0,I=0,V=0,N=0,u=0}if(!yG(s.tileAvailability,L))return b;yG(s.contentAvailability,L)&&(b.contentUrl=uO(d,v,M,H,X));let se=u+1,ce={mortonIndex:k,x:I,y:V,z:N};for(let me=0;me<y;me++){let Me=Uqr(a,me,l),Ie=await bG({subtree:s,implicitOptions:r,loaderOptions:o,parentData:ce,childIndex:me,level:se,globalData:oe({},i),s2VolumeBox:Me});if(Ie.contentUrl||Ie.children.length){let Ue=v+1,De=Gqr(Ie,Ue,{childTileX:I,childTileY:V,childTileZ:N},r,a);b.children.push(De)}}return b}function yG(e,r){let t;return Array.isArray(e)?(t=e[0],e.length>1&&oG.once('Not supported extension "3DTILES_multiple_contents" has been detected')):t=e,"constant"in t?Boolean(t.constant):t.explicitBitstream?Wqr(r,t.explicitBitstream):!1}function Gqr(e,r,t,n,i){let{basePath:a,refine:o,getRefine:s,lodMetricType:u,getTileType:l,rootLodMetricValue:c,rootBoundingVolume:f}=n,d=e.contentUrl&&e.contentUrl.replace(`${a}/`,""),p=c/2**r,h=(i==null?void 0:i.box)?{box:i.box}:f,b=zqr(r,h,t);return{children:e.children,contentUrl:e.contentUrl,content:{uri:d},id:e.contentUrl,refine:s(o),type:l(e),lodMetricType:u,lodMetricValue:p,geometricError:p,transform:e.transform,boundingVolume:b}}function zqr(e,r,t){if(r.region){let{childTileX:n,childTileY:i,childTileZ:a}=t,[o,s,u,l,c,f]=r.region,d=2**e,p=(u-o)/d,h=(l-s)/d,b=(f-c)/d,[v,y]=[o+p*n,o+p*(n+1)],[w,A]=[s+h*i,s+h*(i+1)],[C,D]=[c+b*a,c+b*(a+1)];return{region:[v,w,y,A,C,D]}}if(r.box)return r;throw new Error(`Unsupported bounding volume type ${r}`)}function $0(e,r,t){return(e<<t)+r}function uO(e,r,t,n,i){let a=Hqr({level:r,x:t,y:n,z:i});return e.replace(/{level}|{x}|{y}|{z}/gi,o=>a[o])}function Hqr(e){let r={};for(let t in e)r[`{${t}}`]=e[t];return r}function Wqr(e,r){let t=Math.floor(e/8),n=e%8;return(r[t]>>n&1)===1}function xG(e,r=""){if(!r)return rc.EMPTY;let n=r.split("?")[0].split(".").pop();switch(n){case"pnts":return rc.POINTCLOUD;case"i3dm":case"b3dm":case"glb":case"gltf":return rc.SCENEGRAPH;default:return n||rc.EMPTY}}function _G(e){switch(e){case"REPLACE":case"replace":return Tp.REPLACE;case"ADD":case"add":return Tp.ADD;default:return e}}function EG(e="",r){if(/^[a-z][0-9a-z+.-]*:/i.test(r)){let n=new URL(e,`${r}/`);return decodeURI(n.toString())}else if(e.startsWith("/"))return e;return`${r}/${e}`}function kTe(e,r){var i;if(!e)return null;let t;if(e.content){let a=e.content.uri||((i=e.content)==null?void 0:i.url);t=EG(a,r)}return ze(oe({},e),{id:t,contentUrl:t,lodMetricType:yf.GEOMETRIC_ERROR,lodMetricValue:e.geometricError,transformMatrix:e.transform,type:xG(e,t),refine:_G(e.refine)})}async function OTe(e,r,t){let n=null,i=FTe(e.root);i&&e.root?n=await RTe(e.root,e,r,i,t):n=kTe(e.root,r);let a=[];for(a.push(n);a.length>0;){let o=a.pop()||{},s=o.children||[],u=[];for(let l of s){let c=FTe(l),f;c?f=await RTe(l,e,r,c,t):f=kTe(l,r),f&&(u.push(f),a.push(f))}o.children=u}return n}async function RTe(e,r,t,n,i){var A,C,D;let{subdivisionScheme:a,maximumLevel:o,availableLevels:s,subtreeLevels:u,subtrees:{uri:l}}=n,c=uO(l,0,0,0,0),f=EG(c,t),d=await un(f,rO,i),p=EG((A=e.content)==null?void 0:A.uri,t),h=(C=r==null?void 0:r.root)==null?void 0:C.refine,b=e.geometricError,v=(D=e.boundingVolume.extensions)==null?void 0:D["3DTILES_bounding_volume_S2"];if(v){let k={box:sO(v),s2VolumeInfo:v};e.boundingVolume=k}let y=e.boundingVolume,w={contentUrlTemplate:p,subtreesUriTemplate:l,subdivisionScheme:a,subtreeLevels:u,maximumLevel:Number.isFinite(s)?s-1:o,refine:h,basePath:t,lodMetricType:yf.GEOMETRIC_ERROR,rootLodMetricValue:b,rootBoundingVolume:y,getTileType:xG,getRefine:_G};return await Vqr(e,t,d,w,i)}async function Vqr(e,r,t,n,i){if(!e)return null;let{children:a,contentUrl:o}=await bG({subtree:t,implicitOptions:n,loaderOptions:i}),s,u=null;return o&&(s=o,u={uri:o.replace(`${r}/`,"")}),ze(oe({},e),{id:s,contentUrl:s,lodMetricType:yf.GEOMETRIC_ERROR,lodMetricValue:e.geometricError,transformMatrix:e.transform,type:xG(e,s),refine:_G(e.refine),content:u||e.content,children:a})}function FTe(e){var r;return((r=e==null?void 0:e.extensions)==null?void 0:r["3DTILES_implicit_tiling"])||(e==null?void 0:e.implicitTiling)}var Sf={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:Nb,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:Kqr,options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};async function Kqr(e,r={},t){let n=r["3d-tiles"]||{},i;return n.isTileset==="auto"?i=(t==null?void 0:t.url)&&t.url.indexOf(".json")!==-1:i=n.isTileset,i?Yqr(e,r,t):$qr(e,r,t)}async function Yqr(e,r,t){var u;let n=JSON.parse(new TextDecoder().decode(e)),i=(t==null?void 0:t.url)||"",a=Xqr(i),o=await OTe(n,a,r||{});return ze(oe({},n),{loader:Sf,url:i,queryString:(t==null?void 0:t.queryString)||"",basePath:a,root:o||n.root,type:G0.TILES3D,lodMetricType:yf.GEOMETRIC_ERROR,lodMetricValue:((u=n.root)==null?void 0:u.geometricError)||0})}async function $qr(e,r,t){let n={content:{featureIds:null}};return await tG(e,0,r,t,n.content),n.content}function Xqr(e){return of.dirname(e)}var ITe="https://api.cesium.com/v1/assets";async function PTe(e,r){if(!r){let a=await Jqr(e);for(let o of a.items)o.type==="3DTILES"&&(r=o.id)}let t=await Qqr(e,r),{type:n,url:i}=t;return Qr(n==="3DTILES"&&i),t.headers={Authorization:`Bearer ${t.accessToken}`},t}async function Jqr(e){Qr(e);let r=ITe,t={Authorization:`Bearer ${e}`},n=await Xo(r,{headers:t});if(!n.ok)throw new Error(n.statusText);return await n.json()}async function Qqr(e,r){Qr(e,r);let t={Authorization:`Bearer ${e}`},n=`${ITe}/${r}`,i=await Xo(`${n}`,{headers:t});if(!i.ok)throw new Error(i.statusText);let a=await i.json();if(i=await Xo(`${n}/endpoint`,{headers:t}),!i.ok)throw new Error(i.statusText);let o=await i.json();return a=oe(oe({},a),o),a}async function Zqr(e,r={}){r=r["cesium-ion"]||{};let{accessToken:t}=r,n=r.assetId;if(!Number.isFinite(n)){let i=e.match(/\/([0-9]+)\/tileset.json/);n=i&&i[1]}return PTe(t,n)}var lO=ze(oe({},Sf),{id:"cesium-ion",name:"Cesium Ion",preload:Zqr,parse:async(e,r,t)=>(r=oe({},r),r["3d-tiles"]=r["cesium-ion"],r.loader=lO,Sf.parse(e,r,t)),options:{"cesium-ion":ze(oe({},Sf.options["3d-tiles"]),{accessToken:null})}});function Fp(e,r,t){let n=12;if(!r)return t+n;let{magic:i,version:a=1,byteLength:o=12}=e;return Qr(Array.isArray(i)&&Number.isFinite(a)&&Number.isFinite(o)),r.setUint8(t+0,i[0]),r.setUint8(t+1,i[1]),r.setUint8(t+2,i[2]),r.setUint8(t+3,i[3]),r.setUint32(t+4,a,!0),r.setUint32(t+8,o,!0),t+=n,t}function Ip(e,r,t){!e||e.setUint32(r+8,t,!0)}function BTe(e,r,t,n,i){e=oe({magic:Cp.COMPOSITE,tiles:[]},e);let a=t;t+=Fp(e,r,t),r&&r.setUint32(t,e.tiles.length,!0),t+=4;for(let o=0;o<e.tiles.length;++o)t+=i(e.tiles[o],r,t,n);return Ip(r,a,t-a),t}function jTe(e,r,t,n){let{featuresLength:i=0,batchTable:a}=e,o={BATCH_LENGTH:i},s=JSON.stringify(o),u=a?JSON.stringify(a):"",l=$o(s.length,8),c=u?$o(u.length,8):0;e=oe({magic:Cp.BATCHED_MODEL},e);let f=t;t=Fp(e,r,t),r&&(r.setUint32(12,l,!0),r.setUint32(16,0,!0),r.setUint32(20,c,!0),r.setUint32(24,0,!0)),t+=16,t=hb(r,t,s,8),a&&(t=hb(r,t,u,8));let d=e.gltfEncoded;return d&&(t=Q_(r,t,d,d.byteLength)),Ip(r,f,t-f),t}function MTe(e,r,t,n){let{featuresLength:i=1,gltfFormat:a=1,gltfUri:o=""}=e,s=o.length,u={INSTANCES_LENGTH:i,POSITION:new Array(i*3).fill(0)},l=JSON.stringify(u),c=l.length;e=oe({magic:Cp.INSTANCED_MODEL},e);let f=t;return t=Fp(e,r,0),r&&(r.setUint32(12,c,!0),r.setUint32(16,0,!0),r.setUint32(20,0,!0),r.setUint32(24,0,!0),r.setUint32(28,a,!0)),t+=20,t+=pb(r,t,l,c),t+=pb(r,t,o,s),Ip(r,f,t-f),t}var e7r={POINTS_LENGTH:1,POSITIONS:{byteOffset:0}};function LTe(e,r,t,n){let{featureTableJson:i=e7r}=e,a=JSON.stringify(i);a=F7(a,4);let{featureTableJsonByteLength:o=a.length}=e,s=new ArrayBuffer(12),u=s.byteLength;e=oe({magic:Cp.POINT_CLOUD},e);let l=t;return t+=Fp(e,r,0),r&&(r.setUint32(t+0,o,!0),r.setUint32(t+4,u,!0),r.setUint32(t+8,0,!0),r.setUint32(t+12,0,!0)),t+=16,t+=pb(r,t,a,o),t+=Q_(r,t,s,u),Ip(r,l,t-l),t}function wG(e,r){let t=SG(e,null,0,r),n=new ArrayBuffer(t),i=new DataView(n);return SG(e,i,0,r),n}function SG(e,r,t,n){switch(Qr(typeof e.type=="string"),e.type){case Ws.COMPOSITE:return BTe(e,r,t,n,SG);case Ws.POINT_CLOUD:return LTe(e,r,t,n);case Ws.BATCHED_3D_MODEL:return jTe(e,r,t,n);case Ws.INSTANCED_3D_MODEL:return MTe(e,r,t,n);default:throw new Error("3D Tiles: unknown tile type")}}var AG={name:"3D Tile",id:"3d-tiles",module:"3d-tiles",version:Nb,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],encodeSync:r7r,binary:!0,options:{["3d-tiles"]:{}}};function r7r(e,r){return wG(e,r)}var to=$e(require("path"));var oc=$e(n3e()),VRt=oc.default.v1,KRt=oc.default.v3,Tf=oc.default.v4,YRt=oc.default.v5,$Rt=oc.default.NIL,XRt=oc.default.version,JRt=oc.default.validate,QRt=oc.default.stringify,ZRt=oc.default.parse;var Mm=$e(require("process")),l4=$e(Yu()),mY=$e(jG());var hx=$e(require("path")),pBe=$e(Yu());var h3e=()=>({folderPattern:{path:"folderPattern",default:"BASIC"},archiveCompressionType:{path:"archiveCompressionType",default:"STORE"},resourceCompressionType:{path:"resourceCompressionType",default:"GZIP"},I3SVersion:{path:"I3SVersion",default:"1.8"},nodeCount:{path:"nodeCount"}});var dx=$e(require("fs")),px=$e(require("path"));var lBe=$e(require("zlib")),cBe=$e(require("path")),Fw=$e(require("fs")),nat=$e(UFe());var iat=$e(KK());var aat=$e(IG());function XF(e){let r=`${e}.gz`,t=(0,lBe.createGzip)(),n=(0,Fw.createReadStream)(e),i=(0,Fw.createWriteStream)(r);return new Promise((a,o)=>{n.on("end",()=>{console.log(`${r} compressed and saved.`),a(r)}),n.on("error",s=>{console.log(`${r}: compression error!`),o(s)}),n.pipe(t).pipe(i)})}async function fBe(e,r,t,n,i){process.platform==="win32"?await sat(e,r,t,n,i):await oat(e,r,t,n)}async function oat(e,r,t=0,n="."){let i=Iw(r),a=[`-${t}`,"-r",i,n];await new hp().start({command:"zip",arguments:a,spawn:{cwd:e},wait:0})}async function sat(e,r,t=0,n=(0,cBe.join)(".","*"),i){n[0]==="@"&&(n=`*${n.substr(1)}`);let a=Iw(r),o=["a","-tzip",`-mx=${t}`,a,n];await new hp().start({command:i,arguments:o,spawn:{cwd:`${e}`},wait:0})}async function Gi(e,r,t="index.json"){let n;r instanceof Promise?n=new Uint8Array(await r):r instanceof ArrayBuffer?n=new Uint8Array(r):n=r,await dx.promises.mkdir(e,{recursive:!0});let i=(0,px.join)(e,t);try{await dx.promises.writeFile(i,n)}catch(a){throw a}return console.log(`${i} saved.`),i}async function xc(e,r,t="index.json",n=!0,i){let a=await Gi(e,r,t);if(n){if(i)return i.includes(a)?null:(i.push(a),`${a}.gz`);{let o=await XF(a);return await YK(a),o}}return a}async function JF(e,r){return new Promise((t,n)=>{let i=0;console.log(`load ${e}/${r}.`);let a=setInterval(()=>{let o=(0,px.join)(e,r);un(o,j7).then(s=>{clearInterval(a),t(s)}).catch(()=>{i++,i>100&&(clearInterval(a),n(new Error(`Cannon load ${e}/${r}.`)))})},200)})}async function dBe(e){try{return await dx.promises.stat(e),!0}catch{return!1}}function Pw(e){return dx.promises.rm(e,{recursive:!0})}function YK(e){return dx.promises.unlink(e)}function Iw(e){return(0,px.isAbsolute)(e)?e:(0,px.join)(process.cwd(),e)}var qo=class{constructor(r,t,n){this.length=0;this.nodesPerPage=t,this.nodesCounter=0,this.nodePages=[{}],this.nodePages[0].nodes=[],this.writeFile=r,this.converter=n,this.length=0}useWriteFunction(r){this.writeFile=r}getNodePageFileName(r){let t,n;return this.converter.options.slpk?(t=(0,hx.join)(this.converter.layers0Path,"nodepages"),n=`${r.toString()}.json`):(t=(0,hx.join)(this.converter.layers0Path,"nodepages",r.toString()),n="index.json"),{filePath:t,fileName:n}}async loadNodePage(r){let{filePath:t,fileName:n}=this.getNodePageFileName(r),i=(0,hx.join)(t,n);return await dBe(i)?(console.log(`load ${i}.`),await JF(t,n)):{nodes:[]}}getPageIndexByNodeId(r){return Math.floor(r/this.nodesPerPage)}async getPageByNodeId(r){let t=this.getPageIndexByNodeId(r);return this.converter.options.instantNodeWriting?await this.loadNodePage(t):this.nodePages[t]}async getNodeById(r,t){let n=r%this.nodesPerPage;return t=t||await this.getPageByNodeId(r),t.nodes[n]}async addChildRelation(r,t){var i;if(r==null)return;let n=await this.getNodeById(r);(i=n.children)==null||i.push(t),await this.saveNode(n)}async push(r,t){if(r.index=this.nodesCounter++,!this.converter.options.instantNodeWriting){let n=this.nodePages[this.nodePages.length-1];n.nodes.length===this.nodesPerPage&&(n={nodes:[]},this.nodePages.push(n)),n.nodes.push(r)}return await this.addChildRelation(t,r.index),qo.updateResourceInMesh(r),await this.saveNode(r),r}async saveNode(r){if(this.converter.options.instantNodeWriting){let t=this.getPageIndexByNodeId(r.index),n=await this.getPageByNodeId(r.index),{filePath:i,fileName:a}=this.getNodePageFileName(t),o=await this.getNodeById(r.index,n);o?qo.updateAll(o,r):n.nodes.push(r);let s=JSON.stringify(n);this.converter.options.slpk?await this.converter.writeQueue.enqueue({archiveKey:`nodePages/${t.toString()}.json.gz`,writePromise:()=>this.writeFile(i,s,a,!0,this.converter.compressList)},!0):await this.converter.writeQueue.enqueue({writePromise:()=>this.writeFile(i,s)},!0)}else return}async saveMetadata(){let r=(0,pBe.default)({nodeCount:this.nodesCounter},h3e()),t=!1;await this.converter.writeQueue.enqueue({archiveKey:"metadata.json",writePromise:()=>this.writeFile(this.converter.layers0Path,JSON.stringify(r),"metadata.json",t)})}async save(){if(this.converter.options.instantNodeWriting){await this.saveMetadata();return}if(this.converter.options.slpk){for(let[r,t]of this.nodePages.entries()){let n=JSON.stringify(t),i=(0,hx.join)(this.converter.layers0Path,"nodepages");await this.converter.writeQueue.enqueue({archiveKey:`nodePages/${r.toString()}.json.gz`,writePromise:()=>this.writeFile(i,n,`${r.toString()}.json`)})}await this.saveMetadata()}else for(let[r,t]of this.nodePages.entries()){let n=JSON.stringify(t),i=(0,hx.join)(this.converter.layers0Path,"nodepages",r.toString());await this.converter.writeQueue.enqueue({writePromise:()=>this.writeFile(i,n)})}}static updateResourceInMesh(r){r.mesh&&isFinite(r.index)&&(r.mesh.geometry.resource=r.index)}static updateAll(r,t){return Object.assign(r,t,{index:r.index}),qo.updateResourceInMesh(r),r}static updateMaterialByNodeId(r,t){!r.mesh||(r.mesh.material={definition:t,resource:r.index})}static updateVertexCountByNodeId(r,t){!r.mesh||(r.mesh.geometry.vertexCount=t)}static updateNodeAttributeByNodeId(r){!r.mesh||!r.index||(r.mesh.attribute.resource=r.index)}static updateFeatureCountByNodeId(r,t){!r.mesh||(r.mesh.geometry.featureCount=t)}static updateTexelCountHintByNodeId(r,t){!r.mesh||!r.mesh.material||(r.mesh.material.texelCountHint=t)}};var Bw=$e(require("path")),QF=$e(require("fs"));function ZF(e){let r=1e6,t=e[0],n=Math.floor(t/3600);t=t-n*3600;let i=Math.floor(t/60);t=t-i*60;let a=Math.floor(t),o=e[1]/r,s="";return n&&(s+=`${n}h `),i&&(s+=`${i}m `),a&&(s+=`${a}s`),s||(s+=`${o}ms`),s}async function e4(e){let{slpk:r,outputPath:t,tilesetName:n}=e,i=Iw(t);try{if(r){let s=(0,Bw.join)(i,`${n}.slpk`);return(await QF.promises.stat(s)).size}let a=(0,Bw.join)(i,n);return await hBe(a)}catch(a){return console.log("Calculate file sizes error: ",a),null}}async function hBe(e){let r=0,t=await QF.promises.readdir(e);for(let n of t){let i=await QF.promises.stat((0,Bw.join)(e,n));i.isDirectory()?r+=await hBe((0,Bw.join)(e,n)):r+=i.size}return r}var cu=$e(Xt()),ZK=$e(Gs());var IBe=$e(jG());var Bm=3,mx=9;function mBe(e){let{positions:r,normals:t,texCoords:n,colors:i,uvRegions:a,featureIndices:o}=e,s=r.length/mx;if(!o.length)return{faceRange:new Uint32Array([0,s-1]),featureIds:[0],featureCount:1,positions:r,normals:t,texCoords:n,colors:i,uvRegions:a};let u=uat(o),l=lat(oe(oe({},u),e)),c=cat(l);return fat(c,u.featureCount)}function uat(e){let r=1,t=1,n=gBe(e.slice(0,Bm)),i=[],a=[],o=[n];i[0]=0,a[0]=n;for(let l=Bm;l<e.length;l+=Bm){let c=gBe(e.slice(l,l+Bm));n!==c&&(i[r]=l/Bm-1,i[r+1]=l/Bm,a[t]=c,o.includes(c)||o.push(c),r+=2,t+=1),n=c}i[r]=e.length/Bm-1;let s=new Uint32Array(i),u=o.length;return{faceRange:s,featureCount:u,featureIds:a}}function gBe(e){let r={},t=e[0],n=1;for(let i of e)r[i]=(r[i]||0)+1,n=n>r[i]?n:r[i],t=n>r[i]?t:i;return t}function lat(e){let{featureIds:r,positions:t,normals:n,colors:i,uvRegions:a,texCoords:o,faceRange:s=new Uint32Array(0)}=e,u=[],l=new Float32Array(t),c=new Float32Array(n),f=new Uint8Array(i),d=new Float32Array(o),p=new Uint16Array(a);for(let h=0;h<r.length;h++){let b=s[h*2],v=s[h*2+1],y=jw("positions",b,v),w=jw("normals",b,v),A=jw("colors",b,v),C=jw("uvRegions",b,v),D=jw("texCoords",b,v);u.push({featureId:r[h],positions:l.slice(0,y),normals:c.slice(0,w),colors:f.slice(0,A),uvRegions:p.slice(0,C),texCoords:d.slice(0,D)}),l=l.slice(y),c=c.slice(w),f=f.slice(A),p=p.slice(C),d=d.slice(D)}return u.sort((h,b)=>h.featureId-b.featureId)}function jw(e,r,t){let n=4,i=2,a=t-r+1,o=a*3;switch(e){case"positions":case"normals":return a*mx;case"colors":case"uvRegions":return o*n;case"texCoords":return o*i;default:return 0}}function cat(e){let r=[];for(let t=0;t<e.length;t++){let n=e[t],i=r.find(a=>a.featureId===n.featureId);i?(i.positions=_a(i.positions,n.positions),i.normals=_a(i.normals,n.normals),i.colors=_a(i.colors,n.colors),i.texCoords=_a(i.texCoords,n.texCoords),i.uvRegions=_a(i.uvRegions,n.uvRegions)):r.push(n)}return r}function fat(e,r){let t=e[0],n=[t.featureId||0],i=new Float32Array(t.positions),a=new Float32Array(t.normals),o=new Uint8Array(t.colors),s=new Uint16Array(t.uvRegions),u=new Float32Array(t.texCoords),l=[0],c=0,f=0;for(let p=1;p<e.length;p++){let h=e[p];n.push(h.featureId||0),i=_a(i,h.positions),a=_a(a,h.normals),o=_a(o,h.colors),s=_a(s,h.uvRegions),u=_a(u,h.texCoords);let b=e[c];l.push(b.positions.length/mx-1+f),l.push(b.positions.length/mx+f),f+=b.positions.length/mx,c+=1}return l.push(i.length/mx-1),{faceRange:new Uint32Array(l),featureIds:n,positions:i,normals:a,colors:o,uvRegions:s,texCoords:u,featureCount:r}}var ro=$e(Xt()),gx=$e(Gs()),Hf=$e(U0());function $K(e,r){let t,n,i,a=gx.Ellipsoid.WGS84.cartesianToCartographic(e.center,new ro.Vector3);return a[2]=a[2]-r.getHeight(a[1],a[0]),e instanceof Hf.OrientedBoundingBox?(n=e.halfSize,t=new ro.Vector3(n[0],n[1],n[2]).len(),i=e.quaternion):(t=e.radius,n=[t,t,t],i=new ro.Quaternion().fromMatrix3(new ro.Matrix3([n[0],0,0,0,n[1],0,0,0,n[2]])).normalize()),{mbs:[a[0],a[1],a[2],t],obb:{center:[a[0],a[1],a[2]],halfSize:n,quaternion:i}}}function vBe(e,r){let t=dat(e),n=(0,Hf.makeOrientedBoundingBoxFromPoints)(t),i=(0,Hf.makeBoundingSphereFromPoints)(t),a=gx.Ellipsoid.WGS84.cartesianToCartographic(i.center,new ro.Vector3),o=gx.Ellipsoid.WGS84.cartesianToCartographic(n.center,new ro.Vector3);return a[2]=a[2]-r.getHeight(a[1],a[0]),o[2]=o[2]-r.getHeight(o[1],o[0]),{mbs:[a[0],a[1],a[2],i.radius],obb:{center:o,halfSize:n.halfSize,quaternion:n.quaternion}}}function dat(e){let r=[];for(let t=0;t<e.length;t+=3){let n=new ro.Vector3([e[t],e[t+1],e[t+2]]);r.push(n)}return r}function bBe(e){let r;e instanceof Hf.BoundingSphere?r=e:r=e.getBoundingSphere();let t=r.center,n=r.radius,i=gx.Ellipsoid.WGS84.cartesianToCartographic(new ro.Vector3(t[0]+n,t[1]+n,t[2]+n),new ro.Vector3),a=gx.Ellipsoid.WGS84.cartesianToCartographic(new ro.Vector3(t[0]-n,t[1]-n,t[2]-n),new ro.Vector3);return{xmin:Math.min(a[0],i[0]),xmax:Math.max(a[0],i[0]),ymin:Math.min(a[1],i[1]),ymax:Math.max(a[1],i[1]),zmin:Math.min(a[2],i[2]),zmax:Math.max(a[2],i[2])}}function XK(e){let r=e[3],t=new ro.Vector3(e[0],e[1],e[2]),n=new ro.Matrix3([r,0,0,0,r,0,0,0,r]);return new Hf.OrientedBoundingBox(t,n)}var jm=$e(Xt()),yBe=$e(Gs());function xBe(e,r,t){var s,u,l,c,f,d,p,h;let n=((u=(s=e.gltf)==null?void 0:s.scene)==null?void 0:u.nodes)||((f=(c=(l=e.gltf)==null?void 0:l.scenes)==null?void 0:c[0])==null?void 0:f.nodes)||((d=e.gltf)==null?void 0:d.nodes)||[],i=((h=(p=e.gltf)==null?void 0:p.images)==null?void 0:h.map(b=>{var v,y;if((v=b==null?void 0:b.image)==null?void 0:v.compressed)return null;{let w=(y=b==null?void 0:b.image)==null?void 0:y.data,A=new Uint8Array(w.length);return A.set(w),{data:A,compressed:!1,height:b.image.height,width:b.image.width,components:b.image.components,mimeType:b.mimeType}}}))||[];_Be(n);let{cartographicOrigin:a,modelMatrix:o}=hat(e,r,t);return{nodes:n,images:i,cartographicOrigin:a,cartesianModelMatrix:o}}function pat(e){let r={};for(let t in e)r[t]={value:e[t].value};return r}function hat(e,r,t){let{rtcCenter:n,gltfUpAxis:i}=e,{center:a}=t,o=new jm.Matrix4(r);switch(n&&o.translate(n),i){case"Z":break;case"Y":let l=new jm.Matrix4().rotateX(Math.PI/2);o=o.multiplyRight(l);break;case"X":let c=new jm.Matrix4().rotateY(-Math.PI/2);o=o.multiplyRight(c);break;default:break}let s=new jm.Vector3(a),u=yBe.Ellipsoid.WGS84.cartesianToCartographic(s,new jm.Vector3);return{modelMatrix:o,cartographicOrigin:u}}function _Be(e){var r;for(let t=0;t<e.length;t++){let n=e[t];n.mesh&&(e[t]=ze(oe({},n),{mesh:ze(oe({},n.mesh),{primitives:(r=n.mesh)==null?void 0:r.primitives.map(i=>{var a,o,s;return ze(oe({},i),{indices:{value:(a=i==null?void 0:i.indices)==null?void 0:a.value},attributes:pat(i.attributes),material:{id:(o=i==null?void 0:i.material)==null?void 0:o.id,uniqueId:(s=i==null?void 0:i.material)==null?void 0:s.uniqueId}})})})})),n.children&&_Be(n.children)}}var vx="Tile converter does not work in browser, only in node js environment",Mw="EXT_mesh_features",Sh="EXT_feature_metadata";function EBe(e,r){var n,i;let t=(i=(n=e.gltf)==null?void 0:n.extensions)==null?void 0:i[Sh];if(!(t==null?void 0:t.featureTextures))return null;for(let a in t.featureTextures)if(t.featureTextures[a].class===r)return a;return null}function wBe(e,r,t,n){let i=r==null?void 0:r.extensions;if(!i)return[];for(let[a,o]of Object.entries(i||{}))switch(a){case Sh:return mat(e,o,t,n);case Mw:return console.warn("EXT_mesh_features extension is not supported yet"),[];default:return[]}return[]}function mat(e,r,t,n){var o,s,u,l,c,f,d;let i=(o=r==null?void 0:r.featureIdAttributes)==null?void 0:o[0];if((s=i==null?void 0:i.featureIds)==null?void 0:s.attribute)return e[i.featureIds.attribute].value;if(((u=i==null?void 0:i.featureIds)==null?void 0:u.hasOwnProperty("constant"))&&((l=i==null?void 0:i.featureIds)==null?void 0:l.hasOwnProperty("divisor"))){let p=((c=e==null?void 0:e.POSITIONS)==null?void 0:c.value.length)/3||0;return gat(p,i.featureIds.constant,i.featureIds.divisor)}let a=(r==null?void 0:r.featureIdTextures)&&(r==null?void 0:r.featureIdTextures[0]);if(a){let h=`TEXCOORD_${((d=(f=a==null?void 0:a.featureIds)==null?void 0:f.texture)==null?void 0:d.texCoord)||0}`,b=e[h].value;return vat(a,b,t)}return n?e[n].value:[]}function gat(e,r=0,t=0){let n=[];if(t>0){let i=r,a=t;for(let o=0;o<e;o++)n.push(i),a-=1,a===0&&(i++,a=t)}else n=Array(e).fill(r,0,e);return n}function vat(e,r,t){var l,c,f;if(!(t==null?void 0:t.length))return[];let n={r:0,g:1,b:2,a:3},i=(c=(l=e==null?void 0:e.featureIds)==null?void 0:l.texture)==null?void 0:c.index,a=(f=e==null?void 0:e.featureIds)==null?void 0:f.channels;if(!a||i===void 0)return[];let o=t[i],s=[],u=n[a];if(o&&(o==null?void 0:o.width)&&(o==null?void 0:o.height)&&(o==null?void 0:o.components))for(let d=0;d<r.length;d+=2){let p=r[d],h=r[d+1],b=Math.min(SBe(p)*o.width|0,o.width-1),y=(Math.min(SBe(h)*o.height|0,o.height-1)*o.width+b)*o.components+u,w=new Uint8Array(o.data)[y];s.push(w)}else console.warn(`Can't get batch Ids from ${(o==null?void 0:o.mimeType)||""} compressed texture`);return s}function SBe(e){return(e%1+1)%1}function ABe(e,r){let t={};for(let n in r){let i=r[n];t[n]=bat(i,e)}return t}function bat(e,r){let t=[];for(let n of r){let i=e[n]||null;t.push(i)}return t}function TBe(e,r){let t=!1;for(let n of Object.values(r))e.length!==n.length&&(t=!0);return t}var Lw="string",JK="Int32",QK="double",r4="OBJECTID";function CBe(e,r){return e===r4?r4:typeof r===Lw?Lw:typeof r=="number"?Number.isInteger(r)?JK:QK:Lw}function DBe(e,r,t){let n={key:`f_${e}`,name:r,ordering:["attributeValues"],header:[{property:"count",valueType:"UInt32"}],attributeValues:{valueType:"Int32",valuesPerElement:1}};switch(t){case r4:yat(n);break;case Lw:FBe(n);break;case QK:xat(n);break;case JK:break;default:FBe(n)}return n}function kBe(e){switch(e){case r4:return"esriFieldTypeOID";case Lw:return"esriFieldTypeString";case JK:return"esriFieldTypeInteger";case QK:return"esriFieldTypeDouble";default:return"esriFieldTypeString"}}function OBe(e,r){return{name:e,type:r,alias:e}}function RBe(e){let r="{OBJECTID}",t=[],n=[],i=[],a=[];for(let o in e)n.push({fieldName:o,visible:!0,isEditable:!1,label:o});return i.push({fieldInfos:n,type:"fields"}),{title:r,mediaInfos:t,popupElements:i,fieldInfos:n,expressionInfos:a}}function FBe(e){e.ordering.unshift("attributeByteCounts"),e.header.push({property:"attributeValuesByteCount",valueType:"UInt32"}),e.attributeValues={valueType:"String",encoding:"UTF-8",valuesPerElement:1},e.attributeByteCounts={valueType:"UInt32",valuesPerElement:1}}function yat(e){e.attributeValues={valueType:"Oid32",valuesPerElement:1}}function xat(e){e.attributeValues={valueType:"Float64",valuesPerElement:1}}var t4=e=>{let r=new Uint32Array(e);for(let t=0;t<e;t++)r[t]=t;return r};var _at=1,Eat=1,rl=3,qw=2,wat=4,Sat="string",Aat="Int32",Tat="Float64",Cat="Oid32",PBe=["CUSTOM_ATTRIBUTE_2","_BATCHID","BATCHID"],Ah=new cu.Vector3;async function eY(e,r,t,n,i,a,o,s,u,l,c,f,d){var A;let p=u,h=await Gat((A=e.gltf)==null?void 0:A.materials,l),b=xBe(e,r,t),v=EBe(e,d),y=await Oat(b,h,p,v);u&&Dat(y,c);let w=[];for(let C of h){let D=C.mergedMaterials[0].originalMaterialId;if(!y.has(D))continue;let P=y.get(D);if(!P)continue;let{material:k,texture:L}=C,I=await n();w.push(await kat({convertedAttributes:P,material:k,texture:L,tileContent:e,nodeId:I,featuresHashArray:a,propertyTable:i,attributeStorageInfo:o,draco:s,libraries:f}))}return w.length?w:null}function Dat(e,r){for(let t of e.values()){let n=vBe(t.positions,r);t.boundingVolumes=n;let i=n.obb.center;for(let a=0;a<t.positions.length;a+=rl){let o=t.positions.subarray(a,a+rl);ZK.Ellipsoid.WGS84.cartesianToCartographic(Array.from(o),Ah),Ah[2]=Ah[2]-r.getHeight(Ah[1],Ah[0]),Ah=Ah.subtract(i),t.positions.set(Ah,a)}}}async function kat({convertedAttributes:e,material:r,texture:t,tileContent:n,nodeId:i,featuresHashArray:a,propertyTable:o,attributeStorageInfo:s,draco:u,libraries:l}){var I;let c=e.boundingVolumes,f=e.positions.length/rl,{faceRange:d,featureIds:p,positions:h,normals:b,colors:v,uvRegions:y,texCoords:w,featureCount:A}=mBe(e);n.batchTableJson&&Zat(p,e.featureIndices,a,n.batchTableJson);let C=new Uint32Array(2),D=uot(p);C.set([f,A],0);let P=new Uint8Array(Kl(C.buffer,h.buffer,b.buffer,t?w.buffer:new ArrayBuffer(0),v.buffer,y,D.buffer,d.buffer)),k=u?lot(f,e,{positions:h,normals:b,texCoords:t?w:new Float32Array(0),colors:v,uvRegions:y,featureIds:p,faceRange:d},l):null,L=[];return s&&o&&(L=not(p,o,s)),{nodeId:i,geometry:P,compressedGeometry:k,texture:t,hasUvRegions:Boolean(y.length),sharedResources:Yat(((I=n.gltf)==null?void 0:I.materials)||[],i),meshMaterial:r,vertexCount:f,attributes:L,featureCount:A,boundingVolumes:c}}async function Oat(e,r,t,n){let{nodes:i,images:a,cartographicOrigin:o,cartesianModelMatrix:s}=e,u=new Map;for(let l of r){let c={positions:new Float32Array(0),normals:new Float32Array(0),texCoords:new Float32Array(0),colors:new Uint8Array(0),uvRegions:new Uint16Array(0),featureIndicesGroups:[],featureIndices:[],boundingVolumes:null,mergedMaterials:l.mergedMaterials};for(let f of l.mergedMaterials)u.set(f.originalMaterialId,c)}BBe(i,a,o,s,u,t,void 0,n);for(let l of u.keys()){let c=u.get(l);if(!!c){if(c.positions.length===0){u.delete(l);continue}c.featureIndicesGroups&&(c.featureIndices=c.featureIndicesGroups.reduce((f,d)=>f.concat(d)),delete c.featureIndicesGroups)}}return u}function BBe(e,r,t,n,i,a,o=new cu.Matrix4([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),s){if(e)for(let u of e)Fat(u,r,t,n,i,a,o,s)}function Rat(e,r){let t=r,{matrix:n,rotation:i,scale:a,translation:o}=e;return n&&(t=r.multiplyRight(n)),o&&(t=t.translate(o)),i&&(t=t.rotateXYZ(i)),a&&(t=t.scale(a)),t}function Fat(e,r,t,n,i,a,o=new cu.Matrix4([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),s){let u=Rat(e,o),l=e.mesh;l&&Iat(l,r,t,n,i,a,u,s),BBe(e.children||[],r,t,n,i,a,u,s)}function Iat(e,r,t,n,i,a=!1,o=new cu.Matrix4([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),s){var u;for(let l of e.primitives){let c=null,f;l.material?(c=i.get(l.material.id),f=(u=c==null?void 0:c.mergedMaterials.find(({originalMaterialId:h})=>{var b;return h===((b=l.material)==null?void 0:b.id)}))==null?void 0:u.uvRegion):i.has("default")&&(c=i.get("default")),Qr(c!==null,"Primitive - material mapping failed"),Qr(l.mode===void 0||l.mode===nt.TRIANGLES||l.mode===nt.TRIANGLE_STRIP,`Primitive - unsupported mode ${l.mode}`);let d=l.attributes;if(!c)continue;let p=Pat(l);c.positions=_a(c.positions,jBe({vertices:d.POSITION.value,cartographicOrigin:t,cartesianModelMatrix:n,nodeMatrix:o,indices:p,attributeSpecificTransformation:Bat,useCartesianPositions:a})),c.normals=_a(c.normals,jBe({vertices:d.NORMAL&&d.NORMAL.value,cartographicOrigin:t,cartesianModelMatrix:n,nodeMatrix:o,indices:p,attributeSpecificTransformation:jat,useCartesianPositions:!1})),c.texCoords=_a(c.texCoords,Mat(d.TEXCOORD_0&&d.TEXCOORD_0.value,p)),c.colors=_a(c.colors,Lat(d.COLOR_0,p)),f&&(c.uvRegions=_a(c.uvRegions,qat(f,p))),c.featureIndicesGroups=c.featureIndicesGroups||[],c.featureIndicesGroups.push(Nat(Uat(d,l,r,s),p))}}function Pat(e){var t;let r=(t=e.indices)==null?void 0:t.value;if(!r){let n=e.attributes.POSITION.value;return t4(n.length/rl)}if(r&&e.mode===nt.TRIANGLE_STRIP){let n=r.constructor,i=new n((r.length-2)*3),a=0,o=r.slice(0,3);i.set(o,0);for(let s=1;s+2<r.length;s++)a+=3,o=r.slice(s,s+3),s%2==0?i.set(o,a):i.set(o.reverse(),a);r=i}return r}function jBe(e){let{vertices:r,indices:t,attributeSpecificTransformation:n}=e,i=new Float32Array(t.length*rl);if(!r)return i;for(let a=0;a<t.length;a++){let o=t[a]*rl,s=r.subarray(o,o+rl),u=new cu.Vector3(Array.from(s));u=n(u,e),i[a*rl]=u.x,i[a*rl+1]=u.y,i[a*rl+2]=u.z}return i}function Bat(e,r){let{cartesianModelMatrix:t,cartographicOrigin:n,nodeMatrix:i,useCartesianPositions:a}=r;return i&&(e=e.transform(i)),e=e.transform(t),a||(ZK.Ellipsoid.WGS84.cartesianToCartographic([e[0],e[1],e[2]],e),e=e.subtract(n)),e}function jat(e,r){let{cartesianModelMatrix:t,nodeMatrix:n}=r;return n&&(e=e.transformAsVector(n)),e=e.transformAsVector(t),e}function Mat(e,r){let t=new Float32Array(r.length*qw);if(!e)return t.fill(1),t;for(let n=0;n<r.length;n++){let i=r[n]*qw,a=e.subarray(i,i+qw);t[n*qw]=a[0],t[n*qw+1]=a[1]}return t}function Lat(e,r){let t=(e==null?void 0:e.components)||wat,n=new Uint8Array(r.length*t);if(!e)return n.fill(255),n;let i=e.value;for(let a=0;a<r.length;a++){let o=r[a]*t,s=i.subarray(o,o+t),u=new Uint8Array(t);for(let l=0;l<s.length;l++)u[l]=s[l]*255;n.set(u,a*t)}return n}function qat(e,r){let t=new Uint16Array(r.length*4);for(let n=0;n<t.length;n+=4)t.set(e,n);return t}function Nat(e,r){if(!e.length||!r.length)return[];let t=[];for(let n=0;n<r.length;n++){let i=r[n];t.push(e[i])}return t}function Uat(e,r,t,n){let i=wBe(e,r,t,n);if(i.length)return i;for(let a=0;a<PBe.length;a++){let o=PBe[a];if(e[o]&&e[o].value)return e[o].value}return[]}async function Gat(e=[],r){let t=[];for(let n of e)t.push(Wat(n));return r&&(t=await zat(t)),t}async function zat(e){var t,n;let r=[];for(;e.length>0;){let i=e.splice(0,1)[0],a=[];for(let o=0;o<e.length;o++){let s=e[o];(i.texture&&s.texture||!i.texture&&!s.texture)&&(i=await Hat(i,s),a.push(o))}if(i.texture&&a.length){let o=(t=i.mergedMaterials)==null?void 0:t.reduce((l,{textureSize:c})=>l+((c==null?void 0:c.width)||0),0),s=(n=i.mergedMaterials)==null?void 0:n.reduce((l,{textureSize:c})=>Math.max(l,(c==null?void 0:c.height)||0),0),u=-1;for(let l of i.mergedMaterials)if(l.textureSize){let c=u+1+l.textureSize.width/o*2**(Uint16Array.BYTES_PER_ELEMENT*8)-1;l.uvRegion=new Uint16Array([u+1,0,c,l.textureSize.height/s*2**(Uint16Array.BYTES_PER_ELEMENT*8)-1]),u=c}i.texture.image.width=o,i.texture.image.height=s}for(let o of a.reverse())e.splice(o,1);r.push(i)}return r.length||r.push({material:Kat(),mergedMaterials:[{originalMaterialId:"default"}]}),r}async function Hat(e,r){var t,n;if(((t=e.texture)==null?void 0:t.bufferView)&&((n=r.texture)==null?void 0:n.bufferView)&&e.mergedMaterials&&r.mergedMaterials){let i=Buffer.from(e.texture.bufferView.data),a=Buffer.from(r.texture.bufferView.data);try{let{joinImages:o}=await import("join-images"),s=await o([i,a],{direction:"horizontal"});e.texture.bufferView.data=await s.toFormat(e.texture.mimeType==="image/png"?"png":"jpeg").toBuffer()}catch(o){throw console.log("Join images into a texture atlas has failed. Consider usage `--split-nodes` option. (See documentation https://loaders.gl/modules/tile-converter/docs/cli-reference/tile-converter)"),o}e.material.pbrMetallicRoughness.baseColorTexture.textureSetDefinitionId=1}return e.mergedMaterials=e.mergedMaterials.concat(r.mergedMaterials),e}function Wat(e){var i,a,o,s,u;let r={doubleSided:e.doubleSided,emissiveFactor:(i=e.emissiveFactor)==null?void 0:i.map(l=>Math.round(l*255)),alphaMode:Vat(e.alphaMode),pbrMetallicRoughness:{roughnessFactor:((a=e==null?void 0:e.pbrMetallicRoughness)==null?void 0:a.roughnessFactor)||_at,metallicFactor:((o=e==null?void 0:e.pbrMetallicRoughness)==null?void 0:o.metallicFactor)||Eat}},t;((s=e==null?void 0:e.pbrMetallicRoughness)==null?void 0:s.baseColorTexture)?(t=e.pbrMetallicRoughness.baseColorTexture.texture.source,r.pbrMetallicRoughness.baseColorTexture={textureSetDefinitionId:0}):e.emissiveTexture&&(t=e.emissiveTexture.texture.source,r.pbrMetallicRoughness.baseColorTexture={textureSetDefinitionId:0}),e.id=Number.isFinite(e.id)?e.id:Tf();let n=[{originalMaterialId:e.id}];if(t)n[0].textureSize={width:t.image.width,height:t.image.height};else{let l=(u=e==null?void 0:e.pbrMetallicRoughness)==null?void 0:u.baseColorFactor;r.pbrMetallicRoughness.baseColorFactor=l&&l.map(c=>Math.round(c*255))||void 0}return{material:r,texture:t,mergedMaterials:n}}function Vat(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend";default:return"opaque"}}function Kat(){return{alphaMode:"opaque",pbrMetallicRoughness:{metallicFactor:1,roughnessFactor:1}}}function Yat(e,r){let t={};if(!e||!e.length)return t;t.materialDefinitionInfos=[];for(let n of e){let{materialDefinitionInfo:i,textureDefinitionInfo:a}=$at(n,r);t.materialDefinitionInfos.push(i),a&&(t.textureDefinitionInfos=t.textureDefinitionInfos||[],t.textureDefinitionInfos.push(a))}return t}function $at(e,r){var s;let t=((s=e==null?void 0:e.pbrMetallicRoughness)==null?void 0:s.baseColorTexture)||e.emissiveTexture,n=null;t&&(n=Jat(t.texture,r));let{baseColorFactor:i,metallicFactor:a}=(e==null?void 0:e.pbrMetallicRoughness)||{},o=i;return(!i||i[3]===0)&&e.emissiveFactor&&(o=e.emissiveFactor,o[3]=o[3]||1),{materialDefinitionInfo:Xat(o||[1,1,1,1],a),textureDefinitionInfo:n}}function Xat(e,r=1){let t=.04/255,n=new cu.Vector4(0,0,0,1),i=new cu.Vector4(1,1,1,1),a=new cu.Vector4(t,t,t,0),o=new cu.Vector4(e),s=i.subtract(a).multiply(o),u=s.lerp(s,n,r);a[3]=1;let l=a.lerp(a,o,r);return{params:{diffuse:u.toArray(),specular:l.toArray(),renderMode:"solid"}}}function Jat(e,r){var t,n,i,a;return{encoding:((t=e==null?void 0:e.source)==null?void 0:t.mimeType)?[e.source.mimeType]:void 0,images:[{id:Qat(e,r),size:(n=e.source)==null?void 0:n.image.width,length:((i=e.source)==null?void 0:i.image.data.length)?[(a=e.source)==null?void 0:a.image.data.length]:void 0}]}}function Qat(e,r){var b;let{width:t,height:n}=((b=e.source)==null?void 0:b.image)||{};if(!t||!n)return"";let i=1,a=0,o=r+1,s=32-o.toString(2).length,u="0".repeat(s).concat(o.toString(2)),l=i<<28,c=a<<24,f=t-1<<12,d=n-1<<0,p=l+c+f+d;return BigInt(`0b${p.toString(2)}${u}`).toString()}function Zat(e,r,t,n){let i=eot(e,n,t);MBe(r,i),MBe(e,i)}function eot(e,r,t){let n={};for(let i=0;i<e.length;i++){let a=e[i],o=tot(i,r,t);n[a.toString()]=o}return n}function rot(e,r){let t="";for(let n in e)t+=e[n][r];return t}function tot(e,r,t){let n=rot(r,e),i=(0,IBe.default)(n);return t.includes(i)?t.indexOf(i):t.push(i)-1}function MBe(e,r){for(let t=0;t<e.length;t++)e[t]=r[e[t]]}function not(e,r,t){let n=[],a=TBe(e,r)?ABe(e,r):r,o=oe({OBJECTID:e},a);for(let s in o){let u=aot(s,t),l=o[s],c=iot(u,l);n.push(c)}return n}function iot(e,r){let t;switch(e){case Cat:case Aat:t=oot(r);break;case Tat:t=sot(r);break;case Sat:t=LBe(r);break;default:t=LBe(r)}return t}function aot(e,r){return r.find(n=>n.name===e).attributeValues.valueType}function oot(e){let r=new Uint32Array([e.length]),t=new Uint32Array(e);return Kl(r.buffer,t.buffer)}function sot(e){let r=new Uint32Array([e.length]),t=new Uint8Array(4),n=new Float64Array(e);return Kl(r.buffer,t.buffer,n.buffer)}function LBe(e){let r=new Uint32Array([e.length]),t=0,n=new Uint32Array(e.length),i=[];for(let o=0;o<e.length;o++){let s=`${String(e[o])}\0`,u=Buffer.from(s),l=u.length;t+=l,n[o]=l,i.push(u)}let a=new Uint32Array([t]);return Kl(r.buffer,a.buffer,n.buffer,...i)}function uot(e){let r=new BigUint64Array(e.length);for(let t=0;t<e.length;t++)r[t]=BigInt(e[t]);return r}async function lot(e,r,t,n){let{positions:i,normals:a,texCoords:o,colors:s,uvRegions:u,featureIds:l,faceRange:c}=t,f=new Uint32Array(e);for(let v=0;v<f.length;v++)f.set([v],v);let d=new Uint32Array(r.featureIndices.length?r.featureIndices:e),p=cot(d,c),h={positions:i,normals:a,colors:s,"feature-index":p};o.length&&(h.texCoords=o);let b={"feature-index":{"i3s-attribute-type":"feature-index","i3s-feature-ids":new Int32Array(l)}};return u.length&&(h["uv-region"]=u,b["uv-region"]={"i3s-attribute-type":"uv-region"}),xb({attributes:h,indices:f},uU,ze(oe({},uU.options),{reuseWorkers:!0,_nodeWorkers:!0,modules:n,useLocalLibraries:!0,draco:{method:"MESH_SEQUENTIAL_ENCODING",attributesMetadata:b},["draco-writer"]:{workerUrl:"./modules/draco/dist/draco-writer-worker-node.js"}}))}function cot(e,r){let t=new Uint32Array(e.length),n=0,i=0;for(let a=1;a<r.length;a+=2){let o=(r[a]+1)*rl;t.fill(n,i,o),n++,i=o+1}return t}function qBe(e,r){if(!e)return null;let t=e==null?void 0:e.batchTableJson;if(t)return t;let{extensionName:n,extension:i}=fot(e);switch(n){case Mw:return console.warn("The I3S converter does not yet support the EXT_mesh_features extension"),null;case Sh:return dot(i,r);default:return null}}function fot(e){var a,o,s,u;let r=[Sh,Mw];if(!((a=e==null?void 0:e.gltf)==null?void 0:a.extensionsUsed))return{extensionName:null,extension:null};let n="";for(let l of((o=e==null?void 0:e.gltf)==null?void 0:o.extensionsUsed)||[])if(r.includes(l)){n=l;break}if(!n)return{extensionName:null,extension:null};let i=(u=(s=e==null?void 0:e.gltf)==null?void 0:s.extensions)==null?void 0:u[n];return{extensionName:n,extension:i}}function dot(e,r){var t;if(e==null?void 0:e.featureTables){let n=(t=Object.keys(e.featureTables))==null?void 0:t[0];if(n){let i=e==null?void 0:e.featureTables[n],a={};for(let o in i.properties)a[o]=i.properties[o].data;return a}}if(e==null?void 0:e.featureTextures){let n;for(let i in e.featureTextures)e.featureTextures[i].class===r&&(n=i);if(typeof n=="string"){let i=e==null?void 0:e.featureTextures[n],a={};for(let o in i.properties)a[o]=i.properties[o].data;return a}}return console.warn("The I3S converter couldn't handle EXT_feature_metadata extension: There is neither featureTables, no featureTextures in the extension."),null}var UBe=$e(Yu()),GBe=$e(require("path"));var NBe=()=>({serviceItemId:{path:"serviceItemId"},serviceName:{path:"layerName"},name:{path:"layerName"},currentVersion:{path:"currentVersion",default:10.7},serviceVersion:{path:"serviceVersion",default:"1.8"},supportedBindings:{path:"supportedBindings",default:["REST"]},layers:{path:"layers0",transform:e=>[e]}});async function zBe(e,r,t){let n={serviceItemId:Tf().replace(/-/gi,""),layerName:e,layers0:r},i=(0,UBe.default)(n,NBe()),a=(0,GBe.join)(t,"SceneServer");await Gi(a,JSON.stringify(i))}var rY=16;function HBe(e,r){let t=[],n=e.boundingVolume,i=e.lodMetricValue||.1,a={metricType:"maxScreenThreshold",maxError:r.mbs[3]*2*rY/i},o={metricType:"maxScreenThresholdSQ",maxError:Math.PI*.25*a.maxError*a.maxError};return n.constructor.name==="OrientedBoundingBox"?(t.push(o),t.push(a)):(t.push(a),t.push(o)),t}function tY(e){var n,i;let r=(n=e.lodSelection)==null?void 0:n.find(a=>a.metricType==="maxScreenThreshold"),t=r==null?void 0:r.maxError;if(!t){let a=(i=e.lodSelection)==null?void 0:i.find(o=>o.metricType==="maxScreenThresholdSQ");a&&(t=Math.sqrt(a.maxError/(Math.PI*.25)))}return t||(t=rY),e.mbs[3]*2*rY/t}var n5e=$e(t5e()),jot="4.0.0-alpha.20",o4={name:"PGM - Netpbm grayscale image format",id:"pgm",module:"tile-converter",version:jot,mimeTypes:["image/x-portable-graymap"],parse:async(e,r)=>(0,n5e.parsePGM)(new Uint8Array(e),r),extensions:["pgm"],options:{cubic:!1}};var bx=$e(Yu());var i5e={id:{path:"id",transform:e=>e.toUpperCase()},profile:{path:"profile",default:"meshpyramids"},version:{path:"version",default:"1.8"},resourcePattern:{path:"resourcePattern",default:["3dNodeIndexDocument","Attributes","SharedResource","Geometry"]},rootNode:{path:"rootNode",default:"./nodes/root"},extent:{path:"extent"},indexCRS:{path:"indexCRS",default:"http://www.opengis.net/def/crs/EPSG/0/4326"},vertexCRS:{path:"vertexCRS",default:"http://www.opengis.net/def/crs/EPSG/0/4326"},normalReferenceFrame:{path:"normalReferenceFrame",default:"east-north-up"},attributeEncoding:{path:"attributeEncoding",default:"application/octet-stream; version=1.6"},textureEncoding:{path:"textureEncoding",default:["image/jpeg","image/ktx2"]},lodType:{path:"lodType",default:"MeshPyramid"},lodModel:{path:"lodModel",default:"node-switching"},defaultGeometrySchema:{path:"defaultGeometrySchema",default:{geometryType:"triangles",header:[{property:"vertexCount",type:"UInt32"},{property:"featureCount",type:"UInt32"}],topology:"PerAttributeArray",ordering:["position","normal","uv0","color"],vertexAttributes:{position:{valueType:"Float32",valuesPerElement:3},normal:{valueType:"Float32",valuesPerElement:3},uv0:{valueType:"Float32",valuesPerElement:2},color:{valueType:"UInt8",valuesPerElement:4}},featureAttributeOrder:["id","faceRange"],featureAttributes:{id:{valueType:"UInt64",valuesPerElement:1},faceRange:{valueType:"UInt32",valuesPerElement:2}}}}};var Mot=()=>({wkid:{path:"wkid",default:4326},latestWkid:{path:"latestWkid",default:4326},vcsWkid:{path:"vcsWkid",default:5773},latestVcsWkid:{path:"latestVcsWkid",default:5773}}),Lot=()=>({heightModel:{path:"heightModel",default:"gravity_related_height"},vertCRS:{path:"vertCRS",default:"EGM96_Geoid"},heightUnit:{path:"heightUnit",default:"meter"}}),qot=()=>({nodesPerPage:{path:"nodesPerPage"},lodSelectionMetricType:{path:"lodSelectionMetricType",default:"maxScreenThresholdSQ"}}),Not=()=>({xmin:{path:"xmin"},ymin:{path:"ymin"},xmax:{path:"xmax"},ymax:{path:"ymax"},zmin:{path:"zmin"},zmax:{path:"zmax"}}),a5e=()=>({version:{path:"version",transform:e=>e.toUpperCase()},id:{path:"id",default:0},name:{path:"name"},href:{path:"href",default:"./layers/0"},layerType:{path:"layerType",default:"IntegratedMesh"},spatialReference:{path:"spatialReference",transform:e=>(0,bx.default)(e,Mot())},capabilities:{path:"capabilities",default:["View","Query"]},store:{path:"store",transform:e=>(0,bx.default)(e,i5e)},fullExtent:{path:"fullExtent",transform:e=>(0,bx.default)(e,Not())},heightModelInfo:{path:"heightModelInfo",transform:e=>(0,bx.default)(e,Lot())},nodePages:{path:"nodePages",transform:e=>(0,bx.default)(e,qot())},materialDefinitions:{path:"materialDefinitions",default:[]},textureSetDefinitions:{path:"textureSetDefinitions",default:[]},geometryDefinitions:{path:"geometryDefinitions",default:[]},attributeStorageInfo:{path:"attributeStorageInfo",default:[]},fields:{path:"fields",default:[]},popupInfo:{path:"popupInfo",default:null}});var sY=$e(Yu()),Uot=()=>({offset:{default:8},position:{default:{type:"Float32",component:3}},normal:{default:{type:"Float32",component:3}},uv0:{path:"hasTexture",transform:e=>e&&{type:"Float32",component:2}||!1,omitValues:[!1]},color:{default:{type:"UInt8",component:4}},uvRegion:{path:"hasUvRegions",transform:e=>e&&{type:"UInt16",component:4}||!1,omitValues:[!1]},featureId:{default:{binding:"per-feature",type:"UInt64",component:1}},faceRange:{default:{binding:"per-feature",type:"UInt32",component:2}}}),Got=()=>({"compressedAttributes.encoding":{default:"draco"},"compressedAttributes.attributes":{path:"geometryConfig",transform:e=>{let r=["position","normal"];return e.hasTexture&&r.push("uv0"),r.push("color"),e.hasUvRegions&&r.push("uv-region"),r.push("feature-index"),r}}}),o5e=()=>({geometryBuffers:{path:"geometryConfig",transform:e=>{let r=[(0,sY.default)(e,Uot())];return e.draco&&r.push((0,sY.default)({geometryConfig:e},Got())),r}}});var Nw=$e(Yu()),zot=()=>({renderMode:{path:"renderMode",default:"solid"},shininess:{path:"shininess",default:1},reflectivity:{path:"reflectivity",default:0},ambient:{path:"ambient",default:[1,1,1]},diffuse:{path:"diffuse",default:[1,1,1]},specular:{path:"specular",default:[0,0,0]},useVertexColorAlpha:{path:"useVertexColorAlpha",default:!1},vertexRegions:{path:"vertexRegions",default:!1},vertexColors:{path:"vertexColors",default:!0}}),Hot=()=>({name:{path:"name",default:"standard"},type:{path:"type",default:"standard"},params:{path:"params",transform:(e,r,t)=>(0,Nw.default)(t,zot())}}),Wot=()=>({id:{path:"id"},size:{path:"size"},href:{path:"href",default:["../textures/0"]},length:{path:"length"}}),Vot=()=>({encoding:{path:"encoding"},wrap:{path:"wrap",default:["none"]},atlas:{path:"atlas",default:!1},uvSet:{path:"uvSet",default:"uv0"},channels:{path:"channels",default:"rgb"},images:{path:"images",transform:(e,r,t)=>e.map(n=>(0,Nw.default)(n,Wot()))}}),s5e=()=>({materialDefinitions:{path:"materialDefinitionInfos",transform:Kot},textureDefinitions:{path:"textureDefinitionInfos",transform:Yot}});function Kot(e,r,t){let n={};for(let[i,a]of e.entries())n[`Mat${t.nodePath}${i}`]=(0,Nw.default)(a,Hot());return n}function Yot(e,r,t){if(!e)return null;let n={};for(let[i,a]of e.entries()){let o=`${t.nodePath}${i}`;a.imageIndex=o,n[o]=(0,Nw.default)(a,Vot())}return n}var s4=$e(U0()),u5e=$e(Xt()),uY=$e(Gs()),$ot=new Float32Array([-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1]);function l5e(e){var t,n;if(!((t=e==null?void 0:e.parentNode)==null?void 0:t.obb)||!((n=e==null?void 0:e.parentNode)==null?void 0:n.mbs))return[];let r=[];return Xot(r,e),Jot(r,e),r}function Xot(e,r){var o;let t=Qot(r.parentNode.obb),n=Zot(r);if(est(t,n))return;let a=`OBB of Tile (${r.id}) doesn't fit into Parent (${(o=r.parentNode)==null?void 0:o.id}) tile OBB`;e.push(a)}function Jot(e,r){var a;let t=c5e(r.mbs),n=c5e(r.parentNode.mbs);if(t.center.distanceTo(n.center)+t.radius>n.radius){let o=`MBS of Tile (${r.id}) doesn't fit into Parent (${(a=r.parentNode)==null?void 0:a.id}) tile MBS`;e.push(o)}}function c5e(e){return new s4.BoundingSphere([e[0],e[1],e[2]],e[3])}function Qot(e){let{center:r,halfSize:t,quaternion:n}=e;return new s4.OrientedBoundingBox().fromCenterHalfSizeQuaternion(r,t,n)}function Zot(e){let r=e.obb.halfSize,t=$ot,n=uY.Ellipsoid.WGS84.cartographicToCartesian(e.obb.center),i=[];for(let a=0;a<t.length;a+=3){let s=new u5e.Vector3(t[a]*=r[0],t[a+1]*=r[1],t[a+2]*=r[2]).transformByQuaternion(e.obb.quaternion).add(n);i=i.concat(s)}return i}function est(e,r){let t=!0;for(let n=0;n<r.length/3;n+=3){let i=[r[n],r[n+1],r[n+2]],a=uY.Ellipsoid.WGS84.cartesianToCartographic(i);if(e.distanceTo(a)>0){t=!1;break}}return t}var fs;(function(s){s.POINTS="POINTS",s.LINES="LINES",s.LINE_LOOP="LINE_LOOP",s.LINE_STRIP="LINE_STRIP",s.TRIANGLES="TRIANGLES",s.TRIANGLE_STRIP="TRIANGLE_STRIP",s.TRIANGLE_FAN="TRIANGLE_FAN"})(fs||(fs={}));var lY=class extends Array{enqueue(r){this.push(r)}dequeue(){return this.shift()}peek(){return this[0]}isEmpty(){return this.length===0}};var f5e=$e(require("process")),rst=4*1024*1024*1024,Uw=class extends lY{constructor(r=2e3,t=400){super();this.writePromise=null;this.fileMap={};this.listeningInterval=r,this.writeConcurrency=t}async enqueue(r,t=!1){if(t){let{archiveKey:n,writePromise:i}=r,a=await i();n&&a&&(this.fileMap[n]=a)}else super.enqueue(r),f5e.default.memoryUsage().rss>rst&&await this.startWrite()}startListening(){this.intervalId=setInterval(this.startWrite.bind(this),this.listeningInterval)}stopListening(){this.intervalId&&clearInterval(this.intervalId)}async startWrite(){this.writePromise||(this.writePromise=this.doWrite()),await this.writePromise,this.writePromise=null}async finalize(){this.stopListening(),await this.startWrite()}async doWrite(){for(;this.length;){let r=[],t=[];for(let i=0;i<this.writeConcurrency;i++){let a=this.dequeue();if(!a)break;let{archiveKey:o,writePromise:s}=a;t.push(o);let u=s();r.push(u)}let n=await Promise.allSettled(r);this.updateFileMap(t,n)}}updateFileMap(r,t){for(let n=0;n<r.length;n++){let i=r[n];i&&"value"in t[n]&&(this.fileMap[i]=t[n].value)}}};var fY=$e(require("path")),dY=$e(Yu());var d5e=$e(Yu()),p5e=()=>({mbs:{path:"mbs"},obb:{path:"obb"}}),tst=()=>({href:{path:"href"}}),nst=()=>oe(oe({id:{path:"id"}},tst()),p5e()),cY=()=>ze(oe({version:{path:"version"},id:{path:"id"},path:{path:"path"},level:{path:"level"}},p5e()),{lodSelection:{path:"lodSelection",default:[{metricType:"maxScreenThresholdSQ",maxError:196349.54374999998},{metricType:"maxScreenThreshold",maxError:999.9999999999999}]},children:{path:"children",default:null},neighbors:{path:"neighbors",default:null},parentNode:{path:"parentNode",transform:e=>(0,d5e.default)(e,nst()),default:null},sharedResource:{path:"sharedResource",default:null},featureData:{path:"featureData",default:null},geometryData:{path:"geometryData",default:null},textureData:{path:"textureData",default:null},attributeData:{path:"attributeData",default:null}});var _c=class{constructor(r,t){this.data=null;this.children=[];this._finalized=!1;this.inPageId=r,this.id=r===0?"root":r.toString(),this.converter=t}get finalized(){return this._finalized}async addData(r){return this.converter.options.instantNodeWriting?await this.write(r):this.data=r,this}async addChildren(r){let t=[];for(let i of r){let a=await i.load();t.push({id:i.id,href:`../${i.id}`,obb:a.obb,mbs:a.mbs})}this.children=this.children.concat(r);let n=this.data;this.converter.options.instantNodeWriting&&(n=await this.load()),n&&(n.children=n.children??[],n.children=n.children.concat(t)),this.converter.options.instantNodeWriting&&n&&await this.write(n)}async addNeighbors(){var t;if(this.finalized)return;let r=await this.load();for(let n of this.children){let i=await n.load();if(i.neighbors=i.neighbors??[],Number((t=r==null?void 0:r.children)==null?void 0:t.length)<1e3)for(let a of r.children||[])n.id!==a.id&&i.neighbors.push(oe({},a));else console.warn(`Node ${n.id}: neighbors attribute is omited because of large number of neigbors`),delete i.neighbors;this.converter.options.instantNodeWriting&&i&&await n.write(i),await n.save()}this.finalize()}async save(){this.data&&await this.write(this.data)}finalize(){this._finalized=!0;for(let r of this.children)r.flush()}async write(r){let t=(0,fY.join)(this.converter.layers0Path,"nodes",this.id);this.converter.options.slpk?await this.converter.writeQueue.enqueue({archiveKey:`nodes/${this.id}/3dNodeIndexDocument.json.gz`,writePromise:()=>xc(t,JSON.stringify(r),"3dNodeIndexDocument.json",!0,this.converter.compressList)},!0):await this.converter.writeQueue.enqueue({writePromise:()=>Gi(t,JSON.stringify(r))},!0)}async load(){if(this.data)return this.data;let r=this.id,t=(0,fY.join)(this.converter.layers0Path,"nodes",r),n="index.json";return this.converter.options.slpk&&(n="3dNodeIndexDocument.json"),await JF(t,n)}flush(){this.data=null}static async createRootNode(r,t){let n=_c.createRootNodeIndexDocument(r);return await new _c(0,t).addData(n)}static async createNode(r,t,n,i,a,o){let s=await _c.createNodeIndexDocument(r,t,n,i,a);return await new _c(i.index,o).addData(s)}static createRootNodeIndexDocument(r){let t=ze(oe({version:`{${Tf().toUpperCase()}}`,id:"root",level:0,lodSelection:[{metricType:"maxScreenThresholdSQ",maxError:0},{metricType:"maxScreenThreshold",maxError:0}]},r),{children:[]});return(0,dY.default)(t,cY())}static async createNodeIndexDocument(r,t,n,i,a){var d,p;let{texture:o,attributes:s}=a,u=i.index,l=await r.load(),c=ze(oe({version:l.version,id:u.toString(),level:l.level+1},t),{lodSelection:n,parentNode:{id:r.id,href:`../${r.id}`,mbs:l.mbs,obb:l.obb},children:[],neighbors:[]}),f=(0,dY.default)(c,cY());if(i.mesh&&(f.geometryData=[{href:"./geometries/0"}],f.sharedResource={href:"./shared"},o&&(f.textureData=[{href:"./textures/0"},{href:"./textures/1"}]),s&&s.length&&((p=(d=r.converter.layers0)==null?void 0:d.attributeStorageInfo)==null?void 0:p.length))){f.attributeData=[];for(let h=0;h<s.length;h++){let b=r.converter.layers0.attributeStorageInfo[h].key;f.attributeData.push({href:`./attributes/${b}/0`})}}return f}};var pY=async(e,r,t)=>{let n=r.type==="json";if(!e||!r.contentUrl||!n)return;let i=ze(oe({},t),{[e.loader.id]:{isTileset:n,assetGltfUpAxis:e.asset&&e.asset.gltfUpAxis||"Y"}}),a=await un(r.contentUrl,e.loader,i);a.root&&(r.children=[a.root])},hY=async(e,r,t)=>{let n=r.type==="json";if(!e||!r.contentUrl||n)return null;let i=ze(oe({},t),{[e.loader.id]:ze(oe({},t[e.loader.id]||{}),{isTileset:n,assetGltfUpAxis:e.asset&&e.asset.gltfUpAxis||"Y"})});return await un(r.contentUrl,e.loader,i)};var gY=$e(Xt());var u4=async(e,r,t,n,i,a=0)=>{if(i&&a>i)return;let o=[],s=await t(e,r);o.push(s);for(let u of e.children)await u4(u,s,t,n,i,a+1);n&&await n(o,r)};var ist=[fs.POINTS,fs.LINES,fs.LINE_LOOP,fs.LINE_STRIP,fs.TRIANGLES,fs.TRIANGLE_STRIP,fs.TRIANGLE_FAN],h5e=async e=>{let r={meshTopologyTypes:new Set,metadataClasses:new Set};if(!(e==null?void 0:e.gltfArrayBuffer))return r;let n=(await Jo(e.gltfArrayBuffer,_f,{gltf:{normalize:!1,loadBuffers:!1,loadImages:!1,decompressMeshes:!1}})).json;if(!n)return r;let i=ast(n),a=ost(n);return{meshTopologyTypes:i,metadataClasses:a}},ast=e=>{let r=new Set;for(let t of e.meshes||[])for(let n of t.primitives){let{mode:i}=n;typeof i!="number"&&(i=4),r.add(ist[i])}return r},ost=e=>{var n,i,a;let r=new Set,t=(a=(i=(n=e.extensions)==null?void 0:n[Sh])==null?void 0:i.schema)==null?void 0:a.classes;if(t)for(let o of Object.keys(t))r.add(o);return r},m5e=(e,r)=>{for(let t of r.meshTopologyTypes)e.meshTopologyTypes.add(t);for(let t of r.metadataClasses)e.metadataClasses.add(t)};var v5e,sst=(v5e=Mm.default.env)==null?void 0:v5e.IonToken,g5e=64,ust="3DTILES",lst="3DObject",cst=1800,fst="https://",Gw=class{constructor(){this.boundingVolumeWarnings=[];this.conversionStartTime=[0,0];this.refreshTokenTime=[0,0];this.sourceTileset=null;this.loadOptions={_nodeWorkers:!0,reuseWorkers:!0,useLocalLibraries:!0,basis:{format:"rgba32",workerUrl:"./modules/textures/dist/basis-worker-node.js"},draco:{workerUrl:"./modules/draco/dist/draco-worker-node.js"},fetch:{},modules:{}};this.geoidHeightModel=null;this.Loader=Sf;this.workerSource={};this.writeQueue=new Uw;this.compressList=null;this.preprocessData={meshTopologyTypes:new Set,metadataClasses:new Set};this.nodePages=new qo(Gi,g5e,this),this.options={},this.layers0Path="",this.materialMap=new Map,this.materialDefinitions=[],this.geometryMap=new Map,this.geometryConfigs=[],this.vertexCounter=0,this.layers0=null,this.featuresHashArray=[],this.refinementCounter={tilesCount:0,tilesWithAddRefineCount:0},this.validate=!1,this.generateTextures=!1,this.generateBoundingVolumes=!1,this.layersHasTexture=!1,this.compressList=null}async convert(r){if(wi)return console.log(vx),vx;this.conversionStartTime=Mm.default.hrtime();let{tilesetName:t,slpk:n,egmFilePath:i,inputUrl:a,validate:o,outputPath:s,draco:u=!0,sevenZipExe:l,maxDepth:c,token:f,generateTextures:d,generateBoundingVolumes:p,instantNodeWriting:h=!1,mergeMaterials:b=!0,inquirer:v,metadataClass:y}=r;this.options={maxDepth:c,slpk:n,sevenZipExe:l,egmFilePath:i,draco:u,token:f,inputUrl:a,instantNodeWriting:h,mergeMaterials:b,inquirer:v,metadataClass:y},this.compressList=this.options.instantNodeWriting&&[]||null,this.validate=Boolean(o),this.Loader=a.indexOf(fst)!==-1?lO:Sf,this.generateTextures=Boolean(d),this.generateBoundingVolumes=Boolean(p),this.writeQueue=new Uw,this.writeQueue.startListening(),console.log("Loading egm file..."),this.geoidHeightModel=await un(i,o4),console.log("Loading egm file completed!"),n&&this.nodePages.useWriteFunction(xc);try{let w=await this._fetchPreloadOptions(),A=a;w.url&&(A=w.url),w.headers&&(this.loadOptions.fetch={headers:w.headers}),this.sourceTileset=await un(A,this.Loader,this.loadOptions),await this.preprocessConversion()&&(await this._createAndSaveTileset(s,t),await this._finishConversion({slpk:Boolean(n),outputPath:s,tilesetName:t}))}catch(w){throw w}finally{await this.writeQueue.finalize(),Mi.getWorkerFarm({}).destroy()}return"success"}async preprocessConversion(){var i;console.log("Analyze source tileset");let r=this.sourceTileset.root;await u4(r,null,this.analyzeTile.bind(this),void 0,this.options.maxDepth);let{meshTopologyTypes:t,metadataClasses:n}=this.preprocessData;if(console.log("------------------------------------------------"),console.log("Preprocess results:"),console.log(`glTF mesh topology types: ${Array.from(t).join(", ")}`),n.size?console.log(`Feature metadata classes have been found: ${Array.from(n).join(", ")}`):console.log("Feature metadata classes have not been found"),console.log("------------------------------------------------"),!t.has(fs.TRIANGLES)&&!t.has(fs.TRIANGLE_STRIP))return console.log("The tileset is of unsupported mesh topology types. The conversion will be interrupted."),console.log("------------------------------------------------"),!1;if(n.size>1)if((i=this.options.metadataClass)==null?void 0:i.length)console.log(`${this.options.metadataClass} has been selected`);else if(this.options.inquirer){let a=await this.options.inquirer.prompt([{name:"metadataClass",type:"list",message:"Select feature metadata data class to convert...",choices:Array.from(n)}]);this.options.metadataClass=a.metadataClass,console.log(`${a.metadataClass} has been selected`)}else return console.log(`A feature metadata class has not been selected. Start the converter with option "--metadata-class". For example, "npx tile-converter ... --metadata-class ${Array.from(n)[0]}"`),console.log("------------------------------------------------"),!1;return!0}async analyzeTile(r,t){if(r.type==="json")return await pY(this.sourceTileset,r,this.loadOptions),null;r.id&&console.log(`[analyze]: ${r.id}`);let n=null;try{n=await hY(this.sourceTileset,r,ze(oe({},this.loadOptions),{"3d-tiles":ze(oe({},this.loadOptions["3d-tiles"]),{loadGLTF:!1})}))}catch{console.log(`[warning]: Failed to load ${r.contentUrl}. An I3S tile with empty content will be added to the output tileset`)}let i=await h5e(n);return m5e(this.preprocessData,i),null}async _createAndSaveTileset(r,t){var u,l,c;let n=(0,to.join)(`${r}`,`${t}`);try{await Pw(n)}catch{}this.layers0Path=(0,to.join)(n,"SceneServer","layers","0"),this.materialDefinitions=[],this.materialMap=new Map;let i=this.sourceTileset.root,a=Rk(i.boundingVolume,new gY.Matrix4(i.transform),null);this._formLayers0(t,a,(c=(l=(u=this.sourceTileset)==null?void 0:u.root)==null?void 0:l.boundingVolume)==null?void 0:c.region);let o=$K(a,this.geoidHeightModel);await this.nodePages.push({index:0,lodThreshold:0,obb:o.obb,children:[]});let s=await _c.createRootNode(o,this);await u4(i,{transform:new gY.Matrix4(i.transform),parentNodes:[s]},this.convertTile.bind(this),this.finalizeTile.bind(this),this.options.maxDepth),this.layers0.materialDefinitions=this.materialDefinitions,this.layers0.geometryDefinitions=(0,l4.default)(this.geometryConfigs.map(f=>({geometryConfig:ze(oe({},f),{draco:this.options.draco})})),o5e()),this.layersHasTexture===!1&&(this.layers0.store.defaultGeometrySchema.ordering=this.layers0.store.defaultGeometrySchema.ordering.filter(f=>f!=="uv0")),await this._writeLayers0(),zBe(t,this.layers0,n);for(let f of this.compressList||[])await XF(f),await YK(f);await this.nodePages.save(),await this.writeQueue.finalize(),await this._createSlpk(n)}_formLayers0(r,t,n){var s;if(!((s=this.sourceTileset)==null?void 0:s.root))return;let i=bBe(t);n&&(i.zmin=n[4],i.zmax=n[5]);let a=[i.xmin,i.ymin,i.xmax,i.ymax],o={version:`{${Tf().toUpperCase()}}`,id:0,name:r,href:"./layers/0",store:{id:`{${Tf().toUpperCase()}}`,extent:a},nodePages:{nodesPerPage:g5e},compressGeometry:this.options.draco,fullExtent:i};this.layers0=(0,l4.default)(o,a5e())}async _writeLayers0(){this.options.slpk?await this.writeQueue.enqueue({archiveKey:"3dSceneLayer.json.gz",writePromise:()=>xc(this.layers0Path,JSON.stringify(this.layers0),"3dSceneLayer.json")}):await this.writeQueue.enqueue({writePromise:()=>Gi(this.layers0Path,JSON.stringify(this.layers0))})}async _createSlpk(r){if(this.options.slpk){let t=(0,to.join)(r,"SceneServer","layers","0"),n=`${r}.slpk`;await fBe(t,n,0,".",this.options.sevenZipExe);try{await Pw(r)}catch{}}}async convertTile(r,t){if(r.type==="json"||r.type==="empty")return r.type==="json"&&(r.id&&console.log(`[load]: ${r.id}`),await pY(this.sourceTileset,r,this.loadOptions)),t;r.id&&console.log(`[convert]: ${r.id}`);let{parentNodes:n,transform:i}=t,a=i.clone();r.transform&&(a=a.multiplyRight(r.transform));let o=n[0],s=await this._createNode(o,r,a);return await o.addChildren(s),{transform:a,parentNodes:s}}async finalizeTile(r,t){for(let n of r)for(let i of n.parentNodes)await i.addNeighbors();for(let n of t.parentNodes)await n.save()}async _createNode(r,t,n){var p,h;this._checkAddRefinementTypeForTile(t),await this._updateTilesetOptions();let i=null;try{i=await hY(this.sourceTileset,t,this.loadOptions)}catch{console.log(`[warning]: Failed to load ${t.contentUrl}`)}let a=Rk(t.boundingVolume,n,null),o=$K(a,this.geoidHeightModel),s=qBe(i,this.options.metadataClass);s&&!((h=(p=this.layers0)==null?void 0:p.attributeStorageInfo)==null?void 0:h.length)&&this._convertPropertyTableToNodeAttributes(s);let u=await this._convertResources(t,n,a,i,r.inPageId,s),l=[],c=[],f=[],d={geometry:null,compressedGeometry:null,texture:null,hasUvRegions:!1,sharedResources:null,meshMaterial:null,vertexCount:null,attributes:null,featureCount:null,boundingVolumes:null};for(let b of u||[d]){this.layersHasTexture=this.layersHasTexture||Boolean(b.texture),this.generateBoundingVolumes&&b.boundingVolumes&&(o=b.boundingVolumes);let v=HBe(t,o),y=v.find(D=>D.metricType==="maxScreenThresholdSQ")||{maxError:0},w=await this._updateNodeInNodePages(y,o,t,r.inPageId,b),A=await _c.createNodeIndexDocument(r,o,v,w,b),C=await new _c(w.index,this).addData(A);l.push(C),w.mesh&&await this._writeResources(b,C.id),this.validate&&(this.boundingVolumeWarnings=l5e(A),this.boundingVolumeWarnings&&this.boundingVolumeWarnings.length&&console.warn("Bounding Volume Warnings: ",...this.boundingVolumeWarnings)),c.push(w.index),f.push(w)}return l}async _convertResources(r,t,n,i,a,o){var l;if(!this.isContentSupported(r)||!i)return null;let s={center:[],halfSize:[],quaternion:[]};return await eY(i,t,n,async()=>(await this.nodePages.push({index:0,obb:s},a)).index,o,this.featuresHashArray,(l=this.layers0)==null?void 0:l.attributeStorageInfo,this.options.draco,this.generateBoundingVolumes,this.options.mergeMaterials,this.geoidHeightModel,this.loadOptions.modules,this.options.metadataClass)}async _updateNodeInNodePages(r,t,n,i,a){let{meshMaterial:o,texture:s,vertexCount:u,featureCount:l,geometry:c,hasUvRegions:f}=a,d={index:0,lodThreshold:r.maxError,obb:t.obb,children:[]};c&&this.isContentSupported(n)&&(d.mesh={geometry:{definition:this.findOrCreateGeometryDefinition(Boolean(s),f),resource:0},attribute:{resource:0},material:{definition:0}});let p=a.nodeId,h;if(p?h=await this.nodePages.getNodeById(p):h=await this.nodePages.push(d,i),d.mesh||console.log(`[warning]: node ${h.index} is created with empty content`),qo.updateAll(h,d),o&&qo.updateMaterialByNodeId(h,this._findOrCreateMaterial(o)),s){let b=s.image.height*s.image.width;qo.updateTexelCountHintByNodeId(h,b)}return u&&(this.vertexCounter+=u,qo.updateVertexCountByNodeId(h,u)),qo.updateNodeAttributeByNodeId(h),l&&qo.updateFeatureCountByNodeId(h,l),this.nodePages.saveNode(h),h}async _writeResources(r,t){let{geometry:n,compressedGeometry:i,texture:a,sharedResources:o,attributes:s}=r,u=(0,to.join)(this.layers0Path,"nodes",t),l=(0,to.join)("nodes",t);await this._writeGeometries(n,i,u,l),await this._writeShared(o,u,l,t),await this._writeTexture(a,u,l),await this._writeAttributes(s,u,l)}async _writeGeometries(r,t,n,i){if(this.options.slpk){let a=(0,to.join)(n,"geometries");await this.writeQueue.enqueue({archiveKey:`${i}/geometries/0.bin.gz`,writePromise:()=>xc(a,r,"0.bin")})}else{let a=(0,to.join)(n,"geometries/0/");await this.writeQueue.enqueue({writePromise:()=>Gi(a,r,"index.bin")})}if(this.options.draco)if(this.options.slpk){let a=(0,to.join)(n,"geometries");await this.writeQueue.enqueue({archiveKey:`${i}/geometries/1.bin.gz`,writePromise:()=>xc(a,t,"1.bin")})}else{let a=(0,to.join)(n,"geometries/1/");await this.writeQueue.enqueue({writePromise:()=>Gi(a,t,"index.bin")})}}async _writeShared(r,t,n,i){if(!r)return;r.nodePath=i;let a=(0,l4.default)(r,s5e()),o=JSON.stringify(a);if(this.options.slpk){let s=(0,to.join)(t,"shared");await this.writeQueue.enqueue({archiveKey:`${n}/shared/sharedResource.json.gz`,writePromise:()=>xc(s,o,"sharedResource.json")})}else{let s=(0,to.join)(t,"shared/");await this.writeQueue.enqueue({writePromise:()=>Gi(s,o)})}}async _writeTexture(r,t,n){if(r){let i=this._getFormatByMimeType(r==null?void 0:r.mimeType),a=[],o=r.bufferView.data;switch(i){case"jpg":case"png":{if(a.push({name:"0",format:i}),await this.writeTextureFile(o,"0",i,t,n),this.generateTextures){a.push({name:"1",format:"ktx2"});let s=r.image.data.subarray(),u=new Uint8Array(s),l=xb(ze(oe({},r.image),{data:u}),jU,ze(oe({},jU.options),{["ktx2-basis-writer"]:{workerUrl:"./modules/textures/dist/ktx2-basis-writer-worker-node.js"},reuseWorkers:!0,_nodeWorkers:!0,useLocalLibraries:!0}));await this.writeTextureFile(l,"1","ktx2",t,n)}break}case"ktx2":if(a.push({name:"1",format:i}),await this.writeTextureFile(o,"1",i,t,n),this.generateTextures){a.push({name:"0",format:"jpg"});let s=xb(r.image.data[0],SU);await this.writeTextureFile(s,"0","jpg",t,n)}}this.layers0.textureSetDefinitions.length||(this.layers0.textureSetDefinitions.push({formats:a}),this.layers0.textureSetDefinitions.push({formats:a,atlas:!0}))}}async writeTextureFile(r,t,n,i,a){if(this.options.slpk){let o=(0,to.join)(i,"textures"),s=!1;await this.writeQueue.enqueue({archiveKey:`${a}/textures/${t}.${n}`,writePromise:()=>xc(o,r,`${t}.${n}`,s)})}else{let o=(0,to.join)(i,`textures/${t}/`);await this.writeQueue.enqueue({writePromise:()=>Gi(o,r,`index.${n}`)})}}async _writeAttributes(r=[],t,n){var i,a;if((r==null?void 0:r.length)&&((a=(i=this.layers0)==null?void 0:i.attributeStorageInfo)==null?void 0:a.length))for(let o=0;o<r.length;o++){let s=this.layers0.attributeStorageInfo[o].key,u=new Uint8Array(r[o]);if(this.options.slpk){let l=(0,to.join)(t,"attributes",s);await this.writeQueue.enqueue({archiveKey:`${n}/attributes/${s}.bin.gz`,writePromise:()=>xc(l,u,"0.bin")})}else{let l=(0,to.join)(t,`attributes/${s}/0`);await this.writeQueue.enqueue({writePromise:()=>Gi(l,u,"index.bin")})}}}_getFormatByMimeType(r){switch(r){case"image/jpeg":return"jpg";case"image/png":return"png";case"image/ktx2":return"ktx2";default:return"jpg"}}_findOrCreateMaterial(r){let t=(0,mY.default)(JSON.stringify(r));if(this.materialMap.has(t))return this.materialMap.get(t)||0;let n=this.materialDefinitions.push(r)-1;return this.materialMap.set(t,n),n}findOrCreateGeometryDefinition(r,t){let n={hasTexture:r,hasUvRegions:t},i=(0,mY.default)(JSON.stringify(n));if(this.geometryMap.has(i))return this.geometryMap.get(i)||0;let a=this.geometryConfigs.push(n)-1;return this.geometryMap.set(i,a),a}_convertPropertyTableToNodeAttributes(r){let t=0,n=oe({OBJECTID:[0]},r);for(let i in n){let a=n[i][0],o=CBe(i,a),s=DBe(t,i,o),u=kBe(o),l=OBe(i,u),c=RBe(n);this.layers0.attributeStorageInfo.push(s),this.layers0.fields.push(l),this.layers0.popupInfo=c,this.layers0.layerType=lst,t+=1}}async _finishConversion(r){let{tilesCount:t,tilesWithAddRefineCount:n}=this.refinementCounter,i=n?n/t*100:0,a=await e4(r),o=Mm.default.hrtime(this.conversionStartTime),s=ZF(o);console.log("------------------------------------------------"),console.log(`Finishing conversion of ${ust}`),console.log(`Total conversion time: ${s}`),console.log("Vertex count: ",this.vertexCounter),console.log("File(s) size: ",a," bytes"),console.log('Percentage of tiles with "ADD" refinement type:',i,"%"),console.log("------------------------------------------------")}async _fetchPreloadOptions(){if(!this.Loader.preload)return{};let r={"cesium-ion":{accessToken:this.options.token||sst}},t=await this.Loader.preload(this.options.inputUrl,r);return this.refreshTokenTime=Mm.default.hrtime(),oe(oe({},r),t)}async _updateTilesetOptions(){if(Mm.default.hrtime(this.refreshTokenTime)[0]<cst)return;this.refreshTokenTime=Mm.default.hrtime();let t=await this._fetchPreloadOptions();t.headers&&(this.loadOptions.fetch=ze(oe({},this.loadOptions.fetch),{headers:t.headers}),console.log("Authorization Bearer token has been updated"))}_checkAddRefinementTypeForTile(r){let t=1;r.refine===t&&(this.refinementCounter.tilesWithAddRefineCount+=1,console.warn('This tile uses "ADD" type of refinement')),this.refinementCounter.tilesCount+=1}isContentSupported(r){return["b3dm","glTF","scenegraph"].includes(r.type||"")}};var $5e=$e(require("path")),wY=$e(require("process")),X5e=$e(Yu());var yx=$e(b5e());function vY(e){switch(e){case"UInt8":return Uint8Array;case"UInt16":return Uint16Array;case"UInt32":return Uint32Array;case"Float32":return Float32Array;case"UInt64":return Float64Array;default:throw new Error(`parse i3s tile content: unknown type of data: ${e}`)}}var y5e={UInt8:yx.default.UNSIGNED_BYTE,UInt16:yx.default.UNSIGNED_SHORT,Float32:yx.default.FLOAT,UInt32:yx.default.UNSIGNED_INT,UInt64:yx.default.DOUBLE};function xx(e){switch(e){case"UInt8":return 1;case"UInt16":case"Int16":return 2;case"UInt32":case"Int32":case"Float32":return 4;case"UInt64":case"Int64":case"Float64":return 8;default:throw new Error(`parse i3s tile content: unknown size of data: ${e}`)}}var x5e="String",_5e="Oid32",E5e="Float64",w5e="Int16",tl;(function(a){a[a.DEFAULT=-1]="DEFAULT",a[a.LNGLAT=1]="LNGLAT",a[a.METER_OFFSETS=2]="METER_OFFSETS",a[a.LNGLAT_OFFSETS=3]="LNGLAT_OFFSETS",a[a.CARTESIAN=0]="CARTESIAN"})(tl||(tl={}));var Dh=$e(Xt()),f4=$e(Gs());var zw;(function(t){t.vertexCount="vertexCount",t.featureCount="featureCount"})(zw||(zw={}));function Ch(e,r=null){return r?`${e}?token=${r}`:e}function S5e(e,r){let{attributeData:t=[]}=r,n=[];for(let i=0;i<t.length;i++){let a=t[i].href.replace("./","");n.push(`${e}/${a}`)}return n}function A5e(e,r,t){let n=[],{attributeStorageInfo:i=[]}=e;for(let a=0;a<i.length;a++){let o=i[a].key;n.push(`${r}/nodes/${t}/attributes/${o}/0`)}return n}function T5e(e,r){let{attributeName:t,attributeType:n}=r;return t?{[t]:n?pst(n,e):null}:{}}function pst(e,r){switch(e){case x5e:return gst(r);case _5e:return C5e(r);case E5e:return mst(r);case w5e:return hst(r);default:return C5e(r)}}function C5e(e){let r=4;return new Uint32Array(e,r)}function hst(e){let r=4;return new Int16Array(e,r)}function mst(e){let r=8;return new Float64Array(e,r)}function gst(e){let r=0,t=8,n=4,i=[];try{let a=new DataView(e,r,n).getUint32(r,!0),o=new Uint32Array(e,t,a),s=t+a*n;for(let u of o){let l=new TextDecoder("utf-8"),c=new Uint8Array(e,s,u);i.push(l.decode(c)),s+=u}}catch(a){console.error("Parse string attribute error: ",a.message)}return i}var vst="4.0.0-alpha.20";var Hw={name:"I3S Attribute",id:"i3s-attribute",module:"i3s",version:vst,mimeTypes:["application/binary"],parse:async(e,r)=>T5e(e,r),extensions:["bin"],options:{},binary:!0};function D5e(e){return e.hasOwnProperty("objectIds")?"Oid32":e.hasOwnProperty("attributeValues")?e.attributeValues.valueType:""}async function k5e(e,r,t,n,i){var c;if(!((c=i==null?void 0:i.i3s)==null?void 0:c.colorsByAttribute))return e;let a=n.fields.find(({name:f})=>{var d,p;return f===((p=(d=i==null?void 0:i.i3s)==null?void 0:d.colorsByAttribute)==null?void 0:p.attributeName)});if(!a||!["esriFieldTypeDouble","esriFieldTypeInteger","esriFieldTypeSmallInteger"].includes(a.type))return e;let o=await O5e(a.name,t,n,i);if(!o)return e;let s=n.fields.find(({type:f})=>f==="esriFieldTypeOID");if(!s)return e;let u=await O5e(s.name,t,n,i);if(!u)return e;let l={};for(let f=0;f<u[s.name].length;f++)l[u[s.name][f]]=bst(o[a.name][f],i);for(let f=0;f<r.value.length;f++){let d=l[r.value[f]];!d||(i.i3s.colorsByAttribute.mode==="multiply"?d.forEach((p,h)=>{e.value[f*4+h]=e.value[f*4+h]*p/255}):e.value.set(d,f*4))}return e}function bst(e,r){var u;if(!((u=r==null?void 0:r.i3s)==null?void 0:u.colorsByAttribute))return[255,255,255,255];let{minValue:t,maxValue:n,minColor:i,maxColor:a}=r.i3s.colorsByAttribute,o=(e-t)/(n-t),s=[255,255,255,255];for(let l=0;l<i.length;l++)s[l]=Math.round((a[l]-i[l])*o+i[l]);return s}async function O5e(e,{attributeUrls:r},{attributeStorageInfo:t},n){var u;let i=t.findIndex(({name:l})=>e===l);if(i===-1)return null;let a=Ch(r[i],(u=n==null?void 0:n.i3s)==null?void 0:u.token),o=D5e(t[i]);return await un(a,Hw,{attributeName:e,attributeType:o})}var d4=new Dh.Vector3([0,0,0]);function yst(e){switch(e){case"ktx-etc2":case"dds":return Wk;case"ktx2":return H0;case"jpg":case"png":default:return Yb}}var xst="i3s-attribute-type";async function R5e(e,r,t,n,i){var o;let a={attributes:{},indices:null,featureIds:[],vertexCount:0,modelMatrix:new Dh.Matrix4,coordinateSystem:0,byteLength:0,texture:null};if(r.textureUrl){let s=Ch(r.textureUrl,(o=n==null?void 0:n.i3s)==null?void 0:o.token),u=yst(r.textureFormat),c=await(await fetch(s,n==null?void 0:n.fetch)).arrayBuffer();if(n==null?void 0:n.i3s.decodeTextures){if(u===Yb){let f=ze(oe({},r.textureLoaderOptions),{image:{type:"data"}});try{a.texture=await i.parse(c,f)}catch{a.texture=await Jo(c,u,f)}}else if(u===Wk||u===H0){let f=await un(c,u,r.textureLoaderOptions);u===H0&&(f=f[0]),a.texture={compressed:!0,mipmaps:!1,width:f[0].width,height:f[0].height,data:f}}}else a.texture=c}return a.material=kst(r.materialDefinition,a.texture),a.material&&(a.texture=null),await _st(e,a,r,t,n)}async function _st(e,r,t,n,i){var f,d;let a=e.byteLength,o,s,u=0,l=0,c;if(t.isDracoGeometry){let p=await Jo(e,Ub,{draco:{attributeNameEntry:xst}});s=p.header.vertexCount,c=(f=p.indices)==null?void 0:f.value;let{POSITION:h,NORMAL:b,COLOR_0:v,TEXCOORD_0:y,["feature-index"]:w,["uv-region"]:A}=p.attributes;o={position:h,normal:b,color:v,uv0:y,uvRegion:A,id:w},Est(o,p);let C=Ist(w);C&&Fst(o,C)}else{let{vertexAttributes:p,ordering:h,featureAttributes:b,featureAttributeOrder:v}=n.store.defaultGeometrySchema,y=Sst(e,n);u=y.byteOffset,s=y.vertexCount,l=y.featureCount;let{attributes:w,byteOffset:A}=I5e(e,u,p,s,h),{attributes:C}=I5e(e,A,b,l,v);Rst(C),o=wst(w,C)}if(!((d=i==null?void 0:i.i3s)==null?void 0:d.coordinateSystem)||i.i3s.coordinateSystem===tl.METER_OFFSETS){let p=Tst(o.position,t);r.modelMatrix=p.invert(),r.coordinateSystem=tl.METER_OFFSETS}else r.modelMatrix=Dst(o.position),r.coordinateSystem=tl.LNGLAT_OFFSETS;o.color=await k5e(o.color,o.id,t,n,i),r.attributes={positions:o.position,normals:o.normal,colors:F5e(o.color),texCoords:o.uv0,uvRegions:F5e(o.uvRegion||o.region)},r.indices=c||null,o.id&&o.id.value&&(r.featureIds=o.id.value);for(let p in r.attributes)r.attributes[p]||delete r.attributes[p];return r.vertexCount=s,r.byteLength=a,r}function Est(e,r){for(let t in r.loaderData.attributes){let n=r.loaderData.attributes[t];switch(n.name){case"POSITION":e.position.metadata=n.metadata;break;case"feature-index":e.id.metadata=n.metadata;break;default:break}}}function wst(e,r){return oe(oe({},e),r)}function F5e(e){return e&&(e.normalized=!0,e)}function Sst(e,r){let t=0,n=0,i=0;for(let{property:a,type:o}of r.store.defaultGeometrySchema.header){let s=vY(o);switch(a){case zw.vertexCount:n=new s(e,0,4)[0],t+=xx(o);break;case zw.featureCount:i=new s(e,4,4)[0],t+=xx(o);break;default:break}}return{vertexCount:n,featureCount:i,byteOffset:t}}function I5e(e,r,t,n,i){let a={};for(let o of i)if(t[o]){let{valueType:s,valuesPerElement:u}=t[o];if(r+n*u*xx(s)<=e.byteLength){let l=e.slice(r),c;if(s==="UInt64")c=Ast(l,n*u,xx(s));else{let f=vY(s);c=new f(l,0,n*u)}switch(a[o]={value:c,type:y5e[s],size:u},o){case"color":a.color.normalized=!0;break;case"position":case"region":case"normal":default:}r=r+n*u*xx(s)}else if(o!=="uv0")break}return{attributes:a,byteOffset:r}}function Ast(e,r,t){let n=[],i=new DataView(e),a=0;for(let o=0;o<r;o++){let s=i.getUint32(a,!0),u=i.getUint32(a+4,!0),l=s+2**32*u;n.push(l),a+=t}return new Uint32Array(n)}function Tst(e,r){let t=r.mbs,n=e.value,i=e.metadata,a=new Dh.Matrix4,o=new Dh.Vector3(t[0],t[1],t[2]),s=new Dh.Vector3;return f4.Ellipsoid.WGS84.cartographicToCartesian(o,s),f4.Ellipsoid.WGS84.eastNorthUpToFixedFrame(s,a),e.value=Cst(n,i,o),a}function Cst(e,r={},t){let n=new Float64Array(e.length),i=r["i3s-scale_x"]&&r["i3s-scale_x"].double||1,a=r["i3s-scale_y"]&&r["i3s-scale_y"].double||1;for(let o=0;o<n.length;o+=3)n[o]=e[o]*i+t.x,n[o+1]=e[o+1]*a+t.y,n[o+2]=e[o+2]+t.z;for(let o=0;o<n.length;o+=3)f4.Ellipsoid.WGS84.cartographicToCartesian(n.subarray(o,o+3),d4),n[o]=d4.x,n[o+1]=d4.y,n[o+2]=d4.z;return n}function Dst(e){var a,o;let r=e.metadata,t=((a=r==null?void 0:r["i3s-scale_x"])==null?void 0:a.double)||1,n=((o=r==null?void 0:r["i3s-scale_y"])==null?void 0:o.double)||1,i=new Dh.Matrix4;return i[0]=t,i[5]=n,i}function kst(e,r){let t;return e?t=ze(oe({},e),{pbrMetallicRoughness:e.pbrMetallicRoughness?oe({},e.pbrMetallicRoughness):{baseColorFactor:[255,255,255,255]}}):(t={pbrMetallicRoughness:{}},r?t.pbrMetallicRoughness.baseColorTexture={texCoord:0}:t.pbrMetallicRoughness.baseColorFactor=[255,255,255,255]),t.alphaCutoff=t.alphaCutoff||.25,t.alphaMode&&(t.alphaMode=t.alphaMode.toUpperCase()),t.emissiveFactor&&(t.emissiveFactor=P5e(t.emissiveFactor)),t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorFactor&&(t.pbrMetallicRoughness.baseColorFactor=P5e(t.pbrMetallicRoughness.baseColorFactor)),r&&Ost(t,r),t}function P5e(e){let r=[...e];for(let t=0;t<e.length;t++)r[t]=e[t]/255;return r}function Ost(e,r){let t={source:{image:r}};e.pbrMetallicRoughness&&e.pbrMetallicRoughness.baseColorTexture?e.pbrMetallicRoughness.baseColorTexture=ze(oe({},e.pbrMetallicRoughness.baseColorTexture),{texture:t}):e.emissiveTexture?e.emissiveTexture=ze(oe({},e.emissiveTexture),{texture:t}):e.pbrMetallicRoughness&&e.pbrMetallicRoughness.metallicRoughnessTexture?e.pbrMetallicRoughness.metallicRoughnessTexture=ze(oe({},e.pbrMetallicRoughness.metallicRoughnessTexture),{texture:t}):e.normalTexture?e.normalTexture=ze(oe({},e.normalTexture),{texture:t}):e.occlusionTexture&&(e.occlusionTexture=ze(oe({},e.occlusionTexture),{texture:t}))}function Rst(e){let{id:r,faceRange:t}=e;if(!r||!t)return;let n=r.value,i=t.value,a=i[i.length-1]+1,o=new Uint32Array(a*3),s=0,u=0;for(let l=1;l<i.length;l+=2){let c=Number(n[s]),f=i[l],d=i[l-1],p=f-d+1,h=u+p*3;o.fill(c,u,h),s++,u=h}e.id.value=o}function Fst(e,r){let t=e.id.value,n=new Float32Array(t.length);for(let i=0;i<t.length;i++)n[i]=r[t[i]];e.id.value=n}function Ist(e){var r,t;return(t=(r=e==null?void 0:e.metadata)==null?void 0:r["i3s-feature-ids"])==null?void 0:t.intArray}var Pst="4.0.0-alpha.20",B5e={name:"I3S Content (Indexed Scene Layers)",id:"i3s-content",module:"i3s",worker:!0,version:Pst,mimeTypes:["application/octet-stream"],parse:Bst,extensions:["bin"],options:{"i3s-content":{}}};async function Bst(e,r,t){let{tile:n,_tileOptions:i,tileset:a,_tilesetOptions:o}=(r==null?void 0:r.i3s)||{},s=i||n,u=o||a;return!s||!u?null:await R5e(e,s,u,r,t)}var M5e=$e(U0()),yY=$e(Gs());var jst="4.0.0-alpha.20";async function Mst(e,r){return JSON.parse(new TextDecoder().decode(e))}var j5e={name:"I3S Node Page",id:"i3s-node-page",module:"i3s",version:jst,mimeTypes:["application/json"],parse:Mst,extensions:["json"],options:{}};var p4=class{constructor(r,t="",n){this.nodePages=[];this.pendingNodePages=[];this.textureDefinitionsSelectedFormats=[];this.textureLoaderOptions={};var i,a;this.tileset=oe({},r),this.url=t,this.nodesPerPage=((i=r.nodePages)==null?void 0:i.nodesPerPage)||64,this.lodSelectionMetricType=(a=r.nodePages)==null?void 0:a.lodSelectionMetricType,this.options=n,this.nodesInNodePages=0,this.initSelectedFormatsForTextureDefinitions(r)}async getNodeById(r){var i;let t=Math.floor(r/this.nodesPerPage);if(!this.nodePages[t]&&!this.pendingNodePages[t]){let a=Ch(`${this.url}/nodepages/${t}`,(i=this.options.i3s)==null?void 0:i.token);this.pendingNodePages[t]={status:"Pending",promise:un(a,j5e,this.options)},this.nodePages[t]=await this.pendingNodePages[t].promise,this.nodesInNodePages+=this.nodePages[t].nodes.length,this.pendingNodePages[t].status="Done"}this.pendingNodePages[t].status==="Pending"&&(this.nodePages[t]=await this.pendingNodePages[t].promise);let n=r%this.nodesPerPage;return this.nodePages[t].nodes[n]}async formTileFromNodePages(r){let t=await this.getNodeById(r),n=[],i=[];for(let p of t.children||[])i.push(this.getNodeById(p));let a=await Promise.all(i);for(let p of a)n.push({id:p.index.toString(),obb:p.obb});let o,s,u,l="jpg",c=[],f=!1;if(t&&t.mesh){let{url:p,isDracoGeometry:h}=t.mesh.geometry&&this.getContentUrl(t.mesh.geometry)||{isDracoGeometry:!1};o=p,f=h;let{textureData:b,materialDefinition:v}=this.getInformationFromMaterial(t.mesh.material);u=v,l=b.format||l,b.name&&(s=`${this.url}/nodes/${t.mesh.material.resource}/textures/${b.name}`),this.tileset.attributeStorageInfo&&(c=A5e(this.tileset,this.url,t.mesh.attribute.resource))}let d=this.getLodSelection(t);return bY({id:r.toString(),lodSelection:d,obb:t.obb,contentUrl:o,textureUrl:s,attributeUrls:c,materialDefinition:u,textureFormat:l,textureLoaderOptions:this.textureLoaderOptions,children:n,isDracoGeometry:f})}getContentUrl(r){let t=null,n=this.tileset.geometryDefinitions[r.definition],i=-1;if(this.options.i3s&&this.options.i3s.useDracoGeometry&&(i=n.geometryBuffers.findIndex(a=>a.compressedAttributes&&a.compressedAttributes.encoding==="draco")),i===-1&&(i=n.geometryBuffers.findIndex(a=>!a.compressedAttributes)),i!==-1){let a=Boolean(n.geometryBuffers[i].compressedAttributes);t={url:`${this.url}/nodes/${r.resource}/geometries/${i}`,isDracoGeometry:a}}return t}getLodSelection(r){let t=[];return this.lodSelectionMetricType==="maxScreenThresholdSQ"&&t.push({metricType:"maxScreenThreshold",maxError:Math.sqrt(r.lodThreshold/(Math.PI*.25))}),t.push({metricType:this.lodSelectionMetricType,maxError:r.lodThreshold}),t}getInformationFromMaterial(r){var n,i,a;let t={textureData:{name:null}};if(r){let o=(n=this.tileset.materialDefinitions)==null?void 0:n[r.definition];if(o){t.materialDefinition=o;let s=(a=(i=o==null?void 0:o.pbrMetallicRoughness)==null?void 0:i.baseColorTexture)==null?void 0:a.textureSetDefinitionId;typeof s=="number"&&(t.textureData=this.textureDefinitionsSelectedFormats[s]||t.textureData)}}return t}initSelectedFormatsForTextureDefinitions(r){this.textureDefinitionsSelectedFormats=[];let t=this.getSupportedTextureFormats(),n=r.textureSetDefinitions||[];for(let i of n){let a=i&&i.formats||[],o=null;for(let s of t){let u=a.find(l=>l.format===s);if(u){o=u;break}}o&&o.format==="ktx2"&&(this.textureLoaderOptions.basis={format:Jb(),containerFormat:"ktx2",module:"encoder"}),this.textureDefinitionsSelectedFormats.push(o)}}getSupportedTextureFormats(){let r=[];if(!this.options.i3s||this.options.i3s.useCompressedTextures){let t=M2();t.has("etc2")&&r.push("ktx-etc2"),t.has("dxt")&&r.push("dds"),r.push("ktx2")}return r.push("jpg"),r.push("png"),r}};function L5e(e,r){let t=r.url||"",n;e.geometryData&&(n=`${t}/${e.geometryData[0].href}`);let i;e.textureData&&(i=`${t}/${e.textureData[0].href}`);let a;e.attributeData&&(a=S5e(t,e));let o=e.children||[];return bY(ze(oe({},e),{children:o,url:t,contentUrl:n,textureUrl:i,textureFormat:"jpg",attributeUrls:a,isDracoGeometry:!1}))}function bY(e){var s,u;let r={},t=[0,0,0,1];if(e.mbs)t=e.mbs,r.sphere=[...yY.Ellipsoid.WGS84.cartographicToCartesian(e.mbs.slice(0,3)),e.mbs[3]];else if(e.obb){r.box=[...yY.Ellipsoid.WGS84.cartographicToCartesian(e.obb.center),...e.obb.halfSize,...e.obb.quaternion];let c=new M5e.OrientedBoundingBox().fromCenterHalfSizeQuaternion(r.box.slice(0,3),e.obb.halfSize,e.obb.quaternion).getBoundingSphere();r.sphere=[...c.center,c.radius],t=[...e.obb.center,c.radius]}let n=(s=e.lodSelection)==null?void 0:s[0].metricType,i=(u=e.lodSelection)==null?void 0:u[0].maxError,a=rc.MESH,o=Tp.REPLACE;return ze(oe({},e),{mbs:t,boundingVolume:r,lodMetricType:n,lodMetricValue:i,type:a,refine:o})}async function q5e(e,r,t){var o;let n=t.url,i,a;if(e.nodePages)i=new p4(e,n,r),a=await i.formTileFromNodePages(0);else{let s=Ch(`${e.url}/nodes/root`,(o=r.i3s)==null?void 0:o.token);a=await un(s,Vf,ze(oe({},r),{i3s:ze(oe({},r.i3s),{loadContent:!1,isTileHeader:!0,isTileset:!1})}))}return ze(oe({},e),{loader:Vf,url:n,basePath:n,type:G0.I3S,nodePagesTile:i,root:a,lodMetricType:a.lodMetricType,lodMetricValue:a.lodMetricValue})}var Lst="4.0.0-alpha.20",qst=/layers\/[0-9]+$/,Nst=/nodes\/([0-9-]+|root)$/,Ust="504b0304",Gst="PointCloud",Vf={name:"I3S (Indexed Scene Layers)",id:"i3s",module:"i3s",version:Lst,mimeTypes:["application/octet-stream"],parse:zst,extensions:["bin"],options:{i3s:{token:null,isTileset:"auto",isTileHeader:"auto",tile:null,tileset:null,_tileOptions:null,_tilesetOptions:null,useDracoGeometry:!0,useCompressedTextures:!0,decodeTextures:!0,coordinateSystem:tl.METER_OFFSETS,colorsByAttribute:null}}};async function zst(e,r={},t){let n=t.url;if(r.i3s=r.i3s||{},Kst(e)===Ust)throw new Error("Files with .slpk extention currently are not supported by I3SLoader");let a;r.i3s.isTileset==="auto"?a=qst.test(n):a=r.i3s.isTileset;let o;return r.isTileHeader==="auto"?o=Nst.test(n):o=r.i3s.isTileHeader,a?e=await Wst(e,r,t):o?e=await Vst(e,t):e=await Hst(e,r),e}async function Hst(e,r){return await Jo(e,B5e,r)}async function Wst(e,r,t){let n=JSON.parse(new TextDecoder().decode(e));if((n==null?void 0:n.layerType)===Gst)throw new Error("Point Cloud layers currently are not supported by I3SLoader");return await q5e(n,r,t)}async function Vst(e,r){return e=JSON.parse(new TextDecoder().decode(e)),L5e(e,r)}function Kst(e){return e instanceof ArrayBuffer?[...new Uint8Array(e,0,4)].map(r=>r.toString(16).padStart(2,"0")).join(""):null}var N5e=$e(KK()),Yst="4.0.0-alpha.20",xY={id:"zip",module:"zip",name:"Zip Archive",version:Yst,extensions:["zip"],mimeTypes:["application/zip"],category:"archive",tests:["PK"],options:{},parse:$st};async function $st(e,r={}){let t=[],n={};try{let i=new N5e.default;return(await i.loadAsync(e,r)).forEach((o,s)=>{let u=s.name,l=Xst(i,u,r).then(c=>{n[o]=c});t.push(l)}),await Promise.all(t),n}catch(i){throw r.log.error(`Unable to read zip archive: ${i}`),i}}async function Xst(e,r,t={}){try{return await e.file(r).async(t.dataType||"arraybuffer")}catch(n){return t.log.error(`Unable to read ${r} from zip archive: ${n}`),n}}var U5e=$e(Xt()),G5e=$e(Gs()),z5e=$e(U0());function _Y(e,r){let t=[e.center[0],e.center[1],e.center[2]+r.getHeight(e.center[1],e.center[0])],n=G5e.Ellipsoid.WGS84.cartographicToCartesian(t,new U5e.Vector3),i=new z5e.OrientedBoundingBox().fromCenterHalfSizeQuaternion(n,e.halfSize,e.quaternion);return[...i.center,...i.halfAxes.toArray()]}var h4=$e(Yu()),Jst=()=>({version:{path:"version",default:"1.0"}}),H5e=()=>({boundingVolume:{path:"boundingVolume"},geometricError:{path:"geometricError"},content:{path:"content"},children:{path:"children",transform:e=>e.map(r=>(0,h4.default)(r,H5e()))}}),W5e=()=>({asset:{path:"asset",transform:e=>(0,h4.default)(e,Jst())},geometricError:{path:"root",transform:e=>e.geometricError},root:{path:"root",transform:e=>(0,h4.default)(e,H5e())}});var Kf=$e(Xt()),EY=$e(Gs());function V5e(e,r){let t=new Float32Array(e.length),n=Zst(r);for(let i=0;i<e.length;i+=2){let a=e.subarray(i,i+2),o=n.slice(i*2,i*2+4),s=Qst([a[0],a[1]]),u=[o[2]-o[0],o[3]-o[1]],l=[s[0]*u[0],s[1]*u[1]],c=[l[0]+o[0],l[1]+o[1]];t[i]=c[0],t[i+1]=c[1]}return t}function Qst(e){return[e[0]-Math.floor(e[0]),e[1]-Math.floor(e[1])]}function Zst(e){let r=65535,t=[];for(let n=0;n<e.length;n++)t[n]=e[n]/r;return t}var eut=new Kf.Matrix4([1,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,1]),K5e=new Kf.Vector3,m4=class{async convert(r,t=null){let n=await this.buildGltf(r,t);return bD({gltfEncoded:new Uint8Array(n),type:"b3dm",featuresLength:this._getFeaturesLength(t),batchTable:t},AG)}async buildGltf(r,t){let{tileContent:n,textureFormat:i,box:a}=r,{material:o,attributes:s,indices:u,modelMatrix:l}=n,c=new _n,f=await this._addI3sTextureToGltf(n,i,c),d=this._convertI3sMaterialToGltfMaterial(o,f),p=c.addMaterial(d),h=s.positions,b=h.value;s.uvRegions&&s.texCoords&&(s.texCoords.value=V5e(s.texCoords.value,s.uvRegions.value));let v=new Kf.Vector3(a),y=EY.Ellipsoid.WGS84.cartesianToCartographic(v,new Kf.Vector3);s.positions.value=this._normalizePositions(b,v,y,l),this._createBatchIds(n,t),s.normals&&!this._checkNormals(s.normals.value)&&delete s.normals;let w=u||t4(b.length/h.size),A=c.addMesh({attributes:s,indices:w,material:p,mode:4}),C=this._generateTransformMatrix(v),D=c.addNode({meshIndex:A,matrix:C}),P=c.addScene({nodeIndices:[D]});return c.setDefaultScene(P),c.createBinaryChunk(),bD(c.gltf,rG)}async _addI3sTextureToGltf(r,t,n){let{texture:i,material:a,attributes:o}=r,s=null,u=i;if(!i&&a&&(u=a.pbrMetallicRoughness&&a.pbrMetallicRoughness.baseColorTexture&&a.pbrMetallicRoughness.baseColorTexture.texture.source.image),u){let l=this._deduceMimeTypeFromFormat(t),c=n.addImage(u,l);s=n.addTexture({imageIndex:c}),delete o.colors}return s}_normalizePositions(r,t,n,i){let a=new Float32Array(r.length);for(let o=0;o<r.length;o+=3){let s=r.subarray(o,o+3),u=new Kf.Vector3(t),l=new Kf.Vector3(Array.from(s)).transform(i).add(n);EY.Ellipsoid.WGS84.cartographicToCartesian(l,K5e),l=K5e.subtract(u),a.set(l,o)}return a}_generateTransformMatrix(r){return new Kf.Matrix4().translate(r).multiplyLeft(eut)}_createBatchIds(r,t){let{featureIds:n}=r,{OBJECTID:i}=t||{};if(!(!n||!i)){for(let a=0;a<n.length;a++){let o=n[a],s=i.indexOf(o);n[a]=s}r.attributes._BATCHID={size:1,byteOffset:0,value:n}}}_deduceMimeTypeFromFormat(r){switch(r){case"jpg":return"image/jpeg";case"png":return"image/png";case"ktx2":return"image/ktx2";default:return console.warn(`Unexpected texture format in I3S: ${r}`),"image/jpeg"}}_convertI3sMaterialToGltfMaterial(r,t){let n=t!==null;return r?(t!==null&&(r=this._setGltfTexture(r,t)),r):(r={alphaMode:"OPAQUE",doubleSided:!1,pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1}},n?r.pbrMetallicRoughness.baseColorTexture={index:t,texCoord:0}:r.pbrMetallicRoughness.baseColorFactor=[1,1,1,1],r)}_setGltfTexture(r,t){let n=ze(oe({},r),{pbrMetallicRoughness:oe({},r.pbrMetallicRoughness)});return r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorTexture?n.pbrMetallicRoughness.baseColorTexture={index:t,texCoord:0}:r.emissiveTexture?n.emissiveTexture={index:t,texCoord:0}:r.pbrMetallicRoughness&&r.pbrMetallicRoughness.metallicRoughnessTexture?n.pbrMetallicRoughness.metallicRoughnessTexture={index:t,texCoord:0}:r.normalTexture?n.normalTexture={index:t,texCoord:0}:r.occlusionTexture&&(n.occlusionTexture={index:t,texCoord:0}),n}_getFeaturesLength(r){if(!r)return 0;let t=Object.keys(r)[0];return t?r[t].length:0}_checkNormals(r){return r.find(t=>t)}};var Y5e=async(e,r,t)=>{if(!e||!r.contentUrl)return null;let n=ze(oe({},t),{i3s:ze(oe({},t.i3s),{isTileset:!1,isTileHeader:!1,_tileOptions:{attributeUrls:r.attributeUrls,textureUrl:r.textureUrl,textureFormat:r.textureFormat,textureLoaderOptions:r.textureLoaderOptions,materialDefinition:r.materialDefinition,isDracoGeometry:r.isDracoGeometry,mbs:r.mbs},_tilesetOptions:{store:e.store,attributeStorageInfo:e.attributeStorageInfo,fields:e.fields}})});return await un(r.contentUrl,Vf,n)};var rut="I3S",Ww=class{constructor(){this.workerSource={};this.loaderOptions={_nodeWorkers:!0,reuseWorkers:!0,i3s:{coordinateSystem:tl.LNGLAT_OFFSETS,decodeTextures:!1},"i3s-content":{workerUrl:"./modules/i3s/dist/i3s-content-worker-node.js"}};this.options={},this.tilesetPath="",this.vertexCounter=0,this.conversionStartTime=[0,0],this.geoidHeightModel=null,this.sourceTileset=null,this.attributeStorageInfo=null,this.workerSource={}}async convert(r){var f;if(wi)return console.log(vx),vx;let{inputUrl:t,outputPath:n,tilesetName:i,maxDepth:a,egmFilePath:o}=r;if(this.conversionStartTime=wY.default.hrtime(),this.options={maxDepth:a},console.log("Loading egm file..."),this.geoidHeightModel=await un(o,o4),console.log("Loading egm file completed!"),this.sourceTileset=await un(t,Vf,this.loaderOptions),!this.sourceTileset)return;let s=(f=this.sourceTileset)==null?void 0:f.root;s.obb||(s.obb=XK(s.mbs)),this.tilesetPath=(0,$5e.join)(`${n}`,`${i}`),this.attributeStorageInfo=this.sourceTileset.attributeStorageInfo;try{await Pw(this.tilesetPath)}catch{}let u={boundingVolume:{box:_Y(s.obb,this.geoidHeightModel)},geometricError:tY(s),children:[]};await this._addChildren(s,u,1);let l=(0,X5e.default)({root:u},W5e());await Gi(this.tilesetPath,JSON.stringify(l),"tileset.json"),this._finishConversion({slpk:!1,outputPath:n,tilesetName:i}),Mi.getWorkerFarm({}).destroy()}async convertChildNode(r,t,n,i){let a=await this._loadChildNode(r,i);if(a.contentUrl){let o=await Y5e(this.sourceTileset,a,this.loaderOptions);if(!o){await this._addChildren(a,t,n+1);return}this.vertexCounter+=(o==null?void 0:o.vertexCount)||0;let s=null;this.attributeStorageInfo&&(s=await this._loadChildAttributes(a,this.attributeStorageInfo)),a.obb||(a.obb=XK(a.mbs));let u={box:_Y(a.obb,this.geoidHeightModel)},l={boundingVolume:u,geometricError:tY(a),children:[]},c={tileContent:o,box:u.box,textureFormat:a.textureFormat},d=await new m4().convert(c,s);l.content={uri:`${a.id}.b3dm`,boundingVolume:u},await Gi(this.tilesetPath,new Uint8Array(d),`${a.id}.b3dm`),t.children.push(l),await this._addChildren(a,l,n+1)}else await this._addChildren(a,t,n+1)}async _addChildren(r,t,n){if(this.options.maxDepth&&n>this.options.maxDepth)return;let i=[];for(let a of r.children||[])i.push(this.convertChildNode(r,t,n,a));await Promise.all(i)}async _loadChildNode(r,t){var i;let n;if((i=this.sourceTileset)==null?void 0:i.nodePagesTile)console.log(`Node conversion: ${t.id}`),n=await this.sourceTileset.nodePagesTile.formTileFromNodePages(parseInt(t.id));else{let a=this._relativeUrlToFullUrl(r.url,t.href),o={i3s:ze(oe({},this.loaderOptions),{isTileHeader:!0,loadContent:!1})};console.log(`Node conversion: ${a}`),n=await un(a,Vf,o)}return n}_relativeUrlToFullUrl(r="",t){let n=r.split("/"),i=t.split("/");for(let a of i)switch(a){case".":continue;case"..":n=n.slice(0,-1);break;default:n.push(a)}return n.join("/")}async _loadChildAttributes(r,t){let n=[],{attributeUrls:i=[]}=r;for(let o=0;o<i.length;o++){let s=i[o],u=t[o],l={attributeName:u.name,attributeType:this._getAttributeType(u)};n.push(un(s,Hw,l))}let a=await Promise.all(n);return this._replaceNestedArrays(a),Object.assign({},...a)}_getAttributeType(r){return r.attributeValues?r.attributeValues.valueType:r.objectIds?"Oid32":""}_replaceNestedArrays(r){for(let t=0;t<r.length;t++){let n=r[t];for(let i in n)n[i]=Array.from(n[i])}}async _finishConversion(r){let t=await e4(r),n=wY.default.hrtime(this.conversionStartTime),i=ZF(n);console.log("------------------------------------------------"),console.log(`Finish conversion of ${rut}`),console.log(`Total conversion time: ${i}`),console.log("Vertex count: ",this.vertexCounter),console.log("File(s) size: ",t," bytes"),console.log("------------------------------------------------")}};var g4=$e(require("path"));var tut="4.0.0-alpha.20",nut="https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip",SY=class{async install(r=""){console.log('Installing "EGM2008-5" model...');let t=await un(nut,xY,{}),n=process.cwd();r&&(n=(0,g4.join)(n,r)),await Gi(n,new Uint8Array(t["geoids/egm2008-5.pgm"]),"egm2008-5.pgm"),console.log('Installing "I3S Content Loader" worker'),await this.installFromNpm("i3s","i3s-content-worker-node.js"),console.log('Installing "Draco Loader" worker'),await this.installFromNpm("draco","draco-worker-node.js"),console.log('Installing "Draco Writer" worker'),await this.installFromNpm("draco","draco-writer-worker-node.js"),console.log('Installing "Basis Loader" worker'),await this.installFromNpm("textures","basis-worker-node.js"),console.log('Installing "KTX2 Basis Writer" worker'),await this.installFromNpm("textures","ktx2-basis-writer-worker-node.js"),console.log('Installing "Draco decoder" library'),await this.installFromUrl(Dp[ci.DECODER],"draco",ci.DECODER),await this.installFromUrl(Dp[ci.DECODER_WASM],"draco",ci.DECODER_WASM),console.log('Installing "Draco encoder" library'),await this.installFromUrl(Dp[ci.ENCODER],"draco",ci.ENCODER),console.log('Installing "Basis transcoder" library'),await this.installFromNpm("textures",ic.TRANSCODER,"libs"),await this.installFromNpm("textures",ic.TRANSCODER_WASM,"libs"),console.log('Installing "Basis encoder" library'),await this.installFromNpm("textures",ic.ENCODER,"libs"),await this.installFromNpm("textures",ic.ENCODER_WASM,"libs"),console.log('Installing "join-images" npm package'),await new hp().start({command:process.platform==="win32"?"npm.cmd":"npm",arguments:["install","sharp@0.30.4","join-images@1.1.3"],wait:0,ignoreStderr:!0}),console.log("All dependencies were installed succesfully.")}async installFromNpm(r,t,n=""){let a=await(await Xo(`https://unpkg.com/@loaders.gl/${r}@${tut}/dist/${n}/${t}`)).arrayBuffer();if(!a)return;let o=(0,g4.join)(process.cwd(),"modules",r,"dist",n);await Gi(o,a,t)}async installFromUrl(r,t,n){let a=await(await Xo(r)).arrayBuffer();if(!a)return;let o=(0,g4.join)(process.cwd(),"modules",t,"dist","libs");await Gi(o,a,n)}};function nl(e,r){if(e+1>=r.length)return"";let t=r[e+1];return t.indexOf("--")===0?"":t}function J5e(e,r){let t=nl(e,r);return console.log(`Input tileset value: ${t}`),console.log(`Modified tileset value: ${t.replace(/\\/g,"/")}`),t.replace(/\\/g,"/")}function Q5e(e){return e.reduce((r,t)=>{let n=t.indexOf("="),i=t.slice(0,n),a=t.slice(n+1,t.length);return t.includes("=")&&t.startsWith("--")&&a?r.concat(i,a):r.concat(t)},[])}function Z5e(e,r){let t=nl(e,r),n=Number.parseInt(t);return isFinite(n)?n:NaN}function Yf(e,r){let t=nl(e,r).toLowerCase().trim();return["--no-draco","--split-nodes"].includes(r[e])&&!t?!1:!t||t==="true"}var AY={I3S:"I3S",_3DTILES:"3DTILES"};async function iut(){let[,,...e]=process.argv;e.length===0&&TY();let r=Q5e(e),t=sut(r);if(t.installDependencies){new SY().install("deps");return}let n=out(t);await aut(n)}iut().catch(e=>{console.log(e),process.exit(1)});function TY(){console.log("cli: converter 3dTiles to I3S or I3S to 3dTiles..."),console.log('--install-dependencies [Run the script for installing dependencies. Run this options separate from others. Now "*.pgm" file installation is implemented]'),console.log("--max-depth [Maximal depth of hierarchical tiles tree traversal, default: infinite]"),console.log("--name [Tileset name]"),console.log('--output [Output folder, default: "data" folder]'),console.log("--instant-node-writing [Keep created 3DNodeIndexDocument files on disk instead of memory. This option reduce memory usage but decelerates conversion speed]"),console.log("--split-nodes [Prevent to merge similar materials that could lead to incorrect visualization (I3S to 3DTiles conversion only)]"),console.log("--slpk [Generate slpk (Scene Layer Packages) I3S output file]"),console.log("--tileset [tileset.json file (3DTiles) / http://..../SceneServer/layers/0 resource (I3S)]"),console.log("--input-type [tileset input type: I3S or 3DTILES]"),console.log('--7zExe [location of 7z.exe archiver to create slpk on Windows, default: "C:\\Program Files\\7-Zip\\7z.exe"]'),console.log('--egm [location of Earth Gravity Model *.pgm file to convert heights from ellipsoidal to gravity-related format. A model file can be loaded from GeographicLib https://geographiclib.sourceforge.io/html/geoid.html], default: "./deps/egm2008-5.zip"'),console.log("--token [Token for Cesium ION tilesets authentication]"),console.log("--no-draco [Disable draco compression for geometry]"),console.log("--generate-textures [Enable KTX2 textures generation if only one of (JPG, PNG) texture is provided or generate JPG texture if only KTX2 is provided]"),console.log("--generate-bounding-volumes [Generate obb and mbs bounding volumes from geometry]"),console.log('--metadata-class [One of the list of feature metadata classes, detected by converter on "analyze" stage, default: not set]'),console.log("--validate [Enable validation]"),process.exit(0)}async function aut(e){switch(console.log("------------------------------------------------"),console.log(`Starting conversion of ${e.inputType}`),console.log("------------------------------------------------"),e.inputType.toUpperCase()){case AY.I3S:new Ww().convert({inputUrl:e.tileset,outputPath:e.output,tilesetName:e.name,maxDepth:e.maxDepth,egmFilePath:e.egm});break;case AY._3DTILES:await new Gw().convert({inputUrl:e.tileset,outputPath:e.output,tilesetName:e.name,maxDepth:e.maxDepth,slpk:e.slpk,sevenZipExe:e.sevenZipExe,egmFilePath:e.egm,token:e.token,draco:e.draco,mergeMaterials:e.mergeMaterials,generateTextures:e.generateTextures,generateBoundingVolumes:e.generateBoundingVolumes,validate:e.validate,instantNodeWriting:e.instantNodeWriting,inquirer:rje.default});break;default:TY()}}function out(e){let r={name:()=>console.log("Missed: --name [Tileset name]"),output:()=>console.log("Missed: --output [Output path name]"),sevenZipExe:()=>console.log("Missed: --7zExe [7z archiver executable path]"),egm:()=>console.log("Missed: --egm [*.pgm earth gravity model file path]"),tileset:()=>console.log("Missed: --tileset [tileset.json file]"),inputType:()=>console.log("Missed/Incorrect: --input-type [tileset input type: I3S or 3DTILES]")},t=[];for(let n in r){let i=e[n],a=Boolean(i)&&n==="inputType"&&!Object.values(AY).includes(i.toUpperCase());(!i||a)&&t.push(r[n])}return t.length&&(t.forEach(n=>n()),process.exit(1)),e}function sut(e){let r={output:"data",instantNodeWriting:!1,mergeMaterials:!0,sevenZipExe:"C:\\Program Files\\7-Zip\\7z.exe",egm:(0,eje.join)(process.cwd(),"deps","egm2008-5.pgm"),draco:!0,installDependencies:!1,generateTextures:!1,generateBoundingVolumes:!1,validate:!1,slpk:!1};return e.forEach((t,n)=>{if(t.indexOf("--")===0)switch(t){case"--input-type":r.inputType=nl(n,e);break;case"--tileset":r.tileset=J5e(n,e);break;case"--name":r.name=nl(n,e);break;case"--output":r.output=nl(n,e);break;case"--instant-node-writing":r.instantNodeWriting=Yf(n,e);break;case"--split-nodes":r.mergeMaterials=Yf(n,e);break;case"--max-depth":r.maxDepth=Z5e(n,e);break;case"--slpk":r.slpk=Yf(n,e);break;case"--7zExe":r.sevenZipExe=nl(n,e);break;case"--egm":r.egm=nl(n,e);break;case"--token":r.token=nl(n,e);break;case"--no-draco":r.draco=Yf(n,e);break;case"--validate":r.validate=Yf(n,e);break;case"--install-dependencies":r.installDependencies=Yf(n,e);break;case"--generate-textures":r.generateTextures=Yf(n,e);break;case"--generate-bounding-volumes":r.generateBoundingVolumes=Yf(n,e);break;case"--metadata-class":r.metadataClass=nl(n,e);case"--help":TY();break;default:console.warn(`Unknown option ${t}`),process.exit(0)}}),r}
|
|
185
|
+
`).forEach(s=>{let u=a.exec(s);u&&i.push(Number(u[1]))});let o=e;for(;i.includes(o);)o++;r(o)})})}var R_e={command:"",arguments:[],port:5e3,autoPort:!0,wait:2e3,onSuccess:e=>{console.log(`Started ${e.props.command}`)}},hp=class{constructor({id:r="browser-driver"}={}){this.props=oe({},R_e);this.childProcess=null;this.port=0;this.id=r}async start(r){r=oe(oe({},R_e),r),this.props=r;let t=[...r.arguments];return this.port=Number(r.port),r.portArg&&(r.autoPort&&(this.port=await k_e(r.port)),t.push(r.portArg,String(this.port))),await new Promise((n,i)=>{try{this._setTimeout(()=>{r.onSuccess&&r.onSuccess(this),n({})}),console.log(`Spawning ${r.command} ${r.arguments.join(" ")}`);let a=O_e.spawn(r.command,t,r.spawn);this.childProcess=a,a.stdout.on("data",o=>{console.log(o.toString())}),a.stderr.on("data",o=>{console.log(`Child process wrote to stderr: "${o}".`),r.ignoreStderr||(this._clearTimeout(),i(new Error(o)))}),a.on("error",o=>{console.log(`Child process errored with ${o}`),this._clearTimeout(),i(o)}),a.on("close",o=>{console.log(`Child process exited with ${o}`),this.childProcess=null,this._clearTimeout(),n({})})}catch(a){i(a)}})}async stop(){this.childProcess&&(this.childProcess.kill(),this.childProcess=null)}async exit(r=0){try{await this.stop(),process.exit(r)}catch(t){console.error(t.message||t),process.exit(1)}}_setTimeout(r){Number(this.props.wait)>0&&(this.successTimer=setTimeout(r,this.props.wait))}_clearTimeout(){this.successTimer&&clearTimeout(this.successTimer)}};function T7(e,r){return!Mi.isSupported()||!co&&!(r==null?void 0:r._nodeWorkers)?!1:e.worker&&(r==null?void 0:r.worker)}async function C7(e,r,t,n,i){let a=e.id,o=J_(e,t),u=Mi.getWorkerFarm(t).getWorkerPool({name:a,url:o});t=JSON.parse(JSON.stringify(t)),n=JSON.parse(JSON.stringify(n||{}));let l=await u.startJob("process-on-worker",Y8r.bind(null,i));return l.postMessage("process",{input:r,options:t,context:n}),await(await l.result).result}async function Y8r(e,r,t,n){switch(t){case"done":r.done(n);break;case"error":r.error(new Error(n.error));break;case"process":let{id:i,input:a,options:o}=n;try{let s=await e(a,o);r.postMessage("done",{id:i,result:s})}catch(s){let u=s instanceof Error?s.message:"unknown error";r.postMessage("error",{id:i,error:u})}break;default:console.warn(`parse-with-worker unknown message ${t}`)}}function D7(e,r){return!Mi.isSupported()||!wi&&!(r==null?void 0:r._nodeWorkers)?!1:e.worker&&(r==null?void 0:r.worker)}function F_e(e,r=5){return typeof e=="string"?e.slice(0,r):ArrayBuffer.isView(e)?I_e(e.buffer,e.byteOffset,r):e instanceof ArrayBuffer?I_e(e,0,r):""}function I_e(e,r,t){if(e.byteLength<=r+t)return"";let n=new DataView(e),i="";for(let a=0;a<t;a++)i+=String.fromCharCode(n.getUint8(r+a));return i}function k7(e){try{return JSON.parse(e)}catch{throw new Error(`Failed to parse JSON from data starting with "${F_e(e)}"`)}}function O7(e,r,t){if(t=t||e.byteLength,e.byteLength<t||r.byteLength<t)return!1;let n=new Uint8Array(e),i=new Uint8Array(r);for(let a=0;a<n.length;++a)if(n[a]!==i[a])return!1;return!0}function Kl(...e){let r=e.map(a=>a instanceof ArrayBuffer?new Uint8Array(a):a),t=r.reduce((a,o)=>a+o.byteLength,0),n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n.buffer}function _a(...e){let r=e,t=r&&r.length>1&&r[0].constructor||null;if(!t)throw new Error('"concatenateTypedArrays" - incorrect quantity of arguments or arguments have incompatible data types');let n=r.reduce((o,s)=>o+s.length,0),i=new t(n),a=0;for(let o of r)i.set(o,a),a+=o.length;return i}function A0(e,r,t){let n=t!==void 0?new Uint8Array(e).subarray(r,r+t):new Uint8Array(e).subarray(r);return new Uint8Array(n).buffer}function $o(e,r){return Qr(e>=0),Qr(r>0),e+(r-1)&~(r-1)}function R7(e,r,t){let n;if(e instanceof ArrayBuffer)n=new Uint8Array(e);else{let i=e.byteOffset,a=e.byteLength;n=new Uint8Array(e.buffer||e.arrayBuffer,i,a)}return r.set(n,t),t+$o(n.byteLength,4)}function F7(e,r){let t=e.length,i=Math.ceil(t/r)*r-t,a="";for(let o=0;o<i;++o)a+=" ";return e+a}function pb(e,r,t,n){if(e)for(let i=0;i<n;i++)e.setUint8(r+i,t.charCodeAt(i));return r+n}function Q_(e,r,t,n){if(e)for(let i=0;i<n;i++)e.setUint8(r+i,t[i]);return r+n}function lD(e,r,t,n){let i=$o(t.byteLength,n),a=i-t.byteLength;if(e){let o=new Uint8Array(e.buffer,e.byteOffset+r,t.byteLength),s=new Uint8Array(t);o.set(s);for(let u=0;u<a;++u)e.setUint8(r+t.byteLength+u,32)}return r+=i,r}function hb(e,r,t,n){let a=new TextEncoder().encode(t);return r=lD(e,r,a,n),r}async function I7(e){let r=[];for await(let t of e)r.push(t);return Kl(...r)}function mp(e){return mp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},mp(e)}function P7(e,r){if(mp(e)!=="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(mp(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function B7(e){var r=P7(e,"string");return mp(r)==="symbol"?r:String(r)}function Io(e,r,t){return r=B7(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var $8r="",P_e={};function gp(e){for(let r in P_e)if(e.startsWith(r)){let t=P_e[r];e=e.replace(r,t)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${$8r}${e}`),e}var X8r="4.0.0-alpha.21",j7={name:"JSON",id:"json",module:"json",version:X8r,extensions:["json","geojson"],mimeTypes:["application/json"],category:"json",text:!0,parseTextSync:B_e,parse:async e=>B_e(new TextDecoder().decode(e)),options:{}};function B_e(e){return JSON.parse(e)}function cD(e){return Buffer.isBuffer(e)?new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer:e}function M7(e){if(Buffer.isBuffer(e))return e;if(ArrayBuffer.isView(e)&&(e=e.buffer),typeof Buffer!="undefined"&&e instanceof ArrayBuffer)return Buffer.from(e);throw new Error("toBuffer")}function j_e(e){return e&&typeof e=="object"&&e.isBuffer}function L7(e){return M7?M7(e):e}function fD(e){if(j_e(e))return cD(e);if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function q7(e){return(r,t)=>new Promise((n,i)=>e(r,t,(a,o)=>a?i(a):n(o)))}function M_e(e){return(r,t,n)=>new Promise((i,a)=>e(r,t,n,(o,s)=>o?a(o):i(s)))}var of={};xo(of,{dirname:()=>Q8r,filename:()=>J8r,join:()=>Z8r,resolve:()=>eDr});function L_e(){var r;if(typeof process!="undefined"&&typeof process.cwd!="undefined")return process.cwd();let e=(r=window.location)==null?void 0:r.pathname;return(e==null?void 0:e.slice(0,e.lastIndexOf("/")+1))||""}function J8r(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(r+1):""}function Q8r(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(0,r):""}function Z8r(...e){let r="/";return e=e.map((t,n)=>(n&&(t=t.replace(new RegExp(`^${r}`),"")),n!==e.length-1&&(t=t.replace(new RegExp(`${r}$`),"")),t)),e.join(r)}function eDr(...e){let r=[];for(let a=0;a<e.length;a++)r[a]=e[a];let t="",n=!1,i;for(let a=r.length-1;a>=-1&&!n;a--){let o;a>=0?o=r[a]:(i===void 0&&(i=L_e()),o=i),o.length!==0&&(t=`${o}/${t}`,n=o.charCodeAt(0)===Z_)}return t=rDr(t,!n),n?`/${t}`:t.length>0?t:"."}var Z_=47,N7=46;function rDr(e,r){let t="",n=-1,i=0,a,o=!1;for(let s=0;s<=e.length;++s){if(s<e.length)a=e.charCodeAt(s);else{if(a===Z_)break;a=Z_}if(a===Z_){if(!(n===s-1||i===1))if(n!==s-1&&i===2){if(t.length<2||!o||t.charCodeAt(t.length-1)!==N7||t.charCodeAt(t.length-2)!==N7){if(t.length>2){let u=t.length-1,l=u;for(;l>=0&&t.charCodeAt(l)!==Z_;--l);if(l!==u){t=l===-1?"":t.slice(0,l),n=s,i=0,o=!1;continue}}else if(t.length===2||t.length===1){t="",n=s,i=0,o=!1;continue}}r&&(t.length>0?t+="/..":t="..",o=!0)}else{let u=e.slice(n+1,s);t.length>0?t+=`/${u}`:t=u,o=!1}n=s,i=0}else a===N7&&i!==-1?++i:i=-1}return t}var T0={};xo(T0,{_readToArrayBuffer:()=>tDr,close:()=>K_e,createReadStream:()=>$_e,createWriteStream:()=>X_e,fstat:()=>Y_e,isSupported:()=>J_e,open:()=>V_e,read:()=>U7,readFile:()=>G_e,readFileSync:()=>z_e,readdir:()=>q_e,stat:()=>N_e,statSync:()=>U_e,writeFile:()=>H_e,writeFileSync:()=>W_e});var Xa=$e(require("fs"));var q_e,N_e,U_e,G_e,z_e,H_e,W_e,V_e,K_e,U7,Y_e,$_e,X_e,J_e=Boolean(Xa.default);try{q_e=q7(Xa.default.readdir),N_e=q7(Xa.default.stat),U_e=Xa.default.statSync,G_e=Xa.default.readFile,z_e=Xa.default.readFileSync,H_e=M_e(Xa.default.writeFile),W_e=Xa.default.writeFileSync,V_e=Xa.default.open,K_e=e=>new Promise((r,t)=>Xa.default.close(e,n=>n?t(n):r())),U7=Xa.default.read,Y_e=Xa.default.fstat,$_e=Xa.default.createReadStream,X_e=Xa.default.createWriteStream,J_e=Boolean(Xa.default)}catch{}async function tDr(e,r,t){let n=Buffer.alloc(t),{bytesRead:i}=await U7(e,n,0,t,r);if(i!==t)throw new Error("fs.read failed");return cD(n)}var iDr=e=>typeof e=="boolean",e2=e=>typeof e=="function",C0=e=>e!==null&&typeof e=="object",G7=e=>C0(e)&&e.constructor==={}.constructor;var Q_e=e=>Boolean(e)&&typeof e[Symbol.iterator]=="function",Z_e=e=>e&&typeof e[Symbol.asyncIterator]=="function";var Bs=e=>typeof Response!="undefined"&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json;var js=e=>typeof Blob!="undefined"&&e instanceof Blob,e2e=e=>e&&typeof e=="object"&&e.isBuffer;var aDr=e=>typeof ReadableStream!="undefined"&&e instanceof ReadableStream||C0(e)&&e2(e.tee)&&e2(e.cancel)&&e2(e.getReader);var oDr=e=>C0(e)&&e2(e.read)&&e2(e.pipe)&&iDr(e.readable),dD=e=>aDr(e)||oDr(e);var sDr=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,uDr=/^([-\w.]+\/[-\w.+]+)/;function r2e(e){let r=uDr.exec(e);return r?r[1]:e}function z7(e){let r=sDr.exec(e);return r?r[1]:""}var t2e=/\?.*/;function n2e(e){let r=e.match(t2e);return r&&r[0]}function mb(e){return e.replace(t2e,"")}function D0(e){return Bs(e)?e.url:js(e)?e.name||"":typeof e=="string"?e:""}function r2(e){if(Bs(e)){let r=e,t=r.headers.get("content-type")||"",n=mb(r.url);return r2e(t)||z7(n)}return js(e)?e.type||"":typeof e=="string"?z7(e):""}function i2e(e){return Bs(e)?e.headers["content-length"]||-1:js(e)?e.size:typeof e=="string"?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}async function pD(e){if(Bs(e))return e;let r={},t=i2e(e);t>=0&&(r["content-length"]=String(t));let n=D0(e),i=r2(e);i&&(r["content-type"]=i);let a=await cDr(e);a&&(r["x-first-bytes"]=a),typeof e=="string"&&(e=new TextEncoder().encode(e));let o=new Response(e,{headers:r});return Object.defineProperty(o,"url",{value:n}),o}async function a2e(e){if(!e.ok){let r=await lDr(e);throw new Error(r)}}async function lDr(e){let r=`Failed to fetch resource ${e.url} (${e.status}): `;try{let t=e.headers.get("Content-Type"),n=e.statusText;t.includes("application/json")&&(n+=` ${await e.text()}`),r+=n,r=r.length>60?`${r.slice(0,60)}...`:r}catch{}return r}async function cDr(e){let r=5;if(typeof e=="string")return`data:,${e.slice(0,r)}`;if(e instanceof Blob){let t=e.slice(0,5);return await new Promise(n=>{let i=new FileReader;i.onload=a=>{var o;return n((o=a==null?void 0:a.target)==null?void 0:o.result)},i.readAsDataURL(t)})}if(e instanceof ArrayBuffer){let t=e.slice(0,r);return`data:base64,${fDr(t)}`}return null}function fDr(e){let r="",t=new Uint8Array(e);for(let n=0;n<t.byteLength;n++)r+=String.fromCharCode(t[n]);return btoa(r)}var t2={};xo(t2,{fetchFileNode:()=>o2e});async function o2e(e,r){let t=/^file:\/\//;e.replace(t,"/");let n=e.split("?")[0];try{let i=await new Promise((l,c)=>{let f=T0.createReadStream(n,{encoding:null});f.once("readable",()=>l(f)),f.on("error",d=>c(d))}),a=200,o="OK",s=dDr(n),u=new Response(i,{headers:s,status:a,statusText:o});return Object.defineProperty(u,"url",{value:e}),u}catch(i){let a=i.message,o=400,s=a,u={},l=new Response(a,{headers:u,status:o,statusText:s});return Object.defineProperty(l,"url",{value:e}),l}}function dDr(e){let r={};if(!r["content-length"]){let t=T0.statSync(e);r["content-length"]=t.size}return e.endsWith(".gz")&&(e=e.slice(0,-3),r["content-encoding"]="gzip"),new Headers(r)}function pDr(e){return!hDr(e)&&!mDr(e)}function hDr(e){return e.startsWith("http:")||e.startsWith("https:")}function mDr(e){return e.startsWith("data:")}async function Xo(e,r){if(typeof e=="string"){let t=gp(e);return pDr(t)&&(t2==null?void 0:t2.fetchFileNode)?o2e(t,r):await fetch(t,r)}return await pD(e)}async function s2e(e,r,t){e=gp(e),wi||await T0.writeFile(e,L7(r),{flag:"w"}),Qr(!1)}function H7(e){if(typeof window!="undefined"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process!="undefined"&&typeof process.versions=="object"&&Boolean(process.versions.electron))return!0;let r=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent,t=e||r;return!!(t&&t.indexOf("Electron")>=0)}function Lu(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||H7()}var gDr=globalThis.self||globalThis.window||globalThis.global,gb=globalThis.window||globalThis.self||globalThis.global,vDr=globalThis.document||{},k0=globalThis.process||{},bDr=globalThis.console,Nwt=globalThis.navigator||{};var hD="4.0.0-alpha.21",zwt=Lu();function yDr(e){try{let r=window[e],t="__storage_test__";return r.setItem(t,t),r.removeItem(t),r}catch{return null}}var W7=class{constructor(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"sessionStorage";Io(this,"storage",void 0),Io(this,"id",void 0),Io(this,"config",void 0),this.storage=yDr(n),this.id=r,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(r){if(Object.assign(this.config,r),this.storage){let t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let r={};if(this.storage){let t=this.storage.getItem(this.id);r=t?JSON.parse(t):{}}return Object.assign(this.config,r),this}};function u2e(e){let r;return e<10?r="".concat(e.toFixed(2),"ms"):e<100?r="".concat(e.toFixed(1),"ms"):e<1e3?r="".concat(e.toFixed(0),"ms"):r="".concat((e/1e3).toFixed(2),"s"),r}function l2e(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8,t=Math.max(r-e.length,0);return"".concat(" ".repeat(t)).concat(e)}function mD(e,r,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,i=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>n&&(t=Math.min(t,n/e.width));let a=e.width*t,o=e.height*t,s=["font-size:1px;","padding:".concat(Math.floor(o/2),"px ").concat(Math.floor(a/2),"px;"),"line-height:".concat(o,"px;"),"background:url(".concat(i,");"),"background-size:".concat(a,"px ").concat(o,"px;"),"color:transparent;"].join("");return["".concat(r," %c+"),s]}var gD;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(gD||(gD={}));var xDr=10;function c2e(e){return typeof e!="string"?e:(e=e.toUpperCase(),gD[e]||gD.WHITE)}function f2e(e,r,t){if(!Lu&&typeof e=="string"){if(r){let n=c2e(r);e="[".concat(n,"m").concat(e,"[39m")}if(t){let n=c2e(t);e="[".concat(n+xDr,"m").concat(e,"[49m")}}return e}function d2e(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"],t=Object.getPrototypeOf(e),n=Object.getOwnPropertyNames(t),i=e;for(let a of n){let o=i[a];typeof o=="function"&&(r.find(s=>a===s)||(i[a]=o.bind(e)))}}function vb(e,r){if(!e)throw new Error(r||"Assertion failed")}function O0(){let e;if(Lu()&&gb.performance){var r,t;e=gb===null||gb===void 0||(r=gb.performance)===null||r===void 0||(t=r.now)===null||t===void 0?void 0:t.call(r)}else if("hrtime"in k0){var n;let i=k0===null||k0===void 0||(n=k0.hrtime)===null||n===void 0?void 0:n.call(k0);e=i[0]*1e3+i[1]/1e6}else e=Date.now();return e}var bb={debug:Lu()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},_Dr={enabled:!0,level:0};function Ms(){}var p2e={},h2e={once:!0},sf=class{constructor(){let{id:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};Io(this,"id",void 0),Io(this,"VERSION",hD),Io(this,"_startTs",O0()),Io(this,"_deltaTs",O0()),Io(this,"_storage",void 0),Io(this,"userData",{}),Io(this,"LOG_THROTTLE_TIMEOUT",0),this.id=r,this.userData={},this._storage=new W7("__probe-".concat(this.id,"__"),_Dr),this.timeStamp("".concat(this.id," started")),d2e(this),Object.seal(this)}set level(r){this.setLevel(r)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((O0()-this._startTs).toPrecision(10))}getDelta(){return Number((O0()-this._deltaTs).toPrecision(10))}set priority(r){this.level=r}get priority(){return this.level}getPriority(){return this.level}enable(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:r}),this}setLevel(r){return this._storage.setConfiguration({level:r}),this}get(r){return this._storage.config[r]}set(r,t){this._storage.setConfiguration({[r]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(r,t){vb(r,t)}warn(r){return this._getLogFunction(0,r,bb.warn,arguments,h2e)}error(r){return this._getLogFunction(0,r,bb.error,arguments)}deprecated(r,t){return this.warn("`".concat(r,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(r,t){return this.error("`".concat(r,"` has been removed. Use `").concat(t,"` instead"))}probe(r,t){return this._getLogFunction(r,t,bb.log,arguments,{time:!0,once:!0})}log(r,t){return this._getLogFunction(r,t,bb.debug,arguments)}info(r,t){return this._getLogFunction(r,t,console.info,arguments)}once(r,t){return this._getLogFunction(r,t,bb.debug||bb.info,arguments,h2e)}table(r,t,n){return t?this._getLogFunction(r,t,console.table||Ms,n&&[n],{tag:ADr(t)}):Ms}image(r){let{logLevel:t,priority:n,image:i,message:a="",scale:o=1}=r;return this._shouldLog(t||n)?Lu()?SDr({image:i,message:a,scale:o}):wDr({image:i,message:a,scale:o}):Ms}time(r,t){return this._getLogFunction(r,t,console.time?console.time:console.info)}timeEnd(r,t){return this._getLogFunction(r,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(r,t){return this._getLogFunction(r,t,console.timeStamp||Ms)}group(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1},i=g2e({logLevel:r,message:t,opts:n}),{collapsed:a}=n;return i.method=(a?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(r,t,Object.assign({},n,{collapsed:!0}))}groupEnd(r){return this._getLogFunction(r,"",console.groupEnd||Ms)}withGroup(r,t,n){this.group(r,t)();try{n()}finally{this.groupEnd(r)()}}trace(){console.trace&&console.trace()}_shouldLog(r){return this.isEnabled()&&this.getLevel()>=m2e(r)}_getLogFunction(r,t,n,i,a){if(this._shouldLog(r)){a=g2e({logLevel:r,message:t,args:i,opts:a}),n=n||a.method,vb(n),a.total=this.getTotal(),a.delta=this.getDelta(),this._deltaTs=O0();let o=a.tag||a.message;if(a.once&&o)if(!p2e[o])p2e[o]=O0();else return Ms;return t=EDr(this.id,a.message,a),n.bind(console,t,...a.args)}return Ms}};Io(sf,"VERSION",hD);function m2e(e){if(!e)return 0;let r;switch(typeof e){case"number":r=e;break;case"object":r=e.logLevel||e.priority||0;break;default:return 0}return vb(Number.isFinite(r)&&r>=0),r}function g2e(e){let{logLevel:r,message:t}=e;e.logLevel=m2e(r);let n=e.args?Array.from(e.args):[];for(;n.length&&n.shift()!==t;);switch(typeof r){case"string":case"function":t!==void 0&&n.unshift(t),e.message=r;break;case"object":Object.assign(e,r);break;default:}typeof e.message=="function"&&(e.message=e.message());let i=typeof e.message;return vb(i==="string"||i==="object"),Object.assign(e,{args:n},e.opts)}function EDr(e,r,t){if(typeof r=="string"){let n=t.time?l2e(u2e(t.total)):"";r=t.time?"".concat(e,": ").concat(n," ").concat(r):"".concat(e,": ").concat(r),r=f2e(r,t.color,t.background)}return r}function wDr(e){let{image:r,message:t="",scale:n=1}=e;return console.warn("removed"),Ms}function SDr(e){let{image:r,message:t="",scale:n=1}=e;if(typeof r=="string"){let a=new Image;return a.onload=()=>{let o=mD(a,t,n);console.log(...o)},a.src=r,Ms}let i=r.nodeName||"";if(i.toLowerCase()==="img")return console.log(...mD(r,t,n)),Ms;if(i.toLowerCase()==="canvas"){let a=new Image;return a.onload=()=>console.log(...mD(a,t,n)),a.src=r.toDataURL(),Ms}return Ms}function ADr(e){for(let r in e)for(let t in e[r])return t||"untitled";return"empty"}var gSt=new sf({id:"@probe.gl/log"});var V7=new sf({id:"loaders.gl"}),K7=class{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}},Y7=class{constructor(){this.console=console}log(...r){return this.console.log.bind(this.console,...r)}info(...r){return this.console.info.bind(this.console,...r)}warn(...r){return this.console.warn.bind(this.console,...r)}error(...r){return this.console.error.bind(this.console,...r)}};var $7={fetch:null,mimeType:void 0,nothrow:!1,log:new Y7,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:wi,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},v2e={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function X7(){globalThis.loaders=globalThis.loaders||{};let{loaders:e}=globalThis;return e._state=e._state||{},e._state}var yb=()=>{let e=X7();return e.globalOptions=e.globalOptions||oe({},$7),e.globalOptions};function b2e(e,r,t,n){return t=t||[],t=Array.isArray(t)?t:[t],TDr(e,t),DDr(r,e,n)}function TDr(e,r){y2e(e,null,$7,v2e,r);for(let t of r){let n=e&&e[t.id]||{},i=t.options&&t.options[t.id]||{},a=t.deprecatedOptions&&t.deprecatedOptions[t.id]||{};y2e(n,t.id,i,a,r)}}function y2e(e,r,t,n,i){let a=r||"Top level",o=r?`${r}.`:"";for(let s in e){let u=!r&&C0(e[s]),l=s==="baseUri"&&!r,c=s==="workerUrl"&&r;if(!(s in t)&&!l&&!c){if(s in n)V7.warn(`${a} loader option '${o}${s}' no longer supported, use '${n[s]}'`)();else if(!u){let f=CDr(s,i);V7.warn(`${a} loader option '${o}${s}' not recognized. ${f}`)()}}}}function CDr(e,r){let t=e.toLowerCase(),n="";for(let i of r)for(let a in i.options){if(e===a)return`Did you mean '${i.id}.${a}'?`;let o=a.toLowerCase();(t.startsWith(o)||o.startsWith(t))&&(n=n||`Did you mean '${i.id}.${a}'?`)}return n}function DDr(e,r,t){let n=e.options||{},i=oe({},n);return kDr(i,t),i.log===null&&(i.log=new K7),x2e(i,yb()),x2e(i,r),i}function x2e(e,r){for(let t in r)if(t in r){let n=r[t];G7(n)&&G7(e[t])?e[t]=oe(oe({},e[t]),r[t]):e[t]=r[t]}}function kDr(e,r){r&&!("baseUri"in e)&&(e.baseUri=r)}function n2(e){return e?(Array.isArray(e)&&(e=e[0]),Array.isArray(e==null?void 0:e.extensions)):!1}function J7(e){Qr(e,"null loader"),Qr(n2(e),"invalid loader");let r;return Array.isArray(e)&&(r=e[1],e=e[0],e=ze(oe({},e),{options:oe(oe({},e.options),r)})),((e==null?void 0:e.parseTextSync)||(e==null?void 0:e.parseText))&&(e.text=!0),e.text||(e.binary=!0),e}var ODr=()=>{let e=X7();return e.loaderRegistry=e.loaderRegistry||[],e.loaderRegistry};function _2e(){return ODr()}var E2e=new sf({id:"loaders.gl"});var RDr=/\.([^.]+)$/;async function w2e(e,r=[],t,n){if(!A2e(e))return null;let i=S2e(e,r,ze(oe({},t),{nothrow:!0}),n);if(i)return i;if(js(e)&&(e=await e.slice(0,10).arrayBuffer(),i=S2e(e,r,t,n)),!i&&!(t==null?void 0:t.nothrow))throw new Error(T2e(e));return i}function S2e(e,r=[],t,n){if(!A2e(e))return null;if(r&&!Array.isArray(r))return J7(r);let i=[];r&&(i=i.concat(r)),(t==null?void 0:t.ignoreRegisteredLoaders)||i.push(..._2e()),IDr(i);let a=FDr(e,i,t,n);if(!a&&!(t==null?void 0:t.nothrow))throw new Error(T2e(e));return a}function FDr(e,r,t,n){let i=D0(e),a=r2(e),o=mb(i)||(n==null?void 0:n.url),s=null,u="";return(t==null?void 0:t.mimeType)&&(s=Q7(r,t==null?void 0:t.mimeType),u=`match forced by supplied MIME type ${t==null?void 0:t.mimeType}`),s=s||PDr(r,o),u=u||(s?`matched url ${o}`:""),s=s||Q7(r,a),u=u||(s?`matched MIME type ${a}`:""),s=s||jDr(r,e),u=u||(s?`matched initial data ${D2e(e)}`:""),s=s||Q7(r,t==null?void 0:t.fallbackMimeType),u=u||(s?`matched fallback MIME type ${a}`:""),u&&E2e.log(1,`selectLoader selected ${s==null?void 0:s.name}: ${u}.`),s}function A2e(e){return!(e instanceof Response&&e.status===204)}function T2e(e){let r=D0(e),t=r2(e),n="No valid loader found (";n+=r?`${of.filename(r)}, `:"no url provided, ",n+=`MIME type: ${t?`"${t}"`:"not provided"}, `;let i=e?D2e(e):"";return n+=i?` first bytes: "${i}"`:"first bytes: not available",n+=")",n}function IDr(e){for(let r of e)J7(r)}function PDr(e,r){let t=r&&RDr.exec(r),n=t&&t[1];return n?BDr(e,n):null}function BDr(e,r){r=r.toLowerCase();for(let t of e)for(let n of t.extensions)if(n.toLowerCase()===r)return t;return null}function Q7(e,r){for(let t of e)if(t.mimeTypes&&t.mimeTypes.includes(r)||r===`application/x.${t.id}`)return t;return null}function jDr(e,r){if(!r)return null;for(let t of e)if(typeof r=="string"){if(MDr(r,t))return t}else if(ArrayBuffer.isView(r)){if(C2e(r.buffer,r.byteOffset,t))return t}else if(r instanceof ArrayBuffer&&C2e(r,0,t))return t;return null}function MDr(e,r){return r.testText?r.testText(e):(Array.isArray(r.tests)?r.tests:[r.tests]).some(n=>e.startsWith(n))}function C2e(e,r,t){return(Array.isArray(t.tests)?t.tests:[t.tests]).some(i=>LDr(e,r,t,i))}function LDr(e,r,t,n){if(n instanceof ArrayBuffer)return O7(n,e,n.byteLength);switch(typeof n){case"function":return n(e,t);case"string":let i=Z7(e,r,n.length);return n===i;default:return!1}}function D2e(e,r=5){return typeof e=="string"?e.slice(0,r):ArrayBuffer.isView(e)?Z7(e.buffer,e.byteOffset,r):e instanceof ArrayBuffer?Z7(e,0,r):""}function Z7(e,r,t){if(e.byteLength<r+t)return"";let n=new DataView(e),i="";for(let a=0;a<t;a++)i+=String.fromCharCode(n.getUint8(r+a));return i}var qDr=256*1024;function*k2e(e,r){let t=(r==null?void 0:r.chunkSize)||qDr,n=0,i=new TextEncoder;for(;n<e.length;){let a=Math.min(e.length-n,t),o=e.slice(n,n+a);n+=a,yield i.encode(o)}}var NDr=256*1024;function*O2e(e,r={}){let{chunkSize:t=NDr}=r,n=0;for(;n<e.byteLength;){let i=Math.min(e.byteLength-n,t),a=new ArrayBuffer(i),o=new Uint8Array(e,n,i);new Uint8Array(a).set(o),n+=i,yield a}}var UDr=1024*1024;async function*R2e(e,r){let t=(r==null?void 0:r.chunkSize)||UDr,n=0;for(;n<e.size;){let i=n+t,a=await e.slice(n,i).arrayBuffer();n=i,yield a}}function eN(e,r){return wi?GDr(e,r):zDr(e,r)}async function*GDr(e,r){let t=e.getReader(),n;try{for(;;){let i=n||t.read();(r==null?void 0:r._streamReadAhead)&&(n=t.read());let{done:a,value:o}=await i;if(a)return;yield fD(o)}}catch{t.releaseLock()}}async function*zDr(e,r){for await(let t of e)yield fD(t)}function F2e(e,r){if(typeof e=="string")return k2e(e,r);if(e instanceof ArrayBuffer)return O2e(e,r);if(js(e))return R2e(e,r);if(dD(e))return eN(e,r);if(Bs(e))return eN(e.body,r);throw new Error("makeIterator")}var I2e="Cannot convert supplied data type";function HDr(e,r,t){if(r.text&&typeof e=="string")return e;if(e2e(e)&&(e=e.buffer),e instanceof ArrayBuffer){let n=e;return r.text&&!r.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(e)){if(r.text&&!r.binary)return new TextDecoder("utf8").decode(e);let n=e.buffer,i=e.byteLength||e.length;return(e.byteOffset!==0||i!==n.byteLength)&&(n=n.slice(e.byteOffset,e.byteOffset+i)),n}throw new Error(I2e)}async function P2e(e,r,t){let n=e instanceof ArrayBuffer||ArrayBuffer.isView(e);if(typeof e=="string"||n)return HDr(e,r,t);if(js(e)&&(e=await pD(e)),Bs(e)){let i=e;return await a2e(i),r.binary?await i.arrayBuffer():await i.text()}if(dD(e)&&(e=F2e(e,t)),Q_e(e)||Z_e(e))return I7(e);throw new Error(I2e)}function vD(e,r){let t=yb(),n=e||t;return typeof n.fetch=="function"?n.fetch:C0(n.fetch)?i=>Xo(i,n.fetch):(r==null?void 0:r.fetch)?r==null?void 0:r.fetch:Xo}function B2e(e,r,t){if(t)return t;let n=oe({fetch:vD(r,e)},e);if(n.url){let i=mb(n.url);n.baseUrl=i,n.queryString=n2e(n.url),n.filename=of.filename(i),n.baseUrl=of.dirname(i)}return Array.isArray(n.loaders)||(n.loaders=null),n}function j2e(e,r){if(!r&&e&&!Array.isArray(e))return e;let t;if(e&&(t=Array.isArray(e)?e:[e]),r&&r.loaders){let n=Array.isArray(r.loaders)?r.loaders:[r.loaders];t=t?[...t,...n]:n}return t&&t.length?t:null}async function Jo(e,r,t,n){xa(!n||typeof n=="object"),r&&!Array.isArray(r)&&!n2(r)&&(n=void 0,t=r,r=void 0),e=await e,t=t||{};let i=D0(e),o=j2e(r,n),s=await w2e(e,o,t);return s?(t=b2e(t,s,o,i),n=B2e({url:i,parse:Jo,loaders:o},t,n||null),await WDr(s,e,t,n)):null}async function WDr(e,r,t,n){if(b7(e),Bs(r)){let a=r,{ok:o,redirected:s,status:u,statusText:l,type:c,url:f}=a,d=Object.fromEntries(a.headers.entries());n.response={headers:d,ok:o,redirected:s,status:u,statusText:l,type:c,url:f}}r=await P2e(r,e,t);let i=e;if(i.parseTextSync&&typeof r=="string")return i.parseTextSync(r,t,n);if(T7(e,t))return await C7(e,r,t,n,Jo);if(i.parseText&&typeof r=="string")return await i.parseText(r,t,n);if(i.parse)return await i.parse(r,t,n);throw xa(!i.parseSync),new Error(`${e.id} loader - no parser found and worker is disabled`)}async function un(e,r,t,n){let i,a;!Array.isArray(r)&&!n2(r)?(i=[],a=r,n=void 0):(i=r,a=t);let o=vD(a),s=e;return typeof e=="string"&&(s=await o(e)),js(e)&&(s=await o(e)),Array.isArray(i)?await Jo(s,i,a):await Jo(s,i,a)}async function xb(e,r,t){let n=yb();if(t=oe(oe({},n),t),D7(r,t))return await v7(r,e,t);if(r.encode)return await r.encode(e,t);if(r.encodeSync)return r.encodeSync(e,t);if(r.encodeText)return new TextEncoder().encode(await r.encodeText(e,t));if(r.encodeInBatches){let i=M2e(e,r,t),a=[];for await(let o of i)a.push(o);return Kl(...a)}if(!wi&&r.encodeURLtoURL){let i=q2e("input");await s2e(i,e);let a=q2e("output"),o=await L2e(i,a,r,t);return(await Xo(o)).arrayBuffer()}throw new Error("Writer could not encode data")}function bD(e,r,t){if(r.encodeSync)return r.encodeSync(e,t);throw new Error("Writer could not synchronously encode data")}function M2e(e,r,t){if(r.encodeInBatches){let n=VDr(e);return r.encodeInBatches(n,t)}throw new Error("Writer could not encode data in batches")}async function L2e(e,r,t,n){if(e=gp(e),r=gp(r),wi||!t.encodeURLtoURL)throw new Error;return await t.encodeURLtoURL(e,r,n)}function VDr(e){return[{table:e,start:0,end:e.length}]}function q2e(e){return`/tmp/${e}`}var Tp;(function(t){t[t.ADD=1]="ADD",t[t.REPLACE=2]="REPLACE"})(Tp||(Tp={}));var rc;(function(i){i.EMPTY="empty",i.SCENEGRAPH="scenegraph",i.POINTCLOUD="pointcloud",i.MESH="mesh"})(rc||(rc={}));var G0;(function(t){t.I3S="I3S",t.TILES3D="TILES3D"})(G0||(G0={}));var yf;(function(t){t.GEOMETRIC_ERROR="geometricError",t.MAX_SCREEN_THRESHOLD="maxScreenThreshold"})(yf||(yf={}));var Xn=$e(Xt()),Ok=$e(U0()),nU=$e(Gs());function ySe(e){return e!=null}var l3t=new Xn.Vector3,Ijr=new Xn.Vector3,Pjr=new Xn.Vector3,Bjr=new Xn.Vector3;function Rk(e,r,t){if(Qr(e,"3D Tile: boundingVolume must be defined"),e.box)return jjr(e.box,r,t);if(e.region){let[n,i,a,o,s,u]=e.region,l=nU.Ellipsoid.WGS84.cartographicToCartesian([(0,Xn.degrees)(n),(0,Xn.degrees)(o),s],Pjr),c=nU.Ellipsoid.WGS84.cartographicToCartesian([(0,Xn.degrees)(a),(0,Xn.degrees)(i),u],Bjr),f=new Xn.Vector3().addVectors(l,c).multiplyScalar(.5),d=new Xn.Vector3().subVectors(l,c).len()/2;return xSe([f[0],f[1],f[2],d],new Xn.Matrix4)}if(e.sphere)return xSe(e.sphere,r,t);throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box")}function jjr(e,r,t){let n=new Xn.Vector3(e[0],e[1],e[2]);r.transform(n,n);let i=[];if(e.length===10){let l=e.slice(3,6),c=new Xn.Quaternion;c.fromArray(e,6);let f=new Xn.Vector3([1,0,0]),d=new Xn.Vector3([0,1,0]),p=new Xn.Vector3([0,0,1]);f.transformByQuaternion(c),f.scale(l[0]),d.transformByQuaternion(c),d.scale(l[1]),p.transformByQuaternion(c),p.scale(l[2]),i=[...f.toArray(),...d.toArray(),...p.toArray()]}else i=[...e.slice(3,6),...e.slice(6,9),...e.slice(9,12)];let a=r.transformAsVector(i.slice(0,3)),o=r.transformAsVector(i.slice(3,6)),s=r.transformAsVector(i.slice(6,9)),u=new Xn.Matrix3([a[0],a[1],a[2],o[0],o[1],o[2],s[0],s[1],s[2]]);return ySe(t)?(t.center=n,t.halfAxes=u,t):new Ok.OrientedBoundingBox(n,u)}function xSe(e,r,t){let n=new Xn.Vector3(e[0],e[1],e[2]);r.transform(n,n);let i=r.getScale(Ijr),a=Math.max(Math.max(i[0],i[1]),i[2]),o=e[3]*a;return ySe(t)?(t.center=n,t.radius=o,t):new Ok.BoundingSphere(n,o)}var Nb="4.0.0-alpha.21";var Ws={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect",GLTF:"glTF"},g3t=Object.keys(Ws),Cp={BATCHED_MODEL:[98,51,100,109],INSTANCED_MODEL:[105,51,100,109],POINT_CLOUD:[112,110,116,115],COMPOSITE:[99,109,112,116]};function iU(e,r,t){Qr(e instanceof ArrayBuffer);let n=new TextDecoder("utf8"),i=new Uint8Array(e,r,t);return n.decode(i)}function _Se(e,r=0){let t=new DataView(e);return`${String.fromCharCode(t.getUint8(r+0))}${String.fromCharCode(t.getUint8(r+1))}${String.fromCharCode(t.getUint8(r+2))}${String.fromCharCode(t.getUint8(r+3))}`}var Fk="4.0.0-alpha.21";var Mjr={draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},ESe={name:"Draco",id:"draco",module:"draco",version:Fk,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:Mjr};function wSe(e){switch(e.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function aU(e){let r=1/0,t=1/0,n=1/0,i=-1/0,a=-1/0,o=-1/0,s=e.POSITION?e.POSITION.value:[],u=s&&s.length;for(let l=0;l<u;l+=3){let c=s[l],f=s[l+1],d=s[l+2];r=c<r?c:r,t=f<t?f:t,n=d<n?d:n,i=c>i?c:i,a=f>a?f:a,o=d>o?d:o}return[[r,t,n],[i,a,o]]}function oU(e,r,t){let n=wSe(r.value),i=t||SSe(r);return{name:e,type:{type:"fixed-size-list",listSize:r.size,children:[{name:"value",type:n}]},nullable:!1,metadata:i}}function SSe(e){let r={};return"byteOffset"in e&&(r.byteOffset=e.byteOffset.toString(10)),"byteStride"in e&&(r.byteStride=e.byteStride.toString(10)),"normalized"in e&&(r.normalized=e.normalized.toString()),r}function ASe(e,r,t){let n=CSe(r.metadata),i=[],a=Ljr(r.attributes);for(let o in e){let s=e[o],u=TSe(o,s,a[o]);i.push(u)}if(t){let o=TSe("indices",t);i.push(o)}return{fields:i,metadata:n}}function Ljr(e){let r={};for(let t in e){let n=e[t];r[n.name||"undefined"]=n}return r}function TSe(e,r,t){let n=t?CSe(t.metadata):void 0;return oU(e,r,n)}function CSe(e){Object.entries(e);let r={};for(let t in e)r[`${t}.string`]=JSON.stringify(e[t]);return r}var DSe={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},qjr={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},Njr=4,Ik=class{constructor(r){this.draco=r,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(r,t={}){let n=new this.draco.DecoderBuffer;n.Init(new Int8Array(r),r.byteLength),this._disableAttributeTransforms(t);let i=this.decoder.GetEncodedGeometryType(n),a=i===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let o;switch(i){case this.draco.TRIANGULAR_MESH:o=this.decoder.DecodeBufferToMesh(n,a);break;case this.draco.POINT_CLOUD:o=this.decoder.DecodeBufferToPointCloud(n,a);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!o.ok()||!a.ptr){let d=`DRACO decompression failed: ${o.error_msg()}`;throw new Error(d)}let s=this._getDracoLoaderData(a,i,t),u=this._getMeshData(a,s,t),l=aU(u.attributes),c=ASe(u.attributes,s,u.indices);return ze(oe({loader:"draco",loaderData:s,header:{vertexCount:a.num_points(),boundingBox:l}},u),{schema:c})}finally{this.draco.destroy(n),a&&this.draco.destroy(a)}}_getDracoLoaderData(r,t,n){let i=this._getTopLevelMetadata(r),a=this._getDracoAttributes(r,n);return{geometry_type:t,num_attributes:r.num_attributes(),num_points:r.num_points(),num_faces:r instanceof this.draco.Mesh?r.num_faces():0,metadata:i,attributes:a}}_getDracoAttributes(r,t){let n={};for(let i=0;i<r.num_attributes();i++){let a=this.decoder.GetAttribute(r,i),o=this._getAttributeMetadata(r,i);n[a.unique_id()]={unique_id:a.unique_id(),attribute_type:a.attribute_type(),data_type:a.data_type(),num_components:a.num_components(),byte_offset:a.byte_offset(),byte_stride:a.byte_stride(),normalized:a.normalized(),attribute_index:i,metadata:o};let s=this._getQuantizationTransform(a,t);s&&(n[a.unique_id()].quantization_transform=s);let u=this._getOctahedronTransform(a,t);u&&(n[a.unique_id()].octahedron_transform=u)}return n}_getMeshData(r,t,n){let i=this._getMeshAttributes(t,r,n);if(!i.POSITION)throw new Error("DRACO: No position attribute found.");if(r instanceof this.draco.Mesh)switch(n.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:i,indices:{value:this._getTriangleStripIndices(r),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:i,indices:{value:this._getTriangleListIndices(r),size:1}}}return{topology:"point-list",mode:0,attributes:i}}_getMeshAttributes(r,t,n){let i={};for(let a of Object.values(r.attributes)){let o=this._deduceAttributeName(a,n);a.name=o;let{value:s,size:u}=this._getAttributeValues(t,a);i[o]={value:s,size:u,byteOffset:a.byte_offset,byteStride:a.byte_stride,normalized:a.normalized}}return i}_getTriangleListIndices(r){let n=r.num_faces()*3,i=n*Njr,a=this.draco._malloc(i);try{return this.decoder.GetTrianglesUInt32Array(r,i,a),new Uint32Array(this.draco.HEAPF32.buffer,a,n).slice()}finally{this.draco._free(a)}}_getTriangleStripIndices(r){let t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(r,t),zjr(t)}finally{this.draco.destroy(t)}}_getAttributeValues(r,t){let n=qjr[t.data_type],i=t.num_components,o=r.num_points()*i,s=o*n.BYTES_PER_ELEMENT,u=Ujr(this.draco,n),l,c=this.draco._malloc(s);try{let f=this.decoder.GetAttribute(r,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(r,f,u,s,c),l=new n(this.draco.HEAPF32.buffer,c,o).slice()}finally{this.draco._free(c)}return{value:l,size:i}}_deduceAttributeName(r,t){let n=r.unique_id;for(let[o,s]of Object.entries(t.extraAttributes||{}))if(s===n)return o;let i=r.attribute_type;for(let o in DSe)if(this.draco[o]===i)return DSe[o];let a=t.attributeNameEntry||"name";return r.metadata[a]?r.metadata[a].string:`CUSTOM_ATTRIBUTE_${n}`}_getTopLevelMetadata(r){let t=this.decoder.GetMetadata(r);return this._getDracoMetadata(t)}_getAttributeMetadata(r,t){let n=this.decoder.GetAttributeMetadata(r,t);return this._getDracoMetadata(n)}_getDracoMetadata(r){if(!r||!r.ptr)return{};let t={},n=this.metadataQuerier.NumEntries(r);for(let i=0;i<n;i++){let a=this.metadataQuerier.GetEntryName(r,i);t[a]=this._getDracoMetadataField(r,a)}return t}_getDracoMetadataField(r,t){let n=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(r,t,n);let i=Gjr(n);return{int:this.metadataQuerier.GetIntEntry(r,t),string:this.metadataQuerier.GetStringEntry(r,t),double:this.metadataQuerier.GetDoubleEntry(r,t),intArray:i}}finally{this.draco.destroy(n)}}_disableAttributeTransforms(r){let{quantizedAttributes:t=[],octahedronAttributes:n=[]}=r,i=[...t,...n];for(let a of i)this.decoder.SkipAttributeTransform(this.draco[a])}_getQuantizationTransform(r,t){let{quantizedAttributes:n=[]}=t,i=r.attribute_type();if(n.map(o=>this.decoder[o]).includes(i)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits(),range:o.range(),min_values:new Float32Array([1,2,3]).map(s=>o.min_value(s))}}finally{this.draco.destroy(o)}}return null}_getOctahedronTransform(r,t){let{octahedronAttributes:n=[]}=t,i=r.attribute_type();if(n.map(o=>this.decoder[o]).includes(i)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits()}}finally{this.draco.destroy(o)}}return null}};function Ujr(e,r){switch(r){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32;default:return e.DT_INVALID}}function Gjr(e){let r=e.size(),t=new Int32Array(r);for(let n=0;n<r;n++)t[n]=e.GetValue(n);return t}function zjr(e){let r=e.size(),t=new Int32Array(r);for(let n=0;n<r;n++)t[n]=e.GetValue(n);return t}var Hjr="1.5.5",Wjr="1.4.1",sU=`https://www.gstatic.com/draco/versioned/decoders/${Hjr}`,ci={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},Dp={[ci.DECODER]:`${sU}/${ci.DECODER}`,[ci.DECODER_WASM]:`${sU}/${ci.DECODER_WASM}`,[ci.FALLBACK_DECODER]:`${sU}/${ci.FALLBACK_DECODER}`,[ci.ENCODER]:`https://raw.githubusercontent.com/google/draco/${Wjr}/javascript/${ci.ENCODER}`},I2;async function kSe(e){let r=e.modules||{};return r.draco3d?I2=I2||r.draco3d.createDecoderModule({}).then(t=>({draco:t})):I2=I2||Vjr(e),await I2}async function Vjr(e){let r,t;switch(e.draco&&e.draco.decoderType){case"js":r=await Vl(Dp[ci.FALLBACK_DECODER],"draco",e,ci.FALLBACK_DECODER);break;case"wasm":default:[r,t]=await Promise.all([await Vl(Dp[ci.DECODER],"draco",e,ci.DECODER),await Vl(Dp[ci.DECODER_WASM],"draco",e,ci.DECODER_WASM)])}return r=r||globalThis.DracoDecoderModule,await Kjr(r,t)}function Kjr(e,r){let t={};return r&&(t.wasmBinary=r),new Promise(n=>{e(ze(oe({},t),{onModuleLoaded:i=>n({draco:i})}))})}var uU={id:"draco-writer",name:"Draco compressed geometry writer",module:"draco",version:Fk,worker:!0,options:{draco:{},source:null}};var Ub=ze(oe({},ESe),{parse:Yjr});async function Yjr(e,r){let{draco:t}=await kSe(r),n=new Ik(t);try{return n.parseSync(e,r==null?void 0:r.draco)}finally{n.destroy()}}var $jr={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Ti={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},nt=oe(oe({},$jr),Ti);var lU={[Ti.DOUBLE]:Float64Array,[Ti.FLOAT]:Float32Array,[Ti.UNSIGNED_SHORT]:Uint16Array,[Ti.UNSIGNED_INT]:Uint32Array,[Ti.UNSIGNED_BYTE]:Uint8Array,[Ti.BYTE]:Int8Array,[Ti.SHORT]:Int16Array,[Ti.INT]:Int32Array},Xjr={DOUBLE:Ti.DOUBLE,FLOAT:Ti.FLOAT,UNSIGNED_SHORT:Ti.UNSIGNED_SHORT,UNSIGNED_INT:Ti.UNSIGNED_INT,UNSIGNED_BYTE:Ti.UNSIGNED_BYTE,BYTE:Ti.BYTE,SHORT:Ti.SHORT,INT:Ti.INT},cU="Failed to convert GL type",mo=class{static fromTypedArray(r){r=ArrayBuffer.isView(r)?r.constructor:r;for(let t in lU)if(lU[t]===r)return t;throw new Error(cU)}static fromName(r){let t=Xjr[r];if(!t)throw new Error(cU);return t}static getArrayType(r){switch(r){case Ti.UNSIGNED_SHORT_5_6_5:case Ti.UNSIGNED_SHORT_4_4_4_4:case Ti.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:let t=lU[r];if(!t)throw new Error(cU);return t}}static getByteSize(r){return mo.getArrayType(r).BYTES_PER_ELEMENT}static validate(r){return Boolean(mo.getArrayType(r))}static createTypedArray(r,t,n=0,i){i===void 0&&(i=(t.byteLength-n)/mo.getByteSize(r));let a=mo.getArrayType(r);return new a(t,n,i)}};function OSe(e,r){if(!e)throw new Error(`math.gl assertion failed. ${r}`)}function fU(e,r=[0,0,0]){let t=e>>11&31,n=e>>5&63,i=e&31;return r[0]=t<<3,r[1]=n<<2,r[2]=i<<3,r}var xf=$e(Xt());var Q3t=1/256;var Z3t=new xf.Vector2,e6t=new xf.Vector3,r6t=new xf.Vector2,t6t=new xf.Vector2,n6t=new Uint8Array(1);function RSe(e,r=255){return(0,xf.clamp)(e,0,r)/r*2-1}function FSe(e){return e<0?-1:1}function ISe(e,r,t,n){if(OSe(n),e<0||e>t||r<0||r>t)throw new Error(`x and y must be unsigned normalized integers between 0 and ${t}`);if(n.x=RSe(e,t),n.y=RSe(r,t),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){let i=n.x;n.x=(1-Math.abs(n.y))*FSe(i),n.y=(1-Math.abs(i))*FSe(n.y)}return n.normalize()}function dU(e,r,t){return ISe(e,r,255,t)}var mU=$e(Xt());var kp=class{constructor(r,t){this.featuresLength=0;this._cachedTypedArrays={};this.json=r,this.buffer=t}getExtension(r){return this.json.extensions&&this.json.extensions[r]}hasProperty(r){return Boolean(this.json[r])}getGlobalProperty(r,t=nt.UNSIGNED_INT,n=1){let i=this.json[r];return i&&Number.isFinite(i.byteOffset)?this._getTypedArrayFromBinary(r,t,n,1,i.byteOffset):i}getPropertyArray(r,t,n){let i=this.json[r];return i&&Number.isFinite(i.byteOffset)?("componentType"in i&&(t=mo.fromName(i.componentType)),this._getTypedArrayFromBinary(r,t,n,this.featuresLength,i.byteOffset)):this._getTypedArrayFromArray(r,t,i)}getProperty(r,t,n,i,a){let o=this.json[r];if(!o)return o;let s=this.getPropertyArray(r,t,n);if(n===1)return s[i];for(let u=0;u<n;++u)a[u]=s[n*i+u];return a}_getTypedArrayFromBinary(r,t,n,i,a){let o=this._cachedTypedArrays,s=o[r];return s||(s=mo.createTypedArray(t,this.buffer.buffer,this.buffer.byteOffset+a,i*n),o[r]=s),s}_getTypedArrayFromArray(r,t,n){let i=this._cachedTypedArrays,a=i[r];return a||(a=mo.createTypedArray(t,n),i[r]=a),a}};var Jjr={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Qjr={SCALAR:(e,r)=>e[r],VEC2:(e,r)=>[e[2*r+0],e[2*r+1]],VEC3:(e,r)=>[e[3*r+0],e[3*r+1],e[3*r+2]],VEC4:(e,r)=>[e[4*r+0],e[4*r+1],e[4*r+2],e[4*r+3]],MAT2:(e,r)=>[e[4*r+0],e[4*r+1],e[4*r+2],e[4*r+3]],MAT3:(e,r)=>[e[9*r+0],e[9*r+1],e[9*r+2],e[9*r+3],e[9*r+4],e[9*r+5],e[9*r+6],e[9*r+7],e[9*r+8]],MAT4:(e,r)=>[e[16*r+0],e[16*r+1],e[16*r+2],e[16*r+3],e[16*r+4],e[16*r+5],e[16*r+6],e[16*r+7],e[16*r+8],e[16*r+9],e[16*r+10],e[16*r+11],e[16*r+12],e[16*r+13],e[16*r+14],e[16*r+15]]},Zjr={SCALAR:(e,r,t)=>{r[t]=e},VEC2:(e,r,t)=>{r[2*t+0]=e[0],r[2*t+1]=e[1]},VEC3:(e,r,t)=>{r[3*t+0]=e[0],r[3*t+1]=e[1],r[3*t+2]=e[2]},VEC4:(e,r,t)=>{r[4*t+0]=e[0],r[4*t+1]=e[1],r[4*t+2]=e[2],r[4*t+3]=e[3]},MAT2:(e,r,t)=>{r[4*t+0]=e[0],r[4*t+1]=e[1],r[4*t+2]=e[2],r[4*t+3]=e[3]},MAT3:(e,r,t)=>{r[9*t+0]=e[0],r[9*t+1]=e[1],r[9*t+2]=e[2],r[9*t+3]=e[3],r[9*t+4]=e[4],r[9*t+5]=e[5],r[9*t+6]=e[6],r[9*t+7]=e[7],r[9*t+8]=e[8],r[9*t+9]=e[9]},MAT4:(e,r,t)=>{r[16*t+0]=e[0],r[16*t+1]=e[1],r[16*t+2]=e[2],r[16*t+3]=e[3],r[16*t+4]=e[4],r[16*t+5]=e[5],r[16*t+6]=e[6],r[16*t+7]=e[7],r[16*t+8]=e[8],r[16*t+9]=e[9],r[16*t+10]=e[10],r[16*t+11]=e[11],r[16*t+12]=e[12],r[16*t+13]=e[13],r[16*t+14]=e[14],r[16*t+15]=e[15]}};function PSe(e,r,t,n){let{componentType:i}=e;Qr(e.componentType);let a=typeof i=="string"?mo.fromName(i):i,o=Jjr[e.type],s=Qjr[e.type],u=Zjr[e.type];return t+=e.byteOffset,{values:mo.createTypedArray(a,r,t,o*n),type:a,size:o,unpacker:s,packer:u}}var tc=e=>e!==void 0;function BSe(e,r,t){if(!r)return null;let n=e.getExtension("3DTILES_batch_table_hierarchy"),i=r.HIERARCHY;return i&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),r.extensions=r.extensions||{},r.extensions["3DTILES_batch_table_hierarchy"]=i,n=i),n?eMr(n,t):null}function eMr(e,r){let t,n,i,a=e.instancesLength,o=e.classes,s=e.classIds,u=e.parentCounts,l=e.parentIds,c=a;tc(s.byteOffset)&&(s.componentType=defaultValue(s.componentType,GL.UNSIGNED_SHORT),s.type=AttributeType.SCALAR,i=getBinaryAccessor(s),s=i.createArrayBufferView(r.buffer,r.byteOffset+s.byteOffset,a));let f;if(tc(u))for(tc(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,i=getBinaryAccessor(u),u=i.createArrayBufferView(r.buffer,r.byteOffset+u.byteOffset,a)),f=new Uint16Array(a),c=0,t=0;t<a;++t)f[t]=c,c+=u[t];tc(l)&&tc(l.byteOffset)&&(l.componentType=defaultValue(l.componentType,GL.UNSIGNED_SHORT),l.type=AttributeType.SCALAR,i=getBinaryAccessor(l),l=i.createArrayBufferView(r.buffer,r.byteOffset+l.byteOffset,c));let d=o.length;for(t=0;t<d;++t){let v=o[t].length,y=o[t].instances,w=getBinaryProperties(v,y,r);o[t].instances=combine(w,y)}let p=new Array(d).fill(0),h=new Uint16Array(a);for(t=0;t<a;++t)n=s[t],h[t]=p[n],++p[n];let b={classes:o,classIds:s,classIndexes:h,parentCounts:u,parentIndexes:f,parentIds:l};return nMr(b),b}function Gb(e,r,t){if(!e)return;let n=e.parentCounts;return e.parentIds?t(e,r):n>0?rMr(e,r,t):tMr(e,r,t)}function rMr(e,r,t){let n=e.classIds,i=e.parentCounts,a=e.parentIds,o=e.parentIndexes,s=n.length,u=scratchVisited;u.length=Math.max(u.length,s);let l=++marker,c=scratchStack;for(c.length=0,c.push(r);c.length>0;){if(r=c.pop(),u[r]===l)continue;u[r]=l;let f=t(e,r);if(tc(f))return f;let d=i[r],p=o[r];for(let h=0;h<d;++h){let b=a[p+h];b!==r&&c.push(b)}}return null}function tMr(e,r,t){let n=!0;for(;n;){let i=t(e,r);if(tc(i))return i;let a=e.parentIds[r];n=a!==r,r=a}throw new Error("traverseHierarchySingleParent")}function nMr(e){let r=[],n=e.classIds.length;for(let i=0;i<n;++i)jSe(e,i,stack)}function jSe(e,r,t){let n=e.parentCounts,i=e.parentIds,a=e.parentIndexes,s=e.classIds.length;if(!tc(i))return;assert(r<s,`Parent index ${r} exceeds the total number of instances: ${s}`),assert(t.indexOf(r)===-1,"Circular dependency detected in the batch table hierarchy."),t.push(r);let u=tc(n)?n[r]:1,l=tc(n)?a[r]:r;for(let c=0;c<u;++c){let f=i[l+c];f!==r&&jSe(e,f,t)}t.pop(r)}function jo(e){return e!=null}var Pk=(e,r)=>e,iMr={HIERARCHY:!0,extensions:!0,extras:!0},zb=class{constructor(r,t,n,i={}){var a;Qr(n>=0),this.json=r||{},this.binary=t,this.featureCount=n,this._extensions=((a=this.json)==null?void 0:a.extensions)||{},this._properties={};for(let o in this.json)iMr[o]||(this._properties[o]=this.json[o]);this._binaryProperties=this._initializeBinaryProperties(),i["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=BSe(this,this.json,this.binary))}getExtension(r){return this.json&&this.json.extensions&&this.json.extensions[r]}memorySizeInBytes(){return 0}isClass(r,t){if(this._checkBatchId(r),Qr(typeof t=="string",t),this._hierarchy){let n=Gb(this._hierarchy,r,(i,a)=>{let o=i.classIds[a];return i.classes[o].name===t});return jo(n)}return!1}isExactClass(r,t){return Qr(typeof t=="string",t),this.getExactClassName(r)===t}getExactClassName(r){if(this._checkBatchId(r),this._hierarchy){let t=this._hierarchy.classIds[r];return this._hierarchy.classes[t].name}}hasProperty(r,t){return this._checkBatchId(r),Qr(typeof t=="string",t),jo(this._properties[t])||this._hasPropertyInHierarchy(r,t)}getPropertyNames(r,t){this._checkBatchId(r),t=jo(t)?t:[],t.length=0;let n=Object.keys(this._properties);return t.push(...n),this._hierarchy&&this._getPropertyNamesInHierarchy(r,t),t}getProperty(r,t){if(this._checkBatchId(r),Qr(typeof t=="string",t),this._binaryProperties){let i=this._binaryProperties[t];if(jo(i))return this._getBinaryProperty(i,r)}let n=this._properties[t];if(jo(n))return Pk(n[r],!0);if(this._hierarchy){let i=this._getHierarchyProperty(r,t);if(jo(i))return i}}setProperty(r,t,n){let i=this.featureCount;if(this._checkBatchId(r),Qr(typeof t=="string",t),this._binaryProperties){let o=this._binaryProperties[t];if(o){this._setBinaryProperty(o,r,n);return}}if(this._hierarchy&&this._setHierarchyProperty(this,r,t,n))return;let a=this._properties[t];jo(a)||(this._properties[t]=new Array(i),a=this._properties[t]),a[r]=Pk(n,!0)}_checkBatchId(r){if(!(r>=0&&r<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}_getBinaryProperty(r,t){return r.unpack(r.typedArray,t)}_setBinaryProperty(r,t,n){r.pack(n,r.typedArray,t)}_initializeBinaryProperties(){let r=null;for(let t in this._properties){let n=this._properties[t],i=this._initializeBinaryProperty(t,n);i&&(r=r||{},r[t]=i)}return r}_initializeBinaryProperty(r,t){if("byteOffset"in t){let n=t;Qr(this.binary,`Property ${r} requires a batch table binary.`),Qr(n.type,`Property ${r} requires a type.`);let i=PSe(n,this.binary.buffer,this.binary.byteOffset|0,this.featureCount);return{typedArray:i.values,componentCount:i.size,unpack:i.unpacker,pack:i.packer}}return null}_hasPropertyInHierarchy(r,t){if(!this._hierarchy)return!1;let n=Gb(this._hierarchy,r,(i,a)=>{let o=i.classIds[a],s=i.classes[o].instances;return jo(s[t])});return jo(n)}_getPropertyNamesInHierarchy(r,t){Gb(this._hierarchy,r,(n,i)=>{let a=n.classIds[i],o=n.classes[a].instances;for(let s in o)o.hasOwnProperty(s)&&t.indexOf(s)===-1&&t.push(s)})}_getHierarchyProperty(r,t){return Gb(this._hierarchy,r,(n,i)=>{let a=n.classIds[i],o=n.classes[a],s=n.classIndexes[i],u=o.instances[t];return jo(u)?jo(u.typedArray)?this._getBinaryProperty(u,s):Pk(u[s],!0):null})}_setHierarchyProperty(r,t,n,i){let a=Gb(this._hierarchy,t,(o,s)=>{let u=o.classIds[s],l=o.classes[u],c=o.classIndexes[s],f=l.instances[n];return jo(f)?(Qr(s===t,`Inherited property "${n}" is read-only.`),jo(f.typedArray)?this._setBinaryProperty(f,c,i):f[c]=Pk(i,!0),!0):!1});return jo(a)}};var pU=4;function Op(e,r,t=0){let n=new DataView(r);if(e.magic=n.getUint32(t,!0),t+=pU,e.version=n.getUint32(t,!0),t+=pU,e.byteLength=n.getUint32(t,!0),t+=pU,e.version!==1)throw new Error(`3D Tile Version ${e.version} not supported`);return t}var Hb=4,MSe="b3dm tile in legacy format.";function Wb(e,r,t){let n=new DataView(r),i;e.header=e.header||{};let a=n.getUint32(t,!0);t+=Hb;let o=n.getUint32(t,!0);t+=Hb;let s=n.getUint32(t,!0);t+=Hb;let u=n.getUint32(t,!0);return t+=Hb,s>=570425344?(t-=Hb*2,i=a,s=o,u=0,a=0,o=0,console.warn(MSe)):u>=570425344&&(t-=Hb,i=s,s=a,u=o,a=0,o=0,console.warn(MSe)),e.header.featureTableJsonByteLength=a,e.header.featureTableBinaryByteLength=o,e.header.batchTableJsonByteLength=s,e.header.batchTableBinaryByteLength=u,e.header.batchLength=i,t}function Vb(e,r,t,n){return t=aMr(e,r,t,n),t=oMr(e,r,t,n),t}function aMr(e,r,t,n){let{featureTableJsonByteLength:i,featureTableBinaryByteLength:a,batchLength:o}=e.header||{};if(e.featureTableJson={BATCH_LENGTH:o||0},i&&i>0){let s=iU(r,t,i);e.featureTableJson=JSON.parse(s)}return t+=i||0,e.featureTableBinary=new Uint8Array(r,t,a),t+=a||0,t}function oMr(e,r,t,n){let{batchTableJsonByteLength:i,batchTableBinaryByteLength:a}=e.header||{};if(i&&i>0){let o=iU(r,t,i);e.batchTableJson=JSON.parse(o),t+=i,a&&a>0&&(e.batchTableBinary=new Uint8Array(r,t,a),e.batchTableBinary=new Uint8Array(e.batchTableBinary),t+=a)}return t}function hU(e,r,t){if(!r&&(!e||!e.batchIds||!t))return null;let{batchIds:n,isRGB565:i,pointCount:a=0}=e;if(n&&t){let o=new Uint8ClampedArray(a*3);for(let s=0;s<a;s++){let u=n[s],c=t.getProperty(u,"dimensions").map(f=>f*255);o[s*3]=c[0],o[s*3+1]=c[1],o[s*3+2]=c[2]}return{type:nt.UNSIGNED_BYTE,value:o,size:3,normalized:!0}}if(r&&i){let o=new Uint8ClampedArray(a*3);for(let s=0;s<a;s++){let u=fU(r[s]);o[s*3]=u[0],o[s*3+1]=u[1],o[s*3+2]=u[2]}return{type:nt.UNSIGNED_BYTE,value:o,size:3,normalized:!0}}return r&&r.length===a*3?{type:nt.UNSIGNED_BYTE,value:r,size:3,normalized:!0}:{type:nt.UNSIGNED_BYTE,value:r||new Uint8ClampedArray,size:4,normalized:!0}}var LSe=$e(Xt());var qSe=new LSe.Vector3;function NSe(e,r){if(!r)return null;if(e.isOctEncoded16P){let t=new Float32Array((e.pointsLength||0)*3);for(let n=0;n<(e.pointsLength||0);n++)dU(r[n*2],r[n*2+1],qSe),qSe.toArray(t,n*3);return{type:nt.FLOAT,size:2,value:t}}return{type:nt.FLOAT,size:2,value:r}}var USe=$e(Xt());function GSe(e,r,t){return e.isQuantized?t["3d-tiles"]&&t["3d-tiles"].decodeQuantizedPositions?(e.isQuantized=!1,sMr(e,r)):{type:nt.UNSIGNED_SHORT,value:r,size:3,normalized:!0}:r}function sMr(e,r){let t=new USe.Vector3,n=new Float32Array(e.pointCount*3);for(let i=0;i<e.pointCount;i++)t.set(r[i*3],r[i*3+1],r[i*3+2]).scale(1/e.quantizedRange).multiply(e.quantizedVolumeScale).add(e.quantizedVolumeOffset).toArray(n,i*3);return n}async function zSe(e,r,t,n,i){t=Op(e,r,t),t=Wb(e,r,t),t=Vb(e,r,t,n),uMr(e);let{featureTable:a,batchTable:o}=lMr(e);return await hMr(e,a,o,n,i),cMr(e,a,n),fMr(e,a,o),dMr(e,a),t}function uMr(e){e.attributes={positions:null,colors:null,normals:null,batchIds:null},e.isQuantized=!1,e.isTranslucent=!1,e.isRGB565=!1,e.isOctEncoded16P=!1}function lMr(e){let r=new kp(e.featureTableJson,e.featureTableBinary),t=r.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(t))throw new Error("POINTS_LENGTH must be defined");r.featuresLength=t,e.featuresLength=t,e.pointsLength=t,e.pointCount=t,e.rtcCenter=r.getGlobalProperty("RTC_CENTER",nt.FLOAT,3);let n=pMr(e,r);return{featureTable:r,batchTable:n}}function cMr(e,r,t){if(e.attributes=e.attributes||{positions:null,colors:null,normals:null,batchIds:null},!e.attributes.positions){if(r.hasProperty("POSITION"))e.attributes.positions=r.getPropertyArray("POSITION",nt.FLOAT,3);else if(r.hasProperty("POSITION_QUANTIZED")){let n=r.getPropertyArray("POSITION_QUANTIZED",nt.UNSIGNED_SHORT,3);if(e.isQuantized=!0,e.quantizedRange=(1<<16)-1,e.quantizedVolumeScale=r.getGlobalProperty("QUANTIZED_VOLUME_SCALE",nt.FLOAT,3),!e.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(e.quantizedVolumeOffset=r.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",nt.FLOAT,3),!e.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");e.attributes.positions=GSe(e,n,t)}}if(!e.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}function fMr(e,r,t){if(e.attributes=e.attributes||{positions:null,colors:null,normals:null,batchIds:null},!e.attributes.colors){let n=null;r.hasProperty("RGBA")?(n=r.getPropertyArray("RGBA",nt.UNSIGNED_BYTE,4),e.isTranslucent=!0):r.hasProperty("RGB")?n=r.getPropertyArray("RGB",nt.UNSIGNED_BYTE,3):r.hasProperty("RGB565")&&(n=r.getPropertyArray("RGB565",nt.UNSIGNED_SHORT,1),e.isRGB565=!0),e.attributes.colors=hU(e,n,t)}r.hasProperty("CONSTANT_RGBA")&&(e.constantRGBA=r.getGlobalProperty("CONSTANT_RGBA",nt.UNSIGNED_BYTE,4))}function dMr(e,r){if(e.attributes=e.attributes||{positions:null,colors:null,normals:null,batchIds:null},!e.attributes.normals){let t=null;r.hasProperty("NORMAL")?t=r.getPropertyArray("NORMAL",nt.FLOAT,3):r.hasProperty("NORMAL_OCT16P")&&(t=r.getPropertyArray("NORMAL_OCT16P",nt.UNSIGNED_BYTE,2),e.isOctEncoded16P=!0),e.attributes.normals=NSe(e,t)}}function pMr(e,r){let t=null;if(!e.batchIds&&r.hasProperty("BATCH_ID")&&(e.batchIds=r.getPropertyArray("BATCH_ID",nt.UNSIGNED_SHORT,1),e.batchIds)){let n=r.getGlobalProperty("BATCH_LENGTH");if(!n)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");let{batchTableJson:i,batchTableBinary:a}=e;t=new zb(i,a,n)}return t}async function hMr(e,r,t,n,i){let a,o,s,u=e.batchTableJson&&e.batchTableJson.extensions&&e.batchTableJson.extensions["3DTILES_draco_point_compression"];u&&(s=u.properties);let l=r.getExtension("3DTILES_draco_point_compression");if(l){o=l.properties;let f=l.byteOffset,d=l.byteLength;if(!o||!Number.isFinite(f)||!d)throw new Error("Draco properties, byteOffset, and byteLength must be defined");a=(e.featureTableBinary||[]).slice(f,f+d),e.hasPositions=Number.isFinite(o.POSITION),e.hasColors=Number.isFinite(o.RGB)||Number.isFinite(o.RGBA),e.hasNormals=Number.isFinite(o.NORMAL),e.hasBatchIds=Number.isFinite(o.BATCH_ID),e.isTranslucent=Number.isFinite(o.RGBA)}if(!a)return!0;let c={buffer:a,properties:oe(oe({},o),s),featureTableProperties:o,batchTableProperties:s,dequantizeInShader:!1};return await mMr(e,c,n,i)}async function mMr(e,r,t,n){if(!n)return;let{parse:i}=n,a=ze(oe({},t),{draco:ze(oe({},t==null?void 0:t.draco),{extraAttributes:r.batchTableProperties||{}})});delete a["3d-tiles"];let o=await i(r.buffer,Ub,a),s=o.attributes.POSITION&&o.attributes.POSITION.value,u=o.attributes.COLOR_0&&o.attributes.COLOR_0.value,l=o.attributes.NORMAL&&o.attributes.NORMAL.value,c=o.attributes.BATCH_ID&&o.attributes.BATCH_ID.value,f=s&&o.attributes.POSITION.value.quantization,d=l&&o.attributes.NORMAL.value.quantization;if(f){let h=o.POSITION.data.quantization,b=h.range;e.quantizedVolumeScale=new mU.Vector3(b,b,b),e.quantizedVolumeOffset=new mU.Vector3(h.minValues),e.quantizedRange=(1<<h.quantizationBits)-1,e.isQuantizedDraco=!0}d&&(e.octEncodedRange=(1<<o.NORMAL.data.quantization.quantizationBits)-1,e.isOctEncodedDraco=!0);let p={};if(r.batchTableProperties)for(let h of Object.keys(r.batchTableProperties))o.attributes[h]&&o.attributes[h].value&&(p[h.toLowerCase()]=o.attributes[h].value);e.attributes=oe({positions:s,colors:hU(e,u,void 0),normals:l,batchIds:c},p)}var Bk="4.0.0-alpha.21";var jk="4.0.0-alpha.21";var{_parseImageNode:gMr}=globalThis,gU=typeof Image!="undefined",vU=typeof ImageBitmap!="undefined",vMr=Boolean(gMr),bU=wi?!0:vMr;function HSe(e){switch(e){case"auto":return vU||gU||bU;case"imagebitmap":return vU;case"image":return gU;case"data":return bU;default:throw new Error(`@loaders.gl/images: image ${e} not supported in this environment`)}}function WSe(){if(vU)return"imagebitmap";if(gU)return"image";if(bU)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function VSe(e){let r=bMr(e);if(!r)throw new Error("Not an image");return r}function yU(e){return Kb(e)}function Kb(e){switch(VSe(e)){case"data":return e;case"image":case"imagebitmap":let r=document.createElement("canvas"),t=r.getContext("2d");if(!t)throw new Error("getImageData");return r.width=e.width,r.height=e.height,t.drawImage(e,0,0),t.getImageData(0,0,e.width,e.height);default:throw new Error("getImageData")}}function bMr(e){return typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap?"imagebitmap":typeof Image!="undefined"&&e instanceof Image?"image":e&&typeof e=="object"&&e.data&&e.width&&e.height?"data":null}var yMr=/^data:image\/svg\+xml/,xMr=/\.svg((\?|#).*)?$/;function Mk(e){return e&&(yMr.test(e)||xMr.test(e))}function KSe(e,r){if(Mk(r)){let n=new TextDecoder().decode(e);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(n=unescape(encodeURIComponent(n)))}catch(a){throw new Error(a.message)}return`data:image/svg+xml;base64,${btoa(n)}`}return xU(e,r)}function xU(e,r){if(Mk(r))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}async function P2(e,r,t){let n=KSe(e,t),i=self.URL||self.webkitURL,a=typeof n!="string"&&i.createObjectURL(n);try{return await _Mr(a||n,r)}finally{a&&i.revokeObjectURL(a)}}async function _Mr(e,r){let t=new Image;return t.src=e,r.image&&r.image.decode&&t.decode?(await t.decode(),t):await new Promise((n,i)=>{try{t.onload=()=>n(t),t.onerror=a=>i(new Error(`Could not load image ${e}: ${a}`))}catch(a){i(a)}})}var EMr={},YSe=!0;async function _U(e,r,t){let n;Mk(t)?n=await P2(e,r,t):n=xU(e,t);let i=r&&r.imagebitmap;return await wMr(n,i)}async function wMr(e,r=null){if((SMr(r)||!YSe)&&(r=null),r)try{return await createImageBitmap(e,r)}catch(t){console.warn(t),YSe=!1}return await createImageBitmap(e)}function SMr(e){for(let r in e||EMr)return!1;return!0}function $Se(e){return!DMr(e,"ftyp",4)||(e[8]&96)==0?null:AMr(e)}function AMr(e){switch(TMr(e,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function TMr(e,r,t){return String.fromCharCode(...e.slice(r,t))}function CMr(e){return[...e].map(r=>r.charCodeAt(0))}function DMr(e,r,t=0){let n=CMr(r);for(let i=0;i<n.length;++i)if(n[i]!==e[i+t])return!1;return!0}var nc=!1,B2=!0;function z0(e){let r=j2(e);return OMr(r)||IMr(r)||RMr(r)||FMr(r)||kMr(r)}function kMr(e){let r=new Uint8Array(e instanceof DataView?e.buffer:e),t=$Se(r);return t?{mimeType:t.mimeType,width:0,height:0}:null}function OMr(e){let r=j2(e);return r.byteLength>=24&&r.getUint32(0,nc)===2303741511?{mimeType:"image/png",width:r.getUint32(16,nc),height:r.getUint32(20,nc)}:null}function RMr(e){let r=j2(e);return r.byteLength>=10&&r.getUint32(0,nc)===1195984440?{mimeType:"image/gif",width:r.getUint16(6,B2),height:r.getUint16(8,B2)}:null}function FMr(e){let r=j2(e);return r.byteLength>=14&&r.getUint16(0,nc)===16973&&r.getUint32(2,B2)===r.byteLength?{mimeType:"image/bmp",width:r.getUint32(18,B2),height:r.getUint32(22,B2)}:null}function IMr(e){let r=j2(e);if(!(r.byteLength>=3&&r.getUint16(0,nc)===65496&&r.getUint8(2)===255))return null;let{tableMarkers:n,sofMarkers:i}=PMr(),a=2;for(;a+9<r.byteLength;){let o=r.getUint16(a,nc);if(i.has(o))return{mimeType:"image/jpeg",height:r.getUint16(a+5,nc),width:r.getUint16(a+7,nc)};if(!n.has(o))return null;a+=2,a+=r.getUint16(a,nc)}return null}function PMr(){let e=new Set([65499,65476,65484,65501,65534]);for(let t=65504;t<65520;++t)e.add(t);let r=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:r}}function j2(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}async function EU(e,r){let{mimeType:t}=z0(e)||{},n=globalThis._parseImageNode;return Qr(n),await n(e,t)}async function wU(e,r,t){r=r||{};let i=(r.image||{}).type||"auto",{url:a}=t||{},o=BMr(i),s;switch(o){case"imagebitmap":s=await _U(e,r,a);break;case"image":s=await P2(e,r,a);break;case"data":s=await EU(e,r);break;default:Qr(!1)}return i==="data"&&(s=Kb(s)),s}function BMr(e){switch(e){case"auto":case"data":return WSe();default:return HSe(e),e}}var jMr=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],MMr=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],LMr={image:{type:"auto",decode:!0}},Yb={id:"image",module:"images",name:"Images",version:jk,mimeTypes:MMr,extensions:jMr,parse:wU,tests:[e=>Boolean(z0(new DataView(e)))],options:LMr};var{_encodeImageNode:XSe}=globalThis;async function JSe(e,r){return r=r||{},r.image=r.image||{},XSe?XSe(e,{type:r.image.mimeType}):qMr(e,r)}var QSe=!0;async function qMr(e,r){let{mimeType:t,jpegQuality:n}=r.image,{width:i,height:a}=yU(e),o=document.createElement("canvas");o.width=i,o.height=a,NMr(e,o);let s=await new Promise(u=>{if(n&&QSe)try{o.toBlob(u,t,n);return}catch{QSe=!1}o.toBlob(u,t)});if(!s)throw new Error("image encoding failed");return await s.arrayBuffer()}function NMr(e,r,t=0,n=0){if(t===0&&n===0&&typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap){let a=r.getContext("bitmaprenderer");if(a)return a.transferFromImageBitmap(e),r}let i=r.getContext("2d");if(e.data){let a=new Uint8ClampedArray(e.data),o=new ImageData(a,e.width,e.height);return i.putImageData(o,0,0),r}return i.drawImage(e,0,0),r}var SU={name:"Images",id:"image",module:"images",version:jk,extensions:["jpeg"],options:{image:{mimeType:"image/png",jpegQuality:null}},encode:JSe};var AU={};function TU(e){if(AU[e]===void 0){let r=wi?GMr(e):UMr(e);AU[e]=r}return AU[e]}function UMr(e){let r=["image/png","image/jpeg","image/gif"],{_parseImageNode:t,_imageFormatsNode:n=r}=globalThis;return Boolean(t)&&n.includes(e)}function GMr(e){switch(e){case"image/avif":case"image/webp":return zMr(e);default:return!0}}function zMr(e){try{return document.createElement("canvas").toDataURL(e).indexOf(`data:${e}`)===0}catch{return!1}}var $b="4.0.0-alpha.21";var ic={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"},CU;async function DU(e){let r=e.modules||{};return r.basis?r.basis:(CU=CU||HMr(e),await CU)}async function HMr(e){let r=null,t=null;return[r,t]=await Promise.all([await Vl(ic.TRANSCODER,"textures",e),await Vl(ic.TRANSCODER_WASM,"textures",e)]),r=r||globalThis.BASIS,await WMr(r,t)}function WMr(e,r){let t={};return r&&(t.wasmBinary=r),new Promise(n=>{e(t).then(i=>{let{BasisFile:a,initializeBasis:o}=i;o(),n({BasisFile:a})})})}var kU;async function OU(e){let r=e.modules||{};return r.basisEncoder?r.basisEncoder:(kU=kU||VMr(e),await kU)}async function VMr(e){let r=null,t=null;return[r,t]=await Promise.all([await Vl(ic.ENCODER,"textures",e),await Vl(ic.ENCODER_WASM,"textures",e)]),r=r||globalThis.BASIS,await KMr(r,t)}function KMr(e,r){let t={};return r&&(t.wasmBinary=r),new Promise(n=>{e(t).then(i=>{let{BasisFile:a,KTX2File:o,initializeBasis:s,BasisEncoder:u}=i;s(),n({BasisFile:a,KTX2File:o,BasisEncoder:u})})})}var Te={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919};var YMr=["","WEBKIT_","MOZ_"],ZSe={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"},Lk=null;function M2(e){if(!Lk){e=e||$Mr()||void 0,Lk=new Set;for(let r of YMr)for(let t in ZSe)if(e&&e.getExtension(`${r}${t}`)){let n=ZSe[t];Lk.add(n)}}return Lk}function $Mr(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}var fAe=$e(lAe());function Xb(e,r){let t=new Array(r.mipMapLevels),n=r.width,i=r.height,a=0;for(let o=0;o<r.mipMapLevels;++o){let s=QMr(r,n,i,e,o),u=JMr(e,o,a,s);t[o]={compressed:!0,format:r.internalFormat,data:u,width:n,height:i,levelSize:s},n=Math.max(1,n>>1),i=Math.max(1,i>>1),a+=s}return t}function JMr(e,r,t,n){return Array.isArray(e)?e[r].levelData:new Uint8Array(e.buffer,e.byteOffset+t,n)}function QMr(e,r,t,n,i){return Array.isArray(n)?e.sizeFunction(n[i]):e.sizeFunction(r,t)}var ZMr={131:Te.COMPRESSED_RGB_S3TC_DXT1_EXT,132:Te.COMPRESSED_SRGB_S3TC_DXT1_EXT,133:Te.COMPRESSED_RGBA_S3TC_DXT1_EXT,134:Te.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,135:Te.COMPRESSED_RGBA_S3TC_DXT3_EXT,136:Te.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,137:Te.COMPRESSED_RGBA_S3TC_DXT5_EXT,138:Te.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,139:Te.COMPRESSED_RED_RGTC1_EXT,140:Te.COMPRESSED_SIGNED_RED_RGTC1_EXT,141:Te.COMPRESSED_RED_GREEN_RGTC2_EXT,142:Te.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,147:Te.COMPRESSED_RGB8_ETC2,148:Te.COMPRESSED_SRGB8_ETC2,149:Te.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,150:Te.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,151:Te.COMPRESSED_RGBA8_ETC2_EAC,152:Te.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,153:Te.COMPRESSED_R11_EAC,154:Te.COMPRESSED_SIGNED_R11_EAC,155:Te.COMPRESSED_RG11_EAC,156:Te.COMPRESSED_SIGNED_RG11_EAC,157:Te.COMPRESSED_RGBA_ASTC_4x4_KHR,158:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,159:Te.COMPRESSED_RGBA_ASTC_5x4_KHR,160:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,161:Te.COMPRESSED_RGBA_ASTC_5x5_KHR,162:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,163:Te.COMPRESSED_RGBA_ASTC_6x5_KHR,164:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,165:Te.COMPRESSED_RGBA_ASTC_6x6_KHR,166:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,167:Te.COMPRESSED_RGBA_ASTC_8x5_KHR,168:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,169:Te.COMPRESSED_RGBA_ASTC_8x6_KHR,170:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,171:Te.COMPRESSED_RGBA_ASTC_8x8_KHR,172:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,173:Te.COMPRESSED_RGBA_ASTC_10x5_KHR,174:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,175:Te.COMPRESSED_RGBA_ASTC_10x6_KHR,176:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,177:Te.COMPRESSED_RGBA_ASTC_10x8_KHR,178:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,179:Te.COMPRESSED_RGBA_ASTC_10x10_KHR,180:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,181:Te.COMPRESSED_RGBA_ASTC_12x10_KHR,182:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,183:Te.COMPRESSED_RGBA_ASTC_12x12_KHR,184:Te.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,1000054e3:Te.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,1000054001:Te.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,1000066e3:Te.COMPRESSED_RGBA_ASTC_4x4_KHR,1000066001:Te.COMPRESSED_RGBA_ASTC_5x4_KHR,1000066002:Te.COMPRESSED_RGBA_ASTC_5x5_KHR,1000066003:Te.COMPRESSED_RGBA_ASTC_6x5_KHR,1000066004:Te.COMPRESSED_RGBA_ASTC_6x6_KHR,1000066005:Te.COMPRESSED_RGBA_ASTC_8x5_KHR,1000066006:Te.COMPRESSED_RGBA_ASTC_8x6_KHR,1000066007:Te.COMPRESSED_RGBA_ASTC_8x8_KHR,1000066008:Te.COMPRESSED_RGBA_ASTC_10x5_KHR,1000066009:Te.COMPRESSED_RGBA_ASTC_10x6_KHR,1000066010:Te.COMPRESSED_RGBA_ASTC_10x8_KHR,1000066011:Te.COMPRESSED_RGBA_ASTC_10x10_KHR,1000066012:Te.COMPRESSED_RGBA_ASTC_12x10_KHR,1000066013:Te.COMPRESSED_RGBA_ASTC_12x12_KHR};function cAe(e){return ZMr[e]}var rs=[171,75,84,88,32,50,48,187,13,10,26,10];function zk(e){let r=new Uint8Array(e);return!(r.byteLength<rs.length||r[0]!==rs[0]||r[1]!==rs[1]||r[2]!==rs[2]||r[3]!==rs[3]||r[4]!==rs[4]||r[5]!==rs[5]||r[6]!==rs[6]||r[7]!==rs[7]||r[8]!==rs[8]||r[9]!==rs[9]||r[10]!==rs[10]||r[11]!==rs[11])}function dAe(e){let r=new Uint8Array(e),t=(0,fAe.read)(r),n=Math.max(1,t.levels.length),i=t.pixelWidth,a=t.pixelHeight,o=cAe(t.vkFormat);return Xb(t.levels,{mipMapLevels:n,width:i,height:a,sizeFunction:s=>s.uncompressedByteLength,internalFormat:o})}var e9r={etc1:{basisFormat:0,compressed:!0,format:Te.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:Te.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:Te.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:Te.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:Te.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:Te.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};async function q2(e,r){if(r.basis.containerFormat==="auto"){if(zk(e)){let n=await OU(r);return pAe(n.KTX2File,e,r)}let{BasisFile:t}=await DU(r);return BU(t,e,r)}switch(r.basis.module){case"encoder":let t=await OU(r);switch(r.basis.containerFormat){case"ktx2":return pAe(t.KTX2File,e,r);case"basis":default:return BU(t.BasisFile,e,r)}case"transcoder":default:let{BasisFile:n}=await DU(r);return BU(n,e,r)}}function BU(e,r,t){let n=new e(new Uint8Array(r));try{if(!n.startTranscoding())throw new Error("Failed to start basis transcoding");let i=n.getNumImages(),a=[];for(let o=0;o<i;o++){let s=n.getNumLevels(o),u=[];for(let l=0;l<s;l++)u.push(r9r(n,o,l,t));a.push(u)}return a}finally{n.close(),n.delete()}}function r9r(e,r,t,n){let i=e.getImageWidth(r,t),a=e.getImageHeight(r,t),o=e.getHasAlpha(),{compressed:s,format:u,basisFormat:l}=hAe(n,o),c=e.getImageTranscodedSizeInBytes(r,t,l),f=new Uint8Array(c);if(!e.transcodeImage(f,r,t,l,0,0))throw new Error("failed to start Basis transcoding");return{width:i,height:a,data:f,compressed:s,format:u,hasAlpha:o}}function pAe(e,r,t){let n=new e(new Uint8Array(r));try{if(!n.startTranscoding())throw new Error("failed to start KTX2 transcoding");let i=n.getLevels(),a=[];for(let o=0;o<i;o++){a.push(t9r(n,o,t));break}return[a]}finally{n.close(),n.delete()}}function t9r(e,r,t){let{alphaFlag:n,height:i,width:a}=e.getImageLevelInfo(r,0,0),{compressed:o,format:s,basisFormat:u}=hAe(t,n),l=e.getImageTranscodedSizeInBytes(r,0,0,u),c=new Uint8Array(l);if(!e.transcodeImage(c,r,0,0,u,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:a,height:i,data:c,compressed:o,levelSize:l,hasAlpha:n,format:s}}function hAe(e,r){let t=e&&e.basis&&e.basis.format;return t==="auto"&&(t=Jb()),typeof t=="object"&&(t=r?t.alpha:t.noAlpha),t=t.toLowerCase(),e9r[t]}function Jb(){let e=M2();return e.has("astc")?"astc-4x4":e.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:e.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:e.has("etc1")?"etc1":e.has("etc2")?"etc2":"rgb565"}var mAe={name:"Basis",id:"basis",module:"textures",version:$b,worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},H0=ze(oe({},mAe),{parse:q2});var ts={MAGIC_NUMBER:542327876,HEADER_LENGTH:31,MAGIC_NUMBER_INDEX:0,HEADER_SIZE_INDEX:1,HEADER_FLAGS_INDEX:2,HEADER_HEIGHT_INDEX:3,HEADER_WIDTH_INDEX:4,MIPMAPCOUNT_INDEX:7,HEADER_PF_FLAGS_INDEX:20,HEADER_PF_FOURCC_INDEX:21,DDSD_MIPMAPCOUNT:131072,DDPF_FOURCC:4},n9r={DXT1:Te.COMPRESSED_RGB_S3TC_DXT1_EXT,DXT3:Te.COMPRESSED_RGBA_S3TC_DXT3_EXT,DXT5:Te.COMPRESSED_RGBA_S3TC_DXT5_EXT,"ATC ":Te.COMPRESSED_RGB_ATC_WEBGL,ATCA:Te.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,ATCI:Te.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL},i9r=bAe,a9r=Hk,o9r=Hk,s9r={DXT1:bAe,DXT3:Hk,DXT5:Hk,"ATC ":i9r,ATCA:a9r,ATCI:o9r};function gAe(e){return new Uint32Array(e,0,ts.HEADER_LENGTH)[ts.MAGIC_NUMBER_INDEX]===ts.MAGIC_NUMBER}function vAe(e){let r=new Int32Array(e,0,ts.HEADER_LENGTH),t=r[ts.HEADER_PF_FOURCC_INDEX];Qr(Boolean(r[ts.HEADER_PF_FLAGS_INDEX]&ts.DDPF_FOURCC),"DDS: Unsupported format, must contain a FourCC code");let n=u9r(t),i=n9r[n],a=s9r[n];Qr(i&&a,`DDS: Unknown pixel format ${t}`);let o=1;r[ts.HEADER_FLAGS_INDEX]&ts.DDSD_MIPMAPCOUNT&&(o=Math.max(1,r[ts.MIPMAPCOUNT_INDEX]));let s=r[ts.HEADER_WIDTH_INDEX],u=r[ts.HEADER_HEIGHT_INDEX],l=r[ts.HEADER_SIZE_INDEX]+4,c=new Uint8Array(e,l);return Xb(c,{mipMapLevels:o,width:s,height:u,sizeFunction:a,internalFormat:i})}function bAe(e,r){return(e+3>>2)*(r+3>>2)*8}function Hk(e,r){return(e+3>>2)*(r+3>>2)*16}function u9r(e){return String.fromCharCode(e&255,e>>8&255,e>>16&255,e>>24&255)}var Vs={MAGIC_NUMBER:55727696,MAGIC_NUMBER_EXTRA:1347834371,HEADER_LENGTH:13,HEADER_SIZE:52,MAGIC_NUMBER_INDEX:0,PIXEL_FORMAT_INDEX:2,COLOUR_SPACE_INDEX:4,HEIGHT_INDEX:6,WIDTH_INDEX:7,MIPMAPCOUNT_INDEX:11,METADATA_SIZE_INDEX:12},l9r={0:[Te.COMPRESSED_RGB_PVRTC_2BPPV1_IMG],1:[Te.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG],2:[Te.COMPRESSED_RGB_PVRTC_4BPPV1_IMG],3:[Te.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG],6:[Te.COMPRESSED_RGB_ETC1_WEBGL],7:[Te.COMPRESSED_RGB_S3TC_DXT1_EXT],9:[Te.COMPRESSED_RGBA_S3TC_DXT3_EXT],11:[Te.COMPRESSED_RGBA_S3TC_DXT5_EXT],22:[Te.COMPRESSED_RGB8_ETC2],23:[Te.COMPRESSED_RGBA8_ETC2_EAC],24:[Te.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2],25:[Te.COMPRESSED_R11_EAC],26:[Te.COMPRESSED_RG11_EAC],27:[Te.COMPRESSED_RGBA_ASTC_4X4_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR],28:[Te.COMPRESSED_RGBA_ASTC_5X4_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR],29:[Te.COMPRESSED_RGBA_ASTC_5X5_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR],30:[Te.COMPRESSED_RGBA_ASTC_6X5_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR],31:[Te.COMPRESSED_RGBA_ASTC_6X6_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR],32:[Te.COMPRESSED_RGBA_ASTC_8X5_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR],33:[Te.COMPRESSED_RGBA_ASTC_8X6_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR],34:[Te.COMPRESSED_RGBA_ASTC_8X8_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR],35:[Te.COMPRESSED_RGBA_ASTC_10X5_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR],36:[Te.COMPRESSED_RGBA_ASTC_10X6_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR],37:[Te.COMPRESSED_RGBA_ASTC_10X8_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR],38:[Te.COMPRESSED_RGBA_ASTC_10X10_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR],39:[Te.COMPRESSED_RGBA_ASTC_12X10_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR],40:[Te.COMPRESSED_RGBA_ASTC_12X12_KHR,Te.COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR]},c9r={0:_Ae,1:_Ae,2:EAe,3:EAe,6:N2,7:N2,9:U2,11:U2,22:N2,23:U2,24:N2,25:N2,26:U2,27:U2,28:f9r,29:d9r,30:p9r,31:h9r,32:m9r,33:g9r,34:v9r,35:b9r,36:y9r,37:x9r,38:_9r,39:E9r,40:w9r};function yAe(e){let t=new Uint32Array(e,0,Vs.HEADER_LENGTH)[Vs.MAGIC_NUMBER_INDEX];return t===Vs.MAGIC_NUMBER||t===Vs.MAGIC_NUMBER_EXTRA}function xAe(e){let r=new Uint32Array(e,0,Vs.HEADER_LENGTH),t=r[Vs.PIXEL_FORMAT_INDEX],n=r[Vs.COLOUR_SPACE_INDEX],i=l9r[t]||[],a=i.length>1&&n?i[1]:i[0],o=c9r[t],s=r[Vs.MIPMAPCOUNT_INDEX],u=r[Vs.WIDTH_INDEX],l=r[Vs.HEIGHT_INDEX],c=Vs.HEADER_SIZE+r[Vs.METADATA_SIZE_INDEX],f=new Uint8Array(e,c);return Xb(f,{mipMapLevels:s,width:u,height:l,sizeFunction:o,internalFormat:a})}function _Ae(e,r){return e=Math.max(e,16),r=Math.max(r,8),e*r/4}function EAe(e,r){return e=Math.max(e,8),r=Math.max(r,8),e*r/2}function N2(e,r){return Math.floor((e+3)/4)*Math.floor((r+3)/4)*8}function U2(e,r){return Math.floor((e+3)/4)*Math.floor((r+3)/4)*16}function f9r(e,r){return Math.floor((e+4)/5)*Math.floor((r+3)/4)*16}function d9r(e,r){return Math.floor((e+4)/5)*Math.floor((r+4)/5)*16}function p9r(e,r){return Math.floor((e+5)/6)*Math.floor((r+4)/5)*16}function h9r(e,r){return Math.floor((e+5)/6)*Math.floor((r+5)/6)*16}function m9r(e,r){return Math.floor((e+7)/8)*Math.floor((r+4)/5)*16}function g9r(e,r){return Math.floor((e+7)/8)*Math.floor((r+5)/6)*16}function v9r(e,r){return Math.floor((e+7)/8)*Math.floor((r+7)/8)*16}function b9r(e,r){return Math.floor((e+9)/10)*Math.floor((r+4)/5)*16}function y9r(e,r){return Math.floor((e+9)/10)*Math.floor((r+5)/6)*16}function x9r(e,r){return Math.floor((e+9)/10)*Math.floor((r+7)/8)*16}function _9r(e,r){return Math.floor((e+9)/10)*Math.floor((r+9)/10)*16}function E9r(e,r){return Math.floor((e+11)/12)*Math.floor((r+9)/10)*16}function w9r(e,r){return Math.floor((e+11)/12)*Math.floor((r+11)/12)*16}function wAe(e){if(zk(e))return dAe(e);if(gAe(e))return vAe(e);if(yAe(e))return xAe(e);throw new Error("Texture container format not recognized")}var S9r={"compressed-texture":{libraryPath:"libs/",useBasis:!1}},SAe={name:"Texture Containers",id:"compressed-texture",module:"textures",version:$b,worker:!0,extensions:["ktx","ktx2","dds","pvr"],mimeTypes:["image/ktx2","image/ktx","image/vnd-ms.dds","image/x-dds","application/octet-stream"],binary:!0,options:S9r},Wk=ze(oe({},SAe),{parse:async(e,r)=>r["compressed-texture"].useBasis?(r.basis=ze(oe({format:{alpha:"BC3",noAlpha:"BC1"}},r.basis),{containerFormat:"ktx2",module:"encoder"}),(await q2(e,r))[0]):wAe(e)});var jU={name:"Basis Universal Supercompressed GPU Texture",id:"ktx2-basis-writer",module:"textures",version:$b,extensions:["ktx2"],worker:!0,options:{useSRGB:!1,qualityLevel:10,encodeUASTC:!1,mipmaps:!1}};function ra(e,r){if(!e)throw new Error(r||"assert failed: gltf")}var Qb=!0,AAe=1735152710,MU=12,Vk=8,A9r=1313821514,T9r=5130562,C9r=0,D9r=0,k9r=1;function O9r(e,r=0){return`${String.fromCharCode(e.getUint8(r+0))}${String.fromCharCode(e.getUint8(r+1))}${String.fromCharCode(e.getUint8(r+2))}${String.fromCharCode(e.getUint8(r+3))}`}function TAe(e,r=0,t={}){let n=new DataView(e),{magic:i=AAe}=t,a=n.getUint32(r,!1);return a===i||a===AAe}function CAe(e,r,t=0,n={}){let i=new DataView(r),a=O9r(i,t+0),o=i.getUint32(t+4,Qb),s=i.getUint32(t+8,Qb);switch(Object.assign(e,{header:{byteOffset:t,byteLength:s,hasBinChunk:!1},type:a,version:o,json:{},binChunks:[]}),t+=MU,e.version){case 1:return R9r(e,i,t);case 2:return F9r(e,i,t,n={});default:throw new Error(`Invalid GLB version ${e.version}. Only supports version 1 and 2.`)}}function R9r(e,r,t){Qr(e.header.byteLength>MU+Vk);let n=r.getUint32(t+0,Qb),i=r.getUint32(t+4,Qb);return t+=Vk,Qr(i===C9r),LU(e,r,t,n),t+=n,t+=qU(e,r,t,e.header.byteLength),t}function F9r(e,r,t,n){return Qr(e.header.byteLength>MU+Vk),I9r(e,r,t,n),t+e.header.byteLength}function I9r(e,r,t,n){for(;t+8<=e.header.byteLength;){let i=r.getUint32(t+0,Qb),a=r.getUint32(t+4,Qb);switch(t+=Vk,a){case A9r:LU(e,r,t,i);break;case T9r:qU(e,r,t,i);break;case D9r:n.strict||LU(e,r,t,i);break;case k9r:n.strict||qU(e,r,t,i);break;default:break}t+=$o(i,4)}return t}function LU(e,r,t,n){let i=new Uint8Array(r.buffer,t,n),o=new TextDecoder("utf8").decode(i);return e.json=JSON.parse(o),$o(n,4)}function qU(e,r,t,n){return e.header.hasBinChunk=!0,e.binChunks.push({byteOffset:t,byteLength:n,arrayBuffer:r.buffer}),$o(n,4)}function NU(e,r){if(e.startsWith("data:")||e.startsWith("http:")||e.startsWith("https:"))return e;let n=r.baseUri||r.uri;if(!n)throw new Error(`'baseUri' must be provided to resolve relative url ${e}`);return n.substr(0,n.lastIndexOf("/")+1)+e}function DAe(e,r,t){let n=e.bufferViews[t];ra(n);let i=n.buffer,a=r[i];ra(a);let o=(n.byteOffset||0)+a.byteOffset;return new Uint8Array(a.arrayBuffer,o,n.byteLength)}var GU={};xo(GU,{decode:()=>Q9r,name:()=>J9r});var P9r=1.33,kAe=["SCALAR","VEC2","VEC3","VEC4"],B9r=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],j9r=new Map(B9r),M9r={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},L9r={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q9r={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Kk(e){return kAe[e-1]||kAe[0]}function Zb(e){let r=j9r.get(e.constructor);if(!r)throw new Error("Illegal typed array");return r}function ey(e,r){let t=q9r[e.componentType],n=M9r[e.type],i=L9r[e.componentType],a=e.count*n,o=e.count*n*i;return ra(o>=0&&o<=r.byteLength),{ArrayType:t,length:a,byteLength:o}}function G2(e){let{images:r,bufferViews:t}=e;r=r||[],t=t||[];let n=r.map(o=>o.bufferView);t=t.filter(o=>!n.includes(o));let i=t.reduce((o,s)=>o+s.byteLength,0),a=r.reduce((o,s)=>{let{width:u,height:l}=s.image;return o+u*l},0);return i+Math.ceil(4*a*P9r)}function N9r(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}var _n=class{constructor(r){this.gltf={json:(r==null?void 0:r.json)||N9r(),buffers:(r==null?void 0:r.buffers)||[],images:(r==null?void 0:r.images)||[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(r){return this.json[r]}getExtraData(r){return(this.json.extras||{})[r]}hasExtension(r){let t=this.getUsedExtensions().find(i=>i===r),n=this.getRequiredExtensions().find(i=>i===r);return typeof t=="string"||typeof n=="string"}getExtension(r){let t=this.getUsedExtensions().find(i=>i===r),n=this.json.extensions||{};return t?n[r]:null}getRequiredExtension(r){return this.getRequiredExtensions().find(n=>n===r)?this.getExtension(r):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(r,t){return(r.extensions||{})[t]}getScene(r){return this.getObject("scenes",r)}getNode(r){return this.getObject("nodes",r)}getSkin(r){return this.getObject("skins",r)}getMesh(r){return this.getObject("meshes",r)}getMaterial(r){return this.getObject("materials",r)}getAccessor(r){return this.getObject("accessors",r)}getTexture(r){return this.getObject("textures",r)}getSampler(r){return this.getObject("samplers",r)}getImage(r){return this.getObject("images",r)}getBufferView(r){return this.getObject("bufferViews",r)}getBuffer(r){return this.getObject("buffers",r)}getObject(r,t){if(typeof t=="object")return t;let n=this.json[r]&&this.json[r][t];if(!n)throw new Error(`glTF file error: Could not find ${r}[${t}]`);return n}getTypedArrayForBufferView(r){r=this.getBufferView(r);let t=r.buffer,n=this.gltf.buffers[t];ra(n);let i=(r.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,i,r.byteLength)}getTypedArrayForAccessor(r){r=this.getAccessor(r);let t=this.getBufferView(r.bufferView),i=this.getBuffer(t.buffer).data,{ArrayType:a,length:o}=ey(r,t),s=t.byteOffset+r.byteOffset;return new a(i,s,o)}getTypedArrayForImageData(r){r=this.getAccessor(r);let t=this.getBufferView(r.bufferView),i=this.getBuffer(t.buffer).data,a=t.byteOffset||0;return new Uint8Array(i,a,t.byteLength)}addApplicationData(r,t){return this.json[r]=t,this}addExtraData(r,t){return this.json.extras=this.json.extras||{},this.json.extras[r]=t,this}addObjectExtension(r,t,n){return r.extensions=r.extensions||{},r.extensions[t]=n,this.registerUsedExtension(t),this}setObjectExtension(r,t,n){let i=r.extensions||{};i[t]=n}removeObjectExtension(r,t){let n=(r==null?void 0:r.extensions)||{};if(n[t]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];let i=this.json.extensionsRemoved;i.includes(t)||i.push(t)}delete n[t]}addExtension(r,t={}){return ra(t),this.json.extensions=this.json.extensions||{},this.json.extensions[r]=t,this.registerUsedExtension(r),t}addRequiredExtension(r,t={}){return ra(t),this.addExtension(r,t),this.registerRequiredExtension(r),t}registerUsedExtension(r){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===r)||this.json.extensionsUsed.push(r)}registerRequiredExtension(r){this.registerUsedExtension(r),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===r)||this.json.extensionsRequired.push(r)}removeExtension(r){var t;if((t=this.json.extensions)==null?void 0:t[r]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];let n=this.json.extensionsRemoved;n.includes(r)||n.push(r)}this.json.extensions&&delete this.json.extensions[r],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,r),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,r)}setDefaultScene(r){this.json.scene=r}addScene(r){let{nodeIndices:t}=r;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(r){let{meshIndex:t,matrix:n}=r;this.json.nodes=this.json.nodes||[];let i={mesh:t};return n&&(i.matrix=n),this.json.nodes.push(i),this.json.nodes.length-1}addMesh(r){let{attributes:t,indices:n,material:i,mode:a=4}=r,s={primitives:[{attributes:this._addAttributes(t),mode:a}]};if(n){let u=this._addIndices(n);s.primitives[0].indices=u}return Number.isFinite(i)&&(s.primitives[0].material=i),this.json.meshes=this.json.meshes||[],this.json.meshes.push(s),this.json.meshes.length-1}addPointCloud(r){let n={primitives:[{attributes:this._addAttributes(r),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(n),this.json.meshes.length-1}addImage(r,t){let n=z0(r),i=t||(n==null?void 0:n.mimeType),o={bufferView:this.addBufferView(r),mimeType:i};return this.json.images=this.json.images||[],this.json.images.push(o),this.json.images.length-1}addBufferView(r,t=0,n=this.byteLength){let i=r.byteLength;ra(Number.isFinite(i)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(r);let a={buffer:t,byteOffset:n,byteLength:i};return this.byteLength+=$o(i,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(a),this.json.bufferViews.length-1}addAccessor(r,t){let n={bufferView:r,type:Kk(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}addBinaryBuffer(r,t={size:3}){let n=this.addBufferView(r),i={min:t.min,max:t.max};(!i.min||!i.max)&&(i=this._getAccessorMinMax(r,t.size));let a={size:t.size,componentType:Zb(r),count:Math.round(r.length/t.size),min:i.min,max:i.max};return this.addAccessor(n,Object.assign(a,t))}addTexture(r){let{imageIndex:t}=r,n={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(n),this.json.textures.length-1}addMaterial(r){return this.json.materials=this.json.materials||[],this.json.materials.push(r),this.json.materials.length-1}createBinaryChunk(){var a,o;this.gltf.buffers=[];let r=this.byteLength,t=new ArrayBuffer(r),n=new Uint8Array(t),i=0;for(let s of this.sourceBuffers||[])i=R7(s,n,i);((o=(a=this.json)==null?void 0:a.buffers)==null?void 0:o[0])?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=t,this.sourceBuffers=[t]}_removeStringFromArray(r,t){let n=!0;for(;n;){let i=r.indexOf(t);i>-1?r.splice(i,1):n=!1}}_addAttributes(r={}){let t={};for(let n in r){let i=r[n],a=this._getGltfAttributeName(n),o=this.addBinaryBuffer(i.value,i);t[a]=o}return t}_addIndices(r){return this.addBinaryBuffer(r,{size:1})}_getGltfAttributeName(r){switch(r.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return r}}_getAccessorMinMax(r,t){let n={min:null,max:null};if(r.length<t)return n;n.min=[],n.max=[];let i=r.subarray(0,t);for(let a of i)n.min.push(a),n.max.push(a);for(let a=t;a<r.length;a+=t)for(let o=0;o<t;o++)n.min[0+o]=Math.min(n.min[0+o],r[a+o]),n.max[0+o]=Math.max(n.max[0+o],r[a+o]);return n}};var U9r="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",G9r="B9h9z9tFBBBF8dL9gBB9gLaaaaaFa9gEaaaB9gGaaB9gFaFaEQSBBFBFFGEGEGIILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBNn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBcI9z9iqlBMc/j9JSIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMkRIbaG97FaK978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAnDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAnDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBRnCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBHiCFD9tAiAPD9OD9hD9RHiDQBTFtGmEYIPLdKeOnH8ZAIAQJDBIBHpCFD9tApAPD9OD9hD9RHpAIASJDBIBHyCFD9tAyAPD9OD9hD9RHyDQBTFtGmEYIPLdKeOnH8cDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAnD9uHnDyBjGBAEAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnA8ZA8cDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNiV8ZcpMyS8cQ8df8eb8fHdApAyDQNiV8ZcpMyS8cQ8df8eb8fHiDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/xLGEaK978jUUUUBCAlHE8kUUUUBGXGXAGCI9HQBGXAFC98ZHI9FQBABRGCBRLEXAGAGDBBBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMBBAGCTJRGALCIJHLAI9JQBMMAIAF9PQFAEAFCEZHLCGWHGqCBCTAGl/8MBAEABAICGWJHIAG/8cBBGXAL9FQBAEAEDBIBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMIBMAIAEAG/8cBBSFMABAFC98ZHGT+HUUUBAGAF9PQBAEAFCEZHICEWHLJCBCAALl/8MBAEABAGCEWJHGAL/8cBBAEAIT+HUUUBAGAEAL/8cBBMAECAJ8kUUUUBM+yEGGaO97GXAF9FQBCBRGEXABCTJHEAEDBBBHICBDtHLCUU98D8cFCUU98D8cEHKD9OABDBBBHOAIDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAOAIDQBFGENVcMTtmYi8ZpyHICTD+sFD/6FHND/gFAICTD+rFCTD+sFD/6FHVD/gFD/kFD/lFHI9DB/+g6DYAVAIALD+2FHLAVCUUUU94DtHcD9OD9RD/kFHVAVD/mFAIAID/mFANALANAcD9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHLD/kFCTD+rFAVAND/mFALD/kFCggEDtD9OD9QHVAIAND/mFALD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHIDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAOAKD9OAVAIDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM94FEa8jUUUUBCAlHE8kUUUUBABAFC98ZHIT+JUUUBGXAIAF9PQBAEAFCEZHLCEWHFJCBCAAFl/8MBAEABAICEWJHBAF/8cBBAEALT+JUUUBABAEAF/8cBBMAECAJ8kUUUUBM/hEIGaF97FaL978jUUUUBCTlRGGXAF9FQBCBREEXAGABDBBBHIABCTJHLDBBBHKDQILKOSQfbPden8c8d8e8fHOCTD+sFHNCID+rFDMIBAB9DBBU8/DY9D/zI818/DYANCEDtD9QD/6FD/nFHNAIAKDQBFGENVcMTtmYi8ZpyHICTD+rFCTD+sFD/6FD/mFHKAKD/mFANAICTD+sFD/6FD/mFHVAVD/mFANAOCTD+rFCTD+sFD/6FD/mFHOAOD/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHND/mF9DBBX9LDYHID/kFCggEDtHcD9OAVAND/mFAID/kFCTD+rFD9QHVAOAND/mFAID/kFCTD+rFAKAND/mFAID/kFAcD9OD9QHNDQBFTtGEmYILPdKOenHID8dBAGDBIBDyB+t+J83EBABCNJAID8dFAGDBIBDyF+t+J83EBALAVANDQNVi8ZcMpySQ8c8dfb8e8fHND8dBAGDBIBDyG+t+J83EBABCiJAND8dFAGDBIBDyE+t+J83EBABCAJRBAECIJHEAF9JQBMMM/3FGEaF978jUUUUBCoBlREGXAGCGrAF9sHIC98ZHL9FQBCBRGABRFEXAFAFDBBBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBAFCTJRFAGCIJHGAL9JQBMMGXALAI9PQBAEAICEZHGCGWHFqCBCoBAFl/8MBAEABALCGWJHLAF/8cBBGXAG9FQBAEAEDBIBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMIBMALAEAF/8cBBMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",z9r=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),H9r=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),W9r={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},V9r={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function OAe(e,r,t,n,i,a="NONE"){let o=await K9r();X9r(o,o.exports[V9r[i]],e,r,t,n,o.exports[W9r[a||"NONE"]])}var UU;async function K9r(){return UU||(UU=Y9r()),UU}async function Y9r(){let e=U9r;WebAssembly.validate(z9r)&&(e=G9r,console.log("Warning: meshopt_decoder is using experimental SIMD support"));let r=await WebAssembly.instantiate($9r(e),{});return await r.instance.exports.__wasm_call_ctors(),r.instance}function $9r(e){let r=new Uint8Array(e.length);for(let n=0;n<e.length;++n){let i=e.charCodeAt(n);r[n]=i>96?i-71:i>64?i-65:i>47?i+4:i>46?63:62}let t=0;for(let n=0;n<e.length;++n)r[t++]=r[n]<60?H9r[r[n]]:(r[n]-60)*64+r[++n];return r.buffer.slice(0,t)}function X9r(e,r,t,n,i,a,o){let s=e.exports.sbrk,u=n+3&~3,l=s(u*i),c=s(a.length),f=new Uint8Array(e.exports.memory.buffer);f.set(a,c);let d=r(l,n,i,c,a.length);if(d===0&&o&&o(l,u,i),t.set(f.subarray(l,l+n*i)),s(l-s(0)),d!==0)throw new Error(`Malformed buffer data: ${d}`)}var Yk="EXT_meshopt_compression",J9r=Yk;async function Q9r(e,r){var i,a;let t=new _n(e);if(!((i=r==null?void 0:r.gltf)==null?void 0:i.decompressMeshes)||!((a=r.gltf)==null?void 0:a.loadBuffers))return;let n=[];for(let o of e.json.bufferViews||[])n.push(Z9r(t,o));await Promise.all(n),t.removeExtension(Yk)}async function Z9r(e,r){let t=e.getObjectExtension(r,Yk);if(t){let{byteOffset:n=0,byteLength:i=0,byteStride:a,count:o,mode:s,filter:u="NONE",buffer:l}=t,c=e.gltf.buffers[l],f=new Uint8Array(c.arrayBuffer,c.byteOffset+n,i),d=new Uint8Array(e.gltf.buffers[r.buffer].arrayBuffer,r.byteOffset,r.byteLength);await OAe(d,o,a,f,s,u),e.removeObjectExtension(r,Yk)}}var zU={};xo(zU,{name:()=>eLr,preprocess:()=>rLr});var ry="EXT_texture_webp",eLr=ry;function rLr(e,r){let t=new _n(e);if(!TU("image/webp")){if(t.getRequiredExtensions().includes(ry))throw new Error(`gltf: Required extension ${ry} not supported by browser`);return}let{json:n}=t;for(let i of n.textures||[]){let a=t.getObjectExtension(i,ry);a&&(i.source=a.source),t.removeObjectExtension(i,ry)}t.removeExtension(ry)}var HU={};xo(HU,{name:()=>tLr,preprocess:()=>nLr});var $k="KHR_texture_basisu",tLr=$k;function nLr(e,r){let t=new _n(e),{json:n}=t;for(let i of n.textures||[]){let a=t.getObjectExtension(i,$k);a&&(i.source=a.source,t.removeObjectExtension(i,$k))}t.removeExtension($k)}var VU={};xo(VU,{decode:()=>uLr,encode:()=>lLr,name:()=>oLr,preprocess:()=>sLr});function RAe(e){let r={};for(let t in e){let n=e[t];if(t!=="indices"){let i=WU(n);r[t]=i}}return r}function WU(e){let{buffer:r,size:t,count:n}=iLr(e);return{value:r,size:t,byteOffset:0,count:n,type:Kk(t),componentType:Zb(r)}}function iLr(e){let r=e,t=1,n=0;return e&&e.value&&(r=e.value,t=e.size||1),r&&(ArrayBuffer.isView(r)||(r=aLr(r,Float32Array)),n=r.length/t),{buffer:r,size:t,count:n}}function aLr(e,r,t=!1){return e?Array.isArray(e)?new r(e):t&&!(e instanceof r)?new r(e):e:null}var Rp="KHR_draco_mesh_compression",oLr=Rp;function sLr(e,r,t){let n=new _n(e);for(let i of FAe(n))n.getObjectExtension(i,Rp)}async function uLr(e,r,t){var a;if(!((a=r==null?void 0:r.gltf)==null?void 0:a.decompressMeshes))return;let n=new _n(e),i=[];for(let o of FAe(n))n.getObjectExtension(o,Rp)&&i.push(cLr(n,o,r,t));await Promise.all(i),n.removeExtension(Rp)}function lLr(e,r={}){let t=new _n(e);for(let n of t.json.meshes||[])fLr(n,r),t.addRequiredExtension(Rp)}async function cLr(e,r,t,n){let i=e.getObjectExtension(r,Rp);if(!i)return;let a=e.getTypedArrayForBufferView(i.bufferView),o=A0(a.buffer,a.byteOffset),{parse:s}=n,u=oe({},t);delete u["3d-tiles"];let l=await s(o,Ub,u,n),c=RAe(l.attributes);for(let[f,d]of Object.entries(c))if(f in r.attributes){let p=r.attributes[f],h=e.getAccessor(p);(h==null?void 0:h.min)&&(h==null?void 0:h.max)&&(d.min=h.min,d.max=h.max)}r.attributes=c,l.indices&&(r.indices=WU(l.indices)),e.removeObjectExtension(r,Rp),dLr(r)}function fLr(e,r,t=4,n,i){var c;if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");let a=n.DracoWriter.encodeSync({attributes:e}),o=(c=i==null?void 0:i.parseSync)==null?void 0:c.call(i,{attributes:e}),s=n._addFauxAttributes(o.attributes),u=n.addBufferView(a);return{primitives:[{attributes:s,mode:t,extensions:{[Rp]:{bufferView:u,attributes:s}}}]}}function dLr(e){if(!e.attributes&&Object.keys(e.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*FAe(e){for(let r of e.json.meshes||[])for(let t of r.primitives)yield t}var YU={};xo(YU,{decode:()=>gLr,name:()=>pLr});var ty=$e(Xt());var IAe={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},PAe={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4};var KU="KHR_texture_transform",pLr=KU,Xk=new ty.Vector3,hLr=new ty.Matrix3,mLr=new ty.Matrix3;async function gLr(e,r){var a;if(!new _n(e).hasExtension(KU)||!((a=r.gltf)==null?void 0:a.loadBuffers))return;let i=e.json.materials||[];for(let o=0;o<i.length;o++)vLr(o,e)}function vLr(e,r){var l,c,f;let t=[],n=(l=r.json.materials)==null?void 0:l[e],i=(c=n==null?void 0:n.pbrMetallicRoughness)==null?void 0:c.baseColorTexture;i&&z2(r,e,i,t);let a=n==null?void 0:n.emissiveTexture;a&&z2(r,e,a,t);let o=n==null?void 0:n.normalTexture;o&&z2(r,e,o,t);let s=n==null?void 0:n.occlusionTexture;s&&z2(r,e,s,t);let u=(f=n==null?void 0:n.pbrMetallicRoughness)==null?void 0:f.metallicRoughnessTexture;u&&z2(r,e,u,t)}function z2(e,r,t,n){let i=bLr(t,n);if(!i)return;let a=e.json.meshes||[];for(let o of a)for(let s of o.primitives){let u=s.material;Number.isFinite(u)&&r===u&&yLr(e,s,i)}}function bLr(e,r){var o;let t=(o=e.extensions)==null?void 0:o[KU],{texCoord:n=0}=e,{texCoord:i=n}=t;if(!(r.findIndex(([s,u])=>s===n&&u===i)!==-1)){let s=ELr(t);return n!==i&&(e.texCoord=i),r.push([n,i]),{originalTexCoord:n,texCoord:i,matrix:s}}return null}function yLr(e,r,t){var s,u;let{originalTexCoord:n,texCoord:i,matrix:a}=t,o=r.attributes[`TEXCOORD_${n}`];if(Number.isFinite(o)){let l=(s=e.json.accessors)==null?void 0:s[o];if(l&&l.bufferView){let c=(u=e.json.bufferViews)==null?void 0:u[l.bufferView];if(c){let{arrayBuffer:f,byteOffset:d}=e.buffers[c.buffer],p=(d||0)+(l.byteOffset||0)+(c.byteOffset||0),{ArrayType:h,length:b}=ey(l,c),v=PAe[l.componentType],y=IAe[l.type],w=c.byteStride||v*y,A=new Float32Array(b);for(let C=0;C<l.count;C++){let D=new h(f,p+C*w,2);Xk.set(D[0],D[1],1),Xk.transformByMatrix3(a),A.set([Xk[0],Xk[1]],C*y)}n===i?xLr(l,c,e.buffers,A):_Lr(i,l,r,e,A)}}}}function xLr(e,r,t,n){e.componentType=5126,t.push({arrayBuffer:n.buffer,byteOffset:0,byteLength:n.buffer.byteLength}),r.buffer=t.length-1,r.byteLength=n.buffer.byteLength,r.byteOffset=0,delete r.byteStride}function _Lr(e,r,t,n,i){n.buffers.push({arrayBuffer:i.buffer,byteOffset:0,byteLength:i.buffer.byteLength});let a=n.json.bufferViews;if(!a)return;a.push({buffer:n.buffers.length-1,byteLength:i.buffer.byteLength,byteOffset:0});let o=n.json.accessors;!o||(o.push({bufferView:(a==null?void 0:a.length)-1,byteOffset:0,componentType:5126,count:r.count,type:"VEC2"}),t.attributes[`TEXCOORD_${e}`]=o.length-1)}function ELr(e){let{offset:r=[0,0],rotation:t=0,scale:n=[1,1]}=e,i=new ty.Matrix3().set(1,0,0,0,1,0,r[0],r[1],1),a=hLr.set(Math.cos(t),Math.sin(t),0,-Math.sin(t),Math.cos(t),0,0,0,1),o=mLr.set(n[0],0,0,0,n[1],0,0,0,1);return i.multiplyRight(a).multiplyRight(o)}var $U={};xo($U,{decode:()=>SLr,encode:()=>ALr,name:()=>wLr});var W0="KHR_lights_punctual",wLr=W0;async function SLr(e){let r=new _n(e),{json:t}=r,n=r.getExtension(W0);n&&(r.json.lights=n.lights,r.removeExtension(W0));for(let i of t.nodes||[]){let a=r.getObjectExtension(i,W0);a&&(i.light=a.light),r.removeObjectExtension(i,W0)}}async function ALr(e){let r=new _n(e),{json:t}=r;if(t.lights){let n=r.addExtension(W0);ra(!n.lights),n.lights=t.lights,delete t.lights}if(r.json.lights){for(let n of r.json.lights){let i=n.node;r.addObjectExtension(i,W0,n)}delete r.json.lights}}var XU={};xo(XU,{decode:()=>CLr,encode:()=>DLr,name:()=>TLr});var H2="KHR_materials_unlit",TLr=H2;async function CLr(e){let r=new _n(e),{json:t}=r;for(let n of t.materials||[])n.extensions&&n.extensions.KHR_materials_unlit&&(n.unlit=!0),r.removeObjectExtension(n,H2);r.removeExtension(H2)}function DLr(e){let r=new _n(e),{json:t}=r;if(r.materials)for(let n of t.materials||[])n.unlit&&(delete n.unlit,r.addObjectExtension(n,H2,{}),r.addExtension(H2))}var JU={};xo(JU,{decode:()=>OLr,encode:()=>RLr,name:()=>kLr});var W2="KHR_techniques_webgl",kLr=W2;async function OLr(e){let r=new _n(e),{json:t}=r,n=r.getExtension(W2);if(n){let i=FLr(n,r);for(let a of t.materials||[]){let o=r.getObjectExtension(a,W2);o&&(a.technique=Object.assign({},o,i[o.technique]),a.technique.values=ILr(a.technique,r)),r.removeObjectExtension(a,W2)}r.removeExtension(W2)}}async function RLr(e,r){}function FLr(e,r){let{programs:t=[],shaders:n=[],techniques:i=[]}=e,a=new TextDecoder;return n.forEach(o=>{if(Number.isFinite(o.bufferView))o.code=a.decode(r.getTypedArrayForBufferView(o.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),t.forEach(o=>{o.fragmentShader=n[o.fragmentShader],o.vertexShader=n[o.vertexShader]}),i.forEach(o=>{o.program=t[o.program]}),i}function ILr(e,r){let t=Object.assign({},e.values);return Object.keys(e.uniforms||{}).forEach(n=>{e.uniforms[n].value&&!(n in t)&&(t[n]=e.uniforms[n].value)}),Object.keys(t).forEach(n=>{typeof t[n]=="object"&&t[n].index!==void 0&&(t[n].texture=r.getTexture(t[n].index))}),t}var QU={};xo(QU,{decode:()=>BLr,name:()=>PLr});var BAe="EXT_feature_metadata",PLr=BAe;async function BLr(e,r){let t=new _n(e);jLr(t,r)}function jLr(e,r){var o,s;let t=e.getExtension(BAe);if(!t)return;let n=(o=t.schema)==null?void 0:o.classes,{featureTables:i}=t;if(n&&i)for(let u in n){let l=n[u],c=WLr(i,u);c&&MLr(e,c,l)}let{featureTextures:a}=t;if(n&&a&&((s=r.gltf)==null?void 0:s.loadImages))for(let u in n){let l=n[u],c=VLr(a,u);c&&LLr(e,c,l)}}function MLr(e,r,t){var n;for(let i in t.properties){let a=t.properties[i],o=(n=r==null?void 0:r.properties)==null?void 0:n[i],s=r.count;if(o){let u=qLr(e,a,s,o);o.data=u}}}function LLr(e,r,t){var i;let n=r.class;for(let a in t.properties){let o=(i=r==null?void 0:r.properties)==null?void 0:i[a];if(o){let s=NLr(e,o,n);o.data=s}}}function qLr(e,r,t,n){let i=n.bufferView,a=e.getTypedArrayForBufferView(i);switch(r.type){case"STRING":{let o=n.stringOffsetBufferView,s=e.getTypedArrayForBufferView(o);return KLr(a,s,t)}default:}return a}function NLr(e,r,t){let n=e.gltf.json;if(!n.meshes)return[];let i=[];for(let a of n.meshes)for(let o of a.primitives)ULr(e,t,r,i,o);return i}function ULr(e,r,t,n,i){var C,D,P;let a=e.gltf.json,o=[],s=`TEXCOORD_${t.texture.texCoord}`,u=i.attributes[s],l=e.getBufferView(u),c=e.getTypedArrayForBufferView(l),f=new Float32Array(c.buffer,c.byteOffset,c.length/4),d=t.texture.index,p=(C=a.textures)==null?void 0:C[d],h=p==null?void 0:p.source;if(typeof h!="undefined"){let k=(D=a.images)==null?void 0:D[h],L=k==null?void 0:k.mimeType,I=(P=e.gltf.images)==null?void 0:P[h];if(I)for(let V=0;V<f.length;V+=2){let N=GLr(I,L,f,V,t.channels);o.push(N)}}let b=[];for(let k of o){let L=n.findIndex(I=>I===k);L===-1&&(L=n.push(k)-1),b.push(L)}let v=new Uint32Array(b),y=e.gltf.buffers.push({arrayBuffer:v.buffer,byteOffset:0,byteLength:v.byteLength})-1,w=e.addBufferView(v,y,0),A=e.addAccessor(w,{size:1,componentType:Zb(v),count:v.length});i.attributes[r]=A}function GLr(e,r,t,n,i){let a={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},o=t[n],s=t[n+1],u=1;r&&(r.indexOf("image/jpeg")!==-1||r.indexOf("image/png")!==-1)&&(u=4);let l=HLr(o,s,e,u),c=0;for(let f of i){let d=a[f];c|=zLr(e,l+d.offset)<<d.shift}return c}function zLr(e,r){let t=Kb(e);if(t.data.length<=r)throw new Error(`${t.data.length} <= ${r}`);return t.data[r]}function HLr(e,r,t,n=1){let i=t.width,a=jAe(e)*(i-1),o=Math.round(a),s=t.height,u=jAe(r)*(s-1),l=Math.round(u),c=t.components?t.components:n;return(l*i+o)*c}function jAe(e){return(e%1+1)%1}function WLr(e,r){for(let t in e){let n=e[t];if(n.class===r)return n}return null}function VLr(e,r){for(let t in e){let n=e[t];if(n.class===r)return n}return null}function KLr(e,r,t){let n=[],i=new TextDecoder("utf8"),a=0,o=4;for(let s=0;s<t;s++){let u=r[(s+1)*o]-r[s*o],l=e.subarray(a,u+a),c=i.decode(l);n.push(c),a+=u}return n}var MAe=[GU,zU,HU,VU,$U,XU,JU,YU,QU];function LAe(e,r={},t){var i;let n=MAe.filter(a=>NAe(a.name,r));for(let a of n)(i=a.preprocess)==null||i.call(a,e,r,t)}async function qAe(e,r={},t){var i;let n=MAe.filter(a=>NAe(a.name,r));for(let a of n)await((i=a.decode)==null?void 0:i.call(a,e,r,t))}function NAe(e,r){var i;let t=((i=r==null?void 0:r.gltf)==null?void 0:i.excludeExtensions)||{};return!(e in t&&!t[e])}var ZU="KHR_binary_glTF";function UAe(e){let r=new _n(e),{json:t}=r;for(let n of t.images||[]){let i=r.getObjectExtension(n,ZU);i&&Object.assign(n,i),r.removeObjectExtension(n,ZU)}t.buffers&&t.buffers[0]&&delete t.buffers[0].uri,r.removeExtension(ZU)}var GAe={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},YLr={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"},zAe=class{constructor(){this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}normalize(r,t){this.json=r.json;let n=r.json;switch(n.asset&&n.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${n.asset.version}`);return}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(n),this._convertTopLevelObjectsToArrays(n),UAe(r),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n),this._updateMaterial(n)}_addAsset(r){r.asset=r.asset||{},r.asset.version="2.0",r.asset.generator=r.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(r){for(let t in GAe)this._convertTopLevelObjectToArray(r,t)}_convertTopLevelObjectToArray(r,t){let n=r[t];if(!(!n||Array.isArray(n))){r[t]=[];for(let i in n){let a=n[i];a.id=a.id||i;let o=r[t].length;r[t].push(a),this.idToIndexMap[t][i]=o}}}_convertObjectIdsToArrayIndices(r){for(let t in GAe)this._convertIdsToIndices(r,t);"scene"in r&&(r.scene=this._convertIdToIndex(r.scene,"scene"));for(let t of r.textures)this._convertTextureIds(t);for(let t of r.meshes)this._convertMeshIds(t);for(let t of r.nodes)this._convertNodeIds(t);for(let t of r.scenes)this._convertSceneIds(t)}_convertTextureIds(r){r.source&&(r.source=this._convertIdToIndex(r.source,"image"))}_convertMeshIds(r){for(let t of r.primitives){let{attributes:n,indices:i,material:a}=t;for(let o in n)n[o]=this._convertIdToIndex(n[o],"accessor");i&&(t.indices=this._convertIdToIndex(i,"accessor")),a&&(t.material=this._convertIdToIndex(a,"material"))}}_convertNodeIds(r){r.children&&(r.children=r.children.map(t=>this._convertIdToIndex(t,"node"))),r.meshes&&(r.meshes=r.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(r){r.nodes&&(r.nodes=r.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(r,t){r[t]||(console.warn(`gltf v1: json doesn't contain attribute ${t}`),r[t]=[]);for(let n of r[t])for(let i in n){let a=n[i],o=this._convertIdToIndex(a,i);n[i]=o}}_convertIdToIndex(r,t){let n=YLr[t];if(n in this.idToIndexMap){let i=this.idToIndexMap[n][r];if(!Number.isFinite(i))throw new Error(`gltf v1: failed to resolve ${t} with id ${r}`);return i}return r}_updateObjects(r){for(let t of this.json.buffers)delete t.type}_updateMaterial(r){var t,n,i;for(let a of r.materials){a.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};let o=((t=a.values)==null?void 0:t.tex)||((n=a.values)==null?void 0:n.texture2d_0)||((i=a.values)==null?void 0:i.diffuseTex),s=r.textures.findIndex(u=>u.id===o);s!==-1&&(a.pbrMetallicRoughness.baseColorTexture={index:s})}}};function HAe(e,r={}){return new zAe().normalize(e,r)}async function WAe(e,r,t=0,n,i){var a,o,s;return $Lr(e,r,t,n),HAe(e,{normalize:(a=n==null?void 0:n.gltf)==null?void 0:a.normalize}),LAe(e,n,i),((o=n==null?void 0:n.gltf)==null?void 0:o.loadBuffers)&&e.json.buffers&&await XLr(e,n,i),((s=n==null?void 0:n.gltf)==null?void 0:s.loadImages)&&await JLr(e,n,i),await qAe(e,n,i),e}function $Lr(e,r,t,n){if(n.uri&&(e.baseUri=n.uri),r instanceof ArrayBuffer&&!TAe(r,t,n)&&(r=new TextDecoder().decode(r)),typeof r=="string")e.json=k7(r);else if(r instanceof ArrayBuffer){let o={};t=CAe(o,r,t,n.glb),ra(o.type==="glTF",`Invalid GLB magic string ${o.type}`),e._glb=o,e.json=o.json}else ra(!1,"GLTF: must be ArrayBuffer or string");let i=e.json.buffers||[];if(e.buffers=new Array(i.length).fill(null),e._glb&&e._glb.header.hasBinChunk){let{binChunks:o}=e._glb;e.buffers[0]={arrayBuffer:o[0].arrayBuffer,byteOffset:o[0].byteOffset,byteLength:o[0].byteLength}}let a=e.json.images||[];e.images=new Array(a.length).fill({})}async function XLr(e,r,t){var i,a;let n=e.json.buffers||[];for(let o=0;o<n.length;++o){let s=n[o];if(s.uri){let{fetch:u}=t;ra(u);let l=NU(s.uri,r),c=await((i=t==null?void 0:t.fetch)==null?void 0:i.call(t,l)),f=await((a=c==null?void 0:c.arrayBuffer)==null?void 0:a.call(c));e.buffers[o]={arrayBuffer:f,byteOffset:0,byteLength:f.byteLength},delete s.uri}else e.buffers[o]===null&&(e.buffers[o]={arrayBuffer:new ArrayBuffer(s.byteLength),byteOffset:0,byteLength:s.byteLength})}}async function JLr(e,r,t){let n=QLr(e),i=e.json.images||[],a=[];for(let o of n)a.push(ZLr(e,i[o],o,r,t));return await Promise.all(a)}function QLr(e){let r=new Set,t=e.json.textures||[];for(let n of t)n.source!==void 0&&r.add(n.source);return Array.from(r).sort()}async function ZLr(e,r,t,n,i){let{fetch:a,parse:o}=i,s;if(r.uri&&!r.hasOwnProperty("bufferView")){let l=NU(r.uri,n);s=await(await a(l)).arrayBuffer(),r.bufferView={data:s}}if(Number.isFinite(r.bufferView)){let l=DAe(e.json,e.buffers,r.bufferView);s=A0(l.buffer,l.byteOffset,l.byteLength)}ra(s,"glTF image has no data");let u=await o(s,[Yb,H0],ze(oe({},n),{mimeType:r.mimeType,basis:n.basis||{format:Jb()}}),i);u&&u[0]&&(u={compressed:!0,mipmaps:!1,width:u[0].width,height:u[0].height,data:u[0]}),e.images=e.images||[],e.images[t]=u}var _f={name:"glTF",id:"gltf",module:"gltf",version:Bk,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:eqr,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes",postProcess:"removed in v4"}}};async function eqr(e,r={},t){r=oe(oe({},_f.options),r),r.gltf=oe(oe({},_f.options.gltf),r.gltf);let{byteOffset:n=0}=r;return await WAe({},e,n,r,t)}var rqr=1179937895,tqr=1313821514,nqr=5130562,ac=!0;function VAe(e,r,t=0,n={}){let{magic:i=rqr,version:a=2,json:o={},binary:s}=e,u=t;r&&(r.setUint32(t+0,i,ac),r.setUint32(t+4,a,ac),r.setUint32(t+8,0,ac));let l=t+8;t+=12;let c=t;r&&(r.setUint32(t+0,0,ac),r.setUint32(t+4,tqr,ac)),t+=8;let f=JSON.stringify(o);if(t=hb(r,t,f,4),r){let d=t-c-8;r.setUint32(c+0,d,ac)}if(s){let d=t;if(r&&(r.setUint32(t+0,0,ac),r.setUint32(t+4,nqr,ac)),t+=8,t=lD(r,t,s,4),r){let p=t-d-8;r.setUint32(d+0,p,ac)}}if(r){let d=t-u;r.setUint32(l,d,ac)}return t}function eG(e,r,t,n){return iqr(e),VAe(e,r,t,n)}function iqr(e,{firstBuffer:r=0}={}){if(e.buffers&&e.buffers.length>r)throw new Error("encodeGLTF: multiple buffers not yet implemented")}var rG={name:"glTF",id:"gltf",module:"gltf",version:Bk,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,encodeSync:aqr,options:{gltf:{}}};function aqr(e,r={}){let{byteOffset:t=0}=r,n=eG(e,null,t,r),i=new ArrayBuffer(n),a=new DataView(i);return eG(e,a,t,r),i}var oqr={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},sqr={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ks={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},uqr={magFilter:Ks.TEXTURE_MAG_FILTER,minFilter:Ks.TEXTURE_MIN_FILTER,wrapS:Ks.TEXTURE_WRAP_S,wrapT:Ks.TEXTURE_WRAP_T},lqr={[Ks.TEXTURE_MAG_FILTER]:Ks.LINEAR,[Ks.TEXTURE_MIN_FILTER]:Ks.NEAREST_MIPMAP_LINEAR,[Ks.TEXTURE_WRAP_S]:Ks.REPEAT,[Ks.TEXTURE_WRAP_T]:Ks.REPEAT};function cqr(){return{id:"default-sampler",parameters:lqr}}function fqr(e){return sqr[e]}function dqr(e){return oqr[e]}var KAe=class{constructor(){this.baseUri="";this.buffers=[];this.images=[]}postProcess(r,t={}){let{json:n,buffers:i=[],images:a=[]}=r,{baseUri:o=""}=r;return ra(n),this.baseUri=o,this.buffers=i,this.images=a,this.jsonUnprocessed=n,this.json=this._resolveTree(r.json,t),this.json}_resolveTree(r,t={}){let n=oe({},r);return this.json=n,r.bufferViews&&(n.bufferViews=r.bufferViews.map((i,a)=>this._resolveBufferView(i,a))),r.images&&(n.images=r.images.map((i,a)=>this._resolveImage(i,a))),r.samplers&&(n.samplers=r.samplers.map((i,a)=>this._resolveSampler(i,a))),r.textures&&(n.textures=r.textures.map((i,a)=>this._resolveTexture(i,a))),r.accessors&&(n.accessors=r.accessors.map((i,a)=>this._resolveAccessor(i,a))),r.materials&&(n.materials=r.materials.map((i,a)=>this._resolveMaterial(i,a))),r.meshes&&(n.meshes=r.meshes.map((i,a)=>this._resolveMesh(i,a))),r.nodes&&(n.nodes=r.nodes.map((i,a)=>this._resolveNode(i,a)),n.nodes=n.nodes.map((i,a)=>this._resolveNodeChildren(i))),r.skins&&(n.skins=r.skins.map((i,a)=>this._resolveSkin(i,a))),r.scenes&&(n.scenes=r.scenes.map((i,a)=>this._resolveScene(i,a))),typeof this.json.scene=="number"&&n.scenes&&(n.scene=n.scenes[this.json.scene]),n}getScene(r){return this._get(this.json.scenes,r)}getNode(r){return this._get(this.json.nodes,r)}getSkin(r){return this._get(this.json.skins,r)}getMesh(r){return this._get(this.json.meshes,r)}getMaterial(r){return this._get(this.json.materials,r)}getAccessor(r){return this._get(this.json.accessors,r)}getCamera(r){return this._get(this.json.cameras,r)}getTexture(r){return this._get(this.json.textures,r)}getSampler(r){return this._get(this.json.samplers,r)}getImage(r){return this._get(this.json.images,r)}getBufferView(r){return this._get(this.json.bufferViews,r)}getBuffer(r){return this._get(this.json.buffers,r)}_get(r,t){if(typeof t=="object")return t;let n=r&&r[t];return n||console.warn(`glTF file error: Could not find ${r}[${t}]`),n}_resolveScene(r,t){return ze(oe({},r),{id:r.id||`scene-${t}`,nodes:(r.nodes||[]).map(n=>this.getNode(n))})}_resolveNode(r,t){let n=ze(oe({},r),{id:(r==null?void 0:r.id)||`node-${t}`});return r.mesh!==void 0&&(n.mesh=this.getMesh(r.mesh)),r.camera!==void 0&&(n.camera=this.getCamera(r.camera)),r.skin!==void 0&&(n.skin=this.getSkin(r.skin)),r.meshes!==void 0&&r.meshes.length&&(n.mesh=r.meshes.reduce((i,a)=>{let o=this.getMesh(a);return i.id=o.id,i.primitives=i.primitives.concat(o.primitives),i},{primitives:[]})),n}_resolveNodeChildren(r){return r.children&&(r.children=r.children.map(t=>this.getNode(t))),r}_resolveSkin(r,t){let n=typeof r.inverseBindMatrices=="number"?this.getAccessor(r.inverseBindMatrices):void 0;return ze(oe({},r),{id:r.id||`skin-${t}`,inverseBindMatrices:n})}_resolveMesh(r,t){let n=ze(oe({},r),{id:r.id||`mesh-${t}`,primitives:[]});return r.primitives&&(n.primitives=r.primitives.map(i=>{let a=ze(oe({},i),{attributes:{},indices:void 0,material:void 0}),o=i.attributes;for(let s in o)a.attributes[s]=this.getAccessor(o[s]);return i.indices!==void 0&&(a.indices=this.getAccessor(i.indices)),i.material!==void 0&&(a.material=this.getMaterial(i.material)),a})),n}_resolveMaterial(r,t){let n=ze(oe({},r),{id:r.id||`material-${t}`});if(n.normalTexture&&(n.normalTexture=oe({},n.normalTexture),n.normalTexture.texture=this.getTexture(n.normalTexture.index)),n.occlusionTexture&&(n.occlusionTexture=oe({},n.occlusionTexture),n.occlusionTexture.texture=this.getTexture(n.occlusionTexture.index)),n.emissiveTexture&&(n.emissiveTexture=oe({},n.emissiveTexture),n.emissiveTexture.texture=this.getTexture(n.emissiveTexture.index)),n.emissiveFactor||(n.emissiveFactor=n.emissiveTexture?[1,1,1]:[0,0,0]),n.pbrMetallicRoughness){n.pbrMetallicRoughness=oe({},n.pbrMetallicRoughness);let i=n.pbrMetallicRoughness;i.baseColorTexture&&(i.baseColorTexture=oe({},i.baseColorTexture),i.baseColorTexture.texture=this.getTexture(i.baseColorTexture.index)),i.metallicRoughnessTexture&&(i.metallicRoughnessTexture=oe({},i.metallicRoughnessTexture),i.metallicRoughnessTexture.texture=this.getTexture(i.metallicRoughnessTexture.index))}return n}_resolveAccessor(r,t){let n=fqr(r.componentType),i=dqr(r.type),a=n*i,o=ze(oe({},r),{id:r.id||`accessor-${t}`,bytesPerComponent:n,components:i,bytesPerElement:a,value:void 0,bufferView:void 0,sparse:void 0});if(r.bufferView!==void 0&&(o.bufferView=this.getBufferView(r.bufferView)),o.bufferView){let s=o.bufferView.buffer,{ArrayType:u,byteLength:l}=ey(o,o.bufferView),c=(o.bufferView.byteOffset||0)+(o.byteOffset||0)+s.byteOffset,f=s.arrayBuffer.slice(c,c+l);o.bufferView.byteStride&&(f=this._getValueFromInterleavedBuffer(s,c,o.bufferView.byteStride,o.bytesPerElement,o.count)),o.value=new u(f)}return o}_getValueFromInterleavedBuffer(r,t,n,i,a){let o=new Uint8Array(a*i);for(let s=0;s<a;s++){let u=t+s*n;o.set(new Uint8Array(r.arrayBuffer.slice(u,u+i)),s*i)}return o.buffer}_resolveTexture(r,t){return ze(oe({},r),{id:r.id||`texture-${t}`,sampler:typeof r.sampler=="number"?this.getSampler(r.sampler):cqr(),source:typeof r.source=="number"?this.getImage(r.source):void 0})}_resolveSampler(r,t){let n=ze(oe({id:r.id||`sampler-${t}`},r),{parameters:{}});for(let i in n){let a=this._enumSamplerParameter(i);a!==void 0&&(n.parameters[a]=n[i])}return n}_enumSamplerParameter(r){return uqr[r]}_resolveImage(r,t){let n=ze(oe({},r),{id:r.id||`image-${t}`,image:null,bufferView:r.bufferView!==void 0?this.getBufferView(r.bufferView):void 0}),i=this.images[t];return i&&(n.image=i),n}_resolveBufferView(r,t){let n=r.buffer,i=this.buffers[n].arrayBuffer,a=this.buffers[n].byteOffset||0;return r.byteOffset&&(a+=r.byteOffset),ze(oe({id:`bufferView-${t}`},r),{buffer:this.buffers[n],data:new Uint8Array(i,a,r.byteLength)})}_resolveCamera(r,t){let n=ze(oe({},r),{id:r.id||`camera-${t}`});return n.perspective,n.orthographic,n}};function V2(e,r){return new KAe().postProcess(e,r)}var Jk={URI:0,EMBEDDED:1};function Qk(e,r,t,n){e.rotateYtoZ=!0;let i=(e.byteOffset||0)+(e.byteLength||0)-t;if(i===0)throw new Error("glTF byte length must be greater than 0.");return e.gltfUpAxis=(n==null?void 0:n["3d-tiles"])&&n["3d-tiles"].assetGltfUpAxis?n["3d-tiles"].assetGltfUpAxis:"Y",e.gltfArrayBuffer=A0(r,t,i),e.gltfByteOffset=0,e.gltfByteLength=i,t%4==0||console.warn(`${e.type}: embedded glb is not aligned to a 4-byte boundary.`),(e.byteOffset||0)+(e.byteLength||0)}async function Zk(e,r,t,n){let i=(t==null?void 0:t["3d-tiles"])||{};if(pqr(e,r,t),i.loadGLTF){if(!n)return;let{parse:a,fetch:o}=n;if(e.gltfUrl){let s=await o(e.gltfUrl,t);e.gltfArrayBuffer=await s.arrayBuffer(),e.gltfByteOffset=0}if(e.gltfArrayBuffer){let s=await a(e.gltfArrayBuffer,_f,t,n);e.gltf=V2(s),e.gpuMemoryUsageInBytes=G2(e.gltf),delete e.gltfArrayBuffer,delete e.gltfByteOffset,delete e.gltfByteLength}}}function pqr(e,r,t){switch(r){case Jk.URI:if(e.gltfArrayBuffer){let n=new Uint8Array(e.gltfArrayBuffer,e.gltfByteOffset),a=new TextDecoder().decode(n);e.gltfUrl=a.replace(/[\s\0]+$/,"")}delete e.gltfArrayBuffer,delete e.gltfByteOffset,delete e.gltfByteLength;break;case Jk.EMBEDDED:break;default:throw new Error("b3dm: Illegal glTF format field")}}async function YAe(e,r,t,n,i){var o;t=hqr(e,r,t,n,i),await Zk(e,Jk.EMBEDDED,n,i);let a=(o=e==null?void 0:e.gltf)==null?void 0:o.extensions;return a&&a.CESIUM_RTC&&(e.rtcCenter=a.CESIUM_RTC.center),t}function hqr(e,r,t,n,i){t=Op(e,r,t),t=Wb(e,r,t),t=Vb(e,r,t,n),t=Qk(e,r,t,n);let a=new kp(e.featureTableJson,e.featureTableBinary);return e.rtcCenter=a.getGlobalProperty("RTC_CENTER",nt.FLOAT,3),t}var ns=$e(Xt()),$Ae=$e(Gs());async function XAe(e,r,t,n,i){return t=mqr(e,r,t,n,i),await Zk(e,e.gltfFormat||0,n,i),t}function mqr(e,r,t,n,i){var l;if(t=Op(e,r,t),e.version!==1)throw new Error(`Instanced 3D Model version ${e.version} is not supported`);t=Wb(e,r,t);let a=new DataView(r);if(e.gltfFormat=a.getUint32(t,!0),t+=4,t=Vb(e,r,t,n),t=Qk(e,r,t,n),!((l=e==null?void 0:e.header)==null?void 0:l.featureTableJsonByteLength)||e.header.featureTableJsonByteLength===0)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");let o=new kp(e.featureTableJson,e.featureTableBinary),s=o.getGlobalProperty("INSTANCES_LENGTH");if(o.featuresLength=s,!Number.isFinite(s))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");e.eastNorthUp=o.getGlobalProperty("EAST_NORTH_UP"),e.rtcCenter=o.getGlobalProperty("RTC_CENTER",nt.FLOAT,3);let u=new zb(e.batchTableJson,e.batchTableBinary,s);return gqr(e,o,u,s),t}function gqr(e,r,t,n){let i=new Array(n),a=new ns.Vector3,o=new ns.Vector3,s=new ns.Vector3,u=new ns.Vector3,l=new ns.Matrix3,c=new ns.Quaternion,f=new ns.Vector3,d={},p=new ns.Matrix4,h=[],b=[],v=[],y=[];for(let w=0;w<n;w++){let A;if(r.hasProperty("POSITION"))A=r.getProperty("POSITION",nt.FLOAT,3,w,a);else if(r.hasProperty("POSITION_QUANTIZED")){A=r.getProperty("POSITION_QUANTIZED",nt.UNSIGNED_SHORT,3,w,a);let V=r.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",nt.FLOAT,3);if(!V)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");let N=r.getGlobalProperty("QUANTIZED_VOLUME_SCALE",nt.FLOAT,3);if(!N)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let W=65535;for(let M=0;M<3;M++)A[M]=A[M]/W*N[M]+V[M]}if(!A)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");a.copy(A),d.translation=a,e.normalUp=r.getProperty("NORMAL_UP",nt.FLOAT,3,w,h),e.normalRight=r.getProperty("NORMAL_RIGHT",nt.FLOAT,3,w,b);let C=!1;if(e.normalUp){if(!e.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");e.hasCustomOrientation=!0}else{if(e.octNormalUp=r.getProperty("NORMAL_UP_OCT32P",nt.UNSIGNED_SHORT,2,w,h),e.octNormalRight=r.getProperty("NORMAL_RIGHT_OCT32P",nt.UNSIGNED_SHORT,2,w,b),e.octNormalUp)throw e.octNormalRight?new Error("i3dm: oct-encoded orientation not implemented"):new Error("i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P");e.eastNorthUp?($Ae.Ellipsoid.WGS84.eastNorthUpToFixedFrame(a,p),p.getRotationMatrix3(l)):l.identity()}C&&(u.copy(o).cross(s).normalize(),l.setColumn(0,o),l.setColumn(1,s),l.setColumn(2,u)),c.fromMatrix3(l),d.rotation=c,f.set(1,1,1);let D=r.getProperty("SCALE",nt.FLOAT,1,w,v);Number.isFinite(D)&&f.multiplyByScalar(D);let P=r.getProperty("SCALE_NON_UNIFORM",nt.FLOAT,3,w,h);P&&f.scale(P),d.scale=f;let k=r.getProperty("BATCH_ID",nt.UNSIGNED_SHORT,1,w,y);k===void 0&&(k=w);let L=new ns.Matrix4().fromQuaternion(d.rotation);p.identity(),p.translate(d.translation),p.multiplyRight(L),p.scale(d.scale);let I=p.clone();i[w]={modelMatrix:I,batchId:k}}e.instances=i}async function JAe(e,r,t,n,i,a){t=Op(e,r,t);let o=new DataView(r);for(e.tilesLength=o.getUint32(t,!0),t+=4,e.tiles=[];e.tiles.length<e.tilesLength&&(e.byteLength||0)-t>12;){let s={};e.tiles.push(s),t=await a(r,t,n,i,s)}return t}async function QAe(e,r,t,n){var i;if(e.rotateYtoZ=!0,e.gltfUpAxis=(t==null?void 0:t["3d-tiles"])&&t["3d-tiles"].assetGltfUpAxis?t["3d-tiles"].assetGltfUpAxis:"Y",(i=t==null?void 0:t["3d-tiles"])==null?void 0:i.loadGLTF){if(!n)return;let{parse:a}=n,o=await a(r,_f,t,n);e.gltf=V2(o),e.gpuMemoryUsageInBytes=G2(e.gltf)}else e.gltfArrayBuffer=r}async function tG(e,r=0,t,n,i={}){switch(i.byteOffset=r,i.type=_Se(e,r),i.type){case Ws.COMPOSITE:return await JAe(i,e,r,t,n,tG);case Ws.BATCHED_3D_MODEL:return await YAe(i,e,r,t,n);case Ws.GLTF:return await QAe(i,e,t,n);case Ws.INSTANCED_3D_MODEL:return await XAe(i,e,r,t,n);case Ws.POINT_CLOUD:return await zSe(i,e,r,t,n);default:throw new Error(`3DTileLoader: unknown type ${i.type}`)}}var vqr=1952609651,bqr=1;async function nG(e,r,t){if(new Uint32Array(e.slice(0,4))[0]!==vqr)throw new Error("Wrong subtree file magic number");if(new Uint32Array(e.slice(4,8))[0]!==bqr)throw new Error("Wrong subtree file verson, must be 1");let a=ZAe(e.slice(8,16)),o=new Uint8Array(e,24,a),u=new TextDecoder("utf8").decode(o),l=JSON.parse(u),c=ZAe(e.slice(16,24)),f=new ArrayBuffer(0);if(c&&(f=e.slice(24+a)),await eO(l,l.tileAvailability,f,t),Array.isArray(l.contentAvailability))for(let d of l.contentAvailability)await eO(l,d,f,t);else await eO(l,l.contentAvailability,f,t);return await eO(l,l.childSubtreeAvailability,f,t),l}async function eO(e,r,t,n){let i=Number.isFinite(r.bitstream)?r.bitstream:r.bufferView;if(typeof i!="number")return;let a=e.bufferViews[i],o=e.buffers[a.buffer];if(!(n==null?void 0:n.baseUrl))throw new Error("Url is not provided");if(!n.fetch)throw new Error("fetch is not provided");if(o.uri){let s=`${(n==null?void 0:n.baseUrl)||""}/${o.uri}`,l=await(await n.fetch(s)).arrayBuffer();r.explicitBitstream=new Uint8Array(l,a.byteOffset,a.byteLength);return}r.explicitBitstream=new Uint8Array(t,a.byteOffset,a.byteLength)}function ZAe(e){let r=new DataView(e),t=r.getUint32(0,!0),n=r.getUint32(4,!0);return t+2**32*n}var rO={id:"3d-tiles-subtree",name:"3D Tiles Subtree",module:"3d-tiles",version:Nb,extensions:["subtree"],mimeTypes:["application/octet-stream"],tests:["subtree"],parse:nG,options:{}};function iG(e){if(typeof window!="undefined"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process!="undefined"&&typeof process.versions=="object"&&Boolean(process.versions.electron))return!0;let r=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent,t=e||r;return!!(t&&t.indexOf("Electron")>=0)}function Hu(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||iG()}var yqr=globalThis.self||globalThis.window||globalThis.global,ny=globalThis.window||globalThis.self||globalThis.global,xqr=globalThis.document||{},V0=globalThis.process||{},_qr=globalThis.console,Tkt=globalThis.navigator||{};var tO="4.0.0-alpha.21",kkt=Hu();function Eqr(e){try{let r=window[e],t="__storage_test__";return r.setItem(t,t),r.removeItem(t),r}catch{return null}}var aG=class{constructor(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"sessionStorage";this.storage=void 0,this.id=void 0,this.config=void 0,this.storage=Eqr(n),this.id=r,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(r){if(Object.assign(this.config,r),this.storage){let t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let r={};if(this.storage){let t=this.storage.getItem(this.id);r=t?JSON.parse(t):{}}return Object.assign(this.config,r),this}};function eTe(e){let r;return e<10?r="".concat(e.toFixed(2),"ms"):e<100?r="".concat(e.toFixed(1),"ms"):e<1e3?r="".concat(e.toFixed(0),"ms"):r="".concat((e/1e3).toFixed(2),"s"),r}function rTe(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8,t=Math.max(r-e.length,0);return"".concat(" ".repeat(t)).concat(e)}function nO(e,r,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,i=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>n&&(t=Math.min(t,n/e.width));let a=e.width*t,o=e.height*t,s=["font-size:1px;","padding:".concat(Math.floor(o/2),"px ").concat(Math.floor(a/2),"px;"),"line-height:".concat(o,"px;"),"background:url(".concat(i,");"),"background-size:".concat(a,"px ").concat(o,"px;"),"color:transparent;"].join("");return["".concat(r," %c+"),s]}var iO;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(iO||(iO={}));var wqr=10;function tTe(e){return typeof e!="string"?e:(e=e.toUpperCase(),iO[e]||iO.WHITE)}function nTe(e,r,t){if(!Hu&&typeof e=="string"){if(r){let n=tTe(r);e="[".concat(n,"m").concat(e,"[39m")}if(t){let n=tTe(t);e="[".concat(n+wqr,"m").concat(e,"[49m")}}return e}function iTe(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"],t=Object.getPrototypeOf(e),n=Object.getOwnPropertyNames(t),i=e;for(let a of n){let o=i[a];typeof o=="function"&&(r.find(s=>a===s)||(i[a]=o.bind(e)))}}function iy(e,r){if(!e)throw new Error(r||"Assertion failed")}function K0(){let e;if(Hu()&&ny.performance){var r,t;e=ny===null||ny===void 0||(r=ny.performance)===null||r===void 0||(t=r.now)===null||t===void 0?void 0:t.call(r)}else if("hrtime"in V0){var n;let i=V0===null||V0===void 0||(n=V0.hrtime)===null||n===void 0?void 0:n.call(V0);e=i[0]*1e3+i[1]/1e6}else e=Date.now();return e}var ay={debug:Hu()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Sqr={enabled:!0,level:0};function Ys(){}var aTe={},oTe={once:!0},aO=class{constructor(){let{id:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};this.id=void 0,this.VERSION=tO,this._startTs=K0(),this._deltaTs=K0(),this._storage=void 0,this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=r,this.userData={},this._storage=new aG("__probe-".concat(this.id,"__"),Sqr),this.timeStamp("".concat(this.id," started")),iTe(this),Object.seal(this)}set level(r){this.setLevel(r)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((K0()-this._startTs).toPrecision(10))}getDelta(){return Number((K0()-this._deltaTs).toPrecision(10))}set priority(r){this.level=r}get priority(){return this.level}getPriority(){return this.level}enable(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:r}),this}setLevel(r){return this._storage.setConfiguration({level:r}),this}get(r){return this._storage.config[r]}set(r,t){this._storage.setConfiguration({[r]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(r,t){iy(r,t)}warn(r){return this._getLogFunction(0,r,ay.warn,arguments,oTe)}error(r){return this._getLogFunction(0,r,ay.error,arguments)}deprecated(r,t){return this.warn("`".concat(r,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(r,t){return this.error("`".concat(r,"` has been removed. Use `").concat(t,"` instead"))}probe(r,t){return this._getLogFunction(r,t,ay.log,arguments,{time:!0,once:!0})}log(r,t){return this._getLogFunction(r,t,ay.debug,arguments)}info(r,t){return this._getLogFunction(r,t,console.info,arguments)}once(r,t){return this._getLogFunction(r,t,ay.debug||ay.info,arguments,oTe)}table(r,t,n){return t?this._getLogFunction(r,t,console.table||Ys,n&&[n],{tag:Dqr(t)}):Ys}image(r){let{logLevel:t,priority:n,image:i,message:a="",scale:o=1}=r;return this._shouldLog(t||n)?Hu()?Cqr({image:i,message:a,scale:o}):Tqr({image:i,message:a,scale:o}):Ys}time(r,t){return this._getLogFunction(r,t,console.time?console.time:console.info)}timeEnd(r,t){return this._getLogFunction(r,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(r,t){return this._getLogFunction(r,t,console.timeStamp||Ys)}group(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1},i=uTe({logLevel:r,message:t,opts:n}),{collapsed:a}=n;return i.method=(a?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(r,t,Object.assign({},n,{collapsed:!0}))}groupEnd(r){return this._getLogFunction(r,"",console.groupEnd||Ys)}withGroup(r,t,n){this.group(r,t)();try{n()}finally{this.groupEnd(r)()}}trace(){console.trace&&console.trace()}_shouldLog(r){return this.isEnabled()&&this.getLevel()>=sTe(r)}_getLogFunction(r,t,n,i,a){if(this._shouldLog(r)){a=uTe({logLevel:r,message:t,args:i,opts:a}),n=n||a.method,iy(n),a.total=this.getTotal(),a.delta=this.getDelta(),this._deltaTs=K0();let o=a.tag||a.message;if(a.once&&o)if(!aTe[o])aTe[o]=K0();else return Ys;return t=Aqr(this.id,a.message,a),n.bind(console,t,...a.args)}return Ys}};aO.VERSION=tO;function sTe(e){if(!e)return 0;let r;switch(typeof e){case"number":r=e;break;case"object":r=e.logLevel||e.priority||0;break;default:return 0}return iy(Number.isFinite(r)&&r>=0),r}function uTe(e){let{logLevel:r,message:t}=e;e.logLevel=sTe(r);let n=e.args?Array.from(e.args):[];for(;n.length&&n.shift()!==t;);switch(typeof r){case"string":case"function":t!==void 0&&n.unshift(t),e.message=r;break;case"object":Object.assign(e,r);break;default:}typeof e.message=="function"&&(e.message=e.message());let i=typeof e.message;return iy(i==="string"||i==="object"),Object.assign(e,{args:n},e.opts)}function Aqr(e,r,t){if(typeof r=="string"){let n=t.time?rTe(eTe(t.total)):"";r=t.time?"".concat(e,": ").concat(n," ").concat(r):"".concat(e,": ").concat(r),r=nTe(r,t.color,t.background)}return r}function Tqr(e){let{image:r,message:t="",scale:n=1}=e;return console.warn("removed"),Ys}function Cqr(e){let{image:r,message:t="",scale:n=1}=e;if(typeof r=="string"){let a=new Image;return a.onload=()=>{let o=nO(a,t,n);console.log(...o)},a.src=r,Ys}let i=r.nodeName||"";if(i.toLowerCase()==="img")return console.log(...nO(r,t,n)),Ys;if(i.toLowerCase()==="canvas"){let a=new Image;return a.onload=()=>console.log(...nO(a,t,n)),a.src=r.toDataURL(),Ys}return Ys}function Dqr(e){for(let r in e)for(let t in e[r])return t||"untitled";return"empty"}var oG=new aO({id:"@probe.gl/log"});var $s=null;try{$s=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function In(e,r,t){this.low=e|0,this.high=r|0,this.unsigned=!!t}In.prototype.__isLong__;Object.defineProperty(In.prototype,"__isLong__",{value:!0});function Za(e){return(e&&e.__isLong__)===!0}function lTe(e){var r=Math.clz32(e&-e);return e?31-r:r}In.isLong=Za;var cTe={},fTe={};function Y0(e,r){var t,n,i;return r?(e>>>=0,(i=0<=e&&e<256)&&(n=fTe[e],n)?n:(t=Jt(e,0,!0),i&&(fTe[e]=t),t)):(e|=0,(i=-128<=e&&e<128)&&(n=cTe[e],n)?n:(t=Jt(e,e<0?-1:0,!1),i&&(cTe[e]=t),t))}In.fromInt=Y0;function Xs(e,r){if(isNaN(e))return r?Ef:Vu;if(r){if(e<0)return Ef;if(e>=pTe)return bTe}else{if(e<=-hTe)return Mo;if(e+1>=hTe)return vTe}return e<0?Xs(-e,r).neg():Jt(e%oy|0,e/oy|0,r)}In.fromNumber=Xs;function Jt(e,r,t){return new In(e,r,t)}In.fromBits=Jt;var oO=Math.pow;function sG(e,r,t){if(e.length===0)throw Error("empty string");if(typeof r=="number"?(t=r,r=!1):r=!!r,e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return r?Ef:Vu;if(t=t||10,t<2||36<t)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(n===0)return sG(e.substring(1),r,t).neg();for(var i=Xs(oO(t,8)),a=Vu,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),u=parseInt(e.substring(o,o+s),t);if(s<8){var l=Xs(oO(t,s));a=a.mul(l).add(Xs(u))}else a=a.mul(i),a=a.add(Xs(u))}return a.unsigned=r,a}In.fromString=sG;function Wu(e,r){return typeof e=="number"?Xs(e,r):typeof e=="string"?sG(e,r):Jt(e.low,e.high,typeof r=="boolean"?r:e.unsigned)}In.fromValue=Wu;var dTe=1<<16,kqr=1<<24,oy=dTe*dTe,pTe=oy*oy,hTe=pTe/2,mTe=Y0(kqr),Vu=Y0(0);In.ZERO=Vu;var Ef=Y0(0,!0);In.UZERO=Ef;var sy=Y0(1);In.ONE=sy;var gTe=Y0(1,!0);In.UONE=gTe;var uG=Y0(-1);In.NEG_ONE=uG;var vTe=Jt(4294967295|0,2147483647|0,!1);In.MAX_VALUE=vTe;var bTe=Jt(4294967295|0,4294967295|0,!0);In.MAX_UNSIGNED_VALUE=bTe;var Mo=Jt(0,2147483648|0,!1);In.MIN_VALUE=Mo;var We=In.prototype;We.toInt=function(){return this.unsigned?this.low>>>0:this.low};We.toNumber=function(){return this.unsigned?(this.high>>>0)*oy+(this.low>>>0):this.high*oy+(this.low>>>0)};We.toString=function(r){if(r=r||10,r<2||36<r)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(Mo)){var t=Xs(r),n=this.div(t),i=n.mul(t).sub(this);return n.toString(r)+i.toInt().toString(r)}else return"-"+this.neg().toString(r);for(var a=Xs(oO(r,6),this.unsigned),o=this,s="";;){var u=o.div(a),l=o.sub(u.mul(a)).toInt()>>>0,c=l.toString(r);if(o=u,o.isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}};We.getHighBits=function(){return this.high};We.getHighBitsUnsigned=function(){return this.high>>>0};We.getLowBits=function(){return this.low};We.getLowBitsUnsigned=function(){return this.low>>>0};We.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Mo)?64:this.neg().getNumBitsAbs();for(var r=this.high!=0?this.high:this.low,t=31;t>0&&(r&1<<t)==0;t--);return this.high!=0?t+33:t+1};We.isZero=function(){return this.high===0&&this.low===0};We.eqz=We.isZero;We.isNegative=function(){return!this.unsigned&&this.high<0};We.isPositive=function(){return this.unsigned||this.high>=0};We.isOdd=function(){return(this.low&1)==1};We.isEven=function(){return(this.low&1)==0};We.equals=function(r){return Za(r)||(r=Wu(r)),this.unsigned!==r.unsigned&&this.high>>>31==1&&r.high>>>31==1?!1:this.high===r.high&&this.low===r.low};We.eq=We.equals;We.notEquals=function(r){return!this.eq(r)};We.neq=We.notEquals;We.ne=We.notEquals;We.lessThan=function(r){return this.comp(r)<0};We.lt=We.lessThan;We.lessThanOrEqual=function(r){return this.comp(r)<=0};We.lte=We.lessThanOrEqual;We.le=We.lessThanOrEqual;We.greaterThan=function(r){return this.comp(r)>0};We.gt=We.greaterThan;We.greaterThanOrEqual=function(r){return this.comp(r)>=0};We.gte=We.greaterThanOrEqual;We.ge=We.greaterThanOrEqual;We.compare=function(r){if(Za(r)||(r=Wu(r)),this.eq(r))return 0;var t=this.isNegative(),n=r.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?r.high>>>0>this.high>>>0||r.high===this.high&&r.low>>>0>this.low>>>0?-1:1:this.sub(r).isNegative()?-1:1};We.comp=We.compare;We.negate=function(){return!this.unsigned&&this.eq(Mo)?Mo:this.not().add(sy)};We.neg=We.negate;We.add=function(r){Za(r)||(r=Wu(r));var t=this.high>>>16,n=this.high&65535,i=this.low>>>16,a=this.low&65535,o=r.high>>>16,s=r.high&65535,u=r.low>>>16,l=r.low&65535,c=0,f=0,d=0,p=0;return p+=a+l,d+=p>>>16,p&=65535,d+=i+u,f+=d>>>16,d&=65535,f+=n+s,c+=f>>>16,f&=65535,c+=t+o,c&=65535,Jt(d<<16|p,c<<16|f,this.unsigned)};We.subtract=function(r){return Za(r)||(r=Wu(r)),this.add(r.neg())};We.sub=We.subtract;We.multiply=function(r){if(this.isZero())return this;if(Za(r)||(r=Wu(r)),$s){var t=$s.mul(this.low,this.high,r.low,r.high);return Jt(t,$s.get_high(),this.unsigned)}if(r.isZero())return this.unsigned?Ef:Vu;if(this.eq(Mo))return r.isOdd()?Mo:Vu;if(r.eq(Mo))return this.isOdd()?Mo:Vu;if(this.isNegative())return r.isNegative()?this.neg().mul(r.neg()):this.neg().mul(r).neg();if(r.isNegative())return this.mul(r.neg()).neg();if(this.lt(mTe)&&r.lt(mTe))return Xs(this.toNumber()*r.toNumber(),this.unsigned);var n=this.high>>>16,i=this.high&65535,a=this.low>>>16,o=this.low&65535,s=r.high>>>16,u=r.high&65535,l=r.low>>>16,c=r.low&65535,f=0,d=0,p=0,h=0;return h+=o*c,p+=h>>>16,h&=65535,p+=a*c,d+=p>>>16,p&=65535,p+=o*l,d+=p>>>16,p&=65535,d+=i*c,f+=d>>>16,d&=65535,d+=a*l,f+=d>>>16,d&=65535,d+=o*u,f+=d>>>16,d&=65535,f+=n*c+i*l+a*u+o*s,f&=65535,Jt(p<<16|h,f<<16|d,this.unsigned)};We.mul=We.multiply;We.divide=function(r){if(Za(r)||(r=Wu(r)),r.isZero())throw Error("division by zero");if($s){if(!this.unsigned&&this.high===-2147483648&&r.low===-1&&r.high===-1)return this;var t=(this.unsigned?$s.div_u:$s.div_s)(this.low,this.high,r.low,r.high);return Jt(t,$s.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Ef:Vu;var n,i,a;if(this.unsigned){if(r.unsigned||(r=r.toUnsigned()),r.gt(this))return Ef;if(r.gt(this.shru(1)))return gTe;a=Ef}else{if(this.eq(Mo)){if(r.eq(sy)||r.eq(uG))return Mo;if(r.eq(Mo))return sy;var o=this.shr(1);return n=o.div(r).shl(1),n.eq(Vu)?r.isNegative()?sy:uG:(i=this.sub(r.mul(n)),a=n.add(i.div(r)),a)}else if(r.eq(Mo))return this.unsigned?Ef:Vu;if(this.isNegative())return r.isNegative()?this.neg().div(r.neg()):this.neg().div(r).neg();if(r.isNegative())return this.div(r.neg()).neg();a=Vu}for(i=this;i.gte(r);){n=Math.max(1,Math.floor(i.toNumber()/r.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),u=s<=48?1:oO(2,s-48),l=Xs(n),c=l.mul(r);c.isNegative()||c.gt(i);)n-=u,l=Xs(n,this.unsigned),c=l.mul(r);l.isZero()&&(l=sy),a=a.add(l),i=i.sub(c)}return a};We.div=We.divide;We.modulo=function(r){if(Za(r)||(r=Wu(r)),$s){var t=(this.unsigned?$s.rem_u:$s.rem_s)(this.low,this.high,r.low,r.high);return Jt(t,$s.get_high(),this.unsigned)}return this.sub(this.div(r).mul(r))};We.mod=We.modulo;We.rem=We.modulo;We.not=function(){return Jt(~this.low,~this.high,this.unsigned)};We.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};We.clz=We.countLeadingZeros;We.countTrailingZeros=function(){return this.low?lTe(this.low):lTe(this.high)+32};We.ctz=We.countTrailingZeros;We.and=function(r){return Za(r)||(r=Wu(r)),Jt(this.low&r.low,this.high&r.high,this.unsigned)};We.or=function(r){return Za(r)||(r=Wu(r)),Jt(this.low|r.low,this.high|r.high,this.unsigned)};We.xor=function(r){return Za(r)||(r=Wu(r)),Jt(this.low^r.low,this.high^r.high,this.unsigned)};We.shiftLeft=function(r){return Za(r)&&(r=r.toInt()),(r&=63)==0?this:r<32?Jt(this.low<<r,this.high<<r|this.low>>>32-r,this.unsigned):Jt(0,this.low<<r-32,this.unsigned)};We.shl=We.shiftLeft;We.shiftRight=function(r){return Za(r)&&(r=r.toInt()),(r&=63)==0?this:r<32?Jt(this.low>>>r|this.high<<32-r,this.high>>r,this.unsigned):Jt(this.high>>r-32,this.high>=0?0:-1,this.unsigned)};We.shr=We.shiftRight;We.shiftRightUnsigned=function(r){return Za(r)&&(r=r.toInt()),(r&=63)==0?this:r<32?Jt(this.low>>>r|this.high<<32-r,this.high>>>r,this.unsigned):r===32?Jt(this.high,0,this.unsigned):Jt(this.high>>>r-32,0,this.unsigned)};We.shru=We.shiftRightUnsigned;We.shr_u=We.shiftRightUnsigned;We.rotateLeft=function(r){var t;return Za(r)&&(r=r.toInt()),(r&=63)==0?this:r===32?Jt(this.high,this.low,this.unsigned):r<32?(t=32-r,Jt(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned)):(r-=32,t=32-r,Jt(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned))};We.rotl=We.rotateLeft;We.rotateRight=function(r){var t;return Za(r)&&(r=r.toInt()),(r&=63)==0?this:r===32?Jt(this.high,this.low,this.unsigned):r<32?(t=32-r,Jt(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned)):(r-=32,t=32-r,Jt(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned))};We.rotr=We.rotateRight;We.toSigned=function(){return this.unsigned?Jt(this.low,this.high,!1):this};We.toUnsigned=function(){return this.unsigned?this:Jt(this.low,this.high,!0)};We.toBytes=function(r){return r?this.toBytesLE():this.toBytesBE()};We.toBytesLE=function(){var r=this.high,t=this.low;return[t&255,t>>>8&255,t>>>16&255,t>>>24,r&255,r>>>8&255,r>>>16&255,r>>>24]};We.toBytesBE=function(){var r=this.high,t=this.low;return[r>>>24,r>>>16&255,r>>>8&255,r&255,t>>>24,t>>>16&255,t>>>8&255,t&255]};In.fromBytes=function(r,t,n){return n?In.fromBytesLE(r,t):In.fromBytesBE(r,t)};In.fromBytesLE=function(r,t){return new In(r[0]|r[1]<<8|r[2]<<16|r[3]<<24,r[4]|r[5]<<8|r[6]<<16|r[7]<<24,t)};In.fromBytesBE=function(r,t){return new In(r[4]<<24|r[5]<<16|r[6]<<8|r[7],r[0]<<24|r[1]<<16|r[2]<<8|r[3],t)};var uy=In;var Oqr=16;function K2(e){e==="X"&&(e="");let r=e.padEnd(Oqr,"0");return uy.fromString(r,!0,16)}function lG(e){if(e.isZero())return"X";let r=e.countTrailingZeros(),t=r%4;r=(r-t)/4;let n=r;r*=4;let a=e.shiftRightUnsigned(r).toString(16).replace(/0+$/,"");return Array(17-n-a.length).join("0")+a}function cG(e,r){let t=Rqr(e).shiftRightUnsigned(2);return e.add(uy.fromNumber(2*r+1-4).multiply(t))}function Rqr(e){return e.and(e.not().add(1))}var Fqr=3,Iqr=30,Pqr=2*Iqr+1,yTe=180/Math.PI;function xTe(e){if(e.length===0)throw new Error(`Invalid Hilbert quad key ${e}`);let r=e.split("/"),t=parseInt(r[0],10),n=r[1],i=n.length,a=0,o=[0,0];for(let s=i-1;s>=0;s--){a=i-s;let u=n[s],l=0,c=0;u==="1"?c=1:u==="2"?(l=1,c=1):u==="3"&&(l=1);let f=Math.pow(2,a-1);Bqr(f,o,l,c),o[0]+=f*l,o[1]+=f*c}if(t%2==1){let s=o[0];o[0]=o[1],o[1]=s}return{face:t,ij:o,level:a}}function _Te(e){if(e.isZero())return"";let r=e.toString(2);for(;r.length<Fqr+Pqr;)r="0"+r;let t=r.lastIndexOf("1"),n=r.substring(0,3),i=r.substring(3,t),a=i.length/2,o=uy.fromString(n,!0,2).toString(10),s="";if(a!==0)for(s=uy.fromString(i,!0,2).toString(4);s.length<a;)s="0"+s;return`${o}/${s}`}function fG(e,r,t){let n=1<<r;return[(e[0]+t[0])/n,(e[1]+t[1])/n]}function ETe(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function dG(e){return[ETe(e[0]),ETe(e[1])]}function pG(e,[r,t]){switch(e){case 0:return[1,r,t];case 1:return[-r,1,t];case 2:return[-r,-t,1];case 3:return[-1,-t,-r];case 4:return[t,-1,-r];case 5:return[t,r,-1];default:throw new Error("Invalid face")}}function hG([e,r,t]){let n=Math.atan2(t,Math.sqrt(e*e+r*r));return[Math.atan2(r,e)*yTe,n*yTe]}function Bqr(e,r,t,n){if(n===0){t===1&&(r[0]=e-1-r[0],r[1]=e-1-r[1]);let i=r[0];r[0]=r[1],r[1]=i}}function wTe(e){let r=fG(e.ij,e.level,[.5,.5]),t=dG(r),n=pG(e.face,t);return hG(n)}var jqr=100;function mG(e){let{face:r,ij:t,level:n}=e,i=[[0,0],[0,1],[1,1],[1,0],[0,0]],a=Math.max(1,Math.ceil(jqr*Math.pow(2,-n))),o=new Float64Array(4*a*2+2),s=0,u=0;for(let l=0;l<4;l++){let c=i[l].slice(0),f=i[l+1],d=(f[0]-c[0])/a,p=(f[1]-c[1])/a;for(let h=0;h<a;h++){c[0]+=d,c[1]+=p;let b=fG(t,n,c),v=dG(b),y=pG(r,v),w=hG(y);Math.abs(w[1])>89.999&&(w[0]=u);let A=w[0]-u;w[0]+=A>180?-360:A<-180?360:0,o[s++]=w[0],o[s++]=w[1],u=w[0]}}return o[s++]=o[0],o[s++]=o[1],o}function ly(e){let r=Mqr(e);return xTe(r)}function Mqr(e){if(e.indexOf("/")>0)return e;let r=K2(e);return _Te(r)}function gG(e){let r=ly(e);return wTe(r)}function STe(e){let r;if(e.face===2||e.face===5){let t=null,n=0;for(let i=0;i<4;i++){let a=`${e.face}/${i}`,o=ly(a),s=mG(o);(typeof t=="undefined"||t===null)&&(t=new Float64Array(4*s.length)),t.set(s,n),n+=s.length}r=ATe(t)}else{let t=mG(e);r=ATe(t)}return r}function ATe(e){if(e.length%2!=0)throw new Error("Invalid corners");let r=[],t=[];for(let n=0;n<e.length;n+=2)r.push(e[n]),t.push(e[n+1]);return r.sort((n,i)=>n-i),t.sort((n,i)=>n-i),{west:r[0],east:r[r.length-1],north:t[t.length-1],south:t[0]}}var wf=$e(Xt());function vG(e,r){let t=(r==null?void 0:r.minimumHeight)||0,n=(r==null?void 0:r.maximumHeight)||0,i=ly(e),a=STe(i),o=a.west,s=a.south,u=a.east,l=a.north,c=[];return c.push(new wf.Vector3(o,l,t)),c.push(new wf.Vector3(u,l,t)),c.push(new wf.Vector3(u,s,t)),c.push(new wf.Vector3(o,s,t)),c.push(new wf.Vector3(o,l,n)),c.push(new wf.Vector3(u,l,n)),c.push(new wf.Vector3(u,s,n)),c.push(new wf.Vector3(o,s,n)),c}var TTe=$e(Xt()),CTe=$e(U0());var DTe=$e(Gs());function sO(e){let r=e.token,t={minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight},n=vG(r,t),i=gG(r),a=i[0],o=i[1],s=DTe.Ellipsoid.WGS84.cartographicToCartesian([a,o,t.maximumHeight]),u=new TTe.Vector3(s[0],s[1],s[2]);n.push(u);let l=(0,CTe.makeOrientedBoundingBoxFromPoints)(n);return[...l.center,...l.halfAxes]}var Lqr=4,qqr=8,Nqr={QUADTREE:Lqr,OCTREE:qqr};function Uqr(e,r,t){if(e==null?void 0:e.box){let n=K2(e.s2VolumeInfo.token),i=cG(n,r),a=lG(i),o=oe({},e.s2VolumeInfo);switch(o.token=a,t){case"OCTREE":let l=e.s2VolumeInfo,c=l.maximumHeight-l.minimumHeight,f=c/2,d=l.minimumHeight+c/2;l.minimumHeight=d-f,l.maximumHeight=d+f;break;default:break}return{box:sO(o),s2VolumeInfo:o}}}async function bG(e){let{implicitOptions:r,parentData:t={mortonIndex:0,x:0,y:0,z:0},childIndex:n=0,globalData:i={level:0,mortonIndex:0,x:0,y:0,z:0},s2VolumeBox:a,loaderOptions:o}=e,{subtree:s,level:u=0}=e,{subdivisionScheme:l,subtreeLevels:c,maximumLevel:f,contentUrlTemplate:d,subtreesUriTemplate:p,basePath:h}=r,b={children:[],lodMetricValue:0,contentUrl:""};if(!f)return oG.once(`Missing 'maximumLevel' or 'availableLevels' property. The subtree ${d} won't be loaded...`),b;let v=u+i.level;if(v>f)return b;let y=Nqr[l],w=Math.log2(y),A=n&1,C=n>>1&1,D=n>>2&1,P=(y**u-1)/(y-1),k=$0(t.mortonIndex,n,w),L=P+k,I=$0(t.x,A,1),V=$0(t.y,C,1),N=$0(t.z,D,1),W=!1;u>=c&&(W=yG(s.childSubtreeAvailability,k));let M=$0(i.x,I,u*w),H=$0(i.y,V,u*w),X=$0(i.z,N,u*w);if(W){let me=`${h}/${p}`,Me=uO(me,v,M,H,X);s=await un(Me,rO,o),i.mortonIndex=k,i.x=I,i.y=V,i.z=N,i.level=u,k=0,L=0,I=0,V=0,N=0,u=0}if(!yG(s.tileAvailability,L))return b;yG(s.contentAvailability,L)&&(b.contentUrl=uO(d,v,M,H,X));let se=u+1,ce={mortonIndex:k,x:I,y:V,z:N};for(let me=0;me<y;me++){let Me=Uqr(a,me,l),Ie=await bG({subtree:s,implicitOptions:r,loaderOptions:o,parentData:ce,childIndex:me,level:se,globalData:oe({},i),s2VolumeBox:Me});if(Ie.contentUrl||Ie.children.length){let Ue=v+1,De=Gqr(Ie,Ue,{childTileX:I,childTileY:V,childTileZ:N},r,a);b.children.push(De)}}return b}function yG(e,r){let t;return Array.isArray(e)?(t=e[0],e.length>1&&oG.once('Not supported extension "3DTILES_multiple_contents" has been detected')):t=e,"constant"in t?Boolean(t.constant):t.explicitBitstream?Wqr(r,t.explicitBitstream):!1}function Gqr(e,r,t,n,i){let{basePath:a,refine:o,getRefine:s,lodMetricType:u,getTileType:l,rootLodMetricValue:c,rootBoundingVolume:f}=n,d=e.contentUrl&&e.contentUrl.replace(`${a}/`,""),p=c/2**r,h=(i==null?void 0:i.box)?{box:i.box}:f,b=zqr(r,h,t);return{children:e.children,contentUrl:e.contentUrl,content:{uri:d},id:e.contentUrl,refine:s(o),type:l(e),lodMetricType:u,lodMetricValue:p,geometricError:p,transform:e.transform,boundingVolume:b}}function zqr(e,r,t){if(r.region){let{childTileX:n,childTileY:i,childTileZ:a}=t,[o,s,u,l,c,f]=r.region,d=2**e,p=(u-o)/d,h=(l-s)/d,b=(f-c)/d,[v,y]=[o+p*n,o+p*(n+1)],[w,A]=[s+h*i,s+h*(i+1)],[C,D]=[c+b*a,c+b*(a+1)];return{region:[v,w,y,A,C,D]}}if(r.box)return r;throw new Error(`Unsupported bounding volume type ${r}`)}function $0(e,r,t){return(e<<t)+r}function uO(e,r,t,n,i){let a=Hqr({level:r,x:t,y:n,z:i});return e.replace(/{level}|{x}|{y}|{z}/gi,o=>a[o])}function Hqr(e){let r={};for(let t in e)r[`{${t}}`]=e[t];return r}function Wqr(e,r){let t=Math.floor(e/8),n=e%8;return(r[t]>>n&1)===1}function xG(e,r=""){if(!r)return rc.EMPTY;let n=r.split("?")[0].split(".").pop();switch(n){case"pnts":return rc.POINTCLOUD;case"i3dm":case"b3dm":case"glb":case"gltf":return rc.SCENEGRAPH;default:return n||rc.EMPTY}}function _G(e){switch(e){case"REPLACE":case"replace":return Tp.REPLACE;case"ADD":case"add":return Tp.ADD;default:return e}}function EG(e="",r){if(/^[a-z][0-9a-z+.-]*:/i.test(r)){let n=new URL(e,`${r}/`);return decodeURI(n.toString())}else if(e.startsWith("/"))return e;return`${r}/${e}`}function kTe(e,r){var i;if(!e)return null;let t;if(e.content){let a=e.content.uri||((i=e.content)==null?void 0:i.url);t=EG(a,r)}return ze(oe({},e),{id:t,contentUrl:t,lodMetricType:yf.GEOMETRIC_ERROR,lodMetricValue:e.geometricError,transformMatrix:e.transform,type:xG(e,t),refine:_G(e.refine)})}async function OTe(e,r,t){let n=null,i=FTe(e.root);i&&e.root?n=await RTe(e.root,e,r,i,t):n=kTe(e.root,r);let a=[];for(a.push(n);a.length>0;){let o=a.pop()||{},s=o.children||[],u=[];for(let l of s){let c=FTe(l),f;c?f=await RTe(l,e,r,c,t):f=kTe(l,r),f&&(u.push(f),a.push(f))}o.children=u}return n}async function RTe(e,r,t,n,i){var A,C,D;let{subdivisionScheme:a,maximumLevel:o,availableLevels:s,subtreeLevels:u,subtrees:{uri:l}}=n,c=uO(l,0,0,0,0),f=EG(c,t),d=await un(f,rO,i),p=EG((A=e.content)==null?void 0:A.uri,t),h=(C=r==null?void 0:r.root)==null?void 0:C.refine,b=e.geometricError,v=(D=e.boundingVolume.extensions)==null?void 0:D["3DTILES_bounding_volume_S2"];if(v){let k={box:sO(v),s2VolumeInfo:v};e.boundingVolume=k}let y=e.boundingVolume,w={contentUrlTemplate:p,subtreesUriTemplate:l,subdivisionScheme:a,subtreeLevels:u,maximumLevel:Number.isFinite(s)?s-1:o,refine:h,basePath:t,lodMetricType:yf.GEOMETRIC_ERROR,rootLodMetricValue:b,rootBoundingVolume:y,getTileType:xG,getRefine:_G};return await Vqr(e,t,d,w,i)}async function Vqr(e,r,t,n,i){if(!e)return null;let{children:a,contentUrl:o}=await bG({subtree:t,implicitOptions:n,loaderOptions:i}),s,u=null;return o&&(s=o,u={uri:o.replace(`${r}/`,"")}),ze(oe({},e),{id:s,contentUrl:s,lodMetricType:yf.GEOMETRIC_ERROR,lodMetricValue:e.geometricError,transformMatrix:e.transform,type:xG(e,s),refine:_G(e.refine),content:u||e.content,children:a})}function FTe(e){var r;return((r=e==null?void 0:e.extensions)==null?void 0:r["3DTILES_implicit_tiling"])||(e==null?void 0:e.implicitTiling)}var Sf={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:Nb,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:Kqr,options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};async function Kqr(e,r={},t){let n=r["3d-tiles"]||{},i;return n.isTileset==="auto"?i=(t==null?void 0:t.url)&&t.url.indexOf(".json")!==-1:i=n.isTileset,i?Yqr(e,r,t):$qr(e,r,t)}async function Yqr(e,r,t){var u;let n=JSON.parse(new TextDecoder().decode(e)),i=(t==null?void 0:t.url)||"",a=Xqr(i),o=await OTe(n,a,r||{});return ze(oe({},n),{loader:Sf,url:i,queryString:(t==null?void 0:t.queryString)||"",basePath:a,root:o||n.root,type:G0.TILES3D,lodMetricType:yf.GEOMETRIC_ERROR,lodMetricValue:((u=n.root)==null?void 0:u.geometricError)||0})}async function $qr(e,r,t){let n={content:{featureIds:null}};return await tG(e,0,r,t,n.content),n.content}function Xqr(e){return of.dirname(e)}var ITe="https://api.cesium.com/v1/assets";async function PTe(e,r){if(!r){let a=await Jqr(e);for(let o of a.items)o.type==="3DTILES"&&(r=o.id)}let t=await Qqr(e,r),{type:n,url:i}=t;return Qr(n==="3DTILES"&&i),t.headers={Authorization:`Bearer ${t.accessToken}`},t}async function Jqr(e){Qr(e);let r=ITe,t={Authorization:`Bearer ${e}`},n=await Xo(r,{headers:t});if(!n.ok)throw new Error(n.statusText);return await n.json()}async function Qqr(e,r){Qr(e,r);let t={Authorization:`Bearer ${e}`},n=`${ITe}/${r}`,i=await Xo(`${n}`,{headers:t});if(!i.ok)throw new Error(i.statusText);let a=await i.json();if(i=await Xo(`${n}/endpoint`,{headers:t}),!i.ok)throw new Error(i.statusText);let o=await i.json();return a=oe(oe({},a),o),a}async function Zqr(e,r={}){r=r["cesium-ion"]||{};let{accessToken:t}=r,n=r.assetId;if(!Number.isFinite(n)){let i=e.match(/\/([0-9]+)\/tileset.json/);n=i&&i[1]}return PTe(t,n)}var lO=ze(oe({},Sf),{id:"cesium-ion",name:"Cesium Ion",preload:Zqr,parse:async(e,r,t)=>(r=oe({},r),r["3d-tiles"]=r["cesium-ion"],r.loader=lO,Sf.parse(e,r,t)),options:{"cesium-ion":ze(oe({},Sf.options["3d-tiles"]),{accessToken:null})}});var z8e=$e(uH()),yzr="4.0.0-alpha.21",lH={id:"zip",module:"zip",name:"Zip Archive",version:yzr,extensions:["zip"],mimeTypes:["application/zip"],category:"archive",tests:["PK"],options:{},parse:xzr};async function xzr(e,r={}){let t=[],n={};try{let i=new z8e.default;return(await i.loadAsync(e,r)).forEach((o,s)=>{let u=s.name,l=_zr(i,u,r).then(c=>{n[o]=c});t.push(l)}),await Promise.all(t),n}catch(i){throw r.log.error(`Unable to read zip archive: ${i}`),i}}async function _zr(e,r,t={}){try{return await e.file(r).async(t.dataType||"arraybuffer")}catch(n){return t.log.error(`Unable to read ${r} from zip archive: ${n}`),n}}function zp(e,r,t){let n=12;if(!r)return t+n;let{magic:i,version:a=1,byteLength:o=12}=e;return Qr(Array.isArray(i)&&Number.isFinite(a)&&Number.isFinite(o)),r.setUint8(t+0,i[0]),r.setUint8(t+1,i[1]),r.setUint8(t+2,i[2]),r.setUint8(t+3,i[3]),r.setUint32(t+4,a,!0),r.setUint32(t+8,o,!0),t+=n,t}function Hp(e,r,t){!e||e.setUint32(r+8,t,!0)}function K8e(e,r,t,n,i){e=oe({magic:Cp.COMPOSITE,tiles:[]},e);let a=t;t+=zp(e,r,t),r&&r.setUint32(t,e.tiles.length,!0),t+=4;for(let o=0;o<e.tiles.length;++o)t+=i(e.tiles[o],r,t,n);return Hp(r,a,t-a),t}function Y8e(e,r,t,n){let{featuresLength:i=0,batchTable:a}=e,o={BATCH_LENGTH:i},s=JSON.stringify(o),u=a?JSON.stringify(a):"",l=$o(s.length,8),c=u?$o(u.length,8):0;e=oe({magic:Cp.BATCHED_MODEL},e);let f=t;t=zp(e,r,t),r&&(r.setUint32(12,l,!0),r.setUint32(16,0,!0),r.setUint32(20,c,!0),r.setUint32(24,0,!0)),t+=16,t=hb(r,t,s,8),a&&(t=hb(r,t,u,8));let d=e.gltfEncoded;return d&&(t=Q_(r,t,d,d.byteLength)),Hp(r,f,t-f),t}function $8e(e,r,t,n){let{featuresLength:i=1,gltfFormat:a=1,gltfUri:o=""}=e,s=o.length,u={INSTANCES_LENGTH:i,POSITION:new Array(i*3).fill(0)},l=JSON.stringify(u),c=l.length;e=oe({magic:Cp.INSTANCED_MODEL},e);let f=t;return t=zp(e,r,0),r&&(r.setUint32(12,c,!0),r.setUint32(16,0,!0),r.setUint32(20,0,!0),r.setUint32(24,0,!0),r.setUint32(28,a,!0)),t+=20,t+=pb(r,t,l,c),t+=pb(r,t,o,s),Hp(r,f,t-f),t}var Ezr={POINTS_LENGTH:1,POSITIONS:{byteOffset:0}};function X8e(e,r,t,n){let{featureTableJson:i=Ezr}=e,a=JSON.stringify(i);a=F7(a,4);let{featureTableJsonByteLength:o=a.length}=e,s=new ArrayBuffer(12),u=s.byteLength;e=oe({magic:Cp.POINT_CLOUD},e);let l=t;return t+=zp(e,r,0),r&&(r.setUint32(t+0,o,!0),r.setUint32(t+4,u,!0),r.setUint32(t+8,0,!0),r.setUint32(t+12,0,!0)),t+=16,t+=pb(r,t,a,o),t+=Q_(r,t,s,u),Hp(r,l,t-l),t}function hH(e,r){let t=mH(e,null,0,r),n=new ArrayBuffer(t),i=new DataView(n);return mH(e,i,0,r),n}function mH(e,r,t,n){switch(Qr(typeof e.type=="string"),e.type){case Ws.COMPOSITE:return K8e(e,r,t,n,mH);case Ws.POINT_CLOUD:return X8e(e,r,t,n);case Ws.BATCHED_3D_MODEL:return Y8e(e,r,t,n);case Ws.INSTANCED_3D_MODEL:return $8e(e,r,t,n);default:throw new Error("3D Tiles: unknown tile type")}}var gH={name:"3D Tile",id:"3d-tiles",module:"3d-tiles",version:Nb,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],encodeSync:wzr,binary:!0,options:{["3d-tiles"]:{}}};function wzr(e,r){return hH(e,r)}var to=$e(require("path"));var pc=$e(mDe()),l4t=pc.default.v1,c4t=pc.default.v3,jf=pc.default.v4,f4t=pc.default.v5,d4t=pc.default.NIL,p4t=pc.default.version,h4t=pc.default.validate,m4t=pc.default.stringify,g4t=pc.default.parse;var Mm=$e(require("process")),l4=$e(Zu()),gY=$e(pH());var hx=$e(require("path")),hBe=$e(Zu());var wDe=()=>({folderPattern:{path:"folderPattern",default:"BASIC"},archiveCompressionType:{path:"archiveCompressionType",default:"STORE"},resourceCompressionType:{path:"resourceCompressionType",default:"GZIP"},I3SVersion:{path:"I3SVersion",default:"1.8"},nodeCount:{path:"nodeCount"}});var dx=$e(require("fs")),px=$e(require("path"));var cBe=$e(require("zlib")),fBe=$e(require("path")),Fw=$e(require("fs")),oat=$e(lBe());var sat=$e(uH());var uat=$e(cH());function XF(e){let r=`${e}.gz`,t=(0,cBe.createGzip)(),n=(0,Fw.createReadStream)(e),i=(0,Fw.createWriteStream)(r);return new Promise((a,o)=>{n.on("end",()=>{console.log(`${r} compressed and saved.`),a(r)}),n.on("error",s=>{console.log(`${r}: compression error!`),o(s)}),n.pipe(t).pipe(i)})}async function dBe(e,r,t,n,i){process.platform==="win32"?await cat(e,r,t,n,i):await lat(e,r,t,n)}async function lat(e,r,t=0,n="."){let i=Iw(r),a=[`-${t}`,"-r",i,n];await new hp().start({command:"zip",arguments:a,spawn:{cwd:e},wait:0})}async function cat(e,r,t=0,n=(0,fBe.join)(".","*"),i){n[0]==="@"&&(n=`*${n.substr(1)}`);let a=Iw(r),o=["a","-tzip",`-mx=${t}`,a,n];await new hp().start({command:i,arguments:o,spawn:{cwd:`${e}`},wait:0})}async function Gi(e,r,t="index.json"){let n;r instanceof Promise?n=new Uint8Array(await r):r instanceof ArrayBuffer?n=new Uint8Array(r):n=r,await dx.promises.mkdir(e,{recursive:!0});let i=(0,px.join)(e,t);try{await dx.promises.writeFile(i,n)}catch(a){throw a}return console.log(`${i} saved.`),i}async function xc(e,r,t="index.json",n=!0,i){let a=await Gi(e,r,t);if(n){if(i)return i.includes(a)?null:(i.push(a),`${a}.gz`);{let o=await XF(a);return await $K(a),o}}return a}async function JF(e,r){return new Promise((t,n)=>{let i=0;console.log(`load ${e}/${r}.`);let a=setInterval(()=>{let o=(0,px.join)(e,r);un(o,j7).then(s=>{clearInterval(a),t(s)}).catch(()=>{i++,i>100&&(clearInterval(a),n(new Error(`Cannon load ${e}/${r}.`)))})},200)})}async function pBe(e){try{return await dx.promises.stat(e),!0}catch{return!1}}function Pw(e){return dx.promises.rm(e,{recursive:!0})}function $K(e){return dx.promises.unlink(e)}function Iw(e){return(0,px.isAbsolute)(e)?e:(0,px.join)(process.cwd(),e)}var qo=class{constructor(r,t,n){this.length=0;this.nodesPerPage=t,this.nodesCounter=0,this.nodePages=[{}],this.nodePages[0].nodes=[],this.writeFile=r,this.converter=n,this.length=0}useWriteFunction(r){this.writeFile=r}getNodePageFileName(r){let t,n;return this.converter.options.slpk?(t=(0,hx.join)(this.converter.layers0Path,"nodepages"),n=`${r.toString()}.json`):(t=(0,hx.join)(this.converter.layers0Path,"nodepages",r.toString()),n="index.json"),{filePath:t,fileName:n}}async loadNodePage(r){let{filePath:t,fileName:n}=this.getNodePageFileName(r),i=(0,hx.join)(t,n);return await pBe(i)?(console.log(`load ${i}.`),await JF(t,n)):{nodes:[]}}getPageIndexByNodeId(r){return Math.floor(r/this.nodesPerPage)}async getPageByNodeId(r){let t=this.getPageIndexByNodeId(r);return this.converter.options.instantNodeWriting?await this.loadNodePage(t):this.nodePages[t]}async getNodeById(r,t){let n=r%this.nodesPerPage;return t=t||await this.getPageByNodeId(r),t.nodes[n]}async addChildRelation(r,t){var i;if(r==null)return;let n=await this.getNodeById(r);(i=n.children)==null||i.push(t),await this.saveNode(n)}async push(r,t){if(r.index=this.nodesCounter++,!this.converter.options.instantNodeWriting){let n=this.nodePages[this.nodePages.length-1];n.nodes.length===this.nodesPerPage&&(n={nodes:[]},this.nodePages.push(n)),n.nodes.push(r)}return await this.addChildRelation(t,r.index),qo.updateResourceInMesh(r),await this.saveNode(r),r}async saveNode(r){if(this.converter.options.instantNodeWriting){let t=this.getPageIndexByNodeId(r.index),n=await this.getPageByNodeId(r.index),{filePath:i,fileName:a}=this.getNodePageFileName(t),o=await this.getNodeById(r.index,n);o?qo.updateAll(o,r):n.nodes.push(r);let s=JSON.stringify(n);this.converter.options.slpk?await this.converter.writeQueue.enqueue({archiveKey:`nodePages/${t.toString()}.json.gz`,writePromise:()=>this.writeFile(i,s,a,!0,this.converter.compressList)},!0):await this.converter.writeQueue.enqueue({writePromise:()=>this.writeFile(i,s)},!0)}else return}async saveMetadata(){let r=(0,hBe.default)({nodeCount:this.nodesCounter},wDe()),t=!1;await this.converter.writeQueue.enqueue({archiveKey:"metadata.json",writePromise:()=>this.writeFile(this.converter.layers0Path,JSON.stringify(r),"metadata.json",t)})}async save(){if(this.converter.options.instantNodeWriting){await this.saveMetadata();return}if(this.converter.options.slpk){for(let[r,t]of this.nodePages.entries()){let n=JSON.stringify(t),i=(0,hx.join)(this.converter.layers0Path,"nodepages");await this.converter.writeQueue.enqueue({archiveKey:`nodePages/${r.toString()}.json.gz`,writePromise:()=>this.writeFile(i,n,`${r.toString()}.json`)})}await this.saveMetadata()}else for(let[r,t]of this.nodePages.entries()){let n=JSON.stringify(t),i=(0,hx.join)(this.converter.layers0Path,"nodepages",r.toString());await this.converter.writeQueue.enqueue({writePromise:()=>this.writeFile(i,n)})}}static updateResourceInMesh(r){r.mesh&&isFinite(r.index)&&(r.mesh.geometry.resource=r.index)}static updateAll(r,t){return Object.assign(r,t,{index:r.index}),qo.updateResourceInMesh(r),r}static updateMaterialByNodeId(r,t){!r.mesh||(r.mesh.material={definition:t,resource:r.index})}static updateVertexCountByNodeId(r,t){!r.mesh||(r.mesh.geometry.vertexCount=t)}static updateNodeAttributeByNodeId(r){!r.mesh||!r.index||(r.mesh.attribute.resource=r.index)}static updateFeatureCountByNodeId(r,t){!r.mesh||(r.mesh.geometry.featureCount=t)}static updateTexelCountHintByNodeId(r,t){!r.mesh||!r.mesh.material||(r.mesh.material.texelCountHint=t)}};var Bw=$e(require("path")),QF=$e(require("fs"));function ZF(e){let r=1e6,t=e[0],n=Math.floor(t/3600);t=t-n*3600;let i=Math.floor(t/60);t=t-i*60;let a=Math.floor(t),o=e[1]/r,s="";return n&&(s+=`${n}h `),i&&(s+=`${i}m `),a&&(s+=`${a}s`),s||(s+=`${o}ms`),s}async function e4(e){let{slpk:r,outputPath:t,tilesetName:n}=e,i=Iw(t);try{if(r){let s=(0,Bw.join)(i,`${n}.slpk`);return(await QF.promises.stat(s)).size}let a=(0,Bw.join)(i,n);return await mBe(a)}catch(a){return console.log("Calculate file sizes error: ",a),null}}async function mBe(e){let r=0,t=await QF.promises.readdir(e);for(let n of t){let i=await QF.promises.stat((0,Bw.join)(e,n));i.isDirectory()?r+=await mBe((0,Bw.join)(e,n)):r+=i.size}return r}var cu=$e(Xt()),eY=$e(Gs());var PBe=$e(pH());var Bm=3,mx=9;function gBe(e){let{positions:r,normals:t,texCoords:n,colors:i,uvRegions:a,featureIndices:o}=e,s=r.length/mx;if(!o.length)return{faceRange:new Uint32Array([0,s-1]),featureIds:[0],featureCount:1,positions:r,normals:t,texCoords:n,colors:i,uvRegions:a};let u=fat(o),l=dat(oe(oe({},u),e)),c=pat(l);return hat(c,u.featureCount)}function fat(e){let r=1,t=1,n=vBe(e.slice(0,Bm)),i=[],a=[],o=[n];i[0]=0,a[0]=n;for(let l=Bm;l<e.length;l+=Bm){let c=vBe(e.slice(l,l+Bm));n!==c&&(i[r]=l/Bm-1,i[r+1]=l/Bm,a[t]=c,o.includes(c)||o.push(c),r+=2,t+=1),n=c}i[r]=e.length/Bm-1;let s=new Uint32Array(i),u=o.length;return{faceRange:s,featureCount:u,featureIds:a}}function vBe(e){let r={},t=e[0],n=1;for(let i of e)r[i]=(r[i]||0)+1,n=n>r[i]?n:r[i],t=n>r[i]?t:i;return t}function dat(e){let{featureIds:r,positions:t,normals:n,colors:i,uvRegions:a,texCoords:o,faceRange:s=new Uint32Array(0)}=e,u=[],l=new Float32Array(t),c=new Float32Array(n),f=new Uint8Array(i),d=new Float32Array(o),p=new Uint16Array(a);for(let h=0;h<r.length;h++){let b=s[h*2],v=s[h*2+1],y=jw("positions",b,v),w=jw("normals",b,v),A=jw("colors",b,v),C=jw("uvRegions",b,v),D=jw("texCoords",b,v);u.push({featureId:r[h],positions:l.slice(0,y),normals:c.slice(0,w),colors:f.slice(0,A),uvRegions:p.slice(0,C),texCoords:d.slice(0,D)}),l=l.slice(y),c=c.slice(w),f=f.slice(A),p=p.slice(C),d=d.slice(D)}return u.sort((h,b)=>h.featureId-b.featureId)}function jw(e,r,t){let n=4,i=2,a=t-r+1,o=a*3;switch(e){case"positions":case"normals":return a*mx;case"colors":case"uvRegions":return o*n;case"texCoords":return o*i;default:return 0}}function pat(e){let r=[];for(let t=0;t<e.length;t++){let n=e[t],i=r.find(a=>a.featureId===n.featureId);i?(i.positions=_a(i.positions,n.positions),i.normals=_a(i.normals,n.normals),i.colors=_a(i.colors,n.colors),i.texCoords=_a(i.texCoords,n.texCoords),i.uvRegions=_a(i.uvRegions,n.uvRegions)):r.push(n)}return r}function hat(e,r){let t=e[0],n=[t.featureId||0],i=new Float32Array(t.positions),a=new Float32Array(t.normals),o=new Uint8Array(t.colors),s=new Uint16Array(t.uvRegions),u=new Float32Array(t.texCoords),l=[0],c=0,f=0;for(let p=1;p<e.length;p++){let h=e[p];n.push(h.featureId||0),i=_a(i,h.positions),a=_a(a,h.normals),o=_a(o,h.colors),s=_a(s,h.uvRegions),u=_a(u,h.texCoords);let b=e[c];l.push(b.positions.length/mx-1+f),l.push(b.positions.length/mx+f),f+=b.positions.length/mx,c+=1}return l.push(i.length/mx-1),{faceRange:new Uint32Array(l),featureIds:n,positions:i,normals:a,colors:o,uvRegions:s,texCoords:u,featureCount:r}}var ro=$e(Xt()),gx=$e(Gs()),Hf=$e(U0());function XK(e,r){let t,n,i,a=gx.Ellipsoid.WGS84.cartesianToCartographic(e.center,new ro.Vector3);return a[2]=a[2]-r.getHeight(a[1],a[0]),e instanceof Hf.OrientedBoundingBox?(n=e.halfSize,t=new ro.Vector3(n[0],n[1],n[2]).len(),i=e.quaternion):(t=e.radius,n=[t,t,t],i=new ro.Quaternion().fromMatrix3(new ro.Matrix3([n[0],0,0,0,n[1],0,0,0,n[2]])).normalize()),{mbs:[a[0],a[1],a[2],t],obb:{center:[a[0],a[1],a[2]],halfSize:n,quaternion:i}}}function bBe(e,r){let t=mat(e),n=(0,Hf.makeOrientedBoundingBoxFromPoints)(t),i=(0,Hf.makeBoundingSphereFromPoints)(t),a=gx.Ellipsoid.WGS84.cartesianToCartographic(i.center,new ro.Vector3),o=gx.Ellipsoid.WGS84.cartesianToCartographic(n.center,new ro.Vector3);return a[2]=a[2]-r.getHeight(a[1],a[0]),o[2]=o[2]-r.getHeight(o[1],o[0]),{mbs:[a[0],a[1],a[2],i.radius],obb:{center:o,halfSize:n.halfSize,quaternion:n.quaternion}}}function mat(e){let r=[];for(let t=0;t<e.length;t+=3){let n=new ro.Vector3([e[t],e[t+1],e[t+2]]);r.push(n)}return r}function yBe(e){let r;e instanceof Hf.BoundingSphere?r=e:r=e.getBoundingSphere();let t=r.center,n=r.radius,i=gx.Ellipsoid.WGS84.cartesianToCartographic(new ro.Vector3(t[0]+n,t[1]+n,t[2]+n),new ro.Vector3),a=gx.Ellipsoid.WGS84.cartesianToCartographic(new ro.Vector3(t[0]-n,t[1]-n,t[2]-n),new ro.Vector3);return{xmin:Math.min(a[0],i[0]),xmax:Math.max(a[0],i[0]),ymin:Math.min(a[1],i[1]),ymax:Math.max(a[1],i[1]),zmin:Math.min(a[2],i[2]),zmax:Math.max(a[2],i[2])}}function JK(e){let r=e[3],t=new ro.Vector3(e[0],e[1],e[2]),n=new ro.Matrix3([r,0,0,0,r,0,0,0,r]);return new Hf.OrientedBoundingBox(t,n)}var jm=$e(Xt()),xBe=$e(Gs());function _Be(e,r,t){var s,u,l,c,f,d,p,h;let n=((u=(s=e.gltf)==null?void 0:s.scene)==null?void 0:u.nodes)||((f=(c=(l=e.gltf)==null?void 0:l.scenes)==null?void 0:c[0])==null?void 0:f.nodes)||((d=e.gltf)==null?void 0:d.nodes)||[],i=((h=(p=e.gltf)==null?void 0:p.images)==null?void 0:h.map(b=>{var v,y;if((v=b==null?void 0:b.image)==null?void 0:v.compressed)return null;{let w=(y=b==null?void 0:b.image)==null?void 0:y.data,A=new Uint8Array(w.length);return A.set(w),{data:A,compressed:!1,height:b.image.height,width:b.image.width,components:b.image.components,mimeType:b.mimeType}}}))||[];EBe(n);let{cartographicOrigin:a,modelMatrix:o}=vat(e,r,t);return{nodes:n,images:i,cartographicOrigin:a,cartesianModelMatrix:o}}function gat(e){let r={};for(let t in e)r[t]={value:e[t].value};return r}function vat(e,r,t){let{rtcCenter:n,gltfUpAxis:i}=e,{center:a}=t,o=new jm.Matrix4(r);switch(n&&o.translate(n),i){case"Z":break;case"Y":let l=new jm.Matrix4().rotateX(Math.PI/2);o=o.multiplyRight(l);break;case"X":let c=new jm.Matrix4().rotateY(-Math.PI/2);o=o.multiplyRight(c);break;default:break}let s=new jm.Vector3(a),u=xBe.Ellipsoid.WGS84.cartesianToCartographic(s,new jm.Vector3);return{modelMatrix:o,cartographicOrigin:u}}function EBe(e){var r;for(let t=0;t<e.length;t++){let n=e[t];n.mesh&&(e[t]=ze(oe({},n),{mesh:ze(oe({},n.mesh),{primitives:(r=n.mesh)==null?void 0:r.primitives.map(i=>{var a,o,s;return ze(oe({},i),{indices:{value:(a=i==null?void 0:i.indices)==null?void 0:a.value},attributes:gat(i.attributes),material:{id:(o=i==null?void 0:i.material)==null?void 0:o.id,uniqueId:(s=i==null?void 0:i.material)==null?void 0:s.uniqueId}})})})})),n.children&&EBe(n.children)}}var vx="Tile converter does not work in browser, only in node js environment",Mw="EXT_mesh_features",Sh="EXT_feature_metadata";function wBe(e,r){var n,i;let t=(i=(n=e.gltf)==null?void 0:n.extensions)==null?void 0:i[Sh];if(!(t==null?void 0:t.featureTextures))return null;for(let a in t.featureTextures)if(t.featureTextures[a].class===r)return a;return null}function SBe(e,r,t,n){let i=r==null?void 0:r.extensions;if(!i)return[];for(let[a,o]of Object.entries(i||{}))switch(a){case Sh:return bat(e,o,t,n);case Mw:return console.warn("EXT_mesh_features extension is not supported yet"),[];default:return[]}return[]}function bat(e,r,t,n){var o,s,u,l,c,f,d;let i=(o=r==null?void 0:r.featureIdAttributes)==null?void 0:o[0];if((s=i==null?void 0:i.featureIds)==null?void 0:s.attribute)return e[i.featureIds.attribute].value;if(((u=i==null?void 0:i.featureIds)==null?void 0:u.hasOwnProperty("constant"))&&((l=i==null?void 0:i.featureIds)==null?void 0:l.hasOwnProperty("divisor"))){let p=((c=e==null?void 0:e.POSITIONS)==null?void 0:c.value.length)/3||0;return yat(p,i.featureIds.constant,i.featureIds.divisor)}let a=(r==null?void 0:r.featureIdTextures)&&(r==null?void 0:r.featureIdTextures[0]);if(a){let h=`TEXCOORD_${((d=(f=a==null?void 0:a.featureIds)==null?void 0:f.texture)==null?void 0:d.texCoord)||0}`,b=e[h].value;return xat(a,b,t)}return n?e[n].value:[]}function yat(e,r=0,t=0){let n=[];if(t>0){let i=r,a=t;for(let o=0;o<e;o++)n.push(i),a-=1,a===0&&(i++,a=t)}else n=Array(e).fill(r,0,e);return n}function xat(e,r,t){var l,c,f;if(!(t==null?void 0:t.length))return[];let n={r:0,g:1,b:2,a:3},i=(c=(l=e==null?void 0:e.featureIds)==null?void 0:l.texture)==null?void 0:c.index,a=(f=e==null?void 0:e.featureIds)==null?void 0:f.channels;if(!a||i===void 0)return[];let o=t[i],s=[],u=n[a];if(o&&(o==null?void 0:o.width)&&(o==null?void 0:o.height)&&(o==null?void 0:o.components))for(let d=0;d<r.length;d+=2){let p=r[d],h=r[d+1],b=Math.min(ABe(p)*o.width|0,o.width-1),y=(Math.min(ABe(h)*o.height|0,o.height-1)*o.width+b)*o.components+u,w=new Uint8Array(o.data)[y];s.push(w)}else console.warn(`Can't get batch Ids from ${(o==null?void 0:o.mimeType)||""} compressed texture`);return s}function ABe(e){return(e%1+1)%1}function TBe(e,r){let t={};for(let n in r){let i=r[n];t[n]=_at(i,e)}return t}function _at(e,r){let t=[];for(let n of r){let i=e[n]||null;t.push(i)}return t}function CBe(e,r){let t=!1;for(let n of Object.values(r))e.length!==n.length&&(t=!0);return t}var Lw="string",QK="Int32",ZK="double",r4="OBJECTID";function DBe(e,r){return e===r4?r4:typeof r===Lw?Lw:typeof r=="number"?Number.isInteger(r)?QK:ZK:Lw}function kBe(e,r,t){let n={key:`f_${e}`,name:r,ordering:["attributeValues"],header:[{property:"count",valueType:"UInt32"}],attributeValues:{valueType:"Int32",valuesPerElement:1}};switch(t){case r4:Eat(n);break;case Lw:IBe(n);break;case ZK:wat(n);break;case QK:break;default:IBe(n)}return n}function OBe(e){switch(e){case r4:return"esriFieldTypeOID";case Lw:return"esriFieldTypeString";case QK:return"esriFieldTypeInteger";case ZK:return"esriFieldTypeDouble";default:return"esriFieldTypeString"}}function RBe(e,r){return{name:e,type:r,alias:e}}function FBe(e){let r="{OBJECTID}",t=[],n=[],i=[],a=[];for(let o in e)n.push({fieldName:o,visible:!0,isEditable:!1,label:o});return i.push({fieldInfos:n,type:"fields"}),{title:r,mediaInfos:t,popupElements:i,fieldInfos:n,expressionInfos:a}}function IBe(e){e.ordering.unshift("attributeByteCounts"),e.header.push({property:"attributeValuesByteCount",valueType:"UInt32"}),e.attributeValues={valueType:"String",encoding:"UTF-8",valuesPerElement:1},e.attributeByteCounts={valueType:"UInt32",valuesPerElement:1}}function Eat(e){e.attributeValues={valueType:"Oid32",valuesPerElement:1}}function wat(e){e.attributeValues={valueType:"Float64",valuesPerElement:1}}var t4=e=>{let r=new Uint32Array(e);for(let t=0;t<e;t++)r[t]=t;return r};var Sat=1,Aat=1,rl=3,qw=2,Tat=4,Cat="string",Dat="Int32",kat="Float64",Oat="Oid32",BBe=["CUSTOM_ATTRIBUTE_2","_BATCHID","BATCHID"],Ah=new cu.Vector3;async function rY(e,r,t,n,i,a,o,s,u,l,c,f,d){var A;let p=u,h=await Wat((A=e.gltf)==null?void 0:A.materials,l),b=_Be(e,r,t),v=wBe(e,d),y=await Iat(b,h,p,v);u&&Rat(y,c);let w=[];for(let C of h){let D=C.mergedMaterials[0].originalMaterialId;if(!y.has(D))continue;let P=y.get(D);if(!P)continue;let{material:k,texture:L}=C,I=await n();w.push(await Fat({convertedAttributes:P,material:k,texture:L,tileContent:e,nodeId:I,featuresHashArray:a,propertyTable:i,attributeStorageInfo:o,draco:s,libraries:f}))}return w.length?w:null}function Rat(e,r){for(let t of e.values()){let n=bBe(t.positions,r);t.boundingVolumes=n;let i=n.obb.center;for(let a=0;a<t.positions.length;a+=rl){let o=t.positions.subarray(a,a+rl);eY.Ellipsoid.WGS84.cartesianToCartographic(Array.from(o),Ah),Ah[2]=Ah[2]-r.getHeight(Ah[1],Ah[0]),Ah=Ah.subtract(i),t.positions.set(Ah,a)}}}async function Fat({convertedAttributes:e,material:r,texture:t,tileContent:n,nodeId:i,featuresHashArray:a,propertyTable:o,attributeStorageInfo:s,draco:u,libraries:l}){var I;let c=e.boundingVolumes,f=e.positions.length/rl,{faceRange:d,featureIds:p,positions:h,normals:b,colors:v,uvRegions:y,texCoords:w,featureCount:A}=gBe(e);n.batchTableJson&&tot(p,e.featureIndices,a,n.batchTableJson);let C=new Uint32Array(2),D=fot(p);C.set([f,A],0);let P=new Uint8Array(Kl(C.buffer,h.buffer,b.buffer,t?w.buffer:new ArrayBuffer(0),v.buffer,y,D.buffer,d.buffer)),k=u?dot(f,e,{positions:h,normals:b,texCoords:t?w:new Float32Array(0),colors:v,uvRegions:y,featureIds:p,faceRange:d},l):null,L=[];return s&&o&&(L=oot(p,o,s)),{nodeId:i,geometry:P,compressedGeometry:k,texture:t,hasUvRegions:Boolean(y.length),sharedResources:Jat(((I=n.gltf)==null?void 0:I.materials)||[],i),meshMaterial:r,vertexCount:f,attributes:L,featureCount:A,boundingVolumes:c}}async function Iat(e,r,t,n){let{nodes:i,images:a,cartographicOrigin:o,cartesianModelMatrix:s}=e,u=new Map;for(let l of r){let c={positions:new Float32Array(0),normals:new Float32Array(0),texCoords:new Float32Array(0),colors:new Uint8Array(0),uvRegions:new Uint16Array(0),featureIndicesGroups:[],featureIndices:[],boundingVolumes:null,mergedMaterials:l.mergedMaterials};for(let f of l.mergedMaterials)u.set(f.originalMaterialId,c)}jBe(i,a,o,s,u,t,void 0,n);for(let l of u.keys()){let c=u.get(l);if(!!c){if(c.positions.length===0){u.delete(l);continue}c.featureIndicesGroups&&(c.featureIndices=c.featureIndicesGroups.reduce((f,d)=>f.concat(d)),delete c.featureIndicesGroups)}}return u}function jBe(e,r,t,n,i,a,o=new cu.Matrix4([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),s){if(e)for(let u of e)Bat(u,r,t,n,i,a,o,s)}function Pat(e,r){let t=r,{matrix:n,rotation:i,scale:a,translation:o}=e;return n&&(t=r.multiplyRight(n)),o&&(t=t.translate(o)),i&&(t=t.rotateXYZ(i)),a&&(t=t.scale(a)),t}function Bat(e,r,t,n,i,a,o=new cu.Matrix4([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),s){let u=Pat(e,o),l=e.mesh;l&&jat(l,r,t,n,i,a,u,s),jBe(e.children||[],r,t,n,i,a,u,s)}function jat(e,r,t,n,i,a=!1,o=new cu.Matrix4([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),s){var u;for(let l of e.primitives){let c=null,f;l.material?(c=i.get(l.material.id),f=(u=c==null?void 0:c.mergedMaterials.find(({originalMaterialId:h})=>{var b;return h===((b=l.material)==null?void 0:b.id)}))==null?void 0:u.uvRegion):i.has("default")&&(c=i.get("default")),Qr(c!==null,"Primitive - material mapping failed"),Qr(l.mode===void 0||l.mode===nt.TRIANGLES||l.mode===nt.TRIANGLE_STRIP,`Primitive - unsupported mode ${l.mode}`);let d=l.attributes;if(!c)continue;let p=Mat(l);c.positions=_a(c.positions,MBe({vertices:d.POSITION.value,cartographicOrigin:t,cartesianModelMatrix:n,nodeMatrix:o,indices:p,attributeSpecificTransformation:Lat,useCartesianPositions:a})),c.normals=_a(c.normals,MBe({vertices:d.NORMAL&&d.NORMAL.value,cartographicOrigin:t,cartesianModelMatrix:n,nodeMatrix:o,indices:p,attributeSpecificTransformation:qat,useCartesianPositions:!1})),c.texCoords=_a(c.texCoords,Nat(d.TEXCOORD_0&&d.TEXCOORD_0.value,p)),c.colors=_a(c.colors,Uat(d.COLOR_0,p)),f&&(c.uvRegions=_a(c.uvRegions,Gat(f,p))),c.featureIndicesGroups=c.featureIndicesGroups||[],c.featureIndicesGroups.push(zat(Hat(d,l,r,s),p))}}function Mat(e){var t;let r=(t=e.indices)==null?void 0:t.value;if(!r){let n=e.attributes.POSITION.value;return t4(n.length/rl)}if(r&&e.mode===nt.TRIANGLE_STRIP){let n=r.constructor,i=new n((r.length-2)*3),a=0,o=r.slice(0,3);i.set(o,0);for(let s=1;s+2<r.length;s++)a+=3,o=r.slice(s,s+3),s%2==0?i.set(o,a):i.set(o.reverse(),a);r=i}return r}function MBe(e){let{vertices:r,indices:t,attributeSpecificTransformation:n}=e,i=new Float32Array(t.length*rl);if(!r)return i;for(let a=0;a<t.length;a++){let o=t[a]*rl,s=r.subarray(o,o+rl),u=new cu.Vector3(Array.from(s));u=n(u,e),i[a*rl]=u.x,i[a*rl+1]=u.y,i[a*rl+2]=u.z}return i}function Lat(e,r){let{cartesianModelMatrix:t,cartographicOrigin:n,nodeMatrix:i,useCartesianPositions:a}=r;return i&&(e=e.transform(i)),e=e.transform(t),a||(eY.Ellipsoid.WGS84.cartesianToCartographic([e[0],e[1],e[2]],e),e=e.subtract(n)),e}function qat(e,r){let{cartesianModelMatrix:t,nodeMatrix:n}=r;return n&&(e=e.transformAsVector(n)),e=e.transformAsVector(t),e}function Nat(e,r){let t=new Float32Array(r.length*qw);if(!e)return t.fill(1),t;for(let n=0;n<r.length;n++){let i=r[n]*qw,a=e.subarray(i,i+qw);t[n*qw]=a[0],t[n*qw+1]=a[1]}return t}function Uat(e,r){let t=(e==null?void 0:e.components)||Tat,n=new Uint8Array(r.length*t);if(!e)return n.fill(255),n;let i=e.value;for(let a=0;a<r.length;a++){let o=r[a]*t,s=i.subarray(o,o+t),u=new Uint8Array(t);for(let l=0;l<s.length;l++)u[l]=s[l]*255;n.set(u,a*t)}return n}function Gat(e,r){let t=new Uint16Array(r.length*4);for(let n=0;n<t.length;n+=4)t.set(e,n);return t}function zat(e,r){if(!e.length||!r.length)return[];let t=[];for(let n=0;n<r.length;n++){let i=r[n];t.push(e[i])}return t}function Hat(e,r,t,n){let i=SBe(e,r,t,n);if(i.length)return i;for(let a=0;a<BBe.length;a++){let o=BBe[a];if(e[o]&&e[o].value)return e[o].value}return[]}async function Wat(e=[],r){let t=[];for(let n of e)t.push(Yat(n));return r&&(t=await Vat(t)),t}async function Vat(e){var t,n;let r=[];for(;e.length>0;){let i=e.splice(0,1)[0],a=[];for(let o=0;o<e.length;o++){let s=e[o];(i.texture&&s.texture||!i.texture&&!s.texture)&&(i=await Kat(i,s),a.push(o))}if(i.texture&&a.length){let o=(t=i.mergedMaterials)==null?void 0:t.reduce((l,{textureSize:c})=>l+((c==null?void 0:c.width)||0),0),s=(n=i.mergedMaterials)==null?void 0:n.reduce((l,{textureSize:c})=>Math.max(l,(c==null?void 0:c.height)||0),0),u=-1;for(let l of i.mergedMaterials)if(l.textureSize){let c=u+1+l.textureSize.width/o*2**(Uint16Array.BYTES_PER_ELEMENT*8)-1;l.uvRegion=new Uint16Array([u+1,0,c,l.textureSize.height/s*2**(Uint16Array.BYTES_PER_ELEMENT*8)-1]),u=c}i.texture.image.width=o,i.texture.image.height=s}for(let o of a.reverse())e.splice(o,1);r.push(i)}return r.length||r.push({material:Xat(),mergedMaterials:[{originalMaterialId:"default"}]}),r}async function Kat(e,r){var t,n;if(((t=e.texture)==null?void 0:t.bufferView)&&((n=r.texture)==null?void 0:n.bufferView)&&e.mergedMaterials&&r.mergedMaterials){let i=Buffer.from(e.texture.bufferView.data),a=Buffer.from(r.texture.bufferView.data);try{let{joinImages:o}=await import("join-images"),s=await o([i,a],{direction:"horizontal"});e.texture.bufferView.data=await s.toFormat(e.texture.mimeType==="image/png"?"png":"jpeg").toBuffer()}catch(o){throw console.log("Join images into a texture atlas has failed. Consider usage `--split-nodes` option. (See documentation https://loaders.gl/modules/tile-converter/docs/cli-reference/tile-converter)"),o}e.material.pbrMetallicRoughness.baseColorTexture.textureSetDefinitionId=1}return e.mergedMaterials=e.mergedMaterials.concat(r.mergedMaterials),e}function Yat(e){var i,a,o,s,u;let r={doubleSided:e.doubleSided,emissiveFactor:(i=e.emissiveFactor)==null?void 0:i.map(l=>Math.round(l*255)),alphaMode:$at(e.alphaMode),pbrMetallicRoughness:{roughnessFactor:((a=e==null?void 0:e.pbrMetallicRoughness)==null?void 0:a.roughnessFactor)||Sat,metallicFactor:((o=e==null?void 0:e.pbrMetallicRoughness)==null?void 0:o.metallicFactor)||Aat}},t;((s=e==null?void 0:e.pbrMetallicRoughness)==null?void 0:s.baseColorTexture)?(t=e.pbrMetallicRoughness.baseColorTexture.texture.source,r.pbrMetallicRoughness.baseColorTexture={textureSetDefinitionId:0}):e.emissiveTexture&&(t=e.emissiveTexture.texture.source,r.pbrMetallicRoughness.baseColorTexture={textureSetDefinitionId:0}),e.id=Number.isFinite(e.id)?e.id:jf();let n=[{originalMaterialId:e.id}];if(t)n[0].textureSize={width:t.image.width,height:t.image.height};else{let l=(u=e==null?void 0:e.pbrMetallicRoughness)==null?void 0:u.baseColorFactor;r.pbrMetallicRoughness.baseColorFactor=l&&l.map(c=>Math.round(c*255))||void 0}return{material:r,texture:t,mergedMaterials:n}}function $at(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend";default:return"opaque"}}function Xat(){return{alphaMode:"opaque",pbrMetallicRoughness:{metallicFactor:1,roughnessFactor:1}}}function Jat(e,r){let t={};if(!e||!e.length)return t;t.materialDefinitionInfos=[];for(let n of e){let{materialDefinitionInfo:i,textureDefinitionInfo:a}=Qat(n,r);t.materialDefinitionInfos.push(i),a&&(t.textureDefinitionInfos=t.textureDefinitionInfos||[],t.textureDefinitionInfos.push(a))}return t}function Qat(e,r){var s;let t=((s=e==null?void 0:e.pbrMetallicRoughness)==null?void 0:s.baseColorTexture)||e.emissiveTexture,n=null;t&&(n=eot(t.texture,r));let{baseColorFactor:i,metallicFactor:a}=(e==null?void 0:e.pbrMetallicRoughness)||{},o=i;return(!i||i[3]===0)&&e.emissiveFactor&&(o=e.emissiveFactor,o[3]=o[3]||1),{materialDefinitionInfo:Zat(o||[1,1,1,1],a),textureDefinitionInfo:n}}function Zat(e,r=1){let t=.04/255,n=new cu.Vector4(0,0,0,1),i=new cu.Vector4(1,1,1,1),a=new cu.Vector4(t,t,t,0),o=new cu.Vector4(e),s=i.subtract(a).multiply(o),u=s.lerp(s,n,r);a[3]=1;let l=a.lerp(a,o,r);return{params:{diffuse:u.toArray(),specular:l.toArray(),renderMode:"solid"}}}function eot(e,r){var t,n,i,a;return{encoding:((t=e==null?void 0:e.source)==null?void 0:t.mimeType)?[e.source.mimeType]:void 0,images:[{id:rot(e,r),size:(n=e.source)==null?void 0:n.image.width,length:((i=e.source)==null?void 0:i.image.data.length)?[(a=e.source)==null?void 0:a.image.data.length]:void 0}]}}function rot(e,r){var b;let{width:t,height:n}=((b=e.source)==null?void 0:b.image)||{};if(!t||!n)return"";let i=1,a=0,o=r+1,s=32-o.toString(2).length,u="0".repeat(s).concat(o.toString(2)),l=i<<28,c=a<<24,f=t-1<<12,d=n-1<<0,p=l+c+f+d;return BigInt(`0b${p.toString(2)}${u}`).toString()}function tot(e,r,t,n){let i=not(e,n,t);LBe(r,i),LBe(e,i)}function not(e,r,t){let n={};for(let i=0;i<e.length;i++){let a=e[i],o=aot(i,r,t);n[a.toString()]=o}return n}function iot(e,r){let t="";for(let n in e)t+=e[n][r];return t}function aot(e,r,t){let n=iot(r,e),i=(0,PBe.default)(n);return t.includes(i)?t.indexOf(i):t.push(i)-1}function LBe(e,r){for(let t=0;t<e.length;t++)e[t]=r[e[t]]}function oot(e,r,t){let n=[],a=CBe(e,r)?TBe(e,r):r,o=oe({OBJECTID:e},a);for(let s in o){let u=uot(s,t),l=o[s],c=sot(u,l);n.push(c)}return n}function sot(e,r){let t;switch(e){case Oat:case Dat:t=lot(r);break;case kat:t=cot(r);break;case Cat:t=qBe(r);break;default:t=qBe(r)}return t}function uot(e,r){return r.find(n=>n.name===e).attributeValues.valueType}function lot(e){let r=new Uint32Array([e.length]),t=new Uint32Array(e);return Kl(r.buffer,t.buffer)}function cot(e){let r=new Uint32Array([e.length]),t=new Uint8Array(4),n=new Float64Array(e);return Kl(r.buffer,t.buffer,n.buffer)}function qBe(e){let r=new Uint32Array([e.length]),t=0,n=new Uint32Array(e.length),i=[];for(let o=0;o<e.length;o++){let s=`${String(e[o])}\0`,u=Buffer.from(s),l=u.length;t+=l,n[o]=l,i.push(u)}let a=new Uint32Array([t]);return Kl(r.buffer,a.buffer,n.buffer,...i)}function fot(e){let r=new BigUint64Array(e.length);for(let t=0;t<e.length;t++)r[t]=BigInt(e[t]);return r}async function dot(e,r,t,n){let{positions:i,normals:a,texCoords:o,colors:s,uvRegions:u,featureIds:l,faceRange:c}=t,f=new Uint32Array(e);for(let v=0;v<f.length;v++)f.set([v],v);let d=new Uint32Array(r.featureIndices.length?r.featureIndices:e),p=pot(d,c),h={positions:i,normals:a,colors:s,"feature-index":p};o.length&&(h.texCoords=o);let b={"feature-index":{"i3s-attribute-type":"feature-index","i3s-feature-ids":new Int32Array(l)}};return u.length&&(h["uv-region"]=u,b["uv-region"]={"i3s-attribute-type":"uv-region"}),xb({attributes:h,indices:f},uU,ze(oe({},uU.options),{reuseWorkers:!0,_nodeWorkers:!0,modules:n,useLocalLibraries:!0,draco:{method:"MESH_SEQUENTIAL_ENCODING",attributesMetadata:b},["draco-writer"]:{workerUrl:"./modules/draco/dist/draco-writer-worker-node.js"}}))}function pot(e,r){let t=new Uint32Array(e.length),n=0,i=0;for(let a=1;a<r.length;a+=2){let o=(r[a]+1)*rl;t.fill(n,i,o),n++,i=o+1}return t}function NBe(e,r){if(!e)return null;let t=e==null?void 0:e.batchTableJson;if(t)return t;let{extensionName:n,extension:i}=hot(e);switch(n){case Mw:return console.warn("The I3S converter does not yet support the EXT_mesh_features extension"),null;case Sh:return mot(i,r);default:return null}}function hot(e){var a,o,s,u;let r=[Sh,Mw];if(!((a=e==null?void 0:e.gltf)==null?void 0:a.extensionsUsed))return{extensionName:null,extension:null};let n="";for(let l of((o=e==null?void 0:e.gltf)==null?void 0:o.extensionsUsed)||[])if(r.includes(l)){n=l;break}if(!n)return{extensionName:null,extension:null};let i=(u=(s=e==null?void 0:e.gltf)==null?void 0:s.extensions)==null?void 0:u[n];return{extensionName:n,extension:i}}function mot(e,r){var t;if(e==null?void 0:e.featureTables){let n=(t=Object.keys(e.featureTables))==null?void 0:t[0];if(n){let i=e==null?void 0:e.featureTables[n],a={};for(let o in i.properties)a[o]=i.properties[o].data;return a}}if(e==null?void 0:e.featureTextures){let n;for(let i in e.featureTextures)e.featureTextures[i].class===r&&(n=i);if(typeof n=="string"){let i=e==null?void 0:e.featureTextures[n],a={};for(let o in i.properties)a[o]=i.properties[o].data;return a}}return console.warn("The I3S converter couldn't handle EXT_feature_metadata extension: There is neither featureTables, no featureTextures in the extension."),null}var GBe=$e(Zu()),zBe=$e(require("path"));var UBe=()=>({serviceItemId:{path:"serviceItemId"},serviceName:{path:"layerName"},name:{path:"layerName"},currentVersion:{path:"currentVersion",default:10.7},serviceVersion:{path:"serviceVersion",default:"1.8"},supportedBindings:{path:"supportedBindings",default:["REST"]},layers:{path:"layers0",transform:e=>[e]}});async function HBe(e,r,t){let n={serviceItemId:jf().replace(/-/gi,""),layerName:e,layers0:r},i=(0,GBe.default)(n,UBe()),a=(0,zBe.join)(t,"SceneServer");await Gi(a,JSON.stringify(i))}var tY=16;function WBe(e,r){let t=[],n=e.boundingVolume,i=e.lodMetricValue||.1,a={metricType:"maxScreenThreshold",maxError:r.mbs[3]*2*tY/i},o={metricType:"maxScreenThresholdSQ",maxError:Math.PI*.25*a.maxError*a.maxError};return n.constructor.name==="OrientedBoundingBox"?(t.push(o),t.push(a)):(t.push(a),t.push(o)),t}function nY(e){var n,i;let r=(n=e.lodSelection)==null?void 0:n.find(a=>a.metricType==="maxScreenThreshold"),t=r==null?void 0:r.maxError;if(!t){let a=(i=e.lodSelection)==null?void 0:i.find(o=>o.metricType==="maxScreenThresholdSQ");a&&(t=Math.sqrt(a.maxError/(Math.PI*.25)))}return t||(t=tY),e.mbs[3]*2*tY/t}var i5e=$e(n5e()),qot="4.0.0-alpha.21",o4={name:"PGM - Netpbm grayscale image format",id:"pgm",module:"tile-converter",version:qot,mimeTypes:["image/x-portable-graymap"],parse:async(e,r)=>(0,i5e.parsePGM)(new Uint8Array(e),r),extensions:["pgm"],options:{cubic:!1}};var bx=$e(Zu());var a5e={id:{path:"id",transform:e=>e.toUpperCase()},profile:{path:"profile",default:"meshpyramids"},version:{path:"version",default:"1.8"},resourcePattern:{path:"resourcePattern",default:["3dNodeIndexDocument","Attributes","SharedResource","Geometry"]},rootNode:{path:"rootNode",default:"./nodes/root"},extent:{path:"extent"},indexCRS:{path:"indexCRS",default:"http://www.opengis.net/def/crs/EPSG/0/4326"},vertexCRS:{path:"vertexCRS",default:"http://www.opengis.net/def/crs/EPSG/0/4326"},normalReferenceFrame:{path:"normalReferenceFrame",default:"east-north-up"},attributeEncoding:{path:"attributeEncoding",default:"application/octet-stream; version=1.6"},textureEncoding:{path:"textureEncoding",default:["image/jpeg","image/ktx2"]},lodType:{path:"lodType",default:"MeshPyramid"},lodModel:{path:"lodModel",default:"node-switching"},defaultGeometrySchema:{path:"defaultGeometrySchema",default:{geometryType:"triangles",header:[{property:"vertexCount",type:"UInt32"},{property:"featureCount",type:"UInt32"}],topology:"PerAttributeArray",ordering:["position","normal","uv0","color"],vertexAttributes:{position:{valueType:"Float32",valuesPerElement:3},normal:{valueType:"Float32",valuesPerElement:3},uv0:{valueType:"Float32",valuesPerElement:2},color:{valueType:"UInt8",valuesPerElement:4}},featureAttributeOrder:["id","faceRange"],featureAttributes:{id:{valueType:"UInt64",valuesPerElement:1},faceRange:{valueType:"UInt32",valuesPerElement:2}}}}};var Not=()=>({wkid:{path:"wkid",default:4326},latestWkid:{path:"latestWkid",default:4326},vcsWkid:{path:"vcsWkid",default:5773},latestVcsWkid:{path:"latestVcsWkid",default:5773}}),Uot=()=>({heightModel:{path:"heightModel",default:"gravity_related_height"},vertCRS:{path:"vertCRS",default:"EGM96_Geoid"},heightUnit:{path:"heightUnit",default:"meter"}}),Got=()=>({nodesPerPage:{path:"nodesPerPage"},lodSelectionMetricType:{path:"lodSelectionMetricType",default:"maxScreenThresholdSQ"}}),zot=()=>({xmin:{path:"xmin"},ymin:{path:"ymin"},xmax:{path:"xmax"},ymax:{path:"ymax"},zmin:{path:"zmin"},zmax:{path:"zmax"}}),o5e=()=>({version:{path:"version",transform:e=>e.toUpperCase()},id:{path:"id",default:0},name:{path:"name"},href:{path:"href",default:"./layers/0"},layerType:{path:"layerType",default:"IntegratedMesh"},spatialReference:{path:"spatialReference",transform:e=>(0,bx.default)(e,Not())},capabilities:{path:"capabilities",default:["View","Query"]},store:{path:"store",transform:e=>(0,bx.default)(e,a5e)},fullExtent:{path:"fullExtent",transform:e=>(0,bx.default)(e,zot())},heightModelInfo:{path:"heightModelInfo",transform:e=>(0,bx.default)(e,Uot())},nodePages:{path:"nodePages",transform:e=>(0,bx.default)(e,Got())},materialDefinitions:{path:"materialDefinitions",default:[]},textureSetDefinitions:{path:"textureSetDefinitions",default:[]},geometryDefinitions:{path:"geometryDefinitions",default:[]},attributeStorageInfo:{path:"attributeStorageInfo",default:[]},fields:{path:"fields",default:[]},popupInfo:{path:"popupInfo",default:null}});var uY=$e(Zu()),Hot=()=>({offset:{default:8},position:{default:{type:"Float32",component:3}},normal:{default:{type:"Float32",component:3}},uv0:{path:"hasTexture",transform:e=>e&&{type:"Float32",component:2}||!1,omitValues:[!1]},color:{default:{type:"UInt8",component:4}},uvRegion:{path:"hasUvRegions",transform:e=>e&&{type:"UInt16",component:4}||!1,omitValues:[!1]},featureId:{default:{binding:"per-feature",type:"UInt64",component:1}},faceRange:{default:{binding:"per-feature",type:"UInt32",component:2}}}),Wot=()=>({"compressedAttributes.encoding":{default:"draco"},"compressedAttributes.attributes":{path:"geometryConfig",transform:e=>{let r=["position","normal"];return e.hasTexture&&r.push("uv0"),r.push("color"),e.hasUvRegions&&r.push("uv-region"),r.push("feature-index"),r}}}),s5e=()=>({geometryBuffers:{path:"geometryConfig",transform:e=>{let r=[(0,uY.default)(e,Hot())];return e.draco&&r.push((0,uY.default)({geometryConfig:e},Wot())),r}}});var Nw=$e(Zu()),Vot=()=>({renderMode:{path:"renderMode",default:"solid"},shininess:{path:"shininess",default:1},reflectivity:{path:"reflectivity",default:0},ambient:{path:"ambient",default:[1,1,1]},diffuse:{path:"diffuse",default:[1,1,1]},specular:{path:"specular",default:[0,0,0]},useVertexColorAlpha:{path:"useVertexColorAlpha",default:!1},vertexRegions:{path:"vertexRegions",default:!1},vertexColors:{path:"vertexColors",default:!0}}),Kot=()=>({name:{path:"name",default:"standard"},type:{path:"type",default:"standard"},params:{path:"params",transform:(e,r,t)=>(0,Nw.default)(t,Vot())}}),Yot=()=>({id:{path:"id"},size:{path:"size"},href:{path:"href",default:["../textures/0"]},length:{path:"length"}}),$ot=()=>({encoding:{path:"encoding"},wrap:{path:"wrap",default:["none"]},atlas:{path:"atlas",default:!1},uvSet:{path:"uvSet",default:"uv0"},channels:{path:"channels",default:"rgb"},images:{path:"images",transform:(e,r,t)=>e.map(n=>(0,Nw.default)(n,Yot()))}}),u5e=()=>({materialDefinitions:{path:"materialDefinitionInfos",transform:Xot},textureDefinitions:{path:"textureDefinitionInfos",transform:Jot}});function Xot(e,r,t){let n={};for(let[i,a]of e.entries())n[`Mat${t.nodePath}${i}`]=(0,Nw.default)(a,Kot());return n}function Jot(e,r,t){if(!e)return null;let n={};for(let[i,a]of e.entries()){let o=`${t.nodePath}${i}`;a.imageIndex=o,n[o]=(0,Nw.default)(a,$ot())}return n}var s4=$e(U0()),l5e=$e(Xt()),lY=$e(Gs()),Qot=new Float32Array([-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1]);function c5e(e){var t,n;if(!((t=e==null?void 0:e.parentNode)==null?void 0:t.obb)||!((n=e==null?void 0:e.parentNode)==null?void 0:n.mbs))return[];let r=[];return Zot(r,e),est(r,e),r}function Zot(e,r){var o;let t=rst(r.parentNode.obb),n=tst(r);if(nst(t,n))return;let a=`OBB of Tile (${r.id}) doesn't fit into Parent (${(o=r.parentNode)==null?void 0:o.id}) tile OBB`;e.push(a)}function est(e,r){var a;let t=f5e(r.mbs),n=f5e(r.parentNode.mbs);if(t.center.distanceTo(n.center)+t.radius>n.radius){let o=`MBS of Tile (${r.id}) doesn't fit into Parent (${(a=r.parentNode)==null?void 0:a.id}) tile MBS`;e.push(o)}}function f5e(e){return new s4.BoundingSphere([e[0],e[1],e[2]],e[3])}function rst(e){let{center:r,halfSize:t,quaternion:n}=e;return new s4.OrientedBoundingBox().fromCenterHalfSizeQuaternion(r,t,n)}function tst(e){let r=e.obb.halfSize,t=Qot,n=lY.Ellipsoid.WGS84.cartographicToCartesian(e.obb.center),i=[];for(let a=0;a<t.length;a+=3){let s=new l5e.Vector3(t[a]*=r[0],t[a+1]*=r[1],t[a+2]*=r[2]).transformByQuaternion(e.obb.quaternion).add(n);i=i.concat(s)}return i}function nst(e,r){let t=!0;for(let n=0;n<r.length/3;n+=3){let i=[r[n],r[n+1],r[n+2]],a=lY.Ellipsoid.WGS84.cartesianToCartographic(i);if(e.distanceTo(a)>0){t=!1;break}}return t}var fs;(function(s){s.POINTS="POINTS",s.LINES="LINES",s.LINE_LOOP="LINE_LOOP",s.LINE_STRIP="LINE_STRIP",s.TRIANGLES="TRIANGLES",s.TRIANGLE_STRIP="TRIANGLE_STRIP",s.TRIANGLE_FAN="TRIANGLE_FAN"})(fs||(fs={}));var cY=class extends Array{enqueue(r){this.push(r)}dequeue(){return this.shift()}peek(){return this[0]}isEmpty(){return this.length===0}};var d5e=$e(require("process")),ist=4*1024*1024*1024,Uw=class extends cY{constructor(r=2e3,t=400){super();this.writePromise=null;this.fileMap={};this.listeningInterval=r,this.writeConcurrency=t}async enqueue(r,t=!1){if(t){let{archiveKey:n,writePromise:i}=r,a=await i();n&&a&&(this.fileMap[n]=a)}else super.enqueue(r),d5e.default.memoryUsage().rss>ist&&await this.startWrite()}startListening(){this.intervalId=setInterval(this.startWrite.bind(this),this.listeningInterval)}stopListening(){this.intervalId&&clearInterval(this.intervalId)}async startWrite(){this.writePromise||(this.writePromise=this.doWrite()),await this.writePromise,this.writePromise=null}async finalize(){this.stopListening(),await this.startWrite()}async doWrite(){for(;this.length;){let r=[],t=[];for(let i=0;i<this.writeConcurrency;i++){let a=this.dequeue();if(!a)break;let{archiveKey:o,writePromise:s}=a;t.push(o);let u=s();r.push(u)}let n=await Promise.allSettled(r);this.updateFileMap(t,n)}}updateFileMap(r,t){for(let n=0;n<r.length;n++){let i=r[n];i&&"value"in t[n]&&(this.fileMap[i]=t[n].value)}}};var dY=$e(require("path")),pY=$e(Zu());var p5e=$e(Zu()),h5e=()=>({mbs:{path:"mbs"},obb:{path:"obb"}}),ast=()=>({href:{path:"href"}}),ost=()=>oe(oe({id:{path:"id"}},ast()),h5e()),fY=()=>ze(oe({version:{path:"version"},id:{path:"id"},path:{path:"path"},level:{path:"level"}},h5e()),{lodSelection:{path:"lodSelection",default:[{metricType:"maxScreenThresholdSQ",maxError:196349.54374999998},{metricType:"maxScreenThreshold",maxError:999.9999999999999}]},children:{path:"children",default:null},neighbors:{path:"neighbors",default:null},parentNode:{path:"parentNode",transform:e=>(0,p5e.default)(e,ost()),default:null},sharedResource:{path:"sharedResource",default:null},featureData:{path:"featureData",default:null},geometryData:{path:"geometryData",default:null},textureData:{path:"textureData",default:null},attributeData:{path:"attributeData",default:null}});var _c=class{constructor(r,t){this.data=null;this.children=[];this._finalized=!1;this.inPageId=r,this.id=r===0?"root":r.toString(),this.converter=t}get finalized(){return this._finalized}async addData(r){return this.converter.options.instantNodeWriting?await this.write(r):this.data=r,this}async addChildren(r){let t=[];for(let i of r){let a=await i.load();t.push({id:i.id,href:`../${i.id}`,obb:a.obb,mbs:a.mbs})}this.children=this.children.concat(r);let n=this.data;this.converter.options.instantNodeWriting&&(n=await this.load()),n&&(n.children=n.children??[],n.children=n.children.concat(t)),this.converter.options.instantNodeWriting&&n&&await this.write(n)}async addNeighbors(){var t;if(this.finalized)return;let r=await this.load();for(let n of this.children){let i=await n.load();if(i.neighbors=i.neighbors??[],Number((t=r==null?void 0:r.children)==null?void 0:t.length)<1e3)for(let a of r.children||[])n.id!==a.id&&i.neighbors.push(oe({},a));else console.warn(`Node ${n.id}: neighbors attribute is omited because of large number of neigbors`),delete i.neighbors;this.converter.options.instantNodeWriting&&i&&await n.write(i),await n.save()}this.finalize()}async save(){this.data&&await this.write(this.data)}finalize(){this._finalized=!0;for(let r of this.children)r.flush()}async write(r){let t=(0,dY.join)(this.converter.layers0Path,"nodes",this.id);this.converter.options.slpk?await this.converter.writeQueue.enqueue({archiveKey:`nodes/${this.id}/3dNodeIndexDocument.json.gz`,writePromise:()=>xc(t,JSON.stringify(r),"3dNodeIndexDocument.json",!0,this.converter.compressList)},!0):await this.converter.writeQueue.enqueue({writePromise:()=>Gi(t,JSON.stringify(r))},!0)}async load(){if(this.data)return this.data;let r=this.id,t=(0,dY.join)(this.converter.layers0Path,"nodes",r),n="index.json";return this.converter.options.slpk&&(n="3dNodeIndexDocument.json"),await JF(t,n)}flush(){this.data=null}static async createRootNode(r,t){let n=_c.createRootNodeIndexDocument(r);return await new _c(0,t).addData(n)}static async createNode(r,t,n,i,a,o){let s=await _c.createNodeIndexDocument(r,t,n,i,a);return await new _c(i.index,o).addData(s)}static createRootNodeIndexDocument(r){let t=ze(oe({version:`{${jf().toUpperCase()}}`,id:"root",level:0,lodSelection:[{metricType:"maxScreenThresholdSQ",maxError:0},{metricType:"maxScreenThreshold",maxError:0}]},r),{children:[]});return(0,pY.default)(t,fY())}static async createNodeIndexDocument(r,t,n,i,a){var d,p;let{texture:o,attributes:s}=a,u=i.index,l=await r.load(),c=ze(oe({version:l.version,id:u.toString(),level:l.level+1},t),{lodSelection:n,parentNode:{id:r.id,href:`../${r.id}`,mbs:l.mbs,obb:l.obb},children:[],neighbors:[]}),f=(0,pY.default)(c,fY());if(i.mesh&&(f.geometryData=[{href:"./geometries/0"}],f.sharedResource={href:"./shared"},o&&(f.textureData=[{href:"./textures/0"},{href:"./textures/1"}]),s&&s.length&&((p=(d=r.converter.layers0)==null?void 0:d.attributeStorageInfo)==null?void 0:p.length))){f.attributeData=[];for(let h=0;h<s.length;h++){let b=r.converter.layers0.attributeStorageInfo[h].key;f.attributeData.push({href:`./attributes/${b}/0`})}}return f}};var hY=async(e,r,t)=>{let n=r.type==="json";if(!e||!r.contentUrl||!n)return;let i=ze(oe({},t),{[e.loader.id]:{isTileset:n,assetGltfUpAxis:e.asset&&e.asset.gltfUpAxis||"Y"}}),a=await un(r.contentUrl,e.loader,i);a.root&&(r.children=[a.root])},mY=async(e,r,t)=>{let n=r.type==="json";if(!e||!r.contentUrl||n)return null;let i=ze(oe({},t),{[e.loader.id]:ze(oe({},t[e.loader.id]||{}),{isTileset:n,assetGltfUpAxis:e.asset&&e.asset.gltfUpAxis||"Y"})});return await un(r.contentUrl,e.loader,i)};var vY=$e(Xt());var u4=async(e,r,t,n,i,a=0)=>{if(i&&a>i)return;let o=[],s=await t(e,r);o.push(s);for(let u of e.children)await u4(u,s,t,n,i,a+1);n&&await n(o,r)};var sst=[fs.POINTS,fs.LINES,fs.LINE_LOOP,fs.LINE_STRIP,fs.TRIANGLES,fs.TRIANGLE_STRIP,fs.TRIANGLE_FAN],m5e=async e=>{let r={meshTopologyTypes:new Set,metadataClasses:new Set};if(!(e==null?void 0:e.gltfArrayBuffer))return r;let n=(await Jo(e.gltfArrayBuffer,_f,{gltf:{normalize:!1,loadBuffers:!1,loadImages:!1,decompressMeshes:!1}})).json;if(!n)return r;let i=ust(n),a=lst(n);return{meshTopologyTypes:i,metadataClasses:a}},ust=e=>{let r=new Set;for(let t of e.meshes||[])for(let n of t.primitives){let{mode:i}=n;typeof i!="number"&&(i=4),r.add(sst[i])}return r},lst=e=>{var n,i,a;let r=new Set,t=(a=(i=(n=e.extensions)==null?void 0:n[Sh])==null?void 0:i.schema)==null?void 0:a.classes;if(t)for(let o of Object.keys(t))r.add(o);return r},g5e=(e,r)=>{for(let t of r.meshTopologyTypes)e.meshTopologyTypes.add(t);for(let t of r.metadataClasses)e.metadataClasses.add(t)};var b5e,cst=(b5e=Mm.default.env)==null?void 0:b5e.IonToken,v5e=64,fst="3DTILES",dst="3DObject",pst=1800,hst="https://",Gw=class{constructor(){this.boundingVolumeWarnings=[];this.conversionStartTime=[0,0];this.refreshTokenTime=[0,0];this.sourceTileset=null;this.loadOptions={_nodeWorkers:!0,reuseWorkers:!0,useLocalLibraries:!0,basis:{format:"rgba32",workerUrl:"./modules/textures/dist/basis-worker-node.js"},draco:{workerUrl:"./modules/draco/dist/draco-worker-node.js"},fetch:{},modules:{}};this.geoidHeightModel=null;this.Loader=Sf;this.workerSource={};this.writeQueue=new Uw;this.compressList=null;this.preprocessData={meshTopologyTypes:new Set,metadataClasses:new Set};this.nodePages=new qo(Gi,v5e,this),this.options={},this.layers0Path="",this.materialMap=new Map,this.materialDefinitions=[],this.geometryMap=new Map,this.geometryConfigs=[],this.vertexCounter=0,this.layers0=null,this.featuresHashArray=[],this.refinementCounter={tilesCount:0,tilesWithAddRefineCount:0},this.validate=!1,this.generateTextures=!1,this.generateBoundingVolumes=!1,this.layersHasTexture=!1,this.compressList=null}async convert(r){if(wi)return console.log(vx),vx;this.conversionStartTime=Mm.default.hrtime();let{tilesetName:t,slpk:n,egmFilePath:i,inputUrl:a,validate:o,outputPath:s,draco:u=!0,sevenZipExe:l,maxDepth:c,token:f,generateTextures:d,generateBoundingVolumes:p,instantNodeWriting:h=!1,mergeMaterials:b=!0,inquirer:v,metadataClass:y}=r;this.options={maxDepth:c,slpk:n,sevenZipExe:l,egmFilePath:i,draco:u,token:f,inputUrl:a,instantNodeWriting:h,mergeMaterials:b,inquirer:v,metadataClass:y},this.compressList=this.options.instantNodeWriting&&[]||null,this.validate=Boolean(o),this.Loader=a.indexOf(hst)!==-1?lO:Sf,this.generateTextures=Boolean(d),this.generateBoundingVolumes=Boolean(p),this.writeQueue=new Uw,this.writeQueue.startListening(),console.log("Loading egm file..."),this.geoidHeightModel=await un(i,o4),console.log("Loading egm file completed!"),n&&this.nodePages.useWriteFunction(xc);try{let w=await this._fetchPreloadOptions(),A=a;w.url&&(A=w.url),w.headers&&(this.loadOptions.fetch={headers:w.headers}),this.sourceTileset=await un(A,this.Loader,this.loadOptions),await this.preprocessConversion()&&(await this._createAndSaveTileset(s,t),await this._finishConversion({slpk:Boolean(n),outputPath:s,tilesetName:t}))}catch(w){throw w}finally{await this.writeQueue.finalize(),Mi.getWorkerFarm({}).destroy()}return"success"}async preprocessConversion(){var i;console.log("Analyze source tileset");let r=this.sourceTileset.root;await u4(r,null,this.analyzeTile.bind(this),void 0,this.options.maxDepth);let{meshTopologyTypes:t,metadataClasses:n}=this.preprocessData;if(console.log("------------------------------------------------"),console.log("Preprocess results:"),console.log(`glTF mesh topology types: ${Array.from(t).join(", ")}`),n.size?console.log(`Feature metadata classes have been found: ${Array.from(n).join(", ")}`):console.log("Feature metadata classes have not been found"),console.log("------------------------------------------------"),!t.has(fs.TRIANGLES)&&!t.has(fs.TRIANGLE_STRIP))return console.log("The tileset is of unsupported mesh topology types. The conversion will be interrupted."),console.log("------------------------------------------------"),!1;if(n.size>1)if((i=this.options.metadataClass)==null?void 0:i.length)console.log(`${this.options.metadataClass} has been selected`);else if(this.options.inquirer){let a=await this.options.inquirer.prompt([{name:"metadataClass",type:"list",message:"Select feature metadata data class to convert...",choices:Array.from(n)}]);this.options.metadataClass=a.metadataClass,console.log(`${a.metadataClass} has been selected`)}else return console.log(`A feature metadata class has not been selected. Start the converter with option "--metadata-class". For example, "npx tile-converter ... --metadata-class ${Array.from(n)[0]}"`),console.log("------------------------------------------------"),!1;return!0}async analyzeTile(r,t){if(r.type==="json")return await hY(this.sourceTileset,r,this.loadOptions),null;r.id&&console.log(`[analyze]: ${r.id}`);let n=null;try{n=await mY(this.sourceTileset,r,ze(oe({},this.loadOptions),{"3d-tiles":ze(oe({},this.loadOptions["3d-tiles"]),{loadGLTF:!1})}))}catch{console.log(`[warning]: Failed to load ${r.contentUrl}. An I3S tile with empty content will be added to the output tileset`)}let i=await m5e(n);return g5e(this.preprocessData,i),null}async _createAndSaveTileset(r,t){var u,l,c;let n=(0,to.join)(`${r}`,`${t}`);try{await Pw(n)}catch{}this.layers0Path=(0,to.join)(n,"SceneServer","layers","0"),this.materialDefinitions=[],this.materialMap=new Map;let i=this.sourceTileset.root,a=Rk(i.boundingVolume,new vY.Matrix4(i.transform),null);this._formLayers0(t,a,(c=(l=(u=this.sourceTileset)==null?void 0:u.root)==null?void 0:l.boundingVolume)==null?void 0:c.region);let o=XK(a,this.geoidHeightModel);await this.nodePages.push({index:0,lodThreshold:0,obb:o.obb,children:[]});let s=await _c.createRootNode(o,this);await u4(i,{transform:new vY.Matrix4(i.transform),parentNodes:[s]},this.convertTile.bind(this),this.finalizeTile.bind(this),this.options.maxDepth),this.layers0.materialDefinitions=this.materialDefinitions,this.layers0.geometryDefinitions=(0,l4.default)(this.geometryConfigs.map(f=>({geometryConfig:ze(oe({},f),{draco:this.options.draco})})),s5e()),this.layersHasTexture===!1&&(this.layers0.store.defaultGeometrySchema.ordering=this.layers0.store.defaultGeometrySchema.ordering.filter(f=>f!=="uv0")),await this._writeLayers0(),HBe(t,this.layers0,n);for(let f of this.compressList||[])await XF(f),await $K(f);await this.nodePages.save(),await this.writeQueue.finalize(),await this._createSlpk(n)}_formLayers0(r,t,n){var s;if(!((s=this.sourceTileset)==null?void 0:s.root))return;let i=yBe(t);n&&(i.zmin=n[4],i.zmax=n[5]);let a=[i.xmin,i.ymin,i.xmax,i.ymax],o={version:`{${jf().toUpperCase()}}`,id:0,name:r,href:"./layers/0",store:{id:`{${jf().toUpperCase()}}`,extent:a},nodePages:{nodesPerPage:v5e},compressGeometry:this.options.draco,fullExtent:i};this.layers0=(0,l4.default)(o,o5e())}async _writeLayers0(){this.options.slpk?await this.writeQueue.enqueue({archiveKey:"3dSceneLayer.json.gz",writePromise:()=>xc(this.layers0Path,JSON.stringify(this.layers0),"3dSceneLayer.json")}):await this.writeQueue.enqueue({writePromise:()=>Gi(this.layers0Path,JSON.stringify(this.layers0))})}async _createSlpk(r){if(this.options.slpk){let t=(0,to.join)(r,"SceneServer","layers","0"),n=`${r}.slpk`;await dBe(t,n,0,".",this.options.sevenZipExe);try{await Pw(r)}catch{}}}async convertTile(r,t){if(r.type==="json"||r.type==="empty")return r.type==="json"&&(r.id&&console.log(`[load]: ${r.id}`),await hY(this.sourceTileset,r,this.loadOptions)),t;r.id&&console.log(`[convert]: ${r.id}`);let{parentNodes:n,transform:i}=t,a=i.clone();r.transform&&(a=a.multiplyRight(r.transform));let o=n[0],s=await this._createNode(o,r,a);return await o.addChildren(s),{transform:a,parentNodes:s}}async finalizeTile(r,t){for(let n of r)for(let i of n.parentNodes)await i.addNeighbors();for(let n of t.parentNodes)await n.save()}async _createNode(r,t,n){var p,h;this._checkAddRefinementTypeForTile(t),await this._updateTilesetOptions();let i=null;try{i=await mY(this.sourceTileset,t,this.loadOptions)}catch{console.log(`[warning]: Failed to load ${t.contentUrl}`)}let a=Rk(t.boundingVolume,n,null),o=XK(a,this.geoidHeightModel),s=NBe(i,this.options.metadataClass);s&&!((h=(p=this.layers0)==null?void 0:p.attributeStorageInfo)==null?void 0:h.length)&&this._convertPropertyTableToNodeAttributes(s);let u=await this._convertResources(t,n,a,i,r.inPageId,s),l=[],c=[],f=[],d={geometry:null,compressedGeometry:null,texture:null,hasUvRegions:!1,sharedResources:null,meshMaterial:null,vertexCount:null,attributes:null,featureCount:null,boundingVolumes:null};for(let b of u||[d]){this.layersHasTexture=this.layersHasTexture||Boolean(b.texture),this.generateBoundingVolumes&&b.boundingVolumes&&(o=b.boundingVolumes);let v=WBe(t,o),y=v.find(D=>D.metricType==="maxScreenThresholdSQ")||{maxError:0},w=await this._updateNodeInNodePages(y,o,t,r.inPageId,b),A=await _c.createNodeIndexDocument(r,o,v,w,b),C=await new _c(w.index,this).addData(A);l.push(C),w.mesh&&await this._writeResources(b,C.id),this.validate&&(this.boundingVolumeWarnings=c5e(A),this.boundingVolumeWarnings&&this.boundingVolumeWarnings.length&&console.warn("Bounding Volume Warnings: ",...this.boundingVolumeWarnings)),c.push(w.index),f.push(w)}return l}async _convertResources(r,t,n,i,a,o){var l;if(!this.isContentSupported(r)||!i)return null;let s={center:[],halfSize:[],quaternion:[]};return await rY(i,t,n,async()=>(await this.nodePages.push({index:0,obb:s},a)).index,o,this.featuresHashArray,(l=this.layers0)==null?void 0:l.attributeStorageInfo,this.options.draco,this.generateBoundingVolumes,this.options.mergeMaterials,this.geoidHeightModel,this.loadOptions.modules,this.options.metadataClass)}async _updateNodeInNodePages(r,t,n,i,a){let{meshMaterial:o,texture:s,vertexCount:u,featureCount:l,geometry:c,hasUvRegions:f}=a,d={index:0,lodThreshold:r.maxError,obb:t.obb,children:[]};c&&this.isContentSupported(n)&&(d.mesh={geometry:{definition:this.findOrCreateGeometryDefinition(Boolean(s),f),resource:0},attribute:{resource:0},material:{definition:0}});let p=a.nodeId,h;if(p?h=await this.nodePages.getNodeById(p):h=await this.nodePages.push(d,i),d.mesh||console.log(`[warning]: node ${h.index} is created with empty content`),qo.updateAll(h,d),o&&qo.updateMaterialByNodeId(h,this._findOrCreateMaterial(o)),s){let b=s.image.height*s.image.width;qo.updateTexelCountHintByNodeId(h,b)}return u&&(this.vertexCounter+=u,qo.updateVertexCountByNodeId(h,u)),qo.updateNodeAttributeByNodeId(h),l&&qo.updateFeatureCountByNodeId(h,l),this.nodePages.saveNode(h),h}async _writeResources(r,t){let{geometry:n,compressedGeometry:i,texture:a,sharedResources:o,attributes:s}=r,u=(0,to.join)(this.layers0Path,"nodes",t),l=(0,to.join)("nodes",t);await this._writeGeometries(n,i,u,l),await this._writeShared(o,u,l,t),await this._writeTexture(a,u,l),await this._writeAttributes(s,u,l)}async _writeGeometries(r,t,n,i){if(this.options.slpk){let a=(0,to.join)(n,"geometries");await this.writeQueue.enqueue({archiveKey:`${i}/geometries/0.bin.gz`,writePromise:()=>xc(a,r,"0.bin")})}else{let a=(0,to.join)(n,"geometries/0/");await this.writeQueue.enqueue({writePromise:()=>Gi(a,r,"index.bin")})}if(this.options.draco)if(this.options.slpk){let a=(0,to.join)(n,"geometries");await this.writeQueue.enqueue({archiveKey:`${i}/geometries/1.bin.gz`,writePromise:()=>xc(a,t,"1.bin")})}else{let a=(0,to.join)(n,"geometries/1/");await this.writeQueue.enqueue({writePromise:()=>Gi(a,t,"index.bin")})}}async _writeShared(r,t,n,i){if(!r)return;r.nodePath=i;let a=(0,l4.default)(r,u5e()),o=JSON.stringify(a);if(this.options.slpk){let s=(0,to.join)(t,"shared");await this.writeQueue.enqueue({archiveKey:`${n}/shared/sharedResource.json.gz`,writePromise:()=>xc(s,o,"sharedResource.json")})}else{let s=(0,to.join)(t,"shared/");await this.writeQueue.enqueue({writePromise:()=>Gi(s,o)})}}async _writeTexture(r,t,n){if(r){let i=this._getFormatByMimeType(r==null?void 0:r.mimeType),a=[],o=r.bufferView.data;switch(i){case"jpg":case"png":{if(a.push({name:"0",format:i}),await this.writeTextureFile(o,"0",i,t,n),this.generateTextures){a.push({name:"1",format:"ktx2"});let s=r.image.data.subarray(),u=new Uint8Array(s),l=xb(ze(oe({},r.image),{data:u}),jU,ze(oe({},jU.options),{["ktx2-basis-writer"]:{workerUrl:"./modules/textures/dist/ktx2-basis-writer-worker-node.js"},reuseWorkers:!0,_nodeWorkers:!0,useLocalLibraries:!0}));await this.writeTextureFile(l,"1","ktx2",t,n)}break}case"ktx2":if(a.push({name:"1",format:i}),await this.writeTextureFile(o,"1",i,t,n),this.generateTextures){a.push({name:"0",format:"jpg"});let s=xb(r.image.data[0],SU);await this.writeTextureFile(s,"0","jpg",t,n)}}this.layers0.textureSetDefinitions.length||(this.layers0.textureSetDefinitions.push({formats:a}),this.layers0.textureSetDefinitions.push({formats:a,atlas:!0}))}}async writeTextureFile(r,t,n,i,a){if(this.options.slpk){let o=(0,to.join)(i,"textures"),s=!1;await this.writeQueue.enqueue({archiveKey:`${a}/textures/${t}.${n}`,writePromise:()=>xc(o,r,`${t}.${n}`,s)})}else{let o=(0,to.join)(i,`textures/${t}/`);await this.writeQueue.enqueue({writePromise:()=>Gi(o,r,`index.${n}`)})}}async _writeAttributes(r=[],t,n){var i,a;if((r==null?void 0:r.length)&&((a=(i=this.layers0)==null?void 0:i.attributeStorageInfo)==null?void 0:a.length))for(let o=0;o<r.length;o++){let s=this.layers0.attributeStorageInfo[o].key,u=new Uint8Array(r[o]);if(this.options.slpk){let l=(0,to.join)(t,"attributes",s);await this.writeQueue.enqueue({archiveKey:`${n}/attributes/${s}.bin.gz`,writePromise:()=>xc(l,u,"0.bin")})}else{let l=(0,to.join)(t,`attributes/${s}/0`);await this.writeQueue.enqueue({writePromise:()=>Gi(l,u,"index.bin")})}}}_getFormatByMimeType(r){switch(r){case"image/jpeg":return"jpg";case"image/png":return"png";case"image/ktx2":return"ktx2";default:return"jpg"}}_findOrCreateMaterial(r){let t=(0,gY.default)(JSON.stringify(r));if(this.materialMap.has(t))return this.materialMap.get(t)||0;let n=this.materialDefinitions.push(r)-1;return this.materialMap.set(t,n),n}findOrCreateGeometryDefinition(r,t){let n={hasTexture:r,hasUvRegions:t},i=(0,gY.default)(JSON.stringify(n));if(this.geometryMap.has(i))return this.geometryMap.get(i)||0;let a=this.geometryConfigs.push(n)-1;return this.geometryMap.set(i,a),a}_convertPropertyTableToNodeAttributes(r){let t=0,n=oe({OBJECTID:[0]},r);for(let i in n){let a=n[i][0],o=DBe(i,a),s=kBe(t,i,o),u=OBe(o),l=RBe(i,u),c=FBe(n);this.layers0.attributeStorageInfo.push(s),this.layers0.fields.push(l),this.layers0.popupInfo=c,this.layers0.layerType=dst,t+=1}}async _finishConversion(r){let{tilesCount:t,tilesWithAddRefineCount:n}=this.refinementCounter,i=n?n/t*100:0,a=await e4(r),o=Mm.default.hrtime(this.conversionStartTime),s=ZF(o);console.log("------------------------------------------------"),console.log(`Finishing conversion of ${fst}`),console.log(`Total conversion time: ${s}`),console.log("Vertex count: ",this.vertexCounter),console.log("File(s) size: ",a," bytes"),console.log('Percentage of tiles with "ADD" refinement type:',i,"%"),console.log("------------------------------------------------")}async _fetchPreloadOptions(){if(!this.Loader.preload)return{};let r={"cesium-ion":{accessToken:this.options.token||cst}},t=await this.Loader.preload(this.options.inputUrl,r);return this.refreshTokenTime=Mm.default.hrtime(),oe(oe({},r),t)}async _updateTilesetOptions(){if(Mm.default.hrtime(this.refreshTokenTime)[0]<pst)return;this.refreshTokenTime=Mm.default.hrtime();let t=await this._fetchPreloadOptions();t.headers&&(this.loadOptions.fetch=ze(oe({},this.loadOptions.fetch),{headers:t.headers}),console.log("Authorization Bearer token has been updated"))}_checkAddRefinementTypeForTile(r){let t=1;r.refine===t&&(this.refinementCounter.tilesWithAddRefineCount+=1,console.warn('This tile uses "ADD" type of refinement')),this.refinementCounter.tilesCount+=1}isContentSupported(r){return["b3dm","glTF","scenegraph"].includes(r.type||"")}};var $5e=$e(require("path")),wY=$e(require("process")),X5e=$e(Zu());var yx=$e(y5e());function bY(e){switch(e){case"UInt8":return Uint8Array;case"UInt16":return Uint16Array;case"UInt32":return Uint32Array;case"Float32":return Float32Array;case"UInt64":return Float64Array;default:throw new Error(`parse i3s tile content: unknown type of data: ${e}`)}}var x5e={UInt8:yx.default.UNSIGNED_BYTE,UInt16:yx.default.UNSIGNED_SHORT,Float32:yx.default.FLOAT,UInt32:yx.default.UNSIGNED_INT,UInt64:yx.default.DOUBLE};function xx(e){switch(e){case"UInt8":return 1;case"UInt16":case"Int16":return 2;case"UInt32":case"Int32":case"Float32":return 4;case"UInt64":case"Int64":case"Float64":return 8;default:throw new Error(`parse i3s tile content: unknown size of data: ${e}`)}}var _5e="String",E5e="Oid32",w5e="Float64",S5e="Int16",tl;(function(a){a[a.DEFAULT=-1]="DEFAULT",a[a.LNGLAT=1]="LNGLAT",a[a.METER_OFFSETS=2]="METER_OFFSETS",a[a.LNGLAT_OFFSETS=3]="LNGLAT_OFFSETS",a[a.CARTESIAN=0]="CARTESIAN"})(tl||(tl={}));var Dh=$e(Xt()),f4=$e(Gs());var zw;(function(t){t.vertexCount="vertexCount",t.featureCount="featureCount"})(zw||(zw={}));function Ch(e,r=null){return r?`${e}?token=${r}`:e}function A5e(e,r){let{attributeData:t=[]}=r,n=[];for(let i=0;i<t.length;i++){let a=t[i].href.replace("./","");n.push(`${e}/${a}`)}return n}function T5e(e,r,t){let n=[],{attributeStorageInfo:i=[]}=e;for(let a=0;a<i.length;a++){let o=i[a].key;n.push(`${r}/nodes/${t}/attributes/${o}/0`)}return n}function C5e(e,r){let{attributeName:t,attributeType:n}=r;return t?{[t]:n?gst(n,e):null}:{}}function gst(e,r){switch(e){case _5e:return yst(r);case E5e:return D5e(r);case w5e:return bst(r);case S5e:return vst(r);default:return D5e(r)}}function D5e(e){let r=4;return new Uint32Array(e,r)}function vst(e){let r=4;return new Int16Array(e,r)}function bst(e){let r=8;return new Float64Array(e,r)}function yst(e){let r=0,t=8,n=4,i=[];try{let a=new DataView(e,r,n).getUint32(r,!0),o=new Uint32Array(e,t,a),s=t+a*n;for(let u of o){let l=new TextDecoder("utf-8"),c=new Uint8Array(e,s,u);i.push(l.decode(c)),s+=u}}catch(a){console.error("Parse string attribute error: ",a.message)}return i}var xst="4.0.0-alpha.21";var Hw={name:"I3S Attribute",id:"i3s-attribute",module:"i3s",version:xst,mimeTypes:["application/binary"],parse:async(e,r)=>C5e(e,r),extensions:["bin"],options:{},binary:!0};function k5e(e){return e.hasOwnProperty("objectIds")?"Oid32":e.hasOwnProperty("attributeValues")?e.attributeValues.valueType:""}async function O5e(e,r,t,n,i){var c;if(!((c=i==null?void 0:i.i3s)==null?void 0:c.colorsByAttribute))return e;let a=n.fields.find(({name:f})=>{var d,p;return f===((p=(d=i==null?void 0:i.i3s)==null?void 0:d.colorsByAttribute)==null?void 0:p.attributeName)});if(!a||!["esriFieldTypeDouble","esriFieldTypeInteger","esriFieldTypeSmallInteger"].includes(a.type))return e;let o=await R5e(a.name,t,n,i);if(!o)return e;let s=n.fields.find(({type:f})=>f==="esriFieldTypeOID");if(!s)return e;let u=await R5e(s.name,t,n,i);if(!u)return e;let l={};for(let f=0;f<u[s.name].length;f++)l[u[s.name][f]]=_st(o[a.name][f],i);for(let f=0;f<r.value.length;f++){let d=l[r.value[f]];!d||(i.i3s.colorsByAttribute.mode==="multiply"?d.forEach((p,h)=>{e.value[f*4+h]=e.value[f*4+h]*p/255}):e.value.set(d,f*4))}return e}function _st(e,r){var u;if(!((u=r==null?void 0:r.i3s)==null?void 0:u.colorsByAttribute))return[255,255,255,255];let{minValue:t,maxValue:n,minColor:i,maxColor:a}=r.i3s.colorsByAttribute,o=(e-t)/(n-t),s=[255,255,255,255];for(let l=0;l<i.length;l++)s[l]=Math.round((a[l]-i[l])*o+i[l]);return s}async function R5e(e,{attributeUrls:r},{attributeStorageInfo:t},n){var u;let i=t.findIndex(({name:l})=>e===l);if(i===-1)return null;let a=Ch(r[i],(u=n==null?void 0:n.i3s)==null?void 0:u.token),o=k5e(t[i]);return await un(a,Hw,{attributeName:e,attributeType:o})}var d4=new Dh.Vector3([0,0,0]);function Est(e){switch(e){case"ktx-etc2":case"dds":return Wk;case"ktx2":return H0;case"jpg":case"png":default:return Yb}}var wst="i3s-attribute-type";async function F5e(e,r,t,n,i){var o;let a={attributes:{},indices:null,featureIds:[],vertexCount:0,modelMatrix:new Dh.Matrix4,coordinateSystem:0,byteLength:0,texture:null};if(r.textureUrl){let s=Ch(r.textureUrl,(o=n==null?void 0:n.i3s)==null?void 0:o.token),u=Est(r.textureFormat),c=await(await fetch(s,n==null?void 0:n.fetch)).arrayBuffer();if(n==null?void 0:n.i3s.decodeTextures){if(u===Yb){let f=ze(oe({},r.textureLoaderOptions),{image:{type:"data"}});try{a.texture=await i.parse(c,f)}catch{a.texture=await Jo(c,u,f)}}else if(u===Wk||u===H0){let f=await un(c,u,r.textureLoaderOptions);u===H0&&(f=f[0]),a.texture={compressed:!0,mipmaps:!1,width:f[0].width,height:f[0].height,data:f}}}else a.texture=c}return a.material=Fst(r.materialDefinition,a.texture),a.material&&(a.texture=null),await Sst(e,a,r,t,n)}async function Sst(e,r,t,n,i){var f,d;let a=e.byteLength,o,s,u=0,l=0,c;if(t.isDracoGeometry){let p=await Jo(e,Ub,{draco:{attributeNameEntry:wst}});s=p.header.vertexCount,c=(f=p.indices)==null?void 0:f.value;let{POSITION:h,NORMAL:b,COLOR_0:v,TEXCOORD_0:y,["feature-index"]:w,["uv-region"]:A}=p.attributes;o={position:h,normal:b,color:v,uv0:y,uvRegion:A,id:w},Ast(o,p);let C=jst(w);C&&Bst(o,C)}else{let{vertexAttributes:p,ordering:h,featureAttributes:b,featureAttributeOrder:v}=n.store.defaultGeometrySchema,y=Cst(e,n);u=y.byteOffset,s=y.vertexCount,l=y.featureCount;let{attributes:w,byteOffset:A}=P5e(e,u,p,s,h),{attributes:C}=P5e(e,A,b,l,v);Pst(C),o=Tst(w,C)}if(!((d=i==null?void 0:i.i3s)==null?void 0:d.coordinateSystem)||i.i3s.coordinateSystem===tl.METER_OFFSETS){let p=kst(o.position,t);r.modelMatrix=p.invert(),r.coordinateSystem=tl.METER_OFFSETS}else r.modelMatrix=Rst(o.position),r.coordinateSystem=tl.LNGLAT_OFFSETS;o.color=await O5e(o.color,o.id,t,n,i),r.attributes={positions:o.position,normals:o.normal,colors:I5e(o.color),texCoords:o.uv0,uvRegions:I5e(o.uvRegion||o.region)},r.indices=c||null,o.id&&o.id.value&&(r.featureIds=o.id.value);for(let p in r.attributes)r.attributes[p]||delete r.attributes[p];return r.vertexCount=s,r.byteLength=a,r}function Ast(e,r){for(let t in r.loaderData.attributes){let n=r.loaderData.attributes[t];switch(n.name){case"POSITION":e.position.metadata=n.metadata;break;case"feature-index":e.id.metadata=n.metadata;break;default:break}}}function Tst(e,r){return oe(oe({},e),r)}function I5e(e){return e&&(e.normalized=!0,e)}function Cst(e,r){let t=0,n=0,i=0;for(let{property:a,type:o}of r.store.defaultGeometrySchema.header){let s=bY(o);switch(a){case zw.vertexCount:n=new s(e,0,4)[0],t+=xx(o);break;case zw.featureCount:i=new s(e,4,4)[0],t+=xx(o);break;default:break}}return{vertexCount:n,featureCount:i,byteOffset:t}}function P5e(e,r,t,n,i){let a={};for(let o of i)if(t[o]){let{valueType:s,valuesPerElement:u}=t[o];if(r+n*u*xx(s)<=e.byteLength){let l=e.slice(r),c;if(s==="UInt64")c=Dst(l,n*u,xx(s));else{let f=bY(s);c=new f(l,0,n*u)}switch(a[o]={value:c,type:x5e[s],size:u},o){case"color":a.color.normalized=!0;break;case"position":case"region":case"normal":default:}r=r+n*u*xx(s)}else if(o!=="uv0")break}return{attributes:a,byteOffset:r}}function Dst(e,r,t){let n=[],i=new DataView(e),a=0;for(let o=0;o<r;o++){let s=i.getUint32(a,!0),u=i.getUint32(a+4,!0),l=s+2**32*u;n.push(l),a+=t}return new Uint32Array(n)}function kst(e,r){let t=r.mbs,n=e.value,i=e.metadata,a=new Dh.Matrix4,o=new Dh.Vector3(t[0],t[1],t[2]),s=new Dh.Vector3;return f4.Ellipsoid.WGS84.cartographicToCartesian(o,s),f4.Ellipsoid.WGS84.eastNorthUpToFixedFrame(s,a),e.value=Ost(n,i,o),a}function Ost(e,r={},t){let n=new Float64Array(e.length),i=r["i3s-scale_x"]&&r["i3s-scale_x"].double||1,a=r["i3s-scale_y"]&&r["i3s-scale_y"].double||1;for(let o=0;o<n.length;o+=3)n[o]=e[o]*i+t.x,n[o+1]=e[o+1]*a+t.y,n[o+2]=e[o+2]+t.z;for(let o=0;o<n.length;o+=3)f4.Ellipsoid.WGS84.cartographicToCartesian(n.subarray(o,o+3),d4),n[o]=d4.x,n[o+1]=d4.y,n[o+2]=d4.z;return n}function Rst(e){var a,o;let r=e.metadata,t=((a=r==null?void 0:r["i3s-scale_x"])==null?void 0:a.double)||1,n=((o=r==null?void 0:r["i3s-scale_y"])==null?void 0:o.double)||1,i=new Dh.Matrix4;return i[0]=t,i[5]=n,i}function Fst(e,r){let t;return e?t=ze(oe({},e),{pbrMetallicRoughness:e.pbrMetallicRoughness?oe({},e.pbrMetallicRoughness):{baseColorFactor:[255,255,255,255]}}):(t={pbrMetallicRoughness:{}},r?t.pbrMetallicRoughness.baseColorTexture={texCoord:0}:t.pbrMetallicRoughness.baseColorFactor=[255,255,255,255]),t.alphaCutoff=t.alphaCutoff||.25,t.alphaMode&&(t.alphaMode=t.alphaMode.toUpperCase()),t.emissiveFactor&&(t.emissiveFactor=B5e(t.emissiveFactor)),t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorFactor&&(t.pbrMetallicRoughness.baseColorFactor=B5e(t.pbrMetallicRoughness.baseColorFactor)),r&&Ist(t,r),t}function B5e(e){let r=[...e];for(let t=0;t<e.length;t++)r[t]=e[t]/255;return r}function Ist(e,r){let t={source:{image:r}};e.pbrMetallicRoughness&&e.pbrMetallicRoughness.baseColorTexture?e.pbrMetallicRoughness.baseColorTexture=ze(oe({},e.pbrMetallicRoughness.baseColorTexture),{texture:t}):e.emissiveTexture?e.emissiveTexture=ze(oe({},e.emissiveTexture),{texture:t}):e.pbrMetallicRoughness&&e.pbrMetallicRoughness.metallicRoughnessTexture?e.pbrMetallicRoughness.metallicRoughnessTexture=ze(oe({},e.pbrMetallicRoughness.metallicRoughnessTexture),{texture:t}):e.normalTexture?e.normalTexture=ze(oe({},e.normalTexture),{texture:t}):e.occlusionTexture&&(e.occlusionTexture=ze(oe({},e.occlusionTexture),{texture:t}))}function Pst(e){let{id:r,faceRange:t}=e;if(!r||!t)return;let n=r.value,i=t.value,a=i[i.length-1]+1,o=new Uint32Array(a*3),s=0,u=0;for(let l=1;l<i.length;l+=2){let c=Number(n[s]),f=i[l],d=i[l-1],p=f-d+1,h=u+p*3;o.fill(c,u,h),s++,u=h}e.id.value=o}function Bst(e,r){let t=e.id.value,n=new Float32Array(t.length);for(let i=0;i<t.length;i++)n[i]=r[t[i]];e.id.value=n}function jst(e){var r,t;return(t=(r=e==null?void 0:e.metadata)==null?void 0:r["i3s-feature-ids"])==null?void 0:t.intArray}var Mst="4.0.0-alpha.21",j5e={name:"I3S Content (Indexed Scene Layers)",id:"i3s-content",module:"i3s",worker:!0,version:Mst,mimeTypes:["application/octet-stream"],parse:Lst,extensions:["bin"],options:{"i3s-content":{}}};async function Lst(e,r,t){let{tile:n,_tileOptions:i,tileset:a,_tilesetOptions:o}=(r==null?void 0:r.i3s)||{},s=i||n,u=o||a;return!s||!u?null:await F5e(e,s,u,r,t)}var L5e=$e(U0()),xY=$e(Gs());var qst="4.0.0-alpha.21";async function Nst(e,r){return JSON.parse(new TextDecoder().decode(e))}var M5e={name:"I3S Node Page",id:"i3s-node-page",module:"i3s",version:qst,mimeTypes:["application/json"],parse:Nst,extensions:["json"],options:{}};var p4=class{constructor(r,t="",n){this.nodePages=[];this.pendingNodePages=[];this.textureDefinitionsSelectedFormats=[];this.textureLoaderOptions={};var i,a;this.tileset=oe({},r),this.url=t,this.nodesPerPage=((i=r.nodePages)==null?void 0:i.nodesPerPage)||64,this.lodSelectionMetricType=(a=r.nodePages)==null?void 0:a.lodSelectionMetricType,this.options=n,this.nodesInNodePages=0,this.initSelectedFormatsForTextureDefinitions(r)}async getNodeById(r){var i;let t=Math.floor(r/this.nodesPerPage);if(!this.nodePages[t]&&!this.pendingNodePages[t]){let a=Ch(`${this.url}/nodepages/${t}`,(i=this.options.i3s)==null?void 0:i.token);this.pendingNodePages[t]={status:"Pending",promise:un(a,M5e,this.options)},this.nodePages[t]=await this.pendingNodePages[t].promise,this.nodesInNodePages+=this.nodePages[t].nodes.length,this.pendingNodePages[t].status="Done"}this.pendingNodePages[t].status==="Pending"&&(this.nodePages[t]=await this.pendingNodePages[t].promise);let n=r%this.nodesPerPage;return this.nodePages[t].nodes[n]}async formTileFromNodePages(r){let t=await this.getNodeById(r),n=[],i=[];for(let p of t.children||[])i.push(this.getNodeById(p));let a=await Promise.all(i);for(let p of a)n.push({id:p.index.toString(),obb:p.obb});let o,s,u,l="jpg",c=[],f=!1;if(t&&t.mesh){let{url:p,isDracoGeometry:h}=t.mesh.geometry&&this.getContentUrl(t.mesh.geometry)||{isDracoGeometry:!1};o=p,f=h;let{textureData:b,materialDefinition:v}=this.getInformationFromMaterial(t.mesh.material);u=v,l=b.format||l,b.name&&(s=`${this.url}/nodes/${t.mesh.material.resource}/textures/${b.name}`),this.tileset.attributeStorageInfo&&(c=T5e(this.tileset,this.url,t.mesh.attribute.resource))}let d=this.getLodSelection(t);return yY({id:r.toString(),lodSelection:d,obb:t.obb,contentUrl:o,textureUrl:s,attributeUrls:c,materialDefinition:u,textureFormat:l,textureLoaderOptions:this.textureLoaderOptions,children:n,isDracoGeometry:f})}getContentUrl(r){let t=null,n=this.tileset.geometryDefinitions[r.definition],i=-1;if(this.options.i3s&&this.options.i3s.useDracoGeometry&&(i=n.geometryBuffers.findIndex(a=>a.compressedAttributes&&a.compressedAttributes.encoding==="draco")),i===-1&&(i=n.geometryBuffers.findIndex(a=>!a.compressedAttributes)),i!==-1){let a=Boolean(n.geometryBuffers[i].compressedAttributes);t={url:`${this.url}/nodes/${r.resource}/geometries/${i}`,isDracoGeometry:a}}return t}getLodSelection(r){let t=[];return this.lodSelectionMetricType==="maxScreenThresholdSQ"&&t.push({metricType:"maxScreenThreshold",maxError:Math.sqrt(r.lodThreshold/(Math.PI*.25))}),t.push({metricType:this.lodSelectionMetricType,maxError:r.lodThreshold}),t}getInformationFromMaterial(r){var n,i,a;let t={textureData:{name:null}};if(r){let o=(n=this.tileset.materialDefinitions)==null?void 0:n[r.definition];if(o){t.materialDefinition=o;let s=(a=(i=o==null?void 0:o.pbrMetallicRoughness)==null?void 0:i.baseColorTexture)==null?void 0:a.textureSetDefinitionId;typeof s=="number"&&(t.textureData=this.textureDefinitionsSelectedFormats[s]||t.textureData)}}return t}initSelectedFormatsForTextureDefinitions(r){this.textureDefinitionsSelectedFormats=[];let t=this.getSupportedTextureFormats(),n=r.textureSetDefinitions||[];for(let i of n){let a=i&&i.formats||[],o=null;for(let s of t){let u=a.find(l=>l.format===s);if(u){o=u;break}}o&&o.format==="ktx2"&&(this.textureLoaderOptions.basis={format:Jb(),containerFormat:"ktx2",module:"encoder"}),this.textureDefinitionsSelectedFormats.push(o)}}getSupportedTextureFormats(){let r=[];if(!this.options.i3s||this.options.i3s.useCompressedTextures){let t=M2();t.has("etc2")&&r.push("ktx-etc2"),t.has("dxt")&&r.push("dds"),r.push("ktx2")}return r.push("jpg"),r.push("png"),r}};function q5e(e,r){let t=r.url||"",n;e.geometryData&&(n=`${t}/${e.geometryData[0].href}`);let i;e.textureData&&(i=`${t}/${e.textureData[0].href}`);let a;e.attributeData&&(a=A5e(t,e));let o=e.children||[];return yY(ze(oe({},e),{children:o,url:t,contentUrl:n,textureUrl:i,textureFormat:"jpg",attributeUrls:a,isDracoGeometry:!1}))}function yY(e){var s,u;let r={},t=[0,0,0,1];if(e.mbs)t=e.mbs,r.sphere=[...xY.Ellipsoid.WGS84.cartographicToCartesian(e.mbs.slice(0,3)),e.mbs[3]];else if(e.obb){r.box=[...xY.Ellipsoid.WGS84.cartographicToCartesian(e.obb.center),...e.obb.halfSize,...e.obb.quaternion];let c=new L5e.OrientedBoundingBox().fromCenterHalfSizeQuaternion(r.box.slice(0,3),e.obb.halfSize,e.obb.quaternion).getBoundingSphere();r.sphere=[...c.center,c.radius],t=[...e.obb.center,c.radius]}let n=(s=e.lodSelection)==null?void 0:s[0].metricType,i=(u=e.lodSelection)==null?void 0:u[0].maxError,a=rc.MESH,o=Tp.REPLACE;return ze(oe({},e),{mbs:t,boundingVolume:r,lodMetricType:n,lodMetricValue:i,type:a,refine:o})}async function N5e(e,r,t){var o;let n=t.url,i,a;if(e.nodePages)i=new p4(e,n,r),a=await i.formTileFromNodePages(0);else{let s=Ch(`${e.url}/nodes/root`,(o=r.i3s)==null?void 0:o.token);a=await un(s,Vf,ze(oe({},r),{i3s:ze(oe({},r.i3s),{loadContent:!1,isTileHeader:!0,isTileset:!1})}))}return ze(oe({},e),{loader:Vf,url:n,basePath:n,type:G0.I3S,nodePagesTile:i,root:a,lodMetricType:a.lodMetricType,lodMetricValue:a.lodMetricValue})}var Ust="4.0.0-alpha.21",Gst=/layers\/[0-9]+$/,zst=/nodes\/([0-9-]+|root)$/,Hst="504b0304",Wst="PointCloud",Vf={name:"I3S (Indexed Scene Layers)",id:"i3s",module:"i3s",version:Ust,mimeTypes:["application/octet-stream"],parse:Vst,extensions:["bin"],options:{i3s:{token:null,isTileset:"auto",isTileHeader:"auto",tile:null,tileset:null,_tileOptions:null,_tilesetOptions:null,useDracoGeometry:!0,useCompressedTextures:!0,decodeTextures:!0,coordinateSystem:tl.METER_OFFSETS,colorsByAttribute:null}}};async function Vst(e,r={},t){let n=t.url;if(r.i3s=r.i3s||{},Xst(e)===Hst)throw new Error("Files with .slpk extention currently are not supported by I3SLoader");let a;r.i3s.isTileset==="auto"?a=Gst.test(n):a=r.i3s.isTileset;let o;return r.isTileHeader==="auto"?o=zst.test(n):o=r.i3s.isTileHeader,a?e=await Yst(e,r,t):o?e=await $st(e,t):e=await Kst(e,r),e}async function Kst(e,r){return await Jo(e,j5e,r)}async function Yst(e,r,t){let n=JSON.parse(new TextDecoder().decode(e));if((n==null?void 0:n.layerType)===Wst)throw new Error("Point Cloud layers currently are not supported by I3SLoader");return await N5e(n,r,t)}async function $st(e,r){return e=JSON.parse(new TextDecoder().decode(e)),q5e(e,r)}function Xst(e){return e instanceof ArrayBuffer?[...new Uint8Array(e,0,4)].map(r=>r.toString(16).padStart(2,"0")).join(""):null}var U5e=$e(Xt()),G5e=$e(Gs()),z5e=$e(U0());function _Y(e,r){let t=[e.center[0],e.center[1],e.center[2]+r.getHeight(e.center[1],e.center[0])],n=G5e.Ellipsoid.WGS84.cartographicToCartesian(t,new U5e.Vector3),i=new z5e.OrientedBoundingBox().fromCenterHalfSizeQuaternion(n,e.halfSize,e.quaternion);return[...i.center,...i.halfAxes.toArray()]}var h4=$e(Zu()),Jst=()=>({version:{path:"version",default:"1.0"}}),H5e=()=>({boundingVolume:{path:"boundingVolume"},geometricError:{path:"geometricError"},content:{path:"content"},children:{path:"children",transform:e=>e.map(r=>(0,h4.default)(r,H5e()))}}),W5e=()=>({asset:{path:"asset",transform:e=>(0,h4.default)(e,Jst())},geometricError:{path:"root",transform:e=>e.geometricError},root:{path:"root",transform:e=>(0,h4.default)(e,H5e())}});var Kf=$e(Xt()),EY=$e(Gs());function V5e(e,r){let t=new Float32Array(e.length),n=Zst(r);for(let i=0;i<e.length;i+=2){let a=e.subarray(i,i+2),o=n.slice(i*2,i*2+4),s=Qst([a[0],a[1]]),u=[o[2]-o[0],o[3]-o[1]],l=[s[0]*u[0],s[1]*u[1]],c=[l[0]+o[0],l[1]+o[1]];t[i]=c[0],t[i+1]=c[1]}return t}function Qst(e){return[e[0]-Math.floor(e[0]),e[1]-Math.floor(e[1])]}function Zst(e){let r=65535,t=[];for(let n=0;n<e.length;n++)t[n]=e[n]/r;return t}var eut=new Kf.Matrix4([1,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,1]),K5e=new Kf.Vector3,m4=class{async convert(r,t=null){let n=await this.buildGltf(r,t);return bD({gltfEncoded:new Uint8Array(n),type:"b3dm",featuresLength:this._getFeaturesLength(t),batchTable:t},gH)}async buildGltf(r,t){let{tileContent:n,textureFormat:i,box:a}=r,{material:o,attributes:s,indices:u,modelMatrix:l}=n,c=new _n,f=await this._addI3sTextureToGltf(n,i,c),d=this._convertI3sMaterialToGltfMaterial(o,f),p=c.addMaterial(d),h=s.positions,b=h.value;s.uvRegions&&s.texCoords&&(s.texCoords.value=V5e(s.texCoords.value,s.uvRegions.value));let v=new Kf.Vector3(a),y=EY.Ellipsoid.WGS84.cartesianToCartographic(v,new Kf.Vector3);s.positions.value=this._normalizePositions(b,v,y,l),this._createBatchIds(n,t),s.normals&&!this._checkNormals(s.normals.value)&&delete s.normals;let w=u||t4(b.length/h.size),A=c.addMesh({attributes:s,indices:w,material:p,mode:4}),C=this._generateTransformMatrix(v),D=c.addNode({meshIndex:A,matrix:C}),P=c.addScene({nodeIndices:[D]});return c.setDefaultScene(P),c.createBinaryChunk(),bD(c.gltf,rG)}async _addI3sTextureToGltf(r,t,n){let{texture:i,material:a,attributes:o}=r,s=null,u=i;if(!i&&a&&(u=a.pbrMetallicRoughness&&a.pbrMetallicRoughness.baseColorTexture&&a.pbrMetallicRoughness.baseColorTexture.texture.source.image),u){let l=this._deduceMimeTypeFromFormat(t),c=n.addImage(u,l);s=n.addTexture({imageIndex:c}),delete o.colors}return s}_normalizePositions(r,t,n,i){let a=new Float32Array(r.length);for(let o=0;o<r.length;o+=3){let s=r.subarray(o,o+3),u=new Kf.Vector3(t),l=new Kf.Vector3(Array.from(s)).transform(i).add(n);EY.Ellipsoid.WGS84.cartographicToCartesian(l,K5e),l=K5e.subtract(u),a.set(l,o)}return a}_generateTransformMatrix(r){return new Kf.Matrix4().translate(r).multiplyLeft(eut)}_createBatchIds(r,t){let{featureIds:n}=r,{OBJECTID:i}=t||{};if(!(!n||!i)){for(let a=0;a<n.length;a++){let o=n[a],s=i.indexOf(o);n[a]=s}r.attributes._BATCHID={size:1,byteOffset:0,value:n}}}_deduceMimeTypeFromFormat(r){switch(r){case"jpg":return"image/jpeg";case"png":return"image/png";case"ktx2":return"image/ktx2";default:return console.warn(`Unexpected texture format in I3S: ${r}`),"image/jpeg"}}_convertI3sMaterialToGltfMaterial(r,t){let n=t!==null;return r?(t!==null&&(r=this._setGltfTexture(r,t)),r):(r={alphaMode:"OPAQUE",doubleSided:!1,pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1}},n?r.pbrMetallicRoughness.baseColorTexture={index:t,texCoord:0}:r.pbrMetallicRoughness.baseColorFactor=[1,1,1,1],r)}_setGltfTexture(r,t){let n=ze(oe({},r),{pbrMetallicRoughness:oe({},r.pbrMetallicRoughness)});return r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorTexture?n.pbrMetallicRoughness.baseColorTexture={index:t,texCoord:0}:r.emissiveTexture?n.emissiveTexture={index:t,texCoord:0}:r.pbrMetallicRoughness&&r.pbrMetallicRoughness.metallicRoughnessTexture?n.pbrMetallicRoughness.metallicRoughnessTexture={index:t,texCoord:0}:r.normalTexture?n.normalTexture={index:t,texCoord:0}:r.occlusionTexture&&(n.occlusionTexture={index:t,texCoord:0}),n}_getFeaturesLength(r){if(!r)return 0;let t=Object.keys(r)[0];return t?r[t].length:0}_checkNormals(r){return r.find(t=>t)}};var Y5e=async(e,r,t)=>{if(!e||!r.contentUrl)return null;let n=ze(oe({},t),{i3s:ze(oe({},t.i3s),{isTileset:!1,isTileHeader:!1,_tileOptions:{attributeUrls:r.attributeUrls,textureUrl:r.textureUrl,textureFormat:r.textureFormat,textureLoaderOptions:r.textureLoaderOptions,materialDefinition:r.materialDefinition,isDracoGeometry:r.isDracoGeometry,mbs:r.mbs},_tilesetOptions:{store:e.store,attributeStorageInfo:e.attributeStorageInfo,fields:e.fields}})});return await un(r.contentUrl,Vf,n)};var rut="I3S",Ww=class{constructor(){this.workerSource={};this.loaderOptions={_nodeWorkers:!0,reuseWorkers:!0,i3s:{coordinateSystem:tl.LNGLAT_OFFSETS,decodeTextures:!1},"i3s-content":{workerUrl:"./modules/i3s/dist/i3s-content-worker-node.js"}};this.options={},this.tilesetPath="",this.vertexCounter=0,this.conversionStartTime=[0,0],this.geoidHeightModel=null,this.sourceTileset=null,this.attributeStorageInfo=null,this.workerSource={}}async convert(r){var f;if(wi)return console.log(vx),vx;let{inputUrl:t,outputPath:n,tilesetName:i,maxDepth:a,egmFilePath:o}=r;if(this.conversionStartTime=wY.default.hrtime(),this.options={maxDepth:a},console.log("Loading egm file..."),this.geoidHeightModel=await un(o,o4),console.log("Loading egm file completed!"),this.sourceTileset=await un(t,Vf,this.loaderOptions),!this.sourceTileset)return;let s=(f=this.sourceTileset)==null?void 0:f.root;s.obb||(s.obb=JK(s.mbs)),this.tilesetPath=(0,$5e.join)(`${n}`,`${i}`),this.attributeStorageInfo=this.sourceTileset.attributeStorageInfo;try{await Pw(this.tilesetPath)}catch{}let u={boundingVolume:{box:_Y(s.obb,this.geoidHeightModel)},geometricError:nY(s),children:[]};await this._addChildren(s,u,1);let l=(0,X5e.default)({root:u},W5e());await Gi(this.tilesetPath,JSON.stringify(l),"tileset.json"),this._finishConversion({slpk:!1,outputPath:n,tilesetName:i}),Mi.getWorkerFarm({}).destroy()}async convertChildNode(r,t,n,i){let a=await this._loadChildNode(r,i);if(a.contentUrl){let o=await Y5e(this.sourceTileset,a,this.loaderOptions);if(!o){await this._addChildren(a,t,n+1);return}this.vertexCounter+=(o==null?void 0:o.vertexCount)||0;let s=null;this.attributeStorageInfo&&(s=await this._loadChildAttributes(a,this.attributeStorageInfo)),a.obb||(a.obb=JK(a.mbs));let u={box:_Y(a.obb,this.geoidHeightModel)},l={boundingVolume:u,geometricError:nY(a),children:[]},c={tileContent:o,box:u.box,textureFormat:a.textureFormat},d=await new m4().convert(c,s);l.content={uri:`${a.id}.b3dm`,boundingVolume:u},await Gi(this.tilesetPath,new Uint8Array(d),`${a.id}.b3dm`),t.children.push(l),await this._addChildren(a,l,n+1)}else await this._addChildren(a,t,n+1)}async _addChildren(r,t,n){if(this.options.maxDepth&&n>this.options.maxDepth)return;let i=[];for(let a of r.children||[])i.push(this.convertChildNode(r,t,n,a));await Promise.all(i)}async _loadChildNode(r,t){var i;let n;if((i=this.sourceTileset)==null?void 0:i.nodePagesTile)console.log(`Node conversion: ${t.id}`),n=await this.sourceTileset.nodePagesTile.formTileFromNodePages(parseInt(t.id));else{let a=this._relativeUrlToFullUrl(r.url,t.href),o={i3s:ze(oe({},this.loaderOptions),{isTileHeader:!0,loadContent:!1})};console.log(`Node conversion: ${a}`),n=await un(a,Vf,o)}return n}_relativeUrlToFullUrl(r="",t){let n=r.split("/"),i=t.split("/");for(let a of i)switch(a){case".":continue;case"..":n=n.slice(0,-1);break;default:n.push(a)}return n.join("/")}async _loadChildAttributes(r,t){let n=[],{attributeUrls:i=[]}=r;for(let o=0;o<i.length;o++){let s=i[o],u=t[o],l={attributeName:u.name,attributeType:this._getAttributeType(u)};n.push(un(s,Hw,l))}let a=await Promise.all(n);return this._replaceNestedArrays(a),Object.assign({},...a)}_getAttributeType(r){return r.attributeValues?r.attributeValues.valueType:r.objectIds?"Oid32":""}_replaceNestedArrays(r){for(let t=0;t<r.length;t++){let n=r[t];for(let i in n)n[i]=Array.from(n[i])}}async _finishConversion(r){let t=await e4(r),n=wY.default.hrtime(this.conversionStartTime),i=ZF(n);console.log("------------------------------------------------"),console.log(`Finish conversion of ${rut}`),console.log(`Total conversion time: ${i}`),console.log("Vertex count: ",this.vertexCounter),console.log("File(s) size: ",t," bytes"),console.log("------------------------------------------------")}};var g4=$e(require("path"));var tut="4.0.0-alpha.21",nut="https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip",SY=class{async install(r=""){console.log('Installing "EGM2008-5" model...');let t=await un(nut,lH,{}),n=process.cwd();r&&(n=(0,g4.join)(n,r)),await Gi(n,new Uint8Array(t["geoids/egm2008-5.pgm"]),"egm2008-5.pgm"),console.log('Installing "I3S Content Loader" worker'),await this.installFromNpm("i3s","i3s-content-worker-node.js"),console.log('Installing "Draco Loader" worker'),await this.installFromNpm("draco","draco-worker-node.js"),console.log('Installing "Draco Writer" worker'),await this.installFromNpm("draco","draco-writer-worker-node.js"),console.log('Installing "Basis Loader" worker'),await this.installFromNpm("textures","basis-worker-node.js"),console.log('Installing "KTX2 Basis Writer" worker'),await this.installFromNpm("textures","ktx2-basis-writer-worker-node.js"),console.log('Installing "Draco decoder" library'),await this.installFromUrl(Dp[ci.DECODER],"draco",ci.DECODER),await this.installFromUrl(Dp[ci.DECODER_WASM],"draco",ci.DECODER_WASM),console.log('Installing "Draco encoder" library'),await this.installFromUrl(Dp[ci.ENCODER],"draco",ci.ENCODER),console.log('Installing "Basis transcoder" library'),await this.installFromNpm("textures",ic.TRANSCODER,"libs"),await this.installFromNpm("textures",ic.TRANSCODER_WASM,"libs"),console.log('Installing "Basis encoder" library'),await this.installFromNpm("textures",ic.ENCODER,"libs"),await this.installFromNpm("textures",ic.ENCODER_WASM,"libs"),console.log('Installing "join-images" npm package'),await new hp().start({command:process.platform==="win32"?"npm.cmd":"npm",arguments:["install","sharp@0.30.4","join-images@1.1.3"],wait:0,ignoreStderr:!0}),console.log("All dependencies were installed succesfully.")}async installFromNpm(r,t,n=""){let a=await(await Xo(`https://unpkg.com/@loaders.gl/${r}@${tut}/dist/${n}/${t}`)).arrayBuffer();if(!a)return;let o=(0,g4.join)(process.cwd(),"modules",r,"dist",n);await Gi(o,a,t)}async installFromUrl(r,t,n){let a=await(await Xo(r)).arrayBuffer();if(!a)return;let o=(0,g4.join)(process.cwd(),"modules",t,"dist","libs");await Gi(o,a,n)}};function nl(e,r){if(e+1>=r.length)return"";let t=r[e+1];return t.indexOf("--")===0?"":t}function J5e(e,r){let t=nl(e,r);return console.log(`Input tileset value: ${t}`),console.log(`Modified tileset value: ${t.replace(/\\/g,"/")}`),t.replace(/\\/g,"/")}function Q5e(e){return e.reduce((r,t)=>{let n=t.indexOf("="),i=t.slice(0,n),a=t.slice(n+1,t.length);return t.includes("=")&&t.startsWith("--")&&a?r.concat(i,a):r.concat(t)},[])}function Z5e(e,r){let t=nl(e,r),n=Number.parseInt(t);return isFinite(n)?n:NaN}function Yf(e,r){let t=nl(e,r).toLowerCase().trim();return["--no-draco","--split-nodes"].includes(r[e])&&!t?!1:!t||t==="true"}var AY={I3S:"I3S",_3DTILES:"3DTILES"};async function iut(){let[,,...e]=process.argv;e.length===0&&TY();let r=Q5e(e),t=sut(r);if(t.installDependencies){new SY().install("deps");return}let n=out(t);await aut(n)}iut().catch(e=>{console.log(e),process.exit(1)});function TY(){console.log("cli: converter 3dTiles to I3S or I3S to 3dTiles..."),console.log('--install-dependencies [Run the script for installing dependencies. Run this options separate from others. Now "*.pgm" file installation is implemented]'),console.log("--max-depth [Maximal depth of hierarchical tiles tree traversal, default: infinite]"),console.log("--name [Tileset name]"),console.log('--output [Output folder, default: "data" folder]'),console.log("--instant-node-writing [Keep created 3DNodeIndexDocument files on disk instead of memory. This option reduce memory usage but decelerates conversion speed]"),console.log("--split-nodes [Prevent to merge similar materials that could lead to incorrect visualization (I3S to 3DTiles conversion only)]"),console.log("--slpk [Generate slpk (Scene Layer Packages) I3S output file]"),console.log("--tileset [tileset.json file (3DTiles) / http://..../SceneServer/layers/0 resource (I3S)]"),console.log("--input-type [tileset input type: I3S or 3DTILES]"),console.log('--7zExe [location of 7z.exe archiver to create slpk on Windows, default: "C:\\Program Files\\7-Zip\\7z.exe"]'),console.log('--egm [location of Earth Gravity Model *.pgm file to convert heights from ellipsoidal to gravity-related format. A model file can be loaded from GeographicLib https://geographiclib.sourceforge.io/html/geoid.html], default: "./deps/egm2008-5.zip"'),console.log("--token [Token for Cesium ION tilesets authentication]"),console.log("--no-draco [Disable draco compression for geometry]"),console.log("--generate-textures [Enable KTX2 textures generation if only one of (JPG, PNG) texture is provided or generate JPG texture if only KTX2 is provided]"),console.log("--generate-bounding-volumes [Generate obb and mbs bounding volumes from geometry]"),console.log('--metadata-class [One of the list of feature metadata classes, detected by converter on "analyze" stage, default: not set]'),console.log("--validate [Enable validation]"),process.exit(0)}async function aut(e){switch(console.log("------------------------------------------------"),console.log(`Starting conversion of ${e.inputType}`),console.log("------------------------------------------------"),e.inputType.toUpperCase()){case AY.I3S:new Ww().convert({inputUrl:e.tileset,outputPath:e.output,tilesetName:e.name,maxDepth:e.maxDepth,egmFilePath:e.egm});break;case AY._3DTILES:await new Gw().convert({inputUrl:e.tileset,outputPath:e.output,tilesetName:e.name,maxDepth:e.maxDepth,slpk:e.slpk,sevenZipExe:e.sevenZipExe,egmFilePath:e.egm,token:e.token,draco:e.draco,mergeMaterials:e.mergeMaterials,generateTextures:e.generateTextures,generateBoundingVolumes:e.generateBoundingVolumes,validate:e.validate,instantNodeWriting:e.instantNodeWriting,inquirer:rje.default});break;default:TY()}}function out(e){let r={name:()=>console.log("Missed: --name [Tileset name]"),output:()=>console.log("Missed: --output [Output path name]"),sevenZipExe:()=>console.log("Missed: --7zExe [7z archiver executable path]"),egm:()=>console.log("Missed: --egm [*.pgm earth gravity model file path]"),tileset:()=>console.log("Missed: --tileset [tileset.json file]"),inputType:()=>console.log("Missed/Incorrect: --input-type [tileset input type: I3S or 3DTILES]")},t=[];for(let n in r){let i=e[n],a=Boolean(i)&&n==="inputType"&&!Object.values(AY).includes(i.toUpperCase());(!i||a)&&t.push(r[n])}return t.length&&(t.forEach(n=>n()),process.exit(1)),e}function sut(e){let r={output:"data",instantNodeWriting:!1,mergeMaterials:!0,sevenZipExe:"C:\\Program Files\\7-Zip\\7z.exe",egm:(0,eje.join)(process.cwd(),"deps","egm2008-5.pgm"),draco:!0,installDependencies:!1,generateTextures:!1,generateBoundingVolumes:!1,validate:!1,slpk:!1};return e.forEach((t,n)=>{if(t.indexOf("--")===0)switch(t){case"--input-type":r.inputType=nl(n,e);break;case"--tileset":r.tileset=J5e(n,e);break;case"--name":r.name=nl(n,e);break;case"--output":r.output=nl(n,e);break;case"--instant-node-writing":r.instantNodeWriting=Yf(n,e);break;case"--split-nodes":r.mergeMaterials=Yf(n,e);break;case"--max-depth":r.maxDepth=Z5e(n,e);break;case"--slpk":r.slpk=Yf(n,e);break;case"--7zExe":r.sevenZipExe=nl(n,e);break;case"--egm":r.egm=nl(n,e);break;case"--token":r.token=nl(n,e);break;case"--no-draco":r.draco=Yf(n,e);break;case"--validate":r.validate=Yf(n,e);break;case"--install-dependencies":r.installDependencies=Yf(n,e);break;case"--generate-textures":r.generateTextures=Yf(n,e);break;case"--generate-bounding-volumes":r.generateBoundingVolumes=Yf(n,e);break;case"--metadata-class":r.metadataClass=nl(n,e);case"--help":TY();break;default:console.warn(`Unknown option ${t}`),process.exit(0)}}),r}
|
|
186
186
|
/*!
|
|
187
187
|
* Copyright 2010 LearnBoost <dev@learnboost.com>
|
|
188
188
|
*
|