chbim-plugins 0.0.91 → 0.0.92
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/chbim-plugins.js +19 -16
- package/chbim-plugins.umd.cjs +2 -2
- package/package.json +1 -1
package/chbim-plugins.js
CHANGED
|
@@ -24972,23 +24972,23 @@ class v1 {
|
|
|
24972
24972
|
}
|
|
24973
24973
|
}
|
|
24974
24974
|
class _1 {
|
|
24975
|
-
constructor(a, o
|
|
24975
|
+
constructor(a, ...o) {
|
|
24976
24976
|
/**
|
|
24977
24977
|
* 手动释放 1秒防抖
|
|
24978
24978
|
* @param { object } data - 模型的树形结构
|
|
24979
24979
|
* @returns { any }
|
|
24980
24980
|
*/
|
|
24981
24981
|
bc(this, "manualFreed", Bc.debounce(() => {
|
|
24982
|
-
let { lng: a, lat: o, alt: c, pitch: d } =
|
|
24982
|
+
let { lng: a, lat: o, alt: c, pitch: d } = window.map.getCameraView(), u;
|
|
24983
24983
|
this.modelArray.forEach((m) => {
|
|
24984
24984
|
u = m.releasedDistance ? m.releasedDistance : 1e4, this.disTance(
|
|
24985
24985
|
[a, o, c],
|
|
24986
24986
|
[m.center._lng, m.center._lat, m.center._alt],
|
|
24987
24987
|
this.calculateDistance(d, u)
|
|
24988
|
-
) ?
|
|
24988
|
+
) ? window.map.getLayer(m.id, "modelId") && this.emit("leave", m) : window.map.getLayer(m.id, "modelId") || this.emit("enter", m);
|
|
24989
24989
|
});
|
|
24990
24990
|
}, 200));
|
|
24991
|
-
mars3d ? (a && a != null && (this.modelArray = a), this.showModelArray = [],
|
|
24991
|
+
mars3d ? (a && a != null && (this.modelArray = a), this.showModelArray = [], this.Cesium = mars3d.Cesium, this.events = {}) : console.error("未引入指定插件");
|
|
24992
24992
|
}
|
|
24993
24993
|
/**
|
|
24994
24994
|
* events
|
|
@@ -25109,7 +25109,7 @@ class _1 {
|
|
|
25109
25109
|
* @returns { any }
|
|
25110
25110
|
*/
|
|
25111
25111
|
resourceRelease() {
|
|
25112
|
-
|
|
25112
|
+
window.map.viewer.camera.moveEnd.addEventListener(() => {
|
|
25113
25113
|
this.freed();
|
|
25114
25114
|
});
|
|
25115
25115
|
}
|
|
@@ -25120,16 +25120,16 @@ class _1 {
|
|
|
25120
25120
|
* @returns { any }
|
|
25121
25121
|
*/
|
|
25122
25122
|
freed() {
|
|
25123
|
-
let { alt: a } =
|
|
25123
|
+
let { alt: a } = window.map.getCameraView();
|
|
25124
25124
|
a < 2e4 && (this.freed = Bc.throttle(() => {
|
|
25125
|
-
let { lng: o, lat: c, alt: d, pitch: u } =
|
|
25125
|
+
let { lng: o, lat: c, alt: d, pitch: u } = window.map.getCameraView();
|
|
25126
25126
|
this.modelArray && this.modelArray.forEach((m) => {
|
|
25127
25127
|
let _ = m.bimModel.releasedDistance ? m.bimModel.releasedDistance : 1e4;
|
|
25128
25128
|
m.center && this.disTance(
|
|
25129
25129
|
[o, c, d],
|
|
25130
25130
|
[m.center._lng, m.center._lat, m.center._alt],
|
|
25131
25131
|
this.calculateDistance(u, _)
|
|
25132
|
-
) ?
|
|
25132
|
+
) ? window.map.getLayer(m.id, "modelId") && this.emit("leave", m) : this.showModelArray.indexOf(m.id) >= 0 && !window.map.getLayer(m.id, "modelId") && this.emit("enter", m);
|
|
25133
25133
|
});
|
|
25134
25134
|
}, 2e3), this.freed());
|
|
25135
25135
|
}
|
|
@@ -28288,7 +28288,7 @@ var Z_ = Fp.exports;
|
|
|
28288
28288
|
const J_ = /* @__PURE__ */ rf(Z_);
|
|
28289
28289
|
class x1 {
|
|
28290
28290
|
constructor(a, o) {
|
|
28291
|
-
window.mars3d ? (this.
|
|
28291
|
+
window.mars3d ? (this.panoramicViewClass = o, this.coordinate = [
|
|
28292
28292
|
{
|
|
28293
28293
|
heading: 0,
|
|
28294
28294
|
pitch: 0,
|
|
@@ -28331,10 +28331,10 @@ class x1 {
|
|
|
28331
28331
|
this.timestamp = (/* @__PURE__ */ new Date()).getTime();
|
|
28332
28332
|
const d = document.getElementById("app"), u = window.innerHeight, m = document.getElementById("mars3dContainer");
|
|
28333
28333
|
m && (m.style.width = u.toString() + "px", m.style.height = u.toString() + "px"), d !== null && d.classList.add(this.panoramicViewClass);
|
|
28334
|
-
let { lat: _, lng: y, alt: S } =
|
|
28335
|
-
this.lat = _, this.lng = y, this.alt = S,
|
|
28334
|
+
let { lat: _, lng: y, alt: S } = window.map.getCameraView();
|
|
28335
|
+
this.lat = _, this.lng = y, this.alt = S, window.map.viewer.scene.camera.frustum.fov = window.Cesium.Math.PI_OVER_THREE * 1.5;
|
|
28336
28336
|
}
|
|
28337
|
-
this.screenshotArray && this.coordinate ? this.coordinate[(o = this.screenshotArray) == null ? void 0 : o.length] ?
|
|
28337
|
+
this.screenshotArray && this.coordinate ? this.coordinate[(o = this.screenshotArray) == null ? void 0 : o.length] ? window.map.setCameraView(
|
|
28338
28338
|
{
|
|
28339
28339
|
lat: this.lat,
|
|
28340
28340
|
lng: this.lng,
|
|
@@ -28358,11 +28358,14 @@ class x1 {
|
|
|
28358
28358
|
* @returns { any }
|
|
28359
28359
|
*/
|
|
28360
28360
|
async screenshot(a) {
|
|
28361
|
-
const o = await
|
|
28361
|
+
const o = await window.map.expImage({ download: !1 }), c = window.map.container.getElementsByClassName(
|
|
28362
28362
|
"cesium-viewer-cesiumWidgetContainer"
|
|
28363
|
-
), d = await window.domtoimage.toPng(
|
|
28364
|
-
|
|
28365
|
-
|
|
28363
|
+
), d = await window.domtoimage.toPng(
|
|
28364
|
+
window.map.container,
|
|
28365
|
+
{
|
|
28366
|
+
filter: (u) => u !== c[0]
|
|
28367
|
+
}
|
|
28368
|
+
);
|
|
28366
28369
|
this.mergeImage(o.image, d, o.width, o.height).then(
|
|
28367
28370
|
(u) => {
|
|
28368
28371
|
var y;
|
package/chbim-plugins.umd.cjs
CHANGED
|
@@ -2632,7 +2632,7 @@ __p += '`),Fi&&(de+=`' +
|
|
|
2632
2632
|
function print() { __p += __j.call(arguments, '') }
|
|
2633
2633
|
`:`;
|
|
2634
2634
|
`)+de+`return __p
|
|
2635
|
-
}`;var Mi=zd(function(){return Ni(ut,Je+"return "+de).apply(o,_t)});if(Mi.source=de,af(Mi))throw Mi;return Mi}function My(r){return Zi(r).toLowerCase()}function Sy(r){return Zi(r).toUpperCase()}function Ey(r,h,g){if(r=Zi(r),r&&(g||h===o))return ga(r);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=ar(h),ut=Qs(O,Y),_t=Eo(O,Y)+1;return xn(O,ut,_t).join("")}function by(r,h,g){if(r=Zi(r),r&&(g||h===o))return r.slice(0,va(r)+1);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=Eo(O,ar(h))+1;return xn(O,0,Y).join("")}function Ay(r,h,g){if(r=Zi(r),r&&(g||h===o))return r.replace(ls,"");if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=Qs(O,ar(h));return xn(O,Y).join("")}function Cy(r,h){var g=ct,O=It;if(wn(h)){var Y="separator"in h?h.separator:Y;g="length"in h?wi(h.length):g,O="omission"in h?Ye(h.omission):O}r=Zi(r);var ut=r.length;if(Ir(r)){var _t=ar(r);ut=_t.length}if(g>=ut)return r;var bt=g-$r(O);if(bt<1)return O;var Nt=_t?xn(_t,0,bt).join(""):r.slice(0,bt);if(Y===o)return Nt+O;if(_t&&(bt+=Nt.length-bt),lf(Y)){if(r.slice(bt).search(Y)){var se,le=Nt;for(Y.global||(Y=Kn(Y.source,Zi(Gl.exec(Y))+"g")),Y.lastIndex=0;se=Y.exec(le);)var de=se.index;Nt=Nt.slice(0,de===o?bt:de)}}else if(r.indexOf(Ye(Y),bt)!=bt){var ze=Nt.lastIndexOf(Y);ze>-1&&(Nt=Nt.slice(0,ze))}return Nt+O}function Py(r){return r=Zi(r),r&&Xs.test(r)?r.replace(As,Jl):r}var Ly=De(function(r,h,g){return r+(g?" ":"")+h.toUpperCase()}),cf=Me("toUpperCase");function Dd(r,h,g){return r=Zi(r),h=g?o:h,h===o?Po(r)?Gc(r):il(r):r.match(h)||[]}var zd=ae(function(r,h){try{return _r(r,o,h)}catch(g){return af(g)?g:new ai(g)}}),Ry=Ho(function(r,h){return Ji(h,function(g){g=ho(g),ks(r,g,sf(r[g],r))}),r});function Oy(r){var h=r==null?0:r.length,g=oi();return r=h?Yi(r,function(O){if(typeof O[1]!="function")throw new lr(m);return[g(O[0]),O[1]]}):[],ae(function(O){for(var Y=-1;++Y<h;){var ut=r[Y];if(_r(ut[0],this,O))return _r(ut[1],this,O)}})}function Iy(r){return Pa(wr(r,I))}function ff(r){return function(){return r}}function Dy(r,h){return r==null||r!==r?h:r}var zy=Li(),ky=Li(!0);function Gr(r){return r}function pf(r){return H(typeof r=="function"?r:wr(r,I))}function By(r){return gt(wr(r,I))}function Ny(r,h){return At(r,wr(h,I))}var Fy=ae(function(r,h){return function(g){return e(g,r,h)}}),Uy=ae(function(r,h){return function(g){return e(r,g,h)}});function df(r,h,g){var O=Jn(h),Y=Fo(h,O);g==null&&!(wn(h)&&(Y.length||!O.length))&&(g=h,h=r,r=this,Y=Fo(h,Jn(h)));var ut=!(wn(g)&&"chain"in g)||!!g.chain,_t=Wo(r);return Ji(Y,function(bt){var Nt=h[bt];r[bt]=Nt,_t&&(r.prototype[bt]=function(){var se=this.__chain__;if(ut||se){var le=r(this.__wrapped__),de=le.__actions__=er(this.__actions__);return de.push({func:Nt,args:arguments,thisArg:r}),le.__chain__=se,le}return Nt.apply(r,fs([this.value()],arguments))})}),r}function Gy(){return gn._===this&&(gn._=Kr),this}function mf(){}function Hy(r){return r=wi(r),ae(function(h){return Z(h,r)})}var Vy=Nn(Yi),Wy=Nn(Ih),jy=Nn(Cs);function kd(r){return Kc(r)?Js(ho(r)):$t(r)}function Xy(r){return function(h){return r==null?o:ao(r,h)}}var qy=$h(),Yy=$h(!0);function gf(){return[]}function vf(){return!1}function Zy(){return{}}function Jy(){return""}function $y(){return!0}function Ky(r,h){if(r=wi(r),r<1||r>fe)return[];var g=Ot,O=Vn(r,Ot);h=oi(h),r-=Ot;for(var Y=Ls(O,h);++g<r;)h(g);return Y}function Qy(r){return vi(r)?Yi(r,ho):ts(r)?[r]:er(id(Zi(r)))}function t1(r){var h=++ur;return Zi(r)+h}var e1=Tr(function(r,h){return r+h},0),i1=hh("ceil"),n1=Tr(function(r,h){return r/h},1),r1=hh("floor");function s1(r){return r&&r.length?Ts(r,Gr,oh):o}function o1(r,h){return r&&r.length?Ts(r,oi(h,2),oh):o}function a1(r){return ma(r,Gr)}function l1(r,h){return ma(r,oi(h,2))}function h1(r){return r&&r.length?Ts(r,Gr,rt):o}function u1(r,h){return r&&r.length?Ts(r,oi(h,2),rt):o}var c1=Tr(function(r,h){return r*h},1),f1=hh("round"),p1=Tr(function(r,h){return r-h},0);function d1(r){return r&&r.length?Ks(r,Gr):0}function m1(r,h){return r&&r.length?Ks(r,oi(h,2)):0}return it.after=Bv,it.ary=pd,it.assign=S_,it.assignIn=Ad,it.assignInWith=Zu,it.assignWith=E_,it.at=b_,it.before=dd,it.bind=sf,it.bindAll=Ry,it.bindKey=md,it.castArray=Zv,it.chain=ud,it.chunk=r0,it.compact=s0,it.concat=o0,it.cond=Oy,it.conforms=Iy,it.constant=ff,it.countBy=dv,it.create=A_,it.curry=gd,it.curryRight=vd,it.debounce=_d,it.defaults=C_,it.defaultsDeep=P_,it.defer=Nv,it.delay=Fv,it.difference=a0,it.differenceBy=l0,it.differenceWith=h0,it.drop=u0,it.dropRight=c0,it.dropRightWhile=f0,it.dropWhile=p0,it.fill=d0,it.filter=gv,it.flatMap=yv,it.flatMapDeep=xv,it.flatMapDepth=wv,it.flatten=od,it.flattenDeep=m0,it.flattenDepth=g0,it.flip=Uv,it.flow=zy,it.flowRight=ky,it.fromPairs=v0,it.functions=k_,it.functionsIn=B_,it.groupBy=Tv,it.initial=y0,it.intersection=x0,it.intersectionBy=w0,it.intersectionWith=T0,it.invert=F_,it.invertBy=U_,it.invokeMap=Sv,it.iteratee=pf,it.keyBy=Ev,it.keys=Jn,it.keysIn=Ur,it.map=Vu,it.mapKeys=H_,it.mapValues=V_,it.matches=By,it.matchesProperty=Ny,it.memoize=ju,it.merge=W_,it.mergeWith=Cd,it.method=Fy,it.methodOf=Uy,it.mixin=df,it.negate=Xu,it.nthArg=Hy,it.omit=j_,it.omitBy=X_,it.once=Gv,it.orderBy=bv,it.over=Vy,it.overArgs=Hv,it.overEvery=Wy,it.overSome=jy,it.partial=of,it.partialRight=yd,it.partition=Av,it.pick=q_,it.pickBy=Pd,it.property=kd,it.propertyOf=Xy,it.pull=b0,it.pullAll=ld,it.pullAllBy=A0,it.pullAllWith=C0,it.pullAt=P0,it.range=qy,it.rangeRight=Yy,it.rearg=Vv,it.reject=Lv,it.remove=L0,it.rest=Wv,it.reverse=nf,it.sampleSize=Ov,it.set=Z_,it.setWith=J_,it.shuffle=Iv,it.slice=R0,it.sortBy=kv,it.sortedUniq=N0,it.sortedUniqBy=F0,it.split=yy,it.spread=jv,it.tail=U0,it.take=G0,it.takeRight=H0,it.takeRightWhile=V0,it.takeWhile=W0,it.tap=sv,it.throttle=Xv,it.thru=Hu,it.toArray=Sd,it.toPairs=Ld,it.toPairsIn=Rd,it.toPath=Qy,it.toPlainObject=bd,it.transform=$_,it.unary=qv,it.union=j0,it.unionBy=X0,it.unionWith=q0,it.uniq=Y0,it.uniqBy=Z0,it.uniqWith=J0,it.unset=K_,it.unzip=rf,it.unzipWith=hd,it.update=Q_,it.updateWith=ty,it.values=fh,it.valuesIn=ey,it.without=$0,it.words=Dd,it.wrap=Yv,it.xor=K0,it.xorBy=Q0,it.xorWith=tv,it.zip=ev,it.zipObject=iv,it.zipObjectDeep=nv,it.zipWith=rv,it.entries=Ld,it.entriesIn=Rd,it.extend=Ad,it.extendWith=Zu,df(it,it),it.add=e1,it.attempt=zd,it.camelCase=sy,it.capitalize=Od,it.ceil=i1,it.clamp=iy,it.clone=Jv,it.cloneDeep=Kv,it.cloneDeepWith=Qv,it.cloneWith=$v,it.conformsTo=t_,it.deburr=Id,it.defaultTo=Dy,it.divide=n1,it.endsWith=oy,it.eq=Fs,it.escape=ay,it.escapeRegExp=ly,it.every=mv,it.find=vv,it.findIndex=rd,it.findKey=L_,it.findLast=_v,it.findLastIndex=sd,it.findLastKey=R_,it.floor=r1,it.forEach=cd,it.forEachRight=fd,it.forIn=O_,it.forInRight=I_,it.forOwn=D_,it.forOwnRight=z_,it.get=hf,it.gt=e_,it.gte=i_,it.has=N_,it.hasIn=uf,it.head=ad,it.identity=Gr,it.includes=Mv,it.indexOf=_0,it.inRange=ny,it.invoke=G_,it.isArguments=bl,it.isArray=vi,it.isArrayBuffer=n_,it.isArrayLike=Fr,it.isArrayLikeObject=Dn,it.isBoolean=r_,it.isBuffer=Da,it.isDate=s_,it.isElement=o_,it.isEmpty=a_,it.isEqual=l_,it.isEqualWith=h_,it.isError=af,it.isFinite=u_,it.isFunction=Wo,it.isInteger=xd,it.isLength=qu,it.isMap=wd,it.isMatch=c_,it.isMatchWith=f_,it.isNaN=p_,it.isNative=d_,it.isNil=g_,it.isNull=m_,it.isNumber=Td,it.isObject=wn,it.isObjectLike=Ln,it.isPlainObject=eu,it.isRegExp=lf,it.isSafeInteger=v_,it.isSet=Md,it.isString=Yu,it.isSymbol=ts,it.isTypedArray=ch,it.isUndefined=__,it.isWeakMap=y_,it.isWeakSet=x_,it.join=M0,it.kebabCase=hy,it.last=Es,it.lastIndexOf=S0,it.lowerCase=uy,it.lowerFirst=cy,it.lt=w_,it.lte=T_,it.max=s1,it.maxBy=o1,it.mean=a1,it.meanBy=l1,it.min=h1,it.minBy=u1,it.stubArray=gf,it.stubFalse=vf,it.stubObject=Zy,it.stubString=Jy,it.stubTrue=$y,it.multiply=c1,it.nth=E0,it.noConflict=Gy,it.noop=mf,it.now=Wu,it.pad=fy,it.padEnd=py,it.padStart=dy,it.parseInt=my,it.random=ry,it.reduce=Cv,it.reduceRight=Pv,it.repeat=gy,it.replace=vy,it.result=Y_,it.round=f1,it.runInContext=Lt,it.sample=Rv,it.size=Dv,it.snakeCase=_y,it.some=zv,it.sortedIndex=O0,it.sortedIndexBy=I0,it.sortedIndexOf=D0,it.sortedLastIndex=z0,it.sortedLastIndexBy=k0,it.sortedLastIndexOf=B0,it.startCase=xy,it.startsWith=wy,it.subtract=p1,it.sum=d1,it.sumBy=m1,it.template=Ty,it.times=Ky,it.toFinite=jo,it.toInteger=wi,it.toLength=Ed,it.toLower=My,it.toNumber=bs,it.toSafeInteger=M_,it.toString=Zi,it.toUpper=Sy,it.trim=Ey,it.trimEnd=by,it.trimStart=Ay,it.truncate=Cy,it.unescape=Py,it.uniqueId=t1,it.upperCase=Ly,it.upperFirst=cf,it.each=cd,it.eachRight=fd,it.first=ad,df(it,function(){var r={};return Nr(it,function(h,g){Ti.call(it.prototype,g)||(r[g]=h)}),r}(),{chain:!1}),it.VERSION=c,Ji(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){it[r].placeholder=it}),Ji(["drop","take"],function(r,h){yi.prototype[r]=function(g){g=g===o?1:vn(wi(g),0);var O=this.__filtered__&&!h?new yi(this):this.clone();return O.__filtered__?O.__takeCount__=Vn(g,O.__takeCount__):O.__views__.push({size:Vn(g,Ot),type:r+(O.__dir__<0?"Right":"")}),O},yi.prototype[r+"Right"]=function(g){return this.reverse()[r](g).reverse()}}),Ji(["filter","map","takeWhile"],function(r,h){var g=h+1,O=g==G||g==Et;yi.prototype[r]=function(Y){var ut=this.clone();return ut.__iteratees__.push({iteratee:oi(Y,3),type:g}),ut.__filtered__=ut.__filtered__||O,ut}}),Ji(["head","last"],function(r,h){var g="take"+(h?"Right":"");yi.prototype[r]=function(){return this[g](1).value()[0]}}),Ji(["initial","tail"],function(r,h){var g="drop"+(h?"":"Right");yi.prototype[r]=function(){return this.__filtered__?new yi(this):this[g](1)}}),yi.prototype.compact=function(){return this.filter(Gr)},yi.prototype.find=function(r){return this.filter(r).head()},yi.prototype.findLast=function(r){return this.reverse().find(r)},yi.prototype.invokeMap=ae(function(r,h){return typeof r=="function"?new yi(this):this.map(function(g){return e(g,r,h)})}),yi.prototype.reject=function(r){return this.filter(Xu(oi(r)))},yi.prototype.slice=function(r,h){r=wi(r);var g=this;return g.__filtered__&&(r>0||h<0)?new yi(g):(r<0?g=g.takeRight(-r):r&&(g=g.drop(r)),h!==o&&(h=wi(h),g=h<0?g.dropRight(-h):g.take(h-r)),g)},yi.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},yi.prototype.toArray=function(){return this.take(Ot)},Nr(yi.prototype,function(r,h){var g=/^(?:filter|find|map|reject)|While$/.test(h),O=/^(?:head|last)$/.test(h),Y=it[O?"take"+(h=="last"?"Right":""):h],ut=O||/^find/.test(h);Y&&(it.prototype[h]=function(){var _t=this.__wrapped__,bt=O?[1]:arguments,Nt=_t instanceof yi,se=bt[0],le=Nt||vi(_t),de=function(Pi){var Fi=Y.apply(it,fs([Pi],bt));return O&&ze?Fi[0]:Fi};le&&g&&typeof se=="function"&&se.length!=1&&(Nt=le=!1);var ze=this.__chain__,Je=!!this.__actions__.length,hi=ut&&!ze,Mi=Nt&&!Je;if(!ut&&le){_t=Mi?_t:new yi(this);var ui=r.apply(_t,bt);return ui.__actions__.push({func:Hu,args:[de],thisArg:o}),new qn(ui,ze)}return hi&&Mi?r.apply(this,bt):(ui=this.thru(de),hi?O?ui.value()[0]:ui.value():ui)})}),Ji(["pop","push","shift","sort","splice","unshift"],function(r){var h=On[r],g=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",O=/^(?:pop|shift)$/.test(r);it.prototype[r]=function(){var Y=arguments;if(O&&!this.__chain__){var ut=this.value();return h.apply(vi(ut)?ut:[],Y)}return this[g](function(_t){return h.apply(vi(_t)?_t:[],Y)})}}),Nr(yi.prototype,function(r,h){var g=it[h];if(g){var O=g.name+"";Ti.call(no,O)||(no[O]=[]),no[O].push({name:h,func:g})}}),no[$i(o,T).name]=[{name:"wrapper",func:o}],yi.prototype.clone=Sa,yi.prototype.reverse=Cu,yi.prototype.value=Ea,it.prototype.at=ov,it.prototype.chain=av,it.prototype.commit=lv,it.prototype.next=hv,it.prototype.plant=cv,it.prototype.reverse=fv,it.prototype.toJSON=it.prototype.valueOf=it.prototype.value=pv,it.prototype.first=it.prototype.head,io&&(it.prototype[io]=uv),it},to=Hc();Zr?((Zr.exports=to)._=to,Ys._=to):gn._=to}).call(Er)}(ru,ru.exports);var rm=ru.exports;const $u=Ju(rm);class sm{constructor(a,o=[],c=!1){_f(this,"simplifyFunc",a=>{try{a=turf.simplify(a,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return a});mars3d?(this.vectorArr=o,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""},this.isDynamicMasking=c):console.error("未引入指定插件")}remove(a,o=null){o&&o.isClone=="true"?window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"vectorId")):(window.map.removeLayer(window.map.getLayer(a,"vectorId")),window.dynamicMasking&&window.dynamicMasking.remove(a))}add(a,o){return new Promise((c,d)=>{let u,m=o==null?void 0:o.isClone;if(typeof a!="object"){let k=window.map.getLayer(a,"vectorId");if(k)return c(k);u=this.query(a)}else{let k=window.map.getLayer(a.id,"vectorId");if(k)return c(k);u=a}let{value:_,url:y,id:S,title:A}=u;new Cesium.Resource({url:y}).fetchJson().then(k=>{let{id:D,title:F,shpInfo:E}=u,{attributes:L,geometryType:T,geometryCount:M,pointCount:R}=E;if(L){let{width:b,materialType:U,materialOptions:N,clampToGround:j,distanceDisplayCondition:J,distanceDisplayCondition_near:$,distanceDisplayCondition_far:ct,zIndex:It,label:et,fill:yt,diffHeight:G,outline:Pt,outlineStyle:Et,color:Ct,pixelSize:fe,outlineColor:re,outlineWidth:Ft,classificationType:Ot}=JSON.parse(L),Bt;switch(this.isDynamicMasking?(et.color=Cesium.Color.fromCssColorString(et.color).withAlpha(0),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor).withAlpha(.001),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor).withAlpha(.001),et.background=!1,et.outline=!1,et.show=!1):(et.color=Cesium.Color.fromCssColorString(et.color),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor)),T){case"LineString":case"MultiLineString":et.backgroundPadding=5,Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polylineC",styleOptions:{width:b,clampToGround:j,distanceDisplayCondition:J,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:$,materialType:U,materialOptions:N,classificationType:Ot,label:et}},hasZIndex:!0,zIndex:It});break;case"Polygon":case"MultiPolygon":U=="PolyGrass"&&(N={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polygon",styleOptions:{fill:yt,diffHeight:G,clampToGround:j,materialType:U,materialOptions:N,distanceDisplayCondition:J,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:$,outlineStyle:Et,outline:Pt,classificationType:Ot,label:et}}});break;case"Point":case"MultiPoint":Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"pointP",styleOptions:{color:Ct,pixelSize:fe,outline:Pt,outlineColor:re,outlineWidth:Ft,visibleDepth:!1,label:et}}});break}m?window.mapClone.mapEx.addLayer(Bt):window.map.addLayer(Bt),Bt.bindPopup(ce=>{let Yt='<div class="bim-map-popup">';return Object.keys(ce.graphic.attr).forEach(($e,Oi)=>{ce.graphic.attr[$e]&&(Yt+=`<p><b>${$e}</b> : ${ce.graphic.attr[$e]}</p>`)}),Yt+="</div>",Yt});let ke=$u.debounce(ce=>{console.log("测试shp矢量加载完成"),window.dynamicMasking.add(ce,JSON.parse(L))},500);Bt.readyPromise.then(ce=>{window.dynamicMasking&&ke(ce),c(ce)}).catch(ce=>{console.error("测试shp矢量加载失败",ce),c({tite:"【矢量】<"+F+">无法加载",type:"error",id:D,url:y})})}else c({tite:"【矢量】<"+F+">无法加载",type:"error",id:D,url:y})}).catch(k=>{console.error("数据有误",k),c({tite:"【矢量】<"+A+">链接地址有误",type:"error",id:S,url:y})})})}updateData(a){this.vectorArr=a}processingKML(a){let o,c=2e3,d=!0,{kmlInfo:u}=a,{fill:m,areaColor:_,areaSideColor:y,transparency:S,isAreaSideColor:A,minDistinct:I,textDistinct:k,textSize:D,textColor:F,fontStyle:E,outLine:L,sideColor:T,backGround:M,backGroundColor:R,clampToGround:b}=u,U={fill:m,color:_,opacity:S||.5,outline:A,outlineColor:y,outlineWidth:2,clampToGround:b,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,classificationType:o,opacity:String(S)},N={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:F||"#ffffff",font_family:E||"黑体",outline:L||!0,outlineColor:T||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,background:M||!1,backgroundColor:R||"",visibleDepth:d,clampToGround:b||!1,disableDepthTestDistance:c};return{...U,label:N}}selected(a){window.map.getLayer(a,"vectorId")&&window.map.getLayer(a,"vectorId").flyTo()}query(a){return this.vectorArr.length==0?!1:this.vectorArr.find(o=>o.id==a)}queryVector(a){return window.map.getLayer(a,"vectorId")}editVector(a,o,c){let d=window.map.getLayer(a,"vectorId"),u=Mf(o,c);d&&(d.eachGraphic(m=>{m.label.show===!1&&(delete m.label.outline,delete m.label.background,delete m.label.outlineColor,delete m.label.backgroundColor),m.setStyle({...u})}),window.dynamicMasking&&dynamicMasking.modify(a,u))}nationalBoundaries(a="/gis/nationalBoundaries.json"){let o=new mars3d.layer.GeoJsonLayer({name:"国界",url:a,format:c=>{try{c=turf.simplify(c,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(d){console.error(d)}return c},symbol:{type:"polylineC",styleOptions:{width:2,materialType:"Color",materialOptions:{color:"#CD9B1D"},distanceDisplayCondition:!0,distanceDisplayCondition_near:1e3,distanceDisplayCondition_far:2e7,clampToGround:!0,classificationType:Cesium.ClassificationType.TERRAIN}}});map.addLayer(o)}switchDynamicMasking(a){this.isDynamicMasking=a}}class om{constructor(a=[]){mars3d?(this.terrainProviderArr=a,this.terrainProviderId="",this.events={},window.map.on(mars3d.EventType.terrainLoadError,o=>{console.error("地形服务加载失败",o),this.hide()}),window.map.viewer.scene.globe.tileLoadProgressEvent.addEventListener(o=>{window.map.viewer.scene.globe.tilesLoaded&&this.emit("load",o)})):console.error("未引入指定插件")}add(a){let{url:o,id:c}=a;if(this.terrainProviderId==c&&window.map.terrainProvider._layers)return!1;window.map.terrainProvider=mars3d.LayerUtil.createTerrainProvider({imageXyzId:c,type:"xyz",url:o,requestVertexNormals:!0,requestMetadata:!0}),this.terrainProviderId=c}show(){window.map.hasTerrain=!0}hide(){window.map.hasTerrain=!1}on(a,o){a=="load"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}addClip(a){return new Promise((o,c)=>{window.bimClip?o(bimClip.clipGisAdd(a)):c("挖洞工具未初始化")})}}class am{constructor(a=[],o){mars3d?(this.elevationImageArr=a,this.elevationImageLayer,o?this.gisTkone={Authorization:`Bearer ${o}`}:this.gisTkone={},this.form={brightnessVal:1.3,msaaSamples:4,surfaceOpacity:1,layerOpacity:1,layerBrightness:2,layerContrast:1,layerHue:0,layerSaturation:1,layerGamma:1},this.tdtLayer=null):console.error("未引入指定插件")}pushVector(a){this.elevationImageArr.push(a)}add(a,o=!0,c){let d;if(typeof a!="object"?d=a:d=a.imageXyzId,window.map.getLayer(d,"imageXyzId"))return!1;const{layerOpacity:u,layerBrightness:m,layerContrast:_,layerHue:y,layerSaturation:S,layerGamma:A,surfaceOpacity:I}=this.exposureEnvironmentSettings();return new Promise((k,D)=>{let F,E,L,T,M,R;if(typeof a!="object"){let b=this.query(a);b||D("缺少树结构");let{gisInfo:U}=b;F=U.id,L=U.order,E=b.url,T=U.minLevel,M=U.maxLevel}else F=a.imageXyzId,E=a.url,L=a.zIndex,T=a.minimumLevel,M=a.maximumLevel,R=a.chinaCRS;this.elevationImageLayer=new mars3d.layer.XyzLayer({imageXyzId:F,type:"xyz",url:E,hasZIndex:!0,zIndex:L.toString(),brightness:m,opacity:u,saturation:S,contrast:_,hue:y,gamma:A,alpha:I,show:!0,minimumLevel:T||0,maximumLevel:M||15,chinaCRS:R,headers:o?this.gisTkone:null}),this.elevationImageLayer.on(mars3d.EventType.load,b=>{k(b)}),window.map.addLayer(this.elevationImageLayer),c&&Object.keys(c).forEach(b=>{this.elevationImageLayer.on(fnType.get(b),U=>{c[b](U)})})})}remove(a){console.log(a),window.map.removeLayer(window.map.getLayer(a,"imageXyzId"))}query(a){return this.elevationImageArr.length==0?!1:this.elevationImageArr.find(o=>o.id==a)}initial(){this.elevationImageArr=[],this.elevationImageLayer=null}exposureEnvironmentSettings(){return localStorage.getItem("environmentSettings")?JSON.parse(localStorage.getItem("environmentSettings")):(localStorage.setItem("environmentSettings",JSON.stringify(this.form)),JSON.parse(JSON.stringify(this.form)))}}class lm{constructor(a,o,...c){_f(this,"manualFreed",$u.debounce(()=>{let{lng:a,lat:o,alt:c,pitch:d}=this.map.getCameraView(),u;this.modelArray.forEach(m=>{u=m.releasedDistance?m.releasedDistance:1e4,this.disTance([a,o,c],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(d,u))?this.map.getLayer(m.id,"modelId")&&this.emit("leave",m):this.map.getLayer(m.id,"modelId")||this.emit("enter",m)})},200));mars3d?(a&&a!=null&&(this.modelArray=a),this.showModelArray=[],o&&o!=null&&(this.map=o),this.Cesium=mars3d.Cesium,this.events={}):console.error("未引入指定插件")}on(a,o){a=="enter"||a=="leave"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}say(a){return this[a]}add(a,o){this[a].push(o)}remove(a,o){this[a]=this[a].filter(function(c){return c!==o})}initial(){this.modelArray=[],this.events={}}updateCustomExcavationDetails(a,o,c,d=[],u={}){let m,_,y;switch(m=this.modelArray.find(S=>S.modelId==a).customize.bimModelExcavationDetails,y=m.find((S,A)=>{if(S.id==o)return _=A,S}),c){case"delete":m.splice(_,1);break;case"update":y.excavationDetails=d;break;case"add":m.push(u);break;case"edit":y.excavationDetails=u.excavationDetails,y.kId=u.kId;break}return m}resourceRelease(){this.map.viewer.camera.moveEnd.addEventListener(()=>{this.freed()})}freed(){let{alt:a}=this.map.getCameraView();a<2e4&&(this.freed=$u.throttle(()=>{let{lng:o,lat:c,alt:d,pitch:u}=this.map.getCameraView();this.modelArray&&this.modelArray.forEach(m=>{let _=m.bimModel.releasedDistance?m.bimModel.releasedDistance:1e4;m.center&&this.disTance([o,c,d],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(u,_))?this.map.getLayer(m.id,"modelId")&&this.emit("leave",m):this.showModelArray.indexOf(m.id)>=0&&!this.map.getLayer(m.id,"modelId")&&this.emit("enter",m)})},2e3),this.freed())}findPnodeId(a,o,c="id"){let d;if(a){for(var u=0;u<a.length;u++){let m=a[u];if(m[c]==o)return d=m,d;if(m.children&&m.children.length>0&&(d=this.findPnodeId(m.children,o,c),d))return d}return d}}disTance(a,o,c){let d,u,m;return d=Cesium.Cartesian3.fromDegrees(...a),u=Cesium.Cartesian3.fromDegrees(...o),m=Cesium.Cartesian3.distance(d,u),m>c}calculateDistance(a,o){let c=(a+180)%360-180;c=Math.max(-90,Math.min(c,90));let d=(o-o/5)*(Math.abs(c)/90)+o/5;return Math.round(d)}}class hm{constructor(a=[],o){mars3d?(this.entityArr=a,this.entityLayer=new mars3d.layer.GraphicLayer({entityId:"bimEntity"}),window.map.addLayer(this.entityLayer),this.entityItem=null,this.events={},this.entityCloneLayer):console.error("未引入指定插件")}on(a,o){a=="change"||a=="collection"||a=="collection"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}offAll(){this.events={}}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}add(a,o=null,c){return new Promise((d,u)=>{var m;if(this.entityLayer){let _,y,S;if(c==null?void 0:c.isClone)this.entityCloneLayer&&(y=this.query(a),S=JSON.parse(y.bimPlanPainting.graphic),console.log(S),S.attr=S.attr||{},S.attr.entityId=a,this.entityCloneLayer.addGraphic(S));else{if(typeof a!="object"?(_=this.entityLayer.getGraphicByAttr(a,"entityId"),y=this.query(a),S=JSON.parse(y.bimPlanPainting.graphic),console.log(S),S.attr=S.attr||{},S.attr.entityId=a):(_=this.entityLayer.getGraphicByAttr(a.id,"entityId"),S=JSON.parse(JSON.stringify(a)),S.attr=S.attr||{},S.attr.entityId=S.attr.entityId||o,S.attr==null?S.attr={entityId:a.id}:((m=S.attr)==null?void 0:m.entityId)==null&&o&&(S.attr.entityId=o)),_)return d();this.entityLayer.addGraphic(S),d(S)}}else d(),console.error("未初始化标绘实例图层")})}query(a){return this.entityArr.length==0?!1:this.entityArr.find(o=>o.id==a)}queryEntity(a){if(bimEntity.entityLayer)return bimEntity.entityLayer.getGraphicByAttr(a,"entityId")}selected(a,o=null){let c=this.entityLayer.getGraphicByAttr(a,"entityId");o==null||o.isClone,(c.options.type=="div"||c.options.type=="point")&&c._point?c.flyTo({radius:c._point._alt+500<500?5e3:c._point._alt+500}):c.flyTo()}remove(a,o=null){(o==null?void 0:o.isClone)?this.entityCloneLayer&&this.entityCloneLayer.getGraphicByAttr(a,"entityId").remove():this.entityLayer.getGraphicByAttr(a,"entityId")&&(this.entityLayer.getGraphicByAttr(a,"entityId").remove(),this.entityItem&&(this.entityItem._state=="destroy"||this.entityItem.options.attr.entityId==a)&&(this.entityItem=null))}entityCloneLayerInit(){this.entityCloneLayer==null&&(this.entityCloneLayer=window.mapClone._mapEx.getLayer("bimEntity","entityId"))}entityCloneLayerRemove(){this.entityCloneLayer.remove(),this.entityCloneLayer=null}removeEntityItem(){this.entityItem=null}updateData(a){this.entityArr=a}startDrawGraphic(a){return new Promise((o,c)=>{let{type:d,style:u}=a;if(d=="div")if(u.html)this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m)},500)});else{let{title:m,divType:_,theme_color:y,font_color:S,scaleByDistance:A,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M}=u,R={type:"div",style:{pointerEvents:!0,scaleByDistance:A,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M,horizontalOrigin:Cesium.HorizontalOrigin.LEFT,verticalOrigin:Cesium.VerticalOrigin.BOTTOM}};switch(_){case"1":R.style.html=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${y};--theme-font-color1:${S};">
|
|
2635
|
+
}`;var Mi=zd(function(){return Ni(ut,Je+"return "+de).apply(o,_t)});if(Mi.source=de,af(Mi))throw Mi;return Mi}function My(r){return Zi(r).toLowerCase()}function Sy(r){return Zi(r).toUpperCase()}function Ey(r,h,g){if(r=Zi(r),r&&(g||h===o))return ga(r);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=ar(h),ut=Qs(O,Y),_t=Eo(O,Y)+1;return xn(O,ut,_t).join("")}function by(r,h,g){if(r=Zi(r),r&&(g||h===o))return r.slice(0,va(r)+1);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=Eo(O,ar(h))+1;return xn(O,0,Y).join("")}function Ay(r,h,g){if(r=Zi(r),r&&(g||h===o))return r.replace(ls,"");if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=Qs(O,ar(h));return xn(O,Y).join("")}function Cy(r,h){var g=ct,O=It;if(wn(h)){var Y="separator"in h?h.separator:Y;g="length"in h?wi(h.length):g,O="omission"in h?Ye(h.omission):O}r=Zi(r);var ut=r.length;if(Ir(r)){var _t=ar(r);ut=_t.length}if(g>=ut)return r;var bt=g-$r(O);if(bt<1)return O;var Nt=_t?xn(_t,0,bt).join(""):r.slice(0,bt);if(Y===o)return Nt+O;if(_t&&(bt+=Nt.length-bt),lf(Y)){if(r.slice(bt).search(Y)){var se,le=Nt;for(Y.global||(Y=Kn(Y.source,Zi(Gl.exec(Y))+"g")),Y.lastIndex=0;se=Y.exec(le);)var de=se.index;Nt=Nt.slice(0,de===o?bt:de)}}else if(r.indexOf(Ye(Y),bt)!=bt){var ze=Nt.lastIndexOf(Y);ze>-1&&(Nt=Nt.slice(0,ze))}return Nt+O}function Py(r){return r=Zi(r),r&&Xs.test(r)?r.replace(As,Jl):r}var Ly=De(function(r,h,g){return r+(g?" ":"")+h.toUpperCase()}),cf=Me("toUpperCase");function Dd(r,h,g){return r=Zi(r),h=g?o:h,h===o?Po(r)?Gc(r):il(r):r.match(h)||[]}var zd=ae(function(r,h){try{return _r(r,o,h)}catch(g){return af(g)?g:new ai(g)}}),Ry=Ho(function(r,h){return Ji(h,function(g){g=ho(g),ks(r,g,sf(r[g],r))}),r});function Oy(r){var h=r==null?0:r.length,g=oi();return r=h?Yi(r,function(O){if(typeof O[1]!="function")throw new lr(m);return[g(O[0]),O[1]]}):[],ae(function(O){for(var Y=-1;++Y<h;){var ut=r[Y];if(_r(ut[0],this,O))return _r(ut[1],this,O)}})}function Iy(r){return Pa(wr(r,I))}function ff(r){return function(){return r}}function Dy(r,h){return r==null||r!==r?h:r}var zy=Li(),ky=Li(!0);function Gr(r){return r}function pf(r){return H(typeof r=="function"?r:wr(r,I))}function By(r){return gt(wr(r,I))}function Ny(r,h){return At(r,wr(h,I))}var Fy=ae(function(r,h){return function(g){return e(g,r,h)}}),Uy=ae(function(r,h){return function(g){return e(r,g,h)}});function df(r,h,g){var O=Jn(h),Y=Fo(h,O);g==null&&!(wn(h)&&(Y.length||!O.length))&&(g=h,h=r,r=this,Y=Fo(h,Jn(h)));var ut=!(wn(g)&&"chain"in g)||!!g.chain,_t=Wo(r);return Ji(Y,function(bt){var Nt=h[bt];r[bt]=Nt,_t&&(r.prototype[bt]=function(){var se=this.__chain__;if(ut||se){var le=r(this.__wrapped__),de=le.__actions__=er(this.__actions__);return de.push({func:Nt,args:arguments,thisArg:r}),le.__chain__=se,le}return Nt.apply(r,fs([this.value()],arguments))})}),r}function Gy(){return gn._===this&&(gn._=Kr),this}function mf(){}function Hy(r){return r=wi(r),ae(function(h){return Z(h,r)})}var Vy=Nn(Yi),Wy=Nn(Ih),jy=Nn(Cs);function kd(r){return Kc(r)?Js(ho(r)):$t(r)}function Xy(r){return function(h){return r==null?o:ao(r,h)}}var qy=$h(),Yy=$h(!0);function gf(){return[]}function vf(){return!1}function Zy(){return{}}function Jy(){return""}function $y(){return!0}function Ky(r,h){if(r=wi(r),r<1||r>fe)return[];var g=Ot,O=Vn(r,Ot);h=oi(h),r-=Ot;for(var Y=Ls(O,h);++g<r;)h(g);return Y}function Qy(r){return vi(r)?Yi(r,ho):ts(r)?[r]:er(id(Zi(r)))}function t1(r){var h=++ur;return Zi(r)+h}var e1=Tr(function(r,h){return r+h},0),i1=hh("ceil"),n1=Tr(function(r,h){return r/h},1),r1=hh("floor");function s1(r){return r&&r.length?Ts(r,Gr,oh):o}function o1(r,h){return r&&r.length?Ts(r,oi(h,2),oh):o}function a1(r){return ma(r,Gr)}function l1(r,h){return ma(r,oi(h,2))}function h1(r){return r&&r.length?Ts(r,Gr,rt):o}function u1(r,h){return r&&r.length?Ts(r,oi(h,2),rt):o}var c1=Tr(function(r,h){return r*h},1),f1=hh("round"),p1=Tr(function(r,h){return r-h},0);function d1(r){return r&&r.length?Ks(r,Gr):0}function m1(r,h){return r&&r.length?Ks(r,oi(h,2)):0}return it.after=Bv,it.ary=pd,it.assign=S_,it.assignIn=Ad,it.assignInWith=Zu,it.assignWith=E_,it.at=b_,it.before=dd,it.bind=sf,it.bindAll=Ry,it.bindKey=md,it.castArray=Zv,it.chain=ud,it.chunk=r0,it.compact=s0,it.concat=o0,it.cond=Oy,it.conforms=Iy,it.constant=ff,it.countBy=dv,it.create=A_,it.curry=gd,it.curryRight=vd,it.debounce=_d,it.defaults=C_,it.defaultsDeep=P_,it.defer=Nv,it.delay=Fv,it.difference=a0,it.differenceBy=l0,it.differenceWith=h0,it.drop=u0,it.dropRight=c0,it.dropRightWhile=f0,it.dropWhile=p0,it.fill=d0,it.filter=gv,it.flatMap=yv,it.flatMapDeep=xv,it.flatMapDepth=wv,it.flatten=od,it.flattenDeep=m0,it.flattenDepth=g0,it.flip=Uv,it.flow=zy,it.flowRight=ky,it.fromPairs=v0,it.functions=k_,it.functionsIn=B_,it.groupBy=Tv,it.initial=y0,it.intersection=x0,it.intersectionBy=w0,it.intersectionWith=T0,it.invert=F_,it.invertBy=U_,it.invokeMap=Sv,it.iteratee=pf,it.keyBy=Ev,it.keys=Jn,it.keysIn=Ur,it.map=Vu,it.mapKeys=H_,it.mapValues=V_,it.matches=By,it.matchesProperty=Ny,it.memoize=ju,it.merge=W_,it.mergeWith=Cd,it.method=Fy,it.methodOf=Uy,it.mixin=df,it.negate=Xu,it.nthArg=Hy,it.omit=j_,it.omitBy=X_,it.once=Gv,it.orderBy=bv,it.over=Vy,it.overArgs=Hv,it.overEvery=Wy,it.overSome=jy,it.partial=of,it.partialRight=yd,it.partition=Av,it.pick=q_,it.pickBy=Pd,it.property=kd,it.propertyOf=Xy,it.pull=b0,it.pullAll=ld,it.pullAllBy=A0,it.pullAllWith=C0,it.pullAt=P0,it.range=qy,it.rangeRight=Yy,it.rearg=Vv,it.reject=Lv,it.remove=L0,it.rest=Wv,it.reverse=nf,it.sampleSize=Ov,it.set=Z_,it.setWith=J_,it.shuffle=Iv,it.slice=R0,it.sortBy=kv,it.sortedUniq=N0,it.sortedUniqBy=F0,it.split=yy,it.spread=jv,it.tail=U0,it.take=G0,it.takeRight=H0,it.takeRightWhile=V0,it.takeWhile=W0,it.tap=sv,it.throttle=Xv,it.thru=Hu,it.toArray=Sd,it.toPairs=Ld,it.toPairsIn=Rd,it.toPath=Qy,it.toPlainObject=bd,it.transform=$_,it.unary=qv,it.union=j0,it.unionBy=X0,it.unionWith=q0,it.uniq=Y0,it.uniqBy=Z0,it.uniqWith=J0,it.unset=K_,it.unzip=rf,it.unzipWith=hd,it.update=Q_,it.updateWith=ty,it.values=fh,it.valuesIn=ey,it.without=$0,it.words=Dd,it.wrap=Yv,it.xor=K0,it.xorBy=Q0,it.xorWith=tv,it.zip=ev,it.zipObject=iv,it.zipObjectDeep=nv,it.zipWith=rv,it.entries=Ld,it.entriesIn=Rd,it.extend=Ad,it.extendWith=Zu,df(it,it),it.add=e1,it.attempt=zd,it.camelCase=sy,it.capitalize=Od,it.ceil=i1,it.clamp=iy,it.clone=Jv,it.cloneDeep=Kv,it.cloneDeepWith=Qv,it.cloneWith=$v,it.conformsTo=t_,it.deburr=Id,it.defaultTo=Dy,it.divide=n1,it.endsWith=oy,it.eq=Fs,it.escape=ay,it.escapeRegExp=ly,it.every=mv,it.find=vv,it.findIndex=rd,it.findKey=L_,it.findLast=_v,it.findLastIndex=sd,it.findLastKey=R_,it.floor=r1,it.forEach=cd,it.forEachRight=fd,it.forIn=O_,it.forInRight=I_,it.forOwn=D_,it.forOwnRight=z_,it.get=hf,it.gt=e_,it.gte=i_,it.has=N_,it.hasIn=uf,it.head=ad,it.identity=Gr,it.includes=Mv,it.indexOf=_0,it.inRange=ny,it.invoke=G_,it.isArguments=bl,it.isArray=vi,it.isArrayBuffer=n_,it.isArrayLike=Fr,it.isArrayLikeObject=Dn,it.isBoolean=r_,it.isBuffer=Da,it.isDate=s_,it.isElement=o_,it.isEmpty=a_,it.isEqual=l_,it.isEqualWith=h_,it.isError=af,it.isFinite=u_,it.isFunction=Wo,it.isInteger=xd,it.isLength=qu,it.isMap=wd,it.isMatch=c_,it.isMatchWith=f_,it.isNaN=p_,it.isNative=d_,it.isNil=g_,it.isNull=m_,it.isNumber=Td,it.isObject=wn,it.isObjectLike=Ln,it.isPlainObject=eu,it.isRegExp=lf,it.isSafeInteger=v_,it.isSet=Md,it.isString=Yu,it.isSymbol=ts,it.isTypedArray=ch,it.isUndefined=__,it.isWeakMap=y_,it.isWeakSet=x_,it.join=M0,it.kebabCase=hy,it.last=Es,it.lastIndexOf=S0,it.lowerCase=uy,it.lowerFirst=cy,it.lt=w_,it.lte=T_,it.max=s1,it.maxBy=o1,it.mean=a1,it.meanBy=l1,it.min=h1,it.minBy=u1,it.stubArray=gf,it.stubFalse=vf,it.stubObject=Zy,it.stubString=Jy,it.stubTrue=$y,it.multiply=c1,it.nth=E0,it.noConflict=Gy,it.noop=mf,it.now=Wu,it.pad=fy,it.padEnd=py,it.padStart=dy,it.parseInt=my,it.random=ry,it.reduce=Cv,it.reduceRight=Pv,it.repeat=gy,it.replace=vy,it.result=Y_,it.round=f1,it.runInContext=Lt,it.sample=Rv,it.size=Dv,it.snakeCase=_y,it.some=zv,it.sortedIndex=O0,it.sortedIndexBy=I0,it.sortedIndexOf=D0,it.sortedLastIndex=z0,it.sortedLastIndexBy=k0,it.sortedLastIndexOf=B0,it.startCase=xy,it.startsWith=wy,it.subtract=p1,it.sum=d1,it.sumBy=m1,it.template=Ty,it.times=Ky,it.toFinite=jo,it.toInteger=wi,it.toLength=Ed,it.toLower=My,it.toNumber=bs,it.toSafeInteger=M_,it.toString=Zi,it.toUpper=Sy,it.trim=Ey,it.trimEnd=by,it.trimStart=Ay,it.truncate=Cy,it.unescape=Py,it.uniqueId=t1,it.upperCase=Ly,it.upperFirst=cf,it.each=cd,it.eachRight=fd,it.first=ad,df(it,function(){var r={};return Nr(it,function(h,g){Ti.call(it.prototype,g)||(r[g]=h)}),r}(),{chain:!1}),it.VERSION=c,Ji(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){it[r].placeholder=it}),Ji(["drop","take"],function(r,h){yi.prototype[r]=function(g){g=g===o?1:vn(wi(g),0);var O=this.__filtered__&&!h?new yi(this):this.clone();return O.__filtered__?O.__takeCount__=Vn(g,O.__takeCount__):O.__views__.push({size:Vn(g,Ot),type:r+(O.__dir__<0?"Right":"")}),O},yi.prototype[r+"Right"]=function(g){return this.reverse()[r](g).reverse()}}),Ji(["filter","map","takeWhile"],function(r,h){var g=h+1,O=g==G||g==Et;yi.prototype[r]=function(Y){var ut=this.clone();return ut.__iteratees__.push({iteratee:oi(Y,3),type:g}),ut.__filtered__=ut.__filtered__||O,ut}}),Ji(["head","last"],function(r,h){var g="take"+(h?"Right":"");yi.prototype[r]=function(){return this[g](1).value()[0]}}),Ji(["initial","tail"],function(r,h){var g="drop"+(h?"":"Right");yi.prototype[r]=function(){return this.__filtered__?new yi(this):this[g](1)}}),yi.prototype.compact=function(){return this.filter(Gr)},yi.prototype.find=function(r){return this.filter(r).head()},yi.prototype.findLast=function(r){return this.reverse().find(r)},yi.prototype.invokeMap=ae(function(r,h){return typeof r=="function"?new yi(this):this.map(function(g){return e(g,r,h)})}),yi.prototype.reject=function(r){return this.filter(Xu(oi(r)))},yi.prototype.slice=function(r,h){r=wi(r);var g=this;return g.__filtered__&&(r>0||h<0)?new yi(g):(r<0?g=g.takeRight(-r):r&&(g=g.drop(r)),h!==o&&(h=wi(h),g=h<0?g.dropRight(-h):g.take(h-r)),g)},yi.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},yi.prototype.toArray=function(){return this.take(Ot)},Nr(yi.prototype,function(r,h){var g=/^(?:filter|find|map|reject)|While$/.test(h),O=/^(?:head|last)$/.test(h),Y=it[O?"take"+(h=="last"?"Right":""):h],ut=O||/^find/.test(h);Y&&(it.prototype[h]=function(){var _t=this.__wrapped__,bt=O?[1]:arguments,Nt=_t instanceof yi,se=bt[0],le=Nt||vi(_t),de=function(Pi){var Fi=Y.apply(it,fs([Pi],bt));return O&&ze?Fi[0]:Fi};le&&g&&typeof se=="function"&&se.length!=1&&(Nt=le=!1);var ze=this.__chain__,Je=!!this.__actions__.length,hi=ut&&!ze,Mi=Nt&&!Je;if(!ut&&le){_t=Mi?_t:new yi(this);var ui=r.apply(_t,bt);return ui.__actions__.push({func:Hu,args:[de],thisArg:o}),new qn(ui,ze)}return hi&&Mi?r.apply(this,bt):(ui=this.thru(de),hi?O?ui.value()[0]:ui.value():ui)})}),Ji(["pop","push","shift","sort","splice","unshift"],function(r){var h=On[r],g=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",O=/^(?:pop|shift)$/.test(r);it.prototype[r]=function(){var Y=arguments;if(O&&!this.__chain__){var ut=this.value();return h.apply(vi(ut)?ut:[],Y)}return this[g](function(_t){return h.apply(vi(_t)?_t:[],Y)})}}),Nr(yi.prototype,function(r,h){var g=it[h];if(g){var O=g.name+"";Ti.call(no,O)||(no[O]=[]),no[O].push({name:h,func:g})}}),no[$i(o,T).name]=[{name:"wrapper",func:o}],yi.prototype.clone=Sa,yi.prototype.reverse=Cu,yi.prototype.value=Ea,it.prototype.at=ov,it.prototype.chain=av,it.prototype.commit=lv,it.prototype.next=hv,it.prototype.plant=cv,it.prototype.reverse=fv,it.prototype.toJSON=it.prototype.valueOf=it.prototype.value=pv,it.prototype.first=it.prototype.head,io&&(it.prototype[io]=uv),it},to=Hc();Zr?((Zr.exports=to)._=to,Ys._=to):gn._=to}).call(Er)}(ru,ru.exports);var rm=ru.exports;const $u=Ju(rm);class sm{constructor(a,o=[],c=!1){_f(this,"simplifyFunc",a=>{try{a=turf.simplify(a,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return a});mars3d?(this.vectorArr=o,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""},this.isDynamicMasking=c):console.error("未引入指定插件")}remove(a,o=null){o&&o.isClone=="true"?window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"vectorId")):(window.map.removeLayer(window.map.getLayer(a,"vectorId")),window.dynamicMasking&&window.dynamicMasking.remove(a))}add(a,o){return new Promise((c,d)=>{let u,m=o==null?void 0:o.isClone;if(typeof a!="object"){let k=window.map.getLayer(a,"vectorId");if(k)return c(k);u=this.query(a)}else{let k=window.map.getLayer(a.id,"vectorId");if(k)return c(k);u=a}let{value:_,url:y,id:S,title:A}=u;new Cesium.Resource({url:y}).fetchJson().then(k=>{let{id:D,title:F,shpInfo:E}=u,{attributes:L,geometryType:T,geometryCount:M,pointCount:R}=E;if(L){let{width:b,materialType:U,materialOptions:N,clampToGround:j,distanceDisplayCondition:J,distanceDisplayCondition_near:$,distanceDisplayCondition_far:ct,zIndex:It,label:et,fill:yt,diffHeight:G,outline:Pt,outlineStyle:Et,color:Ct,pixelSize:fe,outlineColor:re,outlineWidth:Ft,classificationType:Ot}=JSON.parse(L),Bt;switch(this.isDynamicMasking?(et.color=Cesium.Color.fromCssColorString(et.color).withAlpha(0),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor).withAlpha(.001),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor).withAlpha(.001),et.background=!1,et.outline=!1,et.show=!1):(et.color=Cesium.Color.fromCssColorString(et.color),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor)),T){case"LineString":case"MultiLineString":et.backgroundPadding=5,Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polylineC",styleOptions:{width:b,clampToGround:j,distanceDisplayCondition:J,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:$,materialType:U,materialOptions:N,classificationType:Ot,label:et}},hasZIndex:!0,zIndex:It});break;case"Polygon":case"MultiPolygon":U=="PolyGrass"&&(N={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polygon",styleOptions:{fill:yt,diffHeight:G,clampToGround:j,materialType:U,materialOptions:N,distanceDisplayCondition:J,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:$,outlineStyle:Et,outline:Pt,classificationType:Ot,label:et}}});break;case"Point":case"MultiPoint":Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"pointP",styleOptions:{color:Ct,pixelSize:fe,outline:Pt,outlineColor:re,outlineWidth:Ft,visibleDepth:!1,label:et}}});break}m?window.mapClone.mapEx.addLayer(Bt):window.map.addLayer(Bt),Bt.bindPopup(ce=>{let Yt='<div class="bim-map-popup">';return Object.keys(ce.graphic.attr).forEach(($e,Oi)=>{ce.graphic.attr[$e]&&(Yt+=`<p><b>${$e}</b> : ${ce.graphic.attr[$e]}</p>`)}),Yt+="</div>",Yt});let ke=$u.debounce(ce=>{console.log("测试shp矢量加载完成"),window.dynamicMasking.add(ce,JSON.parse(L))},500);Bt.readyPromise.then(ce=>{window.dynamicMasking&&ke(ce),c(ce)}).catch(ce=>{console.error("测试shp矢量加载失败",ce),c({tite:"【矢量】<"+F+">无法加载",type:"error",id:D,url:y})})}else c({tite:"【矢量】<"+F+">无法加载",type:"error",id:D,url:y})}).catch(k=>{console.error("数据有误",k),c({tite:"【矢量】<"+A+">链接地址有误",type:"error",id:S,url:y})})})}updateData(a){this.vectorArr=a}processingKML(a){let o,c=2e3,d=!0,{kmlInfo:u}=a,{fill:m,areaColor:_,areaSideColor:y,transparency:S,isAreaSideColor:A,minDistinct:I,textDistinct:k,textSize:D,textColor:F,fontStyle:E,outLine:L,sideColor:T,backGround:M,backGroundColor:R,clampToGround:b}=u,U={fill:m,color:_,opacity:S||.5,outline:A,outlineColor:y,outlineWidth:2,clampToGround:b,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,classificationType:o,opacity:String(S)},N={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:F||"#ffffff",font_family:E||"黑体",outline:L||!0,outlineColor:T||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,background:M||!1,backgroundColor:R||"",visibleDepth:d,clampToGround:b||!1,disableDepthTestDistance:c};return{...U,label:N}}selected(a){window.map.getLayer(a,"vectorId")&&window.map.getLayer(a,"vectorId").flyTo()}query(a){return this.vectorArr.length==0?!1:this.vectorArr.find(o=>o.id==a)}queryVector(a){return window.map.getLayer(a,"vectorId")}editVector(a,o,c){let d=window.map.getLayer(a,"vectorId"),u=Mf(o,c);d&&(d.eachGraphic(m=>{m.label.show===!1&&(delete m.label.outline,delete m.label.background,delete m.label.outlineColor,delete m.label.backgroundColor),m.setStyle({...u})}),window.dynamicMasking&&dynamicMasking.modify(a,u))}nationalBoundaries(a="/gis/nationalBoundaries.json"){let o=new mars3d.layer.GeoJsonLayer({name:"国界",url:a,format:c=>{try{c=turf.simplify(c,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(d){console.error(d)}return c},symbol:{type:"polylineC",styleOptions:{width:2,materialType:"Color",materialOptions:{color:"#CD9B1D"},distanceDisplayCondition:!0,distanceDisplayCondition_near:1e3,distanceDisplayCondition_far:2e7,clampToGround:!0,classificationType:Cesium.ClassificationType.TERRAIN}}});map.addLayer(o)}switchDynamicMasking(a){this.isDynamicMasking=a}}class om{constructor(a=[]){mars3d?(this.terrainProviderArr=a,this.terrainProviderId="",this.events={},window.map.on(mars3d.EventType.terrainLoadError,o=>{console.error("地形服务加载失败",o),this.hide()}),window.map.viewer.scene.globe.tileLoadProgressEvent.addEventListener(o=>{window.map.viewer.scene.globe.tilesLoaded&&this.emit("load",o)})):console.error("未引入指定插件")}add(a){let{url:o,id:c}=a;if(this.terrainProviderId==c&&window.map.terrainProvider._layers)return!1;window.map.terrainProvider=mars3d.LayerUtil.createTerrainProvider({imageXyzId:c,type:"xyz",url:o,requestVertexNormals:!0,requestMetadata:!0}),this.terrainProviderId=c}show(){window.map.hasTerrain=!0}hide(){window.map.hasTerrain=!1}on(a,o){a=="load"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}addClip(a){return new Promise((o,c)=>{window.bimClip?o(bimClip.clipGisAdd(a)):c("挖洞工具未初始化")})}}class am{constructor(a=[],o){mars3d?(this.elevationImageArr=a,this.elevationImageLayer,o?this.gisTkone={Authorization:`Bearer ${o}`}:this.gisTkone={},this.form={brightnessVal:1.3,msaaSamples:4,surfaceOpacity:1,layerOpacity:1,layerBrightness:2,layerContrast:1,layerHue:0,layerSaturation:1,layerGamma:1},this.tdtLayer=null):console.error("未引入指定插件")}pushVector(a){this.elevationImageArr.push(a)}add(a,o=!0,c){let d;if(typeof a!="object"?d=a:d=a.imageXyzId,window.map.getLayer(d,"imageXyzId"))return!1;const{layerOpacity:u,layerBrightness:m,layerContrast:_,layerHue:y,layerSaturation:S,layerGamma:A,surfaceOpacity:I}=this.exposureEnvironmentSettings();return new Promise((k,D)=>{let F,E,L,T,M,R;if(typeof a!="object"){let b=this.query(a);b||D("缺少树结构");let{gisInfo:U}=b;F=U.id,L=U.order,E=b.url,T=U.minLevel,M=U.maxLevel}else F=a.imageXyzId,E=a.url,L=a.zIndex,T=a.minimumLevel,M=a.maximumLevel,R=a.chinaCRS;this.elevationImageLayer=new mars3d.layer.XyzLayer({imageXyzId:F,type:"xyz",url:E,hasZIndex:!0,zIndex:L.toString(),brightness:m,opacity:u,saturation:S,contrast:_,hue:y,gamma:A,alpha:I,show:!0,minimumLevel:T||0,maximumLevel:M||15,chinaCRS:R,headers:o?this.gisTkone:null}),this.elevationImageLayer.on(mars3d.EventType.load,b=>{k(b)}),window.map.addLayer(this.elevationImageLayer),c&&Object.keys(c).forEach(b=>{this.elevationImageLayer.on(fnType.get(b),U=>{c[b](U)})})})}remove(a){console.log(a),window.map.removeLayer(window.map.getLayer(a,"imageXyzId"))}query(a){return this.elevationImageArr.length==0?!1:this.elevationImageArr.find(o=>o.id==a)}initial(){this.elevationImageArr=[],this.elevationImageLayer=null}exposureEnvironmentSettings(){return localStorage.getItem("environmentSettings")?JSON.parse(localStorage.getItem("environmentSettings")):(localStorage.setItem("environmentSettings",JSON.stringify(this.form)),JSON.parse(JSON.stringify(this.form)))}}class lm{constructor(a,...o){_f(this,"manualFreed",$u.debounce(()=>{let{lng:a,lat:o,alt:c,pitch:d}=window.map.getCameraView(),u;this.modelArray.forEach(m=>{u=m.releasedDistance?m.releasedDistance:1e4,this.disTance([a,o,c],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(d,u))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):window.map.getLayer(m.id,"modelId")||this.emit("enter",m)})},200));mars3d?(a&&a!=null&&(this.modelArray=a),this.showModelArray=[],this.Cesium=mars3d.Cesium,this.events={}):console.error("未引入指定插件")}on(a,o){a=="enter"||a=="leave"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}say(a){return this[a]}add(a,o){this[a].push(o)}remove(a,o){this[a]=this[a].filter(function(c){return c!==o})}initial(){this.modelArray=[],this.events={}}updateCustomExcavationDetails(a,o,c,d=[],u={}){let m,_,y;switch(m=this.modelArray.find(S=>S.modelId==a).customize.bimModelExcavationDetails,y=m.find((S,A)=>{if(S.id==o)return _=A,S}),c){case"delete":m.splice(_,1);break;case"update":y.excavationDetails=d;break;case"add":m.push(u);break;case"edit":y.excavationDetails=u.excavationDetails,y.kId=u.kId;break}return m}resourceRelease(){window.map.viewer.camera.moveEnd.addEventListener(()=>{this.freed()})}freed(){let{alt:a}=window.map.getCameraView();a<2e4&&(this.freed=$u.throttle(()=>{let{lng:o,lat:c,alt:d,pitch:u}=window.map.getCameraView();this.modelArray&&this.modelArray.forEach(m=>{let _=m.bimModel.releasedDistance?m.bimModel.releasedDistance:1e4;m.center&&this.disTance([o,c,d],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(u,_))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):this.showModelArray.indexOf(m.id)>=0&&!window.map.getLayer(m.id,"modelId")&&this.emit("enter",m)})},2e3),this.freed())}findPnodeId(a,o,c="id"){let d;if(a){for(var u=0;u<a.length;u++){let m=a[u];if(m[c]==o)return d=m,d;if(m.children&&m.children.length>0&&(d=this.findPnodeId(m.children,o,c),d))return d}return d}}disTance(a,o,c){let d,u,m;return d=Cesium.Cartesian3.fromDegrees(...a),u=Cesium.Cartesian3.fromDegrees(...o),m=Cesium.Cartesian3.distance(d,u),m>c}calculateDistance(a,o){let c=(a+180)%360-180;c=Math.max(-90,Math.min(c,90));let d=(o-o/5)*(Math.abs(c)/90)+o/5;return Math.round(d)}}class hm{constructor(a=[],o){mars3d?(this.entityArr=a,this.entityLayer=new mars3d.layer.GraphicLayer({entityId:"bimEntity"}),window.map.addLayer(this.entityLayer),this.entityItem=null,this.events={},this.entityCloneLayer):console.error("未引入指定插件")}on(a,o){a=="change"||a=="collection"||a=="collection"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}offAll(){this.events={}}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}add(a,o=null,c){return new Promise((d,u)=>{var m;if(this.entityLayer){let _,y,S;if(c==null?void 0:c.isClone)this.entityCloneLayer&&(y=this.query(a),S=JSON.parse(y.bimPlanPainting.graphic),console.log(S),S.attr=S.attr||{},S.attr.entityId=a,this.entityCloneLayer.addGraphic(S));else{if(typeof a!="object"?(_=this.entityLayer.getGraphicByAttr(a,"entityId"),y=this.query(a),S=JSON.parse(y.bimPlanPainting.graphic),console.log(S),S.attr=S.attr||{},S.attr.entityId=a):(_=this.entityLayer.getGraphicByAttr(a.id,"entityId"),S=JSON.parse(JSON.stringify(a)),S.attr=S.attr||{},S.attr.entityId=S.attr.entityId||o,S.attr==null?S.attr={entityId:a.id}:((m=S.attr)==null?void 0:m.entityId)==null&&o&&(S.attr.entityId=o)),_)return d();this.entityLayer.addGraphic(S),d(S)}}else d(),console.error("未初始化标绘实例图层")})}query(a){return this.entityArr.length==0?!1:this.entityArr.find(o=>o.id==a)}queryEntity(a){if(bimEntity.entityLayer)return bimEntity.entityLayer.getGraphicByAttr(a,"entityId")}selected(a,o=null){let c=this.entityLayer.getGraphicByAttr(a,"entityId");o==null||o.isClone,(c.options.type=="div"||c.options.type=="point")&&c._point?c.flyTo({radius:c._point._alt+500<500?5e3:c._point._alt+500}):c.flyTo()}remove(a,o=null){(o==null?void 0:o.isClone)?this.entityCloneLayer&&this.entityCloneLayer.getGraphicByAttr(a,"entityId").remove():this.entityLayer.getGraphicByAttr(a,"entityId")&&(this.entityLayer.getGraphicByAttr(a,"entityId").remove(),this.entityItem&&(this.entityItem._state=="destroy"||this.entityItem.options.attr.entityId==a)&&(this.entityItem=null))}entityCloneLayerInit(){this.entityCloneLayer==null&&(this.entityCloneLayer=window.mapClone._mapEx.getLayer("bimEntity","entityId"))}entityCloneLayerRemove(){this.entityCloneLayer.remove(),this.entityCloneLayer=null}removeEntityItem(){this.entityItem=null}updateData(a){this.entityArr=a}startDrawGraphic(a){return new Promise((o,c)=>{let{type:d,style:u}=a;if(d=="div")if(u.html)this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m)},500)});else{let{title:m,divType:_,theme_color:y,font_color:S,scaleByDistance:A,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M}=u,R={type:"div",style:{pointerEvents:!0,scaleByDistance:A,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M,horizontalOrigin:Cesium.HorizontalOrigin.LEFT,verticalOrigin:Cesium.VerticalOrigin.BOTTOM}};switch(_){case"1":R.style.html=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${y};--theme-font-color1:${S};">
|
|
2636
2636
|
<div class="title">${m}</div>
|
|
2637
2637
|
</div>`,R.style.horizontalOrigin=Cesium.HorizontalOrigin.CENTER;break}this.entityLayer.startDraw(R).then(b=>{setTimeout(()=>{this.entityItem=b,this.entityLayer.startEditing(b),o(b)},500)})}else this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m),o(m)},500)})})}stopDraw(a=!0){this.entityLayer&&this.entityLayer.stopDraw(),a&&this.entityItem&&(this.entityItem.stopEditing(),this.entityItem.remove(),this.entityItem=null)}updateEntityItem(a){let o=this.entityLayer.getGraphicByAttr(a,"entityId");o?this.entityItem=o:this.removeEntityItem()}edit(a,o,c,d){let u=Mf(o,c);if(o.vectorStyle&&this.entityItem)if(o.vectorStyle.divType==5)this.entityItem.setStyle({...u,horizontalOrigin:Cesium.HorizontalOrigin.LEFT});else{if(this.entityItem.type=="circleP"&&Object.keys(u).length==1&&Object.keys(u)[0]=="radius"&&u.radius==this.entityItem.options.style.radius)return!1;this.entityItem.setStyle({...u})}}enableDragging(a=!0){a?this.entityLayer.startEditing(this.entityItem):(this.entityLayer.stopDraw(),this.entityItem&&this.entityItem.stopEditing())}addRightMenu(){this.entityLayer.bindContextMenu([{text:"编辑对象",callback:a=>{this.emit("change",a)}},{text:"收藏对象",callback:a=>{this.emit("collection",a)}}])}removeRightMenu(){this.entityLayer.hasContextMenu()&&this.entityLayer.unbindContextMenu()}processDivData(a){let o={"--theme-color1":"theme_color","--theme-font-color1":"font_color","--theme-color2":"theme_color2","--theme-color3":"theme_color3"},c={title:"",theme_color:"",font_color:"",content:"",divType:"",divStyle:{},isMirror:!1};const d=document.createElement("div");d.innerHTML=a;const u=d.querySelector(".entity-div-style");return console.log("解耦",u),Object.keys(o).forEach(m=>{m=="--theme-color2"||m=="--theme-color3"?c.divStyle[o[m]]=u.style.getPropertyValue(m)||"#fff":c[o[m]]=u.style.getPropertyValue(m)}),c.title=u.querySelector(".title")?u.querySelector(".title").innerText:"标题",c.content=u.querySelector(".content")?u.querySelector(".content").innerText:"内容",c.divType=u.classList[1]?u.classList[1].replace("entity-div-style",""):"",c.isMirror=u.classList.contains("isMirror"),console.log("解耦",c),c}updateHtml(a,o){let{theme_color:c,font_color:d,title:u,content:m,divStyle:_}=o,{theme_color2:y,theme_color3:S}=_,A="";switch(a){case"1":A=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${c};--theme-font-color1:${d};">
|
|
2638
2638
|
<div class="title">${u}</div>
|
|
@@ -2682,7 +2682,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
2682
2682
|
JSZip uses the library pako released under the MIT license :
|
|
2683
2683
|
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
2684
2684
|
*/(function(x,a){(function(o){x.exports=o()})(function(){return function o(c,d,u){function m(S,A){if(!d[S]){if(!c[S]){var I=typeof su=="function"&&su;if(!A&&I)return I(S,!0);if(_)return _(S,!0);var k=new Error("Cannot find module '"+S+"'");throw k.code="MODULE_NOT_FOUND",k}var D=d[S]={exports:{}};c[S][0].call(D.exports,function(F){var E=c[S][1][F];return m(E||F)},D,D.exports,o,c,d,u)}return d[S].exports}for(var _=typeof su=="function"&&su,y=0;y<u.length;y++)m(u[y]);return m}({1:[function(o,c,d){var u=o("./utils"),m=o("./support"),_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.encode=function(y){for(var S,A,I,k,D,F,E,L=[],T=0,M=y.length,R=M,b=u.getTypeOf(y)!=="string";T<y.length;)R=M-T,I=b?(S=y[T++],A=T<M?y[T++]:0,T<M?y[T++]:0):(S=y.charCodeAt(T++),A=T<M?y.charCodeAt(T++):0,T<M?y.charCodeAt(T++):0),k=S>>2,D=(3&S)<<4|A>>4,F=1<R?(15&A)<<2|I>>6:64,E=2<R?63&I:64,L.push(_.charAt(k)+_.charAt(D)+_.charAt(F)+_.charAt(E));return L.join("")},d.decode=function(y){var S,A,I,k,D,F,E=0,L=0,T="data:";if(y.substr(0,T.length)===T)throw new Error("Invalid base64 input, it looks like a data url.");var M,R=3*(y=y.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(y.charAt(y.length-1)===_.charAt(64)&&R--,y.charAt(y.length-2)===_.charAt(64)&&R--,R%1!=0)throw new Error("Invalid base64 input, bad content length.");for(M=m.uint8array?new Uint8Array(0|R):new Array(0|R);E<y.length;)S=_.indexOf(y.charAt(E++))<<2|(k=_.indexOf(y.charAt(E++)))>>4,A=(15&k)<<4|(D=_.indexOf(y.charAt(E++)))>>2,I=(3&D)<<6|(F=_.indexOf(y.charAt(E++))),M[L++]=S,D!==64&&(M[L++]=A),F!==64&&(M[L++]=I);return M}},{"./support":30,"./utils":32}],2:[function(o,c,d){var u=o("./external"),m=o("./stream/DataWorker"),_=o("./stream/Crc32Probe"),y=o("./stream/DataLengthProbe");function S(A,I,k,D,F){this.compressedSize=A,this.uncompressedSize=I,this.crc32=k,this.compression=D,this.compressedContent=F}S.prototype={getContentWorker:function(){var A=new m(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new y("data_length")),I=this;return A.on("end",function(){if(this.streamInfo.data_length!==I.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),A},getCompressedWorker:function(){return new m(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},S.createWorkerFrom=function(A,I,k){return A.pipe(new _).pipe(new y("uncompressedSize")).pipe(I.compressWorker(k)).pipe(new y("compressedSize")).withStreamInfo("compression",I)},c.exports=S},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(o,c,d){var u=o("./stream/GenericWorker");d.STORE={magic:"\0\0",compressWorker:function(){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},d.DEFLATE=o("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(o,c,d){var u=o("./utils"),m=function(){for(var _,y=[],S=0;S<256;S++){_=S;for(var A=0;A<8;A++)_=1&_?3988292384^_>>>1:_>>>1;y[S]=_}return y}();c.exports=function(_,y){return _!==void 0&&_.length?u.getTypeOf(_)!=="string"?function(S,A,I,k){var D=m,F=k+I;S^=-1;for(var E=k;E<F;E++)S=S>>>8^D[255&(S^A[E])];return-1^S}(0|y,_,_.length,0):function(S,A,I,k){var D=m,F=k+I;S^=-1;for(var E=k;E<F;E++)S=S>>>8^D[255&(S^A.charCodeAt(E))];return-1^S}(0|y,_,_.length,0):0}},{"./utils":32}],5:[function(o,c,d){d.base64=!1,d.binary=!1,d.dir=!1,d.createFolders=!0,d.date=null,d.compression=null,d.compressionOptions=null,d.comment=null,d.unixPermissions=null,d.dosPermissions=null},{}],6:[function(o,c,d){var u=null;u=typeof Promise<"u"?Promise:o("lie"),c.exports={Promise:u}},{lie:37}],7:[function(o,c,d){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",m=o("pako"),_=o("./utils"),y=o("./stream/GenericWorker"),S=u?"uint8array":"array";function A(I,k){y.call(this,"FlateWorker/"+I),this._pako=null,this._pakoAction=I,this._pakoOptions=k,this.meta={}}d.magic="\b\0",_.inherits(A,y),A.prototype.processChunk=function(I){this.meta=I.meta,this._pako===null&&this._createPako(),this._pako.push(_.transformTo(S,I.data),!1)},A.prototype.flush=function(){y.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},A.prototype.cleanUp=function(){y.prototype.cleanUp.call(this),this._pako=null},A.prototype._createPako=function(){this._pako=new m[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var I=this;this._pako.onData=function(k){I.push({data:k,meta:I.meta})}},d.compressWorker=function(I){return new A("Deflate",I)},d.uncompressWorker=function(){return new A("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(o,c,d){function u(D,F){var E,L="";for(E=0;E<F;E++)L+=String.fromCharCode(255&D),D>>>=8;return L}function m(D,F,E,L,T,M){var R,b,U=D.file,N=D.compression,j=M!==S.utf8encode,J=_.transformTo("string",M(U.name)),$=_.transformTo("string",S.utf8encode(U.name)),ct=U.comment,It=_.transformTo("string",M(ct)),et=_.transformTo("string",S.utf8encode(ct)),yt=$.length!==U.name.length,G=et.length!==ct.length,Pt="",Et="",Ct="",fe=U.dir,re=U.date,Ft={crc32:0,compressedSize:0,uncompressedSize:0};F&&!E||(Ft.crc32=D.crc32,Ft.compressedSize=D.compressedSize,Ft.uncompressedSize=D.uncompressedSize);var Ot=0;F&&(Ot|=8),j||!yt&&!G||(Ot|=2048);var Bt=0,ke=0;fe&&(Bt|=16),T==="UNIX"?(ke=798,Bt|=function(Yt,$e){var Oi=Yt;return Yt||(Oi=$e?16893:33204),(65535&Oi)<<16}(U.unixPermissions,fe)):(ke=20,Bt|=function(Yt){return 63&(Yt||0)}(U.dosPermissions)),R=re.getUTCHours(),R<<=6,R|=re.getUTCMinutes(),R<<=5,R|=re.getUTCSeconds()/2,b=re.getUTCFullYear()-1980,b<<=4,b|=re.getUTCMonth()+1,b<<=5,b|=re.getUTCDate(),yt&&(Et=u(1,1)+u(A(J),4)+$,Pt+="up"+u(Et.length,2)+Et),G&&(Ct=u(1,1)+u(A(It),4)+et,Pt+="uc"+u(Ct.length,2)+Ct);var ce="";return ce+=`
|
|
2685
|
-
\0`,ce+=u(Ot,2),ce+=N.magic,ce+=u(R,2),ce+=u(b,2),ce+=u(Ft.crc32,4),ce+=u(Ft.compressedSize,4),ce+=u(Ft.uncompressedSize,4),ce+=u(J.length,2),ce+=u(Pt.length,2),{fileRecord:I.LOCAL_FILE_HEADER+ce+J+Pt,dirRecord:I.CENTRAL_FILE_HEADER+u(ke,2)+ce+u(It.length,2)+"\0\0\0\0"+u(Bt,4)+u(L,4)+J+Pt+It}}var _=o("../utils"),y=o("../stream/GenericWorker"),S=o("../utf8"),A=o("../crc32"),I=o("../signature");function k(D,F,E,L){y.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=F,this.zipPlatform=E,this.encodeFileName=L,this.streamFiles=D,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}_.inherits(k,y),k.prototype.push=function(D){var F=D.meta.percent||0,E=this.entriesCount,L=this._sources.length;this.accumulate?this.contentBuffer.push(D):(this.bytesWritten+=D.data.length,y.prototype.push.call(this,{data:D.data,meta:{currentFile:this.currentFile,percent:E?(F+100*(E-L-1))/E:100}}))},k.prototype.openedSource=function(D){this.currentSourceOffset=this.bytesWritten,this.currentFile=D.file.name;var F=this.streamFiles&&!D.file.dir;if(F){var E=m(D,F,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},k.prototype.closedSource=function(D){this.accumulate=!1;var F=this.streamFiles&&!D.file.dir,E=m(D,F,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),F)this.push({data:function(L){return I.DATA_DESCRIPTOR+u(L.crc32,4)+u(L.compressedSize,4)+u(L.uncompressedSize,4)}(D),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},k.prototype.flush=function(){for(var D=this.bytesWritten,F=0;F<this.dirRecords.length;F++)this.push({data:this.dirRecords[F],meta:{percent:100}});var E=this.bytesWritten-D,L=function(T,M,R,b,U){var N=_.transformTo("string",U(b));return I.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(T,2)+u(T,2)+u(M,4)+u(R,4)+u(N.length,2)+N}(this.dirRecords.length,E,D,this.zipComment,this.encodeFileName);this.push({data:L,meta:{percent:100}})},k.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},k.prototype.registerPrevious=function(D){this._sources.push(D);var F=this;return D.on("data",function(E){F.processChunk(E)}),D.on("end",function(){F.closedSource(F.previous.streamInfo),F._sources.length?F.prepareNextSource():F.end()}),D.on("error",function(E){F.error(E)}),this},k.prototype.resume=function(){return!!y.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},k.prototype.error=function(D){var F=this._sources;if(!y.prototype.error.call(this,D))return!1;for(var E=0;E<F.length;E++)try{F[E].error(D)}catch{}return!0},k.prototype.lock=function(){y.prototype.lock.call(this);for(var D=this._sources,F=0;F<D.length;F++)D[F].lock()},c.exports=k},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(o,c,d){var u=o("../compressions"),m=o("./ZipFileWorker");d.generateWorker=function(_,y,S){var A=new m(y.streamFiles,S,y.platform,y.encodeFileName),I=0;try{_.forEach(function(k,D){I++;var F=function(M,R){var b=M||R,U=u[b];if(!U)throw new Error(b+" is not a valid compression method !");return U}(D.options.compression,y.compression),E=D.options.compressionOptions||y.compressionOptions||{},L=D.dir,T=D.date;D._compressWorker(F,E).withStreamInfo("file",{name:k,dir:L,date:T,comment:D.comment||"",unixPermissions:D.unixPermissions,dosPermissions:D.dosPermissions}).pipe(A)}),A.entriesCount=I}catch(k){A.error(k)}return A}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(o,c,d){function u(){if(!(this instanceof u))return new u;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 m=new u;for(var _ in this)typeof this[_]!="function"&&(m[_]=this[_]);return m}}(u.prototype=o("./object")).loadAsync=o("./load"),u.support=o("./support"),u.defaults=o("./defaults"),u.version="3.10.1",u.loadAsync=function(m,_){return new u().loadAsync(m,_)},u.external=o("./external"),c.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(o,c,d){var u=o("./utils"),m=o("./external"),_=o("./utf8"),y=o("./zipEntries"),S=o("./stream/Crc32Probe"),A=o("./nodejsUtils");function I(k){return new m.Promise(function(D,F){var E=k.decompressed.getContentWorker().pipe(new S);E.on("error",function(L){F(L)}).on("end",function(){E.streamInfo.crc32!==k.decompressed.crc32?F(new Error("Corrupted zip : CRC32 mismatch")):D()}).resume()})}c.exports=function(k,D){var F=this;return D=u.extend(D||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:_.utf8decode}),A.isNode&&A.isStream(k)?m.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",k,!0,D.optimizedBinaryString,D.base64).then(function(E){var L=new y(D);return L.load(E),L}).then(function(E){var L=[m.Promise.resolve(E)],T=E.files;if(D.checkCRC32)for(var M=0;M<T.length;M++)L.push(I(T[M]));return m.Promise.all(L)}).then(function(E){for(var L=E.shift(),T=L.files,M=0;M<T.length;M++){var R=T[M],b=R.fileNameStr,U=u.resolve(R.fileNameStr);F.file(U,R.decompressed,{binary:!0,optimizedBinaryString:!0,date:R.date,dir:R.dir,comment:R.fileCommentStr.length?R.fileCommentStr:null,unixPermissions:R.unixPermissions,dosPermissions:R.dosPermissions,createFolders:D.createFolders}),R.dir||(F.file(U).unsafeOriginalName=b)}return L.zipComment.length&&(F.comment=L.zipComment),F})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(o,c,d){var u=o("../utils"),m=o("../stream/GenericWorker");function _(y,S){m.call(this,"Nodejs stream input adapter for "+y),this._upstreamEnded=!1,this._bindStream(S)}u.inherits(_,m),_.prototype._bindStream=function(y){var S=this;(this._stream=y).pause(),y.on("data",function(A){S.push({data:A,meta:{percent:0}})}).on("error",function(A){S.isPaused?this.generatedError=A:S.error(A)}).on("end",function(){S.isPaused?S._upstreamEnded=!0:S.end()})},_.prototype.pause=function(){return!!m.prototype.pause.call(this)&&(this._stream.pause(),!0)},_.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},c.exports=_},{"../stream/GenericWorker":28,"../utils":32}],13:[function(o,c,d){var u=o("readable-stream").Readable;function m(_,y,S){u.call(this,y),this._helper=_;var A=this;_.on("data",function(I,k){A.push(I)||A._helper.pause(),S&&S(k)}).on("error",function(I){A.emit("error",I)}).on("end",function(){A.push(null)})}o("../utils").inherits(m,u),m.prototype._read=function(){this._helper.resume()},c.exports=m},{"../utils":32,"readable-stream":16}],14:[function(o,c,d){c.exports={isNode:typeof Buffer<"u",newBufferFrom:function(u,m){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(u,m);if(typeof u=="number")throw new Error('The "data" argument must not be a number');return new Buffer(u,m)},allocBuffer:function(u){if(Buffer.alloc)return Buffer.alloc(u);var m=new Buffer(u);return m.fill(0),m},isBuffer:function(u){return Buffer.isBuffer(u)},isStream:function(u){return u&&typeof u.on=="function"&&typeof u.pause=="function"&&typeof u.resume=="function"}}},{}],15:[function(o,c,d){function u(U,N,j){var J,$=_.getTypeOf(N),ct=_.extend(j||{},A);ct.date=ct.date||new Date,ct.compression!==null&&(ct.compression=ct.compression.toUpperCase()),typeof ct.unixPermissions=="string"&&(ct.unixPermissions=parseInt(ct.unixPermissions,8)),ct.unixPermissions&&16384&ct.unixPermissions&&(ct.dir=!0),ct.dosPermissions&&16&ct.dosPermissions&&(ct.dir=!0),ct.dir&&(U=T(U)),ct.createFolders&&(J=L(U))&&M.call(this,J,!0);var It=$==="string"&&ct.binary===!1&&ct.base64===!1;j&&j.binary!==void 0||(ct.binary=!It),(N instanceof I&&N.uncompressedSize===0||ct.dir||!N||N.length===0)&&(ct.base64=!1,ct.binary=!0,N="",ct.compression="STORE",$="string");var et=null;et=N instanceof I||N instanceof y?N:F.isNode&&F.isStream(N)?new E(U,N):_.prepareContent(U,N,ct.binary,ct.optimizedBinaryString,ct.base64);var yt=new k(U,et,ct);this.files[U]=yt}var m=o("./utf8"),_=o("./utils"),y=o("./stream/GenericWorker"),S=o("./stream/StreamHelper"),A=o("./defaults"),I=o("./compressedObject"),k=o("./zipObject"),D=o("./generate"),F=o("./nodejsUtils"),E=o("./nodejs/NodejsStreamInputAdapter"),L=function(U){U.slice(-1)==="/"&&(U=U.substring(0,U.length-1));var N=U.lastIndexOf("/");return 0<N?U.substring(0,N):""},T=function(U){return U.slice(-1)!=="/"&&(U+="/"),U},M=function(U,N){return N=N!==void 0?N:A.createFolders,U=T(U),this.files[U]||u.call(this,U,null,{dir:!0,createFolders:N}),this.files[U]};function R(U){return Object.prototype.toString.call(U)==="[object RegExp]"}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(U){var N,j,J;for(N in this.files)J=this.files[N],(j=N.slice(this.root.length,N.length))&&N.slice(0,this.root.length)===this.root&&U(j,J)},filter:function(U){var N=[];return this.forEach(function(j,J){U(j,J)&&N.push(J)}),N},file:function(U,N,j){if(arguments.length!==1)return U=this.root+U,u.call(this,U,N,j),this;if(R(U)){var J=U;return this.filter(function(ct,It){return!It.dir&&J.test(ct)})}var $=this.files[this.root+U];return $&&!$.dir?$:null},folder:function(U){if(!U)return this;if(R(U))return this.filter(function($,ct){return ct.dir&&U.test($)});var N=this.root+U,j=M.call(this,N),J=this.clone();return J.root=j.name,J},remove:function(U){U=this.root+U;var N=this.files[U];if(N||(U.slice(-1)!=="/"&&(U+="/"),N=this.files[U]),N&&!N.dir)delete this.files[U];else for(var j=this.filter(function($,ct){return ct.name.slice(0,U.length)===U}),J=0;J<j.length;J++)delete this.files[j[J].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(U){var N,j={};try{if((j=_.extend(U||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:m.utf8encode})).type=j.type.toLowerCase(),j.compression=j.compression.toUpperCase(),j.type==="binarystring"&&(j.type="string"),!j.type)throw new Error("No output type specified.");_.checkSupport(j.type),j.platform!=="darwin"&&j.platform!=="freebsd"&&j.platform!=="linux"&&j.platform!=="sunos"||(j.platform="UNIX"),j.platform==="win32"&&(j.platform="DOS");var J=j.comment||this.comment||"";N=D.generateWorker(this,j,J)}catch($){(N=new y("error")).error($)}return new S(N,j.type||"string",j.mimeType)},generateAsync:function(U,N){return this.generateInternalStream(U).accumulate(N)},generateNodeStream:function(U,N){return(U=U||{}).type||(U.type="nodebuffer"),this.generateInternalStream(U).toNodejsStream(N)}};c.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(o,c,d){c.exports=o("stream")},{stream:void 0}],17:[function(o,c,d){var u=o("./DataReader");function m(_){u.call(this,_);for(var y=0;y<this.data.length;y++)_[y]=255&_[y]}o("../utils").inherits(m,u),m.prototype.byteAt=function(_){return this.data[this.zero+_]},m.prototype.lastIndexOfSignature=function(_){for(var y=_.charCodeAt(0),S=_.charCodeAt(1),A=_.charCodeAt(2),I=_.charCodeAt(3),k=this.length-4;0<=k;--k)if(this.data[k]===y&&this.data[k+1]===S&&this.data[k+2]===A&&this.data[k+3]===I)return k-this.zero;return-1},m.prototype.readAndCheckSignature=function(_){var y=_.charCodeAt(0),S=_.charCodeAt(1),A=_.charCodeAt(2),I=_.charCodeAt(3),k=this.readData(4);return y===k[0]&&S===k[1]&&A===k[2]&&I===k[3]},m.prototype.readData=function(_){if(this.checkOffset(_),_===0)return[];var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./DataReader":18}],18:[function(o,c,d){var u=o("../utils");function m(_){this.data=_,this.length=_.length,this.index=0,this.zero=0}m.prototype={checkOffset:function(_){this.checkIndex(this.index+_)},checkIndex:function(_){if(this.length<this.zero+_||_<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+_+"). Corrupted zip ?")},setIndex:function(_){this.checkIndex(_),this.index=_},skip:function(_){this.setIndex(this.index+_)},byteAt:function(){},readInt:function(_){var y,S=0;for(this.checkOffset(_),y=this.index+_-1;y>=this.index;y--)S=(S<<8)+this.byteAt(y);return this.index+=_,S},readString:function(_){return u.transformTo("string",this.readData(_))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var _=this.readInt(4);return new Date(Date.UTC(1980+(_>>25&127),(_>>21&15)-1,_>>16&31,_>>11&31,_>>5&63,(31&_)<<1))}},c.exports=m},{"../utils":32}],19:[function(o,c,d){var u=o("./Uint8ArrayReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.readData=function(_){this.checkOffset(_);var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(o,c,d){var u=o("./DataReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.byteAt=function(_){return this.data.charCodeAt(this.zero+_)},m.prototype.lastIndexOfSignature=function(_){return this.data.lastIndexOf(_)-this.zero},m.prototype.readAndCheckSignature=function(_){return _===this.readData(4)},m.prototype.readData=function(_){this.checkOffset(_);var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./DataReader":18}],21:[function(o,c,d){var u=o("./ArrayReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.readData=function(_){if(this.checkOffset(_),_===0)return new Uint8Array(0);var y=this.data.subarray(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./ArrayReader":17}],22:[function(o,c,d){var u=o("../utils"),m=o("../support"),_=o("./ArrayReader"),y=o("./StringReader"),S=o("./NodeBufferReader"),A=o("./Uint8ArrayReader");c.exports=function(I){var k=u.getTypeOf(I);return u.checkSupport(k),k!=="string"||m.uint8array?k==="nodebuffer"?new S(I):m.uint8array?new A(u.transformTo("uint8array",I)):new _(u.transformTo("array",I)):new y(I)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(o,c,d){d.LOCAL_FILE_HEADER="PK",d.CENTRAL_FILE_HEADER="PK",d.CENTRAL_DIRECTORY_END="PK",d.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",d.ZIP64_CENTRAL_DIRECTORY_END="PK",d.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(o,c,d){var u=o("./GenericWorker"),m=o("../utils");function _(y){u.call(this,"ConvertWorker to "+y),this.destType=y}m.inherits(_,u),_.prototype.processChunk=function(y){this.push({data:m.transformTo(this.destType,y.data),meta:y.meta})},c.exports=_},{"../utils":32,"./GenericWorker":28}],25:[function(o,c,d){var u=o("./GenericWorker"),m=o("../crc32");function _(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o("../utils").inherits(_,u),_.prototype.processChunk=function(y){this.streamInfo.crc32=m(y.data,this.streamInfo.crc32||0),this.push(y)},c.exports=_},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(o,c,d){var u=o("../utils"),m=o("./GenericWorker");function _(y){m.call(this,"DataLengthProbe for "+y),this.propName=y,this.withStreamInfo(y,0)}u.inherits(_,m),_.prototype.processChunk=function(y){if(y){var S=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=S+y.data.length}m.prototype.processChunk.call(this,y)},c.exports=_},{"../utils":32,"./GenericWorker":28}],27:[function(o,c,d){var u=o("../utils"),m=o("./GenericWorker");function _(y){m.call(this,"DataWorker");var S=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,y.then(function(A){S.dataIsReady=!0,S.data=A,S.max=A&&A.length||0,S.type=u.getTypeOf(A),S.isPaused||S._tickAndRepeat()},function(A){S.error(A)})}u.inherits(_,m),_.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this.data=null},_.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0)},_.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},_.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var y=null,S=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":y=this.data.substring(this.index,S);break;case"uint8array":y=this.data.subarray(this.index,S);break;case"array":case"nodebuffer":y=this.data.slice(this.index,S)}return this.index=S,this.push({data:y,meta:{percent:this.max?this.index/this.max*100:0}})},c.exports=_},{"../utils":32,"./GenericWorker":28}],28:[function(o,c,d){function u(m){this.name=m||"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}u.prototype={push:function(m){this.emit("data",m)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(m){this.emit("error",m)}return!0},error:function(m){return!this.isFinished&&(this.isPaused?this.generatedError=m:(this.isFinished=!0,this.emit("error",m),this.previous&&this.previous.error(m),this.cleanUp()),!0)},on:function(m,_){return this._listeners[m].push(_),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(m,_){if(this._listeners[m])for(var y=0;y<this._listeners[m].length;y++)this._listeners[m][y].call(this,_)},pipe:function(m){return m.registerPrevious(this)},registerPrevious:function(m){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=m.streamInfo,this.mergeStreamInfo(),this.previous=m;var _=this;return m.on("data",function(y){_.processChunk(y)}),m.on("end",function(){_.end()}),m.on("error",function(y){_.error(y)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var m=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),m=!0),this.previous&&this.previous.resume(),!m},flush:function(){},processChunk:function(m){this.push(m)},withStreamInfo:function(m,_){return this.extraStreamInfo[m]=_,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var m in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,m)&&(this.streamInfo[m]=this.extraStreamInfo[m])},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 m="Worker "+this.name;return this.previous?this.previous+" -> "+m:m}},c.exports=u},{}],29:[function(o,c,d){var u=o("../utils"),m=o("./ConvertWorker"),_=o("./GenericWorker"),y=o("../base64"),S=o("../support"),A=o("../external"),I=null;if(S.nodestream)try{I=o("../nodejs/NodejsStreamOutputAdapter")}catch{}function k(F,E){return new A.Promise(function(L,T){var M=[],R=F._internalType,b=F._outputType,U=F._mimeType;F.on("data",function(N,j){M.push(N),E&&E(j)}).on("error",function(N){M=[],T(N)}).on("end",function(){try{var N=function(j,J,$){switch(j){case"blob":return u.newBlob(u.transformTo("arraybuffer",J),$);case"base64":return y.encode(J);default:return u.transformTo(j,J)}}(b,function(j,J){var $,ct=0,It=null,et=0;for($=0;$<J.length;$++)et+=J[$].length;switch(j){case"string":return J.join("");case"array":return Array.prototype.concat.apply([],J);case"uint8array":for(It=new Uint8Array(et),$=0;$<J.length;$++)It.set(J[$],ct),ct+=J[$].length;return It;case"nodebuffer":return Buffer.concat(J);default:throw new Error("concat : unsupported type '"+j+"'")}}(R,M),U);L(N)}catch(j){T(j)}M=[]}).resume()})}function D(F,E,L){var T=E;switch(E){case"blob":case"arraybuffer":T="uint8array";break;case"base64":T="string"}try{this._internalType=T,this._outputType=E,this._mimeType=L,u.checkSupport(T),this._worker=F.pipe(new m(T)),F.lock()}catch(M){this._worker=new _("error"),this._worker.error(M)}}D.prototype={accumulate:function(F){return k(this,F)},on:function(F,E){var L=this;return F==="data"?this._worker.on(F,function(T){E.call(L,T.data,T.meta)}):this._worker.on(F,function(){u.delay(E,arguments,L)}),this},resume:function(){return u.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(F){if(u.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new I(this,{objectMode:this._outputType!=="nodebuffer"},F)}},c.exports=D},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(o,c,d){if(d.base64=!0,d.array=!0,d.string=!0,d.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",d.nodebuffer=typeof Buffer<"u",d.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")d.blob=!1;else{var u=new ArrayBuffer(0);try{d.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);m.append(u),d.blob=m.getBlob("application/zip").size===0}catch{d.blob=!1}}}try{d.nodestream=!!o("readable-stream").Readable}catch{d.nodestream=!1}},{"readable-stream":16}],31:[function(o,c,d){for(var u=o("./utils"),m=o("./support"),_=o("./nodejsUtils"),y=o("./stream/GenericWorker"),S=new Array(256),A=0;A<256;A++)S[A]=252<=A?6:248<=A?5:240<=A?4:224<=A?3:192<=A?2:1;S[254]=S[254]=1;function I(){y.call(this,"utf-8 decode"),this.leftOver=null}function k(){y.call(this,"utf-8 encode")}d.utf8encode=function(D){return m.nodebuffer?_.newBufferFrom(D,"utf-8"):function(F){var E,L,T,M,R,b=F.length,U=0;for(M=0;M<b;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<b&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),U+=L<128?1:L<2048?2:L<65536?3:4;for(E=m.uint8array?new Uint8Array(U):new Array(U),M=R=0;R<U;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<b&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),L<128?E[R++]=L:(L<2048?E[R++]=192|L>>>6:(L<65536?E[R++]=224|L>>>12:(E[R++]=240|L>>>18,E[R++]=128|L>>>12&63),E[R++]=128|L>>>6&63),E[R++]=128|63&L);return E}(D)},d.utf8decode=function(D){return m.nodebuffer?u.transformTo("nodebuffer",D).toString("utf-8"):function(F){var E,L,T,M,R=F.length,b=new Array(2*R);for(E=L=0;E<R;)if((T=F[E++])<128)b[L++]=T;else if(4<(M=S[T]))b[L++]=65533,E+=M-1;else{for(T&=M===2?31:M===3?15:7;1<M&&E<R;)T=T<<6|63&F[E++],M--;1<M?b[L++]=65533:T<65536?b[L++]=T:(T-=65536,b[L++]=55296|T>>10&1023,b[L++]=56320|1023&T)}return b.length!==L&&(b.subarray?b=b.subarray(0,L):b.length=L),u.applyFromCharCode(b)}(D=u.transformTo(m.uint8array?"uint8array":"array",D))},u.inherits(I,y),I.prototype.processChunk=function(D){var F=u.transformTo(m.uint8array?"uint8array":"array",D.data);if(this.leftOver&&this.leftOver.length){if(m.uint8array){var E=F;(F=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),F.set(E,this.leftOver.length)}else F=this.leftOver.concat(F);this.leftOver=null}var L=function(M,R){var b;for((R=R||M.length)>M.length&&(R=M.length),b=R-1;0<=b&&(192&M[b])==128;)b--;return b<0||b===0?R:b+S[M[b]]>R?b:R}(F),T=F;L!==F.length&&(m.uint8array?(T=F.subarray(0,L),this.leftOver=F.subarray(L,F.length)):(T=F.slice(0,L),this.leftOver=F.slice(L,F.length))),this.push({data:d.utf8decode(T),meta:D.meta})},I.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:d.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},d.Utf8DecodeWorker=I,u.inherits(k,y),k.prototype.processChunk=function(D){this.push({data:d.utf8encode(D.data),meta:D.meta})},d.Utf8EncodeWorker=k},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(o,c,d){var u=o("./support"),m=o("./base64"),_=o("./nodejsUtils"),y=o("./external");function S(E){return E}function A(E,L){for(var T=0;T<E.length;++T)L[T]=255&E.charCodeAt(T);return L}o("setimmediate"),d.newBlob=function(E,L){d.checkSupport("blob");try{return new Blob([E],{type:L})}catch{try{var T=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return T.append(E),T.getBlob(L)}catch{throw new Error("Bug : can't construct the Blob.")}}};var I={stringifyByChunk:function(E,L,T){var M=[],R=0,b=E.length;if(b<=T)return String.fromCharCode.apply(null,E);for(;R<b;)L==="array"||L==="nodebuffer"?M.push(String.fromCharCode.apply(null,E.slice(R,Math.min(R+T,b)))):M.push(String.fromCharCode.apply(null,E.subarray(R,Math.min(R+T,b)))),R+=T;return M.join("")},stringifyByChar:function(E){for(var L="",T=0;T<E.length;T++)L+=String.fromCharCode(E[T]);return L},applyCanBeUsed:{uint8array:function(){try{return u.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return u.nodebuffer&&String.fromCharCode.apply(null,_.allocBuffer(1)).length===1}catch{return!1}}()}};function k(E){var L=65536,T=d.getTypeOf(E),M=!0;if(T==="uint8array"?M=I.applyCanBeUsed.uint8array:T==="nodebuffer"&&(M=I.applyCanBeUsed.nodebuffer),M)for(;1<L;)try{return I.stringifyByChunk(E,T,L)}catch{L=Math.floor(L/2)}return I.stringifyByChar(E)}function D(E,L){for(var T=0;T<E.length;T++)L[T]=E[T];return L}d.applyFromCharCode=k;var F={};F.string={string:S,array:function(E){return A(E,new Array(E.length))},arraybuffer:function(E){return F.string.uint8array(E).buffer},uint8array:function(E){return A(E,new Uint8Array(E.length))},nodebuffer:function(E){return A(E,_.allocBuffer(E.length))}},F.array={string:k,array:S,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return _.newBufferFrom(E)}},F.arraybuffer={string:function(E){return k(new Uint8Array(E))},array:function(E){return D(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:S,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return _.newBufferFrom(new Uint8Array(E))}},F.uint8array={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:S,nodebuffer:function(E){return _.newBufferFrom(E)}},F.nodebuffer={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return F.nodebuffer.uint8array(E).buffer},uint8array:function(E){return D(E,new Uint8Array(E.length))},nodebuffer:S},d.transformTo=function(E,L){if(L=L||"",!E)return L;d.checkSupport(E);var T=d.getTypeOf(L);return F[T][E](L)},d.resolve=function(E){for(var L=E.split("/"),T=[],M=0;M<L.length;M++){var R=L[M];R==="."||R===""&&M!==0&&M!==L.length-1||(R===".."?T.pop():T.push(R))}return T.join("/")},d.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":u.nodebuffer&&_.isBuffer(E)?"nodebuffer":u.uint8array&&E instanceof Uint8Array?"uint8array":u.arraybuffer&&E instanceof ArrayBuffer?"arraybuffer":void 0},d.checkSupport=function(E){if(!u[E.toLowerCase()])throw new Error(E+" is not supported by this platform")},d.MAX_VALUE_16BITS=65535,d.MAX_VALUE_32BITS=-1,d.pretty=function(E){var L,T,M="";for(T=0;T<(E||"").length;T++)M+="\\x"+((L=E.charCodeAt(T))<16?"0":"")+L.toString(16).toUpperCase();return M},d.delay=function(E,L,T){setImmediate(function(){E.apply(T||null,L||[])})},d.inherits=function(E,L){function T(){}T.prototype=L.prototype,E.prototype=new T},d.extend=function(){var E,L,T={};for(E=0;E<arguments.length;E++)for(L in arguments[E])Object.prototype.hasOwnProperty.call(arguments[E],L)&&T[L]===void 0&&(T[L]=arguments[E][L]);return T},d.prepareContent=function(E,L,T,M,R){return y.Promise.resolve(L).then(function(b){return u.blob&&(b instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(b))!==-1)&&typeof FileReader<"u"?new y.Promise(function(U,N){var j=new FileReader;j.onload=function(J){U(J.target.result)},j.onerror=function(J){N(J.target.error)},j.readAsArrayBuffer(b)}):b}).then(function(b){var U=d.getTypeOf(b);return U?(U==="arraybuffer"?b=d.transformTo("uint8array",b):U==="string"&&(R?b=m.decode(b):T&&M!==!0&&(b=function(N){return A(N,u.uint8array?new Uint8Array(N.length):new Array(N.length))}(b))),b):y.Promise.reject(new Error("Can't read the data of '"+E+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(o,c,d){var u=o("./reader/readerFor"),m=o("./utils"),_=o("./signature"),y=o("./zipEntry"),S=o("./support");function A(I){this.files=[],this.loadOptions=I}A.prototype={checkSignature:function(I){if(!this.reader.readAndCheckSignature(I)){this.reader.index-=4;var k=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+m.pretty(k)+", expected "+m.pretty(I)+")")}},isSignature:function(I,k){var D=this.reader.index;this.reader.setIndex(I);var F=this.reader.readString(4)===k;return this.reader.setIndex(D),F},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 I=this.reader.readData(this.zipCommentLength),k=S.uint8array?"uint8array":"array",D=m.transformTo(k,I);this.zipComment=this.loadOptions.decodeFileName(D)},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 I,k,D,F=this.zip64EndOfCentralSize-44;0<F;)I=this.reader.readInt(2),k=this.reader.readInt(4),D=this.reader.readData(k),this.zip64ExtensibleData[I]={id:I,length:k,value:D}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var I,k;for(I=0;I<this.files.length;I++)k=this.files[I],this.reader.setIndex(k.localHeaderOffset),this.checkSignature(_.LOCAL_FILE_HEADER),k.readLocalPart(this.reader),k.handleUTF8(),k.processAttributes()},readCentralDir:function(){var I;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(_.CENTRAL_FILE_HEADER);)(I=new y({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(I);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 I=this.reader.lastIndexOfSignature(_.CENTRAL_DIRECTORY_END);if(I<0)throw this.isSignature(0,_.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):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");this.reader.setIndex(I);var k=I;if(this.checkSignature(_.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===m.MAX_VALUE_16BITS||this.diskWithCentralDirStart===m.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===m.MAX_VALUE_16BITS||this.centralDirRecords===m.MAX_VALUE_16BITS||this.centralDirSize===m.MAX_VALUE_32BITS||this.centralDirOffset===m.MAX_VALUE_32BITS){if(this.zip64=!0,(I=this.reader.lastIndexOfSignature(_.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(I),this.checkSignature(_.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,_.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(_.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(_.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var D=this.centralDirOffset+this.centralDirSize;this.zip64&&(D+=20,D+=12+this.zip64EndOfCentralSize);var F=k-D;if(0<F)this.isSignature(k,_.CENTRAL_FILE_HEADER)||(this.reader.zero=F);else if(F<0)throw new Error("Corrupted zip: missing "+Math.abs(F)+" bytes.")},prepareReader:function(I){this.reader=u(I)},load:function(I){this.prepareReader(I),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},c.exports=A},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(o,c,d){var u=o("./reader/readerFor"),m=o("./utils"),_=o("./compressedObject"),y=o("./crc32"),S=o("./utf8"),A=o("./compressions"),I=o("./support");function k(D,F){this.options=D,this.loadOptions=F}k.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(D){var F,E;if(D.skip(22),this.fileNameLength=D.readInt(2),E=D.readInt(2),this.fileName=D.readData(this.fileNameLength),D.skip(E),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((F=function(L){for(var T in A)if(Object.prototype.hasOwnProperty.call(A,T)&&A[T].magic===L)return A[T];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+m.pretty(this.compressionMethod)+" unknown (inner file : "+m.transformTo("string",this.fileName)+")");this.decompressed=new _(this.compressedSize,this.uncompressedSize,this.crc32,F,D.readData(this.compressedSize))},readCentralPart:function(D){this.versionMadeBy=D.readInt(2),D.skip(2),this.bitFlag=D.readInt(2),this.compressionMethod=D.readString(2),this.date=D.readDate(),this.crc32=D.readInt(4),this.compressedSize=D.readInt(4),this.uncompressedSize=D.readInt(4);var F=D.readInt(2);if(this.extraFieldsLength=D.readInt(2),this.fileCommentLength=D.readInt(2),this.diskNumberStart=D.readInt(2),this.internalFileAttributes=D.readInt(2),this.externalFileAttributes=D.readInt(4),this.localHeaderOffset=D.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");D.skip(F),this.readExtraFields(D),this.parseZIP64ExtraField(D),this.fileComment=D.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var D=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),D==0&&(this.dosPermissions=63&this.externalFileAttributes),D==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var D=u(this.extraFields[1].value);this.uncompressedSize===m.MAX_VALUE_32BITS&&(this.uncompressedSize=D.readInt(8)),this.compressedSize===m.MAX_VALUE_32BITS&&(this.compressedSize=D.readInt(8)),this.localHeaderOffset===m.MAX_VALUE_32BITS&&(this.localHeaderOffset=D.readInt(8)),this.diskNumberStart===m.MAX_VALUE_32BITS&&(this.diskNumberStart=D.readInt(4))}},readExtraFields:function(D){var F,E,L,T=D.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});D.index+4<T;)F=D.readInt(2),E=D.readInt(2),L=D.readData(E),this.extraFields[F]={id:F,length:E,value:L};D.setIndex(T)},handleUTF8:function(){var D=I.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=S.utf8decode(this.fileName),this.fileCommentStr=S.utf8decode(this.fileComment);else{var F=this.findExtraFieldUnicodePath();if(F!==null)this.fileNameStr=F;else{var E=m.transformTo(D,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var L=this.findExtraFieldUnicodeComment();if(L!==null)this.fileCommentStr=L;else{var T=m.transformTo(D,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(T)}}},findExtraFieldUnicodePath:function(){var D=this.extraFields[28789];if(D){var F=u(D.value);return F.readInt(1)!==1||y(this.fileName)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null},findExtraFieldUnicodeComment:function(){var D=this.extraFields[25461];if(D){var F=u(D.value);return F.readInt(1)!==1||y(this.fileComment)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null}},c.exports=k},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(o,c,d){function u(F,E,L){this.name=F,this.dir=L.dir,this.date=L.date,this.comment=L.comment,this.unixPermissions=L.unixPermissions,this.dosPermissions=L.dosPermissions,this._data=E,this._dataBinary=L.binary,this.options={compression:L.compression,compressionOptions:L.compressionOptions}}var m=o("./stream/StreamHelper"),_=o("./stream/DataWorker"),y=o("./utf8"),S=o("./compressedObject"),A=o("./stream/GenericWorker");u.prototype={internalStream:function(F){var E=null,L="string";try{if(!F)throw new Error("No output type specified.");var T=(L=F.toLowerCase())==="string"||L==="text";L!=="binarystring"&&L!=="text"||(L="string"),E=this._decompressWorker();var M=!this._dataBinary;M&&!T&&(E=E.pipe(new y.Utf8EncodeWorker)),!M&&T&&(E=E.pipe(new y.Utf8DecodeWorker))}catch(R){(E=new A("error")).error(R)}return new m(E,L,"")},async:function(F,E){return this.internalStream(F).accumulate(E)},nodeStream:function(F,E){return this.internalStream(F||"nodebuffer").toNodejsStream(E)},_compressWorker:function(F,E){if(this._data instanceof S&&this._data.compression.magic===F.magic)return this._data.getCompressedWorker();var L=this._decompressWorker();return this._dataBinary||(L=L.pipe(new y.Utf8EncodeWorker)),S.createWorkerFrom(L,F,E)},_decompressWorker:function(){return this._data instanceof S?this._data.getContentWorker():this._data instanceof A?this._data:new _(this._data)}};for(var I=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],k=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},D=0;D<I.length;D++)u.prototype[I[D]]=k;c.exports=u},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(o,c,d){(function(u){var m,_,y=u.MutationObserver||u.WebKitMutationObserver;if(y){var S=0,A=new y(F),I=u.document.createTextNode("");A.observe(I,{characterData:!0}),m=function(){I.data=S=++S%2}}else if(u.setImmediate||u.MessageChannel===void 0)m="document"in u&&"onreadystatechange"in u.document.createElement("script")?function(){var E=u.document.createElement("script");E.onreadystatechange=function(){F(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},u.document.documentElement.appendChild(E)}:function(){setTimeout(F,0)};else{var k=new u.MessageChannel;k.port1.onmessage=F,m=function(){k.port2.postMessage(0)}}var D=[];function F(){var E,L;_=!0;for(var T=D.length;T;){for(L=D,D=[],E=-1;++E<T;)L[E]();T=D.length}_=!1}c.exports=function(E){D.push(E)!==1||_||m()}}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(o,c,d){var u=o("immediate");function m(){}var _={},y=["REJECTED"],S=["FULFILLED"],A=["PENDING"];function I(T){if(typeof T!="function")throw new TypeError("resolver must be a function");this.state=A,this.queue=[],this.outcome=void 0,T!==m&&E(this,T)}function k(T,M,R){this.promise=T,typeof M=="function"&&(this.onFulfilled=M,this.callFulfilled=this.otherCallFulfilled),typeof R=="function"&&(this.onRejected=R,this.callRejected=this.otherCallRejected)}function D(T,M,R){u(function(){var b;try{b=M(R)}catch(U){return _.reject(T,U)}b===T?_.reject(T,new TypeError("Cannot resolve promise with itself")):_.resolve(T,b)})}function F(T){var M=T&&T.then;if(T&&(typeof T=="object"||typeof T=="function")&&typeof M=="function")return function(){M.apply(T,arguments)}}function E(T,M){var R=!1;function b(j){R||(R=!0,_.reject(T,j))}function U(j){R||(R=!0,_.resolve(T,j))}var N=L(function(){M(U,b)});N.status==="error"&&b(N.value)}function L(T,M){var R={};try{R.value=T(M),R.status="success"}catch(b){R.status="error",R.value=b}return R}(c.exports=I).prototype.finally=function(T){if(typeof T!="function")return this;var M=this.constructor;return this.then(function(R){return M.resolve(T()).then(function(){return R})},function(R){return M.resolve(T()).then(function(){throw R})})},I.prototype.catch=function(T){return this.then(null,T)},I.prototype.then=function(T,M){if(typeof T!="function"&&this.state===S||typeof M!="function"&&this.state===y)return this;var R=new this.constructor(m);return this.state!==A?D(R,this.state===S?T:M,this.outcome):this.queue.push(new k(R,T,M)),R},k.prototype.callFulfilled=function(T){_.resolve(this.promise,T)},k.prototype.otherCallFulfilled=function(T){D(this.promise,this.onFulfilled,T)},k.prototype.callRejected=function(T){_.reject(this.promise,T)},k.prototype.otherCallRejected=function(T){D(this.promise,this.onRejected,T)},_.resolve=function(T,M){var R=L(F,M);if(R.status==="error")return _.reject(T,R.value);var b=R.value;if(b)E(T,b);else{T.state=S,T.outcome=M;for(var U=-1,N=T.queue.length;++U<N;)T.queue[U].callFulfilled(M)}return T},_.reject=function(T,M){T.state=y,T.outcome=M;for(var R=-1,b=T.queue.length;++R<b;)T.queue[R].callRejected(M);return T},I.resolve=function(T){return T instanceof this?T:_.resolve(new this(m),T)},I.reject=function(T){var M=new this(m);return _.reject(M,T)},I.all=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,b=!1;if(!R)return this.resolve([]);for(var U=new Array(R),N=0,j=-1,J=new this(m);++j<R;)$(T[j],j);return J;function $(ct,It){M.resolve(ct).then(function(et){U[It]=et,++N!==R||b||(b=!0,_.resolve(J,U))},function(et){b||(b=!0,_.reject(J,et))})}},I.race=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,b=!1;if(!R)return this.resolve([]);for(var U=-1,N=new this(m);++U<R;)j=T[U],M.resolve(j).then(function(J){b||(b=!0,_.resolve(N,J))},function(J){b||(b=!0,_.reject(N,J))});var j;return N}},{immediate:36}],38:[function(o,c,d){var u={};(0,o("./lib/utils/common").assign)(u,o("./lib/deflate"),o("./lib/inflate"),o("./lib/zlib/constants")),c.exports=u},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(o,c,d){var u=o("./zlib/deflate"),m=o("./utils/common"),_=o("./utils/strings"),y=o("./zlib/messages"),S=o("./zlib/zstream"),A=Object.prototype.toString,I=0,k=-1,D=0,F=8;function E(T){if(!(this instanceof E))return new E(T);this.options=m.assign({level:k,method:F,chunkSize:16384,windowBits:15,memLevel:8,strategy:D,to:""},T||{});var M=this.options;M.raw&&0<M.windowBits?M.windowBits=-M.windowBits:M.gzip&&0<M.windowBits&&M.windowBits<16&&(M.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;var R=u.deflateInit2(this.strm,M.level,M.method,M.windowBits,M.memLevel,M.strategy);if(R!==I)throw new Error(y[R]);if(M.header&&u.deflateSetHeader(this.strm,M.header),M.dictionary){var b;if(b=typeof M.dictionary=="string"?_.string2buf(M.dictionary):A.call(M.dictionary)==="[object ArrayBuffer]"?new Uint8Array(M.dictionary):M.dictionary,(R=u.deflateSetDictionary(this.strm,b))!==I)throw new Error(y[R]);this._dict_set=!0}}function L(T,M){var R=new E(M);if(R.push(T,!0),R.err)throw R.msg||y[R.err];return R.result}E.prototype.push=function(T,M){var R,b,U=this.strm,N=this.options.chunkSize;if(this.ended)return!1;b=M===~~M?M:M===!0?4:0,typeof T=="string"?U.input=_.string2buf(T):A.call(T)==="[object ArrayBuffer]"?U.input=new Uint8Array(T):U.input=T,U.next_in=0,U.avail_in=U.input.length;do{if(U.avail_out===0&&(U.output=new m.Buf8(N),U.next_out=0,U.avail_out=N),(R=u.deflate(U,b))!==1&&R!==I)return this.onEnd(R),!(this.ended=!0);U.avail_out!==0&&(U.avail_in!==0||b!==4&&b!==2)||(this.options.to==="string"?this.onData(_.buf2binstring(m.shrinkBuf(U.output,U.next_out))):this.onData(m.shrinkBuf(U.output,U.next_out)))}while((0<U.avail_in||U.avail_out===0)&&R!==1);return b===4?(R=u.deflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===I):b!==2||(this.onEnd(I),!(U.avail_out=0))},E.prototype.onData=function(T){this.chunks.push(T)},E.prototype.onEnd=function(T){T===I&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},d.Deflate=E,d.deflate=L,d.deflateRaw=function(T,M){return(M=M||{}).raw=!0,L(T,M)},d.gzip=function(T,M){return(M=M||{}).gzip=!0,L(T,M)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(o,c,d){var u=o("./zlib/inflate"),m=o("./utils/common"),_=o("./utils/strings"),y=o("./zlib/constants"),S=o("./zlib/messages"),A=o("./zlib/zstream"),I=o("./zlib/gzheader"),k=Object.prototype.toString;function D(E){if(!(this instanceof D))return new D(E);this.options=m.assign({chunkSize:16384,windowBits:0,to:""},E||{});var L=this.options;L.raw&&0<=L.windowBits&&L.windowBits<16&&(L.windowBits=-L.windowBits,L.windowBits===0&&(L.windowBits=-15)),!(0<=L.windowBits&&L.windowBits<16)||E&&E.windowBits||(L.windowBits+=32),15<L.windowBits&&L.windowBits<48&&!(15&L.windowBits)&&(L.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var T=u.inflateInit2(this.strm,L.windowBits);if(T!==y.Z_OK)throw new Error(S[T]);this.header=new I,u.inflateGetHeader(this.strm,this.header)}function F(E,L){var T=new D(L);if(T.push(E,!0),T.err)throw T.msg||S[T.err];return T.result}D.prototype.push=function(E,L){var T,M,R,b,U,N,j=this.strm,J=this.options.chunkSize,$=this.options.dictionary,ct=!1;if(this.ended)return!1;M=L===~~L?L:L===!0?y.Z_FINISH:y.Z_NO_FLUSH,typeof E=="string"?j.input=_.binstring2buf(E):k.call(E)==="[object ArrayBuffer]"?j.input=new Uint8Array(E):j.input=E,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new m.Buf8(J),j.next_out=0,j.avail_out=J),(T=u.inflate(j,y.Z_NO_FLUSH))===y.Z_NEED_DICT&&$&&(N=typeof $=="string"?_.string2buf($):k.call($)==="[object ArrayBuffer]"?new Uint8Array($):$,T=u.inflateSetDictionary(this.strm,N)),T===y.Z_BUF_ERROR&&ct===!0&&(T=y.Z_OK,ct=!1),T!==y.Z_STREAM_END&&T!==y.Z_OK)return this.onEnd(T),!(this.ended=!0);j.next_out&&(j.avail_out!==0&&T!==y.Z_STREAM_END&&(j.avail_in!==0||M!==y.Z_FINISH&&M!==y.Z_SYNC_FLUSH)||(this.options.to==="string"?(R=_.utf8border(j.output,j.next_out),b=j.next_out-R,U=_.buf2string(j.output,R),j.next_out=b,j.avail_out=J-b,b&&m.arraySet(j.output,j.output,R,b,0),this.onData(U)):this.onData(m.shrinkBuf(j.output,j.next_out)))),j.avail_in===0&&j.avail_out===0&&(ct=!0)}while((0<j.avail_in||j.avail_out===0)&&T!==y.Z_STREAM_END);return T===y.Z_STREAM_END&&(M=y.Z_FINISH),M===y.Z_FINISH?(T=u.inflateEnd(this.strm),this.onEnd(T),this.ended=!0,T===y.Z_OK):M!==y.Z_SYNC_FLUSH||(this.onEnd(y.Z_OK),!(j.avail_out=0))},D.prototype.onData=function(E){this.chunks.push(E)},D.prototype.onEnd=function(E){E===y.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=E,this.msg=this.strm.msg},d.Inflate=D,d.inflate=F,d.inflateRaw=function(E,L){return(L=L||{}).raw=!0,F(E,L)},d.ungzip=F},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(o,c,d){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";d.assign=function(y){for(var S=Array.prototype.slice.call(arguments,1);S.length;){var A=S.shift();if(A){if(typeof A!="object")throw new TypeError(A+"must be non-object");for(var I in A)A.hasOwnProperty(I)&&(y[I]=A[I])}}return y},d.shrinkBuf=function(y,S){return y.length===S?y:y.subarray?y.subarray(0,S):(y.length=S,y)};var m={arraySet:function(y,S,A,I,k){if(S.subarray&&y.subarray)y.set(S.subarray(A,A+I),k);else for(var D=0;D<I;D++)y[k+D]=S[A+D]},flattenChunks:function(y){var S,A,I,k,D,F;for(S=I=0,A=y.length;S<A;S++)I+=y[S].length;for(F=new Uint8Array(I),S=k=0,A=y.length;S<A;S++)D=y[S],F.set(D,k),k+=D.length;return F}},_={arraySet:function(y,S,A,I,k){for(var D=0;D<I;D++)y[k+D]=S[A+D]},flattenChunks:function(y){return[].concat.apply([],y)}};d.setTyped=function(y){y?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,m)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,_))},d.setTyped(u)},{}],42:[function(o,c,d){var u=o("./common"),m=!0,_=!0;try{String.fromCharCode.apply(null,[0])}catch{m=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{_=!1}for(var y=new u.Buf8(256),S=0;S<256;S++)y[S]=252<=S?6:248<=S?5:240<=S?4:224<=S?3:192<=S?2:1;function A(I,k){if(k<65537&&(I.subarray&&_||!I.subarray&&m))return String.fromCharCode.apply(null,u.shrinkBuf(I,k));for(var D="",F=0;F<k;F++)D+=String.fromCharCode(I[F]);return D}y[254]=y[254]=1,d.string2buf=function(I){var k,D,F,E,L,T=I.length,M=0;for(E=0;E<T;E++)(64512&(D=I.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=I.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),M+=D<128?1:D<2048?2:D<65536?3:4;for(k=new u.Buf8(M),E=L=0;L<M;E++)(64512&(D=I.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=I.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),D<128?k[L++]=D:(D<2048?k[L++]=192|D>>>6:(D<65536?k[L++]=224|D>>>12:(k[L++]=240|D>>>18,k[L++]=128|D>>>12&63),k[L++]=128|D>>>6&63),k[L++]=128|63&D);return k},d.buf2binstring=function(I){return A(I,I.length)},d.binstring2buf=function(I){for(var k=new u.Buf8(I.length),D=0,F=k.length;D<F;D++)k[D]=I.charCodeAt(D);return k},d.buf2string=function(I,k){var D,F,E,L,T=k||I.length,M=new Array(2*T);for(D=F=0;D<T;)if((E=I[D++])<128)M[F++]=E;else if(4<(L=y[E]))M[F++]=65533,D+=L-1;else{for(E&=L===2?31:L===3?15:7;1<L&&D<T;)E=E<<6|63&I[D++],L--;1<L?M[F++]=65533:E<65536?M[F++]=E:(E-=65536,M[F++]=55296|E>>10&1023,M[F++]=56320|1023&E)}return A(M,F)},d.utf8border=function(I,k){var D;for((k=k||I.length)>I.length&&(k=I.length),D=k-1;0<=D&&(192&I[D])==128;)D--;return D<0||D===0?k:D+y[I[D]]>k?D:k}},{"./common":41}],43:[function(o,c,d){c.exports=function(u,m,_,y){for(var S=65535&u|0,A=u>>>16&65535|0,I=0;_!==0;){for(_-=I=2e3<_?2e3:_;A=A+(S=S+m[y++]|0)|0,--I;);S%=65521,A%=65521}return S|A<<16|0}},{}],44:[function(o,c,d){c.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}},{}],45:[function(o,c,d){var u=function(){for(var m,_=[],y=0;y<256;y++){m=y;for(var S=0;S<8;S++)m=1&m?3988292384^m>>>1:m>>>1;_[y]=m}return _}();c.exports=function(m,_,y,S){var A=u,I=S+y;m^=-1;for(var k=S;k<I;k++)m=m>>>8^A[255&(m^_[k])];return-1^m}},{}],46:[function(o,c,d){var u,m=o("../utils/common"),_=o("./trees"),y=o("./adler32"),S=o("./crc32"),A=o("./messages"),I=0,k=4,D=0,F=-2,E=-1,L=4,T=2,M=8,R=9,b=286,U=30,N=19,j=2*b+1,J=15,$=3,ct=258,It=ct+$+1,et=42,yt=113,G=1,Pt=2,Et=3,Ct=4;function fe(W,Jt){return W.msg=A[Jt],Jt}function re(W){return(W<<1)-(4<W?9:0)}function Ft(W){for(var Jt=W.length;0<=--Jt;)W[Jt]=0}function Ot(W){var Jt=W.state,Wt=Jt.pending;Wt>W.avail_out&&(Wt=W.avail_out),Wt!==0&&(m.arraySet(W.output,Jt.pending_buf,Jt.pending_out,Wt,W.next_out),W.next_out+=Wt,Jt.pending_out+=Wt,W.total_out+=Wt,W.avail_out-=Wt,Jt.pending-=Wt,Jt.pending===0&&(Jt.pending_out=0))}function Bt(W,Jt){_._tr_flush_block(W,0<=W.block_start?W.block_start:-1,W.strstart-W.block_start,Jt),W.block_start=W.strstart,Ot(W.strm)}function ke(W,Jt){W.pending_buf[W.pending++]=Jt}function ce(W,Jt){W.pending_buf[W.pending++]=Jt>>>8&255,W.pending_buf[W.pending++]=255&Jt}function Yt(W,Jt){var Wt,pt,dt=W.max_chain_length,Dt=W.strstart,ie=W.prev_length,Kt=W.nice_match,z=W.strstart>W.w_size-It?W.strstart-(W.w_size-It):0,Q=W.window,ot=W.w_mask,nt=W.prev,vt=W.strstart+ct,Gt=Q[Dt+ie-1],Xt=Q[Dt+ie];W.prev_length>=W.good_match&&(dt>>=2),Kt>W.lookahead&&(Kt=W.lookahead);do if(Q[(Wt=Jt)+ie]===Xt&&Q[Wt+ie-1]===Gt&&Q[Wt]===Q[Dt]&&Q[++Wt]===Q[Dt+1]){Dt+=2,Wt++;do;while(Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Dt<vt);if(pt=ct-(vt-Dt),Dt=vt-ct,ie<pt){if(W.match_start=Jt,Kt<=(ie=pt))break;Gt=Q[Dt+ie-1],Xt=Q[Dt+ie]}}while((Jt=nt[Jt&ot])>z&&--dt!=0);return ie<=W.lookahead?ie:W.lookahead}function $e(W){var Jt,Wt,pt,dt,Dt,ie,Kt,z,Q,ot,nt=W.w_size;do{if(dt=W.window_size-W.lookahead-W.strstart,W.strstart>=nt+(nt-It)){for(m.arraySet(W.window,W.window,nt,nt,0),W.match_start-=nt,W.strstart-=nt,W.block_start-=nt,Jt=Wt=W.hash_size;pt=W.head[--Jt],W.head[Jt]=nt<=pt?pt-nt:0,--Wt;);for(Jt=Wt=nt;pt=W.prev[--Jt],W.prev[Jt]=nt<=pt?pt-nt:0,--Wt;);dt+=nt}if(W.strm.avail_in===0)break;if(ie=W.strm,Kt=W.window,z=W.strstart+W.lookahead,Q=dt,ot=void 0,ot=ie.avail_in,Q<ot&&(ot=Q),Wt=ot===0?0:(ie.avail_in-=ot,m.arraySet(Kt,ie.input,ie.next_in,ot,z),ie.state.wrap===1?ie.adler=y(ie.adler,Kt,ot,z):ie.state.wrap===2&&(ie.adler=S(ie.adler,Kt,ot,z)),ie.next_in+=ot,ie.total_in+=ot,ot),W.lookahead+=Wt,W.lookahead+W.insert>=$)for(Dt=W.strstart-W.insert,W.ins_h=W.window[Dt],W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+1])&W.hash_mask;W.insert&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+$-1])&W.hash_mask,W.prev[Dt&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=Dt,Dt++,W.insert--,!(W.lookahead+W.insert<$)););}while(W.lookahead<It&&W.strm.avail_in!==0)}function Oi(W,Jt){for(var Wt,pt;;){if(W.lookahead<It){if($e(W),W.lookahead<It&&Jt===I)return G;if(W.lookahead===0)break}if(Wt=0,W.lookahead>=$&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),Wt!==0&&W.strstart-Wt<=W.w_size-It&&(W.match_length=Yt(W,Wt)),W.match_length>=$)if(pt=_._tr_tally(W,W.strstart-W.match_start,W.match_length-$),W.lookahead-=W.match_length,W.match_length<=W.max_lazy_match&&W.lookahead>=$){for(W.match_length--;W.strstart++,W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart,--W.match_length!=0;);W.strstart++}else W.strstart+=W.match_length,W.match_length=0,W.ins_h=W.window[W.strstart],W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+1])&W.hash_mask;else pt=_._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++;if(pt&&(Bt(W,!1),W.strm.avail_out===0))return G}return W.insert=W.strstart<$-1?W.strstart:$-1,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):W.last_lit&&(Bt(W,!1),W.strm.avail_out===0)?G:Pt}function Oe(W,Jt){for(var Wt,pt,dt;;){if(W.lookahead<It){if($e(W),W.lookahead<It&&Jt===I)return G;if(W.lookahead===0)break}if(Wt=0,W.lookahead>=$&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),W.prev_length=W.match_length,W.prev_match=W.match_start,W.match_length=$-1,Wt!==0&&W.prev_length<W.max_lazy_match&&W.strstart-Wt<=W.w_size-It&&(W.match_length=Yt(W,Wt),W.match_length<=5&&(W.strategy===1||W.match_length===$&&4096<W.strstart-W.match_start)&&(W.match_length=$-1)),W.prev_length>=$&&W.match_length<=W.prev_length){for(dt=W.strstart+W.lookahead-$,pt=_._tr_tally(W,W.strstart-1-W.prev_match,W.prev_length-$),W.lookahead-=W.prev_length-1,W.prev_length-=2;++W.strstart<=dt&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),--W.prev_length!=0;);if(W.match_available=0,W.match_length=$-1,W.strstart++,pt&&(Bt(W,!1),W.strm.avail_out===0))return G}else if(W.match_available){if((pt=_._tr_tally(W,0,W.window[W.strstart-1]))&&Bt(W,!1),W.strstart++,W.lookahead--,W.strm.avail_out===0)return G}else W.match_available=1,W.strstart++,W.lookahead--}return W.match_available&&(pt=_._tr_tally(W,0,W.window[W.strstart-1]),W.match_available=0),W.insert=W.strstart<$-1?W.strstart:$-1,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):W.last_lit&&(Bt(W,!1),W.strm.avail_out===0)?G:Pt}function Ge(W,Jt,Wt,pt,dt){this.good_length=W,this.max_lazy=Jt,this.nice_length=Wt,this.max_chain=pt,this.func=dt}function di(){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=M,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 m.Buf16(2*j),this.dyn_dtree=new m.Buf16(2*(2*U+1)),this.bl_tree=new m.Buf16(2*(2*N+1)),Ft(this.dyn_ltree),Ft(this.dyn_dtree),Ft(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new m.Buf16(J+1),this.heap=new m.Buf16(2*b+1),Ft(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new m.Buf16(2*b+1),Ft(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 Ii(W){var Jt;return W&&W.state?(W.total_in=W.total_out=0,W.data_type=T,(Jt=W.state).pending=0,Jt.pending_out=0,Jt.wrap<0&&(Jt.wrap=-Jt.wrap),Jt.status=Jt.wrap?et:yt,W.adler=Jt.wrap===2?0:1,Jt.last_flush=I,_._tr_init(Jt),D):fe(W,F)}function mn(W){var Jt=Ii(W);return Jt===D&&function(Wt){Wt.window_size=2*Wt.w_size,Ft(Wt.head),Wt.max_lazy_match=u[Wt.level].max_lazy,Wt.good_match=u[Wt.level].good_length,Wt.nice_match=u[Wt.level].nice_length,Wt.max_chain_length=u[Wt.level].max_chain,Wt.strstart=0,Wt.block_start=0,Wt.lookahead=0,Wt.insert=0,Wt.match_length=Wt.prev_length=$-1,Wt.match_available=0,Wt.ins_h=0}(W.state),Jt}function Qi(W,Jt,Wt,pt,dt,Dt){if(!W)return F;var ie=1;if(Jt===E&&(Jt=6),pt<0?(ie=0,pt=-pt):15<pt&&(ie=2,pt-=16),dt<1||R<dt||Wt!==M||pt<8||15<pt||Jt<0||9<Jt||Dt<0||L<Dt)return fe(W,F);pt===8&&(pt=9);var Kt=new di;return(W.state=Kt).strm=W,Kt.wrap=ie,Kt.gzhead=null,Kt.w_bits=pt,Kt.w_size=1<<Kt.w_bits,Kt.w_mask=Kt.w_size-1,Kt.hash_bits=dt+7,Kt.hash_size=1<<Kt.hash_bits,Kt.hash_mask=Kt.hash_size-1,Kt.hash_shift=~~((Kt.hash_bits+$-1)/$),Kt.window=new m.Buf8(2*Kt.w_size),Kt.head=new m.Buf16(Kt.hash_size),Kt.prev=new m.Buf16(Kt.w_size),Kt.lit_bufsize=1<<dt+6,Kt.pending_buf_size=4*Kt.lit_bufsize,Kt.pending_buf=new m.Buf8(Kt.pending_buf_size),Kt.d_buf=1*Kt.lit_bufsize,Kt.l_buf=3*Kt.lit_bufsize,Kt.level=Jt,Kt.strategy=Dt,Kt.method=Wt,mn(W)}u=[new Ge(0,0,0,0,function(W,Jt){var Wt=65535;for(Wt>W.pending_buf_size-5&&(Wt=W.pending_buf_size-5);;){if(W.lookahead<=1){if($e(W),W.lookahead===0&&Jt===I)return G;if(W.lookahead===0)break}W.strstart+=W.lookahead,W.lookahead=0;var pt=W.block_start+Wt;if((W.strstart===0||W.strstart>=pt)&&(W.lookahead=W.strstart-pt,W.strstart=pt,Bt(W,!1),W.strm.avail_out===0)||W.strstart-W.block_start>=W.w_size-It&&(Bt(W,!1),W.strm.avail_out===0))return G}return W.insert=0,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):(W.strstart>W.block_start&&(Bt(W,!1),W.strm.avail_out),G)}),new Ge(4,4,8,4,Oi),new Ge(4,5,16,8,Oi),new Ge(4,6,32,32,Oi),new Ge(4,4,16,16,Oe),new Ge(8,16,32,32,Oe),new Ge(8,16,128,128,Oe),new Ge(8,32,128,256,Oe),new Ge(32,128,258,1024,Oe),new Ge(32,258,258,4096,Oe)],d.deflateInit=function(W,Jt){return Qi(W,Jt,M,15,8,0)},d.deflateInit2=Qi,d.deflateReset=mn,d.deflateResetKeep=Ii,d.deflateSetHeader=function(W,Jt){return W&&W.state?W.state.wrap!==2?F:(W.state.gzhead=Jt,D):F},d.deflate=function(W,Jt){var Wt,pt,dt,Dt;if(!W||!W.state||5<Jt||Jt<0)return W?fe(W,F):F;if(pt=W.state,!W.output||!W.input&&W.avail_in!==0||pt.status===666&&Jt!==k)return fe(W,W.avail_out===0?-5:F);if(pt.strm=W,Wt=pt.last_flush,pt.last_flush=Jt,pt.status===et)if(pt.wrap===2)W.adler=0,ke(pt,31),ke(pt,139),ke(pt,8),pt.gzhead?(ke(pt,(pt.gzhead.text?1:0)+(pt.gzhead.hcrc?2:0)+(pt.gzhead.extra?4:0)+(pt.gzhead.name?8:0)+(pt.gzhead.comment?16:0)),ke(pt,255&pt.gzhead.time),ke(pt,pt.gzhead.time>>8&255),ke(pt,pt.gzhead.time>>16&255),ke(pt,pt.gzhead.time>>24&255),ke(pt,pt.level===9?2:2<=pt.strategy||pt.level<2?4:0),ke(pt,255&pt.gzhead.os),pt.gzhead.extra&&pt.gzhead.extra.length&&(ke(pt,255&pt.gzhead.extra.length),ke(pt,pt.gzhead.extra.length>>8&255)),pt.gzhead.hcrc&&(W.adler=S(W.adler,pt.pending_buf,pt.pending,0)),pt.gzindex=0,pt.status=69):(ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,pt.level===9?2:2<=pt.strategy||pt.level<2?4:0),ke(pt,3),pt.status=yt);else{var ie=M+(pt.w_bits-8<<4)<<8;ie|=(2<=pt.strategy||pt.level<2?0:pt.level<6?1:pt.level===6?2:3)<<6,pt.strstart!==0&&(ie|=32),ie+=31-ie%31,pt.status=yt,ce(pt,ie),pt.strstart!==0&&(ce(pt,W.adler>>>16),ce(pt,65535&W.adler)),W.adler=1}if(pt.status===69)if(pt.gzhead.extra){for(dt=pt.pending;pt.gzindex<(65535&pt.gzhead.extra.length)&&(pt.pending!==pt.pending_buf_size||(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending!==pt.pending_buf_size));)ke(pt,255&pt.gzhead.extra[pt.gzindex]),pt.gzindex++;pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),pt.gzindex===pt.gzhead.extra.length&&(pt.gzindex=0,pt.status=73)}else pt.status=73;if(pt.status===73)if(pt.gzhead.name){dt=pt.pending;do{if(pt.pending===pt.pending_buf_size&&(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending===pt.pending_buf_size)){Dt=1;break}Dt=pt.gzindex<pt.gzhead.name.length?255&pt.gzhead.name.charCodeAt(pt.gzindex++):0,ke(pt,Dt)}while(Dt!==0);pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Dt===0&&(pt.gzindex=0,pt.status=91)}else pt.status=91;if(pt.status===91)if(pt.gzhead.comment){dt=pt.pending;do{if(pt.pending===pt.pending_buf_size&&(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending===pt.pending_buf_size)){Dt=1;break}Dt=pt.gzindex<pt.gzhead.comment.length?255&pt.gzhead.comment.charCodeAt(pt.gzindex++):0,ke(pt,Dt)}while(Dt!==0);pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Dt===0&&(pt.status=103)}else pt.status=103;if(pt.status===103&&(pt.gzhead.hcrc?(pt.pending+2>pt.pending_buf_size&&Ot(W),pt.pending+2<=pt.pending_buf_size&&(ke(pt,255&W.adler),ke(pt,W.adler>>8&255),W.adler=0,pt.status=yt)):pt.status=yt),pt.pending!==0){if(Ot(W),W.avail_out===0)return pt.last_flush=-1,D}else if(W.avail_in===0&&re(Jt)<=re(Wt)&&Jt!==k)return fe(W,-5);if(pt.status===666&&W.avail_in!==0)return fe(W,-5);if(W.avail_in!==0||pt.lookahead!==0||Jt!==I&&pt.status!==666){var Kt=pt.strategy===2?function(z,Q){for(var ot;;){if(z.lookahead===0&&($e(z),z.lookahead===0)){if(Q===I)return G;break}if(z.match_length=0,ot=_._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,ot&&(Bt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Bt(z,!0),z.strm.avail_out===0?Et:Ct):z.last_lit&&(Bt(z,!1),z.strm.avail_out===0)?G:Pt}(pt,Jt):pt.strategy===3?function(z,Q){for(var ot,nt,vt,Gt,Xt=z.window;;){if(z.lookahead<=ct){if($e(z),z.lookahead<=ct&&Q===I)return G;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=$&&0<z.strstart&&(nt=Xt[vt=z.strstart-1])===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]){Gt=z.strstart+ct;do;while(nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&vt<Gt);z.match_length=ct-(Gt-vt),z.match_length>z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=$?(ot=_._tr_tally(z,1,z.match_length-$),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(ot=_._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),ot&&(Bt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Bt(z,!0),z.strm.avail_out===0?Et:Ct):z.last_lit&&(Bt(z,!1),z.strm.avail_out===0)?G:Pt}(pt,Jt):u[pt.level].func(pt,Jt);if(Kt!==Et&&Kt!==Ct||(pt.status=666),Kt===G||Kt===Et)return W.avail_out===0&&(pt.last_flush=-1),D;if(Kt===Pt&&(Jt===1?_._tr_align(pt):Jt!==5&&(_._tr_stored_block(pt,0,0,!1),Jt===3&&(Ft(pt.head),pt.lookahead===0&&(pt.strstart=0,pt.block_start=0,pt.insert=0))),Ot(W),W.avail_out===0))return pt.last_flush=-1,D}return Jt!==k?D:pt.wrap<=0?1:(pt.wrap===2?(ke(pt,255&W.adler),ke(pt,W.adler>>8&255),ke(pt,W.adler>>16&255),ke(pt,W.adler>>24&255),ke(pt,255&W.total_in),ke(pt,W.total_in>>8&255),ke(pt,W.total_in>>16&255),ke(pt,W.total_in>>24&255)):(ce(pt,W.adler>>>16),ce(pt,65535&W.adler)),Ot(W),0<pt.wrap&&(pt.wrap=-pt.wrap),pt.pending!==0?D:1)},d.deflateEnd=function(W){var Jt;return W&&W.state?(Jt=W.state.status)!==et&&Jt!==69&&Jt!==73&&Jt!==91&&Jt!==103&&Jt!==yt&&Jt!==666?fe(W,F):(W.state=null,Jt===yt?fe(W,-3):D):F},d.deflateSetDictionary=function(W,Jt){var Wt,pt,dt,Dt,ie,Kt,z,Q,ot=Jt.length;if(!W||!W.state||(Dt=(Wt=W.state).wrap)===2||Dt===1&&Wt.status!==et||Wt.lookahead)return F;for(Dt===1&&(W.adler=y(W.adler,Jt,ot,0)),Wt.wrap=0,ot>=Wt.w_size&&(Dt===0&&(Ft(Wt.head),Wt.strstart=0,Wt.block_start=0,Wt.insert=0),Q=new m.Buf8(Wt.w_size),m.arraySet(Q,Jt,ot-Wt.w_size,Wt.w_size,0),Jt=Q,ot=Wt.w_size),ie=W.avail_in,Kt=W.next_in,z=W.input,W.avail_in=ot,W.next_in=0,W.input=Jt,$e(Wt);Wt.lookahead>=$;){for(pt=Wt.strstart,dt=Wt.lookahead-($-1);Wt.ins_h=(Wt.ins_h<<Wt.hash_shift^Wt.window[pt+$-1])&Wt.hash_mask,Wt.prev[pt&Wt.w_mask]=Wt.head[Wt.ins_h],Wt.head[Wt.ins_h]=pt,pt++,--dt;);Wt.strstart=pt,Wt.lookahead=$-1,$e(Wt)}return Wt.strstart+=Wt.lookahead,Wt.block_start=Wt.strstart,Wt.insert=Wt.lookahead,Wt.lookahead=0,Wt.match_length=Wt.prev_length=$-1,Wt.match_available=0,W.next_in=Kt,W.input=z,W.avail_in=ie,Wt.wrap=Dt,D},d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(o,c,d){c.exports=function(){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}},{}],48:[function(o,c,d){c.exports=function(u,m){var _,y,S,A,I,k,D,F,E,L,T,M,R,b,U,N,j,J,$,ct,It,et,yt,G,Pt;_=u.state,y=u.next_in,G=u.input,S=y+(u.avail_in-5),A=u.next_out,Pt=u.output,I=A-(m-u.avail_out),k=A+(u.avail_out-257),D=_.dmax,F=_.wsize,E=_.whave,L=_.wnext,T=_.window,M=_.hold,R=_.bits,b=_.lencode,U=_.distcode,N=(1<<_.lenbits)-1,j=(1<<_.distbits)-1;t:do{R<15&&(M+=G[y++]<<R,R+=8,M+=G[y++]<<R,R+=8),J=b[M&N];e:for(;;){if(M>>>=$=J>>>24,R-=$,($=J>>>16&255)===0)Pt[A++]=65535&J;else{if(!(16&$)){if(!(64&$)){J=b[(65535&J)+(M&(1<<$)-1)];continue e}if(32&$){_.mode=12;break t}u.msg="invalid literal/length code",_.mode=30;break t}ct=65535&J,($&=15)&&(R<$&&(M+=G[y++]<<R,R+=8),ct+=M&(1<<$)-1,M>>>=$,R-=$),R<15&&(M+=G[y++]<<R,R+=8,M+=G[y++]<<R,R+=8),J=U[M&j];i:for(;;){if(M>>>=$=J>>>24,R-=$,!(16&($=J>>>16&255))){if(!(64&$)){J=U[(65535&J)+(M&(1<<$)-1)];continue i}u.msg="invalid distance code",_.mode=30;break t}if(It=65535&J,R<($&=15)&&(M+=G[y++]<<R,(R+=8)<$&&(M+=G[y++]<<R,R+=8)),D<(It+=M&(1<<$)-1)){u.msg="invalid distance too far back",_.mode=30;break t}if(M>>>=$,R-=$,($=A-I)<It){if(E<($=It-$)&&_.sane){u.msg="invalid distance too far back",_.mode=30;break t}if(yt=T,(et=0)===L){if(et+=F-$,$<ct){for(ct-=$;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}}else if(L<$){if(et+=F+L-$,($-=L)<ct){for(ct-=$;Pt[A++]=T[et++],--$;);if(et=0,L<ct){for(ct-=$=L;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}}}else if(et+=L-$,$<ct){for(ct-=$;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}for(;2<ct;)Pt[A++]=yt[et++],Pt[A++]=yt[et++],Pt[A++]=yt[et++],ct-=3;ct&&(Pt[A++]=yt[et++],1<ct&&(Pt[A++]=yt[et++]))}else{for(et=A-It;Pt[A++]=Pt[et++],Pt[A++]=Pt[et++],Pt[A++]=Pt[et++],2<(ct-=3););ct&&(Pt[A++]=Pt[et++],1<ct&&(Pt[A++]=Pt[et++]))}break}}break}}while(y<S&&A<k);y-=ct=R>>3,M&=(1<<(R-=ct<<3))-1,u.next_in=y,u.next_out=A,u.avail_in=y<S?S-y+5:5-(y-S),u.avail_out=A<k?k-A+257:257-(A-k),_.hold=M,_.bits=R}},{}],49:[function(o,c,d){var u=o("../utils/common"),m=o("./adler32"),_=o("./crc32"),y=o("./inffast"),S=o("./inftrees"),A=1,I=2,k=0,D=-2,F=1,E=852,L=592;function T(et){return(et>>>24&255)+(et>>>8&65280)+((65280&et)<<8)+((255&et)<<24)}function M(){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 u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function R(et){var yt;return et&&et.state?(yt=et.state,et.total_in=et.total_out=yt.total=0,et.msg="",yt.wrap&&(et.adler=1&yt.wrap),yt.mode=F,yt.last=0,yt.havedict=0,yt.dmax=32768,yt.head=null,yt.hold=0,yt.bits=0,yt.lencode=yt.lendyn=new u.Buf32(E),yt.distcode=yt.distdyn=new u.Buf32(L),yt.sane=1,yt.back=-1,k):D}function b(et){var yt;return et&&et.state?((yt=et.state).wsize=0,yt.whave=0,yt.wnext=0,R(et)):D}function U(et,yt){var G,Pt;return et&&et.state?(Pt=et.state,yt<0?(G=0,yt=-yt):(G=1+(yt>>4),yt<48&&(yt&=15)),yt&&(yt<8||15<yt)?D:(Pt.window!==null&&Pt.wbits!==yt&&(Pt.window=null),Pt.wrap=G,Pt.wbits=yt,b(et))):D}function N(et,yt){var G,Pt;return et?(Pt=new M,(et.state=Pt).window=null,(G=U(et,yt))!==k&&(et.state=null),G):D}var j,J,$=!0;function ct(et){if($){var yt;for(j=new u.Buf32(512),J=new u.Buf32(32),yt=0;yt<144;)et.lens[yt++]=8;for(;yt<256;)et.lens[yt++]=9;for(;yt<280;)et.lens[yt++]=7;for(;yt<288;)et.lens[yt++]=8;for(S(A,et.lens,0,288,j,0,et.work,{bits:9}),yt=0;yt<32;)et.lens[yt++]=5;S(I,et.lens,0,32,J,0,et.work,{bits:5}),$=!1}et.lencode=j,et.lenbits=9,et.distcode=J,et.distbits=5}function It(et,yt,G,Pt){var Et,Ct=et.state;return Ct.window===null&&(Ct.wsize=1<<Ct.wbits,Ct.wnext=0,Ct.whave=0,Ct.window=new u.Buf8(Ct.wsize)),Pt>=Ct.wsize?(u.arraySet(Ct.window,yt,G-Ct.wsize,Ct.wsize,0),Ct.wnext=0,Ct.whave=Ct.wsize):(Pt<(Et=Ct.wsize-Ct.wnext)&&(Et=Pt),u.arraySet(Ct.window,yt,G-Pt,Et,Ct.wnext),(Pt-=Et)?(u.arraySet(Ct.window,yt,G-Pt,Pt,0),Ct.wnext=Pt,Ct.whave=Ct.wsize):(Ct.wnext+=Et,Ct.wnext===Ct.wsize&&(Ct.wnext=0),Ct.whave<Ct.wsize&&(Ct.whave+=Et))),0}d.inflateReset=b,d.inflateReset2=U,d.inflateResetKeep=R,d.inflateInit=function(et){return N(et,15)},d.inflateInit2=N,d.inflate=function(et,yt){var G,Pt,Et,Ct,fe,re,Ft,Ot,Bt,ke,ce,Yt,$e,Oi,Oe,Ge,di,Ii,mn,Qi,W,Jt,Wt,pt,dt=0,Dt=new u.Buf8(4),ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!et||!et.state||!et.output||!et.input&&et.avail_in!==0)return D;(G=et.state).mode===12&&(G.mode=13),fe=et.next_out,Et=et.output,Ft=et.avail_out,Ct=et.next_in,Pt=et.input,re=et.avail_in,Ot=G.hold,Bt=G.bits,ke=re,ce=Ft,Jt=k;t:for(;;)switch(G.mode){case F:if(G.wrap===0){G.mode=13;break}for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(2&G.wrap&&Ot===35615){Dt[G.check=0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0),Bt=Ot=0,G.mode=2;break}if(G.flags=0,G.head&&(G.head.done=!1),!(1&G.wrap)||(((255&Ot)<<8)+(Ot>>8))%31){et.msg="incorrect header check",G.mode=30;break}if((15&Ot)!=8){et.msg="unknown compression method",G.mode=30;break}if(Bt-=4,W=8+(15&(Ot>>>=4)),G.wbits===0)G.wbits=W;else if(W>G.wbits){et.msg="invalid window size",G.mode=30;break}G.dmax=1<<W,et.adler=G.check=1,G.mode=512&Ot?10:12,Bt=Ot=0;break;case 2:for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(G.flags=Ot,(255&G.flags)!=8){et.msg="unknown compression method",G.mode=30;break}if(57344&G.flags){et.msg="unknown header flags set",G.mode=30;break}G.head&&(G.head.text=Ot>>8&1),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0,G.mode=3;case 3:for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.head&&(G.head.time=Ot),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,Dt[2]=Ot>>>16&255,Dt[3]=Ot>>>24&255,G.check=_(G.check,Dt,4,0)),Bt=Ot=0,G.mode=4;case 4:for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.head&&(G.head.xflags=255&Ot,G.head.os=Ot>>8),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0,G.mode=5;case 5:if(1024&G.flags){for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.length=Ot,G.head&&(G.head.extra_len=Ot),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0}else G.head&&(G.head.extra=null);G.mode=6;case 6:if(1024&G.flags&&(re<(Yt=G.length)&&(Yt=re),Yt&&(G.head&&(W=G.head.extra_len-G.length,G.head.extra||(G.head.extra=new Array(G.head.extra_len)),u.arraySet(G.head.extra,Pt,Ct,Yt,W)),512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,G.length-=Yt),G.length))break t;G.length=0,G.mode=7;case 7:if(2048&G.flags){if(re===0)break t;for(Yt=0;W=Pt[Ct+Yt++],G.head&&W&&G.length<65536&&(G.head.name+=String.fromCharCode(W)),W&&Yt<re;);if(512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,W)break t}else G.head&&(G.head.name=null);G.length=0,G.mode=8;case 8:if(4096&G.flags){if(re===0)break t;for(Yt=0;W=Pt[Ct+Yt++],G.head&&W&&G.length<65536&&(G.head.comment+=String.fromCharCode(W)),W&&Yt<re;);if(512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,W)break t}else G.head&&(G.head.comment=null);G.mode=9;case 9:if(512&G.flags){for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot!==(65535&G.check)){et.msg="header crc mismatch",G.mode=30;break}Bt=Ot=0}G.head&&(G.head.hcrc=G.flags>>9&1,G.head.done=!0),et.adler=G.check=0,G.mode=12;break;case 10:for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}et.adler=G.check=T(Ot),Bt=Ot=0,G.mode=11;case 11:if(G.havedict===0)return et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,2;et.adler=G.check=1,G.mode=12;case 12:if(yt===5||yt===6)break t;case 13:if(G.last){Ot>>>=7&Bt,Bt-=7&Bt,G.mode=27;break}for(;Bt<3;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}switch(G.last=1&Ot,Bt-=1,3&(Ot>>>=1)){case 0:G.mode=14;break;case 1:if(ct(G),G.mode=20,yt!==6)break;Ot>>>=2,Bt-=2;break t;case 2:G.mode=17;break;case 3:et.msg="invalid block type",G.mode=30}Ot>>>=2,Bt-=2;break;case 14:for(Ot>>>=7&Bt,Bt-=7&Bt;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if((65535&Ot)!=(Ot>>>16^65535)){et.msg="invalid stored block lengths",G.mode=30;break}if(G.length=65535&Ot,Bt=Ot=0,G.mode=15,yt===6)break t;case 15:G.mode=16;case 16:if(Yt=G.length){if(re<Yt&&(Yt=re),Ft<Yt&&(Yt=Ft),Yt===0)break t;u.arraySet(Et,Pt,Ct,Yt,fe),re-=Yt,Ct+=Yt,Ft-=Yt,fe+=Yt,G.length-=Yt;break}G.mode=12;break;case 17:for(;Bt<14;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(G.nlen=257+(31&Ot),Ot>>>=5,Bt-=5,G.ndist=1+(31&Ot),Ot>>>=5,Bt-=5,G.ncode=4+(15&Ot),Ot>>>=4,Bt-=4,286<G.nlen||30<G.ndist){et.msg="too many length or distance symbols",G.mode=30;break}G.have=0,G.mode=18;case 18:for(;G.have<G.ncode;){for(;Bt<3;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.lens[ie[G.have++]]=7&Ot,Ot>>>=3,Bt-=3}for(;G.have<19;)G.lens[ie[G.have++]]=0;if(G.lencode=G.lendyn,G.lenbits=7,Wt={bits:G.lenbits},Jt=S(0,G.lens,0,19,G.lencode,0,G.work,Wt),G.lenbits=Wt.bits,Jt){et.msg="invalid code lengths set",G.mode=30;break}G.have=0,G.mode=19;case 19:for(;G.have<G.nlen+G.ndist;){for(;Ge=(dt=G.lencode[Ot&(1<<G.lenbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(di<16)Ot>>>=Oe,Bt-=Oe,G.lens[G.have++]=di;else{if(di===16){for(pt=Oe+2;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot>>>=Oe,Bt-=Oe,G.have===0){et.msg="invalid bit length repeat",G.mode=30;break}W=G.lens[G.have-1],Yt=3+(3&Ot),Ot>>>=2,Bt-=2}else if(di===17){for(pt=Oe+3;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Bt-=Oe,W=0,Yt=3+(7&(Ot>>>=Oe)),Ot>>>=3,Bt-=3}else{for(pt=Oe+7;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Bt-=Oe,W=0,Yt=11+(127&(Ot>>>=Oe)),Ot>>>=7,Bt-=7}if(G.have+Yt>G.nlen+G.ndist){et.msg="invalid bit length repeat",G.mode=30;break}for(;Yt--;)G.lens[G.have++]=W}}if(G.mode===30)break;if(G.lens[256]===0){et.msg="invalid code -- missing end-of-block",G.mode=30;break}if(G.lenbits=9,Wt={bits:G.lenbits},Jt=S(A,G.lens,0,G.nlen,G.lencode,0,G.work,Wt),G.lenbits=Wt.bits,Jt){et.msg="invalid literal/lengths set",G.mode=30;break}if(G.distbits=6,G.distcode=G.distdyn,Wt={bits:G.distbits},Jt=S(I,G.lens,G.nlen,G.ndist,G.distcode,0,G.work,Wt),G.distbits=Wt.bits,Jt){et.msg="invalid distances set",G.mode=30;break}if(G.mode=20,yt===6)break t;case 20:G.mode=21;case 21:if(6<=re&&258<=Ft){et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,y(et,ce),fe=et.next_out,Et=et.output,Ft=et.avail_out,Ct=et.next_in,Pt=et.input,re=et.avail_in,Ot=G.hold,Bt=G.bits,G.mode===12&&(G.back=-1);break}for(G.back=0;Ge=(dt=G.lencode[Ot&(1<<G.lenbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ge&&!(240&Ge)){for(Ii=Oe,mn=Ge,Qi=di;Ge=(dt=G.lencode[Qi+((Ot&(1<<Ii+mn)-1)>>Ii)])>>>16&255,di=65535&dt,!(Ii+(Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Ot>>>=Ii,Bt-=Ii,G.back+=Ii}if(Ot>>>=Oe,Bt-=Oe,G.back+=Oe,G.length=di,Ge===0){G.mode=26;break}if(32&Ge){G.back=-1,G.mode=12;break}if(64&Ge){et.msg="invalid literal/length code",G.mode=30;break}G.extra=15&Ge,G.mode=22;case 22:if(G.extra){for(pt=G.extra;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.length+=Ot&(1<<G.extra)-1,Ot>>>=G.extra,Bt-=G.extra,G.back+=G.extra}G.was=G.length,G.mode=23;case 23:for(;Ge=(dt=G.distcode[Ot&(1<<G.distbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(!(240&Ge)){for(Ii=Oe,mn=Ge,Qi=di;Ge=(dt=G.distcode[Qi+((Ot&(1<<Ii+mn)-1)>>Ii)])>>>16&255,di=65535&dt,!(Ii+(Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Ot>>>=Ii,Bt-=Ii,G.back+=Ii}if(Ot>>>=Oe,Bt-=Oe,G.back+=Oe,64&Ge){et.msg="invalid distance code",G.mode=30;break}G.offset=di,G.extra=15&Ge,G.mode=24;case 24:if(G.extra){for(pt=G.extra;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.offset+=Ot&(1<<G.extra)-1,Ot>>>=G.extra,Bt-=G.extra,G.back+=G.extra}if(G.offset>G.dmax){et.msg="invalid distance too far back",G.mode=30;break}G.mode=25;case 25:if(Ft===0)break t;if(Yt=ce-Ft,G.offset>Yt){if((Yt=G.offset-Yt)>G.whave&&G.sane){et.msg="invalid distance too far back",G.mode=30;break}$e=Yt>G.wnext?(Yt-=G.wnext,G.wsize-Yt):G.wnext-Yt,Yt>G.length&&(Yt=G.length),Oi=G.window}else Oi=Et,$e=fe-G.offset,Yt=G.length;for(Ft<Yt&&(Yt=Ft),Ft-=Yt,G.length-=Yt;Et[fe++]=Oi[$e++],--Yt;);G.length===0&&(G.mode=21);break;case 26:if(Ft===0)break t;Et[fe++]=G.length,Ft--,G.mode=21;break;case 27:if(G.wrap){for(;Bt<32;){if(re===0)break t;re--,Ot|=Pt[Ct++]<<Bt,Bt+=8}if(ce-=Ft,et.total_out+=ce,G.total+=ce,ce&&(et.adler=G.check=G.flags?_(G.check,Et,ce,fe-ce):m(G.check,Et,ce,fe-ce)),ce=Ft,(G.flags?Ot:T(Ot))!==G.check){et.msg="incorrect data check",G.mode=30;break}Bt=Ot=0}G.mode=28;case 28:if(G.wrap&&G.flags){for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot!==(4294967295&G.total)){et.msg="incorrect length check",G.mode=30;break}Bt=Ot=0}G.mode=29;case 29:Jt=1;break t;case 30:Jt=-3;break t;case 31:return-4;case 32:default:return D}return et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,(G.wsize||ce!==et.avail_out&&G.mode<30&&(G.mode<27||yt!==4))&&It(et,et.output,et.next_out,ce-et.avail_out)?(G.mode=31,-4):(ke-=et.avail_in,ce-=et.avail_out,et.total_in+=ke,et.total_out+=ce,G.total+=ce,G.wrap&&ce&&(et.adler=G.check=G.flags?_(G.check,Et,ce,et.next_out-ce):m(G.check,Et,ce,et.next_out-ce)),et.data_type=G.bits+(G.last?64:0)+(G.mode===12?128:0)+(G.mode===20||G.mode===15?256:0),(ke==0&&ce===0||yt===4)&&Jt===k&&(Jt=-5),Jt)},d.inflateEnd=function(et){if(!et||!et.state)return D;var yt=et.state;return yt.window&&(yt.window=null),et.state=null,k},d.inflateGetHeader=function(et,yt){var G;return et&&et.state&&2&(G=et.state).wrap?((G.head=yt).done=!1,k):D},d.inflateSetDictionary=function(et,yt){var G,Pt=yt.length;return et&&et.state?(G=et.state).wrap!==0&&G.mode!==11?D:G.mode===11&&m(1,yt,Pt,0)!==G.check?-3:It(et,yt,Pt,Pt)?(G.mode=31,-4):(G.havedict=1,k):D},d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(o,c,d){var u=o("../utils/common"),m=[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],_=[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],y=[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],S=[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];c.exports=function(A,I,k,D,F,E,L,T){var M,R,b,U,N,j,J,$,ct,It=T.bits,et=0,yt=0,G=0,Pt=0,Et=0,Ct=0,fe=0,re=0,Ft=0,Ot=0,Bt=null,ke=0,ce=new u.Buf16(16),Yt=new u.Buf16(16),$e=null,Oi=0;for(et=0;et<=15;et++)ce[et]=0;for(yt=0;yt<D;yt++)ce[I[k+yt]]++;for(Et=It,Pt=15;1<=Pt&&ce[Pt]===0;Pt--);if(Pt<Et&&(Et=Pt),Pt===0)return F[E++]=20971520,F[E++]=20971520,T.bits=1,0;for(G=1;G<Pt&&ce[G]===0;G++);for(Et<G&&(Et=G),et=re=1;et<=15;et++)if(re<<=1,(re-=ce[et])<0)return-1;if(0<re&&(A===0||Pt!==1))return-1;for(Yt[1]=0,et=1;et<15;et++)Yt[et+1]=Yt[et]+ce[et];for(yt=0;yt<D;yt++)I[k+yt]!==0&&(L[Yt[I[k+yt]]++]=yt);if(j=A===0?(Bt=$e=L,19):A===1?(Bt=m,ke-=257,$e=_,Oi-=257,256):(Bt=y,$e=S,-1),et=G,N=E,fe=yt=Ot=0,b=-1,U=(Ft=1<<(Ct=Et))-1,A===1&&852<Ft||A===2&&592<Ft)return 1;for(;;){for(J=et-fe,ct=L[yt]<j?($=0,L[yt]):L[yt]>j?($=$e[Oi+L[yt]],Bt[ke+L[yt]]):($=96,0),M=1<<et-fe,G=R=1<<Ct;F[N+(Ot>>fe)+(R-=M)]=J<<24|$<<16|ct|0,R!==0;);for(M=1<<et-1;Ot&M;)M>>=1;if(M!==0?(Ot&=M-1,Ot+=M):Ot=0,yt++,--ce[et]==0){if(et===Pt)break;et=I[k+L[yt]]}if(Et<et&&(Ot&U)!==b){for(fe===0&&(fe=Et),N+=G,re=1<<(Ct=et-fe);Ct+fe<Pt&&!((re-=ce[Ct+fe])<=0);)Ct++,re<<=1;if(Ft+=1<<Ct,A===1&&852<Ft||A===2&&592<Ft)return 1;F[b=Ot&U]=Et<<24|Ct<<16|N-E|0}}return Ot!==0&&(F[N+Ot]=et-fe<<24|64<<16|0),T.bits=Et,0}},{"../utils/common":41}],51:[function(o,c,d){c.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"}},{}],52:[function(o,c,d){var u=o("../utils/common"),m=0,_=1;function y(dt){for(var Dt=dt.length;0<=--Dt;)dt[Dt]=0}var S=0,A=29,I=256,k=I+1+A,D=30,F=19,E=2*k+1,L=15,T=16,M=7,R=256,b=16,U=17,N=18,j=[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],J=[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],$=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ct=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],It=new Array(2*(k+2));y(It);var et=new Array(2*D);y(et);var yt=new Array(512);y(yt);var G=new Array(256);y(G);var Pt=new Array(A);y(Pt);var Et,Ct,fe,re=new Array(D);function Ft(dt,Dt,ie,Kt,z){this.static_tree=dt,this.extra_bits=Dt,this.extra_base=ie,this.elems=Kt,this.max_length=z,this.has_stree=dt&&dt.length}function Ot(dt,Dt){this.dyn_tree=dt,this.max_code=0,this.stat_desc=Dt}function Bt(dt){return dt<256?yt[dt]:yt[256+(dt>>>7)]}function ke(dt,Dt){dt.pending_buf[dt.pending++]=255&Dt,dt.pending_buf[dt.pending++]=Dt>>>8&255}function ce(dt,Dt,ie){dt.bi_valid>T-ie?(dt.bi_buf|=Dt<<dt.bi_valid&65535,ke(dt,dt.bi_buf),dt.bi_buf=Dt>>T-dt.bi_valid,dt.bi_valid+=ie-T):(dt.bi_buf|=Dt<<dt.bi_valid&65535,dt.bi_valid+=ie)}function Yt(dt,Dt,ie){ce(dt,ie[2*Dt],ie[2*Dt+1])}function $e(dt,Dt){for(var ie=0;ie|=1&dt,dt>>>=1,ie<<=1,0<--Dt;);return ie>>>1}function Oi(dt,Dt,ie){var Kt,z,Q=new Array(L+1),ot=0;for(Kt=1;Kt<=L;Kt++)Q[Kt]=ot=ot+ie[Kt-1]<<1;for(z=0;z<=Dt;z++){var nt=dt[2*z+1];nt!==0&&(dt[2*z]=$e(Q[nt]++,nt))}}function Oe(dt){var Dt;for(Dt=0;Dt<k;Dt++)dt.dyn_ltree[2*Dt]=0;for(Dt=0;Dt<D;Dt++)dt.dyn_dtree[2*Dt]=0;for(Dt=0;Dt<F;Dt++)dt.bl_tree[2*Dt]=0;dt.dyn_ltree[2*R]=1,dt.opt_len=dt.static_len=0,dt.last_lit=dt.matches=0}function Ge(dt){8<dt.bi_valid?ke(dt,dt.bi_buf):0<dt.bi_valid&&(dt.pending_buf[dt.pending++]=dt.bi_buf),dt.bi_buf=0,dt.bi_valid=0}function di(dt,Dt,ie,Kt){var z=2*Dt,Q=2*ie;return dt[z]<dt[Q]||dt[z]===dt[Q]&&Kt[Dt]<=Kt[ie]}function Ii(dt,Dt,ie){for(var Kt=dt.heap[ie],z=ie<<1;z<=dt.heap_len&&(z<dt.heap_len&&di(Dt,dt.heap[z+1],dt.heap[z],dt.depth)&&z++,!di(Dt,Kt,dt.heap[z],dt.depth));)dt.heap[ie]=dt.heap[z],ie=z,z<<=1;dt.heap[ie]=Kt}function mn(dt,Dt,ie){var Kt,z,Q,ot,nt=0;if(dt.last_lit!==0)for(;Kt=dt.pending_buf[dt.d_buf+2*nt]<<8|dt.pending_buf[dt.d_buf+2*nt+1],z=dt.pending_buf[dt.l_buf+nt],nt++,Kt===0?Yt(dt,z,Dt):(Yt(dt,(Q=G[z])+I+1,Dt),(ot=j[Q])!==0&&ce(dt,z-=Pt[Q],ot),Yt(dt,Q=Bt(--Kt),ie),(ot=J[Q])!==0&&ce(dt,Kt-=re[Q],ot)),nt<dt.last_lit;);Yt(dt,R,Dt)}function Qi(dt,Dt){var ie,Kt,z,Q=Dt.dyn_tree,ot=Dt.stat_desc.static_tree,nt=Dt.stat_desc.has_stree,vt=Dt.stat_desc.elems,Gt=-1;for(dt.heap_len=0,dt.heap_max=E,ie=0;ie<vt;ie++)Q[2*ie]!==0?(dt.heap[++dt.heap_len]=Gt=ie,dt.depth[ie]=0):Q[2*ie+1]=0;for(;dt.heap_len<2;)Q[2*(z=dt.heap[++dt.heap_len]=Gt<2?++Gt:0)]=1,dt.depth[z]=0,dt.opt_len--,nt&&(dt.static_len-=ot[2*z+1]);for(Dt.max_code=Gt,ie=dt.heap_len>>1;1<=ie;ie--)Ii(dt,Q,ie);for(z=vt;ie=dt.heap[1],dt.heap[1]=dt.heap[dt.heap_len--],Ii(dt,Q,1),Kt=dt.heap[1],dt.heap[--dt.heap_max]=ie,dt.heap[--dt.heap_max]=Kt,Q[2*z]=Q[2*ie]+Q[2*Kt],dt.depth[z]=(dt.depth[ie]>=dt.depth[Kt]?dt.depth[ie]:dt.depth[Kt])+1,Q[2*ie+1]=Q[2*Kt+1]=z,dt.heap[1]=z++,Ii(dt,Q,1),2<=dt.heap_len;);dt.heap[--dt.heap_max]=dt.heap[1],function(Xt,jt){var Ne,Re,ge,we,_i,Si,ni=jt.dyn_tree,Ei=jt.max_code,qr=jt.stat_desc.static_tree,or=jt.stat_desc.has_stree,on=jt.stat_desc.extra_bits,As=jt.stat_desc.extra_base,Di=jt.stat_desc.max_length,Xs=0;for(we=0;we<=L;we++)Xt.bl_count[we]=0;for(ni[2*Xt.heap[Xt.heap_max]+1]=0,Ne=Xt.heap_max+1;Ne<E;Ne++)Di<(we=ni[2*ni[2*(Re=Xt.heap[Ne])+1]+1]+1)&&(we=Di,Xs++),ni[2*Re+1]=we,Ei<Re||(Xt.bl_count[we]++,_i=0,As<=Re&&(_i=on[Re-As]),Si=ni[2*Re],Xt.opt_len+=Si*(we+_i),or&&(Xt.static_len+=Si*(qr[2*Re+1]+_i)));if(Xs!==0){do{for(we=Di-1;Xt.bl_count[we]===0;)we--;Xt.bl_count[we]--,Xt.bl_count[we+1]+=2,Xt.bl_count[Di]--,Xs-=2}while(0<Xs);for(we=Di;we!==0;we--)for(Re=Xt.bl_count[we];Re!==0;)Ei<(ge=Xt.heap[--Ne])||(ni[2*ge+1]!==we&&(Xt.opt_len+=(we-ni[2*ge+1])*ni[2*ge],ni[2*ge+1]=we),Re--)}}(dt,Dt),Oi(Q,Gt,dt.bl_count)}function W(dt,Dt,ie){var Kt,z,Q=-1,ot=Dt[1],nt=0,vt=7,Gt=4;for(ot===0&&(vt=138,Gt=3),Dt[2*(ie+1)+1]=65535,Kt=0;Kt<=ie;Kt++)z=ot,ot=Dt[2*(Kt+1)+1],++nt<vt&&z===ot||(nt<Gt?dt.bl_tree[2*z]+=nt:z!==0?(z!==Q&&dt.bl_tree[2*z]++,dt.bl_tree[2*b]++):nt<=10?dt.bl_tree[2*U]++:dt.bl_tree[2*N]++,Q=z,Gt=(nt=0)===ot?(vt=138,3):z===ot?(vt=6,3):(vt=7,4))}function Jt(dt,Dt,ie){var Kt,z,Q=-1,ot=Dt[1],nt=0,vt=7,Gt=4;for(ot===0&&(vt=138,Gt=3),Kt=0;Kt<=ie;Kt++)if(z=ot,ot=Dt[2*(Kt+1)+1],!(++nt<vt&&z===ot)){if(nt<Gt)for(;Yt(dt,z,dt.bl_tree),--nt!=0;);else z!==0?(z!==Q&&(Yt(dt,z,dt.bl_tree),nt--),Yt(dt,b,dt.bl_tree),ce(dt,nt-3,2)):nt<=10?(Yt(dt,U,dt.bl_tree),ce(dt,nt-3,3)):(Yt(dt,N,dt.bl_tree),ce(dt,nt-11,7));Q=z,Gt=(nt=0)===ot?(vt=138,3):z===ot?(vt=6,3):(vt=7,4)}}y(re);var Wt=!1;function pt(dt,Dt,ie,Kt){ce(dt,(S<<1)+(Kt?1:0),3),function(z,Q,ot,nt){Ge(z),nt&&(ke(z,ot),ke(z,~ot)),u.arraySet(z.pending_buf,z.window,Q,ot,z.pending),z.pending+=ot}(dt,Dt,ie,!0)}d._tr_init=function(dt){Wt||(function(){var Dt,ie,Kt,z,Q,ot=new Array(L+1);for(z=Kt=0;z<A-1;z++)for(Pt[z]=Kt,Dt=0;Dt<1<<j[z];Dt++)G[Kt++]=z;for(G[Kt-1]=z,z=Q=0;z<16;z++)for(re[z]=Q,Dt=0;Dt<1<<J[z];Dt++)yt[Q++]=z;for(Q>>=7;z<D;z++)for(re[z]=Q<<7,Dt=0;Dt<1<<J[z]-7;Dt++)yt[256+Q++]=z;for(ie=0;ie<=L;ie++)ot[ie]=0;for(Dt=0;Dt<=143;)It[2*Dt+1]=8,Dt++,ot[8]++;for(;Dt<=255;)It[2*Dt+1]=9,Dt++,ot[9]++;for(;Dt<=279;)It[2*Dt+1]=7,Dt++,ot[7]++;for(;Dt<=287;)It[2*Dt+1]=8,Dt++,ot[8]++;for(Oi(It,k+1,ot),Dt=0;Dt<D;Dt++)et[2*Dt+1]=5,et[2*Dt]=$e(Dt,5);Et=new Ft(It,j,I+1,k,L),Ct=new Ft(et,J,0,D,L),fe=new Ft(new Array(0),$,0,F,M)}(),Wt=!0),dt.l_desc=new Ot(dt.dyn_ltree,Et),dt.d_desc=new Ot(dt.dyn_dtree,Ct),dt.bl_desc=new Ot(dt.bl_tree,fe),dt.bi_buf=0,dt.bi_valid=0,Oe(dt)},d._tr_stored_block=pt,d._tr_flush_block=function(dt,Dt,ie,Kt){var z,Q,ot=0;0<dt.level?(dt.strm.data_type===2&&(dt.strm.data_type=function(nt){var vt,Gt=4093624447;for(vt=0;vt<=31;vt++,Gt>>>=1)if(1&Gt&&nt.dyn_ltree[2*vt]!==0)return m;if(nt.dyn_ltree[18]!==0||nt.dyn_ltree[20]!==0||nt.dyn_ltree[26]!==0)return _;for(vt=32;vt<I;vt++)if(nt.dyn_ltree[2*vt]!==0)return _;return m}(dt)),Qi(dt,dt.l_desc),Qi(dt,dt.d_desc),ot=function(nt){var vt;for(W(nt,nt.dyn_ltree,nt.l_desc.max_code),W(nt,nt.dyn_dtree,nt.d_desc.max_code),Qi(nt,nt.bl_desc),vt=F-1;3<=vt&&nt.bl_tree[2*ct[vt]+1]===0;vt--);return nt.opt_len+=3*(vt+1)+5+5+4,vt}(dt),z=dt.opt_len+3+7>>>3,(Q=dt.static_len+3+7>>>3)<=z&&(z=Q)):z=Q=ie+5,ie+4<=z&&Dt!==-1?pt(dt,Dt,ie,Kt):dt.strategy===4||Q===z?(ce(dt,2+(Kt?1:0),3),mn(dt,It,et)):(ce(dt,4+(Kt?1:0),3),function(nt,vt,Gt,Xt){var jt;for(ce(nt,vt-257,5),ce(nt,Gt-1,5),ce(nt,Xt-4,4),jt=0;jt<Xt;jt++)ce(nt,nt.bl_tree[2*ct[jt]+1],3);Jt(nt,nt.dyn_ltree,vt-1),Jt(nt,nt.dyn_dtree,Gt-1)}(dt,dt.l_desc.max_code+1,dt.d_desc.max_code+1,ot+1),mn(dt,dt.dyn_ltree,dt.dyn_dtree)),Oe(dt),Kt&&Ge(dt)},d._tr_tally=function(dt,Dt,ie){return dt.pending_buf[dt.d_buf+2*dt.last_lit]=Dt>>>8&255,dt.pending_buf[dt.d_buf+2*dt.last_lit+1]=255&Dt,dt.pending_buf[dt.l_buf+dt.last_lit]=255&ie,dt.last_lit++,Dt===0?dt.dyn_ltree[2*ie]++:(dt.matches++,Dt--,dt.dyn_ltree[2*(G[ie]+I+1)]++,dt.dyn_dtree[2*Bt(Dt)]++),dt.last_lit===dt.lit_bufsize-1},d._tr_align=function(dt){ce(dt,2,3),Yt(dt,R,It),function(Dt){Dt.bi_valid===16?(ke(Dt,Dt.bi_buf),Dt.bi_buf=0,Dt.bi_valid=0):8<=Dt.bi_valid&&(Dt.pending_buf[Dt.pending++]=255&Dt.bi_buf,Dt.bi_buf>>=8,Dt.bi_valid-=8)}(dt)}},{"../utils/common":41}],53:[function(o,c,d){c.exports=function(){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}},{}],54:[function(o,c,d){(function(u){(function(m,_){if(!m.setImmediate){var y,S,A,I,k=1,D={},F=!1,E=m.document,L=Object.getPrototypeOf&&Object.getPrototypeOf(m);L=L&&L.setTimeout?L:m,y={}.toString.call(m.process)==="[object process]"?function(b){process.nextTick(function(){M(b)})}:function(){if(m.postMessage&&!m.importScripts){var b=!0,U=m.onmessage;return m.onmessage=function(){b=!1},m.postMessage("","*"),m.onmessage=U,b}}()?(I="setImmediate$"+Math.random()+"$",m.addEventListener?m.addEventListener("message",R,!1):m.attachEvent("onmessage",R),function(b){m.postMessage(I+b,"*")}):m.MessageChannel?((A=new MessageChannel).port1.onmessage=function(b){M(b.data)},function(b){A.port2.postMessage(b)}):E&&"onreadystatechange"in E.createElement("script")?(S=E.documentElement,function(b){var U=E.createElement("script");U.onreadystatechange=function(){M(b),U.onreadystatechange=null,S.removeChild(U),U=null},S.appendChild(U)}):function(b){setTimeout(M,0,b)},L.setImmediate=function(b){typeof b!="function"&&(b=new Function(""+b));for(var U=new Array(arguments.length-1),N=0;N<U.length;N++)U[N]=arguments[N+1];var j={callback:b,args:U};return D[k]=j,y(k),k++},L.clearImmediate=T}function T(b){delete D[b]}function M(b){if(F)setTimeout(M,0,b);else{var U=D[b];if(U){F=!0;try{(function(N){var j=N.callback,J=N.args;switch(J.length){case 0:j();break;case 1:j(J[0]);break;case 2:j(J[0],J[1]);break;case 3:j(J[0],J[1],J[2]);break;default:j.apply(_,J)}})(U)}finally{T(b),F=!1}}}}function R(b){b.source===m&&typeof b.data=="string"&&b.data.indexOf(I)===0&&M(+b.data.slice(I.length))}})(typeof self>"u"?u===void 0?this:u:self)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Sf);var um=Sf.exports;const cm=Ju(um);var Ef={exports:{}};(function(x,a){(function(o,c){c()})(Er,function(){function o(S,A){return typeof A>"u"?A={autoBom:!1}:typeof A!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),A={autoBom:!A}),A.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(S.type)?new Blob(["\uFEFF",S],{type:S.type}):S}function c(S,A,I){var k=new XMLHttpRequest;k.open("GET",S),k.responseType="blob",k.onload=function(){y(k.response,A,I)},k.onerror=function(){console.error("could not download file")},k.send()}function d(S){var A=new XMLHttpRequest;A.open("HEAD",S,!1);try{A.send()}catch{}return 200<=A.status&&299>=A.status}function u(S){try{S.dispatchEvent(new MouseEvent("click"))}catch{var A=document.createEvent("MouseEvents");A.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),S.dispatchEvent(A)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Er=="object"&&Er.global===Er?Er:void 0,_=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),y=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!_?function(S,A,I){var k=m.URL||m.webkitURL,D=document.createElement("a");A=A||S.name||"download",D.download=A,D.rel="noopener",typeof S=="string"?(D.href=S,D.origin===location.origin?u(D):d(D.href)?c(S,A,I):u(D,D.target="_blank")):(D.href=k.createObjectURL(S),setTimeout(function(){k.revokeObjectURL(D.href)},4e4),setTimeout(function(){u(D)},0))}:"msSaveOrOpenBlob"in navigator?function(S,A,I){if(A=A||S.name||"download",typeof S!="string")navigator.msSaveOrOpenBlob(o(S,I),A);else if(d(S))c(S,A,I);else{var k=document.createElement("a");k.href=S,k.target="_blank",setTimeout(function(){u(k)})}}:function(S,A,I,k){if(k=k||open("","_blank"),k&&(k.document.title=k.document.body.innerText="downloading..."),typeof S=="string")return c(S,A,I);var D=S.type==="application/octet-stream",F=/constructor/i.test(m.HTMLElement)||m.safari,E=/CriOS\/[\d]+/.test(navigator.userAgent);if((E||D&&F||_)&&typeof FileReader<"u"){var L=new FileReader;L.onloadend=function(){var R=L.result;R=E?R:R.replace(/^data:[^;]*;/,"data:attachment/file;"),k?k.location.href=R:location=R,k=null},L.readAsDataURL(S)}else{var T=m.URL||m.webkitURL,M=T.createObjectURL(S);k?k.location=M:location.href=M,k=null,setTimeout(function(){T.revokeObjectURL(M)},4e4)}});m.saveAs=y.saveAs=y,x.exports=y})})(Ef);var fm=Ef.exports;const pm=Ju(fm);class dm{constructor(a,o){window.mars3d?(this.map=a,this.panoramicViewClass=o,this.coordinate=[{heading:0,pitch:0,stop:5},{heading:90,pitch:0,stop:5},{heading:180,pitch:0,stop:5},{heading:270,pitch:0,stop:5},{heading:0,pitch:90,stop:5},{heading:0,pitch:-90,stop:5}],this.screenshotArray=[],this.events={},this.timestamp=0,this.lat,this.lng,this.alt):console.error("未引入指定插件")}start(a=!0){var o,c;if(a){this.timestamp=new Date().getTime();const d=document.getElementById("app"),u=window.innerHeight,m=document.getElementById("mars3dContainer");m&&(m.style.width=u.toString()+"px",m.style.height=u.toString()+"px"),d!==null&&d.classList.add(this.panoramicViewClass);let{lat:_,lng:y,alt:S}=this.map.getCameraView();this.lat=_,this.lng=y,this.alt=S,this.map.viewer.scene.camera.frustum.fov=window.Cesium.Math.PI_OVER_THREE*1.5}this.screenshotArray&&this.coordinate?this.coordinate[(o=this.screenshotArray)==null?void 0:o.length]?this.map.setCameraView({lat:this.lat,lng:this.lng,alt:this.alt,...this.coordinate[(c=this.screenshotArray)==null?void 0:c.length]},{complete:()=>{setTimeout(()=>{var d;this.screenshot((d=this.screenshotArray)==null?void 0:d.length)},100)}}):(this.downloadImagesAsZip(),this.screenshotArray=[]):(console.error("初始化失效"),this.emit("state",{type:"error"}))}async screenshot(a){const o=await this.map.expImage({download:!1}),c=this.map.container.getElementsByClassName("cesium-viewer-cesiumWidgetContainer"),d=await window.domtoimage.toPng(this.map.container,{filter:u=>u!==c[0]});this.mergeImage(o.image,d,o.width,o.height).then(u=>{var y;let m=Number(a)+1,_={src:u,name:"全景图_"+this.timestamp+"_"+m+".jpg"};this.emit("intercept",_),(y=this.screenshotArray)==null||y.push(_),this.start(!1)})}mergeImage(a,o,c,d){return new Promise((u,m)=>{const _=document.createElement("canvas");_.width=c,_.height=d;const y=_.getContext("2d");if(_&&y){const S=new Image;S.crossOrigin="Anonymous",S.onload=()=>{y.drawImage(S,0,0,c,d);const A=new Image;A.crossOrigin="Anonymous",A.onload=()=>{y.drawImage(A,0,0,c,d);const I=_.toDataURL("image/png");u(I)},A.src=o},S.src=a}else m()})}download(){this.screenshotArray&&this.screenshotArray.forEach(a=>{window.mars3d.Util.downloadBase64Image(a.name,a.src)})}async downloadImagesAsZip(){if(this.screenshotArray){const a=new cm;this.screenshotArray.forEach(c=>{const d=c.src.split(",")[1],u=atob(d),m=[];for(let S=0;S<u.length;S+=1024){const A=u.slice(S,S+1024),I=new Array(A.length);for(let D=0;D<A.length;D++)I[D]=A.charCodeAt(D);const k=new Uint8Array(I);m.push(k)}const _=new Blob(m,{type:"image/jpeg"}),y=`${c.name}`;a.file(y,_,{binary:!0})});const o=await a.generateAsync({type:"blob"});pm(o,"CHBIM-Panorama.zip"),this.emit("state",{type:"success",schedule:100}),this.init()}}init(){const a=document.getElementById("app");a&&a.classList.remove(this.panoramicViewClass);const o=document.getElementById("mars3dContainer");o&&(o.style.width="",o.style.height="")}on(a,o){this.events[a]?this.events[a].push(o):this.events[a]=[o]}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}}function uo(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function bf(x,a){x.prototype=Object.create(a.prototype),x.prototype.constructor=x,x.__proto__=a}/*!
|
|
2685
|
+
\0`,ce+=u(Ot,2),ce+=N.magic,ce+=u(R,2),ce+=u(b,2),ce+=u(Ft.crc32,4),ce+=u(Ft.compressedSize,4),ce+=u(Ft.uncompressedSize,4),ce+=u(J.length,2),ce+=u(Pt.length,2),{fileRecord:I.LOCAL_FILE_HEADER+ce+J+Pt,dirRecord:I.CENTRAL_FILE_HEADER+u(ke,2)+ce+u(It.length,2)+"\0\0\0\0"+u(Bt,4)+u(L,4)+J+Pt+It}}var _=o("../utils"),y=o("../stream/GenericWorker"),S=o("../utf8"),A=o("../crc32"),I=o("../signature");function k(D,F,E,L){y.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=F,this.zipPlatform=E,this.encodeFileName=L,this.streamFiles=D,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}_.inherits(k,y),k.prototype.push=function(D){var F=D.meta.percent||0,E=this.entriesCount,L=this._sources.length;this.accumulate?this.contentBuffer.push(D):(this.bytesWritten+=D.data.length,y.prototype.push.call(this,{data:D.data,meta:{currentFile:this.currentFile,percent:E?(F+100*(E-L-1))/E:100}}))},k.prototype.openedSource=function(D){this.currentSourceOffset=this.bytesWritten,this.currentFile=D.file.name;var F=this.streamFiles&&!D.file.dir;if(F){var E=m(D,F,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},k.prototype.closedSource=function(D){this.accumulate=!1;var F=this.streamFiles&&!D.file.dir,E=m(D,F,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),F)this.push({data:function(L){return I.DATA_DESCRIPTOR+u(L.crc32,4)+u(L.compressedSize,4)+u(L.uncompressedSize,4)}(D),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},k.prototype.flush=function(){for(var D=this.bytesWritten,F=0;F<this.dirRecords.length;F++)this.push({data:this.dirRecords[F],meta:{percent:100}});var E=this.bytesWritten-D,L=function(T,M,R,b,U){var N=_.transformTo("string",U(b));return I.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(T,2)+u(T,2)+u(M,4)+u(R,4)+u(N.length,2)+N}(this.dirRecords.length,E,D,this.zipComment,this.encodeFileName);this.push({data:L,meta:{percent:100}})},k.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},k.prototype.registerPrevious=function(D){this._sources.push(D);var F=this;return D.on("data",function(E){F.processChunk(E)}),D.on("end",function(){F.closedSource(F.previous.streamInfo),F._sources.length?F.prepareNextSource():F.end()}),D.on("error",function(E){F.error(E)}),this},k.prototype.resume=function(){return!!y.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},k.prototype.error=function(D){var F=this._sources;if(!y.prototype.error.call(this,D))return!1;for(var E=0;E<F.length;E++)try{F[E].error(D)}catch{}return!0},k.prototype.lock=function(){y.prototype.lock.call(this);for(var D=this._sources,F=0;F<D.length;F++)D[F].lock()},c.exports=k},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(o,c,d){var u=o("../compressions"),m=o("./ZipFileWorker");d.generateWorker=function(_,y,S){var A=new m(y.streamFiles,S,y.platform,y.encodeFileName),I=0;try{_.forEach(function(k,D){I++;var F=function(M,R){var b=M||R,U=u[b];if(!U)throw new Error(b+" is not a valid compression method !");return U}(D.options.compression,y.compression),E=D.options.compressionOptions||y.compressionOptions||{},L=D.dir,T=D.date;D._compressWorker(F,E).withStreamInfo("file",{name:k,dir:L,date:T,comment:D.comment||"",unixPermissions:D.unixPermissions,dosPermissions:D.dosPermissions}).pipe(A)}),A.entriesCount=I}catch(k){A.error(k)}return A}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(o,c,d){function u(){if(!(this instanceof u))return new u;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 m=new u;for(var _ in this)typeof this[_]!="function"&&(m[_]=this[_]);return m}}(u.prototype=o("./object")).loadAsync=o("./load"),u.support=o("./support"),u.defaults=o("./defaults"),u.version="3.10.1",u.loadAsync=function(m,_){return new u().loadAsync(m,_)},u.external=o("./external"),c.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(o,c,d){var u=o("./utils"),m=o("./external"),_=o("./utf8"),y=o("./zipEntries"),S=o("./stream/Crc32Probe"),A=o("./nodejsUtils");function I(k){return new m.Promise(function(D,F){var E=k.decompressed.getContentWorker().pipe(new S);E.on("error",function(L){F(L)}).on("end",function(){E.streamInfo.crc32!==k.decompressed.crc32?F(new Error("Corrupted zip : CRC32 mismatch")):D()}).resume()})}c.exports=function(k,D){var F=this;return D=u.extend(D||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:_.utf8decode}),A.isNode&&A.isStream(k)?m.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",k,!0,D.optimizedBinaryString,D.base64).then(function(E){var L=new y(D);return L.load(E),L}).then(function(E){var L=[m.Promise.resolve(E)],T=E.files;if(D.checkCRC32)for(var M=0;M<T.length;M++)L.push(I(T[M]));return m.Promise.all(L)}).then(function(E){for(var L=E.shift(),T=L.files,M=0;M<T.length;M++){var R=T[M],b=R.fileNameStr,U=u.resolve(R.fileNameStr);F.file(U,R.decompressed,{binary:!0,optimizedBinaryString:!0,date:R.date,dir:R.dir,comment:R.fileCommentStr.length?R.fileCommentStr:null,unixPermissions:R.unixPermissions,dosPermissions:R.dosPermissions,createFolders:D.createFolders}),R.dir||(F.file(U).unsafeOriginalName=b)}return L.zipComment.length&&(F.comment=L.zipComment),F})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(o,c,d){var u=o("../utils"),m=o("../stream/GenericWorker");function _(y,S){m.call(this,"Nodejs stream input adapter for "+y),this._upstreamEnded=!1,this._bindStream(S)}u.inherits(_,m),_.prototype._bindStream=function(y){var S=this;(this._stream=y).pause(),y.on("data",function(A){S.push({data:A,meta:{percent:0}})}).on("error",function(A){S.isPaused?this.generatedError=A:S.error(A)}).on("end",function(){S.isPaused?S._upstreamEnded=!0:S.end()})},_.prototype.pause=function(){return!!m.prototype.pause.call(this)&&(this._stream.pause(),!0)},_.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},c.exports=_},{"../stream/GenericWorker":28,"../utils":32}],13:[function(o,c,d){var u=o("readable-stream").Readable;function m(_,y,S){u.call(this,y),this._helper=_;var A=this;_.on("data",function(I,k){A.push(I)||A._helper.pause(),S&&S(k)}).on("error",function(I){A.emit("error",I)}).on("end",function(){A.push(null)})}o("../utils").inherits(m,u),m.prototype._read=function(){this._helper.resume()},c.exports=m},{"../utils":32,"readable-stream":16}],14:[function(o,c,d){c.exports={isNode:typeof Buffer<"u",newBufferFrom:function(u,m){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(u,m);if(typeof u=="number")throw new Error('The "data" argument must not be a number');return new Buffer(u,m)},allocBuffer:function(u){if(Buffer.alloc)return Buffer.alloc(u);var m=new Buffer(u);return m.fill(0),m},isBuffer:function(u){return Buffer.isBuffer(u)},isStream:function(u){return u&&typeof u.on=="function"&&typeof u.pause=="function"&&typeof u.resume=="function"}}},{}],15:[function(o,c,d){function u(U,N,j){var J,$=_.getTypeOf(N),ct=_.extend(j||{},A);ct.date=ct.date||new Date,ct.compression!==null&&(ct.compression=ct.compression.toUpperCase()),typeof ct.unixPermissions=="string"&&(ct.unixPermissions=parseInt(ct.unixPermissions,8)),ct.unixPermissions&&16384&ct.unixPermissions&&(ct.dir=!0),ct.dosPermissions&&16&ct.dosPermissions&&(ct.dir=!0),ct.dir&&(U=T(U)),ct.createFolders&&(J=L(U))&&M.call(this,J,!0);var It=$==="string"&&ct.binary===!1&&ct.base64===!1;j&&j.binary!==void 0||(ct.binary=!It),(N instanceof I&&N.uncompressedSize===0||ct.dir||!N||N.length===0)&&(ct.base64=!1,ct.binary=!0,N="",ct.compression="STORE",$="string");var et=null;et=N instanceof I||N instanceof y?N:F.isNode&&F.isStream(N)?new E(U,N):_.prepareContent(U,N,ct.binary,ct.optimizedBinaryString,ct.base64);var yt=new k(U,et,ct);this.files[U]=yt}var m=o("./utf8"),_=o("./utils"),y=o("./stream/GenericWorker"),S=o("./stream/StreamHelper"),A=o("./defaults"),I=o("./compressedObject"),k=o("./zipObject"),D=o("./generate"),F=o("./nodejsUtils"),E=o("./nodejs/NodejsStreamInputAdapter"),L=function(U){U.slice(-1)==="/"&&(U=U.substring(0,U.length-1));var N=U.lastIndexOf("/");return 0<N?U.substring(0,N):""},T=function(U){return U.slice(-1)!=="/"&&(U+="/"),U},M=function(U,N){return N=N!==void 0?N:A.createFolders,U=T(U),this.files[U]||u.call(this,U,null,{dir:!0,createFolders:N}),this.files[U]};function R(U){return Object.prototype.toString.call(U)==="[object RegExp]"}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(U){var N,j,J;for(N in this.files)J=this.files[N],(j=N.slice(this.root.length,N.length))&&N.slice(0,this.root.length)===this.root&&U(j,J)},filter:function(U){var N=[];return this.forEach(function(j,J){U(j,J)&&N.push(J)}),N},file:function(U,N,j){if(arguments.length!==1)return U=this.root+U,u.call(this,U,N,j),this;if(R(U)){var J=U;return this.filter(function(ct,It){return!It.dir&&J.test(ct)})}var $=this.files[this.root+U];return $&&!$.dir?$:null},folder:function(U){if(!U)return this;if(R(U))return this.filter(function($,ct){return ct.dir&&U.test($)});var N=this.root+U,j=M.call(this,N),J=this.clone();return J.root=j.name,J},remove:function(U){U=this.root+U;var N=this.files[U];if(N||(U.slice(-1)!=="/"&&(U+="/"),N=this.files[U]),N&&!N.dir)delete this.files[U];else for(var j=this.filter(function($,ct){return ct.name.slice(0,U.length)===U}),J=0;J<j.length;J++)delete this.files[j[J].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(U){var N,j={};try{if((j=_.extend(U||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:m.utf8encode})).type=j.type.toLowerCase(),j.compression=j.compression.toUpperCase(),j.type==="binarystring"&&(j.type="string"),!j.type)throw new Error("No output type specified.");_.checkSupport(j.type),j.platform!=="darwin"&&j.platform!=="freebsd"&&j.platform!=="linux"&&j.platform!=="sunos"||(j.platform="UNIX"),j.platform==="win32"&&(j.platform="DOS");var J=j.comment||this.comment||"";N=D.generateWorker(this,j,J)}catch($){(N=new y("error")).error($)}return new S(N,j.type||"string",j.mimeType)},generateAsync:function(U,N){return this.generateInternalStream(U).accumulate(N)},generateNodeStream:function(U,N){return(U=U||{}).type||(U.type="nodebuffer"),this.generateInternalStream(U).toNodejsStream(N)}};c.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(o,c,d){c.exports=o("stream")},{stream:void 0}],17:[function(o,c,d){var u=o("./DataReader");function m(_){u.call(this,_);for(var y=0;y<this.data.length;y++)_[y]=255&_[y]}o("../utils").inherits(m,u),m.prototype.byteAt=function(_){return this.data[this.zero+_]},m.prototype.lastIndexOfSignature=function(_){for(var y=_.charCodeAt(0),S=_.charCodeAt(1),A=_.charCodeAt(2),I=_.charCodeAt(3),k=this.length-4;0<=k;--k)if(this.data[k]===y&&this.data[k+1]===S&&this.data[k+2]===A&&this.data[k+3]===I)return k-this.zero;return-1},m.prototype.readAndCheckSignature=function(_){var y=_.charCodeAt(0),S=_.charCodeAt(1),A=_.charCodeAt(2),I=_.charCodeAt(3),k=this.readData(4);return y===k[0]&&S===k[1]&&A===k[2]&&I===k[3]},m.prototype.readData=function(_){if(this.checkOffset(_),_===0)return[];var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./DataReader":18}],18:[function(o,c,d){var u=o("../utils");function m(_){this.data=_,this.length=_.length,this.index=0,this.zero=0}m.prototype={checkOffset:function(_){this.checkIndex(this.index+_)},checkIndex:function(_){if(this.length<this.zero+_||_<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+_+"). Corrupted zip ?")},setIndex:function(_){this.checkIndex(_),this.index=_},skip:function(_){this.setIndex(this.index+_)},byteAt:function(){},readInt:function(_){var y,S=0;for(this.checkOffset(_),y=this.index+_-1;y>=this.index;y--)S=(S<<8)+this.byteAt(y);return this.index+=_,S},readString:function(_){return u.transformTo("string",this.readData(_))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var _=this.readInt(4);return new Date(Date.UTC(1980+(_>>25&127),(_>>21&15)-1,_>>16&31,_>>11&31,_>>5&63,(31&_)<<1))}},c.exports=m},{"../utils":32}],19:[function(o,c,d){var u=o("./Uint8ArrayReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.readData=function(_){this.checkOffset(_);var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(o,c,d){var u=o("./DataReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.byteAt=function(_){return this.data.charCodeAt(this.zero+_)},m.prototype.lastIndexOfSignature=function(_){return this.data.lastIndexOf(_)-this.zero},m.prototype.readAndCheckSignature=function(_){return _===this.readData(4)},m.prototype.readData=function(_){this.checkOffset(_);var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./DataReader":18}],21:[function(o,c,d){var u=o("./ArrayReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.readData=function(_){if(this.checkOffset(_),_===0)return new Uint8Array(0);var y=this.data.subarray(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./ArrayReader":17}],22:[function(o,c,d){var u=o("../utils"),m=o("../support"),_=o("./ArrayReader"),y=o("./StringReader"),S=o("./NodeBufferReader"),A=o("./Uint8ArrayReader");c.exports=function(I){var k=u.getTypeOf(I);return u.checkSupport(k),k!=="string"||m.uint8array?k==="nodebuffer"?new S(I):m.uint8array?new A(u.transformTo("uint8array",I)):new _(u.transformTo("array",I)):new y(I)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(o,c,d){d.LOCAL_FILE_HEADER="PK",d.CENTRAL_FILE_HEADER="PK",d.CENTRAL_DIRECTORY_END="PK",d.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",d.ZIP64_CENTRAL_DIRECTORY_END="PK",d.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(o,c,d){var u=o("./GenericWorker"),m=o("../utils");function _(y){u.call(this,"ConvertWorker to "+y),this.destType=y}m.inherits(_,u),_.prototype.processChunk=function(y){this.push({data:m.transformTo(this.destType,y.data),meta:y.meta})},c.exports=_},{"../utils":32,"./GenericWorker":28}],25:[function(o,c,d){var u=o("./GenericWorker"),m=o("../crc32");function _(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o("../utils").inherits(_,u),_.prototype.processChunk=function(y){this.streamInfo.crc32=m(y.data,this.streamInfo.crc32||0),this.push(y)},c.exports=_},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(o,c,d){var u=o("../utils"),m=o("./GenericWorker");function _(y){m.call(this,"DataLengthProbe for "+y),this.propName=y,this.withStreamInfo(y,0)}u.inherits(_,m),_.prototype.processChunk=function(y){if(y){var S=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=S+y.data.length}m.prototype.processChunk.call(this,y)},c.exports=_},{"../utils":32,"./GenericWorker":28}],27:[function(o,c,d){var u=o("../utils"),m=o("./GenericWorker");function _(y){m.call(this,"DataWorker");var S=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,y.then(function(A){S.dataIsReady=!0,S.data=A,S.max=A&&A.length||0,S.type=u.getTypeOf(A),S.isPaused||S._tickAndRepeat()},function(A){S.error(A)})}u.inherits(_,m),_.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this.data=null},_.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0)},_.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},_.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var y=null,S=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":y=this.data.substring(this.index,S);break;case"uint8array":y=this.data.subarray(this.index,S);break;case"array":case"nodebuffer":y=this.data.slice(this.index,S)}return this.index=S,this.push({data:y,meta:{percent:this.max?this.index/this.max*100:0}})},c.exports=_},{"../utils":32,"./GenericWorker":28}],28:[function(o,c,d){function u(m){this.name=m||"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}u.prototype={push:function(m){this.emit("data",m)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(m){this.emit("error",m)}return!0},error:function(m){return!this.isFinished&&(this.isPaused?this.generatedError=m:(this.isFinished=!0,this.emit("error",m),this.previous&&this.previous.error(m),this.cleanUp()),!0)},on:function(m,_){return this._listeners[m].push(_),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(m,_){if(this._listeners[m])for(var y=0;y<this._listeners[m].length;y++)this._listeners[m][y].call(this,_)},pipe:function(m){return m.registerPrevious(this)},registerPrevious:function(m){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=m.streamInfo,this.mergeStreamInfo(),this.previous=m;var _=this;return m.on("data",function(y){_.processChunk(y)}),m.on("end",function(){_.end()}),m.on("error",function(y){_.error(y)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var m=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),m=!0),this.previous&&this.previous.resume(),!m},flush:function(){},processChunk:function(m){this.push(m)},withStreamInfo:function(m,_){return this.extraStreamInfo[m]=_,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var m in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,m)&&(this.streamInfo[m]=this.extraStreamInfo[m])},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 m="Worker "+this.name;return this.previous?this.previous+" -> "+m:m}},c.exports=u},{}],29:[function(o,c,d){var u=o("../utils"),m=o("./ConvertWorker"),_=o("./GenericWorker"),y=o("../base64"),S=o("../support"),A=o("../external"),I=null;if(S.nodestream)try{I=o("../nodejs/NodejsStreamOutputAdapter")}catch{}function k(F,E){return new A.Promise(function(L,T){var M=[],R=F._internalType,b=F._outputType,U=F._mimeType;F.on("data",function(N,j){M.push(N),E&&E(j)}).on("error",function(N){M=[],T(N)}).on("end",function(){try{var N=function(j,J,$){switch(j){case"blob":return u.newBlob(u.transformTo("arraybuffer",J),$);case"base64":return y.encode(J);default:return u.transformTo(j,J)}}(b,function(j,J){var $,ct=0,It=null,et=0;for($=0;$<J.length;$++)et+=J[$].length;switch(j){case"string":return J.join("");case"array":return Array.prototype.concat.apply([],J);case"uint8array":for(It=new Uint8Array(et),$=0;$<J.length;$++)It.set(J[$],ct),ct+=J[$].length;return It;case"nodebuffer":return Buffer.concat(J);default:throw new Error("concat : unsupported type '"+j+"'")}}(R,M),U);L(N)}catch(j){T(j)}M=[]}).resume()})}function D(F,E,L){var T=E;switch(E){case"blob":case"arraybuffer":T="uint8array";break;case"base64":T="string"}try{this._internalType=T,this._outputType=E,this._mimeType=L,u.checkSupport(T),this._worker=F.pipe(new m(T)),F.lock()}catch(M){this._worker=new _("error"),this._worker.error(M)}}D.prototype={accumulate:function(F){return k(this,F)},on:function(F,E){var L=this;return F==="data"?this._worker.on(F,function(T){E.call(L,T.data,T.meta)}):this._worker.on(F,function(){u.delay(E,arguments,L)}),this},resume:function(){return u.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(F){if(u.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new I(this,{objectMode:this._outputType!=="nodebuffer"},F)}},c.exports=D},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(o,c,d){if(d.base64=!0,d.array=!0,d.string=!0,d.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",d.nodebuffer=typeof Buffer<"u",d.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")d.blob=!1;else{var u=new ArrayBuffer(0);try{d.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);m.append(u),d.blob=m.getBlob("application/zip").size===0}catch{d.blob=!1}}}try{d.nodestream=!!o("readable-stream").Readable}catch{d.nodestream=!1}},{"readable-stream":16}],31:[function(o,c,d){for(var u=o("./utils"),m=o("./support"),_=o("./nodejsUtils"),y=o("./stream/GenericWorker"),S=new Array(256),A=0;A<256;A++)S[A]=252<=A?6:248<=A?5:240<=A?4:224<=A?3:192<=A?2:1;S[254]=S[254]=1;function I(){y.call(this,"utf-8 decode"),this.leftOver=null}function k(){y.call(this,"utf-8 encode")}d.utf8encode=function(D){return m.nodebuffer?_.newBufferFrom(D,"utf-8"):function(F){var E,L,T,M,R,b=F.length,U=0;for(M=0;M<b;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<b&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),U+=L<128?1:L<2048?2:L<65536?3:4;for(E=m.uint8array?new Uint8Array(U):new Array(U),M=R=0;R<U;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<b&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),L<128?E[R++]=L:(L<2048?E[R++]=192|L>>>6:(L<65536?E[R++]=224|L>>>12:(E[R++]=240|L>>>18,E[R++]=128|L>>>12&63),E[R++]=128|L>>>6&63),E[R++]=128|63&L);return E}(D)},d.utf8decode=function(D){return m.nodebuffer?u.transformTo("nodebuffer",D).toString("utf-8"):function(F){var E,L,T,M,R=F.length,b=new Array(2*R);for(E=L=0;E<R;)if((T=F[E++])<128)b[L++]=T;else if(4<(M=S[T]))b[L++]=65533,E+=M-1;else{for(T&=M===2?31:M===3?15:7;1<M&&E<R;)T=T<<6|63&F[E++],M--;1<M?b[L++]=65533:T<65536?b[L++]=T:(T-=65536,b[L++]=55296|T>>10&1023,b[L++]=56320|1023&T)}return b.length!==L&&(b.subarray?b=b.subarray(0,L):b.length=L),u.applyFromCharCode(b)}(D=u.transformTo(m.uint8array?"uint8array":"array",D))},u.inherits(I,y),I.prototype.processChunk=function(D){var F=u.transformTo(m.uint8array?"uint8array":"array",D.data);if(this.leftOver&&this.leftOver.length){if(m.uint8array){var E=F;(F=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),F.set(E,this.leftOver.length)}else F=this.leftOver.concat(F);this.leftOver=null}var L=function(M,R){var b;for((R=R||M.length)>M.length&&(R=M.length),b=R-1;0<=b&&(192&M[b])==128;)b--;return b<0||b===0?R:b+S[M[b]]>R?b:R}(F),T=F;L!==F.length&&(m.uint8array?(T=F.subarray(0,L),this.leftOver=F.subarray(L,F.length)):(T=F.slice(0,L),this.leftOver=F.slice(L,F.length))),this.push({data:d.utf8decode(T),meta:D.meta})},I.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:d.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},d.Utf8DecodeWorker=I,u.inherits(k,y),k.prototype.processChunk=function(D){this.push({data:d.utf8encode(D.data),meta:D.meta})},d.Utf8EncodeWorker=k},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(o,c,d){var u=o("./support"),m=o("./base64"),_=o("./nodejsUtils"),y=o("./external");function S(E){return E}function A(E,L){for(var T=0;T<E.length;++T)L[T]=255&E.charCodeAt(T);return L}o("setimmediate"),d.newBlob=function(E,L){d.checkSupport("blob");try{return new Blob([E],{type:L})}catch{try{var T=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return T.append(E),T.getBlob(L)}catch{throw new Error("Bug : can't construct the Blob.")}}};var I={stringifyByChunk:function(E,L,T){var M=[],R=0,b=E.length;if(b<=T)return String.fromCharCode.apply(null,E);for(;R<b;)L==="array"||L==="nodebuffer"?M.push(String.fromCharCode.apply(null,E.slice(R,Math.min(R+T,b)))):M.push(String.fromCharCode.apply(null,E.subarray(R,Math.min(R+T,b)))),R+=T;return M.join("")},stringifyByChar:function(E){for(var L="",T=0;T<E.length;T++)L+=String.fromCharCode(E[T]);return L},applyCanBeUsed:{uint8array:function(){try{return u.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return u.nodebuffer&&String.fromCharCode.apply(null,_.allocBuffer(1)).length===1}catch{return!1}}()}};function k(E){var L=65536,T=d.getTypeOf(E),M=!0;if(T==="uint8array"?M=I.applyCanBeUsed.uint8array:T==="nodebuffer"&&(M=I.applyCanBeUsed.nodebuffer),M)for(;1<L;)try{return I.stringifyByChunk(E,T,L)}catch{L=Math.floor(L/2)}return I.stringifyByChar(E)}function D(E,L){for(var T=0;T<E.length;T++)L[T]=E[T];return L}d.applyFromCharCode=k;var F={};F.string={string:S,array:function(E){return A(E,new Array(E.length))},arraybuffer:function(E){return F.string.uint8array(E).buffer},uint8array:function(E){return A(E,new Uint8Array(E.length))},nodebuffer:function(E){return A(E,_.allocBuffer(E.length))}},F.array={string:k,array:S,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return _.newBufferFrom(E)}},F.arraybuffer={string:function(E){return k(new Uint8Array(E))},array:function(E){return D(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:S,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return _.newBufferFrom(new Uint8Array(E))}},F.uint8array={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:S,nodebuffer:function(E){return _.newBufferFrom(E)}},F.nodebuffer={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return F.nodebuffer.uint8array(E).buffer},uint8array:function(E){return D(E,new Uint8Array(E.length))},nodebuffer:S},d.transformTo=function(E,L){if(L=L||"",!E)return L;d.checkSupport(E);var T=d.getTypeOf(L);return F[T][E](L)},d.resolve=function(E){for(var L=E.split("/"),T=[],M=0;M<L.length;M++){var R=L[M];R==="."||R===""&&M!==0&&M!==L.length-1||(R===".."?T.pop():T.push(R))}return T.join("/")},d.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":u.nodebuffer&&_.isBuffer(E)?"nodebuffer":u.uint8array&&E instanceof Uint8Array?"uint8array":u.arraybuffer&&E instanceof ArrayBuffer?"arraybuffer":void 0},d.checkSupport=function(E){if(!u[E.toLowerCase()])throw new Error(E+" is not supported by this platform")},d.MAX_VALUE_16BITS=65535,d.MAX_VALUE_32BITS=-1,d.pretty=function(E){var L,T,M="";for(T=0;T<(E||"").length;T++)M+="\\x"+((L=E.charCodeAt(T))<16?"0":"")+L.toString(16).toUpperCase();return M},d.delay=function(E,L,T){setImmediate(function(){E.apply(T||null,L||[])})},d.inherits=function(E,L){function T(){}T.prototype=L.prototype,E.prototype=new T},d.extend=function(){var E,L,T={};for(E=0;E<arguments.length;E++)for(L in arguments[E])Object.prototype.hasOwnProperty.call(arguments[E],L)&&T[L]===void 0&&(T[L]=arguments[E][L]);return T},d.prepareContent=function(E,L,T,M,R){return y.Promise.resolve(L).then(function(b){return u.blob&&(b instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(b))!==-1)&&typeof FileReader<"u"?new y.Promise(function(U,N){var j=new FileReader;j.onload=function(J){U(J.target.result)},j.onerror=function(J){N(J.target.error)},j.readAsArrayBuffer(b)}):b}).then(function(b){var U=d.getTypeOf(b);return U?(U==="arraybuffer"?b=d.transformTo("uint8array",b):U==="string"&&(R?b=m.decode(b):T&&M!==!0&&(b=function(N){return A(N,u.uint8array?new Uint8Array(N.length):new Array(N.length))}(b))),b):y.Promise.reject(new Error("Can't read the data of '"+E+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(o,c,d){var u=o("./reader/readerFor"),m=o("./utils"),_=o("./signature"),y=o("./zipEntry"),S=o("./support");function A(I){this.files=[],this.loadOptions=I}A.prototype={checkSignature:function(I){if(!this.reader.readAndCheckSignature(I)){this.reader.index-=4;var k=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+m.pretty(k)+", expected "+m.pretty(I)+")")}},isSignature:function(I,k){var D=this.reader.index;this.reader.setIndex(I);var F=this.reader.readString(4)===k;return this.reader.setIndex(D),F},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 I=this.reader.readData(this.zipCommentLength),k=S.uint8array?"uint8array":"array",D=m.transformTo(k,I);this.zipComment=this.loadOptions.decodeFileName(D)},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 I,k,D,F=this.zip64EndOfCentralSize-44;0<F;)I=this.reader.readInt(2),k=this.reader.readInt(4),D=this.reader.readData(k),this.zip64ExtensibleData[I]={id:I,length:k,value:D}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var I,k;for(I=0;I<this.files.length;I++)k=this.files[I],this.reader.setIndex(k.localHeaderOffset),this.checkSignature(_.LOCAL_FILE_HEADER),k.readLocalPart(this.reader),k.handleUTF8(),k.processAttributes()},readCentralDir:function(){var I;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(_.CENTRAL_FILE_HEADER);)(I=new y({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(I);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 I=this.reader.lastIndexOfSignature(_.CENTRAL_DIRECTORY_END);if(I<0)throw this.isSignature(0,_.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):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");this.reader.setIndex(I);var k=I;if(this.checkSignature(_.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===m.MAX_VALUE_16BITS||this.diskWithCentralDirStart===m.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===m.MAX_VALUE_16BITS||this.centralDirRecords===m.MAX_VALUE_16BITS||this.centralDirSize===m.MAX_VALUE_32BITS||this.centralDirOffset===m.MAX_VALUE_32BITS){if(this.zip64=!0,(I=this.reader.lastIndexOfSignature(_.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(I),this.checkSignature(_.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,_.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(_.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(_.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var D=this.centralDirOffset+this.centralDirSize;this.zip64&&(D+=20,D+=12+this.zip64EndOfCentralSize);var F=k-D;if(0<F)this.isSignature(k,_.CENTRAL_FILE_HEADER)||(this.reader.zero=F);else if(F<0)throw new Error("Corrupted zip: missing "+Math.abs(F)+" bytes.")},prepareReader:function(I){this.reader=u(I)},load:function(I){this.prepareReader(I),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},c.exports=A},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(o,c,d){var u=o("./reader/readerFor"),m=o("./utils"),_=o("./compressedObject"),y=o("./crc32"),S=o("./utf8"),A=o("./compressions"),I=o("./support");function k(D,F){this.options=D,this.loadOptions=F}k.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(D){var F,E;if(D.skip(22),this.fileNameLength=D.readInt(2),E=D.readInt(2),this.fileName=D.readData(this.fileNameLength),D.skip(E),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((F=function(L){for(var T in A)if(Object.prototype.hasOwnProperty.call(A,T)&&A[T].magic===L)return A[T];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+m.pretty(this.compressionMethod)+" unknown (inner file : "+m.transformTo("string",this.fileName)+")");this.decompressed=new _(this.compressedSize,this.uncompressedSize,this.crc32,F,D.readData(this.compressedSize))},readCentralPart:function(D){this.versionMadeBy=D.readInt(2),D.skip(2),this.bitFlag=D.readInt(2),this.compressionMethod=D.readString(2),this.date=D.readDate(),this.crc32=D.readInt(4),this.compressedSize=D.readInt(4),this.uncompressedSize=D.readInt(4);var F=D.readInt(2);if(this.extraFieldsLength=D.readInt(2),this.fileCommentLength=D.readInt(2),this.diskNumberStart=D.readInt(2),this.internalFileAttributes=D.readInt(2),this.externalFileAttributes=D.readInt(4),this.localHeaderOffset=D.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");D.skip(F),this.readExtraFields(D),this.parseZIP64ExtraField(D),this.fileComment=D.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var D=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),D==0&&(this.dosPermissions=63&this.externalFileAttributes),D==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var D=u(this.extraFields[1].value);this.uncompressedSize===m.MAX_VALUE_32BITS&&(this.uncompressedSize=D.readInt(8)),this.compressedSize===m.MAX_VALUE_32BITS&&(this.compressedSize=D.readInt(8)),this.localHeaderOffset===m.MAX_VALUE_32BITS&&(this.localHeaderOffset=D.readInt(8)),this.diskNumberStart===m.MAX_VALUE_32BITS&&(this.diskNumberStart=D.readInt(4))}},readExtraFields:function(D){var F,E,L,T=D.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});D.index+4<T;)F=D.readInt(2),E=D.readInt(2),L=D.readData(E),this.extraFields[F]={id:F,length:E,value:L};D.setIndex(T)},handleUTF8:function(){var D=I.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=S.utf8decode(this.fileName),this.fileCommentStr=S.utf8decode(this.fileComment);else{var F=this.findExtraFieldUnicodePath();if(F!==null)this.fileNameStr=F;else{var E=m.transformTo(D,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var L=this.findExtraFieldUnicodeComment();if(L!==null)this.fileCommentStr=L;else{var T=m.transformTo(D,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(T)}}},findExtraFieldUnicodePath:function(){var D=this.extraFields[28789];if(D){var F=u(D.value);return F.readInt(1)!==1||y(this.fileName)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null},findExtraFieldUnicodeComment:function(){var D=this.extraFields[25461];if(D){var F=u(D.value);return F.readInt(1)!==1||y(this.fileComment)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null}},c.exports=k},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(o,c,d){function u(F,E,L){this.name=F,this.dir=L.dir,this.date=L.date,this.comment=L.comment,this.unixPermissions=L.unixPermissions,this.dosPermissions=L.dosPermissions,this._data=E,this._dataBinary=L.binary,this.options={compression:L.compression,compressionOptions:L.compressionOptions}}var m=o("./stream/StreamHelper"),_=o("./stream/DataWorker"),y=o("./utf8"),S=o("./compressedObject"),A=o("./stream/GenericWorker");u.prototype={internalStream:function(F){var E=null,L="string";try{if(!F)throw new Error("No output type specified.");var T=(L=F.toLowerCase())==="string"||L==="text";L!=="binarystring"&&L!=="text"||(L="string"),E=this._decompressWorker();var M=!this._dataBinary;M&&!T&&(E=E.pipe(new y.Utf8EncodeWorker)),!M&&T&&(E=E.pipe(new y.Utf8DecodeWorker))}catch(R){(E=new A("error")).error(R)}return new m(E,L,"")},async:function(F,E){return this.internalStream(F).accumulate(E)},nodeStream:function(F,E){return this.internalStream(F||"nodebuffer").toNodejsStream(E)},_compressWorker:function(F,E){if(this._data instanceof S&&this._data.compression.magic===F.magic)return this._data.getCompressedWorker();var L=this._decompressWorker();return this._dataBinary||(L=L.pipe(new y.Utf8EncodeWorker)),S.createWorkerFrom(L,F,E)},_decompressWorker:function(){return this._data instanceof S?this._data.getContentWorker():this._data instanceof A?this._data:new _(this._data)}};for(var I=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],k=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},D=0;D<I.length;D++)u.prototype[I[D]]=k;c.exports=u},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(o,c,d){(function(u){var m,_,y=u.MutationObserver||u.WebKitMutationObserver;if(y){var S=0,A=new y(F),I=u.document.createTextNode("");A.observe(I,{characterData:!0}),m=function(){I.data=S=++S%2}}else if(u.setImmediate||u.MessageChannel===void 0)m="document"in u&&"onreadystatechange"in u.document.createElement("script")?function(){var E=u.document.createElement("script");E.onreadystatechange=function(){F(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},u.document.documentElement.appendChild(E)}:function(){setTimeout(F,0)};else{var k=new u.MessageChannel;k.port1.onmessage=F,m=function(){k.port2.postMessage(0)}}var D=[];function F(){var E,L;_=!0;for(var T=D.length;T;){for(L=D,D=[],E=-1;++E<T;)L[E]();T=D.length}_=!1}c.exports=function(E){D.push(E)!==1||_||m()}}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(o,c,d){var u=o("immediate");function m(){}var _={},y=["REJECTED"],S=["FULFILLED"],A=["PENDING"];function I(T){if(typeof T!="function")throw new TypeError("resolver must be a function");this.state=A,this.queue=[],this.outcome=void 0,T!==m&&E(this,T)}function k(T,M,R){this.promise=T,typeof M=="function"&&(this.onFulfilled=M,this.callFulfilled=this.otherCallFulfilled),typeof R=="function"&&(this.onRejected=R,this.callRejected=this.otherCallRejected)}function D(T,M,R){u(function(){var b;try{b=M(R)}catch(U){return _.reject(T,U)}b===T?_.reject(T,new TypeError("Cannot resolve promise with itself")):_.resolve(T,b)})}function F(T){var M=T&&T.then;if(T&&(typeof T=="object"||typeof T=="function")&&typeof M=="function")return function(){M.apply(T,arguments)}}function E(T,M){var R=!1;function b(j){R||(R=!0,_.reject(T,j))}function U(j){R||(R=!0,_.resolve(T,j))}var N=L(function(){M(U,b)});N.status==="error"&&b(N.value)}function L(T,M){var R={};try{R.value=T(M),R.status="success"}catch(b){R.status="error",R.value=b}return R}(c.exports=I).prototype.finally=function(T){if(typeof T!="function")return this;var M=this.constructor;return this.then(function(R){return M.resolve(T()).then(function(){return R})},function(R){return M.resolve(T()).then(function(){throw R})})},I.prototype.catch=function(T){return this.then(null,T)},I.prototype.then=function(T,M){if(typeof T!="function"&&this.state===S||typeof M!="function"&&this.state===y)return this;var R=new this.constructor(m);return this.state!==A?D(R,this.state===S?T:M,this.outcome):this.queue.push(new k(R,T,M)),R},k.prototype.callFulfilled=function(T){_.resolve(this.promise,T)},k.prototype.otherCallFulfilled=function(T){D(this.promise,this.onFulfilled,T)},k.prototype.callRejected=function(T){_.reject(this.promise,T)},k.prototype.otherCallRejected=function(T){D(this.promise,this.onRejected,T)},_.resolve=function(T,M){var R=L(F,M);if(R.status==="error")return _.reject(T,R.value);var b=R.value;if(b)E(T,b);else{T.state=S,T.outcome=M;for(var U=-1,N=T.queue.length;++U<N;)T.queue[U].callFulfilled(M)}return T},_.reject=function(T,M){T.state=y,T.outcome=M;for(var R=-1,b=T.queue.length;++R<b;)T.queue[R].callRejected(M);return T},I.resolve=function(T){return T instanceof this?T:_.resolve(new this(m),T)},I.reject=function(T){var M=new this(m);return _.reject(M,T)},I.all=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,b=!1;if(!R)return this.resolve([]);for(var U=new Array(R),N=0,j=-1,J=new this(m);++j<R;)$(T[j],j);return J;function $(ct,It){M.resolve(ct).then(function(et){U[It]=et,++N!==R||b||(b=!0,_.resolve(J,U))},function(et){b||(b=!0,_.reject(J,et))})}},I.race=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,b=!1;if(!R)return this.resolve([]);for(var U=-1,N=new this(m);++U<R;)j=T[U],M.resolve(j).then(function(J){b||(b=!0,_.resolve(N,J))},function(J){b||(b=!0,_.reject(N,J))});var j;return N}},{immediate:36}],38:[function(o,c,d){var u={};(0,o("./lib/utils/common").assign)(u,o("./lib/deflate"),o("./lib/inflate"),o("./lib/zlib/constants")),c.exports=u},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(o,c,d){var u=o("./zlib/deflate"),m=o("./utils/common"),_=o("./utils/strings"),y=o("./zlib/messages"),S=o("./zlib/zstream"),A=Object.prototype.toString,I=0,k=-1,D=0,F=8;function E(T){if(!(this instanceof E))return new E(T);this.options=m.assign({level:k,method:F,chunkSize:16384,windowBits:15,memLevel:8,strategy:D,to:""},T||{});var M=this.options;M.raw&&0<M.windowBits?M.windowBits=-M.windowBits:M.gzip&&0<M.windowBits&&M.windowBits<16&&(M.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;var R=u.deflateInit2(this.strm,M.level,M.method,M.windowBits,M.memLevel,M.strategy);if(R!==I)throw new Error(y[R]);if(M.header&&u.deflateSetHeader(this.strm,M.header),M.dictionary){var b;if(b=typeof M.dictionary=="string"?_.string2buf(M.dictionary):A.call(M.dictionary)==="[object ArrayBuffer]"?new Uint8Array(M.dictionary):M.dictionary,(R=u.deflateSetDictionary(this.strm,b))!==I)throw new Error(y[R]);this._dict_set=!0}}function L(T,M){var R=new E(M);if(R.push(T,!0),R.err)throw R.msg||y[R.err];return R.result}E.prototype.push=function(T,M){var R,b,U=this.strm,N=this.options.chunkSize;if(this.ended)return!1;b=M===~~M?M:M===!0?4:0,typeof T=="string"?U.input=_.string2buf(T):A.call(T)==="[object ArrayBuffer]"?U.input=new Uint8Array(T):U.input=T,U.next_in=0,U.avail_in=U.input.length;do{if(U.avail_out===0&&(U.output=new m.Buf8(N),U.next_out=0,U.avail_out=N),(R=u.deflate(U,b))!==1&&R!==I)return this.onEnd(R),!(this.ended=!0);U.avail_out!==0&&(U.avail_in!==0||b!==4&&b!==2)||(this.options.to==="string"?this.onData(_.buf2binstring(m.shrinkBuf(U.output,U.next_out))):this.onData(m.shrinkBuf(U.output,U.next_out)))}while((0<U.avail_in||U.avail_out===0)&&R!==1);return b===4?(R=u.deflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===I):b!==2||(this.onEnd(I),!(U.avail_out=0))},E.prototype.onData=function(T){this.chunks.push(T)},E.prototype.onEnd=function(T){T===I&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},d.Deflate=E,d.deflate=L,d.deflateRaw=function(T,M){return(M=M||{}).raw=!0,L(T,M)},d.gzip=function(T,M){return(M=M||{}).gzip=!0,L(T,M)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(o,c,d){var u=o("./zlib/inflate"),m=o("./utils/common"),_=o("./utils/strings"),y=o("./zlib/constants"),S=o("./zlib/messages"),A=o("./zlib/zstream"),I=o("./zlib/gzheader"),k=Object.prototype.toString;function D(E){if(!(this instanceof D))return new D(E);this.options=m.assign({chunkSize:16384,windowBits:0,to:""},E||{});var L=this.options;L.raw&&0<=L.windowBits&&L.windowBits<16&&(L.windowBits=-L.windowBits,L.windowBits===0&&(L.windowBits=-15)),!(0<=L.windowBits&&L.windowBits<16)||E&&E.windowBits||(L.windowBits+=32),15<L.windowBits&&L.windowBits<48&&!(15&L.windowBits)&&(L.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var T=u.inflateInit2(this.strm,L.windowBits);if(T!==y.Z_OK)throw new Error(S[T]);this.header=new I,u.inflateGetHeader(this.strm,this.header)}function F(E,L){var T=new D(L);if(T.push(E,!0),T.err)throw T.msg||S[T.err];return T.result}D.prototype.push=function(E,L){var T,M,R,b,U,N,j=this.strm,J=this.options.chunkSize,$=this.options.dictionary,ct=!1;if(this.ended)return!1;M=L===~~L?L:L===!0?y.Z_FINISH:y.Z_NO_FLUSH,typeof E=="string"?j.input=_.binstring2buf(E):k.call(E)==="[object ArrayBuffer]"?j.input=new Uint8Array(E):j.input=E,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new m.Buf8(J),j.next_out=0,j.avail_out=J),(T=u.inflate(j,y.Z_NO_FLUSH))===y.Z_NEED_DICT&&$&&(N=typeof $=="string"?_.string2buf($):k.call($)==="[object ArrayBuffer]"?new Uint8Array($):$,T=u.inflateSetDictionary(this.strm,N)),T===y.Z_BUF_ERROR&&ct===!0&&(T=y.Z_OK,ct=!1),T!==y.Z_STREAM_END&&T!==y.Z_OK)return this.onEnd(T),!(this.ended=!0);j.next_out&&(j.avail_out!==0&&T!==y.Z_STREAM_END&&(j.avail_in!==0||M!==y.Z_FINISH&&M!==y.Z_SYNC_FLUSH)||(this.options.to==="string"?(R=_.utf8border(j.output,j.next_out),b=j.next_out-R,U=_.buf2string(j.output,R),j.next_out=b,j.avail_out=J-b,b&&m.arraySet(j.output,j.output,R,b,0),this.onData(U)):this.onData(m.shrinkBuf(j.output,j.next_out)))),j.avail_in===0&&j.avail_out===0&&(ct=!0)}while((0<j.avail_in||j.avail_out===0)&&T!==y.Z_STREAM_END);return T===y.Z_STREAM_END&&(M=y.Z_FINISH),M===y.Z_FINISH?(T=u.inflateEnd(this.strm),this.onEnd(T),this.ended=!0,T===y.Z_OK):M!==y.Z_SYNC_FLUSH||(this.onEnd(y.Z_OK),!(j.avail_out=0))},D.prototype.onData=function(E){this.chunks.push(E)},D.prototype.onEnd=function(E){E===y.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=E,this.msg=this.strm.msg},d.Inflate=D,d.inflate=F,d.inflateRaw=function(E,L){return(L=L||{}).raw=!0,F(E,L)},d.ungzip=F},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(o,c,d){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";d.assign=function(y){for(var S=Array.prototype.slice.call(arguments,1);S.length;){var A=S.shift();if(A){if(typeof A!="object")throw new TypeError(A+"must be non-object");for(var I in A)A.hasOwnProperty(I)&&(y[I]=A[I])}}return y},d.shrinkBuf=function(y,S){return y.length===S?y:y.subarray?y.subarray(0,S):(y.length=S,y)};var m={arraySet:function(y,S,A,I,k){if(S.subarray&&y.subarray)y.set(S.subarray(A,A+I),k);else for(var D=0;D<I;D++)y[k+D]=S[A+D]},flattenChunks:function(y){var S,A,I,k,D,F;for(S=I=0,A=y.length;S<A;S++)I+=y[S].length;for(F=new Uint8Array(I),S=k=0,A=y.length;S<A;S++)D=y[S],F.set(D,k),k+=D.length;return F}},_={arraySet:function(y,S,A,I,k){for(var D=0;D<I;D++)y[k+D]=S[A+D]},flattenChunks:function(y){return[].concat.apply([],y)}};d.setTyped=function(y){y?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,m)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,_))},d.setTyped(u)},{}],42:[function(o,c,d){var u=o("./common"),m=!0,_=!0;try{String.fromCharCode.apply(null,[0])}catch{m=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{_=!1}for(var y=new u.Buf8(256),S=0;S<256;S++)y[S]=252<=S?6:248<=S?5:240<=S?4:224<=S?3:192<=S?2:1;function A(I,k){if(k<65537&&(I.subarray&&_||!I.subarray&&m))return String.fromCharCode.apply(null,u.shrinkBuf(I,k));for(var D="",F=0;F<k;F++)D+=String.fromCharCode(I[F]);return D}y[254]=y[254]=1,d.string2buf=function(I){var k,D,F,E,L,T=I.length,M=0;for(E=0;E<T;E++)(64512&(D=I.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=I.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),M+=D<128?1:D<2048?2:D<65536?3:4;for(k=new u.Buf8(M),E=L=0;L<M;E++)(64512&(D=I.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=I.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),D<128?k[L++]=D:(D<2048?k[L++]=192|D>>>6:(D<65536?k[L++]=224|D>>>12:(k[L++]=240|D>>>18,k[L++]=128|D>>>12&63),k[L++]=128|D>>>6&63),k[L++]=128|63&D);return k},d.buf2binstring=function(I){return A(I,I.length)},d.binstring2buf=function(I){for(var k=new u.Buf8(I.length),D=0,F=k.length;D<F;D++)k[D]=I.charCodeAt(D);return k},d.buf2string=function(I,k){var D,F,E,L,T=k||I.length,M=new Array(2*T);for(D=F=0;D<T;)if((E=I[D++])<128)M[F++]=E;else if(4<(L=y[E]))M[F++]=65533,D+=L-1;else{for(E&=L===2?31:L===3?15:7;1<L&&D<T;)E=E<<6|63&I[D++],L--;1<L?M[F++]=65533:E<65536?M[F++]=E:(E-=65536,M[F++]=55296|E>>10&1023,M[F++]=56320|1023&E)}return A(M,F)},d.utf8border=function(I,k){var D;for((k=k||I.length)>I.length&&(k=I.length),D=k-1;0<=D&&(192&I[D])==128;)D--;return D<0||D===0?k:D+y[I[D]]>k?D:k}},{"./common":41}],43:[function(o,c,d){c.exports=function(u,m,_,y){for(var S=65535&u|0,A=u>>>16&65535|0,I=0;_!==0;){for(_-=I=2e3<_?2e3:_;A=A+(S=S+m[y++]|0)|0,--I;);S%=65521,A%=65521}return S|A<<16|0}},{}],44:[function(o,c,d){c.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}},{}],45:[function(o,c,d){var u=function(){for(var m,_=[],y=0;y<256;y++){m=y;for(var S=0;S<8;S++)m=1&m?3988292384^m>>>1:m>>>1;_[y]=m}return _}();c.exports=function(m,_,y,S){var A=u,I=S+y;m^=-1;for(var k=S;k<I;k++)m=m>>>8^A[255&(m^_[k])];return-1^m}},{}],46:[function(o,c,d){var u,m=o("../utils/common"),_=o("./trees"),y=o("./adler32"),S=o("./crc32"),A=o("./messages"),I=0,k=4,D=0,F=-2,E=-1,L=4,T=2,M=8,R=9,b=286,U=30,N=19,j=2*b+1,J=15,$=3,ct=258,It=ct+$+1,et=42,yt=113,G=1,Pt=2,Et=3,Ct=4;function fe(W,Jt){return W.msg=A[Jt],Jt}function re(W){return(W<<1)-(4<W?9:0)}function Ft(W){for(var Jt=W.length;0<=--Jt;)W[Jt]=0}function Ot(W){var Jt=W.state,Wt=Jt.pending;Wt>W.avail_out&&(Wt=W.avail_out),Wt!==0&&(m.arraySet(W.output,Jt.pending_buf,Jt.pending_out,Wt,W.next_out),W.next_out+=Wt,Jt.pending_out+=Wt,W.total_out+=Wt,W.avail_out-=Wt,Jt.pending-=Wt,Jt.pending===0&&(Jt.pending_out=0))}function Bt(W,Jt){_._tr_flush_block(W,0<=W.block_start?W.block_start:-1,W.strstart-W.block_start,Jt),W.block_start=W.strstart,Ot(W.strm)}function ke(W,Jt){W.pending_buf[W.pending++]=Jt}function ce(W,Jt){W.pending_buf[W.pending++]=Jt>>>8&255,W.pending_buf[W.pending++]=255&Jt}function Yt(W,Jt){var Wt,pt,dt=W.max_chain_length,Dt=W.strstart,ie=W.prev_length,Kt=W.nice_match,z=W.strstart>W.w_size-It?W.strstart-(W.w_size-It):0,Q=W.window,ot=W.w_mask,nt=W.prev,vt=W.strstart+ct,Gt=Q[Dt+ie-1],Xt=Q[Dt+ie];W.prev_length>=W.good_match&&(dt>>=2),Kt>W.lookahead&&(Kt=W.lookahead);do if(Q[(Wt=Jt)+ie]===Xt&&Q[Wt+ie-1]===Gt&&Q[Wt]===Q[Dt]&&Q[++Wt]===Q[Dt+1]){Dt+=2,Wt++;do;while(Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Dt<vt);if(pt=ct-(vt-Dt),Dt=vt-ct,ie<pt){if(W.match_start=Jt,Kt<=(ie=pt))break;Gt=Q[Dt+ie-1],Xt=Q[Dt+ie]}}while((Jt=nt[Jt&ot])>z&&--dt!=0);return ie<=W.lookahead?ie:W.lookahead}function $e(W){var Jt,Wt,pt,dt,Dt,ie,Kt,z,Q,ot,nt=W.w_size;do{if(dt=W.window_size-W.lookahead-W.strstart,W.strstart>=nt+(nt-It)){for(m.arraySet(W.window,W.window,nt,nt,0),W.match_start-=nt,W.strstart-=nt,W.block_start-=nt,Jt=Wt=W.hash_size;pt=W.head[--Jt],W.head[Jt]=nt<=pt?pt-nt:0,--Wt;);for(Jt=Wt=nt;pt=W.prev[--Jt],W.prev[Jt]=nt<=pt?pt-nt:0,--Wt;);dt+=nt}if(W.strm.avail_in===0)break;if(ie=W.strm,Kt=W.window,z=W.strstart+W.lookahead,Q=dt,ot=void 0,ot=ie.avail_in,Q<ot&&(ot=Q),Wt=ot===0?0:(ie.avail_in-=ot,m.arraySet(Kt,ie.input,ie.next_in,ot,z),ie.state.wrap===1?ie.adler=y(ie.adler,Kt,ot,z):ie.state.wrap===2&&(ie.adler=S(ie.adler,Kt,ot,z)),ie.next_in+=ot,ie.total_in+=ot,ot),W.lookahead+=Wt,W.lookahead+W.insert>=$)for(Dt=W.strstart-W.insert,W.ins_h=W.window[Dt],W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+1])&W.hash_mask;W.insert&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+$-1])&W.hash_mask,W.prev[Dt&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=Dt,Dt++,W.insert--,!(W.lookahead+W.insert<$)););}while(W.lookahead<It&&W.strm.avail_in!==0)}function Oi(W,Jt){for(var Wt,pt;;){if(W.lookahead<It){if($e(W),W.lookahead<It&&Jt===I)return G;if(W.lookahead===0)break}if(Wt=0,W.lookahead>=$&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),Wt!==0&&W.strstart-Wt<=W.w_size-It&&(W.match_length=Yt(W,Wt)),W.match_length>=$)if(pt=_._tr_tally(W,W.strstart-W.match_start,W.match_length-$),W.lookahead-=W.match_length,W.match_length<=W.max_lazy_match&&W.lookahead>=$){for(W.match_length--;W.strstart++,W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart,--W.match_length!=0;);W.strstart++}else W.strstart+=W.match_length,W.match_length=0,W.ins_h=W.window[W.strstart],W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+1])&W.hash_mask;else pt=_._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++;if(pt&&(Bt(W,!1),W.strm.avail_out===0))return G}return W.insert=W.strstart<$-1?W.strstart:$-1,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):W.last_lit&&(Bt(W,!1),W.strm.avail_out===0)?G:Pt}function Oe(W,Jt){for(var Wt,pt,dt;;){if(W.lookahead<It){if($e(W),W.lookahead<It&&Jt===I)return G;if(W.lookahead===0)break}if(Wt=0,W.lookahead>=$&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),W.prev_length=W.match_length,W.prev_match=W.match_start,W.match_length=$-1,Wt!==0&&W.prev_length<W.max_lazy_match&&W.strstart-Wt<=W.w_size-It&&(W.match_length=Yt(W,Wt),W.match_length<=5&&(W.strategy===1||W.match_length===$&&4096<W.strstart-W.match_start)&&(W.match_length=$-1)),W.prev_length>=$&&W.match_length<=W.prev_length){for(dt=W.strstart+W.lookahead-$,pt=_._tr_tally(W,W.strstart-1-W.prev_match,W.prev_length-$),W.lookahead-=W.prev_length-1,W.prev_length-=2;++W.strstart<=dt&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),--W.prev_length!=0;);if(W.match_available=0,W.match_length=$-1,W.strstart++,pt&&(Bt(W,!1),W.strm.avail_out===0))return G}else if(W.match_available){if((pt=_._tr_tally(W,0,W.window[W.strstart-1]))&&Bt(W,!1),W.strstart++,W.lookahead--,W.strm.avail_out===0)return G}else W.match_available=1,W.strstart++,W.lookahead--}return W.match_available&&(pt=_._tr_tally(W,0,W.window[W.strstart-1]),W.match_available=0),W.insert=W.strstart<$-1?W.strstart:$-1,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):W.last_lit&&(Bt(W,!1),W.strm.avail_out===0)?G:Pt}function Ge(W,Jt,Wt,pt,dt){this.good_length=W,this.max_lazy=Jt,this.nice_length=Wt,this.max_chain=pt,this.func=dt}function di(){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=M,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 m.Buf16(2*j),this.dyn_dtree=new m.Buf16(2*(2*U+1)),this.bl_tree=new m.Buf16(2*(2*N+1)),Ft(this.dyn_ltree),Ft(this.dyn_dtree),Ft(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new m.Buf16(J+1),this.heap=new m.Buf16(2*b+1),Ft(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new m.Buf16(2*b+1),Ft(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 Ii(W){var Jt;return W&&W.state?(W.total_in=W.total_out=0,W.data_type=T,(Jt=W.state).pending=0,Jt.pending_out=0,Jt.wrap<0&&(Jt.wrap=-Jt.wrap),Jt.status=Jt.wrap?et:yt,W.adler=Jt.wrap===2?0:1,Jt.last_flush=I,_._tr_init(Jt),D):fe(W,F)}function mn(W){var Jt=Ii(W);return Jt===D&&function(Wt){Wt.window_size=2*Wt.w_size,Ft(Wt.head),Wt.max_lazy_match=u[Wt.level].max_lazy,Wt.good_match=u[Wt.level].good_length,Wt.nice_match=u[Wt.level].nice_length,Wt.max_chain_length=u[Wt.level].max_chain,Wt.strstart=0,Wt.block_start=0,Wt.lookahead=0,Wt.insert=0,Wt.match_length=Wt.prev_length=$-1,Wt.match_available=0,Wt.ins_h=0}(W.state),Jt}function Qi(W,Jt,Wt,pt,dt,Dt){if(!W)return F;var ie=1;if(Jt===E&&(Jt=6),pt<0?(ie=0,pt=-pt):15<pt&&(ie=2,pt-=16),dt<1||R<dt||Wt!==M||pt<8||15<pt||Jt<0||9<Jt||Dt<0||L<Dt)return fe(W,F);pt===8&&(pt=9);var Kt=new di;return(W.state=Kt).strm=W,Kt.wrap=ie,Kt.gzhead=null,Kt.w_bits=pt,Kt.w_size=1<<Kt.w_bits,Kt.w_mask=Kt.w_size-1,Kt.hash_bits=dt+7,Kt.hash_size=1<<Kt.hash_bits,Kt.hash_mask=Kt.hash_size-1,Kt.hash_shift=~~((Kt.hash_bits+$-1)/$),Kt.window=new m.Buf8(2*Kt.w_size),Kt.head=new m.Buf16(Kt.hash_size),Kt.prev=new m.Buf16(Kt.w_size),Kt.lit_bufsize=1<<dt+6,Kt.pending_buf_size=4*Kt.lit_bufsize,Kt.pending_buf=new m.Buf8(Kt.pending_buf_size),Kt.d_buf=1*Kt.lit_bufsize,Kt.l_buf=3*Kt.lit_bufsize,Kt.level=Jt,Kt.strategy=Dt,Kt.method=Wt,mn(W)}u=[new Ge(0,0,0,0,function(W,Jt){var Wt=65535;for(Wt>W.pending_buf_size-5&&(Wt=W.pending_buf_size-5);;){if(W.lookahead<=1){if($e(W),W.lookahead===0&&Jt===I)return G;if(W.lookahead===0)break}W.strstart+=W.lookahead,W.lookahead=0;var pt=W.block_start+Wt;if((W.strstart===0||W.strstart>=pt)&&(W.lookahead=W.strstart-pt,W.strstart=pt,Bt(W,!1),W.strm.avail_out===0)||W.strstart-W.block_start>=W.w_size-It&&(Bt(W,!1),W.strm.avail_out===0))return G}return W.insert=0,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):(W.strstart>W.block_start&&(Bt(W,!1),W.strm.avail_out),G)}),new Ge(4,4,8,4,Oi),new Ge(4,5,16,8,Oi),new Ge(4,6,32,32,Oi),new Ge(4,4,16,16,Oe),new Ge(8,16,32,32,Oe),new Ge(8,16,128,128,Oe),new Ge(8,32,128,256,Oe),new Ge(32,128,258,1024,Oe),new Ge(32,258,258,4096,Oe)],d.deflateInit=function(W,Jt){return Qi(W,Jt,M,15,8,0)},d.deflateInit2=Qi,d.deflateReset=mn,d.deflateResetKeep=Ii,d.deflateSetHeader=function(W,Jt){return W&&W.state?W.state.wrap!==2?F:(W.state.gzhead=Jt,D):F},d.deflate=function(W,Jt){var Wt,pt,dt,Dt;if(!W||!W.state||5<Jt||Jt<0)return W?fe(W,F):F;if(pt=W.state,!W.output||!W.input&&W.avail_in!==0||pt.status===666&&Jt!==k)return fe(W,W.avail_out===0?-5:F);if(pt.strm=W,Wt=pt.last_flush,pt.last_flush=Jt,pt.status===et)if(pt.wrap===2)W.adler=0,ke(pt,31),ke(pt,139),ke(pt,8),pt.gzhead?(ke(pt,(pt.gzhead.text?1:0)+(pt.gzhead.hcrc?2:0)+(pt.gzhead.extra?4:0)+(pt.gzhead.name?8:0)+(pt.gzhead.comment?16:0)),ke(pt,255&pt.gzhead.time),ke(pt,pt.gzhead.time>>8&255),ke(pt,pt.gzhead.time>>16&255),ke(pt,pt.gzhead.time>>24&255),ke(pt,pt.level===9?2:2<=pt.strategy||pt.level<2?4:0),ke(pt,255&pt.gzhead.os),pt.gzhead.extra&&pt.gzhead.extra.length&&(ke(pt,255&pt.gzhead.extra.length),ke(pt,pt.gzhead.extra.length>>8&255)),pt.gzhead.hcrc&&(W.adler=S(W.adler,pt.pending_buf,pt.pending,0)),pt.gzindex=0,pt.status=69):(ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,pt.level===9?2:2<=pt.strategy||pt.level<2?4:0),ke(pt,3),pt.status=yt);else{var ie=M+(pt.w_bits-8<<4)<<8;ie|=(2<=pt.strategy||pt.level<2?0:pt.level<6?1:pt.level===6?2:3)<<6,pt.strstart!==0&&(ie|=32),ie+=31-ie%31,pt.status=yt,ce(pt,ie),pt.strstart!==0&&(ce(pt,W.adler>>>16),ce(pt,65535&W.adler)),W.adler=1}if(pt.status===69)if(pt.gzhead.extra){for(dt=pt.pending;pt.gzindex<(65535&pt.gzhead.extra.length)&&(pt.pending!==pt.pending_buf_size||(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending!==pt.pending_buf_size));)ke(pt,255&pt.gzhead.extra[pt.gzindex]),pt.gzindex++;pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),pt.gzindex===pt.gzhead.extra.length&&(pt.gzindex=0,pt.status=73)}else pt.status=73;if(pt.status===73)if(pt.gzhead.name){dt=pt.pending;do{if(pt.pending===pt.pending_buf_size&&(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending===pt.pending_buf_size)){Dt=1;break}Dt=pt.gzindex<pt.gzhead.name.length?255&pt.gzhead.name.charCodeAt(pt.gzindex++):0,ke(pt,Dt)}while(Dt!==0);pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Dt===0&&(pt.gzindex=0,pt.status=91)}else pt.status=91;if(pt.status===91)if(pt.gzhead.comment){dt=pt.pending;do{if(pt.pending===pt.pending_buf_size&&(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending===pt.pending_buf_size)){Dt=1;break}Dt=pt.gzindex<pt.gzhead.comment.length?255&pt.gzhead.comment.charCodeAt(pt.gzindex++):0,ke(pt,Dt)}while(Dt!==0);pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Dt===0&&(pt.status=103)}else pt.status=103;if(pt.status===103&&(pt.gzhead.hcrc?(pt.pending+2>pt.pending_buf_size&&Ot(W),pt.pending+2<=pt.pending_buf_size&&(ke(pt,255&W.adler),ke(pt,W.adler>>8&255),W.adler=0,pt.status=yt)):pt.status=yt),pt.pending!==0){if(Ot(W),W.avail_out===0)return pt.last_flush=-1,D}else if(W.avail_in===0&&re(Jt)<=re(Wt)&&Jt!==k)return fe(W,-5);if(pt.status===666&&W.avail_in!==0)return fe(W,-5);if(W.avail_in!==0||pt.lookahead!==0||Jt!==I&&pt.status!==666){var Kt=pt.strategy===2?function(z,Q){for(var ot;;){if(z.lookahead===0&&($e(z),z.lookahead===0)){if(Q===I)return G;break}if(z.match_length=0,ot=_._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,ot&&(Bt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Bt(z,!0),z.strm.avail_out===0?Et:Ct):z.last_lit&&(Bt(z,!1),z.strm.avail_out===0)?G:Pt}(pt,Jt):pt.strategy===3?function(z,Q){for(var ot,nt,vt,Gt,Xt=z.window;;){if(z.lookahead<=ct){if($e(z),z.lookahead<=ct&&Q===I)return G;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=$&&0<z.strstart&&(nt=Xt[vt=z.strstart-1])===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]){Gt=z.strstart+ct;do;while(nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&vt<Gt);z.match_length=ct-(Gt-vt),z.match_length>z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=$?(ot=_._tr_tally(z,1,z.match_length-$),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(ot=_._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),ot&&(Bt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Bt(z,!0),z.strm.avail_out===0?Et:Ct):z.last_lit&&(Bt(z,!1),z.strm.avail_out===0)?G:Pt}(pt,Jt):u[pt.level].func(pt,Jt);if(Kt!==Et&&Kt!==Ct||(pt.status=666),Kt===G||Kt===Et)return W.avail_out===0&&(pt.last_flush=-1),D;if(Kt===Pt&&(Jt===1?_._tr_align(pt):Jt!==5&&(_._tr_stored_block(pt,0,0,!1),Jt===3&&(Ft(pt.head),pt.lookahead===0&&(pt.strstart=0,pt.block_start=0,pt.insert=0))),Ot(W),W.avail_out===0))return pt.last_flush=-1,D}return Jt!==k?D:pt.wrap<=0?1:(pt.wrap===2?(ke(pt,255&W.adler),ke(pt,W.adler>>8&255),ke(pt,W.adler>>16&255),ke(pt,W.adler>>24&255),ke(pt,255&W.total_in),ke(pt,W.total_in>>8&255),ke(pt,W.total_in>>16&255),ke(pt,W.total_in>>24&255)):(ce(pt,W.adler>>>16),ce(pt,65535&W.adler)),Ot(W),0<pt.wrap&&(pt.wrap=-pt.wrap),pt.pending!==0?D:1)},d.deflateEnd=function(W){var Jt;return W&&W.state?(Jt=W.state.status)!==et&&Jt!==69&&Jt!==73&&Jt!==91&&Jt!==103&&Jt!==yt&&Jt!==666?fe(W,F):(W.state=null,Jt===yt?fe(W,-3):D):F},d.deflateSetDictionary=function(W,Jt){var Wt,pt,dt,Dt,ie,Kt,z,Q,ot=Jt.length;if(!W||!W.state||(Dt=(Wt=W.state).wrap)===2||Dt===1&&Wt.status!==et||Wt.lookahead)return F;for(Dt===1&&(W.adler=y(W.adler,Jt,ot,0)),Wt.wrap=0,ot>=Wt.w_size&&(Dt===0&&(Ft(Wt.head),Wt.strstart=0,Wt.block_start=0,Wt.insert=0),Q=new m.Buf8(Wt.w_size),m.arraySet(Q,Jt,ot-Wt.w_size,Wt.w_size,0),Jt=Q,ot=Wt.w_size),ie=W.avail_in,Kt=W.next_in,z=W.input,W.avail_in=ot,W.next_in=0,W.input=Jt,$e(Wt);Wt.lookahead>=$;){for(pt=Wt.strstart,dt=Wt.lookahead-($-1);Wt.ins_h=(Wt.ins_h<<Wt.hash_shift^Wt.window[pt+$-1])&Wt.hash_mask,Wt.prev[pt&Wt.w_mask]=Wt.head[Wt.ins_h],Wt.head[Wt.ins_h]=pt,pt++,--dt;);Wt.strstart=pt,Wt.lookahead=$-1,$e(Wt)}return Wt.strstart+=Wt.lookahead,Wt.block_start=Wt.strstart,Wt.insert=Wt.lookahead,Wt.lookahead=0,Wt.match_length=Wt.prev_length=$-1,Wt.match_available=0,W.next_in=Kt,W.input=z,W.avail_in=ie,Wt.wrap=Dt,D},d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(o,c,d){c.exports=function(){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}},{}],48:[function(o,c,d){c.exports=function(u,m){var _,y,S,A,I,k,D,F,E,L,T,M,R,b,U,N,j,J,$,ct,It,et,yt,G,Pt;_=u.state,y=u.next_in,G=u.input,S=y+(u.avail_in-5),A=u.next_out,Pt=u.output,I=A-(m-u.avail_out),k=A+(u.avail_out-257),D=_.dmax,F=_.wsize,E=_.whave,L=_.wnext,T=_.window,M=_.hold,R=_.bits,b=_.lencode,U=_.distcode,N=(1<<_.lenbits)-1,j=(1<<_.distbits)-1;t:do{R<15&&(M+=G[y++]<<R,R+=8,M+=G[y++]<<R,R+=8),J=b[M&N];e:for(;;){if(M>>>=$=J>>>24,R-=$,($=J>>>16&255)===0)Pt[A++]=65535&J;else{if(!(16&$)){if(!(64&$)){J=b[(65535&J)+(M&(1<<$)-1)];continue e}if(32&$){_.mode=12;break t}u.msg="invalid literal/length code",_.mode=30;break t}ct=65535&J,($&=15)&&(R<$&&(M+=G[y++]<<R,R+=8),ct+=M&(1<<$)-1,M>>>=$,R-=$),R<15&&(M+=G[y++]<<R,R+=8,M+=G[y++]<<R,R+=8),J=U[M&j];i:for(;;){if(M>>>=$=J>>>24,R-=$,!(16&($=J>>>16&255))){if(!(64&$)){J=U[(65535&J)+(M&(1<<$)-1)];continue i}u.msg="invalid distance code",_.mode=30;break t}if(It=65535&J,R<($&=15)&&(M+=G[y++]<<R,(R+=8)<$&&(M+=G[y++]<<R,R+=8)),D<(It+=M&(1<<$)-1)){u.msg="invalid distance too far back",_.mode=30;break t}if(M>>>=$,R-=$,($=A-I)<It){if(E<($=It-$)&&_.sane){u.msg="invalid distance too far back",_.mode=30;break t}if(yt=T,(et=0)===L){if(et+=F-$,$<ct){for(ct-=$;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}}else if(L<$){if(et+=F+L-$,($-=L)<ct){for(ct-=$;Pt[A++]=T[et++],--$;);if(et=0,L<ct){for(ct-=$=L;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}}}else if(et+=L-$,$<ct){for(ct-=$;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}for(;2<ct;)Pt[A++]=yt[et++],Pt[A++]=yt[et++],Pt[A++]=yt[et++],ct-=3;ct&&(Pt[A++]=yt[et++],1<ct&&(Pt[A++]=yt[et++]))}else{for(et=A-It;Pt[A++]=Pt[et++],Pt[A++]=Pt[et++],Pt[A++]=Pt[et++],2<(ct-=3););ct&&(Pt[A++]=Pt[et++],1<ct&&(Pt[A++]=Pt[et++]))}break}}break}}while(y<S&&A<k);y-=ct=R>>3,M&=(1<<(R-=ct<<3))-1,u.next_in=y,u.next_out=A,u.avail_in=y<S?S-y+5:5-(y-S),u.avail_out=A<k?k-A+257:257-(A-k),_.hold=M,_.bits=R}},{}],49:[function(o,c,d){var u=o("../utils/common"),m=o("./adler32"),_=o("./crc32"),y=o("./inffast"),S=o("./inftrees"),A=1,I=2,k=0,D=-2,F=1,E=852,L=592;function T(et){return(et>>>24&255)+(et>>>8&65280)+((65280&et)<<8)+((255&et)<<24)}function M(){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 u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function R(et){var yt;return et&&et.state?(yt=et.state,et.total_in=et.total_out=yt.total=0,et.msg="",yt.wrap&&(et.adler=1&yt.wrap),yt.mode=F,yt.last=0,yt.havedict=0,yt.dmax=32768,yt.head=null,yt.hold=0,yt.bits=0,yt.lencode=yt.lendyn=new u.Buf32(E),yt.distcode=yt.distdyn=new u.Buf32(L),yt.sane=1,yt.back=-1,k):D}function b(et){var yt;return et&&et.state?((yt=et.state).wsize=0,yt.whave=0,yt.wnext=0,R(et)):D}function U(et,yt){var G,Pt;return et&&et.state?(Pt=et.state,yt<0?(G=0,yt=-yt):(G=1+(yt>>4),yt<48&&(yt&=15)),yt&&(yt<8||15<yt)?D:(Pt.window!==null&&Pt.wbits!==yt&&(Pt.window=null),Pt.wrap=G,Pt.wbits=yt,b(et))):D}function N(et,yt){var G,Pt;return et?(Pt=new M,(et.state=Pt).window=null,(G=U(et,yt))!==k&&(et.state=null),G):D}var j,J,$=!0;function ct(et){if($){var yt;for(j=new u.Buf32(512),J=new u.Buf32(32),yt=0;yt<144;)et.lens[yt++]=8;for(;yt<256;)et.lens[yt++]=9;for(;yt<280;)et.lens[yt++]=7;for(;yt<288;)et.lens[yt++]=8;for(S(A,et.lens,0,288,j,0,et.work,{bits:9}),yt=0;yt<32;)et.lens[yt++]=5;S(I,et.lens,0,32,J,0,et.work,{bits:5}),$=!1}et.lencode=j,et.lenbits=9,et.distcode=J,et.distbits=5}function It(et,yt,G,Pt){var Et,Ct=et.state;return Ct.window===null&&(Ct.wsize=1<<Ct.wbits,Ct.wnext=0,Ct.whave=0,Ct.window=new u.Buf8(Ct.wsize)),Pt>=Ct.wsize?(u.arraySet(Ct.window,yt,G-Ct.wsize,Ct.wsize,0),Ct.wnext=0,Ct.whave=Ct.wsize):(Pt<(Et=Ct.wsize-Ct.wnext)&&(Et=Pt),u.arraySet(Ct.window,yt,G-Pt,Et,Ct.wnext),(Pt-=Et)?(u.arraySet(Ct.window,yt,G-Pt,Pt,0),Ct.wnext=Pt,Ct.whave=Ct.wsize):(Ct.wnext+=Et,Ct.wnext===Ct.wsize&&(Ct.wnext=0),Ct.whave<Ct.wsize&&(Ct.whave+=Et))),0}d.inflateReset=b,d.inflateReset2=U,d.inflateResetKeep=R,d.inflateInit=function(et){return N(et,15)},d.inflateInit2=N,d.inflate=function(et,yt){var G,Pt,Et,Ct,fe,re,Ft,Ot,Bt,ke,ce,Yt,$e,Oi,Oe,Ge,di,Ii,mn,Qi,W,Jt,Wt,pt,dt=0,Dt=new u.Buf8(4),ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!et||!et.state||!et.output||!et.input&&et.avail_in!==0)return D;(G=et.state).mode===12&&(G.mode=13),fe=et.next_out,Et=et.output,Ft=et.avail_out,Ct=et.next_in,Pt=et.input,re=et.avail_in,Ot=G.hold,Bt=G.bits,ke=re,ce=Ft,Jt=k;t:for(;;)switch(G.mode){case F:if(G.wrap===0){G.mode=13;break}for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(2&G.wrap&&Ot===35615){Dt[G.check=0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0),Bt=Ot=0,G.mode=2;break}if(G.flags=0,G.head&&(G.head.done=!1),!(1&G.wrap)||(((255&Ot)<<8)+(Ot>>8))%31){et.msg="incorrect header check",G.mode=30;break}if((15&Ot)!=8){et.msg="unknown compression method",G.mode=30;break}if(Bt-=4,W=8+(15&(Ot>>>=4)),G.wbits===0)G.wbits=W;else if(W>G.wbits){et.msg="invalid window size",G.mode=30;break}G.dmax=1<<W,et.adler=G.check=1,G.mode=512&Ot?10:12,Bt=Ot=0;break;case 2:for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(G.flags=Ot,(255&G.flags)!=8){et.msg="unknown compression method",G.mode=30;break}if(57344&G.flags){et.msg="unknown header flags set",G.mode=30;break}G.head&&(G.head.text=Ot>>8&1),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0,G.mode=3;case 3:for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.head&&(G.head.time=Ot),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,Dt[2]=Ot>>>16&255,Dt[3]=Ot>>>24&255,G.check=_(G.check,Dt,4,0)),Bt=Ot=0,G.mode=4;case 4:for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.head&&(G.head.xflags=255&Ot,G.head.os=Ot>>8),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0,G.mode=5;case 5:if(1024&G.flags){for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.length=Ot,G.head&&(G.head.extra_len=Ot),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0}else G.head&&(G.head.extra=null);G.mode=6;case 6:if(1024&G.flags&&(re<(Yt=G.length)&&(Yt=re),Yt&&(G.head&&(W=G.head.extra_len-G.length,G.head.extra||(G.head.extra=new Array(G.head.extra_len)),u.arraySet(G.head.extra,Pt,Ct,Yt,W)),512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,G.length-=Yt),G.length))break t;G.length=0,G.mode=7;case 7:if(2048&G.flags){if(re===0)break t;for(Yt=0;W=Pt[Ct+Yt++],G.head&&W&&G.length<65536&&(G.head.name+=String.fromCharCode(W)),W&&Yt<re;);if(512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,W)break t}else G.head&&(G.head.name=null);G.length=0,G.mode=8;case 8:if(4096&G.flags){if(re===0)break t;for(Yt=0;W=Pt[Ct+Yt++],G.head&&W&&G.length<65536&&(G.head.comment+=String.fromCharCode(W)),W&&Yt<re;);if(512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,W)break t}else G.head&&(G.head.comment=null);G.mode=9;case 9:if(512&G.flags){for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot!==(65535&G.check)){et.msg="header crc mismatch",G.mode=30;break}Bt=Ot=0}G.head&&(G.head.hcrc=G.flags>>9&1,G.head.done=!0),et.adler=G.check=0,G.mode=12;break;case 10:for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}et.adler=G.check=T(Ot),Bt=Ot=0,G.mode=11;case 11:if(G.havedict===0)return et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,2;et.adler=G.check=1,G.mode=12;case 12:if(yt===5||yt===6)break t;case 13:if(G.last){Ot>>>=7&Bt,Bt-=7&Bt,G.mode=27;break}for(;Bt<3;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}switch(G.last=1&Ot,Bt-=1,3&(Ot>>>=1)){case 0:G.mode=14;break;case 1:if(ct(G),G.mode=20,yt!==6)break;Ot>>>=2,Bt-=2;break t;case 2:G.mode=17;break;case 3:et.msg="invalid block type",G.mode=30}Ot>>>=2,Bt-=2;break;case 14:for(Ot>>>=7&Bt,Bt-=7&Bt;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if((65535&Ot)!=(Ot>>>16^65535)){et.msg="invalid stored block lengths",G.mode=30;break}if(G.length=65535&Ot,Bt=Ot=0,G.mode=15,yt===6)break t;case 15:G.mode=16;case 16:if(Yt=G.length){if(re<Yt&&(Yt=re),Ft<Yt&&(Yt=Ft),Yt===0)break t;u.arraySet(Et,Pt,Ct,Yt,fe),re-=Yt,Ct+=Yt,Ft-=Yt,fe+=Yt,G.length-=Yt;break}G.mode=12;break;case 17:for(;Bt<14;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(G.nlen=257+(31&Ot),Ot>>>=5,Bt-=5,G.ndist=1+(31&Ot),Ot>>>=5,Bt-=5,G.ncode=4+(15&Ot),Ot>>>=4,Bt-=4,286<G.nlen||30<G.ndist){et.msg="too many length or distance symbols",G.mode=30;break}G.have=0,G.mode=18;case 18:for(;G.have<G.ncode;){for(;Bt<3;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.lens[ie[G.have++]]=7&Ot,Ot>>>=3,Bt-=3}for(;G.have<19;)G.lens[ie[G.have++]]=0;if(G.lencode=G.lendyn,G.lenbits=7,Wt={bits:G.lenbits},Jt=S(0,G.lens,0,19,G.lencode,0,G.work,Wt),G.lenbits=Wt.bits,Jt){et.msg="invalid code lengths set",G.mode=30;break}G.have=0,G.mode=19;case 19:for(;G.have<G.nlen+G.ndist;){for(;Ge=(dt=G.lencode[Ot&(1<<G.lenbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(di<16)Ot>>>=Oe,Bt-=Oe,G.lens[G.have++]=di;else{if(di===16){for(pt=Oe+2;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot>>>=Oe,Bt-=Oe,G.have===0){et.msg="invalid bit length repeat",G.mode=30;break}W=G.lens[G.have-1],Yt=3+(3&Ot),Ot>>>=2,Bt-=2}else if(di===17){for(pt=Oe+3;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Bt-=Oe,W=0,Yt=3+(7&(Ot>>>=Oe)),Ot>>>=3,Bt-=3}else{for(pt=Oe+7;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Bt-=Oe,W=0,Yt=11+(127&(Ot>>>=Oe)),Ot>>>=7,Bt-=7}if(G.have+Yt>G.nlen+G.ndist){et.msg="invalid bit length repeat",G.mode=30;break}for(;Yt--;)G.lens[G.have++]=W}}if(G.mode===30)break;if(G.lens[256]===0){et.msg="invalid code -- missing end-of-block",G.mode=30;break}if(G.lenbits=9,Wt={bits:G.lenbits},Jt=S(A,G.lens,0,G.nlen,G.lencode,0,G.work,Wt),G.lenbits=Wt.bits,Jt){et.msg="invalid literal/lengths set",G.mode=30;break}if(G.distbits=6,G.distcode=G.distdyn,Wt={bits:G.distbits},Jt=S(I,G.lens,G.nlen,G.ndist,G.distcode,0,G.work,Wt),G.distbits=Wt.bits,Jt){et.msg="invalid distances set",G.mode=30;break}if(G.mode=20,yt===6)break t;case 20:G.mode=21;case 21:if(6<=re&&258<=Ft){et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,y(et,ce),fe=et.next_out,Et=et.output,Ft=et.avail_out,Ct=et.next_in,Pt=et.input,re=et.avail_in,Ot=G.hold,Bt=G.bits,G.mode===12&&(G.back=-1);break}for(G.back=0;Ge=(dt=G.lencode[Ot&(1<<G.lenbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ge&&!(240&Ge)){for(Ii=Oe,mn=Ge,Qi=di;Ge=(dt=G.lencode[Qi+((Ot&(1<<Ii+mn)-1)>>Ii)])>>>16&255,di=65535&dt,!(Ii+(Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Ot>>>=Ii,Bt-=Ii,G.back+=Ii}if(Ot>>>=Oe,Bt-=Oe,G.back+=Oe,G.length=di,Ge===0){G.mode=26;break}if(32&Ge){G.back=-1,G.mode=12;break}if(64&Ge){et.msg="invalid literal/length code",G.mode=30;break}G.extra=15&Ge,G.mode=22;case 22:if(G.extra){for(pt=G.extra;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.length+=Ot&(1<<G.extra)-1,Ot>>>=G.extra,Bt-=G.extra,G.back+=G.extra}G.was=G.length,G.mode=23;case 23:for(;Ge=(dt=G.distcode[Ot&(1<<G.distbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(!(240&Ge)){for(Ii=Oe,mn=Ge,Qi=di;Ge=(dt=G.distcode[Qi+((Ot&(1<<Ii+mn)-1)>>Ii)])>>>16&255,di=65535&dt,!(Ii+(Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Ot>>>=Ii,Bt-=Ii,G.back+=Ii}if(Ot>>>=Oe,Bt-=Oe,G.back+=Oe,64&Ge){et.msg="invalid distance code",G.mode=30;break}G.offset=di,G.extra=15&Ge,G.mode=24;case 24:if(G.extra){for(pt=G.extra;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.offset+=Ot&(1<<G.extra)-1,Ot>>>=G.extra,Bt-=G.extra,G.back+=G.extra}if(G.offset>G.dmax){et.msg="invalid distance too far back",G.mode=30;break}G.mode=25;case 25:if(Ft===0)break t;if(Yt=ce-Ft,G.offset>Yt){if((Yt=G.offset-Yt)>G.whave&&G.sane){et.msg="invalid distance too far back",G.mode=30;break}$e=Yt>G.wnext?(Yt-=G.wnext,G.wsize-Yt):G.wnext-Yt,Yt>G.length&&(Yt=G.length),Oi=G.window}else Oi=Et,$e=fe-G.offset,Yt=G.length;for(Ft<Yt&&(Yt=Ft),Ft-=Yt,G.length-=Yt;Et[fe++]=Oi[$e++],--Yt;);G.length===0&&(G.mode=21);break;case 26:if(Ft===0)break t;Et[fe++]=G.length,Ft--,G.mode=21;break;case 27:if(G.wrap){for(;Bt<32;){if(re===0)break t;re--,Ot|=Pt[Ct++]<<Bt,Bt+=8}if(ce-=Ft,et.total_out+=ce,G.total+=ce,ce&&(et.adler=G.check=G.flags?_(G.check,Et,ce,fe-ce):m(G.check,Et,ce,fe-ce)),ce=Ft,(G.flags?Ot:T(Ot))!==G.check){et.msg="incorrect data check",G.mode=30;break}Bt=Ot=0}G.mode=28;case 28:if(G.wrap&&G.flags){for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot!==(4294967295&G.total)){et.msg="incorrect length check",G.mode=30;break}Bt=Ot=0}G.mode=29;case 29:Jt=1;break t;case 30:Jt=-3;break t;case 31:return-4;case 32:default:return D}return et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,(G.wsize||ce!==et.avail_out&&G.mode<30&&(G.mode<27||yt!==4))&&It(et,et.output,et.next_out,ce-et.avail_out)?(G.mode=31,-4):(ke-=et.avail_in,ce-=et.avail_out,et.total_in+=ke,et.total_out+=ce,G.total+=ce,G.wrap&&ce&&(et.adler=G.check=G.flags?_(G.check,Et,ce,et.next_out-ce):m(G.check,Et,ce,et.next_out-ce)),et.data_type=G.bits+(G.last?64:0)+(G.mode===12?128:0)+(G.mode===20||G.mode===15?256:0),(ke==0&&ce===0||yt===4)&&Jt===k&&(Jt=-5),Jt)},d.inflateEnd=function(et){if(!et||!et.state)return D;var yt=et.state;return yt.window&&(yt.window=null),et.state=null,k},d.inflateGetHeader=function(et,yt){var G;return et&&et.state&&2&(G=et.state).wrap?((G.head=yt).done=!1,k):D},d.inflateSetDictionary=function(et,yt){var G,Pt=yt.length;return et&&et.state?(G=et.state).wrap!==0&&G.mode!==11?D:G.mode===11&&m(1,yt,Pt,0)!==G.check?-3:It(et,yt,Pt,Pt)?(G.mode=31,-4):(G.havedict=1,k):D},d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(o,c,d){var u=o("../utils/common"),m=[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],_=[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],y=[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],S=[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];c.exports=function(A,I,k,D,F,E,L,T){var M,R,b,U,N,j,J,$,ct,It=T.bits,et=0,yt=0,G=0,Pt=0,Et=0,Ct=0,fe=0,re=0,Ft=0,Ot=0,Bt=null,ke=0,ce=new u.Buf16(16),Yt=new u.Buf16(16),$e=null,Oi=0;for(et=0;et<=15;et++)ce[et]=0;for(yt=0;yt<D;yt++)ce[I[k+yt]]++;for(Et=It,Pt=15;1<=Pt&&ce[Pt]===0;Pt--);if(Pt<Et&&(Et=Pt),Pt===0)return F[E++]=20971520,F[E++]=20971520,T.bits=1,0;for(G=1;G<Pt&&ce[G]===0;G++);for(Et<G&&(Et=G),et=re=1;et<=15;et++)if(re<<=1,(re-=ce[et])<0)return-1;if(0<re&&(A===0||Pt!==1))return-1;for(Yt[1]=0,et=1;et<15;et++)Yt[et+1]=Yt[et]+ce[et];for(yt=0;yt<D;yt++)I[k+yt]!==0&&(L[Yt[I[k+yt]]++]=yt);if(j=A===0?(Bt=$e=L,19):A===1?(Bt=m,ke-=257,$e=_,Oi-=257,256):(Bt=y,$e=S,-1),et=G,N=E,fe=yt=Ot=0,b=-1,U=(Ft=1<<(Ct=Et))-1,A===1&&852<Ft||A===2&&592<Ft)return 1;for(;;){for(J=et-fe,ct=L[yt]<j?($=0,L[yt]):L[yt]>j?($=$e[Oi+L[yt]],Bt[ke+L[yt]]):($=96,0),M=1<<et-fe,G=R=1<<Ct;F[N+(Ot>>fe)+(R-=M)]=J<<24|$<<16|ct|0,R!==0;);for(M=1<<et-1;Ot&M;)M>>=1;if(M!==0?(Ot&=M-1,Ot+=M):Ot=0,yt++,--ce[et]==0){if(et===Pt)break;et=I[k+L[yt]]}if(Et<et&&(Ot&U)!==b){for(fe===0&&(fe=Et),N+=G,re=1<<(Ct=et-fe);Ct+fe<Pt&&!((re-=ce[Ct+fe])<=0);)Ct++,re<<=1;if(Ft+=1<<Ct,A===1&&852<Ft||A===2&&592<Ft)return 1;F[b=Ot&U]=Et<<24|Ct<<16|N-E|0}}return Ot!==0&&(F[N+Ot]=et-fe<<24|64<<16|0),T.bits=Et,0}},{"../utils/common":41}],51:[function(o,c,d){c.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"}},{}],52:[function(o,c,d){var u=o("../utils/common"),m=0,_=1;function y(dt){for(var Dt=dt.length;0<=--Dt;)dt[Dt]=0}var S=0,A=29,I=256,k=I+1+A,D=30,F=19,E=2*k+1,L=15,T=16,M=7,R=256,b=16,U=17,N=18,j=[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],J=[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],$=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ct=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],It=new Array(2*(k+2));y(It);var et=new Array(2*D);y(et);var yt=new Array(512);y(yt);var G=new Array(256);y(G);var Pt=new Array(A);y(Pt);var Et,Ct,fe,re=new Array(D);function Ft(dt,Dt,ie,Kt,z){this.static_tree=dt,this.extra_bits=Dt,this.extra_base=ie,this.elems=Kt,this.max_length=z,this.has_stree=dt&&dt.length}function Ot(dt,Dt){this.dyn_tree=dt,this.max_code=0,this.stat_desc=Dt}function Bt(dt){return dt<256?yt[dt]:yt[256+(dt>>>7)]}function ke(dt,Dt){dt.pending_buf[dt.pending++]=255&Dt,dt.pending_buf[dt.pending++]=Dt>>>8&255}function ce(dt,Dt,ie){dt.bi_valid>T-ie?(dt.bi_buf|=Dt<<dt.bi_valid&65535,ke(dt,dt.bi_buf),dt.bi_buf=Dt>>T-dt.bi_valid,dt.bi_valid+=ie-T):(dt.bi_buf|=Dt<<dt.bi_valid&65535,dt.bi_valid+=ie)}function Yt(dt,Dt,ie){ce(dt,ie[2*Dt],ie[2*Dt+1])}function $e(dt,Dt){for(var ie=0;ie|=1&dt,dt>>>=1,ie<<=1,0<--Dt;);return ie>>>1}function Oi(dt,Dt,ie){var Kt,z,Q=new Array(L+1),ot=0;for(Kt=1;Kt<=L;Kt++)Q[Kt]=ot=ot+ie[Kt-1]<<1;for(z=0;z<=Dt;z++){var nt=dt[2*z+1];nt!==0&&(dt[2*z]=$e(Q[nt]++,nt))}}function Oe(dt){var Dt;for(Dt=0;Dt<k;Dt++)dt.dyn_ltree[2*Dt]=0;for(Dt=0;Dt<D;Dt++)dt.dyn_dtree[2*Dt]=0;for(Dt=0;Dt<F;Dt++)dt.bl_tree[2*Dt]=0;dt.dyn_ltree[2*R]=1,dt.opt_len=dt.static_len=0,dt.last_lit=dt.matches=0}function Ge(dt){8<dt.bi_valid?ke(dt,dt.bi_buf):0<dt.bi_valid&&(dt.pending_buf[dt.pending++]=dt.bi_buf),dt.bi_buf=0,dt.bi_valid=0}function di(dt,Dt,ie,Kt){var z=2*Dt,Q=2*ie;return dt[z]<dt[Q]||dt[z]===dt[Q]&&Kt[Dt]<=Kt[ie]}function Ii(dt,Dt,ie){for(var Kt=dt.heap[ie],z=ie<<1;z<=dt.heap_len&&(z<dt.heap_len&&di(Dt,dt.heap[z+1],dt.heap[z],dt.depth)&&z++,!di(Dt,Kt,dt.heap[z],dt.depth));)dt.heap[ie]=dt.heap[z],ie=z,z<<=1;dt.heap[ie]=Kt}function mn(dt,Dt,ie){var Kt,z,Q,ot,nt=0;if(dt.last_lit!==0)for(;Kt=dt.pending_buf[dt.d_buf+2*nt]<<8|dt.pending_buf[dt.d_buf+2*nt+1],z=dt.pending_buf[dt.l_buf+nt],nt++,Kt===0?Yt(dt,z,Dt):(Yt(dt,(Q=G[z])+I+1,Dt),(ot=j[Q])!==0&&ce(dt,z-=Pt[Q],ot),Yt(dt,Q=Bt(--Kt),ie),(ot=J[Q])!==0&&ce(dt,Kt-=re[Q],ot)),nt<dt.last_lit;);Yt(dt,R,Dt)}function Qi(dt,Dt){var ie,Kt,z,Q=Dt.dyn_tree,ot=Dt.stat_desc.static_tree,nt=Dt.stat_desc.has_stree,vt=Dt.stat_desc.elems,Gt=-1;for(dt.heap_len=0,dt.heap_max=E,ie=0;ie<vt;ie++)Q[2*ie]!==0?(dt.heap[++dt.heap_len]=Gt=ie,dt.depth[ie]=0):Q[2*ie+1]=0;for(;dt.heap_len<2;)Q[2*(z=dt.heap[++dt.heap_len]=Gt<2?++Gt:0)]=1,dt.depth[z]=0,dt.opt_len--,nt&&(dt.static_len-=ot[2*z+1]);for(Dt.max_code=Gt,ie=dt.heap_len>>1;1<=ie;ie--)Ii(dt,Q,ie);for(z=vt;ie=dt.heap[1],dt.heap[1]=dt.heap[dt.heap_len--],Ii(dt,Q,1),Kt=dt.heap[1],dt.heap[--dt.heap_max]=ie,dt.heap[--dt.heap_max]=Kt,Q[2*z]=Q[2*ie]+Q[2*Kt],dt.depth[z]=(dt.depth[ie]>=dt.depth[Kt]?dt.depth[ie]:dt.depth[Kt])+1,Q[2*ie+1]=Q[2*Kt+1]=z,dt.heap[1]=z++,Ii(dt,Q,1),2<=dt.heap_len;);dt.heap[--dt.heap_max]=dt.heap[1],function(Xt,jt){var Ne,Re,ge,we,_i,Si,ni=jt.dyn_tree,Ei=jt.max_code,qr=jt.stat_desc.static_tree,or=jt.stat_desc.has_stree,on=jt.stat_desc.extra_bits,As=jt.stat_desc.extra_base,Di=jt.stat_desc.max_length,Xs=0;for(we=0;we<=L;we++)Xt.bl_count[we]=0;for(ni[2*Xt.heap[Xt.heap_max]+1]=0,Ne=Xt.heap_max+1;Ne<E;Ne++)Di<(we=ni[2*ni[2*(Re=Xt.heap[Ne])+1]+1]+1)&&(we=Di,Xs++),ni[2*Re+1]=we,Ei<Re||(Xt.bl_count[we]++,_i=0,As<=Re&&(_i=on[Re-As]),Si=ni[2*Re],Xt.opt_len+=Si*(we+_i),or&&(Xt.static_len+=Si*(qr[2*Re+1]+_i)));if(Xs!==0){do{for(we=Di-1;Xt.bl_count[we]===0;)we--;Xt.bl_count[we]--,Xt.bl_count[we+1]+=2,Xt.bl_count[Di]--,Xs-=2}while(0<Xs);for(we=Di;we!==0;we--)for(Re=Xt.bl_count[we];Re!==0;)Ei<(ge=Xt.heap[--Ne])||(ni[2*ge+1]!==we&&(Xt.opt_len+=(we-ni[2*ge+1])*ni[2*ge],ni[2*ge+1]=we),Re--)}}(dt,Dt),Oi(Q,Gt,dt.bl_count)}function W(dt,Dt,ie){var Kt,z,Q=-1,ot=Dt[1],nt=0,vt=7,Gt=4;for(ot===0&&(vt=138,Gt=3),Dt[2*(ie+1)+1]=65535,Kt=0;Kt<=ie;Kt++)z=ot,ot=Dt[2*(Kt+1)+1],++nt<vt&&z===ot||(nt<Gt?dt.bl_tree[2*z]+=nt:z!==0?(z!==Q&&dt.bl_tree[2*z]++,dt.bl_tree[2*b]++):nt<=10?dt.bl_tree[2*U]++:dt.bl_tree[2*N]++,Q=z,Gt=(nt=0)===ot?(vt=138,3):z===ot?(vt=6,3):(vt=7,4))}function Jt(dt,Dt,ie){var Kt,z,Q=-1,ot=Dt[1],nt=0,vt=7,Gt=4;for(ot===0&&(vt=138,Gt=3),Kt=0;Kt<=ie;Kt++)if(z=ot,ot=Dt[2*(Kt+1)+1],!(++nt<vt&&z===ot)){if(nt<Gt)for(;Yt(dt,z,dt.bl_tree),--nt!=0;);else z!==0?(z!==Q&&(Yt(dt,z,dt.bl_tree),nt--),Yt(dt,b,dt.bl_tree),ce(dt,nt-3,2)):nt<=10?(Yt(dt,U,dt.bl_tree),ce(dt,nt-3,3)):(Yt(dt,N,dt.bl_tree),ce(dt,nt-11,7));Q=z,Gt=(nt=0)===ot?(vt=138,3):z===ot?(vt=6,3):(vt=7,4)}}y(re);var Wt=!1;function pt(dt,Dt,ie,Kt){ce(dt,(S<<1)+(Kt?1:0),3),function(z,Q,ot,nt){Ge(z),nt&&(ke(z,ot),ke(z,~ot)),u.arraySet(z.pending_buf,z.window,Q,ot,z.pending),z.pending+=ot}(dt,Dt,ie,!0)}d._tr_init=function(dt){Wt||(function(){var Dt,ie,Kt,z,Q,ot=new Array(L+1);for(z=Kt=0;z<A-1;z++)for(Pt[z]=Kt,Dt=0;Dt<1<<j[z];Dt++)G[Kt++]=z;for(G[Kt-1]=z,z=Q=0;z<16;z++)for(re[z]=Q,Dt=0;Dt<1<<J[z];Dt++)yt[Q++]=z;for(Q>>=7;z<D;z++)for(re[z]=Q<<7,Dt=0;Dt<1<<J[z]-7;Dt++)yt[256+Q++]=z;for(ie=0;ie<=L;ie++)ot[ie]=0;for(Dt=0;Dt<=143;)It[2*Dt+1]=8,Dt++,ot[8]++;for(;Dt<=255;)It[2*Dt+1]=9,Dt++,ot[9]++;for(;Dt<=279;)It[2*Dt+1]=7,Dt++,ot[7]++;for(;Dt<=287;)It[2*Dt+1]=8,Dt++,ot[8]++;for(Oi(It,k+1,ot),Dt=0;Dt<D;Dt++)et[2*Dt+1]=5,et[2*Dt]=$e(Dt,5);Et=new Ft(It,j,I+1,k,L),Ct=new Ft(et,J,0,D,L),fe=new Ft(new Array(0),$,0,F,M)}(),Wt=!0),dt.l_desc=new Ot(dt.dyn_ltree,Et),dt.d_desc=new Ot(dt.dyn_dtree,Ct),dt.bl_desc=new Ot(dt.bl_tree,fe),dt.bi_buf=0,dt.bi_valid=0,Oe(dt)},d._tr_stored_block=pt,d._tr_flush_block=function(dt,Dt,ie,Kt){var z,Q,ot=0;0<dt.level?(dt.strm.data_type===2&&(dt.strm.data_type=function(nt){var vt,Gt=4093624447;for(vt=0;vt<=31;vt++,Gt>>>=1)if(1&Gt&&nt.dyn_ltree[2*vt]!==0)return m;if(nt.dyn_ltree[18]!==0||nt.dyn_ltree[20]!==0||nt.dyn_ltree[26]!==0)return _;for(vt=32;vt<I;vt++)if(nt.dyn_ltree[2*vt]!==0)return _;return m}(dt)),Qi(dt,dt.l_desc),Qi(dt,dt.d_desc),ot=function(nt){var vt;for(W(nt,nt.dyn_ltree,nt.l_desc.max_code),W(nt,nt.dyn_dtree,nt.d_desc.max_code),Qi(nt,nt.bl_desc),vt=F-1;3<=vt&&nt.bl_tree[2*ct[vt]+1]===0;vt--);return nt.opt_len+=3*(vt+1)+5+5+4,vt}(dt),z=dt.opt_len+3+7>>>3,(Q=dt.static_len+3+7>>>3)<=z&&(z=Q)):z=Q=ie+5,ie+4<=z&&Dt!==-1?pt(dt,Dt,ie,Kt):dt.strategy===4||Q===z?(ce(dt,2+(Kt?1:0),3),mn(dt,It,et)):(ce(dt,4+(Kt?1:0),3),function(nt,vt,Gt,Xt){var jt;for(ce(nt,vt-257,5),ce(nt,Gt-1,5),ce(nt,Xt-4,4),jt=0;jt<Xt;jt++)ce(nt,nt.bl_tree[2*ct[jt]+1],3);Jt(nt,nt.dyn_ltree,vt-1),Jt(nt,nt.dyn_dtree,Gt-1)}(dt,dt.l_desc.max_code+1,dt.d_desc.max_code+1,ot+1),mn(dt,dt.dyn_ltree,dt.dyn_dtree)),Oe(dt),Kt&&Ge(dt)},d._tr_tally=function(dt,Dt,ie){return dt.pending_buf[dt.d_buf+2*dt.last_lit]=Dt>>>8&255,dt.pending_buf[dt.d_buf+2*dt.last_lit+1]=255&Dt,dt.pending_buf[dt.l_buf+dt.last_lit]=255&ie,dt.last_lit++,Dt===0?dt.dyn_ltree[2*ie]++:(dt.matches++,Dt--,dt.dyn_ltree[2*(G[ie]+I+1)]++,dt.dyn_dtree[2*Bt(Dt)]++),dt.last_lit===dt.lit_bufsize-1},d._tr_align=function(dt){ce(dt,2,3),Yt(dt,R,It),function(Dt){Dt.bi_valid===16?(ke(Dt,Dt.bi_buf),Dt.bi_buf=0,Dt.bi_valid=0):8<=Dt.bi_valid&&(Dt.pending_buf[Dt.pending++]=255&Dt.bi_buf,Dt.bi_buf>>=8,Dt.bi_valid-=8)}(dt)}},{"../utils/common":41}],53:[function(o,c,d){c.exports=function(){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}},{}],54:[function(o,c,d){(function(u){(function(m,_){if(!m.setImmediate){var y,S,A,I,k=1,D={},F=!1,E=m.document,L=Object.getPrototypeOf&&Object.getPrototypeOf(m);L=L&&L.setTimeout?L:m,y={}.toString.call(m.process)==="[object process]"?function(b){process.nextTick(function(){M(b)})}:function(){if(m.postMessage&&!m.importScripts){var b=!0,U=m.onmessage;return m.onmessage=function(){b=!1},m.postMessage("","*"),m.onmessage=U,b}}()?(I="setImmediate$"+Math.random()+"$",m.addEventListener?m.addEventListener("message",R,!1):m.attachEvent("onmessage",R),function(b){m.postMessage(I+b,"*")}):m.MessageChannel?((A=new MessageChannel).port1.onmessage=function(b){M(b.data)},function(b){A.port2.postMessage(b)}):E&&"onreadystatechange"in E.createElement("script")?(S=E.documentElement,function(b){var U=E.createElement("script");U.onreadystatechange=function(){M(b),U.onreadystatechange=null,S.removeChild(U),U=null},S.appendChild(U)}):function(b){setTimeout(M,0,b)},L.setImmediate=function(b){typeof b!="function"&&(b=new Function(""+b));for(var U=new Array(arguments.length-1),N=0;N<U.length;N++)U[N]=arguments[N+1];var j={callback:b,args:U};return D[k]=j,y(k),k++},L.clearImmediate=T}function T(b){delete D[b]}function M(b){if(F)setTimeout(M,0,b);else{var U=D[b];if(U){F=!0;try{(function(N){var j=N.callback,J=N.args;switch(J.length){case 0:j();break;case 1:j(J[0]);break;case 2:j(J[0],J[1]);break;case 3:j(J[0],J[1],J[2]);break;default:j.apply(_,J)}})(U)}finally{T(b),F=!1}}}}function R(b){b.source===m&&typeof b.data=="string"&&b.data.indexOf(I)===0&&M(+b.data.slice(I.length))}})(typeof self>"u"?u===void 0?this:u:self)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Sf);var um=Sf.exports;const cm=Ju(um);var Ef={exports:{}};(function(x,a){(function(o,c){c()})(Er,function(){function o(S,A){return typeof A>"u"?A={autoBom:!1}:typeof A!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),A={autoBom:!A}),A.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(S.type)?new Blob(["\uFEFF",S],{type:S.type}):S}function c(S,A,I){var k=new XMLHttpRequest;k.open("GET",S),k.responseType="blob",k.onload=function(){y(k.response,A,I)},k.onerror=function(){console.error("could not download file")},k.send()}function d(S){var A=new XMLHttpRequest;A.open("HEAD",S,!1);try{A.send()}catch{}return 200<=A.status&&299>=A.status}function u(S){try{S.dispatchEvent(new MouseEvent("click"))}catch{var A=document.createEvent("MouseEvents");A.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),S.dispatchEvent(A)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Er=="object"&&Er.global===Er?Er:void 0,_=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),y=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!_?function(S,A,I){var k=m.URL||m.webkitURL,D=document.createElement("a");A=A||S.name||"download",D.download=A,D.rel="noopener",typeof S=="string"?(D.href=S,D.origin===location.origin?u(D):d(D.href)?c(S,A,I):u(D,D.target="_blank")):(D.href=k.createObjectURL(S),setTimeout(function(){k.revokeObjectURL(D.href)},4e4),setTimeout(function(){u(D)},0))}:"msSaveOrOpenBlob"in navigator?function(S,A,I){if(A=A||S.name||"download",typeof S!="string")navigator.msSaveOrOpenBlob(o(S,I),A);else if(d(S))c(S,A,I);else{var k=document.createElement("a");k.href=S,k.target="_blank",setTimeout(function(){u(k)})}}:function(S,A,I,k){if(k=k||open("","_blank"),k&&(k.document.title=k.document.body.innerText="downloading..."),typeof S=="string")return c(S,A,I);var D=S.type==="application/octet-stream",F=/constructor/i.test(m.HTMLElement)||m.safari,E=/CriOS\/[\d]+/.test(navigator.userAgent);if((E||D&&F||_)&&typeof FileReader<"u"){var L=new FileReader;L.onloadend=function(){var R=L.result;R=E?R:R.replace(/^data:[^;]*;/,"data:attachment/file;"),k?k.location.href=R:location=R,k=null},L.readAsDataURL(S)}else{var T=m.URL||m.webkitURL,M=T.createObjectURL(S);k?k.location=M:location.href=M,k=null,setTimeout(function(){T.revokeObjectURL(M)},4e4)}});m.saveAs=y.saveAs=y,x.exports=y})})(Ef);var fm=Ef.exports;const pm=Ju(fm);class dm{constructor(a,o){window.mars3d?(this.panoramicViewClass=o,this.coordinate=[{heading:0,pitch:0,stop:5},{heading:90,pitch:0,stop:5},{heading:180,pitch:0,stop:5},{heading:270,pitch:0,stop:5},{heading:0,pitch:90,stop:5},{heading:0,pitch:-90,stop:5}],this.screenshotArray=[],this.events={},this.timestamp=0,this.lat,this.lng,this.alt):console.error("未引入指定插件")}start(a=!0){var o,c;if(a){this.timestamp=new Date().getTime();const d=document.getElementById("app"),u=window.innerHeight,m=document.getElementById("mars3dContainer");m&&(m.style.width=u.toString()+"px",m.style.height=u.toString()+"px"),d!==null&&d.classList.add(this.panoramicViewClass);let{lat:_,lng:y,alt:S}=window.map.getCameraView();this.lat=_,this.lng=y,this.alt=S,window.map.viewer.scene.camera.frustum.fov=window.Cesium.Math.PI_OVER_THREE*1.5}this.screenshotArray&&this.coordinate?this.coordinate[(o=this.screenshotArray)==null?void 0:o.length]?window.map.setCameraView({lat:this.lat,lng:this.lng,alt:this.alt,...this.coordinate[(c=this.screenshotArray)==null?void 0:c.length]},{complete:()=>{setTimeout(()=>{var d;this.screenshot((d=this.screenshotArray)==null?void 0:d.length)},100)}}):(this.downloadImagesAsZip(),this.screenshotArray=[]):(console.error("初始化失效"),this.emit("state",{type:"error"}))}async screenshot(a){const o=await window.map.expImage({download:!1}),c=window.map.container.getElementsByClassName("cesium-viewer-cesiumWidgetContainer"),d=await window.domtoimage.toPng(window.map.container,{filter:u=>u!==c[0]});this.mergeImage(o.image,d,o.width,o.height).then(u=>{var y;let m=Number(a)+1,_={src:u,name:"全景图_"+this.timestamp+"_"+m+".jpg"};this.emit("intercept",_),(y=this.screenshotArray)==null||y.push(_),this.start(!1)})}mergeImage(a,o,c,d){return new Promise((u,m)=>{const _=document.createElement("canvas");_.width=c,_.height=d;const y=_.getContext("2d");if(_&&y){const S=new Image;S.crossOrigin="Anonymous",S.onload=()=>{y.drawImage(S,0,0,c,d);const A=new Image;A.crossOrigin="Anonymous",A.onload=()=>{y.drawImage(A,0,0,c,d);const I=_.toDataURL("image/png");u(I)},A.src=o},S.src=a}else m()})}download(){this.screenshotArray&&this.screenshotArray.forEach(a=>{window.mars3d.Util.downloadBase64Image(a.name,a.src)})}async downloadImagesAsZip(){if(this.screenshotArray){const a=new cm;this.screenshotArray.forEach(c=>{const d=c.src.split(",")[1],u=atob(d),m=[];for(let S=0;S<u.length;S+=1024){const A=u.slice(S,S+1024),I=new Array(A.length);for(let D=0;D<A.length;D++)I[D]=A.charCodeAt(D);const k=new Uint8Array(I);m.push(k)}const _=new Blob(m,{type:"image/jpeg"}),y=`${c.name}`;a.file(y,_,{binary:!0})});const o=await a.generateAsync({type:"blob"});pm(o,"CHBIM-Panorama.zip"),this.emit("state",{type:"success",schedule:100}),this.init()}}init(){const a=document.getElementById("app");a&&a.classList.remove(this.panoramicViewClass);const o=document.getElementById("mars3dContainer");o&&(o.style.width="",o.style.height="")}on(a,o){this.events[a]?this.events[a].push(o):this.events[a]=[o]}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}}function uo(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function bf(x,a){x.prototype=Object.create(a.prototype),x.prototype.constructor=x,x.__proto__=a}/*!
|
|
2686
2686
|
* GSAP 3.12.5
|
|
2687
2687
|
* https://gsap.com
|
|
2688
2688
|
*
|