(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[78778],{86618:function(NI){/*! cornerstone-core - 2.1.0 - 2018-03-02 | (c) 2016 Chris Hafey | https://github.com/cornerstonejs/cornerstone */(function(BA,i){NI.exports=i()})(typeof self!="undefined"?self:this,function(){return function(BA){function i(o){if(t[o])return t[o].exports;var E=t[o]={i:o,l:!1,exports:{}};return BA[o].call(E.exports,E,E.exports,i),E.l=!0,E.exports}var t={};return i.m=BA,i.c=t,i.d=function(o,E,C){i.o(o,E)||Object.defineProperty(o,E,{configurable:!1,enumerable:!0,get:C})},i.n=function(o){var E=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(E,"a",E),E},i.o=function(o,E){return Object.prototype.hasOwnProperty.call(o,E)},i.p="",i(i.s=42)}([function(BA,i,t){"use strict";function o(g){if(g===void 0)throw new Error("getEnabledElement: parameter element must not be undefined");for(var B=0;B2&&arguments[2]!==void 0?arguments[2]:null,I=void 0;return typeof window.CustomEvent=="function"?I=new CustomEvent(C,{detail:A,cancelable:!0}):(I=document.createEvent("CustomEvent"),I.initCustomEvent(C,!0,!0,A)),E.dispatchEvent(I)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=o},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(o,E){if(o===void 0)throw new Error("getDefaultViewport: parameter canvas must not be undefined");if(E===void 0)return{scale:1,translation:{x:0,y:0},voi:{windowWidth:void 0,windowCenter:void 0},invert:!1,pixelReplication:!1,rotation:0,hflip:!1,vflip:!1,modalityLUT:void 0,voiLUT:void 0,colormap:void 0,labelmap:!1};var C=o.height/E.rows,A=o.width/E.columns;return{scale:Math.min(A,C),translation:{x:0,y:0},voi:{windowWidth:E.windowWidth,windowCenter:E.windowCenter},invert:E.invert,pixelReplication:!1,rotation:0,hflip:!1,vflip:!1,modalityLUT:E.modalityLUT,voiLUT:E.voiLUT,colormap:E.colormap,labelmap:Boolean(E.labelmap)}}},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A,I){if(C===void 0)throw new Error("setToPixelCoordinateSystem: parameter enabledElement must not be undefined");if(A===void 0)throw new Error("setToPixelCoordinateSystem: parameter context must not be undefined");var g=(0,E.default)(C,I);A.setTransform(g.m[0],g.m[1],g.m[2],g.m[3],g.m[4],g.m[5])};var o=t(24),E=function(C){return C&&C.__esModule?C:{default:C}}(o)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(A){var I=arguments.length>1&&arguments[1]!==void 0&&arguments[1],g=(0,o.getEnabledElement)(A);if(g.image===void 0&&!g.layers.length)throw new Error("updateImage: image has not been loaded yet");(0,C.default)(g,I)};var o=t(0),E=t(6),C=function(A){return A&&A.__esModule?A:{default:A}}(E)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(o){var E=arguments.length>1&&arguments[1]!==void 0&&arguments[1];o.needsRedraw=!0,E&&(o.invalid=!0)}},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=t(28),E=t(29),C=function(A){return A&&A.__esModule?A:{default:A}}(E);i.default={getColormap:o.getColormap,getColormapsList:o.getColormapsList,LookupTable:C.default}},function(BA,i,t){"use strict";function o(y){return y&&y.__esModule?y:{default:y}}function E(y,M){return y.cachedLut!==void 0&&y.cachedLut.windowCenter===M.voi.windowCenter&&y.cachedLut.windowWidth===M.voi.windowWidth&&y.cachedLut.invert===M.invert||((0,e.default)(y,M.voi.windowWidth,M.voi.windowCenter,M.invert),y.cachedLut.windowWidth=M.voi.windowWidth,y.cachedLut.windowCenter=M.voi.windowCenter,y.cachedLut.invert=M.invert),y.cachedLut.lutArray}function C(y,M,L){y.renderingTools.renderCanvas||(y.renderingTools.renderCanvas=document.createElement("canvas"));var k=y.renderingTools.renderCanvas;if(y.viewport.voi.windowWidth===255&&y.viewport.voi.windowCenter===128&&y.viewport.invert===!1&&M.getCanvas&&M.getCanvas())return M.getCanvas();if((0,l.default)(y,M)===!1&&L!==!0)return k;k.width===M.width&&k.height===M.height||(0,F.default)(y,M);var H=(0,B.default)(),m=E(M,y.viewport);M.stats=M.stats||{},M.stats.lastLutGenerateTime=(0,B.default)()-H;var x=y.renderingTools.renderCanvasData,P=y.renderingTools.renderCanvasContext;return M.rgba?(0,h.default)(M,m,x.data):(0,a.default)(M,m,x.data),H=(0,B.default)(),P.putImageData(x,0,0),M.stats.lastPutImageDataTime=(0,B.default)()-H,k}function A(y,M){if(y===void 0)throw new Error("renderColorImage: enabledElement parameter must not be undefined");var L=y.image;if(L===void 0)throw new Error("renderColorImage: image must be loaded before it can be drawn");var k=y.canvas.getContext("2d");k.setTransform(1,0,0,1,0,0),k.fillStyle="black",k.fillRect(0,0,y.canvas.width,y.canvas.height),k.imageSmoothingEnabled=!y.viewport.pixelReplication,k.mozImageSmoothingEnabled=k.imageSmoothingEnabled,(0,w.default)(y,k);var H=void 0;H=y.options&&y.options.renderer&&y.options.renderer.toLowerCase()==="webgl"?N.default.renderer.render(y):C(y,L,M),k.drawImage(H,0,0,L.width,L.height,0,0,L.width,L.height),y.renderingTools=(0,d.default)(y)}function I(y,M){if(y===void 0)throw new Error("addColorLayer: layer parameter must not be undefined");var L=y.image;if(L===void 0)throw new Error("addColorLayer: image must be loaded before it can be drawn");L.rgba=!0,y.canvas=C(y,L,M);var k=y.canvas.getContext("2d");k.imageSmoothingEnabled=!y.viewport.pixelReplication,k.mozImageSmoothingEnabled=k.imageSmoothingEnabled,y.renderingTools=(0,d.default)(y)}Object.defineProperty(i,"__esModule",{value:!0}),i.renderColorImage=A,i.addColorLayer=I;var g=t(1),B=o(g),Q=t(45),e=o(Q),s=t(21),a=o(s),r=t(46),h=o(r),c=t(4),w=o(c),u=t(15),N=o(u),G=t(13),l=o(G),R=t(11),F=o(R),D=t(12),d=o(D)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C){return(0,E.default)(C)};var o=t(24),E=function(C){return C&&C.__esModule?C:{default:C}}(o)},function(BA,i,t){"use strict";function o(l){return l&&l.__esModule?l:{default:l}}function E(l,R,F){l.renderingTools.renderCanvas||(l.renderingTools.renderCanvas=document.createElement("canvas"));var D=l.renderingTools.renderCanvas,d=l.viewport.colormap||l.options.colormap;if(d&&typeof d=="string"&&(d=G.default.getColormap(d)),!d)throw new Error("renderLabelMapImage: colormap not found.");var y=d.getId();if((0,c.default)(l,R)===!1&&F!==!0&&l.renderingTools.colormapId===y)return D;D.width===R.width&&D.height===R.height||(0,s.default)(l,R);var M=(0,Q.default)();l.renderingTools.colorLut&&!F&&l.renderingTools.colormapId===y||(l.renderingTools.colorLut=d.createLookupTable(),l.renderingTools.colormapId=y),R.stats=R.stats||{},R.stats.lastLutGenerateTime=(0,Q.default)()-M;var L=l.renderingTools.colorLut,k=l.renderingTools.renderCanvasData,H=l.renderingTools.renderCanvasContext;return(0,u.default)(R,L,k.data),M=(0,Q.default)(),H.putImageData(k,0,0),R.stats.lastPutImageDataTime=(0,Q.default)()-M,D}function C(l,R){if(l===void 0)throw new Error("renderLabelMapImage: enabledElement parameter must not be undefined");var F=l.image;if(F===void 0)throw new Error("renderLabelMapImage: image must be loaded before it can be drawn");var D=l.canvas.getContext("2d");D.setTransform(1,0,0,1,0,0),D.fillStyle="black",D.fillRect(0,0,l.canvas.width,l.canvas.height),D.imageSmoothingEnabled=!l.viewport.pixelReplication,D.mozImageSmoothingEnabled=D.imageSmoothingEnabled,(0,g.default)(l,D);var d=E(l,F,R),y=F.width,M=F.height;D.drawImage(d,0,0,y,M,0,0,y,M),l.renderingTools=(0,r.default)(l)}function A(l,R){if(l===void 0)throw new Error("addLabelMapLayer: layer parameter must not be undefined");var F=l.image;if(F===void 0)throw new Error("addLabelMapLayer: image must be loaded before it can be drawn");l.canvas=E(l,F,R);var D=l.canvas.getContext("2d");D.imageSmoothingEnabled=!l.viewport.pixelReplication,D.mozImageSmoothingEnabled=D.imageSmoothingEnabled,l.renderingTools=(0,r.default)(l)}Object.defineProperty(i,"__esModule",{value:!0}),i.renderLabelMapImage=C,i.addLabelMapLayer=A;var I=t(4),g=o(I),B=t(1),Q=o(B),e=t(11),s=o(e),a=t(12),r=o(a),h=t(13),c=o(h),w=t(22),u=o(w),N=t(7),G=o(N)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(o,E){var C=o.renderingTools.renderCanvas;C.width=E.width,C.height=E.height;var A=C.getContext("2d");A.fillStyle="white",A.fillRect(0,0,C.width,C.height);var I=A.getImageData(0,0,E.width,E.height);o.renderingTools.renderCanvasContext=A,o.renderingTools.renderCanvasData=I}},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(o){var E=o.image.imageId,C=o.viewport;return o.renderingTools.lastRenderedImageId=E,o.renderingTools.lastRenderedViewport={windowCenter:C.voi.windowCenter,windowWidth:C.voi.windowWidth,invert:C.invert,rotation:C.rotation,hflip:C.hflip,vflip:C.vflip,modalityLUT:C.modalityLUT,voiLUT:C.voiLUT,colormap:C.colormap},o.renderingTools}},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(o,E){var C=o.renderingTools.lastRenderedImageId,A=o.renderingTools.lastRenderedViewport;return E.imageId!==C||!A||A.windowCenter!==o.viewport.voi.windowCenter||A.windowWidth!==o.viewport.voi.windowWidth||A.invert!==o.viewport.invert||A.rotation!==o.viewport.rotation||A.hflip!==o.viewport.hflip||A.vflip!==o.viewport.vflip||A.modalityLUT!==o.viewport.modalityLUT||A.voiLUT!==o.viewport.voiLUT||A.colormap!==o.viewport.colormap}},function(BA,i,t){"use strict";function o(F){return F&&F.__esModule?F:{default:F}}function E(F,D,d){F.renderingTools.renderCanvas||(F.renderingTools.renderCanvas=document.createElement("canvas"));var y=F.renderingTools.renderCanvas,M=F.viewport.colormap||F.options.colormap;if(M&&typeof M=="string"&&(M=R.default.getColormap(M)),!M)throw new Error("renderPseudoColorImage: colormap not found.");var L=M.getId();if((0,u.default)(F,D)===!1&&d!==!0&&F.renderingTools.colormapId===L)return y;y.width===D.width&&y.height===D.height||(0,s.default)(F,D);var k=(0,Q.default)();F.renderingTools.colorLut&&!d&&F.renderingTools.colormapId===L||(M.setNumberOfColors(256),F.renderingTools.colorLut=M.createLookupTable(),F.renderingTools.colormapId=L);var H=(0,r.default)(D,F.viewport,d);D.stats=D.stats||{},D.stats.lastLutGenerateTime=(0,Q.default)()-k;var m=F.renderingTools.colorLut,x=F.renderingTools.renderCanvasData,P=F.renderingTools.renderCanvasContext;return(0,G.default)(D,H,m,x.data),k=(0,Q.default)(),P.putImageData(x,0,0),D.stats.lastPutImageDataTime=(0,Q.default)()-k,y}function C(F,D){if(F===void 0)throw new Error("drawImage: enabledElement parameter must not be undefined");var d=F.image;if(d===void 0)throw new Error("drawImage: image must be loaded before it can be drawn");var y=F.canvas.getContext("2d");y.setTransform(1,0,0,1,0,0),y.fillStyle="black",y.fillRect(0,0,F.canvas.width,F.canvas.height),y.imageSmoothingEnabled=!F.viewport.pixelReplication,y.mozImageSmoothingEnabled=y.imageSmoothingEnabled,(0,g.default)(F,y);var M=E(F,d,D),L=d.width,k=d.height;y.drawImage(M,0,0,L,k,0,0,L,k),F.renderingTools=(0,c.default)(F)}function A(F,D){if(F===void 0)throw new Error("addPseudoColorLayer: layer parameter must not be undefined");var d=F.image;if(d===void 0)throw new Error("addPseudoColorLayer: image must be loaded before it can be drawn");F.canvas=E(F,d,D);var y=F.canvas.getContext("2d");y.imageSmoothingEnabled=!F.viewport.pixelReplication,y.mozImageSmoothingEnabled=y.imageSmoothingEnabled,F.renderingTools=(0,c.default)(F)}Object.defineProperty(i,"__esModule",{value:!0}),i.renderPseudoColorImage=C,i.addPseudoColorLayer=A;var I=t(4),g=o(I),B=t(1),Q=o(B),e=t(11),s=o(e),a=t(32),r=o(a),h=t(12),c=o(h),w=t(13),u=o(w),N=t(23),G=o(N),l=t(7),R=o(l)},function(BA,i,t){"use strict";function o(Q){return Q&&Q.__esModule?Q:{default:Q}}Object.defineProperty(i,"__esModule",{value:!0});var E=t(47),C=t(34),A=o(C),I=t(33),g=o(I),B={createProgramFromString:A.default,renderer:{render:E.render,initRenderer:E.initRenderer,getRenderCanvas:E.getRenderCanvas,isWebGLAvailable:E.isWebGLAvailable},textureCache:g.default};Object.defineProperty(B,"isWebGLInitialized",{enumerable:!0,configurable:!1,get:function(){return E.isWebGLInitialized}}),i.default=B},function(BA,i,t){"use strict";function o(I,g){if(!(I instanceof g))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var E=function(){function I(g,B){for(var Q=0;Q0)return void this.addEventNamespaceListener(g,B);g in this.listeners||(this.listeners[g]=[]),this.listeners[g].push(B)}},{key:"removeEventListener",value:function(g,B){if(g.indexOf(".")>0)return void this.removeEventNamespaceListener(g);if(g in this.listeners){for(var Q=this.listeners[g],e=0,s=Q.length;e3&&arguments[3]!==void 0)||arguments[3];d.renderingTools.renderCanvas||(d.renderingTools.renderCanvas=document.createElement("canvas"));var k=d.renderingTools.renderCanvas;if((0,G.default)(d,y)===!1&&M!==!0)return k;k.width===y.width&&k.height===y.height||(0,R.default)(d,y);var H=(0,r.default)(),m=(0,u.default)(y,d.viewport,M);y.stats=y.stats||{},y.stats.lastLutGenerateTime=(0,r.default)()-H;var x=d.renderingTools.renderCanvasData,P=d.renderingTools.renderCanvasContext;return L?(0,g.default)(y,m,x.data):(0,Q.default)(y,m,x.data),H=(0,r.default)(),P.putImageData(x,0,0),y.stats.lastPutImageDataTime=(0,r.default)()-H,k}function C(d,y){if(d===void 0)throw new Error("drawImage: enabledElement parameter must not be undefined");var M=d.image;if(M===void 0)throw new Error("drawImage: image must be loaded before it can be drawn");var L=d.canvas.getContext("2d");L.setTransform(1,0,0,1,0,0),L.fillStyle="black",L.fillRect(0,0,d.canvas.width,d.canvas.height),L.imageSmoothingEnabled=!d.viewport.pixelReplication,L.mozImageSmoothingEnabled=L.imageSmoothingEnabled,(0,s.default)(d,L);var k=void 0;k=d.options&&d.options.renderer&&d.options.renderer.toLowerCase()==="webgl"?c.default.renderer.render(d):E(d,M,y),L.drawImage(k,0,0,M.width,M.height,0,0,M.width,M.height),d.renderingTools=(0,D.default)(d)}function A(d,y){var M=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(d===void 0)throw new Error("addGrayscaleLayer: layer parameter must not be undefined");var L=d.image;if(L===void 0)throw new Error("addGrayscaleLayer: image must be loaded before it can be drawn");d.canvas=E(d,L,y,M);var k=d.canvas.getContext("2d");k.imageSmoothingEnabled=!d.viewport.pixelReplication,k.mozImageSmoothingEnabled=k.imageSmoothingEnabled,d.renderingTools=(0,D.default)(d)}Object.defineProperty(i,"__esModule",{value:!0}),i.renderGrayscaleImage=C,i.addGrayscaleLayer=A;var I=t(20),g=o(I),B=t(30),Q=o(B),e=t(4),s=o(e),a=t(1),r=o(a),h=t(15),c=o(h),w=t(32),u=o(w),N=t(13),G=o(N),l=t(11),R=o(l),F=t(12),D=o(F)},function(BA,i,t){"use strict";function o(g){return g&&g.__esModule?g:{default:g}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(g,B,Q,e,s,a){var r=g.maxPixelValue,h=g.minPixelValue,c=Math.min(h,0);if(g.cachedLut===void 0){var w=r-c+1;g.cachedLut={},g.cachedLut.lutArray=new Uint8ClampedArray(w)}var u=g.cachedLut.lutArray,N=(0,C.default)(g.slope,g.intercept,s),G=(0,I.default)(B,Q,a);if(e===!0)for(var l=h;l<=r;l++)u[l+-c]=255-G(N(l));else for(var R=h;R<=r;R++)u[R+-c]=G(N(R));return u};var E=t(26),C=o(E),A=t(27),I=o(A)},function(BA,i,t){"use strict";function o(E){window.setTimeout(E,1e3/60)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(E){return window.requestAnimationFrame(E)||window.webkitRequestAnimationFrame(E)||window.mozRequestAnimationFrame(E)||window.oRequestAnimationFrame(E)||window.msRequestAnimationFrame(E)||o(E)}},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A,I){var g=(0,E.default)(),B=C.getPixelData();C.stats.lastGetPixelDataTime=(0,E.default)()-g;var Q=B.length,e=C.minPixelValue,s=3,a=0;if(g=(0,E.default)(),B instanceof Int16Array)if(e<0)for(;a=g?I:C.lut[B]}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A,I){return I?E(I):o(C,A)}},function(BA,i,t){"use strict";function o(A){if(Array.isArray(A)){for(var I=0,g=Array(A.length);I>g,Q=A.lut[A.lut.length-1]>>g,e=A.firstValueMapped+A.lut.length-1;return function(s){return s=e?Q:A.lut[s-A.firstValueMapped]>>g}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(A,I,g){return g?C(g):E(A,I)}},function(BA,i,t){"use strict";function o(r,h,c){c=c===null?100:c;for(var w=(h-r)/(c-1),u=[];c-- >0;)u.push(r),r+=w;return u[u.length-1]=h,u}function E(r,h){for(var c=0,w=r.length-1;c<=w;){var u=c+Math.floor((w-c)/2),N=r[u];if(N===h)return u;h=0&&w1)throw new Error("HSVToRGB expects hue < 1");var a=[];if(e===0)return a[0]=s,a[1]=s,a[2]=s,a;var r=Math.floor(6*Q),h=6*Q-r,c=s*(1-e),w=s*(1-e*h),u=s*(1-e*(1-h));switch(r){case 0:case 6:a[0]=s,a[1]=u,a[2]=c;break;case 1:a[0]=w,a[1]=s,a[2]=c;break;case 2:a[0]=c,a[1]=s,a[2]=u;break;case 3:a[0]=c,a[1]=w,a[2]=s;break;case 4:a[0]=u,a[1]=c,a[2]=s;break;case 5:a[0]=s,a[1]=c,a[2]=w}return a}function C(Q,e){var s=void 0;return s=Qe.Range[1]?e.MaxIndex+g+1.5:(Q+e.Shift)*e.Scale,Math.floor(s)}Object.defineProperty(i,"__esModule",{value:!0});var A=function(){function Q(e,s){for(var a=0;a1)||e){this.Table=[];var s=this.NumberOfColors-1,a=void 0,r=void 0,h=void 0,c=void 0;s?(a=(this.HueRange[1]-this.HueRange[0])/s,r=(this.SaturationRange[1]-this.SaturationRange[0])/s,h=(this.ValueRange[1]-this.ValueRange[0])/s,c=(this.AlphaRange[1]-this.AlphaRange[0])/s):a=r=h=c=0;for(var w=0;w<=s;w++){var u=this.HueRange[0]+w*a,N=this.SaturationRange[0]+w*r,G=this.ValueRange[0]+w*h,l=this.AlphaRange[0]+w*c,R=E(u,N,G),F=[];switch(this.Ramp){case"scurve":F[0]=Math.floor(127.5*(1+Math.cos((1-R[0])*Math.PI))),F[1]=Math.floor(127.5*(1+Math.cos((1-R[1])*Math.PI))),F[2]=Math.floor(127.5*(1+Math.cos((1-R[2])*Math.PI))),F[3]=Math.floor(255*l);break;case"linear":F[0]=Math.floor(255*R[0]+.5),F[1]=Math.floor(255*R[1]+.5),F[2]=Math.floor(255*R[2]+.5),F[3]=Math.floor(255*l+.5);break;case"sqrt":F[0]=Math.floor(255*Math.sqrt(R[0])+.5),F[1]=Math.floor(255*Math.sqrt(R[1])+.5),F[2]=Math.floor(255*Math.sqrt(R[2])+.5),F[3]=Math.floor(255*Math.sqrt(l)+.5);break;default:throw new Error("Invalid Ramp value ("+this.Ramp+")")}this.Table.push(F)}this.buildSpecialColors()}}},{key:"buildSpecialColors",value:function(){var e=this.NumberOfColors,s=e+I,a=e+g,r=e+2;this.UseBelowRangeColor||e===0?this.Table[s]=this.BelowRangeColor:this.Table[s]=this.Table[0],this.UseAboveRangeColor||e===0?this.Table[a]=this.AboveRangeColor:this.Table[a]=this.Table[e-1],this.Table[r]=this.NaNColor}},{key:"mapValue",value:function(e){var s=this.getIndex(e);if(s<0)return this.NaNColor;if(s===0){if(this.UseBelowRangeColor&&ethis.TableRange[1])return this.AboveRangeColor;return this.Table[s]}},{key:"getIndex",value:function(e){var s={};if(s.Range=[],s.MaxIndex=this.NumberOfColors-1,s.Shift=-this.TableRange[0],this.TableRange[1]<=this.TableRange[0]?s.Scale=Number.MAX_VALUE:s.Scale=s.MaxIndex/(this.TableRange[1]-this.TableRange[0]),s.Range[0]=this.TableRange[0],s.Range[1]=this.TableRange[1],isNaN(e))return-1;var a=C(e,s);return a===this.NumberOfColors+I?a=0:a===this.NumberOfColors+g&&(a=this.NumberOfColors-1),a}},{key:"setTableValue",value:function(e,s){if(arguments.length===5&&(s=Array.prototype.slice.call(arguments,1)),e<0)throw new Error("Can't set the table value for negative index ("+e+")");e>=this.NumberOfColors&&new Error("Index "+e+" is greater than the number of colors "+this.NumberOfColors),this.Table[e]=s,e!==0&&e!==this.NumberOfColors-1||this.buildSpecialColors()}}]),Q}();i.default=B},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A,I){var g=(0,E.default)(),B=C.getPixelData();C.stats.lastGetPixelDataTime=(0,E.default)()-g;var Q=B.length,e=C.minPixelValue,s=0,a=0,r=void 0;if(g=(0,E.default)(),B instanceof Int16Array)if(e<0)for(;aF.timeStamp?-1:R.timeStampw;){var G=c[c.length-1];u-=G.sizeInBytes,delete h[G.imageId],c.pop(),(0,r.default)(s.default,"cornerstonewebgltextureremoved",{imageId:G.imageId})}var l=E();(0,r.default)(s.default,"cornerstonewebgltexturecachefull",l)}}function A(N){if(N===void 0)throw new Error("setMaximumSizeBytes: parameter numBytes must not be undefined");if(N.toFixed===void 0)throw new Error("setMaximumSizeBytes: parameter numBytes must be a number");w=N,C()}function I(N,G){var l=N.imageId;if(N===void 0)throw new Error("putImageTexture: image must not be undefined");if(l===void 0)throw new Error("putImageTexture: imageId must not be undefined");if(G===void 0)throw new Error("putImageTexture: imageTexture must not be undefined");if(Object.prototype.hasOwnProperty.call(h,l)===!0)throw new Error("putImageTexture: imageId already in cache");var R={imageId:l,imageTexture:G,timeStamp:new Date,sizeInBytes:G.sizeInBytes};if(h[l]=R,c.push(R),G.sizeInBytes===void 0)throw new Error("putImageTexture: imageTexture.sizeInBytes must not be undefined");if(G.sizeInBytes.toFixed===void 0)throw new Error("putImageTexture: imageTexture.sizeInBytes is not a number");u+=R.sizeInBytes,C()}function g(N){if(N===void 0)throw new Error("getImageTexture: imageId must not be undefined");var G=h[N];if(G!==void 0)return G.timeStamp=new Date,G.imageTexture}function B(N){if(N===void 0)throw new Error("removeImageTexture: imageId must not be undefined");var G=h[N];if(G===void 0)throw new Error("removeImageTexture: imageId must not be undefined");return c.splice(c.indexOf(G),1),u-=G.sizeInBytes,delete h[N],G.imageTexture}function Q(){for(;c.length>0;){var N=c.pop();delete h[N.imageId]}u=0}Object.defineProperty(i,"__esModule",{value:!0});var e=t(16),s=o(e),a=t(2),r=o(a),h={},c=[],w=268435456,u=0;i.default={purgeCache:Q,getImageTexture:g,putImageTexture:I,removeImageTexture:B,setMaximumSizeBytes:A}},function(BA,i,t){"use strict";function o(C,A,I){var g=C.createShader(I);if(C.shaderSource(g,A),C.compileShader(g),!C.getShaderParameter(g,C.COMPILE_STATUS)&&!C.isContextLost()){var B=C.getShaderInfoLog(g);console.error(`Could not compile shader: `+B)}return g}function E(C,A,I){var g=C.createProgram();if(C.attachShader(g,A),C.attachShader(g,I),C.linkProgram(g),!C.getProgramParameter(g,C.LINK_STATUS)&&!C.isContextLost()){var B=C.getProgramInfoLog(g);console.error(`WebGL program filed to link: `+B)}return g}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A,I){return E(C,o(C,A,C.VERTEX_SHADER),o(C,I,C.FRAGMENT_SHADER))}},function(BA,i,t){"use strict";function o(I,g){if(I===void 0)throw new Error("renderWebImage: enabledElement parameter must not be undefined");var B=I.image;if(B===void 0)throw new Error("renderWebImage: image must be loaded before it can be drawn");if(I.viewport.voi.windowWidth===I.image.windowWidth&&I.viewport.voi.windowCenter===I.image.windowCenter&&I.viewport.invert===!1){var Q=I.canvas.getContext("2d");Q.setTransform(1,0,0,1,0,0),Q.fillStyle="black",Q.fillRect(0,0,I.canvas.width,I.canvas.height),Q.imageSmoothingEnabled=!I.viewport.pixelReplication,Q.mozImageSmoothingEnabled=Q.imageSmoothingEnabled,(0,C.default)(I,Q),Q.drawImage(B.getImage(),0,0,B.width,B.height,0,0,B.width,B.height)}else(0,A.renderColorImage)(I,g)}Object.defineProperty(i,"__esModule",{value:!0}),i.renderWebImage=o;var E=t(4),C=function(I){return I&&I.__esModule?I:{default:I}}(E),A=t(8)},function(BA,i,t){"use strict";function o(c){return c&&c.__esModule?c:{default:c}}function E(c,w){w.width!==c.clientWidth&&(w.width=c.clientWidth,w.style.width=c.clientWidth+"px"),w.height!==c.clientHeight&&(w.height=c.clientHeight,w.style.height=c.clientHeight+"px")}function C(c,w,u){var N=c.viewport.scale,G=(0,h.default)(c),l=Math.round(G.width*N),R=Math.round(G.height*N),F=c.viewport.translation.x,D=c.viewport.translation.y;return l===w&&R<=u||l<=w&&R===u&&F===0&&D===0}function A(c,w,u){var N=c.viewport.scale,G=c.canvas.width,l=c.canvas.height,R=G/w,F=l/u,D=Math.sqrt(R*F);c.viewport.scale=D*N}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(c,w){var u=(0,I.getEnabledElement)(c),N=u.canvas.width,G=u.canvas.height;E(c,u.canvas);var l={element:c};if((0,a.default)(c,"cornerstoneelementresized",l),u.image!==void 0)return w===!0?void(0,B.default)(c):void(C(u,N,G)?(0,B.default)(c):(A(u,N,G),(0,e.default)(c)))};var I=t(0),g=t(37),B=o(g),Q=t(5),e=o(Q),s=t(2),a=o(s),r=t(38),h=o(r)},function(BA,i,t){"use strict";function o(B){return B&&B.__esModule?B:{default:B}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(B){var Q=(0,E.getEnabledElement)(B),e=(0,g.default)(Q),s=Q.canvas.height/e.height,a=Q.canvas.width/e.width;Q.viewport.scale=Math.min(a,s),Q.viewport.translation.x=0,Q.viewport.translation.y=0,(0,A.default)(B)};var E=t(0),C=t(5),A=o(C),I=t(38),g=o(I)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(o){return o.viewport.rotation===0||o.viewport.rotation===180?{width:o.image.width,height:o.image.height}:{width:o.image.height,height:o.image.width}}},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(E,C,A,I,g){if(E===void 0)throw new Error("getStoredPixels: parameter element must not be undefined");C=Math.round(C),A=Math.round(A);for(var B=(0,o.getEnabledElement)(E),Q=[],e=0,s=B.image.getPixelData(),a=0;ay.timeStamp?-1:d.timeStampw;){var R=G[G.length-1],F=R.imageId;g(F),(0,c.default)(r.default,"cornerstoneimagecachepromiseremoved",{imageId:F})}var D=B();(0,c.default)(r.default,"cornerstoneimagecachefull",D)}}function A(l,R){if(l===void 0)throw new Error("putImageLoadObject: imageId must not be undefined");if(R.promise===void 0)throw new Error("putImageLoadObject: imageLoadObject.promise must not be undefined");if(N.hasOwnProperty(l)===!0)throw new Error("putImageLoadObject: imageId already in cache");if(R.cancelFn&&typeof R.cancelFn!="function")throw new Error("putImageLoadObject: imageLoadObject.cancelFn must be a function");var F={loaded:!1,imageId:l,sharedCacheKey:void 0,imageLoadObject:R,timeStamp:Date.now(),sizeInBytes:0};N[l]=F,G.push(F),R.promise.then(function(D){if(G.indexOf(F)!==-1){if(F.loaded=!0,F.image=D,D.sizeInBytes===void 0)throw new Error("putImageLoadObject: image.sizeInBytes must not be undefined");if(D.sizeInBytes.toFixed===void 0)throw new Error("putImageLoadObject: image.sizeInBytes is not a number");F.sizeInBytes=D.sizeInBytes,u+=F.sizeInBytes;var d={action:"addImage",image:F};(0,c.default)(r.default,"cornerstoneimagecachechanged",d),F.sharedCacheKey=D.sharedCacheKey,C()}},function(){var D=N[l];G.splice(G.indexOf(D),1),delete N[l]})}function I(l){if(l===void 0)throw new Error("getImageLoadObject: imageId must not be undefined");var R=N[l];if(R!==void 0)return R.timeStamp=Date.now(),R.imageLoadObject}function g(l){if(l===void 0)throw new Error("removeImageLoadObject: imageId must not be undefined");var R=N[l];if(R===void 0)throw new Error("removeImageLoadObject: imageId was not present in imageCache");G.splice(G.indexOf(R),1),u-=R.sizeInBytes;var F={action:"deleteImage",image:R};(0,c.default)(r.default,"cornerstoneimagecachechanged",F),Q(R.imageLoadObject),delete N[l]}function B(){return{maximumSizeInBytes:w,cacheSizeInBytes:u,numberOfImagesCached:G.length}}function Q(l){l.promise.then(function(){l.decache&&l.decache()},function(){l.decache&&l.decache()})}function e(){for(;G.length>0;)g(G[0].imageId)}function s(l,R){var F=N[l];F&&F.imageLoadObject.promise.then(function(D){var d=R-D.sizeInBytes;D.sizeInBytes=R,F.sizeInBytes=R,u+=d;var y={action:"changeImageSize",image:D};(0,c.default)(r.default,"cornerstoneimagecachechanged",y)})}Object.defineProperty(i,"__esModule",{value:!0}),i.cachedImages=void 0,i.setMaximumSizeBytes=E,i.putImageLoadObject=A,i.getImageLoadObject=I,i.removeImageLoadObject=g,i.getCacheInfo=B,i.purgeCache=e,i.changeImageIdCacheSize=s;var a=t(16),r=o(a),h=t(2),c=o(h),w=1073741824,u=0,N={},G=i.cachedImages=[];i.default={imageCache:N,cachedImages:G,setMaximumSizeBytes:E,putImageLoadObject:A,getImageLoadObject:I,removeImageLoadObject:g,getCacheInfo:B,purgeCache:e,changeImageIdCacheSize:s}},function(BA,i,t){"use strict";function o(A,I){if(A.color&&!A.falseColor)throw new Error("Color transforms are not implemented yet");var g=A.minPixelValue,B=0,Q=0,e=A.width*A.height,s=A.origPixelData||A.getPixelData(),a=new Uint8Array(4*e),r=void 0,h=void 0;if(A.color=!0,A.falseColor=!0,A.origPixelData=s,I instanceof C.default.LookupTable)for(I.build();Q=0&&(m="u"+m),H.maxPixelValue>255?m+="16":m+="8",m}function s(H){var m=e(H);return N.shaders.hasOwnProperty(m)?N.shaders[m]:N.shaders.rgb}function a(H){var m={uint8:y.LUMINANCE,int8:y.LUMINANCE_ALPHA,uint16:y.LUMINANCE_ALPHA,int16:y.RGB,rgb:y.RGB},x={int8:1,uint16:2,int16:3,rgb:3},P=e(H),q=m[P],K=y.createTexture();y.bindTexture(y.TEXTURE_2D,K),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MIN_FILTER,y.NEAREST),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MAG_FILTER,y.NEAREST),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_S,y.CLAMP_TO_EDGE),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_T,y.CLAMP_TO_EDGE),y.pixelStorei(y.UNPACK_ALIGNMENT,1);var U=N.dataUtilities[P].storedPixelDataToImageData(H,H.width,H.height);return y.texImage2D(y.TEXTURE_2D,0,q,H.width,H.height,0,q,y.UNSIGNED_BYTE,U),{texture:K,sizeInBytes:H.width*H.height*x[P]}}function r(H){var m=R.default.getImageTexture(H.imageId);return m||(m=a(H),R.default.putImageTexture(H,m)),m.texture}function h(){L=y.createBuffer(),y.bindBuffer(y.ARRAY_BUFFER,L),y.bufferData(y.ARRAY_BUFFER,new Float32Array([1,1,0,1,1,0,0,0]),y.STATIC_DRAW),M=y.createBuffer(),y.bindBuffer(y.ARRAY_BUFFER,M),y.bufferData(y.ARRAY_BUFFER,new Float32Array([1,1,0,1,1,0,0,0]),y.STATIC_DRAW)}function c(H,m,x,P,q){y.clearColor(1,0,0,1),y.viewport(0,0,P,q),y.clear(y.COLOR_BUFFER_BIT|y.DEPTH_BUFFER_BIT),y.useProgram(H.program),y.bindBuffer(y.ARRAY_BUFFER,M),y.vertexAttribPointer(H.attributes.texCoordLocation,2,y.FLOAT,!1,0,0),y.bindBuffer(y.ARRAY_BUFFER,L),y.vertexAttribPointer(H.attributes.positionLocation,2,y.FLOAT,!1,0,0);for(var K in m){var U=y.getUniformLocation(H.program,K);if(U){var n=m[K],S=n.type,v=n.value;S==="i"?y.uniform1i(U,v):S==="f"?y.uniform1f(U,v):S==="2f"&&y.uniform2f(U,v[0],v[1])}}I(y,P,q),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,x),y.drawArrays(y.TRIANGLE_STRIP,0,4)}function w(H){var m=H.image;d.width=m.width,d.height=m.height;var x=H.viewport,P=s(m),q=r(m);return c(P,{u_resolution:{type:"2f",value:[m.width,m.height]},wc:{type:"f",value:x.voi.windowCenter},ww:{type:"f",value:x.voi.windowWidth},slope:{type:"f",value:m.slope},intercept:{type:"f",value:m.intercept},minPixelValue:{type:"f",value:m.minPixelValue},invert:{type:"i",value:x.invert?1:0}},q,m.width,m.height),d}function u(){var H={failIfMajorPerformanceCaveat:!0};try{var m=document.createElement("canvas");return Boolean(window.WebGLRenderingContext)&&(m.getContext("webgl",H)||m.getContext("experimental-webgl",H))}catch(x){return!1}}Object.defineProperty(i,"__esModule",{value:!0}),i.isWebGLInitialized=void 0,i.getRenderCanvas=E,i.initRenderer=A,i.render=w,i.isWebGLAvailable=u;var N=t(48),G=t(54),l=t(33),R=o(l),F=t(34),D=o(F),d=document.createElement("canvas"),y=void 0,M=void 0,L=void 0,k=!1;i.isWebGLInitialized=k},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.dataUtilities=i.shaders=void 0;var o=t(49),E=t(50),C=t(51),A=t(52),I=t(53),g={int16:o.int16Shader,int8:E.int8Shader,rgb:C.rgbShader,uint16:A.uint16Shader,uint8:I.uint8Shader},B={int16:o.int16DataUtilities,int8:E.int8DataUtilities,rgb:C.rgbDataUtilities,uint16:A.uint16DataUtilities,uint8:I.uint8DataUtilities};i.shaders=g,i.dataUtilities=B},function(BA,i,t){"use strict";function o(C){for(var A=C.getPixelData(),I=new Uint8Array(C.width*C.height*3),g=0,B=0;B>8,I[g++]=A[B]<0?0:1}return I}Object.defineProperty(i,"__esModule",{value:!0});var E={};i.int16DataUtilities={storedPixelDataToImageData:o},E.frag="precision mediump float;uniform sampler2D u_image;uniform float ww;uniform float wc;uniform float slope;uniform float intercept;uniform int invert;varying vec2 v_texCoord;void main() {vec4 color = texture2D(u_image, v_texCoord);float intensity = color.r*256.0 + color.g*65536.0;if (color.b == 0.0)intensity = -intensity;intensity = intensity * slope + intercept;float center0 = wc - 0.5;float width0 = max(ww, 1.0);intensity = (intensity - center0) / width0 + 0.5;intensity = clamp(intensity, 0.0, 1.0);gl_FragColor = vec4(intensity, intensity, intensity, 1.0);if (invert == 1)gl_FragColor.rgb = 1.0 - gl_FragColor.rgb;}",i.int16Shader=E},function(BA,i,t){"use strict";function o(C){for(var A=C.getPixelData(),I=new Uint8Array(C.width*C.height*2),g=0,B=0;B>8}return I}Object.defineProperty(i,"__esModule",{value:!0});var E={};i.uint16DataUtilities={storedPixelDataToImageData:o},E.frag="precision mediump float;uniform sampler2D u_image;uniform float ww;uniform float wc;uniform float slope;uniform float intercept;uniform int invert;varying vec2 v_texCoord;void main() {vec4 color = texture2D(u_image, v_texCoord);float intensity = color.r*256.0 + color.a*65536.0;intensity = intensity * slope + intercept;float center0 = wc - 0.5;float width0 = max(ww, 1.0);intensity = (intensity - center0) / width0 + 0.5;intensity = clamp(intensity, 0.0, 1.0);gl_FragColor = vec4(intensity, intensity, intensity, 1.0);if (invert == 1)gl_FragColor.rgb = 1.0 - gl_FragColor.rgb;}",i.uint16Shader=E},function(BA,i,t){"use strict";function o(C){return C.getPixelData()}Object.defineProperty(i,"__esModule",{value:!0});var E={};i.uint8DataUtilities={storedPixelDataToImageData:o},E.frag="precision mediump float;uniform sampler2D u_image;uniform float ww;uniform float wc;uniform float slope;uniform float intercept;uniform int invert;varying vec2 v_texCoord;void main() {vec4 color = texture2D(u_image, v_texCoord);float intensity = color.r*256.0;intensity = intensity * slope + intercept;float center0 = wc - 0.5;float width0 = max(ww, 1.0);intensity = (intensity - center0) / width0 + 0.5;intensity = clamp(intensity, 0.0, 1.0);gl_FragColor = vec4(intensity, intensity, intensity, 1.0);if (invert == 1)gl_FragColor.rgb = 1.0 - gl_FragColor.rgb;}",i.uint8Shader=E},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.vertexShader="attribute vec2 a_position;attribute vec2 a_texCoord;uniform vec2 u_resolution;varying vec2 v_texCoord;void main() {vec2 zeroToOne = a_position / u_resolution;vec2 zeroToTwo = zeroToOne * 2.0;vec2 clipSpace = zeroToTwo - 1.0;gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);v_texCoord = a_texCoord;}"},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(A,I){var g=(0,o.getEnabledElement)(A),B=(0,C.default)(g);return B.invert(),B.transformPoint(I.x,I.y)};var o=t(0),E=t(9),C=function(A){return A&&A.__esModule?A:{default:A}}(E)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(A){if(A===void 0)throw new Error("disable: element must not be undefined");for(var I=(0,o.getEnabledElements)(),g=0;g0}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(u,N){function G(F){if(R.canvas!==void 0){var D={enabledElement:R,timestamp:F};(0,h.default)(R.element,"cornerstoneprerender",D),R.needsRedraw&&E(R)&&(0,B.default)(R,R.invalid),(0,e.default)(G)}}if(u===void 0)throw new Error("enable: parameter element cannot be undefined");N&&N.renderer&&N.renderer.toLowerCase()==="webgl"&&(a.default.renderer.isWebGLAvailable()?(a.default.renderer.initRenderer(),N.renderer="webgl"):(console.error("WebGL not available, falling back to Canvas renderer"),delete N.renderer));var l=(0,w.default)(u),R={element:u,canvas:l,image:void 0,invalid:!1,needsRedraw:!0,options:N,layers:[],data:{},renderingTools:{}};(0,C.addEnabledElement)(R),(0,I.default)(u,!0),G()};var C=t(0),A=t(36),I=o(A),g=t(62),B=o(g),Q=t(19),e=o(Q),s=t(15),a=o(s),r=t(2),h=o(r),c=t(64),w=o(c)},function(BA,i,t){"use strict";function o(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(r,h){var c=r.image,w=r.element,u=r.layers||[];if(r.canvas&&(r.image||u.length)){var N=(0,C.default)();if(c.stats={lastGetPixelDataTime:-1,lastStoredPixelDataToCanvasImageDataTime:-1,lastPutImageDataTime:-1,lastRenderTime:-1,lastLutGenerateTime:-1},u&&u.length)(0,I.default)(r,h);else if(c){var G=c.render;G||(G=r.viewport.colormap&&r.viewport.colormap!==""&&r.image.labelmap===!0?e.renderLabelMapImage:r.viewport.colormap&&r.viewport.colormap!==""?Q.renderPseudoColorImage:c.color?g.renderColorImage:B.renderGrayscaleImage),G(r,h)}var l=(0,C.default)()-N,R={viewport:r.viewport,element:w,image:c,enabledElement:r,canvasContext:r.canvas.getContext("2d"),renderTimeInMs:l};c.stats.lastRenderTime=l,r.invalid=!1,r.needsRedraw=!1,(0,a.default)(w,"cornerstoneimagerendered",R)}};var E=t(1),C=o(E),A=t(63),I=o(A),g=t(8),B=t(17),Q=t(14),e=t(10),s=t(2),a=o(s)},function(BA,i,t){"use strict";function o(r,h){return a[h]/a[r]}function E(r,h){r.forEach(function(c){if(c!==h&&c.viewport&&h.viewport){a[c.layerId]||(a[c.layerId]=c.viewport.scale);var w=o(h.layerId,c.layerId);c.viewport.scale=h.viewport.scale*w,c.viewport.rotation=h.viewport.rotation,c.viewport.translation={x:h.viewport.translation.x/w,y:h.viewport.translation.y/w},c.viewport.hflip=h.viewport.hflip,c.viewport.vflip=h.viewport.vflip}})}function C(r,h,c){h.forEach(function(w,u){if(w.image){r.save(),w.canvas=r.canvas,(0,s.default)(w,r);var N=w.viewport.colormap||w.options.colormap,G=w.viewport.labelmap,l=w.invalid||c;if(N&&N!==""&&G===!0)(0,Q.addLabelMapLayer)(w,l);else if(N&&N!=="")(0,B.addPseudoColorLayer)(w,l);else if(w.image.color===!0)(0,g.addColorLayer)(w,l);else{var R=u===0;(0,I.addGrayscaleLayer)(w,l,R)}w.options&&w.options.opacity?r.globalAlpha=w.options.opacity:r.globalAlpha=1,w.options&&w.options.fillStyle&&(r.fillStyle=w.options.fillStyle),r.imageSmoothingEnabled=!w.viewport.pixelReplication,r.mozImageSmoothingEnabled=r.imageSmoothingEnabled;var F=w.image,D=F.width,d=F.height;r.drawImage(w.canvas,0,0,D,d,0,0,D,d),r.restore(),w.invalid=!1}})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(r,h){var c=r.element,w=(0,A.getLayers)(c),u=(0,A.getActiveLayer)(c),N=(0,A.getVisibleLayers)(c),G=!r.lastSyncViewportsState&&r.syncViewports;r.lastSyncViewportsState=r.syncViewports,G&&w.forEach(function(R){R.viewport&&(a[R.layerId]=R.viewport.scale)}),r.syncViewports===!0&&E(N,u);var l=r.canvas.getContext("2d");l.setTransform(1,0,0,1,0,0),l.fillStyle="black",l.fillRect(0,0,r.canvas.width,r.canvas.height),C(l,N,h)};var A=t(25),I=t(17),g=t(8),B=t(14),Q=t(10),e=t(4),s=function(r){return r&&r.__esModule?r:{default:r}}(e),a={}},function(BA,i,t){"use strict";function o(A){var I=document.createElement("canvas");return I.style.display="block",I.classList.add(C),A.appendChild(I),I}function E(A){var I="canvas."+C;return A.querySelector(I)||o(A)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=E;var C="cornerstone-canvas"},function(BA,i,t){"use strict";function o(A,I){var g=(0,C.getEnabledElement)(A);return g.data.hasOwnProperty(I)===!1&&(g.data[I]={}),g.data[I]}function E(A,I){delete(0,C.getEnabledElement)(A).data[I]}Object.defineProperty(i,"__esModule",{value:!0}),i.getElementData=o,i.removeElementData=E;var C=t(0)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(A,I){var g=(0,o.getEnabledElement)(A);return(0,C.default)(g.canvas,I)};var o=t(0),E=t(3),C=function(A){return A&&A.__esModule?A:{default:A}}(E)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(E){return(0,o.getEnabledElement)(E).image};var o=t(0)},function(BA,i,t){"use strict";function o(B){return B&&B.__esModule?B:{default:B}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(B,Q,e,s,a){var r=(0,A.default)(B,Q,e,s,a),h=(0,E.getEnabledElement)(B),c=(0,g.default)(h.image.slope,h.image.intercept,h.viewport.modalityLUT);return r.map(c)};var E=t(0),C=t(39),A=o(C),I=t(26),g=o(I)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(E){var C=(0,o.getEnabledElement)(E),A=C.viewport;if(A!==void 0)return Object.assign({},A)};var o=t(0)},function(BA,i,t){"use strict";function o(c){return c&&c.__esModule?c:{default:c}}function E(c,w){var u=c.indexOf(":"),N=c.substring(0,u),G=r[N];if(G==null){if(h!==void 0)return h(c);throw new Error("loadImageFromImageLoader: no image loader for imageId")}var l=G(c,w);return l.promise.then(function(R){(0,a.default)(e.default,"cornerstoneimageloaded",{image:R})},function(R){var F={imageId:c,error:R};(0,a.default)(e.default,"cornerstoneimageloadfailed",F)}),l}function C(c,w){if(c===void 0)throw new Error("loadImage: parameter imageId must not be undefined");var u=(0,B.getImageLoadObject)(c);return u!==void 0?u.promise:E(c,w).promise}function A(c,w){if(c===void 0)throw new Error("loadAndCacheImage: parameter imageId must not be undefined");var u=(0,B.getImageLoadObject)(c);return u!==void 0||(u=E(c,w),(0,B.putImageLoadObject)(c,u)),u.promise}function I(c,w){r[c]=w}function g(c){var w=h;return h=c,w}Object.defineProperty(i,"__esModule",{value:!0}),i.loadImage=C,i.loadAndCacheImage=A,i.registerImageLoader=I,i.registerUnknownImageLoader=g;var B=t(40),Q=t(16),e=o(Q),s=t(2),a=o(s),r={},h=void 0},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(A){var I=(0,o.getEnabledElement)(A);I.invalid=!0,I.needsRedraw=!0;var g={element:A};(0,C.default)(A,"cornerstoneinvalidated",g)};var o=t(0),E=t(2),C=function(A){return A&&A.__esModule?A:{default:A}}(E)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(A){(0,o.getEnabledElementsByImageId)(A).forEach(function(I){(0,C.default)(I,!0)})};var o=t(0),E=t(6),C=function(A){return A&&A.__esModule?A:{default:A}}(E)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(A,I,g){var B=(0,o.getEnabledElement)(A);if(B.image===void 0)throw new Error("image has not been loaded yet");var Q=A.getBoundingClientRect(),e=I-Q.left-window.pageXOffset,s=g-Q.top-window.pageYOffset,a={x:e,y:s},r=(0,C.default)(B);return r.invert(),r.transformPoint(a.x,a.y)};var o=t(0),E=t(9),C=function(A){return A&&A.__esModule?A:{default:A}}(E)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(A,I){var g=(0,o.getEnabledElement)(A);return(0,C.default)(g).transformPoint(I.x,I.y)};var o=t(0),E=t(9),C=function(A){return A&&A.__esModule?A:{default:A}}(E)},function(BA,i,t){"use strict";function o(B){return B&&B.__esModule?B:{default:B}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(B){var Q=(0,E.getEnabledElement)(B);Q.viewport=(0,A.default)(Q.canvas,Q.image),(0,g.default)(B)};var E=t(0),C=t(3),A=o(C),I=t(5),g=o(I)},function(BA,i,t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e,s){var a=(0,A.getEnabledElement)(e);if(a.viewport===void 0&&(a.viewport=(0,C.default)(a.canvas)),s)for(var r in s)s[r]!==null&&(a.viewport[r]=s[r]);a.viewport.voi.windowWidth&&(a.viewport.voi.windowWidth=Math.max(s.voi.windowWidth,B)),a.viewport.scale&&(a.viewport.scale=Math.max(s.scale,Q)),a.viewport.rotation%=360,a.viewport.rotation<0&&(a.viewport.rotation+=360),a.image&&(0,g.default)(e)};var E=t(3),C=o(E),A=t(0),I=t(5),g=o(I),B=1e-6,Q=1e-4},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=t(8),E=t(17),C=t(35),A=t(14),I=t(10);i.default={colorImage:o.renderColorImage,grayscaleImage:E.renderGrayscaleImage,webImage:C.renderWebImage,pseudoColorImage:A.renderPseudoColorImage,labelMapImage:I.renderLabelMapImage}},function(BA,i,t){"use strict";function o(I){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,B=void 0;for(B=0;Bw?h:w;return{minPixelValue:r,maxPixelValue:h}}function E(a){if(a.restore)return a.restore;var r=a.color,h=a.rgba,c=a.cachedLut,w=a.slope,u=a.windowWidth,N=a.windowCenter,G=a.minPixelValue,l=a.maxPixelValue;return function(){if(a.color=r,a.rgba=h,a.cachedLut=c,a.slope=w,a.windowWidth=u,a.windowCenter=N,a.minPixelValue=G,a.maxPixelValue=l,a.origPixelData){var R=a.origPixelData;a.getPixelData=function(){return R}}a.origPixelData=void 0,a.colormapId=void 0,a.falseColor=void 0}}function C(a){return a&&typeof a=="string"&&(a=(0,s.getColormap)(a)),a}function A(a){return!(!a.restore||typeof a.restore!="function")&&(a.restore(),!0)}function I(a,r){if(a.color&&!a.falseColor)throw new Error("Color transforms are not implemented yet");r=C(r);var h=r.getId();if(a.colormapId===h)return!1;if(A(a),h){var c=a.minPixelValue||0,w=a.maxPixelValue||255;a.restore=E(a);var u=r.createLookupTable();u.setTableRange(c,w),(0,e.default)(a,u);var N=o(a.getPixelData());a.minPixelValue=N.minPixelValue,a.maxPixelValue=N.maxPixelValue,a.windowWidth=255,a.windowCenter=128,a.colormapId=h}return!0}function g(a,r){return I((0,B.getEnabledElement)(a).image,r)}Object.defineProperty(i,"__esModule",{value:!0}),i.restoreImage=i.convertToFalseColorImage=i.convertImageToFalseColorImage=void 0;var B=t(0),Q=t(41),e=function(a){return a&&a.__esModule?a:{default:a}}(Q),s=t(28);i.convertImageToFalseColorImage=I,i.convertToFalseColorImage=g,i.restoreImage=A}])})},40352:function(NI){/*! cornerstone-math - 0.1.6 - 2017-06-09 | (c) 2017 Chris Hafey | https://github.com/chafey/cornerstoneTools */(function(BA,i){NI.exports=i()})(this,function(){return function(BA){function i(o){if(t[o])return t[o].exports;var E=t[o]={i:o,l:!1,exports:{}};return BA[o].call(E.exports,E,E.exports,i),E.l=!0,E.exports}var t={};return i.m=BA,i.c=t,i.i=function(o){return o},i.d=function(o,E,C){i.o(o,E)||Object.defineProperty(o,E,{configurable:!1,enumerable:!0,get:C})},i.n=function(o){var E=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(E,"a",E),E},i.o=function(o,E){return Object.prototype.hasOwnProperty.call(o,E)},i.p="",i(i.s=9)}([function(BA,i,t){"use strict";function o(I,g,B){return IB?B:I}function E(I){return I*(Math.PI/180)}function C(I){return I*(180/Math.PI)}function A(I){return typeof I=="number"?I?I<0?-1:1:I===I?0:NaN:NaN}Object.defineProperty(i,"__esModule",{value:!0}),i.clamp=o,i.degToRad=E,i.radToDeg=C,i.sign=A},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=t(3),E=function(I){return I&&I.__esModule?I:{default:I}}(o),C=t(0),A=function(I,g,B){this.x=I||0,this.y=g||0,this.z=B||0};A.prototype={constructor:A,set:function(I,g,B){return this.x=I,this.y=g,this.z=B,this},setX:function(I){return this.x=I,this},setY:function(I){return this.y=I,this},setZ:function(I){return this.z=I,this},setComponent:function(I,g){switch(I){case 0:this.x=g;break;case 1:this.y=g;break;case 2:this.z=g;break;default:throw new Error("index is out of range: "+I)}},getComponent:function(I){switch(I){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+I)}},copy:function(I){return this.x=I.x,this.y=I.y,this.z=I.z,this},add:function(I,g){return g!==void 0?(console.warn("DEPRECATED: Vector3's .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(I,g)):(this.x+=I.x,this.y+=I.y,this.z+=I.z,this)},addScalar:function(I){return this.x+=I,this.y+=I,this.z+=I,this},addVectors:function(I,g){return this.x=I.x+g.x,this.y=I.y+g.y,this.z=I.z+g.z,this},sub:function(I,g){return g!==void 0?(console.warn("DEPRECATED: Vector3's .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(I,g)):(this.x-=I.x,this.y-=I.y,this.z-=I.z,this)},subVectors:function(I,g){return this.x=I.x-g.x,this.y=I.y-g.y,this.z=I.z-g.z,this},multiply:function(I,g){return g!==void 0?(console.warn("DEPRECATED: Vector3's .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(I,g)):(this.x*=I.x,this.y*=I.y,this.z*=I.z,this)},multiplyScalar:function(I){return this.x*=I,this.y*=I,this.z*=I,this},multiplyVectors:function(I,g){return this.x=I.x*g.x,this.y=I.y*g.y,this.z=I.z*g.z,this},applyAxisAngle:function(){var I=void 0;return function(g,B){return I===void 0&&(I=new E.default),this.applyQuaternion(I.setFromAxisAngle(g,B)),this}}(),applyMatrix3:function(I){var g=this.x,B=this.y,Q=this.z,e=I.elements;return this.x=e[0]*g+e[3]*B+e[6]*Q,this.y=e[1]*g+e[4]*B+e[7]*Q,this.z=e[2]*g+e[5]*B+e[8]*Q,this},applyMatrix4:function(I){var g=this.x,B=this.y,Q=this.z,e=I.elements;return this.x=e[0]*g+e[4]*B+e[8]*Q+e[12],this.y=e[1]*g+e[5]*B+e[9]*Q+e[13],this.z=e[2]*g+e[6]*B+e[10]*Q+e[14],this},applyProjection:function(I){var g=this.x,B=this.y,Q=this.z,e=I.elements,s=1/(e[3]*g+e[7]*B+e[11]*Q+e[15]);return this.x=(e[0]*g+e[4]*B+e[8]*Q+e[12])*s,this.y=(e[1]*g+e[5]*B+e[9]*Q+e[13])*s,this.z=(e[2]*g+e[6]*B+e[10]*Q+e[14])*s,this},applyQuaternion:function(I){var g=this.x,B=this.y,Q=this.z,e=I.x,s=I.y,a=I.z,r=I.w,h=r*g+s*Q-a*B,c=r*B+a*g-e*Q,w=r*Q+e*B-s*g,u=-e*g-s*B-a*Q;return this.x=h*r+u*-e+c*-a-w*-s,this.y=c*r+u*-s+w*-e-h*-a,this.z=w*r+u*-a+h*-s-c*-e,this},transformDirection:function(I){var g=this.x,B=this.y,Q=this.z,e=I.elements;return this.x=e[0]*g+e[4]*B+e[8]*Q,this.y=e[1]*g+e[5]*B+e[9]*Q,this.z=e[2]*g+e[6]*B+e[10]*Q,this.normalize(),this},divide:function(I){return this.x/=I.x,this.y/=I.y,this.z/=I.z,this},divideScalar:function(I){if(I!==0){var g=1/I;this.x*=g,this.y*=g,this.z*=g}else this.x=0,this.y=0,this.z=0;return this},min:function(I){return this.x>I.x&&(this.x=I.x),this.y>I.y&&(this.y=I.y),this.z>I.z&&(this.z=I.z),this},max:function(I){return this.xg.x&&(this.x=g.x),this.yg.y&&(this.y=g.y),this.zg.z&&(this.z=g.z),this},clampScalar:function(){var I=void 0,g=void 0;return function(B,Q){return I===void 0&&(I=new A,g=new A),I.set(B,B,B),g.set(Q,Q,Q),this.clamp(I,g)}}(),floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.multiplyScalar(-1)},dot:function(I){return this.x*I.x+this.y*I.y+this.z*I.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(I){var g=this.length();return g!==0&&I!==g&&this.multiplyScalar(I/g),this},lerp:function(I,g){return this.x+=(I.x-this.x)*g,this.y+=(I.y-this.y)*g,this.z+=(I.z-this.z)*g,this},cross:function(I,g){if(g!==void 0)return console.warn("DEPRECATED: Vector3's .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(I,g);var B=this.x,Q=this.y,e=this.z;return this.x=Q*I.z-e*I.y,this.y=e*I.x-B*I.z,this.z=B*I.y-Q*I.x,this},crossVectors:function(I,g){var B=I.x,Q=I.y,e=I.z,s=g.x,a=g.y,r=g.z;return this.x=Q*r-e*a,this.y=e*s-B*r,this.z=B*a-Q*s,this},projectOnVector:function(){var I=void 0,g=void 0;return function(B){return I===void 0&&(I=new A),I.copy(B).normalize(),g=this.dot(I),this.copy(I).multiplyScalar(g)}}(),projectOnPlane:function(){var I=void 0;return function(g){return I===void 0&&(I=new A),I.copy(this).projectOnVector(g),this.sub(I)}}(),reflect:function(){var I=void 0;return function(g){return I===void 0&&(I=new A),this.sub(I.copy(g).multiplyScalar(2*this.dot(g)))}}(),angleTo:function(I){var g=this.dot(I)/(this.length()*I.length());return Math.acos((0,C.clamp)(g,-1,1))},distanceTo:function(I){return Math.sqrt(this.distanceToSquared(I))},distanceToSquared:function(I){var g=this.x-I.x,B=this.y-I.y,Q=this.z-I.z;return g*g+B*B+Q*Q},setFromMatrixPosition:function(I){return this.x=I.elements[12],this.y=I.elements[13],this.z=I.elements[14],this},setFromMatrixScale:function(I){var g=this.set(I.elements[0],I.elements[1],I.elements[2]).length(),B=this.set(I.elements[4],I.elements[5],I.elements[6]).length(),Q=this.set(I.elements[8],I.elements[9],I.elements[10]).length();return this.x=g,this.y=B,this.z=Q,this},setFromMatrixColumn:function(I,g){var B=4*I,Q=g.elements;return this.x=Q[B],this.y=Q[B+1],this.z=Q[B+2],this},equals:function(I){return I.x===this.x&&I.y===this.y&&I.z===this.z},fromArray:function(I){return this.x=I[0],this.y=I[1],this.z=I[2],this},toArray:function(){return[this.x,this.y,this.z]},clone:function(){return new A(this.x,this.y,this.z)}},i.default=A},function(BA,i,t){"use strict";function o(Q){return Q*Q}function E(Q,e){return o(Q.x-e.x)+o(Q.y-e.y)}function C(Q,e){var s=E(Q.start,Q.end);if(s===0)return E(e,Q.start);var a=((e.x-Q.start.x)*(Q.end.x-Q.start.x)+(e.y-Q.start.y)*(Q.end.y-Q.start.y))/s;return a<0?E(e,Q.start):a>1?E(e,Q.end):E(e,{x:Q.start.x+a*(Q.end.x-Q.start.x),y:Q.start.y+a*(Q.end.y-Q.start.y)})}function A(Q,e){return Math.sqrt(C(Q,e))}function I(Q,e){var s={},a=Q.start.x,r=Q.start.y,h=Q.end.x,c=Q.end.y,w=e.start.x,u=e.start.y,N=e.end.x,G=e.end.y,l=void 0,R=void 0,F=void 0,D=void 0,d=void 0,y=void 0,M=void 0,L=void 0,k=void 0,H=void 0,m=void 0,x=void 0;if(l=c-r,F=a-h,d=h*r-a*c,k=l*w+F*u+d,H=l*N+F*G+d,(k===0||H===0||(0,g.sign)(k)!==(0,g.sign)(H))&&(R=G-u,D=w-N,y=N*u-w*G,M=R*a+D*r+y,L=R*h+D*c+y,M===0||L===0||(0,g.sign)(M)!==(0,g.sign)(L))){m=l*D-R*F,x=F*y-D*d;var P=parseFloat(x/m);x=R*d-l*y;var q=parseFloat(x/m);return s.x=P,s.y=q,s}}Object.defineProperty(i,"__esModule",{value:!0});var g=t(0),B={distanceToPoint:A,intersectLine:I};i.default=B},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=function(E,C,A,I){this.x=E||0,this.y=C||0,this.z=A||0,this.w=I!==void 0?I:1};o.prototype.setFromAxisAngle=function(E,C){var A=C/2,I=Math.sin(A);return this.x=E.x*I,this.y=E.y*I,this.z=E.z*I,this.w=Math.cos(A),this},o.prototype.multiplyQuaternions=function(E,C){var A=E.x,I=E.y,g=E.z,B=E.w,Q=C.x,e=C.y,s=C.z,a=C.w;return this.x=A*a+B*Q+I*s-g*e,this.y=I*a+B*e+g*Q-A*s,this.z=g*a+B*s+A*e-I*Q,this.w=B*a-A*Q-I*e-g*s,this},o.prototype.setFromRotationMatrix=function(E){var C=E.elements,A=C[0],I=C[4],g=C[8],B=C[1],Q=C[5],e=C[9],s=C[2],a=C[6],r=C[10],h=A+Q+r,c=void 0;return h>0?(c=.5/Math.sqrt(h+1),this.w=.25/c,this.x=(a-e)*c,this.y=(g-s)*c,this.z=(B-I)*c):A>Q&&A>r?(c=2*Math.sqrt(1+A-Q-r),this.w=(a-e)/c,this.x=.25*c,this.y=(I+B)/c,this.z=(g+s)/c):Q>r?(c=2*Math.sqrt(1+Q-A-r),this.w=(g-s)/c,this.x=(I+B)/c,this.y=.25*c,this.z=(e+a)/c):(c=2*Math.sqrt(1+r-A-Q),this.w=(B-I)/c,this.x=(g+s)/c,this.y=(e+a)/c,this.z=.25*c),this},i.default=o},function(BA,i,t){"use strict";function o(B,Q){if(!(B instanceof Q))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var E=function(){function B(Q,e){for(var s=0;s1||isNaN(c))){var w=this.start.clone().add(e.clone().multiplyScalar(c));return w.clone().sub(Q.start).lengthSq()+w.clone().sub(Q.end).lengthSq()<=Q.distanceSq()?w:void 0}}}}]),B}();i.default=g},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=t(1),E=function(A){return A&&A.__esModule?A:{default:A}}(o),C=function(A,I,g,B,Q,e,s,a,r,h,c,w,u,N,G,l){this.elements=new Float32Array(16);var R=this.elements;R[0]=A!==void 0?A:1,R[4]=I||0,R[8]=g||0,R[12]=B||0,R[1]=Q||0,R[5]=e!==void 0?e:1,R[9]=s||0,R[13]=a||0,R[2]=r||0,R[6]=h||0,R[10]=c!==void 0?c:1,R[14]=w||0,R[3]=u||0,R[7]=N||0,R[11]=G||0,R[15]=l!==void 0?l:1};C.prototype.makeRotationFromQuaternion=function(A){var I=this.elements,g=A.x,B=A.y,Q=A.z,e=A.w,s=g+g,a=B+B,r=Q+Q,h=g*s,c=g*a,w=g*r,u=B*a,N=B*r,G=Q*r,l=e*s,R=e*a,F=e*r;return I[0]=1-(u+G),I[4]=c-F,I[8]=w+R,I[1]=c+F,I[5]=1-(h+G),I[9]=N-l,I[2]=w-R,I[6]=N+l,I[10]=1-(h+u),I[3]=0,I[7]=0,I[11]=0,I[12]=0,I[13]=0,I[14]=0,I[15]=1,this},C.prototype.multiplyMatrices=function(A,I){var g=A.elements,B=I.elements,Q=this.elements,e=g[0],s=g[4],a=g[8],r=g[12],h=g[1],c=g[5],w=g[9],u=g[13],N=g[2],G=g[6],l=g[10],R=g[14],F=g[3],D=g[7],d=g[11],y=g[15],M=B[0],L=B[4],k=B[8],H=B[12],m=B[1],x=B[5],P=B[9],q=B[13],K=B[2],U=B[6],n=B[10],S=B[14],v=B[3],p=B[7],J=B[11],z=B[15];return Q[0]=e*M+s*m+a*K+r*v,Q[4]=e*L+s*x+a*U+r*p,Q[8]=e*k+s*P+a*n+r*J,Q[12]=e*H+s*q+a*S+r*z,Q[1]=h*M+c*m+w*K+u*v,Q[5]=h*L+c*x+w*U+u*p,Q[9]=h*k+c*P+w*n+u*J,Q[13]=h*H+c*q+w*S+u*z,Q[2]=N*M+G*m+l*K+R*v,Q[6]=N*L+G*x+l*U+R*p,Q[10]=N*k+G*P+l*n+R*J,Q[14]=N*H+G*q+l*S+R*z,Q[3]=F*M+D*m+d*K+y*v,Q[7]=F*L+D*x+d*U+y*p,Q[11]=F*k+D*P+d*n+y*J,Q[15]=F*H+D*q+d*S+y*z,this},C.prototype.multiply=function(A,I){return I!==void 0?(console.warn("DEPRECATED: Matrix4's .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(A,I)):this.multiplyMatrices(this,A)},C.prototype.getInverse=function(A,I){var g=this.elements,B=A.elements,Q=B[0],e=B[4],s=B[8],a=B[12],r=B[1],h=B[5],c=B[9],w=B[13],u=B[2],N=B[6],G=B[10],l=B[14],R=B[3],F=B[7],D=B[11],d=B[15];g[0]=c*l*F-w*G*F+w*N*D-h*l*D-c*N*d+h*G*d,g[4]=a*G*F-s*l*F-a*N*D+e*l*D+s*N*d-e*G*d,g[8]=s*w*F-a*c*F+a*h*D-e*w*D-s*h*d+e*c*d,g[12]=a*c*N-s*w*N-a*h*G+e*w*G+s*h*l-e*c*l,g[1]=w*G*R-c*l*R-w*u*D+r*l*D+c*u*d-r*G*d,g[5]=s*l*R-a*G*R+a*u*D-Q*l*D-s*u*d+Q*G*d,g[9]=a*c*R-s*w*R-a*r*D+Q*w*D+s*r*d-Q*c*d,g[13]=s*w*u-a*c*u+a*r*G-Q*w*G-s*r*l+Q*c*l,g[2]=h*l*R-w*N*R+w*u*F-r*l*F-h*u*d+r*N*d,g[6]=a*N*R-e*l*R-a*u*F+Q*l*F+e*u*d-Q*N*d,g[10]=e*w*R-a*h*R+a*r*F-Q*w*F-e*r*d+Q*h*d,g[14]=a*h*u-e*w*u-a*r*N+Q*w*N+e*r*l-Q*h*l,g[3]=c*N*R-h*G*R-c*u*F+r*G*F+h*u*D-r*N*D,g[7]=e*G*R-s*N*R+s*u*F-Q*G*F-e*u*D+Q*N*D,g[11]=s*h*R-e*c*R-s*r*F+Q*c*F+e*r*D-Q*h*D,g[15]=e*c*u-s*h*u+s*r*N-Q*c*N-e*r*G+Q*h*G;var y=Q*g[0]+r*g[4]+u*g[8]+R*g[12];if(y===0){var M="Matrix4.getInverse(): can't invert matrix, determinant is 0";if(I)throw new Error(M);return console.warn(M),this.identity(),this}return this.multiplyScalar(1/y),this},C.prototype.applyToVector3Array=function(){var A=new E.default;return function(I,g,B){g===void 0&&(g=0),B===void 0&&(B=I.length);for(var Q=0,e=g;Q0||g<0&&I>0},intersectLine:function(){var A=new E.default;return function(I,g){var B=g||new E.default,Q=I.delta(A),e=this.normal.dot(Q);if(e!==0){var s=-(I.start.dot(this.normal)+this.constant)/e;if(!(s<0||s>1))return B.copy(Q).multiplyScalar(s).add(I.start)}else if(this.distanceToPoint(I.start)===0)return B.copy(I.start)}}(),intersectPlane:function(A){var I=this.normal.clone().cross(A.normal),g=new E.default,B={origin:g,direction:I};if(this.normal.clone().cross(A.normal).length<1e-10)return B.direction=new E.default,B;var Q=this.constant,e=A.constant,s=this.normal.clone().dot(A.normal),a=-(Q-e*s)/(1-s*s),r=-(e-Q*s)/(1-s*s);return B.origin=this.normal.clone().multiplyScalar(a).add(A.normal.clone().multiplyScalar(r)),B},coplanarPoint:function(A){return(A||new E.default).copy(this.normal).multiplyScalar(-this.constant)},translate:function(A){return this.constant=this.constant-A.dot(this.normal),this},equals:function(A){return A.normal.equals(this.normal)&&A.constant===this.constant},clone:function(){return new C().copy(this)}},i.default=C},function(BA,i,t){"use strict";function o(e){return{x:e.pageX,y:e.pageY}}function E(e,s){return{x:e.x-s.x,y:e.y-s.y}}function C(e){return{x:e.x,y:e.y}}function A(e,s){return Math.sqrt(I(e,s))}function I(e,s){var a=E(e,s);return a.x*a.x+a.y*a.y}function g(e,s){return!(e.xs.left+s.width||e.ys.top+s.height)}function B(e,s){var a=[],r=void 0;return e.forEach(function(h,c){var w=A(h,s);a.push(w),r=c===0?w:Math.min(w,r)}),e[a.indexOf(r)]}Object.defineProperty(i,"__esModule",{value:!0});var Q={subtract:E,copy:C,pageToPoint:o,distance:A,distanceSquared:I,insideRect:g,findClosestPoint:B};i.default=Q},function(BA,i,t){"use strict";function o(e){return[{start:{x:e.left,y:e.top},end:{x:e.left+e.width,y:e.top}},{start:{x:e.left+e.width,y:e.top},end:{x:e.left+e.width,y:e.top+e.height}},{start:{x:e.left+e.width,y:e.top+e.height},end:{x:e.left,y:e.top+e.height}},{start:{x:e.left,y:e.top+e.height},end:{x:e.left,y:e.top}}]}function E(e,s){var a=655535;return o(e).forEach(function(r){var h=B.default.distanceToPoint(r,s);h=0?s.width>=0?!(h.bottomRight.x<=c.topLeft.x||c.bottomRight.x<=h.topLeft.x):!(h.bottomRight.x<=c.bottomRight.x||c.topLeft.x<=h.topLeft.x):s.width>=0?!(h.topLeft.x<=c.topLeft.x||c.bottomRight.x<=h.bottomRight.x):!(h.topLeft.x<=c.bottomRight.x||c.topLeft.x<=h.bottomRight.x),r=e.height>=0?s.height>=0?!(h.bottomRight.y<=c.topLeft.y||c.bottomRight.y<=h.topLeft.y):!(h.bottomRight.y<=c.bottomRight.y||c.topLeft.y<=h.topLeft.y):s.height>=0?!(h.topLeft.y<=c.topLeft.y||c.bottomRight.y<=h.bottomRight.y):!(h.topLeft.y<=c.bottomRight.y||c.top<=h.bottomRight.y),a&&r}function I(e,s){var a={topLeft:{},bottomRight:{}};if(A(e,s)){var r=C(e),h=C(s);return e.width>=0?s.width>=0?(a.topLeft.x=Math.max(r.topLeft.x,h.topLeft.x),a.bottomRight.x=Math.min(r.bottomRight.x,h.bottomRight.x)):(a.topLeft.x=Math.max(r.topLeft.x,h.bottomRight.x),a.bottomRight.x=Math.min(r.bottomRight.x,h.topLeft.x)):s.width>=0?(a.topLeft.x=Math.min(r.topLeft.x,h.bottomRight.x),a.bottomRight.x=Math.max(r.bottomRight.x,h.topLeft.x)):(a.topLeft.x=Math.min(r.topLeft.x,h.topLeft.x),a.bottomRight.x=Math.max(r.bottomRight.x,h.bottomRight.x)),e.height>=0?s.height>=0?(a.topLeft.y=Math.max(r.topLeft.y,h.topLeft.y),a.bottomRight.y=Math.min(r.bottomRight.y,h.bottomRight.y)):(a.topLeft.y=Math.max(r.topLeft.y,h.bottomRight.y),a.bottomRight.y=Math.min(r.bottomRight.y,h.topLeft.y)):s.height>=0?(a.topLeft.y=Math.min(r.topLeft.y,h.bottomRight.y),a.bottomRight.y=Math.max(r.bottomRight.y,h.topLeft.y)):(a.topLeft.y=Math.min(r.topLeft.y,h.topLeft.y),a.bottomRight.y=Math.max(r.bottomRight.y,h.bottomRight.y)),a}}Object.defineProperty(i,"__esModule",{value:!0});var g=t(2),B=function(e){return e&&e.__esModule?e:{default:e}}(g),Q={distanceToPoint:E,getIntersectionRect:I};i.default=Q},function(BA,i,t){"use strict";function o(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(i,"__esModule",{value:!0});var E=t(4);Object.defineProperty(i,"Line3",{enumerable:!0,get:function(){return o(E).default}});var C=t(2);Object.defineProperty(i,"lineSegment",{enumerable:!0,get:function(){return o(C).default}});var A=t(0);Object.defineProperty(i,"clamp",{enumerable:!0,get:function(){return A.clamp}}),Object.defineProperty(i,"degToRad",{enumerable:!0,get:function(){return A.degToRad}}),Object.defineProperty(i,"radToDeg",{enumerable:!0,get:function(){return A.radToDeg}}),Object.defineProperty(i,"sign",{enumerable:!0,get:function(){return A.sign}});var I=t(5);Object.defineProperty(i,"Matrix4",{enumerable:!0,get:function(){return o(I).default}});var g=t(6);Object.defineProperty(i,"Plane",{enumerable:!0,get:function(){return o(g).default}});var B=t(7);Object.defineProperty(i,"point",{enumerable:!0,get:function(){return o(B).default}});var Q=t(3);Object.defineProperty(i,"quaternion",{enumerable:!0,get:function(){return o(Q).default}});var e=t(8);Object.defineProperty(i,"rect",{enumerable:!0,get:function(){return o(e).default}});var s=t(1);Object.defineProperty(i,"Vector3",{enumerable:!0,get:function(){return o(s).default}})}])})},75720:function(NI){/*! cornerstone-tools - 2.1.0 - 2018-03-02 | (c) 2017 Chris Hafey | https://github.com/cornerstonejs/cornerstoneTools */(function(BA,i){NI.exports=i()})(typeof self!="undefined"?self:this,function(){return function(BA){function i(o){if(t[o])return t[o].exports;var E=t[o]={i:o,l:!1,exports:{}};return BA[o].call(E.exports,E,E.exports,i),E.l=!0,E.exports}var t={};return i.m=BA,i.c=t,i.d=function(o,E,C){i.o(o,E)||Object.defineProperty(o,E,{configurable:!1,enumerable:!0,get:C})},i.n=function(o){var E=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(E,"a",E),E},i.o=function(o,E){return Object.prototype.hasOwnProperty.call(o,E)},i.p="",i(i.s=60)}([function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.cornerstone,E=window.cornerstoneMath,C=window.Hammer;i.default={set cornerstone(A){o=A},get cornerstone(){return o},set cornerstoneMath(A){E=A},get cornerstoneMath(){return E},set Hammer(A){C=A},get Hammer(){return C}}},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o={IMAGE_RENDERED:"cornerstoneimagerendered",NEW_IMAGE:"cornerstonenewimage",IMAGE_CACHE_PROMISE_REMOVED:"cornerstoneimagecachepromiseremoved",ELEMENT_DISABLED:"cornerstoneelementdisabled",MOUSE_DOWN:"cornerstonetoolsmousedown",MOUSE_UP:"cornerstonetoolsmouseup",MOUSE_DOWN_ACTIVATE:"cornerstonetoolsmousedownactivate",MOUSE_DRAG:"cornerstonetoolsmousedrag",MOUSE_MOVE:"cornerstonetoolsmousemove",MOUSE_CLICK:"cornerstonetoolsmouseclick",MOUSE_DOUBLE_CLICK:"cornerstonetoolsmousedoubleclick",MOUSE_WHEEL:"cornerstonetoolsmousewheel",TOUCH_START:"cornerstonetoolstouchstart",TOUCH_START_ACTIVE:"cornerstonetoolstouchstartactive",TOUCH_END:"cornerstonetoolstouchend",TOUCH_DRAG:"cornerstonetoolstouchdrag",TOUCH_DRAG_END:"cornerstonetoolstouchdragend",TOUCH_PINCH:"cornerstonetoolstouchpinch",TOUCH_ROTATE:"cornerstonetoolstouchrotate",TOUCH_PRESS:"cornerstonetoolstouchpress",TAP:"cornerstonetoolstap",DOUBLE_TAP:"cornerstonetoolsdoubletap",MULTI_TOUCH_START:"cornerstonetoolsmultitouchstart",MULTI_TOUCH_START_ACTIVE:"cornerstonetoolsmultitouchstartactive",MULTI_TOUCH_DRAG:"cornerstonetoolsmultitouchdrag",KEY_DOWN:"cornerstonetoolskeydown",KEY_UP:"cornerstonetoolskeyup",KEY_PRESS:"cornerstonetoolskeypress",MEASUREMENT_ADDED:"cornerstonetoolsmeasurementadded",MEASUREMENT_MODIFIED:"cornerstonetoolsmeasurementmodified",MEASUREMENT_REMOVED:"cornerstonemeasurementremoved",TOOL_DEACTIVATED:"cornerstonetoolstooldeactivated",CLIP_STOPPED:"cornerstonetoolsclipstopped",STACK_SCROLL:"cornerstonestackscroll",LINE_SAMPLE_UPDATED:"cornerstonelinesampleupdated"};i.default=o},function(BA,i,t){"use strict";function o(w){return w&&w.__esModule?w:{default:w}}function E(w){var u=a.default.cornerstone.getEnabledElement(w);return u.toolStateManager===void 0&&(u.toolStateManager=r.globalImageIdSpecificToolStateManager),u.toolStateManager}function C(w,u,N){E(w).add(w,u,N);var G=e.default.MEASUREMENT_ADDED,l={toolType:u,element:w,measurementData:N};(0,c.default)(w,G,l)}function A(w,u){return E(w).get(w,u)}function I(w,u,N){for(var G=E(w),l=G.get(w,u),R=-1,F=0;F2&&arguments[2]!==void 0?arguments[2]:null,I=void 0;return typeof window.CustomEvent=="function"?I=new CustomEvent(C,{detail:A,cancelable:!0}):(I=document.createEvent("CustomEvent"),I.initCustomEvent(C,!0,!0,A)),E.dispatchEvent(I)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=o},function(BA,i,t){"use strict";function o(r){s=r}function E(){return s}function C(r){Q=r}function A(){return Q}function I(r){e=r}function g(){return e}function B(r){return r?e:Q}Object.defineProperty(i,"__esModule",{value:!0});var Q="white",e="greenyellow",s="transparent",a={setFillColor:o,getFillColor:E,setToolColor:C,getToolColor:A,setActiveColor:I,getActiveColor:g,getColorIfActive:B};i.default=a},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A,I,g,B,Q){Object.prototype.toString.call(A)!=="[object Array]"&&(A=[A]);var e=E.default.getFont(),s=E.default.getFontSize(),a=E.default.getBackgroundColor();C.save(),C.font=e,C.textBaseline="top",C.strokeStyle=B;var r=0;A.forEach(function(c){var w=C.measureText(c).width;r=Math.max(r,w)}),C.fillStyle=a;var h={width:r+10,height:5+A.length*(s+5)};return Q&&Q.centering&&Q.centering.x===!0&&(I-=h.width/2),Q&&Q.centering&&Q.centering.y===!0&&(g-=h.height/2),h.left=I,h.top=g,Q&&Q.debug===!0&&(C.fillStyle="#FF0000"),C.fillRect(h.left,h.top,h.width,h.height),A.forEach(function(c,w){C.fillStyle=B,C.fillText(c,I+5,g+5+w*(s+5))}),C.restore(),h};var o=t(13),E=function(C){return C&&C.__esModule?C:{default:C}}(o)},function(BA,i,t){"use strict";function o(Q){I=Q}function E(){return I}function C(Q){g=Q}function A(){return g}Object.defineProperty(i,"__esModule",{value:!0});var I=1,g=2,B={setToolWidth:o,getToolWidth:E,setActiveWidth:C,getActiveWidth:A};i.default=B},function(BA,i,t){"use strict";function o(L){return L&&L.__esModule?L:{default:L}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(L){function k(eA){var iA=eA.detail,$=iA.element,aA=(0,M.getToolOptions)(p,$);(0,F.default)(iA.which,aA.mouseButtonMask)&&(L.addNewMeasurement?L.addNewMeasurement(iA):x(iA),eA.preventDefault(),eA.stopPropagation())}function H(eA){var iA=eA.detail;B.default.setCoords(iA);var $=(0,D.getToolState)(iA.element,p);if($){for(var aA=!1,cA=0;cA<$.data.length;cA++){var CA=iA.currentPoints.canvas,tA=$.data[cA];(0,a.default)(iA.element,tA.handles,CA)===!0&&(aA=!0),(L.pointNearTool(iA.element,tA,CA)&&!tA.active||!L.pointNearTool(iA.element,tA,CA)&&tA.active)&&(tA.active=!tA.active,aA=!0)}aA===!0&&I.default.cornerstone.updateImage(iA.element)}}function m(eA){function iA(){aA.invalidated=!0,(0,l.default)($,aA.handles)&&(0,D.removeToolState)(cA,p,aA),I.default.cornerstone.updateImage(cA),cA.addEventListener(C.default.MOUSE_MOVE,J)}var $=eA.detail,aA=void 0,cA=$.element,CA=(0,M.getToolOptions)(p,cA);if((0,F.default)($.which,CA.mouseButtonMask)){var tA=$.startPoints.canvas,lA=(0,D.getToolState)(eA.currentTarget,p);if(lA){var yA=void 0,JA=void 0;for(JA=!(!L.options||L.options.preventHandleOutsideImage===void 0)&&L.options.preventHandleOutsideImage,yA=0;yA2&&arguments[2]!==void 0?arguments[2]:{};e.mouseButtonMask=Q,(0,C.setToolOptions)(I,B,e),B.removeEventListener(E.default.MOUSE_DOWN_ACTIVATE,A),B.addEventListener(E.default.MOUSE_DOWN_ACTIVATE,A)},disable:function(B){B.removeEventListener(E.default.MOUSE_DOWN_ACTIVATE,A)},enable:function(B){B.removeEventListener(E.default.MOUSE_DOWN_ACTIVATE,A)},deactivate:function(B){B.removeEventListener(E.default.MOUSE_DOWN_ACTIVATE,A)},getConfiguration:function(){return g},setConfiguration:function(B){g=B}}};var o=t(1),E=function(A){return A&&A.__esModule?A:{default:A}}(o),C=t(3)},function(BA,i,t){"use strict";function o(A){var I=C.default.cornerstoneMath;return A instanceof I.Vector3?A:new I.Vector3(A[0],A[1],A[2])}Object.defineProperty(i,"__esModule",{value:!0}),i.default=o;var E=t(0),C=function(A){return A&&A.__esModule?A:{default:A}}(E)},function(BA,i,t){"use strict";function o(){function I(h){return r[h]}function g(h,c){r[h]=c}function B(){return r}function Q(h){r=h}function e(h,c,w){var u=C.default.cornerstone.getEnabledElement(h);u.image&&r.hasOwnProperty(u.image.imageId)!==!1||(r[u.image.imageId]={});var N=r[u.image.imageId];N.hasOwnProperty(c)===!1&&(N[c]={data:[]}),N[c].data.push(w)}function s(h,c){var w=C.default.cornerstone.getEnabledElement(h);if(w.image&&r.hasOwnProperty(w.image.imageId)!==!1){var u=r[w.image.imageId];if(u.hasOwnProperty(c)!==!1)return u[c]}}function a(h){var c=C.default.cornerstone.getEnabledElement(h);c.image&&r.hasOwnProperty(c.image.imageId)!==!1&&delete r[c.image.imageId]}var r={};return{get:s,add:e,clear:a,saveImageIdToolState:I,restoreImageIdToolState:g,saveToolState:B,restoreToolState:Q,toolState:r}}Object.defineProperty(i,"__esModule",{value:!0}),i.globalImageIdSpecificToolStateManager=i.newImageIdSpecificToolStateManager=void 0;var E=t(0),C=function(I){return I&&I.__esModule?I:{default:I}}(E),A=o();i.newImageIdSpecificToolStateManager=o,i.globalImageIdSpecificToolStateManager=A},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A){if(C.boundingBox)return E.default.cornerstoneMath.point.insideRect(A,C.boundingBox)};var o=t(0),E=function(C){return C&&C.__esModule?C:{default:C}}(o)},function(BA,i,t){"use strict";function o(A){return parseFloat("."+A)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(A,I){var g=C.default.cornerstone,B=g.metaData.get("patientStudyModule",A.imageId),Q=g.metaData.get("generalSeriesModule",A.imageId);if(B&&Q&&Q.modality==="PT"){var e=I*A.slope+A.intercept,s=B.patientWeight;if(s){var a=g.metaData.get("petIsotopeModule",A.imageId);if(a){var r=a.radiopharmaceuticalInfo,h=r.radiopharmaceuticalStartTime,c=r.radionuclideTotalDose,w=r.radionuclideHalfLife,u=Q.seriesTime;if(h&&c&&w&&u){var N=o(u.fractionalSeconds||0)+u.seconds+60*u.minutes+60*u.hours*60,G=o(h.fractionalSeconds)+h.seconds+60*h.minutes+60*h.hours*60,l=N-G;return e*s/(c*Math.exp(-l*Math.log(2)/w))*1e3}}}}};var E=t(0),C=function(A){return A&&A.__esModule?A:{default:A}}(E)},function(BA,i,t){"use strict";function o(g){return g&&g.__esModule?g:{default:g}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(g,B,Q,e){var s=void 0;if(B)return Object.keys(B).forEach(function(a){var r=B[a];if(r.hasOwnProperty("pointNearHandle")){if(r.pointNearHandle(g,r,Q))return void(s=r)}else if(r.hasBoundingBox===!0){if((0,I.default)(r,Q))return void(s=r)}else{var h=C.default.cornerstone.pixelToCanvas(g,r),c=C.default.cornerstoneMath.point.distance(h,Q);if(c<=e)return void(s=r)}}),s};var E=t(0),C=o(E),A=t(19),I=o(A)},function(BA,i,t){"use strict";function o(){var Q=navigator.userAgent,e=Q.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[],s=void 0;return/trident/i.test(e[1])?(s=/\brv[ :]+(\d+)/g.exec(Q)||[],"IE "+(s[1]||"")):e[1]==="Chrome"&&(s=Q.match(/\b(OPR|Edge)\/(\d+)/))!==null?s.slice(1).join(" ").replace("OPR","Opera"):(e=e[2]?[e[1],e[2]]:[navigator.appName,navigator.appVersion,"-?"],(s=Q.match(/version\/(\d+)/i))!==null&&e.splice(1,1,s[1]),e.join(" "))}function E(Q){g=Q}function C(){return g||A()}function A(){var Q=o(),e=Q.split(" "),s=e[0],a=e[1],r=B[s];return r?r[a]?r[a]:r.default:B.default}function I(){return new RegExp("Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini").test(navigator.userAgent)}Object.defineProperty(i,"__esModule",{value:!0});var g=void 0,B={default:6,IE:{9:6,10:8,default:8},Firefox:{default:6},Opera:{10:8,11:6,12:6,default:6},Chrome:{default:6},Safari:{default:6}};i.getDefaultSimultaneousRequests=A,i.getMaxSimultaneousRequests=C,i.setMaxSimultaneousRequests=E,i.getBrowserInfo=o,i.isMobileDevice=I},function(BA,i,t){"use strict";function o(Q){return Q&&Q.__esModule?Q:{default:Q}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(Q,e,s,a,r,h){function c(l){var R=l.detail;a.hasMoved===!1&&(a.hasMoved=!0),a.active=!0,a.x=R.currentPoints.image.x+G.x,a.y=R.currentPoints.image.y+G.y,h&&(a.x=Math.max(a.x,0),a.x=Math.min(a.x,R.image.width),a.y=Math.max(a.y,0),a.y=Math.min(a.y,R.image.height)),u.updateImage(N);var F=C.default.MEASUREMENT_MODIFIED,D={toolType:e,element:N,measurementData:s};(0,B.default)(N,F,D)}function w(){a.active=!1,N.removeEventListener(C.default.MOUSE_DRAG,c),N.removeEventListener(C.default.MOUSE_UP,w),N.removeEventListener(C.default.MOUSE_CLICK,w),u.updateImage(N),typeof r=="function"&&r()}var u=I.default.cornerstone,N=Q.element,G={x:a.x-Q.currentPoints.image.x,y:a.y-Q.currentPoints.image.y};N.addEventListener(C.default.MOUSE_DRAG,c),N.addEventListener(C.default.MOUSE_UP,w),N.addEventListener(C.default.MOUSE_CLICK,w)};var E=t(1),C=o(E),A=t(0),I=o(A),g=t(5),B=o(g)},function(BA,i,t){"use strict";function o(Q){return Q&&Q.__esModule?Q:{default:Q}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(Q,e,s,a,r,h){function c(F){var D=F.detail;a.active=!0,a.x=D.currentPoints.image.x,a.y=D.currentPoints.image.y,h&&(a.x=Math.max(a.x,0),a.x=Math.min(a.x,D.image.width),a.y=Math.max(a.y,0),a.y=Math.min(a.y,D.image.height)),l.updateImage(R);var d=C.default.MEASUREMENT_MODIFIED,y={toolType:e,element:R,measurementData:s};(0,B.default)(R,d,y)}function w(F){R.removeEventListener(C.default.MOUSE_MOVE,w),R.removeEventListener(C.default.MOUSE_DRAG,w),R.addEventListener(C.default.MOUSE_MOVE,c),R.addEventListener(C.default.MOUSE_DRAG,c),R.addEventListener(C.default.MOUSE_CLICK,G),F.type===C.default.MOUSE_DRAG&&R.addEventListener(C.default.MOUSE_UP,G)}function u(F){F.detail.measurementData===s&&G()}function N(F){F.detail.toolType===e&&(R.removeEventListener(C.default.MOUSE_MOVE,c),R.removeEventListener(C.default.MOUSE_DRAG,c),R.removeEventListener(C.default.MOUSE_CLICK,G),R.removeEventListener(C.default.MOUSE_UP,G),R.removeEventListener(C.default.MEASUREMENT_REMOVED,u),R.removeEventListener(C.default.TOOL_DEACTIVATED,N),a.active=!1,l.updateImage(R))}function G(){R.removeEventListener(C.default.MOUSE_MOVE,c),R.removeEventListener(C.default.MOUSE_DRAG,c),R.removeEventListener(C.default.MOUSE_CLICK,G),R.removeEventListener(C.default.MOUSE_UP,G),R.removeEventListener(C.default.MEASUREMENT_REMOVED,u),R.removeEventListener(C.default.TOOL_DEACTIVATED,N),a.active=!1,l.updateImage(R),typeof r=="function"&&r()}var l=I.default.cornerstone,R=Q.element;R.addEventListener(C.default.MOUSE_DRAG,w),R.addEventListener(C.default.MOUSE_MOVE,w),R.addEventListener(C.default.MEASUREMENT_REMOVED,u),R.addEventListener(C.default.TOOL_DEACTIVATED,N)};var E=t(1),C=o(E),A=t(0),I=o(A),g=t(5),B=o(g)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C){return{activate:function(A){A.removeEventListener(E.default.MOUSE_WHEEL,C),A.addEventListener(E.default.MOUSE_WHEEL,C)},disable:function(A){A.removeEventListener(E.default.MOUSE_WHEEL,C)},enable:function(A){A.removeEventListener(E.default.MOUSE_WHEEL,C)},deactivate:function(A){A.removeEventListener(E.default.MOUSE_WHEEL,C)}}};var o=t(1),E=function(C){return C&&C.__esModule?C:{default:C}}(o)},function(BA,i,t){"use strict";function o(g){return g&&g.__esModule?g:{default:g}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(g){var B={};return{disable:function(Q){Q.removeEventListener(C.default.IMAGE_RENDERED,g)},enable:function(Q){Q.removeEventListener(C.default.IMAGE_RENDERED,g),Q.addEventListener(C.default.IMAGE_RENDERED,g),I.default.cornerstone.updateImage(Q)},getConfiguration:function(){return B},setConfiguration:function(Q){B=Q}}};var E=t(1),C=o(E),A=t(0),I=o(A)},function(BA,i,t){"use strict";function o(Q){return Q&&Q.__esModule?Q:{default:Q}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(Q,e,s,a,r,h){function c(D){var d=D.detail;a.x=d.currentPoints.image.x+F.x,a.y=d.currentPoints.image.y+F.y,h&&(a.x=Math.max(a.x,0),a.x=Math.min(a.x,d.image.width),a.y=Math.max(a.y,0),a.y=Math.min(a.y,d.image.height)),G.updateImage(l);var y=C.default.MEASUREMENT_MODIFIED,M={toolType:e,element:l,measurementData:s};(0,B.default)(l,y,M)}function w(D){var d=D.detail;if(l.removeEventListener(C.default.TOUCH_DRAG,c),l.removeEventListener(C.default.TOUCH_PINCH,w),l.removeEventListener(C.default.TOUCH_END,w),l.removeEventListener(C.default.TAP,w),l.removeEventListener(C.default.TOUCH_START,u),l.removeEventListener(C.default.TOOL_DEACTIVATED,N),D.type===C.default.TOUCH_PINCH||D.type===C.default.TOUCH_PRESS)return a.active=!1,G.updateImage(l),void r();a.active=!1,s.active=!1,a.x=d.currentPoints.image.x+F.x,a.y=d.currentPoints.image.y+F.y,h&&(a.x=Math.max(a.x,0),a.x=Math.min(a.x,d.image.width),a.y=Math.max(a.y,0),a.y=Math.min(a.y,d.image.height)),G.updateImage(l),typeof r=="function"&&r()}function u(D){return D.stopImmediatePropagation(),!1}function N(){l.removeEventListener(C.default.TOUCH_DRAG,c),l.removeEventListener(C.default.TOUCH_PINCH,w),l.removeEventListener(C.default.TOUCH_END,w),l.removeEventListener(C.default.TAP,w),l.removeEventListener(C.default.TOUCH_START,u),l.removeEventListener(C.default.TOOL_DEACTIVATED,N),a.active=!1,s.active=!1,a.x=Q.currentPoints.image.x+F.x,a.y=Q.currentPoints.image.y+F.y,h&&(a.x=Math.max(a.x,0),a.x=Math.min(a.x,Q.image.width),a.y=Math.max(a.y,0),a.y=Math.min(a.y,Q.image.height)),G.updateImage(l)}var G=I.default.cornerstone,l=Q.element,R=G.pageToPixel(l,Q.currentPoints.page.x,Q.currentPoints.page.y+50),F={x:a.x-R.x,y:a.y-R.y};a.active=!0,s.active=!0,l.addEventListener(C.default.TOUCH_DRAG,c),l.addEventListener(C.default.TOUCH_PINCH,w),l.addEventListener(C.default.TOUCH_END,w),l.addEventListener(C.default.TAP,w),l.addEventListener(C.default.TOUCH_START,u),l.addEventListener(C.default.TOOL_DEACTIVATED,N)};var E=t(1),C=o(E),A=t(0),I=o(A),g=t(5),B=o(g)},function(BA,i,t){"use strict";function o(a){return a&&a.__esModule?a:{default:a}}function E(a,r){var h=(0,s.default)(r.rowCosines),c=(0,s.default)(r.columnCosines),w=(0,s.default)(r.imagePositionPatient),u=a.clone().sub(w);return{x:h.dot(u)/r.columnPixelSpacing,y:c.dot(u)/r.rowPixelSpacing}}function C(a,r){var h=(0,s.default)(r.rowCosines),c=(0,s.default)(r.columnCosines),w=(0,s.default)(r.imagePositionPatient),u=h.clone().multiplyScalar(a.x);u.multiplyScalar(r.columnPixelSpacing);var N=c.clone().multiplyScalar(a.y);N.multiplyScalar(r.rowPixelSpacing);var G=u.add(N);return G.add(w),G}function A(a){var r=C({x:0,y:0},a),h=C({x:a.columns,y:0},a),c=C({x:0,y:a.rows},a),w=C({x:a.columns,y:a.rows},a);return{top:new Q.default.cornerstoneMath.Line3(r,h),left:new Q.default.cornerstoneMath.Line3(r,c),right:new Q.default.cornerstoneMath.Line3(h,w),bottom:new Q.default.cornerstoneMath.Line3(c,w)}}function I(a,r){var h=[];return Object.keys(r).forEach(function(c){var w=r[c],u=a.intersectLine(w);u&&h.push(u)}),h}function g(a,r){var h=(0,s.default)(a.rowCosines),c=(0,s.default)(a.columnCosines),w=(0,s.default)(a.imagePositionPatient),u=(0,s.default)(r.rowCosines),N=(0,s.default)(r.columnCosines),G=(0,s.default)(r.imagePositionPatient),l=h.clone().cross(c),R=new Q.default.cornerstoneMath.Plane;R.setFromNormalAndCoplanarPoint(l,w);var F=u.clone().cross(N),D=new Q.default.cornerstoneMath.Plane;D.setFromNormalAndCoplanarPoint(F,G);var d=D.clone().intersectPlane(R),y=d.origin,M=d.direction,L=C({x:r.columns,y:r.rows},r),k=G.distanceTo(L),H=new Q.default.cornerstoneMath.Line3;H.start=y,H.end=y.clone().add(M.multiplyScalar(k));var m=A(r),x=I(H,m);if(x.length===2)return{start:x[0],end:x[1]}}Object.defineProperty(i,"__esModule",{value:!0}),i.projectPatientPointToImagePlane=E,i.imagePointToPatientPoint=C,i.planePlaneIntersection=g;var B=t(0),Q=o(B),e=t(17),s=o(e)},function(BA,i,t){"use strict";function o(u,N,G,l,R,F,D){if(!a.hasOwnProperty(G))throw new Error("Request type must be one of interaction, thumbnail, or prefetch");if(u&&N){var d={type:G,imageId:N,preventCache:l,doneCallback:R,failCallback:F},y=e.default.cornerstone.imageCache.getImageLoadObject(N);if(y)return void y.promise.then(function(M){R(M)},function(M){F(M)});D?a[G].unshift(d):a[G].push(d)}}function E(u){if(!a.hasOwnProperty(u))throw new Error("Request type must be one of interaction, thumbnail, or prefetch");a[u]=[]}function C(){c&&setTimeout(function(){I()},w)}function A(u){var N=e.default.cornerstone,G=u.type;r[G]++,c=!0;var l=u.imageId,R=u.doneCallback,F=u.failCallback,D=N.imageCache.getImageLoadObject(l);if(D)return void D.promise.then(function(M){r[G]--,R(M),C()},function(M){r[G]--,F(M),C()});var d=function(M){return M.type==="prefetch"?-5:M.type==="interactive"?0:M.type==="thumbnail"?5:void 0}(u),y=void 0;y=u.preventCache===!0?N.loadImage(l,{priority:d,type:u.type}):N.loadAndCacheImage(l,{priority:d,type:u.type}),y.then(function(M){r[G]--,R(M),C()},function(M){r[G]--,F(M),C()})}function I(){var u=(0,s.getMaxSimultaneousRequests)();h={interaction:Math.max(u,1),thumbnail:Math.max(u-2,1),prefetch:Math.max(u-1,1)};for(var N=r.interaction+r.thumbnail+r.prefetch,G=u-N,l=0;l0&&o(I,I.pending[0],B));var Q=function e(s){I.imageIds.indexOf(s.detail.image.imageId)===g.index&&(I.pending.splice(I.pending.indexOf(g),1),B.removeEventListener("cornerstonenewimage",e),I.pending.length>0&&o(I,I.pending[0],B))};B.addEventListener("cornerstonenewimage",Q),(0,C.default)(B,g.index)}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(I,g){var B=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Q=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],e=(0,A.getToolState)(I,"stack");if(e&&e.data&&e.data.length){var s=e.data[0];s.pending||(s.pending=[]);var a=s.currentImageIdIndex+g;if(B?a%=s.imageIds.length:(a=Math.min(s.imageIds.length-1,a),a=Math.max(0,a)),Q)(0,C.default)(I,a);else{var r={index:a};s.pending.push(r),o(s,r,I)}}};var E=t(44),C=function(I){return I&&I.__esModule?I:{default:I}}(E),A=t(2)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(o,E){var C=Math.pow(10,E);return Math.round(o*C)/C}},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(o,E){var C=o.width/2,A=o.height/2;if(C<=0||A<=0)return!1;var I={x:o.left+C,y:o.top+A},g={x:E.x-I.x,y:E.y-I.y};return g.x*g.x/(C*C)+g.y*g.y/(A*A)<=1}},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(o){return o.stopPropagation&&o.stopPropagation(),o.preventDefault&&o.preventDefault(),o.cancelBubble=!0,o.returnValue=!1,!1}},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A,I,g,B){if(!C)throw new Error("getRGBPixels: parameter element must not be undefined");A=Math.round(A),I=Math.round(I);var Q=E.default.cornerstone.getEnabledElement(C),e=[],s=0,a=Q.image.getPixelData(),r=void 0,h=void 0,c=void 0;if(Q.image.color)for(h=0;h=r.stacks.length&&(w=0),w<0&&(w=r.stacks.length-1)):(w=Math.min(r.stacks.length-1,w),w=Math.max(0,w)),w!==r.currentStackIndex){var u=a.getViewport(B),N=r.stacks[w],G=g.default.getStartLoadHandler(),l=g.default.getEndLoadHandler(),R=g.default.getErrorLoadingHandler();G&&G(B);var F=void 0;F=N.preventCache===!0?a.loadImage(N.imageIds[c]):a.loadAndCacheImage(N.imageIds[c]),F.then(function(D){r.currentImageIdIndex!==c&&(N.currentImageIdIndex=c,r.currentStackIndex=w,a.displayImage(B,D,u),l&&l(B,D))},function(D){var d=N.imageIds[c];R&&R(B,d,D)})}}};var E=t(0),C=o(E),A=t(2),I=t(12),g=o(I)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A){var I={},g=[E.default.MULTI_TOUCH_DRAG];return A&&A.fireOnTouchStart===!0&&g.push(E.default.MULTI_TOUCH_START),{activate:function(B){g.forEach(function(Q){B.removeEventListener(Q,C),B.addEventListener(Q,C)}),A&&A.activateCallback&&A.activateCallback(B)},disable:function(B){g.forEach(function(Q){B.removeEventListener(Q,C)}),A&&A.disableCallback&&A.disableCallback(B)},enable:function(B){g.forEach(function(Q){B.removeEventListener(Q,C)}),A&&A.enableCallback&&A.enableCallback(B)},deactivate:function(B){g.forEach(function(Q){B.removeEventListener(Q,C)}),A&&A.deactivateCallback&&A.deactivateCallback(B)},getConfiguration:function(){return I},setConfiguration:function(B){I=B}}};var o=t(1),E=function(C){return C&&C.__esModule?C:{default:C}}(o)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(E,C){var A=(0,o.planePlaneIntersection)(E,C);if(A)return{start:(0,o.projectPatientPointToImagePlane)(A.start,E),end:(0,o.projectPatientPointToImagePlane)(A.end,E)}};var o=t(28)},function(BA,i,t){"use strict";function o(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(r,h,c,w){var u=C.default.cornerstone,N=u.getEnabledElement(c).image,G=u.getEnabledElement(w).image;if(N&&G){var l=u.metaData.get("imagePlaneModule",N.imageId),R=u.metaData.get("imagePlaneModule",G.imageId);if(l&&R&&l.rowCosines&&l.columnCosines&&l.imagePositionPatient&&R.rowCosines&&R.columnCosines&&R.imagePositionPatient&&l.frameOfReferenceUID===R.frameOfReferenceUID){l.rowCosines=(0,a.default)(l.rowCosines),l.columnCosines=(0,a.default)(l.columnCosines),l.imagePositionPatient=(0,a.default)(l.imagePositionPatient),R.rowCosines=(0,a.default)(R.rowCosines),R.columnCosines=(0,a.default)(R.columnCosines),R.imagePositionPatient=(0,a.default)(R.imagePositionPatient);var F=l.rowCosines.clone().cross(l.columnCosines),D=R.rowCosines.clone().cross(R.columnCosines),d=F.angleTo(D);if(!((d=Math.abs(d))<.5)){var y=(0,I.default)(l,R);if(y){var M=u.pixelToCanvas(h.element,y.start),L=u.pixelToCanvas(h.element,y.end),k=B.default.getActiveColor(),H=e.default.getToolWidth();r.setTransform(1,0,0,1,0,0),r.save(),r.beginPath(),r.strokeStyle=k,r.lineWidth=H,r.moveTo(M.x,M.y),r.lineTo(L.x,L.y),r.stroke(),r.restore()}}}}};var E=t(0),C=o(E),A=t(41),I=o(A),g=t(6),B=o(g),Q=t(8),e=o(Q),s=t(17),a=o(s)},function(BA,i,t){"use strict";function o(B){return B&&B.__esModule?B:{default:B}}Object.defineProperty(i,"__esModule",{value:!0});var E=t(63),C=o(E),A=t(64),I=o(A),g={getOrientationString:C.default,invertOrientationString:I.default};i.default=g},function(BA,i,t){"use strict";function o(h){return h&&h.__esModule?h:{default:h}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(h,c){function w(m){if(F.currentImageIdIndex===c){try{G.getEnabledElement(h)}catch(x){return}l?(l.currentImageIdIndex=c,l.render(h,N.data)):G.displayImage(h,m),d&&d(h,m)}}function u(m){var x=F.imageIds[c];y&&y(h,x,m)}var N=(0,g.getToolState)(h,"stack");if(N&&N.data&&N.data.length){var G=I.default.cornerstone,l=void 0;if(N.data.length>1){var R=(0,g.getToolState)(h,"stackRenderer");R&&R.data&&R.data.length&&(l=R.data[0])}var F=N.data[0];c<0&&(c+=F.imageIds.length);var D=s.default.getStartLoadHandler(),d=s.default.getEndLoadHandler(),y=s.default.getErrorLoadingHandler();if(c!==F.currentImageIdIndex){D&&D(h);var M={newImageIdIndex:c,direction:c-F.currentImageIdIndex};F.currentImageIdIndex=c;var L=F.imageIds[c],k=Boolean(F.preventCache),H=void 0;H=k?G.loadImage(L):G.loadAndCacheImage(L),H.then(w,u),Q.default.startGrabbing(),(0,r.default)(h,C.default.STACK_SCROLL,M)}}};var E=t(1),C=o(E),A=t(0),I=o(A),g=t(2),B=t(29),Q=o(B),e=t(12),s=o(e),a=t(5),r=o(a)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A,I,g,B){if(!C)throw new Error("getLuminance: parameter element must not be undefined");A=Math.round(A),I=Math.round(I);var Q=E.default.cornerstone.getEnabledElement(C),e=Q.image,s=[],a=0,r=e.getPixelData(),h=void 0,c=void 0,w=void 0;if(e.color)for(c=0;cw.y?r.y-=l:r.y3&&arguments[3]!==void 0?arguments[3]:0,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,B=Math.round(I),Q=Math.round(g);if(E===1)return[[B,Q]];for(var e=[],s=0,a=-E;a<=E;a++){var r=Q+a;if(!(r>C||r<0))for(var h=-E;h<=E;h++){var c=B+h;c>A||c<0||h*h+a*a1e-4&&r.x>r.y&&r.x>r.z)Q+=e,r.x=0;else if(r.y>1e-4&&r.y>r.x&&r.y>r.z)Q+=s,r.y=0;else{if(!(r.z>1e-4&&r.z>r.x&&r.z>r.y))break;Q+=a,r.z=0}return Q};var E=t(0),C=o(E),A=t(17),I=o(A)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(o){var E=o.replace("H","f");return E=E.replace("F","h"),E=E.replace("R","l"),E=E.replace("L","r"),E=E.replace("A","p"),E=E.replace("P","a"),E=E.toUpperCase()}},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A,I){return E.default.cornerstone.setToPixelCoordinateSystem(C,A,.1),{fontSize:I/C.viewport.scale/.1,lineHeight:I/C.viewport.scale/.1,fontScale:.1}};var o=t(0),E=function(C){return C&&C.__esModule?C:{default:C}}(o)},function(BA,i,t){"use strict";function o(D){return D&&D.__esModule?D:{default:D}}function E(D){var d=g.default.cornerstone,y=[];D.timeSeries.stacks.forEach(function(M){var L=void 0;L=M.preventCache===!0?d.loadImage(M.imageIds[D.imageIdIndex]):d.loadAndCacheImage(M.imageIds[D.imageIdIndex]),L.then(function(k){var H=Math.round(D.handles.end.x)+Math.round(D.handles.end.y)*k.width,m=k.getPixelData()[H];y.push(m)})}),D.lineSample.set(y)}function C(D){var d=(0,a.getToolState)(D.element,"timeSeries");if(d!==void 0&&d.data!==void 0&&d.data.length!==0){var y=d.data[0],M={timeSeries:y,lineSample:new w.default,imageIdIndex:y.stacks[y.currentStackIndex].currentImageIdIndex,visible:!0,handles:{end:{x:D.currentPoints.image.x,y:D.currentPoints.image.y,highlight:!0,active:!0}}};return E(M),h.default.add(M),M}}function A(D){var d=g.default.cornerstone,y=D.detail,M=(0,a.getToolState)(D.currentTarget,R);if(M){var L=y.canvasContext;L.setTransform(1,0,0,1,0,0);for(var k=N.default.getFont(),H=0;H0?(0,I.default)(Q,1,!0):(0,I.default)(Q,-1,!0)},1e3/Math.abs(r.framesPerSecond)))}}function E(Q){var e=(0,C.getToolState)(Q,g);if(e&&e.data&&e.data.length){var s=e.data[0];clearInterval(s.intervalId),s.intervalId=void 0}}Object.defineProperty(i,"__esModule",{value:!0});var C=t(2),A=t(39),I=function(Q){return Q&&Q.__esModule?Q:{default:Q}}(A),g="timeSeriesPlayer",B={start:o,stop:E};i.default=B},function(BA,i,t){"use strict";function o(M){return M&&M.__esModule?M:{default:M}}function E(M){var L=M.detail,k=L.element;k.removeEventListener(Q.default.MOUSE_DRAG,A),k.removeEventListener(Q.default.MOUSE_UP,E),k.removeEventListener(Q.default.MOUSE_CLICK,E)}function C(M){var L=M.detail,k=L.element,H=(0,R.getToolOptions)(F,k);if((0,G.default)(L.which,H.mouseButtonMask))return H.deltaY=0,(0,R.setToolOptions)(F,k,H),k.addEventListener(Q.default.MOUSE_DRAG,A),k.addEventListener(Q.default.MOUSE_UP,E),k.addEventListener(Q.default.MOUSE_CLICK,E),M.stopImmediatePropagation(),!1}function A(M){var L=M.detail,k=L.element;M.data.deltaY+=L.deltaPoints.page.y;var H=(0,l.getToolState)(L.element,"timeSeries");if(H!==void 0&&H.data!==void 0&&H.data.length!==0){var m=H.data[0],x=k.offsetHeight/m.stacks.length;if(M.data.options!==void 0&&M.data.options.timeSeriesScrollSpeed!==void 0&&(x=M.data.options.timeSeriesScrollSpeed),M.data.deltaY>=x||M.data.deltaY<=-x){var P=Math.round(M.data.deltaY/x),q=M.data.deltaY%x;(0,u.default)(L.element,P),M.data.deltaY=q}return!1}}function I(M){var L=M.detail,k=-L.direction;(0,u.default)(L.element,k)}function g(M){var L=M.originalEvent.detail,k={deltaY:0};k.deltaY+=L.deltaPoints.page.y;var H=(0,l.getToolState)(L.element,"stack");if(H!==void 0&&H.data!==void 0&&H.data.length!==0){if(k.deltaY>=3||k.deltaY<=-3){var m=k.deltaY/3,x=k.deltaY%3;(0,u.default)(k.element,m),k.deltaY=x}return!1}}Object.defineProperty(i,"__esModule",{value:!0}),i.timeSeriesScrollTouchDrag=i.timeSeriesScrollWheel=i.timeSeriesScroll=void 0;var B=t(1),Q=o(B),e=t(16),s=o(e),a=t(15),r=o(a),h=t(25),c=o(h),w=t(39),u=o(w),N=t(4),G=o(N),l=t(2),R=t(3),F="timeSeriesScroll",D=(0,s.default)(C,F),d=(0,c.default)(I),y=(0,r.default)(g);i.timeSeriesScroll=D,i.timeSeriesScrollWheel=d,i.timeSeriesScrollTouchDrag=y},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A,I){if(I!==A){var g=E.default.cornerstone,B=g.getViewport(A),Q=g.getViewport(I);Q.voi.windowWidth===B.voi.windowWidth&&Q.voi.windowCenter===B.voi.windowCenter&&Q.invert===B.invert||(Q.voi.windowWidth=B.voi.windowWidth,Q.voi.windowCenter=B.voi.windowCenter,Q.invert=B.invert,C.setViewport(I,Q))}};var o=t(0),E=function(C){return C&&C.__esModule?C:{default:C}}(o)},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(C,A,I){I!==A&&E.default.cornerstone.updateImage(I)};var o=t(0),E=function(C){return C&&C.__esModule?C:{default:C}}(o)},function(BA,i,t){"use strict";function o(a){return a&&a.__esModule?a:{default:a}}function E(a){return a.filter(function(r,h,c){return c.indexOf(r)===h})}function C(a,r){function h(d,y){G.length&&l.length&&(R=!0,l.forEach(function(M){var L=l.indexOf(M);if(L!==-1){var k=F.imageIds.targetElements[L],H=G.indexOf(d);if(H!==-1){var m=F.imageIds.sourceElements[H],x=void 0;m===k?x=0:F.distances[m]!==void 0&&(x=F.distances[m][k]),D(N,d,M,y,x)}}}),R=!1)}function c(d){var y=d.detail;R!==!0&&h(d.currentTarget,y)}function w(d){var y=d.detail.element;N.remove(y),(0,s.clearToolOptionsByElement)(y)}var u=B.default.cornerstone,N=this,G=[],l=[],R=!1,F={},D=r;this.setHandler=function(d){D=d},this.getHandler=function(){return D},this.getDistances=function(){G.length&&l.length&&(F.distances={},F.imageIds={sourceElements:[],targetElements:[]},G.forEach(function(d){var y=u.getEnabledElement(d);if(y&&y.image){var M=y.image.imageId,L=u.metaData.get("imagePlaneModule",M);if(L&&L.imagePositionPatient){var k=(0,e.default)(L.imagePositionPatient);F.hasOwnProperty(y)||(F.distances[M]={},F.imageIds.sourceElements.push(M),l.forEach(function(H){var m=u.getEnabledElement(H);if(m&&m.image){var x=m.image.imageId;if(F.imageIds.targetElements.push(x),d!==H&&M!==x&&!F.distances[M].hasOwnProperty(x)){var P=u.metaData.get("imagePlaneModule",x);if(P&&P.imagePositionPatient){var q=(0,e.default)(P.imagePositionPatient);F.distances[M][x]=q.clone().sub(k)}}}}),Object.keys(F.distances[M]).length||delete F.distances[M])}}}))},this.addSource=function(d){G.indexOf(d)===-1&&(G.push(d),a.split(" ").forEach(function(y){d.addEventListener(y,c)}),N.getDistances(),N.updateDisableHandlers())},this.addTarget=function(d){l.indexOf(d)===-1&&(l.push(d),N.getDistances(),D(N,d,d,0),N.updateDisableHandlers())},this.add=function(d){N.addSource(d),N.addTarget(d)},this.removeSource=function(d){var y=G.indexOf(d);y!==-1&&(G.splice(y,1),a.split(" ").forEach(function(M){d.removeEventListener(M,c)}),N.getDistances(),h(d),N.updateDisableHandlers())},this.removeTarget=function(d){var y=l.indexOf(d);y!==-1&&(l.splice(y,1),N.getDistances(),D(N,d,d,0),N.updateDisableHandlers())},this.remove=function(d){N.removeTarget(d),N.removeSource(d)},this.getSourceElements=function(){return G},this.getTargetElements=function(){return l},this.displayImage=function(d,y,M){R=!0,u.displayImage(d,y,M),R=!1},this.setViewport=function(d,y){R=!0,u.setViewport(d,y),R=!1},this.updateDisableHandlers=function(){E(G.concat(l)).forEach(function(d){d.removeEventListener(I.default.ELEMENT_DISABLED,w),d.addEventListener(I.default.ELEMENT_DISABLED,w)})},this.destroy=function(){E(G.concat(l)).forEach(function(d){N.remove(d)})}}Object.defineProperty(i,"__esModule",{value:!0});var A=t(1),I=o(A),g=t(0),B=o(g),Q=t(17),e=o(Q),s=t(3);i.default=C},function(BA,i,t){"use strict";function o(B){return B&&B.__esModule?B:{default:B}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(B,Q,e,s){if(Q!==e&&s&&s.direction){var a=C.default.cornerstone,r=(0,A.getToolState)(e,"stack"),h=r.data[0],c=h.currentImageIdIndex+s.direction;if(c=Math.min(Math.max(c,0),h.imageIds.length-1),h.currentImageIdIndex!==c){var w=g.default.getStartLoadHandler(),u=g.default.getEndLoadHandler(),N=g.default.getErrorLoadingHandler();w&&w(e);var G=void 0;G=h.preventCache===!0?a.loadImage(h.imageIds[c]):a.loadAndCacheImage(h.imageIds[c]),G.then(function(l){var R=a.getViewport(e);h.currentImageIdIndex=c,B.displayImage(e,l,R),u&&u(e,l)},function(l){var R=h.imageIds[c];N&&N(e,R,l)})}}};var E=t(0),C=o(E),A=t(2),I=t(12),g=o(I)},function(BA,i,t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e,s,a){if(a!==s){var r=C.default.cornerstone,h=r.getEnabledElement(s).image,c=r.metaData.get("imagePlaneModule",h.imageId);if(c!==void 0&&c.imagePositionPatient!==void 0){var w=(0,Q.default)(c.imagePositionPatient),u=(0,A.getToolState)(a,"stack"),N=u.data[0],G=Number.MAX_VALUE,l=-1;if(N.imageIds.forEach(function(y,M){var L=r.metaData.get("imagePlaneModule",y);if(L!==void 0&&L.imagePositionPatient!==void 0){var k=(0,Q.default)(L.imagePositionPatient),H=k.distanceToSquared(w);H=0))return B.add(a,r,h);s.hasOwnProperty(r)===!1&&(s[r]={data:[]}),s[r].data.push(h)}function e(a,r){return g.indexOf(r)>=0?(s.hasOwnProperty(r)===!1&&(s[r]={data:[]}),s[r]):B.get(a,r)}var s={};return{get:e,add:Q}}function E(g,B){B=B||["timeSeries"];var Q=(0,A.getElementToolStateManager)(g);Q===void 0&&(Q=C.globalImageIdSpecificToolStateManager);var e=o(B,Q);I.push(e),(0,A.setElementToolStateManager)(g,e)}Object.defineProperty(i,"__esModule",{value:!0}),i.newTimeSeriesSpecificToolStateManager=i.addTimeSeriesStateManager=void 0;var C=t(18),A=t(2),I=[];i.addTimeSeriesStateManager=E,i.newTimeSeriesSpecificToolStateManager=o},function(BA,i,t){"use strict";function o(B,Q){function e(){return h}function s(c){h=c}function a(c,w,u){if(!(B.indexOf(w)>=0))return Q.add(c,w,u);h.hasOwnProperty(w)===!1&&(h[w]={data:[]}),h[w].data.push(u)}function r(c,w){return B.indexOf(w)>=0?(h.hasOwnProperty(w)===!1&&(h[w]={data:[]}),h[w]):Q.get(c,w)}var h={};return{get:r,add:a,saveToolState:e,restoreToolState:s,toolState:h}}function E(B,Q){var e=(0,A.getElementToolStateManager)(B);e||(e=C.globalImageIdSpecificToolStateManager);var s=["stack","stackPrefetch","playClip","volume","slab","referenceLines","crosshairs","stackRenderer"];Q&&(s=s.concat(Q));var a=o(s,e);I.push(a),(0,A.setElementToolStateManager)(B,a)}Object.defineProperty(i,"__esModule",{value:!0}),i.addStackStateManager=i.newStackSpecificToolStateManager=i.stackSpecificStateManager=void 0;var C=t(18),A=t(2),I=[],g={newStackSpecificToolStateManager:o,addStackStateManager:E};i.stackSpecificStateManager=g,i.newStackSpecificToolStateManager=o,i.addStackStateManager=E},function(BA,i,t){"use strict";function o(){function C(B,Q,e){g.hasOwnProperty(B)===!1&&(g[B]={});var s=g[B];s.hasOwnProperty(Q)===!1&&(s[Q]={data:[]}),s[Q].data.push(e)}function A(B,Q){if(g.hasOwnProperty(B)!==!1){var e=g[B];if(e.hasOwnProperty(Q)!==!1)return e[Q]}}function I(B,Q,e){if(g.hasOwnProperty(B)!==!1){var s=g[B];if(s.hasOwnProperty(Q)!==!1){for(var a=s[Q],r=-1,h=0;h=v){var z=Math.round(J/v);(0,R.default)(q,z,!1,S),p.deltaY=J%v}else p.deltaY=J;(0,D.setToolOptions)(d,q,p),x.preventDefault(),x.stopPropagation()}}function g(x){var P=x.detail,q=m.getConfiguration();q&&q.testPointers(P)&&I(x)}Object.defineProperty(i,"__esModule",{value:!0}),i.stackScrollMultiTouch=i.stackScrollTouchDrag=i.stackScrollWheel=i.stackScroll=void 0;var B=t(1),Q=o(B),e=t(15),s=o(e),a=t(40),r=o(a),h=t(16),c=o(h),w=t(25),u=o(w),N=t(4),G=o(N),l=t(30),R=o(l),F=t(2),D=t(3),d="stackScroll",y=(0,c.default)(C,d),M=(0,u.default)(A),L={eventData:{deltaY:0}},k=(0,s.default)(I,"stackScrollTouchDrag",L),H={testPointers:function(x){return x.numPointers>=3}},m=(0,r.default)(g,L);m.setConfiguration(H),i.stackScroll=y,i.stackScrollWheel=M,i.stackScrollTouchDrag=k,i.stackScrollMultiTouch=m},function(BA,i,t){"use strict";function o(m){return m&&m.__esModule?m:{default:m}}function E(m,x){m=Math.round(m)||0,x=Math.round(x)||0;var P=[],q=x-m+1;if(q<=0)return P;for(;q--;)P[q]=x--;return P}function C(m,x){var P=[],q=[];return m.forEach(function(K){Kx&&q.push(K)}),{low:m.indexOf(L(P)),high:m.indexOf(k(q))}}function A(m){function x(cA){var CA=S.indicesToRequest.indexOf(cA);CA>-1&&S.indicesToRequest.splice(CA,1)}function P(cA){x(U.imageIds.indexOf(cA.imageId))}function q(cA){console.log("prefetch errored: "+cA),z&&z(m,p,cA,"stackPrefetch")}var K=(0,l.getToolState)(m,"stack");if(K&&K.data&&K.data.length){var U=K.data[0],n=(0,l.getToolState)(m,F);if(n){var S=n.data[0]||{};if(S.indicesToRequest&&S.indicesToRequest.length||(S.enabled=!1),S.enabled!==!1&&(n.data[0].indicesToRequest.sort(function(cA,CA){return cA-CA}),S.indicesToRequest.slice().forEach(function(cA){var CA=U.imageIds[cA];CA&&c.default.cornerstone.imageCache.getImageLoadObject(CA)&&x(cA)}),S.indicesToRequest.length)){u.default.clearRequestStack(D);for(var v=C(S.indicesToRequest,U.currentImageIdIndex),p=void 0,J=void 0,z=G.default.getErrorLoadingHandler(),_=v.low,j=v.high;_>=0||jd.maxImagesToPrefetch,iA=S.indicesToRequest[j]-O>d.maxImagesToPrefetch,$=!eA&&_>=0,aA=!iA&&j0&&(F=y.isTimeVarying?D/y.length|0:y[0],y.push(F)),y}function C(N){var G=N.intervalId;G!==void 0&&(N.intervalId=void 0,N.usingFrameTimeVector?clearTimeout(G):clearInterval(G))}function A(N){var G={element:N};(0,w.default)(N,Q.default.CLIP_STOPPED,G)}function I(N,G){var l=void 0,R=void 0;if(N===void 0)throw new Error("playClip: element must not be undefined");var F=(0,h.getToolState)(N,"stack");if(F&&F.data&&F.data.length){var D=s.default.cornerstone,d=void 0;if(F.data.length>1){var y=(0,h.getToolState)(N,"stackRenderer");y&&y.data&&y.data.length&&(d=y.data[0])}var M=F.data[0],L=(0,h.getToolState)(N,u);L&&L.data&&L.data.length?(l=L.data[0],C(l)):(l={intervalId:void 0,framesPerSecond:30,lastFrameTimeStamp:void 0,frameRate:0,frameTimeVector:void 0,ignoreFrameTimeVector:!1,usingFrameTimeVector:!1,speed:1,reverse:!1,loop:!0},(0,h.addToolState)(N,u,l)),(G<0||G>0)&&(l.framesPerSecond=Number(G),l.reverse=l.framesPerSecond<0,l.ignoreFrameTimeVector=!0),l.ignoreFrameTimeVector!==!0&&l.frameTimeVector&&l.frameTimeVector.length===M.imageIds.length&&(R=E(l.frameTimeVector,l.speed));var k=function(){var H=void 0,m=void 0,x=void 0,P=void 0,q=M.currentImageIdIndex,K=M.imageIds.length;if(l.reverse?q--:q++,!l.loop&&(q<0||q>=K))return C(l),void A(N);q>=K&&(q=0),q<0&&(q=K-1),q!==M.currentImageIdIndex&&(m=r.default.getStartLoadHandler(),x=r.default.getEndLoadHandler(),P=r.default.getErrorLoadingHandler(),m&&m(N),H=M.preventCache===!0?D.loadImage(M.imageIds[q]):D.loadAndCacheImage(M.imageIds[q]),H.then(function(U){try{M.currentImageIdIndex=q,d?(d.currentImageIdIndex=q,d.render(N,F.data)):D.displayImage(N,U),x&&x(N,U)}catch(n){return}},function(U){var n=M.imageIds[q];P&&P(N,n,U)}))};R&&R.length>0&&R.isTimeVarying?(l.usingFrameTimeVector=!0,l.intervalId=setTimeout(function H(){l.intervalId=setTimeout(H,R[M.currentImageIdIndex]),k()},0)):(l.usingFrameTimeVector=!1,l.intervalId=setInterval(k,1e3/Math.abs(l.framesPerSecond)))}}function g(N){var G=(0,h.getToolState)(N,u);G&&G.data&&G.data.length&&C(G.data[0])}Object.defineProperty(i,"__esModule",{value:!0}),i.stopClip=i.playClip=void 0;var B=t(1),Q=o(B),e=t(0),s=o(e),a=t(12),r=o(a),h=t(2),c=t(5),w=o(c),u="playClip";i.playClip=I,i.stopClip=g},function(BA,i,t){"use strict";function o(u){return u&&u.__esModule?u:{default:u}}function E(u){var N=e.default.cornerstone,G=u.currentTarget,l=N.getEnabledElement(G);if(l.image){var R={event:window.event||u,element:G,viewport:N.getViewport(G),image:l.image,currentPoints:{page:{x:r,y:h},image:N.pageToPixel(G,r,h)},keyCode:u.keyCode,which:u.which};R.currentPoints.canvas=N.pixelToCanvas(G,R.currentPoints.image);var F={keydown:B.default.KEY_DOWN,keypress:B.default.KEY_PRESS,keyup:B.default.KEY_UP};(0,a.default)(G,F[u.type],R)}}function C(u){r=u.pageX,h=u.pageY}function A(u){c.forEach(function(N){u.removeEventListener(N,E),u.addEventListener(N,E)}),u.removeEventListener("mousemove",C),u.addEventListener("mousemove",C)}function I(u){c.forEach(function(N){u.removeEventListener(N,E)}),u.removeEventListener("mousemove",C)}Object.defineProperty(i,"__esModule",{value:!0});var g=t(1),B=o(g),Q=t(0),e=o(Q),s=t(5),a=o(s),r=void 0,h=void 0,c=["keydown","keypress","keyup"],w={enable:A,disable:I};i.default=w},function(BA,i,t){"use strict";function o(d){return d&&d.__esModule?d:{default:d}}function E(d){return typeof d.buttons!="number"?d.which:d.buttons===0?0:d.buttons%2==1?1:d.buttons%4==2?3:d.buttons%8==4?2:0}function C(){l=!1}function A(d){var y=r.default.cornerstone,M=d.currentTarget,L=y.getEnabledElement(M);if(L.image){var k=s.default.MOUSE_DOUBLE_CLICK,H={page:r.default.cornerstoneMath.point.pageToPoint(d),image:y.pageToPixel(M,d.pageX,d.pageY),client:{x:d.clientX,y:d.clientY}};H.canvas=y.pixelToCanvas(M,H.image);var m=(0,c.default)(H),x={event:d,which:d.which,viewport:y.getViewport(M),image:L.image,element:M,startPoints:H,lastPoints:m,currentPoints:H,deltaPoints:{x:0,y:0},type:k};(0,G.default)(M,k,x)}}function I(d){function y(U){var n=s.default.MOUSE_DRAG,S={page:r.default.cornerstoneMath.point.pageToPoint(U),image:L.pageToPixel(k,U.pageX,U.pageY),client:{x:U.clientX,y:U.clientY}};S.canvas=L.pixelToCanvas(k,S.image);var v={page:r.default.cornerstoneMath.point.subtract(S.page,P.page),image:r.default.cornerstoneMath.point.subtract(S.image,P.image),client:r.default.cornerstoneMath.point.subtract(S.client,P.client),canvas:r.default.cornerstoneMath.point.subtract(S.canvas,P.canvas)},p={which:K,viewport:L.getViewport(k),image:H.image,element:k,startPoints:x,lastPoints:P,currentPoints:S,deltaPoints:v,type:n,ctrlKey:U.ctrlKey,metaKey:U.metaKey,shiftKey:U.shiftKey};return(0,G.default)(p.element,n,p),P=(0,c.default)(S),(0,u.default)(U)}function M(U){clearTimeout(R);var n=s.default.MOUSE_UP;l&&(n=s.default.MOUSE_CLICK);var S={page:r.default.cornerstoneMath.point.pageToPoint(U),image:L.pageToPixel(k,U.pageX,U.pageY),client:{x:U.clientX,y:U.clientY}};S.canvas=L.pixelToCanvas(k,S.image);var v={page:r.default.cornerstoneMath.point.subtract(S.page,P.page),image:r.default.cornerstoneMath.point.subtract(S.image,P.image),client:r.default.cornerstoneMath.point.subtract(S.client,P.client),canvas:r.default.cornerstoneMath.point.subtract(S.canvas,P.canvas)},p={event:U,which:K,viewport:L.getViewport(k),image:H.image,element:k,startPoints:x,lastPoints:P,currentPoints:S,deltaPoints:v,type:n};(0,G.default)(p.element,n,p),document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",M),k.addEventListener("mousemove",g),l=!0}var L=r.default.cornerstone,k=d.currentTarget,H=L.getEnabledElement(k);if(H.image){R=setTimeout(C,F);var m=s.default.MOUSE_DOWN;k.removeEventListener("mousemove",g);var x={page:r.default.cornerstoneMath.point.pageToPoint(d),image:L.pageToPixel(k,d.pageX,d.pageY),client:{x:d.clientX,y:d.clientY}};x.canvas=L.pixelToCanvas(k,x.image);var P=(0,c.default)(x),q={event:d,which:E(d),viewport:L.getViewport(k),image:H.image,element:k,startPoints:x,lastPoints:P,currentPoints:x,deltaPoints:{x:0,y:0},type:m};(0,G.default)(q.element,m,q)&&(q.type=s.default.MOUSE_DOWN_ACTIVATE,(0,G.default)(q.element,s.default.MOUSE_DOWN_ACTIVATE,q));var K=E(d);return document.addEventListener("mousemove",y),document.addEventListener("mouseup",M),(0,u.default)(d)}}function g(d){var y=r.default.cornerstone,M=d.currentTarget,L=y.getEnabledElement(M);if(L.image){var k=s.default.MOUSE_MOVE,H={page:r.default.cornerstoneMath.point.pageToPoint(d),image:y.pageToPixel(M,d.pageX,d.pageY),client:{x:d.clientX,y:d.clientY}};H.canvas=y.pixelToCanvas(M,H.image);var m=(0,c.default)(H),x={page:r.default.cornerstoneMath.point.pageToPoint(d),image:y.pageToPixel(M,d.pageX,d.pageY),client:{x:d.clientX,y:d.clientY}};x.canvas=y.pixelToCanvas(M,x.image);var P={page:r.default.cornerstoneMath.point.subtract(x.page,m.page),image:r.default.cornerstoneMath.point.subtract(x.image,m.image),client:r.default.cornerstoneMath.point.subtract(x.client,m.client),canvas:r.default.cornerstoneMath.point.subtract(x.canvas,m.canvas)},q={viewport:y.getViewport(M),image:L.image,element:M,startPoints:H,lastPoints:m,currentPoints:x,deltaPoints:P,type:k};(0,G.default)(M,k,q),m=(0,c.default)(x)}}function B(d){d.removeEventListener("mousedown",I),d.removeEventListener("mousemove",g),d.removeEventListener("dblclick",A)}function Q(d){B(d),d.addEventListener("mousedown",I),d.addEventListener("mousemove",g),d.addEventListener("dblclick",A)}Object.defineProperty(i,"__esModule",{value:!0});var e=t(1),s=o(e),a=t(0),r=o(a),h=t(35),c=o(h),w=t(33),u=o(w),N=t(5),G=o(N),l=!0,R=void 0,F=200,D={enable:Q,disable:B};i.default=D},function(BA,i,t){"use strict";function o(h){return h&&h.__esModule?h:{default:h}}function E(h){var c=Q.default.cornerstone,w=h.currentTarget,u=c.getEnabledElement(w);if(u.image&&!(h.type==="mousewheel"&&h.wheelDeltaY===0||h.type==="DOMMouseScroll"&&h.axis===1)){h.preventDefault();var N=void 0,G=void 0;h.pageX!==void 0&&h.pageY!==void 0?(N=h.pageX,G=h.pageY):(N=h.x,G=h.y);var l=c.pageToPixel(w,N,G);h=window.event&&window.event.wheelDelta?window.event:h;var R=void 0;R=h.wheelDelta?h.wheelDelta:h.deltaY?-h.deltaY:h.detail?-h.detail:h.wheelDelta;var F=R<0?-1:1,D={element:w,viewport:c.getViewport(w),image:u.image,direction:F,pageX:N,pageY:G,imageX:l.x,imageY:l.y};(0,s.default)(w,g.default.MOUSE_WHEEL,D)}}function C(h){A(h),a.forEach(function(c){h.addEventListener(c,E)})}function A(h){a.forEach(function(c){h.removeEventListener(c,E)})}Object.defineProperty(i,"__esModule",{value:!0});var I=t(1),g=o(I),B=t(0),Q=o(B),e=t(5),s=o(e),a=["mousewheel","DOMMouseScroll"],r={enable:C,disable:A};i.default=r},function(BA,i,t){"use strict";function o(n){return n&&n.__esModule?n:{default:n}}function E(n){var S=Q.default.cornerstone,v=n.currentTarget||n.srcEvent.currentTarget,p=S.getEnabledElement(v);if(p.image){var J=void 0,z=void 0,_=void 0,j=void 0,O=void 0;switch(n.preventDefault(),(n.pointers&&n.pointers.length>1||n.touches&&n.touches.length>1)&&(m=!1,clearTimeout(y)),n.type){case"tap":m=!1,clearTimeout(y),l={page:Q.default.cornerstoneMath.point.pageToPoint(n.pointers[0]),image:S.pageToPixel(v,n.pointers[0].pageX,n.pointers[0].pageY),client:{x:n.pointers[0].clientX,y:n.pointers[0].clientY}},l.canvas=S.pixelToCanvas(v,l.image),J=g.default.TAP,D={event:n,viewport:S.getViewport(v),image:p.image,element:v,currentPoints:l,type:J,isTouchEvent:!0},(0,u.default)(v,J,D);break;case"doubletap":m=!1,clearTimeout(y),l={page:Q.default.cornerstoneMath.point.pageToPoint(n.pointers[0]),image:S.pageToPixel(v,n.pointers[0].pageX,n.pointers[0].pageY),client:{x:n.pointers[0].clientX,y:n.pointers[0].clientY}},l.canvas=S.pixelToCanvas(v,l.image),J=g.default.DOUBLE_TAP,D={event:n,viewport:S.getViewport(v),image:p.image,element:v,currentPoints:l,type:J,isTouchEvent:!0},(0,u.default)(v,J,D);break;case"pinchstart":m=!1,clearTimeout(y),L=1;break;case"pinchmove":if(m=!1,clearTimeout(y),H===!0){L=n.scale,H=!1;break}z=(n.scale-L)/L,G={page:n.center,image:S.pageToPixel(v,n.center.x,n.center.y)},G.canvas=S.pixelToCanvas(v,G.image),J=g.default.TOUCH_PINCH,D={event:n,startPoints:G,viewport:S.getViewport(v),image:p.image,element:v,direction:n.scale<1?1:-1,scaleChange:z,type:J,isTouchEvent:!0},(0,u.default)(v,J,D),L=n.scale;break;case"touchstart":L=1,clearTimeout(y),clearTimeout(d),d=setTimeout(function(){G={page:Q.default.cornerstoneMath.point.pageToPoint(n.touches[0]),image:S.pageToPixel(v,n.touches[0].pageX,n.touches[0].pageY),client:{x:n.touches[0].clientX,y:n.touches[0].clientY}},G.canvas=S.pixelToCanvas(v,G.image),J=g.default.TOUCH_START,n.touches.length>1&&(J=g.default.MULTI_TOUCH_START),D={event:n,viewport:S.getViewport(v),image:p.image,element:v,startPoints:G,currentPoints:G,type:J,isTouchEvent:!0},(0,u.default)(v,J,D)===!0&&(J=g.default.TOUCH_START_ACTIVE,n.touches.length>1&&(J=g.default.MULTI_TOUCH_START_ACTIVE),D.type=J,(0,u.default)(v,J,D)),R=(0,s.default)(G)},50),m=!0,M=0,y=setTimeout(function(){m&&(l={page:Q.default.cornerstoneMath.point.pageToPoint(n.touches[0]),image:S.pageToPixel(v,n.touches[0].pageX,n.touches[0].pageY),client:{x:n.touches[0].clientX,y:n.touches[0].clientY}},l.canvas=S.pixelToCanvas(v,G.image),J=g.default.TOUCH_PRESS,D={event:n,viewport:S.getViewport(v),image:p.image,element:v,currentPoints:l,type:J,isTouchEvent:!0},(0,u.default)(v,J,D))},P);break;case"touchend":L=1,m=!1,clearTimeout(y),setTimeout(function(){G={page:Q.default.cornerstoneMath.point.pageToPoint(n.changedTouches[0]),image:S.pageToPixel(v,n.changedTouches[0].pageX,n.changedTouches[0].pageY),client:{x:n.changedTouches[0].clientX,y:n.changedTouches[0].clientY}},G.canvas=S.pixelToCanvas(v,G.image),J=g.default.TOUCH_END,D={event:n,viewport:S.getViewport(v),image:p.image,element:v,startPoints:G,currentPoints:G,type:J,isTouchEvent:!0},(0,u.default)(v,J,D)},50);break;case"panmove":_={x:n.deltaX-x.x,y:n.deltaY-x.y},x={x:n.deltaX,y:n.deltaY},l={page:{x:R.page.x+_.x,y:R.page.y+_.y},image:S.pageToPixel(v,R.page.x+_.x,R.page.y+_.y),client:{x:R.client.x+_.x,y:R.client.y+_.y}},l.canvas=S.pixelToCanvas(v,l.image),F={page:Q.default.cornerstoneMath.point.subtract(l.page,R.page),image:Q.default.cornerstoneMath.point.subtract(l.image,R.image),client:Q.default.cornerstoneMath.point.subtract(l.client,R.client),canvas:Q.default.cornerstoneMath.point.subtract(l.canvas,R.canvas)},M+=Math.sqrt(F.page.x*F.page.x+F.page.y*F.page.y),M>q&&(m=!1,clearTimeout(y)),J=g.default.TOUCH_DRAG,n.pointers.length>1&&(J=g.default.MULTI_TOUCH_DRAG),D={viewport:S.getViewport(v),image:p.image,element:v,startPoints:G,lastPoints:R,currentPoints:l,deltaPoints:F,numPointers:n.pointers.length,type:J,isTouchEvent:!0},(0,u.default)(v,J,D),R=(0,s.default)(l);break;case"panstart":x={x:n.deltaX,y:n.deltaY},l={page:Q.default.cornerstoneMath.point.pageToPoint(n.pointers[0]),image:S.pageToPixel(v,n.pointers[0].pageX,n.pointers[0].pageY),client:{x:n.pointers[0].clientX,y:n.pointers[0].clientY}},l.canvas=S.pixelToCanvas(v,l.image),R=(0,s.default)(l);break;case"panend":return m=!1,clearTimeout(y),R?(l={page:Q.default.cornerstoneMath.point.pageToPoint(n.pointers[0]),image:S.pageToPixel(v,n.pointers[0].pageX,n.pointers[0].pageY),client:{x:n.pointers[0].clientX,y:n.pointers[0].clientY}},l.canvas=S.pixelToCanvas(v,l.image),F={page:Q.default.cornerstoneMath.point.subtract(l.page,R.page),image:Q.default.cornerstoneMath.point.subtract(l.image,R.image),client:Q.default.cornerstoneMath.point.subtract(l.client,R.client),canvas:Q.default.cornerstoneMath.point.subtract(l.canvas,R.canvas)},J=g.default.TOUCH_DRAG_END,D={event:n.srcEvent,viewport:S.getViewport(v),image:p.image,element:v,startPoints:G,lastPoints:R,currentPoints:l,deltaPoints:F,type:J,isTouchEvent:!0},(0,u.default)(v,J,D),j=n.pointers.length-n.changedPointers.length,j===2&&(H=!0),(0,r.default)(n)):!1;case"rotatemove":m=!1,clearTimeout(y),O=n.rotation-k,k=n.rotation,J=g.default.TOUCH_ROTATE,D={event:n.srcEvent,viewport:S.getViewport(v),image:p.image,element:v,rotation:O,type:J},(0,u.default)(v,J,D)}return!1}}function C(n){A(n);var S=Q.default.Hammer,v={inputClass:S.SUPPORT_POINTER_EVENTS?S.PointerEventInput:S.TouchInput},p=new S.Manager(n,v),J={pointers:0,direction:S.DIRECTION_ALL,threshold:0},z=new S.Pan(J),_=new S.Pinch({threshold:0}),j=new S.Rotate({threshold:0});_.recognizeWith(z),_.recognizeWith(j),j.recognizeWith(z);var O=new S.Tap({event:"doubletap",taps:2,interval:1500,threshold:50,posThreshold:50});O.recognizeWith(z),p.add([O,z,j,_]),p.on("tap doubletap panstart panmove panend pinchstart pinchmove rotatemove",E),c.default.enable(n),["touchstart","touchend"].forEach(function(iA){n.addEventListener(iA,E)});var eA=(0,N.getToolOptions)(K,n);eA.hammer=p,(0,N.setToolOptions)(K,n,eA)}function A(n){c.default.disable(n),["touchstart","touchend"].forEach(function(p){n.removeEventListener(p,E)});var S=(0,N.getToolOptions)(K,n),v=S.hammer;v&&v.off("tap doubletap panstart panmove panend pinchstart pinchmove rotatemove",E)}Object.defineProperty(i,"__esModule",{value:!0});var I=t(1),g=o(I),B=t(0),Q=o(B),e=t(35),s=o(e),a=t(33),r=o(a),h=t(53),c=o(h),w=t(5),u=o(w),N=t(3),G=void 0,l=void 0,R=void 0,F=void 0,D=void 0,d=void 0,y=void 0,M=void 0,L=1,k=0,H=!1,m=!1,x=void 0,P=700,q=5,K="touchInput",U={enable:C,disable:A};i.default=U},function(BA,i,t){"use strict";function o(k){return k&&k.__esModule?k:{default:k}}function E(k){return{visible:!0,active:!0,handles:{start:{x:k.currentPoints.image.x-20,y:k.currentPoints.image.y+10,highlight:!0,active:!1},end:{x:k.currentPoints.image.x,y:k.currentPoints.image.y,highlight:!0,active:!0},start2:{x:k.currentPoints.image.x-20,y:k.currentPoints.image.y+10,highlight:!0,active:!1},end2:{x:k.currentPoints.image.x,y:k.currentPoints.image.y+20,highlight:!0,active:!1}}}}function C(k,H,m){var x=g.default.cornerstone,P={start:x.pixelToCanvas(k,H.handles.start),end:x.pixelToCanvas(k,H.handles.end)},q=g.default.cornerstoneMath.lineSegment.distanceToPoint(P,m);return q<5||(P.start=x.pixelToCanvas(k,H.handles.start2),P.end=x.pixelToCanvas(k,H.handles.end2),(q=g.default.cornerstoneMath.lineSegment.distanceToPoint(P,m))<5)}function A(k){var H=k.detail,m=(0,d.getToolState)(k.currentTarget,y);if(m!==void 0){var x=H.canvasContext.canvas.getContext("2d");x.setTransform(1,0,0,1,0,0);for(var P=void 0,q=u.default.getToolWidth(),K=G.default.getFont(),U=M.getConfiguration(),n=g.default.cornerstone,S=0;S=U.image.columns||O>=U.image.rows)){if(U.image.color)eA=(0,d.default)(U.element,j,O,1,1),iA=j+", "+O,$="R: "+eA[0]+" G: "+eA[1]+" B: "+eA[2]+" A: "+eA[3];else{eA=n.getStoredPixels(U.element,j,O,1,1);var aA=eA[0],cA=aA*U.image.slope+U.image.intercept,CA=(0,M.default)(U.image,aA);iA=j+", "+O,$="SP: "+aA+" MO: "+parseFloat(cA.toFixed(3)),CA&&($+=" SUV: "+parseFloat(CA.toFixed(3)))}var tA={x:U.currentPoints.image.x+3,y:U.currentPoints.image.y-3},lA=n.pixelToCanvas(U.element,tA);v.font=J,v.fillStyle=p,(0,F.default)(v,$,lA.x,lA.y+z+5,p),(0,F.default)(v,iA,lA.x,lA.y,p),v.restore()}}function C(U){var n=a.default.cornerstone,S=U.element,v=n.getEnabledElement(S),p=v.image,J=v.canvas.getContext("2d");J.setTransform(1,0,0,1,0,0);var z=l.default.getActiveColor(),_=N.default.getFont(),j=P.getConfiguration();J.save(),j&&j.shadow&&(J.shadowColor=j.shadowColor||"#000000",J.shadowOffsetX=j.shadowOffsetX||1,J.shadowOffsetY=j.shadowOffsetY||1);var O=n.metaData.get("generalSeriesModule",p.imageId),eA=void 0;O&&(eA=O.modality);var iA=void 0;iA=U.isTouchEvent===!0?n.pageToPixel(S,U.currentPoints.page.x,U.currentPoints.page.y-4*N.default.getFontSize()):n.pageToPixel(S,U.currentPoints.page.x,U.currentPoints.page.y-N.default.getFontSize()/2);var $=void 0,aA="";if(!(iA.x<0||iA.y<0||iA.x>=p.columns||iA.y>=p.rows)){if(p.color)$=(0,d.default)(S,iA.x,iA.y,1,1),aA="R: "+$[0]+" G: "+$[1]+" B: "+$[2];else{$=n.getStoredPixels(S,iA.x,iA.y,1,1);var cA=$[0],CA=cA*U.image.slope+U.image.intercept,tA=parseFloat(CA.toFixed(2));if(eA==="CT")aA+="HU: "+tA;else if(eA==="PT"){aA+=tA;var lA=(0,M.default)(U.image,cA);lA&&(aA+=" SUV: "+parseFloat(lA.toFixed(2)))}else aA+=tA}var yA=n.pixelToCanvas(S,iA);J.font=_,J.fillStyle=z;var JA=void 0,bA=J.measureText(aA).width;JA=U.isTouchEvent===!0?{x:-bA/2-5,y:-N.default.getFontSize()-10-12}:{x:12,y:-(N.default.getFontSize()+10)/2},J.beginPath(),J.strokeStyle=z,J.arc(yA.x,yA.y,6,0,2*Math.PI),J.stroke(),(0,F.default)(J,aA,yA.x+JA.x,yA.y+JA.y,z),J.restore()}}function A(U){var n=U.detail,S=n.element;S.removeEventListener(e.default.IMAGE_RENDERED,g),S.removeEventListener(e.default.MOUSE_DRAG,B),S.removeEventListener(e.default.MOUSE_UP,A),S.removeEventListener(e.default.MOUSE_CLICK,A),a.default.cornerstone.updateImage(n.element)}function I(U){var n=U.detail,S=n.element,v=(0,H.getToolOptions)(m,S);(0,k.default)(n.which,v.mouseButtonMask)&&(S.addEventListener(e.default.IMAGE_RENDERED,g),S.addEventListener(e.default.MOUSE_DRAG,B),S.addEventListener(e.default.MOUSE_UP,A),S.addEventListener(e.default.MOUSE_CLICK,A),P.strategy(n),U.preventDefault(),U.stopPropagation())}function g(){x&&(P.strategy(x),x=null)}function B(U){var n=U.detail,S=n.element;x=n,a.default.cornerstone.updateImage(S),U.preventDefault(),U.stopPropagation()}Object.defineProperty(i,"__esModule",{value:!0}),i.dragProbeTouch=i.dragProbe=void 0;var Q=t(1),e=o(Q),s=t(0),a=o(s),r=t(16),h=o(r),c=t(15),w=o(c),u=t(13),N=o(u),G=t(6),l=o(G),R=t(7),F=o(R),D=t(34),d=o(D),y=t(20),M=o(y),L=t(4),k=o(L),H=t(3),m="dragProbe",x=void 0,P=(0,h.default)(I,m);P.strategies={default:E,minimal:C},P.strategy=E;var q={fireOnTouchStart:!0},K=(0,w.default)(B,m,q);i.dragProbe=P,i.dragProbeTouch=K},function(BA,i,t){"use strict";function o(U){return U&&U.__esModule?U:{default:U}}function E(U){return{visible:!0,active:!0,invalidated:!0,handles:{start:{x:U.currentPoints.image.x,y:U.currentPoints.image.y,highlight:!0,active:!1},end:{x:U.currentPoints.image.x,y:U.currentPoints.image.y,highlight:!0,active:!0},textBox:{active:!1,hasMoved:!1,movesIndependently:!1,drawnIndependently:!0,allowedOutsideImage:!0,hasBoundingBox:!0}}}}function C(U,n,S,v){var p=e.default.cornerstone,J=p.pixelToCanvas(U,n.handles.start),z=p.pixelToCanvas(U,n.handles.end),_={left:Math.min(J.x,z.x)+v/2,top:Math.min(J.y,z.y)+v/2,width:Math.abs(J.x-z.x)-v,height:Math.abs(J.y-z.y)-v},j={left:Math.min(J.x,z.x)-v/2,top:Math.min(J.y,z.y)-v/2,width:Math.abs(J.x-z.x)+v,height:Math.abs(J.y-z.y)+v},O=(0,M.default)(_,S);return!(!(0,M.default)(j,S)||O)}function A(U,n,S){return C(U,n,S,15)}function I(U,n,S){return C(U,n,S,25)}function g(U){var n=U.toString().split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),n.join(".")}function B(U){var n=U.detail,S=(0,x.getToolState)(U.currentTarget,P);if(S){var v=e.default.cornerstone,p=n.image,J=n.element,z=w.default.getToolWidth(),_=q.getConfiguration(),j=n.canvasContext.canvas.getContext("2d"),O=v.metaData.get("generalSeriesModule",p.imageId),eA=void 0;O&&(eA=O.modality),j.setTransform(1,0,0,1,0,0);for(var iA=0;iA=0&&p.data[j].active&&(J=C(n,j),J!==void 0?Q(n,J):n.event.shiftKey?_.freehand=!0:E(n));U.preventDefault(),U.stopPropagation()}}function s(U){var n=U.detail,S=(0,m.getToolState)(U.currentTarget,P);if(S!==void 0){var v=R.default.cornerstone,p=K.getConfiguration(),J=n.canvasContext.canvas.getContext("2d");J.setTransform(1,0,0,1,0,0);for(var z=void 0,_=D.default.getToolWidth(),j=y.default.getFillColor(),O=0;O0))return{visible:!0,active:!0,handles:{start:{x:D.currentPoints.image.x,y:D.currentPoints.image.y,highlight:!0,active:!1},end:{x:D.currentPoints.image.x,y:D.currentPoints.image.y,highlight:!0,active:!0}}}}function C(D,d,y){var M=B.default.cornerstone,L=M.pixelToCanvas(D,d.handles.start),k=M.pixelToCanvas(D,d.handles.end),H={left:Math.min(L.x,k.x),top:Math.min(L.y,k.y),width:Math.abs(L.x-k.x),height:Math.abs(L.y-k.y)},m=!1;return y.x>=H.left&&y.x<=H.left+H.width&&y.y>=H.top&&y.y<=H.top+H.height&&(m=!0),m}function A(D,d,y){var M=B.default.cornerstone,L=M.pixelToCanvas(D,d.handles.start),k=M.pixelToCanvas(D,d.handles.end),H={left:Math.min(L.x,k.x),top:Math.min(L.y,k.y),width:Math.abs(L.x-k.x),height:Math.abs(L.y-k.y)};return B.default.cornerstoneMath.rect.distanceToPoint(H,y)<5}function I(D){var d=D.detail,y=(0,G.getToolState)(D.currentTarget,l);if(y!==void 0){var M=B.default.cornerstone,L=d.canvasContext.canvas.getContext("2d");L.setTransform(1,0,0,1,0,0);var k=void 0,H=h.default.getToolWidth();L.save();var m=y.data[0];if(m){k=m.active?w.default.getActiveColor():w.default.getToolColor();var x=M.pixelToCanvas(d.element,m.handles.start),P=M.pixelToCanvas(d.element,m.handles.end),q={left:Math.min(x.x,P.x),top:Math.min(x.y,P.y),width:Math.abs(x.x-P.x),height:Math.abs(x.y-P.y)};L.beginPath(),L.strokeStyle="transparent",L.rect(0,0,L.canvas.clientWidth,L.canvas.clientHeight),L.rect(q.width+q.left,q.top,-q.width,q.height),L.stroke(),L.fillStyle="rgba(0,0,0,0.7)",L.fill(),L.closePath(),L.beginPath(),L.strokeStyle=k,L.lineWidth=H,L.setLineDash([4]),L.strokeRect(q.left,q.top,q.width,q.height),L.setLineDash([]),(0,N.default)(L,d,m.handles,k),L.restore()}}}Object.defineProperty(i,"__esModule",{value:!0}),i.highlightTouch=i.highlight=void 0;var g=t(0),B=o(g),Q=t(55),e=o(Q),s=t(11),a=o(s),r=t(8),h=o(r),c=t(6),w=o(c),u=t(10),N=o(u),G=t(2),l="highlight",R=(0,e.default)({createNewMeasurement:E,onImageRendered:I,pointNearTool:A,pointInsideRect:C,toolType:l},!0),F=(0,a.default)({createNewMeasurement:E,onImageRendered:I,pointNearTool:A,pointInsideRect:C,toolType:l},!0);i.highlight=R,i.highlightTouch=F},function(BA,i,t){"use strict";function o(Q){return Q&&Q.__esModule?Q:{default:Q}}function E(Q){var e=Q.detail,s=e.image,a=s.stats,r=e.canvasContext.canvas.getContext("2d");r.setTransform(1,0,0,1,0,0);var h=[];Object.keys(a).forEach(function(c){var w=c+" : "+a[c];h.push(w)}),(0,g.default)(r,h,0,0,"orange"),h.forEach(function(c){console.log(c)})}Object.defineProperty(i,"__esModule",{value:!0});var C=t(26),A=o(C),I=t(7),g=o(I),B=(0,A.default)(E);i.default=B},function(BA,i,t){"use strict";function o(d){return d&&d.__esModule?d:{default:d}}function E(d){return{visible:!0,active:!0,handles:{start:{x:d.currentPoints.image.x,y:d.currentPoints.image.y,highlight:!0,active:!1},end:{x:d.currentPoints.image.x,y:d.currentPoints.image.y,highlight:!0,active:!0},textBox:{active:!1,hasMoved:!1,movesIndependently:!1,drawnIndependently:!0,allowedOutsideImage:!0,hasBoundingBox:!0}}}}function C(d,y,M){var L=g.default.cornerstone,k={start:L.pixelToCanvas(d,y.handles.start),end:L.pixelToCanvas(d,y.handles.end)};return g.default.cornerstoneMath.lineSegment.distanceToPoint(k,M)<25}function A(d){var y=d.detail,M=(0,l.getToolState)(d.currentTarget,R);if(M){var L=g.default.cornerstone,k=y.canvasContext.canvas.getContext("2d"),H=y.image,m=y.element;k.setTransform(1,0,0,1,0,0);var x=c.default.getToolWidth(),P=F.getConfiguration(),q=L.metaData.get("imagePlaneModule",H.imageId),K=void 0,U=void 0;q?(K=q.rowPixelSpacing||q.rowImagePixelSpacing,U=q.columnPixelSpacing||q.colImagePixelSpacing):(K=H.rowPixelSpacing,U=H.columnPixelSpacing);for(var n=0;n=2}},Q=(0,g.default)(E);Q.setConfiguration(B),i.default=Q},function(BA,i,t){"use strict";function o(k){return k&&k.__esModule?k:{default:k}}function E(k){return{visible:!0,active:!0,handles:{end:{x:k.currentPoints.image.x,y:k.currentPoints.image.y,highlight:!0,active:!0}}}}function C(k,H,m){var x=g.default.cornerstone.pixelToCanvas(k,H.handles.end);return g.default.cornerstoneMath.point.distance(x,m)<5}function A(k){var H=k.detail,m=(0,d.getToolState)(k.currentTarget,y);if(m){var x=g.default.cornerstone,P=H.canvasContext.canvas.getContext("2d");P.setTransform(1,0,0,1,0,0);for(var q=void 0,K=c.default.getFont(),U=c.default.getFontSize(),n=0;n=H.image.columns||p>=H.image.rows)return;if(H.image.color)z=v+", "+p,J=(0,R.default)(H.element,v,p,1,1),_="R: "+J[0]+" G: "+J[1]+" B: "+J[2];else{J=x.getStoredPixels(H.element,v,p,1,1);var j=J[0],O=j*H.image.slope+H.image.intercept,eA=(0,D.default)(H.image,j);z=v+", "+p,_="SP: "+j+" MO: "+parseFloat(O.toFixed(3)),eA&&(_+=" SUV: "+parseFloat(eA.toFixed(3)))}var iA={x:S.handles.end.x+3,y:S.handles.end.y-3},$=x.pixelToCanvas(H.element,iA);P.font=K,P.fillStyle=q,(0,G.default)(P,_,$.x,$.y+U+5,q),(0,G.default)(P,z,$.x,$.y,q),P.restore()}}}Object.defineProperty(i,"__esModule",{value:!0}),i.probeTouch=i.probe=void 0;var I=t(0),g=o(I),B=t(9),Q=o(B),e=t(11),s=o(e),a=t(6),r=o(a),h=t(13),c=o(h),w=t(10),u=o(w),N=t(7),G=o(N),l=t(34),R=o(l),F=t(20),D=o(F),d=t(2),y="probe",M=(0,Q.default)({createNewMeasurement:E,onImageRendered:A,pointNearTool:C,toolType:y}),L=(0,s.default)({createNewMeasurement:E,onImageRendered:A,pointNearTool:C,toolType:y});i.probe=M,i.probeTouch=L},function(BA,i,t){"use strict";function o(k){return k&&k.__esModule?k:{default:k}}function E(k){return{visible:!0,active:!0,invalidated:!0,handles:{start:{x:k.currentPoints.image.x,y:k.currentPoints.image.y,highlight:!0,active:!1},end:{x:k.currentPoints.image.x,y:k.currentPoints.image.y,highlight:!0,active:!0},textBox:{active:!1,hasMoved:!1,movesIndependently:!1,drawnIndependently:!0,allowedOutsideImage:!0,hasBoundingBox:!0}}}}function C(k,H,m){var x=Q.default.cornerstone,P=x.pixelToCanvas(k,H.handles.start),q=x.pixelToCanvas(k,H.handles.end),K={left:Math.min(P.x,q.x),top:Math.min(P.y,q.y),width:Math.abs(P.x-q.x),height:Math.abs(P.y-q.y)};return Q.default.cornerstoneMath.rect.distanceToPoint(K,m)<5}function A(k,H){for(var m=0,x=0,P=0,q=0,K=H.top;K2&&arguments[2]!==void 0?arguments[2]:"image/png",I=E.querySelector("canvas"),g=document.createElement("a");if(g.download=C,g.href=I.toDataURL(A,1),document.createEvent){var B=document.createEvent("MouseEvents");B.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),g.dispatchEvent(B)}else g.fireEvent&&g.fireEvent("onclick")}Object.defineProperty(i,"__esModule",{value:!0}),i.default=o},function(BA,i,t){"use strict";function o(iA){return iA&&iA.__esModule?iA:{default:iA}}function E(iA){iA(prompt("Enter your annotation:"))}function C(iA,$,aA){aA(prompt("Change your annotation:"))}function A(iA){function $(lA){lA===null?(0,J.removeToolState)(cA,_,tA):tA.text=lA,tA.active=!1,aA.updateImage(cA)}var aA=c.default.cornerstone,cA=iA.element,CA=O.getConfiguration(),tA=I(iA);(0,J.addToolState)(cA,_,tA),aA.updateImage(cA),(0,x.default)(iA,_,tA,tA.handles.end,function(){(0,H.default)(iA,tA.handles)&&(0,J.removeToolState)(cA,_,tA),tA.text===void 0&&CA.getTextCallback($),aA.updateImage(cA)})}function I(iA){return{visible:!0,active:!0,handles:{end:{x:iA.currentPoints.image.x,y:iA.currentPoints.image.y,highlight:!0,active:!1},textBox:{active:!1,hasMoved:!1,movesIndependently:!1,drawnIndependently:!0,allowedOutsideImage:!0,hasBoundingBox:!0}}}}function g(iA,$,aA){if($.handles.end){var cA=c.default.cornerstone.pixelToCanvas(iA,$.handles.end);return c.default.cornerstoneMath.point.distance(cA,aA)<25}}function B(iA){var $=iA.detail,aA=(0,J.getToolState)(iA.currentTarget,_);if(aA){var cA=c.default.cornerstone,CA=$.enabledElement,tA=$.canvasContext.canvas.getContext("2d");tA.setTransform(1,0,0,1,0,0);for(var lA=$.canvasContext.canvas.width,yA=void 0,JA=y.default.getToolWidth(),bA=D.default.getFont(),NA=O.getConfiguration(),LA=0;LAlA/2&&(FA=-FA);var KA=void 0;if(!b.handles.textBox.hasMoved){KA={x:T.x-IA/2+FA,y:T.y-oA/2};var qA=cA.internal.getTransform(CA);qA.invert();var DA=qA.transformPoint(KA.x,KA.y);b.handles.textBox.x=DA.x,b.handles.textBox.y=DA.y}KA=cA.pixelToCanvas($.element,b.handles.textBox);var MA=(0,R.default)(tA,AA,KA.x,KA.y,yA);if(b.handles.textBox.boundingBox=MA,b.handles.textBox.hasMoved){var RA={start:{},end:{}};RA.end.x=KA.x,RA.end.y=KA.y,RA.start=T;var wA=[{x:MA.left+MA.width/2,y:MA.top},{x:MA.left,y:MA.top+MA.height/2},{x:MA.left+MA.width/2,y:MA.top+MA.height},{x:MA.left+MA.width,y:MA.top+MA.height/2}];RA.end=c.default.cornerstoneMath.point.findClosestPoint(wA,RA.start),tA.beginPath(),tA.strokeStyle=yA,tA.lineWidth=JA,tA.setLineDash([2,3]),tA.moveTo(RA.start.x,RA.start.y),tA.lineTo(RA.end.x,RA.end.y),tA.stroke()}}tA.restore()}}}function Q(iA){function $(lA){lA===null?(0,J.removeToolState)(cA,_,tA):tA.text=lA,tA.active=!1,aA.updateImage(cA)}var aA=c.default.cornerstone,cA=iA.element,CA=O.getConfiguration(),tA=I(iA);(0,J.addToolState)(cA,_,tA),aA.updateImage(cA),(0,x.default)(iA,_,tA,tA.handles.end,function(){(0,H.default)(iA,tA.handles)&&(0,J.removeToolState)(cA,_,tA),tA.text===void 0&&CA.getTextCallback($),aA.updateImage(cA)})}function e(iA){function $(LA,b,T){T===!0?(0,J.removeToolState)(CA,_,LA):LA.text=b,LA.active=!1,cA.updateImage(CA)}var aA=iA.detail,cA=c.default.cornerstone,CA=aA.element,tA=void 0,lA=(0,z.getToolOptions)(_,CA);if((0,S.default)(aA.which,lA.mouseButtonMask)){var yA=O.getConfiguration(),JA=aA.currentPoints.canvas,bA=(0,J.getToolState)(CA,_);if(bA){for(var NA=0;NA=m.markers.length&&(m.loop?q-=m.markers.length:q=-1):(q-=1)<0&&(m.loop?q+=m.markers.length:q=-1),m.current=m.markers[q],x}}}function C(H,m,x){if(m.handles.end.boundingBox){var P=s.default.cornerstoneMath.rect.distanceToPoint(m.handles.end.boundingBox,x),q=(0,u.default)(m.handles.end,x);return P<10||q}}function A(H){var m=H.detail,x=(0,d.getToolState)(m.element,M);if(x){var P=m.canvasContext.canvas.getContext("2d");P.setTransform(1,0,0,1,0,0);for(var q=L.getConfiguration(),K=0;KS.maxScale?U.scale=S.maxScale:S.minScale&&Jv.maxScale?p.scale=v.maxScale:v.minScale&&p.scalek||x<0||x>L)){var n=(0,c.default)(U,L,k,m,x);(0,w.drawBrushPixels)(n,q,K,k),y.invalid=!0,e.default.cornerstone.updateImage(d)}}function C(F){var D=F.detail;G=D.currentPoints.image,l=!1}function A(F){var D=F.detail;E(D),l=!0,G=D.currentPoints.image}function I(F){var D=F.detail;G=D.currentPoints.image,e.default.cornerstone.updateImage(D.element)}function g(F){var D=F.detail;E(D),l=!0,G=D.currentPoints.image}function B(F){var D=F.detail;if(G){var d=D.image,y=d.rows,M=d.columns,L=G,k=L.x,H=L.y;if(!(k<0||k>M||H<0||H>y)){var m=R.getConfiguration(),x=m.radius,P=D.canvasContext,q=l?m.dragColor:m.hoverColor,K=D.element;P.setTransform(1,0,0,1,0,0);var U=(0,c.default)(x,y,M,k,H);(0,w.drawBrushOnCanvas)(U,P,q,K)}}}Object.defineProperty(i,"__esModule",{value:!0}),i.brush=void 0;var Q=t(0),e=o(Q),s=t(2),a=t(57),r=o(a),h=t(58),c=o(h),w=t(59),u="brush",N={draw:1,radius:3,hoverColor:"green",dragColor:"yellow"},G=void 0,l=!1,R=(0,r.default)({onMouseMove:I,onMouseDown:A,onMouseUp:C,onDrag:g,toolType:"brush",onImageRendered:B});R.setConfiguration(N),i.brush=R},function(BA,i,t){"use strict";function o(k){return k&&k.__esModule?k:{default:k}}function E(k,H,m){var x=L.getConfiguration(),P=x.tolerance,q=Number.MAX_VALUE,K=-Number.MAX_VALUE;k.forEach(function(U){var n=U[1]*m+U[0],S=H[n];q=Math.min(S,q),K=Math.max(S,K)}),d=q-P,D=K+P}function C(k,H,m,x){for(var P=L.getConfiguration(),q=P.draw,K=Math.round(F.x),U=Math.round(F.y),n=null,S=[],v=P.radius;n!==0&&v>P.minRadius;){n=0,S=(0,N.default)(v,m,x,K,U);for(var p=0;pD||jK||S<0||S>q)){var _=(0,N.default)(z,q,K,n,S);(0,G.drawBrushPixels)(_,p,J,K),x.invalid=!0,r.default.cornerstone.updateImage(m)}}function g(k){var H=k.detail;F=H.currentPoints.image;var m=L.getConfiguration();M=!1,y=m.radius,r.default.cornerstone.updateImage(H.element)}function B(k){var H=k.detail,m=H.element,x=L.getConfiguration(),P=r.default.cornerstone.getLayer(m,x.brushLayerId),q=r.default.cornerstone.getLayers(m)[0],K=H.currentPoints.image,U=K.x,n=K.y,S=P.image,v=S.rows,p=S.columns,J=(0,N.default)(x.radius,v,p,U,n);x.draw===0?I(H):(E(J,q.image.getPixelData(),p),A(H)),M=!0,F=H.currentPoints.image}function Q(k){var H=k.detail;F=H.currentPoints.image,r.default.cornerstone.updateImage(H.element)}function e(k){var H=k.detail;R.draw===0?I(H):A(H),M=!0,F=H.currentPoints.image}function s(k){var H=k.detail;if(F){var m=H.image,x=m.rows,P=m.columns,q=F,K=q.x,U=q.y;if(!(K<0||K>P||U<0||U>x)){var n=L.getConfiguration(),S=H.canvasContext,v=M?n.dragColor:n.hoverColor,p=H.element;y=y||n.radius,S.setTransform(1,0,0,1,0,0);var J=(0,N.default)(y,x,P,K,U);(0,G.drawBrushOnCanvas)(J,S,v,p)}}}Object.defineProperty(i,"__esModule",{value:!0}),i.adaptiveBrush=void 0;var a=t(0),r=o(a),h=t(2),c=t(57),w=o(c),u=t(58),N=o(u),G=t(59),l="brush",R={draw:1,radius:3,tolerance:5,minRadius:1,hoverColor:"green",dragColor:"yellow"},F=void 0,D=void 0,d=void 0,y=void 0,M=void 0,L=(0,w.default)({onMouseMove:Q,onMouseDown:B,onMouseUp:g,onDrag:e,toolType:"adaptiveBrush",onImageRendered:s});L.setConfiguration(R),i.adaptiveBrush=L},function(BA,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default="2.1.0"}])})},82424:function(NI){(function(BA,i){NI.exports=i()})(this,function(){return(()=>{var BA={6089:(E,C,A)=>{E.exports=A(7945)},4559:(E,C,A)=>{E.exports=A(9842)},6059:(E,C,A)=>{E.exports=A(3798)},9387:(E,C,A)=>{E.exports=A(2149)},7423:(E,C,A)=>{E.exports=A(6970)},2633:(E,C,A)=>{E.exports=A(2343)},6028:(E,C,A)=>{E.exports=A(671)},187:(E,C,A)=>{E.exports=A(7283)},1655:(E,C,A)=>{E.exports=A(2882)},1246:(E,C,A)=>{E.exports=A(8730)},2165:(E,C,A)=>{E.exports=A(569)},337:(E,C,A)=>{E.exports=A(3751)},2770:(E,C,A)=>{E.exports=A(1380)},1882:(E,C,A)=>{E.exports=A(6601)},7878:(E,C,A)=>{E.exports=A(8783)},1929:(E,C,A)=>{E.exports=A(3498)},2250:(E,C,A)=>{E.exports=A(4731)},1407:(E,C,A)=>{E.exports=A(3355)},6051:(E,C,A)=>{E.exports=A(4640)},6275:(E,C,A)=>{E.exports=A(846)},7830:(E,C,A)=>{E.exports=A(7686)},3091:(E,C,A)=>{E.exports=A(5681)},8355:(E,C,A)=>{E.exports=A(9863)},1082:(E,C,A)=>{E.exports=A(5723)},2475:(E,C,A)=>{E.exports=A(8887)},9719:(E,C,A)=>{E.exports=A(9009)},5534:(E,C,A)=>{E.exports=A(5213)},4215:(E,C,A)=>{E.exports=A(156)},6496:(E,C,A)=>{E.exports=A(7754)},7458:E=>{var C=function(A){"use strict";var I,g=Object.prototype,B=g.hasOwnProperty,Q=typeof Symbol=="function"?Symbol:{},e=Q.iterator||"@@iterator",s=Q.asyncIterator||"@@asyncIterator",a=Q.toStringTag||"@@toStringTag";function r(n,S,v){return Object.defineProperty(n,S,{value:v,enumerable:!0,configurable:!0,writable:!0}),n[S]}try{r({},"")}catch(n){r=function(S,v,p){return S[v]=p}}function h(n,S,v,p){var J=S&&S.prototype instanceof R?S:R,z=Object.create(J.prototype),_=new q(p||[]);return z._invoke=function(j,O,eA){var iA=w;return function($,aA){if(iA===N)throw new Error("Generator is already running");if(iA===G){if($==="throw")throw aA;return U()}for(eA.method=$,eA.arg=aA;;){var cA=eA.delegate;if(cA){var CA=m(cA,eA);if(CA){if(CA===l)continue;return CA}}if(eA.method==="next")eA.sent=eA._sent=eA.arg;else if(eA.method==="throw"){if(iA===w)throw iA=G,eA.arg;eA.dispatchException(eA.arg)}else eA.method==="return"&&eA.abrupt("return",eA.arg);iA=N;var tA=c(j,O,eA);if(tA.type==="normal"){if(iA=eA.done?G:u,tA.arg===l)continue;return{value:tA.arg,done:eA.done}}tA.type==="throw"&&(iA=G,eA.method="throw",eA.arg=tA.arg)}}}(n,v,_),z}function c(n,S,v){try{return{type:"normal",arg:n.call(S,v)}}catch(p){return{type:"throw",arg:p}}}A.wrap=h;var w="suspendedStart",u="suspendedYield",N="executing",G="completed",l={};function R(){}function F(){}function D(){}var d={};r(d,e,function(){return this});var y=Object.getPrototypeOf,M=y&&y(y(K([])));M&&M!==g&&B.call(M,e)&&(d=M);var L=D.prototype=R.prototype=Object.create(d);function k(n){["next","throw","return"].forEach(function(S){r(n,S,function(v){return this._invoke(S,v)})})}function H(n,S){function v(J,z,_,j){var O=c(n[J],n,z);if(O.type!=="throw"){var eA=O.arg,iA=eA.value;return iA&&typeof iA=="object"&&B.call(iA,"__await")?S.resolve(iA.__await).then(function($){v("next",$,_,j)},function($){v("throw",$,_,j)}):S.resolve(iA).then(function($){eA.value=$,_(eA)},function($){return v("throw",$,_,j)})}j(O.arg)}var p;this._invoke=function(J,z){function _(){return new S(function(j,O){v(J,z,j,O)})}return p=p?p.then(_,_):_()}}function m(n,S){var v=n.iterator[S.method];if(v===I){if(S.delegate=null,S.method==="throw"){if(n.iterator.return&&(S.method="return",S.arg=I,m(n,S),S.method==="throw"))return l;S.method="throw",S.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var p=c(v,n.iterator,S.arg);if(p.type==="throw")return S.method="throw",S.arg=p.arg,S.delegate=null,l;var J=p.arg;return J?J.done?(S[n.resultName]=J.value,S.next=n.nextLoc,S.method!=="return"&&(S.method="next",S.arg=I),S.delegate=null,l):J:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,l)}function x(n){var S={tryLoc:n[0]};1 in n&&(S.catchLoc=n[1]),2 in n&&(S.finallyLoc=n[2],S.afterLoc=n[3]),this.tryEntries.push(S)}function P(n){var S=n.completion||{};S.type="normal",delete S.arg,n.completion=S}function q(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(x,this),this.reset(!0)}function K(n){if(n){var S=n[e];if(S)return S.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var v=-1,p=function J(){for(;++v=0;--p){var J=this.tryEntries[p],z=J.completion;if(J.tryLoc==="root")return v("end");if(J.tryLoc<=this.prev){var _=B.call(J,"catchLoc"),j=B.call(J,"finallyLoc");if(_&&j){if(this.prev=0;--v){var p=this.tryEntries[v];if(p.tryLoc<=this.prev&&B.call(p,"finallyLoc")&&this.prev=0;--S){var v=this.tryEntries[S];if(v.finallyLoc===n)return this.complete(v.completion,v.afterLoc),P(v),l}},catch:function(n){for(var S=this.tryEntries.length-1;S>=0;--S){var v=this.tryEntries[S];if(v.tryLoc===n){var p=v.completion;if(p.type==="throw"){var J=p.arg;P(v)}return J}}throw new Error("illegal catch attempt")},delegateYield:function(n,S,v){return this.delegate={iterator:K(n),resultName:S,nextLoc:v},this.method==="next"&&(this.arg=I),l}},A}(E.exports);try{regeneratorRuntime=C}catch(A){typeof globalThis=="object"?globalThis.regeneratorRuntime=C:Function("r","regeneratorRuntime = r")(C)}},2043:(E,C,A)=>{E.exports=A(7458)},5109:(E,C,A)=>{A(8109),A(2166);var I=A(9081);E.exports=I.Array.from},1316:(E,C,A)=>{A(9506);var I=A(9081);E.exports=I.Array.isArray},3641:(E,C,A)=>{A(3075);var I=A(2018);E.exports=I("Array").concat},646:(E,C,A)=>{A(8345);var I=A(2018);E.exports=I("Array").filter},3147:(E,C,A)=>{A(7670);var I=A(2018);E.exports=I("Array").includes},5197:(E,C,A)=>{A(194);var I=A(2018);E.exports=I("Array").indexOf},474:(E,C,A)=>{A(2478);var I=A(2018);E.exports=I("Array").map},1001:(E,C,A)=>{A(5313);var I=A(2018);E.exports=I("Array").slice},5587:(E,C,A)=>{A(4596);var I=A(2018);E.exports=I("Array").splice},3386:(E,C,A)=>{A(2228),A(8109);var I=A(5018);E.exports=I},7543:(E,C,A)=>{var I=A(3641),g=Array.prototype;E.exports=function(B){var Q=B.concat;return B===g||B instanceof Array&&Q===g.concat?I:Q}},3918:(E,C,A)=>{var I=A(646),g=Array.prototype;E.exports=function(B){var Q=B.filter;return B===g||B instanceof Array&&Q===g.filter?I:Q}},790:(E,C,A)=>{var I=A(6270),g=RegExp.prototype;E.exports=function(B){return(B===g||B instanceof RegExp)&&!("flags"in B)?I(B):B.flags}},9109:(E,C,A)=>{var I=A(3147),g=A(5520),B=Array.prototype,Q=String.prototype;E.exports=function(e){var s=e.includes;return e===B||e instanceof Array&&s===B.includes?I:typeof e=="string"||e===Q||e instanceof String&&s===Q.includes?g:s}},4825:(E,C,A)=>{var I=A(5197),g=Array.prototype;E.exports=function(B){var Q=B.indexOf;return B===g||B instanceof Array&&Q===g.indexOf?I:Q}},238:(E,C,A)=>{var I=A(474),g=Array.prototype;E.exports=function(B){var Q=B.map;return B===g||B instanceof Array&&Q===g.map?I:Q}},1285:(E,C,A)=>{var I=A(1001),g=Array.prototype;E.exports=function(B){var Q=B.slice;return B===g||B instanceof Array&&Q===g.slice?I:Q}},7681:(E,C,A)=>{var I=A(5587),g=Array.prototype;E.exports=function(B){var Q=B.splice;return B===g||B instanceof Array&&Q===g.splice?I:Q}},8949:(E,C,A)=>{var I=A(9119),g=String.prototype;E.exports=function(B){var Q=B.trim;return typeof B=="string"||B===g||B instanceof String&&Q===g.trim?I:Q}},2529:(E,C,A)=>{A(8524);var I=A(9081);E.exports=I.Object.assign},6854:(E,C,A)=>{A(6764);var I=A(9081).Object,g=E.exports=function(B,Q,e){return I.defineProperty(B,Q,e)};I.defineProperty.sham&&(g.sham=!0)},1553:(E,C,A)=>{A(9398);var I=A(9081);E.exports=I.Object.entries},2744:(E,C,A)=>{A(554);var I=A(9081).Object,g=E.exports=function(B,Q){return I.getOwnPropertyDescriptor(B,Q)};I.getOwnPropertyDescriptor.sham&&(g.sham=!0)},6018:(E,C,A)=>{A(4267);var I=A(9081);E.exports=I.Object.getOwnPropertyDescriptors},5350:(E,C,A)=>{A(8318);var I=A(9081);E.exports=I.Object.getOwnPropertySymbols},8116:(E,C,A)=>{A(8390);var I=A(9081);E.exports=I.Object.keys},3140:(E,C,A)=>{A(1171);var I=A(9081);E.exports=I.Object.values},7281:(E,C,A)=>{A(6454),A(2228),A(2575),A(3658),A(4465),A(8359),A(5203),A(8109);var I=A(9081);E.exports=I.Promise},6270:(E,C,A)=>{A(8714);var I=A(4980);E.exports=function(g){return I.call(g)}},5520:(E,C,A)=>{A(688);var I=A(2018);E.exports=I("String").includes},9119:(E,C,A)=>{A(8217);var I=A(2018);E.exports=I("String").trim},1442:(E,C,A)=>{A(3075),A(2575),A(8318),A(5762),A(2181),A(8848),A(3719),A(2362),A(346),A(888),A(909),A(1992),A(8512),A(6165),A(6044),A(4676),A(263),A(3596),A(1227),A(6268);var I=A(9081);E.exports=I.Symbol},1190:(E,C,A)=>{A(2228),A(2575),A(8109),A(2362);var I=A(3379);E.exports=I.f("iterator")},4640:(E,C,A)=>{var I=A(7945);E.exports=I},846:(E,C,A)=>{var I=A(8010);E.exports=I},7686:(E,C,A)=>{var I=A(7922);E.exports=I},5681:(E,C,A)=>{var I=A(5838);E.exports=I},9863:(E,C,A)=>{var I=A(671);E.exports=I},5723:(E,C,A)=>{var I=A(8531);E.exports=I},8887:(E,C,A)=>{var I=A(6601);E.exports=I},9009:(E,C,A)=>{var I=A(8783);E.exports=I},5213:(E,C,A)=>{var I=A(4731);A(1152),A(8561),A(5543),A(8302),E.exports=I},156:(E,C,A)=>{var I=A(3355);A(8812),A(9085),A(7384),A(4719),A(2994),A(9431),A(4803),E.exports=I},7754:(E,C,A)=>{var I=A(6888);E.exports=I},9077:E=>{E.exports=function(C){if(typeof C!="function")throw TypeError(String(C)+" is not a function");return C}},9154:(E,C,A)=>{var I=A(3359);E.exports=function(g){if(!I(g)&&g!==null)throw TypeError("Can't set "+String(g)+" as a prototype");return g}},7710:E=>{E.exports=function(){}},8792:E=>{E.exports=function(C,A,I){if(!(C instanceof A))throw TypeError("Incorrect "+(I?I+" ":"")+"invocation");return C}},1912:(E,C,A)=>{var I=A(3359);E.exports=function(g){if(!I(g))throw TypeError(String(g)+" is not an object");return g}},4746:(E,C,A)=>{"use strict";var I=A(7673),g=A(2058),B=A(7647),Q=A(6475),e=A(3746),s=A(409),a=A(5945),r=A(5018);E.exports=function(h){var c,w,u,N,G,l,R=g(h),F=typeof this=="function"?this:Array,D=arguments.length,d=D>1?arguments[1]:void 0,y=d!==void 0,M=r(R),L=0;if(y&&(d=I(d,D>2?arguments[2]:void 0,2)),M==null||F==Array&&Q(M))for(w=new F(c=e(R.length));c>L;L++)l=y?d(R[L],L):R[L],s(w,L,l);else for(G=(N=a(R,M)).next,w=new F;!(u=G.call(N)).done;L++)l=y?B(N,d,[u.value,L],!0):u.value,s(w,L,l);return w.length=L,w}},7075:(E,C,A)=>{var I=A(3861),g=A(3746),B=A(3055),Q=function(e){return function(s,a,r){var h,c=I(s),w=g(c.length),u=B(r,w);if(e&&a!=a){for(;w>u;)if((h=c[u++])!=h)return!0}else for(;w>u;u++)if((e||u in c)&&c[u]===a)return e||u||0;return!e&&-1}};E.exports={includes:Q(!0),indexOf:Q(!1)}},4206:(E,C,A)=>{var I=A(7673),g=A(1251),B=A(2058),Q=A(3746),e=A(8136),s=[].push,a=function(r){var h=r==1,c=r==2,w=r==3,u=r==4,N=r==6,G=r==7,l=r==5||N;return function(R,F,D,d){for(var y,M,L=B(R),k=g(L),H=I(F,D,3),m=Q(k.length),x=0,P=d||e,q=h?P(R,m):c||G?P(R,0):void 0;m>x;x++)if((l||x in k)&&(M=H(y=k[x],x,L),r))if(h)q[x]=M;else if(M)switch(r){case 3:return!0;case 5:return y;case 6:return x;case 2:s.call(q,y)}else switch(r){case 4:return!1;case 7:s.call(q,y)}return N?-1:w||u?u:q}};E.exports={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}},2143:(E,C,A)=>{var I=A(6530),g=A(5712),B=A(8233),Q=g("species");E.exports=function(e){return B>=51||!I(function(){var s=[];return(s.constructor={})[Q]=function(){return{foo:1}},s[e](Boolean).foo!==1})}},6628:(E,C,A)=>{"use strict";var I=A(6530);E.exports=function(g,B){var Q=[][g];return!!Q&&I(function(){Q.call(null,B||function(){throw 1},1)})}},3400:(E,C,A)=>{var I=A(3359),g=A(1054),B=A(5712)("species");E.exports=function(Q){var e;return g(Q)&&(typeof(e=Q.constructor)!="function"||e!==Array&&!g(e.prototype)?I(e)&&(e=e[B])===null&&(e=void 0):e=void 0),e===void 0?Array:e}},8136:(E,C,A)=>{var I=A(3400);E.exports=function(g,B){return new(I(g))(B===0?0:B)}},7647:(E,C,A)=>{var I=A(1912),g=A(309);E.exports=function(B,Q,e,s){try{return s?Q(I(e)[0],e[1]):Q(e)}catch(a){g(B,"throw",a)}}},8908:(E,C,A)=>{var I=A(5712)("iterator"),g=!1;try{var B=0,Q={next:function(){return{done:!!B++}},return:function(){g=!0}};Q[I]=function(){return this},Array.from(Q,function(){throw 2})}catch(e){}E.exports=function(e,s){if(!s&&!g)return!1;var a=!1;try{var r={};r[I]=function(){return{next:function(){return{done:a=!0}}}},e(r)}catch(h){}return a}},1570:E=>{var C={}.toString;E.exports=function(A){return C.call(A).slice(8,-1)}},7499:(E,C,A)=>{var I=A(8889),g=A(1570),B=A(5712)("toStringTag"),Q=g(function(){return arguments}())=="Arguments";E.exports=I?g:function(e){var s,a,r;return e===void 0?"Undefined":e===null?"Null":typeof(a=function(h,c){try{return h[c]}catch(w){}}(s=Object(e),B))=="string"?a:Q?g(s):(r=g(s))=="Object"&&typeof s.callee=="function"?"Arguments":r}},1722:(E,C,A)=>{var I=A(5712)("match");E.exports=function(g){var B=/./;try{"/./"[g](B)}catch(Q){try{return B[I]=!1,"/./"[g](B)}catch(e){}}return!1}},872:(E,C,A)=>{var I=A(6530);E.exports=!I(function(){function g(){}return g.prototype.constructor=null,Object.getPrototypeOf(new g)!==g.prototype})},8611:(E,C,A)=>{"use strict";var I=A(7300).IteratorPrototype,g=A(2491),B=A(5595),Q=A(6738),e=A(9418),s=function(){return this};E.exports=function(a,r,h){var c=r+" Iterator";return a.prototype=g(I,{next:B(1,h)}),Q(a,c,!1,!0),e[c]=s,a}},8518:(E,C,A)=>{var I=A(7001),g=A(7550),B=A(5595);E.exports=I?function(Q,e,s){return g.f(Q,e,B(1,s))}:function(Q,e,s){return Q[e]=s,Q}},5595:E=>{E.exports=function(C,A){return{enumerable:!(1&C),configurable:!(2&C),writable:!(4&C),value:A}}},409:(E,C,A)=>{"use strict";var I=A(5623),g=A(7550),B=A(5595);E.exports=function(Q,e,s){var a=I(e);a in Q?g.f(Q,a,B(0,s)):Q[a]=s}},8277:(E,C,A)=>{"use strict";var I=A(390),g=A(8611),B=A(2629),Q=A(5255),e=A(6738),s=A(8518),a=A(9791),r=A(5712),h=A(8367),c=A(9418),w=A(7300),u=w.IteratorPrototype,N=w.BUGGY_SAFARI_ITERATORS,G=r("iterator"),l="keys",R="values",F="entries",D=function(){return this};E.exports=function(d,y,M,L,k,H,m){g(M,y,L);var x,P,q,K=function(z){if(z===k&&p)return p;if(!N&&z in S)return S[z];switch(z){case l:case R:case F:return function(){return new M(this,z)}}return function(){return new M(this)}},U=y+" Iterator",n=!1,S=d.prototype,v=S[G]||S["@@iterator"]||k&&S[k],p=!N&&v||K(k),J=y=="Array"&&S.entries||v;if(J&&(x=B(J.call(new d)),u!==Object.prototype&&x.next&&(h||B(x)===u||(Q?Q(x,u):typeof x[G]!="function"&&s(x,G,D)),e(x,U,!0,!0),h&&(c[U]=D))),k==R&&v&&v.name!==R&&(n=!0,p=function(){return v.call(this)}),h&&!m||S[G]===p||s(S,G,p),c[y]=p,k)if(P={values:K(R),keys:H?p:K(l),entries:K(F)},m)for(q in P)(N||n||!(q in S))&&a(S,q,P[q]);else I({target:y,proto:!0,forced:N||n},P);return P}},1412:(E,C,A)=>{var I=A(9081),g=A(6690),B=A(3379),Q=A(7550).f;E.exports=function(e){var s=I.Symbol||(I.Symbol={});g(s,e)||Q(s,e,{value:B.f(e)})}},7001:(E,C,A)=>{var I=A(6530);E.exports=!I(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},231:(E,C,A)=>{var I=A(2868),g=A(3359),B=I.document,Q=g(B)&&g(B.createElement);E.exports=function(e){return Q?B.createElement(e):{}}},315:E=>{E.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},6610:E=>{E.exports=typeof window=="object"},6405:(E,C,A)=>{var I=A(6900),g=A(2868);E.exports=/ipad|iphone|ipod/i.test(I)&&g.Pebble!==void 0},6540:(E,C,A)=>{var I=A(6900);E.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(I)},6521:(E,C,A)=>{var I=A(1570),g=A(2868);E.exports=I(g.process)=="process"},4010:(E,C,A)=>{var I=A(6900);E.exports=/web0s(?!.*chrome)/i.test(I)},6900:(E,C,A)=>{var I=A(8104);E.exports=I("navigator","userAgent")||""},8233:(E,C,A)=>{var I,g,B=A(2868),Q=A(6900),e=B.process,s=B.Deno,a=e&&e.versions||s&&s.version,r=a&&a.v8;r?g=(I=r.split("."))[0]<4?1:I[0]+I[1]:Q&&(!(I=Q.match(/Edge\/(\d+)/))||I[1]>=74)&&(I=Q.match(/Chrome\/(\d+)/))&&(g=I[1]),E.exports=g&&+g},2018:(E,C,A)=>{var I=A(9081);E.exports=function(g){return I[g+"Prototype"]}},2712:E=>{E.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},390:(E,C,A)=>{"use strict";var I=A(2868),g=A(5904).f,B=A(1011),Q=A(9081),e=A(7673),s=A(8518),a=A(6690),r=function(h){var c=function(w,u,N){if(this instanceof h){switch(arguments.length){case 0:return new h;case 1:return new h(w);case 2:return new h(w,u)}return new h(w,u,N)}return h.apply(this,arguments)};return c.prototype=h.prototype,c};E.exports=function(h,c){var w,u,N,G,l,R,F,D,d=h.target,y=h.global,M=h.stat,L=h.proto,k=y?I:M?I[d]:(I[d]||{}).prototype,H=y?Q:Q[d]||s(Q,d,{})[d],m=H.prototype;for(N in c)w=!B(y?N:d+(M?".":"#")+N,h.forced)&&k&&a(k,N),l=H[N],w&&(R=h.noTargetGet?(D=g(k,N))&&D.value:k[N]),G=w&&R?R:c[N],w&&typeof l==typeof G||(F=h.bind&&w?e(G,I):h.wrap&&w?r(G):L&&typeof G=="function"?e(Function.call,G):G,(h.sham||G&&G.sham||l&&l.sham)&&s(F,"sham",!0),s(H,N,F),L&&(a(Q,u=d+"Prototype")||s(Q,u,{}),s(Q[u],N,G),h.real&&m&&!m[N]&&s(m,N,G)))}},6530:E=>{E.exports=function(C){try{return!!C()}catch(A){return!0}}},7673:(E,C,A)=>{var I=A(9077);E.exports=function(g,B,Q){if(I(g),B===void 0)return g;switch(Q){case 0:return function(){return g.call(B)};case 1:return function(e){return g.call(B,e)};case 2:return function(e,s){return g.call(B,e,s)};case 3:return function(e,s,a){return g.call(B,e,s,a)}}return function(){return g.apply(B,arguments)}}},8104:(E,C,A)=>{var I=A(9081),g=A(2868),B=function(Q){return typeof Q=="function"?Q:void 0};E.exports=function(Q,e){return arguments.length<2?B(I[Q])||B(g[Q]):I[Q]&&I[Q][e]||g[Q]&&g[Q][e]}},5018:(E,C,A)=>{var I=A(7499),g=A(9418),B=A(5712)("iterator");E.exports=function(Q){if(Q!=null)return Q[B]||Q["@@iterator"]||g[I(Q)]}},5945:(E,C,A)=>{var I=A(1912),g=A(5018);E.exports=function(B,Q){var e=arguments.length<2?g(B):Q;if(typeof e!="function")throw TypeError(String(B)+" is not iterable");return I(e.call(B))}},2868:(E,C,A)=>{var I=function(g){return g&&g.Math==Math&&g};E.exports=I(typeof globalThis=="object"&&globalThis)||I(typeof window=="object"&&window)||I(typeof self=="object"&&self)||I(typeof A.g=="object"&&A.g)||function(){return this}()||Function("return this")()},6690:(E,C,A)=>{var I=A(2058),g={}.hasOwnProperty;E.exports=Object.hasOwn||function(B,Q){return g.call(I(B),Q)}},7048:E=>{E.exports={}},8471:(E,C,A)=>{var I=A(2868);E.exports=function(g,B){var Q=I.console;Q&&Q.error&&(arguments.length===1?Q.error(g):Q.error(g,B))}},5644:(E,C,A)=>{var I=A(8104);E.exports=I("document","documentElement")},640:(E,C,A)=>{var I=A(7001),g=A(6530),B=A(231);E.exports=!I&&!g(function(){return Object.defineProperty(B("div"),"a",{get:function(){return 7}}).a!=7})},1251:(E,C,A)=>{var I=A(6530),g=A(1570),B="".split;E.exports=I(function(){return!Object("z").propertyIsEnumerable(0)})?function(Q){return g(Q)=="String"?B.call(Q,""):Object(Q)}:Object},1494:(E,C,A)=>{var I=A(2656),g=Function.toString;typeof I.inspectSource!="function"&&(I.inspectSource=function(B){return g.call(B)}),E.exports=I.inspectSource},5875:(E,C,A)=>{var I,g,B,Q=A(2297),e=A(2868),s=A(3359),a=A(8518),r=A(6690),h=A(2656),c=A(5039),w=A(7048),u="Object already initialized",N=e.WeakMap;if(Q||h.state){var G=h.state||(h.state=new N),l=G.get,R=G.has,F=G.set;I=function(d,y){if(R.call(G,d))throw new TypeError(u);return y.facade=d,F.call(G,d,y),y},g=function(d){return l.call(G,d)||{}},B=function(d){return R.call(G,d)}}else{var D=c("state");w[D]=!0,I=function(d,y){if(r(d,D))throw new TypeError(u);return y.facade=d,a(d,D,y),y},g=function(d){return r(d,D)?d[D]:{}},B=function(d){return r(d,D)}}E.exports={set:I,get:g,has:B,enforce:function(d){return B(d)?g(d):I(d,{})},getterFor:function(d){return function(y){var M;if(!s(y)||(M=g(y)).type!==d)throw TypeError("Incompatible receiver, "+d+" required");return M}}}},6475:(E,C,A)=>{var I=A(5712),g=A(9418),B=I("iterator"),Q=Array.prototype;E.exports=function(e){return e!==void 0&&(g.Array===e||Q[B]===e)}},1054:(E,C,A)=>{var I=A(1570);E.exports=Array.isArray||function(g){return I(g)=="Array"}},1011:(E,C,A)=>{var I=A(6530),g=/#|\.prototype\./,B=function(r,h){var c=e[Q(r)];return c==a||c!=s&&(typeof h=="function"?I(h):!!h)},Q=B.normalize=function(r){return String(r).replace(g,".").toLowerCase()},e=B.data={},s=B.NATIVE="N",a=B.POLYFILL="P";E.exports=B},3359:E=>{E.exports=function(C){return typeof C=="object"?C!==null:typeof C=="function"}},8367:E=>{E.exports=!0},6858:(E,C,A)=>{var I=A(3359),g=A(1570),B=A(5712)("match");E.exports=function(Q){var e;return I(Q)&&((e=Q[B])!==void 0?!!e:g(Q)=="RegExp")}},1149:(E,C,A)=>{var I=A(8104),g=A(6046);E.exports=g?function(B){return typeof B=="symbol"}:function(B){var Q=I("Symbol");return typeof Q=="function"&&Object(B)instanceof Q}},3906:(E,C,A)=>{var I=A(1912),g=A(6475),B=A(3746),Q=A(7673),e=A(5945),s=A(5018),a=A(309),r=function(h,c){this.stopped=h,this.result=c};E.exports=function(h,c,w){var u,N,G,l,R,F,D,d=w&&w.that,y=!(!w||!w.AS_ENTRIES),M=!(!w||!w.IS_ITERATOR),L=!(!w||!w.INTERRUPTED),k=Q(c,d,1+y+L),H=function(x){return u&&a(u,"normal",x),new r(!0,x)},m=function(x){return y?(I(x),L?k(x[0],x[1],H):k(x[0],x[1])):L?k(x,H):k(x)};if(M)u=h;else{if(typeof(N=s(h))!="function")throw TypeError("Target is not iterable");if(g(N)){for(G=0,l=B(h.length);l>G;G++)if((R=m(h[G]))&&R instanceof r)return R;return new r(!1)}u=e(h,N)}for(F=u.next;!(D=F.call(u)).done;){try{R=m(D.value)}catch(x){a(u,"throw",x)}if(typeof R=="object"&&R&&R instanceof r)return R}return new r(!1)}},309:(E,C,A)=>{var I=A(1912);E.exports=function(g,B,Q){var e,s;I(g);try{if((e=g.return)===void 0){if(B==="throw")throw Q;return Q}e=e.call(g)}catch(a){s=!0,e=a}if(B==="throw")throw Q;if(s)throw e;return I(e),Q}},7300:(E,C,A)=>{"use strict";var I,g,B,Q=A(6530),e=A(2629),s=A(8518),a=A(6690),r=A(5712),h=A(8367),c=r("iterator"),w=!1;[].keys&&("next"in(B=[].keys())?(g=e(e(B)))!==Object.prototype&&(I=g):w=!0);var u=I==null||Q(function(){var N={};return I[c].call(N)!==N});u&&(I={}),h&&!u||a(I,c)||s(I,c,function(){return this}),E.exports={IteratorPrototype:I,BUGGY_SAFARI_ITERATORS:w}},9418:E=>{E.exports={}},8054:(E,C,A)=>{var I,g,B,Q,e,s,a,r,h=A(2868),c=A(5904).f,w=A(6569).set,u=A(6540),N=A(6405),G=A(4010),l=A(6521),R=h.MutationObserver||h.WebKitMutationObserver,F=h.document,D=h.process,d=h.Promise,y=c(h,"queueMicrotask"),M=y&&y.value;M||(I=function(){var L,k;for(l&&(L=D.domain)&&L.exit();g;){k=g.fn,g=g.next;try{k()}catch(H){throw g?Q():B=void 0,H}}B=void 0,L&&L.enter()},u||l||G||!R||!F?!N&&d&&d.resolve?((a=d.resolve(void 0)).constructor=d,r=a.then,Q=function(){r.call(a,I)}):Q=l?function(){D.nextTick(I)}:function(){w.call(h,I)}:(e=!0,s=F.createTextNode(""),new R(I).observe(s,{characterData:!0}),Q=function(){s.data=e=!e})),E.exports=M||function(L){var k={fn:L,next:void 0};B&&(B.next=k),g||(g=k,Q()),B=k}},3104:(E,C,A)=>{var I=A(2868);E.exports=I.Promise},3216:(E,C,A)=>{var I=A(8233),g=A(6530);E.exports=!!Object.getOwnPropertySymbols&&!g(function(){var B=Symbol();return!String(B)||!(Object(B)instanceof Symbol)||!Symbol.sham&&I&&I<41})},2297:(E,C,A)=>{var I=A(2868),g=A(1494),B=I.WeakMap;E.exports=typeof B=="function"&&/native code/.test(g(B))},4130:(E,C,A)=>{"use strict";var I=A(9077),g=function(B){var Q,e;this.promise=new B(function(s,a){if(Q!==void 0||e!==void 0)throw TypeError("Bad Promise constructor");Q=s,e=a}),this.resolve=I(Q),this.reject=I(e)};E.exports.f=function(B){return new g(B)}},9611:(E,C,A)=>{var I=A(6858);E.exports=function(g){if(I(g))throw TypeError("The method doesn't accept regular expressions");return g}},3210:(E,C,A)=>{"use strict";var I=A(7001),g=A(6530),B=A(461),Q=A(3764),e=A(1156),s=A(2058),a=A(1251),r=Object.assign,h=Object.defineProperty;E.exports=!r||g(function(){if(I&&r({b:1},r(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var c={},w={},u=Symbol(),N="abcdefghijklmnopqrst";return c[u]=7,N.split("").forEach(function(G){w[G]=G}),r({},c)[u]!=7||B(r({},w)).join("")!=N})?function(c,w){for(var u=s(c),N=arguments.length,G=1,l=Q.f,R=e.f;N>G;)for(var F,D=a(arguments[G++]),d=l?B(D).concat(l(D)):B(D),y=d.length,M=0;y>M;)F=d[M++],I&&!R.call(D,F)||(u[F]=D[F]);return u}:r},2491:(E,C,A)=>{var I,g=A(1912),B=A(4686),Q=A(2712),e=A(7048),s=A(5644),a=A(231),r=A(5039),h=r("IE_PROTO"),c=function(){},w=function(G){return""},u=function(G){G.write(w("")),G.close();var l=G.parentWindow.Object;return G=null,l},N=function(){try{I=new ActiveXObject("htmlfile")}catch(F){}var G,l;N=typeof document!="undefined"?document.domain&&I?u(I):((l=a("iframe")).style.display="none",s.appendChild(l),l.src=String("javascript:"),(G=l.contentWindow.document).open(),G.write(w("document.F=Object")),G.close(),G.F):u(I);for(var R=Q.length;R--;)delete N.prototype[Q[R]];return N()};e[h]=!0,E.exports=Object.create||function(G,l){var R;return G!==null?(c.prototype=g(G),R=new c,c.prototype=null,R[h]=G):R=N(),l===void 0?R:B(R,l)}},4686:(E,C,A)=>{var I=A(7001),g=A(7550),B=A(1912),Q=A(461);E.exports=I?Object.defineProperties:function(e,s){B(e);for(var a,r=Q(s),h=r.length,c=0;h>c;)g.f(e,a=r[c++],s[a]);return e}},7550:(E,C,A)=>{var I=A(7001),g=A(640),B=A(1912),Q=A(5623),e=Object.defineProperty;C.f=I?e:function(s,a,r){if(B(s),a=Q(a),B(r),g)try{return e(s,a,r)}catch(h){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(s[a]=r.value),s}},5904:(E,C,A)=>{var I=A(7001),g=A(1156),B=A(5595),Q=A(3861),e=A(5623),s=A(6690),a=A(640),r=Object.getOwnPropertyDescriptor;C.f=I?r:function(h,c){if(h=Q(h),c=e(c),a)try{return r(h,c)}catch(w){}if(s(h,c))return B(!g.f.call(h,c),h[c])}},6159:(E,C,A)=>{var I=A(3861),g=A(9035).f,B={}.toString,Q=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];E.exports.f=function(e){return Q&&B.call(e)=="[object Window]"?function(s){try{return g(s)}catch(a){return Q.slice()}}(e):g(I(e))}},9035:(E,C,A)=>{var I=A(1247),g=A(2712).concat("length","prototype");C.f=Object.getOwnPropertyNames||function(B){return I(B,g)}},3764:(E,C)=>{C.f=Object.getOwnPropertySymbols},2629:(E,C,A)=>{var I=A(6690),g=A(2058),B=A(5039),Q=A(872),e=B("IE_PROTO"),s=Object.prototype;E.exports=Q?Object.getPrototypeOf:function(a){return a=g(a),I(a,e)?a[e]:typeof a.constructor=="function"&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?s:null}},1247:(E,C,A)=>{var I=A(6690),g=A(3861),B=A(7075).indexOf,Q=A(7048);E.exports=function(e,s){var a,r=g(e),h=0,c=[];for(a in r)!I(Q,a)&&I(r,a)&&c.push(a);for(;s.length>h;)I(r,a=s[h++])&&(~B(c,a)||c.push(a));return c}},461:(E,C,A)=>{var I=A(1247),g=A(2712);E.exports=Object.keys||function(B){return I(B,g)}},1156:(E,C)=>{"use strict";var A={}.propertyIsEnumerable,I=Object.getOwnPropertyDescriptor,g=I&&!A.call({1:2},1);C.f=g?function(B){var Q=I(this,B);return!!Q&&Q.enumerable}:A},5255:(E,C,A)=>{var I=A(1912),g=A(9154);E.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var B,Q=!1,e={};try{(B=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),Q=e instanceof Array}catch(s){}return function(s,a){return I(s),g(a),Q?B.call(s,a):s.__proto__=a,s}}():void 0)},3895:(E,C,A)=>{var I=A(7001),g=A(461),B=A(3861),Q=A(1156).f,e=function(s){return function(a){for(var r,h=B(a),c=g(h),w=c.length,u=0,N=[];w>u;)r=c[u++],I&&!Q.call(h,r)||N.push(s?[r,h[r]]:h[r]);return N}};E.exports={entries:e(!0),values:e(!1)}},2204:(E,C,A)=>{"use strict";var I=A(8889),g=A(7499);E.exports=I?{}.toString:function(){return"[object "+g(this)+"]"}},9466:(E,C,A)=>{var I=A(3359);E.exports=function(g,B){var Q,e;if(B==="string"&&typeof(Q=g.toString)=="function"&&!I(e=Q.call(g))||typeof(Q=g.valueOf)=="function"&&!I(e=Q.call(g))||B!=="string"&&typeof(Q=g.toString)=="function"&&!I(e=Q.call(g)))return e;throw TypeError("Can't convert object to primitive value")}},5340:(E,C,A)=>{var I=A(8104),g=A(9035),B=A(3764),Q=A(1912);E.exports=I("Reflect","ownKeys")||function(e){var s=g.f(Q(e)),a=B.f;return a?s.concat(a(e)):s}},9081:E=>{E.exports={}},4618:E=>{E.exports=function(C){try{return{error:!1,value:C()}}catch(A){return{error:!0,value:A}}}},4567:(E,C,A)=>{var I=A(1912),g=A(3359),B=A(4130);E.exports=function(Q,e){if(I(Q),g(e)&&e.constructor===Q)return e;var s=B.f(Q);return(0,s.resolve)(e),s.promise}},9248:(E,C,A)=>{var I=A(9791);E.exports=function(g,B,Q){for(var e in B)Q&&Q.unsafe&&g[e]?g[e]=B[e]:I(g,e,B[e],Q);return g}},9791:(E,C,A)=>{var I=A(8518);E.exports=function(g,B,Q,e){e&&e.enumerable?g[B]=Q:I(g,B,Q)}},4980:(E,C,A)=>{"use strict";var I=A(1912);E.exports=function(){var g=I(this),B="";return g.global&&(B+="g"),g.ignoreCase&&(B+="i"),g.multiline&&(B+="m"),g.dotAll&&(B+="s"),g.unicode&&(B+="u"),g.sticky&&(B+="y"),B}},3604:E=>{E.exports=function(C){if(C==null)throw TypeError("Can't call method on "+C);return C}},2643:(E,C,A)=>{var I=A(2868);E.exports=function(g,B){try{Object.defineProperty(I,g,{value:B,configurable:!0,writable:!0})}catch(Q){I[g]=B}return B}},2655:(E,C,A)=>{"use strict";var I=A(8104),g=A(7550),B=A(5712),Q=A(7001),e=B("species");E.exports=function(s){var a=I(s),r=g.f;Q&&a&&!a[e]&&r(a,e,{configurable:!0,get:function(){return this}})}},6738:(E,C,A)=>{var I=A(8889),g=A(7550).f,B=A(8518),Q=A(6690),e=A(2204),s=A(5712)("toStringTag");E.exports=function(a,r,h,c){if(a){var w=h?a:a.prototype;Q(w,s)||g(w,s,{configurable:!0,value:r}),c&&!I&&B(w,"toString",e)}}},5039:(E,C,A)=>{var I=A(6315),g=A(9),B=I("keys");E.exports=function(Q){return B[Q]||(B[Q]=g(Q))}},2656:(E,C,A)=>{var I=A(2868),g=A(2643),B="__core-js_shared__",Q=I[B]||g(B,{});E.exports=Q},6315:(E,C,A)=>{var I=A(8367),g=A(2656);(E.exports=function(B,Q){return g[B]||(g[B]=Q!==void 0?Q:{})})("versions",[]).push({version:"3.17.2",mode:I?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},5462:(E,C,A)=>{var I=A(1912),g=A(9077),B=A(5712)("species");E.exports=function(Q,e){var s,a=I(Q).constructor;return a===void 0||(s=I(a)[B])==null?e:g(s)}},1420:(E,C,A)=>{var I=A(1470),g=A(5264),B=A(3604),Q=function(e){return function(s,a){var r,h,c=g(B(s)),w=I(a),u=c.length;return w<0||w>=u?e?"":void 0:(r=c.charCodeAt(w))<55296||r>56319||w+1===u||(h=c.charCodeAt(w+1))<56320||h>57343?e?c.charAt(w):r:e?c.slice(w,w+2):h-56320+(r-55296<<10)+65536}};E.exports={codeAt:Q(!1),charAt:Q(!0)}},9787:(E,C,A)=>{var I=A(6530),g=A(3781);E.exports=function(B){return I(function(){return!!g[B]()||"\u200B\x85\u180E"[B]()!="\u200B\x85\u180E"||g[B].name!==B})}},774:(E,C,A)=>{var I=A(3604),g=A(5264),B="["+A(3781)+"]",Q=RegExp("^"+B+B+"*"),e=RegExp(B+B+"*$"),s=function(a){return function(r){var h=g(I(r));return 1&a&&(h=h.replace(Q,"")),2&a&&(h=h.replace(e,"")),h}};E.exports={start:s(1),end:s(2),trim:s(3)}},6569:(E,C,A)=>{var I,g,B,Q,e=A(2868),s=A(6530),a=A(7673),r=A(5644),h=A(231),c=A(6540),w=A(6521),u=e.setImmediate,N=e.clearImmediate,G=e.process,l=e.MessageChannel,R=e.Dispatch,F=0,D={},d="onreadystatechange";try{I=e.location}catch(H){}var y=function(H){if(D.hasOwnProperty(H)){var m=D[H];delete D[H],m()}},M=function(H){return function(){y(H)}},L=function(H){y(H.data)},k=function(H){e.postMessage(String(H),I.protocol+"//"+I.host)};u&&N||(u=function(H){for(var m=[],x=arguments.length,P=1;x>P;)m.push(arguments[P++]);return D[++F]=function(){(typeof H=="function"?H:Function(H)).apply(void 0,m)},g(F),F},N=function(H){delete D[H]},w?g=function(H){G.nextTick(M(H))}:R&&R.now?g=function(H){R.now(M(H))}:l&&!c?(Q=(B=new l).port2,B.port1.onmessage=L,g=a(Q.postMessage,Q,1)):e.addEventListener&&typeof postMessage=="function"&&!e.importScripts&&I&&I.protocol!=="file:"&&!s(k)?(g=k,e.addEventListener("message",L,!1)):g=d in h("script")?function(H){r.appendChild(h("script")).onreadystatechange=function(){r.removeChild(this),y(H)}}:function(H){setTimeout(M(H),0)}),E.exports={set:u,clear:N}},3055:(E,C,A)=>{var I=A(1470),g=Math.max,B=Math.min;E.exports=function(Q,e){var s=I(Q);return s<0?g(s+e,0):B(s,e)}},3861:(E,C,A)=>{var I=A(1251),g=A(3604);E.exports=function(B){return I(g(B))}},1470:E=>{var C=Math.ceil,A=Math.floor;E.exports=function(I){return isNaN(I=+I)?0:(I>0?A:C)(I)}},3746:(E,C,A)=>{var I=A(1470),g=Math.min;E.exports=function(B){return B>0?g(I(B),9007199254740991):0}},2058:(E,C,A)=>{var I=A(3604);E.exports=function(g){return Object(I(g))}},3957:(E,C,A)=>{var I=A(3359),g=A(1149),B=A(9466),Q=A(5712)("toPrimitive");E.exports=function(e,s){if(!I(e)||g(e))return e;var a,r=e[Q];if(r!==void 0){if(s===void 0&&(s="default"),a=r.call(e,s),!I(a)||g(a))return a;throw TypeError("Can't convert object to primitive value")}return s===void 0&&(s="number"),B(e,s)}},5623:(E,C,A)=>{var I=A(3957),g=A(1149);E.exports=function(B){var Q=I(B,"string");return g(Q)?Q:String(Q)}},8889:(E,C,A)=>{var I={};I[A(5712)("toStringTag")]="z",E.exports=String(I)==="[object z]"},5264:(E,C,A)=>{var I=A(1149);E.exports=function(g){if(I(g))throw TypeError("Cannot convert a Symbol value to a string");return String(g)}},9:E=>{var C=0,A=Math.random();E.exports=function(I){return"Symbol("+String(I===void 0?"":I)+")_"+(++C+A).toString(36)}},6046:(E,C,A)=>{var I=A(3216);E.exports=I&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},3379:(E,C,A)=>{var I=A(5712);C.f=I},5712:(E,C,A)=>{var I=A(2868),g=A(6315),B=A(6690),Q=A(9),e=A(3216),s=A(6046),a=g("wks"),r=I.Symbol,h=s?r:r&&r.withoutSetter||Q;E.exports=function(c){return B(a,c)&&(e||typeof a[c]=="string")||(e&&B(r,c)?a[c]=r[c]:a[c]=h("Symbol."+c)),a[c]}},3781:E=>{E.exports=` \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},6454:(E,C,A)=>{"use strict";var I=A(390),g=A(2629),B=A(5255),Q=A(2491),e=A(8518),s=A(5595),a=A(3906),r=A(5264),h=function(c,w){var u=this;if(!(u instanceof h))return new h(c,w);B&&(u=B(new Error(void 0),g(u))),w!==void 0&&e(u,"message",r(w));var N=[];return a(c,N.push,{that:N}),e(u,"errors",N),u};h.prototype=Q(Error.prototype,{constructor:s(5,h),message:s(5,""),name:s(5,"AggregateError")}),I({global:!0},{AggregateError:h})},3075:(E,C,A)=>{"use strict";var I=A(390),g=A(6530),B=A(1054),Q=A(3359),e=A(2058),s=A(3746),a=A(409),r=A(8136),h=A(2143),c=A(5712),w=A(8233),u=c("isConcatSpreadable"),N=9007199254740991,G="Maximum allowed index exceeded",l=w>=51||!g(function(){var D=[];return D[u]=!1,D.concat()[0]!==D}),R=h("concat"),F=function(D){if(!Q(D))return!1;var d=D[u];return d!==void 0?!!d:B(D)};I({target:"Array",proto:!0,forced:!l||!R},{concat:function(D){var d,y,M,L,k,H=e(this),m=r(H,0),x=0;for(d=-1,M=arguments.length;dN)throw TypeError(G);for(y=0;y=N)throw TypeError(G);a(m,x++,k)}return m.length=x,m}})},8345:(E,C,A)=>{"use strict";var I=A(390),g=A(4206).filter;I({target:"Array",proto:!0,forced:!A(2143)("filter")},{filter:function(B){return g(this,B,arguments.length>1?arguments[1]:void 0)}})},2166:(E,C,A)=>{var I=A(390),g=A(4746);I({target:"Array",stat:!0,forced:!A(8908)(function(B){Array.from(B)})},{from:g})},7670:(E,C,A)=>{"use strict";var I=A(390),g=A(7075).includes,B=A(7710);I({target:"Array",proto:!0},{includes:function(Q){return g(this,Q,arguments.length>1?arguments[1]:void 0)}}),B("includes")},194:(E,C,A)=>{"use strict";var I=A(390),g=A(7075).indexOf,B=A(6628),Q=[].indexOf,e=!!Q&&1/[1].indexOf(1,-0)<0,s=B("indexOf");I({target:"Array",proto:!0,forced:e||!s},{indexOf:function(a){return e?Q.apply(this,arguments)||0:g(this,a,arguments.length>1?arguments[1]:void 0)}})},9506:(E,C,A)=>{A(390)({target:"Array",stat:!0},{isArray:A(1054)})},2228:(E,C,A)=>{"use strict";var I=A(3861),g=A(7710),B=A(9418),Q=A(5875),e=A(8277),s="Array Iterator",a=Q.set,r=Q.getterFor(s);E.exports=e(Array,"Array",function(h,c){a(this,{type:s,target:I(h),index:0,kind:c})},function(){var h=r(this),c=h.target,w=h.kind,u=h.index++;return!c||u>=c.length?(h.target=void 0,{value:void 0,done:!0}):w=="keys"?{value:u,done:!1}:w=="values"?{value:c[u],done:!1}:{value:[u,c[u]],done:!1}},"values"),B.Arguments=B.Array,g("keys"),g("values"),g("entries")},2478:(E,C,A)=>{"use strict";var I=A(390),g=A(4206).map;I({target:"Array",proto:!0,forced:!A(2143)("map")},{map:function(B){return g(this,B,arguments.length>1?arguments[1]:void 0)}})},5313:(E,C,A)=>{"use strict";var I=A(390),g=A(3359),B=A(1054),Q=A(3055),e=A(3746),s=A(3861),a=A(409),r=A(5712),h=A(2143)("slice"),c=r("species"),w=[].slice,u=Math.max;I({target:"Array",proto:!0,forced:!h},{slice:function(N,G){var l,R,F,D=s(this),d=e(D.length),y=Q(N,d),M=Q(G===void 0?d:G,d);if(B(D)&&(typeof(l=D.constructor)!="function"||l!==Array&&!B(l.prototype)?g(l)&&(l=l[c])===null&&(l=void 0):l=void 0,l===Array||l===void 0))return w.call(D,y,M);for(R=new(l===void 0?Array:l)(u(M-y,0)),F=0;y{"use strict";var I=A(390),g=A(3055),B=A(1470),Q=A(3746),e=A(2058),s=A(8136),a=A(409),r=A(2143)("splice"),h=Math.max,c=Math.min,w=9007199254740991,u="Maximum allowed length exceeded";I({target:"Array",proto:!0,forced:!r},{splice:function(N,G){var l,R,F,D,d,y,M=e(this),L=Q(M.length),k=g(N,L),H=arguments.length;if(H===0?l=R=0:H===1?(l=0,R=L-k):(l=H-2,R=c(h(B(G),0),L-k)),L+l-R>w)throw TypeError(u);for(F=s(M,R),D=0;DL-R+l;D--)delete M[D-1]}else if(l>R)for(D=L-R;D>k;D--)y=D+l-1,(d=D+R-1)in M?M[y]=M[d]:delete M[y];for(D=0;D{var I=A(2868);A(6738)(I.JSON,"JSON",!0)},1227:()=>{},8524:(E,C,A)=>{var I=A(390),g=A(3210);I({target:"Object",stat:!0,forced:Object.assign!==g},{assign:g})},6764:(E,C,A)=>{var I=A(390),g=A(7001);I({target:"Object",stat:!0,forced:!g,sham:!g},{defineProperty:A(7550).f})},9398:(E,C,A)=>{var I=A(390),g=A(3895).entries;I({target:"Object",stat:!0},{entries:function(B){return g(B)}})},554:(E,C,A)=>{var I=A(390),g=A(6530),B=A(3861),Q=A(5904).f,e=A(7001),s=g(function(){Q(1)});I({target:"Object",stat:!0,forced:!e||s,sham:!e},{getOwnPropertyDescriptor:function(a,r){return Q(B(a),r)}})},4267:(E,C,A)=>{var I=A(390),g=A(7001),B=A(5340),Q=A(3861),e=A(5904),s=A(409);I({target:"Object",stat:!0,sham:!g},{getOwnPropertyDescriptors:function(a){for(var r,h,c=Q(a),w=e.f,u=B(c),N={},G=0;u.length>G;)(h=w(c,r=u[G++]))!==void 0&&s(N,r,h);return N}})},8390:(E,C,A)=>{var I=A(390),g=A(2058),B=A(461);I({target:"Object",stat:!0,forced:A(6530)(function(){B(1)})},{keys:function(Q){return B(g(Q))}})},2575:()=>{},1171:(E,C,A)=>{var I=A(390),g=A(3895).values;I({target:"Object",stat:!0},{values:function(B){return g(B)}})},4465:(E,C,A)=>{"use strict";var I=A(390),g=A(9077),B=A(4130),Q=A(4618),e=A(3906);I({target:"Promise",stat:!0},{allSettled:function(s){var a=this,r=B.f(a),h=r.resolve,c=r.reject,w=Q(function(){var u=g(a.resolve),N=[],G=0,l=1;e(s,function(R){var F=G++,D=!1;N.push(void 0),l++,u.call(a,R).then(function(d){D||(D=!0,N[F]={status:"fulfilled",value:d},--l||h(N))},function(d){D||(D=!0,N[F]={status:"rejected",reason:d},--l||h(N))})}),--l||h(N)});return w.error&&c(w.value),r.promise}})},8359:(E,C,A)=>{"use strict";var I=A(390),g=A(9077),B=A(8104),Q=A(4130),e=A(4618),s=A(3906),a="No one promise resolved";I({target:"Promise",stat:!0},{any:function(r){var h=this,c=Q.f(h),w=c.resolve,u=c.reject,N=e(function(){var G=g(h.resolve),l=[],R=0,F=1,D=!1;s(r,function(d){var y=R++,M=!1;l.push(void 0),F++,G.call(h,d).then(function(L){M||D||(D=!0,w(L))},function(L){M||D||(M=!0,l[y]=L,--F||u(new(B("AggregateError"))(l,a)))})}),--F||u(new(B("AggregateError"))(l,a))});return N.error&&u(N.value),c.promise}})},5203:(E,C,A)=>{"use strict";var I=A(390),g=A(8367),B=A(3104),Q=A(6530),e=A(8104),s=A(5462),a=A(4567),r=A(9791);if(I({target:"Promise",proto:!0,real:!0,forced:!!B&&Q(function(){B.prototype.finally.call({then:function(){}},function(){})})},{finally:function(c){var w=s(this,e("Promise")),u=typeof c=="function";return this.then(u?function(N){return a(w,c()).then(function(){return N})}:c,u?function(N){return a(w,c()).then(function(){throw N})}:c)}}),!g&&typeof B=="function"){var h=e("Promise").prototype.finally;B.prototype.finally!==h&&r(B.prototype,"finally",h,{unsafe:!0})}},3658:(E,C,A)=>{"use strict";var I,g,B,Q,e=A(390),s=A(8367),a=A(2868),r=A(8104),h=A(3104),c=A(9791),w=A(9248),u=A(5255),N=A(6738),G=A(2655),l=A(3359),R=A(9077),F=A(8792),D=A(1494),d=A(3906),y=A(8908),M=A(5462),L=A(6569).set,k=A(8054),H=A(4567),m=A(8471),x=A(4130),P=A(4618),q=A(5875),K=A(1011),U=A(5712),n=A(6610),S=A(6521),v=A(8233),p=U("species"),J="Promise",z=q.get,_=q.set,j=q.getterFor(J),O=h&&h.prototype,eA=h,iA=O,$=a.TypeError,aA=a.document,cA=a.process,CA=x.f,tA=CA,lA=!!(aA&&aA.createEvent&&a.dispatchEvent),yA=typeof PromiseRejectionEvent=="function",JA="unhandledrejection",bA=!1,NA=K(J,function(){var DA=D(eA),MA=DA!==String(eA);if(!MA&&v===66||s&&!iA.finally)return!0;if(v>=51&&/native code/.test(DA))return!1;var RA=new eA(function(GA){GA(1)}),wA=function(GA){GA(function(){},function(){})};return(RA.constructor={})[p]=wA,!(bA=RA.then(function(){})instanceof wA)||!MA&&n&&!yA}),LA=NA||!y(function(DA){eA.all(DA).catch(function(){})}),b=function(DA){var MA;return!(!l(DA)||typeof(MA=DA.then)!="function")&&MA},T=function(DA,MA){if(!DA.notified){DA.notified=!0;var RA=DA.reactions;k(function(){for(var wA=DA.value,GA=DA.state==1,UA=0;RA.length>UA;){var pA,ZA,II,gI=RA[UA++],eI=GA?gI.ok:gI.fail,dI=gI.resolve,iI=gI.reject,nI=gI.domain;try{eI?(GA||(DA.rejection===2&&oA(DA),DA.rejection=1),eI===!0?pA=wA:(nI&&nI.enter(),pA=eI(wA),nI&&(nI.exit(),II=!0)),pA===gI.promise?iI($("Promise-chain cycle")):(ZA=b(pA))?ZA.call(pA,dI,iI):dI(pA)):iI(wA)}catch(WI){nI&&!II&&nI.exit(),iI(WI)}}DA.reactions=[],DA.notified=!1,MA&&!DA.rejection&&AA(DA)})}},EA=function(DA,MA,RA){var wA,GA;lA?((wA=aA.createEvent("Event")).promise=MA,wA.reason=RA,wA.initEvent(DA,!1,!0),a.dispatchEvent(wA)):wA={promise:MA,reason:RA},!yA&&(GA=a["on"+DA])?GA(wA):DA===JA&&m("Unhandled promise rejection",RA)},AA=function(DA){L.call(a,function(){var MA,RA=DA.facade,wA=DA.value;if(IA(DA)&&(MA=P(function(){S?cA.emit("unhandledRejection",wA,RA):EA(JA,RA,wA)}),DA.rejection=S||IA(DA)?2:1,MA.error))throw MA.value})},IA=function(DA){return DA.rejection!==1&&!DA.parent},oA=function(DA){L.call(a,function(){var MA=DA.facade;S?cA.emit("rejectionHandled",MA):EA("rejectionhandled",MA,DA.value)})},FA=function(DA,MA,RA){return function(wA){DA(MA,wA,RA)}},KA=function(DA,MA,RA){DA.done||(DA.done=!0,RA&&(DA=RA),DA.value=MA,DA.state=2,T(DA,!0))},qA=function(DA,MA,RA){if(!DA.done){DA.done=!0,RA&&(DA=RA);try{if(DA.facade===MA)throw $("Promise can't be resolved itself");var wA=b(MA);wA?k(function(){var GA={done:!1};try{wA.call(MA,FA(qA,GA,DA),FA(KA,GA,DA))}catch(UA){KA(GA,UA,DA)}}):(DA.value=MA,DA.state=1,T(DA,!1))}catch(GA){KA({done:!1},GA,DA)}}};if(NA&&(iA=(eA=function(DA){F(this,eA,J),R(DA),I.call(this);var MA=z(this);try{DA(FA(qA,MA),FA(KA,MA))}catch(RA){KA(MA,RA)}}).prototype,(I=function(DA){_(this,{type:J,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=w(iA,{then:function(DA,MA){var RA=j(this),wA=CA(M(this,eA));return wA.ok=typeof DA!="function"||DA,wA.fail=typeof MA=="function"&&MA,wA.domain=S?cA.domain:void 0,RA.parent=!0,RA.reactions.push(wA),RA.state!=0&&T(RA,!1),wA.promise},catch:function(DA){return this.then(void 0,DA)}}),g=function(){var DA=new I,MA=z(DA);this.promise=DA,this.resolve=FA(qA,MA),this.reject=FA(KA,MA)},x.f=CA=function(DA){return DA===eA||DA===B?new g(DA):tA(DA)},!s&&typeof h=="function"&&O!==Object.prototype)){Q=O.then,bA||(c(O,"then",function(DA,MA){var RA=this;return new eA(function(wA,GA){Q.call(RA,wA,GA)}).then(DA,MA)},{unsafe:!0}),c(O,"catch",iA.catch,{unsafe:!0}));try{delete O.constructor}catch(DA){}u&&u(O,iA)}e({global:!0,wrap:!0,forced:NA},{Promise:eA}),N(eA,J,!1,!0),G(J),B=r(J),e({target:J,stat:!0,forced:NA},{reject:function(DA){var MA=CA(this);return MA.reject.call(void 0,DA),MA.promise}}),e({target:J,stat:!0,forced:s||NA},{resolve:function(DA){return H(s&&this===B?eA:this,DA)}}),e({target:J,stat:!0,forced:LA},{all:function(DA){var MA=this,RA=CA(MA),wA=RA.resolve,GA=RA.reject,UA=P(function(){var pA=R(MA.resolve),ZA=[],II=0,gI=1;d(DA,function(eI){var dI=II++,iI=!1;ZA.push(void 0),gI++,pA.call(MA,eI).then(function(nI){iI||(iI=!0,ZA[dI]=nI,--gI||wA(ZA))},GA)}),--gI||wA(ZA)});return UA.error&&GA(UA.value),RA.promise},race:function(DA){var MA=this,RA=CA(MA),wA=RA.reject,GA=P(function(){var UA=R(MA.resolve);d(DA,function(pA){UA.call(MA,pA).then(RA.resolve,wA)})});return GA.error&&wA(GA.value),RA.promise}})},6268:()=>{},8714:()=>{},688:(E,C,A)=>{"use strict";var I=A(390),g=A(9611),B=A(3604),Q=A(5264);I({target:"String",proto:!0,forced:!A(1722)("includes")},{includes:function(e){return!!~Q(B(this)).indexOf(Q(g(e)),arguments.length>1?arguments[1]:void 0)}})},8109:(E,C,A)=>{"use strict";var I=A(1420).charAt,g=A(5264),B=A(5875),Q=A(8277),e="String Iterator",s=B.set,a=B.getterFor(e);Q(String,"String",function(r){s(this,{type:e,string:g(r),index:0})},function(){var r,h=a(this),c=h.string,w=h.index;return w>=c.length?{value:void 0,done:!0}:(r=I(c,w),h.index+=r.length,{value:r,done:!1})})},8217:(E,C,A)=>{"use strict";var I=A(390),g=A(774).trim;I({target:"String",proto:!0,forced:A(9787)("trim")},{trim:function(){return g(this)}})},5762:(E,C,A)=>{A(1412)("asyncIterator")},2181:()=>{},8848:(E,C,A)=>{A(1412)("hasInstance")},3719:(E,C,A)=>{A(1412)("isConcatSpreadable")},2362:(E,C,A)=>{A(1412)("iterator")},8318:(E,C,A)=>{"use strict";var I=A(390),g=A(2868),B=A(8104),Q=A(8367),e=A(7001),s=A(3216),a=A(6530),r=A(6690),h=A(1054),c=A(3359),w=A(1149),u=A(1912),N=A(2058),G=A(3861),l=A(5623),R=A(5264),F=A(5595),D=A(2491),d=A(461),y=A(9035),M=A(6159),L=A(3764),k=A(5904),H=A(7550),m=A(1156),x=A(8518),P=A(9791),q=A(6315),K=A(5039),U=A(7048),n=A(9),S=A(5712),v=A(3379),p=A(1412),J=A(6738),z=A(5875),_=A(4206).forEach,j=K("hidden"),O="Symbol",eA=S("toPrimitive"),iA=z.set,$=z.getterFor(O),aA=Object.prototype,cA=g.Symbol,CA=B("JSON","stringify"),tA=k.f,lA=H.f,yA=M.f,JA=m.f,bA=q("symbols"),NA=q("op-symbols"),LA=q("string-to-symbol-registry"),b=q("symbol-to-string-registry"),T=q("wks"),EA=g.QObject,AA=!EA||!EA.prototype||!EA.prototype.findChild,IA=e&&a(function(){return D(lA({},"a",{get:function(){return lA(this,"a",{value:7}).a}})).a!=7})?function(wA,GA,UA){var pA=tA(aA,GA);pA&&delete aA[GA],lA(wA,GA,UA),pA&&wA!==aA&&lA(aA,GA,pA)}:lA,oA=function(wA,GA){var UA=bA[wA]=D(cA.prototype);return iA(UA,{type:O,tag:wA,description:GA}),e||(UA.description=GA),UA},FA=function(wA,GA,UA){wA===aA&&FA(NA,GA,UA),u(wA);var pA=l(GA);return u(UA),r(bA,pA)?(UA.enumerable?(r(wA,j)&&wA[j][pA]&&(wA[j][pA]=!1),UA=D(UA,{enumerable:F(0,!1)})):(r(wA,j)||lA(wA,j,F(1,{})),wA[j][pA]=!0),IA(wA,pA,UA)):lA(wA,pA,UA)},KA=function(wA,GA){u(wA);var UA=G(GA),pA=d(UA).concat(RA(UA));return _(pA,function(ZA){e&&!qA.call(UA,ZA)||FA(wA,ZA,UA[ZA])}),wA},qA=function(wA){var GA=l(wA),UA=JA.call(this,GA);return!(this===aA&&r(bA,GA)&&!r(NA,GA))&&(!(UA||!r(this,GA)||!r(bA,GA)||r(this,j)&&this[j][GA])||UA)},DA=function(wA,GA){var UA=G(wA),pA=l(GA);if(UA!==aA||!r(bA,pA)||r(NA,pA)){var ZA=tA(UA,pA);return!ZA||!r(bA,pA)||r(UA,j)&&UA[j][pA]||(ZA.enumerable=!0),ZA}},MA=function(wA){var GA=yA(G(wA)),UA=[];return _(GA,function(pA){r(bA,pA)||r(U,pA)||UA.push(pA)}),UA},RA=function(wA){var GA=wA===aA,UA=yA(GA?NA:G(wA)),pA=[];return _(UA,function(ZA){!r(bA,ZA)||GA&&!r(aA,ZA)||pA.push(bA[ZA])}),pA};s||(P((cA=function(){if(this instanceof cA)throw TypeError("Symbol is not a constructor");var wA=arguments.length&&arguments[0]!==void 0?R(arguments[0]):void 0,GA=n(wA),UA=function(pA){this===aA&&UA.call(NA,pA),r(this,j)&&r(this[j],GA)&&(this[j][GA]=!1),IA(this,GA,F(1,pA))};return e&&AA&&IA(aA,GA,{configurable:!0,set:UA}),oA(GA,wA)}).prototype,"toString",function(){return $(this).tag}),P(cA,"withoutSetter",function(wA){return oA(n(wA),wA)}),m.f=qA,H.f=FA,k.f=DA,y.f=M.f=MA,L.f=RA,v.f=function(wA){return oA(S(wA),wA)},e&&(lA(cA.prototype,"description",{configurable:!0,get:function(){return $(this).description}}),Q||P(aA,"propertyIsEnumerable",qA,{unsafe:!0}))),I({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:cA}),_(d(T),function(wA){p(wA)}),I({target:O,stat:!0,forced:!s},{for:function(wA){var GA=R(wA);if(r(LA,GA))return LA[GA];var UA=cA(GA);return LA[GA]=UA,b[UA]=GA,UA},keyFor:function(wA){if(!w(wA))throw TypeError(wA+" is not a symbol");if(r(b,wA))return b[wA]},useSetter:function(){AA=!0},useSimple:function(){AA=!1}}),I({target:"Object",stat:!0,forced:!s,sham:!e},{create:function(wA,GA){return GA===void 0?D(wA):KA(D(wA),GA)},defineProperty:FA,defineProperties:KA,getOwnPropertyDescriptor:DA}),I({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:MA,getOwnPropertySymbols:RA}),I({target:"Object",stat:!0,forced:a(function(){L.f(1)})},{getOwnPropertySymbols:function(wA){return L.f(N(wA))}}),CA&&I({target:"JSON",stat:!0,forced:!s||a(function(){var wA=cA();return CA([wA])!="[null]"||CA({a:wA})!="{}"||CA(Object(wA))!="{}"})},{stringify:function(wA,GA,UA){for(var pA,ZA=[wA],II=1;arguments.length>II;)ZA.push(arguments[II++]);if(pA=GA,(c(GA)||wA!==void 0)&&!w(wA))return h(GA)||(GA=function(gI,eI){if(typeof pA=="function"&&(eI=pA.call(this,gI,eI)),!w(eI))return eI}),ZA[1]=GA,CA.apply(null,ZA)}}),cA.prototype[eA]||x(cA.prototype,eA,cA.prototype.valueOf),J(cA,O),U[j]=!0},888:(E,C,A)=>{A(1412)("matchAll")},346:(E,C,A)=>{A(1412)("match")},909:(E,C,A)=>{A(1412)("replace")},1992:(E,C,A)=>{A(1412)("search")},8512:(E,C,A)=>{A(1412)("species")},6165:(E,C,A)=>{A(1412)("split")},6044:(E,C,A)=>{A(1412)("toPrimitive")},4676:(E,C,A)=>{A(1412)("toStringTag")},263:(E,C,A)=>{A(1412)("unscopables")},1152:(E,C,A)=>{A(6454)},8561:(E,C,A)=>{A(4465)},8302:(E,C,A)=>{A(8359)},5543:(E,C,A)=>{"use strict";var I=A(390),g=A(4130),B=A(4618);I({target:"Promise",stat:!0},{try:function(Q){var e=g.f(this),s=B(Q);return(s.error?e.reject:e.resolve)(s.value),e.promise}})},8812:(E,C,A)=>{A(1412)("asyncDispose")},9085:(E,C,A)=>{A(1412)("dispose")},7384:(E,C,A)=>{A(1412)("matcher")},4719:(E,C,A)=>{A(1412)("metadata")},2994:(E,C,A)=>{A(1412)("observable")},9431:(E,C,A)=>{A(1412)("patternMatch")},4803:(E,C,A)=>{A(1412)("replaceAll")},9702:(E,C,A)=>{A(2228);var I=A(315),g=A(2868),B=A(7499),Q=A(8518),e=A(9418),s=A(5712)("toStringTag");for(var a in I){var r=g[a],h=r&&r.prototype;h&&B(h)!==s&&Q(h,s,a),e[a]=e.Array}},7945:(E,C,A)=>{var I=A(5109);E.exports=I},8010:(E,C,A)=>{var I=A(1316);E.exports=I},7922:(E,C,A)=>{var I=A(3386);A(9702),E.exports=I},9842:(E,C,A)=>{var I=A(7543);E.exports=I},3798:(E,C,A)=>{var I=A(3918);E.exports=I},2149:(E,C,A)=>{var I=A(790);E.exports=I},6970:(E,C,A)=>{var I=A(9109);E.exports=I},5838:(E,C,A)=>{var I=A(4825);E.exports=I},2343:(E,C,A)=>{var I=A(238);E.exports=I},671:(E,C,A)=>{var I=A(1285);E.exports=I},7283:(E,C,A)=>{var I=A(7681);E.exports=I},2882:(E,C,A)=>{var I=A(8949);E.exports=I},8730:(E,C,A)=>{var I=A(2529);E.exports=I},8531:(E,C,A)=>{var I=A(6854);E.exports=I},569:(E,C,A)=>{var I=A(1553);E.exports=I},3751:(E,C,A)=>{var I=A(2744);E.exports=I},1380:(E,C,A)=>{var I=A(6018);E.exports=I},6601:(E,C,A)=>{var I=A(5350);E.exports=I},8783:(E,C,A)=>{var I=A(8116);E.exports=I},3498:(E,C,A)=>{var I=A(3140);E.exports=I},4731:(E,C,A)=>{var I=A(7281);A(9702),E.exports=I},3355:(E,C,A)=>{var I=A(1442);A(9702),E.exports=I},6888:(E,C,A)=>{var I=A(1190);A(9702),E.exports=I},5613:(E,C,A)=>{"use strict";const I=A(1863),g=A(7609),B=A(9141),Q=A(5710),e=A(8894),s=A(8235),a=Object.prototype.toString,{Z_NO_FLUSH:r,Z_FINISH:h,Z_OK:c,Z_STREAM_END:w,Z_NEED_DICT:u,Z_STREAM_ERROR:N,Z_DATA_ERROR:G,Z_MEM_ERROR:l}=A(2436);function R(D){this.options=g.assign({chunkSize:65536,windowBits:15,to:""},D||{});const d=this.options;d.raw&&d.windowBits>=0&&d.windowBits<16&&(d.windowBits=-d.windowBits,d.windowBits===0&&(d.windowBits=-15)),!(d.windowBits>=0&&d.windowBits<16)||D&&D.windowBits||(d.windowBits+=32),d.windowBits>15&&d.windowBits<48&&(15&d.windowBits)==0&&(d.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new e,this.strm.avail_out=0;let y=I.inflateInit2(this.strm,d.windowBits);if(y!==c)throw new Error(Q[y]);if(this.header=new s,I.inflateGetHeader(this.strm,this.header),d.dictionary&&(typeof d.dictionary=="string"?d.dictionary=B.string2buf(d.dictionary):a.call(d.dictionary)==="[object ArrayBuffer]"&&(d.dictionary=new Uint8Array(d.dictionary)),d.raw&&(y=I.inflateSetDictionary(this.strm,d.dictionary),y!==c)))throw new Error(Q[y])}function F(D,d){const y=new R(d);if(y.push(D),y.err)throw y.msg||Q[y.err];return y.result}R.prototype.push=function(D,d){const y=this.strm,M=this.options.chunkSize,L=this.options.dictionary;let k,H,m;if(this.ended)return!1;for(H=d===~~d?d:d===!0?h:r,a.call(D)==="[object ArrayBuffer]"?y.input=new Uint8Array(D):y.input=D,y.next_in=0,y.avail_in=y.input.length;;){for(y.avail_out===0&&(y.output=new Uint8Array(M),y.next_out=0,y.avail_out=M),k=I.inflate(y,H),k===u&&L&&(k=I.inflateSetDictionary(y,L),k===c?k=I.inflate(y,H):k===G&&(k=u));y.avail_in>0&&k===w&&y.state.wrap>0&&D[y.next_in]!==0;)I.inflateReset(y),k=I.inflate(y,H);switch(k){case N:case G:case u:case l:return this.onEnd(k),this.ended=!0,!1}if(m=y.avail_out,y.next_out&&(y.avail_out===0||k===w))if(this.options.to==="string"){let x=B.utf8border(y.output,y.next_out),P=y.next_out-x,q=B.buf2string(y.output,x);y.next_out=P,y.avail_out=M-P,P&&y.output.set(y.output.subarray(x,x+P),0),this.onData(q)}else this.onData(y.output.length===y.next_out?y.output:y.output.subarray(0,y.next_out));if(k!==c||m!==0){if(k===w)return k=I.inflateEnd(this.strm),this.onEnd(k),this.ended=!0,!0;if(y.avail_in===0)break}}return!0},R.prototype.onData=function(D){this.chunks.push(D)},R.prototype.onEnd=function(D){D===c&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=g.flattenChunks(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg},E.exports.Hq=function(D,d){return(d=d||{}).raw=!0,F(D,d)},A(2436)},7609:E=>{"use strict";const C=(A,I)=>Object.prototype.hasOwnProperty.call(A,I);E.exports.assign=function(A){const I=Array.prototype.slice.call(arguments,1);for(;I.length;){const g=I.shift();if(g){if(typeof g!="object")throw new TypeError(g+"must be non-object");for(const B in g)C(g,B)&&(A[B]=g[B])}}return A},E.exports.flattenChunks=A=>{let I=0;for(let B=0,Q=A.length;B{"use strict";let C=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(I){C=!1}const A=new Uint8Array(256);for(let I=0;I<256;I++)A[I]=I>=252?6:I>=248?5:I>=240?4:I>=224?3:I>=192?2:1;A[254]=A[254]=1,E.exports.string2buf=I=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(I);let g,B,Q,e,s,a=I.length,r=0;for(e=0;e>>6,g[s++]=128|63&B):B<65536?(g[s++]=224|B>>>12,g[s++]=128|B>>>6&63,g[s++]=128|63&B):(g[s++]=240|B>>>18,g[s++]=128|B>>>12&63,g[s++]=128|B>>>6&63,g[s++]=128|63&B);return g},E.exports.buf2string=(I,g)=>{const B=g||I.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(I.subarray(0,g));let Q,e;const s=new Array(2*B);for(e=0,Q=0;Q4)s[e++]=65533,Q+=r-1;else{for(a&=r===2?31:r===3?15:7;r>1&&Q1?s[e++]=65533:a<65536?s[e++]=a:(a-=65536,s[e++]=55296|a>>10&1023,s[e++]=56320|1023&a)}}return((a,r)=>{if(r<65534&&a.subarray&&C)return String.fromCharCode.apply(null,a.length===r?a:a.subarray(0,r));let h="";for(let c=0;c{(g=g||I.length)>I.length&&(g=I.length);let B=g-1;for(;B>=0&&(192&I[B])==128;)B--;return B<0||B===0?g:B+A[I[B]]>g?B:g}},5530:E=>{"use strict";E.exports=(C,A,I,g)=>{let B=65535&C|0,Q=C>>>16&65535|0,e=0;for(;I!==0;){e=I>2e3?2e3:I,I-=e;do B=B+A[g++]|0,Q=Q+B|0;while(--e);B%=65521,Q%=65521}return B|Q<<16|0}},2436:E=>{"use strict";E.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_MEM_ERROR:-4,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}},1383:E=>{"use strict";const C=new Uint32Array((()=>{let A,I=[];for(var g=0;g<256;g++){A=g;for(var B=0;B<8;B++)A=1&A?3988292384^A>>>1:A>>>1;I[g]=A}return I})());E.exports=(A,I,g,B)=>{const Q=C,e=B+g;A^=-1;for(let s=B;s>>8^Q[255&(A^I[s])];return-1^A}},8235:E=>{"use strict";E.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}},8121:E=>{"use strict";E.exports=function(C,A){let I,g,B,Q,e,s,a,r,h,c,w,u,N,G,l,R,F,D,d,y,M,L,k,H;const m=C.state;I=C.next_in,k=C.input,g=I+(C.avail_in-5),B=C.next_out,H=C.output,Q=B-(A-C.avail_out),e=B+(C.avail_out-257),s=m.dmax,a=m.wsize,r=m.whave,h=m.wnext,c=m.window,w=m.hold,u=m.bits,N=m.lencode,G=m.distcode,l=(1<>>24,w>>>=D,u-=D,D=F>>>16&255,D===0)H[B++]=65535&F;else{if(!(16&D)){if((64&D)==0){F=N[(65535&F)+(w&(1<>>=D,u-=D),u<15&&(w+=k[I++]<>>24,w>>>=D,u-=D,D=F>>>16&255,!(16&D)){if((64&D)==0){F=G[(65535&F)+(w&(1<s){C.msg="invalid distance too far back",m.mode=30;break A}if(w>>>=D,u-=D,D=B-Q,y>D){if(D=y-D,D>r&&m.sane){C.msg="invalid distance too far back",m.mode=30;break A}if(M=0,L=c,h===0){if(M+=a-D,D2;)H[B++]=L[M++],H[B++]=L[M++],H[B++]=L[M++],d-=3;d&&(H[B++]=L[M++],d>1&&(H[B++]=L[M++]))}else{M=B-y;do H[B++]=H[M++],H[B++]=H[M++],H[B++]=H[M++],d-=3;while(d>2);d&&(H[B++]=H[M++],d>1&&(H[B++]=H[M++]))}break}}break}}while(I>3,I-=d,u-=d<<3,w&=(1<{"use strict";const I=A(5530),g=A(1383),B=A(8121),Q=A(7371),{Z_FINISH:e,Z_BLOCK:s,Z_TREES:a,Z_OK:r,Z_STREAM_END:h,Z_NEED_DICT:c,Z_STREAM_ERROR:w,Z_DATA_ERROR:u,Z_MEM_ERROR:N,Z_BUF_ERROR:G,Z_DEFLATED:l}=A(2436),R=12,F=30,D=K=>(K>>>24&255)+(K>>>8&65280)+((65280&K)<<8)+((255&K)<<24);function d(){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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const y=K=>{if(!K||!K.state)return w;const U=K.state;return K.total_in=K.total_out=U.total=0,K.msg="",U.wrap&&(K.adler=1&U.wrap),U.mode=1,U.last=0,U.havedict=0,U.dmax=32768,U.head=null,U.hold=0,U.bits=0,U.lencode=U.lendyn=new Int32Array(852),U.distcode=U.distdyn=new Int32Array(592),U.sane=1,U.back=-1,r},M=K=>{if(!K||!K.state)return w;const U=K.state;return U.wsize=0,U.whave=0,U.wnext=0,y(K)},L=(K,U)=>{let n;if(!K||!K.state)return w;const S=K.state;return U<0?(n=0,U=-U):(n=1+(U>>4),U<48&&(U&=15)),U&&(U<8||U>15)?w:(S.window!==null&&S.wbits!==U&&(S.window=null),S.wrap=n,S.wbits=U,M(K))},k=(K,U)=>{if(!K)return w;const n=new d;K.state=n,n.window=null;const S=L(K,U);return S!==r&&(K.state=null),S};let H,m,x=!0;const P=K=>{if(x){H=new Int32Array(512),m=new Int32Array(32);let U=0;for(;U<144;)K.lens[U++]=8;for(;U<256;)K.lens[U++]=9;for(;U<280;)K.lens[U++]=7;for(;U<288;)K.lens[U++]=8;for(Q(1,K.lens,0,288,H,0,K.work,{bits:9}),U=0;U<32;)K.lens[U++]=5;Q(2,K.lens,0,32,m,0,K.work,{bits:5}),x=!1}K.lencode=H,K.lenbits=9,K.distcode=m,K.distbits=5},q=(K,U,n,S)=>{let v;const p=K.state;return p.window===null&&(p.wsize=1<=p.wsize?(p.window.set(U.subarray(n-p.wsize,n),0),p.wnext=0,p.whave=p.wsize):(v=p.wsize-p.wnext,v>S&&(v=S),p.window.set(U.subarray(n-S,n-S+v),p.wnext),(S-=v)?(p.window.set(U.subarray(n-S,n),0),p.wnext=S,p.whave=p.wsize):(p.wnext+=v,p.wnext===p.wsize&&(p.wnext=0),p.whavek(K,15),E.exports.inflateInit2=k,E.exports.inflate=(K,U)=>{let n,S,v,p,J,z,_,j,O,eA,iA,$,aA,cA,CA,tA,lA,yA,JA,bA,NA,LA,b=0;const T=new Uint8Array(4);let EA,AA;const IA=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!K||!K.state||!K.output||!K.input&&K.avail_in!==0)return w;n=K.state,n.mode===R&&(n.mode=13),J=K.next_out,v=K.output,_=K.avail_out,p=K.next_in,S=K.input,z=K.avail_in,j=n.hold,O=n.bits,eA=z,iA=_,LA=r;A:for(;;)switch(n.mode){case 1:if(n.wrap===0){n.mode=13;break}for(;O<16;){if(z===0)break A;z--,j+=S[p++]<>>8&255,n.check=g(n.check,T,2,0),j=0,O=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&j)<<8)+(j>>8))%31){K.msg="incorrect header check",n.mode=F;break}if((15&j)!==l){K.msg="unknown compression method",n.mode=F;break}if(j>>>=4,O-=4,NA=8+(15&j),n.wbits===0)n.wbits=NA;else if(NA>n.wbits){K.msg="invalid window size",n.mode=F;break}n.dmax=1<>8&1),512&n.flags&&(T[0]=255&j,T[1]=j>>>8&255,n.check=g(n.check,T,2,0)),j=0,O=0,n.mode=3;case 3:for(;O<32;){if(z===0)break A;z--,j+=S[p++]<>>8&255,T[2]=j>>>16&255,T[3]=j>>>24&255,n.check=g(n.check,T,4,0)),j=0,O=0,n.mode=4;case 4:for(;O<16;){if(z===0)break A;z--,j+=S[p++]<>8),512&n.flags&&(T[0]=255&j,T[1]=j>>>8&255,n.check=g(n.check,T,2,0)),j=0,O=0,n.mode=5;case 5:if(1024&n.flags){for(;O<16;){if(z===0)break A;z--,j+=S[p++]<>>8&255,n.check=g(n.check,T,2,0)),j=0,O=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&($=n.length,$>z&&($=z),$&&(n.head&&(NA=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(S.subarray(p,p+$),NA)),512&n.flags&&(n.check=g(n.check,S,$,p)),z-=$,p+=$,n.length-=$),n.length))break A;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(z===0)break A;$=0;do NA=S[p+$++],n.head&&NA&&n.length<65536&&(n.head.name+=String.fromCharCode(NA));while(NA&&$>9&1,n.head.done=!0),K.adler=n.check=0,n.mode=R;break;case 10:for(;O<32;){if(z===0)break A;z--,j+=S[p++]<>>=7&O,O-=7&O,n.mode=27;break}for(;O<3;){if(z===0)break A;z--,j+=S[p++]<>>=1,O-=1,3&j){case 0:n.mode=14;break;case 1:if(P(n),n.mode=20,U===a){j>>>=2,O-=2;break A}break;case 2:n.mode=17;break;case 3:K.msg="invalid block type",n.mode=F}j>>>=2,O-=2;break;case 14:for(j>>>=7&O,O-=7&O;O<32;){if(z===0)break A;z--,j+=S[p++]<>>16^65535)){K.msg="invalid stored block lengths",n.mode=F;break}if(n.length=65535&j,j=0,O=0,n.mode=15,U===a)break A;case 15:n.mode=16;case 16:if($=n.length,$){if($>z&&($=z),$>_&&($=_),$===0)break A;v.set(S.subarray(p,p+$),J),z-=$,p+=$,_-=$,J+=$,n.length-=$;break}n.mode=R;break;case 17:for(;O<14;){if(z===0)break A;z--,j+=S[p++]<>>=5,O-=5,n.ndist=1+(31&j),j>>>=5,O-=5,n.ncode=4+(15&j),j>>>=4,O-=4,n.nlen>286||n.ndist>30){K.msg="too many length or distance symbols",n.mode=F;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,O-=3}for(;n.have<19;)n.lens[IA[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,EA={bits:n.lenbits},LA=Q(0,n.lens,0,19,n.lencode,0,n.work,EA),n.lenbits=EA.bits,LA){K.msg="invalid code lengths set",n.mode=F;break}n.have=0,n.mode=19;case 19:for(;n.have>>24,tA=b>>>16&255,lA=65535&b,!(CA<=O);){if(z===0)break A;z--,j+=S[p++]<>>=CA,O-=CA,n.lens[n.have++]=lA;else{if(lA===16){for(AA=CA+2;O>>=CA,O-=CA,n.have===0){K.msg="invalid bit length repeat",n.mode=F;break}NA=n.lens[n.have-1],$=3+(3&j),j>>>=2,O-=2}else if(lA===17){for(AA=CA+3;O>>=CA,O-=CA,NA=0,$=3+(7&j),j>>>=3,O-=3}else{for(AA=CA+7;O>>=CA,O-=CA,NA=0,$=11+(127&j),j>>>=7,O-=7}if(n.have+$>n.nlen+n.ndist){K.msg="invalid bit length repeat",n.mode=F;break}for(;$--;)n.lens[n.have++]=NA}}if(n.mode===F)break;if(n.lens[256]===0){K.msg="invalid code -- missing end-of-block",n.mode=F;break}if(n.lenbits=9,EA={bits:n.lenbits},LA=Q(1,n.lens,0,n.nlen,n.lencode,0,n.work,EA),n.lenbits=EA.bits,LA){K.msg="invalid literal/lengths set",n.mode=F;break}if(n.distbits=6,n.distcode=n.distdyn,EA={bits:n.distbits},LA=Q(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,EA),n.distbits=EA.bits,LA){K.msg="invalid distances set",n.mode=F;break}if(n.mode=20,U===a)break A;case 20:n.mode=21;case 21:if(z>=6&&_>=258){K.next_out=J,K.avail_out=_,K.next_in=p,K.avail_in=z,n.hold=j,n.bits=O,B(K,iA),J=K.next_out,v=K.output,_=K.avail_out,p=K.next_in,S=K.input,z=K.avail_in,j=n.hold,O=n.bits,n.mode===R&&(n.back=-1);break}for(n.back=0;b=n.lencode[j&(1<>>24,tA=b>>>16&255,lA=65535&b,!(CA<=O);){if(z===0)break A;z--,j+=S[p++]<>yA)],CA=b>>>24,tA=b>>>16&255,lA=65535&b,!(yA+CA<=O);){if(z===0)break A;z--,j+=S[p++]<>>=yA,O-=yA,n.back+=yA}if(j>>>=CA,O-=CA,n.back+=CA,n.length=lA,tA===0){n.mode=26;break}if(32&tA){n.back=-1,n.mode=R;break}if(64&tA){K.msg="invalid literal/length code",n.mode=F;break}n.extra=15&tA,n.mode=22;case 22:if(n.extra){for(AA=n.extra;O>>=n.extra,O-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;b=n.distcode[j&(1<>>24,tA=b>>>16&255,lA=65535&b,!(CA<=O);){if(z===0)break A;z--,j+=S[p++]<>yA)],CA=b>>>24,tA=b>>>16&255,lA=65535&b,!(yA+CA<=O);){if(z===0)break A;z--,j+=S[p++]<>>=yA,O-=yA,n.back+=yA}if(j>>>=CA,O-=CA,n.back+=CA,64&tA){K.msg="invalid distance code",n.mode=F;break}n.offset=lA,n.extra=15&tA,n.mode=24;case 24:if(n.extra){for(AA=n.extra;O>>=n.extra,O-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){K.msg="invalid distance too far back",n.mode=F;break}n.mode=25;case 25:if(_===0)break A;if($=iA-_,n.offset>$){if($=n.offset-$,$>n.whave&&n.sane){K.msg="invalid distance too far back",n.mode=F;break}$>n.wnext?($-=n.wnext,aA=n.wsize-$):aA=n.wnext-$,$>n.length&&($=n.length),cA=n.window}else cA=v,aA=J-n.offset,$=n.length;$>_&&($=_),_-=$,n.length-=$;do v[J++]=cA[aA++];while(--$);n.length===0&&(n.mode=21);break;case 26:if(_===0)break A;v[J++]=n.length,_--,n.mode=21;break;case 27:if(n.wrap){for(;O<32;){if(z===0)break A;z--,j|=S[p++]<{if(!K||!K.state)return w;let U=K.state;return U.window&&(U.window=null),K.state=null,r},E.exports.inflateGetHeader=(K,U)=>{if(!K||!K.state)return w;const n=K.state;return(2&n.wrap)==0?w:(n.head=U,U.done=!1,r)},E.exports.inflateSetDictionary=(K,U)=>{const n=U.length;let S,v,p;return K&&K.state?(S=K.state,S.wrap!==0&&S.mode!==11?w:S.mode===11&&(v=1,v=I(v,U,n,0),v!==S.check)?u:(p=q(K,U,n,n),p?(S.mode=31,N):(S.havedict=1,r))):w},E.exports.inflateInfo="pako inflate (from Nodeca project)"},7371:E=>{"use strict";const C=15,A=new Uint16Array([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]),I=new Uint8Array([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]),g=new Uint16Array([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]),B=new Uint8Array([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]);E.exports=(Q,e,s,a,r,h,c,w)=>{const u=w.bits;let N,G,l,R,F,D,d=0,y=0,M=0,L=0,k=0,H=0,m=0,x=0,P=0,q=0,K=null,U=0;const n=new Uint16Array(16),S=new Uint16Array(16);let v,p,J,z=null,_=0;for(d=0;d<=C;d++)n[d]=0;for(y=0;y=1&&n[L]===0;L--);if(k>L&&(k=L),L===0)return r[h++]=20971520,r[h++]=20971520,w.bits=1,0;for(M=1;M0&&(Q===0||L!==1))return-1;for(S[1]=0,d=1;d852||Q===2&&P>592)return 1;for(;;){v=d-m,c[y]D?(p=z[_+c[y]],J=K[U+c[y]]):(p=96,J=0),N=1<>m)+G]=v<<24|p<<16|J|0;while(G!==0);for(N=1<>=1;if(N!==0?(q&=N-1,q+=N):q=0,y++,--n[d]==0){if(d===L)break;d=e[s+c[y]]}if(d>k&&(q&R)!==l){for(m===0&&(m=k),F+=M,H=d-m,x=1<852||Q===2&&P>592)return 1;l=q&R,r[l]=k<<24|H<<16|F-h|0}}return q!==0&&(r[F+q]=d-m<<24|64<<16|0),w.bits=k,0}},5710:E=>{"use strict";E.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"}},8894:E=>{"use strict";E.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}},6614:E=>{"use strict";E.exports=function(C,A,I,g){var B=self||window;try{try{var Q;try{Q=new B.Blob([C])}catch(r){(Q=new(B.BlobBuilder||B.WebKitBlobBuilder||B.MozBlobBuilder||B.MSBlobBuilder)).append(C),Q=Q.getBlob()}var e=B.URL||B.webkitURL,s=e.createObjectURL(Q),a=new B[A](s,I);return e.revokeObjectURL(s),a}catch(r){return new B[A]("data:application/javascript,".concat(encodeURIComponent(C)),I)}}catch(r){if(!g)throw Error("Inline worker is not supported");return new B[A](g,I)}}}},i={};function t(E){var C=i[E];if(C!==void 0)return C.exports;var A=i[E]={exports:{}};return BA[E](A,A.exports,t),A.exports}t.n=E=>{var C=E&&E.__esModule?()=>E.default:()=>E;return t.d(C,{a:C}),C},t.d=(E,C)=>{for(var A in C)t.o(C,A)&&!t.o(E,A)&&Object.defineProperty(E,A,{enumerable:!0,get:C[A]})},t.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(E){if(typeof window=="object")return window}}(),t.o=(E,C)=>Object.prototype.hasOwnProperty.call(E,C),t.r=E=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(E,"__esModule",{value:!0})},(()=>{var E;t.g.importScripts&&(E=t.g.location+"");var C=t.g.document;if(!E&&C&&(C.currentScript&&(E=C.currentScript.src),!E)){var A=C.getElementsByTagName("script");A.length&&(E=A[A.length-1].src)}if(!E)throw new Error("Automatic publicPath is not supported in this browser");E=E.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=E})();var o={};return(()=>{"use strict";function E(f,Y,Z){if(f===void 0)throw new Error("decodeRGB: rgbBuffer must not be undefined");if(f.length%3!=0)throw new Error("decodeRGB: rgbBuffer length must be divisible by 3");var V=f.length/3,gA=0,nA=0;if(Z)for(var dA=0;dA>Y;return V}function B(f,Y,Z){var V=f.columns*f.rows,gA=f.pixelData,nA=f.redPaletteColorLookupTableData,dA=f.greenPaletteColorLookupTableData,rA=f.bluePaletteColorLookupTableData,hA=f.redPaletteColorLookupTableData.length,SA=0,kA=0,mA=f.redPaletteColorLookupTableDescriptor[1],uA=f.redPaletteColorLookupTableDescriptor[2]===8?0:8,vA=g(nA,uA),WA=g(dA,uA),xA=g(rA,uA);if(Z)for(var HA=0;HAmA+hA-1?OA=hA-1:OA-=mA,Y[kA++]=vA[OA],Y[kA++]=WA[OA],Y[kA++]=xA[OA],Y[kA++]=255}else for(var _A=0;_AmA+hA-1?XA=hA-1:XA-=mA,Y[kA++]=vA[XA],Y[kA++]=WA[XA],Y[kA++]=xA[XA]}}function Q(f,Y){if(f.elements[Y]&&f.elements[Y].length===6)return[f.uint16(Y,0),f.uint16(Y,1),f.uint16(Y,2)]}function e(f,Y,Z){for(var V=[],gA=f.elements[Y],nA=0;nA$g,convertColorSpace:()=>sI,convertPALETTECOLOR:()=>B,convertRGBColorByPixel:()=>E,convertRGBColorByPlane:()=>C,convertYBRFullByPixel:()=>A,convertYBRFullByPlane:()=>I,createImage:()=>zI,decodeImageFrame:()=>Qg,decodeJPEGBaseline8BitColor:()=>KI,default:()=>wB,external:()=>TA,getImageFrame:()=>xI,getMinMax:()=>yI,getPixelData:()=>JI,internal:()=>nI,isColorImage:()=>Eg,isJPEGBaseline8BitColor:()=>bI,version:()=>AB,wadors:()=>QA,wadouri:()=>Ug,webWorkerManager:()=>cI});const s=function(f){var Y={samplesPerPixel:f.uint16("x00280002"),photometricInterpretation:f.string("x00280004"),rows:f.uint16("x00280010"),columns:f.uint16("x00280011"),bitsAllocated:f.uint16("x00280100"),bitsStored:f.uint16("x00280101"),highBit:f.uint16("x00280102"),pixelRepresentation:f.uint16("x00280103"),planarConfiguration:f.uint16("x00280006"),pixelAspectRatio:f.string("x00280034")};return function(Z,V){Z.uint16("x00280103")===0?(V.smallestPixelValue=Z.uint16("x00280106"),V.largestPixelValue=Z.uint16("x00280107")):(V.smallestPixelValue=Z.int16("x00280106"),V.largestPixelValue=Z.int16("x00280107"))}(f,Y),Y.photometricInterpretation==="PALETTE COLOR"&&f.elements.x00281101&&function(Z,V){V.redPaletteColorLookupTableDescriptor=Q(Z,"x00281101"),V.greenPaletteColorLookupTableDescriptor=Q(Z,"x00281102"),V.bluePaletteColorLookupTableDescriptor=Q(Z,"x00281103"),V.redPaletteColorLookupTableDescriptor[0]===0&&(V.redPaletteColorLookupTableDescriptor[0]=65536,V.greenPaletteColorLookupTableDescriptor[0]=65536,V.bluePaletteColorLookupTableDescriptor[0]=65536);var gA=V.redPaletteColorLookupTableDescriptor[0],nA=Z.elements.x00281201.length===gA?8:16;V.redPaletteColorLookupTableDescriptor[2]!==nA&&(V.redPaletteColorLookupTableDescriptor[2]=nA,V.greenPaletteColorLookupTableDescriptor[2]=nA,V.bluePaletteColorLookupTableDescriptor[2]=nA),V.redPaletteColorLookupTableData=e(Z,"x00281201",V.redPaletteColorLookupTableDescriptor),V.greenPaletteColorLookupTableData=e(Z,"x00281202",V.greenPaletteColorLookupTableDescriptor),V.bluePaletteColorLookupTableData=e(Z,"x00281203",V.bluePaletteColorLookupTableDescriptor)}(f,Y),Y};function a(f,Y){var Z=Y.uint16("x00283002",0);Z===0&&(Z=65535);for(var V={id:"1",firstValueMapped:f===0?Y.uint16("x00283002",1):Y.int16("x00283002",1),numBitsPerEntry:Y.uint16("x00283002",2),lut:[]},gA=0;gA0?0:f.uint16("x00280103")},c=function(f,Y,Z){var V=[],gA=f.string(Y);if(gA){var nA=gA.split("\\");if(!(Z&&nA.lengthf.length)&&(Y=f.length);for(var Z=0,V=new Array(Y);Z=0||(kA[hA]=dA[hA]);return kA}(f,Y);if(U){var nA=U(f);for(V=0;V=0||Object.prototype.propertyIsEnumerable.call(f,Z)&&(gA[Z]=f[Z])}return gA}var p=t(6496);function J(f){return(J=typeof M=="function"&&typeof p=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof M=="function"&&Y.constructor===M&&Y!==M.prototype?"symbol":typeof Y})(f)}var z=t(6059),_=t.n(z),j=t(2633),O=t.n(j),eA=t(1929),iA=t.n(eA),$=t(1246),aA=t.n($),cA=t(2165),CA=t.n(cA);function tA(f){var Y=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return f&&f.Value?f.Value[0]&&Y?f.Value[0]:f.Value:f}var lA=["52009230","52009229","00280008"];function yA(f,Y,Z){var V,gA,nA,dA;return{shared:_()(V=O()(gA=Y?iA()(Y[0]):[]).call(gA,function(rA){return rA[0]})).call(V,function(rA){return rA!==void 0&&J(rA)==="object"}),perFrame:_()(nA=O()(dA=f?iA()(f[Z-1]):[]).call(dA,function(rA){return rA.Value[0]})).call(nA,function(rA){return rA!==void 0&&J(rA)==="object"})}}function JA(f){var Y=f[52009230],Z=f[52009229],V=f["00280008"],gA=v(f,lA);return{PerFrameFunctionalGroupsSequence:Y=tA(Y,!1),SharedFunctionalGroupsSequence:Z=tA(Z,!1),NumberOfFrames:V=tA(V),rest:gA}}var bA=t(6028),NA=t.n(bA);function LA(f){var Y=f.indexOf("/frames/")+8,Z=NA()(f).call(f,0,Y),V=parseInt(NA()(f).call(f,Y),10);return{metadata:T["".concat(Z,"1")],frame:V}}const b={_retrieveMultiframeMetadata:LA,retrieveMultiframeMetadata:function(f){return LA(d(f))},isMultiframe:function(f){var Y=l(f["00280008"]);return Y&&Y>1}};var T=[],EA={};const AA={add:function(f,Y){var Z=d(f);Y.isMultiframe=b.isMultiframe(Y),T[Z]=Y},get:function(f){var Y=d(f),Z=T[Y];if(Z&&(Z==null||!Z.isMultiframe))return Z;var V=EA[Y];if(V)return V;var gA=b._retrieveMultiframeMetadata(Y);if(gA&&gA.metadata){var nA=gA.metadata,dA=gA.frame;if(nA){var rA=function(hA,SA){var kA=JA(SA),mA=kA.PerFrameFunctionalGroupsSequence,uA=kA.SharedFunctionalGroupsSequence,vA=kA.NumberOfFrames,WA=kA.rest;if(mA||vA>1){var xA,HA=yA(mA,uA,hA),OA=HA.shared,_A=HA.perFrame,XA=aA()(SA,{frameNumber:hA});return u()(xA=[]).call(xA,K(OA),K(_A)).forEach(function(rI){CA()(rI).forEach(function(fI){var DI=q(fI,2),VA=DI[0],MI=DI[1];XA[VA]=MI})}),aA()(WA,{"00280008":vA},XA)}return SA}(dA,nA);return EA[Y]=rA,rA}}},remove:function(f){var Y=d(f);T[Y]=void 0,EA[Y]=void 0},purge:function(){T=[],EA={}}};function IA(f){return f==="RECON TOMO"||f==="RECON GATED TOMO"}function oA(f){var Y=l(f["00080060"]);return G()(Y).call(Y,"NM")}function FA(f,Y){var Z=tA(f["00080008"],!1);if(Z)return Z[Y]}function KA(f){var Y=D(f["00200037"],6);return!Y&&oA(f)&&(Y=function(Z){var V,gA=FA(Z,2);if(gA&&IA(gA)){var nA=tA(Z["00540022"]);nA&&(V=D(nA["00200037"],6))}return V}(f)),Y}function qA(f){var Y=D(f["00200032"],3);return!Y&&oA(f)&&(Y=function(Z){var V,gA=FA(Z,2);if(gA&&IA(gA)){var nA=tA(Z["00540022"]);nA&&(V=D(nA["00200032"],3))}return V}(f)),Y}const DA=function(f,Y){if(f==="multiframeModule"){var Z=b.retrieveMultiframeMetadata(Y),V=Z.metadata,gA=Z.frame;if(!V)return;var nA=JA(V),dA=nA.PerFrameFunctionalGroupsSequence,rA=nA.SharedFunctionalGroupsSequence,hA=nA.NumberOfFrames;if(dA||hA>1){var SA=yA(dA,rA,gA),kA=SA.shared;return{NumberOfFrames:hA,PerFrameFunctionalInformation:SA.perFrame,SharedFunctionalInformation:kA}}return{NumberOfFrames:hA}}var mA=TA.dicomParser,uA=AA.get(Y);if(uA){if(f==="generalSeriesModule")return{modality:l(uA["00080060"]),seriesInstanceUID:l(uA["0020000E"]),seriesNumber:F(uA["00200011"]),studyInstanceUID:l(uA["0020000D"]),seriesDate:mA.parseDA(l(uA["00080021"])),seriesTime:mA.parseTM(l(uA["00080031"],0,"")),acquisitionDate:mA.parseDA(l(uA["00080022"]),""),acquisitionTime:mA.parseTM(l(uA["00080032"],0,""))};if(f==="patientStudyModule")return{patientAge:F(uA["00101010"]),patientSize:F(uA["00101020"]),patientSex:l(uA["00100040"]),patientWeight:F(uA["00101030"])};if(f==="nmMultiframeGeometryModule"){var vA=l(uA["00080060"]),WA=FA(uA,2);return{modality:vA,imageType:l(uA["00080008"]),imageSubType:WA,imageOrientationPatient:KA(uA),imagePositionPatient:qA(uA),sliceThickness:F(uA["00180050"]),pixelSpacing:D(uA["00280030"],2),numberOfFrames:F(uA["00280008"]),isNMReconstructable:IA(WA)&&G()(vA).call(vA,"NM")}}if(f==="imagePlaneModule"){var xA=KA(uA),HA=qA(uA),OA=D(uA["00280030"],2),_A=null,XA=null;OA&&(XA=OA[0],_A=OA[1]);var rI=null,fI=null;return xA&&(rI=[parseFloat(xA[0]),parseFloat(xA[1]),parseFloat(xA[2])],fI=[parseFloat(xA[3]),parseFloat(xA[4]),parseFloat(xA[5])]),{frameOfReferenceUID:l(uA["00200052"]),rows:F(uA["00280010"]),columns:F(uA["00280011"]),imageOrientationPatient:xA,rowCosines:rI,columnCosines:fI,imagePositionPatient:HA,sliceThickness:F(uA["00180050"]),sliceLocation:F(uA["00201041"]),pixelSpacing:OA,rowPixelSpacing:XA,columnPixelSpacing:_A}}if(f==="imagePixelModule")return{samplesPerPixel:F(uA["00280002"]),photometricInterpretation:l(uA["00280004"]),rows:F(uA["00280010"]),columns:F(uA["00280011"]),bitsAllocated:F(uA["00280100"]),bitsStored:F(uA["00280101"]),highBit:l(uA["00280102"]),pixelRepresentation:F(uA["00280103"]),planarConfiguration:F(uA["00280006"]),pixelAspectRatio:l(uA["00280034"]),smallestPixelValue:F(uA["00280106"]),largestPixelValue:F(uA["00280107"]),redPaletteColorLookupTableDescriptor:D(uA["00281101"]),greenPaletteColorLookupTableDescriptor:D(uA["00281102"]),bluePaletteColorLookupTableDescriptor:D(uA["00281103"]),redPaletteColorLookupTableData:D(uA["00281201"]),greenPaletteColorLookupTableData:D(uA["00281202"]),bluePaletteColorLookupTableData:D(uA["00281203"])};if(f==="voiLutModule")return{windowCenter:D(uA["00281050"],1),windowWidth:D(uA["00281051"],1)};if(f==="modalityLutModule")return{rescaleIntercept:F(uA["00281052"]),rescaleSlope:F(uA["00281053"]),rescaleType:l(uA["00281054"])};if(f==="sopCommonModule")return{sopClassUID:l(uA["00080016"]),sopInstanceUID:l(uA["00080018"])};if(f==="petIsotopeModule"){var DI=l(uA["00540016"]);return DI===void 0?void 0:{radiopharmaceuticalInfo:{radiopharmaceuticalStartTime:mA.parseTM(l(DI["00181072"],0,"")),radiopharmaceuticalStartDateTime:l(DI["00181078"],0,""),radionuclideTotalDose:F(DI["00181074"]),radionuclideHalfLife:F(DI["00181075"])}}}return f==="overlayPlaneModule"?function(VA){for(var MI=[],hI=0;hI<=30;hI+=2){var PA="x60".concat(hI.toString(16));PA.length===4&&(PA="x600".concat(hI.toString(16)));var QI=l(VA["".concat(PA,"3000")]);if(QI){for(var wI=[],FI=0;FI>lI&1}MI.push({rows:F(VA["".concat(PA,"0010")]),columns:F(VA["".concat(PA,"0011")]),type:l(VA["".concat(PA,"0040")]),x:F(VA["".concat(PA,"0050")],1)-1,y:F(VA["".concat(PA,"0050")],0)-1,pixelData:wI,description:l(VA["".concat(PA,"0022")]),label:l(VA["".concat(PA,"1500")]),roiArea:l(VA["".concat(PA,"1301")]),roiMean:l(VA["".concat(PA,"1302")]),roiStandardDeviation:l(VA["".concat(PA,"1303")])})}}return{overlays:MI}}(uA):f==="transferSyntax"?{transferSyntaxUID:l(uA["00020010"])}:f==="petSeriesModule"?{correctedImage:l(uA["00280051"]),units:l(uA["00541001"]),decayCorrection:l(uA["00541102"])}:f==="petImageModule"?{frameReferenceTime:F(uA["00541300"]),actualFrameDuration:F(uA["00181242"])}:void 0}};function MA(f,Y,Z){if(Z+f.length>Y.length)return!1;for(var V=Z,gA=0;gA2&&arguments[2]!==void 0?arguments[2]:{},V=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},gA=TA.cornerstone,nA=dI(),dA=function(SA){if(typeof nA.errorInterceptor=="function"){var kA=new Error("request failed");kA.request=SA,kA.response=SA.response,kA.status=SA.status,nA.errorInterceptor(kA)}},rA=new XMLHttpRequest,hA=new(pA())(function(SA,kA){nA.open(rA,f,Z,V);var mA=nA.beforeSend(rA,Y,Z,V);rA.responseType="arraybuffer";var uA=aA()({},Z,mA);II()(uA).forEach(function(vA){uA[vA]!==null&&(vA==="Accept"&&f.indexOf("accept=")!==-1||rA.setRequestHeader(vA,uA[vA]))}),V.deferred={resolve:SA,reject:kA},V.url=f,V.imageId=Y,rA.onloadstart=function(vA){nA.onloadstart&&nA.onloadstart(vA,V);var WA={url:f,imageId:Y};gA.triggerEvent(gA.events,"cornerstoneimageloadstart",WA)},rA.onloadend=function(vA){nA.onloadend&&nA.onloadend(vA,V);var WA={url:f,imageId:Y};gA.triggerEvent(gA.events,"cornerstoneimageloadend",WA)},rA.onreadystatechange=function(vA){nA.onreadystatechange?nA.onreadystatechange(vA,V):rA.readyState===4&&(rA.status===200?nA.beforeProcessing(rA).then(SA).catch(function(){dA(rA),kA(rA)}):(dA(rA),kA(rA)))},rA.onprogress=function(vA){var WA,xA,HA=vA.loaded;vA.lengthComputable&&(WA=vA.total,xA=Math.round(HA/WA*100)),nA.onprogress&&nA.onprogress(vA,V);var OA={url:f,imageId:Y,loaded:HA,total:WA,percentComplete:xA};gA.triggerEvent(gA.events,gA.EVENTS.IMAGE_LOAD_PROGRESS,OA)},rA.onerror=function(){dA(rA),kA(rA)},rA.onabort=function(){dA(rA),kA(rA)},rA.send()});return hA.xhr=rA,hA};var nI={xhrRequest:iI,setOptions:eI,getOptions:dI};function WI(f){for(var Y=0;Y2&&arguments[2]!==void 0?arguments[2]:"application/octet-stream",V={Accept:Z};return new(pA())(function(gA,nA){var dA=iI(f,Y,V),rA=dA.xhr;dA.then(function(hA){var SA=new Uint8Array(hA),kA=rA.getResponseHeader("Content-Type")||"application/octet-stream";if(kA.indexOf("multipart")!==-1){var mA=RA(SA,`\r \r `);mA===-1&&nA(new Error("invalid response - no multipart mime header"));var uA=Ig(SA,0,mA).split(`\r `),vA=WI(uA);vA||nA(new Error("invalid response - no boundary marker"));var WA=mA+4,xA=RA(SA,vA,WA);xA===-1&&nA(new Error("invalid response - terminating boundary not found"));var HA=xA-WA-2;gA({contentType:Ag(uA),imageFrame:{pixelData:new Uint8Array(hA,WA,HA)}})}else gA({contentType:kA,imageFrame:{pixelData:SA}})},nA)})};var ng=t(1882),kI=t.n(ng),sg=t(337),GI=t.n(sg),gg=t(2770),LI=t.n(gg),PI=t(1082);function pI(f,Y,Z){return Y in f?PI(f,Y,{value:Z,enumerable:!0,configurable:!0,writable:!0}):f[Y]=Z,f}const xI=function(f){var Y=TA.cornerstone.metaData.get("imagePixelModule",f);return{samplesPerPixel:Y.samplesPerPixel,photometricInterpretation:Y.photometricInterpretation,planarConfiguration:Y.planarConfiguration,rows:Y.rows,columns:Y.columns,bitsAllocated:Y.bitsAllocated,bitsStored:Y.bitsStored,pixelRepresentation:Y.pixelRepresentation,smallestPixelValue:Y.smallestPixelValue,largestPixelValue:Y.largestPixelValue,redPaletteColorLookupTableDescriptor:Y.redPaletteColorLookupTableDescriptor,greenPaletteColorLookupTableDescriptor:Y.greenPaletteColorLookupTableDescriptor,bluePaletteColorLookupTableDescriptor:Y.bluePaletteColorLookupTableDescriptor,redPaletteColorLookupTableData:Y.redPaletteColorLookupTableData,greenPaletteColorLookupTableData:Y.greenPaletteColorLookupTableData,bluePaletteColorLookupTableData:Y.bluePaletteColorLookupTableData,pixelData:void 0}};var Bg=t(187),qI=t.n(Bg),ZI=t(6614),OI=t.n(ZI);function Cg(){return OI()(`(()=>{var A,I,g={8726:function(A,I){!function(g){if("object"==typeof I&&void 0!==A)A.exports=g();else if("function"==typeof define&&define.amd)define([],g);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jpeg=g()}}((function(){return function A(I,g,B){function Q(E,i){if(!g[E]){if(!I[E]){var o="function"==typeof require&&require;if(!i&&o)return o(E,!0);if(C)return C(E,!0);var D=new Error("Cannot find module '"+E+"'");throw D.code="MODULE_NOT_FOUND",D}var a=g[E]={exports:{}};I[E][0].call(a.exports,(function(A){var g=I[E][1][A];return Q(g||A)}),a,a.exports,A,I,g,B)}return g[E].exports}for(var C="function"==typeof require&&require,E=0;E>4!=4092||65476===C;){switch(C){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,Q.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(C>>8!=255)throw new Error("ERROR: format throw new IOException! (decode)")}C=this.stream.get16()}if(C<65472||C>65479)throw new Error("ERROR: could not handle arithmetic code!");this.frame.read(this.stream),C=this.stream.get16();do{for(;65498!==C;){switch(C){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,Q.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(C>>8!=255)throw new Error("ERROR: format throw new IOException! (Parser.decode)")}C=this.stream.get16()}switch(this.precision=this.frame.precision,this.components=this.frame.components,this.numBytes||(this.numBytes=parseInt(Math.ceil(this.precision/8))),1==this.numBytes?this.mask=255:this.mask=65535,this.scan.read(this.stream),this.numComp=this.scan.numComp,this.selection=this.scan.selection,1===this.numBytes?3===this.numComp?(this.getter=this.getValueRGB,this.setter=this.setValueRGB,this.output=this.outputRGB):(this.getter=this.getValue8,this.setter=this.setValue8,this.output=this.outputSingle):(this.getter=this.getValue16,this.setter=this.setValue16,this.output=this.outputSingle),this.selection){case 2:this.selector=this.select2;break;case 3:this.selector=this.select3;break;case 4:this.selector=this.select4;break;case 5:this.selector=this.select5;break;case 6:this.selector=this.select6;break;case 7:this.selector=this.select7;break;default:this.selector=this.select1}for(this.scanComps=this.scan.components,this.quantTables=this.quantTable.quantTables,E=0;E=Q.lossless.Decoder.RESTART_MARKER_BEGIN&&C<=Q.lossless.Decoder.RESTART_MARKER_END))break}65500===C&&1===D&&(this.readNumber(),C=this.stream.get16())}while(65497!==C&&this.xLoc>1)},Q.lossless.Decoder.prototype.select6=function(A){return this.getPreviousY(A)+(this.getPreviousX(A)-this.getPreviousXY(A)>>1)},Q.lossless.Decoder.prototype.select7=function(A){return(this.getPreviousX(A)+this.getPreviousY(A))/2},Q.lossless.Decoder.prototype.decodeRGB=function(A,I,g){var B,C,E,i,o,D,a,s;for(A[0]=this.selector(0),A[1]=this.selector(1),A[2]=this.selector(2),o=0;o=65280)return B;for(A[o]=this.IDCT_Source[0]=A[o]+this.getn(g,B,I,g),this.IDCT_Source[0]*=i[0],s=1;s<64;s+=1){if((B=this.getHuffmanValue(C,I,g))>=65280)return B;if(s+=B>>4,0==(15&B)){if(B>>4==0)break}else this.IDCT_Source[Q.lossless.Decoder.IDCT_P[s]]=this.getn(g,15&B,I,g)*i[s]}}return 0},Q.lossless.Decoder.prototype.decodeSingle=function(A,I,g){var B,C,E,i;for(this.restarting?(this.restarting=!1,A[0]=1<=65280)return B;if((i=(E=this.getn(A,B,I,g))>>8)>=Q.lossless.Decoder.RESTART_MARKER_BEGIN&&i<=Q.lossless.Decoder.RESTART_MARKER_END)return i;A[0]+=E}return 0},Q.lossless.Decoder.prototype.getHuffmanValue=function(A,I,g){var B,C;if(65535,g[0]<8?(I[0]<<=8,255===(C=this.stream.get8())&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=9)),I[0]|=C):g[0]-=8,0!=((B=A[I[0]>>g[0]])&Q.lossless.Decoder.MSB)){if(0!==this.markerIndex)return this.markerIndex=0,65280|this.marker;I[0]&=65535>>16-g[0],I[0]<<=8,255===(C=this.stream.get8())&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=9)),I[0]|=C,B=A[256*(255&B)+(I[0]>>g[0])],g[0]+=8}if(g[0]+=8-(B>>8),g[0]<0)throw new Error("index="+g[0]+" temp="+I[0]+" code="+B+" in HuffmanValue()");return g[0]>16-g[0],255&B)},Q.lossless.Decoder.prototype.getn=function(A,I,g,B){var Q,C;if(1,-1,65535,0===I)return 0;if(16===I)return A[0]>=0?-32768:32768;if(B[0]-=I,B[0]>=0){if(B[0]>B[0],g[0]&=65535>>16-B[0]}else{if(g[0]<<=8,255===(C=this.stream.get8())&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=9)),g[0]|=C,B[0]+=8,B[0]<0){if(0!==this.markerIndex)return this.markerIndex=0,(65280|this.marker)<<8;g[0]<<=8,255===(C=this.stream.get8())&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=9)),g[0]|=C,B[0]+=8}if(B[0]<0)throw new Error("index="+B[0]+" in getn()");if(B[0]>B[0],g[0]&=65535>>16-B[0]}return Q<1<0?this.getter(this.yLoc*this.xDim+this.xLoc-1,A):this.yLoc>0?this.getPreviousY(A):1<0&&this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc-1,A):this.getPreviousY(A)},Q.lossless.Decoder.prototype.getPreviousY=function(A){return this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc,A):this.getPreviousX(A)},Q.lossless.Decoder.prototype.isLastPixel=function(){return this.xLoc===this.xDim-1&&this.yLoc===this.yDim-1},Q.lossless.Decoder.prototype.outputSingle=function(A){this.xLoc=this.xDim&&(this.yLoc+=1,this.xLoc=0))},Q.lossless.Decoder.prototype.outputRGB=function(A){var I=this.yLoc*this.xDim+this.xLoc;this.xLoc=this.xDim&&(this.yLoc+=1,this.xLoc=0))},Q.lossless.Decoder.prototype.setValue8=function(A,I){this.outputData[A]=I},Q.lossless.Decoder.prototype.getValue8=function(A){return this.outputData[A]},(B=new ArrayBuffer(2),new DataView(B).setInt16(0,256,!0),256===new Int16Array(B)[0])?(Q.lossless.Decoder.prototype.setValue16=Q.lossless.Decoder.prototype.setValue8,Q.lossless.Decoder.prototype.getValue16=Q.lossless.Decoder.prototype.getValue8):(Q.lossless.Decoder.prototype.setValue16=function(A,I){this.outputData[A]=(255&I)<<8|I>>8&255},Q.lossless.Decoder.prototype.getValue16=function(A){var I=this.outputData[A];return(255&I)<<8|I>>8&255}),Q.lossless.Decoder.prototype.setValueRGB=function(A,I,g){this.outputData[3*A+g]=I},Q.lossless.Decoder.prototype.getValueRGB=function(A,I){return this.outputData[3*A+I]},Q.lossless.Decoder.prototype.readApp=function(){var A=0,I=this.stream.get16();for(A+=2;AI)throw new Error("ERROR: frame format error");if(Q=A.get8(),(E+=1)>=I)throw new Error("ERROR: frame format error [c>=Lf]");C=A.get8(),E+=1,this.components[Q]||(this.components[Q]=new B.lossless.ComponentSpec),this.components[Q].hSamp=C>>4,this.components[Q].vSamp=15&C,this.components[Q].quantTableSel=A.get8(),E+=1}if(E!==I)throw new Error("ERROR: frame format error [Lf!=count]");return 1},"undefined"!==typeof I&&I.exports&&(I.exports=B.lossless.FrameHeader)},{"./component-spec.js":1,"./data-stream.js":2}],5:[function(A,I,g){"use strict";var B=B||{};B.lossless=B.lossless||{},B.lossless.DataStream=B.lossless.DataStream||(void 0!==A?A("./data-stream.js"):null),B.lossless.Utils=B.lossless.Utils||(void 0!==A?A("./utils.js"):null),B.lossless.HuffmanTable=B.lossless.HuffmanTable||function(){this.l=B.lossless.Utils.createArray(4,2,16),this.th=[],this.v=B.lossless.Utils.createArray(4,2,16,200),this.tc=B.lossless.Utils.createArray(4,2),this.tc[0][0]=0,this.tc[1][0]=0,this.tc[2][0]=0,this.tc[3][0]=0,this.tc[0][1]=0,this.tc[1][1]=0,this.tc[2][1]=0,this.tc[3][1]=0,this.th[0]=0,this.th[1]=0,this.th[2]=0,this.th[3]=0},B.lossless.HuffmanTable.MSB=2147483648,B.lossless.HuffmanTable.prototype.read=function(A,I){var g,B,Q,C,E,i,o=0;for(g=A.get16(),o+=2;o3)throw new Error("ERROR: Huffman table ID > 3");if((C=B>>4)>2)throw new Error("ERROR: Huffman table [Table class > 2 ]");for(this.th[Q]=1,this.tc[Q][C]=1,E=0;E<16;E+=1)this.l[Q][C][E]=A.get8(),o+=1;for(E=0;E<16;E+=1)for(i=0;ig)throw new Error("ERROR: Huffman table format error [count>Lh]");this.v[Q][C][E][i]=A.get8(),o+=1}}if(o!==g)throw new Error("ERROR: Huffman table format error [count!=Lf]");for(E=0;E<4;E+=1)for(i=0;i<2;i+=1)0!==this.tc[E][i]&&this.buildHuffTable(I[E][i],this.l[E][i],this.v[E][i]);return 1},B.lossless.HuffmanTable.prototype.buildHuffTable=function(A,I,g){var Q,C,E,i,o;for(256,C=0,E=0;E<8;E+=1)for(i=0;i>E+1;o+=1)A[C]=g[E][i]|E+1<<8,C+=1;for(E=1;C<256;E+=1,C+=1)A[C]=E|B.lossless.HuffmanTable.MSB;for(Q=1,C=0,E=8;E<16;E+=1)for(i=0;i>E-7;o+=1)A[256*Q+C]=g[E][i]|E+1<<8,C+=1;if(C>=256){if(C>256)throw new Error("ERROR: Huffman table error(1)!");C=0,Q+=1}}},"undefined"!==typeof I&&I.exports&&(I.exports=B.lossless.HuffmanTable)},{"./data-stream.js":2,"./utils.js":10}],6:[function(A,I,g){"use strict";var B=B||{};B.lossless=B.lossless||{},B.lossless.ComponentSpec=B.lossless.ComponentSpec||(void 0!==A?A("./component-spec.js"):null),B.lossless.DataStream=B.lossless.DataStream||(void 0!==A?A("./data-stream.js"):null),B.lossless.Decoder=B.lossless.Decoder||(void 0!==A?A("./decoder.js"):null),B.lossless.FrameHeader=B.lossless.FrameHeader||(void 0!==A?A("./frame-header.js"):null),B.lossless.HuffmanTable=B.lossless.HuffmanTable||(void 0!==A?A("./huffman-table.js"):null),B.lossless.QuantizationTable=B.lossless.QuantizationTable||(void 0!==A?A("./quantization-table.js"):null),B.lossless.ScanComponent=B.lossless.ScanComponent||(void 0!==A?A("./scan-component.js"):null),B.lossless.ScanHeader=B.lossless.ScanHeader||(void 0!==A?A("./scan-header.js"):null),B.lossless.Utils=B.lossless.Utils||(void 0!==A?A("./utils.js"):null),"undefined"!==typeof I&&I.exports&&(I.exports=B)},{"./component-spec.js":1,"./data-stream.js":2,"./decoder.js":3,"./frame-header.js":4,"./huffman-table.js":5,"./quantization-table.js":7,"./scan-component.js":8,"./scan-header.js":9,"./utils.js":10}],7:[function(A,I,g){"use strict";var B=B||{};B.lossless=B.lossless||{},B.lossless.DataStream=B.lossless.DataStream||(void 0!==A?A("./data-stream.js"):null),B.lossless.Utils=B.lossless.Utils||(void 0!==A?A("./utils.js"):null),B.lossless.QuantizationTable=B.lossless.QuantizationTable||function(){this.precision=[],this.tq=[],this.quantTables=B.lossless.Utils.createArray(4,64),this.tq[0]=0,this.tq[1]=0,this.tq[2]=0,this.tq[3]=0},B.lossless.QuantizationTable.enhanceQuantizationTable=function(A,I){var g;for(g=0;g<8;g+=1)A[I[0+g]]*=90,A[I[32+g]]*=90,A[I[16+g]]*=118,A[I[48+g]]*=49,A[I[40+g]]*=71,A[I[8+g]]*=126,A[I[56+g]]*=25,A[I[24+g]]*=106;for(g=0;g<8;g+=1)A[I[0+8*g]]*=90,A[I[4+8*g]]*=90,A[I[2+8*g]]*=118,A[I[6+8*g]]*=49,A[I[5+8*g]]*=71,A[I[1+8*g]]*=126,A[I[7+8*g]]*=25,A[I[3+8*g]]*=106;for(g=0;g<64;g+=1)A[g]>>=6},B.lossless.QuantizationTable.prototype.read=function(A,I){var g,Q,C,E,i=0;for(g=A.get16(),i+=2;i3)throw new Error("ERROR: Quantization table ID > 3");if(this.precision[C]=Q>>4,0===this.precision[C])this.precision[C]=8;else{if(1!==this.precision[C])throw new Error("ERROR: Quantization table precision error");this.precision[C]=16}if(this.tq[C]=1,8===this.precision[C]){for(E=0;E<64;E+=1){if(i>g)throw new Error("ERROR: Quantization table format error");this.quantTables[C][E]=A.get8(),i+=1}B.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[C],I)}else{for(E=0;E<64;E+=1){if(i>g)throw new Error("ERROR: Quantization table format error");this.quantTables[C][E]=A.get16(),i+=2}B.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[C],I)}}if(i!==g)throw new Error("ERROR: Quantization table error [count!=Lq]");return 1},"undefined"!==typeof I&&I.exports&&(I.exports=B.lossless.QuantizationTable)},{"./data-stream.js":2,"./utils.js":10}],8:[function(A,I,g){"use strict";var B=B||{};B.lossless=B.lossless||{},B.lossless.ScanComponent=B.lossless.ScanComponent||function(){this.acTabSel=0,this.dcTabSel=0,this.scanCompSel=0},"undefined"!==typeof I&&I.exports&&(I.exports=B.lossless.ScanComponent)},{}],9:[function(A,I,g){"use strict";var B=B||{};B.lossless=B.lossless||{},B.lossless.DataStream=B.lossless.DataStream||(void 0!==A?A("./data-stream.js"):null),B.lossless.ScanComponent=B.lossless.ScanComponent||(void 0!==A?A("./scan-component.js"):null),B.lossless.ScanHeader=B.lossless.ScanHeader||function(){this.ah=0,this.al=0,this.numComp=0,this.selection=0,this.spectralEnd=0,this.components=[]},B.lossless.ScanHeader.prototype.read=function(A){var I,g,Q,C=0;for(I=A.get16(),C+=2,this.numComp=A.get8(),C+=1,g=0;gI)throw new Error("ERROR: scan header format error");this.components[g].scanCompSel=A.get8(),C+=1,Q=A.get8(),C+=1,this.components[g].dcTabSel=Q>>4,this.components[g].acTabSel=15&Q}if(this.selection=A.get8(),C+=1,this.spectralEnd=A.get8(),C+=1,Q=A.get8(),this.ah=Q>>4,this.al=15&Q,(C+=1)!==I)throw new Error("ERROR: scan header format error [count!=Ns]");return 1},"undefined"!==typeof I&&I.exports&&(I.exports=B.lossless.ScanHeader)},{"./data-stream.js":2,"./scan-component.js":8}],10:[function(A,I,g){"use strict";var B=B||{};B.lossless=B.lossless||{},B.lossless.Utils=B.lossless.Utils||{},B.lossless.Utils.createArray=function(A){var I=new Array(A||0),g=A;if(arguments.length>1)for(var Q=Array.prototype.slice.call(arguments,1);g--;)I[A-1-g]=B.lossless.Utils.createArray.apply(this,Q);return I},B.lossless.Utils.makeCRCTable=function(){for(var A,I=[],g=0;g<256;g++){A=g;for(var B=0;B<8;B++)A=1&A?3988292384^A>>>1:A>>>1;I[g]=A}return I},B.lossless.Utils.crc32=function(A){for(var I=new Uint8Array(A.buffer),g=B.lossless.Utils.crcTable||(B.lossless.Utils.crcTable=B.lossless.Utils.makeCRCTable()),Q=-1,C=0;C>>8^g[255&(Q^I[C])];return(-1^Q)>>>0},"undefined"!==typeof I&&I.exports&&(I.exports=B.lossless.Utils)},{}]},{},[6])(6)}))},4559:(A,I,g)=>{A.exports=g(9842)},7552:(A,I,g)=>{A.exports=g(5697)},7647:(A,I,g)=>{A.exports=g(3798)},6028:(A,I,g)=>{A.exports=g(671)},1246:(A,I,g)=>{A.exports=g(8730)},337:(A,I,g)=>{A.exports=g(3751)},2770:(A,I,g)=>{A.exports=g(1380)},1882:(A,I,g)=>{A.exports=g(6601)},7878:(A,I,g)=>{A.exports=g(8783)},2250:(A,I,g)=>{A.exports=g(4731)},1082:(A,I,g)=>{A.exports=g(5723)},5534:(A,I,g)=>{A.exports=g(5213)},7458:A=>{var I=function(A){"use strict";var I,g=Object.prototype,B=g.hasOwnProperty,Q="function"==typeof Symbol?Symbol:{},C=Q.iterator||"@@iterator",E=Q.asyncIterator||"@@asyncIterator",i=Q.toStringTag||"@@toStringTag";function o(A,I,g){return Object.defineProperty(A,I,{value:g,enumerable:!0,configurable:!0,writable:!0}),A[I]}try{o({},"")}catch(A){o=function(A,I,g){return A[I]=g}}function D(A,I,g,B){var Q=I&&I.prototype instanceof F?I:F,C=Object.create(Q.prototype),E=new H(B||[]);return C._invoke=function(A,I,g){var B=s;return function(Q,C){if(B===t)throw new Error("Generator is already running");if(B===G){if("throw"===Q)throw C;return L()}for(g.method=Q,g.arg=C;;){var E=g.delegate;if(E){var i=U(E,g);if(i){if(i===h)continue;return i}}if("next"===g.method)g.sent=g._sent=g.arg;else if("throw"===g.method){if(B===s)throw B=G,g.arg;g.dispatchException(g.arg)}else"return"===g.method&&g.abrupt("return",g.arg);B=t;var o=a(A,I,g);if("normal"===o.type){if(B=g.done?G:w,o.arg===h)continue;return{value:o.arg,done:g.done}}"throw"===o.type&&(B=G,g.method="throw",g.arg=o.arg)}}}(A,g,E),C}function a(A,I,g){try{return{type:"normal",arg:A.call(I,g)}}catch(A){return{type:"throw",arg:A}}}A.wrap=D;var s="suspendedStart",w="suspendedYield",t="executing",G="completed",h={};function F(){}function y(){}function c(){}var r={};o(r,C,(function(){return this}));var N=Object.getPrototypeOf,R=N&&N(N(M([])));R&&R!==g&&B.call(R,C)&&(r=R);var e=c.prototype=F.prototype=Object.create(r);function n(A){["next","throw","return"].forEach((function(I){o(A,I,(function(A){return this._invoke(I,A)}))}))}function S(A,I){function g(Q,C,E,i){var o=a(A[Q],A,C);if("throw"!==o.type){var D=o.arg,s=D.value;return s&&"object"==typeof s&&B.call(s,"__await")?I.resolve(s.__await).then((function(A){g("next",A,E,i)}),(function(A){g("throw",A,E,i)})):I.resolve(s).then((function(A){D.value=A,E(D)}),(function(A){return g("throw",A,E,i)}))}i(o.arg)}var Q;this._invoke=function(A,B){function C(){return new I((function(I,Q){g(A,B,I,Q)}))}return Q=Q?Q.then(C,C):C()}}function U(A,g){var B=A.iterator[g.method];if(B===I){if(g.delegate=null,"throw"===g.method){if(A.iterator.return&&(g.method="return",g.arg=I,U(A,g),"throw"===g.method))return h;g.method="throw",g.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var Q=a(B,A.iterator,g.arg);if("throw"===Q.type)return g.method="throw",g.arg=Q.arg,g.delegate=null,h;var C=Q.arg;return C?C.done?(g[A.resultName]=C.value,g.next=A.nextLoc,"return"!==g.method&&(g.method="next",g.arg=I),g.delegate=null,h):C:(g.method="throw",g.arg=new TypeError("iterator result is not an object"),g.delegate=null,h)}function k(A){var I={tryLoc:A[0]};1 in A&&(I.catchLoc=A[1]),2 in A&&(I.finallyLoc=A[2],I.afterLoc=A[3]),this.tryEntries.push(I)}function J(A){var I=A.completion||{};I.type="normal",delete I.arg,A.completion=I}function H(A){this.tryEntries=[{tryLoc:"root"}],A.forEach(k,this),this.reset(!0)}function M(A){if(A){var g=A[C];if(g)return g.call(A);if("function"==typeof A.next)return A;if(!isNaN(A.length)){var Q=-1,E=function g(){for(;++Q=0;--C){var E=this.tryEntries[C],i=E.completion;if("root"===E.tryLoc)return Q("end");if(E.tryLoc<=this.prev){var o=B.call(E,"catchLoc"),D=B.call(E,"finallyLoc");if(o&&D){if(this.prev=0;--g){var Q=this.tryEntries[g];if(Q.tryLoc<=this.prev&&B.call(Q,"finallyLoc")&&this.prev=0;--I){var g=this.tryEntries[I];if(g.finallyLoc===A)return this.complete(g.completion,g.afterLoc),J(g),h}},catch:function(A){for(var I=this.tryEntries.length-1;I>=0;--I){var g=this.tryEntries[I];if(g.tryLoc===A){var B=g.completion;if("throw"===B.type){var Q=B.arg;J(g)}return Q}}throw new Error("illegal catch attempt")},delegateYield:function(A,g,B){return this.delegate={iterator:M(A),resultName:g,nextLoc:B},"next"===this.method&&(this.arg=I),h}},A}(A.exports);try{regeneratorRuntime=I}catch(A){"object"==typeof globalThis?globalThis.regeneratorRuntime=I:Function("r","regeneratorRuntime = r")(I)}},2043:(A,I,g)=>{A.exports=g(7458)},8327:(A,I,g)=>{var B,Q=(B=(B="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(A){var I,Q,C=void 0!==(A=A||{})?A:{};C.ready=new Promise((function(A,g){I=A,Q=g}));var E,i,o,D=Object.assign({},C),a=[],s="object"==typeof window,w="function"==typeof importScripts,t="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,G="";if(t){var h=g(981),F=g(1209);G=w?F.dirname(G)+"/":"//",E=(A,I)=>(A=v(A)?new URL(A):F.normalize(A),h.readFileSync(A,I?void 0:"utf8")),o=A=>{var I=E(A,!0);return I.buffer||(I=new Uint8Array(I)),I},i=(A,I,g)=>{A=v(A)?new URL(A):F.normalize(A),h.readFile(A,(function(A,B){A?g(A):I(B.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\\\/g,"/"),a=process.argv.slice(2),process.on("uncaughtException",(function(A){if(!(A instanceof P))throw A})),process.on("unhandledRejection",(function(A){throw A})),C.inspect=function(){return"[Emscripten Module object]"}}else(s||w)&&(w?G=self.location.href:"undefined"!=typeof document&&document.currentScript&&(G=document.currentScript.src),B&&(G=B),G=0!==G.indexOf("blob:")?G.substr(0,G.replace(/[?#].*/,"").lastIndexOf("/")+1):"",E=A=>{var I=new XMLHttpRequest;return I.open("GET",A,!1),I.send(null),I.responseText},w&&(o=A=>{var I=new XMLHttpRequest;return I.open("GET",A,!1),I.responseType="arraybuffer",I.send(null),new Uint8Array(I.response)}),i=(A,I,g)=>{var B=new XMLHttpRequest;B.open("GET",A,!0),B.responseType="arraybuffer",B.onload=()=>{200==B.status||0==B.status&&B.response?I(B.response):g()},B.onerror=g,B.send(null)});C.print||console.log.bind(console);var y,c=C.printErr||console.warn.bind(console);Object.assign(C,D),D=null,C.arguments&&(a=C.arguments),C.thisProgram&&C.thisProgram,C.quit&&C.quit,C.wasmBinary&&(y=C.wasmBinary);var r;C.noExitRuntime;"object"!=typeof WebAssembly&&x("no native wasm support detected");var N,R,e,n,S,U,k,J,H,M=!1,L="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function Y(A,I){return A?function(A,I,g){for(var B=I+g,Q=I;A[Q]&&!(Q>=B);)++Q;if(Q-I>16&&A.buffer&&L)return L.decode(A.subarray(I,Q));for(var C="";I>10,56320|1023&D)}}else C+=String.fromCharCode((31&E)<<6|i)}else C+=String.fromCharCode(E)}return C}(e,A,I):""}function K(A,I,g){return function(A,I,g,B){if(!(B>0))return 0;for(var Q=g,C=g+B-1,E=0;E=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&A.charCodeAt(++E)),i<=127){if(g>=C)break;I[g++]=i}else if(i<=2047){if(g+1>=C)break;I[g++]=192|i>>6,I[g++]=128|63&i}else if(i<=65535){if(g+2>=C)break;I[g++]=224|i>>12,I[g++]=128|i>>6&63,I[g++]=128|63&i}else{if(g+3>=C)break;I[g++]=240|i>>18,I[g++]=128|i>>12&63,I[g++]=128|i>>6&63,I[g++]=128|63&i}}return I[g]=0,g-Q}(A,e,I,g)}function d(A){N=A,C.HEAP8=R=new Int8Array(A),C.HEAP16=n=new Int16Array(A),C.HEAP32=U=new Int32Array(A),C.HEAPU8=e=new Uint8Array(A),C.HEAPU16=S=new Uint16Array(A),C.HEAPU32=k=new Uint32Array(A),C.HEAPF32=J=new Float32Array(A),C.HEAPF64=H=new Float64Array(A)}C.INITIAL_MEMORY;var l,f,u,q=[],p=[],b=[],W=0,Z=null,m=null;function x(A){C.onAbort&&C.onAbort(A),c(A="Aborted("+A+")"),M=!0,A+=". Build with -sASSERTIONS for more info.";var I=new WebAssembly.RuntimeError(A);throw Q(I),I}function T(A){return A.startsWith("data:application/octet-stream;base64,")}function v(A){return A.startsWith("file://")}function X(A){try{if(A==f&&y)return new Uint8Array(y);if(o)return o(A);throw"both async and sync fetching of the wasm failed"}catch(A){x(A)}}function P(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function V(A){for(;A.length>0;)A.shift()(C)}function O(A){this.excPtr=A,this.ptr=A-24,this.set_type=function(A){k[this.ptr+4>>2]=A},this.get_type=function(){return k[this.ptr+4>>2]},this.set_destructor=function(A){k[this.ptr+8>>2]=A},this.get_destructor=function(){return k[this.ptr+8>>2]},this.set_refcount=function(A){U[this.ptr>>2]=A},this.set_caught=function(A){A=A?1:0,R[this.ptr+12>>0]=A},this.get_caught=function(){return 0!=R[this.ptr+12>>0]},this.set_rethrown=function(A){A=A?1:0,R[this.ptr+13>>0]=A},this.get_rethrown=function(){return 0!=R[this.ptr+13>>0]},this.init=function(A,I){this.set_adjusted_ptr(0),this.set_type(A),this.set_destructor(I),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var A=U[this.ptr>>2];U[this.ptr>>2]=A+1},this.release_ref=function(){var A=U[this.ptr>>2];return U[this.ptr>>2]=A-1,1===A},this.set_adjusted_ptr=function(A){k[this.ptr+16>>2]=A},this.get_adjusted_ptr=function(){return k[this.ptr+16>>2]},this.get_exception_ptr=function(){if(dI(this.get_type()))return k[this.excPtr>>2];var A=this.get_adjusted_ptr();return 0!==A?A:this.excPtr}}T(f="charlswasm_decode.wasm")||(u=f,f=C.locateFile?C.locateFile(u,G):G+u);var j={};function z(A){for(;A.length;){var I=A.pop();A.pop()(I)}}function _(A){return this.fromWireType(U[A>>2])}var $={},AA={},IA={};function gA(A){if(void 0===A)return"_unknown";var I=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return I>=48&&I<=57?"_"+A:A}function BA(A,I){return A=gA(A),new Function("body","return function "+A+'() {\\n "use strict"; return body.apply(this, arguments);\\n};\\n')(I)}function QA(A,I){var g=BA(I,(function(A){this.name=I,this.message=A;var g=new Error(A).stack;void 0!==g&&(this.stack=this.toString()+"\\n"+g.replace(/^Error(:[^\\n]*)?\\n/,""))}));return g.prototype=Object.create(A.prototype),g.prototype.constructor=g,g.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},g}var CA=void 0;function EA(A){throw new CA(A)}function iA(A,I,g){function B(I){var B=g(I);B.length!==A.length&&EA("Mismatched type converter count");for(var Q=0;Q{AA.hasOwnProperty(A)?Q[I]=AA[A]:(C.push(A),$.hasOwnProperty(A)||($[A]=[]),$[A].push((()=>{Q[I]=AA[A],++E===C.length&&B(Q)})))})),0===C.length&&B(Q)}function oA(A){switch(A){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+A)}}var DA=void 0;function aA(A){for(var I="",g=A;e[g];)I+=DA[e[g++]];return I}var sA=void 0;function wA(A){throw new sA(A)}function tA(A,I,g={}){if(!("argPackAdvance"in I))throw new TypeError("registerType registeredInstance requires argPackAdvance");var B=I.name;if(A||wA('type "'+B+'" must have a positive integer typeid pointer'),AA.hasOwnProperty(A)){if(g.ignoreDuplicateRegistrations)return;wA("Cannot register type '"+B+"' twice")}if(AA[A]=I,delete IA[A],$.hasOwnProperty(A)){var Q=$[A];delete $[A],Q.forEach((A=>A()))}}function GA(A){if(!(this instanceof uA))return!1;if(!(A instanceof uA))return!1;for(var I=this.$$.ptrType.registeredClass,g=this.$$.ptr,B=A.$$.ptrType.registeredClass,Q=A.$$.ptr;I.baseClass;)g=I.upcast(g),I=I.baseClass;for(;B.baseClass;)Q=B.upcast(Q),B=B.baseClass;return I===B&&g===Q}function hA(A){wA(A.$$.ptrType.registeredClass.name+" instance already deleted")}var FA=!1;function yA(A){}function cA(A){A.count.value-=1,0===A.count.value&&function(A){A.smartPtr?A.smartPtrType.rawDestructor(A.smartPtr):A.ptrType.registeredClass.rawDestructor(A.ptr)}(A)}function rA(A,I,g){if(I===g)return A;if(void 0===g.baseClass)return null;var B=rA(A,I,g.baseClass);return null===B?null:g.downcast(B)}var NA={};function RA(){return Object.keys(JA).length}function eA(){var A=[];for(var I in JA)JA.hasOwnProperty(I)&&A.push(JA[I]);return A}var nA=[];function SA(){for(;nA.length;){var A=nA.pop();A.$$.deleteScheduled=!1,A.delete()}}var UA=void 0;function kA(A){UA=A,nA.length&&UA&&UA(SA)}var JA={};function HA(A,I){return I=function(A,I){for(void 0===I&&wA("ptr should not be undefined");A.baseClass;)I=A.upcast(I),A=A.baseClass;return I}(A,I),JA[I]}function MA(A,I){return I.ptrType&&I.ptr||EA("makeClassHandle requires ptr and ptrType"),!!I.smartPtrType!=!!I.smartPtr&&EA("Both smartPtrType and smartPtr must be specified"),I.count={value:1},YA(Object.create(A,{$$:{value:I}}))}function LA(A){var I=this.getPointee(A);if(!I)return this.destructor(A),null;var g=HA(this.registeredClass,I);if(void 0!==g){if(0===g.$$.count.value)return g.$$.ptr=I,g.$$.smartPtr=A,g.clone();var B=g.clone();return this.destructor(A),B}function Q(){return this.isSmartPointer?MA(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:I,smartPtrType:this,smartPtr:A}):MA(this.registeredClass.instancePrototype,{ptrType:this,ptr:A})}var C,E=this.registeredClass.getActualType(I),i=NA[E];if(!i)return Q.call(this);C=this.isConst?i.constPointerType:i.pointerType;var o=rA(I,this.registeredClass,C.registeredClass);return null===o?Q.call(this):this.isSmartPointer?MA(C.registeredClass.instancePrototype,{ptrType:C,ptr:o,smartPtrType:this,smartPtr:A}):MA(C.registeredClass.instancePrototype,{ptrType:C,ptr:o})}function YA(A){return"undefined"==typeof FinalizationRegistry?(YA=A=>A,A):(FA=new FinalizationRegistry((A=>{cA(A.$$)})),yA=A=>FA.unregister(A),(YA=A=>{var I=A.$$;if(I.smartPtr){var g={$$:I};FA.register(A,g,A)}return A})(A))}function KA(){if(this.$$.ptr||hA(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var A,I=YA(Object.create(Object.getPrototypeOf(this),{$$:{value:(A=this.$$,{count:A.count,deleteScheduled:A.deleteScheduled,preservePointerOnDelete:A.preservePointerOnDelete,ptr:A.ptr,ptrType:A.ptrType,smartPtr:A.smartPtr,smartPtrType:A.smartPtrType})}}));return I.$$.count.value+=1,I.$$.deleteScheduled=!1,I}function dA(){this.$$.ptr||hA(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&wA("Object already scheduled for deletion"),yA(this),cA(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function lA(){return!this.$$.ptr}function fA(){return this.$$.ptr||hA(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&wA("Object already scheduled for deletion"),nA.push(this),1===nA.length&&UA&&UA(SA),this.$$.deleteScheduled=!0,this}function uA(){}function qA(A,I,g){if(void 0===A[I].overloadTable){var B=A[I];A[I]=function(){return A[I].overloadTable.hasOwnProperty(arguments.length)||wA("Function '"+g+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+A[I].overloadTable+")!"),A[I].overloadTable[arguments.length].apply(this,arguments)},A[I].overloadTable=[],A[I].overloadTable[B.argCount]=B}}function pA(A,I,g){C.hasOwnProperty(A)?((void 0===g||void 0!==C[A].overloadTable&&void 0!==C[A].overloadTable[g])&&wA("Cannot register public name '"+A+"' twice"),qA(C,A,A),C.hasOwnProperty(g)&&wA("Cannot register multiple overloads of a function with the same number of arguments ("+g+")!"),C[A].overloadTable[g]=I):(C[A]=I,void 0!==g&&(C[A].numArguments=g))}function bA(A,I,g,B,Q,C,E,i){this.name=A,this.constructor=I,this.instancePrototype=g,this.rawDestructor=B,this.baseClass=Q,this.getActualType=C,this.upcast=E,this.downcast=i,this.pureVirtualFunctions=[]}function WA(A,I,g){for(;I!==g;)I.upcast||wA("Expected null or instance of "+g.name+", got an instance of "+I.name),A=I.upcast(A),I=I.baseClass;return A}function ZA(A,I){if(null===I)return this.isReference&&wA("null is not a valid "+this.name),0;I.$$||wA('Cannot pass "'+aI(I)+'" as a '+this.name),I.$$.ptr||wA("Cannot pass deleted object as a pointer of type "+this.name);var g=I.$$.ptrType.registeredClass;return WA(I.$$.ptr,g,this.registeredClass)}function mA(A,I){var g;if(null===I)return this.isReference&&wA("null is not a valid "+this.name),this.isSmartPointer?(g=this.rawConstructor(),null!==A&&A.push(this.rawDestructor,g),g):0;I.$$||wA('Cannot pass "'+aI(I)+'" as a '+this.name),I.$$.ptr||wA("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&I.$$.ptrType.isConst&&wA("Cannot convert argument of type "+(I.$$.smartPtrType?I.$$.smartPtrType.name:I.$$.ptrType.name)+" to parameter type "+this.name);var B=I.$$.ptrType.registeredClass;if(g=WA(I.$$.ptr,B,this.registeredClass),this.isSmartPointer)switch(void 0===I.$$.smartPtr&&wA("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:I.$$.smartPtrType===this?g=I.$$.smartPtr:wA("Cannot convert argument of type "+(I.$$.smartPtrType?I.$$.smartPtrType.name:I.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:g=I.$$.smartPtr;break;case 2:if(I.$$.smartPtrType===this)g=I.$$.smartPtr;else{var Q=I.clone();g=this.rawShare(g,DI.toHandle((function(){Q.delete()}))),null!==A&&A.push(this.rawDestructor,g)}break;default:wA("Unsupporting sharing policy")}return g}function xA(A,I){if(null===I)return this.isReference&&wA("null is not a valid "+this.name),0;I.$$||wA('Cannot pass "'+aI(I)+'" as a '+this.name),I.$$.ptr||wA("Cannot pass deleted object as a pointer of type "+this.name),I.$$.ptrType.isConst&&wA("Cannot convert argument of type "+I.$$.ptrType.name+" to parameter type "+this.name);var g=I.$$.ptrType.registeredClass;return WA(I.$$.ptr,g,this.registeredClass)}function TA(A){return this.rawGetPointee&&(A=this.rawGetPointee(A)),A}function vA(A){this.rawDestructor&&this.rawDestructor(A)}function XA(A){null!==A&&A.delete()}function PA(A,I,g,B,Q,C,E,i,o,D,a){this.name=A,this.registeredClass=I,this.isReference=g,this.isConst=B,this.isSmartPointer=Q,this.pointeeType=C,this.sharingPolicy=E,this.rawGetPointee=i,this.rawConstructor=o,this.rawShare=D,this.rawDestructor=a,Q||void 0!==I.baseClass?this.toWireType=mA:B?(this.toWireType=ZA,this.destructorFunction=null):(this.toWireType=xA,this.destructorFunction=null)}function VA(A,I,g){C.hasOwnProperty(A)||EA("Replacing nonexistant public symbol"),void 0!==C[A].overloadTable&&void 0!==g?C[A].overloadTable[g]=I:(C[A]=I,C[A].argCount=g)}var OA=[];function jA(A){var I=OA[A];return I||(A>=OA.length&&(OA.length=A+1),OA[A]=I=l.get(A)),I}function zA(A,I,g){return A.includes("j")?function(A,I,g){var B=C["dynCall_"+A];return g&&g.length?B.apply(null,[I].concat(g)):B.call(null,I)}(A,I,g):jA(I).apply(null,g)}function _A(A,I){var g,B,Q,C=(A=aA(A)).includes("j")?(g=A,B=I,Q=[],function(){return Q.length=0,Object.assign(Q,arguments),zA(g,B,Q)}):jA(I);return"function"!=typeof C&&wA("unknown function pointer with signature "+A+": "+I),C}var $A=void 0;function AI(A){var I=HI(A),g=aA(I);return MI(I),g}function II(A,I){var g=[],B={};throw I.forEach((function A(I){B[I]||AA[I]||(IA[I]?IA[I].forEach(A):(g.push(I),B[I]=!0))})),new $A(A+": "+g.map(AI).join([", "]))}function gI(A,I){for(var g=[],B=0;B>2]);return g}function BI(A,I,g,B,Q){var C=I.length;C<2&&wA("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var E=null!==I[1]&&null!==g,i=!1,o=1;o0?", ":"")+s),w+=(D?"var rv = ":"")+"invoker(fn"+(s.length>0?", ":"")+s+");\\n",i)w+="runDestructors(destructors);\\n";else for(o=E?1:2;o4&&0==--CI[A].refcount&&(CI[A]=void 0,QI.push(A))}function iI(){for(var A=0,I=5;I(A||wA("Cannot use deleted val. handle = "+A),CI[A].value),toHandle:A=>{switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var I=QI.length?QI.pop():CI.length;return CI[I]={refcount:1,value:A},I}}};function aI(A){if(null===A)return"null";var I=typeof A;return"object"===I||"array"===I||"function"===I?A.toString():""+A}function sI(A,I){switch(I){case 2:return function(A){return this.fromWireType(J[A>>2])};case 3:return function(A){return this.fromWireType(H[A>>3])};default:throw new TypeError("Unknown float type: "+A)}}function wI(A,I,g){switch(I){case 0:return g?function(A){return R[A]}:function(A){return e[A]};case 1:return g?function(A){return n[A>>1]}:function(A){return S[A>>1]};case 2:return g?function(A){return U[A>>2]}:function(A){return k[A>>2]};default:throw new TypeError("Unknown integer type: "+A)}}var tI="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function GI(A,I){for(var g=A,B=g>>1,Q=B+I/2;!(B>=Q)&&S[B];)++B;if((g=B<<1)-A>32&&tI)return tI.decode(e.subarray(A,g));for(var C="",E=0;!(E>=I/2);++E){var i=n[A+2*E>>1];if(0==i)break;C+=String.fromCharCode(i)}return C}function hI(A,I,g){if(void 0===g&&(g=2147483647),g<2)return 0;for(var B=I,Q=(g-=2)<2*A.length?g/2:A.length,C=0;C>1]=E,I+=2}return n[I>>1]=0,I-B}function FI(A){return 2*A.length}function yI(A,I){for(var g=0,B="";!(g>=I/4);){var Q=U[A+4*g>>2];if(0==Q)break;if(++g,Q>=65536){var C=Q-65536;B+=String.fromCharCode(55296|C>>10,56320|1023&C)}else B+=String.fromCharCode(Q)}return B}function cI(A,I,g){if(void 0===g&&(g=2147483647),g<4)return 0;for(var B=I,Q=B+g-4,C=0;C=55296&&E<=57343&&(E=65536+((1023&E)<<10)|1023&A.charCodeAt(++C)),U[I>>2]=E,(I+=4)+4>Q)break}return U[I>>2]=0,I-B}function rI(A){for(var I=0,g=0;g=55296&&B<=57343&&++g,I+=4}return I}var NI={};function RI(){return"object"==typeof globalThis?globalThis:Function("return this")()}function eI(A,I){var g=AA[A];return void 0===g&&wA(I+" has unknown type "+AI(A)),g}var nI={};function SI(A){try{return r.grow(A-N.byteLength+65535>>>16),d(r.buffer),1}catch(A){}}CA=C.InternalError=QA(Error,"InternalError"),function(){for(var A=new Array(256),I=0;I<256;++I)A[I]=String.fromCharCode(I);DA=A}(),sA=C.BindingError=QA(Error,"BindingError"),uA.prototype.isAliasOf=GA,uA.prototype.clone=KA,uA.prototype.delete=dA,uA.prototype.isDeleted=lA,uA.prototype.deleteLater=fA,C.getInheritedInstanceCount=RA,C.getLiveInheritedInstances=eA,C.flushPendingDeletes=SA,C.setDelayFunction=kA,PA.prototype.getPointee=TA,PA.prototype.destructor=vA,PA.prototype.argPackAdvance=8,PA.prototype.readValueFromPointer=_,PA.prototype.deleteObject=XA,PA.prototype.fromWireType=LA,$A=C.UnboundTypeError=QA(Error,"UnboundTypeError"),C.count_emval_handles=iI,C.get_first_emval=oI;var UI,kI={h:function(A,I,g){throw new O(A).init(I,g),A},q:function(A){var I=j[A];delete j[A];var g=I.rawConstructor,B=I.rawDestructor,Q=I.fields;iA([A],Q.map((A=>A.getterReturnType)).concat(Q.map((A=>A.setterArgumentType))),(A=>{var C={};return Q.forEach(((I,g)=>{var B=I.fieldName,E=A[g],i=I.getter,o=I.getterContext,D=A[g+Q.length],a=I.setter,s=I.setterContext;C[B]={read:A=>E.fromWireType(i(o,A)),write:(A,I)=>{var g=[];a(s,A,D.toWireType(g,I)),z(g)}}})),[{name:I.name,fromWireType:function(A){var I={};for(var g in C)I[g]=C[g].read(A);return B(A),I},toWireType:function(A,I){for(var Q in C)if(!(Q in I))throw new TypeError('Missing field: "'+Q+'"');var E=g();for(Q in C)C[Q].write(E,I[Q]);return null!==A&&A.push(B,E),E},argPackAdvance:8,readValueFromPointer:_,destructorFunction:B}]}))},r:function(A,I,g,B,Q){},w:function(A,I,g,B,Q){var C=oA(g);tA(A,{name:I=aA(I),fromWireType:function(A){return!!A},toWireType:function(A,I){return I?B:Q},argPackAdvance:8,readValueFromPointer:function(A){var B;if(1===g)B=R;else if(2===g)B=n;else{if(4!==g)throw new TypeError("Unknown boolean type size: "+I);B=U}return this.fromWireType(B[A>>C])},destructorFunction:null})},p:function(A,I,g,B,Q,C,E,i,o,D,a,s,w){a=aA(a),C=_A(Q,C),i&&(i=_A(E,i)),D&&(D=_A(o,D)),w=_A(s,w);var t=gA(a);pA(t,(function(){II("Cannot construct "+a+" due to unbound types",[B])})),iA([A,I,g],B?[B]:[],(function(I){var g,Q;I=I[0],Q=B?(g=I.registeredClass).instancePrototype:uA.prototype;var E=BA(t,(function(){if(Object.getPrototypeOf(this)!==o)throw new sA("Use 'new' to construct "+a);if(void 0===s.constructor_body)throw new sA(a+" has no accessible constructor");var A=s.constructor_body[arguments.length];if(void 0===A)throw new sA("Tried to invoke ctor of "+a+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(s.constructor_body).toString()+") parameters instead!");return A.apply(this,arguments)})),o=Object.create(Q,{constructor:{value:E}});E.prototype=o;var s=new bA(a,E,o,w,g,C,i,D),G=new PA(a,s,!0,!1,!1),h=new PA(a+"*",s,!1,!1,!1),F=new PA(a+" const*",s,!1,!0,!1);return NA[A]={pointerType:h,constPointerType:F},VA(t,E),[G,h,F]}))},o:function(A,I,g,B,Q,C){var E;I>0||x(E);var i=gI(I,g);Q=_A(B,Q),iA([],[A],(function(A){var g="constructor "+(A=A[0]).name;if(void 0===A.registeredClass.constructor_body&&(A.registeredClass.constructor_body=[]),void 0!==A.registeredClass.constructor_body[I-1])throw new sA("Cannot register multiple constructors with identical number of parameters ("+(I-1)+") for class '"+A.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return A.registeredClass.constructor_body[I-1]=()=>{II("Cannot construct "+A.name+" due to unbound types",i)},iA([],i,(function(B){return B.splice(1,0,null),A.registeredClass.constructor_body[I-1]=BI(g,B,null,Q,C),[]})),[]}))},c:function(A,I,g,B,Q,C,E,i){var o=gI(g,B);I=aA(I),C=_A(Q,C),iA([],[A],(function(A){var B=(A=A[0]).name+"."+I;function Q(){II("Cannot call "+B+" due to unbound types",o)}I.startsWith("@@")&&(I=Symbol[I.substring(2)]),i&&A.registeredClass.pureVirtualFunctions.push(I);var D=A.registeredClass.instancePrototype,a=D[I];return void 0===a||void 0===a.overloadTable&&a.className!==A.name&&a.argCount===g-2?(Q.argCount=g-2,Q.className=A.name,D[I]=Q):(qA(D,I,B),D[I].overloadTable[g-2]=Q),iA([],o,(function(Q){var i=BI(B,Q,A,C,E);return void 0===D[I].overloadTable?(i.argCount=g-2,D[I]=i):D[I].overloadTable[g-2]=i,[]})),[]}))},v:function(A,I){tA(A,{name:I=aA(I),fromWireType:function(A){var I=DI.toValue(A);return EI(A),I},toWireType:function(A,I){return DI.toHandle(I)},argPackAdvance:8,readValueFromPointer:_,destructorFunction:null})},k:function(A,I,g){var B=oA(g);tA(A,{name:I=aA(I),fromWireType:function(A){return A},toWireType:function(A,I){return I},argPackAdvance:8,readValueFromPointer:sI(I,B),destructorFunction:null})},e:function(A,I,g,B,Q,C){var E=gI(I,g);A=aA(A),Q=_A(B,Q),pA(A,(function(){II("Cannot call "+A+" due to unbound types",E)}),I-1),iA([],E,(function(g){var B=[g[0],null].concat(g.slice(1));return VA(A,BI(A,B,null,Q,C),I-1),[]}))},b:function(A,I,g,B,Q){I=aA(I),-1===Q&&(Q=4294967295);var C=oA(g),E=A=>A;if(0===B){var i=32-8*g;E=A=>A<>>i}var o=I.includes("unsigned");tA(A,{name:I,fromWireType:E,toWireType:o?function(A,I){return this.name,I>>>0}:function(A,I){return this.name,I},argPackAdvance:8,readValueFromPointer:wI(I,C,0!==B),destructorFunction:null})},a:function(A,I,g){var B=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][I];function Q(A){var I=k,g=I[A>>=2],Q=I[A+1];return new B(N,Q,g)}tA(A,{name:g=aA(g),fromWireType:Q,argPackAdvance:8,readValueFromPointer:Q},{ignoreDuplicateRegistrations:!0})},j:function(A,I){var g="std::string"===(I=aA(I));tA(A,{name:I,fromWireType:function(A){var I,B=k[A>>2],Q=A+4;if(g)for(var C=Q,E=0;E<=B;++E){var i=Q+E;if(E==B||0==e[i]){var o=Y(C,i-C);void 0===I?I=o:(I+=String.fromCharCode(0),I+=o),C=i+1}}else{var D=new Array(B);for(E=0;E=55296&&B<=57343?(I+=4,++g):I+=3}return I}(I):I.length;var C=JI(4+B+1),E=C+4;if(k[C>>2]=B,g&&Q)K(I,E,B+1);else if(Q)for(var i=0;i255&&(MI(E),wA("String has UTF-16 code units that do not fit in 8 bits")),e[E+i]=o}else for(i=0;iS,i=1):4===I&&(B=yI,Q=cI,E=rI,C=()=>k,i=2),tA(A,{name:g,fromWireType:function(A){for(var g,Q=k[A>>2],E=C(),o=A+4,D=0;D<=Q;++D){var a=A+4+D*I;if(D==Q||0==E[a>>i]){var s=B(o,a-o);void 0===g?g=s:(g+=String.fromCharCode(0),g+=s),o=a+I}}return MI(A),g},toWireType:function(A,B){"string"!=typeof B&&wA("Cannot pass non-string to C++ string type "+g);var C=E(B),o=JI(4+C+I);return k[o>>2]=C>>i,Q(B,o+4,C+I),null!==A&&A.push(MI,o),o},argPackAdvance:8,readValueFromPointer:_,destructorFunction:function(A){MI(A)}})},u:function(A,I,g,B,Q,C){j[A]={name:aA(I),rawConstructor:_A(g,B),rawDestructor:_A(Q,C),fields:[]}},d:function(A,I,g,B,Q,C,E,i,o,D){j[A].fields.push({fieldName:aA(I),getterReturnType:g,getter:_A(B,Q),getterContext:C,setterArgumentType:E,setter:_A(i,o),setterContext:D})},x:function(A,I){tA(A,{isVoid:!0,name:I=aA(I),argPackAdvance:0,fromWireType:function(){},toWireType:function(A,I){}})},i:EI,m:function(A){return 0===A?DI.toHandle(RI()):(A=void 0===(g=NI[I=A])?aA(I):g,DI.toHandle(RI()[A]));var I,g},l:function(A){A>4&&(CI[A].refcount+=1)},y:function(A,I,g,B){A=DI.toValue(A);var Q=nI[I];return Q||(Q=function(A){for(var I="",g=0;g>2)], 'parameter "+g+"');\\nvar arg"+g+" = argType"+g+".readValueFromPointer(args);\\nargs += argType"+g+"['argPackAdvance'];\\nargTypes += 4;\\n";return B+="var obj = new constructor("+I+");\\nreturn valueToHandle(obj);\\n}\\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",B)(eI,C,DI.toHandle,(()=>k))}(I),nI[I]=Q),Q(A,g,B)},n:function(A,I){var g=(A=eI(A,"_emval_take_value")).readValueFromPointer(I);return DI.toHandle(g)},f:function(){x("")},t:function(A,I,g){e.copyWithin(A,I,I+g)},s:function(A){var I,g,B=e.length,Q=2147483648;if((A>>>=0)>Q)return!1;for(var C=1;C<=4;C*=2){var E=B*(1+.2/C);if(E=Math.min(E,A+100663296),SI(Math.min(Q,(I=Math.max(A,E))+((g=65536)-I%g)%g)))return!0}return!1}},JI=(function(){var A={a:kI};function I(A,I){var g,B=A.exports;C.asm=B,d((r=C.asm.z).buffer),l=C.asm.C,g=C.asm.A,p.unshift(g),function(A){if(W--,C.monitorRunDependencies&&C.monitorRunDependencies(W),0==W&&(null!==Z&&(clearInterval(Z),Z=null),m)){var I=m;m=null,I()}}()}function g(A){I(A.instance)}function B(I){return function(){if(!y&&(s||w)){if("function"==typeof fetch&&!v(f))return fetch(f,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+f+"'";return A.arrayBuffer()})).catch((function(){return X(f)}));if(i)return new Promise((function(A,I){i(f,(function(I){A(new Uint8Array(I))}),I)}))}return Promise.resolve().then((function(){return X(f)}))}().then((function(I){return WebAssembly.instantiate(I,A)})).then((function(A){return A})).then(I,(function(A){c("failed to asynchronously prepare wasm: "+A),x(A)}))}if(W++,C.monitorRunDependencies&&C.monitorRunDependencies(W),C.instantiateWasm)try{return C.instantiateWasm(A,I)}catch(A){c("Module.instantiateWasm callback failed with error: "+A),Q(A)}(y||"function"!=typeof WebAssembly.instantiateStreaming||T(f)||v(f)||t||"function"!=typeof fetch?B(g):fetch(f,{credentials:"same-origin"}).then((function(I){return WebAssembly.instantiateStreaming(I,A).then(g,(function(A){return c("wasm streaming compile failed: "+A),c("falling back to ArrayBuffer instantiation"),B(g)}))}))).catch(Q)}(),C.___wasm_call_ctors=function(){return(C.___wasm_call_ctors=C.asm.A).apply(null,arguments)},C._malloc=function(){return(JI=C._malloc=C.asm.B).apply(null,arguments)}),HI=C.___getTypeName=function(){return(HI=C.___getTypeName=C.asm.D).apply(null,arguments)},MI=(C.__embind_initialize_bindings=function(){return(C.__embind_initialize_bindings=C.asm.E).apply(null,arguments)},C._free=function(){return(MI=C._free=C.asm.F).apply(null,arguments)}),LI=C.stackSave=function(){return(LI=C.stackSave=C.asm.G).apply(null,arguments)},YI=C.stackRestore=function(){return(YI=C.stackRestore=C.asm.H).apply(null,arguments)},KI=C.stackAlloc=function(){return(KI=C.stackAlloc=C.asm.I).apply(null,arguments)},dI=C.___cxa_is_pointer_type=function(){return(dI=C.___cxa_is_pointer_type=C.asm.J).apply(null,arguments)};function lI(A){function g(){UI||(UI=!0,C.calledRun=!0,M||(V(p),I(C),C.onRuntimeInitialized&&C.onRuntimeInitialized(),function(){if(C.postRun)for("function"==typeof C.postRun&&(C.postRun=[C.postRun]);C.postRun.length;)A=C.postRun.shift(),b.unshift(A);var A;V(b)}()))}A=A||a,W>0||(function(){if(C.preRun)for("function"==typeof C.preRun&&(C.preRun=[C.preRun]);C.preRun.length;)A=C.preRun.shift(),q.unshift(A);var A;V(q)}(),W>0||(C.setStatus?(C.setStatus("Running..."),setTimeout((function(){setTimeout((function(){C.setStatus("")}),1),g()}),1)):g()))}if(C.ccall=function(A,I,g,B,Q){var E={string:A=>{var I=0;if(null!=A&&0!==A){var g=1+(A.length<<2);K(A,I=KI(g),g)}return I},array:A=>{var I=KI(A.length);return function(A,I){R.set(A,I)}(A,I),I}},i=function(A){return C["_"+A]}(A),o=[],D=0;if(B)for(var a=0;a0;)C.preInit.pop()();return lI(),A.ready});A.exports=Q},9400:(A,I,g)=>{var B,Q=(B=(B="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(A){var I,Q,C=void 0!==(A=A||{})?A:{};C.ready=new Promise((function(A,g){I=A,Q=g}));var E,i,o,D=Object.assign({},C),a=[],s="./this.program",w=(A,I)=>{throw I},t="object"==typeof window,G="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,F="";if(h){var y=g(1973),c=g(378);F=G?c.dirname(F)+"/":"//",E=(A,I)=>(A=z(A)?new URL(A):c.normalize(A),y.readFileSync(A,I?void 0:"utf8")),o=A=>{var I=E(A,!0);return I.buffer||(I=new Uint8Array(I)),I},i=(A,I,g)=>{A=z(A)?new URL(A):c.normalize(A),y.readFile(A,(function(A,B){A?g(A):I(B.buffer)}))},process.argv.length>1&&(s=process.argv[1].replace(/\\\\/g,"/")),a=process.argv.slice(2),process.on("uncaughtException",(function(A){if(!(A instanceof $))throw A})),process.on("unhandledRejection",(function(A){throw A})),w=(A,I)=>{if(x())throw process.exitCode=A,I;var g;(g=I)instanceof $||R("exiting due to exception: "+g),process.exit(A)},C.inspect=function(){return"[Emscripten Module object]"}}else(t||G)&&(G?F=self.location.href:"undefined"!=typeof document&&document.currentScript&&(F=document.currentScript.src),B&&(F=B),F=0!==F.indexOf("blob:")?F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1):"",E=A=>{var I=new XMLHttpRequest;return I.open("GET",A,!1),I.send(null),I.responseText},G&&(o=A=>{var I=new XMLHttpRequest;return I.open("GET",A,!1),I.responseType="arraybuffer",I.send(null),new Uint8Array(I.response)}),i=(A,I,g)=>{var B=new XMLHttpRequest;B.open("GET",A,!0),B.responseType="arraybuffer",B.onload=()=>{200==B.status||0==B.status&&B.response?I(B.response):g()},B.onerror=g,B.send(null)});var r,N=C.print||console.log.bind(console),R=C.printErr||console.warn.bind(console);Object.assign(C,D),D=null,C.arguments&&(a=C.arguments),C.thisProgram&&(s=C.thisProgram),C.quit&&(w=C.quit),C.wasmBinary&&(r=C.wasmBinary);var e,n=C.noExitRuntime||!0;"object"!=typeof WebAssembly&&O("no native wasm support detected");var S,U,k,J,H,M,L,Y,K,d=!1,l="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(A,I,g){for(var B=I+g,Q=I;A[Q]&&!(Q>=B);)++Q;if(Q-I>16&&A.buffer&&l)return l.decode(A.subarray(I,Q));for(var C="";I>10,56320|1023&D)}}else C+=String.fromCharCode((31&E)<<6|i)}else C+=String.fromCharCode(E)}return C}function u(A,I){return A?f(k,A,I):""}function q(A,I,g){return function(A,I,g,B){if(!(B>0))return 0;for(var Q=g,C=g+B-1,E=0;E=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&A.charCodeAt(++E)),i<=127){if(g>=C)break;I[g++]=i}else if(i<=2047){if(g+1>=C)break;I[g++]=192|i>>6,I[g++]=128|63&i}else if(i<=65535){if(g+2>=C)break;I[g++]=224|i>>12,I[g++]=128|i>>6&63,I[g++]=128|63&i}else{if(g+3>=C)break;I[g++]=240|i>>18,I[g++]=128|i>>12&63,I[g++]=128|i>>6&63,I[g++]=128|63&i}}return I[g]=0,g-Q}(A,k,I,g)}function p(A){S=A,C.HEAP8=U=new Int8Array(A),C.HEAP16=J=new Int16Array(A),C.HEAP32=M=new Int32Array(A),C.HEAPU8=k=new Uint8Array(A),C.HEAPU16=H=new Uint16Array(A),C.HEAPU32=L=new Uint32Array(A),C.HEAPF32=Y=new Float32Array(A),C.HEAPF64=K=new Float64Array(A)}C.INITIAL_MEMORY;var b,W=[],Z=[],m=[];function x(){return n}var T,v,X=0,P=null,V=null;function O(A){C.onAbort&&C.onAbort(A),R(A="Aborted("+A+")"),d=!0,A+=". Build with -sASSERTIONS for more info.";var I=new WebAssembly.RuntimeError(A);throw Q(I),I}function j(A){return A.startsWith("data:application/octet-stream;base64,")}function z(A){return A.startsWith("file://")}function _(A){try{if(A==T&&r)return new Uint8Array(r);if(o)return o(A);throw"both async and sync fetching of the wasm failed"}catch(A){O(A)}}function $(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function AA(A){for(;A.length>0;)A.shift()(C)}function IA(A){this.excPtr=A,this.ptr=A-24,this.set_type=function(A){L[this.ptr+4>>2]=A},this.get_type=function(){return L[this.ptr+4>>2]},this.set_destructor=function(A){L[this.ptr+8>>2]=A},this.get_destructor=function(){return L[this.ptr+8>>2]},this.set_refcount=function(A){M[this.ptr>>2]=A},this.set_caught=function(A){A=A?1:0,U[this.ptr+12>>0]=A},this.get_caught=function(){return 0!=U[this.ptr+12>>0]},this.set_rethrown=function(A){A=A?1:0,U[this.ptr+13>>0]=A},this.get_rethrown=function(){return 0!=U[this.ptr+13>>0]},this.init=function(A,I){this.set_adjusted_ptr(0),this.set_type(A),this.set_destructor(I),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var A=M[this.ptr>>2];M[this.ptr>>2]=A+1},this.release_ref=function(){var A=M[this.ptr>>2];return M[this.ptr>>2]=A-1,1===A},this.set_adjusted_ptr=function(A){L[this.ptr+16>>2]=A},this.get_adjusted_ptr=function(){return L[this.ptr+16>>2]},this.get_exception_ptr=function(){if(xI(this.get_type()))return L[this.excPtr>>2];var A=this.get_adjusted_ptr();return 0!==A?A:this.excPtr}}j(T="libjpegturbowasm_decode.wasm")||(v=T,T=C.locateFile?C.locateFile(v,F):F+v);var gA={};function BA(A){for(;A.length;){var I=A.pop();A.pop()(I)}}function QA(A){return this.fromWireType(M[A>>2])}var CA={},EA={},iA={};function oA(A){if(void 0===A)return"_unknown";var I=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return I>=48&&I<=57?"_"+A:A}function DA(A,I){return A=oA(A),new Function("body","return function "+A+'() {\\n "use strict"; return body.apply(this, arguments);\\n};\\n')(I)}function aA(A,I){var g=DA(I,(function(A){this.name=I,this.message=A;var g=new Error(A).stack;void 0!==g&&(this.stack=this.toString()+"\\n"+g.replace(/^Error(:[^\\n]*)?\\n/,""))}));return g.prototype=Object.create(A.prototype),g.prototype.constructor=g,g.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},g}var sA=void 0;function wA(A){throw new sA(A)}function tA(A,I,g){function B(I){var B=g(I);B.length!==A.length&&wA("Mismatched type converter count");for(var Q=0;Q{EA.hasOwnProperty(A)?Q[I]=EA[A]:(C.push(A),CA.hasOwnProperty(A)||(CA[A]=[]),CA[A].push((()=>{Q[I]=EA[A],++E===C.length&&B(Q)})))})),0===C.length&&B(Q)}function GA(A){switch(A){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+A)}}var hA=void 0;function FA(A){for(var I="",g=A;k[g];)I+=hA[k[g++]];return I}var yA=void 0;function cA(A){throw new yA(A)}function rA(A,I,g={}){if(!("argPackAdvance"in I))throw new TypeError("registerType registeredInstance requires argPackAdvance");var B=I.name;if(A||cA('type "'+B+'" must have a positive integer typeid pointer'),EA.hasOwnProperty(A)){if(g.ignoreDuplicateRegistrations)return;cA("Cannot register type '"+B+"' twice")}if(EA[A]=I,delete iA[A],CA.hasOwnProperty(A)){var Q=CA[A];delete CA[A],Q.forEach((A=>A()))}}function NA(A){if(!(this instanceof mA))return!1;if(!(A instanceof mA))return!1;for(var I=this.$$.ptrType.registeredClass,g=this.$$.ptr,B=A.$$.ptrType.registeredClass,Q=A.$$.ptr;I.baseClass;)g=I.upcast(g),I=I.baseClass;for(;B.baseClass;)Q=B.upcast(Q),B=B.baseClass;return I===B&&g===Q}function RA(A){cA(A.$$.ptrType.registeredClass.name+" instance already deleted")}var eA=!1;function nA(A){}function SA(A){A.count.value-=1,0===A.count.value&&function(A){A.smartPtr?A.smartPtrType.rawDestructor(A.smartPtr):A.ptrType.registeredClass.rawDestructor(A.ptr)}(A)}function UA(A,I,g){if(I===g)return A;if(void 0===g.baseClass)return null;var B=UA(A,I,g.baseClass);return null===B?null:g.downcast(B)}var kA={};function JA(){return Object.keys(dA).length}function HA(){var A=[];for(var I in dA)dA.hasOwnProperty(I)&&A.push(dA[I]);return A}var MA=[];function LA(){for(;MA.length;){var A=MA.pop();A.$$.deleteScheduled=!1,A.delete()}}var YA=void 0;function KA(A){YA=A,MA.length&&YA&&YA(LA)}var dA={};function lA(A,I){return I=function(A,I){for(void 0===I&&cA("ptr should not be undefined");A.baseClass;)I=A.upcast(I),A=A.baseClass;return I}(A,I),dA[I]}function fA(A,I){return I.ptrType&&I.ptr||wA("makeClassHandle requires ptr and ptrType"),!!I.smartPtrType!=!!I.smartPtr&&wA("Both smartPtrType and smartPtr must be specified"),I.count={value:1},qA(Object.create(A,{$$:{value:I}}))}function uA(A){var I=this.getPointee(A);if(!I)return this.destructor(A),null;var g=lA(this.registeredClass,I);if(void 0!==g){if(0===g.$$.count.value)return g.$$.ptr=I,g.$$.smartPtr=A,g.clone();var B=g.clone();return this.destructor(A),B}function Q(){return this.isSmartPointer?fA(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:I,smartPtrType:this,smartPtr:A}):fA(this.registeredClass.instancePrototype,{ptrType:this,ptr:A})}var C,E=this.registeredClass.getActualType(I),i=kA[E];if(!i)return Q.call(this);C=this.isConst?i.constPointerType:i.pointerType;var o=UA(I,this.registeredClass,C.registeredClass);return null===o?Q.call(this):this.isSmartPointer?fA(C.registeredClass.instancePrototype,{ptrType:C,ptr:o,smartPtrType:this,smartPtr:A}):fA(C.registeredClass.instancePrototype,{ptrType:C,ptr:o})}function qA(A){return"undefined"==typeof FinalizationRegistry?(qA=A=>A,A):(eA=new FinalizationRegistry((A=>{SA(A.$$)})),nA=A=>eA.unregister(A),(qA=A=>{var I=A.$$;if(I.smartPtr){var g={$$:I};eA.register(A,g,A)}return A})(A))}function pA(){if(this.$$.ptr||RA(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var A,I=qA(Object.create(Object.getPrototypeOf(this),{$$:{value:(A=this.$$,{count:A.count,deleteScheduled:A.deleteScheduled,preservePointerOnDelete:A.preservePointerOnDelete,ptr:A.ptr,ptrType:A.ptrType,smartPtr:A.smartPtr,smartPtrType:A.smartPtrType})}}));return I.$$.count.value+=1,I.$$.deleteScheduled=!1,I}function bA(){this.$$.ptr||RA(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&cA("Object already scheduled for deletion"),nA(this),SA(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function WA(){return!this.$$.ptr}function ZA(){return this.$$.ptr||RA(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&cA("Object already scheduled for deletion"),MA.push(this),1===MA.length&&YA&&YA(LA),this.$$.deleteScheduled=!0,this}function mA(){}function xA(A,I,g){if(void 0===A[I].overloadTable){var B=A[I];A[I]=function(){return A[I].overloadTable.hasOwnProperty(arguments.length)||cA("Function '"+g+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+A[I].overloadTable+")!"),A[I].overloadTable[arguments.length].apply(this,arguments)},A[I].overloadTable=[],A[I].overloadTable[B.argCount]=B}}function TA(A,I,g,B,Q,C,E,i){this.name=A,this.constructor=I,this.instancePrototype=g,this.rawDestructor=B,this.baseClass=Q,this.getActualType=C,this.upcast=E,this.downcast=i,this.pureVirtualFunctions=[]}function vA(A,I,g){for(;I!==g;)I.upcast||cA("Expected null or instance of "+g.name+", got an instance of "+I.name),A=I.upcast(A),I=I.baseClass;return A}function XA(A,I){if(null===I)return this.isReference&&cA("null is not a valid "+this.name),0;I.$$||cA('Cannot pass "'+GI(I)+'" as a '+this.name),I.$$.ptr||cA("Cannot pass deleted object as a pointer of type "+this.name);var g=I.$$.ptrType.registeredClass;return vA(I.$$.ptr,g,this.registeredClass)}function PA(A,I){var g;if(null===I)return this.isReference&&cA("null is not a valid "+this.name),this.isSmartPointer?(g=this.rawConstructor(),null!==A&&A.push(this.rawDestructor,g),g):0;I.$$||cA('Cannot pass "'+GI(I)+'" as a '+this.name),I.$$.ptr||cA("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&I.$$.ptrType.isConst&&cA("Cannot convert argument of type "+(I.$$.smartPtrType?I.$$.smartPtrType.name:I.$$.ptrType.name)+" to parameter type "+this.name);var B=I.$$.ptrType.registeredClass;if(g=vA(I.$$.ptr,B,this.registeredClass),this.isSmartPointer)switch(void 0===I.$$.smartPtr&&cA("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:I.$$.smartPtrType===this?g=I.$$.smartPtr:cA("Cannot convert argument of type "+(I.$$.smartPtrType?I.$$.smartPtrType.name:I.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:g=I.$$.smartPtr;break;case 2:if(I.$$.smartPtrType===this)g=I.$$.smartPtr;else{var Q=I.clone();g=this.rawShare(g,tI.toHandle((function(){Q.delete()}))),null!==A&&A.push(this.rawDestructor,g)}break;default:cA("Unsupporting sharing policy")}return g}function VA(A,I){if(null===I)return this.isReference&&cA("null is not a valid "+this.name),0;I.$$||cA('Cannot pass "'+GI(I)+'" as a '+this.name),I.$$.ptr||cA("Cannot pass deleted object as a pointer of type "+this.name),I.$$.ptrType.isConst&&cA("Cannot convert argument of type "+I.$$.ptrType.name+" to parameter type "+this.name);var g=I.$$.ptrType.registeredClass;return vA(I.$$.ptr,g,this.registeredClass)}function OA(A){return this.rawGetPointee&&(A=this.rawGetPointee(A)),A}function jA(A){this.rawDestructor&&this.rawDestructor(A)}function zA(A){null!==A&&A.delete()}function _A(A,I,g,B,Q,C,E,i,o,D,a){this.name=A,this.registeredClass=I,this.isReference=g,this.isConst=B,this.isSmartPointer=Q,this.pointeeType=C,this.sharingPolicy=E,this.rawGetPointee=i,this.rawConstructor=o,this.rawShare=D,this.rawDestructor=a,Q||void 0!==I.baseClass?this.toWireType=PA:B?(this.toWireType=XA,this.destructorFunction=null):(this.toWireType=VA,this.destructorFunction=null)}var $A=[];function AI(A){var I=$A[A];return I||(A>=$A.length&&($A.length=A+1),$A[A]=I=b.get(A)),I}function II(A,I,g){return A.includes("j")?function(A,I,g){var B=C["dynCall_"+A];return g&&g.length?B.apply(null,[I].concat(g)):B.call(null,I)}(A,I,g):AI(I).apply(null,g)}function gI(A,I){var g,B,Q,C=(A=FA(A)).includes("j")?(g=A,B=I,Q=[],function(){return Q.length=0,Object.assign(Q,arguments),II(g,B,Q)}):AI(I);return"function"!=typeof C&&cA("unknown function pointer with signature "+A+": "+I),C}var BI=void 0;function QI(A){var I=pI(A),g=FA(I);return qI(I),g}function CI(A,I){var g=[],B={};throw I.forEach((function A(I){B[I]||EA[I]||(iA[I]?iA[I].forEach(A):(g.push(I),B[I]=!0))})),new BI(A+": "+g.map(QI).join([", "]))}function EI(A,I){for(var g=[],B=0;B>2]);return g}function iI(A,I,g,B,Q){var C=I.length;C<2&&cA("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var E=null!==I[1]&&null!==g,i=!1,o=1;o0?", ":"")+s),w+=(D?"var rv = ":"")+"invoker(fn"+(s.length>0?", ":"")+s+");\\n",i)w+="runDestructors(destructors);\\n";else for(o=E?1:2;o4&&0==--DI[A].refcount&&(DI[A]=void 0,oI.push(A))}function sI(){for(var A=0,I=5;I(A||cA("Cannot use deleted val. handle = "+A),DI[A].value),toHandle:A=>{switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var I=oI.length?oI.pop():DI.length;return DI[I]={refcount:1,value:A},I}}};function GI(A){if(null===A)return"null";var I=typeof A;return"object"===I||"array"===I||"function"===I?A.toString():""+A}function hI(A,I){switch(I){case 2:return function(A){return this.fromWireType(Y[A>>2])};case 3:return function(A){return this.fromWireType(K[A>>3])};default:throw new TypeError("Unknown float type: "+A)}}function FI(A,I,g){switch(I){case 0:return g?function(A){return U[A]}:function(A){return k[A]};case 1:return g?function(A){return J[A>>1]}:function(A){return H[A>>1]};case 2:return g?function(A){return M[A>>2]}:function(A){return L[A>>2]};default:throw new TypeError("Unknown integer type: "+A)}}var yI="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function cI(A,I){for(var g=A,B=g>>1,Q=B+I/2;!(B>=Q)&&H[B];)++B;if((g=B<<1)-A>32&&yI)return yI.decode(k.subarray(A,g));for(var C="",E=0;!(E>=I/2);++E){var i=J[A+2*E>>1];if(0==i)break;C+=String.fromCharCode(i)}return C}function rI(A,I,g){if(void 0===g&&(g=2147483647),g<2)return 0;for(var B=I,Q=(g-=2)<2*A.length?g/2:A.length,C=0;C>1]=E,I+=2}return J[I>>1]=0,I-B}function NI(A){return 2*A.length}function RI(A,I){for(var g=0,B="";!(g>=I/4);){var Q=M[A+4*g>>2];if(0==Q)break;if(++g,Q>=65536){var C=Q-65536;B+=String.fromCharCode(55296|C>>10,56320|1023&C)}else B+=String.fromCharCode(Q)}return B}function eI(A,I,g){if(void 0===g&&(g=2147483647),g<4)return 0;for(var B=I,Q=B+g-4,C=0;C=55296&&E<=57343&&(E=65536+((1023&E)<<10)|1023&A.charCodeAt(++C)),M[I>>2]=E,(I+=4)+4>Q)break}return M[I>>2]=0,I-B}function nI(A){for(var I=0,g=0;g=55296&&B<=57343&&++g,I+=4}return I}var SI={};function UI(){return"object"==typeof globalThis?globalThis:Function("return this")()}function kI(A,I){var g=EA[A];return void 0===g&&cA(I+" has unknown type "+QI(A)),g}var JI={};function HI(A){try{return e.grow(A-S.byteLength+65535>>>16),p(e.buffer),1}catch(A){}}var MI={};function LI(){if(!LI.strings){var A={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:s||"./this.program"};for(var I in MI)void 0===MI[I]?delete A[I]:A[I]=MI[I];var g=[];for(var I in A)g.push(I+"="+A[I]);LI.strings=g}return LI.strings}var YI=function(A,I){var g;g=A,x()||(C.onExit&&C.onExit(g),d=!0),w(g,new $(g))},KI=[null,[],[]];function dI(A,I){var g=KI[A];0===I||10===I?((1===A?N:R)(f(g,0)),g.length=0):g.push(I)}sA=C.InternalError=aA(Error,"InternalError"),function(){for(var A=new Array(256),I=0;I<256;++I)A[I]=String.fromCharCode(I);hA=A}(),yA=C.BindingError=aA(Error,"BindingError"),mA.prototype.isAliasOf=NA,mA.prototype.clone=pA,mA.prototype.delete=bA,mA.prototype.isDeleted=WA,mA.prototype.deleteLater=ZA,C.getInheritedInstanceCount=JA,C.getLiveInheritedInstances=HA,C.flushPendingDeletes=LA,C.setDelayFunction=KA,_A.prototype.getPointee=OA,_A.prototype.destructor=jA,_A.prototype.argPackAdvance=8,_A.prototype.readValueFromPointer=QA,_A.prototype.deleteObject=zA,_A.prototype.fromWireType=uA,BI=C.UnboundTypeError=aA(Error,"UnboundTypeError"),C.count_emval_handles=sI,C.get_first_emval=wI;var lI,fI={g:function(A,I,g){throw new IA(A).init(I,g),A},A:function(A){var I=gA[A];delete gA[A];var g=I.rawConstructor,B=I.rawDestructor,Q=I.fields;tA([A],Q.map((A=>A.getterReturnType)).concat(Q.map((A=>A.setterArgumentType))),(A=>{var C={};return Q.forEach(((I,g)=>{var B=I.fieldName,E=A[g],i=I.getter,o=I.getterContext,D=A[g+Q.length],a=I.setter,s=I.setterContext;C[B]={read:A=>E.fromWireType(i(o,A)),write:(A,I)=>{var g=[];a(s,A,D.toWireType(g,I)),BA(g)}}})),[{name:I.name,fromWireType:function(A){var I={};for(var g in C)I[g]=C[g].read(A);return B(A),I},toWireType:function(A,I){for(var Q in C)if(!(Q in I))throw new TypeError('Missing field: "'+Q+'"');var E=g();for(Q in C)C[Q].write(E,I[Q]);return null!==A&&A.push(B,E),E},argPackAdvance:8,readValueFromPointer:QA,destructorFunction:B}]}))},w:function(A,I,g,B,Q){},F:function(A,I,g,B,Q){var C=GA(g);rA(A,{name:I=FA(I),fromWireType:function(A){return!!A},toWireType:function(A,I){return I?B:Q},argPackAdvance:8,readValueFromPointer:function(A){var B;if(1===g)B=U;else if(2===g)B=J;else{if(4!==g)throw new TypeError("Unknown boolean type size: "+I);B=M}return this.fromWireType(B[A>>C])},destructorFunction:null})},u:function(A,I,g,B,Q,E,i,o,D,a,s,w,t){s=FA(s),E=gI(Q,E),o&&(o=gI(i,o)),a&&(a=gI(D,a)),t=gI(w,t);var G=oA(s);!function(A,I,g){C.hasOwnProperty(A)?((void 0===g||void 0!==C[A].overloadTable&&void 0!==C[A].overloadTable[g])&&cA("Cannot register public name '"+A+"' twice"),xA(C,A,A),C.hasOwnProperty(g)&&cA("Cannot register multiple overloads of a function with the same number of arguments ("+g+")!"),C[A].overloadTable[g]=I):(C[A]=I,void 0!==g&&(C[A].numArguments=g))}(G,(function(){CI("Cannot construct "+s+" due to unbound types",[B])})),tA([A,I,g],B?[B]:[],(function(I){var g,Q;I=I[0],Q=B?(g=I.registeredClass).instancePrototype:mA.prototype;var i=DA(G,(function(){if(Object.getPrototypeOf(this)!==D)throw new yA("Use 'new' to construct "+s);if(void 0===w.constructor_body)throw new yA(s+" has no accessible constructor");var A=w.constructor_body[arguments.length];if(void 0===A)throw new yA("Tried to invoke ctor of "+s+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(w.constructor_body).toString()+") parameters instead!");return A.apply(this,arguments)})),D=Object.create(Q,{constructor:{value:i}});i.prototype=D;var w=new TA(s,i,D,t,g,E,o,a),h=new _A(s,w,!0,!1,!1),F=new _A(s+"*",w,!1,!1,!1),y=new _A(s+" const*",w,!1,!0,!1);return kA[A]={pointerType:F,constPointerType:y},function(A,I,g){C.hasOwnProperty(A)||wA("Replacing nonexistant public symbol"),void 0!==C[A].overloadTable&&void 0!==g?C[A].overloadTable[g]=I:(C[A]=I,C[A].argCount=g)}(G,i),[h,F,y]}))},t:function(A,I,g,B,Q,C){var E;I>0||O(E);var i=EI(I,g);Q=gI(B,Q),tA([],[A],(function(A){var g="constructor "+(A=A[0]).name;if(void 0===A.registeredClass.constructor_body&&(A.registeredClass.constructor_body=[]),void 0!==A.registeredClass.constructor_body[I-1])throw new yA("Cannot register multiple constructors with identical number of parameters ("+(I-1)+") for class '"+A.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return A.registeredClass.constructor_body[I-1]=()=>{CI("Cannot construct "+A.name+" due to unbound types",i)},tA([],i,(function(B){return B.splice(1,0,null),A.registeredClass.constructor_body[I-1]=iI(g,B,null,Q,C),[]})),[]}))},c:function(A,I,g,B,Q,C,E,i){var o=EI(g,B);I=FA(I),C=gI(Q,C),tA([],[A],(function(A){var B=(A=A[0]).name+"."+I;function Q(){CI("Cannot call "+B+" due to unbound types",o)}I.startsWith("@@")&&(I=Symbol[I.substring(2)]),i&&A.registeredClass.pureVirtualFunctions.push(I);var D=A.registeredClass.instancePrototype,a=D[I];return void 0===a||void 0===a.overloadTable&&a.className!==A.name&&a.argCount===g-2?(Q.argCount=g-2,Q.className=A.name,D[I]=Q):(xA(D,I,B),D[I].overloadTable[g-2]=Q),tA([],o,(function(Q){var i=iI(B,Q,A,C,E);return void 0===D[I].overloadTable?(i.argCount=g-2,D[I]=i):D[I].overloadTable[g-2]=i,[]})),[]}))},E:function(A,I){rA(A,{name:I=FA(I),fromWireType:function(A){var I=tI.toValue(A);return aI(A),I},toWireType:function(A,I){return tI.toHandle(I)},argPackAdvance:8,readValueFromPointer:QA,destructorFunction:null})},m:function(A,I,g){var B=GA(g);rA(A,{name:I=FA(I),fromWireType:function(A){return A},toWireType:function(A,I){return I},argPackAdvance:8,readValueFromPointer:hI(I,B),destructorFunction:null})},b:function(A,I,g,B,Q){I=FA(I),-1===Q&&(Q=4294967295);var C=GA(g),E=A=>A;if(0===B){var i=32-8*g;E=A=>A<>>i}var o=I.includes("unsigned");rA(A,{name:I,fromWireType:E,toWireType:o?function(A,I){return this.name,I>>>0}:function(A,I){return this.name,I},argPackAdvance:8,readValueFromPointer:FI(I,C,0!==B),destructorFunction:null})},a:function(A,I,g){var B=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][I];function Q(A){var I=L,g=I[A>>=2],Q=I[A+1];return new B(S,Q,g)}rA(A,{name:g=FA(g),fromWireType:Q,argPackAdvance:8,readValueFromPointer:Q},{ignoreDuplicateRegistrations:!0})},l:function(A,I){var g="std::string"===(I=FA(I));rA(A,{name:I,fromWireType:function(A){var I,B=L[A>>2],Q=A+4;if(g)for(var C=Q,E=0;E<=B;++E){var i=Q+E;if(E==B||0==k[i]){var o=u(C,i-C);void 0===I?I=o:(I+=String.fromCharCode(0),I+=o),C=i+1}}else{var D=new Array(B);for(E=0;E=55296&&B<=57343?(I+=4,++g):I+=3}return I}(I):I.length;var C=uI(4+B+1),E=C+4;if(L[C>>2]=B,g&&Q)q(I,E,B+1);else if(Q)for(var i=0;i255&&(qI(E),cA("String has UTF-16 code units that do not fit in 8 bits")),k[E+i]=o}else for(i=0;iH,i=1):4===I&&(B=RI,Q=eI,E=nI,C=()=>L,i=2),rA(A,{name:g,fromWireType:function(A){for(var g,Q=L[A>>2],E=C(),o=A+4,D=0;D<=Q;++D){var a=A+4+D*I;if(D==Q||0==E[a>>i]){var s=B(o,a-o);void 0===g?g=s:(g+=String.fromCharCode(0),g+=s),o=a+I}}return qI(A),g},toWireType:function(A,B){"string"!=typeof B&&cA("Cannot pass non-string to C++ string type "+g);var C=E(B),o=uI(4+C+I);return L[o>>2]=C>>i,Q(B,o+4,C+I),null!==A&&A.push(qI,o),o},argPackAdvance:8,readValueFromPointer:QA,destructorFunction:function(A){qI(A)}})},J:function(A,I,g,B,Q,C){gA[A]={name:FA(I),rawConstructor:gI(g,B),rawDestructor:gI(Q,C),fields:[]}},d:function(A,I,g,B,Q,C,E,i,o,D){gA[A].fields.push({fieldName:FA(I),getterReturnType:g,getter:gI(B,Q),getterContext:C,setterArgumentType:E,setter:gI(i,o),setterContext:D})},G:function(A,I){rA(A,{isVoid:!0,name:I=FA(I),argPackAdvance:0,fromWireType:function(){},toWireType:function(A,I){}})},x:function(){throw 1/0},i:aI,r:function(A){return 0===A?tI.toHandle(UI()):(A=void 0===(g=SI[I=A])?FA(I):g,tI.toHandle(UI()[A]));var I,g},p:function(A){A>4&&(DI[A].refcount+=1)},q:function(A,I,g,B){A=tI.toValue(A);var Q=JI[I];return Q||(Q=function(A){for(var I="",g=0;g>2)], 'parameter "+g+"');\\nvar arg"+g+" = argType"+g+".readValueFromPointer(args);\\nargs += argType"+g+"['argPackAdvance'];\\nargTypes += 4;\\n";return B+="var obj = new constructor("+I+");\\nreturn valueToHandle(obj);\\n}\\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",B)(kI,C,tI.toHandle,(()=>L))}(I),JI[I]=Q),Q(A,g,B)},s:function(A,I){var g=(A=kI(A,"_emval_take_value")).readValueFromPointer(I);return tI.toHandle(g)},j:function(){O("")},D:function(A,I,g){k.copyWithin(A,I,I+g)},y:function(A){var I,g,B=k.length,Q=2147483648;if((A>>>=0)>Q)return!1;for(var C=1;C<=4;C*=2){var E=B*(1+.2/C);if(E=Math.min(E,A+100663296),HI(Math.min(Q,(I=Math.max(A,E))+((g=65536)-I%g)%g)))return!0}return!1},z:function(A,I){var g=0;return LI().forEach((function(B,Q){var C=I+g;L[A+4*Q>>2]=C,function(A,I,g){for(var B=0;B>0]=A.charCodeAt(B);g||(U[I>>0]=0)}(B,C),g+=B.length+1})),0},B:function(A,I){var g=LI();L[A>>2]=g.length;var B=0;return g.forEach((function(A){B+=A.length+1})),L[I>>2]=B,0},I:YI,C:function(A){return 52},v:function(A,I,g,B,Q){return 70},k:function(A,I,g,B){for(var Q=0,C=0;C>2],i=L[I+4>>2];I+=8;for(var o=0;o>2]=Q,0},o:function(A,I){var g=WI();try{return AI(A)(I)}catch(A){if(ZI(g),A!==A+0)throw A;bI(1,0)}},n:function(A,I,g){var B=WI();try{return AI(A)(I,g)}catch(A){if(ZI(B),A!==A+0)throw A;bI(1,0)}},H:function(A,I,g,B){var Q=WI();try{return AI(A)(I,g,B)}catch(A){if(ZI(Q),A!==A+0)throw A;bI(1,0)}},f:function(A,I){var g=WI();try{AI(A)(I)}catch(A){if(ZI(g),A!==A+0)throw A;bI(1,0)}},e:function(A,I,g,B){var Q=WI();try{AI(A)(I,g,B)}catch(A){if(ZI(Q),A!==A+0)throw A;bI(1,0)}}},uI=(function(){var A={a:fI};function I(A,I){var g,B=A.exports;C.asm=B,p((e=C.asm.K).buffer),b=C.asm.M,g=C.asm.L,Z.unshift(g),function(A){if(X--,C.monitorRunDependencies&&C.monitorRunDependencies(X),0==X&&(null!==P&&(clearInterval(P),P=null),V)){var I=V;V=null,I()}}()}function g(A){I(A.instance)}function B(I){return function(){if(!r&&(t||G)){if("function"==typeof fetch&&!z(T))return fetch(T,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+T+"'";return A.arrayBuffer()})).catch((function(){return _(T)}));if(i)return new Promise((function(A,I){i(T,(function(I){A(new Uint8Array(I))}),I)}))}return Promise.resolve().then((function(){return _(T)}))}().then((function(I){return WebAssembly.instantiate(I,A)})).then((function(A){return A})).then(I,(function(A){R("failed to asynchronously prepare wasm: "+A),O(A)}))}if(X++,C.monitorRunDependencies&&C.monitorRunDependencies(X),C.instantiateWasm)try{return C.instantiateWasm(A,I)}catch(A){R("Module.instantiateWasm callback failed with error: "+A),Q(A)}(r||"function"!=typeof WebAssembly.instantiateStreaming||j(T)||z(T)||h||"function"!=typeof fetch?B(g):fetch(T,{credentials:"same-origin"}).then((function(I){return WebAssembly.instantiateStreaming(I,A).then(g,(function(A){return R("wasm streaming compile failed: "+A),R("falling back to ArrayBuffer instantiation"),B(g)}))}))).catch(Q)}(),C.___wasm_call_ctors=function(){return(C.___wasm_call_ctors=C.asm.L).apply(null,arguments)},C._malloc=function(){return(uI=C._malloc=C.asm.N).apply(null,arguments)}),qI=C._free=function(){return(qI=C._free=C.asm.O).apply(null,arguments)},pI=C.___getTypeName=function(){return(pI=C.___getTypeName=C.asm.P).apply(null,arguments)},bI=(C.__embind_initialize_bindings=function(){return(C.__embind_initialize_bindings=C.asm.Q).apply(null,arguments)},C._setThrew=function(){return(bI=C._setThrew=C.asm.R).apply(null,arguments)}),WI=C.stackSave=function(){return(WI=C.stackSave=C.asm.S).apply(null,arguments)},ZI=C.stackRestore=function(){return(ZI=C.stackRestore=C.asm.T).apply(null,arguments)},mI=C.stackAlloc=function(){return(mI=C.stackAlloc=C.asm.U).apply(null,arguments)},xI=C.___cxa_is_pointer_type=function(){return(xI=C.___cxa_is_pointer_type=C.asm.V).apply(null,arguments)};function TI(A){function g(){lI||(lI=!0,C.calledRun=!0,d||(AA(Z),I(C),C.onRuntimeInitialized&&C.onRuntimeInitialized(),function(){if(C.postRun)for("function"==typeof C.postRun&&(C.postRun=[C.postRun]);C.postRun.length;)A=C.postRun.shift(),m.unshift(A);var A;AA(m)}()))}A=A||a,X>0||(function(){if(C.preRun)for("function"==typeof C.preRun&&(C.preRun=[C.preRun]);C.preRun.length;)A=C.preRun.shift(),W.unshift(A);var A;AA(W)}(),X>0||(C.setStatus?(C.setStatus("Running..."),setTimeout((function(){setTimeout((function(){C.setStatus("")}),1),g()}),1)):g()))}if(C.dynCall_jiji=function(){return(C.dynCall_jiji=C.asm.W).apply(null,arguments)},C.ccall=function(A,I,g,B,Q){var E={string:A=>{var I=0;if(null!=A&&0!==A){var g=1+(A.length<<2);q(A,I=mI(g),g)}return I},array:A=>{var I=mI(A.length);return function(A,I){U.set(A,I)}(A,I),I}},i=function(A){return C["_"+A]}(A),o=[],D=0;if(B)for(var a=0;a0;)C.preInit.pop()();return TI(),A.ready});A.exports=Q},4044:(A,I,g)=>{var B,Q=(B=(B="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(A){var I,Q,C=void 0!==(A=A||{})?A:{};C.ready=new Promise((function(A,g){I=A,Q=g}));var E,i,o,D=Object.assign({},C),a=[],s="./this.program",w="object"==typeof window,t="function"==typeof importScripts,G="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";if(G){var F=g(9652),y=g(6087);h=t?y.dirname(h)+"/":"//",E=(A,I)=>(A=V(A)?new URL(A):y.normalize(A),F.readFileSync(A,I?void 0:"utf8")),o=A=>{var I=E(A,!0);return I.buffer||(I=new Uint8Array(I)),I},i=(A,I,g)=>{A=V(A)?new URL(A):y.normalize(A),F.readFile(A,(function(A,B){A?g(A):I(B.buffer)}))},process.argv.length>1&&(s=process.argv[1].replace(/\\\\/g,"/")),a=process.argv.slice(2),process.on("uncaughtException",(function(A){if(!(A instanceof j))throw A})),process.on("unhandledRejection",(function(A){throw A})),C.inspect=function(){return"[Emscripten Module object]"}}else(w||t)&&(t?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),B&&(h=B),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",E=A=>{var I=new XMLHttpRequest;return I.open("GET",A,!1),I.send(null),I.responseText},t&&(o=A=>{var I=new XMLHttpRequest;return I.open("GET",A,!1),I.responseType="arraybuffer",I.send(null),new Uint8Array(I.response)}),i=(A,I,g)=>{var B=new XMLHttpRequest;B.open("GET",A,!0),B.responseType="arraybuffer",B.onload=()=>{200==B.status||0==B.status&&B.response?I(B.response):g()},B.onerror=g,B.send(null)});var c,r=C.print||console.log.bind(console),N=C.printErr||console.warn.bind(console);Object.assign(C,D),D=null,C.arguments&&(a=C.arguments),C.thisProgram&&(s=C.thisProgram),C.quit&&C.quit,C.wasmBinary&&(c=C.wasmBinary);var R;C.noExitRuntime;"object"!=typeof WebAssembly&&X("no native wasm support detected");var e,n,S,U,k,J,H,M,L,Y=!1,K="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function d(A,I,g){for(var B=I+g,Q=I;A[Q]&&!(Q>=B);)++Q;if(Q-I>16&&A.buffer&&K)return K.decode(A.subarray(I,Q));for(var C="";I>10,56320|1023&D)}}else C+=String.fromCharCode((31&E)<<6|i)}else C+=String.fromCharCode(E)}return C}function l(A,I){return A?d(S,A,I):""}function f(A,I,g){return function(A,I,g,B){if(!(B>0))return 0;for(var Q=g,C=g+B-1,E=0;E=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&A.charCodeAt(++E)),i<=127){if(g>=C)break;I[g++]=i}else if(i<=2047){if(g+1>=C)break;I[g++]=192|i>>6,I[g++]=128|63&i}else if(i<=65535){if(g+2>=C)break;I[g++]=224|i>>12,I[g++]=128|i>>6&63,I[g++]=128|63&i}else{if(g+3>=C)break;I[g++]=240|i>>18,I[g++]=128|i>>12&63,I[g++]=128|i>>6&63,I[g++]=128|63&i}}return I[g]=0,g-Q}(A,S,I,g)}function u(A){e=A,C.HEAP8=n=new Int8Array(A),C.HEAP16=U=new Int16Array(A),C.HEAP32=J=new Int32Array(A),C.HEAPU8=S=new Uint8Array(A),C.HEAPU16=k=new Uint16Array(A),C.HEAPU32=H=new Uint32Array(A),C.HEAPF32=M=new Float32Array(A),C.HEAPF64=L=new Float64Array(A)}C.INITIAL_MEMORY;var q,p,b,W=[],Z=[],m=[],x=0,T=null,v=null;function X(A){C.onAbort&&C.onAbort(A),N(A="Aborted("+A+")"),Y=!0,A+=". Build with -sASSERTIONS for more info.";var I=new WebAssembly.RuntimeError(A);throw Q(I),I}function P(A){return A.startsWith("data:application/octet-stream;base64,")}function V(A){return A.startsWith("file://")}function O(A){try{if(A==p&&c)return new Uint8Array(c);if(o)return o(A);throw"both async and sync fetching of the wasm failed"}catch(A){X(A)}}function j(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function z(A){for(;A.length>0;)A.shift()(C)}function _(A){this.excPtr=A,this.ptr=A-24,this.set_type=function(A){H[this.ptr+4>>2]=A},this.get_type=function(){return H[this.ptr+4>>2]},this.set_destructor=function(A){H[this.ptr+8>>2]=A},this.get_destructor=function(){return H[this.ptr+8>>2]},this.set_refcount=function(A){J[this.ptr>>2]=A},this.set_caught=function(A){A=A?1:0,n[this.ptr+12>>0]=A},this.get_caught=function(){return 0!=n[this.ptr+12>>0]},this.set_rethrown=function(A){A=A?1:0,n[this.ptr+13>>0]=A},this.get_rethrown=function(){return 0!=n[this.ptr+13>>0]},this.init=function(A,I){this.set_adjusted_ptr(0),this.set_type(A),this.set_destructor(I),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var A=J[this.ptr>>2];J[this.ptr>>2]=A+1},this.release_ref=function(){var A=J[this.ptr>>2];return J[this.ptr>>2]=A-1,1===A},this.set_adjusted_ptr=function(A){H[this.ptr+16>>2]=A},this.get_adjusted_ptr=function(){return H[this.ptr+16>>2]},this.get_exception_ptr=function(){if(pI(this.get_type()))return H[this.excPtr>>2];var A=this.get_adjusted_ptr();return 0!==A?A:this.excPtr}}P(p="openjpegwasm_decode.wasm")||(b=p,p=C.locateFile?C.locateFile(b,h):h+b);var $={};function AA(A){for(;A.length;){var I=A.pop();A.pop()(I)}}function IA(A){return this.fromWireType(J[A>>2])}var gA={},BA={},QA={};function CA(A){if(void 0===A)return"_unknown";var I=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return I>=48&&I<=57?"_"+A:A}function EA(A,I){return A=CA(A),new Function("body","return function "+A+'() {\\n "use strict"; return body.apply(this, arguments);\\n};\\n')(I)}function iA(A,I){var g=EA(I,(function(A){this.name=I,this.message=A;var g=new Error(A).stack;void 0!==g&&(this.stack=this.toString()+"\\n"+g.replace(/^Error(:[^\\n]*)?\\n/,""))}));return g.prototype=Object.create(A.prototype),g.prototype.constructor=g,g.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},g}var oA=void 0;function DA(A){throw new oA(A)}function aA(A,I,g){function B(I){var B=g(I);B.length!==A.length&&DA("Mismatched type converter count");for(var Q=0;Q{BA.hasOwnProperty(A)?Q[I]=BA[A]:(C.push(A),gA.hasOwnProperty(A)||(gA[A]=[]),gA[A].push((()=>{Q[I]=BA[A],++E===C.length&&B(Q)})))})),0===C.length&&B(Q)}function sA(A){switch(A){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+A)}}var wA=void 0;function tA(A){for(var I="",g=A;S[g];)I+=wA[S[g++]];return I}var GA=void 0;function hA(A){throw new GA(A)}function FA(A,I,g={}){if(!("argPackAdvance"in I))throw new TypeError("registerType registeredInstance requires argPackAdvance");var B=I.name;if(A||hA('type "'+B+'" must have a positive integer typeid pointer'),BA.hasOwnProperty(A)){if(g.ignoreDuplicateRegistrations)return;hA("Cannot register type '"+B+"' twice")}if(BA[A]=I,delete QA[A],gA.hasOwnProperty(A)){var Q=gA[A];delete gA[A],Q.forEach((A=>A()))}}function yA(A){if(!(this instanceof bA))return!1;if(!(A instanceof bA))return!1;for(var I=this.$$.ptrType.registeredClass,g=this.$$.ptr,B=A.$$.ptrType.registeredClass,Q=A.$$.ptr;I.baseClass;)g=I.upcast(g),I=I.baseClass;for(;B.baseClass;)Q=B.upcast(Q),B=B.baseClass;return I===B&&g===Q}function cA(A){hA(A.$$.ptrType.registeredClass.name+" instance already deleted")}var rA=!1;function NA(A){}function RA(A){A.count.value-=1,0===A.count.value&&function(A){A.smartPtr?A.smartPtrType.rawDestructor(A.smartPtr):A.ptrType.registeredClass.rawDestructor(A.ptr)}(A)}function eA(A,I,g){if(I===g)return A;if(void 0===g.baseClass)return null;var B=eA(A,I,g.baseClass);return null===B?null:g.downcast(B)}var nA={};function SA(){return Object.keys(LA).length}function UA(){var A=[];for(var I in LA)LA.hasOwnProperty(I)&&A.push(LA[I]);return A}var kA=[];function JA(){for(;kA.length;){var A=kA.pop();A.$$.deleteScheduled=!1,A.delete()}}var HA=void 0;function MA(A){HA=A,kA.length&&HA&&HA(JA)}var LA={};function YA(A,I){return I=function(A,I){for(void 0===I&&hA("ptr should not be undefined");A.baseClass;)I=A.upcast(I),A=A.baseClass;return I}(A,I),LA[I]}function KA(A,I){return I.ptrType&&I.ptr||DA("makeClassHandle requires ptr and ptrType"),!!I.smartPtrType!=!!I.smartPtr&&DA("Both smartPtrType and smartPtr must be specified"),I.count={value:1},lA(Object.create(A,{$$:{value:I}}))}function dA(A){var I=this.getPointee(A);if(!I)return this.destructor(A),null;var g=YA(this.registeredClass,I);if(void 0!==g){if(0===g.$$.count.value)return g.$$.ptr=I,g.$$.smartPtr=A,g.clone();var B=g.clone();return this.destructor(A),B}function Q(){return this.isSmartPointer?KA(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:I,smartPtrType:this,smartPtr:A}):KA(this.registeredClass.instancePrototype,{ptrType:this,ptr:A})}var C,E=this.registeredClass.getActualType(I),i=nA[E];if(!i)return Q.call(this);C=this.isConst?i.constPointerType:i.pointerType;var o=eA(I,this.registeredClass,C.registeredClass);return null===o?Q.call(this):this.isSmartPointer?KA(C.registeredClass.instancePrototype,{ptrType:C,ptr:o,smartPtrType:this,smartPtr:A}):KA(C.registeredClass.instancePrototype,{ptrType:C,ptr:o})}function lA(A){return"undefined"==typeof FinalizationRegistry?(lA=A=>A,A):(rA=new FinalizationRegistry((A=>{RA(A.$$)})),NA=A=>rA.unregister(A),(lA=A=>{var I=A.$$;if(I.smartPtr){var g={$$:I};rA.register(A,g,A)}return A})(A))}function fA(){if(this.$$.ptr||cA(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var A,I=lA(Object.create(Object.getPrototypeOf(this),{$$:{value:(A=this.$$,{count:A.count,deleteScheduled:A.deleteScheduled,preservePointerOnDelete:A.preservePointerOnDelete,ptr:A.ptr,ptrType:A.ptrType,smartPtr:A.smartPtr,smartPtrType:A.smartPtrType})}}));return I.$$.count.value+=1,I.$$.deleteScheduled=!1,I}function uA(){this.$$.ptr||cA(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&hA("Object already scheduled for deletion"),NA(this),RA(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function qA(){return!this.$$.ptr}function pA(){return this.$$.ptr||cA(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&hA("Object already scheduled for deletion"),kA.push(this),1===kA.length&&HA&&HA(JA),this.$$.deleteScheduled=!0,this}function bA(){}function WA(A,I,g){if(void 0===A[I].overloadTable){var B=A[I];A[I]=function(){return A[I].overloadTable.hasOwnProperty(arguments.length)||hA("Function '"+g+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+A[I].overloadTable+")!"),A[I].overloadTable[arguments.length].apply(this,arguments)},A[I].overloadTable=[],A[I].overloadTable[B.argCount]=B}}function ZA(A,I,g,B,Q,C,E,i){this.name=A,this.constructor=I,this.instancePrototype=g,this.rawDestructor=B,this.baseClass=Q,this.getActualType=C,this.upcast=E,this.downcast=i,this.pureVirtualFunctions=[]}function mA(A,I,g){for(;I!==g;)I.upcast||hA("Expected null or instance of "+g.name+", got an instance of "+I.name),A=I.upcast(A),I=I.baseClass;return A}function xA(A,I){if(null===I)return this.isReference&&hA("null is not a valid "+this.name),0;I.$$||hA('Cannot pass "'+sI(I)+'" as a '+this.name),I.$$.ptr||hA("Cannot pass deleted object as a pointer of type "+this.name);var g=I.$$.ptrType.registeredClass;return mA(I.$$.ptr,g,this.registeredClass)}function TA(A,I){var g;if(null===I)return this.isReference&&hA("null is not a valid "+this.name),this.isSmartPointer?(g=this.rawConstructor(),null!==A&&A.push(this.rawDestructor,g),g):0;I.$$||hA('Cannot pass "'+sI(I)+'" as a '+this.name),I.$$.ptr||hA("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&I.$$.ptrType.isConst&&hA("Cannot convert argument of type "+(I.$$.smartPtrType?I.$$.smartPtrType.name:I.$$.ptrType.name)+" to parameter type "+this.name);var B=I.$$.ptrType.registeredClass;if(g=mA(I.$$.ptr,B,this.registeredClass),this.isSmartPointer)switch(void 0===I.$$.smartPtr&&hA("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:I.$$.smartPtrType===this?g=I.$$.smartPtr:hA("Cannot convert argument of type "+(I.$$.smartPtrType?I.$$.smartPtrType.name:I.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:g=I.$$.smartPtr;break;case 2:if(I.$$.smartPtrType===this)g=I.$$.smartPtr;else{var Q=I.clone();g=this.rawShare(g,aI.toHandle((function(){Q.delete()}))),null!==A&&A.push(this.rawDestructor,g)}break;default:hA("Unsupporting sharing policy")}return g}function vA(A,I){if(null===I)return this.isReference&&hA("null is not a valid "+this.name),0;I.$$||hA('Cannot pass "'+sI(I)+'" as a '+this.name),I.$$.ptr||hA("Cannot pass deleted object as a pointer of type "+this.name),I.$$.ptrType.isConst&&hA("Cannot convert argument of type "+I.$$.ptrType.name+" to parameter type "+this.name);var g=I.$$.ptrType.registeredClass;return mA(I.$$.ptr,g,this.registeredClass)}function XA(A){return this.rawGetPointee&&(A=this.rawGetPointee(A)),A}function PA(A){this.rawDestructor&&this.rawDestructor(A)}function VA(A){null!==A&&A.delete()}function OA(A,I,g,B,Q,C,E,i,o,D,a){this.name=A,this.registeredClass=I,this.isReference=g,this.isConst=B,this.isSmartPointer=Q,this.pointeeType=C,this.sharingPolicy=E,this.rawGetPointee=i,this.rawConstructor=o,this.rawShare=D,this.rawDestructor=a,Q||void 0!==I.baseClass?this.toWireType=TA:B?(this.toWireType=xA,this.destructorFunction=null):(this.toWireType=vA,this.destructorFunction=null)}var jA=[];function zA(A){var I=jA[A];return I||(A>=jA.length&&(jA.length=A+1),jA[A]=I=q.get(A)),I}function _A(A,I,g){return A.includes("j")?function(A,I,g){var B=C["dynCall_"+A];return g&&g.length?B.apply(null,[I].concat(g)):B.call(null,I)}(A,I,g):zA(I).apply(null,g)}function $A(A,I){var g,B,Q,C=(A=tA(A)).includes("j")?(g=A,B=I,Q=[],function(){return Q.length=0,Object.assign(Q,arguments),_A(g,B,Q)}):zA(I);return"function"!=typeof C&&hA("unknown function pointer with signature "+A+": "+I),C}var AI=void 0;function II(A){var I=lI(A),g=tA(I);return dI(I),g}function gI(A,I){var g=[],B={};throw I.forEach((function A(I){B[I]||BA[I]||(QA[I]?QA[I].forEach(A):(g.push(I),B[I]=!0))})),new AI(A+": "+g.map(II).join([", "]))}function BI(A,I){for(var g=[],B=0;B>2]);return g}function QI(A,I,g,B,Q){var C=I.length;C<2&&hA("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var E=null!==I[1]&&null!==g,i=!1,o=1;o0?", ":"")+s),w+=(D?"var rv = ":"")+"invoker(fn"+(s.length>0?", ":"")+s+");\\n",i)w+="runDestructors(destructors);\\n";else for(o=E?1:2;o4&&0==--EI[A].refcount&&(EI[A]=void 0,CI.push(A))}function oI(){for(var A=0,I=5;I(A||hA("Cannot use deleted val. handle = "+A),EI[A].value),toHandle:A=>{switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var I=CI.length?CI.pop():EI.length;return EI[I]={refcount:1,value:A},I}}};function sI(A){if(null===A)return"null";var I=typeof A;return"object"===I||"array"===I||"function"===I?A.toString():""+A}function wI(A,I){switch(I){case 2:return function(A){return this.fromWireType(M[A>>2])};case 3:return function(A){return this.fromWireType(L[A>>3])};default:throw new TypeError("Unknown float type: "+A)}}function tI(A,I,g){switch(I){case 0:return g?function(A){return n[A]}:function(A){return S[A]};case 1:return g?function(A){return U[A>>1]}:function(A){return k[A>>1]};case 2:return g?function(A){return J[A>>2]}:function(A){return H[A>>2]};default:throw new TypeError("Unknown integer type: "+A)}}var GI="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function hI(A,I){for(var g=A,B=g>>1,Q=B+I/2;!(B>=Q)&&k[B];)++B;if((g=B<<1)-A>32&&GI)return GI.decode(S.subarray(A,g));for(var C="",E=0;!(E>=I/2);++E){var i=U[A+2*E>>1];if(0==i)break;C+=String.fromCharCode(i)}return C}function FI(A,I,g){if(void 0===g&&(g=2147483647),g<2)return 0;for(var B=I,Q=(g-=2)<2*A.length?g/2:A.length,C=0;C>1]=E,I+=2}return U[I>>1]=0,I-B}function yI(A){return 2*A.length}function cI(A,I){for(var g=0,B="";!(g>=I/4);){var Q=J[A+4*g>>2];if(0==Q)break;if(++g,Q>=65536){var C=Q-65536;B+=String.fromCharCode(55296|C>>10,56320|1023&C)}else B+=String.fromCharCode(Q)}return B}function rI(A,I,g){if(void 0===g&&(g=2147483647),g<4)return 0;for(var B=I,Q=B+g-4,C=0;C=55296&&E<=57343&&(E=65536+((1023&E)<<10)|1023&A.charCodeAt(++C)),J[I>>2]=E,(I+=4)+4>Q)break}return J[I>>2]=0,I-B}function NI(A){for(var I=0,g=0;g=55296&&B<=57343&&++g,I+=4}return I}var RI={};function eI(){return"object"==typeof globalThis?globalThis:Function("return this")()}function nI(A,I){var g=BA[A];return void 0===g&&hA(I+" has unknown type "+II(A)),g}var SI={};function UI(A){try{return R.grow(A-e.byteLength+65535>>>16),u(R.buffer),1}catch(A){}}var kI={};function JI(){if(!JI.strings){var A={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:s||"./this.program"};for(var I in kI)void 0===kI[I]?delete A[I]:A[I]=kI[I];var g=[];for(var I in A)g.push(I+"="+A[I]);JI.strings=g}return JI.strings}var HI=[null,[],[]];function MI(A,I){var g=HI[A];0===I||10===I?((1===A?r:N)(d(g,0)),g.length=0):g.push(I)}oA=C.InternalError=iA(Error,"InternalError"),function(){for(var A=new Array(256),I=0;I<256;++I)A[I]=String.fromCharCode(I);wA=A}(),GA=C.BindingError=iA(Error,"BindingError"),bA.prototype.isAliasOf=yA,bA.prototype.clone=fA,bA.prototype.delete=uA,bA.prototype.isDeleted=qA,bA.prototype.deleteLater=pA,C.getInheritedInstanceCount=SA,C.getLiveInheritedInstances=UA,C.flushPendingDeletes=JA,C.setDelayFunction=MA,OA.prototype.getPointee=XA,OA.prototype.destructor=PA,OA.prototype.argPackAdvance=8,OA.prototype.readValueFromPointer=IA,OA.prototype.deleteObject=VA,OA.prototype.fromWireType=dA,AI=C.UnboundTypeError=iA(Error,"UnboundTypeError"),C.count_emval_handles=oI,C.get_first_emval=DI;var LI,YI={D:function(A,I,g){throw new _(A).init(I,g),A},e:function(A){var I=$[A];delete $[A];var g=I.rawConstructor,B=I.rawDestructor,Q=I.fields;aA([A],Q.map((A=>A.getterReturnType)).concat(Q.map((A=>A.setterArgumentType))),(A=>{var C={};return Q.forEach(((I,g)=>{var B=I.fieldName,E=A[g],i=I.getter,o=I.getterContext,D=A[g+Q.length],a=I.setter,s=I.setterContext;C[B]={read:A=>E.fromWireType(i(o,A)),write:(A,I)=>{var g=[];a(s,A,D.toWireType(g,I)),AA(g)}}})),[{name:I.name,fromWireType:function(A){var I={};for(var g in C)I[g]=C[g].read(A);return B(A),I},toWireType:function(A,I){for(var Q in C)if(!(Q in I))throw new TypeError('Missing field: "'+Q+'"');var E=g();for(Q in C)C[Q].write(E,I[Q]);return null!==A&&A.push(B,E),E},argPackAdvance:8,readValueFromPointer:IA,destructorFunction:B}]}))},t:function(A,I,g,B,Q){},B:function(A,I,g,B,Q){var C=sA(g);FA(A,{name:I=tA(I),fromWireType:function(A){return!!A},toWireType:function(A,I){return I?B:Q},argPackAdvance:8,readValueFromPointer:function(A){var B;if(1===g)B=n;else if(2===g)B=U;else{if(4!==g)throw new TypeError("Unknown boolean type size: "+I);B=J}return this.fromWireType(B[A>>C])},destructorFunction:null})},r:function(A,I,g,B,Q,E,i,o,D,a,s,w,t){s=tA(s),E=$A(Q,E),o&&(o=$A(i,o)),a&&(a=$A(D,a)),t=$A(w,t);var G=CA(s);!function(A,I,g){C.hasOwnProperty(A)?((void 0===g||void 0!==C[A].overloadTable&&void 0!==C[A].overloadTable[g])&&hA("Cannot register public name '"+A+"' twice"),WA(C,A,A),C.hasOwnProperty(g)&&hA("Cannot register multiple overloads of a function with the same number of arguments ("+g+")!"),C[A].overloadTable[g]=I):(C[A]=I,void 0!==g&&(C[A].numArguments=g))}(G,(function(){gI("Cannot construct "+s+" due to unbound types",[B])})),aA([A,I,g],B?[B]:[],(function(I){var g,Q;I=I[0],Q=B?(g=I.registeredClass).instancePrototype:bA.prototype;var i=EA(G,(function(){if(Object.getPrototypeOf(this)!==D)throw new GA("Use 'new' to construct "+s);if(void 0===w.constructor_body)throw new GA(s+" has no accessible constructor");var A=w.constructor_body[arguments.length];if(void 0===A)throw new GA("Tried to invoke ctor of "+s+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(w.constructor_body).toString()+") parameters instead!");return A.apply(this,arguments)})),D=Object.create(Q,{constructor:{value:i}});i.prototype=D;var w=new ZA(s,i,D,t,g,E,o,a),h=new OA(s,w,!0,!1,!1),F=new OA(s+"*",w,!1,!1,!1),y=new OA(s+" const*",w,!1,!0,!1);return nA[A]={pointerType:F,constPointerType:y},function(A,I,g){C.hasOwnProperty(A)||DA("Replacing nonexistant public symbol"),void 0!==C[A].overloadTable&&void 0!==g?C[A].overloadTable[g]=I:(C[A]=I,C[A].argCount=g)}(G,i),[h,F,y]}))},q:function(A,I,g,B,Q,C){var E;I>0||X(E);var i=BI(I,g);Q=$A(B,Q),aA([],[A],(function(A){var g="constructor "+(A=A[0]).name;if(void 0===A.registeredClass.constructor_body&&(A.registeredClass.constructor_body=[]),void 0!==A.registeredClass.constructor_body[I-1])throw new GA("Cannot register multiple constructors with identical number of parameters ("+(I-1)+") for class '"+A.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return A.registeredClass.constructor_body[I-1]=()=>{gI("Cannot construct "+A.name+" due to unbound types",i)},aA([],i,(function(B){return B.splice(1,0,null),A.registeredClass.constructor_body[I-1]=QI(g,B,null,Q,C),[]})),[]}))},b:function(A,I,g,B,Q,C,E,i){var o=BI(g,B);I=tA(I),C=$A(Q,C),aA([],[A],(function(A){var B=(A=A[0]).name+"."+I;function Q(){gI("Cannot call "+B+" due to unbound types",o)}I.startsWith("@@")&&(I=Symbol[I.substring(2)]),i&&A.registeredClass.pureVirtualFunctions.push(I);var D=A.registeredClass.instancePrototype,a=D[I];return void 0===a||void 0===a.overloadTable&&a.className!==A.name&&a.argCount===g-2?(Q.argCount=g-2,Q.className=A.name,D[I]=Q):(WA(D,I,B),D[I].overloadTable[g-2]=Q),aA([],o,(function(Q){var i=QI(B,Q,A,C,E);return void 0===D[I].overloadTable?(i.argCount=g-2,D[I]=i):D[I].overloadTable[g-2]=i,[]})),[]}))},A:function(A,I){FA(A,{name:I=tA(I),fromWireType:function(A){var I=aI.toValue(A);return iI(A),I},toWireType:function(A,I){return aI.toHandle(I)},argPackAdvance:8,readValueFromPointer:IA,destructorFunction:null})},l:function(A,I,g){var B=sA(g);FA(A,{name:I=tA(I),fromWireType:function(A){return A},toWireType:function(A,I){return I},argPackAdvance:8,readValueFromPointer:wI(I,B),destructorFunction:null})},d:function(A,I,g,B,Q){I=tA(I),-1===Q&&(Q=4294967295);var C=sA(g),E=A=>A;if(0===B){var i=32-8*g;E=A=>A<>>i}var o=I.includes("unsigned");FA(A,{name:I,fromWireType:E,toWireType:o?function(A,I){return this.name,I>>>0}:function(A,I){return this.name,I},argPackAdvance:8,readValueFromPointer:tI(I,C,0!==B),destructorFunction:null})},a:function(A,I,g){var B=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][I];function Q(A){var I=H,g=I[A>>=2],Q=I[A+1];return new B(e,Q,g)}FA(A,{name:g=tA(g),fromWireType:Q,argPackAdvance:8,readValueFromPointer:Q},{ignoreDuplicateRegistrations:!0})},k:function(A,I){var g="std::string"===(I=tA(I));FA(A,{name:I,fromWireType:function(A){var I,B=H[A>>2],Q=A+4;if(g)for(var C=Q,E=0;E<=B;++E){var i=Q+E;if(E==B||0==S[i]){var o=l(C,i-C);void 0===I?I=o:(I+=String.fromCharCode(0),I+=o),C=i+1}}else{var D=new Array(B);for(E=0;E=55296&&B<=57343?(I+=4,++g):I+=3}return I}(I):I.length;var C=KI(4+B+1),E=C+4;if(H[C>>2]=B,g&&Q)f(I,E,B+1);else if(Q)for(var i=0;i255&&(dI(E),hA("String has UTF-16 code units that do not fit in 8 bits")),S[E+i]=o}else for(i=0;ik,i=1):4===I&&(B=cI,Q=rI,E=NI,C=()=>H,i=2),FA(A,{name:g,fromWireType:function(A){for(var g,Q=H[A>>2],E=C(),o=A+4,D=0;D<=Q;++D){var a=A+4+D*I;if(D==Q||0==E[a>>i]){var s=B(o,a-o);void 0===g?g=s:(g+=String.fromCharCode(0),g+=s),o=a+I}}return dI(A),g},toWireType:function(A,B){"string"!=typeof B&&hA("Cannot pass non-string to C++ string type "+g);var C=E(B),o=KI(4+C+I);return H[o>>2]=C>>i,Q(B,o+4,C+I),null!==A&&A.push(dI,o),o},argPackAdvance:8,readValueFromPointer:IA,destructorFunction:function(A){dI(A)}})},g:function(A,I,g,B,Q,C){$[A]={name:tA(I),rawConstructor:$A(g,B),rawDestructor:$A(Q,C),fields:[]}},c:function(A,I,g,B,Q,C,E,i,o,D){$[A].fields.push({fieldName:tA(I),getterReturnType:g,getter:$A(B,Q),getterContext:C,setterArgumentType:E,setter:$A(i,o),setterContext:D})},C:function(A,I){FA(A,{isVoid:!0,name:I=tA(I),argPackAdvance:0,fromWireType:function(){},toWireType:function(A,I){}})},h:iI,o:function(A){return 0===A?aI.toHandle(eI()):(A=void 0===(g=RI[I=A])?tA(I):g,aI.toHandle(eI()[A]));var I,g},m:function(A){A>4&&(EI[A].refcount+=1)},n:function(A,I,g,B){A=aI.toValue(A);var Q=SI[I];return Q||(Q=function(A){for(var I="",g=0;g>2)], 'parameter "+g+"');\\nvar arg"+g+" = argType"+g+".readValueFromPointer(args);\\nargs += argType"+g+"['argPackAdvance'];\\nargTypes += 4;\\n";return B+="var obj = new constructor("+I+");\\nreturn valueToHandle(obj);\\n}\\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",B)(nI,C,aI.toHandle,(()=>H))}(I),SI[I]=Q),Q(A,g,B)},p:function(A,I){var g=(A=nI(A,"_emval_take_value")).readValueFromPointer(I);return aI.toHandle(g)},i:function(){X("")},v:function(){return 2147483648},z:function(A,I,g){S.copyWithin(A,I,I+g)},u:function(A){var I,g,B=S.length,Q=2147483648;if((A>>>=0)>Q)return!1;for(var C=1;C<=4;C*=2){var E=B*(1+.2/C);if(E=Math.min(E,A+100663296),UI(Math.min(Q,(I=Math.max(A,E))+((g=65536)-I%g)%g)))return!0}return!1},w:function(A,I){var g=0;return JI().forEach((function(B,Q){var C=I+g;H[A+4*Q>>2]=C,function(A,I,g){for(var B=0;B>0]=A.charCodeAt(B);g||(n[I>>0]=0)}(B,C),g+=B.length+1})),0},x:function(A,I){var g=JI();H[A>>2]=g.length;var B=0;return g.forEach((function(A){B+=A.length+1})),H[I>>2]=B,0},y:function(A){return 52},s:function(A,I,g,B,Q){return 70},j:function(A,I,g,B){for(var Q=0,C=0;C>2],i=H[I+4>>2];I+=8;for(var o=0;o>2]=Q,0}},KI=(function(){var A={a:YI};function I(A,I){var g,B=A.exports;C.asm=B,u((R=C.asm.E).buffer),q=C.asm.G,g=C.asm.F,Z.unshift(g),function(A){if(x--,C.monitorRunDependencies&&C.monitorRunDependencies(x),0==x&&(null!==T&&(clearInterval(T),T=null),v)){var I=v;v=null,I()}}()}function g(A){I(A.instance)}function B(I){return function(){if(!c&&(w||t)){if("function"==typeof fetch&&!V(p))return fetch(p,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+p+"'";return A.arrayBuffer()})).catch((function(){return O(p)}));if(i)return new Promise((function(A,I){i(p,(function(I){A(new Uint8Array(I))}),I)}))}return Promise.resolve().then((function(){return O(p)}))}().then((function(I){return WebAssembly.instantiate(I,A)})).then((function(A){return A})).then(I,(function(A){N("failed to asynchronously prepare wasm: "+A),X(A)}))}if(x++,C.monitorRunDependencies&&C.monitorRunDependencies(x),C.instantiateWasm)try{return C.instantiateWasm(A,I)}catch(A){N("Module.instantiateWasm callback failed with error: "+A),Q(A)}(c||"function"!=typeof WebAssembly.instantiateStreaming||P(p)||V(p)||G||"function"!=typeof fetch?B(g):fetch(p,{credentials:"same-origin"}).then((function(I){return WebAssembly.instantiateStreaming(I,A).then(g,(function(A){return N("wasm streaming compile failed: "+A),N("falling back to ArrayBuffer instantiation"),B(g)}))}))).catch(Q)}(),C.___wasm_call_ctors=function(){return(C.___wasm_call_ctors=C.asm.F).apply(null,arguments)},C._malloc=function(){return(KI=C._malloc=C.asm.H).apply(null,arguments)}),dI=C._free=function(){return(dI=C._free=C.asm.I).apply(null,arguments)},lI=C.___getTypeName=function(){return(lI=C.___getTypeName=C.asm.J).apply(null,arguments)},fI=(C.__embind_initialize_bindings=function(){return(C.__embind_initialize_bindings=C.asm.K).apply(null,arguments)},C.stackSave=function(){return(fI=C.stackSave=C.asm.L).apply(null,arguments)}),uI=C.stackRestore=function(){return(uI=C.stackRestore=C.asm.M).apply(null,arguments)},qI=C.stackAlloc=function(){return(qI=C.stackAlloc=C.asm.N).apply(null,arguments)},pI=C.___cxa_is_pointer_type=function(){return(pI=C.___cxa_is_pointer_type=C.asm.O).apply(null,arguments)};function bI(A){function g(){LI||(LI=!0,C.calledRun=!0,Y||(z(Z),I(C),C.onRuntimeInitialized&&C.onRuntimeInitialized(),function(){if(C.postRun)for("function"==typeof C.postRun&&(C.postRun=[C.postRun]);C.postRun.length;)A=C.postRun.shift(),m.unshift(A);var A;z(m)}()))}A=A||a,x>0||(function(){if(C.preRun)for("function"==typeof C.preRun&&(C.preRun=[C.preRun]);C.preRun.length;)A=C.preRun.shift(),W.unshift(A);var A;z(W)}(),x>0||(C.setStatus?(C.setStatus("Running..."),setTimeout((function(){setTimeout((function(){C.setStatus("")}),1),g()}),1)):g()))}if(C.dynCall_iji=function(){return(C.dynCall_iji=C.asm.P).apply(null,arguments)},C.dynCall_jji=function(){return(C.dynCall_jji=C.asm.Q).apply(null,arguments)},C.dynCall_iiji=function(){return(C.dynCall_iiji=C.asm.R).apply(null,arguments)},C.dynCall_jiji=function(){return(C.dynCall_jiji=C.asm.S).apply(null,arguments)},C.ccall=function(A,I,g,B,Q){var E={string:A=>{var I=0;if(null!=A&&0!==A){var g=1+(A.length<<2);f(A,I=qI(g),g)}return I},array:A=>{var I=qI(A.length);return function(A,I){n.set(A,I)}(A,I),I}},i=function(A){return C["_"+A]}(A),o=[],D=0;if(B)for(var a=0;a0;)C.preInit.pop()();return bI(),A.ready});A.exports=Q},6396:(A,I,g)=>{var B,Q=(B=(B="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(A){var I,Q;(A=void 0!==(A=A||{})?A:{}).ready=new Promise((function(A,g){I=A,Q=g}));var C,E,i,o=Object.assign({},A),D=[],a="object"==typeof window,s="function"==typeof importScripts,w="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,t="";if(w){var G=g(4555),h=g(1005);t=s?h.dirname(t)+"/":"//",C=(A,I)=>(A=X(A)?new URL(A):h.normalize(A),G.readFileSync(A,I?void 0:"utf8")),i=A=>{var I=C(A,!0);return I.buffer||(I=new Uint8Array(I)),I},E=(A,I,g)=>{A=X(A)?new URL(A):h.normalize(A),G.readFile(A,(function(A,B){A?g(A):I(B.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\\\/g,"/"),D=process.argv.slice(2),process.on("uncaughtException",(function(A){if(!(A instanceof V))throw A})),process.on("unhandledRejection",(function(A){throw A})),A.inspect=function(){return"[Emscripten Module object]"}}else(a||s)&&(s?t=self.location.href:"undefined"!=typeof document&&document.currentScript&&(t=document.currentScript.src),B&&(t=B),t=0!==t.indexOf("blob:")?t.substr(0,t.replace(/[?#].*/,"").lastIndexOf("/")+1):"",C=A=>{var I=new XMLHttpRequest;return I.open("GET",A,!1),I.send(null),I.responseText},s&&(i=A=>{var I=new XMLHttpRequest;return I.open("GET",A,!1),I.responseType="arraybuffer",I.send(null),new Uint8Array(I.response)}),E=(A,I,g)=>{var B=new XMLHttpRequest;B.open("GET",A,!0),B.responseType="arraybuffer",B.onload=()=>{200==B.status||0==B.status&&B.response?I(B.response):g()},B.onerror=g,B.send(null)});var F,y=A.print||console.log.bind(console),c=A.printErr||console.warn.bind(console);Object.assign(A,o),o=null,A.arguments&&(D=A.arguments),A.thisProgram&&A.thisProgram,A.quit&&A.quit,A.wasmBinary&&(F=A.wasmBinary);var r;A.noExitRuntime;"object"!=typeof WebAssembly&&T("no native wasm support detected");var N,R,e,n,S,U,k,J,H,M=!1,L="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function Y(A,I,g){for(var B=I+g,Q=I;A[Q]&&!(Q>=B);)++Q;if(Q-I>16&&A.buffer&&L)return L.decode(A.subarray(I,Q));for(var C="";I>10,56320|1023&D)}}else C+=String.fromCharCode((31&E)<<6|i)}else C+=String.fromCharCode(E)}return C}function K(A,I){return A?Y(e,A,I):""}function d(A,I,g){return function(A,I,g,B){if(!(B>0))return 0;for(var Q=g,C=g+B-1,E=0;E=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&A.charCodeAt(++E)),i<=127){if(g>=C)break;I[g++]=i}else if(i<=2047){if(g+1>=C)break;I[g++]=192|i>>6,I[g++]=128|63&i}else if(i<=65535){if(g+2>=C)break;I[g++]=224|i>>12,I[g++]=128|i>>6&63,I[g++]=128|63&i}else{if(g+3>=C)break;I[g++]=240|i>>18,I[g++]=128|i>>12&63,I[g++]=128|i>>6&63,I[g++]=128|63&i}}return I[g]=0,g-Q}(A,e,I,g)}function l(I){N=I,A.HEAP8=R=new Int8Array(I),A.HEAP16=n=new Int16Array(I),A.HEAP32=U=new Int32Array(I),A.HEAPU8=e=new Uint8Array(I),A.HEAPU16=S=new Uint16Array(I),A.HEAPU32=k=new Uint32Array(I),A.HEAPF32=J=new Float32Array(I),A.HEAPF64=H=new Float64Array(I)}A.INITIAL_MEMORY;var f,u,q,p=[],b=[],W=[],Z=0,m=null,x=null;function T(I){A.onAbort&&A.onAbort(I),c(I="Aborted("+I+")"),M=!0,I+=". Build with -sASSERTIONS for more info.";var g=new WebAssembly.RuntimeError(I);throw Q(g),g}function v(A){return A.startsWith("data:application/octet-stream;base64,")}function X(A){return A.startsWith("file://")}function P(A){try{if(A==u&&F)return new Uint8Array(F);if(i)return i(A);throw"both async and sync fetching of the wasm failed"}catch(A){T(A)}}function V(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function O(I){for(;I.length>0;)I.shift()(A)}v(u="openjphjs.wasm")||(q=u,u=A.locateFile?A.locateFile(q,t):t+q);var j=[],z=0,_=[];function $(A){var I=_[A];return I||(A>=_.length&&(_.length=A+1),_[A]=I=f.get(A)),I}function AA(A){this.excPtr=A,this.ptr=A-24,this.set_type=function(A){k[this.ptr+4>>2]=A},this.get_type=function(){return k[this.ptr+4>>2]},this.set_destructor=function(A){k[this.ptr+8>>2]=A},this.get_destructor=function(){return k[this.ptr+8>>2]},this.set_refcount=function(A){U[this.ptr>>2]=A},this.set_caught=function(A){A=A?1:0,R[this.ptr+12>>0]=A},this.get_caught=function(){return 0!=R[this.ptr+12>>0]},this.set_rethrown=function(A){A=A?1:0,R[this.ptr+13>>0]=A},this.get_rethrown=function(){return 0!=R[this.ptr+13>>0]},this.init=function(A,I){this.set_adjusted_ptr(0),this.set_type(A),this.set_destructor(I),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var A=U[this.ptr>>2];U[this.ptr>>2]=A+1},this.release_ref=function(){var A=U[this.ptr>>2];return U[this.ptr>>2]=A-1,1===A},this.set_adjusted_ptr=function(A){k[this.ptr+16>>2]=A},this.get_adjusted_ptr=function(){return k[this.ptr+16>>2]},this.get_exception_ptr=function(){if(qI(this.get_type()))return k[this.excPtr>>2];var A=this.get_adjusted_ptr();return 0!==A?A:this.excPtr}}var IA={};function gA(A){for(;A.length;){var I=A.pop();A.pop()(I)}}function BA(A){return this.fromWireType(U[A>>2])}var QA={},CA={},EA={};function iA(A){if(void 0===A)return"_unknown";var I=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return I>=48&&I<=57?"_"+A:A}function oA(A,I){return A=iA(A),new Function("body","return function "+A+'() {\\n "use strict"; return body.apply(this, arguments);\\n};\\n')(I)}function DA(A,I){var g=oA(I,(function(A){this.name=I,this.message=A;var g=new Error(A).stack;void 0!==g&&(this.stack=this.toString()+"\\n"+g.replace(/^Error(:[^\\n]*)?\\n/,""))}));return g.prototype=Object.create(A.prototype),g.prototype.constructor=g,g.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},g}var aA=void 0;function sA(A){throw new aA(A)}function wA(A,I,g){function B(I){var B=g(I);B.length!==A.length&&sA("Mismatched type converter count");for(var Q=0;Q{CA.hasOwnProperty(A)?Q[I]=CA[A]:(C.push(A),QA.hasOwnProperty(A)||(QA[A]=[]),QA[A].push((()=>{Q[I]=CA[A],++E===C.length&&B(Q)})))})),0===C.length&&B(Q)}function tA(A){switch(A){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+A)}}var GA=void 0;function hA(A){for(var I="",g=A;e[g];)I+=GA[e[g++]];return I}var FA=void 0;function yA(A){throw new FA(A)}function cA(A,I,g={}){if(!("argPackAdvance"in I))throw new TypeError("registerType registeredInstance requires argPackAdvance");var B=I.name;if(A||yA('type "'+B+'" must have a positive integer typeid pointer'),CA.hasOwnProperty(A)){if(g.ignoreDuplicateRegistrations)return;yA("Cannot register type '"+B+"' twice")}if(CA[A]=I,delete EA[A],QA.hasOwnProperty(A)){var Q=QA[A];delete QA[A],Q.forEach((A=>A()))}}function rA(A){if(!(this instanceof ZA))return!1;if(!(A instanceof ZA))return!1;for(var I=this.$$.ptrType.registeredClass,g=this.$$.ptr,B=A.$$.ptrType.registeredClass,Q=A.$$.ptr;I.baseClass;)g=I.upcast(g),I=I.baseClass;for(;B.baseClass;)Q=B.upcast(Q),B=B.baseClass;return I===B&&g===Q}function NA(A){yA(A.$$.ptrType.registeredClass.name+" instance already deleted")}var RA=!1;function eA(A){}function nA(A){A.count.value-=1,0===A.count.value&&function(A){A.smartPtr?A.smartPtrType.rawDestructor(A.smartPtr):A.ptrType.registeredClass.rawDestructor(A.ptr)}(A)}function SA(A,I,g){if(I===g)return A;if(void 0===g.baseClass)return null;var B=SA(A,I,g.baseClass);return null===B?null:g.downcast(B)}var UA={};function kA(){return Object.keys(KA).length}function JA(){var A=[];for(var I in KA)KA.hasOwnProperty(I)&&A.push(KA[I]);return A}var HA=[];function MA(){for(;HA.length;){var A=HA.pop();A.$$.deleteScheduled=!1,A.delete()}}var LA=void 0;function YA(A){LA=A,HA.length&&LA&&LA(MA)}var KA={};function dA(A,I){return I=function(A,I){for(void 0===I&&yA("ptr should not be undefined");A.baseClass;)I=A.upcast(I),A=A.baseClass;return I}(A,I),KA[I]}function lA(A,I){return I.ptrType&&I.ptr||sA("makeClassHandle requires ptr and ptrType"),!!I.smartPtrType!=!!I.smartPtr&&sA("Both smartPtrType and smartPtr must be specified"),I.count={value:1},uA(Object.create(A,{$$:{value:I}}))}function fA(A){var I=this.getPointee(A);if(!I)return this.destructor(A),null;var g=dA(this.registeredClass,I);if(void 0!==g){if(0===g.$$.count.value)return g.$$.ptr=I,g.$$.smartPtr=A,g.clone();var B=g.clone();return this.destructor(A),B}function Q(){return this.isSmartPointer?lA(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:I,smartPtrType:this,smartPtr:A}):lA(this.registeredClass.instancePrototype,{ptrType:this,ptr:A})}var C,E=this.registeredClass.getActualType(I),i=UA[E];if(!i)return Q.call(this);C=this.isConst?i.constPointerType:i.pointerType;var o=SA(I,this.registeredClass,C.registeredClass);return null===o?Q.call(this):this.isSmartPointer?lA(C.registeredClass.instancePrototype,{ptrType:C,ptr:o,smartPtrType:this,smartPtr:A}):lA(C.registeredClass.instancePrototype,{ptrType:C,ptr:o})}function uA(A){return"undefined"==typeof FinalizationRegistry?(uA=A=>A,A):(RA=new FinalizationRegistry((A=>{nA(A.$$)})),eA=A=>RA.unregister(A),(uA=A=>{var I=A.$$;if(I.smartPtr){var g={$$:I};RA.register(A,g,A)}return A})(A))}function qA(){if(this.$$.ptr||NA(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var A,I=uA(Object.create(Object.getPrototypeOf(this),{$$:{value:(A=this.$$,{count:A.count,deleteScheduled:A.deleteScheduled,preservePointerOnDelete:A.preservePointerOnDelete,ptr:A.ptr,ptrType:A.ptrType,smartPtr:A.smartPtr,smartPtrType:A.smartPtrType})}}));return I.$$.count.value+=1,I.$$.deleteScheduled=!1,I}function pA(){this.$$.ptr||NA(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&yA("Object already scheduled for deletion"),eA(this),nA(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function bA(){return!this.$$.ptr}function WA(){return this.$$.ptr||NA(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&yA("Object already scheduled for deletion"),HA.push(this),1===HA.length&&LA&&LA(MA),this.$$.deleteScheduled=!0,this}function ZA(){}function mA(A,I,g){if(void 0===A[I].overloadTable){var B=A[I];A[I]=function(){return A[I].overloadTable.hasOwnProperty(arguments.length)||yA("Function '"+g+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+A[I].overloadTable+")!"),A[I].overloadTable[arguments.length].apply(this,arguments)},A[I].overloadTable=[],A[I].overloadTable[B.argCount]=B}}function xA(I,g,B){A.hasOwnProperty(I)?((void 0===B||void 0!==A[I].overloadTable&&void 0!==A[I].overloadTable[B])&&yA("Cannot register public name '"+I+"' twice"),mA(A,I,I),A.hasOwnProperty(B)&&yA("Cannot register multiple overloads of a function with the same number of arguments ("+B+")!"),A[I].overloadTable[B]=g):(A[I]=g,void 0!==B&&(A[I].numArguments=B))}function TA(A,I,g,B,Q,C,E,i){this.name=A,this.constructor=I,this.instancePrototype=g,this.rawDestructor=B,this.baseClass=Q,this.getActualType=C,this.upcast=E,this.downcast=i,this.pureVirtualFunctions=[]}function vA(A,I,g){for(;I!==g;)I.upcast||yA("Expected null or instance of "+g.name+", got an instance of "+I.name),A=I.upcast(A),I=I.baseClass;return A}function XA(A,I){if(null===I)return this.isReference&&yA("null is not a valid "+this.name),0;I.$$||yA('Cannot pass "'+tI(I)+'" as a '+this.name),I.$$.ptr||yA("Cannot pass deleted object as a pointer of type "+this.name);var g=I.$$.ptrType.registeredClass;return vA(I.$$.ptr,g,this.registeredClass)}function PA(A,I){var g;if(null===I)return this.isReference&&yA("null is not a valid "+this.name),this.isSmartPointer?(g=this.rawConstructor(),null!==A&&A.push(this.rawDestructor,g),g):0;I.$$||yA('Cannot pass "'+tI(I)+'" as a '+this.name),I.$$.ptr||yA("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&I.$$.ptrType.isConst&&yA("Cannot convert argument of type "+(I.$$.smartPtrType?I.$$.smartPtrType.name:I.$$.ptrType.name)+" to parameter type "+this.name);var B=I.$$.ptrType.registeredClass;if(g=vA(I.$$.ptr,B,this.registeredClass),this.isSmartPointer)switch(void 0===I.$$.smartPtr&&yA("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:I.$$.smartPtrType===this?g=I.$$.smartPtr:yA("Cannot convert argument of type "+(I.$$.smartPtrType?I.$$.smartPtrType.name:I.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:g=I.$$.smartPtr;break;case 2:if(I.$$.smartPtrType===this)g=I.$$.smartPtr;else{var Q=I.clone();g=this.rawShare(g,wI.toHandle((function(){Q.delete()}))),null!==A&&A.push(this.rawDestructor,g)}break;default:yA("Unsupporting sharing policy")}return g}function VA(A,I){if(null===I)return this.isReference&&yA("null is not a valid "+this.name),0;I.$$||yA('Cannot pass "'+tI(I)+'" as a '+this.name),I.$$.ptr||yA("Cannot pass deleted object as a pointer of type "+this.name),I.$$.ptrType.isConst&&yA("Cannot convert argument of type "+I.$$.ptrType.name+" to parameter type "+this.name);var g=I.$$.ptrType.registeredClass;return vA(I.$$.ptr,g,this.registeredClass)}function OA(A){return this.rawGetPointee&&(A=this.rawGetPointee(A)),A}function jA(A){this.rawDestructor&&this.rawDestructor(A)}function zA(A){null!==A&&A.delete()}function _A(A,I,g,B,Q,C,E,i,o,D,a){this.name=A,this.registeredClass=I,this.isReference=g,this.isConst=B,this.isSmartPointer=Q,this.pointeeType=C,this.sharingPolicy=E,this.rawGetPointee=i,this.rawConstructor=o,this.rawShare=D,this.rawDestructor=a,Q||void 0!==I.baseClass?this.toWireType=PA:B?(this.toWireType=XA,this.destructorFunction=null):(this.toWireType=VA,this.destructorFunction=null)}function $A(I,g,B){A.hasOwnProperty(I)||sA("Replacing nonexistant public symbol"),void 0!==A[I].overloadTable&&void 0!==B?A[I].overloadTable[B]=g:(A[I]=g,A[I].argCount=B)}function AI(I,g,B){return I.includes("j")?function(I,g,B){var Q=A["dynCall_"+I];return B&&B.length?Q.apply(null,[g].concat(B)):Q.call(null,g)}(I,g,B):$(g).apply(null,B)}function II(A,I){var g,B,Q,C=(A=hA(A)).includes("j")?(g=A,B=I,Q=[],function(){return Q.length=0,Object.assign(Q,arguments),AI(g,B,Q)}):$(I);return"function"!=typeof C&&yA("unknown function pointer with signature "+A+": "+I),C}var gI=void 0;function BI(A){var I=YI(A),g=hA(I);return LI(I),g}function QI(A,I){var g=[],B={};throw I.forEach((function A(I){B[I]||CA[I]||(EA[I]?EA[I].forEach(A):(g.push(I),B[I]=!0))})),new gI(A+": "+g.map(BI).join([", "]))}function CI(A,I){for(var g=[],B=0;B>2]);return g}function EI(A,I,g,B,Q){var C=I.length;C<2&&yA("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var E=null!==I[1]&&null!==g,i=!1,o=1;o0?", ":"")+s),w+=(D?"var rv = ":"")+"invoker(fn"+(s.length>0?", ":"")+s+");\\n",i)w+="runDestructors(destructors);\\n";else for(o=E?1:2;o4&&0==--oI[A].refcount&&(oI[A]=void 0,iI.push(A))}function aI(){for(var A=0,I=5;I(A||yA("Cannot use deleted val. handle = "+A),oI[A].value),toHandle:A=>{switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var I=iI.length?iI.pop():oI.length;return oI[I]={refcount:1,value:A},I}}};function tI(A){if(null===A)return"null";var I=typeof A;return"object"===I||"array"===I||"function"===I?A.toString():""+A}function GI(A,I){switch(I){case 2:return function(A){return this.fromWireType(J[A>>2])};case 3:return function(A){return this.fromWireType(H[A>>3])};default:throw new TypeError("Unknown float type: "+A)}}function hI(A,I,g){switch(I){case 0:return g?function(A){return R[A]}:function(A){return e[A]};case 1:return g?function(A){return n[A>>1]}:function(A){return S[A>>1]};case 2:return g?function(A){return U[A>>2]}:function(A){return k[A>>2]};default:throw new TypeError("Unknown integer type: "+A)}}var FI="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function yI(A,I){for(var g=A,B=g>>1,Q=B+I/2;!(B>=Q)&&S[B];)++B;if((g=B<<1)-A>32&&FI)return FI.decode(e.subarray(A,g));for(var C="",E=0;!(E>=I/2);++E){var i=n[A+2*E>>1];if(0==i)break;C+=String.fromCharCode(i)}return C}function cI(A,I,g){if(void 0===g&&(g=2147483647),g<2)return 0;for(var B=I,Q=(g-=2)<2*A.length?g/2:A.length,C=0;C>1]=E,I+=2}return n[I>>1]=0,I-B}function rI(A){return 2*A.length}function NI(A,I){for(var g=0,B="";!(g>=I/4);){var Q=U[A+4*g>>2];if(0==Q)break;if(++g,Q>=65536){var C=Q-65536;B+=String.fromCharCode(55296|C>>10,56320|1023&C)}else B+=String.fromCharCode(Q)}return B}function RI(A,I,g){if(void 0===g&&(g=2147483647),g<4)return 0;for(var B=I,Q=B+g-4,C=0;C=55296&&E<=57343&&(E=65536+((1023&E)<<10)|1023&A.charCodeAt(++C)),U[I>>2]=E,(I+=4)+4>Q)break}return U[I>>2]=0,I-B}function eI(A){for(var I=0,g=0;g=55296&&B<=57343&&++g,I+=4}return I}function nI(A){try{return r.grow(A-N.byteLength+65535>>>16),l(r.buffer),1}catch(A){}}var SI=[null,[],[]];function UI(A,I){var g=SI[A];0===I||10===I?((1===A?y:c)(Y(g,0)),g.length=0):g.push(I)}aA=A.InternalError=DA(Error,"InternalError"),function(){for(var A=new Array(256),I=0;I<256;++I)A[I]=String.fromCharCode(I);GA=A}(),FA=A.BindingError=DA(Error,"BindingError"),ZA.prototype.isAliasOf=rA,ZA.prototype.clone=qA,ZA.prototype.delete=pA,ZA.prototype.isDeleted=bA,ZA.prototype.deleteLater=WA,A.getInheritedInstanceCount=kA,A.getLiveInheritedInstances=JA,A.flushPendingDeletes=MA,A.setDelayFunction=YA,_A.prototype.getPointee=OA,_A.prototype.destructor=jA,_A.prototype.argPackAdvance=8,_A.prototype.readValueFromPointer=BA,_A.prototype.deleteObject=zA,_A.prototype.fromWireType=fA,gI=A.UnboundTypeError=DA(Error,"UnboundTypeError"),A.count_emval_handles=aI,A.get_first_emval=sI;var kI,JI={M:function(A){var I=new AA(A);return I.get_caught()||I.set_caught(!0),I.set_rethrown(!1),j.push(I),function(A){A.add_ref()}(I),I.get_exception_ptr()},v:function(){_setThrew(0),function(A){if(A.release_ref()&&!A.get_rethrown()){var I=A.get_destructor();I&&$(I)(A.excPtr),MI(A.excPtr)}}(j.pop()),z=0},c:function(){var A=z;if(!A)return KI(0),0;var I=new AA(A);I.set_adjusted_ptr(A);var g=I.get_type();if(!g)return KI(0),A;for(var B=0;BA.getterReturnType)).concat(Q.map((A=>A.setterArgumentType))),(A=>{var C={};return Q.forEach(((I,g)=>{var B=I.fieldName,E=A[g],i=I.getter,o=I.getterContext,D=A[g+Q.length],a=I.setter,s=I.setterContext;C[B]={read:A=>E.fromWireType(i(o,A)),write:(A,I)=>{var g=[];a(s,A,D.toWireType(g,I)),gA(g)}}})),[{name:I.name,fromWireType:function(A){var I={};for(var g in C)I[g]=C[g].read(A);return B(A),I},toWireType:function(A,I){for(var Q in C)if(!(Q in I))throw new TypeError('Missing field: "'+Q+'"');var E=g();for(Q in C)C[Q].write(E,I[Q]);return null!==A&&A.push(B,E),E},argPackAdvance:8,readValueFromPointer:BA,destructorFunction:B}]}))},E:function(A,I,g,B,Q){},J:function(A,I,g,B,Q){var C=tA(g);cA(A,{name:I=hA(I),fromWireType:function(A){return!!A},toWireType:function(A,I){return I?B:Q},argPackAdvance:8,readValueFromPointer:function(A){var B;if(1===g)B=R;else if(2===g)B=n;else{if(4!==g)throw new TypeError("Unknown boolean type size: "+I);B=U}return this.fromWireType(B[A>>C])},destructorFunction:null})},z:function(A,I,g,B,Q,C,E,i,o,D,a,s,w){a=hA(a),C=II(Q,C),i&&(i=II(E,i)),D&&(D=II(o,D)),w=II(s,w);var t=iA(a);xA(t,(function(){QI("Cannot construct "+a+" due to unbound types",[B])})),wA([A,I,g],B?[B]:[],(function(I){var g,Q;I=I[0],Q=B?(g=I.registeredClass).instancePrototype:ZA.prototype;var E=oA(t,(function(){if(Object.getPrototypeOf(this)!==o)throw new FA("Use 'new' to construct "+a);if(void 0===s.constructor_body)throw new FA(a+" has no accessible constructor");var A=s.constructor_body[arguments.length];if(void 0===A)throw new FA("Tried to invoke ctor of "+a+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(s.constructor_body).toString()+") parameters instead!");return A.apply(this,arguments)})),o=Object.create(Q,{constructor:{value:E}});E.prototype=o;var s=new TA(a,E,o,w,g,C,i,D),G=new _A(a,s,!0,!1,!1),h=new _A(a+"*",s,!1,!1,!1),F=new _A(a+" const*",s,!1,!0,!1);return UA[A]={pointerType:h,constPointerType:F},$A(t,E),[G,h,F]}))},y:function(A,I,g,B,Q,C){var E;I>0||T(E);var i=CI(I,g);Q=II(B,Q),wA([],[A],(function(A){var g="constructor "+(A=A[0]).name;if(void 0===A.registeredClass.constructor_body&&(A.registeredClass.constructor_body=[]),void 0!==A.registeredClass.constructor_body[I-1])throw new FA("Cannot register multiple constructors with identical number of parameters ("+(I-1)+") for class '"+A.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return A.registeredClass.constructor_body[I-1]=()=>{QI("Cannot construct "+A.name+" due to unbound types",i)},wA([],i,(function(B){return B.splice(1,0,null),A.registeredClass.constructor_body[I-1]=EI(g,B,null,Q,C),[]})),[]}))},a:function(A,I,g,B,Q,C,E,i){var o=CI(g,B);I=hA(I),C=II(Q,C),wA([],[A],(function(A){var B=(A=A[0]).name+"."+I;function Q(){QI("Cannot call "+B+" due to unbound types",o)}I.startsWith("@@")&&(I=Symbol[I.substring(2)]),i&&A.registeredClass.pureVirtualFunctions.push(I);var D=A.registeredClass.instancePrototype,a=D[I];return void 0===a||void 0===a.overloadTable&&a.className!==A.name&&a.argCount===g-2?(Q.argCount=g-2,Q.className=A.name,D[I]=Q):(mA(D,I,B),D[I].overloadTable[g-2]=Q),wA([],o,(function(Q){var i=EI(B,Q,A,C,E);return void 0===D[I].overloadTable?(i.argCount=g-2,D[I]=i):D[I].overloadTable[g-2]=i,[]})),[]}))},I:function(A,I){cA(A,{name:I=hA(I),fromWireType:function(A){var I=wI.toValue(A);return DI(A),I},toWireType:function(A,I){return wI.toHandle(I)},argPackAdvance:8,readValueFromPointer:BA,destructorFunction:null})},u:function(A,I,g){var B=tA(g);cA(A,{name:I=hA(I),fromWireType:function(A){return A},toWireType:function(A,I){return I},argPackAdvance:8,readValueFromPointer:GI(I,B),destructorFunction:null})},o:function(A,I,g,B,Q,C){var E=CI(I,g);A=hA(A),Q=II(B,Q),xA(A,(function(){QI("Cannot call "+A+" due to unbound types",E)}),I-1),wA([],E,(function(g){var B=[g[0],null].concat(g.slice(1));return $A(A,EI(A,B,null,Q,C),I-1),[]}))},h:function(A,I,g,B,Q){I=hA(I),-1===Q&&(Q=4294967295);var C=tA(g),E=A=>A;if(0===B){var i=32-8*g;E=A=>A<>>i}var o=I.includes("unsigned");cA(A,{name:I,fromWireType:E,toWireType:o?function(A,I){return this.name,I>>>0}:function(A,I){return this.name,I},argPackAdvance:8,readValueFromPointer:hI(I,C,0!==B),destructorFunction:null})},d:function(A,I,g){var B=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][I];function Q(A){var I=k,g=I[A>>=2],Q=I[A+1];return new B(N,Q,g)}cA(A,{name:g=hA(g),fromWireType:Q,argPackAdvance:8,readValueFromPointer:Q},{ignoreDuplicateRegistrations:!0})},t:function(A,I){var g="std::string"===(I=hA(I));cA(A,{name:I,fromWireType:function(A){var I,B=k[A>>2],Q=A+4;if(g)for(var C=Q,E=0;E<=B;++E){var i=Q+E;if(E==B||0==e[i]){var o=K(C,i-C);void 0===I?I=o:(I+=String.fromCharCode(0),I+=o),C=i+1}}else{var D=new Array(B);for(E=0;E=55296&&B<=57343?(I+=4,++g):I+=3}return I}(I):I.length;var C=HI(4+B+1),E=C+4;if(k[C>>2]=B,g&&Q)d(I,E,B+1);else if(Q)for(var i=0;i255&&(LI(E),yA("String has UTF-16 code units that do not fit in 8 bits")),e[E+i]=o}else for(i=0;iS,i=1):4===I&&(B=NI,Q=RI,E=eI,C=()=>k,i=2),cA(A,{name:g,fromWireType:function(A){for(var g,Q=k[A>>2],E=C(),o=A+4,D=0;D<=Q;++D){var a=A+4+D*I;if(D==Q||0==E[a>>i]){var s=B(o,a-o);void 0===g?g=s:(g+=String.fromCharCode(0),g+=s),o=a+I}}return LI(A),g},toWireType:function(A,B){"string"!=typeof B&&yA("Cannot pass non-string to C++ string type "+g);var C=E(B),o=HI(4+C+I);return k[o>>2]=C>>i,Q(B,o+4,C+I),null!==A&&A.push(LI,o),o},argPackAdvance:8,readValueFromPointer:BA,destructorFunction:function(A){LI(A)}})},p:function(A,I,g,B,Q,C){IA[A]={name:hA(I),rawConstructor:II(g,B),rawDestructor:II(Q,C),fields:[]}},C:function(A,I,g,B,Q,C,E,i,o,D){IA[A].fields.push({fieldName:hA(I),getterReturnType:g,getter:II(B,Q),getterContext:C,setterArgumentType:E,setter:II(i,o),setterContext:D})},K:function(A,I){cA(A,{isVoid:!0,name:I=hA(I),argPackAdvance:0,fromWireType:function(){},toWireType:function(A,I){}})},O:DI,P:function(A){A>4&&(oI[A].refcount+=1)},n:function(A,I){var g,B,Q;B="_emval_take_value",void 0===(Q=CA[g=A])&&yA(B+" has unknown type "+BI(g));var C=(A=Q).readValueFromPointer(I);return wI.toHandle(C)},r:function(){T("")},H:function(A,I,g){e.copyWithin(A,I,I+g)},F:function(A){var I,g,B=e.length,Q=2147483648;if((A>>>=0)>Q)return!1;for(var C=1;C<=4;C*=2){var E=B*(1+.2/C);if(E=Math.min(E,A+100663296),nI(Math.min(Q,(I=Math.max(A,E))+((g=65536)-I%g)%g)))return!0}return!1},G:function(A){return 52},D:function(A,I,g,B,Q){return 70},s:function(A,I,g,B){for(var Q=0,C=0;C>2],i=k[I+4>>2];I+=8;for(var o=0;o>2]=Q,0},b:function(A,I){var g=dI();try{return $(A)(I)}catch(A){if(lI(g),A!==A+0)throw A;_setThrew(1,0)}},A:function(A,I,g){var B=dI();try{return $(A)(I,g)}catch(A){if(lI(B),A!==A+0)throw A;_setThrew(1,0)}},w:function(A,I,g,B){var Q=dI();try{return $(A)(I,g,B)}catch(A){if(lI(Q),A!==A+0)throw A;_setThrew(1,0)}},e:function(A,I){var g=dI();try{$(A)(I)}catch(A){if(lI(g),A!==A+0)throw A;_setThrew(1,0)}},k:function(A,I,g){var B=dI();try{$(A)(I,g)}catch(A){if(lI(B),A!==A+0)throw A;_setThrew(1,0)}},l:function(A,I,g,B){var Q=dI();try{$(A)(I,g,B)}catch(A){if(lI(Q),A!==A+0)throw A;_setThrew(1,0)}},x:function(A,I,g,B,Q){var C=dI();try{$(A)(I,g,B,Q)}catch(A){if(lI(C),A!==A+0)throw A;_setThrew(1,0)}},L:function(A,I,g,B,Q,C,E){var i=dI();try{$(A)(I,g,B,Q,C,E)}catch(A){if(lI(i),A!==A+0)throw A;_setThrew(1,0)}},m:function(A,I,g,B,Q,C,E,i){var o=dI();try{$(A)(I,g,B,Q,C,E,i)}catch(A){if(lI(o),A!==A+0)throw A;_setThrew(1,0)}},g:function(A,I,g,B,Q,C,E,i,o,D,a){var s=dI();try{$(A)(I,g,B,Q,C,E,i,o,D,a)}catch(A){if(lI(s),A!==A+0)throw A;_setThrew(1,0)}},N:function(A){return A}},HI=(function(){var I={a:JI};function g(I,g){var B,Q=I.exports;A.asm=Q,l((r=A.asm.Q).buffer),f=A.asm.U,B=A.asm.R,b.unshift(B),function(I){if(Z--,A.monitorRunDependencies&&A.monitorRunDependencies(Z),0==Z&&(null!==m&&(clearInterval(m),m=null),x)){var g=x;x=null,g()}}()}function B(A){g(A.instance)}function C(A){return function(){if(!F&&(a||s)){if("function"==typeof fetch&&!X(u))return fetch(u,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+u+"'";return A.arrayBuffer()})).catch((function(){return P(u)}));if(E)return new Promise((function(A,I){E(u,(function(I){A(new Uint8Array(I))}),I)}))}return Promise.resolve().then((function(){return P(u)}))}().then((function(A){return WebAssembly.instantiate(A,I)})).then((function(A){return A})).then(A,(function(A){c("failed to asynchronously prepare wasm: "+A),T(A)}))}if(Z++,A.monitorRunDependencies&&A.monitorRunDependencies(Z),A.instantiateWasm)try{return A.instantiateWasm(I,g)}catch(A){c("Module.instantiateWasm callback failed with error: "+A),Q(A)}(F||"function"!=typeof WebAssembly.instantiateStreaming||v(u)||X(u)||w||"function"!=typeof fetch?C(B):fetch(u,{credentials:"same-origin"}).then((function(A){return WebAssembly.instantiateStreaming(A,I).then(B,(function(A){return c("wasm streaming compile failed: "+A),c("falling back to ArrayBuffer instantiation"),C(B)}))}))).catch(Q)}(),A.___wasm_call_ctors=function(){return(A.___wasm_call_ctors=A.asm.R).apply(null,arguments)},A._malloc=function(){return(HI=A._malloc=A.asm.S).apply(null,arguments)}),MI=A.___cxa_free_exception=function(){return(MI=A.___cxa_free_exception=A.asm.T).apply(null,arguments)},LI=A._free=function(){return(LI=A._free=A.asm.V).apply(null,arguments)},YI=A.___getTypeName=function(){return(YI=A.___getTypeName=A.asm.W).apply(null,arguments)},KI=(A.__embind_initialize_bindings=function(){return(A.__embind_initialize_bindings=A.asm.X).apply(null,arguments)},A.setTempRet0=function(){return(KI=A.setTempRet0=A.asm.Y).apply(null,arguments)}),dI=A.stackSave=function(){return(dI=A.stackSave=A.asm.Z).apply(null,arguments)},lI=A.stackRestore=function(){return(lI=A.stackRestore=A.asm._).apply(null,arguments)},fI=A.stackAlloc=function(){return(fI=A.stackAlloc=A.asm.$).apply(null,arguments)},uI=A.___cxa_can_catch=function(){return(uI=A.___cxa_can_catch=A.asm.aa).apply(null,arguments)},qI=A.___cxa_is_pointer_type=function(){return(qI=A.___cxa_is_pointer_type=A.asm.ba).apply(null,arguments)};function pI(g){function B(){kI||(kI=!0,A.calledRun=!0,M||(O(b),I(A),A.onRuntimeInitialized&&A.onRuntimeInitialized(),function(){if(A.postRun)for("function"==typeof A.postRun&&(A.postRun=[A.postRun]);A.postRun.length;)I=A.postRun.shift(),W.unshift(I);var I;O(W)}()))}g=g||D,Z>0||(function(){if(A.preRun)for("function"==typeof A.preRun&&(A.preRun=[A.preRun]);A.preRun.length;)I=A.preRun.shift(),p.unshift(I);var I;O(p)}(),Z>0||(A.setStatus?(A.setStatus("Running..."),setTimeout((function(){setTimeout((function(){A.setStatus("")}),1),B()}),1)):B()))}if(A.dynCall_ji=function(){return(A.dynCall_ji=A.asm.ca).apply(null,arguments)},A.dynCall_iiji=function(){return(A.dynCall_iiji=A.asm.da).apply(null,arguments)},A.dynCall_jiji=function(){return(A.dynCall_jiji=A.asm.ea).apply(null,arguments)},A.ccall=function(I,g,B,Q,C){var E={string:A=>{var I=0;if(null!=A&&0!==A){var g=1+(A.length<<2);d(A,I=fI(g),g)}return I},array:A=>{var I=fI(A.length);return function(A,I){R.set(A,I)}(A,I),I}},i=function(I){return A["_"+I]}(I),o=[],D=0;if(Q)for(var a=0;a0;)A.preInit.pop()();return pI(),A.ready});A.exports=Q},3641:(A,I,g)=>{g(3075);var B=g(2018);A.exports=B("Array").concat},646:(A,I,g)=>{g(8345);var B=g(2018);A.exports=B("Array").filter},1001:(A,I,g)=>{g(5313);var B=g(2018);A.exports=B("Array").slice},7543:(A,I,g)=>{var B=g(3641),Q=Array.prototype;A.exports=function(A){var I=A.concat;return A===Q||A instanceof Array&&I===Q.concat?B:I}},1065:(A,I,g)=>{var B=g(9291),Q=String.prototype;A.exports=function(A){var I=A.endsWith;return"string"==typeof A||A===Q||A instanceof String&&I===Q.endsWith?B:I}},4388:(A,I,g)=>{var B=g(646),Q=Array.prototype;A.exports=function(A){var I=A.filter;return A===Q||A instanceof Array&&I===Q.filter?B:I}},1285:(A,I,g)=>{var B=g(1001),Q=Array.prototype;A.exports=function(A){var I=A.slice;return A===Q||A instanceof Array&&I===Q.slice?B:I}},2529:(A,I,g)=>{g(8524);var B=g(9081);A.exports=B.Object.assign},6854:(A,I,g)=>{g(6764);var B=g(9081).Object,Q=A.exports=function(A,I,g){return B.defineProperty(A,I,g)};B.defineProperty.sham&&(Q.sham=!0)},2744:(A,I,g)=>{g(554);var B=g(9081).Object,Q=A.exports=function(A,I){return B.getOwnPropertyDescriptor(A,I)};B.getOwnPropertyDescriptor.sham&&(Q.sham=!0)},6018:(A,I,g)=>{g(4267);var B=g(9081);A.exports=B.Object.getOwnPropertyDescriptors},5350:(A,I,g)=>{g(8318);var B=g(9081);A.exports=B.Object.getOwnPropertySymbols},8116:(A,I,g)=>{g(8390);var B=g(9081);A.exports=B.Object.keys},7281:(A,I,g)=>{g(6454),g(2228),g(2575),g(3658),g(4465),g(8359),g(5203),g(8109);var B=g(9081);A.exports=B.Promise},9291:(A,I,g)=>{g(2329);var B=g(2018);A.exports=B("String").endsWith},5723:(A,I,g)=>{var B=g(8531);A.exports=B},5213:(A,I,g)=>{var B=g(4731);g(1152),g(8561),g(5543),g(8302),A.exports=B},9077:A=>{A.exports=function(A){if("function"!=typeof A)throw TypeError(String(A)+" is not a function");return A}},9154:(A,I,g)=>{var B=g(3359);A.exports=function(A){if(!B(A)&&null!==A)throw TypeError("Can't set "+String(A)+" as a prototype");return A}},7710:A=>{A.exports=function(){}},8792:A=>{A.exports=function(A,I,g){if(!(A instanceof I))throw TypeError("Incorrect "+(g?g+" ":"")+"invocation");return A}},1912:(A,I,g)=>{var B=g(3359);A.exports=function(A){if(!B(A))throw TypeError(String(A)+" is not an object");return A}},7075:(A,I,g)=>{var B=g(3861),Q=g(3746),C=g(3055),E=function(A){return function(I,g,E){var i,o=B(I),D=Q(o.length),a=C(E,D);if(A&&g!=g){for(;D>a;)if((i=o[a++])!=i)return!0}else for(;D>a;a++)if((A||a in o)&&o[a]===g)return A||a||0;return!A&&-1}};A.exports={includes:E(!0),indexOf:E(!1)}},4206:(A,I,g)=>{var B=g(7673),Q=g(1251),C=g(2058),E=g(3746),i=g(8136),o=[].push,D=function(A){var I=1==A,g=2==A,D=3==A,a=4==A,s=6==A,w=7==A,t=5==A||s;return function(G,h,F,y){for(var c,r,N=C(G),R=Q(N),e=B(h,F,3),n=E(R.length),S=0,U=y||i,k=I?U(G,n):g||w?U(G,0):void 0;n>S;S++)if((t||S in R)&&(r=e(c=R[S],S,N),A))if(I)k[S]=r;else if(r)switch(A){case 3:return!0;case 5:return c;case 6:return S;case 2:o.call(k,c)}else switch(A){case 4:return!1;case 7:o.call(k,c)}return s?-1:D||a?a:k}};A.exports={forEach:D(0),map:D(1),filter:D(2),some:D(3),every:D(4),find:D(5),findIndex:D(6),filterReject:D(7)}},2143:(A,I,g)=>{var B=g(6530),Q=g(5712),C=g(8233),E=Q("species");A.exports=function(A){return C>=51||!B((function(){var I=[];return(I.constructor={})[E]=function(){return{foo:1}},1!==I[A](Boolean).foo}))}},3400:(A,I,g)=>{var B=g(3359),Q=g(1054),C=g(5712)("species");A.exports=function(A){var I;return Q(A)&&("function"!=typeof(I=A.constructor)||I!==Array&&!Q(I.prototype)?B(I)&&null===(I=I[C])&&(I=void 0):I=void 0),void 0===I?Array:I}},8136:(A,I,g)=>{var B=g(3400);A.exports=function(A,I){return new(B(A))(0===I?0:I)}},8908:(A,I,g)=>{var B=g(5712)("iterator"),Q=!1;try{var C=0,E={next:function(){return{done:!!C++}},return:function(){Q=!0}};E[B]=function(){return this},Array.from(E,(function(){throw 2}))}catch(A){}A.exports=function(A,I){if(!I&&!Q)return!1;var g=!1;try{var C={};C[B]=function(){return{next:function(){return{done:g=!0}}}},A(C)}catch(A){}return g}},1570:A=>{var I={}.toString;A.exports=function(A){return I.call(A).slice(8,-1)}},7499:(A,I,g)=>{var B=g(8889),Q=g(1570),C=g(5712)("toStringTag"),E="Arguments"==Q(function(){return arguments}());A.exports=B?Q:function(A){var I,g,B;return void 0===A?"Undefined":null===A?"Null":"string"==typeof(g=function(A,I){try{return A[I]}catch(A){}}(I=Object(A),C))?g:E?Q(I):"Object"==(B=Q(I))&&"function"==typeof I.callee?"Arguments":B}},1722:(A,I,g)=>{var B=g(5712)("match");A.exports=function(A){var I=/./;try{"/./"[A](I)}catch(g){try{return I[B]=!1,"/./"[A](I)}catch(A){}}return!1}},872:(A,I,g)=>{var B=g(6530);A.exports=!B((function(){function A(){}return A.prototype.constructor=null,Object.getPrototypeOf(new A)!==A.prototype}))},8611:(A,I,g)=>{"use strict";var B=g(7300).IteratorPrototype,Q=g(2491),C=g(5595),E=g(6738),i=g(9418),o=function(){return this};A.exports=function(A,I,g){var D=I+" Iterator";return A.prototype=Q(B,{next:C(1,g)}),E(A,D,!1,!0),i[D]=o,A}},8518:(A,I,g)=>{var B=g(7001),Q=g(7550),C=g(5595);A.exports=B?function(A,I,g){return Q.f(A,I,C(1,g))}:function(A,I,g){return A[I]=g,A}},5595:A=>{A.exports=function(A,I){return{enumerable:!(1&A),configurable:!(2&A),writable:!(4&A),value:I}}},409:(A,I,g)=>{"use strict";var B=g(5623),Q=g(7550),C=g(5595);A.exports=function(A,I,g){var E=B(I);E in A?Q.f(A,E,C(0,g)):A[E]=g}},8277:(A,I,g)=>{"use strict";var B=g(390),Q=g(8611),C=g(2629),E=g(5255),i=g(6738),o=g(8518),D=g(9791),a=g(5712),s=g(8367),w=g(9418),t=g(7300),G=t.IteratorPrototype,h=t.BUGGY_SAFARI_ITERATORS,F=a("iterator"),y="keys",c="values",r="entries",N=function(){return this};A.exports=function(A,I,g,a,t,R,e){Q(g,I,a);var n,S,U,k=function(A){if(A===t&&Y)return Y;if(!h&&A in M)return M[A];switch(A){case y:case c:case r:return function(){return new g(this,A)}}return function(){return new g(this)}},J=I+" Iterator",H=!1,M=A.prototype,L=M[F]||M["@@iterator"]||t&&M[t],Y=!h&&L||k(t),K="Array"==I&&M.entries||L;if(K&&(n=C(K.call(new A)),G!==Object.prototype&&n.next&&(s||C(n)===G||(E?E(n,G):"function"!=typeof n[F]&&o(n,F,N)),i(n,J,!0,!0),s&&(w[J]=N))),t==c&&L&&L.name!==c&&(H=!0,Y=function(){return L.call(this)}),s&&!e||M[F]===Y||o(M,F,Y),w[I]=Y,t)if(S={values:k(c),keys:R?Y:k(y),entries:k(r)},e)for(U in S)(h||H||!(U in M))&&D(M,U,S[U]);else B({target:I,proto:!0,forced:h||H},S);return S}},1412:(A,I,g)=>{var B=g(9081),Q=g(6690),C=g(3379),E=g(7550).f;A.exports=function(A){var I=B.Symbol||(B.Symbol={});Q(I,A)||E(I,A,{value:C.f(A)})}},7001:(A,I,g)=>{var B=g(6530);A.exports=!B((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},231:(A,I,g)=>{var B=g(2868),Q=g(3359),C=B.document,E=Q(C)&&Q(C.createElement);A.exports=function(A){return E?C.createElement(A):{}}},315:A=>{A.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},6610:A=>{A.exports="object"==typeof window},6405:(A,I,g)=>{var B=g(6900),Q=g(2868);A.exports=/ipad|iphone|ipod/i.test(B)&&void 0!==Q.Pebble},6540:(A,I,g)=>{var B=g(6900);A.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(B)},6521:(A,I,g)=>{var B=g(1570),Q=g(2868);A.exports="process"==B(Q.process)},4010:(A,I,g)=>{var B=g(6900);A.exports=/web0s(?!.*chrome)/i.test(B)},6900:(A,I,g)=>{var B=g(8104);A.exports=B("navigator","userAgent")||""},8233:(A,I,g)=>{var B,Q,C=g(2868),E=g(6900),i=C.process,o=C.Deno,D=i&&i.versions||o&&o.version,a=D&&D.v8;a?Q=(B=a.split("."))[0]<4?1:B[0]+B[1]:E&&(!(B=E.match(/Edge\\/(\\d+)/))||B[1]>=74)&&(B=E.match(/Chrome\\/(\\d+)/))&&(Q=B[1]),A.exports=Q&&+Q},2018:(A,I,g)=>{var B=g(9081);A.exports=function(A){return B[A+"Prototype"]}},2712:A=>{A.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},390:(A,I,g)=>{"use strict";var B=g(2868),Q=g(5904).f,C=g(1011),E=g(9081),i=g(7673),o=g(8518),D=g(6690),a=function(A){var I=function(I,g,B){if(this instanceof A){switch(arguments.length){case 0:return new A;case 1:return new A(I);case 2:return new A(I,g)}return new A(I,g,B)}return A.apply(this,arguments)};return I.prototype=A.prototype,I};A.exports=function(A,I){var g,s,w,t,G,h,F,y,c=A.target,r=A.global,N=A.stat,R=A.proto,e=r?B:N?B[c]:(B[c]||{}).prototype,n=r?E:E[c]||o(E,c,{})[c],S=n.prototype;for(w in I)g=!C(r?w:c+(N?".":"#")+w,A.forced)&&e&&D(e,w),G=n[w],g&&(h=A.noTargetGet?(y=Q(e,w))&&y.value:e[w]),t=g&&h?h:I[w],g&&typeof G==typeof t||(F=A.bind&&g?i(t,B):A.wrap&&g?a(t):R&&"function"==typeof t?i(Function.call,t):t,(A.sham||t&&t.sham||G&&G.sham)&&o(F,"sham",!0),o(n,w,F),R&&(D(E,s=c+"Prototype")||o(E,s,{}),o(E[s],w,t),A.real&&S&&!S[w]&&o(S,w,t)))}},6530:A=>{A.exports=function(A){try{return!!A()}catch(A){return!0}}},7673:(A,I,g)=>{var B=g(9077);A.exports=function(A,I,g){if(B(A),void 0===I)return A;switch(g){case 0:return function(){return A.call(I)};case 1:return function(g){return A.call(I,g)};case 2:return function(g,B){return A.call(I,g,B)};case 3:return function(g,B,Q){return A.call(I,g,B,Q)}}return function(){return A.apply(I,arguments)}}},8104:(A,I,g)=>{var B=g(9081),Q=g(2868),C=function(A){return"function"==typeof A?A:void 0};A.exports=function(A,I){return arguments.length<2?C(B[A])||C(Q[A]):B[A]&&B[A][I]||Q[A]&&Q[A][I]}},5018:(A,I,g)=>{var B=g(7499),Q=g(9418),C=g(5712)("iterator");A.exports=function(A){if(null!=A)return A[C]||A["@@iterator"]||Q[B(A)]}},5945:(A,I,g)=>{var B=g(1912),Q=g(5018);A.exports=function(A,I){var g=arguments.length<2?Q(A):I;if("function"!=typeof g)throw TypeError(String(A)+" is not iterable");return B(g.call(A))}},2868:(A,I,g)=>{var B=function(A){return A&&A.Math==Math&&A};A.exports=B("object"==typeof globalThis&&globalThis)||B("object"==typeof window&&window)||B("object"==typeof self&&self)||B("object"==typeof g.g&&g.g)||function(){return this}()||Function("return this")()},6690:(A,I,g)=>{var B=g(2058),Q={}.hasOwnProperty;A.exports=Object.hasOwn||function(A,I){return Q.call(B(A),I)}},7048:A=>{A.exports={}},8471:(A,I,g)=>{var B=g(2868);A.exports=function(A,I){var g=B.console;g&&g.error&&(1===arguments.length?g.error(A):g.error(A,I))}},5644:(A,I,g)=>{var B=g(8104);A.exports=B("document","documentElement")},640:(A,I,g)=>{var B=g(7001),Q=g(6530),C=g(231);A.exports=!B&&!Q((function(){return 7!=Object.defineProperty(C("div"),"a",{get:function(){return 7}}).a}))},1251:(A,I,g)=>{var B=g(6530),Q=g(1570),C="".split;A.exports=B((function(){return!Object("z").propertyIsEnumerable(0)}))?function(A){return"String"==Q(A)?C.call(A,""):Object(A)}:Object},1494:(A,I,g)=>{var B=g(2656),Q=Function.toString;"function"!=typeof B.inspectSource&&(B.inspectSource=function(A){return Q.call(A)}),A.exports=B.inspectSource},5875:(A,I,g)=>{var B,Q,C,E=g(2297),i=g(2868),o=g(3359),D=g(8518),a=g(6690),s=g(2656),w=g(5039),t=g(7048),G="Object already initialized",h=i.WeakMap;if(E||s.state){var F=s.state||(s.state=new h),y=F.get,c=F.has,r=F.set;B=function(A,I){if(c.call(F,A))throw new TypeError(G);return I.facade=A,r.call(F,A,I),I},Q=function(A){return y.call(F,A)||{}},C=function(A){return c.call(F,A)}}else{var N=w("state");t[N]=!0,B=function(A,I){if(a(A,N))throw new TypeError(G);return I.facade=A,D(A,N,I),I},Q=function(A){return a(A,N)?A[N]:{}},C=function(A){return a(A,N)}}A.exports={set:B,get:Q,has:C,enforce:function(A){return C(A)?Q(A):B(A,{})},getterFor:function(A){return function(I){var g;if(!o(I)||(g=Q(I)).type!==A)throw TypeError("Incompatible receiver, "+A+" required");return g}}}},6475:(A,I,g)=>{var B=g(5712),Q=g(9418),C=B("iterator"),E=Array.prototype;A.exports=function(A){return void 0!==A&&(Q.Array===A||E[C]===A)}},1054:(A,I,g)=>{var B=g(1570);A.exports=Array.isArray||function(A){return"Array"==B(A)}},1011:(A,I,g)=>{var B=g(6530),Q=/#|\\.prototype\\./,C=function(A,I){var g=i[E(A)];return g==D||g!=o&&("function"==typeof I?B(I):!!I)},E=C.normalize=function(A){return String(A).replace(Q,".").toLowerCase()},i=C.data={},o=C.NATIVE="N",D=C.POLYFILL="P";A.exports=C},3359:A=>{A.exports=function(A){return"object"==typeof A?null!==A:"function"==typeof A}},8367:A=>{A.exports=!0},6858:(A,I,g)=>{var B=g(3359),Q=g(1570),C=g(5712)("match");A.exports=function(A){var I;return B(A)&&(void 0!==(I=A[C])?!!I:"RegExp"==Q(A))}},1149:(A,I,g)=>{var B=g(8104),Q=g(6046);A.exports=Q?function(A){return"symbol"==typeof A}:function(A){var I=B("Symbol");return"function"==typeof I&&Object(A)instanceof I}},3906:(A,I,g)=>{var B=g(1912),Q=g(6475),C=g(3746),E=g(7673),i=g(5945),o=g(5018),D=g(309),a=function(A,I){this.stopped=A,this.result=I};A.exports=function(A,I,g){var s,w,t,G,h,F,y,c=g&&g.that,r=!(!g||!g.AS_ENTRIES),N=!(!g||!g.IS_ITERATOR),R=!(!g||!g.INTERRUPTED),e=E(I,c,1+r+R),n=function(A){return s&&D(s,"normal",A),new a(!0,A)},S=function(A){return r?(B(A),R?e(A[0],A[1],n):e(A[0],A[1])):R?e(A,n):e(A)};if(N)s=A;else{if("function"!=typeof(w=o(A)))throw TypeError("Target is not iterable");if(Q(w)){for(t=0,G=C(A.length);G>t;t++)if((h=S(A[t]))&&h instanceof a)return h;return new a(!1)}s=i(A,w)}for(F=s.next;!(y=F.call(s)).done;){try{h=S(y.value)}catch(A){D(s,"throw",A)}if("object"==typeof h&&h&&h instanceof a)return h}return new a(!1)}},309:(A,I,g)=>{var B=g(1912);A.exports=function(A,I,g){var Q,C;B(A);try{if(void 0===(Q=A.return)){if("throw"===I)throw g;return g}Q=Q.call(A)}catch(A){C=!0,Q=A}if("throw"===I)throw g;if(C)throw Q;return B(Q),g}},7300:(A,I,g)=>{"use strict";var B,Q,C,E=g(6530),i=g(2629),o=g(8518),D=g(6690),a=g(5712),s=g(8367),w=a("iterator"),t=!1;[].keys&&("next"in(C=[].keys())?(Q=i(i(C)))!==Object.prototype&&(B=Q):t=!0);var G=null==B||E((function(){var A={};return B[w].call(A)!==A}));G&&(B={}),s&&!G||D(B,w)||o(B,w,(function(){return this})),A.exports={IteratorPrototype:B,BUGGY_SAFARI_ITERATORS:t}},9418:A=>{A.exports={}},8054:(A,I,g)=>{var B,Q,C,E,i,o,D,a,s=g(2868),w=g(5904).f,t=g(6569).set,G=g(6540),h=g(6405),F=g(4010),y=g(6521),c=s.MutationObserver||s.WebKitMutationObserver,r=s.document,N=s.process,R=s.Promise,e=w(s,"queueMicrotask"),n=e&&e.value;n||(B=function(){var A,I;for(y&&(A=N.domain)&&A.exit();Q;){I=Q.fn,Q=Q.next;try{I()}catch(A){throw Q?E():C=void 0,A}}C=void 0,A&&A.enter()},G||y||F||!c||!r?!h&&R&&R.resolve?((D=R.resolve(void 0)).constructor=R,a=D.then,E=function(){a.call(D,B)}):E=y?function(){N.nextTick(B)}:function(){t.call(s,B)}:(i=!0,o=r.createTextNode(""),new c(B).observe(o,{characterData:!0}),E=function(){o.data=i=!i})),A.exports=n||function(A){var I={fn:A,next:void 0};C&&(C.next=I),Q||(Q=I,E()),C=I}},3104:(A,I,g)=>{var B=g(2868);A.exports=B.Promise},3216:(A,I,g)=>{var B=g(8233),Q=g(6530);A.exports=!!Object.getOwnPropertySymbols&&!Q((function(){var A=Symbol();return!String(A)||!(Object(A)instanceof Symbol)||!Symbol.sham&&B&&B<41}))},2297:(A,I,g)=>{var B=g(2868),Q=g(1494),C=B.WeakMap;A.exports="function"==typeof C&&/native code/.test(Q(C))},4130:(A,I,g)=>{"use strict";var B=g(9077),Q=function(A){var I,g;this.promise=new A((function(A,B){if(void 0!==I||void 0!==g)throw TypeError("Bad Promise constructor");I=A,g=B})),this.resolve=B(I),this.reject=B(g)};A.exports.f=function(A){return new Q(A)}},9611:(A,I,g)=>{var B=g(6858);A.exports=function(A){if(B(A))throw TypeError("The method doesn't accept regular expressions");return A}},3210:(A,I,g)=>{"use strict";var B=g(7001),Q=g(6530),C=g(461),E=g(3764),i=g(1156),o=g(2058),D=g(1251),a=Object.assign,s=Object.defineProperty;A.exports=!a||Q((function(){if(B&&1!==a({b:1},a(s({},"a",{enumerable:!0,get:function(){s(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var A={},I={},g=Symbol(),Q="abcdefghijklmnopqrst";return A[g]=7,Q.split("").forEach((function(A){I[A]=A})),7!=a({},A)[g]||C(a({},I)).join("")!=Q}))?function(A,I){for(var g=o(A),Q=arguments.length,a=1,s=E.f,w=i.f;Q>a;)for(var t,G=D(arguments[a++]),h=s?C(G).concat(s(G)):C(G),F=h.length,y=0;F>y;)t=h[y++],B&&!w.call(G,t)||(g[t]=G[t]);return g}:a},2491:(A,I,g)=>{var B,Q=g(1912),C=g(4686),E=g(2712),i=g(7048),o=g(5644),D=g(231),a=g(5039),s=a("IE_PROTO"),w=function(){},t=function(A){return"