diff --git a/2016/04/29/kw-doc/index.html b/2016/04/29/kw-doc/index.html index 5a5bacde..dd437636 100644 --- a/2016/04/29/kw-doc/index.html +++ b/2016/04/29/kw-doc/index.html @@ -45,7 +45,7 @@ - + diff --git a/app/ParaViewGlance.html b/app/ParaViewGlance.html new file mode 100644 index 00000000..0a9df1cb --- /dev/null +++ b/app/ParaViewGlance.html @@ -0,0 +1,26490 @@ + + + + + + + + Kitware Glance + + + + + + + + + + + + + + + + + + + + + + + +
+ + + diff --git a/app/glance-external-ITKReader.6e07a93211be7978c9d3.js b/app/glance-external-ITKReader.702e8255409968addaa5.js similarity index 95% rename from app/glance-external-ITKReader.6e07a93211be7978c9d3.js rename to app/glance-external-ITKReader.702e8255409968addaa5.js index 416e5a91..cf3d039a 100644 --- a/app/glance-external-ITKReader.6e07a93211be7978c9d3.js +++ b/app/glance-external-ITKReader.702e8255409968addaa5.js @@ -1 +1 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var a in n)("object"==typeof exports?exports:e)[a]=n[a]}}(self,(function(){return(self.webpackChunkglance=self.webpackChunkglance||[]).push([[3],{568:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return P},extensions:function(){return w},imageExtensions:function(){return h},polyDataExtensions:function(){return x},registerToGlance:function(){return D}});var a=n(569),r=n(558),i=n(482),o=n.n(i),s=n(698),c=n(325),l=n.n(c),m=n(559),f=(n(326),n(9)),g=n(78),p=n(560);const{convertItkToVtkImage:d}=g.Z;function u(e){const t=e.lastIndexOf(".");return`Scalars ${t>-1?e.substring(0,t):e}`}function y(e,t){t.classHierarchy.push("vtkITKDicomImageReader"),e.readFileSeries=n=>n&&n.length&&n!==t.files?(t.files=n,(0,p.Z)(n).then((e=>{let{image:t}=e;return t})).then((n=>{const a=d(n,{scalarArrayName:t.arrayName||u(t.fileName)});t.output[0]=a,e.modified()}))):Promise.resolve(),e.requestData=()=>{e.readFileSeries(t.files,t.fileName)}}const T={fileName:"",arrayName:null};function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,T,n),f.ZP.obj(e,t),f.ZP.algo(e,t,0,1),f.ZP.setGet(e,t,["fileName","arrayName"]),y(e,t)}var k={newInstance:f.ZP.newInstance(I,"vtkITKDicomImageReader"),extend:I};a.ZP.setReadImageArrayBufferFromITK(s.Z),r.ZP.setReadPolyDataArrayBufferFromITK(m.Z);const v=new Set(Array.from(o().keys()).map((e=>e.toLowerCase())));v.delete("json");const h=Array.from(v),x=Array.from(new Set(Array.from(l().keys()).map((e=>e.toLowerCase())))),w=h.concat(x);function D(e){e&&(h.filter((e=>"dcm"!==e)).forEach((t=>e.registerReader({extension:t,name:`${t.toUpperCase()} Reader`,vtkReader:a.ZP,binary:!0,fileNameMethod:"setFileName"}))),x.forEach((t=>e.registerReader({extension:t,name:`${t.toUpperCase()} Reader`,vtkReader:r.ZP,binary:!0,fileNameMethod:"setFileName"}))),e.registerReader({extension:"dcm",name:"DICOM File Series Reader",vtkReader:k,fileNameMethod:"setFileName",fileSeriesMethod:"readFileSeries",binary:!0}))}var P={extensions:w,registerToGlance:D};D(("undefined"==typeof window?{}:window).Glance)},78:function(e,t,n){"use strict";var a=n(72),r=n(15),i=n(4);const{vtkErrorMacro:o}=a.ZP,s=1,c=2,l=3,m=4,f=5,g=6,p=7,d=8,u=9,y=10,T=11,I=12,k=13,v=14,h=15;const x=new Map([["Uint8Array","uint8_t"],["Int8Array","int8_t"],["Uint16Array","uint16_t"],["Int16Array","int16_t"],["Uint32Array","uint32_t"],["Int32Array","int32_t"],["Float32Array","float"],["Float64Array","double"]]);t.Z={convertItkToVtkImage:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={origin:[0,0,0],spacing:[1,1,1]},a=[1,1,1],x=[1,0,0,0,1,0,0,0,1];for(let t=0;t1&&void 0!==arguments[1]&&arguments[1];const n={imageType:{dimension:3,pixelType:s,componentType:"",components:1},name:"name",origin:e.getOrigin(),spacing:e.getSpacing(),direction:{data:[1,0,0,0,1,0,0,0,1]},size:e.getDimensions()},a=e.getDirection(),r=n.size.length;n.imageType.dimension=r,n.direction.rows=r,n.direction.columns=r;for(let e=0;e-1?e.substring(0,t):e}`}function y(e,t){t.classHierarchy.push("vtkITKDicomImageReader"),e.readFileSeries=n=>n&&n.length&&n!==t.files?(t.files=n,(0,p.Z)(n).then((e=>{let{image:t}=e;return t})).then((n=>{const a=d(n,{scalarArrayName:t.arrayName||u(t.fileName)});t.output[0]=a,e.modified()}))):Promise.resolve(),e.requestData=()=>{e.readFileSeries(t.files,t.fileName)}}const T={fileName:"",arrayName:null};function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,T,n),f.ZP.obj(e,t),f.ZP.algo(e,t,0,1),f.ZP.setGet(e,t,["fileName","arrayName"]),y(e,t)}var k={newInstance:f.ZP.newInstance(I,"vtkITKDicomImageReader"),extend:I};a.ZP.setReadImageArrayBufferFromITK(s.Z),r.ZP.setReadPolyDataArrayBufferFromITK(m.Z);const v=new Set(Array.from(o().keys()).map((e=>e.toLowerCase())));v.delete("json");const h=Array.from(v),x=Array.from(new Set(Array.from(l().keys()).map((e=>e.toLowerCase())))),w=h.concat(x);function D(e){e&&(h.filter((e=>"dcm"!==e)).forEach((t=>e.registerReader({extension:t,name:`${t.toUpperCase()} Reader`,vtkReader:a.ZP,binary:!0,fileNameMethod:"setFileName"}))),x.forEach((t=>e.registerReader({extension:t,name:`${t.toUpperCase()} Reader`,vtkReader:r.ZP,binary:!0,fileNameMethod:"setFileName"}))),e.registerReader({extension:"dcm",name:"DICOM File Series Reader",vtkReader:k,fileNameMethod:"setFileName",fileSeriesMethod:"readFileSeries",binary:!0}))}var P={extensions:w,registerToGlance:D};D(("undefined"==typeof window?{}:window).Glance)},84:function(e,t,n){"use strict";var a=n(78),r=n(15),i=n(4);const{vtkErrorMacro:o}=a.ZP,s=1,c=2,l=3,m=4,f=5,g=6,p=7,d=8,u=9,y=10,T=11,I=12,k=13,v=14,h=15;const x=new Map([["Uint8Array","uint8_t"],["Int8Array","int8_t"],["Uint16Array","uint16_t"],["Int16Array","int16_t"],["Uint32Array","uint32_t"],["Int32Array","int32_t"],["Float32Array","float"],["Float64Array","double"]]);t.Z={convertItkToVtkImage:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={origin:[0,0,0],spacing:[1,1,1]},a=[1,1,1],x=[1,0,0,0,1,0,0,0,1];for(let t=0;t1&&void 0!==arguments[1]&&arguments[1];const n={imageType:{dimension:3,pixelType:s,componentType:"",components:1},name:"name",origin:e.getOrigin(),spacing:e.getSpacing(),direction:{data:[1,0,0,0,1,0,0,0,1]},size:e.getDimensions()},a=e.getDirection(),r=n.size.length;n.imageType.dimension=r,n.direction.rows=r,n.direction.columns=r;for(let e=0;e-1?e.substring(0,t):e}`}function y(e,t){t.classHierarchy.push("vtkITKDicomImageReader"),e.readFileSeries=n=>n&&n.length&&n!==t.files?(t.files=n,(0,p.Z)(n).then((e=>{let{image:t}=e;return t})).then((n=>{const a=d(n,{scalarArrayName:t.arrayName||u(t.fileName)});t.output[0]=a,e.modified()}))):Promise.resolve(),e.requestData=()=>{e.readFileSeries(t.files,t.fileName)}}const T={fileName:"",arrayName:null};function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,T,n),f.ZP.obj(e,t),f.ZP.algo(e,t,0,1),f.ZP.setGet(e,t,["fileName","arrayName"]),y(e,t)}var k={newInstance:f.ZP.newInstance(I,"vtkITKDicomImageReader"),extend:I};a.ZP.setReadImageArrayBufferFromITK(s.Z),r.ZP.setReadPolyDataArrayBufferFromITK(m.Z);const v=new Set(Array.from(o().keys()).map((e=>e.toLowerCase())));v.delete("json");const h=Array.from(v),x=Array.from(new Set(Array.from(l().keys()).map((e=>e.toLowerCase())))),w=h.concat(x);function D(e){e&&(h.filter((e=>"dcm"!==e)).forEach((t=>e.registerReader({extension:t,name:`${t.toUpperCase()} Reader`,vtkReader:a.ZP,binary:!0,fileNameMethod:"setFileName"}))),x.forEach((t=>e.registerReader({extension:t,name:`${t.toUpperCase()} Reader`,vtkReader:r.ZP,binary:!0,fileNameMethod:"setFileName"}))),e.registerReader({extension:"dcm",name:"DICOM File Series Reader",vtkReader:k,fileNameMethod:"setFileName",fileSeriesMethod:"readFileSeries",binary:!0}))}var P={extensions:w,registerToGlance:D};D(("undefined"==typeof window?{}:window).Glance)},84:function(e,t,n){"use strict";var a=n(78),r=n(15),i=n(4);const{vtkErrorMacro:o}=a.ZP,s=1,c=2,l=3,m=4,f=5,g=6,p=7,d=8,u=9,y=10,T=11,I=12,k=13,v=14,h=15;const x=new Map([["Uint8Array","uint8_t"],["Int8Array","int8_t"],["Uint16Array","uint16_t"],["Int16Array","int16_t"],["Uint32Array","uint32_t"],["Int32Array","int32_t"],["Float32Array","float"],["Float64Array","double"]]);t.Z={convertItkToVtkImage:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={origin:[0,0,0],spacing:[1,1,1]},a=[1,1,1],x=[1,0,0,0,1,0,0,0,1];for(let t=0;t1&&void 0!==arguments[1]&&arguments[1];const n={imageType:{dimension:3,pixelType:s,componentType:"",components:1},name:"name",origin:e.getOrigin(),spacing:e.getSpacing(),direction:{data:[1,0,0,0,1,0,0,0,1]},size:e.getDimensions()},a=e.getDirection(),r=n.size.length;n.imageType.dimension=r,n.direction.rows=r,n.direction.columns=r;for(let e=0;e{return a&&a!==t.rawDataBuffer?(t.rawDataBuffer=a,(i=a,new Promise(((e,t)=>{const a=new(C());a.loadAsync(i).then((()=>{a.forEach(((a,i)=>{a.match(/state\.json$/i)&&i.async("string").then((t=>{e(JSON.parse(t))})).catch(t)}))})).catch(t)}))).then((a=>(t.appState=a,e.modified(),t.appState)))):Promise.resolve(t.appState);var i},e.requestData=()=>{e.parseAsArrayBuffer(t.rawDataBuffer)}}function T(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a),V.ZP.obj(e,t),V.ZP.algo(e,t,0,1),V.ZP.get(e,t,["appState"]),I(e,t)}var $={newInstance:V.ZP.newInstance(T,"vtkGlanceStateReader"),extend:T},D=(a(501),a(19)),M=a(502),L=a(11),Z=a(377),O=a(116);function R(e,t){const a=t=>function(e,t,a){return e[t]?(e[t][0]=Math.min(e[t][0],a[0]),e[t][1]=Math.max(e[t][1],a[1])):e[t]=a.slice(),e}(e,t.getName(),t.getRange(-1));t.getPointData().getArrays().forEach(a),t.getCellData().getArrays().forEach(a)}function B(e,t){t.classHierarchy.push("vtkGlanceVtkJsReader"),e.parseAsArrayBuffer=a=>{return a&&a!==t.rawDataBuffer?(t.rawDataBuffer=a,(i=a,new Promise((e=>{let t=0;const a=D.ZP.get("zip",{zipContent:i,callback(){const i=M.ZP.newInstance({dataAccessHelper:a,startLODLoaders:!1});i.setUrl("index.json"),i.onReady((()=>{if(++t===i.getScene().length){const t={...i.getMetadata()};t.scene=i.getScene(),t.animationHandler=i.getAnimationHandler(),e(t)}}))}})}))).then((a=>{let{scene:i,camera:s,background:n,lookupTables:o,cameraViewPoints:r,animationHandler:l}=a;return t.scene=i,t.camera=s,t.background=n,t.lookupTables=o,t.cameraViewPoints=r,t.animationHandler=l,e.modified(),t.scene}))):Promise.resolve(t.appState);var i},e.requestData=()=>{e.parseAsArrayBuffer(t.rawDataBuffer)},e.setProxyManager=e=>{const a=e.getViews(),i={};t.scene.forEach((s=>{const{source:n,mapper:o,actor:r,volume:l,name:c,volumeComponents:d}=s,u=r?r.get("origin","scale","position"):{},p=l?l.get("origin","scale","position"):{},v=r?r.getProperty().get("representation","edgeVisibility","diffuseColor","pointSize","opacity"):{},m=l?l.getProperty().get("interpolationType","independantComponents","shade"):{},g=o.get("colorByArrayName","colorMode","scalarMode"),h=e.createProxy("Sources","TrivialProducer",{name:c});h.setInputAlgorithm(n,n.getOutputData().getClassName()),h.activate(),R(i,n.getOutputData());for(let i=0;i{e.addTexture(t)})))}if(l){const e=n.getVolumes()[0];e&&(e.set(p),e.getProperty().set(m))}let o="pointData";if(g.scalarMode===L.ZP.ScalarMode.USE_CELL_FIELD_DATA&&(o="cellData"),n.setColorBy(g.colorByArrayName,o),"default"===s.getName()&&(s.getCamera().set(t.camera),t.animationHandler&&t.animationHandler.addRenderer(s.getRenderer())),d){const[e]=n.getColorBy(),[{rgbTransferFunction:t,scalarOpacity:a}]=d,i=n.getLookupTableProxy(e),s=n.getPiecewiseFunctionProxy(e);if(t){i.setPresetName("-");const[e,a]=t.getMappingRange();i.setDataRange(e,a),i.setMode(Z.Z.Mode.Nodes),i.getLookupTable().setColorSpace(t.getColorSpace()),i.setNodes(t.get("nodes").nodes)}if(a){s.getPiecewiseFunction().setClamping(a.getClamping());const e=[],t=a.getRange();s.setDataRange(...t);const i=t[1]-t[0];for(let s=0;s{const e=f.getCurrentSource();h.setInputAlgorithm(e,e.getOutputData().getClassName())};f.setStepFinishedCallback(e),f.startDownloads()}if(t.animationHandler&&e.getProxyInGroup("AnimationManager").length){const a=e.getProxyInGroup("AnimationManager")[0],i=e.createProxy("Animations","TimeStepAnimation");i.setInputAnimationHandler(t.animationHandler),a.addAnimation(i),a.onCurrentFrameChanged((()=>e.renderAllViews()))}})),Object.keys(i).forEach((t=>{e.getLookupTable(t).setDataRange(...i[t])})),Object.keys(t.lookupTables||{}).forEach((a=>{const i=t.lookupTables[a],s=e.getLookupTable(a),n=s.getLookupTable(),o=i.nodes[0][0],r=i.nodes[i.nodes.length-1][0];s.setPresetName("-"),s.setDataRange(o,r),s.setMode(3),n.setColorSpace(i.colorSpace),s.setNodes(i.nodes.map((e=>{let[t,a,i,s,n,o]=e;return{x:t,r:a,g:i,b:s,midpoint:n,sharpness:o}})))})),e.renderAllViews()}}function A(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a),V.ZP.obj(e,t),V.ZP.get(e,t,["scene","camera","background","cameraViewPoints"]),B(e,t)}var F={newInstance:V.ZP.newInstance(A,"vtkGlanceVtkJsReader"),extend:A},N=a(503);let E=0;function j(e,t){t.classHierarchy.push("vtkGlanceZipObjReader"),e.parseAsArrayBuffer=a=>a&&a!==t.rawDataBuffer?(t.rawDataBuffer=a,function(e){const t={obj:{},mtl:{},img:{}},a={};return new Promise(((i,s)=>{const n=new(C());n.loadAsync(e).then((()=>{let e=0;function s(){0===e&&(Object.keys(t.mtl).forEach((e=>{const a=t.mtl[e],i=e.split("/").filter(((e,t,a)=>t{const s=`${i}/${e}`,n=t.img[s];n&&a.setImageSrc(e,n)}))})),Object.keys(t.obj).forEach((e=>{const i=e.replace(/\.obj$/,".mtl"),s=t.obj[e],n=t.mtl[i],o=s.getNumberOfOutputPorts();for(let e=0;e{a.match(/\.obj$/i)&&(e++,i.async("string").then((i=>{const n=x.ZP.newInstance({splitMode:"usemtl"});n.parseAsText(i),t.obj[a]=n,e--,s()}))),a.match(/\.mtl$/i)&&(e++,i.async("string").then((i=>{const n=N.ZP.newInstance();n.parseAsText(i),t.mtl[a]=n,e--,s()}))),(a.match(/\.jpg$/i)||a.match(/\.png$/i))&&(e++,i.async("base64").then((i=>{const n=a.slice(-3).toLowerCase();t.img[a]=`data:image/${n};base64,${i}`,e--,s()})))}))})).catch(s)}))}(a).then((a=>(t.scene=a,e.modified(),t.scene)))):Promise.resolve(t.appState),e.requestData=()=>{e.parseAsArrayBuffer(t.rawDataBuffer)},e.setProxyManager=e=>{const a=e.getViews();Object.keys(t.scene).forEach((i=>{const{dataset:s,mtlReader:n,name:o}=t.scene[i],r=e.createProxy("Sources","TrivialProducer",{name:i});r.setInputData(s),r.activate();for(let t=0;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a),V.ZP.obj(e,t),V.ZP.get(e,t,["scene"]),j(e,t)}var z={newInstance:V.ZP.newInstance(G,"vtkGlanceZipObjReader"),extend:G},U=a(504),W=a(30);const H={},K={readAsArrayBuffer:(e,t)=>U.Z.fetchBinary(e,t),readAsText:(e,t)=>U.Z.fetchText({},e,t)};function q(e){let{name:t}=e;const a=t.toLowerCase(),i=Object.keys(H).find((e=>a.endsWith(e)));return H[i]}let Y=null;const X=document.createElement("input");function J(e){return new Promise(((t,a)=>{const i=q(e);if(i){const{readMethod:s}=i,n=new FileReader;n.onload=function(){(function(e){let{fileName:t,data:a}=e;return new Promise(((e,i)=>{const s=q({name:t});if(s){const{vtkReader:n,parseMethod:o,fileNameMethod:r,sourceType:l}=s,c=n.newInstance();r&&c[r](t);try{const s=c[o](a);Promise.resolve(s).then((a=>e({dataset:a,reader:c,sourceType:l,name:t}))).catch(i)}catch(e){i(e)}}else i(new Error("No reader mapping"))}))})({fileName:e.name,data:n.result}).then((e=>t(e))).catch((e=>a(e)))},n[s](e)}else a(new Error("No reader mapping"))}))}function Q(e){const t=[];for(let a=0;a{i.setKey(e,c[e]),"onLoad"===e&&c[e](i)}))),s&&s.getCameraViewPoints&&s.getCameraViewPoints()&&t.getReferenceByName("$store").dispatch("setCameraViewPoints",s.getCameraViewPoints()),d=i}a.push(d)}return t.renderAllViews(),a}X.setAttribute("type","file"),X.setAttribute("multiple","multiple"),X.addEventListener("change",(function(e){Y&&Y(e.target.files),Y=null}));var te={downloadDataset:function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((i,s)=>{const n=q({name:e});if(!n)throw new Error(`No reader found for ${e}`);{const{readMethod:o}=n;K[o](t,a).then((t=>{if(!t)throw new Error(`No data for ${e}`);i(new File([t],e))})).catch(s)}}))},listReaders:function(){return Object.keys(H).map((e=>({name:H[e].name,ext:e})))},listSupportedExtensions:function(){return Object.keys(H)},importBase64Dataset:function(e,t,a){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:512;const s=[],n=atob(t);for(let e=0;e{ee(e,a)})),Promise.resolve("loading")):Q([r])},loadFiles:Q,loadFileSeries:function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return new Promise(((i,s)=>{if(e.length){const n=H[t];if(n){const{vtkReader:t,fileSeriesMethod:o,fileNameMethod:r,sourceType:l}=n,c=t.newInstance();if(r&&c[r](a),o){const t=c[o](e);Promise.resolve(t).then((e=>i({dataset:e,reader:c,sourceType:l,name:a})))}else s(new Error("No file series method available"))}else s(new Error(`No file series reader mapping for ${t}`))}else i()}))},openFiles:function(e,t){Y=t,X.setAttribute("accept",e.map((e=>`.${e}`)).join(",")),X.value=null,X.click()},registerReader:function(e){let{extension:t,name:a,vtkReader:i,readMethod:s,parseMethod:n,fileNameMethod:o,fileSeriesMethod:r,sourceType:l,binary:c}=e;H[t]={name:a,vtkReader:i,readMethod:s||c?"readAsArrayBuffer":"readAsText",parseMethod:n||c?"parseAsArrayBuffer":"parseAsText",fileNameMethod:o,fileSeriesMethod:r,sourceType:l}},registerReadersToProxyManager:ee};te.registerReader({extension:"glance",name:"Glance State Reader",vtkReader:$,binary:!0}),te.registerReader({extension:"obz",name:"OBJ bundle",vtkReader:z,binary:!0}),te.registerReader({extension:"vtkjs",name:"vtkjs",vtkReader:F,binary:!0}),te.registerReader({extension:"vtp",name:"Polydata Reader",vtkReader:y.ZP,binary:!0}),te.registerReader({extension:"vti",name:"ImageData Reader",vtkReader:f.ZP,binary:!0}),te.registerReader({extension:"stl",name:"STL Binary Reader",vtkReader:b.ZP,binary:!0}),te.registerReader({extension:"obj",name:"OBJ Reader",vtkReader:x.ZP,binary:!1}),te.registerReader({extension:"pdb",name:"PDB Reader",vtkReader:w.ZP,binary:!1,sourceType:"vtkMolecule"}),te.registerReader({extension:"glyph",name:"Glyph Data Reader",vtkReader:S.ZP,binary:!1,sourceType:"Glyph"}),te.registerReader({extension:"skybox",name:"Skybox Data Reader",vtkReader:P.ZP,binary:!0,sourceType:"Skybox"}),te.registerReader({extension:"json",name:"JSON Reader",vtkReader:S.ZP,binary:!1}),te.registerReader({extension:"ply",name:"PLY Reader",vtkReader:_.ZP,binary:!0});a(378);var ae=a(150),ie=a(539),se=a(543),ne=a(544),oe=a(545),re=a(547),le=a(548),ce=a(369),de=a(549),ue=a(465),pe=a(35),ve=a(473),me=a(551);function ge(e,t){t.classHierarchy.push("vtkCropWidgetProp"),t.representations.filter((e=>e.isA("vtkOutlineContextRepresentation"))).forEach((e=>e.getActor().getProperty().set({ambient:1,diffuse:0}))),t.widgetState.getAllNestedStates().filter((e=>!!e.setScale1)).forEach((e=>e.setScale1(20)))}var he=a(21);function ye(e,t){t.classHierarchy.push("vtkCropWidget"),t.behavior=V.ZP.chain(t.behavior,ge),t.methodsToLink=t.methodsToLink||[],t.methodsToLink.push("handleScale"),e.getRepresentationsForViewType=e=>{switch(e){case he.cO.DEFAULT:case he.cO.GEOMETRY:case he.cO.SLICE:case he.cO.VOLUME:}return[{builder:pe.ZP,labels:["handles"],initialValues:{scaleInPixels:!0}},{builder:ve.ZP,labels:["corners"]}]}}const fe={};function be(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fe,a),me.ZP.extend(e,t,a),ye(e,t)}var xe={newInstance:V.ZP.newInstance(be,"vtkCropWidget"),extend:be},we=a(552),_e=a(476);function Se(e,t){const a={...e},i=[];let s=null;e.handleMouseMove=e=>{const t=a.handleMouseMove(e);return s=e,t},e.delete=()=>{for(a.delete();i.length;)i.pop().unsubscribe()},i.push(t.manipulator.onModified((()=>{s&&a.handleMouseMove(s)})))}function Pe(e,t){(0,_e.Z)(e,t),Se(e,t)}var ke=a(41);function Ce(e,t){t.classHierarchy.push("vtkAngle2DWidget"),t.methodsToLink=[...t.methodsToLink??[],"circleProps","lineProps","textProps","text","textStateIndex"],t.behavior=Pe,t.widgetState=ke.Z.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible","manipulator"],name:"moveHandle",initialValues:{scale1:50,origin:[-1,-1,-1],visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible","manipulator"],name:"handle",initialValues:{scale1:50,origin:[-1,-1,-1],visible:!0}}).build(),e.getRepresentationsForViewType=e=>{switch(e){case he.cO.DEFAULT:case he.cO.GEOMETRY:case he.cO.SLICE:case he.cO.VOLUME:}return[{builder:pe.ZP,labels:["handles"],initialValues:{scaleInPixels:!0}},{builder:pe.ZP,labels:["moveHandle"],initialValues:{scaleInPixels:!0}}]}}const Ve={};function Ie(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ve,a),we.ZP.extend(e,t,a),V.ZP.setGet(e,t,["manipulator"]),Ce(e,t)}var Te={newInstance:V.ZP.newInstance(Ie,"vtkAngle2DWidget"),extend:Ie},$e=a(553),De=a(477);function Me(e,t){(0,De.Z)(e,t),Se(e,t)}function Le(e,t){t.classHierarchy.push("vtkDistance2DWidget"),t.methodsToLink=[...t.methodsToLink??[],"circleProps","lineProps","textProps","text","textStateIndex"],t.behavior=Me,t.widgetState=ke.Z.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible","manipulator"],name:"moveHandle",initialValues:{scale1:50,origin:[0,0,0],visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible","manipulator"],name:"handle",initialValues:{scale1:50,origin:[0,0,0],visible:!0}}).build(),e.getRepresentationsForViewType=e=>{switch(e){case he.cO.DEFAULT:case he.cO.GEOMETRY:case he.cO.SLICE:case he.cO.VOLUME:}return[{builder:pe.ZP,labels:["handles"],initialValues:{scaleInPixels:!0}},{builder:pe.ZP,labels:["moveHandle"],initialValues:{scaleInPixels:!0}}]}}const Ze={};function Oe(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ze,a),$e.ZP.extend(e,t,a),Le(e,t)}var Re={newInstance:V.ZP.newInstance(Oe,"vtkDistance2DWidget"),extend:Oe},Be=a(63),Ae=a(64);function Fe(e,t){t.classHierarchy.push("vtkTextWidgetProp");let a=null;function i(e){return e.altKey||e.controlKey||e.shiftKey}e.setDisplayCallback=e=>t.representations[0].setDisplayCallback(e),e.handleLeftButtonPress=s=>{if(!t.activeState||!t.activeState.getActive()||!t.pickable||i(s))return V.ZP.VOID;if(t.activeState===t.widgetState.getMoveHandle()&&t.widgetState.getHandleList().length<1){const e=t.widgetState.getMoveHandle(),a=t.widgetState.addHandle();a.setOrigin(...e.getOrigin()),a.setColor(e.getColor()),a.setScale1(e.getScale1())}else a=!0,t._apiSpecificRenderWindow.setCursor("grabbing"),t._interactor.requestAnimation(e);return e.invokeStartInteractionEvent(),V.ZP.EVENT_ABORT},e.handleMouseMove=s=>{if(t.hasFocus&&1===t.widgetState.getHandleList().length)return t._widgetManager.releaseFocus(),V.ZP.VOID;if(t.pickable&&t.manipulator&&t.activeState&&t.activeState.getActive()&&!i(s)){const{worldCoords:i}=t.manipulator.handleEvent(s,t._apiSpecificRenderWindow);if(i.length&&(t.activeState===t.widgetState.getMoveHandle()||a))return t.activeState.setOrigin(i),e.invokeInteractionEvent(),V.ZP.EVENT_ABORT}return V.ZP.VOID},e.handleLeftButtonRelease=()=>{a&&t.pickable?(t._apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t._interactor.cancelAnimation(e),e.invokeEndInteractionEvent()):t.activeState!==t.widgetState.getMoveHandle()&&t.widgetState.deactivate(),(t.hasFocus&&!t.activeState||t.activeState&&!t.activeState.getActive())&&e.invokeEndInteractionEvent(),a=!1},e.grabFocus=()=>{!t.hasFocus&&t.widgetState.getHandleList().length<1&&(t.activeState=t.widgetState.getMoveHandle(),t.activeState.activate(),t.activeState.setVisible(!0),t._interactor.requestAnimation(e),e.invokeStartInteractionEvent()),t.hasFocus=!0},e.loseFocus=()=>{t.hasFocus&&(t._interactor.cancelAnimation(e),e.invokeEndInteractionEvent()),t.widgetState.deactivate(),t.widgetState.getMoveHandle().deactivate(),t.widgetState.getMoveHandle().setVisible(!1),t.activeState=null,t.hasFocus=!1,t._widgetManager.enablePicking(),t._interactor.render()}}function Ne(e,t){t.classHierarchy.push("vtkTextWidget"),t.methodsToLink=["activeScaleFactor","activeColor","useActiveColor","defaultScale","circleProps","textProps","text","textStateIndex","handleScale"],t.behavior=Fe,t.widgetState=ke.Z.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible"],name:"moveHandle",initialValues:{scale1:50,origin:[0,0,0],visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible"],name:"handle",initialValues:{scale1:50,origin:[0,0,0]}}).build(),e.getRepresentationsForViewType=e=>{switch(e){case he.cO.DEFAULT:case he.cO.GEOMETRY:case he.cO.SLICE:case he.cO.VOLUME:}return[{builder:pe.ZP,labels:["handles"],initialValues:{scaleInPixels:!0}},{builder:pe.ZP,labels:["moveHandle"]}]},t.widgetState.onBoundsChange((e=>{const a=[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])];t.widgetState.getMoveHandle().setOrigin(a)})),t.manipulator=Ae.ZP.newInstance()}const Ee={};function je(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ee,a),Be.ZP.extend(e,t,a),V.ZP.setGet(e,t,["manipulator"]),Ne(e,t)}var Ge={newInstance:V.ZP.newInstance(je,"vtkTextWidget"),extend:je},ze=a(554),Ue=a(478);function We(e,t){t.classHierarchy.push("vtkCustomSliceRepresentationProxy");const a={...e};e.setOpacity=e=>{e>=0&&e<=1&&a.setOpacity(e)&&t.property.setOpacity(e)},e.setColorBy=function(i,s){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(a.setColorBy(i,s,n),null!==i&&t.useColorByForColor||t.property.setRGBTransferFunction(0,null),null!==i&&t.useColorByForOpacity||t.property.setPiecewiseFunction(0,null),i&&s){if(t.useColorByForColor){const a=e.getLookupTableProxy(i);t.property.setRGBTransferFunction(0,a.getLookupTable())}if(t.useColorByForOpacity){const a=e.getPiecewiseFunctionProxy(i);t.property.setPiecewiseFunction(0,a.getPiecewiseFunction())}}},e.setUseColorByForColor=t=>{if(a.setUseColorByForColor(t)){const t=e.getColorBy();e.setColorBy(...t)}},e.setUseColorByForOpacity=t=>{if(a.setUseColorByForOpacity(t)){const t=e.getColorBy();e.setColorBy(...t)}}}const He={opacity:1,useColorByForColor:!1,useColorByForOpacity:!1};function Ke(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,He,a),Ue.ZP.extend(e,t),V.ZP.setGet(e,t,["opacity","useColorByForColor","useColorByForOpacity"]),We(e,t)}var qe={newInstance:V.ZP.newInstance(Ke,"vtkCustomSliceRepresentationProxy"),extend:Ke},Ye=a(555);function Xe(e,t){t.classHierarchy.push("vtkCustomVolumeRepresentationProxy");const a={...e};e.setColorBy=function(i,s){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(a.setColorBy(i,s,n),null!==i&&t.sliceUseColorByForColor||t.propertySlices.setRGBTransferFunction(0,null),null!==i&&t.sliceUseColorByForOpacity||t.propertySlices.setPiecewiseFunction(0,null),i&&s){if(t.sliceUseColorByForColor){const a=e.getLookupTableProxy(i);t.propertySlices.setRGBTransferFunction(0,a.getLookupTable())}if(t.sliceUseColorByForOpacity){const a=e.getPiecewiseFunctionProxy(i);t.propertySlices.setPiecewiseFunction(0,a.getPiecewiseFunction())}}},e.setSliceOpacity=e=>{e>=0&&e<=1&&a.setSliceOpacity(e)&&t.propertySlices.setOpacity(e)},e.setSliceUseColorByForColor=t=>{if(a.setSliceUseColorByForColor(t)){const t=e.getColorBy();e.setColorBy(...t)}},e.setSliceUseColorByForOpacity=t=>{if(a.setSliceUseColorByForOpacity(t)){const t=e.getColorBy();e.setColorBy(...t)}},e.setIs2DVolume=t=>{a.setIs2DVolume(t),t&&(e.setSliceUseColorByForColor(!0),e.setSliceUseColorByForOpacity(!0))}}const Je={sliceOpacity:1,sliceUseColorByForColor:!1,sliceUseColorByForOpacity:!1};function Qe(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Je,a),Ye.ZP.extend(e,t),V.ZP.setGet(e,t,["sliceOpacity","sliceUseColorByForColor","sliceUseColorByForOpacity"]),Xe(e,t)}var et={newInstance:V.ZP.newInstance(Qe,"vtkCustomVolumeRepresentationProxy"),extend:Qe},tt=a(119),at=a(120),it=a(40),st=a(51),nt=a(50);function ot(e,t){t.classHierarchy.push("vtkLabelMapVolumeRepProxy");const a=(0,W.y5)();function i(e){const a=e.getColorMap(),i=st.ZP.newInstance(),s=nt.ZP.newInstance();Object.keys(a).forEach((e=>{const t=Number(e);i.addRGBPoint(t,...a[e].slice(0,3).map((e=>e/255))),s.addPoint(t,a[e][3]/255)})),t.property.setRGBTransferFunction(0,i),t.property.setScalarOpacity(0,s);const n=Math.max(...e.getDimensions());t.property.setScalarOpacityUnitDistance(0,Math.sqrt(n));const o=e.getSpacing().map((e=>e*e)).reduce(((e,t)=>e+t),0);t.mapper.setSampleDistance(o*2**-1.5)}t.mapper=at.ZP.newInstance(),t.volume=tt.ZP.newInstance(),t.property=t.volume.getProperty(),t.property.setInterpolationTypeToNearest(),t.sourceDependencies.push({setInputData(e){e?(a.sub(e.onModified((()=>i(e)))),i(e),t.mapper.setInputData(e)):a.unsub()}}),t.volume.setMapper(t.mapper),t.volumes.push(t.volume),e.setVisibility=e=>{t.volume.setVisibility(e)},e.getVisibility=()=>t.volume.getVisibility(),e.isVisible=e.getVisibility,e.delete=V.ZP.chain(e.delete,(()=>{a.unsub()}))}const rt={};function lt(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rt,a),it.Z.extend(e,t),ot(e,t),V.ZP.proxyPropertyMapping(e,t,{volumeVisibility:{modelKey:"volume",property:"visibility"}})}var ct={newInstance:V.ZP.newInstance(lt,"vtkLabelMapVolumeRepProxy"),extend:lt},dt=a(47);const{InterpolationType:ut}=dt.C;function pt(e,t){t.classHierarchy.push("vtkLabelMapSliceRepProxy");const a=(0,W.y5)();function i(e){const a=e.getColorMap(),i=st.ZP.newInstance(),s=nt.ZP.newInstance();Object.keys(a).forEach((e=>{const t=Number(e);i.addRGBPoint(t,...a[e].slice(0,3).map((e=>e/255))),s.addPoint(t,a[e][3]/255)})),t.property.setRGBTransferFunction(i),t.property.setScalarOpacity(s)}t.property.setInterpolationType(ut.NEAREST),e.setColorBy=()=>{},e.delete=V.ZP.chain(e.delete,(()=>a.unsub())),t.sourceDependencies.push({setInputData:function(e){a.sub(e.onModified((()=>i(e)))),i(e)}})}const vt={};function mt(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vt,a),Ue.ZP.extend(e,t),pt(e,t)}var gt={newInstance:V.ZP.newInstance(mt,"vtkLabelMapSliceRepProxy"),extend:mt};function ht(e,t){t.classHierarchy.push("vtkWidgetProxy"),t.widget=t.factory.newInstance();const a=[],i=t.widget.getWidgetState().onModified((()=>e.modified())),s=new WeakSet;function n(e){t.proxyManager.getViews().forEach((t=>{const a=t.getReferenceByName("widgetManager");a&&e(t,a)}))}e.addToViews=()=>n((e=>{const a=he.cO[t.viewTypes[e.getProxyName()]],i=function(e,t,a){const i=t.getReferenceByName("widgetManager");if(i){const s=i.addWidget(e,a);return i.enablePicking(),t.renderLater(),s}return null}(t.widget,e,a);i&&s.add(i)})),e.removeFromViews=()=>n((e=>function(e,t){const a=t.getReferenceByName("widgetManager");a&&(a.removeWidget(e),a.enablePicking(),t.renderLater())}(t.widget,e))),e.grabFocus=()=>n(((e,a)=>a.grabFocus(t.widget))),e.releaseFocus=()=>n(((e,a)=>a.releaseFocus(t.widget))),e.getViewWidget=e=>{const a=e.getReferenceByName("widgetManager");return a?t.widget.getWidgetForView({viewId:a.getViewId()}):null},e.getAllViewWidgets=()=>t.proxyManager.getViews().map((t=>[e.getViewWidget(t),t])).filter((e=>{let[t]=e;return!!t})),e.executeViewFuncs=t=>{n(((i,s)=>{const n=t[i.getProxyName()];if(n){const t=n(i,s,e.getViewWidget(i));if(Array.isArray(t))for(let e=0;e{i.unsubscribe();for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yt,a),V.ZP.obj(e,t),V.ZP.proxy(e,t),V.ZP.setGet(e,t,["name"]),V.ZP.get(e,t,["widget","viewTypes"]),ht(e,t),V.ZP.proxyPropertyMapping(e,t,{widgetState:{modelKey:"widget",property:"widgetState"}})}var bt={newInstance:V.ZP.newInstance(ft,"vtkWidgetProxy"),extend:ft},xt=a(556),wt=a(557);var _t={createProxyDefinition:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return{class:e,options:{links:a,ui:t,...i},props:s}},activateOnCreate:function(e){return e.options.activateOnCreate=!0,e},deepCopyPath:function(e,t){const a="string"==typeof t?t.split("."):t,i={...e};let s=i;for(;a.length;){const e=a.shift();if(!Object.prototype.hasOwnProperty.call(s,e))throw new Error(`Invalid property path given: ${a}`);s[e]instanceof Array?s[e]=Array.from(s[e]):s[e]={...s[e]},s=s[e]}return i},objAssignPath:function(e,t,a){const i="string"==typeof t?t.split("."):t;let s=e;for(;i.length>1;){const e=i.shift();if(!Object.prototype.hasOwnProperty.call(s,e))throw new Error(`Invalid property path given: ${i}`);s=s[e]}if(1!==i.length)throw new Error(`Invalid property path given: ${i}`);s[i.shift()]=a}};var St=[{name:"colorBy",domain:{}},{name:"xSliceVisibility"},{name:"ySliceVisibility"},{name:"zSliceVisibility"},{name:"volumeVisibility"},{name:"sliceOpacity"},{name:"sliceUseColorByForColor"},{name:"sliceUseColorByForOpacity"},{name:"useShadow"},{name:"sampleDistance",domain:{min:0,max:1,step:.01}},{name:"edgeGradient",domain:{min:0,max:1,step:.01}},{name:"windowWidth",domain:{min:0,max:255,step:.01}},{name:"windowLevel",domain:{min:0,max:255,step:.01}},{name:"xSlice",domain:{min:0,max:255,step:1}},{name:"ySlice",domain:{min:0,max:255,step:1}},{name:"zSlice",domain:{min:0,max:255,step:1}}],Pt=[{name:"colorBy",domain:{}},{name:"color"},{name:"representation",domain:{items:[{text:"Surface",value:"Surface"},{text:"Surface with edges",value:"Surface with edges"},{text:"Wireframe",value:"Wireframe"},{text:"Points",value:"Points"}]}},{name:"opacity",domain:{min:0,max:1,step:.01}},{name:"interpolateScalarsBeforeMapping"},{name:"visibility"},{name:"pointSize",domain:{min:1,max:50}}],kt=[{name:"colorBy",domain:{}},{name:"useColorByForColor"},{name:"useColorByForOpacity"},{name:"visibility"},{name:"windowWidth",domain:{min:0,max:255,step:.01}},{name:"windowLevel",domain:{min:0,max:255,step:.01}},{name:"slice",domain:{min:0,max:255,step:1}},{name:"opacity",domain:{min:0,max:1,step:.01}}],Ct=[{name:"tolerance",domain:{min:0,max:.5,step:.01}},{name:"atomicRadiusScaleFactor",domain:{min:0,max:.5,step:.01}},{name:"bondRadius",domain:{min:0,max:.5,step:.01}},{name:"deltaBondFactor",domain:{min:0,max:.5,step:.01}},{name:"hideElements"}],Vt=[{name:"edgeVisibility"}],It=[{name:"name"},{name:"background",domain:{palette:[]}},{name:"orientationAxesVisibility"},{name:"presetToOrientationAxes",domain:{items:[{text:"XYZ",value:"default"},{text:"LPS",value:"lps"}]}}],Tt=[{name:"name"},{name:"background",domain:{palette:[]}},{name:"orientationAxesVisibility"},{name:"presetToOrientationAxes",domain:{items:[{text:"XYZ",value:"default"},{text:"LPS",value:"lps"}]}},{name:"annotationOpacity",domain:{min:0,max:1,step:.01}}],$t=[{name:"position"}];var Dt=[{link:"Visibility",property:"visibility",updateOnBind:!0},{link:"WW",property:"windowWidth",updateOnBind:!0},{link:"WL",property:"windowLevel",updateOnBind:!0},{link:"SliceX",property:"xSlice",updateOnBind:!0,type:"application"},{link:"SliceY",property:"ySlice",updateOnBind:!0,type:"application"},{link:"SliceZ",property:"zSlice",updateOnBind:!0,type:"application"},{link:"SliceOpacity",property:"sliceOpacity",updateOnBind:!0},{link:"UseSliceColor",property:"sliceUseColorByForColor",updateOnBind:!0},{link:"UseSliceOpacity",property:"sliceUseColorByForOpacity",updateOnBind:!0}],Mt=[{link:"GeometryColorBy",property:"colorBy",updateOnBind:!0},{link:"Representation",property:"representation",updateOnBind:!0},{link:"Opacity",property:"opacity",updateOnBind:!0},{link:"InterpolateScalarsBeforeMapping",property:"interpolateScalarsBeforeMapping",updateOnBind:!0},{link:"Visibility",property:"visibility",updateOnBind:!0},{link:"PointSize",property:"pointSize",updateOnBind:!0}],Lt=[{link:"Visibility",property:"visibility",updateOnBind:!0},{link:"WW",property:"windowWidth",updateOnBind:!0},{link:"WL",property:"windowLevel",updateOnBind:!0},{link:"SliceOpacity",property:"opacity",updateOnBind:!0},{link:"UseSliceColor",property:"useColorByForColor",updateOnBind:!0},{link:"UseSliceOpacity",property:"useColorByForOpacity",updateOnBind:!0}],Zt=[{link:"Tolerance",property:"tolerance",updateOnBind:!0},{link:"AtomicRadiusScaleFactor",property:"atomicRadiusScaleFactor",updateOnBind:!0},{link:"BondRadius",property:"bondRadius",updateOnBind:!0},{link:"DeltaBondFactor",property:"deltaBondFactor",updateOnBind:!0},{link:"HideElements",property:"hideElements",updateOnBind:!0}],Ot=[{link:"GlyphEdgeVisibility",property:"edgeVisibility",updateOnBind:!0}],Rt=[{link:"SkyboxPosition",property:"position",updateOnBind:!0}];var Bt={View2D:{vtkPolyData:{name:"Geometry"},vtkImageData:{name:"Slice"},vtkLabelMap:{name:"LabelMapSlice"},vtkMolecule:{name:"Molecule"},Glyph:{name:"Glyph"},Skybox:{name:"Skybox"}},View3D:{vtkPolyData:{name:"Geometry"},vtkImageData:{name:"Volume"},vtkLabelMap:{name:"LabelMapVolume"},vtkMolecule:{name:"Molecule"},Glyph:{name:"Glyph"},Skybox:{name:"Skybox"}}};const{createProxyDefinition:At,activateOnCreate:Ft}=_t,Nt={View3D:"VOLUME",View2D_X:"SLICE",View2D_Y:"SLICE",View2D_Z:"SLICE"};function Et(e,t,a,i){return Ft(At(e,t,[{type:"application",link:"AnnotationOpacity",property:"annotationOpacity",updateOnBind:!0},{type:"application",link:"OrientationAxesVisibility",property:"orientationAxesVisibility",updateOnBind:!0},{type:"application",link:"OrientationAxesPreset",property:"presetToOrientationAxes",updateOnBind:!0},{type:"application",link:"OrientationAxesType",property:"orientationAxesType",updateOnBind:!0}],a,i))}var jt={Proxy:{definitions:{Proxy:{LookupTable:At(re.ZP,[],[],{presetName:"Default (Cool to Warm)"}),PiecewiseFunction:At(ce.Z)},Widgets:{Crop:At(bt,[],[],{factory:xe,viewTypes:Nt}),Paint:At(bt,[],[],{factory:ze.ZP,viewTypes:Nt}),Angle:At(bt,[],[],{factory:Te,viewTypes:Nt}),Ruler:At(bt,[],[],{factory:Re,viewTypes:Nt}),Text:At(bt,[],[],{factory:Ge,viewTypes:Nt})},Sources:{TrivialProducer:Ft(At(de.ZP)),LabelMap:At(de.ZP)},Representations:{Geometry:At(se.ZP,Pt,Mt),Skybox:At(ne.ZP,$t,Rt),Slice:At(qe,kt,Lt),SliceX:At(qe,kt,[{link:"SliceX",property:"slice",updateOnBind:!0,type:"application"}].concat(Lt)),SliceY:At(qe,kt,[{link:"SliceY",property:"slice",updateOnBind:!0,type:"application"}].concat(Lt)),SliceZ:At(qe,kt,[{link:"SliceZ",property:"slice",updateOnBind:!0,type:"application"}].concat(Lt)),Volume:At(et,St,Dt),Molecule:At(le.ZP,Ct,Zt),Glyph:At(oe.ZP,Vt,Ot),LabelMapVolume:At(ct,[],[]),LabelMapSlice:At(gt),LabelMapSliceX:At(gt,[],[{link:"SliceX",property:"slice",updateOnBind:!0,type:"application"}]),LabelMapSliceY:At(gt,[],[{link:"SliceY",property:"slice",updateOnBind:!0,type:"application"}]),LabelMapSliceZ:At(gt,[],[{link:"SliceZ",property:"slice",updateOnBind:!0,type:"application"}])},Views:{View3D:Et(ue.Z,It),View2D:Et(ie.ZP,Tt),View2D_X:Et(ie.ZP,Tt,{axis:0}),View2D_Y:Et(ie.ZP,Tt,{axis:1}),View2D_Z:Et(ie.ZP,Tt,{axis:2})},AnimationManager:{AnimationProxyManager:{class:xt.Z}},Animations:{TimeStepAnimation:{class:wt.Z}}},representations:{View3D:Bt.View3D,View2D:Bt.View2D,View2D_X:{...Bt.View2D,vtkImageData:{name:"SliceX"},vtkLabelMap:{name:"LabelMapSliceX"}},View2D_Y:{...Bt.View2D,vtkImageData:{name:"SliceY"},vtkLabelMap:{name:"LabelMapSliceY"}},View2D_Z:{...Bt.View2D,vtkImageData:{name:"SliceZ"},vtkLabelMap:{name:"LabelMapSliceZ"}}},filters:{vtkPolyData:[],vtkImageData:[],vtkMolecule:[],Glyph:[]}}},Gt=a(23);function zt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(;e.length>0;)e.pop().unsubscribe()}function Ut(e){const t=[],a={};return i=>{const s=(e,t)=>{e in i._actions&&i.dispatch(e,t)};t.push(e.onProxyRegistrationChange((e=>{const{action:t,proxyId:i,proxy:n}=e;"register"===t?(s("pxmProxyCreated",e),a[i]=n.onModified((e=>s("pxmProxyModified",e)))):i in a&&(a[i].unsubscribe(),s("pxmProxyDeleted",e)),s("pxmProxyRegistrationChange",e)}))),t.push(e.onActiveSourceChange((e=>s("pxmActiveSourceChange",e)))),t.push(e.onActiveViewChange((e=>s("pxmActiveViewChange",e))))}}const Wt=Symbol("PXM_SUBS"),Ht=Symbol("PROXY_SUBS"),Kt={install(e){e.mixin({beforeCreate(){const e=this.$options;this.$proxyManager=e.proxyManager||e.parent&&e.parent.$proxyManager},mounted(){if(this.$options.proxyManagerHooks){const e=[],t={},a=this.$options.proxyManagerHooks;if(a.onProxyCreated||a.onProxyModified||a.onProxyDeleted||a.onProxyRegistrationChange){if(a.onProxyModified){const e=this.$proxyManager.getProxyGroups();let i=[];for(let t=0;ta.onProxyModified.call(this,e)))}}e.push(this.$proxyManager.onProxyRegistrationChange((e=>{const{action:i,proxyId:s,proxy:n}=e;"register"===i?(a.onProxyCreated&&a.onProxyCreated.call(this,e),a.onProxyModified&&(t[s]=n.onModified((e=>a.onProxyModified.call(this,e))))):"unregister"===i&&(s in t&&(t[s].unsubscribe(),delete t[s]),a.onProxyDeleted&&a.onProxyDeleted.call(this,e)),a.onProxyRegistrationChange&&a.onProxyRegistrationChange.call(this,e)})))}a.onActiveSourceChange&&e.push(this.$proxyManager.onActiveSourceChange((e=>V.ZP.setImmediate((()=>a.onActiveSourceChange.call(this,e)))))),a.onActiveViewChange&&e.push(this.$proxyManager.onActiveViewChange((e=>V.ZP.setImmediate((()=>a.onActiveViewChange.call(this,e)))))),this[Wt]=e,this[Ht]=t}},beforeDestroy(){this[Wt]&&zt(this[Wt]),this[Ht]&&(zt(Object.values(this[Ht])),this[Ht]={})}})}};var qt={getViewType:function(e){return`${e.getProxyName()}:${e.getName()}`}},Yt=a(381);function Xt(e){const t=Yt.ZP.newInstance(e.get("direction","origin","spacing"));return t.setDimensions(e.getDimensions()),t.computeTransforms(),t.getPointData().setScalars(e.getPointData().getScalars()),t}function Jt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("vtkLabelMap"===t.glanceDataType){const a=Xt(e);return t.colorMap&&a.setColorMap(t.colorMap),a}return e}var Qt=a(4),ea=a(15);function ta(){return["zip","raw","glance","gz"].concat(te.listSupportedExtensions())}function aa(e){const t=e.lastIndexOf(".");return t>-1?e.substr(t+1).toLowerCase():""}function ia(e,t){const a=ta(),i=[];return e.folder(t).forEach(((t,s)=>{if(s.dir)i.push(ia(e,t));else if(a.indexOf(aa(s.name))>-1){const t=s.name.split("/"),a=t[t.length-1];i.push(e.file(s.name).async("blob").then((e=>new File([e],a))))}})),i}var sa=e=>{let{proxyManager:t,girder:a}=e;return{namespaced:!0,state:{remoteFileList:[],fileList:[],loading:!1,progress:{}},getters:{anyErrors:e=>e.fileList.reduce(((e,t)=>e||"error"===t.state),!1),totalProgress(e){const t=Object.values(e.progress);return 0===t.length?0:t.reduce(((e,t)=>e+t),0)/t.length}},mutations:{startLoading(e){e.loading=!0},stopLoading(e){e.loading=!1},resetQueue(e){e.fileList=[]},addToFileList(e,t){for(let a=0;a=0&&t=0&&a=0&&a=0&&a=0&&a=0&&tte.openFiles(a,(a=>{t("openFiles",Array.from(a)).then(e).catch(i)}))))},resetQueue(e){let{commit:t}=e;t("resetQueue")},deleteFile(e,t){let{commit:a}=e;a("deleteFile",t)},openRemoteFiles(e,t){let{commit:a,dispatch:i}=e;return a("addToFileList",t.map((e=>({type:"remote",name:e.name,remoteURL:e.url,remoteOpts:e.options,withGirderToken:!!e.withGirderToken,proxyKeys:e.proxyKeys})))),i("readAllFiles")},openFiles(e,t){let{commit:a,dispatch:i}=e;const s=t.filter((e=>"zip"===aa(e.name)));if(s.length){const e=t.filter((e=>"zip"!==aa(e.name))),a=s.map((e=>C().loadAsync(e).then((e=>Promise.all(ia(e))))));return Promise.all(a).then((t=>[].concat.apply(e,t))).then((e=>i("openFiles",e)))}const n=[],o=[];if(t.forEach((e=>{"dcm"===aa(e.name)?o.push(e):n.push(e)})),o.length){a("addToFileList",[{type:"dicom",name:o[0].name,list:o}])}return a("addToFileList",n.map((e=>({type:"regular",name:e.name,file:e})))),i("readAllFiles")},readAllFiles(e){let{dispatch:t,state:a}=e;const i=[];for(let e=0;e(i("setRemoteFile",{index:t,file:e}),s("readFileIndex",t)))).catch((()=>{throw new Error("Failed to download file")}));else if("raw"===o.ext)o.extraInfo&&(r=function(e,t){let{dimensions:a,spacing:i,dataType:s}=t;return new Promise(((t,n)=>{const o=new FileReader;o.onload=function(){const e=ea.ZP.newInstance({spacing:i,extent:[0,a[0]-1,0,a[1]-1,0,a[2]-1]}),n=Qt.ZP.newInstance({name:"Scalars",values:new s.constructor(o.result)});e.getPointData().setScalars(n),t(e)},o.onerror=e=>n(e),o.readAsArrayBuffer(e)}))}(o.files[0],o.extraInfo).then((e=>{i("setFileReader",{index:t,reader:{name:o.name,dataset:e}})}))),i("setFileNeedsInfo",t);else if("dcm"===o.ext)r=te.loadFileSeries(o.files,"dcm",o.name).then((e=>{e&&i("setFileReader",{index:t,reader:e})}));else{if("glance"===o.ext)for(let e=0;e{e&&1===e.length&&i("setFileReader",{index:t,reader:e[0]})}))}return r.catch((e=>{e&&i("setFileError",{index:t,error:e.message||"File load failure"})}))},setRawFileInfo(e,t){let{commit:a,dispatch:i}=e,{index:s,info:n}=t;return n?a("setRawFileInfo",{index:s,info:n}):a("setFileNeedsInfo",s),i("readFileIndex",s)},load(e){let{state:a,commit:i,dispatch:s}=e;i("startLoading"),i("clearProgresses");const n=a.fileList.filter((e=>"ready"===e.state));let o=Promise.resolve();const r=n.find((e=>"glance"===e.ext));if(r){const e=r.reader.reader;o=o.then((()=>e.parseAsArrayBuffer().then((()=>s("restoreAppState",e.getAppState(),{root:!0})))))}return o=o.then((()=>{const e=n.filter((e=>"glance"!==e.ext)),a=[],i=[],o=[];for(let t=0;t{let a=[];for(let i=0;i"TrivialProducer"===e.getProxyName()));if(c[c.length-1]){const e=c[c.length-1].getProxyId();for(let t=0;ts("widgets/setLabelmapState",{labelmapId:a.getProxyId(),labelmapState:{selectedLabel:1,lastColorIndex:1}},{root:!0})))}for(let t=0;ti("stopLoading")))}}}},na=a(62),oa=a(379),ra=a(574),la=a(463),ca=a(174);const{CaptureOn:da}=he.ZP;var ua=e=>{let{proxyManager:t}=e;return{namespaced:!0,state:{viewsInitialized:!1,viewTypeToId:{},backgroundColors:{},globalBackgroundColor:ca.qV,axisType:"arrow",axisPreset:la.Bp,axisVisible:!0,annotationOpacity:1,interactionStyle3D:"3D",firstPersonMovementSpeed:null,maxTextureLODSize:5e4,viewOrder:Object.values(la.Zp),visibleCount:1,viewOrientation:la.In,viewTypes:la.v7,masterSourceId:null,previousConfigurationPreset:null},mutations:{setGlobalBackground(e,t){e.globalBackgroundColor=t;const a=Object.keys(e.backgroundColors);for(let i=0;i{const[o,r]=n.split(":"),l=t.createProxy("Views",o,{name:r});if((0,W.XC)(l,s.viewOrientation,r),l.setBackground(0,0,0,0),i.default.set(s.backgroundColors,n,s.globalBackgroundColor),l.setPresetToOrientationAxes("default"),!l.getReferenceByName("widgetManager")){const e=na.ZP.newInstance();e.setRenderer(l.getRenderer()),e.setCaptureOn(da.MOUSE_MOVE),l.set({widgetManager:e},!0)}n===la.H_&&(e=l),a("mapViewTypeToId",{viewType:n,viewId:l.getProxyId()})})),e&&e.activate()}},swapViews(e,t){let{commit:a}=e,{index:i,viewType:s}=t;a("swapViews",{index:i,viewType:s})},singleView(e,t){let{state:a,commit:i}=e;i("swapViews",{index:0,viewType:a.viewOrder[t]}),i("visibleCount",1)},splitView(e,t){let{state:a,commit:i}=e;i("swapViews",{index:t,viewType:a.viewOrder[1]}),i("visibleCount",2)},quadView(e){let{commit:t}=e;t("visibleCount",4)},setGlobalBackground(e,t){let{commit:a}=e;a("setGlobalBackground",t)},changeBackground(e,t){let{commit:a}=e,{viewType:i,color:s}=t;a("changeBackground",{viewType:i,color:s})},setAxisType(e,a){let{commit:i}=e;t.getViews().forEach((e=>{e.setOrientationAxesType(a)})),i("setAxisType",a)},setAxisPreset(e,a){let{commit:i,dispatch:s}=e;t.getViews().forEach((e=>{e.setPresetToOrientationAxes(a)})),i("setAxisPreset",a),s("configureViewOrientationAndTypes",!1)},setViewOrientation(e,a){let{commit:i,state:s}=e,{orientation:n,blockAnimation:o}=a;i("setViewOrientation",n),Object.entries(s.viewTypeToId).forEach((e=>{let[a,i]=e;const s=t.getProxyById(i),[r,l]=a.split(":");(0,W.XC)(s,n,l,o||"View3D"!==r?0:100)}))},setViewTypes(e,t){let{commit:a}=e;a("setViewTypes",t)},configureViewOrientationAndTypes(e,a){let{commit:i,dispatch:s,state:n}=e;if("lps"===n.axisPreset){const e=t.getProxyById(n.masterSourceId);if(e?.getDataset().isA("vtkImageData")){const t=e.getDataset().getDirection(),i=(0,oa.NZ)(t),n={};for(let e=0;e<3;++e)for(let t=0;t<3;++t){0!==i[e+3*t]&&(n["lps"[e]]="xyz"[t])}const o={[la.Zp.default]:"3D",[la.Zp[n.l]]:"Sagittal",[la.Zp[n.p]]:"Coronal",[la.Zp[n.s]]:"Axial"},r=Array(3);ra.transpose(r,i),ra.mul(r,t,r),s("setViewTypes",o),s("setViewOrientation",{orientation:r,blockAnimation:a})}else"lps"!==n.previousConfigurationPreset&&(s("setViewTypes",la.h$),s("setViewOrientation",{orientation:la.In,blockAnimation:a}))}else s("setViewTypes",la.v7),s("setViewOrientation",{orientation:la.In,blockAnimation:a});i("setPreviousConfigurationPreset",n.axisPreset)},updateMasterSourceId(e,a){let{dispatch:i,state:s}=e;const n=t.getRepresentations().filter((e=>!e.isVisible())).map((e=>e.getInput().getProxyId())),o=a.filter((e=>!n.includes(e)));o.includes(s.masterSourceId)||(0===o.length?i("setMasterSourceId",null):i("setMasterSourceId",o[0]))},setMasterSourceId(e,t){let{commit:a,dispatch:i,state:s}=e;const n=null===s.masterSourceId&&null!==t;a("setMasterSourceId",t),"lps"===s.axisPreset&&i("configureViewOrientationAndTypes",n)},setAxisVisible(e,a){let{commit:i}=e;t.getViews().forEach((e=>{e.setOrientationAxesVisibility(a)})),i("setAxisVisible",a)},setAnnotationOpacity(e,a){let{commit:i}=e;t.getViews().forEach((e=>{e.setAnnotationOpacity(a)})),i("setAnnotationOpacity",a)},setInteractionStyle3D(e,a){let{commit:i}=e;t.getViews().filter((e=>"default"===e.getName())).forEach((e=>{e.setPresetToInteractor3D(a)})),i("setInteractionStyle3D",a)},setFirstPersonMovementSpeed(e,a){let{commit:i}=e;t.getViews().filter((e=>"default"===e.getName())).forEach((e=>{e.getInteractorStyle3D().getKeyboardManipulators().forEach((e=>{e.setMovementSpeed&&e.setMovementSpeed(a)}))})),i("setFirstPersonMovementSpeed",a)},resetFirstPersonMovementSpeed(e){let{dispatch:a}=e,i=0;const s=t.getViews().filter((e=>"default"===e.getName()));for(let e=0;e{let{proxyManager:t}=e;return{namespaced:!0,state:{measurements:{},distanceUnitSymbol:"mm",distanceUnitFactor:1,imageToLabelmaps:{},labelmapToImage:{},labelmapStates:{},croppingStates:{}},mutations:{setDistanceUnitSymbol(e,t){e.distanceUnitSymbol=t},setDistanceUnitFactor(e,t){e.distanceUnitFactor=t},addLabelmapToImage(e,t){let{imageId:a,labelmapId:s}=t;a in e.imageToLabelmaps||i.default.set(e.imageToLabelmaps,a,[]),i.default.set(e.labelmapToImage,s,a),e.imageToLabelmaps[a].push(s)},deleteLabelmap(e,t){if(t in e.labelmapToImage){const a=e.labelmapToImage[t];i.default.delete(e.labelmapToImage,t),e.imageToLabelmaps[a].splice(e.imageToLabelmaps[a].indexOf(t),1)}},setLabelmapState(e,t){let{labelmapId:a,labelmapState:s}=t;i.default.set(e.labelmapStates,a,s)},addMeasurementTool(e,t){let{datasetId:a,componentName:s,data:n}=t;a in e.measurements||i.default.set(e.measurements,a,[]),e.measurements[a].push({componentName:s,data:n})},updateMeasurementTool(e,t){let{datasetId:a,index:s,data:n}=t;a in e.measurements&&i.default.set(e.measurements[a][s],"data",n)},removeMeasurementTool(e,t){let{datasetId:a,index:i}=t;a in e.measurements&&e.measurements[a].splice(i,1)},setCroppingState(e,t){let{datasetId:a,planes:i}=t;e.croppingStates[a]=Array.from(i)},rewriteProxyIds(e,t){let{sources:a}=t;e.measurements=(0,W.cO)(e.measurements,a),e.imageToLabelmaps=(0,W.cO)(e.imageToLabelmaps,a),e.labelmapStates=(0,W.cO)(e.labelmapStates,a),e.croppingStates=(0,W.cO)(e.croppingStates,a),Object.keys(e.imageToLabelmaps).forEach((t=>{e.imageToLabelmaps[t]=(0,W.Lg)(e.imageToLabelmaps[t],a)}));const i={};Object.entries(e.labelmapToImage).forEach((e=>{let[t,s]=e;i[a[t]]=a[s]})),e.labelmapToImage=i}},actions:{addLabelmapToImage:(0,W.Gy)("addLabelmapToImage"),deleteLabelmap:(0,W.Gy)("deleteLabelmap"),setLabelmapState:(0,W.Gy)("setLabelmapState"),addMeasurementTool:(0,W.Gy)("addMeasurementTool"),removeMeasurementTool:(0,W.Gy)("removeMeasurementTool"),updateMeasurementTool:(0,W.Gy)("updateMeasurementTool"),setCroppingState:(0,W.Gy)("setCroppingState"),setDistanceUnitSymbol:(0,W.Gy)("setDistanceUnitSymbol"),setDistanceUnitFactor:(0,W.Gy)("setDistanceUnitFactor"),rewriteProxyIds:(0,W.Gy)("rewriteProxyIds"),pxmProxyCreated:{root:!0,handler(e,a){let{state:i}=e,{proxy:s,proxyId:n}=a;if(n in i.croppingStates){const e=i.croppingStates[n],a=(0,W.aX)(t,s);a&&a.setCroppingPlanes(e)}}}}}},va=e=>{let{animationManager:t}=e;return{namespaced:!0,state:{playing:!1,currentFrame:"0.0",frames:[]},mutations:{setCurrentFrame(e,t){e.currentFrame=t},setPlaying(e,t){e.playing=t},setFrames(e,t){e.frames=t}},actions:{initializeAnimations(e){let{commit:a}=e;t.onCurrentFrameChanged((()=>{a("setCurrentFrame",t.getCurrentFrame())})),t.onFramesChanged((()=>{a("setFrames",t.getFrames())})),a("setCurrentFrame",t.getCurrentFrame()),a("setFrames",t.getFrames())},play(e){let{commit:a}=e;a("setPlaying",!0),t.play(),t.onDonePlaying((()=>{a("setPlaying",!1),t.onDonePlaying((()=>{}))}))},pause(e){let{commit:a}=e;a("setPlaying",!1),t.pause()},nextFrame(){t.nextFrame()},previousFrame(){t.previousFrame()},firstFrame(){t.firstFrame()},lastFrame(){t.lastFrame()},setFrameIndex(e,a){t.setFrameIndex(a)}}}};function ma(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}function ga(e,t){const a=Object.keys(t);for(let s=0;se.proxyManager,cameraViewPoints:e=>e.cameraViewPoints,mostRecentViewPoint:e=>e.mostRecentViewPoint},modules:{files:sa({proxyManager:a,girder:t}),views:ua({proxyManager:a,girder:t}),widgets:pa({proxyManager:a,girder:t}),animations:va({animationManager:n})},mutations:{showLanding(e){e.route="landing"},showApp(e){e.route="app"},savingState(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.savingStateName=t},loadingState(e,t){e.loadingState=t},addPanel:(e,t)=>{let{component:a,priority:s=0}=t;s in e.panels||i.default.set(e.panels,s,[]),e.panels[s].push(a)},openScreenshotDialog(e,t){e.pendingScreenshot=t,e.screenshotDialog=!0},closeScreenshotDialog(e){e.pendingScreenshot=null,e.screenshotDialog=!1},mostRecentViewPoint(e,t){e.mostRecentViewPoint=t},collapseDatasetPanels(e,t){e.collapseDatasetPanels=t},suppressBrowserWarning(e,t){e.suppressBrowserWarning=t}},actions:{addPanel:(0,W.Gy)("addPanel"),closeScreenshotDialog:(0,W.Gy)("closeScreenshotDialog"),collapseDatasetPanels:(0,W.Gy)("collapseDatasetPanels"),suppressBrowserWarning:(0,W.Gy)("suppressBrowserWarning"),saveState(e,t){let{commit:i,state:s}=e;const n=new Date,o=t||`${n.getFullYear()}${n.getMonth()+1}${n.getDate()}_${n.getHours()}-${n.getMinutes()}-${n.getSeconds()}.glance`;i("savingState",o);const r={version:2,activeSourceId:a.getActiveSource()?a.getActiveSource().getProxyId():-1,store:{route:s.route,views:s.views,widgets:s.widgets}},l={recycleViews:!0,datasetHandler(e,t){const a=t.get("name","url","remoteMetaData"),i=e.get("name","url","remoteMetaData"),s=a.url?a:i;return t.getKey("girderProvenance")?{serializedType:"girder",provenance:t.getKey("girderProvenance"),item:t.getKey("girderItem"),meta:t.getKey("meta")}:s.name&&s.url?s:e.getState()}},c=new(C());a.saveState(l,r).then((e=>{c.file("state.json",JSON.stringify(e)),c.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:6}}).then((e=>{const t=URL.createObjectURL(e),a=document.createElement("a");a.setAttribute("href",t),a.setAttribute("download",o),document.body.appendChild(a),a.click(),document.body.removeChild(a),setTimeout((()=>URL.revokeObjectURL(t)),6e4)})).then((()=>i("savingState",null)))}))},restoreAppState(e,i){let{commit:s,dispatch:n,state:o}=e;s("loadingState",!0);const r=new WeakMap;return n("resetWorkspace"),a.loadState(i,{datasetHandler(e){if(e.vtkClass)return(0,Gt.Z)(e);let i=e.name,n=e.url;const o={};if("girder"===e.serializedType){const{itemId:a,itemName:s}=e.item,{apiRoot:r}=e.provenance;i=s,n=`${r}/item/${a}/download`,o.headers={...o.headers||{},"Girder-Token":t.girderRest.token}}let l;if(e.seriesUrls){const t=aa(e.name),a=e.seriesUrls.map((e=>te.downloadDataset(function(e){return e.split("/").pop()?.split("?").shift()}(e),e,o)));l=Promise.all(a).then((e=>te.loadFileSeries(e,t,i)))}else l=te.downloadDataset(i,n,{...o,progressCallback(e){const t=e.lengthComputable?e.loaded/e.total:1/0;s("files/setProgress",{id:i,percentage:t})}}).then((e=>te.loadFiles([e]))).then((e=>e[0]));return l.then((t=>{let{dataset:i,reader:s}=t,n=null;if(s&&s.getOutputData)n=s.getOutputData();else if(i&&i.isA)n=i;else if(s&&s.setProxyManager)return s.setProxyManager(a),null;if(!n)throw new Error("Invalid dataset");return"girder"===e.serializedType?(n=Jt(n,e.meta),r.set(n,{girderProvenance:e.provenance,girderItem:e.item,meta:e.meta})):n.set(e,!0),n})).catch((e=>{const t="Dataset doesn't exist or adblock/firewall prevents access.";if("xhr"in e){const{xhr:a}=e;throw new Error(`${a.statusText} (${a.status}): ${t}`)}throw new Error(`${e.message} (${t})`)}))}}).then((e=>{const{version:t,store:s,$oldToNewIdMapping:l}=e;t>=2?this.replaceState(ga(o,s)):this.replaceState(ga(o,e)),a.getSources().forEach((e=>{const t=e.getDataset();if(r.has(t)){const a=r.get(t);Object.keys(a).forEach((t=>e.setKey(t,a[t])))}})),n("rewriteProxyIds",{appState:i,mapping:l}).then((()=>{a.modified();const i=a.getViews().filter((e=>e.getContainer())),s=i.find((e=>"View3D"===e.getProxyName()))||i[0];if(s&&s.activate(),a.getSources().forEach((e=>(0,W._3)(a,e))),t>=2){const{activeSourceId:t}=e,i=l[t],s=a.getProxyById(i);s&&s.activate()}else{const e=a.getSources()[0];e&&e.activate()}}))})).then((()=>s("loadingState",!1)))},resetWorkspace(){a.getSources().forEach((e=>setTimeout((()=>a.deleteProxy(e)),0))),setTimeout((()=>{a.renderAllViews(),a.resetCameraInAllViews()}),0)},resetActiveCamera(){a.resetCamera()},increaseSlice(e){let{state:t}=e;"app"===t.route&&ha(a,!0)},decreaseSlice(e){let{state:t}=e;"app"===t.route&&ha(a,!1)},takeScreenshot(e){let{commit:t,state:i}=e;const s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||a.getActiveView(),n=qt.getViewType(s);return s?s.captureImage().then((e=>{t("openScreenshotDialog",{imgSrc:e,viewName:s.getName(),viewData:{background:i.views.backgroundColors[n]}})})):Promise.resolve()},setCameraViewPoints(e,t){let{dispatch:a,state:i}=e;i.cameraViewPoints=t;const s=Object.keys(t);if(0!==s.length){a("changeCameraViewPoint",s[0]);a("views/setInteractionStyle3D","FirstPerson")}},changeCameraViewPoint(e,t){let{commit:a,getters:i,state:s}=e;const n=s.proxyManager.getViews(),o=i.proxyManager,r=i.cameraViewPoints[t]||{},l=r.camera,c=r.show,d=r.hide,u=[];n.filter((e=>"default"===e.getName())).forEach((e=>{const t=e.getCamera().getDistance(),a=[l.focalPoint[0]-l.position[0],l.focalPoint[1]-l.position[1],l.focalPoint[2]-l.position[2]],i=[l.position[0]+a[0]*t,l.position[1]+a[1]*t,l.position[2]+a[2]*t],s=e.moveCamera(i,l.position,l.viewUp,100);u.push(s)})),Promise.all(u).then((()=>{o.getSources().forEach((e=>{const t=e.getName();if(!c.includes(t)&&!d.includes(t))return;const a=c.includes(t),i=o.getRepresentations().filter((t=>t.getInput()===e))[0];i.getVisibility()!==a&&i.setVisibility(a)})),o.renderAllViews()})),a("mostRecentViewPoint",t)},previousViewPoint(e){let{dispatch:t,getters:a}=e;const i=a.mostRecentViewPoint;if(!i)return;const s=Object.keys(a.cameraViewPoints);if(!s.includes(i))return;const n=s.length,o=(s.indexOf(i)+n-1)%n;t("changeCameraViewPoint",s[o])},nextViewPoint(e){let{dispatch:t,getters:a}=e;const i=a.mostRecentViewPoint;if(!i)return;const s=Object.keys(a.cameraViewPoints);if(!s.includes(i))return;const n=(s.indexOf(i)+1)%s.length;t("changeCameraViewPoint",s[n])},rewriteProxyIds(e,t){let{dispatch:a}=e,{appState:i,mapping:s}=t;const n=e=>e.reduce(((e,t)=>({...e,[t.id]:s[t.id]})),{}),o={sources:n(i.sources),views:n(i.views),reps:n(i.representations),all:s};a("widgets/rewriteProxyIds",o),a("views/rewriteProxyIds",o)}}});return a.set({$store:o},!0),o};function fa(e){for(;e.length;)e.pop()()}class ba{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"settings";this.keyPrefix=e,this.storeSettingsMap={},this.store=null,this.storeWatchers=[]}key(e){return this.keyPrefix?`${this.keyPrefix}.${e}`:e}get(e){const t=window.localStorage.getItem(this.key(e));if(null!==t)return JSON.parse(t)}set(e,t){return window.localStorage.setItem(this.key(e),JSON.stringify(t))}syncWithStore(e,t){fa(this.storeWatchers),this.store=e,this.storeSettingsMap=t;const a=Object.keys(t);a.forEach((e=>{const a=this.get(e);if(void 0!==a){const{set:i}=t[e];i(a)}})),this.storeWatchers=a.map((a=>{const{get:i}=t[a];return e.watch(i,(e=>this.set(a,e)))}))}delete(){fa(this.storeWatchers),this.storeSettingsMap={},this.store=null}}class xa extends EventTarget{constructor(){super(),this.targets=[]}addTarget(e){this.targets.push(e),this.dispatchEvent(new CustomEvent("updateTargets"))}removeTarget(e){const t=this.targets.indexOf(e);t>-1&&(this.targets.splice(t,1),this.dispatchEvent(new CustomEvent("updateTargets")))}}var wa={install(e){const t=new xa;e.mixin({beforeCreate(){this.$toolSvgPortal=t}})}};const{getReader:_a,importBase64Dataset:Sa,listReaders:Pa,listSupportedExtensions:ka,loadFiles:Ca,openFiles:Va,registerReader:Ia,registerReadersToProxyManager:Ta}=te;i.default.use(s.ZP),i.default.use(n.Z),i.default.use(Kt),i.default.use(o.ZP),i.default.use(wa);let $a=null;function Da(e){$a=e}function Ma(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const a=t||$a||jt.Proxy,s=h.ZP.newInstance({proxyConfiguration:a}),n=new ba,o=ya({proxyManager:s,girder:m}),r=new i.default({el:e,components:{App:ae.Z},store:o,provide:m,vuetify:g.Hl,proxyManager:s,template:""});function l(e){(e.state||{}).app?o.commit("showApp"):o.commit("showLanding")}return o.watch((e=>e.route),(e=>{if(n.get("noHistory"))return;const t=window.history.state||{};"landing"===e&&t.app&&window.history.back(),"app"!==e||t.app||window.history.pushState({app:!0},"")})),window.history.replaceState({app:!1},""),window.addEventListener("popstate",l),n.set("noHistory",!1),n.syncWithStore(o,{collapseDatasetPanels:{set:e=>o.dispatch("collapseDatasetPanels",e),get:e=>e.collapseDatasetPanels},suppressBrowserWarning:{set:e=>o.dispatch("suppressBrowserWarning",e),get:e=>e.suppressBrowserWarning}}),{proxyManager:s,store:o,processURLArgs(){const e=c.Z.extractURLParameters();Object.keys(e).filter((e=>e.startsWith("setting."))).forEach((t=>{const a=t.substr("setting.".length);n.set(a,e[t])}));const{name:t,url:a}=e;if(t&&a){const e="string"==typeof t?[t]:t,i="string"==typeof a?[a]:a;r.$children[0].autoLoadRemotes("resources from url",i,e)}},addDatasetPanel(e){o.commit("addPanel",{component:e})},showApp(){o.commit("showApp")},getSetting:e=>n.get(e),setSetting:(e,t)=>n.set(e,t)}}},127:function(e,t,a){"use strict";var i=a(612),s=a(9);function n(e,t){for(let a=0;at.getInput()===e.source));for(let e=0;e{e.updateProxies(n,t,a&&a[n])})))}return i}t.Z={generateComponent:function(e,t){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{onChange:{},onUpdate:[]};const u=l(t),p={};return Object.keys(u).forEach((e=>{p[`get${s.ZP.capitalize(e)}`]=u[e].get,p[`set${s.ZP.capitalize(e)}`]=u[e].set})),{name:e,props:["sourceId"],data:()=>r(t),computed:{...u,...(0,i.rn)("views",{viewOrder:e=>e.viewOrder}),source(){return this.$proxyManager.getProxyById(this.sourceId)}},watch:{viewOrder(){a&&this.$nextTick(this.$forceUpdate)}},proxyManagerHooks:{onProxyModified(e){e.isA("vtkAbstractRepresentationProxy")&&e.getInput()&&e.getInput()===this.source&&this.updateData()},onProxyCreated(e){const{proxyGroup:t,proxy:a}=e;"Representations"===t&&a.getInput()===this.source&&this.updateAll()}},created(){this.subscriptions=c(this,t,d.onChange)},mounted(){this.updateAll()},beforeDestroy(){for(;this.subscriptions.length;)this.subscriptions.pop()()},methods:{...p,updateAll(){if(this.updateDomains(),this.updateData(),d.onUpdate)for(let e=0;ee.getInput()===this.source)),t=[this.$proxyManager.getProxyById(this.sourceId)].concat(e),a={};for(;t.length;){n(a,t.pop().getReferenceByName("ui"))}this.inUpdateDomains=!1,this.domains=a},updateData(){if(!this.inUpdateData){this.inUpdateData=!0;for(let e=0;eSpacing: ${sliceSpacing} mm
${sliceIndex} of ${sliceCount}",se:"WL: ${windowLevel} / WW: ${windowWidth}"},r={[n.default]:"3D",[n.x]:"Orientation X",[n.y]:"Orientation Y",[n.z]:"Orientation Z"},l={[n.default]:"3D",[n.x]:"Sagittal",[n.y]:"Coronal",[n.z]:"Axial"},c=[1,0,0,0,1,0,0,0,1]},174:function(e,t,a){"use strict";a.d(t,{qV:function(){return s},qg:function(){return n}});var i=a(57);const s="linear-gradient(#333, #999)",n=["#000000","#ffffff",...i.oe,"linear-gradient(#7478BE, #C1C3CA)","linear-gradient(#00002A, #52576E)",s]},378:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});var i=a(121),s=JSON.parse('[{"Name":"Medical","Children":[{"Name":"CT","Children":[{"Name":"CT-AAA","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,143.556,0,166.222,0.686275,214.389,0.696078,419.736,0.833333,3071,0.803922],"RGBPoints":[-3024,0,0,0,143.556,0.615686,0.356863,0.184314,166.222,0.882353,0.603922,0.290196,214.389,1,1,1,419.736,1,0.937033,0.954531,3071,0.827451,0.658824,1]},{"Name":"CT-AAA2","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,129.542,0,145.244,0.166667,157.02,0.5,169.918,0.627451,395.575,0.8125,1578.73,0.8125,3071,0.8125],"RGBPoints":[-3024,0,0,0,129.542,0.54902,0.25098,0.14902,145.244,0.6,0.627451,0.843137,157.02,0.890196,0.47451,0.6,169.918,0.992157,0.870588,0.392157,395.575,1,0.886275,0.658824,1578.73,1,0.829256,0.957922,3071,0.827451,0.658824,1]},{"Name":"CT-Bone","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-16.4458,0,641.385,0.715686,3071,0.705882],"RGBPoints":[-3024,0,0,0,-16.4458,0.729412,0.254902,0.301961,641.385,0.905882,0.815686,0.552941,3071,1,1,1]},{"Name":"CT-Bones","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-1000,0,152.19,0,278.93,0.190476,952,0.2],"RGBPoints":[-1000,0.3,0.3,1,-488,0.3,1,0.3,463.28,1,0,0,659.15,1,0.912535,0.0374849,953,1,0.3,0.3]},{"Name":"CT-Cardiac","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-77.6875,0,94.9518,0.285714,179.052,0.553571,260.439,0.848214,3071,0.875],"RGBPoints":[-3024,0,0,0,-77.6875,0.54902,0.25098,0.14902,94.9518,0.882353,0.603922,0.290196,179.052,1,0.937033,0.954531,260.439,0.615686,0,0,3071,0.827451,0.658824,1]},{"Name":"CT-Cardiac2","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,42.8964,0,163.488,0.428571,277.642,0.776786,1587,0.754902,3071,0.754902],"RGBPoints":[-3024,0,0,0,42.8964,0.54902,0.25098,0.14902,163.488,0.917647,0.639216,0.0588235,277.642,1,0.878431,0.623529,1587,1,1,1,3071,0.827451,0.658824,1]},{"Name":"CT-Cardiac3","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-86.9767,0,45.3791,0.169643,139.919,0.589286,347.907,0.607143,1224.16,0.607143,3071,0.616071],"RGBPoints":[-3024,0,0,0,-86.9767,0,0.25098,1,45.3791,1,0,0,139.919,1,0.894893,0.894893,347.907,1,1,0.25098,1224.16,1,1,1,3071,0.827451,0.658824,1]},{"Name":"CT-Chest-Contrast-Enhanced","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,67.0106,0,251.105,0.446429,439.291,0.625,3071,0.616071],"RGBPoints":[-3024,0,0,0,67.0106,0.54902,0.25098,0.14902,251.105,0.882353,0.603922,0.290196,439.291,1,0.937033,0.954531,3071,0.827451,0.658824,1]},{"Name":"CT-Chest-Vessels","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-1278.35,0,22.8277,0.428571,439.291,0.625,3071,0.616071],"RGBPoints":[-3024,0,0,0,-1278.35,0.54902,0.25098,0.14902,22.8277,0.882353,0.603922,0.290196,439.291,1,0.937033,0.954531,3071,0.827451,0.658824,1]},{"Name":"CT-Coronary-Arteries","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,136.47,0,159.215,0.258929,318.43,0.571429,478.693,0.776786,3661,1],"RGBPoints":[-2048,0,0,0,136.47,0,0,0,159.215,0.159804,0.159804,0.159804,318.43,0.764706,0.764706,0.764706,478.693,1,1,1,3661,1,1,1]},{"Name":"CT-Coronary-Arteries-2","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,142.677,0,145.016,0.116071,192.174,0.5625,217.24,0.776786,384.347,0.830357,3661,0.830357],"RGBPoints":[-2048,0,0,0,142.677,0,0,0,145.016,0.615686,0,0.0156863,192.174,0.909804,0.454902,0,217.24,0.972549,0.807843,0.611765,384.347,0.909804,0.909804,1,3661,1,1,1]},{"Name":"CT-Coronary-Arteries-3","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,128.643,0,129.982,0.0982143,173.636,0.669643,255.884,0.857143,584.878,0.866071,3661,1],"RGBPoints":[-2048,0,0,0,128.643,0,0,0,129.982,0.615686,0,0.0156863,173.636,0.909804,0.454902,0,255.884,0.886275,0.886275,0.886275,584.878,0.968627,0.968627,0.968627,3661,1,1,1]},{"Name":"CT-Cropped-Volume-Bone","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,-451,0,-450,1,1050,1,3661,1],"RGBPoints":[-2048,0,0,0,-451,0,0,0,-450,0.0556356,0.0556356,0.0556356,1050,1,1,1,3661,1,1,1]},{"Name":"CT-Fat","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-1000,0,-100,0,-99,0.15,-60,0.15,-59,0,101.2,0,952,0],"RGBPoints":[-1000,0.3,0.3,1,-497.5,0.3,1,0.3,-99,0,0,1,-76.946,0,1,0,-65.481,0.835431,0.888889,0.0165387,83.89,1,0,0,463.28,1,0,0,659.15,1,0.912535,0.0374849,2952,1,0.300267,0.299886]},{"Name":"CT-Liver-Vasculature","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,149.113,0,157.884,0.482143,339.96,0.660714,388.526,0.830357,1197.95,0.839286,3661,0.848214],"RGBPoints":[-2048,0,0,0,149.113,0,0,0,157.884,0.501961,0.25098,0,339.96,0.695386,0.59603,0.36886,388.526,0.854902,0.85098,0.827451,1197.95,1,1,1,3661,1,1,1]},{"Name":"CT-Lung","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-1000,0,-600,0,-599,0.15,-400,0.15,-399,0,2952,0],"RGBPoints":[-1000,0.3,0.3,1,-600,0,0,1,-530,0.134704,0.781726,0.0724558,-460,0.929244,1,0.109473,-400,0.888889,0.254949,0.0240258,2952,1,0.3,0.3]},{"Name":"CT-MIP","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-637.62,0,700,1,3071,1],"RGBPoints":[-3024,0,0,0,-637.62,1,1,1,700,1,1,1,3071,1,1,1]},{"Name":"CT-Muscle","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-155.407,0,217.641,0.676471,419.736,0.833333,3071,0.803922],"RGBPoints":[-3024,0,0,0,-155.407,0.54902,0.25098,0.14902,217.641,0.882353,0.603922,0.290196,419.736,1,0.937033,0.954531,3071,0.827451,0.658824,1]},{"Name":"CT-Pulmonary-Arteries","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,-568.625,0,-364.081,0.0714286,-244.813,0.401786,18.2775,0.607143,447.798,0.830357,3592.73,0.839286],"RGBPoints":[-2048,0,0,0,-568.625,0,0,0,-364.081,0.396078,0.301961,0.180392,-244.813,0.611765,0.352941,0.0705882,18.2775,0.843137,0.0156863,0.156863,447.798,0.752941,0.752941,0.752941,3592.73,1,1,1]},{"Name":"CT-Soft-Tissue","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,-167.01,0,-160,1,240,1,3661,1],"RGBPoints":[-2048,0,0,0,-167.01,0,0,0,-160,0.0556356,0.0556356,0.0556356,240,1,1,1,3661,1,1,1]}]},{"Name":"MR","Children":[{"Name":"MR-Angio","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,151.354,0,158.279,0.4375,190.112,0.580357,200.873,0.732143,3661,0.741071],"RGBPoints":[-2048,0,0,0,151.354,0,0,0,158.279,0.74902,0.376471,0,190.112,1,0.866667,0.733333,200.873,0.937255,0.937255,0.937255,3661,1,1,1]},{"Name":"MR-Default","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[0,0,20,0,40,0.15,120,0.3,220,0.375,1024,0.5],"RGBPoints":[0,0,0,0,20,0.168627,0,0,40,0.403922,0.145098,0.0784314,120,0.780392,0.607843,0.380392,220,0.847059,0.835294,0.788235,1024,1,1,1]},{"Name":"MR-MIP","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[0,0,98.3725,0,416.637,1,2800,1],"RGBPoints":[0,1,1,1,98.3725,1,1,1,416.637,1,1,1,2800,1,1,1]},{"Name":"MR-T2-Brain","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[0,0,36.05,0,218.302,0.171429,412.406,1,641,1],"RGBPoints":[0,0,0,0,98.7223,0.956863,0.839216,0.192157,412.406,0,0.592157,0.807843,641,1,1,1]}]},{"Name":"DTI-FA-Brain","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[0,0,0,0,0.3501,0.0158,0.49379,0.7619,0.6419,1,0.992,1,0.995,0,0.995,0],"RGBPoints":[0,1,0,0,0,1,0,0,0.24974,0.4941,1,0,0.49949,0,0.9882,1,0.7492,0.51764,0,1,0.995,1,0,0,0.995,1,0,0]}]}]');const n={...i.Z.getPresetByName("Cool to Warm"),Name:"Default (Cool to Warm)"};function o(e,t){const a=e.Name.toLowerCase(),i=t.Name.toLowerCase();return a>i?1:-(ai.Z.getPresetByName(e)));return a.sort(o),{Name:e,Children:a}}!function e(t){t.forEach((t=>{t.Children?e(t.Children):i.Z.addPreset(t)}))}(s.concat(n));var l=[].concat(n,s,r("ParaView",["2hot","Asymmtrical Earth Tones (6_21b)","Cold and Hot","Cool to Warm (Extended)","Cool to Warm","coolwarm","Grayscale","Linear Blue (8_31f)","Linear YGB 1211g","Rainbow Blended Black","Rainbow Blended Grey","Rainbow Blended White","Rainbow Desaturated","rainbow","Warm to Cool (Extended)","Warm to Cool"]),r("ERDC",["erdc_blue2cyan_BW","erdc_blue2gold","erdc_blue2gold_BW","erdc_blue2green_BW","erdc_blue2green_muted","erdc_blue2yellow","erdc_blue_BW","erdc_brown_BW","erdc_cyan2orange","erdc_divHi_purpleGreen","erdc_divHi_purpleGreen_dim","erdc_divLow_icePeach","erdc_divLow_purpleGreen","erdc_gold_BW","erdc_green2yellow_BW","erdc_iceFire_H","erdc_iceFire_L","erdc_magenta_BW","erdc_marine2gold_BW","erdc_orange_BW","erdc_pbj_lin","erdc_purple2green","erdc_purple2green_dark","erdc_purple2pink_BW","erdc_purple_BW","erdc_rainbow_bright","erdc_rainbow_dark","erdc_red2purple_BW","erdc_red2yellow_BW","erdc_red_BW","erdc_sapphire2gold_BW"]),r("Others",["Black, Blue and White","Black, Orange and White","Black-Body Radiation","blot","Blue to Red Rainbow","Blue to Yellow","BLUE-WHITE","blue2cyan","blue2yellow","Blues","bone_Matlab","BrBG","BrOrYl","BuGn","BuGnYl","BuPu","BuRd","CIELab Blue to Red","CIELab_blue2red","copper_Matlab","GBBr","gist_earth","GnBu","GnBuPu","GnRP","GnYlRd","gray_Matlab","Green-Blue Asymmetric Divergent (62Blbc)","GREEN-WHITE_LINEAR","Greens","GYPi","GyRd","Haze","Haze_cyan","Haze_green","Haze_lime","heated_object","hsv","hue_L60","Inferno (matplotlib)","jet","magenta","Magma (matplotlib)","Muted Blue-Green","nic_CubicL","nic_CubicYF","nic_Edge","Oranges","OrPu","pink_Matlab","PiYG","Plasma (matplotlib)","PRGn","PuBu","PuOr","PuRd","Purples","RdOr","RdOrYl","RdPu","Red to Blue Rainbow","Spectral_lowBlue","Viridis (matplotlib)","X Ray","Yellow 15"]))},462:function(e,t,a){"use strict";a.d(t,{u3:function(){return i}});const i={md:768}},57:function(e,t,a){"use strict";a.d(t,{oe:function(){return i},wY:function(){return s}});const i=["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],s=["#ffee00","#bbbe64","#f3b700","#91f5ad","#fdca40","#f79824","#e57c04"]},30:function(e,t,a){"use strict";a.d(t,{y5:function(){return s},Gy:function(){return n},cO:function(){return o},JL:function(){return r},Lg:function(){return l},_3:function(){return c},aX:function(){return d},XC:function(){return p}});var i=a(575);function s(){let e=null;const t={sub(a){t.unsub(),e=a},unsub(){null!==e&&(e.unsubscribe(),e=null)}};return t}function n(e){return(t,a)=>{let{commit:i}=t;return i(e,a)}}function o(e,t){const a={};return Object.keys(e).forEach((i=>{let s=i;i in t&&(s=t[i]),a[s]=e[i]})),a}function r(e,t){const a={};return Object.entries(e).forEach((e=>{let[i,s]=e,n=s;s in t&&(n=t[s]),a[i]=n})),a}function l(e,t){return e.map((e=>e in t?t[e]:e))}function c(e,t){const a=e.getViews().filter((e=>e.isA("vtkView2DProxy"))),i=a.map((e=>e.getReferenceByName("sliceRepresentation")));e.createRepresentationInAllViews(t),"LabelMap"===t.getProxyName()&&a.forEach(((e,t)=>e.bindRepresentationToManipulator(i[t])))}function d(e,t){const a=e.getViews().find((e=>"View3D"===e.getProxyName()));if(!a)throw new Error("Cannot find 3D view!");const i=e.getRepresentation(t,a);if(!i||!i.getCropFilter)throw new Error("Cannot find the volume rep with a crop filter!");return i.getCropFilter()}const u={default:{forwardAxis:1,forwardOrientation:1,upwardAxis:2,upwardOrientation:1},x:{forwardAxis:0,forwardOrientation:1,upwardAxis:2,upwardOrientation:1},y:{forwardAxis:1,forwardOrientation:1,upwardAxis:2,upwardOrientation:1},z:{forwardAxis:2,forwardOrientation:1,upwardAxis:1,upwardOrientation:-1}};function p(e,t,a){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const{forwardAxis:n,forwardOrientation:o,upwardAxis:r,upwardOrientation:l}=u[a],c=i.bA(Array(3),t.slice(3*n,3*n+3),o),d=i.bA(Array(3),t.slice(3*r,3*r+3),l),p=e.getCamera(),v=p.getPosition(),m=p.getViewUp(),g=p.getFocalPoint(),h=i.IH(Array(3),g,c);p.setPosition(...h),p.setViewUp(...d),e.resetCamera();const y=p.getFocalPoint(),f=p.getPosition(),b=p.getViewUp();return p.setFocalPoint(...g),p.setPosition(...v),p.setViewUp(...m),e.moveCamera(y,f,b,s)}},84:function(e,t,a){"use strict";var i=a(78),s=a(15),n=a(4);const{vtkErrorMacro:o}=i.ZP,r=1,l=2,c=3,d=4,u=5,p=6,v=7,m=8,g=9,h=10,y=11,f=12,b=13,x=14,w=15;const _=new Map([["Uint8Array","uint8_t"],["Int8Array","int8_t"],["Uint16Array","uint16_t"],["Int16Array","int16_t"],["Uint32Array","uint32_t"],["Int32Array","int32_t"],["Float32Array","float"],["Float64Array","double"]]);t.Z={convertItkToVtkImage:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a={origin:[0,0,0],spacing:[1,1,1]},i=[1,1,1],_=[1,0,0,0,1,0,0,0,1];for(let t=0;t1&&void 0!==arguments[1]&&arguments[1];const a={imageType:{dimension:3,pixelType:r,componentType:"",components:1},name:"name",origin:e.getOrigin(),spacing:e.getSpacing(),direction:{data:[1,0,0,0,1,0,0,0,1]},size:e.getDimensions()},i=e.getDirection(),s=a.size.length;a.imageType.dimension=s,a.direction.rows=s,a.direction.columns=s;for(let e=0;e{Number.isNaN(Number(a))?n("Provided label is not a number"):(t.colorMap[a]=i.slice(),void 0===t.colorMap[a][3]&&(t.colorMap[a][3]=255),e.modified())},e.removeLabel=a=>{Number.isNaN(Number(a))?n("Provided label is not a number"):(delete t.colorMap[a],e.modified())},null===t.colorMap&&(t.colorMap={0:[0,0,0,0],1:[0,0,0,255]})}const r={colorMap:null};function l(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,r,a),s.ZP.extend(e,t,a),i.ZP.setGet(e,t,["colorMap"]),o(e,t)}const c=i.ZP.newInstance(l,"vtkLabelMap");t.ZP={newInstance:c,extend:l}},328:function(e,t,a){var i=a(489),s=a(481);void 0===s.Glance&&(s.Glance=i),e.exports=i},524:function(e,t,a){var i={"./af":180,"./af.js":180,"./ar":181,"./ar-dz":182,"./ar-dz.js":182,"./ar-kw":183,"./ar-kw.js":183,"./ar-ly":184,"./ar-ly.js":184,"./ar-ma":185,"./ar-ma.js":185,"./ar-sa":186,"./ar-sa.js":186,"./ar-tn":187,"./ar-tn.js":187,"./ar.js":181,"./az":188,"./az.js":188,"./be":189,"./be.js":189,"./bg":190,"./bg.js":190,"./bm":191,"./bm.js":191,"./bn":192,"./bn-bd":193,"./bn-bd.js":193,"./bn.js":192,"./bo":194,"./bo.js":194,"./br":195,"./br.js":195,"./bs":196,"./bs.js":196,"./ca":197,"./ca.js":197,"./cs":198,"./cs.js":198,"./cv":199,"./cv.js":199,"./cy":200,"./cy.js":200,"./da":201,"./da.js":201,"./de":202,"./de-at":203,"./de-at.js":203,"./de-ch":204,"./de-ch.js":204,"./de.js":202,"./dv":205,"./dv.js":205,"./el":206,"./el.js":206,"./en-au":207,"./en-au.js":207,"./en-ca":208,"./en-ca.js":208,"./en-gb":209,"./en-gb.js":209,"./en-ie":210,"./en-ie.js":210,"./en-il":211,"./en-il.js":211,"./en-in":212,"./en-in.js":212,"./en-nz":213,"./en-nz.js":213,"./en-sg":214,"./en-sg.js":214,"./eo":215,"./eo.js":215,"./es":216,"./es-do":217,"./es-do.js":217,"./es-mx":218,"./es-mx.js":218,"./es-us":219,"./es-us.js":219,"./es.js":216,"./et":220,"./et.js":220,"./eu":221,"./eu.js":221,"./fa":222,"./fa.js":222,"./fi":223,"./fi.js":223,"./fil":224,"./fil.js":224,"./fo":225,"./fo.js":225,"./fr":226,"./fr-ca":227,"./fr-ca.js":227,"./fr-ch":228,"./fr-ch.js":228,"./fr.js":226,"./fy":229,"./fy.js":229,"./ga":230,"./ga.js":230,"./gd":231,"./gd.js":231,"./gl":232,"./gl.js":232,"./gom-deva":233,"./gom-deva.js":233,"./gom-latn":234,"./gom-latn.js":234,"./gu":235,"./gu.js":235,"./he":236,"./he.js":236,"./hi":237,"./hi.js":237,"./hr":238,"./hr.js":238,"./hu":239,"./hu.js":239,"./hy-am":240,"./hy-am.js":240,"./id":241,"./id.js":241,"./is":242,"./is.js":242,"./it":243,"./it-ch":244,"./it-ch.js":244,"./it.js":243,"./ja":245,"./ja.js":245,"./jv":246,"./jv.js":246,"./ka":247,"./ka.js":247,"./kk":248,"./kk.js":248,"./km":249,"./km.js":249,"./kn":250,"./kn.js":250,"./ko":251,"./ko.js":251,"./ku":252,"./ku.js":252,"./ky":253,"./ky.js":253,"./lb":254,"./lb.js":254,"./lo":255,"./lo.js":255,"./lt":256,"./lt.js":256,"./lv":257,"./lv.js":257,"./me":258,"./me.js":258,"./mi":259,"./mi.js":259,"./mk":260,"./mk.js":260,"./ml":261,"./ml.js":261,"./mn":262,"./mn.js":262,"./mr":263,"./mr.js":263,"./ms":264,"./ms-my":265,"./ms-my.js":265,"./ms.js":264,"./mt":266,"./mt.js":266,"./my":267,"./my.js":267,"./nb":268,"./nb.js":268,"./ne":269,"./ne.js":269,"./nl":270,"./nl-be":271,"./nl-be.js":271,"./nl.js":270,"./nn":272,"./nn.js":272,"./oc-lnc":273,"./oc-lnc.js":273,"./pa-in":274,"./pa-in.js":274,"./pl":275,"./pl.js":275,"./pt":276,"./pt-br":277,"./pt-br.js":277,"./pt.js":276,"./ro":278,"./ro.js":278,"./ru":279,"./ru.js":279,"./sd":280,"./sd.js":280,"./se":281,"./se.js":281,"./si":282,"./si.js":282,"./sk":283,"./sk.js":283,"./sl":284,"./sl.js":284,"./sq":285,"./sq.js":285,"./sr":286,"./sr-cyrl":287,"./sr-cyrl.js":287,"./sr.js":286,"./ss":288,"./ss.js":288,"./sv":289,"./sv.js":289,"./sw":290,"./sw.js":290,"./ta":291,"./ta.js":291,"./te":292,"./te.js":292,"./tet":293,"./tet.js":293,"./tg":294,"./tg.js":294,"./th":295,"./th.js":295,"./tk":296,"./tk.js":296,"./tl-ph":297,"./tl-ph.js":297,"./tlh":298,"./tlh.js":298,"./tr":299,"./tr.js":299,"./tzl":300,"./tzl.js":300,"./tzm":301,"./tzm-latn":302,"./tzm-latn.js":302,"./tzm.js":301,"./ug-cn":303,"./ug-cn.js":303,"./uk":304,"./uk.js":304,"./ur":305,"./ur.js":305,"./uz":306,"./uz-latn":307,"./uz-latn.js":307,"./uz.js":306,"./vi":308,"./vi.js":308,"./x-pseudo":309,"./x-pseudo.js":309,"./yo":310,"./yo.js":310,"./zh-cn":311,"./zh-cn.js":311,"./zh-hk":312,"./zh-hk.js":312,"./zh-mo":313,"./zh-mo.js":313,"./zh-tw":314,"./zh-tw.js":314};function s(e){var t=n(e);return a(t)}function n(e){if(!a.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}s.keys=function(){return Object.keys(i)},s.resolve=n,e.exports=s,s.id=524},39:function(e,t,a){"use strict";a.d(t,{Z:function(){return i}});var i={block:"Datasets-block-MOv47",blockTitle:"Datasets-blockTitle-hRnLc",blockContent:"Datasets-blockContent-a3h1_",blockRow:"Datasets-blockRow-lFOcN",slimInput:"Datasets-slimInput-Cnehi",canSelect:"Datasets-canSelect-w1m5T",clickable:"Datasets-clickable-JOYIZ",smallLabel:"Datasets-smallLabel-_8o5q",active:"Datasets-active-zv1WS",inactive:"Datasets-inactive-twtbQ",matrix:"Datasets-matrix-_nvw3",disable:"Datasets-disable-wMFzA",lutImage:"Datasets-lutImage-h8bWl",dropdownMenu:"Datasets-dropdownMenu-Z0GS3",button:"Datasets-button-W4Ok7",click:"Datasets-click-URBWc",negativeTopSpacing:"Datasets-negativeTopSpacing-HrNz2"}},80:function(e,t,a){"use strict";a.d(t,{Z:function(){return i}});var i={datasetPanel:"Datasets-datasetPanel-B9jFW",subpanel:"Datasets-subpanel-RQd0h",panelContent:"Datasets-panelContent-kpRWg",panelHeader:"Datasets-panelHeader-uNZ70",headerMenuButton:"Datasets-headerMenuButton-_t8U7",subpanelHeader:"Datasets-subpanelHeader-_vvrH"}},380:function(e,t,a){"use strict";a.d(t,{Z:function(){return i}});var i={wrapper:"TreeView-wrapper-Uw6mP",node:"TreeView-node-gbM0d",arrow:"TreeView-arrow-KW7L0",openArrow:"TreeView-openArrow-ezZCc",header:"TreeView-header-KxYvL",expander:"TreeView-expander-SVvAO",name:"TreeView-name-_uKWF"}},151:function(e,t,a){"use strict";a.d(t,{Z:function(){return B}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.available?a("div",[a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},["geometry"===e.available?[a("v-flex",{attrs:{xs3:""}},[a("span",{staticClass:"body-2"},[e._v("Color By:")])]),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("v-select",{staticClass:"pv-no-select",class:e.$style.slimInput,attrs:{dense:"",flat:"","hide-details":"",items:e.arrays,value:e.arraySelectValue},on:{change:e.setColorBy}})],1),e._v(" "),"solid"===e.colorBy?a("v-flex",{attrs:{xs12:""}},[a("palette-picker",{staticClass:"pt-1 pb-1",attrs:{palette:e.palette,size:24},model:{value:e.solidColor,callback:function(t){e.solidColor=t},expression:"solidColor"}})],1):e._e()]:e._e(),e._v(" "),"solid"!==e.colorBy?[a("v-flex",{staticClass:"pt-2",attrs:{xs12:""}},[a("v-menu",{attrs:{"close-on-content-click":!1,"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("div",e._g({class:e.$style.clickable},i),[a("span",{staticClass:"body-2"},[e._v(e._s(e.presetName))]),e._v(" "),a("img",{class:e.$style.lutImage,attrs:{src:e.lutImage}})])]}}],null,!1,2069699272),model:{value:e.presetMenu,callback:function(t){e.presetMenu=t},expression:"presetMenu"}},[e._v(" "),e.presetMenu?a("tree-view",{class:e.$style.dropdownMenu,attrs:{tree:e.presets,labelKey:"Name",childrenKey:"Children"},on:{input:e.onChangePreset}}):e._e()],1)],1),e._v(" "),a("v-flex",{staticClass:"pb-4",class:e.$style.negativeTopSpacing,attrs:{xs5:""}},[a("v-text-field",{class:e.$style.negativeTopSpacing,attrs:{label:"Min",step:"any",disabled:"geometry"!==e.available,"hide-details":"",value:e.dataRange[0]},on:{change:function(t){return e.$proxyManager.renderAllViews()},input:function(t){return e.setDataRangeIndex(0,t)}}})],1),e._v(" "),a("v-flex",{staticClass:"text-center pb-4",class:e.$style.negativeTopSpacing,attrs:{xs2:""}},["geometry"===e.available?a("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.negativeTopSpacing,attrs:{icon:"",small:""},on:{click:e.resetDataRange}},i),[a("v-icon",[e._v("mdi-arrow-expand-horizontal")])],1)]}}],null,!1,2807797372)},[e._v("\n Reset range\n ")]):a("v-spacer")],1),e._v(" "),a("v-flex",{staticClass:"pb-4",class:e.$style.negativeTopSpacing,attrs:{xs5:""}},[a("v-text-field",{class:e.$style.negativeTopSpacing,attrs:{label:"Max",step:"any",disabled:"geometry"!==e.available,reverse:"","hide-details":"",value:e.dataRange[1]},on:{change:function(t){return e.$proxyManager.renderAllViews()},input:function(t){return e.setDataRangeIndex(1,t)}}})],1)]:e._e(),e._v(" "),"volume"===e.available?[e.piecewiseFunction&&!e.hasPresetOpacity?a("v-flex",{attrs:{xs12:""},on:{touchstart:function(e){e.stopPropagation()}}},[a("piecewise-function-editor",{attrs:{piecewiseFunction:e.piecewiseFunction,source:e.source,proxyManager:e.$proxyManager}})],1):e._e(),e._v(" "),e.hasPresetOpacity?a("v-flex",{attrs:{xs12:""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("span",{class:e.$style.smallLabel},[e._v("Shift")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{min:e.shiftRange[0],max:e.shiftRange[1],step:"0","hide-details":""},model:{value:e.shift,callback:function(t){e.shift=t},expression:"shift"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{type:"number",min:e.shiftRange[0],max:e.shiftRange[1],step:"1","hide-details":""},model:{value:e.shift,callback:function(t){e.shift=t},expression:"shift"}})],1)],1)],1):e._e(),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-checkbox",{class:e.$style.slimInput,attrs:{"hide-details":"",label:"Apply color to slices"},on:{change:e.applyColorToSlices},model:{value:e.colorToSlices,callback:function(t){e.colorToSlices=t},expression:"colorToSlices"}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-checkbox",{class:e.$style.slimInput,attrs:{"hide-details":"",label:"Apply opacity to slices"},on:{change:e.applyOpacityToSlices},model:{value:e.opacityToSlices,callback:function(t){e.opacityToSlices=t},expression:"opacityToSlices"}})],1)]:e._e(),e._v(" "),"geometry"===e.available&&e.colorByName?a("v-flex",{attrs:{xs12:""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs2:""}},[a("v-icon",{class:e.$style.click,on:{click:function(t){t.stopPropagation(),e.interpolateScalarsBeforeMapping=!e.interpolateScalarsBeforeMapping}}},[e._v("\n "+e._s(e.interpolateScalarsBeforeMapping?"mdi-checkbox-marked":"mdi-checkbox-blank-outline")+"\n ")])],1),e._v(" "),a("v-flex",{attrs:{xs10:""}},[a("span",{staticClass:"body-2"},[e._v("Interpolate scalar before mapping")])])],1)],1):e._e()],2)],1)],1)],1):e._e()};i._withStripped=!0;var s=a(9),n=a(379),o=a(121),r=a(116),l=a(152),c=a(38),d=a(153),u=a(57),p=a(378);const{Mode:v}=r.Z,m={text:"Solid color",value:"solid"},g=document.createElement("canvas");g.setAttribute("width",300),g.setAttribute("height",1);var h={name:"ColorBy",props:["sourceId"],components:{PalettePicker:c.Z,PiecewiseFunctionEditor:l.Z,TreeView:d.Z},data:()=>({palette:u.oe.concat("#ffffff","#000000"),available:"",colorBy:"solid",arrays:[m],piecewiseFunction:null,solidColor:"#ffffff",lutImage:"",presetName:"",presets:p.Z,presetMenu:!1,shift:0,dataRange:[0,0],interpolateScalarsBeforeMapping:!0,colorToSlices:!1,opacityToSlices:!1,originalLUTRanges:{}}),computed:{source(){return this.$proxyManager.getProxyById(this.sourceId)},colorByName(){return Array.isArray(this.colorBy)?this.colorBy[0]:null},colorByLocation(){return Array.isArray(this.colorBy)?this.colorBy[1]:null},hasPresetOpacity(){const e=o.Z.getPresetByName(this.presetName);return Boolean(e&&e.OpacityPoints)},shiftRange(){const e=o.Z.getPresetByName(this.presetName);if(e){let t=1/0,a=-1/0;for(let i=0;iArray.isArray(e.value)?e.value[0]===this.colorByName&&e.value[1]===this.colorByLocation:e.value===this.colorBy))}},watch:{interpolateScalarsBeforeMapping(e){this.updateRepProperty("interpolateScalarsBeforeMapping",e)},colorBy(){if("geometry"===this.available){const e=this.$proxyManager.getRepresentations().filter((e=>e.getInput()===this.source));if(e.forEach((e=>e.setColorBy(this.colorByName,this.colorByLocation))),this.colorByName){const e=this.$proxyManager.getLookupTable(this.colorByName);this.setDataRange(e.getDataRange())}this.interpolateScalarsBeforeMapping=e.reduce(((e,t)=>e||t.getInterpolateScalarsBeforeMapping()),!1),this.$proxyManager.renderAllViews(),this.setPreset()}this.colorByName&&this.updateLookupTableImage()},solidColor(e){const t=n.ZP.hex2float(e);this.updateRepProperty("color",...t)},presetName(){this.renderPreset()},shift(){this.renderPreset()},hasPresetOpacity(e){const t=this.colorByName,a=this.$proxyManager.getPiecewiseFunction(t);e?a.setMode(v.Points):a.setMode(v.Gaussians)},dataRange(){this.applyColorMap()}},proxyManagerHooks:{onProxyRegistrationChange(e){let{proxyGroup:t}=e;"Representations"===t&&this.update()}},mounted(){document.addEventListener("keyup",this.onEsc),this.$nextTick(this.update)},beforeDestroy(){document.removeEventListener("keyup",this.onEsc)},methods:{updateRepProperty(e){const t=`set${s.ZP.capitalize(e)}`,a=this.$proxyManager.getRepresentations().filter((e=>e.getInput()===this.source));for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o{let[t,a]=e;return[(t-i)/n,a]}));t.setPoints(o),i+=this.shift,s+=this.shift,t.setDataRange(i,s)}else t.setDataRange(...this.dataRange)},applyColorMap(){const e=this.colorByName,t=this.$proxyManager.getLookupTable(e);if(t.setPresetName(this.presetName),this.hasPresetOpacity){let[e,a]=this.shiftRange;e+=this.shift,a+=this.shift,t.setDataRange(e,a)}else t.setDataRange(...this.dataRange)},updateLookupTableImage(){const e=this.colorByName,t=this.$proxyManager.getLookupTable(e);this.lutImage=function(e,t,a,i){g.setAttribute("width",i);const s=g.getContext("2d"),n=e.getUint8Table(t,a,i,!0),o=s.getImageData(0,0,i,1);return o.data.set(n),s.putImageData(o,0,0),g.toDataURL("image/jpg")}(t.getLookupTable(),...t.getDataRange(),256),this.piecewiseFunction=this.$proxyManager.getPiecewiseFunction(e)},setPreset(){if(this.colorByName){const e=this.$proxyManager.getLookupTable(this.colorByName);if(this.presetName=e.getPresetName(),this.hasPresetOpacity){const e=this.$proxyManager.getPiecewiseFunction(this.colorByName).getDataRange();this.shift=e[0]-this.shiftRange[0]}}},update(){const e=this.$proxyManager.getRepresentations().filter((e=>e.getInput()===this.source));if(e.length){const t=e.find((e=>"Geometry"===e.getProxyName())),a=e.find((e=>"Volume"===e.getProxyName())),i=e.find((e=>"SliceX"===e.getProxyName()));if(t)this.available="geometry";else{if(!a)return void(this.available="");this.available="volume"}const s=t||a,o=s.getReferenceByName("ui").find((e=>"colorBy"===e.name));o&&(this.arrays=function(e){const t=[];arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&t.push(m);for(let a=0;ae.getInput()===this.source)).find((e=>e.isA("vtkCustomSliceRepresentationProxy")));i&&(i.setUseColorByForColor(this.colorToSlices),i.setUseColorByForOpacity(this.opacityToSlices)),this.$proxyManager.renderAllViews()},setDataRange(e){this.dataRange=[Number(e[0])||0,Number(e[1])||0]},setColorBy(e){this.colorBy=e},saveOriginalRange(e){let{arrayName:t,dataRange:a}=e;this.$set(this.originalLUTRanges,t,a)}}},y=h,f=a(39),b=a(581),x=a(3),w=a.n(x),_=a(582),S=a(601),P=a(613),k=a(637),C=a(608),V=a(610),I=a(611),T=a(638),$=a(640),D=a(652),M=a(653),L=a(634),Z=a(654);e=a.hmd(e);var O={};e.hot,e.hot;var R=(0,b.Z)(y,i,[],!1,(function(e){O.$style=f.Z.locals||f.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return O.$style}})}),null,null);w()(R,{VBtn:_.Z,VCard:S.Z,VCheckbox:P.Z,VContainer:k.Z,VFlex:C.Z,VIcon:V.Z,VLayout:I.Z,VMenu:T.Z,VSelect:$.Z,VSlider:D.Z,VSpacer:M.Z,VTextField:L.Z,VTooltip:Z.Z}),R.options.__file="src/components/controls/ColorBy/index.vue";var B=R.exports},156:function(e,t,a){"use strict";a.d(t,{Z:function(){return y}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.hasFieldData()?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-text",{class:e.$style.blockContent},[a("v-select",{class:e.$style.noSelect,staticStyle:{"margin-bottom":"10px"},attrs:{label:e.name||e.type,items:this.getFieldData().getArrays().map((function(e){return e.getName()})),dense:"",flat:"","hide-details":""},model:{value:e.activeFieldName,callback:function(t){e.activeFieldName=t},expression:"activeFieldName"}}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[e.activeFieldName?a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("Type:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v("\n "+e._s(e.getActiveArray().getDataType())+"\n ")])],1):e._e(),e._v(" "),e.activeFieldName?a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("Min value:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v("\n "+e._s(e.getActiveArray().getRange()[0].toFixed(3))+"\n ")])],1):e._e(),e._v(" "),e.activeFieldName?a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("Max value:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v("\n "+e._s(e.getActiveArray().getRange()[1].toFixed(3))+"\n ")])],1):e._e(),e._v(" "),e.activeFieldName?a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("# of components:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v("\n "+e._s(e.getActiveArray().getNumberOfComponents())+"\n ")])],1):e._e()],1)],1)],1):e._e()};i._withStripped=!0;var s={name:"FieldDataInformation",props:{dataset:{required:!0},name:{type:String},type:{type:String,required:!0}},data:()=>({activeFieldName:null}),mounted(){if(this.hasFieldData()){const e=this.getFieldData().getArrays();this.activeFieldName=e[0].getName()}},methods:{hasFieldData(){return this.dataset[`get${this.type}`]&&this.getFieldData().getArrays().length>0},getFieldData(){return this.dataset[`get${this.type}`]()},getActiveArray(){return this.getFieldData().getArray(this.activeFieldName)}}},n=a(39),o=a(581),r=a(3),l=a.n(r),c=a(601),d=a(607),u=a(637),p=a(608),v=a(611),m=a(640);e=a.hmd(e);var g={};e.hot,e.hot;var h=(0,o.Z)(s,i,[],!1,(function(e){g.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return g.$style}})}),null,null);l()(h,{VCard:c.Z,VCardText:d.ZB,VContainer:u.Z,VFlex:p.Z,VLayout:v.Z,VSelect:m.Z}),h.options.__file="src/components/controls/Information/FieldData/index.vue";var y=h.exports},157:function(e,t,a){"use strict";a.d(t,{Z:function(){return y}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.dataset.isA("vtkImageData")?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle},[a("span",{staticClass:"body-2 font-weight-medium"},[e._v("vtkImageData")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs5:""}},[e._v("Dimensions:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs7:""}},[e._v("\n ("+e._s(e.showVect(e.dataset.getDimensions(),", "))+")\n ")])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs5:""}},[e._v("Origin:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs7:""}},[e._v("\n ("+e._s(e.showVect(e.dataset.getOrigin()))+")\n ")])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs5:""}},[e._v("Spacing:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs7:""}},[e._v("\n ("+e._s(e.showVect(e.dataset.getSpacing()))+")\n ")])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-top":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs5:""}},[e._v("Orientation:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs7:""}},[a("matrix-view",{class:e.$style.matrix,attrs:{matrix:e.dataset.getDirection(),rows:3,columns:3}})],1)],1)],1)],1)],1):e._e()};i._withStripped=!0;var s={name:"ImageDataInformation",props:["dataset"],components:{MatrixView:a(158).Z},methods:{showVect:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:", ";return e.map((e=>e.toFixed(2))).join(t)}}},n=s,o=a(39),r=a(581),l=a(3),c=a.n(l),d=a(601),u=a(607),p=a(637),v=a(608),m=a(611);e=a.hmd(e);var g={};e.hot,e.hot;var h=(0,r.Z)(n,i,[],!1,(function(e){g.$style=o.Z.locals||o.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return g.$style}})}),null,null);c()(h,{VCard:d.Z,VCardText:u.ZB,VCardTitle:u.EB,VContainer:p.Z,VFlex:v.Z,VLayout:m.Z}),h.options.__file="src/components/controls/Information/ImageData/index.vue";var y=h.exports},158:function(e,t,a){"use strict";a.d(t,{Z:function(){return m}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-container",{staticClass:"pa-1"},e._l(e.rows,(function(t){return a("v-layout",{key:t,attrs:{row:"","align-center":""}},e._l(e.columns,(function(i){return a("v-flex",{key:t*e.rows+i},[a("span",{class:e.$style.canSelect},[e._v("\n "+e._s(e.matrix[(t-1)*e.rows+(i-1)].toFixed(2))+"\n ")])])})),1)})),1)};i._withStripped=!0;var s={name:"MatrixViewInformation",props:{rows:{type:Number,required:!0},columns:{type:Number,required:!0},matrix:{required:!0}}},n=a(80),o=a(581),r=a(3),l=a.n(r),c=a(637),d=a(608),u=a(611);e=a.hmd(e);var p={};e.hot,e.hot;var v=(0,o.Z)(s,i,[],!1,(function(e){p.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return p.$style}})}),null,null);l()(v,{VContainer:c.Z,VFlex:d.Z,VLayout:u.Z}),v.options.__file="src/components/controls/Information/MatrixView/index.vue";var m=v.exports},159:function(e,t,a){"use strict";a.d(t,{Z:function(){return v}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.dataset.isA("vtkMolecule")?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle},[a("span",{staticClass:"body-2 font-weight-medium"},[e._v("vtkMolecule")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent})],1):e._e()};i._withStripped=!0;var s={name:"MoleculeInformation",props:["dataset"]},n=a(80),o=a(581),r=a(3),l=a.n(r),c=a(601),d=a(607);e=a.hmd(e);var u={};e.hot,e.hot;var p=(0,o.Z)(s,i,[],!1,(function(e){u.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return u.$style}})}),null,null);l()(p,{VCard:c.Z,VCardText:d.ZB,VCardTitle:d.EB}),p.options.__file="src/components/controls/Information/Molecule/index.vue";var v=p.exports},160:function(e,t,a){"use strict";a.d(t,{Z:function(){return f}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.dataset.isA("vtkPolyData")?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle},[a("span",{staticClass:"body-2 font-weight-medium"},[e._v("vtkPolyData")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("# of points:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v(e._s(e.formatNumbersWithThousandSeparator(e.dataset.getPoints().getNumberOfPoints(),",")))])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("# of cells:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v(e._s(e.formatNumbersWithThousandSeparator(e.dataset.getNumberOfCells(),",")))])],1)],1)],1)],1):e._e()};i._withStripped=!0;var s=a(9);const{formatNumbersWithThousandSeparator:n}=s.ZP;var o={name:"PolyDataInformation",props:["dataset"],methods:{formatNumbersWithThousandSeparator:n}},r=a(39),l=a(581),c=a(3),d=a.n(c),u=a(601),p=a(607),v=a(637),m=a(608),g=a(611);e=a.hmd(e);var h={};e.hot,e.hot;var y=(0,l.Z)(o,i,[],!1,(function(e){h.$style=r.Z.locals||r.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return h.$style}})}),null,null);d()(y,{VCard:u.Z,VCardText:p.ZB,VCardTitle:p.EB,VContainer:v.Z,VFlex:m.Z,VLayout:g.Z}),y.options.__file="src/components/controls/Information/PolyData/index.vue";var f=y.exports},155:function(e,t,a){"use strict";a.d(t,{Z:function(){return v}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.available?a("div",[a("vtk-image-data",{attrs:{dataset:e.source.getDataset()}}),e._v(" "),a("vtk-molecule",{attrs:{dataset:e.source.getDataset()}}),e._v(" "),a("vtk-poly-data",{attrs:{dataset:e.source.getDataset()}}),e._v(" "),a("vtk-field-data",{attrs:{dataset:e.source.getDataset(),name:"Point Data",type:"PointData"}}),e._v(" "),a("vtk-field-data",{attrs:{dataset:e.source.getDataset(),name:"Cell Data",type:"CellData"}})],1):e._e()};i._withStripped=!0;var s=a(156),n=a(157),o=a(159),r=a(160),l={name:"Information",props:["sourceId"],components:{VtkFieldData:s.Z,VtkImageData:n.Z,VtkMolecule:o.Z,VtkPolyData:r.Z},computed:{source(){return this.$proxyManager.getProxyById(this.sourceId)},available(){if(this.source){const e=this.source.getDataset();if(e&&e.isA)return e.isA("vtkPolyData")||e.isA("vtkImageData")}return!1}}},c=a(80),d=a(581);e=a.hmd(e);var u={};e.hot,e.hot;var p=(0,d.Z)(l,i,[],!1,(function(e){u.$style=c.Z.locals||c.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return u.$style}})}),null,null);p.options.__file="src/components/controls/Information/index.vue";var v=p.exports},161:function(e,t,a){"use strict";a.d(t,{Z:function(){return f}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.domains.atomicRadiusScaleFactor?a("div",[a("v-card",{class:e.$style.block,attrs:{light:"",flat:""}},[a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Tolerance")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.tolerance.min,max:e.domains.tolerance.max,step:e.domains.tolerance.step},model:{value:e.tolerance,callback:function(t){e.tolerance=t},expression:"tolerance"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.tolerance.min,max:e.domains.tolerance.max,step:e.domains.tolerance.step},model:{value:e.tolerance,callback:function(t){e.tolerance=t},expression:"tolerance"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Atomic")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.atomicRadiusScaleFactor.min,max:e.domains.atomicRadiusScaleFactor.max,step:e.domains.atomicRadiusScaleFactor.step},model:{value:e.atomicRadiusScaleFactor,callback:function(t){e.atomicRadiusScaleFactor=t},expression:"atomicRadiusScaleFactor"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.atomicRadiusScaleFactor.min,max:e.domains.atomicRadiusScaleFactor.max,step:e.domains.atomicRadiusScaleFactor.step},model:{value:e.atomicRadiusScaleFactor,callback:function(t){e.atomicRadiusScaleFactor=t},expression:"atomicRadiusScaleFactor"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Bond")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.bondRadius.min,max:e.atomicRadiusScaleFactor,step:e.domains.bondRadius.step},model:{value:e.bondRadius,callback:function(t){e.bondRadius=t},expression:"bondRadius"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.bondRadius.min,max:e.atomicRadiusScaleFactor,step:e.domains.bondRadius.step},model:{value:e.bondRadius,callback:function(t){e.bondRadius=t},expression:"bondRadius"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Hide Elements")])]),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":""},model:{value:e.hideElements,callback:function(t){e.hideElements=t},expression:"hideElements"}})],1)],1)],1)],1)],1)],1):e._e()};i._withStripped=!0;var s=a(127).Z.generateComponent("Molecule",[{name:"tolerance",initialValue:1},{name:"atomicRadiusScaleFactor",initialValue:1},{name:"bondRadius",initialValue:1},{name:"hideElements",initialValue:""}],!1,{onChange:{bondRadius:"updateData",atomicRadiusScaleFactor:"updateData"}}),n=a(39),o=a(581),r=a(3),l=a.n(r),c=a(601),d=a(607),u=a(637),p=a(608),v=a(611),m=a(652),g=a(634);e=a.hmd(e);var h={};e.hot,e.hot;var y=(0,o.Z)(s,i,[],!1,(function(e){h.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return h.$style}})}),null,null);l()(y,{VCard:c.Z,VCardText:d.ZB,VContainer:u.Z,VFlex:p.Z,VLayout:v.Z,VSlider:m.Z,VTextField:g.Z}),y.options.__file="src/components/controls/Molecule/index.vue";var f=y.exports},162:function(e,t,a){"use strict";a.d(t,{Z:function(){return b}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.domains.representation||e.domains.opacity||e.domains.sampleDistance?a("div",[e.domains.representation?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("v-select",{attrs:{dense:"",flat:"",label:"Type",items:e.domains.representation.items},model:{value:e.representation,callback:function(t){e.representation=t},expression:"representation"}})],1)],1)],1)],1):e._e(),e._v(" "),e.domains.opacity&&e.domains.pointSize?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle,attrs:{flat:""}},[a("span",{staticClass:"body-2"},[e._v("Mesh")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Point Size")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.pointSize.min,max:e.domains.pointSize.max,step:e.domains.pointSize.step},model:{value:e.pointSize,callback:function(t){e.pointSize=t},expression:"pointSize"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.pointSize.min,max:e.domains.pointSize.max,step:e.domains.pointSize.step},model:{value:e.pointSize,callback:function(t){e.pointSize=t},expression:"pointSize"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Opacity")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.opacity.min,max:e.domains.opacity.max,step:e.domains.opacity.step},model:{value:e.opacity,callback:function(t){e.opacity=t},expression:"opacity"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.opacity.min,max:e.domains.opacity.max,step:e.domains.opacity.step,value:e.opacity},on:{input:function(t){e.opacity=Number(t)}}})],1)],1)],1)],1)],1):e._e(),e._v(" "),e.domains.sampleDistance&&e.domains.edgeGradient?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle,attrs:{flat:""}},[a("span",{staticClass:"body-2"},[e._v("Shadow & Edge")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Sample Distance")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.sampleDistance.min,max:e.domains.sampleDistance.max,step:e.domains.sampleDistance.step},model:{value:e.sampleDistance,callback:function(t){e.sampleDistance=t},expression:"sampleDistance"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.sampleDistance.min,max:e.domains.sampleDistance.max,step:e.domains.sampleDistance.step},model:{value:e.sampleDistance,callback:function(t){e.sampleDistance=t},expression:"sampleDistance"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Edge Gradient")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.edgeGradient.min,max:e.domains.edgeGradient.max,step:e.domains.edgeGradient.step},model:{value:e.edgeGradient,callback:function(t){e.edgeGradient=t},expression:"edgeGradient"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.edgeGradient.min,max:e.domains.edgeGradient.max,step:e.domains.edgeGradient.step},model:{value:e.edgeGradient,callback:function(t){e.edgeGradient=t},expression:"edgeGradient"}})],1)],1)],1)],1)],1):e._e()],1):e._e()};i._withStripped=!0;var s=a(127).Z.generateComponent("Representation",[{name:"pointSize",initialValue:1},{name:"opacity",initialValue:1},{name:"sampleDistance",initialValue:1},{name:"edgeGradient",initialValue:1},{name:"representation",initialValue:"Surface"}]),n=a(39),o=a(581),r=a(3),l=a.n(r),c=a(601),d=a(607),u=a(637),p=a(608),v=a(611),m=a(640),g=a(652),h=a(634);e=a.hmd(e);var y={};e.hot,e.hot;var f=(0,o.Z)(s,i,[],!1,(function(e){y.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return y.$style}})}),null,null);l()(f,{VCard:c.Z,VCardText:d.ZB,VCardTitle:d.EB,VContainer:u.Z,VFlex:p.Z,VLayout:v.Z,VSelect:m.Z,VSlider:g.Z,VTextField:h.Z}),f.options.__file="src/components/controls/Representation/index.vue";var b=f.exports},163:function(e,t,a){"use strict";a.d(t,{Z:function(){return P}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.domains.windowWidth&&e.domains.windowLevel?a("div",[a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle},[a("span",{staticClass:"body-2"},[e._v("Window/Level")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-sm":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Window")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.windowWidth.min,max:e.domains.windowWidth.max,step:e.domains.windowWidth.step},model:{value:e.windowWidth,callback:function(t){e.windowWidth=e._n(t)},expression:"windowWidth"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.windowWidth.min,max:e.domains.windowWidth.max,step:e.domains.windowWidth.step},model:{value:e.windowWidth,callback:function(t){e.windowWidth=e._n(t)},expression:"windowWidth"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Level")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.windowLevel.min,max:e.domains.windowLevel.max,step:e.domains.windowLevel.step},model:{value:e.windowLevel,callback:function(t){e.windowLevel=e._n(t)},expression:"windowLevel"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.windowLevel.min,max:e.domains.windowLevel.max,step:e.domains.windowLevel.step},model:{value:e.windowLevel,callback:function(t){e.windowLevel=e._n(t)},expression:"windowLevel"}})],1)],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle,attrs:{flat:""}},[a("span",{staticClass:"body-2"},[e._v("Slices")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-sm":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{class:e.isSliceAvailable("x")||e.isSliceAvailable("default")&&e.xSliceVisibility?"":e.$style.disable,attrs:{xs2:""}},[a("v-btn",{staticClass:"flex-shrink-0",class:e.$style.button,attrs:{fab:"",small:"",outlined:!e.getToggleSliceX(),dark:e.getToggleSliceX(),color:"blue-grey"},on:{click:function(t){return t.stopPropagation(),e.setToggleSliceX()}}},[a("label",{class:e.$style.smallLabel},[e._v("X")])])],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("x")||e.isSliceAvailable("default")&&e.xSliceVisibility?"":e.$style.disable,attrs:{xs7:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.xSliceDomain.min,max:e.xSliceDomain.max,step:e.xSliceDomain.step},model:{value:e.xSlice,callback:function(t){e.xSlice=e._n(t)},expression:"xSlice"}})],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("x")||e.isSliceAvailable("default")&&e.xSliceVisibility?"":e.$style.disable,attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.xSliceDomain.min,max:e.xSliceDomain.max,step:e.xSliceDomain.step},model:{value:e.xSlice,callback:function(t){e.xSlice=e._n(t)},expression:"xSlice"}})],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("y")||e.isSliceAvailable("default")&&e.ySliceVisibility?"":e.$style.disable,attrs:{xs2:""}},[a("div",{staticStyle:{position:"relative"}},[a("v-btn",{class:e.$style.button,attrs:{fab:"",small:"",outlined:!e.getToggleSliceY(),dark:e.getToggleSliceY(),color:"blue-grey"},on:{click:function(t){return t.stopPropagation(),e.setToggleSliceY()}}},[a("label",{class:e.$style.smallLabel},[e._v("Y")])])],1)]),e._v(" "),a("v-flex",{class:e.isSliceAvailable("y")||e.isSliceAvailable("default")&&e.ySliceVisibility?"":e.$style.disable,attrs:{xs7:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.ySliceDomain.min,max:e.ySliceDomain.max,step:e.ySliceDomain.step},model:{value:e.ySlice,callback:function(t){e.ySlice=e._n(t)},expression:"ySlice"}})],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("y")||e.isSliceAvailable("default")&&e.ySliceVisibility?"":e.$style.disable,attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.ySliceDomain.min,max:e.ySliceDomain.max,step:e.ySliceDomain.step},model:{value:e.ySlice,callback:function(t){e.ySlice=e._n(t)},expression:"ySlice"}})],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("z")||e.isSliceAvailable("default")&&e.zSliceVisibility?"":e.$style.disable,attrs:{xs2:""}},[a("div",{staticStyle:{position:"relative"}},[a("v-btn",{class:e.$style.button,attrs:{fab:"",small:"",outlined:!e.getToggleSliceZ(),dark:e.getToggleSliceZ(),color:"blue-grey"},on:{click:function(t){return t.stopPropagation(),e.setToggleSliceZ()}}},[a("label",{class:e.$style.smallLabel},[e._v("Z")])])],1)]),e._v(" "),a("v-flex",{class:e.isSliceAvailable("z")||e.isSliceAvailable("default")&&e.zSliceVisibility?"":e.$style.disable,attrs:{xs7:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.zSliceDomain.min,max:e.zSliceDomain.max,step:e.zSliceDomain.step},model:{value:e.zSlice,callback:function(t){e.zSlice=e._n(t)},expression:"zSlice"}})],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("z")||e.isSliceAvailable("default")&&e.zSliceVisibility?"":e.$style.disable,attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.zSliceDomain.min,max:e.zSliceDomain.max,step:e.zSliceDomain.step},model:{value:e.zSlice,callback:function(t){e.zSlice=e._n(t)},expression:"zSlice"}})],1)],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle},[a("span",{staticClass:"body-2"},[e._v("Opacity")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-sm":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs9:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:"0",max:"1",step:"0.01"},model:{value:e.opacity,callback:function(t){e.opacity=e._n(t)},expression:"opacity"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:"0",max:"1",step:"0.01"},model:{value:e.opacity,callback:function(t){e.opacity=e._n(t)},expression:"opacity"}})],1)],1)],1)],1)],1)],1):e._e()};i._withStripped=!0;var s=a(127);function n(e){const t=`set${e}`,a=`get${e}`;function i(){let e=null;return s.Z.findProxiesWithMethod(this,a).forEach((t=>{e=t[a]()})),e}return{get:i,set:function(){const e=!i.apply(this);s.Z.findProxiesWithMethod(this,t).forEach((a=>{a[t](e)})),this.$forceUpdate()}}}function o(e){return{set(){},get(){const t={...this.domains[e]};return t&&"min"in t&&"max"in t&&(t.min=Math.floor(t.min),t.max=Math.floor(t.max)),t}}}const r=[{name:"visibility",initialValue:!1},{name:"windowLevel",initialValue:1024},{name:"windowWidth",initialValue:2048},{name:"xSlice",initialValue:-1},{name:"ySlice",initialValue:-1},{name:"zSlice",initialValue:-1},{name:"xSliceVisibility",initialValue:!1},{name:"ySliceVisibility",initialValue:!1},{name:"zSliceVisibility",initialValue:!1},{name:"opacity",initialValue:1},{name:"xSliceDomain",computed:o("xSlice")},{name:"ySliceDomain",computed:o("ySlice")},{name:"zSliceDomain",computed:o("zSlice")},{name:"toggleSliceX",computed:n("XSliceVisibility")},{name:"toggleSliceY",computed:n("YSliceVisibility")},{name:"toggleSliceZ",computed:n("ZSliceVisibility")}];const l=s.Z.generateComponent("SliceControl",r,!0,{});Object.assign(l.methods,{isSliceAvailable:function(e){return!!this.$proxyManager.getViews().filter((e=>e.getContainer())).filter((t=>t.getName()===e)).length}});var c=l,d=a(39),u=a(581),p=a(3),v=a.n(p),m=a(582),g=a(601),h=a(607),y=a(637),f=a(608),b=a(611),x=a(652),w=a(634);e=a.hmd(e);var _={};e.hot,e.hot;var S=(0,u.Z)(c,i,[],!1,(function(e){_.$style=d.Z.locals||d.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return _.$style}})}),null,null);v()(S,{VBtn:m.Z,VCard:g.Z,VCardText:h.ZB,VCardTitle:h.EB,VContainer:y.Z,VFlex:f.Z,VLayout:b.Z,VSlider:x.Z,VTextField:w.Z}),S.options.__file="src/components/controls/SliceControl/index.vue";var P=S.exports},123:function(e,t,a){"use strict";a.d(t,{Z:function(){return y}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",[a("div",{class:e.$style.close},[a("v-btn",{attrs:{text:"",icon:""},on:{click:function(t){return e.$emit("close")}}},[a("v-icon",[e._v("mdi-close")])],1)],1),e._v(" "),a("v-card-title",{staticClass:"text-center"},[a("svg-icon",{class:e.$style.glanceIcon,attrs:{icon:"glance-logo"}})],1),e._v(" "),a("v-card-text",[a("p",{staticClass:"body-1"},[a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://kitware.github.io/glance/"}},[e._v("Glance")]),e._v("\n is an open-source web application developed at\n "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://www.kitware.com/"}},[e._v("Kitware")]),e._v("\n for visualizing volumetric images, molecular structures, geometric\n objects, and point clouds. Also, it can serve as a foundation for building custom web-based\n visualization applications involving\n "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"http://insightsoftwareconsortium.github.io/itk-js/"}},[e._v("ITK.js")]),e._v("\n and\n "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://kitware.github.io/vtk-js/"}},[e._v("VTK.js")]),e._v(".\n ")]),e._v(" "),a("ul",{staticClass:"ml-5"},[a("li",{staticClass:"body-1"},[a("span",[e._v("Here is our")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://kitware.github.io/glance/doc/"}},[e._v("documentation")]),e._v(".\n ")]),e._v(" "),a("li",{staticClass:"body-1"},[a("span",[e._v("Ask questions in our")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://discourse.vtk.org/c/web/volview/13"}},[e._v("community support channel")]),e._v(".\n ")]),e._v(" "),a("li",{staticClass:"body-1"},[a("span",[e._v("Request features and report bugs in our")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://github.com/Kitware/glance/issues"}},[e._v("issue tracker")]),e._v(".\n ")]),e._v(" "),a("li",{staticClass:"body-1"},[a("span",[e._v("We are open source!")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://github.com/Kitware/glance"}},[e._v("Code is on Github")]),e._v(".\n ")]),e._v(" "),a("li",{staticClass:"body-1"},[a("span",[e._v("Current version: "+e._s(e.version))])])]),e._v(" "),a("v-layout",{staticClass:"text-center",attrs:{row:"",wrap:"","align-end":""}},[a("v-flex",{attrs:{xs4:""}},[a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://www.kitware.com"}},[a("svg-icon",{class:e.$style.aboutIcon,attrs:{icon:"kitware"}})],1)]),e._v(" "),a("v-flex",{attrs:{xs4:""}},[a("div",[e._v(" ")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://kitware.github.io/vtk-js/"}},[a("svg-icon",{class:e.$style.aboutIcon,attrs:{icon:"vtkjs"}})],1)]),e._v(" "),a("v-flex",{attrs:{xs4:""}},[a("div",[e._v(" ")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"http://insightsoftwareconsortium.github.io/itk-wasm/"}},[a("svg-icon",{class:e.$style.aboutIcon,attrs:{icon:"itkjs"}})],1)])],1),e._v(" "),a("div",{staticClass:"pt-4 d-block text-center grey--text text--darken-2"},[e._v("\n © "+e._s((new Date).getFullYear())+" — Kitware, Inc.\n ")])],1)],1)};i._withStripped=!0;var s={name:"AboutBox",components:{SvgIcon:a(75).Z},data:()=>({version:"not available"}),created(){window.GLANCE_VERSION&&("master"===window.GLANCE_VERSION?this.version="nightly (master)":this.version=window.GLANCE_VERSION)}},n={close:"AboutBox-close-_khm3",aboutIcon:"AboutBox-aboutIcon-npj_s",glanceIcon:"AboutBox-glanceIcon-x8OkE"},o=a(581),r=a(3),l=a.n(r),c=a(582),d=a(601),u=a(607),p=a(608),v=a(610),m=a(611);e=a.hmd(e);var g={};e.hot,e.hot;var h=(0,o.Z)(s,i,[],!1,(function(e){g.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return g.$style}})}),null,null);l()(h,{VBtn:c.Z,VCard:d.Z,VCardText:u.ZB,VCardTitle:u.EB,VFlex:p.Z,VIcon:v.Z,VLayout:m.Z}),h.options.__file="src/components/core/AboutBox/index.vue";var y=h.exports},150:function(e,t,a){"use strict";a.d(t,{Z:function(){return te}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("drag-and-drop",{attrs:{enabled:!e.landingVisible&&!e.fileUploadDialog},on:{drop:e.openFileList},scopedSlots:e._u([{key:"default",fn:function(t){var i,s=t.dragHover;return[a("v-app",[a("v-navigation-drawer",{attrs:{clipped:e.$vuetify.breakpoint.mdAndUp,"mobile-breakpoint":e.$vuetify.breakpoint.thresholds.sm,app:"",fixed:"","disable-resize-watcher":"",touchless:"",width:"300"},model:{value:e.controlsDrawer,callback:function(t){e.controlsDrawer=t},expression:"controlsDrawer"}},[a("controls-drawer")],1),e._v(" "),a("v-app-bar",{attrs:{app:"","clipped-left":""}},[a("v-app-bar-nav-icon",{attrs:{disabled:e.landingVisible},nativeOn:{click:function(t){t.stopPropagation(),e.controlsDrawer=!e.controlsDrawer}}}),e._v(" "),a("v-tooltip",{attrs:{bottom:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("a",e._g({attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleLanding.apply(null,arguments)}}},i),[a("svg-icon",{staticStyle:{"margin-top":"6px"},attrs:{icon:"glance-logo"+(e.smallScreen?"-mark":""),height:"36px"}})],1)]}}],null,!0)},[e._v(" "),e.landingVisible?a("span",{key:"if-landingVisible"},[e._v("Go to app")]):a("span",{key:"if-landingVisible"},[e._v("Back to landing page")])]),e._v(" "),a("v-spacer"),e._v(" "),a("v-toolbar-items",[e.errors.length?a("v-btn",{key:"if-has-errors",attrs:{text:"",color:"error"},on:{click:function(t){e.errorDialog=!0}}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-alert-circle")]),e._v(" "),a("span",[e._v(e._s(e.errors.length))]),e._v("\n  \n "),a("span",{directives:[{name:"show",rawName:"v-show",value:!e.smallScreen,expression:"!smallScreen"}]},[e._v("error(s)")])],1):e._e()],1),e._v(" "),a("collapsible-toolbar",{attrs:{collapse:e.$vuetify.breakpoint.xsOnly,dense:e.smallScreen},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.state;return[a("collapsible-toolbar-item",{attrs:{state:i},on:{click:e.showFileUpload}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-folder")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:"dense"!==i,expression:"state !== 'dense'"}]},[e._v("Open")])],1),e._v(" "),a("collapsible-toolbar-item",{directives:[{name:"show",rawName:"v-show",value:!e.landingVisible,expression:"!landingVisible"}],attrs:{state:i},on:{click:function(t){return e.saveState()}}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-cloud-download")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:"dense"!==i,expression:"state !== 'dense'"}]},[e._v("Save state")])],1),e._v(" "),a("collapsible-toolbar-item",{directives:[{name:"show",rawName:"v-show",value:!e.landingVisible,expression:"!landingVisible"}],attrs:{state:i},on:{click:function(t){e.screenshotsDrawer=!0}}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-image-multiple")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:"dense"!==i,expression:"state !== 'dense'"}]},[e._v("\n Screenshots ("+e._s(e.screenshotCount)+")\n ")])],1),e._v(" "),a("collapsible-toolbar-item",{attrs:{state:i},on:{click:function(t){e.aboutDialog=!0}}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-information")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:"dense"!==i,expression:"state !== 'dense'"}]},[e._v("About")])],1)]}}],null,!0)})],1),e._v(" "),a("v-content",{style:{position:e.landingVisible?"initial":"fixed"},attrs:{id:e.$style.appContent}},[e.landingVisible?a("landing",{key:"if-landing",on:{open:e.showFileUpload,"open-urls":e.autoLoadRemotes,"open-files":e.openFileList}}):a("layout-view",{key:"if-landing"})],1),e._v(" "),a("v-navigation-drawer",{attrs:{stateless:e.screenshotsDrawerStateless,app:"",right:"",temporary:"",touchless:"",width:"300"},model:{value:e.screenshotsDrawer,callback:function(t){e.screenshotsDrawer=t},expression:"screenshotsDrawer"}},[a("screenshots",{on:{"screenshot-count":function(t){e.screenshotCount=t},close:function(t){e.screenshotsDrawer=!1}}})],1),e._v(" "),a("file-loader",{on:{load:e.doneLoadingFiles},model:{value:e.fileUploadDialog,callback:function(t){e.fileUploadDialog=t},expression:"fileUploadDialog"}}),e._v(" "),a("v-dialog",{attrs:{persistent:"",width:"60%"},model:{value:e.autoloadDialog,callback:function(t){e.autoloadDialog=t},expression:"autoloadDialog"}},[a("v-card",{staticClass:"pa-4"},[a("v-card-title",{staticClass:"justify-center text-center title black--text pv-break-word"},[e._v("\n Loading "+e._s(e.autoloadLabel)+" \n "),1===e.fileLoadingProgress?a("span",[e._v("\n (reading...)\n ")]):e.fileLoadingProgress!==1/0?a("span",[e._v("\n ("+e._s(Math.round(100*e.fileLoadingProgress))+"%)\n ")]):e._e()]),e._v(" "),a("v-card-text",[a("v-progress-linear",{attrs:{indeterminate:e.fileLoadingProgress===1/0,value:100*e.fileLoadingProgress}})],1)],1)],1),e._v(" "),a("state-file-generator"),e._v(" "),a("div",{class:(i={},i[e.$style.overlay]=!0,i[e.$style.overlayVisible]=s,i)},[a("div",{class:e.$style.overlayText},[a("div",{staticClass:"display-3"},[e._v("Drop files here")]),e._v(" "),a("v-icon",{attrs:{size:"4.75rem"}},[e._v("mdi-publish")])],1)]),e._v(" "),a("browser-issues"),e._v(" "),a(e.dialogType,{tag:"component",attrs:{"max-width":"50%"},model:{value:e.aboutDialog,callback:function(t){e.aboutDialog=t},expression:"aboutDialog"}},[a("about-box",{on:{close:function(t){e.aboutDialog=!1}}})],1),e._v(" "),a(e.dialogType,{tag:"component",attrs:{"max-width":"50%"},model:{value:e.errorDialog,callback:function(t){e.errorDialog=t},expression:"errorDialog"}},[a("error-box",{attrs:{errors:e.errors},on:{close:function(t){e.errorDialog=!1},clear:function(t){e.errors=[]}}})],1),e._v(" "),a("v-snackbar",{attrs:{value:!!e.globalSingleNotification,bottom:"",left:"",timeout:e.notifyPermanent?0:6e3},on:{input:function(t){e.globalSingleNotification=""},click:function(t){e.globalSingleNotification=""}}},[e._v("\n "+e._s(e.globalSingleNotification)+"\n "),a("v-btn",{attrs:{text:""}},[e._v("close")])],1),e._v(" "),a("div",{attrs:{id:"app-portal-mount"}})],1)]}}])})};i._withStripped=!0;var s=a(612),n=a(122),o=a.n(n),r=a(690),l=a(622),c=a(9),d=a(123),u=a(124),p=a(125),v=a(175),m=a(176),g=a(177),h=a(315),y=a(316),f=a(319),b=a(321),x=a(75),w=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.collapse?a("v-menu",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:""}},i),[a("v-icon",[e._v("mdi-dots-vertical")])],1)]}}],null,!1,2097855828)},[e._v(" "),a("v-list",[e._t("default",null,{state:e.state})],2)],1):a("v-toolbar-items",[e._t("default",null,{state:e.state})],2)};w._withStripped=!0;var _={name:"CollapsibleToolbar",props:{collapse:{type:Boolean,default:!1},dense:{type:Boolean,default(){return this.$vuetify.breakpoint.smAndDown}}},computed:{state(){return this.collapse?"collapse":this.dense?"dense":"expand"}}},S=a(581),P=a(3),k=a.n(P),C=a(582),V=a(610),I=a(647),T=a(638),$=a(687),D=(0,S.Z)(_,w,[],!1,null,null,null);k()(D,{VBtn:C.Z,VIcon:V.Z,VList:I.Z,VMenu:T.Z,VToolbarItems:$.lj}),D.options.__file="src/components/widgets/CollapsibleToolbar/index.vue";var M=D.exports,L=function(){var e=this,t=e.$createElement,a=e._self._c||t;return"collapse"===e.state?a("v-list-item",e._g({attrs:{link:""}},e.$listeners),[e._t("default")],2):a("v-btn",e._g({attrs:{text:""}},e.$listeners),[e._t("default")],2)};L._withStripped=!0;var Z={name:"CollapsibleToolbarItem",props:{state:{type:String,default:"expand"}}},O=a(641),R=(0,S.Z)(Z,L,[],!1,null,null,null);k()(R,{VBtn:C.Z,VListItem:O.Z}),R.options.__file="src/components/widgets/CollapsibleToolbar/Item/index.vue";var B=R.exports,A=[{key:"ctrl+o",action:"files/promptForFiles"},{key:"ctrl+g",action:"takeScreenshot"},{key:"r",action:"resetActiveCamera"},{key:".",action:"increaseSlice"},{key:",",action:"decreaseSlice"},{key:"b",action:"previousViewPoint"},{key:"n",action:"nextViewPoint"}],F={name:"App",components:{AboutBox:d.Z,BrowserIssues:u.Z,CollapsibleToolbar:M,CollapsibleToolbarItem:B,ControlsDrawer:p.Z,DragAndDrop:v.Z,ErrorBox:m.Z,FileLoader:g.Z,Landing:h.Z,LayoutView:y.Z,Screenshots:f.Z,StateFileGenerator:b.Z,SvgIcon:x.Z,VBottomSheet:r.Z,VDialog:l.Z},provide(){return{$notify:this.notify}},data:()=>({aboutDialog:!1,errorDialog:!1,fileUploadDialog:!1,autoloadDialog:!1,autoloadLabel:"",internalControlsDrawer:!0,screenshotsDrawer:!1,screenshotCount:0,errors:[],globalSingleNotification:"",notifyPermanent:!1}),computed:{controlsDrawer:{get(){return!this.landingVisible&&this.internalControlsDrawer},set(e){this.landingVisible||(this.internalControlsDrawer=e)}},...(0,s.rn)({loadingState:"loadingState",landingVisible:e=>"landing"===e.route,screenshotsDrawerStateless(e){return this.screenshotsDrawer&&!!e.screenshotDialog},smallScreen(){return this.$vuetify.breakpoint.smAndDown},dialogType(){return this.smallScreen?"v-bottom-sheet":"v-dialog"}}),...(0,s.Se)("files",{anyFileLoadingErrors:"anyErrors",fileLoadingProgress:"totalProgress"})},proxyManagerHooks:{onProxyModified(){this.loadingState||this.$proxyManager.autoAnimateViews()}},created(){this.internalControlsDrawer=!this.smallScreen},mounted(){var e=this;this.$root.$on("open_girder_panel",(()=>{this.fileUploadDialog=!0})),this.initViews(),this.initializeAnimations(),A.forEach((e=>{let{key:t,action:a}=e;return o().bind(t,(e=>{e.preventDefault(),this.$store.dispatch(a)}))})),window.addEventListener("error",this.recordError),c.ZP.setLoggerFunction("error",(function(){for(var t=arguments.length,a=new Array(t),i=0;i{let{key:t}=e;return o().unbind(t)}))},methods:{...(0,s.OI)({showApp:"showApp",showLanding:"showLanding",toggleLanding(){this.landingVisible?this.showApp():this.showLanding()}}),...(0,s.nv)({saveState:"saveState",initViews:"views/initViews"}),...(0,s.nv)("files",["openFiles","openRemoteFiles","load","resetQueue"]),...(0,s.nv)("animations",["initializeAnimations"]),showFileUpload(){this.fileUploadDialog=!0},openFileList(e){this.fileUploadDialog=!0,this.$nextTick((()=>this.openFiles(Array.from(e))))},autoLoadRemotes(e,t,a){const i=t.map(((e,t)=>({name:a[t],url:e})));this.autoloadDialog=!0,this.autoloadLabel=e,setTimeout((()=>this.openRemoteFiles(i).then((()=>this.load())).then((()=>{this.anyFileLoadingErrors?this.$nextTick((()=>{this.fileUploadDialog=!0})):this.doneLoadingFiles()})).finally((()=>{this.resetQueue(),this.autoloadDialog=!1}))),10)},doneLoadingFiles(){this.showApp()},recordError(e){this.errors.push(e)},notify(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.globalSingleNotification&&(this.globalSingleNotification="",this.permanent=!1),this.$nextTick((()=>{this.globalSingleNotification=e,this.notifyPermanent=t}))}}},N=F,E={appContent:"App-appContent-GhXJH",overlay:"App-overlay-B_drw",overlayVisible:"App-overlayVisible-XKImt",overlayText:"App-overlayText-WTZRN",noTransition:"App-noTransition-IOu4K"},j=a(691),G=a(692),z=a(693),U=a(601),W=a(607),H=a(694),K=a(695),q=a(603),Y=a(666),X=a(653),J=a(654);e=a.hmd(e);var Q={};e.hot,e.hot;var ee=(0,S.Z)(N,i,[],!1,(function(e){Q.$style=E.locals||E,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return Q.$style}})}),null,null);k()(ee,{VApp:j.Z,VAppBar:G.Z,VAppBarNavIcon:z.Z,VBtn:C.Z,VCard:U.Z,VCardText:W.ZB,VCardTitle:W.EB,VContent:H.Z,VDialog:l.Z,VIcon:V.Z,VNavigationDrawer:K.Z,VProgressLinear:q.Z,VSnackbar:Y.Z,VSpacer:X.Z,VToolbarItems:$.lj,VTooltip:J.Z}),ee.options.__file="src/components/core/App/index.vue";var te=ee.exports},124:function(e,t,a){"use strict";a.d(t,{Z:function(){return y}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-dialog",{attrs:{width:"90%","max-width":"900px"},model:{value:e.dialog,callback:function(t){e.dialog=t},expression:"dialog"}},[a("v-card",[a("v-card-title",{staticClass:"title"},[e._v("Welcome to ParaView Glance!")]),e._v(" "),a("v-card-text",{staticClass:"body-2"},[a("p",[e._v("\n You may experience slower rendering speeds because of the following\n reason(s):\n ")]),e._v(" "),a("ul",{staticClass:"pl-10"},[e.issues.webglVersion?a("li",[e._v("\n Detected WebGL version "+e._s(e.issues.webglVersion)+". For best performance,\n please use a computer and/or browser with at least WebGL 2.\n ")]):e._e(),e._v(" "),e.issues.integratedGPU?a("li",[e._v('\n Using GPU "'+e._s(e.issues.integratedGPU)+'". A dedicated GPU would\n offer better performance.\n '),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://wevideo.zendesk.com/hc/en-us/articles/225259448-How-to-enable-WebGL"}},[e._v("\n More info on enabling dedicated GPUs in browsers.\n ")])]):e._e()])]),e._v(" "),a("v-card-actions",{staticClass:"d-flex justify-space-between align-center pa-5"},[a("v-checkbox",{staticClass:"mt-0 pt-0",attrs:{label:"Don't show again","hide-details":"",value:e.suppressBrowserWarning},on:{input:e.setSuppressBrowserWarning}}),e._v(" "),a("v-btn",{attrs:{color:"primary"},on:{click:function(t){e.dialog=!1}}},[e._v("\n Okay\n ")])],1)],1)],1)};i._withStripped=!0;var s=a(612);var n={name:"BrowserIssues",data:()=>({issues:{},dialog:!1}),computed:(0,s.rn)(["suppressBrowserWarning"]),mounted(){this.getBrowserIssues()},methods:{getBrowserIssues:function(){const e=this.$proxyManager.getViews()[0];if(e){const t=e.getOpenGLRenderWindow().getGLInformations(),{UNMASKED_RENDERER:a,UNMASKED_VENDOR:i,WEBGL_VERSION:s}=t;s.value<2&&this.$set(this.issues,"webglVersion",s.value);-1!==`${i.value} / ${a.value}`.toLowerCase().indexOf("intel")&&this.$set(this.issues,"integratedGPU",a.value)}Object.keys(this.issues).length&&!this.suppressBrowserWarning&&(this.dialog=!0)},...(0,s.nv)({setSuppressBrowserWarning:"suppressBrowserWarning"})}},o={},r=a(581),l=a(3),c=a.n(l),d=a(582),u=a(601),p=a(607),v=a(613),m=a(622);e=a.hmd(e);var g={};e.hot,e.hot;var h=(0,r.Z)(n,i,[],!1,(function(e){g.$style=o.locals||o,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return g.$style}})}),null,null);c()(h,{VBtn:d.Z,VCard:u.Z,VCardActions:p.h7,VCardText:p.ZB,VCardTitle:p.EB,VCheckbox:v.Z,VDialog:m.Z}),h.options.__file="src/components/core/BrowserIssues/index.vue";var y=h.exports},125:function(e,t,a){"use strict";a.d(t,{Z:function(){return f}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-tabs",{class:e.$style.tabsContainer,attrs:{centered:"",grow:""},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[a("v-tab",[e._v("Datasets")]),e._v(" "),a("v-tab",[e._v("Tools")]),e._v(" "),a("v-tab",[e._v("Global")]),e._v(" "),a("v-tabs-items",{class:e.$style.tabItems,attrs:{touchless:""},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[a("v-tab-item",{class:e.$style.tabItem},[a("datasets")],1),e._v(" "),a("v-tab-item",{class:e.$style.tabItem,attrs:{eager:""}},[a("edit-tools")],1),e._v(" "),a("v-tab-item",{class:e.$style.tabItem},[a("global-settings")],1)],1)],1)};i._withStripped=!0;var s=a(79),n=a(165),o=a(171),r={name:"ControlsDrawer",components:{Datasets:s.Z,EditTools:n.Z,GlobalSettings:o.Z},data:()=>({activeTab:0})},l={tabsContainer:"ControlsDrawer-tabsContainer-D9UMb",tabItems:"ControlsDrawer-tabItems-O9Lf9",tabItem:"ControlsDrawer-tabItem-voKeM",tabComponent:"ControlsDrawer-tabComponent-K9eUY"},c=a(581),d=a(3),u=a.n(d),p=a(670),v=a(671),m=a(672),g=a(675);e=a.hmd(e);var h={};e.hot,e.hot;var y=(0,c.Z)(r,i,[],!1,(function(e){h.$style=l.locals||l,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return h.$style}})}),null,null);u()(y,{VTab:p.Z,VTabItem:v.Z,VTabs:m.Z,VTabsItems:g.Z}),y.options.__file="src/components/core/ControlsDrawer/index.vue";var f=y.exports},79:function(e,t,a){"use strict";a.d(t,{Z:function(){return D}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-expansion-panels",{attrs:{multiple:"",accordion:""},model:{value:e.panelState,callback:function(t){e.panelState=t},expression:"panelState"}},e._l(e.datasets,(function(t,i){return a("v-expansion-panel",{key:t,class:e.$style.datasetPanel},[a("v-expansion-panel-header",{staticClass:"pv-no-select pl-3 pr-3 pt-1 pb-1",class:e.$style.panelHeader},[a("v-btn",{staticClass:"flex-shrink-0",attrs:{icon:"",small:""},on:{click:function(a){return a.stopPropagation(),e.toggleDatasetVisibility(t)}}},[a("v-icon",[e._v("\n "+e._s(e.getDatasetVisibility(t)?"mdi-eye":"mdi-eye-off")+"\n ")])],1),e._v(" "),a("div",{staticClass:"subtitle-2 text-truncate pl-2 pr-2",attrs:{title:e.getSourceName(t)}},[e._v("\n "+e._s(e.getSourceName(t))+"\n ")]),e._v(" "),a("v-spacer"),e._v(" "),e.datasets.length>1?a("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var s=i.on;return[a("v-btn",e._g({class:e.$style.headerMenuButton,attrs:{icon:"",small:""},on:{click:function(a){return a.stopPropagation(),e.activateSource(t)}}},s),[a("v-icon",[e._v("\n "+e._s(e.activeSourceId===t?"mdi-bookmark-check":"mdi-bookmark-outline")+"\n ")])],1)]}}],null,!0)},[a("span",{staticClass:"pv-no-select"},[e._v("Activate source")])]):e._e(),e._v(" "),a("div",{on:{click:function(e){e.stopPropagation()}}},[a("v-menu",{attrs:{"offset-x":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.headerMenuButton,attrs:{icon:"",small:""}},i),[a("v-icon",[e._v("mdi-dots-vertical")])],1)]}}],null,!0)},[e._v(" "),a("v-list",{attrs:{dense:""}},[a("v-list-item",{on:{click:function(a){return e.deleteDataset(t)}}},[a("v-list-item-title",[e._v("Delete")])],1),e._v(" "),a("v-list-item",{on:{click:function(a){return e.uploadDataset(t)}}},[a("v-list-item-title",[e._v("Upload To Girder")])],1)],1)],1)],1)],1),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent,attrs:{eager:""}},[a("color-group",{attrs:{index:i,visible:e.datasets.length>1}}),e._v(" "),a("v-expansion-panels",{attrs:{multiple:"",accordion:""},model:{value:e.subpanels[t],callback:function(a){e.$set(e.subpanels,t,a)},expression:"subpanels[sourceId]"}},e._l(e.panels,(function(i,s){return i.visible(e.$proxyManager.getProxyById(t))?a("v-expansion-panel",{key:s,class:e.$style.subpanel},[a("v-expansion-panel-header",{staticClass:"pv-no-select",class:e.$style.subpanelHeader},[a("v-icon",{staticClass:"flex-grow-0",attrs:{left:""}},[e._v(e._s(i.icon))]),e._v(" "),a("span",{staticClass:"body-2 font-weight-medium flex-grow-0"},[e._v("\n "+e._s(i.name)+"\n ")])],1),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent,attrs:{eager:""}},[a(i.component,{tag:"component",attrs:{sourceId:t}})],1)],1):e._e()})),1)],1)],1)})),1)};i._withStripped=!0;var s=a(612),n=a(151),o=a(155),r=a(161),l=a(162),c=a(163),d=[{component:l.Z,defaultExpand:!0,icon:"mdi-brightness-6",name:"Representation",visible:e=>e.getDataset().isA("vtkPolyData")||e.getDataset().isA("vtkImageData")},{component:n.Z,defaultExpand:!0,icon:"mdi-invert-colors",name:"Colors",visible:e=>e.getDataset().isA("vtkPolyData")||e.getDataset().isA("vtkImageData")},{component:c.Z,defaultExpand:!0,icon:"mdi-tune",name:"Slice",visible:e=>e.getDataset().isA("vtkImageData")},{component:r.Z,defaultExpand:!0,icon:"mdi-molecule",name:"Molecule",visible:e=>e.getDataset().isA("vtkMolecule")},{component:o.Z,defaultExpand:!1,icon:"mdi-help-circle-outline",name:"Information",visible:e=>e.getDataset().isA("vtkPolyData")||e.getDataset().isA("vtkImageData")}],u={name:"Datasets",components:{ColorGroup:a(164).Z},data:()=>({datasets:[],internalPanelState:{},subpanels:{},activeSourceId:-1}),computed:{...(0,s.rn)({collapseDatasetPanels:"collapseDatasetPanels",panels:e=>{const t=Object.keys(e.panels).map((e=>Number(e)));return t.sort(((e,t)=>e-t)),[].concat(...t.map((t=>e.panels[t])))}}),...(0,s.rn)("widgets",["imageToLabelmaps"]),panelState:{get(){const e=[];for(let t=0;t-1}}},smallScreen(){return this.$vuetify.breakpoint.smAndDown}},created(){d.forEach(((e,t)=>this.addPanel(e,t+10)))},mounted(){this.updateDatasetList()},proxyManagerHooks:{onProxyModified(){this.updateDatasetList()},onProxyCreated(e){let{proxyGroup:t,proxyName:a}=e;"Sources"===t&&"TrivialProducer"===a&&this.updateDatasetList()},onProxyDeleted(e){let{proxyId:t,proxyGroup:a,proxyName:i}=e;if("Sources"===a&&"TrivialProducer"===i){this.datasets.indexOf(t)>-1&&(this.$delete(this.internalPanelState,t),this.$delete(this.subpanels,t),this.updateDatasetList())}},onActiveSourceChange(e){this.activeSourceId=e?e.getProxyId():-1}},methods:{updateDatasetList(){const e=this.$proxyManager.getSources().filter((e=>"Sources"===e.getProxyGroup()&&"TrivialProducer"===e.getProxyName())).filter((e=>Boolean(e.getDataset())));for(let t=0;te.visible(a))).map(((e,t)=>e.defaultExpand?t:-1)).filter((e=>e>-1)))}this.datasets=e.map((e=>e.getProxyId())),this.$store.dispatch("views/updateMasterSourceId",this.datasets)},getSourceName(e){const t=this.$proxyManager.getProxyById(e);return t?t.getName():null},activateSource(e){const t=this.$proxyManager.getProxyById(e);return t&&t.activate(),null},deleteDataset(e){const t=this.$proxyManager.getProxyById(e);t&&this.$proxyManager.deleteProxy(t)},uploadDataset(e){this.$proxyManager.getProxyById(e)&&(this.$root.$emit("open_girder_panel"),setTimeout((()=>{this.$root.$emit("girder_upload_proxy",e)}),10))},getDatasetVisibility(e){const t=this.$proxyManager.getRepresentations().find((t=>t.getInput().getProxyId()===e));return!!t&&t.isVisible()},toggleDatasetVisibility(e){const t=!this.getDatasetVisibility(e),a=this.imageToLabelmaps[e]||[];this.$proxyManager.getRepresentations().filter((t=>{const i=t.getInput().getProxyId();return i===e||a.indexOf(i)>-1})).forEach((e=>e.setVisibility(t))),this.$forceUpdate()},addPanel(e,t){this.$store.commit("addPanel",{component:e,priority:t})}}},p=u,v=a(80),m=a(581),g=a(3),h=a.n(g),y=a(582),f=a(655),b=a(656),x=a(657),w=a(658),_=a(610),S=a(647),P=a(641),k=a(646),C=a(638),V=a(653),I=a(654);e=a.hmd(e);var T={};e.hot,e.hot;var $=(0,m.Z)(p,i,[],!1,(function(e){T.$style=v.Z.locals||v.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return T.$style}})}),null,null);h()($,{VBtn:y.Z,VExpansionPanel:f.Z,VExpansionPanelContent:b.Z,VExpansionPanelHeader:x.Z,VExpansionPanels:w.Z,VIcon:_.Z,VList:S.Z,VListItem:P.Z,VListItemTitle:k.V9,VMenu:C.Z,VSpacer:V.Z,VTooltip:I.Z}),$.options.__file="src/components/core/Datasets/index.vue";var D=$.exports},165:function(e,t,a){"use strict";a.d(t,{Z:function(){return b}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-expansion-panels",{attrs:{accordion:""}},[a("v-expansion-panel",[a("v-expansion-panel-header",{staticClass:"subtitle-2"},[e._v("\n Measurements\n ")]),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent,attrs:{eager:""}},[a("measurement-tools",{attrs:{enabled:"measurement"===e.enabledTool},on:{enable:function(t){return e.setEnabledTool("measurement",t)}}})],1)],1),e._v(" "),a("v-expansion-panel",[a("v-expansion-panel-header",{staticClass:"subtitle-2"},[e._v("\n Painting\n ")]),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent},[a("paint-tool",{attrs:{enabled:"paint"===e.enabledTool},on:{enable:function(t){return e.setEnabledTool("paint",t)}}})],1)],1),e._v(" "),a("v-expansion-panel",[a("v-expansion-panel-header",{staticClass:"subtitle-2"},[e._v("\n Cropping\n ")]),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent},[a("crop-tool",{attrs:{enabled:"crop"===e.enabledTool},on:{enable:function(t){return e.setEnabledTool("crop",t)}}})],1)],1),e._v(" "),a("v-expansion-panel",[a("v-expansion-panel-header",{staticClass:"subtitle-2"},[e._v("\n Median Filter\n ")]),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent},[a("median-filter")],1)],1)],1)};i._withStripped=!0;var s=a(166),n=a(128),o=a(167),r=a(168),l={name:"EditTools",components:{PaintTool:s.Z,MeasurementTools:n.Z,CropTool:o.Z,MedianFilter:r.Z},data:()=>({enabledTool:""}),methods:{setEnabledTool(e,t){this.enabledTool=t?e:""}}},c={panelContent:"EditTools-panelContent-wgcJ9"},d=a(581),u=a(3),p=a.n(u),v=a(655),m=a(656),g=a(657),h=a(658);e=a.hmd(e);var y={};e.hot,e.hot;var f=(0,d.Z)(l,i,[],!1,(function(e){y.$style=c.locals||c,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return y.$style}})}),null,null);p()(f,{VExpansionPanel:v.Z,VExpansionPanelContent:m.Z,VExpansionPanelHeader:g.Z,VExpansionPanels:h.Z}),f.options.__file="src/components/core/EditTools/index.vue";var b=f.exports},176:function(e,t,a){"use strict";a.d(t,{Z:function(){return g}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",[a("v-card-title",{staticClass:"title"},[e._v("Application errors")]),e._v(" "),a("v-card-text",[a("p",[e._v("\n The following is debug output for errors that have occurred. Please\n copy and paste the below text and post it to our\n "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://github.com/Kitware/Glance/issues"}},[e._v("issue tracker")]),e._v(".\n ")]),e._v(" "),a("textarea",{ref:"errorTextarea",class:e.$style.errorTextarea,attrs:{readonly:""}},[e._v(e._s(e.readableErrors))])]),e._v(" "),a("v-card-actions",[a("v-btn",{attrs:{color:"secondary"},on:{click:function(t){return e.$emit("clear")}}},[e._v("\n Clear Errors\n ")]),e._v(" "),a("v-spacer"),e._v(" "),a("v-btn",{on:{click:function(t){return e.$emit("close")}}},[e._v("Cancel")]),e._v(" "),e.isClipboardEnabled()?a("v-btn",{key:"if-clipboard-enabled",attrs:{color:"info",loading:e.copiedToClipboard},on:{click:e.copyErrorToClipboard}},[a("span",[e._v("Copy to clipboard")]),e._v(" "),a("span",{attrs:{slot:"loader"},slot:"loader"},[e._v("Copied!")])]):e._e()],1)],1)};i._withStripped=!0;var s={name:"ErrorBox",props:{errors:{type:Array,default:[]}},data:()=>({copiedToClipboard:!1}),computed:{readableErrors(){const e=window.GLANCE_VERSION||"not available",t=this.errors.map((e=>e instanceof ErrorEvent?e.message:e)).join("\n");return`ParaViewGlance: ${e}\n${navigator.userAgent}\n\n\`\`\`\n${t}\n\`\`\``}},methods:{isClipboardEnabled:function(){try{return document.queryCommandSupported("copy")}catch(e){return!1}},copyErrorToClipboard:function(){this.$refs.errorTextarea.select(),document.execCommand("copy")&&(this.copiedToClipboard=!0,window.setTimeout((()=>{this.copiedToClipboard=!1}),2e3))}}},n={errorTextarea:"ErrorBox-errorTextarea-_ViHl"},o=a(581),r=a(3),l=a.n(r),c=a(582),d=a(601),u=a(607),p=a(653);e=a.hmd(e);var v={};e.hot,e.hot;var m=(0,o.Z)(s,i,[],!1,(function(e){v.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return v.$style}})}),null,null);l()(m,{VBtn:c.Z,VCard:d.Z,VCardActions:u.h7,VCardText:u.ZB,VCardTitle:u.EB,VSpacer:p.Z}),m.options.__file="src/components/core/ErrorBox/index.vue";var g=m.exports},177:function(e,t,a){"use strict";a.d(t,{Z:function(){return M}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-dialog",{attrs:{width:"70%",value:e.value,persistent:e.loading,fullscreen:e.$vuetify.breakpoint.smAndDown},on:{input:e.onDialogChange,"click:outside":function(t){!e.loading&&e.close()}}},[a("v-card",[a("v-card-text",{staticClass:"pa-0"},[a("v-card",{attrs:{flat:""}},[a("v-card-text",[a("v-container",[a("v-tabs",{model:{value:e.active_tab,callback:function(t){e.active_tab=t},expression:"active_tab"}},[a("v-tab",[e._v("Local")]),e._v(" "),e.girderRest?a("v-tab",[e._v("Girder")]):e._e(),e._v(" "),a("v-tab-item",{attrs:{transition:"fade-transition"}},[a("drag-and-drop",{attrs:{enabled:""},on:{drop:function(t){return e.openFiles(t)}},scopedSlots:e._u([{key:"default",fn:function(t){var i,s=t.dragHover;return[a("v-row",{staticClass:"pa-3",class:(i={},i[e.$style.dragBox]=!0,i[e.$style.dropTarget]=s,i),attrs:{align:"center"},on:{click:e.promptLocal}},[a("v-btn",[e._v("browse")]),e._v(" "),a("span",{staticClass:"ml-2"},[e._v("\n or drop your files here\n ")])],1)]}}])})],1),e._v(" "),e.girderRest?a("v-tab-item",{attrs:{transition:"fade-transition"}},[a("girder-box")],1):e._e()],1),e._v(" "),a("v-row",{staticClass:"mt-2"},[a("v-expansion-panels",{attrs:{accordion:""}},e._l(e.fileList,(function(t,i){return a("v-expansion-panel",{key:i},[a("v-expansion-panel-header",{attrs:{"disable-icon-rotate":""},scopedSlots:e._u([{key:"actions",fn:function(){return[a("div",{staticClass:"d-flex flex-row align-center"},["ready"===t.state?[a("v-icon",{attrs:{color:"teal"}},[e._v("mdi-check")])]:"error"===t.state?[a("v-icon",{attrs:{color:"error"}},[e._v("mdi-alert")])]:"needsInfo"===t.state?[a("v-icon",{attrs:{color:"blue"}},[e._v("mdi-information")])]:"loading"===t.state||"needsDownload"===t.state?[a("v-progress-circular",{attrs:{indeterminate:"",color:"secondary",size:"16",width:"2"}})]:e._e(),e._v(" "),a("v-btn",{staticClass:"ml-3",attrs:{icon:""}},[a("v-icon",{on:{click:function(t){return t.stopPropagation(),e.deleteFileAtRevIndex(i)}}},[e._v("mdi-delete")])],1)],2)]},proxy:!0},{key:"default",fn:function(i){i.open;return[a("v-row",{staticStyle:{width:"80%"},attrs:{"no-gutters":""}},[a("v-col",{attrs:{cols:"8"}},[e._v(e._s(t.name))]),e._v(" "),a("v-col",{staticClass:"text--secondary pr-3 text-right",attrs:{cols:"4"}},["error"===t.state?a("span",[e._v("\n Click to see error\n ")]):"raw"===t.ext?a("span",[e._v("\n Click to edit raw file info\n ")]):"glance"===t.ext?a("span",[e._v("\n State file will be loaded first\n ")]):e._e()])],1)]}}],null,!0)}),e._v(" "),a("v-expansion-panel-content",["error"===t.state?[e._v("\n "+e._s(t.error)+"\n ")]:"raw"===t.ext?[a("raw-file-reader",{attrs:{file:t.files[0]},on:{change:function(t){return e.setRawFileInfoAtRevIndex(i,t)}}})]:e._e()],2)],1)})),1)],1)],1)],1),e._v(" "),a("v-card-actions",[a("v-spacer"),e._v(" "),e.anyErrors?a("span",{staticClass:"red--text mr-3"},[e._v("Only checked files will be loaded.")]):e._e(),e._v(" "),a("v-btn",{attrs:{text:"",disabled:e.loading},on:{click:e.close}},[e._v("\n Cancel\n ")]),e._v(" "),a("v-btn",{attrs:{color:"primary",disabled:e.loading||e.pendingFiles||!e.hasReadyFiles},on:{click:e.loadFiles}},[e._v("\n "+e._s(e.loading?"Loading...":"Load")+"\n ")])],1)],1)],1)],1)],1)};i._withStripped=!0;var s=a(612),n=a(178),o=a(175),r=a(179),l={name:"FileLoader",components:{RawFileReader:n.Z,DragAndDrop:o.Z,GirderBox:r.Z},inject:["girderRest"],props:{value:{type:Boolean,default:!1}},data:()=>({loading:!1,active_tab:0}),mounted(){this.$root.$on("open_girder_panel",(()=>{this.active_tab=1}))},computed:{...(0,s.rn)("files",{fileList:e=>Array.from(e.fileList).reverse(),pendingFiles:e=>e.fileList.reduce(((e,t)=>e||"ready"!==t.state&&"error"!==t.state),!1),hasReadyFiles:e=>e.fileList.reduce(((e,t)=>e||"ready"===t.state),!1)}),...(0,s.Se)("files",["anyErrors"])},methods:{...(0,s.nv)("files",["openFiles","promptLocal","deleteFile","setRawFileInfo","load","resetQueue"]),loadFiles(){this.loading=!0,this.load().finally((()=>{this.close(),this.$emit("load"),setTimeout((()=>{this.loading=!1}),10)}))},deleteFileAtRevIndex(e){return this.deleteFile(this.fileList.length-1-e)},setRawFileInfoAtRevIndex(e,t){return this.setRawFileInfo({index:this.fileList.length-1-e,info:t})},onDialogChange(e){e?this.$emit("input",!0):this.close()},close(){this.$emit("input",!1),setTimeout((()=>this.resetQueue()),10)}}},c={dragBox:"FileLoader-dragBox-wtic9",dropTarget:"FileLoader-dropTarget-KZYE7"},d=a(581),u=a(3),p=a.n(u),v=a(582),m=a(601),g=a(607),h=a(683),y=a(637),f=a(622),b=a(655),x=a(656),w=a(657),_=a(658),S=a(610),P=a(599),k=a(680),C=a(653),V=a(670),I=a(671),T=a(672);e=a.hmd(e);var $={};e.hot,e.hot;var D=(0,d.Z)(l,i,[],!1,(function(e){$.$style=c.locals||c,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return $.$style}})}),null,null);p()(D,{VBtn:v.Z,VCard:m.Z,VCardActions:g.h7,VCardText:g.ZB,VCol:h.Z,VContainer:y.Z,VDialog:f.Z,VExpansionPanel:b.Z,VExpansionPanelContent:x.Z,VExpansionPanelHeader:w.Z,VExpansionPanels:_.Z,VIcon:S.Z,VProgressCircular:P.Z,VRow:k.Z,VSpacer:C.Z,VTab:V.Z,VTabItem:I.Z,VTabs:T.Z}),D.options.__file="src/components/core/FileLoader/index.vue";var M=D.exports},179:function(e,t,a){"use strict";a.d(t,{Z:function(){return Z}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-container",[a("v-row",{attrs:{"no-gutters":"",align:"center"}},[a("v-col",[a("v-text-field",{attrs:{label:"Girder URL","single-line":"",outlined:"","hide-details":""},model:{value:e.newGirderURL,callback:function(t){e.newGirderURL=t},expression:"newGirderURL"}})],1),e._v(" "),a("v-btn",{staticClass:"ml-2",attrs:{disabled:e.noURLChange,text:""},on:{click:function(t){e.changeURLPrompt=!0}}},[e._v("\n Update\n ")]),e._v(" "),e.loggedOut?e._e():a("v-btn",{staticClass:"ml-2",attrs:{tile:"",color:"secondary"},on:{click:e.logout}},[e._v("\n Log out\n ")])],1),e._v(" "),a("v-row",[e.loggedOut?a("v-col",[a("GirderAuthentication",{key:e.girderRest.token,attrs:{register:"",oauth:!0}}),e._v(" "),a("div",{staticClass:"mt-2"},[a("v-icon",[e._v("mdi-information")]),e._v(" "),a("span",[e._v("Logging in will refresh and lose any unsaved data.")])],1)],1):e._e(),e._v(" "),a("v-col",[a("GirderFileManager",{ref:"girderFileManager",attrs:{"root-location-disabled":!1,selectable:!0,location:e.location},on:{"update:location":function(t){e.location=t}},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}}),e._v(" "),a("v-toolbar",[a("v-spacer"),e._v(" "),a("v-btn",{staticClass:"mt-4",attrs:{disabled:!e.selected.length},on:{click:function(t){return e.load()}}},[e._v("\n Select\n ")])],1)],1)],1),e._v(" "),a("v-dialog",{attrs:{width:"30%"},model:{value:e.changeURLPrompt,callback:function(t){e.changeURLPrompt=t},expression:"changeURLPrompt"}},[a("v-card",[a("v-card-title",[e._v("Change Girder URL")]),e._v(" "),a("v-card-text",[e._v("\n Changing the girder URL to "),a("pre",[e._v(e._s(e.newGirderURL))]),e._v(" will require a refresh.\n Do you want to continue?\n ")]),e._v(" "),a("v-card-actions",[a("v-spacer"),e._v(" "),a("v-btn",{attrs:{text:""},on:{click:function(t){e.changeURLPrompt=!1}}},[e._v("Cancel")]),e._v(" "),a("v-btn",{attrs:{color:"primary"},on:{click:e.refreshPage}},[e._v("Refresh")])],1)],1)],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}]},[a("girder-upload",{ref:"girderUploader",attrs:{dest:e.location}})],1)],1)};i._withStripped=!0;var s=a(75),n=a(612),o=a(79),r=a(677),l=a(679),c=a(523),d=a(520),u=a(84),p=a(521),v=a(406),m=a(522);function g(e,t){const a=new Blob([e]);return new File([a],t)}var h={name:"GirderBox",components:{SvgIcon:s.Z,GirderAuthentication:r.Z,GirderFileManager:l.Z,Datasets:o.Z,GirderUpload:c.Z},inject:["girderRest","$notify"],data(){return{selected:[],internalLocation:null,changeServer:!1,newGirderURL:this.girderRest.apiRoot,changeURLPrompt:!1}},computed:{currentUserLogin(){return this.girderRest.user?this.girderRest.user.login:"anonymous"},loggedOut(){return null===this.girderRest.user},location:{get(){return this.internalLocation||(this.loggedOut?{_id:"5e84eb3e2660cbefba7d71d9",_modelType:"folder"}:this.girderRest.user)},set(e){this.internalLocation=e}},noURLChange(){return this.newGirderURL===this.girderRest.apiRoot},...(0,n.rn)("widgets",{dataMeasurements:"measurements"})},mounted(){this.$root.$on("girder_upload_proxy",(e=>{this.upload(e)})),this.$root.$on("girder_upload_measurements",(e=>{this.uploadMeasurements(e)}))},methods:{load(){const e=this.selected.map((e=>({url:`${this.girderRest.apiRoot}/item/${e._id}/download`,name:e.name,withGirderToken:!0,proxyKeys:{girderProvenance:{...this.location,apiRoot:this.girderRest.apiRoot},girderItem:{itemId:e._id,itemName:e.name},meta:e.meta}})));this.$store.dispatch("files/openRemoteFiles",e)},export2pc(e){const t=this.$proxyManager.getProxyById(e).get().dataset,a=u.Z.convertVtkToItkImage(t);a.data=a.data.slice(0),(0,d.Z)(null,!1,a,"out.mha").then((e=>{let{arrayBuffer:t}=e;const a=new Blob([t]),i=URL.createObjectURL(a),s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download","out.mha"),document.body.appendChild(s),s.click(),document.body.removeChild(s)}))},checkUploadPossible(){return this.loggedOut?(this.$notify("Cannot upload to Girder unless logged in. Please log in then try again"),!1):this.location?"user"!==this.location._modelType||(this.$notify("Cannot upload here. Please select public or private and then try again"),!1):(this.$notify("Cannot upload to Girder root location. Please navigate to a folder you own then try again"),!1)},upload(e){if(!this.checkUploadPossible())return;const t=this.$proxyManager.getProxyById(e),a=t.getDataset(),i=t.getName(),s={glanceDataType:a.getClassName()};"vtkLabelMap"===a.getClassName()&&Object.assign(s,{colorMap:a.getColorMap()}),this.$notify("Uploading...",!0),function(e,t){return new Promise(((a,i)=>{if(e.isA("vtkImageData")){const i=u.Z.convertVtkToItkImage(e);i.data=i.data.slice(0),(0,d.Z)(null,!1,i,t).then((e=>a(g(e,t))))}else if(e.isA("vtkPolyData")){let s=null;t.endsWith(".vtp")?(s=p.ZP.newInstance(),s.setFormat(v.Z.FormatTypes.BINARY)):t.endsWith(".stl")&&(s=m.ZP.newInstance()),s?a(g(s.write(e),t)):i(new Error(`Cannot save polydata dataset ${t}`))}else i(new Error(`Cannot save dataset ${t}`))}))}(a,i).then((t=>{const a=this.$proxyManager.getProxyById(e).getKey("girderProvenance")||this.location;this.$refs.girderUploader.setFiles([t]),this.$refs.girderUploader.inputFilesChanged([t]),this.$refs.girderUploader.start({dest:a,postUpload:e=>{let{results:t}=e;const{itemId:a}=t[0];this.girderRest.put(`${this.girderRest.apiRoot}/item/${a}`,`metadata=${JSON.stringify(s)}`),this.$notify("Dataset uploaded"),this.$refs.girderFileManager.refresh()}}).catch((e=>{this.$notify(`Upload error: ${e}`),console.error("Upload error",e)}))}))},uploadMeasurements(e){if(!this.checkUploadPossible())return;const t=this.dataMeasurements[e];if(t){const a=`${this.$proxyManager.getProxyById(e).getName()}.measurements.json`,i=new File([JSON.stringify(t)],a),s=this.$proxyManager.getProxyById(e).getKey("girderProvenance")||this.location;this.$notify("Uploading...",!0),this.$refs.girderUploader.setFiles([i]),this.$refs.girderUploader.inputFilesChanged([i]),this.$refs.girderUploader.start({dest:s,postUpload:()=>{this.$notify("Measurements uploaded"),this.$refs.girderFileManager.refresh()}}).catch((e=>{this.$notify(`Upload error: ${e}`),console.error("Upload error",e)}))}},refreshPage(){const e=new URL(window.location.href),t=new URLSearchParams(e.search);t.set("girderRoute",this.newGirderURL),e.search=t.toString(),window.location.href=e.toString()},logout(){this.girderRest.logout()}}},y={close:"GirderBox-close-eeT8j"},f=a(581),b=a(3),x=a.n(b),w=a(582),_=a(601),S=a(607),P=a(683),k=a(637),C=a(622),V=a(610),I=a(680),T=a(653),$=a(634),D=a(684);e=a.hmd(e);var M={};e.hot,e.hot;var L=(0,f.Z)(h,i,[],!1,(function(e){M.$style=y.locals||y,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return M.$style}})}),null,null);x()(L,{VBtn:w.Z,VCard:_.Z,VCardActions:S.h7,VCardText:S.ZB,VCardTitle:S.EB,VCol:P.Z,VContainer:k.Z,VDialog:C.Z,VIcon:V.Z,VRow:I.Z,VSpacer:T.Z,VTextField:$.Z,VToolbar:D.Z}),L.options.__file="src/components/core/GirderBox/index.vue";var Z=L.exports},171:function(e,t,a){"use strict";a.d(t,{Z:function(){return I}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-container",{class:e.$style.container},[e.isAnimated?a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("Animation controls")])]),e._v(" "),a("v-divider",{staticClass:"mb-4"}),e._v(" "),a("animationControls")],1):e._e(),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("General Settings")])]),e._v(" "),a("v-divider",{staticClass:"mb-4"}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs10:""}},[a("span",{staticClass:"body-2"},[e._v("Default collapse datasets")])]),e._v(" "),a("v-flex",{attrs:{xs2:""}},[a("v-switch",{class:e.$style.slimInput,attrs:{"hide-details":""},model:{value:e.collapseDatasetPanelsModel,callback:function(t){e.collapseDatasetPanelsModel=t},expression:"collapseDatasetPanelsModel"}})],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("Measurements")])]),e._v(" "),a("v-divider",{staticClass:"mb-4"}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs9:""}},[a("span",{staticClass:"body-2"},[e._v("Distance unit symbol")])]),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{hint:"Symbol","hide-details":"",required:""},model:{value:e.distanceUnitSymbolModel,callback:function(t){e.distanceUnitSymbolModel=t},expression:"distanceUnitSymbolModel"}})],1),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("span",{staticClass:"body-2"},[e._v("Distance unit factor")])]),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{type:"number",hint:"Factor","hide-details":"",min:0,step:.1,required:""},model:{value:e.distanceUnitFactorModel,callback:function(t){e.distanceUnitFactorModel=t},expression:"distanceUnitFactorModel"}})],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("Background")])]),e._v(" "),a("v-divider",{staticClass:"mb-4"}),e._v(" "),a("palette-picker",{attrs:{palette:e.palette,size:24},model:{value:e.backgroundColorModel,callback:function(t){e.backgroundColorModel=t},expression:"backgroundColorModel"}})],1),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("Interaction Style")])]),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs6:""}},[a("span",{staticClass:"body-2"},[e._v("3D")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-select",{staticClass:"pv-no-select",class:e.$style.slimInput,attrs:{dense:"",flat:"","hide-details":"",items:e.interactionStyles3D},model:{value:e.interactionStyle3DModel,callback:function(t){e.interactionStyle3DModel=t},expression:"interactionStyle3DModel"}})],1),e._v(" "),a("v-flex",{attrs:{xs6:""}},[e.firstPersonInteraction?a("span",{staticClass:"body-2"},[e._v("\n Movement Speed\n ")]):e._e()]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[e.firstPersonInteraction?a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:0,step:.1},model:{value:e.firstPersonMovementSpeedModel,callback:function(t){e.firstPersonMovementSpeedModel=t},expression:"firstPersonMovementSpeedModel"}}):e._e()],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("Overlay")])]),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs6:""}},[a("span",{staticClass:"body-2"},[e._v("Text opacity")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"",min:0,max:1,step:.01},model:{value:e.annotationOpacityModel,callback:function(t){e.annotationOpacityModel=t},expression:"annotationOpacityModel"}})],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs10:""}},[a("span",{staticClass:"subtitle-2"},[e._v("Orientation Axis")])]),e._v(" "),a("v-flex",{attrs:{xs2:""}},[a("v-switch",{class:e.$style.slimInput,attrs:{"hide-details":""},model:{value:e.orientationAxisModel,callback:function(t){e.orientationAxisModel=t},expression:"orientationAxisModel"}})],1)],1)],1)],1),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("span",{staticClass:"body-2"},[e._v("Type")])]),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("v-select",{staticClass:"pv-no-select",class:e.$style.slimInput,attrs:{dense:"",flat:"","hide-details":"",disabled:!e.orientationAxis,items:e.axisTypes},model:{value:e.axisTypeModel,callback:function(t){e.axisTypeModel=t},expression:"axisTypeModel"}})],1)],1),e._v(" "),a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("span",{staticClass:"body-2"},[e._v("Preset")])]),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("v-select",{staticClass:"pv-no-select",class:e.$style.slimInput,attrs:{dense:"",flat:"","hide-details":"",items:e.orientationPresets},model:{value:e.orientationPresetModel,callback:function(t){e.orientationPresetModel=t},expression:"orientationPresetModel"}})],1)],1)],1)],1),e._v(" "),a("gpu-information",{attrs:{width:250,proxyManager:e.$proxyManager}}),e._v(" "),e.hasVR()?a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs10:""}},[a("span",{staticClass:"subtitle-2"},[e._v("Virtual Reality")])]),e._v(" "),a("v-flex",{attrs:{xs2:""}},[a("v-switch",{class:e.$style.slimInput,attrs:{"hide-details":""},on:{change:e.toggleVR},model:{value:e.vrEnabled,callback:function(t){e.vrEnabled=t},expression:"vrEnabled"}})],1)],1)],1)],1),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":"",wrap:""}},[a("v-flex",{attrs:{xs5:""}},[a("span",{staticClass:"body-2"},[e._v("Physical scale")])]),e._v(" "),a("v-flex",{attrs:{xs7:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"",min:"0.1",max:"10",step:"any"},model:{value:e.physicalScale,callback:function(t){e.physicalScale=t},expression:"physicalScale"}})],1)],1)],1)],1):e._e(),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("LOD Settings")])]),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs7:""}},[a("span",{staticClass:"body-2"},[e._v("Max Texture LOD Size")])]),e._v(" "),a("v-flex",{attrs:{xs5:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:100,suffix:"KiB"},model:{value:e.maxTextureLODSizeModel,callback:function(t){e.maxTextureLODSizeModel=t},expression:"maxTextureLODSizeModel"}})],1)],1)],1)],1)],1)};i._withStripped=!0;var s=a(612),n=a(172),o=a(173),r=a(38),l=a(174);const c=[{text:"Default",value:"3D"},{text:"First Person",value:"FirstPerson"}],d=[{text:"XYZ",value:"default"},{text:"LPS",value:"lps"}],u=[{text:"Arrows",value:"arrow"},{text:"Cube",value:"cube"}];var p={name:"GlobalSettings",components:{AnimationControls:n.Z,PalettePicker:r.Z,GpuInformation:o.Z},data:()=>({palette:l.qg,orientationPresets:d,interactionStyles3D:c,axisTypes:u,vrEnabled:!1,physicalScale:1,basePhysicalScale:1}),computed:{distanceUnitSymbolModel:{get(){return this.distanceUnitSymbol},set(e){this.setDistanceUnitSymbol(e)}},distanceUnitFactorModel:{get(){return this.distanceUnitFactor},set(e){this.setDistanceUnitFactor(e)}},collapseDatasetPanelsModel:{get(){return this.collapseDatasetPanels},set(e){this.setCollapseDatasetPanels(e)}},backgroundColorModel:{get(){return this.backgroundColor},set(e){this.setBackgroundColor(e)}},orientationAxisModel:{get(){return this.orientationAxis},set(e){this.setOrientationAxis(e)}},orientationPresetModel:{get(){return this.orientationPreset},set(e){this.setOrientationPreset(e)}},axisTypeModel:{get(){return this.axisType},set(e){this.setAxisType(e)}},annotationOpacityModel:{get(){return this.annotationOpacity},set(e){this.setAnnotationOpacity(e)}},firstPersonMovementSpeedModel:{get(){let e=this.firstPersonMovementSpeed;return null===e&&(this.resetFirstPersonMovementSpeed(),e=this.firstPersonMovementSpeed),e},set(e){this.setFirstPersonMovementSpeed(e)}},interactionStyle3DModel:{get(){return this.interactionStyle3D},set(e){this.setInteractionStyle3D(e)}},firstPersonInteraction(){return"FirstPerson"===this.interactionStyle3D},maxTextureLODSizeModel:{get(){return this.maxTextureLODSize},set(e){this.setMaxTextureLODSize(e)}},...(0,s.rn)(["collapseDatasetPanels"]),...(0,s.rn)("animations",{isAnimated:e=>e.frames.length>0}),...(0,s.rn)("views",{backgroundColor:e=>e.globalBackgroundColor,orientationAxis:e=>e.axisVisible,orientationPreset:e=>e.axisPreset,axisType:e=>e.axisType,annotationOpacity:e=>e.annotationOpacity,interactionStyle3D:e=>e.interactionStyle3D,firstPersonMovementSpeed:e=>e.firstPersonMovementSpeed,maxTextureLODSize:e=>e.maxTextureLODSize}),...(0,s.rn)("widgets",{distanceUnitSymbol:e=>e.distanceUnitSymbol,distanceUnitFactor:e=>e.distanceUnitFactor})},watch:{physicalScale(){const e=this.getViewForVR();e&&e.getCamera().setPhysicalScale(this.basePhysicalScale/Number(this.physicalScale))}},methods:{hasVR(){const e=this.getViewForVR();return e&&!!e.getOpenGLRenderWindow().getVrDisplay()},getViewForVR:function(){const e=this.$proxyManager.getViews();for(let t=0;te>0?1:-1,n=a.getDirectionOfProjection(),o=Math.max(...n.map(Math.abs));a.setPhysicalViewNorth(n.map((t=>Math.abs(t)===o?e(t):0)));const r=a.getViewUp(),l=Math.max(...r.map(Math.abs));a.setPhysicalViewUp(r.map((t=>Math.abs(t)===l?e(t):0))),s.startVR()}else s.stopVR(),t.setOrientationAxesVisibility(this.orientationAxis)}},...(0,s.nv)({setCollapseDatasetPanels:"collapseDatasetPanels"}),...(0,s.nv)("views",{setBackgroundColor:(e,t)=>e("setGlobalBackground",t),setOrientationAxis:(e,t)=>e("setAxisVisible",t),setOrientationPreset:(e,t)=>e("setAxisPreset",t),setAxisType:(e,t)=>e("setAxisType",t),setAnnotationOpacity:(e,t)=>e("setAnnotationOpacity",t),setInteractionStyle3D:(e,t)=>e("setInteractionStyle3D",t),setFirstPersonMovementSpeed:(e,t)=>e("setFirstPersonMovementSpeed",t),resetFirstPersonMovementSpeed:e=>e("resetFirstPersonMovementSpeed"),setMaxTextureLODSize:(e,t)=>e("setMaxTextureLODSize",t)}),...(0,s.nv)("widgets",{setDistanceUnitSymbol:(e,t)=>e("setDistanceUnitSymbol",t),setDistanceUnitFactor:(e,t)=>e("setDistanceUnitFactor",t)})}},v={container:"GlobalSettings-container-_zf5o",card:"GlobalSettings-card-zqI_u",heading:"GlobalSettings-heading-ftN6X",divider:"GlobalSettings-divider-_12Zl",slimInput:"GlobalSettings-slimInput-tiNot"},m=a(581),g=a(3),h=a.n(g),y=a(601),f=a(637),b=a(644),x=a(608),w=a(611),_=a(640),S=a(652),P=a(661),k=a(634);e=a.hmd(e);var C={};e.hot,e.hot;var V=(0,m.Z)(p,i,[],!1,(function(e){C.$style=v.locals||v,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return C.$style}})}),null,null);h()(V,{VCard:y.Z,VContainer:f.Z,VDivider:b.Z,VFlex:x.Z,VLayout:w.Z,VSelect:_.Z,VSlider:S.Z,VSwitch:P.Z,VTextField:k.Z}),V.options.__file="src/components/core/GlobalSettings/index.vue";var I=V.exports},315:function(e,t,a){"use strict";a.d(t,{Z:function(){return P}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"grey lighten-3",attrs:{id:e.$style.root}},[a("v-responsive",{staticClass:"grey darken-3"},[a("v-container",{attrs:{"grid-list-lg":"","fill-height":"",id:e.$style.banner}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs6:!e.$vuetify.breakpoint.smAndDown,xs12:e.$vuetify.breakpoint.smAndDown}},[a("v-card",{attrs:{flat:"",dark:"",color:"transparent"}},[a("v-card-title",{staticClass:"display-1 text-center pv-break-word"},[e._v("\n Visualize your data with Kitware Glance\n ")]),e._v(" "),a("v-card-text",[e._v("\n A general purpose standalone web application by\n "),a("a",{staticClass:"indigo--text text--lighten-3",attrs:{target:"_blank",href:"https://www.kitware.com/",rel:"noopener noreferrer"}},[e._v("Kitware, Inc.")]),e._v("\n that can be used to visualize many data types.\n It is also a great framework for building custom\n viewers on the web which can involve remote services.\n ")])],1)],1),e._v(" "),e.$vuetify.breakpoint.smAndDown?e._e():a("v-flex",{key:"if-large-enough-screen",attrs:{xs6:"","fill-height":""}},[a("drag-and-drop",{class:e.$style.dnd,attrs:{enabled:""},on:{drop:function(t){return e.$emit("open-files",t)}},scopedSlots:e._u([{key:"default",fn:function(t){var i,s=t.dragHover;return[a("div",{class:(i={},i[e.$style.fileUpload]=!0,i[e.$style.fileUploadHover]=s,i),on:{click:function(t){return t.stopPropagation(),e.$emit("open")}}},[a("div",{staticClass:"white--text body-2",class:e.$style.fileUploadContents},[a("v-btn",{attrs:{color:"primary",raised:"false"},on:{click:function(t){return t.stopPropagation(),e.$emit("open")}}},[a("span",{staticClass:"text-uppercase mr-2"},s?[e._v("drop your file")]:[e._v("open a file")]),e._v(" "),a("v-icon",[e._v("mdi-folder-outline")])],1),e._v(" "),a("div",{staticClass:"pv-no-select mt-2"},[e._v("\n or drop one anywhere in this box to begin.\n ")])],1)])]}}],null,!1,1487670387)})],1)],1)],1)],1),e._v(" "),a("v-container",{staticClass:"mt-4 pv-no-select",attrs:{"grid-list-lg":""}},[a("v-layout",{attrs:{row:"",wrap:""}},[a("v-flex",{attrs:{xs12:""}},[a("span",{staticClass:"title"},[e._v("Sample Data")])]),e._v(" "),e._l(e.samples,(function(t,i){return a("v-flex",{key:i,attrs:{xs4:e.$vuetify.breakpoint.mdAndUp,xs6:e.$vuetify.breakpoint.sm,xs12:e.$vuetify.breakpoint.xs}},[a("v-card",{class:e.$style.sampleData,attrs:{flat:"",tile:""}},[a("v-img",{attrs:{src:t.image,height:"300px"}}),e._v(" "),a("div",{class:e.$style.linkOverlay,on:{click:function(a){return a.stopPropagation(),e.openSample(t)}}},[a("div",{staticClass:"body-2",class:e.$style.linkOverlayText},[e._v("\n "+e._s(t.label)+" ("+e._s(t.size)+")\n "),t.description?a("div",{class:e.$style.description},[e._v("\n "+e._s(t.description)+"\n ")]):e._e(),e._v(" "),t.acknowledgement?a("div",{class:e.$style.acknowledgement},[e._v("\n "+e._s(t.acknowledgement)+"\n ")]):e._e()])])],1)],1)}))],2)],1),e._v(" "),a("v-footer",{staticClass:"d-flex flex-column",attrs:{height:"48px",color:"transparent"}},[a("div",{staticClass:"mb-2 text-center grey--text text--darken-2"},[a("div",[e._v("© "+e._s((new Date).getFullYear())+" — Kitware, Inc.")]),e._v(" "),a("div",[e._v("Glance ("+e._s(e.version)+")")])])])],1)};i._withStripped=!0;var s={Aneurism:a(530),CAD:a(531),Engine:a(532),F1:a(533),Lidar:a(534),Lysozyme:a(535),SinglePin:a(536),Tooth:a(537),Covid19:a(538)};const n=window.GLANCE_VERSION&&"master"!==window.GLANCE_VERSION?window.GLANCE_VERSION:"master";var o=[{label:"COVID-19",image:s.Covid19,size:"8.4 MB",description:"Lung CT Scan of a COVID-19 patient exhibiting ground-glass opacities (GGO)",acknowledgement:'Joseph Paul Cohen and Paul Morrison and Lan Dao, "COVID-19 image data collection", arXiv:2003.11597, 2020',datasets:[{name:"covid19.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/covid19.glance`}]},{label:"202-t + Edges",image:s.CAD,size:"112 KB",description:"T-Handle, Flanged Base, Solid Bar",acknowledgement:"https://www.traceparts.com/",datasets:[{name:"202-t.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/202-t.glance`}]},{label:"Lysozyme.pdb",image:s.Lysozyme,size:"135 KB",description:"an enzyme that catalyzes the destruction of the cell walls of certain bacteria, occurring notably in tears and egg white.",datasets:[{name:"Lysozyme.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/lysozyme.glance`}]},{label:"Tooth.nrrd",image:s.Tooth,size:"1.6 MB",datasets:[{name:"Tooth.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/Tooth.glance`}]},{label:"Engine",image:s.Engine,size:"3.1 MB",datasets:[{name:"Engine.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/Engine.glance`}],acknowledgement:"General Electric",description:"CT scan of two cylinders of an engine block."},{label:"lidar.vtp",image:s.Lidar,size:"5.3 MB",description:"Aerial LIDAR data",datasets:[{name:"lidar.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/lidar.glance`}]},{label:"SinglePin.vtp",image:s.SinglePin,size:"8.2 MB",description:"Mixing Vane inside reactor pin for cooling",acknowledgement:"Simulation data from Hydra-TH",datasets:[{name:"SinglePin.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/SinglePin.glance`}]},{label:"Formula 1",image:s.F1,size:"6.7 MB",datasets:[{name:"F1.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/F1.glance`}]},{label:"Aneurysm.vti",image:s.Aneurism,size:"348 KB",datasets:[{name:"Aneurism.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/Aneurism.glance`}],acknowledgement:"Philips Research, Hamburg, Germany",description:"Rotational C-arm x-ray scan of the arteries of the right half of a human head. A contrast agent was injected into the blood and an aneurism is present."}],r={name:"Landing",components:{DragAndDrop:a(175).Z},data:()=>({samples:o,version:window.GLANCE_VERSION||"no version available"}),methods:{openSample(e){const t=[],a=[];for(let i=0;ie.viewOrder,backgroundColors:e=>e.backgroundColors,visibleCount(e){return this.smallScreen?1:e.visibleCount}})},methods:{getView(e){const[t,a]=e.split(":");return this.$proxyManager.getViews().find((e=>e.getProxyName()===t&&(!a||e.getName()===a)))},...(0,s.nv)("views",["updateLayout"])},updated(){this.$proxyManager.resizeAllViews()}},l={container:"LayoutView-container-_kxKm",grid:"LayoutView-grid-T7vhg",viewContainer:"LayoutView-viewContainer-kpqmi"},c=a(581),d=a(3),u=a.n(d),p=a(637);e=a.hmd(e);var v={};e.hot,e.hot;var m=(0,c.Z)(r,i,[],!1,(function(e){v.$style=l.locals||l,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return v.$style}})}),null,null);u()(m,{VContainer:p.Z}),m.options.__file="src/components/core/LayoutView/index.vue";var g=m.exports},178:function(e,t,a){"use strict";a.d(t,{Z:function(){return x}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",{attrs:{flat:""}},[a("v-card-title",[a("span",{staticClass:"body-2"},[e._v("Enter your raw data specs below:")])]),e._v(" "),a("v-card-text",[a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs3:""}},[e._v("Filename:")]),e._v(" "),a("v-flex",{staticClass:"body-1",attrs:{xs9:""}},[e._v(e._s(e.file.name))])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs3:""}},[e._v("File size:")]),e._v(" "),a("v-flex",{staticClass:"body-1",attrs:{xs9:""}},[e._v(e._s(e.file.size)+" bytes")])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs3:""}},[e._v("Data type:")]),e._v(" "),a("v-flex",{staticClass:"body-1",attrs:{xs9:""}},[a("v-select",{attrs:{items:e.allDataTypes,"item-text":"label","item-value":"label","single-line":"","return-object":""},model:{value:e.dataType,callback:function(t){e.dataType=t},expression:"dataType"}})],1)],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs3:""}},[e._v("Dimensions:")]),e._v(" "),e._l(3,(function(t){return a("v-flex",{key:t,staticClass:"body-1",attrs:{xs3:""}},[a("v-text-field",{attrs:{type:"number",min:"1",max:e.file.size},model:{value:e.dimensions[t-1],callback:function(a){e.$set(e.dimensions,t-1,a)},expression:"dimensions[i-1]"}})],1)}))],2),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs3:""}},[e._v("Spacing:")]),e._v(" "),e._l(3,(function(t){return a("v-flex",{key:t,staticClass:"body-1",attrs:{xs3:""}},[a("v-text-field",{attrs:{type:"number",min:"1",max:e.file.size},model:{value:e.spacing[t-1],callback:function(a){e.$set(e.spacing,t-1,a)},expression:"spacing[i-1]"}})],1)}))],2),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[e._v("Effective size:")]),e._v(" "),a("v-flex",{attrs:{xs3:""}},[e._v(e._s(e.effectiveSize))]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[e.effectiveSize!==e.file.size?a("span",{staticClass:"red--text"},[e._v("\n Effective size does not match total size!\n ")]):a("span",{staticClass:"teal--text"},[e._v("Effective size matches file size")])])],1)],1)],1)],1)};i._withStripped=!0;const s=[{label:"Integer 8",constructor:Int8Array,size:1},{label:"Unsigned Integer 8",constructor:Uint8Array,size:1},{label:"Integer 16",constructor:Int16Array,size:2},{label:"Unsigned Integer 16",constructor:Uint16Array,size:2},{label:"Integer 32",constructor:Int32Array,size:4},{label:"Unsigned Integer 32",constructor:Uint32Array,size:4},{label:"Float",constructor:Float32Array,size:4},{label:"Double",constructor:Float64Array,size:8}];function n(){this.effectiveSize===this.file.size?this.$emit("change",{dimensions:this.dimensions,spacing:this.spacing,dataType:this.dataType,effectiveSize:this.effectiveSize}):this.$emit("change",null)}var o={name:"RawFileReader",props:{file:{type:File,required:!0}},data:()=>({allDataTypes:s,dataType:s[0],dimensions:[1,1,1],spacing:[1,1,1]}),watch:{dimensions:n,spacing:n,dataType:n},computed:{effectiveSize(){return this.dimensions.reduce(((e,t)=>e*t),1)*this.dataType.size}}},r={toolbarButton:"RawFileReader-toolbarButton-Qwep7",overlay:"RawFileReader-overlay-EEhkR",overlayHidden:"RawFileReader-overlayHidden-A2Yvq",overlayText:"RawFileReader-overlayText-iq_lG"},l=a(581),c=a(3),d=a.n(c),u=a(601),p=a(607),v=a(637),m=a(608),g=a(611),h=a(640),y=a(634);e=a.hmd(e);var f={};e.hot,e.hot;var b=(0,l.Z)(o,i,[],!1,(function(e){f.$style=r.locals||r,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return f.$style}})}),null,null);d()(b,{VCard:u.Z,VCardText:p.ZB,VCardTitle:p.EB,VContainer:v.Z,VFlex:m.Z,VLayout:g.Z,VSelect:h.Z,VTextField:y.Z}),b.options.__file="src/components/core/RawFileReader/index.vue";var x=b.exports},320:function(e,t,a){"use strict";a.d(t,{Z:function(){return V}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a(e.dialogType,{tag:"component",attrs:{value:e.showDialog,"max-width":"60%"},on:{input:e.close}},[e.screenshot?a("v-card",{attrs:{flat:""}},[a("v-card-title",[e._v("Save Screenshot")]),e._v(" "),a("v-container",{attrs:{"grid-list-md":""}},[a("v-layout",{attrs:{row:"",wrap:""}},[a("v-flex",e._b({},"v-flex",e.flexLayout,!1),[a("v-img",{class:e.$style.imagePreview,attrs:{src:e.imageUrl,contain:"",height:e.smallScreen?"125px":"250px"}})],1),e._v(" "),a("v-flex",e._b({},"v-flex",e.flexLayout,!1),[a("v-container",{class:{"pa-1":e.smallScreen}},[a("v-layout",{attrs:{row:""}},[a("v-flex",{attrs:{xs9:""}},[a("v-text-field",{attrs:{label:"Filename"},on:{keyup:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.save(),e.close()}},model:{value:e.filename,callback:function(t){e.filename=t},expression:"filename"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-select",{attrs:{label:"File type","hide-details":"","single-line":"",items:e.fileTypes},model:{value:e.fileType,callback:function(t){e.fileType=t},expression:"fileType"}})],1)],1),e._v(" "),a("v-layout",{attrs:{row:""}},[a("v-flex",{attrs:{xs12:""}},[a("v-checkbox",{attrs:{label:"Transparent background"},model:{value:e.transparentBackground,callback:function(t){e.transparentBackground=t},expression:"transparentBackground"}})],1)],1)],1)],1)],1)],1),e._v(" "),a("v-card-actions",[a("v-spacer"),e._v(" "),a("v-btn",{attrs:{text:"",color:"red"},nativeOn:{click:function(t){return e.close.apply(null,arguments)}}},[a("span",[e._v("Cancel")])]),e._v(" "),a("v-btn",{attrs:{color:"secondary"},nativeOn:{click:function(t){e.save(),e.close()}}},[a("span",[e._v("Save")])]),e._v(" "),a("v-btn",{attrs:{color:"primary",href:e.imageUrl,download:e.filename+e.fileType},nativeOn:{click:function(t){return e.close.apply(null,arguments)}}},[a("span",[e._v("Download")])])],1)],1):e._e()],1)};i._withStripped=!0;var s=a(612),n=a(690),o=a(622);const r=[".png",".jpeg"];function l(){const e=new Image;e.addEventListener("load",(()=>{const t=this.canvas.getContext("2d");t.clearRect(0,0,this.canvas.width,this.canvas.height),this.canvas.width=e.width,this.canvas.height=e.height,this.transparentBackground||(t.fillStyle=this.backgroundToFillStyle(this.screenshot.viewData.background),t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.drawImage(e,0,0);const a=`image/${this.fileType.substr(1)}`;this.imageUrl=this.canvas.toDataURL(a)})),e.src=this.screenshot.imgSrc}var c={name:"ScreenshotDialog",components:{VBottomSheet:n.Z,VDialog:o.Z},data:()=>({filename:"",imageUrl:"",transparentBackground:!1,fileType:"",fileTypes:r}),computed:{smallScreen(){return this.$vuetify.breakpoint.smAndDown},landscapeScreen(){const{width:e,height:t}=this.$vuetify.breakpoint;return e>t},dialogType(){return this.smallScreen?"v-bottom-sheet":"v-dialog"},flexLayout(){return{[!this.smallScreen||this.landscapeScreen?"xs6":"xs12"]:!0}},...(0,s.rn)({screenshot:e=>e.pendingScreenshot,showDialog:e=>e.screenshotDialog})},watch:{transparentBackground:l,fileType:l,showDialog(e){e&&(this.filename="Untitled",this.fileType=".png",this.generateImage())}},methods:{generateImage:l,backgroundToFillStyle:function(e){if(e.startsWith("linear-gradient(")){const t=e.substring(e.indexOf("(")+1,e.indexOf(")")).split(","),a=this.canvas.getContext("2d").createLinearGradient(0,0,0,this.canvas.height);return a.addColorStop(0,t[0]),a.addColorStop(1,t[1]),a}return e},save:function(){this.$emit("save",this.screenshot.viewName,{image:this.imageUrl,filename:this.filename+this.fileType})},...(0,s.nv)({close:"closeScreenshotDialog"})},created(){this.canvas=document.createElement("canvas")}},d={imagePreview:"ScreenshotDialog-imagePreview-UShNL"},u=a(581),p=a(3),v=a.n(p),m=a(582),g=a(601),h=a(607),y=a(613),f=a(637),b=a(608),x=a(685),w=a(611),_=a(640),S=a(653),P=a(634);e=a.hmd(e);var k={};e.hot,e.hot;var C=(0,u.Z)(c,i,[],!1,(function(e){k.$style=d.locals||d,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return k.$style}})}),null,null);v()(C,{VBtn:m.Z,VCard:g.Z,VCardActions:h.h7,VCardTitle:h.EB,VCheckbox:y.Z,VContainer:f.Z,VFlex:b.Z,VImg:x.Z,VLayout:w.Z,VSelect:_.Z,VSpacer:S.Z,VTextField:P.Z}),C.options.__file="src/components/core/Screenshots/ScreenshotDialog/index.vue";var V=C.exports},319:function(e,t,a){"use strict";a.d(t,{Z:function(){return S}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.$style.container},[a("v-toolbar",{staticClass:"flex-grow-0",attrs:{color:"transparent",flat:""}},[a("v-toolbar-title",[e._v("Screenshots")]),e._v(" "),a("v-spacer"),e._v(" "),a("v-btn",{attrs:{icon:""},on:{click:function(t){return e.$emit("close")}}},[a("v-icon",[e._v("mdi-arrow-right")])],1)],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!e.atLeastOneScreenshot,expression:"!atLeastOneScreenshot"}],class:e.$style.emptyState},[a("v-icon",{attrs:{large:""}},[e._v("mdi-image-multiple")]),e._v(" "),a("span",{staticClass:"subtitle-1 grey--text text--darken-1"},[e._v("No screenshots yet!")]),e._v(" "),a("v-btn",{staticClass:"mt-4",attrs:{disabled:!e.activeView},on:{click:e.takeScreenshot}},[e._v("\n Capture Active View\n ")])],1),e._v(" "),a("v-list",{directives:[{name:"show",rawName:"v-show",value:e.atLeastOneScreenshot,expression:"atLeastOneScreenshot"}]},e._l(Object.keys(e.screenshots),(function(t){return a("v-list-group",{key:t,attrs:{"prepend-icon":"mdi-folder","no-action":""},scopedSlots:e._u([{key:"activator",fn:function(){return[a("v-list-item-content",[a("v-list-item-title",[e._v("\n "+e._s(t)+" ("+e._s(e.screenshots[t].length)+")\n ")])],1)]},proxy:!0}],null,!0)},[e._v(" "),e._l(e.screenshots[t],(function(i,s){return a("v-tooltip",{key:s,attrs:{left:"",disabled:e.smallScreen,"content-class":e.$style.hoverTooltip},scopedSlots:e._u([{key:"activator",fn:function(n){var o=n.on;return[a("v-list-item",e._g({attrs:{link:""},on:{click:function(a){return e.viewScreenshot(t,s)}}},o),[a("v-list-item-title",{class:e.$style.filename,attrs:{title:i.filename}},[e._v("\n "+e._s(i.filename)+"\n ")]),e._v(" "),a("v-list-item-action",{class:e.$style.action},[a("v-btn",{attrs:{icon:"",href:i.image,download:i.filename},on:{click:function(e){e.stopPropagation()}}},[a("v-icon",[e._v("mdi-download")])],1)],1),e._v(" "),a("v-list-item-action",{class:e.$style.action},[a("v-btn",{attrs:{icon:""},on:{click:[function(a){return e.deleteScreenshot(t,s)},function(e){e.stopPropagation()}]}},[a("v-icon",[e._v("mdi-delete")])],1)],1)],1)]}}],null,!0)},[e._v(" "),a("img",{class:e.$style.hoverImage,attrs:{src:i.image}})])}))],2)})),1),e._v(" "),a("screenshot-dialog",{on:{save:e.addScreenshot}})],1)};i._withStripped=!0;var s=a(612);var n={name:"Screenshots",components:{ScreenshotDialog:a(320).Z},data:()=>({screenshots:{},activeViewId:-1}),computed:{atLeastOneScreenshot(){const e=Object.keys(this.screenshots);for(let t=0;te.length)).reduce(((e,t)=>e+t))},...(0,s.nv)({takeScreenshot(e){return e("takeScreenshot",this.activeView)}})}},o={container:"Screenshots-container-QUtU6",emptyState:"Screenshots-emptyState-A_kb2",filename:"Screenshots-filename-_4xgf",action:"Screenshots-action-BSST7",hoverTooltip:"Screenshots-hoverTooltip-WDQlH",hoverImage:"Screenshots-hoverImage-_Qhil"},r=a(581),l=a(3),c=a.n(l),d=a(582),u=a(610),p=a(647),v=a(648),m=a(641),g=a(642),h=a(646),y=a(653),f=a(684),b=a(687),x=a(654);e=a.hmd(e);var w={};e.hot,e.hot;var _=(0,r.Z)(n,i,[],!1,(function(e){w.$style=o.locals||o,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return w.$style}})}),null,null);c()(_,{VBtn:d.Z,VIcon:u.Z,VList:p.Z,VListGroup:v.Z,VListItem:m.Z,VListItemAction:g.Z,VListItemContent:h.km,VListItemTitle:h.V9,VSpacer:y.Z,VToolbar:f.Z,VToolbarTitle:b.qW,VTooltip:x.Z}),_.options.__file="src/components/core/Screenshots/index.vue";var S=_.exports},321:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.fileGenerationInProgress?e.$style.visible:e.$style.hidden},[a("v-progress-circular",{attrs:{indeterminate:"",color:"green",size:70,width:7}}),e._v(" "),a("label",{class:e.$style.label},[e._v("\n Compressing..."),a("br"),e._v(e._s(e.fileName)+"\n ")])],1)};i._withStripped=!0;var s={name:"StateFileGenerator",computed:(0,a(612).rn)({proxyManager:"proxyManager",fileGenerationInProgress:e=>!!e.savingStateName,fileName:"savingStateName"})},n={hidden:"StateFileGenerator-hidden-W1iZI",visible:"StateFileGenerator-visible-mpB0c",label:"StateFileGenerator-label-kWzey"},o=a(581),r=a(3),l=a.n(r),c=a(599);e=a.hmd(e);var d={};e.hot,e.hot;var u=(0,o.Z)(s,i,[],!1,(function(e){d.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return d.$style}})}),null,null);l()(u,{VProgressCircular:c.Z}),u.options.__file="src/components/core/StateFileGenerator/index.vue";var p=u.exports},318:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var i=function(){var e,t=this,a=t.$createElement,i=t._self._c||a;return i("div",{class:(e={},e[t.$style.sheet]=!0,e[t.$style.visible]=t.value,e),style:{top:t.sheetTop+"px"}},[i("div",{ref:"slotWrapper",staticClass:"grey darken-3 white--text",class:t.$style.slotWrapper,style:{transform:"translateY("+(t.visible?0:"100%")+")"}},[t._t("default")],2)])};i._withStripped=!0;var s={props:{value:{type:Boolean,default:!1}},data:()=>({sheetTop:0,visible:!1}),methods:{onMouseDown:function(e){this.$el.contains(e.target)||this.$emit("input",!1)},updateHeight:function(){this.sheetTop=-this.$refs.slotWrapper.offsetHeight}},watch:{value:function(e,t){e&&!t?(document.addEventListener("mousedown",this.onMouseDown,!0),this.$nextTick((()=>{this.updateHeight(),this.visible=!0}))):(document.removeEventListener("mousedown",this.onMouseDown,!0),this.visible=!1)}},mounted(){window.addEventListener("resize",this.updateHeight)},beforeDestroy(){window.removeEventListener("resize",this.updateHeight)}},n={sheet:"ToolbarSheet-sheet-xndXH",slotWrapper:"ToolbarSheet-slotWrapper-NSeT7",visible:"ToolbarSheet-visible-dRAdL"},o=a(581);e=a.hmd(e);var r={};e.hot,e.hot;var l=(0,o.Z)(s,i,[],!1,(function(e){r.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return r.$style}})}),null,null);l.options.__file="src/components/core/ToolbarSheet/index.vue";var c=l.exports},317:function(e,t,a){"use strict";a.d(t,{Z:function(){return O}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-container",{class:e.$style.container,attrs:{fluid:""}},[a("v-layout",{class:e.$style.floatToolbar,attrs:{column:""}},[a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.resetCamera()}}},i),[a("v-icon",[e._v("mdi-image-filter-center-focus")])],1)]}}])},[a("span",{staticClass:"pv-no-select"},[e._v("Reset camera")])]),e._v(" "),a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.rollLeft()}}},i),[a("v-icon",[e._v("mdi-rotate-left")])],1)]}}])},[a("span",{staticClass:"pv-no-select"},[e._v("Rotate camera left 90°")])]),e._v(" "),a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.rollRight()}}},i),[a("v-icon",[e._v("mdi-rotate-right")])],1)]}}])},[a("span",{staticClass:"pv-no-select"},[e._v("Rotate camera right 90°")])]),e._v(" "),"View3D"===e.type?a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.updateOrientation("x")}}},i),[e._v("\n "+e._s(e.orientationLabels[0])+"\n ")])]}}],null,!1,2132146526)},[a("span",{staticClass:"pv-no-select"},[e._v("Reset Camera to Orientation "+e._s(e.orientationLabels[0]))])]):e._e(),e._v(" "),"View3D"===e.type?a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.updateOrientation("y")}}},i),[e._v("\n "+e._s(e.orientationLabels[1])+"\n ")])]}}],null,!1,1991408638)},[a("span",{staticClass:"pv-no-select"},[e._v("Reset Camera to Orientation "+e._s(e.orientationLabels[1]))])]):e._e(),e._v(" "),"View3D"===e.type?a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.updateOrientation("z")}}},i),[e._v("\n "+e._s(e.orientationLabels[2])+"\n ")])]}}],null,!1,617031326)},[a("span",{staticClass:"pv-no-select"},[e._v("Reset Camera to Orientation "+e._s(e.orientationLabels[2]))])]):e._e()],1),e._v(" "),a("v-layout",{attrs:{column:"","fill-height":""}},[a("v-flex",{staticClass:"js-view",class:e.$style.vtkView,style:{background:e.backgroundColor},attrs:{"fill-height":""},on:{mousedown:function(t){return e.view.activate()}}}),e._v(" "),e.isActive?a("div",{class:e.$style.activeView}):e._e(),e._v(" "),a("tool-svg-target",{class:e.$style.svgLayer,attrs:{"view-proxy-id":e.viewProxyId,viewBox:e.svgViewBox}}),e._v(" "),a("div",{class:e.$style.toolbarWrapper},[a("toolbar-sheet",{model:{value:e.backgroundSheet,callback:function(t){e.backgroundSheet=t},expression:"backgroundSheet"}},[a("v-container",{staticClass:"mr-0",attrs:{"grid-list-md":""}},[a("v-layout",{attrs:{row:""}},[a("v-spacer"),e._v(" "),a("palette-picker",{attrs:{size:24,palette:e.palette,value:e.backgroundColor},on:{input:e.changeBackgroundColor}})],1)],1)],1),e._v(" "),a("v-toolbar",{class:e.$style.smallToolbar,attrs:{dark:"",height:"45px"}},[a("v-select",{class:e.$style.viewTypeSelector,attrs:{dense:"",flat:"","hide-details":"",items:e.viewTypeItems,value:e.viewType},on:{change:e.changeViewType}}),e._v(" "),a("v-spacer"),e._v(" "),"View3D"===e.type?a("v-tooltip",{attrs:{top:"",disabled:e.smallScreen||e.viewPointMenuVisible},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-menu",{attrs:{"offset-y":"",top:"",left:""},scopedSlots:e._u([{key:"activator",fn:function(t){var s=t.on;return[a("v-btn",e._g({directives:[{name:"show",rawName:"v-show",value:e.cameraViewPoints.length,expression:"cameraViewPoints.length"}],class:e.$style.button,attrs:{icon:"",disabled:e.viewPointMenuVisible}},Object.assign({},i,s)),[a("v-icon",[e._v("mdi-camera-switch")])],1)]}}],null,!0),model:{value:e.viewPointMenuVisible,callback:function(t){e.viewPointMenuVisible=t},expression:"viewPointMenuVisible"}},[e._v(" "),a("v-list",e._l(e.cameraViewPoints,(function(t,i){return a("v-list-item",{key:i,on:{click:function(a){return e.changeCameraViewPoint(t)}}},[a("v-list-item-title",[e._v(e._s(t))])],1)})),1)],1)]}}],null,!1,205776964)},[e._v(" "),a("span",{staticClass:"pv-no-select"},[e._v("Change View Point")])]):e._e(),e._v(" "),a("v-tooltip",{attrs:{top:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.button,attrs:{icon:"",disabled:e.backgroundSheet||!e.view},on:{click:function(t){e.backgroundSheet=!e.backgroundSheet}}},i),[a("v-icon",[e._v("mdi-palette")])],1)]}}])},[a("span",{staticClass:"pv-no-select"},[e._v("Background color")])]),e._v(" "),a("v-tooltip",{attrs:{top:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.button,attrs:{icon:""},on:{click:function(t){return e.screenCapture()}}},i),[a("v-icon",[e._v("mdi-camera-plus")])],1)]}}])},[a("span",{staticClass:"pv-no-select"},[e._v("Screenshot")])]),e._v(" "),!e.smallScreen&&e.singleViewButton?a("v-tooltip",{key:"singleView",attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.button,attrs:{icon:""},on:{click:function(t){return e.singleView(e.layoutIndex)}}},i),[a("v-icon",[e._v("mdi-fullscreen")])],1)]}}],null,!1,3656610843)},[a("span",{staticClass:"pv-no-select"},[e._v("Single view")])]):e._e(),e._v(" "),!e.smallScreen&&e.flipViewButton?a("v-tooltip",{key:"flipView",attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.button,attrs:{icon:""},on:{click:function(t){return e.splitView(e.layoutIndex)}}},i),[a("v-icon",[e._v("mdi-flip-horizontal")])],1)]}}],null,!1,1302128140)},[a("span",{staticClass:"pv-no-select"},[e._v("Split view")])]):e._e(),e._v(" "),!e.smallScreen&&e.quadViewButton?a("v-tooltip",{key:"quadView",attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.button,attrs:{icon:""},on:{click:function(t){return e.quadView(e.layoutIndex)}}},i),[a("v-icon",[e._v("mdi-widgets")])],1)]}}],null,!1,1168904256)},[a("span",{staticClass:"pv-no-select"},[e._v("Quad view")])]):e._e()],1)],1)],1)],1)};i._withStripped=!0;var s=a(612),n=a(462),o=a(463),r=a(38),l=a(318),c=a(174),d=function(){var e=this,t=e.$createElement;return(e._self._c||t)("portal-target",{attrs:{name:e.portalName,multiple:"",tag:"svg","slot-props":{viewProxyId:e.viewProxyId}}})};d._withStripped=!0;var u={name:"ToolsSvg",components:{PortalTarget:a(88).YC},props:{viewProxyId:{type:String,required:!0}},computed:{portalName(){return`PortalTarget__${this.viewProxyId}`}},mounted(){this.$toolSvgPortal.addTarget(this.portalName)},beforeDestroy(){this.$toolSvgPortal.removeTarget(this.portalName)}},p=a(581),v=(0,p.Z)(u,d,[],!1,null,null,null);v.options.__file="src/components/tools/ToolSvgTarget.vue";var m=v.exports,g=a(30);var h={name:"VtkView",components:{PalettePicker:r.Z,ToolbarSheet:l.Z,ToolSvgTarget:m},props:{layoutIndex:{default:0,type:Number},layoutCount:{default:1,type:Number},viewType:{default:"",type:String},backgroundColor:{default:"#000",type:String}},data:()=>({internalViewId:-1,internalIsActive:!1,palette:c.qg,backgroundSheet:!1,inAnimation:!1,viewPointMenuVisible:!1,svgViewBox:"0 0 10 10"}),computed:{...(0,s.rn)("views",{viewProxyId(e){return e.viewTypeToId[this.viewType]},view(e){return this.$proxyManager.getProxyById(e.viewTypeToId[this.viewType])},axisVisible:e=>e.axisVisible,axisType:e=>e.axisType,axisPreset:e=>e.axisPreset,viewOrientation:e=>e.viewOrientation,viewTypeItems:e=>Object.entries(e.viewTypes).map((e=>{let[t,a]=e;return{text:a,value:t}}))}),...(0,s.Se)(["cameraViewPoints"]),type(){return this.viewType.split(":")[0]},name(){return this.viewType.split(":")[1]},orientationLabels(){return"lps"===this.axisPreset?["L","P","S"]:["X","Y","Z"]},smallScreen(){return this.$vuetify.breakpoint.width1},flipViewButton(){return 1===this.layoutCount||4===this.layoutCount&&this.layoutIndex%2==1},quadViewButton(){return 2===this.layoutCount&&1===this.layoutIndex},isActive(){return this.internalIsActive||this.view===this.$proxyManager.getActiveView()}},watch:{view(e){this.tryMountView(e)}},proxyManagerHooks:{onActiveViewChange(e){this.internalIsActive=e===this.view},onActiveSourceChange(e){if(e&&"TrivialProducer"===e.getProxyName()&&this.view.bindRepresentationToManipulator){const t=this.$proxyManager.getRepresentation(e,this.view);this.view.bindRepresentationToManipulator(t),this.view.updateWidthHeightAnnotation()}},onProxyRegistrationChange(){const e=this.$proxyManager.getSources().find((e=>e.getDataset().isA&&e.getDataset().isA("vtkImageData"))),t=this.$proxyManager.getViews();for(let a=0;a{this.resizeCurrentView()})),this.resizeObserver.observe(this.$el),this.resizeCurrentView()},beforeDestroy(){this.resizeObserver.disconnect(),this.view&&this.unmountView(this.view)},beforeUpdate(){this.view||this.changeViewType(o.H_)},methods:{tryMountView(e){if(this.internalViewId>-1){const e=this.$proxyManager.getProxyById(this.internalViewId);this.unmountView(e),this.internalViewId=-1}if(e){this.internalViewId=e.getProxyId(),e.setContainer(this.$el.querySelector(".js-view")),e.setOrientationAxesVisibility(this.axisVisible);const t=e.getReferenceByName("widgetManager");t&&(t.getPickingEnabled()||t.disablePicking())}},unmountView(e){e.setContainer(null)},changeViewType(e){this.swapViews({index:this.layoutIndex,viewType:e})},getAvailableActions(){return{single:this.layoutCount>1,split:this.layoutCount<4}},resetCamera(){this.view&&this.view.resetCamera()},rollLeft(){if(this.view){this.view.setAnimation(!0,this);let e=0,t=null;t=setInterval((()=>{e<90?(e+=2,this.view.rotate(2)):(clearInterval(t),this.view.setAnimation(!1,this))}),1)}},rollRight(){if(this.view){this.view.setAnimation(!0,this);let e=0,t=null;t=setInterval((()=>{e<90?(e+=2,this.view.rotate(-2)):(clearInterval(t),this.view.setAnimation(!1,this))}),1)}},updateOrientation(e){this.view&&!this.inAnimation&&(this.inAnimation=!0,(0,g.XC)(this.view,this.viewOrientation,e,"View3D"===this.type?100:0).then((()=>{this.inAnimation=!1})))},resizeCurrentView(){if(this.view){this.view.resize();const[e,t]=this.view.getOpenGLRenderWindow().getSize();this.svgViewBox=`0 0 ${e} ${t}`}},screenCapture(){this.takeScreenshot(this.view)},changeBackgroundColor(e){this.changeBackground({viewType:this.viewType,color:e})},...(0,s.nv)("views",["changeBackground","swapViews","singleView","splitView","quadView"]),...(0,s.nv)(["takeScreenshot","changeCameraViewPoint"])}},y={container:"VtkView-container-xoSjw",vtkView:"VtkView-vtkView-_T34c",viewTypeSelector:"VtkView-viewTypeSelector-Y_5cJ",floatToolbar:"VtkView-floatToolbar-_eQCk",toolbarWrapper:"VtkView-toolbarWrapper-_mikW",button:"VtkView-button-B4bSE",smallToolbar:"VtkView-smallToolbar-ZdwuJ",activeView:"VtkView-activeView-ES8oq",svgLayer:"VtkView-svgLayer-BTr2n"},f=a(3),b=a.n(f),x=a(582),w=a(637),_=a(608),S=a(610),P=a(611),k=a(647),C=a(641),V=a(646),I=a(638),T=a(640),$=a(653),D=a(684),M=a(654);e=a.hmd(e);var L={};e.hot,e.hot;var Z=(0,p.Z)(h,i,[],!1,(function(e){L.$style=y.locals||y,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return L.$style}})}),null,null);b()(Z,{VBtn:x.Z,VContainer:w.Z,VFlex:_.Z,VIcon:S.Z,VLayout:P.Z,VList:k.Z,VListItem:C.Z,VListItemTitle:V.V9,VMenu:I.Z,VSelect:T.Z,VSpacer:$.Z,VToolbar:D.Z,VTooltip:M.Z}),Z.options.__file="src/components/core/VtkView/index.vue";var O=Z.exports},167:function(e,t,a){"use strict";a.d(t,{Z:function(){return x}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("source-select",{attrs:{label:"Target volume",filterFunc:e.filterImages,bindToActiveSource:"",hideIfOneDataset:""},on:{input:e.setTargetVolume}})],1)],1)],1),e._v(" "),a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[e.enabled?[a("v-btn",{attrs:{text:""},on:{click:e.disable}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-crop-free")]),e._v("\n Hide\n ")],1)]:[a("v-btn",{attrs:{text:"",disabled:!e.canCrop},on:{click:e.enable}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-crop")]),e._v("\n Crop\n ")],1)],e._v(" "),a("v-spacer"),e._v(" "),a("v-btn",{attrs:{disabled:!e.canReset,text:""},on:{click:e.reset}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-replay")]),e._v("\n Reset\n ")],1)],2)],1)],1)};i._withStripped=!0;var s=a(612),n=a(82),o=a(30),r={name:"CropTool",components:{SourceSelect:n.Z},props:["enabled"],data:()=>({targetVolumeId:-1,widgetId:-1,canReset:!1}),computed:{targetVolume(){return this.$proxyManager.getProxyById(this.targetVolumeId)},cropProxy(){return this.$proxyManager.getProxyById(this.widgetId)},canCrop(){return this.targetVolumeId>-1},...(0,s.rn)("widgets",{allCropStates:"croppingStates"})},watch:{enabled(e){if(e){const e=this.getCropFilter(this.targetVolume);let t=this.cropProxy;t||(t=this.$proxyManager.getProxyInGroup("Widgets").find((e=>"Crop"===e.getProxyName())),t||(t=this.$proxyManager.createProxy("Widgets","Crop")),this.widgetId=t.getProxyId());const a=t.getWidget(),i=t.getWidgetState();a.setFaceHandlesEnabled(!1),a.setEdgeHandlesEnabled(!1);const s=this.targetVolume.getDataset();if(a.copyImageDataDescription(s),a.placeWidget(s.getBounds()),e.isResetAvailable()){i.getCroppingPlanes().setPlanes(e.getCroppingPlanes())}const n=i.getCroppingPlanes();this.stateSub.sub(n.onModified((()=>{const t=n.getPlanes();e.setCroppingPlanes(t),this.canReset=e.isResetAvailable(),this.storeCropState(this.targetVolumeId,t)}))),t.addToViews()}else this.cropProxy.removeFromViews(),this.$proxyManager.deleteProxy(this.cropProxy),this.widgetId=-1,this.stateSub.unsub()},targetVolumeId(e){if(this.enabled&&this.disable(),this.canReset=!1,-1!==e){const e=this.getCropFilter(this.targetVolume);this.canReset=e.isResetAvailable()}}},mounted(){this.stateSub=(0,o.y5)()},beforeDestroy(){this.stateSub.unsub()},methods:{filterImages:e=>"TrivialProducer"===e.getProxyName()&&"vtkImageData"===e.getType(),getCropFilter(e){return(0,o.aX)(this.$proxyManager,e)},setTargetVolume(e){this.targetVolumeId=e},enable(){this.$emit("enable",!0)},disable(){this.$emit("enable",!1)},reset(){if(this.targetVolume){const e=this.getCropFilter(this.targetVolume);if(e.reset(),this.canReset=!1,this.cropProxy){this.cropProxy.getWidgetState().getCroppingPlanes().setPlanes(e.getCroppingPlanes())}}},storeCropState(e,t){this.setCroppingState({datasetId:e,planes:t})},...(0,s.nv)("widgets",["setCroppingState"])}},l={container:"CropTool-container-O3Hvl"},c=a(581),d=a(3),u=a.n(d),p=a(582),v=a(637),m=a(608),g=a(610),h=a(611),y=a(653);e=a.hmd(e);var f={};e.hot,e.hot;var b=(0,c.Z)(r,i,[],!1,(function(e){f.$style=l.locals||l,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return f.$style}})}),null,null);u()(b,{VBtn:p.Z,VContainer:v.Z,VFlex:m.Z,VIcon:g.Z,VLayout:h.Z,VSpacer:y.Z}),b.options.__file="src/components/tools/CropTool/index.vue";var x=b.exports},128:function(e,t,a){"use strict";a.d(t,{Z:function(){return ve}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("source-select",{attrs:{label:"Target Dataset",filterFunc:e.filterImageData,bindToActiveSource:""},on:{input:e.setTargetDataset}})],1)],1),e._v(" "),a("v-card",{attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("v-layout",{attrs:{"align-center":""}},[a("v-flex",{attrs:{xs10:""}},[a("span",{staticClass:"body-2"},[e._v("Tool List")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-btn-toggle",{class:e.$style.toolList,attrs:{value:e.activeToolIndex},on:{change:e.toggleActiveTool}},e._l(e.uiToolList,(function(t){return a("v-tooltip",{key:t.name,attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var s=i.on;return[a("v-btn",e._g({class:e.$style.toolButton,attrs:{small:"",text:"",disabled:-1===e.targetPid}},s),[a("svg-icon",{class:e.$style.toolIcon,attrs:{icon:t.icon}})],1)]}}],null,!0)},[e._v("\n "+e._s(t.name)+"\n ")])})),1)],1)],1)],1),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("div",{class:e.$style.fullWidth},[e.tools.length>0?e._l(e.tools,(function(t,i){return a(t.component,{key:i,tag:"component",attrs:{targetPid:e.targetPid,"tool-data":t.data},on:{remove:function(t){return e.removeTool(i)},saveData:function(t){return e.saveToolData(i,t)}},scopedSlots:e._u([{key:"default",fn:function(i){return[a("div",{class:e.$style.row},[a("span",{class:e.$style.rowAvatar},[a("svg-icon",{class:e.$style.toolIcon,attrs:{icon:t.icon}})],1),e._v(" "),a("div",{class:e.$style.rowContent},[a("span",{class:e.$style.rowContentName,attrs:{title:i.toolName}},[e._v("\n "+e._s(i.toolName||t.name)+"\n ")]),e._v(" "),e._l(i.labels,(function(t){return a("span",{key:t,class:e.$style.rowContentDetails},[e._v("\n "+e._s(t)+": "+e._s(i.measurements[t])+"\n ")])}))],2),e._v(" "),a("div",{class:e.$style.action},[a("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var s=i.on;return[a("v-btn",e._g({attrs:{small:"",icon:""},on:{click:function(a){return e.jumpTo(t.data.axis,t.data.lockToSlice)}}},s),[a("v-icon",[e._v("mdi-crosshairs-gps")])],1)]}}],null,!0)},[e._v("\n Jump to slice\n ")])],1),e._v(" "),a("div",{class:e.$style.action},[a("pop-up",{scopedSlots:e._u([{key:"trigger",fn:function(){return[a("v-btn",{attrs:{small:"",icon:""}},[a("v-icon",[e._v("mdi-dots-vertical")])],1)]},proxy:!0},{key:"popup",fn:function(s){var n=s.close;return[a("v-container",{class:[e.$style.container,e.$style.popup],attrs:{"grid-list-md":""}},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("v-text-field",{attrs:{label:"Name",placeholder:t.name,value:i.toolName},on:{input:i.setName}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("div",{staticClass:"body-1"},[e._v("Tool color")]),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("palette-picker",{staticClass:"pt-2",attrs:{palette:e.palette,size:28,value:i.color},on:{input:i.setColor}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("div",{staticClass:"body-1"},[e._v("Text Size")]),e._v(" "),a("v-divider",{class:e.$style.divider})],1),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("v-slider",{attrs:{min:"8",max:"32",step:"1",dirty:"","hide-details":"",value:i.textSize},on:{input:i.setTextSize}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{attrs:{type:"number",min:"8",max:"32",step:"1",value:i.textSize},on:{input:i.setTextSize}})],1)],1),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-layout",{attrs:{"align-center":""}},[a("v-flex",{staticClass:"text-center",attrs:{xs3:""}},[a("v-btn",{attrs:{icon:""},on:{click:n}},[a("v-icon",[e._v("mdi-content-save")])],1)],1),e._v(" "),a("v-spacer"),e._v(" "),a("v-flex",{staticClass:"text-center",attrs:{xs3:""}},[a("v-btn",{attrs:{icon:""},on:{click:function(e){i.remove(),n()}}},[a("v-icon",{attrs:{color:"red"}},[e._v("mdi-delete")])],1)],1)],1)],1)]}}],null,!0)})],1)])]}}],null,!0)})})):[a("div",{staticClass:"pt-2 body-1 teal--text text-center"},[e._v("No measurements yet")])],e._v(" "),a("v-btn",{attrs:{disabled:!e.targetProxy||!e.girderRest||!e.girderRest.user},on:{click:e.upload}},[e._v("\n Upload\n ")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:!e.girderRest||!e.girderRest.user,expression:"!girderRest || !girderRest.user"}],staticClass:"body-2"},[e._v("Log in to upload")])],2)],1)],1)],1)};i._withStripped=!0;var s=a(612),n=a(81),o=a(38),r=a(82),l=a(75),c=a(57),d=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",e._l(e.portalDestinations,(function(t){return a("portal",{key:t,attrs:{to:t},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.viewProxyId;return[e._t("default",null,{viewProxyId:a})]}}],null,!0)})})),1)};d._withStripped=!0;var u={name:"ToolSvgPortal",components:{Portal:a(88).h_},data:()=>({portalDestinations:[]}),mounted(){this.$toolSvgPortal.addEventListener("updateTargets",this.updateTargets),this.updateTargets()},beforeDestroy(){this.$toolSvgPortal.removeEventListener("updateTargets",this.updateTargets)},methods:{updateTargets(){this.portalDestinations=[...this.$toolSvgPortal.targets]}}},p=a(581),v=(0,p.Z)(u,d,[],!1,null,null,null);v.options.__file="src/components/tools/ToolSvgPortal.vue";var m=v.exports,g=a(490);var h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{name:`${e}Tool`,components:{ToolSvgPortal:m},props:{targetPid:{required:!0},toolData:{required:!0}},data(){return{name:`2D ${e}`,finalized:!1,lockToSlice:null,axis:null,widgetPid:-1,targetViewId:-1,color:c.wY[0],textSize:16,measurements:this.initialMeasurements(),measurementLabels:this.getMeasurementLabels(),initialSlicePlacement:null,mouseFocusedViewId:-1,svgComponent:t.svgComponent,viewWidgetProperties:{}}},computed:{targetProxy(){return this.$proxyManager.getProxyById(this.targetPid)},targetView(){return this.$proxyManager.getProxyById(this.targetViewId)},widgetProxy(){return this.$proxyManager.getProxyById(this.widgetPid)},targetRepresentation(){return this.$proxyManager.getRepresentation(this.targetProxy,this.targetView)},displayedMeasurements(){return this.getDisplayedMeasurements()},...(0,s.rn)("widgets",{distanceUnitSymbol:e=>e.distanceUnitSymbol,distanceUnitFactor:e=>e.distanceUnitFactor})},watch:t.watch||{},proxyManagerHooks:{onProxyModified(e){if(e&&e===this.targetRepresentation&&this.widgetProxy&&(this.finalized?this.updateWidgetVisibility():null!==this.initialSlicePlacement&&Math.round(e.getSlice())!==this.initialSlicePlacement?this.emitRemove():this.updateOrientation()),e===this.widgetProxy){1===this.widgetProxy.getWidgetState().getHandleList().length&&-1===this.targetViewId&&null===this.initialSlicePlacement&&(this.targetViewId=this.mouseFocusedViewId,this.initialSlicePlacement=Math.round(this.targetRepresentation.getSlice()),this.constrainPickableViews(this.targetViewId)),!this.finalized&&this.donePlacing()&&(this.lockToSlice=this.initialSlicePlacement,this.axis=this.targetView.getAxis(),this.finalized=!0),this.updateMeasurements(),this.finalized&&this.saveData()}}},mounted(){const t=this.$proxyManager.createProxy("Widgets",e);if(this.widgetPid=t.getProxyId(),this.toolData){const{name:e,lockToSlice:a,points:i,color:s,textSize:n,axis:o}=this.toolData;this.name=e,this.lockToSlice=a,this.color=s,this.textSize=n;const r=this.$proxyManager.getViews().filter((e=>e.isA("vtkView2DProxy"))).find((e=>e.getAxis()===o));if(!r)throw new Error("Cannot restore saved data: invalid axis");this.targetViewId=r.getProxyId();const l=t.getWidgetState();for(let e=0;e{this.setupViewWidget(i),this.setVisibility(i,t,this.axis===t.getAxis());const s=t.getInteractor().onMouseMove((()=>{-1===this.targetViewId&&t.getProxyId()!==this.mouseFocusedViewId&&(this.mouseFocusedViewId=t.getProxyId(),this.updateOrientation(),i.getVisibility()||(this.setVisibility(i,t,!0),e.getAllViewWidgets().filter((e=>{let[t]=e;return t!==i})).forEach((e=>{let[t,a]=e;return this.setVisibility(t,a,!1)})),a.renderWidgets(),this.$proxyManager.renderAllViews()))}),i.getPriority()+1);return a.grabFocus(i),a.enablePicking(),[s.unsubscribe]};e.addToViews(),e.executeViewFuncs({View3D:(e,t,a)=>{t.removeWidget(a)},View2D_X:t,View2D_Y:t,View2D_Z:t})},updateOrientation(){const e=this.targetView||this.$proxyManager.getProxyById(this.mouseFocusedViewId),t=this.$proxyManager.getRepresentation(this.targetProxy,e),a=Math.round(t.getSlice()),i=e.getAxis(),s=this.widgetProxy.getWidget().getManipulator(),n=[0,0,0];n[i]=1;const o=n.map((e=>e*a));s.setUserNormal(n),s.setUserOrigin(o)},toggleLock(){null===this.lockToSlice?this.lockToSlice=Math.round(this.targetRepresentation.getSlice()):this.lockToSlice=null,this.updateWidgetVisibility()},updateWidgetVisibility(){const e=this.widgetProxy.getViewWidget(this.targetView);if(!e)return;const t=Math.round(this.targetRepresentation.getSlice());this.setVisibility(e,this.targetView,null===this.lockToSlice||this.lockToSlice===t),this.renderViewWidgets()},remove(){this.widgetProxy&&(this.widgetProxy.releaseFocus(),this.widgetProxy.removeFromViews(),this.$proxyManager.deleteProxy(this.widgetProxy),this.widgetPid=-1)},setVisibility(e,t,a){const i=t.getProxyId();g.default.set(this.viewWidgetProperties,t.getProxyId(),{...this.viewWidgetProperties[i],visible:a}),e.setVisibility(a)},setName(e){this.name=e,this.saveData()},setColor(e){this.color=e,this.saveData()},setTextSize(e){this.textSize=e,this.saveData()},renderViewWidgets(){this.$proxyManager.getViews().forEach((e=>{const t=e.getReferenceByName("widgetManager");t&&(t.renderWidgets(),e.renderLater())}))},saveData(){const e=this.widgetProxy.getWidgetState(),t={name:this.name,lockToSlice:this.lockToSlice,points:e.getHandleList().map((e=>e.getOrigin())),color:this.color,textSize:this.textSize,axis:this.targetView.getAxis()};this.$emit("saveData",t)},emitRemove(){this.$emit("remove")},constrainPickableViews(e){this.$proxyManager.getViews().forEach((t=>{const a=this.widgetProxy.getViewWidget(t);a&&a.setPickable(t.getProxyId()===e)}))},initialMeasurements(){throw new Error("initialMeasurements not implemented")},getMeasurementLabels(){throw new Error("getMeasurementLabels not implemented")},getDisplayedMeasurements(){throw new Error("getDisplayedMeasurements not implemented")},updateMeasurements(){throw new Error("updateMeasurements not implemented")},donePlacing(){throw new Error("donePlacing not implemented")},setupViewWidget(){throw new Error("setupViewWidget not implemented")},...t.methods||{}},template:'\n
\n \n \n \n \n
\n '}},y=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",[a("svg-circle-handles",{attrs:{"state-labels":["handles","moveHandle"],"widget-state":e.widgetState,"view-proxy-id":e.viewProxyId,stroke:e.color,"stroke-width":"3",fill:"transparent",r:"8"}}),e._v(" "),a("svg-poly-line",{attrs:{"state-labels":["handles","moveHandle"],"widget-state":e.widgetState,"view-proxy-id":e.viewProxyId,stroke:e.color,"stroke-width":"2"}}),e._v(" "),a("svg-label",{attrs:{labels:e.svgLabels,"view-proxy-id":e.viewProxyId,fill:e.color,dx:"12",dy:"-12",styles:{fontSize:e.fontSize+"px"}}})],1):e._e()};y._withStripped=!0;var f=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",e._l(e.points,(function(t,i){return a("circle",e._b({key:i,attrs:{cx:t[0],cy:t[1]}},"circle",e.$attrs,!1))})),0):e._e()};f._withStripped=!0;var b=a(13),x=a(383),w=a(5);const _="$$PixelSpaceMixinData";var S={props:{viewProxyId:{type:String,required:!0}},computed:{view(){return this.$proxyManager.getProxyById(this.viewProxyId)}},created(){this[_]={},this[_].deferred=[],this[_].actor=b.ZP.newInstance(),this[_].mapper=x.ZP.newInstance(),this[_].pointsPd=w.ZP.newInstance(),this[_].mapper.setInputData(this[_].pointsPd),this[_].mapper.setCallback(((e,t,a,i,s)=>{const n=e.map((e=>[e[0],s[1]-e[1],e[2],e[3]])),{deferred:o}=this[_];o.map((e=>{let{resolve:t}=e;return t(n)})),this[_].deferred.length=0})),this[_].actor.setMapper(this[_].mapper)},mounted(){this.view.getRenderer().addActor(this[_].actor)},beforeDestroy(){this.view.getRenderer().removeActor(this[_].actor),this[_].mapper.delete(),this[_].actor.delete()},methods:{mapToPixelSpace(e){const t=this[_].pointsPd.getPoints().getData(),a=[...t,...e.flat()];this[_].pointsPd.getPoints().setData(a,3),this[_].pointsPd.modified();const i=t.length/3,s=a.length/3,n=function(){let e,t;return{promise:new Promise(((a,i)=>{e=a,t=i})),resolve:e,reject:t}}();return this[_].deferred.push(n),n.promise.then((e=>e.slice(i,s)))}}};const P=Symbol("VtkSubscriptionsKey");var k={mounted(){this[P]=[]},beforeDestroy(){for(;this[P].length;)this[P].pop().unsubscribe()},methods:{trackVtkSubscription(e){this[P].push(e)}}},C={name:"SvgCircleHandles",mixins:[S,k],props:{visible:{type:Boolean,default:!0},stateLabels:{type:Array,required:!0},widgetState:{type:Object,required:!0},viewProxyId:{type:String,required:!0}},data:()=>({points:[]}),mounted(){this.trackVtkSubscription(this.widgetState.onModified(this.updatePoints)),this.updatePoints()},methods:{async updatePoints(){const e=this.stateLabels.flatMap((e=>this.widgetState.getStatesWithLabel(e))).filter(Boolean).filter((e=>e.isVisible())).flatMap((e=>e.getOrigin()));this.points=await this.mapToPixelSpace(e)}}},V=(0,p.Z)(C,f,[],!1,null,null,null);V.options.__file="src/components/tools/MeasurementTools/svg/SvgCircleHandles.vue";var I=V.exports,T=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",e._l(e.lines,(function(t,i){return a("line",e._b({key:i,attrs:{x1:t[0][0],y1:t[0][1],x2:t[1][0],y2:t[1][1]}},"line",e.$attrs,!1))})),0):e._e()};T._withStripped=!0;var $={name:"SvgPolyLine",mixins:[S,k],props:{visible:{type:Boolean,default:!0},stateLabels:{type:Array,required:!0},widgetState:{type:Object,required:!0},viewProxyId:{type:String,required:!0}},data:()=>({points:[]}),computed:{lines(){const e=[];for(let t=0;tthis.widgetState.getStatesWithLabel(e))).filter(Boolean).filter((e=>e.isVisible())).flatMap((e=>e.getOrigin()));this.points=await this.mapToPixelSpace(e)}}},D=(0,p.Z)($,T,[],!1,null,null,null);D.options.__file="src/components/tools/MeasurementTools/svg/SvgPolyLine.vue";var M=D.exports,L=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",e._l(e.svgSpaceLabels,(function(t,i){return a("text",e._b({key:i,style:e.styles,attrs:{abc:JSON.stringify(e.styles),x:t.x,y:t.y}},"text",e.$attrs,!1),[e._v("\n "+e._s(t.text)+"\n ")])})),0):e._e()};L._withStripped=!0;var Z={name:"SvgLabel",mixins:[S],props:{visible:{type:Boolean,default:!0},labels:{type:Array,default:()=>[]},viewProxyId:{type:String,required:!0},styles:{type:Object,default:()=>({})}},data:()=>({svgSpaceLabels:[]}),watch:{labels(){this.updatePoints(),this.view.renderLater()}},mounted(){this.updatePoints()},methods:{async updatePoints(){const e=this.labels.flatMap((e=>e.xyz)),t=await this.mapToPixelSpace(e);this.svgSpaceLabels=t.map(((e,t)=>({x:e[0],y:e[1],text:this.labels[t].text})))}}},O=(0,p.Z)(Z,L,[],!1,null,null,null);O.options.__file="src/components/tools/MeasurementTools/svg/SvgLabel.vue";var R=O.exports,B={name:"AngleSvg",components:{SvgCircleHandles:I,SvgPolyLine:M,SvgLabel:R},mixins:[k],props:{finalized:Boolean,widgetState:{type:Object,required:!0},visible:{type:Boolean,default:!0},viewProxyId:{type:String,required:!0},toolName:{type:String,required:!0},color:{type:String,required:!0},textSize:{type:Number,required:!0},measurements:{type:Object,required:!0},labels:{type:Array,required:!0}},data:()=>({svgLabels:[]}),computed:{angleValue(){return this.measurements[this.labels[0]]},fontSize(){return this.textSize*(window.devicePixelRatio||1)}},watch:{angleValue(){this.updateLabels()}},mounted(){this.trackVtkSubscription(this.widgetState.onModified(this.updateLabels)),this.updateLabels()},methods:{updateLabels(){const e=this.widgetState.getHandleList().map((e=>e.getOrigin()));3===e.length&&(this.svgLabels=[{xyz:e[1],text:this.angleValue}])}}},A=(0,p.Z)(B,y,[],!1,null,null,null);A.options.__file="src/components/tools/MeasurementTools/svg/AngleSvg.vue";var F=h("Angle",{svgComponent:A.exports,methods:{initialMeasurements:()=>({angle:0}),getMeasurementLabels:()=>["Angle"],getDisplayedMeasurements(){return{Angle:`${this.measurements.angle.toFixed(2)}°`}},updateMeasurements(){const e=this.widgetProxy.getWidget();this.measurements.angle=180*e.getAngle()/Math.PI},donePlacing(){return 3===this.widgetProxy.getWidgetState().getHandleList().length},setupViewWidget(e){e.setHandleVisibility(!1)}}}),N=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",[a("svg-circle-handles",{attrs:{"state-labels":["handles","moveHandle"],"widget-state":e.widgetState,"view-proxy-id":e.viewProxyId,stroke:e.color,"stroke-width":"3",fill:"transparent",r:"8"}}),e._v(" "),a("svg-poly-line",{attrs:{"state-labels":["handles","moveHandle"],"widget-state":e.widgetState,"view-proxy-id":e.viewProxyId,stroke:e.color,"stroke-width":"2"}}),e._v(" "),a("svg-label",{attrs:{labels:e.svgLabels,"view-proxy-id":e.viewProxyId,fill:e.color,dx:"12",dy:"-12",styles:{fontSize:e.fontSize+"px"}}})],1):e._e()};N._withStripped=!0;var E={name:"RulerSvg",components:{SvgCircleHandles:I,SvgPolyLine:M,SvgLabel:R},mixins:[k],props:{finalized:Boolean,widgetState:{type:Object,required:!0},visible:{type:Boolean,default:!0},viewProxyId:{type:String,required:!0},toolName:{type:String,required:!0},color:{type:String,required:!0},textSize:{type:Number,required:!0},measurements:{type:Object,required:!0},labels:{type:Array,required:!0}},data:()=>({svgLabels:[]}),computed:{rulerValue(){return this.measurements[this.labels[0]]},fontSize(){return this.textSize*(window.devicePixelRatio||1)}},watch:{angleValue(){this.updateLabels()}},mounted(){this.trackVtkSubscription(this.widgetState.onModified(this.updateLabels)),this.updateLabels()},methods:{updateLabels(){const e=this.widgetState.getHandleList().map((e=>e.getOrigin()));2===e.length&&(this.svgLabels=[{xyz:e[0],text:this.rulerValue}])}}},j=(0,p.Z)(E,N,[],!1,null,null,null);j.options.__file="src/components/tools/MeasurementTools/svg/RulerSvg.vue";var G=h("Ruler",{svgComponent:j.exports,methods:{initialMeasurements:()=>({length:0}),getMeasurementLabels:()=>["Length"],getDisplayedMeasurements(){return{Length:`${(this.measurements.length*(this.distanceUnitFactor||1)).toFixed(2)} ${this.distanceUnitSymbol||""}`}},updateMeasurements(){const e=this.widgetProxy.getWidget();this.measurements.length=e.getDistance()},donePlacing(){return 2===this.widgetProxy.getWidgetState().getHandleList().length},setupViewWidget(e){e.setHandleVisibility(!1)}},watch:{distanceUnitSymbol(){this.widgetProxy.modified()},distanceUnitFactor(){this.widgetProxy.modified()}}}),z=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",[a("svg-circle-handles",{attrs:{"state-labels":["handles","moveHandle"],"widget-state":e.widgetState,"view-proxy-id":e.viewProxyId,stroke:e.color,"stroke-width":"3",fill:"transparent",r:"8"}}),e._v(" "),a("svg-label",{attrs:{labels:e.svgLabels,"view-proxy-id":e.viewProxyId,fill:e.color,dx:"12",dy:"-12",styles:{fontSize:e.fontSize+"px"}}})],1):e._e()};z._withStripped=!0;var U={name:"TextSvg",components:{SvgCircleHandles:I,SvgLabel:R},mixins:[k],props:{finalized:Boolean,widgetState:{type:Object,required:!0},visible:{type:Boolean,default:!0},viewProxyId:{type:String,required:!0},toolName:{type:String,required:!0},color:{type:String,required:!0},textSize:{type:Number,required:!0},measurements:{type:Object,required:!0},labels:{type:Array,required:!0}},data:()=>({svgLabels:[]}),computed:{fontSize(){return this.textSize*(window.devicePixelRatio||1)}},watch:{toolName(){this.updateLabels()}},mounted(){this.trackVtkSubscription(this.widgetState.onModified(this.updateLabels)),this.updateLabels()},methods:{updateLabels(){const e=this.widgetState.getHandleList().map((e=>e.getOrigin()));1===e.length&&(this.svgLabels=[{xyz:e[0],text:this.toolName}])}}},W=(0,p.Z)(U,z,[],!1,null,null,null);W.options.__file="src/components/tools/MeasurementTools/svg/TextSvg.vue";const H=[{name:"2D Angle",icon:"angle-tool",component:F},{name:"2D Ruler",icon:"length-tool",component:G},{name:"2D Text",icon:"text-tool",component:h("Text",{svgComponent:W.exports,watch:{name(){this.updateMeasurements()}},methods:{initialMeasurements:()=>({}),getMeasurementLabels:()=>[],getDisplayedMeasurements:()=>({}),updateMeasurements(){},donePlacing(){return 1===this.widgetProxy.getWidgetState().getHandleList().length},setupViewWidget(e){e.setHandleVisibility(!1)}}})}],K={};H.forEach((e=>{K[e.component.name]=e}));var q={name:"MeasurementTools",props:["enabled"],components:{PopUp:n.Z,PalettePicker:o.Z,SvgIcon:l.Z,SourceSelect:r.Z},inject:["$notify","girderRest"],data:()=>({uiToolList:H,activeToolIndex:void 0,activeToolId:-1,targetPid:-1,pendingTool:null,palette:c.wY}),computed:{...(0,s.rn)("widgets",["measurements"]),tools(){let e=[];if(this.measurements[this.targetPid]){const t=this.measurements[this.targetPid];e=e.concat(t.map((e=>({...K[e.componentName],data:e.data}))))}return this.pendingTool&&(e=e.concat(this.pendingTool)),e},targetProxy(){return this.$proxyManager.getProxyById(this.targetPid)}},watch:{enabled(e){e?this.enableActiveTool():this.clearActiveTool()},targetPid(){this.enabled&&this.clearActiveTool()}},methods:{...(0,s.nv)("widgets",["addMeasurementTool","removeMeasurementTool","updateMeasurementTool"]),filterImageData:e=>"TrivialProducer"===e.getProxyName()&&"vtkImageData"===e.getType(),setTargetDataset(e){this.targetPid=e},toggleActiveTool(e){this.enabled?void 0===e?this.$emit("enable",!1):(this.removeTool(this.activeToolIndex),this.activeToolIndex=e,this.enableActiveTool()):void 0!==e&&(this.activeToolIndex=e,this.$emit("enable",!0))},enableActiveTool(){-1!==this.targetPid&&void 0!==this.activeToolIndex&&(this.pendingTool=H[this.activeToolIndex])},clearActiveTool(){this.pendingTool=null,this.activeToolIndex=void 0,this.activeToolId=-1},removeTool(e){this.pendingTool&&e===this.tools.length-1?(this.pendingTool=null,this.clearActiveTool()):this.removeMeasurementTool({datasetId:this.targetPid,index:e})},jumpTo(e,t){if(null!==t){const a=this.$proxyManager.getViews().find((t=>t.getAxis&&t.getAxis()===e));if(a){const e=a.getRepresentations().find((e=>e.getInput()===this.targetProxy));e&&e.setSlice(t)}}},saveToolData(e,t){this.pendingTool&&e===this.tools.length-1?(this.addMeasurementTool({datasetId:this.targetPid,componentName:this.pendingTool.component.name,data:t}),this.pendingTool=null,this.$emit("enable",!1)):this.updateMeasurementTool({datasetId:this.targetPid,index:e,data:t})},upload(){this.targetProxy&&setTimeout((()=>{this.$root.$emit("girder_upload_measurements",this.targetPid)}),10)}}},Y={container:"MeasurementTools-container-T9yiM",fullWidth:"MeasurementTools-fullWidth-jg_o5",heading:"MeasurementTools-heading-x9G8M",popup:"MeasurementTools-popup-Rgjca",toolButton:"MeasurementTools-toolButton-AuiAl",tools:"MeasurementTools-tools-Zplkp",toolIcon:"MeasurementTools-toolIcon-_ACfO",row:"MeasurementTools-row-IsEDx",rowAvatar:"MeasurementTools-rowAvatar-AoIB_",rowContent:"MeasurementTools-rowContent-OAflc",rowContentName:"MeasurementTools-rowContentName-qZi21",rowContentDetails:"MeasurementTools-rowContentDetails-IT3d5",action:"MeasurementTools-action-pSwKW",toolIconOverlay:"MeasurementTools-toolIconOverlay-PpV_8"},X=a(3),J=a.n(X),Q=a(582),ee=a(667),te=a(601),ae=a(637),ie=a(644),se=a(608),ne=a(610),oe=a(611),re=a(652),le=a(653),ce=a(634),de=a(654);e=a.hmd(e);var ue={};e.hot,e.hot;var pe=(0,p.Z)(q,i,[],!1,(function(e){ue.$style=Y.locals||Y,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return ue.$style}})}),null,null);J()(pe,{VBtn:Q.Z,VBtnToggle:ee.Z,VCard:te.Z,VContainer:ae.Z,VDivider:ie.Z,VFlex:se.Z,VIcon:ne.Z,VLayout:oe.Z,VSlider:re.Z,VSpacer:le.Z,VTextField:ce.Z,VTooltip:de.Z}),pe.options.__file="src/components/tools/MeasurementTools/index.vue";var ve=pe.exports},168:function(e,t,a){"use strict";a.d(t,{Z:function(){return R}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("source-select",{attrs:{label:"Target volume",filterFunc:e.filterImages,bindToActiveSource:"",disabled:e.running},on:{input:e.setTargetImage}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-menu",{attrs:{"offset-x":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-select",{staticStyle:{overflow:"hidden","text-overflow":"ellipses"},attrs:{label:"Select/create an output image","append-outer-icon":"mdi-dots-vertical",items:e.imageList,"item-text":"name","item-value":"proxyId",disabled:!e.targetImage||e.running,value:e.outputImageSelection},on:{input:e.setOutputImage,"click:append-outer":i.click}})]}}])},[e._v(" "),a("v-list",[e.outputImageSelection?[a("v-list-item",{on:{click:e.editOutputImageName}},[a("v-list-item-title",[e._v("Edit Name")])],1),e._v(" "),a("v-list-item",{on:{click:e.deleteOutputImage}},[a("v-list-item-title",[e._v("Delete")])],1)]:[a("v-list-item",[a("v-list-item-title",[e._v("(no image selected)")])],1)]],2)],1)],1),e._v(" "),e.editingOutputName?[a("v-flex",{attrs:{xs10:""}},[a("v-text-field",{attrs:{label:"Renaming image"},on:{keydown:function(t){if(!t.type.indexOf("key")&&13!==t.keyCode)return null;e.editingOutputName=!1}},model:{value:e.editableOutputImageName,callback:function(t){e.editableOutputImageName=t},expression:"editableOutputImageName"}})],1),e._v(" "),a("v-flex",{staticClass:"text-center",attrs:{xs2:""}},[a("v-btn",{attrs:{icon:""},on:{click:function(t){e.editingOutputName=!1}}},[a("v-icon",[e._v("mdi-content-save")])],1)],1)]:e._e()],2)],1),e._v(" "),a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs10:""}},[a("v-slider",{attrs:{label:"Radius",min:"1",max:"20",step:"1",disabled:e.running,"hide-details":""},model:{value:e.blurRadius,callback:function(t){e.blurRadius=t},expression:"blurRadius"}})],1),e._v(" "),a("v-flex",{attrs:{xs2:""}},[a("v-text-field",{attrs:{type:"number",min:"1",max:"20",disabled:e.running,step:"1"},model:{value:e.blurRadius,callback:function(t){e.blurRadius=t},expression:"blurRadius"}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-btn",{attrs:{text:"",loading:e.running,disabled:e.buttonDisabled},on:{click:e.runBlur},scopedSlots:e._u([{key:"loader",fn:function(){return[a("v-progress-circular",{attrs:{indeterminate:"",size:"24",width:"3"}}),e._v(" "),a("span",{staticClass:"ml-2"},[e._v("Running...")])]},proxy:!0}])},[a("v-icon",{attrs:{left:""}},[e._v("mdi-blur")]),e._v(" "),e._v("\n Blur Image\n ")],1)],1)],1)],1),e._v(" "),e.error?a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("v-alert",{attrs:{type:"error",dismissible:""},on:{input:function(t){e.error=null}}},[e._v("\n Median filter error: "+e._s(e.error.message)+"\n ")])],1)],1)],1):e._e(),e._v(" "),e.snackbar.show?a("portal",{attrs:{selector:"#app-portal-mount"}},[a("v-snackbar",{attrs:{top:"",color:e.snackbar.type,timeout:6e3},model:{value:e.snackbar.show,callback:function(t){e.$set(e.snackbar,"show",t)},expression:"snackbar.show"}},[e._v("\n "+e._s(e.snackbar.msg)+"\n "),a("v-btn",{attrs:{dark:"",text:""},on:{click:function(t){e.snackbar.show=!1}}},[e._v("close")])],1)],1):e._e()],1)};i._withStripped=!0;var s=a(518),n=a(59),o=a.n(n),r=a(9),l=a(84),c=a(382),d=a(82),u=a(30);const{vtkErrorMacro:p}=r.ZP,v=-2;var m={name:"MedianFilter",components:{SourceSelect:d.Z,Portal:c.h_},props:["enabled"],data:()=>({targetImageId:-1,outputImageId:-1,imageList:[],blurRadius:1,running:!1,webWorker:null,error:null,editingOutputName:!1,editableOutputImageName:"",snackbar:{show:!1,type:"",msg:""}}),computed:{targetImage(){return this.$proxyManager.getProxyById(this.targetImageId)},outputImage(){return this.$proxyManager.getProxyById(this.outputImageId)},outputImageSelection(){return this.outputImage?{name:this.outputImage.getName(),proxyId:this.outputImageId}:null},buttonDisabled(){return this.running||!this.outputImage}},watch:{targetImageId(){this.targetImageId===this.outputImageId&&(this.outputImageId=-1),this.refreshImageList()},outputImage(){this.outputImage?this.editableOutputImageName=this.outputImage.getName():this.editableOutputImageName=""},editableOutputImageName(e){this.outputImage&&this.outputImage.setName(e)}},proxyManagerHooks:{onProxyModified(){this.refreshImageList()},onProxyCreated(){this.refreshImageList()},onProxyDeleted(e){let{proxyId:t}=e;t===this.targetImageId&&(this.targetImageId=-1),t===this.outputImageId&&(this.outputImageId=-1)}},mounted(){this.refreshImageList()},methods:{filterImages:e=>"TrivialProducer"===e.getProxyName()&&"vtkImageData"===e.getType(),setTargetImage(e){this.targetImageId=e},setOutputImage(e){if(e===v){const e=this.createOutputImageProxy();this.outputImageId=e.getProxyId()}else this.outputImageId=e;this.editingOutputName=!1},refreshImageList(){const e=this.$proxyManager.getSources().filter((e=>e.getProxyId()!==this.targetImageId)).map((e=>({name:e.getName(),proxyId:e.getProxyId()})));this.imageList=[{name:"Create image",proxyId:v}].concat(e)},createOutputImageProxy(){return this.$proxyManager.createProxy("Sources","TrivialProducer",{name:`Median filter of ${this.targetImage.getName()}`})},runBlur(){const e=l.Z.convertVtkToItkImage(this.targetImage.getDataset());e.data=e.data.slice(0),this.running=!0;const t=String(this.blurRadius);(0,s.Z)(this.webWorker,"itkfiltering",["medianfilter","input.json","output.json",t],[{path:"output.json",type:o().Image}],[{path:"input.json",type:o().Image,data:e}]).then((e=>{if(this.webWorker=e.webWorker,!this.outputImage){const e=this.createOutputImageProxy();this.outputImageId=e.getProxyId()}const t=e.outputs[0].data;t.data=new Float32Array(t.data);const a=l.Z.convertItkToVtkImage(t);this.outputImage.setInputData(a),this.targetImage.getKey("girderProvenance")&&this.outputImage.setKey("girderProvenance",this.targetImage.getKey("girderProvenance")),(0,u._3)(this.$proxyManager,this.outputImage),this.$proxyManager.renderAllViews(),this.running=!1,this.showSnack({type:"success",msg:"Median filter done!"})})).catch((e=>{p(`Median filter error: ${e.message}`),this.error=e,this.showSnack({type:"error",msg:"Median filter error!"})}))},showSnack(e){let{type:t,msg:a}=e;this.snackbar.show=!0,this.snackbar.type=t,this.snackbar.msg=a},editOutputImageName(){this.outputImage&&(this.editingOutputName=!this.editingOutputName)},deleteOutputImage(){this.$proxyManager.deleteProxy(this.outputImage)}}},g={container:"MedianFilter-container-Bl5Bg"},h=a(581),y=a(3),f=a.n(y),b=a(668),x=a(582),w=a(637),_=a(608),S=a(610),P=a(611),k=a(647),C=a(641),V=a(646),I=a(638),T=a(599),$=a(640),D=a(652),M=a(666),L=a(634);e=a.hmd(e);var Z={};e.hot,e.hot;var O=(0,h.Z)(m,i,[],!1,(function(e){Z.$style=g.locals||g,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return Z.$style}})}),null,null);f()(O,{VAlert:b.Z,VBtn:x.Z,VContainer:w.Z,VFlex:_.Z,VIcon:S.Z,VLayout:P.Z,VList:k.Z,VListItem:C.Z,VListItemTitle:V.V9,VMenu:I.Z,VProgressCircular:T.Z,VSelect:$.Z,VSlider:D.Z,VSnackbar:M.Z,VTextField:L.Z}),O.options.__file="src/components/tools/MedianFilter/index.vue";var R=O.exports},166:function(e,t,a){"use strict";a.d(t,{Z:function(){return U}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("source-select",{attrs:{label:"Select a Base Image",filterFunc:e.filterImageData,bindToActiveSource:"",hideIfOneDataset:""},on:{input:e.setTargetVolume}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-menu",{attrs:{"offset-x":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-select",{staticStyle:{overflow:"hidden","text-overflow":"ellipses"},attrs:{label:"Select a Labelmap","append-outer-icon":"mdi-dots-vertical",items:e.labelmaps,"item-text":"name","item-value":"sourceId",disabled:-1===e.targetImageId,value:e.labelmapSelection},on:{input:e.setLabelMap,"click:append-outer":i.click}})]}}])},[e._v(" "),a("v-list",[e.labelmapSelection?[a("v-list-item",{on:{click:e.editName}},[a("v-list-item-title",[e._v("Edit Name")])],1),e._v(" "),a("v-list-item",{on:{click:e.deleteLabelmap}},[a("v-list-item-title",[e._v("Delete")])],1)]:[a("v-list-item",[a("v-list-item-title",[e._v("(no labelmap selected)")])],1)]],2)],1)],1),e._v(" "),e.editingName?[a("v-flex",{attrs:{xs10:""}},[a("v-text-field",{attrs:{label:"Renaming labelmap"},model:{value:e.editableLabelmapName,callback:function(t){e.editableLabelmapName=t},expression:"editableLabelmapName"}})],1),e._v(" "),a("v-flex",{staticClass:"text-center",attrs:{xs2:""}},[a("v-btn",{attrs:{icon:""},on:{click:function(t){e.editingName=!1}}},[a("v-icon",[e._v("mdi-content-save")])],1)],1)]:e._e()],2)],1),e._v(" "),a("v-card",{attrs:{color:"teal lighten-5"}},[a("v-card-text",{class:e.$style.paintActions},[a("v-switch",{class:e.$style.paintSwitch,attrs:{value:e.enabled,"hide-details":"",label:"Paint Mode",disabled:!e.canPaint},on:{change:function(t){e.$emit("enable",Boolean(t))}}}),e._v(" "),a("v-spacer"),e._v(" "),a("v-btn",{staticClass:"mr-3",attrs:{icon:"",small:"",disabled:!e.canPaint},on:{click:e.undo}},[a("v-icon",[e._v("mdi-undo")])],1),e._v(" "),a("v-btn",{attrs:{icon:"",small:"",disabled:!e.canPaint},on:{click:e.redo}},[a("v-icon",[e._v("mdi-redo")])],1)],1)],1),e._v(" "),a("v-container",{class:e.$style.container,attrs:{"grid-list-md":""}},[a("v-layout",{directives:[{name:"show",rawName:"v-show",value:e.canPaint,expression:"canPaint"}],attrs:{wrap:"","align-center":""}},[a("v-flex",{staticClass:"mt-1",attrs:{xs10:""}},[a("label",{staticClass:"v-label theme--light",attrs:{for:"paint-2D-brush-toggle"}},[e._v("2D Brush")])]),e._v(" "),a("v-flex",{staticClass:"mt-1",attrs:{xs2:""}},[a("v-switch",{staticClass:"mt-n1 pt-0",attrs:{id:"paint-2D-brush-toggle","hide-details":""},model:{value:e.brush2D,callback:function(t){e.brush2D=t},expression:"brush2D"}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-slider",{attrs:{label:"Radius",min:"1",max:e.brushSizeMax,step:"1",dirty:"","hide-details":"",value:e.radius},on:{input:e.setRadius},scopedSlots:e._u([{key:"append",fn:function(){return[a("v-text-field",{staticClass:"mt-n1 pt-0",attrs:{type:"number",min:"1",max:e.brushSizeMax,step:"1","hide-details":"","single-line":"",value:e.radius},on:{input:e.setRadius}})]},proxy:!0}])})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-list",{class:e.$style.fullWidth},[a("v-subheader",{class:e.$style.headerRow},[a("span",{staticClass:"black--text subtitle-1 body-2"},[e._v("Labels")]),e._v(" "),a("v-spacer"),e._v(" "),a("v-btn",{class:e.$style.lowercaseText,attrs:{text:""},on:{click:e.addLabel}},[a("v-icon",{attrs:{small:"",color:"blue"}},[e._v("mdi-plus-circle")]),e._v(" "),a("span",{staticClass:"pl-2 grey--text text--darken-2"},[e._v("Add Label")])],1)],1),e._v(" "),a("v-radio-group",{class:e.$style.radioGroup,attrs:{value:e.activeLabel},on:{change:e.setLabel}},[e._l(e.colormapArray,(function(t,i){return[a("v-divider",{key:"divider_"+i}),e._v(" "),a("v-list-item",{key:t.label},[a("v-list-item-action",[a("v-radio",{class:e.$style.activeRadio,attrs:{value:t.label}})],1),e._v(" "),a("v-list-item-content",{class:e.$style.listRow},[0===t.label?[a("div",{class:e.$style.colorBoxBackground},[a("div",{class:e.$style.colorBox,style:e.colorToBackgroundCSS(e.colormapArray,0)})]),e._v(" "),a("span",{staticClass:"pl-1"},[e._v("Eraser")])]:[a("pop-up",{staticClass:"flex-grow-0 flex-shrink-1",scopedSlots:e._u([{key:"trigger",fn:function(){return[a("div",{class:e.$style.colorBoxBackground},[a("div",{class:e.$style.colorBox,style:e.colorToBackgroundCSS(e.colormapArray,i)})])]},proxy:!0},{key:"popup",fn:function(){return[a("div",{class:e.$style.colorPicker},[a("palette-picker",{attrs:{palette:e.palette,size:28,value:e.asHex(t.color)},on:{input:function(a){return e.setLabelColor(t.label,arguments[0])}}}),e._v(" "),a("div",{class:e.$style.opacitySlider},[a("v-slider",{attrs:{label:"Opacity",value:t.opacity,min:0,max:255,step:1},on:{input:function(a){return e.setLabelOpacity(t.label,arguments[0])}}})],1)],1)]},proxy:!0}],null,!0)}),e._v(" "),a("span",{staticClass:"pl-1"},[e._v("Label "+e._s(t.label))])]],2),e._v(" "),a("v-list-item-action",[0!==t.label?a("v-btn",{class:e.$style.deleteButton,attrs:{icon:""},on:{click:function(a){return e.deleteLabel(t.label)}}},[a("v-icon",[e._v("mdi-delete")])],1):e._e()],1)],1)]})),e._v(" "),a("v-divider")],2)],1)],1),e._v(" "),a("v-btn",{attrs:{disabled:!e.girderRest||!e.girderRest.user},on:{click:function(t){return e.upload()}}},[e._v("\n Upload\n ")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:!e.girderRest||!e.girderRest.user,expression:"!girderRest || !girderRest.user"}],staticClass:"body-2"},[e._v("Log in to upload")])],1)],1)],1)};i._withStripped=!0;var s=a(612),n=a(4),o=a(517),r=a(72),l=a(381),c=a(38),d=a(81),u=a(82),p=a(30),v=a(57);const m="PaintToolSync",g=-2;function h(e){const t=e.slice(1),a=[];for(let e=0;e({targetImageId:-1,activeLabelmapId:-1,internalLabelmaps:[],widgetId:-1,editingName:!1,editableLabelmapName:"",brushSizeMax:100,radius:5,brush2D:!1,colormapArray:[]}),computed:{...(0,s.rn)("widgets",{imageToLabelmaps:e=>e.imageToLabelmaps,labelmapToImage:e=>e.labelmapToImage,labelmapStates:e=>e.labelmapStates}),labelmaps(){return[{name:"Create new labelmap",sourceId:g}].concat(this.internalLabelmaps)},activeLabel(){return this.activeLabelmapState?this.activeLabelmapState.selectedLabel:-1},activeLabelmapProxy(){return this.$proxyManager.getProxyById(this.activeLabelmapId)},activeLabelmapParentImageProxy(){return this.$proxyManager.getProxyById(this.labelmapToImage[this.activeLabelmapId])},activeLabelmapState(){return this.labelmapStates[this.activeLabelmapId]},targetImageProxy(){return this.$proxyManager.getProxyById(this.targetImageId)},labelmapSelection(){return this.activeLabelmapProxy?{name:this.editableLabelmapName||this.activeLabelmapProxy.getName(),sourceId:this.activeLabelmapProxy.getProxyId()}:null},canPaint(){return this.targetImageId>-1&&this.activeLabelmapId>-1},paintProxy(){return this.$proxyManager.getProxyById(this.widgetId)}},watch:{editableLabelmapName(e){this.activeLabelmapProxy&&this.activeLabelmapProxy.setName(e)},activeLabel(e){this.filter&&this.filter.setLabel(e)},radius(e){this.filter&&this.filter.setRadius(e),this.paintProxy&&this.paintProxy.getWidget().setRadius(e)},enabled(e){e?this.enablePainting():this.disablePainting()},activeLabelmapProxy(){if(this.activeLabelmapProxy){this.editableLabelmapName=this.activeLabelmapProxy.getName();const e=this.activeLabelmapProxy.getDataset().getDimensions();this.brushSizeMax=Math.floor(Math.max(...e)/2);const t=this.activeLabelmapProxy.getDataset();this.labelmapSub.sub(t.onModified(this.updateColorMap)),this.updateColorMap()}else this.labelmapSub.unsub();this.editingName=!1}},proxyManagerHooks:{onProxyModified(e){if(this.enabled&&"Representations"===e.getProxyGroup()&&e.getInput()===this.activeLabelmapProxy&&this.mousedViewId>-1){const e=this.$proxyManager.getProxyById(this.mousedViewId);this.updateHandleSlice(e)}if("Sources"===e.getProxyGroup()&&"LabelMap"===e.getProxyName()){const t=this.internalLabelmaps.find((t=>t.sourceId===e.getProxyId()));t&&(t.name=e.getName())}},onProxyCreated(e){let{proxy:t,proxyGroup:a,proxyName:i,proxyId:s}=e;"Sources"===a&&"LabelMap"===i&&this.internalLabelmaps.push({name:t.getName(),sourceId:s})},onProxyDeleted(e){let{proxyGroup:t,proxyName:a,proxyId:i}=e;if("Sources"===t&&"LabelMap"===a){const e=this.internalLabelmaps.findIndex((e=>e.sourceId===i));e>-1&&this.internalLabelmaps.splice(e,1)}i===this.activeLabelmapId?(this.activeLabelmapId=-1,this.$emit("enable",!1)):i===this.targetImageId&&(this.targetImageId=-1,this.$emit("enable",!1))}},created(){this.palette=v.oe,this.mousedViewId=-1,this.filter=null,this.labelmapSub=(0,p.y5)(),this.internalLabelmaps=this.$proxyManager.getSources().filter((e=>"LabelMap"===e.getProxyName())).map((e=>({name:e.getName(),sourceId:e.getProxyId()})))},beforeDestroy(){this.enabled&&this.disablePainting(),this.labelmapSub.unsub()},methods:{...(0,s.nv)({addLabelmapToImage:(e,t,a)=>e("widgets/addLabelmapToImage",{imageId:a,labelmapId:t}),setLabelmapState:(e,t,a)=>e("widgets/setLabelmapState",{labelmapId:t,labelmapState:a}),deleteLabelmapInternal:(e,t)=>e("widgets/deleteLabelmap",t)}),setRadius(e){this.radius=Math.max(1,Math.round(e))},setLabel(e){const t=this.activeLabelmapState;t&&(t.selectedLabel=Number(e))},editName(){this.labelmapSelection&&(this.editingName=!this.editingName)},deleteLabelmap(){this.activeLabelmapProxy&&(this.deleteLabelmapInternal(this.activeLabelmapProxy.getProxyId()),this.$proxyManager.deleteProxy(this.activeLabelmapProxy))},filterImageData:e=>"TrivialProducer"===e.getProxyName()&&"vtkImageData"===e.getType(),asHex:e=>`#${e.map((e=>`00${e.toString(16)}`.slice(-2))).join("")}`,setTargetVolume(e){this.targetImageId=e,this.$emit("enable",!1)},setLabelMap(e){if(this.filter=o.ZP.newInstance(),e===g){const e=this.targetImageProxy.getDataset();this.filter.setBackgroundImage(e);const t=this.$proxyManager.createProxy("Sources","LabelMap"),a=t.getProxyId();this.activeLabelmapId=a,this.addLabelmapToImage(a,this.targetImageId);const i=this.imageToLabelmaps[this.targetImageId].length,s={selectedLabel:1,lastColorIndex:0};this.setLabelmapState(a,s);const o=this.targetImageProxy.getName();t.setName(`Labelmap ${i} ${o}`);const r=function(e){const t=l.ZP.newInstance(e.get("spacing","origin","direction"));t.setDimensions(e.getDimensions());const a=new Uint16Array(e.getNumberOfPoints()),i=n.ZP.newInstance({numberOfComponents:1,values:a});return t.getPointData().setScalars(i),t.computeTransforms(),t}(e);r.setLabelColor(s.selectedLabel,h(this.palette[0])),t.setInputData(r),this.filter.setLabelMap(r),(0,p._3)(this.$proxyManager,t),this.$proxyManager.renderAllViews()}else{const t=this.$proxyManager.getProxyById(e);t&&(this.activeLabelmapId=t.getProxyId(),this.filter.setLabelMap(t.getDataset()))}this.filter.setLabel(this.activeLabelmapState.selectedLabel),this.filter.setRadius(this.radius),this.$proxyManager.getViews().forEach((e=>{const t=this.targetImageProxy,a=this.$proxyManager.getRepresentation(t,e);e.bindRepresentationToManipulator&&a&&e.bindRepresentationToManipulator(a)}))},updateColorMap(){const e=this.activeLabelmapProxy;if(e){const t=e.getDataset().getColorMap(),a=(e,t)=>e-t;this.colormapArray=Object.keys(t).sort(a).map((e=>({label:Number(e),color:t[e].slice(0,3),opacity:t[e][3]})))}},setLabelColor(e,t){const a=this.activeLabelmapProxy.getDataset(),i=a.getColorMap()[e],s=h(t);3===s.length&&(a.setLabelColor(e,[...s,i[3]]),this.$proxyManager.renderAllViews())},setLabelOpacity(e,t){const a=this.activeLabelmapProxy.getDataset(),i=a.getColorMap()[e].slice();t&&(i[3]=Number(t),a.setLabelColor(e,i)),this.$proxyManager.renderAllViews()},addLabel(){const e=this.colormapArray.map((e=>e.label));let t=0;for(;e.length;){const a=e.shift();if(a-t>1){t++;break}if(0===e.length){t=a+1;break}t=a}const a=this.activeLabelmapState,i=(a.lastColorIndex+1)%this.palette.length,s=h(this.palette[i]);this.activeLabelmapProxy.getDataset().setLabelColor(t,s),a.lastColorIndex=i,this.setLabel(t)},deleteLabel(e){const t=this.activeLabelmapProxy.getDataset();t.removeLabel(e);const a=t.getPointData().getScalars().getData();for(let t=0;t{e.getInteractor().requestAnimation(m),t.grabFocus(a);const i=a.getPriority()+1,s=e.getInteractor().onMouseMove((()=>{this.mousedViewId!==e.getProxyId()&&(this.mousedViewId=e.getProxyId(),this.updateHandleSlice(e))}),i),n=a.onStartInteractionEvent((()=>{this.brush2D?this.filter.setSlicingMode(r.P["XYZ"[e.getAxis()]]):this.filter.setSlicingMode(r.P.NONE),this.filter.startStroke(),this.filter.addPoint(this.paintProxy.getWidgetState().getTrueOrigin())})),o=a.onInteractionEvent((()=>{a.getPainting()&&this.filter.addPoint(this.paintProxy.getWidgetState().getTrueOrigin())})),l=a.onEndInteractionEvent((()=>{this.filter.addPoint(this.paintProxy.getWidgetState().getTrueOrigin()),this.filter.endStroke()}));return[()=>e.getInteractor().cancelAnimation(m),s.unsubscribe,n.unsubscribe,o.unsubscribe,l.unsubscribe]};e.addToViews(),e.executeViewFuncs({View3D:e=>(e.getInteractor().requestAnimation(m),()=>{e.getInteractor().cancelAnimation(m)}),View2D_X:t,View2D_Y:t,View2D_Z:t})},disablePainting(){this.paintProxy.removeFromViews(),this.$proxyManager.deleteProxy(this.paintProxy),this.widgetId=-1},upload(){setTimeout((()=>{const e=this.activeLabelmapProxy,t=this.activeLabelmapParentImageProxy;e&&t&&(t.getKey("girderProvenance")&&e.setKey("girderProvenance",t.getKey("girderProvenance")),this.$root.$emit("girder_upload_proxy",this.activeLabelmapId))}),10)}}},f={container:"PaintTool-container-K_01H",fullWidth:"PaintTool-fullWidth-ygvJa",labelInput:"PaintTool-labelInput-CX7Np",paintActions:"PaintTool-paintActions-NWnXC",paintSwitch:"PaintTool-paintSwitch-CEy8P",radioGroup:"PaintTool-radioGroup-oAs8K",headerRow:"PaintTool-headerRow-SXk6M",listRow:"PaintTool-listRow-QOnht",lowercaseText:"PaintTool-lowercaseText-Cncdr",colorBoxBackground:"PaintTool-colorBoxBackground-uCP_B",colorBox:"PaintTool-colorBox-MGe3f",colorPicker:"PaintTool-colorPicker-LSW1f",opacitySlider:"PaintTool-opacitySlider-_m6x7",activeRadio:"PaintTool-activeRadio-BOPEG"},b=a(581),x=a(3),w=a.n(x),_=a(582),S=a(601),P=a(607),k=a(637),C=a(644),V=a(608),I=a(610),T=a(611),$=a(647),D=a(641),M=a(642),L=a(646),Z=a(638),O=a(659),R=a(660),B=a(640),A=a(652),F=a(653),N=a(645),E=a(661),j=a(634);e=a.hmd(e);var G={};e.hot,e.hot;var z=(0,b.Z)(y,i,[],!1,(function(e){G.$style=f.locals||f,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return G.$style}})}),null,null);w()(z,{VBtn:_.Z,VCard:S.Z,VCardText:P.ZB,VContainer:k.Z,VDivider:C.Z,VFlex:V.Z,VIcon:I.Z,VLayout:T.Z,VList:$.Z,VListItem:D.Z,VListItemAction:M.Z,VListItemContent:L.km,VListItemTitle:L.V9,VMenu:Z.Z,VRadio:O.Z,VRadioGroup:R.Z,VSelect:B.Z,VSlider:A.Z,VSpacer:F.Z,VSubheader:N.Z,VSwitch:E.Z,VTextField:j.Z}),z.options.__file="src/components/tools/PaintTool/index.vue";var U=z.exports},172:function(e,t,a){"use strict";a.d(t,{Z:function(){return g}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.$style.wrapper},[a("v-btn",{attrs:{text:"",disabled:e.playing||e.isOnFirstFrame,small:""},on:{click:e.firstFrame}},[a("v-icon",[e._v("\n mdi-chevron-double-left\n ")])],1),e._v(" "),a("v-btn",{attrs:{text:"",disabled:e.playing||e.isOnFirstFrame,small:""},on:{click:e.previousFrame}},[a("v-icon",[e._v("\n mdi-chevron-left\n ")])],1),e._v(" "),e.playing?a("v-btn",{attrs:{text:"",small:""},on:{click:e.pause}},[a("v-icon",[e._v("\n mdi-pause\n ")])],1):a("v-btn",{attrs:{text:"",small:"",disabled:e.isOnLastFrame},on:{click:e.play}},[a("v-icon",[e._v("\n mdi-play\n ")])],1),e._v(" "),a("v-btn",{attrs:{text:"",disabled:e.playing||e.isOnLastFrame,small:""},on:{click:e.nextFrame}},[a("v-icon",[e._v("\n mdi-chevron-right\n ")])],1),e._v(" "),a("v-btn",{attrs:{text:"",disabled:e.playing||e.isOnLastFrame,small:""},on:{click:e.lastFrame}},[a("v-icon",[e._v("\n mdi-chevron-double-right\n ")])],1),e._v(" "),a("v-select",{staticClass:"pv-no-select",attrs:{disabled:e.playing,items:e.frames,value:e.currentFrame,dense:"",flat:"","hide-details":""},on:{change:e.setCurrentFrame}})],1)};i._withStripped=!0;var s=a(612),n={name:"AnimationControls",computed:{...(0,s.rn)("animations",{playing:e=>e.playing,currentFrame:e=>e.currentFrame,frames:e=>e.frames}),isOnFirstFrame(){return this.frames.length>0&&this.currentFrame===this.frames[0]},isOnLastFrame(){return this.frames.length>0&&this.currentFrame===this.frames[this.frames.length-1]}},methods:{setCurrentFrame(e){this.setFrameIndex(this.frames.indexOf(e))},...(0,s.nv)("animations",["play","pause","nextFrame","previousFrame","firstFrame","lastFrame","setFrameIndex"])}},o={wrapper:"AnimationControls-wrapper-LJEUM"},r=a(581),l=a(3),c=a.n(l),d=a(582),u=a(610),p=a(640);e=a.hmd(e);var v={};e.hot,e.hot;var m=(0,r.Z)(n,i,[],!1,(function(e){v.$style=o.locals||o,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return v.$style}})}),null,null);c()(m,{VBtn:d.Z,VIcon:u.Z,VSelect:p.Z}),m.options.__file="src/components/widgets/AnimationControls/index.vue";var g=m.exports},164:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var i=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{class:e.$style.container,style:e.style})};i._withStripped=!0;var s={name:"ColorGroup",props:{index:{type:Number,default:0},top:{type:Number,default:0},visible:{type:Boolean,default:!0},colors:{this:Array,default:()=>["#e1002a","#417dc0","#1d9a57","#e9bc2f","#9b3880"]}},computed:{style(){return this.visible?{background:this.colors[this.index%this.colors.length],top:`${this.top}px`}:"display: none;"}}},n={container:"ColorGroup-container-xP4_7"},o=a(581);e=a.hmd(e);var r={};e.hot,e.hot;var l=(0,o.Z)(s,i,[],!1,(function(e){r.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return r.$style}})}),null,null);l.options.__file="src/components/widgets/ColorGroup/index.vue";var c=l.exports},175:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var i=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{on:{dragover:function(t){return t.preventDefault(),e.onDragOver.apply(null,arguments)},dragleave:e.onDragLeave,drop:function(t){return t.preventDefault(),e.onDrop.apply(null,arguments)}}},[e._t("default",null,{dragHover:e.dragHover})],2)};i._withStripped=!0;var s={name:"DragAndDrop",props:{enabled:Boolean},data:()=>({dragHover:!1}),methods:{onDragOver:function(e){if(this.enabled){const t=e.dataTransfer.types;(t&&t instanceof Array?-1!==t.indexOf("Files"):"Files"in t)&&(this.dragHover=!0,null!==this.dragTimeout&&(window.clearTimeout(this.dragTimeout),this.dragTimeout=null))}},onDragLeave:function(){this.enabled&&(this.dragTimeout=window.setTimeout((()=>{this.dragHover=!1,this.dragTimeout=null}),50))},onDrop:function(e){this.enabled&&(this.$emit("drop",Array.from(e.dataTransfer.files)),this.dragHover=!1)}},created(){this.dragTimeout=null}},n=(0,a(581).Z)(s,i,[],!1,null,null,null);n.options.__file="src/components/widgets/DragAndDrop/index.vue";var o=n.exports},173:function(e,t,a){"use strict";a.d(t,{Z:function(){return b}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("span",{staticClass:"subtitle-2"},[e._v("Rendering")]),e._v(" "),a("v-spacer"),e._v(" "),a("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-icon",e._g({attrs:{small:""}},i),[e._v("mdi-help-circle")])]}}])},[a("table",{class:e.$style.table},[a("tr",[a("td",{staticClass:"body-2"},[e._v("WebGL")]),e._v(" "),a("td",{staticClass:"body-1"},[e._v(e._s(e.webgl))])]),e._v(" "),a("tr",[a("td",{staticClass:"body-2"},[e._v("Vendor")]),e._v(" "),a("td",{staticClass:"body-1"},[e._v(e._s(e.vendor))])]),e._v(" "),a("tr",[a("td",{staticClass:"body-2"},[e._v("GPU")]),e._v(" "),a("td",{staticClass:"body-1"},[e._v(e._s(e.gpu))])])])])],1)],1),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("div",{class:["js-monitor",e.$style.monitor]})],1)};i._withStripped=!0;var s=a(519);var n={props:{width:{default:268,type:Number},proxyManager:{required:!0}},data:()=>({vendor:"Unknown",gpu:"Unknown",webgl:0,infoDialog:!1}),methods:{onMounted:function(){this.monitor=s.ZP.newInstance({bufferSize:this.width}),this.updateActiveView=()=>{const e=this.proxyManager.getActiveView(),t=e?e.getRenderWindow():null;if(e){const t=e.getOpenGLRenderWindow().getGLInformations(),{UNMASKED_RENDERER:a,UNMASKED_VENDOR:i,WEBGL_VERSION:s}=t;this.vendor=i.value,this.gpu=a.value,this.webgl=s.value}this.monitor.setRenderWindow(t),this.monitor.update()},window.addEventListener("resize",this.monitor.update),this.subscriptions=[this.proxyManager.onModified(this.monitor.update).unsubscribe,this.proxyManager.onActiveViewChange(this.updateActiveView).unsubscribe,()=>window.removeEventListener("resize",this.monitor.update)],this.monitor.setContainer(this.$el.querySelector(".js-monitor")),this.monitor.getFpsMonitorContainer().style.flexDirection="column",this.updateActiveView()}},mounted(){this.$nextTick(this.onMounted)},beforeDestroy:function(){for(this.monitor&&(this.monitor.delete(),this.monitor=null);this.subscriptions.length;)this.subscriptions.pop()()}},o={card:"GPUInformation-card-uYItl",heading:"GPUInformation-heading-_XHR1",divider:"GPUInformation-divider-JhBB2",monitor:"GPUInformation-monitor-Fu0yC",table:"GPUInformation-table-BU0Qk"},r=a(581),l=a(3),c=a.n(l),d=a(601),u=a(637),p=a(644),v=a(610),m=a(611),g=a(653),h=a(654);e=a.hmd(e);var y={};e.hot,e.hot;var f=(0,r.Z)(n,i,[],!1,(function(e){y.$style=o.locals||o,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return y.$style}})}),null,null);c()(f,{VCard:d.Z,VContainer:u.Z,VDivider:p.Z,VIcon:v.Z,VLayout:m.Z,VSpacer:g.Z,VTooltip:h.Z}),f.options.__file="src/components/widgets/GPUInformation/index.vue";var b=f.exports},38:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.$style.wrapper},e._l(e.palette,(function(t){return a("div",{key:t,class:e.$style.item},[a("div",{class:e.$style.blot,style:e.getStyles(t),on:{click:function(a){return e.$emit("input",t)}}},[t.toLowerCase()===e.selectedColor?a("v-icon",{class:e.$style.check,attrs:{size:e.size}},[e._v("\n mdi-check\n ")]):e._e()],1)])})),0)};i._withStripped=!0;var s={name:"PalettePicker",props:{palette:{type:Array,default:()=>[]},size:{type:Number,default:24},value:{type:String,default:""}},computed:{selectedColor(){return this.value.toLowerCase()}},methods:{getStyles(e){return{width:`${this.size}px`,height:`${this.size}px`,background:e}}}},n={wrapper:"PalettePicker-wrapper-Cz9zR",item:"PalettePicker-item-q0Hig",check:"PalettePicker-check-m60ux",blot:"PalettePicker-blot-JTooX"},o=a(581),r=a(3),l=a.n(r),c=a(610);e=a.hmd(e);var d={};e.hot,e.hot;var u=(0,o.Z)(s,i,[],!1,(function(e){d.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return d.$style}})}),null,null);l()(u,{VIcon:c.Z}),u.options.__file="src/components/widgets/PalettePicker/index.vue";var p=u.exports},152:function(e,t,a){"use strict";a.d(t,{Z:function(){return u}});var i=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{class:e.$style.container})};i._withStripped=!0;var s=a(370);let n=null;var o={props:{source:{type:Object},piecewiseFunction:{required:!0,type:Object},proxyManager:{required:!0}},data:()=>({}),methods:{onOpacityChange:function(){if(n)return;n=this.piecewiseWidget;const e=this.piecewiseFunction;if(e){e.setGaussians(this.piecewiseWidget.getGaussians());const t=this.piecewiseWidget.getOpacityRange();e.getLookupTableProxy().setDataRange(...t)}n=null},updateWidget:function(){const e=this.piecewiseFunction;if(e){const t=e.getLookupTableProxy().getLookupTable();this.piecewiseWidget.setGaussians(e.getGaussians()),this.source?this.piecewiseWidget.setDataArray(this.source.getDataset().getPointData().getScalars().getData()):this.piecewiseWidget.setDataArray(Float32Array.from(e.getDataRange())),this.piecewiseWidget.setColorTransferFunction(t),this.subscriptions.push(t.onModified((()=>{if(n)return;n=this.piecewiseWidget;const t=this.piecewiseWidget.getOpacityRange();e.getLookupTableProxy().setDataRange(...t),this.piecewiseWidget.render(),n=null}))),this.piecewiseWidget.render()}},onMounted:function(){this.piecewiseWidget=s.ZP.newInstance({numberOfBins:256,size:[280,150]}),this.piecewiseWidget.updateStyle({backgroundColor:"rgba(255, 255, 255, 0.6)",histogramColor:"rgba(100, 100, 100, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(255, 255, 255)",handleColor:"rgb(50, 150, 50)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:0,padding:10}),this.subscriptions=[],this.widgetSubscriptions=[this.piecewiseWidget.onOpacityChange((()=>{this.onOpacityChange()})),this.piecewiseWidget.onAnimation((e=>{this.piecewiseFunction&&this.proxyManager.setAnimationOnAllViews(e)}))],this.piecewiseWidget.setContainer(this.$el),this.piecewiseWidget.bindMouseListeners(),this.updateWidget(),this.onOpacityChange()}},mounted(){this.$nextTick(this.onMounted)},beforeDestroy:function(){for(;this.widgetSubscriptions.length;)this.widgetSubscriptions.pop().unsubscribe();for(;this.subscriptions.length;)this.subscriptions.pop().unsubscribe();this.piecewiseWidget.unbindMouseListeners(),this.piecewiseWidget.setContainer(null)},updated(){for(;this.subscriptions.length;)this.subscriptions.pop().unsubscribe();this.updateWidget()}},r={container:"PiecewiseFunctionEditor-container-_jIUo"},l=a(581);e=a.hmd(e);var c={};e.hot,e.hot;var d=(0,l.Z)(o,i,[],!1,(function(e){c.$style=r.locals||r,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return c.$style}})}),null,null);d.options.__file="src/components/widgets/PiecewiseFunctionEditor/index.vue";var u=d.exports},81:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"container",class:e.$style.container},[a("div",{on:{click:function(t){e.visible=!e.visible}}},[e._t("trigger"),e._v(" "),a("div",{ref:"anchor",staticStyle:{width:"0",height:"0",margin:"0",padding:"0"}})],2),e._v(" "),e.visible?a("portal",{attrs:{selector:"#app-portal-mount"}},[a("div",{ref:"popup",class:e.$style.popup,style:e.getPositioning()},[e._t("popup",null,{close:e.close})],2)]):e._e()],1)};i._withStripped=!0;var s={name:"PopUp",components:{Portal:a(382).h_},data:()=>({visible:!1}),mounted(){document.addEventListener("mousedown",this.handleMouse,!0),document.addEventListener("keydown",this.handleEsc)},beforeDestroy(){document.removeEventListener("mousedown",this.handleMouse,!0),document.removeEventListener("keydown",this.handleEsc)},methods:{handleMouse(e){if(this.visible){let t=e.target;for(;t&&t!==this.$refs.container&&t!==this.$refs.popup;)t=t.parentElement;null===t&&(this.visible=!1)}},handleEsc(e){this.visible&&27===e.keyCode&&this.close()},getPositioning(){const e=this.$refs.anchor,{top:t,left:a}=e.getBoundingClientRect(),i=window.innerHeight;return t>i/2?{bottom:i-t+"px",left:`${a}px`}:{top:`${t}px`,left:`${a}px`}},close(){this.visible=!1}}},n={container:"PopUp-container-MOF8K",popup:"PopUp-popup-P9jw2"},o=a(581);e=a.hmd(e);var r={};e.hot,e.hot;var l=(0,o.Z)(s,i,[],!1,(function(e){r.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return r.$style}})}),null,null);l.options.__file="src/components/widgets/PopUp/index.vue";var c=l.exports},82:function(e,t,a){"use strict";a.d(t,{Z:function(){return u}});var i=function(){var e=this,t=e.$createElement;return(e._self._c||t)("v-select",{directives:[{name:"show",rawName:"v-show",value:!e.shouldHide,expression:"!shouldHide"}],attrs:{label:e.label,items:e.sourceList,"item-text":"name","item-value":"proxyId",disabled:e.disabled,value:e.selection},on:{input:e.setInternalValue}})};i._withStripped=!0;function s(e){return{name:e.getName(),proxyId:e.getProxyId()}}var n={name:"SourceSelect",props:{filterFunc:{type:Function,default:()=>()=>!0},label:{type:String,default:()=>""},bindToActiveSource:{type:Boolean,default:()=>!1},hideIfOneDataset:{type:Boolean,default:()=>!1},value:{default:()=>-1},disabled:{type:Boolean,default:()=>!1}},data:()=>({sourceList:[],internalValue:-1}),computed:{selection(){const e=this.$proxyManager.getProxyById(this.internalValue);return e&&"Sources"===e.getProxyGroup()?s(e):null},shouldHide(){return this.hideIfOneDataset&&this.sourceList.length<=1}},watch:{value(e){this.internalValue=e}},mounted(){const e=this.$proxyManager.getActiveSource();e&&this.setInternalValue(e.getProxyId()),this.updateSourceList()},proxyManagerHooks:{onProxyModified(e){e.getProxyId()===this.waitForActiveDataset&&(this.waitForActiveDataset=null,this.setInternalValue(e.getProxyId())),this.updateSourceList()},onActiveSourceChange(e){if(this.bindToActiveSource)if(e){if(e.getProxyId()!==this.internalValue){const t=e.getProxyId();e.getDataset()?this.setInternalValue(t):this.waitForActiveDataset=t}}else this.setInternalValue(-1)},onProxyRegistrationChange(e){const{proxyGroup:t}=e;"Sources"===t&&this.updateSourceList()}},methods:{updateSourceList(){const e=this.$proxyManager.getSources().filter((e=>e&&!!e.getDataset()&&this.filterFunc(e)));this.sourceList=e.map((e=>s(e)))},setInternalValue(e){e!==this.internalValue&&(this.internalValue=e,this.$emit("input",e))}}},o=a(581),r=a(3),l=a.n(r),c=a(640),d=(0,o.Z)(n,i,[],!1,null,null,null);l()(d,{VSelect:c.Z}),d.options.__file="src/components/widgets/SourceSelect/index.vue";var u=d.exports},75:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.svg?a("img",{staticClass:"pv-no-select",attrs:{src:e.svg}}):e._e()};i._withStripped=!0;var s={name:"SvgIcon",props:{icon:String},data:()=>({svg:null}),watch:{icon(e){this.icon&&this.importIcon(e)}},mounted(){this.icon&&this.importIcon(this.icon)},methods:{importIcon(e){return a(505)(`./${e}.svg`).then((e=>{this.svg=e.default||e})).catch((e=>{throw this.svg=null,e}))}}},n=(0,a(581).Z)(s,i,[],!1,null,null,null);n.options.__file="src/components/widgets/SvgIcon/index.vue";var o=n.exports},154:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=function(){var e,t=this,a=t.$createElement,i=t._self._c||a;return i("li",{class:t.$style.node},[i("div",{class:t.$style.header,on:{click:t.onItemClick}},[t.item[t.childrenKey]?i("div",{class:t.$style.expander},[i("v-icon",{class:(e={},e[t.$style.arrow]=!0,e[t.$style.openArrow]=t.open||t.value,e)},[t._v("\n mdi-menu-down\n ")])],1):t._e(),t._v(" "),i("span",{staticClass:"body-2",class:t.$style.name},[t._v(t._s(t.item[t.labelKey]))])]),t._v(" "),t.item[t.childrenKey]?i("ul",{directives:[{name:"show",rawName:"v-show",value:t.open||t.value,expression:"open || value"}]},t._l(t.item[t.childrenKey],(function(e,a){return i("node",t._b({key:a,attrs:{item:e},on:{input:function(e){return t.$emit("input",e)}}},"node",{open:t.open,labelKey:t.labelKey,childrenKey:t.childrenKey},!1))})),1):t._e()])};i._withStripped=!0;var s={name:"Node",props:{item:{},open:{type:Boolean,default:!1},labelKey:{type:String,default:()=>"name"},childrenKey:{type:String,default:()=>"children"}},data:()=>({value:!1}),methods:{onItemClick:function(){this.item[this.childrenKey]?this.value=!this.value:this.$emit("input",this.item)}}},n=a(380),o=a(581),r=a(3),l=a.n(r),c=a(610);e=a.hmd(e);var d={};e.hot,e.hot;var u=(0,o.Z)(s,i,[],!1,(function(e){d.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return d.$style}})}),null,null);l()(u,{VIcon:c.Z}),u.options.__file="src/components/widgets/TreeView/Node/index.vue";var p=u.exports},153:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.$style.wrapper},[a("v-text-field",{ref:"filterInput",attrs:{placeholder:"Filter...",clearable:"","hide-details":""},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.trySelect(e.filteredTree)}},model:{value:e.filterText,callback:function(t){e.filterText=t},expression:"filterText"}}),e._v(" "),e._l(e.filteredTree,(function(t,i){return a("node",{key:i,attrs:{item:t,open:!!e.filterText,labelKey:e.labelKey,childrenKey:e.childrenKey},on:{input:e.onSelect}})}))],2)};i._withStripped=!0;var s={name:"TreeView",components:{Node:a(154).Z},props:{tree:{type:Array,default:()=>[]},filterFunc:Function,labelKey:{type:String,default:()=>"name"},childrenKey:{type:String,default:()=>"children"}},data:()=>({filterText:null}),computed:{filteredTree(){return this.filterText?this.filter(this.tree,this.filterText,this.filterFunc||this.indexOfFilterFunc):this.tree}},methods:{onSelect:function(e){this.$emit("input",e)},trySelect:function(e){1===e.length&&(e[0][this.childrenKey]?this.trySelect(e[0][this.childrenKey]):this.onSelect(e[0]))},filter:function(e,t,a){const i=[];for(let s=0;s-1}}},n=a(380),o=a(581),r=a(3),l=a.n(r),c=a(634);e=a.hmd(e);var d={};e.hot,e.hot;var u=(0,o.Z)(s,i,[],!1,(function(e){d.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return d.$style}})}),null,null);l()(u,{VTextField:c.Z}),u.options.__file="src/components/widgets/TreeView/index.vue";var p=u.exports},505:function(e,t,a){var i={"./angle-tool.svg":506,"./glance-logo-mark.svg":507,"./glance-logo.svg":508,"./itkjs.svg":509,"./kitware-logo.svg":510,"./kitware.svg":511,"./length-tool.svg":512,"./paraview-glance-small.svg":513,"./paraview-glance.svg":514,"./text-tool.svg":515,"./vtkjs.svg":516};function s(e){return n(e).then((function(e){return a.t(e,1)}))}function n(e){return Promise.resolve().then((function(){if(!a.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}))}s.keys=function(){return Object.keys(i)},s.resolve=n,s.id=505,e.exports=s},533:function(e,t,a){"use strict";e.exports=a.p+"7de480b60ea07530becf.jpg"},534:function(e,t,a){"use strict";e.exports=a.p+"08bbd2aa53dc8eac397c.jpg"},530:function(e,t,a){"use strict";e.exports=a.p+"fe1adfb1c2a6e035a806.jpg"},531:function(e,t,a){"use strict";e.exports=a.p+"132e309e274fe1882773.jpg"},538:function(e,t,a){"use strict";e.exports=a.p+"3a94be6267c413f24562.jpg"},532:function(e,t,a){"use strict";e.exports=a.p+"e046987d1271a351d59b.jpg"},535:function(e,t,a){"use strict";e.exports=a.p+"0bbce93537f566337c90.jpg"},536:function(e,t,a){"use strict";e.exports=a.p+"a7687b09d48560c2931e.jpg"},537:function(e,t,a){"use strict";e.exports=a.p+"286af999372ee982d6c8.jpg"},506:function(e,t,a){"use strict";e.exports=a.p+"5a39a3263089fab6ab24.svg"},507:function(e,t,a){"use strict";e.exports=a.p+"739652544df2c34fdc58.svg"},508:function(e,t,a){"use strict";e.exports=a.p+"e19981c655f2cfd0e03a.svg"},509:function(e,t,a){"use strict";e.exports=a.p+"19b58d68d243be25286a.svg"},510:function(e,t,a){"use strict";e.exports=a.p+"cc5d8973c8e2af638075.svg"},511:function(e,t,a){"use strict";e.exports=a.p+"011374e7707f227f9666.svg"},512:function(e,t,a){"use strict";e.exports=a.p+"9b3eb3ca56e835ab0258.svg"},513:function(e,t,a){"use strict";e.exports=a.p+"731e62f43c121e953a77.svg"},514:function(e,t,a){"use strict";e.exports=a.p+"f1c3d9cead24b2badd18.svg"},515:function(e,t,a){"use strict";e.exports=a.p+"a3e7e875d73fd955cf5e.svg"},516:function(e,t,a){"use strict";e.exports=a.p+"033029be7d659ffab8c6.svg"},357:function(){}},function(e){return e.O(0,[1],(function(){return t=328,e(e.s=t);var t})),e.O()}])})); \ No newline at end of file diff --git a/app/glance.69366fc90a4f93faf670.js b/app/glance.69366fc90a4f93faf670.js deleted file mode 100644 index d1b5458c..00000000 --- a/app/glance.69366fc90a4f93faf670.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var a=t();for(var i in a)("object"==typeof exports?exports:e)[i]=a[i]}}(self,(function(){return(self.webpackChunkglance=self.webpackChunkglance||[]).push([[2],{489:function(e,t,a){"use strict";a.r(t),a.d(t,{createViewer:function(){return Ma},getReader:function(){return _a},importBase64Dataset:function(){return Sa},listReaders:function(){return Pa},listSupportedExtensions:function(){return ka},loadFiles:function(){return Ca},openFiles:function(){return Va},registerReader:function(){return Ia},registerReadersToProxyManager:function(){return Ta},setActiveProxyConfiguration:function(){return Da}});var i=a(490),s=a(612),n=a(563),o=a(82),r=a(562),l=a(571),c=a(329);i.default.use(r.ZP);const{girderRoute:d,noGirder:u}=c.Z.extractURLParameters(),p=d||"https://data.kitware.com/api/v1",v=u?void 0:new l.ZP({apiRoot:p});v&&v.fetchUser();var m={girderRest:v},g=a(697),h=(a(492),a(368)),y=a(494),f=a(495),b=a(496),x=a(375),w=a(497),_=a(498),S=a(499),P=a(500),k=a(56),C=a.n(k),V=a(9);function I(e,t){t.classHierarchy.push("vtkGlanceStateReader"),t.appState=null,e.parseAsArrayBuffer=a=>{return a&&a!==t.rawDataBuffer?(t.rawDataBuffer=a,(i=a,new Promise(((e,t)=>{const a=new(C());a.loadAsync(i).then((()=>{a.forEach(((a,i)=>{a.match(/state\.json$/i)&&i.async("string").then((t=>{e(JSON.parse(t))})).catch(t)}))})).catch(t)}))).then((a=>(t.appState=a,e.modified(),t.appState)))):Promise.resolve(t.appState);var i},e.requestData=()=>{e.parseAsArrayBuffer(t.rawDataBuffer)}}function T(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a),V.ZP.obj(e,t),V.ZP.algo(e,t,0,1),V.ZP.get(e,t,["appState"]),I(e,t)}var $={newInstance:V.ZP.newInstance(T,"vtkGlanceStateReader"),extend:T},D=(a(501),a(19)),M=a(502),L=a(11),Z=a(377),O=a(137);function R(e,t){const a=t=>function(e,t,a){return e[t]?(e[t][0]=Math.min(e[t][0],a[0]),e[t][1]=Math.max(e[t][1],a[1])):e[t]=a.slice(),e}(e,t.getName(),t.getRange(-1));t.getPointData().getArrays().forEach(a),t.getCellData().getArrays().forEach(a)}function B(e,t){t.classHierarchy.push("vtkGlanceVtkJsReader"),e.parseAsArrayBuffer=a=>{return a&&a!==t.rawDataBuffer?(t.rawDataBuffer=a,(i=a,new Promise((e=>{let t=0;const a=D.ZP.get("zip",{zipContent:i,callback(){const i=M.ZP.newInstance({dataAccessHelper:a,startLODLoaders:!1});i.setUrl("index.json"),i.onReady((()=>{if(++t===i.getScene().length){const t={...i.getMetadata()};t.scene=i.getScene(),t.animationHandler=i.getAnimationHandler(),e(t)}}))}})}))).then((a=>{let{scene:i,camera:s,background:n,lookupTables:o,cameraViewPoints:r,animationHandler:l}=a;return t.scene=i,t.camera=s,t.background=n,t.lookupTables=o,t.cameraViewPoints=r,t.animationHandler=l,e.modified(),t.scene}))):Promise.resolve(t.appState);var i},e.requestData=()=>{e.parseAsArrayBuffer(t.rawDataBuffer)},e.setProxyManager=e=>{const a=e.getViews(),i={};t.scene.forEach((s=>{const{source:n,mapper:o,actor:r,volume:l,name:c,volumeComponents:d}=s,u=r?r.get("origin","scale","position"):{},p=l?l.get("origin","scale","position"):{},v=r?r.getProperty().get("representation","edgeVisibility","diffuseColor","pointSize","opacity"):{},m=l?l.getProperty().get("interpolationType","independantComponents","shade"):{},g=o.get("colorByArrayName","colorMode","scalarMode"),h=e.createProxy("Sources","TrivialProducer",{name:c});h.setInputAlgorithm(n,n.getOutputData().getClassName()),h.activate(),R(i,n.getOutputData());for(let i=0;i{e.addTexture(t)})))}if(l){const e=n.getVolumes()[0];e&&(e.set(p),e.getProperty().set(m))}let o="pointData";if(g.scalarMode===L.ZP.ScalarMode.USE_CELL_FIELD_DATA&&(o="cellData"),n.setColorBy(g.colorByArrayName,o),"default"===s.getName()&&(s.getCamera().set(t.camera),t.animationHandler&&t.animationHandler.addRenderer(s.getRenderer())),d){const[e]=n.getColorBy(),[{rgbTransferFunction:t,scalarOpacity:a}]=d,i=n.getLookupTableProxy(e),s=n.getPiecewiseFunctionProxy(e);if(t){i.setPresetName("-");const[e,a]=t.getMappingRange();i.setDataRange(e,a),i.setMode(Z.Z.Mode.Nodes),i.getLookupTable().setColorSpace(t.getColorSpace()),i.setNodes(t.get("nodes").nodes)}if(a){s.getPiecewiseFunction().setClamping(a.getClamping());const e=[],t=a.getRange();s.setDataRange(...t);const i=t[1]-t[0];for(let s=0;s{const e=f.getCurrentSource();h.setInputAlgorithm(e,e.getOutputData().getClassName())};f.setStepFinishedCallback(e),f.startDownloads()}if(t.animationHandler&&e.getProxyInGroup("AnimationManager").length){const a=e.getProxyInGroup("AnimationManager")[0],i=e.createProxy("Animations","TimeStepAnimation");i.setInputAnimationHandler(t.animationHandler),a.addAnimation(i),a.onCurrentFrameChanged((()=>e.renderAllViews()))}})),Object.keys(i).forEach((t=>{e.getLookupTable(t).setDataRange(...i[t])})),Object.keys(t.lookupTables||{}).forEach((a=>{const i=t.lookupTables[a],s=e.getLookupTable(a),n=s.getLookupTable(),o=i.nodes[0][0],r=i.nodes[i.nodes.length-1][0];s.setPresetName("-"),s.setDataRange(o,r),s.setMode(3),n.setColorSpace(i.colorSpace),s.setNodes(i.nodes.map((e=>{let[t,a,i,s,n,o]=e;return{x:t,r:a,g:i,b:s,midpoint:n,sharpness:o}})))})),e.renderAllViews()}}function A(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a),V.ZP.obj(e,t),V.ZP.get(e,t,["scene","camera","background","cameraViewPoints"]),B(e,t)}var F={newInstance:V.ZP.newInstance(A,"vtkGlanceVtkJsReader"),extend:A},N=a(503);let E=0;function j(e,t){t.classHierarchy.push("vtkGlanceZipObjReader"),e.parseAsArrayBuffer=a=>a&&a!==t.rawDataBuffer?(t.rawDataBuffer=a,function(e){const t={obj:{},mtl:{},img:{}},a={};return new Promise(((i,s)=>{const n=new(C());n.loadAsync(e).then((()=>{let e=0;function s(){0===e&&(Object.keys(t.mtl).forEach((e=>{const a=t.mtl[e],i=e.split("/").filter(((e,t,a)=>t{const s=`${i}/${e}`,n=t.img[s];n&&a.setImageSrc(e,n)}))})),Object.keys(t.obj).forEach((e=>{const i=e.replace(/\.obj$/,".mtl"),s=t.obj[e],n=t.mtl[i],o=s.getNumberOfOutputPorts();for(let e=0;e{a.match(/\.obj$/i)&&(e++,i.async("string").then((i=>{const n=x.ZP.newInstance({splitMode:"usemtl"});n.parseAsText(i),t.obj[a]=n,e--,s()}))),a.match(/\.mtl$/i)&&(e++,i.async("string").then((i=>{const n=N.ZP.newInstance();n.parseAsText(i),t.mtl[a]=n,e--,s()}))),(a.match(/\.jpg$/i)||a.match(/\.png$/i))&&(e++,i.async("base64").then((i=>{const n=a.slice(-3).toLowerCase();t.img[a]=`data:image/${n};base64,${i}`,e--,s()})))}))})).catch(s)}))}(a).then((a=>(t.scene=a,e.modified(),t.scene)))):Promise.resolve(t.appState),e.requestData=()=>{e.parseAsArrayBuffer(t.rawDataBuffer)},e.setProxyManager=e=>{const a=e.getViews();Object.keys(t.scene).forEach((i=>{const{dataset:s,mtlReader:n,name:o}=t.scene[i],r=e.createProxy("Sources","TrivialProducer",{name:i});r.setInputData(s),r.activate();for(let t=0;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a),V.ZP.obj(e,t),V.ZP.get(e,t,["scene"]),j(e,t)}var z={newInstance:V.ZP.newInstance(G,"vtkGlanceZipObjReader"),extend:G},U=a(504),W=a(30);const H={},K={readAsArrayBuffer:(e,t)=>U.Z.fetchBinary(e,t),readAsText:(e,t)=>U.Z.fetchText({},e,t)};function q(e){let{name:t}=e;const a=t.toLowerCase(),i=Object.keys(H).find((e=>a.endsWith(e)));return H[i]}let Y=null;const X=document.createElement("input");function J(e){return new Promise(((t,a)=>{const i=q(e);if(i){const{readMethod:s}=i,n=new FileReader;n.onload=function(){(function(e){let{fileName:t,data:a}=e;return new Promise(((e,i)=>{const s=q({name:t});if(s){const{vtkReader:n,parseMethod:o,fileNameMethod:r,sourceType:l}=s,c=n.newInstance();r&&c[r](t);try{const s=c[o](a);Promise.resolve(s).then((a=>e({dataset:a,reader:c,sourceType:l,name:t}))).catch(i)}catch(e){i(e)}}else i(new Error("No reader mapping"))}))})({fileName:e.name,data:n.result}).then((e=>t(e))).catch((e=>a(e)))},n[s](e)}else a(new Error("No reader mapping"))}))}function Q(e){const t=[];for(let a=0;a{i.setKey(e,c[e]),"onLoad"===e&&c[e](i)}))),s&&s.getCameraViewPoints&&s.getCameraViewPoints()&&t.getReferenceByName("$store").dispatch("setCameraViewPoints",s.getCameraViewPoints()),d=i}a.push(d)}return t.renderAllViews(),a}X.setAttribute("type","file"),X.setAttribute("multiple","multiple"),X.addEventListener("change",(function(e){Y&&Y(e.target.files),Y=null}));var te={downloadDataset:function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((i,s)=>{const n=q({name:e});if(!n)throw new Error(`No reader found for ${e}`);{const{readMethod:o}=n;K[o](t,a).then((t=>{if(!t)throw new Error(`No data for ${e}`);i(new File([t],e))})).catch(s)}}))},listReaders:function(){return Object.keys(H).map((e=>({name:H[e].name,ext:e})))},listSupportedExtensions:function(){return Object.keys(H)},importBase64Dataset:function(e,t,a){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:512;const s=[],n=atob(t);for(let e=0;e{ee(e,a)})),Promise.resolve("loading")):Q([r])},loadFiles:Q,loadFileSeries:function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return new Promise(((i,s)=>{if(e.length){const n=H[t];if(n){const{vtkReader:t,fileSeriesMethod:o,fileNameMethod:r,sourceType:l}=n,c=t.newInstance();if(r&&c[r](a),o){const t=c[o](e);Promise.resolve(t).then((e=>i({dataset:e,reader:c,sourceType:l,name:a})))}else s(new Error("No file series method available"))}else s(new Error(`No file series reader mapping for ${t}`))}else i()}))},openFiles:function(e,t){Y=t,X.setAttribute("accept",e.map((e=>`.${e}`)).join(",")),X.value=null,X.click()},registerReader:function(e){let{extension:t,name:a,vtkReader:i,readMethod:s,parseMethod:n,fileNameMethod:o,fileSeriesMethod:r,sourceType:l,binary:c}=e;H[t]={name:a,vtkReader:i,readMethod:s||c?"readAsArrayBuffer":"readAsText",parseMethod:n||c?"parseAsArrayBuffer":"parseAsText",fileNameMethod:o,fileSeriesMethod:r,sourceType:l}},registerReadersToProxyManager:ee};te.registerReader({extension:"glance",name:"Glance State Reader",vtkReader:$,binary:!0}),te.registerReader({extension:"obz",name:"OBJ bundle",vtkReader:z,binary:!0}),te.registerReader({extension:"vtkjs",name:"vtkjs",vtkReader:F,binary:!0}),te.registerReader({extension:"vtp",name:"Polydata Reader",vtkReader:y.ZP,binary:!0}),te.registerReader({extension:"vti",name:"ImageData Reader",vtkReader:f.ZP,binary:!0}),te.registerReader({extension:"stl",name:"STL Binary Reader",vtkReader:b.ZP,binary:!0}),te.registerReader({extension:"obj",name:"OBJ Reader",vtkReader:x.ZP,binary:!1}),te.registerReader({extension:"pdb",name:"PDB Reader",vtkReader:w.ZP,binary:!1,sourceType:"vtkMolecule"}),te.registerReader({extension:"glyph",name:"Glyph Data Reader",vtkReader:S.ZP,binary:!1,sourceType:"Glyph"}),te.registerReader({extension:"skybox",name:"Skybox Data Reader",vtkReader:P.ZP,binary:!0,sourceType:"Skybox"}),te.registerReader({extension:"json",name:"JSON Reader",vtkReader:S.ZP,binary:!1}),te.registerReader({extension:"ply",name:"PLY Reader",vtkReader:_.ZP,binary:!0});a(378);var ae=a(150),ie=a(539),se=a(543),ne=a(544),oe=a(545),re=a(547),le=a(548),ce=a(369),de=a(549),ue=a(465),pe=a(35),ve=a(473),me=a(551);function ge(e,t){t.classHierarchy.push("vtkCropWidgetProp"),t.representations.filter((e=>e.isA("vtkOutlineContextRepresentation"))).forEach((e=>e.getActor().getProperty().set({ambient:1,diffuse:0}))),t.widgetState.getAllNestedStates().filter((e=>!!e.setScale1)).forEach((e=>e.setScale1(20)))}var he=a(21);function ye(e,t){t.classHierarchy.push("vtkCropWidget"),t.behavior=V.ZP.chain(t.behavior,ge),t.methodsToLink=t.methodsToLink||[],t.methodsToLink.push("handleScale"),e.getRepresentationsForViewType=e=>{switch(e){case he.cO.DEFAULT:case he.cO.GEOMETRY:case he.cO.SLICE:case he.cO.VOLUME:}return[{builder:pe.ZP,labels:["handles"],initialValues:{scaleInPixels:!0}},{builder:ve.ZP,labels:["corners"]}]}}const fe={};function be(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fe,a),me.ZP.extend(e,t,a),ye(e,t)}var xe={newInstance:V.ZP.newInstance(be,"vtkCropWidget"),extend:be},we=a(552),_e=a(476);function Se(e,t){const a={...e},i=[];let s=null;e.handleMouseMove=e=>{const t=a.handleMouseMove(e);return s=e,t},e.delete=()=>{for(a.delete();i.length;)i.pop().unsubscribe()},i.push(t.manipulator.onModified((()=>{s&&a.handleMouseMove(s)})))}function Pe(e,t){(0,_e.Z)(e,t),Se(e,t)}var ke=a(41);function Ce(e,t){t.classHierarchy.push("vtkAngle2DWidget"),t.methodsToLink=[...t.methodsToLink??[],"circleProps","lineProps","textProps","text","textStateIndex"],t.behavior=Pe,t.widgetState=ke.Z.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible","manipulator"],name:"moveHandle",initialValues:{scale1:50,origin:[-1,-1,-1],visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible","manipulator"],name:"handle",initialValues:{scale1:50,origin:[-1,-1,-1],visible:!0}}).build(),e.getRepresentationsForViewType=e=>{switch(e){case he.cO.DEFAULT:case he.cO.GEOMETRY:case he.cO.SLICE:case he.cO.VOLUME:}return[{builder:pe.ZP,labels:["handles"],initialValues:{scaleInPixels:!0}},{builder:pe.ZP,labels:["moveHandle"],initialValues:{scaleInPixels:!0}}]}}const Ve={};function Ie(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ve,a),we.ZP.extend(e,t,a),V.ZP.setGet(e,t,["manipulator"]),Ce(e,t)}var Te={newInstance:V.ZP.newInstance(Ie,"vtkAngle2DWidget"),extend:Ie},$e=a(553),De=a(477);function Me(e,t){(0,De.Z)(e,t),Se(e,t)}function Le(e,t){t.classHierarchy.push("vtkDistance2DWidget"),t.methodsToLink=[...t.methodsToLink??[],"circleProps","lineProps","textProps","text","textStateIndex"],t.behavior=Me,t.widgetState=ke.Z.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible","manipulator"],name:"moveHandle",initialValues:{scale1:50,origin:[0,0,0],visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible","manipulator"],name:"handle",initialValues:{scale1:50,origin:[0,0,0],visible:!0}}).build(),e.getRepresentationsForViewType=e=>{switch(e){case he.cO.DEFAULT:case he.cO.GEOMETRY:case he.cO.SLICE:case he.cO.VOLUME:}return[{builder:pe.ZP,labels:["handles"],initialValues:{scaleInPixels:!0}},{builder:pe.ZP,labels:["moveHandle"],initialValues:{scaleInPixels:!0}}]}}const Ze={};function Oe(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ze,a),$e.ZP.extend(e,t,a),Le(e,t)}var Re={newInstance:V.ZP.newInstance(Oe,"vtkDistance2DWidget"),extend:Oe},Be=a(62),Ae=a(115);function Fe(e,t){t.classHierarchy.push("vtkTextWidgetProp");let a=null;function i(e){return e.altKey||e.controlKey||e.shiftKey}e.setDisplayCallback=e=>t.representations[0].setDisplayCallback(e),e.handleLeftButtonPress=s=>{if(!t.activeState||!t.activeState.getActive()||!t.pickable||i(s))return V.ZP.VOID;if(t.activeState===t.widgetState.getMoveHandle()&&t.widgetState.getHandleList().length<1){const e=t.widgetState.getMoveHandle(),a=t.widgetState.addHandle();a.setOrigin(...e.getOrigin()),a.setColor(e.getColor()),a.setScale1(e.getScale1())}else a=!0,t._apiSpecificRenderWindow.setCursor("grabbing"),t._interactor.requestAnimation(e);return e.invokeStartInteractionEvent(),V.ZP.EVENT_ABORT},e.handleMouseMove=s=>{if(t.hasFocus&&1===t.widgetState.getHandleList().length)return t._widgetManager.releaseFocus(),V.ZP.VOID;if(t.pickable&&t.manipulator&&t.activeState&&t.activeState.getActive()&&!i(s)){const{worldCoords:i}=t.manipulator.handleEvent(s,t._apiSpecificRenderWindow);if(i.length&&(t.activeState===t.widgetState.getMoveHandle()||a))return t.activeState.setOrigin(i),e.invokeInteractionEvent(),V.ZP.EVENT_ABORT}return V.ZP.VOID},e.handleLeftButtonRelease=()=>{a&&t.pickable?(t._apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t._interactor.cancelAnimation(e),e.invokeEndInteractionEvent()):t.activeState!==t.widgetState.getMoveHandle()&&t.widgetState.deactivate(),(t.hasFocus&&!t.activeState||t.activeState&&!t.activeState.getActive())&&e.invokeEndInteractionEvent(),a=!1},e.grabFocus=()=>{!t.hasFocus&&t.widgetState.getHandleList().length<1&&(t.activeState=t.widgetState.getMoveHandle(),t.activeState.activate(),t.activeState.setVisible(!0),t._interactor.requestAnimation(e),e.invokeStartInteractionEvent()),t.hasFocus=!0},e.loseFocus=()=>{t.hasFocus&&(t._interactor.cancelAnimation(e),e.invokeEndInteractionEvent()),t.widgetState.deactivate(),t.widgetState.getMoveHandle().deactivate(),t.widgetState.getMoveHandle().setVisible(!1),t.activeState=null,t.hasFocus=!1,t._widgetManager.enablePicking(),t._interactor.render()}}function Ne(e,t){t.classHierarchy.push("vtkTextWidget"),t.methodsToLink=["activeScaleFactor","activeColor","useActiveColor","defaultScale","circleProps","textProps","text","textStateIndex","handleScale"],t.behavior=Fe,t.widgetState=ke.Z.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible"],name:"moveHandle",initialValues:{scale1:50,origin:[0,0,0],visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible"],name:"handle",initialValues:{scale1:50,origin:[0,0,0]}}).build(),e.getRepresentationsForViewType=e=>{switch(e){case he.cO.DEFAULT:case he.cO.GEOMETRY:case he.cO.SLICE:case he.cO.VOLUME:}return[{builder:pe.ZP,labels:["handles"],initialValues:{scaleInPixels:!0}},{builder:pe.ZP,labels:["moveHandle"]}]},t.widgetState.onBoundsChange((e=>{const a=[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])];t.widgetState.getMoveHandle().setOrigin(a)})),t.manipulator=Ae.ZP.newInstance()}const Ee={};function je(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ee,a),Be.ZP.extend(e,t,a),V.ZP.setGet(e,t,["manipulator"]),Ne(e,t)}var Ge={newInstance:V.ZP.newInstance(je,"vtkTextWidget"),extend:je},ze=a(554),Ue=a(478);function We(e,t){t.classHierarchy.push("vtkCustomSliceRepresentationProxy");const a={...e};e.setOpacity=e=>{e>=0&&e<=1&&a.setOpacity(e)&&t.property.setOpacity(e)},e.setColorBy=function(i,s){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(a.setColorBy(i,s,n),null!==i&&t.useColorByForColor||t.property.setRGBTransferFunction(0,null),null!==i&&t.useColorByForOpacity||t.property.setPiecewiseFunction(0,null),i&&s){if(t.useColorByForColor){const a=e.getLookupTableProxy(i);t.property.setRGBTransferFunction(0,a.getLookupTable())}if(t.useColorByForOpacity){const a=e.getPiecewiseFunctionProxy(i);t.property.setPiecewiseFunction(0,a.getPiecewiseFunction())}}},e.setUseColorByForColor=t=>{if(a.setUseColorByForColor(t)){const t=e.getColorBy();e.setColorBy(...t)}},e.setUseColorByForOpacity=t=>{if(a.setUseColorByForOpacity(t)){const t=e.getColorBy();e.setColorBy(...t)}}}const He={opacity:1,useColorByForColor:!1,useColorByForOpacity:!1};function Ke(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,He,a),Ue.ZP.extend(e,t),V.ZP.setGet(e,t,["opacity","useColorByForColor","useColorByForOpacity"]),We(e,t)}var qe={newInstance:V.ZP.newInstance(Ke,"vtkCustomSliceRepresentationProxy"),extend:Ke},Ye=a(555);function Xe(e,t){t.classHierarchy.push("vtkCustomVolumeRepresentationProxy");const a={...e};e.setColorBy=function(i,s){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(a.setColorBy(i,s,n),null!==i&&t.sliceUseColorByForColor||t.propertySlices.setRGBTransferFunction(0,null),null!==i&&t.sliceUseColorByForOpacity||t.propertySlices.setPiecewiseFunction(0,null),i&&s){if(t.sliceUseColorByForColor){const a=e.getLookupTableProxy(i);t.propertySlices.setRGBTransferFunction(0,a.getLookupTable())}if(t.sliceUseColorByForOpacity){const a=e.getPiecewiseFunctionProxy(i);t.propertySlices.setPiecewiseFunction(0,a.getPiecewiseFunction())}}},e.setSliceOpacity=e=>{e>=0&&e<=1&&a.setSliceOpacity(e)&&t.propertySlices.setOpacity(e)},e.setSliceUseColorByForColor=t=>{if(a.setSliceUseColorByForColor(t)){const t=e.getColorBy();e.setColorBy(...t)}},e.setSliceUseColorByForOpacity=t=>{if(a.setSliceUseColorByForOpacity(t)){const t=e.getColorBy();e.setColorBy(...t)}},e.setIs2DVolume=t=>{a.setIs2DVolume(t),t&&(e.setSliceUseColorByForColor(!0),e.setSliceUseColorByForOpacity(!0))}}const Je={sliceOpacity:1,sliceUseColorByForColor:!1,sliceUseColorByForOpacity:!1};function Qe(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Je,a),Ye.ZP.extend(e,t),V.ZP.setGet(e,t,["sliceOpacity","sliceUseColorByForColor","sliceUseColorByForOpacity"]),Xe(e,t)}var et={newInstance:V.ZP.newInstance(Qe,"vtkCustomVolumeRepresentationProxy"),extend:Qe},tt=a(97),at=a(140),it=a(40),st=a(51),nt=a(50);function ot(e,t){t.classHierarchy.push("vtkLabelMapVolumeRepProxy");const a=(0,W.y5)();function i(e){const a=e.getColorMap(),i=st.ZP.newInstance(),s=nt.ZP.newInstance();Object.keys(a).forEach((e=>{const t=Number(e);i.addRGBPoint(t,...a[e].slice(0,3).map((e=>e/255))),s.addPoint(t,a[e][3]/255)})),t.property.setRGBTransferFunction(0,i),t.property.setScalarOpacity(0,s);const n=Math.max(...e.getDimensions());t.property.setScalarOpacityUnitDistance(0,Math.sqrt(n));const o=e.getSpacing().map((e=>e*e)).reduce(((e,t)=>e+t),0);t.mapper.setSampleDistance(o*2**-1.5)}t.mapper=at.ZP.newInstance(),t.volume=tt.ZP.newInstance(),t.property=t.volume.getProperty(),t.property.setInterpolationTypeToNearest(),t.sourceDependencies.push({setInputData(e){e?(a.sub(e.onModified((()=>i(e)))),i(e),t.mapper.setInputData(e)):a.unsub()}}),t.volume.setMapper(t.mapper),t.volumes.push(t.volume),e.setVisibility=e=>{t.volume.setVisibility(e)},e.getVisibility=()=>t.volume.getVisibility(),e.isVisible=e.getVisibility,e.delete=V.ZP.chain(e.delete,(()=>{a.unsub()}))}const rt={};function lt(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rt,a),it.Z.extend(e,t),ot(e,t),V.ZP.proxyPropertyMapping(e,t,{volumeVisibility:{modelKey:"volume",property:"visibility"}})}var ct={newInstance:V.ZP.newInstance(lt,"vtkLabelMapVolumeRepProxy"),extend:lt},dt=a(47);const{InterpolationType:ut}=dt.C;function pt(e,t){t.classHierarchy.push("vtkLabelMapSliceRepProxy");const a=(0,W.y5)();function i(e){const a=e.getColorMap(),i=st.ZP.newInstance(),s=nt.ZP.newInstance();Object.keys(a).forEach((e=>{const t=Number(e);i.addRGBPoint(t,...a[e].slice(0,3).map((e=>e/255))),s.addPoint(t,a[e][3]/255)})),t.property.setRGBTransferFunction(i),t.property.setScalarOpacity(s)}t.property.setInterpolationType(ut.NEAREST),e.setColorBy=()=>{},e.delete=V.ZP.chain(e.delete,(()=>a.unsub())),t.sourceDependencies.push({setInputData:function(e){a.sub(e.onModified((()=>i(e)))),i(e)}})}const vt={};function mt(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vt,a),Ue.ZP.extend(e,t),pt(e,t)}var gt={newInstance:V.ZP.newInstance(mt,"vtkLabelMapSliceRepProxy"),extend:mt};function ht(e,t){t.classHierarchy.push("vtkWidgetProxy"),t.widget=t.factory.newInstance();const a=[],i=t.widget.getWidgetState().onModified((()=>e.modified())),s=new WeakSet;function n(e){t.proxyManager.getViews().forEach((t=>{const a=t.getReferenceByName("widgetManager");a&&e(t,a)}))}e.addToViews=()=>n((e=>{const a=he.cO[t.viewTypes[e.getProxyName()]],i=function(e,t,a){const i=t.getReferenceByName("widgetManager");if(i){const s=i.addWidget(e,a);return i.enablePicking(),t.renderLater(),s}return null}(t.widget,e,a);i&&s.add(i)})),e.removeFromViews=()=>n((e=>function(e,t){const a=t.getReferenceByName("widgetManager");a&&(a.removeWidget(e),a.enablePicking(),t.renderLater())}(t.widget,e))),e.grabFocus=()=>n(((e,a)=>a.grabFocus(t.widget))),e.releaseFocus=()=>n(((e,a)=>a.releaseFocus(t.widget))),e.getViewWidget=e=>{const a=e.getReferenceByName("widgetManager");return a?t.widget.getWidgetForView({viewId:a.getViewId()}):null},e.getAllViewWidgets=()=>t.proxyManager.getViews().map((t=>[e.getViewWidget(t),t])).filter((e=>{let[t]=e;return!!t})),e.executeViewFuncs=t=>{n(((i,s)=>{const n=t[i.getProxyName()];if(n){const t=n(i,s,e.getViewWidget(i));if(Array.isArray(t))for(let e=0;e{i.unsubscribe();for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yt,a),V.ZP.obj(e,t),V.ZP.proxy(e,t),V.ZP.setGet(e,t,["name"]),V.ZP.get(e,t,["widget","viewTypes"]),ht(e,t),V.ZP.proxyPropertyMapping(e,t,{widgetState:{modelKey:"widget",property:"widgetState"}})}var bt={newInstance:V.ZP.newInstance(ft,"vtkWidgetProxy"),extend:ft},xt=a(556),wt=a(557);var _t={createProxyDefinition:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return{class:e,options:{links:a,ui:t,...i},props:s}},activateOnCreate:function(e){return e.options.activateOnCreate=!0,e},deepCopyPath:function(e,t){const a="string"==typeof t?t.split("."):t,i={...e};let s=i;for(;a.length;){const e=a.shift();if(!Object.prototype.hasOwnProperty.call(s,e))throw new Error(`Invalid property path given: ${a}`);s[e]instanceof Array?s[e]=Array.from(s[e]):s[e]={...s[e]},s=s[e]}return i},objAssignPath:function(e,t,a){const i="string"==typeof t?t.split("."):t;let s=e;for(;i.length>1;){const e=i.shift();if(!Object.prototype.hasOwnProperty.call(s,e))throw new Error(`Invalid property path given: ${i}`);s=s[e]}if(1!==i.length)throw new Error(`Invalid property path given: ${i}`);s[i.shift()]=a}};var St=[{name:"colorBy",domain:{}},{name:"xSliceVisibility"},{name:"ySliceVisibility"},{name:"zSliceVisibility"},{name:"volumeVisibility"},{name:"sliceOpacity"},{name:"sliceUseColorByForColor"},{name:"sliceUseColorByForOpacity"},{name:"useShadow"},{name:"sampleDistance",domain:{min:0,max:1,step:.01}},{name:"edgeGradient",domain:{min:0,max:1,step:.01}},{name:"windowWidth",domain:{min:0,max:255,step:.01}},{name:"windowLevel",domain:{min:0,max:255,step:.01}},{name:"xSlice",domain:{min:0,max:255,step:1}},{name:"ySlice",domain:{min:0,max:255,step:1}},{name:"zSlice",domain:{min:0,max:255,step:1}}],Pt=[{name:"colorBy",domain:{}},{name:"color"},{name:"representation",domain:{items:[{text:"Surface",value:"Surface"},{text:"Surface with edges",value:"Surface with edges"},{text:"Wireframe",value:"Wireframe"},{text:"Points",value:"Points"}]}},{name:"opacity",domain:{min:0,max:1,step:.01}},{name:"interpolateScalarsBeforeMapping"},{name:"visibility"},{name:"pointSize",domain:{min:1,max:50}}],kt=[{name:"colorBy",domain:{}},{name:"useColorByForColor"},{name:"useColorByForOpacity"},{name:"visibility"},{name:"windowWidth",domain:{min:0,max:255,step:.01}},{name:"windowLevel",domain:{min:0,max:255,step:.01}},{name:"slice",domain:{min:0,max:255,step:1}},{name:"opacity",domain:{min:0,max:1,step:.01}}],Ct=[{name:"tolerance",domain:{min:0,max:.5,step:.01}},{name:"atomicRadiusScaleFactor",domain:{min:0,max:.5,step:.01}},{name:"bondRadius",domain:{min:0,max:.5,step:.01}},{name:"deltaBondFactor",domain:{min:0,max:.5,step:.01}},{name:"hideElements"}],Vt=[{name:"edgeVisibility"}],It=[{name:"name"},{name:"background",domain:{palette:[]}},{name:"orientationAxesVisibility"},{name:"presetToOrientationAxes",domain:{items:[{text:"XYZ",value:"default"},{text:"LPS",value:"lps"}]}}],Tt=[{name:"name"},{name:"background",domain:{palette:[]}},{name:"orientationAxesVisibility"},{name:"presetToOrientationAxes",domain:{items:[{text:"XYZ",value:"default"},{text:"LPS",value:"lps"}]}},{name:"annotationOpacity",domain:{min:0,max:1,step:.01}}],$t=[{name:"position"}];var Dt=[{link:"Visibility",property:"visibility",updateOnBind:!0},{link:"WW",property:"windowWidth",updateOnBind:!0},{link:"WL",property:"windowLevel",updateOnBind:!0},{link:"SliceX",property:"xSlice",updateOnBind:!0,type:"application"},{link:"SliceY",property:"ySlice",updateOnBind:!0,type:"application"},{link:"SliceZ",property:"zSlice",updateOnBind:!0,type:"application"},{link:"SliceOpacity",property:"sliceOpacity",updateOnBind:!0},{link:"UseSliceColor",property:"sliceUseColorByForColor",updateOnBind:!0},{link:"UseSliceOpacity",property:"sliceUseColorByForOpacity",updateOnBind:!0}],Mt=[{link:"GeometryColorBy",property:"colorBy",updateOnBind:!0},{link:"Representation",property:"representation",updateOnBind:!0},{link:"Opacity",property:"opacity",updateOnBind:!0},{link:"InterpolateScalarsBeforeMapping",property:"interpolateScalarsBeforeMapping",updateOnBind:!0},{link:"Visibility",property:"visibility",updateOnBind:!0},{link:"PointSize",property:"pointSize",updateOnBind:!0}],Lt=[{link:"Visibility",property:"visibility",updateOnBind:!0},{link:"WW",property:"windowWidth",updateOnBind:!0},{link:"WL",property:"windowLevel",updateOnBind:!0},{link:"SliceOpacity",property:"opacity",updateOnBind:!0},{link:"UseSliceColor",property:"useColorByForColor",updateOnBind:!0},{link:"UseSliceOpacity",property:"useColorByForOpacity",updateOnBind:!0}],Zt=[{link:"Tolerance",property:"tolerance",updateOnBind:!0},{link:"AtomicRadiusScaleFactor",property:"atomicRadiusScaleFactor",updateOnBind:!0},{link:"BondRadius",property:"bondRadius",updateOnBind:!0},{link:"DeltaBondFactor",property:"deltaBondFactor",updateOnBind:!0},{link:"HideElements",property:"hideElements",updateOnBind:!0}],Ot=[{link:"GlyphEdgeVisibility",property:"edgeVisibility",updateOnBind:!0}],Rt=[{link:"SkyboxPosition",property:"position",updateOnBind:!0}];var Bt={View2D:{vtkPolyData:{name:"Geometry"},vtkImageData:{name:"Slice"},vtkLabelMap:{name:"LabelMapSlice"},vtkMolecule:{name:"Molecule"},Glyph:{name:"Glyph"},Skybox:{name:"Skybox"}},View3D:{vtkPolyData:{name:"Geometry"},vtkImageData:{name:"Volume"},vtkLabelMap:{name:"LabelMapVolume"},vtkMolecule:{name:"Molecule"},Glyph:{name:"Glyph"},Skybox:{name:"Skybox"}}};const{createProxyDefinition:At,activateOnCreate:Ft}=_t,Nt={View3D:"VOLUME",View2D_X:"SLICE",View2D_Y:"SLICE",View2D_Z:"SLICE"};function Et(e,t,a,i){return Ft(At(e,t,[{type:"application",link:"AnnotationOpacity",property:"annotationOpacity",updateOnBind:!0},{type:"application",link:"OrientationAxesVisibility",property:"orientationAxesVisibility",updateOnBind:!0},{type:"application",link:"OrientationAxesPreset",property:"presetToOrientationAxes",updateOnBind:!0},{type:"application",link:"OrientationAxesType",property:"orientationAxesType",updateOnBind:!0}],a,i))}var jt={Proxy:{definitions:{Proxy:{LookupTable:At(re.ZP,[],[],{presetName:"Default (Cool to Warm)"}),PiecewiseFunction:At(ce.Z)},Widgets:{Crop:At(bt,[],[],{factory:xe,viewTypes:Nt}),Paint:At(bt,[],[],{factory:ze.ZP,viewTypes:Nt}),Angle:At(bt,[],[],{factory:Te,viewTypes:Nt}),Ruler:At(bt,[],[],{factory:Re,viewTypes:Nt}),Text:At(bt,[],[],{factory:Ge,viewTypes:Nt})},Sources:{TrivialProducer:Ft(At(de.ZP)),LabelMap:At(de.ZP)},Representations:{Geometry:At(se.ZP,Pt,Mt),Skybox:At(ne.ZP,$t,Rt),Slice:At(qe,kt,Lt),SliceX:At(qe,kt,[{link:"SliceX",property:"slice",updateOnBind:!0,type:"application"}].concat(Lt)),SliceY:At(qe,kt,[{link:"SliceY",property:"slice",updateOnBind:!0,type:"application"}].concat(Lt)),SliceZ:At(qe,kt,[{link:"SliceZ",property:"slice",updateOnBind:!0,type:"application"}].concat(Lt)),Volume:At(et,St,Dt),Molecule:At(le.ZP,Ct,Zt),Glyph:At(oe.ZP,Vt,Ot),LabelMapVolume:At(ct,[],[]),LabelMapSlice:At(gt),LabelMapSliceX:At(gt,[],[{link:"SliceX",property:"slice",updateOnBind:!0,type:"application"}]),LabelMapSliceY:At(gt,[],[{link:"SliceY",property:"slice",updateOnBind:!0,type:"application"}]),LabelMapSliceZ:At(gt,[],[{link:"SliceZ",property:"slice",updateOnBind:!0,type:"application"}])},Views:{View3D:Et(ue.Z,It),View2D:Et(ie.ZP,Tt),View2D_X:Et(ie.ZP,Tt,{axis:0}),View2D_Y:Et(ie.ZP,Tt,{axis:1}),View2D_Z:Et(ie.ZP,Tt,{axis:2})},AnimationManager:{AnimationProxyManager:{class:xt.Z}},Animations:{TimeStepAnimation:{class:wt.Z}}},representations:{View3D:Bt.View3D,View2D:Bt.View2D,View2D_X:{...Bt.View2D,vtkImageData:{name:"SliceX"},vtkLabelMap:{name:"LabelMapSliceX"}},View2D_Y:{...Bt.View2D,vtkImageData:{name:"SliceY"},vtkLabelMap:{name:"LabelMapSliceY"}},View2D_Z:{...Bt.View2D,vtkImageData:{name:"SliceZ"},vtkLabelMap:{name:"LabelMapSliceZ"}}},filters:{vtkPolyData:[],vtkImageData:[],vtkMolecule:[],Glyph:[]}}},Gt=a(23);function zt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(;e.length>0;)e.pop().unsubscribe()}function Ut(e){const t=[],a={};return i=>{const s=(e,t)=>{e in i._actions&&i.dispatch(e,t)};t.push(e.onProxyRegistrationChange((e=>{const{action:t,proxyId:i,proxy:n}=e;"register"===t?(s("pxmProxyCreated",e),a[i]=n.onModified((e=>s("pxmProxyModified",e)))):i in a&&(a[i].unsubscribe(),s("pxmProxyDeleted",e)),s("pxmProxyRegistrationChange",e)}))),t.push(e.onActiveSourceChange((e=>s("pxmActiveSourceChange",e)))),t.push(e.onActiveViewChange((e=>s("pxmActiveViewChange",e))))}}const Wt=Symbol("PXM_SUBS"),Ht=Symbol("PROXY_SUBS"),Kt={install(e){e.mixin({beforeCreate(){const e=this.$options;this.$proxyManager=e.proxyManager||e.parent&&e.parent.$proxyManager},mounted(){if(this.$options.proxyManagerHooks){const e=[],t={},a=this.$options.proxyManagerHooks;if(a.onProxyCreated||a.onProxyModified||a.onProxyDeleted||a.onProxyRegistrationChange){if(a.onProxyModified){const e=this.$proxyManager.getProxyGroups();let i=[];for(let t=0;ta.onProxyModified.call(this,e)))}}e.push(this.$proxyManager.onProxyRegistrationChange((e=>{const{action:i,proxyId:s,proxy:n}=e;"register"===i?(a.onProxyCreated&&a.onProxyCreated.call(this,e),a.onProxyModified&&(t[s]=n.onModified((e=>a.onProxyModified.call(this,e))))):"unregister"===i&&(s in t&&(t[s].unsubscribe(),delete t[s]),a.onProxyDeleted&&a.onProxyDeleted.call(this,e)),a.onProxyRegistrationChange&&a.onProxyRegistrationChange.call(this,e)})))}a.onActiveSourceChange&&e.push(this.$proxyManager.onActiveSourceChange((e=>V.ZP.setImmediate((()=>a.onActiveSourceChange.call(this,e)))))),a.onActiveViewChange&&e.push(this.$proxyManager.onActiveViewChange((e=>V.ZP.setImmediate((()=>a.onActiveViewChange.call(this,e)))))),this[Wt]=e,this[Ht]=t}},beforeDestroy(){this[Wt]&&zt(this[Wt]),this[Ht]&&(zt(Object.values(this[Ht])),this[Ht]={})}})}};var qt={getViewType:function(e){return`${e.getProxyName()}:${e.getName()}`}},Yt=a(381);function Xt(e){const t=Yt.ZP.newInstance(e.get("direction","origin","spacing"));return t.setDimensions(e.getDimensions()),t.computeTransforms(),t.getPointData().setScalars(e.getPointData().getScalars()),t}function Jt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("vtkLabelMap"===t.glanceDataType){const a=Xt(e);return t.colorMap&&a.setColorMap(t.colorMap),a}return e}var Qt=a(4),ea=a(15);function ta(){return["zip","raw","glance","gz"].concat(te.listSupportedExtensions())}function aa(e){const t=e.lastIndexOf(".");return t>-1?e.substr(t+1).toLowerCase():""}function ia(e,t){const a=ta(),i=[];return e.folder(t).forEach(((t,s)=>{if(s.dir)i.push(ia(e,t));else if(a.indexOf(aa(s.name))>-1){const t=s.name.split("/"),a=t[t.length-1];i.push(e.file(s.name).async("blob").then((e=>new File([e],a))))}})),i}var sa=e=>{let{proxyManager:t,girder:a}=e;return{namespaced:!0,state:{remoteFileList:[],fileList:[],loading:!1,progress:{}},getters:{anyErrors:e=>e.fileList.reduce(((e,t)=>e||"error"===t.state),!1),totalProgress(e){const t=Object.values(e.progress);return 0===t.length?0:t.reduce(((e,t)=>e+t),0)/t.length}},mutations:{startLoading(e){e.loading=!0},stopLoading(e){e.loading=!1},resetQueue(e){e.fileList=[]},addToFileList(e,t){for(let a=0;a=0&&t=0&&a=0&&a=0&&a=0&&a=0&&tte.openFiles(a,(a=>{t("openFiles",Array.from(a)).then(e).catch(i)}))))},resetQueue(e){let{commit:t}=e;t("resetQueue")},deleteFile(e,t){let{commit:a}=e;a("deleteFile",t)},openRemoteFiles(e,t){let{commit:a,dispatch:i}=e;return a("addToFileList",t.map((e=>({type:"remote",name:e.name,remoteURL:e.url,remoteOpts:e.options,withGirderToken:!!e.withGirderToken,proxyKeys:e.proxyKeys})))),i("readAllFiles")},openFiles(e,t){let{commit:a,dispatch:i}=e;const s=t.filter((e=>"zip"===aa(e.name)));if(s.length){const e=t.filter((e=>"zip"!==aa(e.name))),a=s.map((e=>C().loadAsync(e).then((e=>Promise.all(ia(e))))));return Promise.all(a).then((t=>[].concat.apply(e,t))).then((e=>i("openFiles",e)))}const n=[],o=[];if(t.forEach((e=>{"dcm"===aa(e.name)?o.push(e):n.push(e)})),o.length){a("addToFileList",[{type:"dicom",name:o[0].name,list:o}])}return a("addToFileList",n.map((e=>({type:"regular",name:e.name,file:e})))),i("readAllFiles")},readAllFiles(e){let{dispatch:t,state:a}=e;const i=[];for(let e=0;e(i("setRemoteFile",{index:t,file:e}),s("readFileIndex",t)))).catch((()=>{throw new Error("Failed to download file")}));else if("raw"===o.ext)o.extraInfo&&(r=function(e,t){let{dimensions:a,spacing:i,dataType:s}=t;return new Promise(((t,n)=>{const o=new FileReader;o.onload=function(){const e=ea.ZP.newInstance({spacing:i,extent:[0,a[0]-1,0,a[1]-1,0,a[2]-1]}),n=Qt.ZP.newInstance({name:"Scalars",values:new s.constructor(o.result)});e.getPointData().setScalars(n),t(e)},o.onerror=e=>n(e),o.readAsArrayBuffer(e)}))}(o.files[0],o.extraInfo).then((e=>{i("setFileReader",{index:t,reader:{name:o.name,dataset:e}})}))),i("setFileNeedsInfo",t);else if("dcm"===o.ext)r=te.loadFileSeries(o.files,"dcm",o.name).then((e=>{e&&i("setFileReader",{index:t,reader:e})}));else{if("glance"===o.ext)for(let e=0;e{e&&1===e.length&&i("setFileReader",{index:t,reader:e[0]})}))}return r.catch((e=>{e&&i("setFileError",{index:t,error:e.message||"File load failure"})}))},setRawFileInfo(e,t){let{commit:a,dispatch:i}=e,{index:s,info:n}=t;return n?a("setRawFileInfo",{index:s,info:n}):a("setFileNeedsInfo",s),i("readFileIndex",s)},load(e){let{state:a,commit:i,dispatch:s}=e;i("startLoading"),i("clearProgresses");const n=a.fileList.filter((e=>"ready"===e.state));let o=Promise.resolve();const r=n.find((e=>"glance"===e.ext));if(r){const e=r.reader.reader;o=o.then((()=>e.parseAsArrayBuffer().then((()=>s("restoreAppState",e.getAppState(),{root:!0})))))}return o=o.then((()=>{const e=n.filter((e=>"glance"!==e.ext)),a=[],i=[],o=[];for(let t=0;t{let a=[];for(let i=0;i"TrivialProducer"===e.getProxyName()));if(c[c.length-1]){const e=c[c.length-1].getProxyId();for(let t=0;ts("widgets/setLabelmapState",{labelmapId:a.getProxyId(),labelmapState:{selectedLabel:1,lastColorIndex:1}},{root:!0})))}for(let t=0;ti("stopLoading")))}}}},na=a(114),oa=a(379),ra=a(574),la=a(463),ca=a(174);const{CaptureOn:da}=he.ZP;var ua=e=>{let{proxyManager:t}=e;return{namespaced:!0,state:{viewsInitialized:!1,viewTypeToId:{},backgroundColors:{},globalBackgroundColor:ca.qV,axisType:"arrow",axisPreset:la.Bp,axisVisible:!0,annotationOpacity:1,interactionStyle3D:"3D",firstPersonMovementSpeed:null,maxTextureLODSize:5e4,viewOrder:Object.values(la.Zp),visibleCount:1,viewOrientation:la.In,viewTypes:la.v7,masterSourceId:null,previousConfigurationPreset:null},mutations:{setGlobalBackground(e,t){e.globalBackgroundColor=t;const a=Object.keys(e.backgroundColors);for(let i=0;i{const[o,r]=n.split(":"),l=t.createProxy("Views",o,{name:r});if((0,W.XC)(l,s.viewOrientation,r),l.setBackground(0,0,0,0),i.default.set(s.backgroundColors,n,s.globalBackgroundColor),l.setPresetToOrientationAxes("default"),!l.getReferenceByName("widgetManager")){const e=na.ZP.newInstance();e.setRenderer(l.getRenderer()),e.setCaptureOn(da.MOUSE_MOVE),l.set({widgetManager:e},!0)}n===la.H_&&(e=l),a("mapViewTypeToId",{viewType:n,viewId:l.getProxyId()})})),e&&e.activate()}},swapViews(e,t){let{commit:a}=e,{index:i,viewType:s}=t;a("swapViews",{index:i,viewType:s})},singleView(e,t){let{state:a,commit:i}=e;i("swapViews",{index:0,viewType:a.viewOrder[t]}),i("visibleCount",1)},splitView(e,t){let{state:a,commit:i}=e;i("swapViews",{index:t,viewType:a.viewOrder[1]}),i("visibleCount",2)},quadView(e){let{commit:t}=e;t("visibleCount",4)},setGlobalBackground(e,t){let{commit:a}=e;a("setGlobalBackground",t)},changeBackground(e,t){let{commit:a}=e,{viewType:i,color:s}=t;a("changeBackground",{viewType:i,color:s})},setAxisType(e,a){let{commit:i}=e;t.getViews().forEach((e=>{e.setOrientationAxesType(a)})),i("setAxisType",a)},setAxisPreset(e,a){let{commit:i,dispatch:s}=e;t.getViews().forEach((e=>{e.setPresetToOrientationAxes(a)})),i("setAxisPreset",a),s("configureViewOrientationAndTypes",!1)},setViewOrientation(e,a){let{commit:i,state:s}=e,{orientation:n,blockAnimation:o}=a;i("setViewOrientation",n),Object.entries(s.viewTypeToId).forEach((e=>{let[a,i]=e;const s=t.getProxyById(i),[r,l]=a.split(":");(0,W.XC)(s,n,l,o||"View3D"!==r?0:100)}))},setViewTypes(e,t){let{commit:a}=e;a("setViewTypes",t)},configureViewOrientationAndTypes(e,a){let{commit:i,dispatch:s,state:n}=e;if("lps"===n.axisPreset){const e=t.getProxyById(n.masterSourceId);if(e?.getDataset().isA("vtkImageData")){const t=e.getDataset().getDirection(),i=(0,oa.NZ)(t),n={};for(let e=0;e<3;++e)for(let t=0;t<3;++t){0!==i[e+3*t]&&(n["lps"[e]]="xyz"[t])}const o={[la.Zp.default]:"3D",[la.Zp[n.l]]:"Sagittal",[la.Zp[n.p]]:"Coronal",[la.Zp[n.s]]:"Axial"},r=Array(3);ra.transpose(r,i),ra.mul(r,t,r),s("setViewTypes",o),s("setViewOrientation",{orientation:r,blockAnimation:a})}else"lps"!==n.previousConfigurationPreset&&(s("setViewTypes",la.h$),s("setViewOrientation",{orientation:la.In,blockAnimation:a}))}else s("setViewTypes",la.v7),s("setViewOrientation",{orientation:la.In,blockAnimation:a});i("setPreviousConfigurationPreset",n.axisPreset)},updateMasterSourceId(e,a){let{dispatch:i,state:s}=e;const n=t.getRepresentations().filter((e=>!e.isVisible())).map((e=>e.getInput().getProxyId())),o=a.filter((e=>!n.includes(e)));o.includes(s.masterSourceId)||(0===o.length?i("setMasterSourceId",null):i("setMasterSourceId",o[0]))},setMasterSourceId(e,t){let{commit:a,dispatch:i,state:s}=e;const n=null===s.masterSourceId&&null!==t;a("setMasterSourceId",t),"lps"===s.axisPreset&&i("configureViewOrientationAndTypes",n)},setAxisVisible(e,a){let{commit:i}=e;t.getViews().forEach((e=>{e.setOrientationAxesVisibility(a)})),i("setAxisVisible",a)},setAnnotationOpacity(e,a){let{commit:i}=e;t.getViews().forEach((e=>{e.setAnnotationOpacity(a)})),i("setAnnotationOpacity",a)},setInteractionStyle3D(e,a){let{commit:i}=e;t.getViews().filter((e=>"default"===e.getName())).forEach((e=>{e.setPresetToInteractor3D(a)})),i("setInteractionStyle3D",a)},setFirstPersonMovementSpeed(e,a){let{commit:i}=e;t.getViews().filter((e=>"default"===e.getName())).forEach((e=>{e.getInteractorStyle3D().getKeyboardManipulators().forEach((e=>{e.setMovementSpeed&&e.setMovementSpeed(a)}))})),i("setFirstPersonMovementSpeed",a)},resetFirstPersonMovementSpeed(e){let{dispatch:a}=e,i=0;const s=t.getViews().filter((e=>"default"===e.getName()));for(let e=0;e{let{proxyManager:t}=e;return{namespaced:!0,state:{measurements:{},distanceUnitSymbol:"mm",distanceUnitFactor:1,imageToLabelmaps:{},labelmapToImage:{},labelmapStates:{},croppingStates:{}},mutations:{setDistanceUnitSymbol(e,t){e.distanceUnitSymbol=t},setDistanceUnitFactor(e,t){e.distanceUnitFactor=t},addLabelmapToImage(e,t){let{imageId:a,labelmapId:s}=t;a in e.imageToLabelmaps||i.default.set(e.imageToLabelmaps,a,[]),i.default.set(e.labelmapToImage,s,a),e.imageToLabelmaps[a].push(s)},deleteLabelmap(e,t){if(t in e.labelmapToImage){const a=e.labelmapToImage[t];i.default.delete(e.labelmapToImage,t),e.imageToLabelmaps[a].splice(e.imageToLabelmaps[a].indexOf(t),1)}},setLabelmapState(e,t){let{labelmapId:a,labelmapState:s}=t;i.default.set(e.labelmapStates,a,s)},addMeasurementTool(e,t){let{datasetId:a,componentName:s,data:n}=t;a in e.measurements||i.default.set(e.measurements,a,[]),e.measurements[a].push({componentName:s,data:n})},updateMeasurementTool(e,t){let{datasetId:a,index:s,data:n}=t;a in e.measurements&&i.default.set(e.measurements[a][s],"data",n)},removeMeasurementTool(e,t){let{datasetId:a,index:i}=t;a in e.measurements&&e.measurements[a].splice(i,1)},setCroppingState(e,t){let{datasetId:a,planes:i}=t;e.croppingStates[a]=Array.from(i)},rewriteProxyIds(e,t){let{sources:a}=t;e.measurements=(0,W.cO)(e.measurements,a),e.imageToLabelmaps=(0,W.cO)(e.imageToLabelmaps,a),e.labelmapStates=(0,W.cO)(e.labelmapStates,a),e.croppingStates=(0,W.cO)(e.croppingStates,a),Object.keys(e.imageToLabelmaps).forEach((t=>{e.imageToLabelmaps[t]=(0,W.Lg)(e.imageToLabelmaps[t],a)}));const i={};Object.entries(e.labelmapToImage).forEach((e=>{let[t,s]=e;i[a[t]]=a[s]})),e.labelmapToImage=i}},actions:{addLabelmapToImage:(0,W.Gy)("addLabelmapToImage"),deleteLabelmap:(0,W.Gy)("deleteLabelmap"),setLabelmapState:(0,W.Gy)("setLabelmapState"),addMeasurementTool:(0,W.Gy)("addMeasurementTool"),removeMeasurementTool:(0,W.Gy)("removeMeasurementTool"),updateMeasurementTool:(0,W.Gy)("updateMeasurementTool"),setCroppingState:(0,W.Gy)("setCroppingState"),setDistanceUnitSymbol:(0,W.Gy)("setDistanceUnitSymbol"),setDistanceUnitFactor:(0,W.Gy)("setDistanceUnitFactor"),rewriteProxyIds:(0,W.Gy)("rewriteProxyIds"),pxmProxyCreated:{root:!0,handler(e,a){let{state:i}=e,{proxy:s,proxyId:n}=a;if(n in i.croppingStates){const e=i.croppingStates[n],a=(0,W.aX)(t,s);a&&a.setCroppingPlanes(e)}}}}}},va=e=>{let{animationManager:t}=e;return{namespaced:!0,state:{playing:!1,currentFrame:"0.0",frames:[]},mutations:{setCurrentFrame(e,t){e.currentFrame=t},setPlaying(e,t){e.playing=t},setFrames(e,t){e.frames=t}},actions:{initializeAnimations(e){let{commit:a}=e;t.onCurrentFrameChanged((()=>{a("setCurrentFrame",t.getCurrentFrame())})),t.onFramesChanged((()=>{a("setFrames",t.getFrames())})),a("setCurrentFrame",t.getCurrentFrame()),a("setFrames",t.getFrames())},play(e){let{commit:a}=e;a("setPlaying",!0),t.play(),t.onDonePlaying((()=>{a("setPlaying",!1),t.onDonePlaying((()=>{}))}))},pause(e){let{commit:a}=e;a("setPlaying",!1),t.pause()},nextFrame(){t.nextFrame()},previousFrame(){t.previousFrame()},firstFrame(){t.firstFrame()},lastFrame(){t.lastFrame()},setFrameIndex(e,a){t.setFrameIndex(a)}}}};function ma(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}function ga(e,t){const a=Object.keys(t);for(let s=0;se.proxyManager,cameraViewPoints:e=>e.cameraViewPoints,mostRecentViewPoint:e=>e.mostRecentViewPoint},modules:{files:sa({proxyManager:a,girder:t}),views:ua({proxyManager:a,girder:t}),widgets:pa({proxyManager:a,girder:t}),animations:va({animationManager:n})},mutations:{showLanding(e){e.route="landing"},showApp(e){e.route="app"},savingState(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.savingStateName=t},loadingState(e,t){e.loadingState=t},addPanel:(e,t)=>{let{component:a,priority:s=0}=t;s in e.panels||i.default.set(e.panels,s,[]),e.panels[s].push(a)},openScreenshotDialog(e,t){e.pendingScreenshot=t,e.screenshotDialog=!0},closeScreenshotDialog(e){e.pendingScreenshot=null,e.screenshotDialog=!1},mostRecentViewPoint(e,t){e.mostRecentViewPoint=t},collapseDatasetPanels(e,t){e.collapseDatasetPanels=t},suppressBrowserWarning(e,t){e.suppressBrowserWarning=t}},actions:{addPanel:(0,W.Gy)("addPanel"),closeScreenshotDialog:(0,W.Gy)("closeScreenshotDialog"),collapseDatasetPanels:(0,W.Gy)("collapseDatasetPanels"),suppressBrowserWarning:(0,W.Gy)("suppressBrowserWarning"),saveState(e,t){let{commit:i,state:s}=e;const n=new Date,o=t||`${n.getFullYear()}${n.getMonth()+1}${n.getDate()}_${n.getHours()}-${n.getMinutes()}-${n.getSeconds()}.glance`;i("savingState",o);const r={version:2,activeSourceId:a.getActiveSource()?a.getActiveSource().getProxyId():-1,store:{route:s.route,views:s.views,widgets:s.widgets}},l={recycleViews:!0,datasetHandler(e,t){const a=t.get("name","url","remoteMetaData"),i=e.get("name","url","remoteMetaData"),s=a.url?a:i;return t.getKey("girderProvenance")?{serializedType:"girder",provenance:t.getKey("girderProvenance"),item:t.getKey("girderItem"),meta:t.getKey("meta")}:s.name&&s.url?s:e.getState()}},c=new(C());a.saveState(l,r).then((e=>{c.file("state.json",JSON.stringify(e)),c.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:6}}).then((e=>{const t=URL.createObjectURL(e),a=document.createElement("a");a.setAttribute("href",t),a.setAttribute("download",o),document.body.appendChild(a),a.click(),document.body.removeChild(a),setTimeout((()=>URL.revokeObjectURL(t)),6e4)})).then((()=>i("savingState",null)))}))},restoreAppState(e,i){let{commit:s,dispatch:n,state:o}=e;s("loadingState",!0);const r=new WeakMap;return n("resetWorkspace"),a.loadState(i,{datasetHandler(e){if(e.vtkClass)return(0,Gt.Z)(e);let i=e.name,n=e.url;const o={};if("girder"===e.serializedType){const{itemId:a,itemName:s}=e.item,{apiRoot:r}=e.provenance;i=s,n=`${r}/item/${a}/download`,o.headers={...o.headers||{},"Girder-Token":t.girderRest.token}}let l;if(e.seriesUrls){const t=aa(e.name),a=e.seriesUrls.map((e=>te.downloadDataset(function(e){return e.split("/").pop()?.split("?").shift()}(e),e,o)));l=Promise.all(a).then((e=>te.loadFileSeries(e,t,i)))}else l=te.downloadDataset(i,n,{...o,progressCallback(e){const t=e.lengthComputable?e.loaded/e.total:1/0;s("files/setProgress",{id:i,percentage:t})}}).then((e=>te.loadFiles([e]))).then((e=>e[0]));return l.then((t=>{let{dataset:i,reader:s}=t,n=null;if(s&&s.getOutputData)n=s.getOutputData();else if(i&&i.isA)n=i;else if(s&&s.setProxyManager)return s.setProxyManager(a),null;if(!n)throw new Error("Invalid dataset");return"girder"===e.serializedType?(n=Jt(n,e.meta),r.set(n,{girderProvenance:e.provenance,girderItem:e.item,meta:e.meta})):n.set(e,!0),n})).catch((e=>{const t="Dataset doesn't exist or adblock/firewall prevents access.";if("xhr"in e){const{xhr:a}=e;throw new Error(`${a.statusText} (${a.status}): ${t}`)}throw new Error(`${e.message} (${t})`)}))}}).then((e=>{const{version:t,store:s,$oldToNewIdMapping:l}=e;t>=2?this.replaceState(ga(o,s)):this.replaceState(ga(o,e)),a.getSources().forEach((e=>{const t=e.getDataset();if(r.has(t)){const a=r.get(t);Object.keys(a).forEach((t=>e.setKey(t,a[t])))}})),n("rewriteProxyIds",{appState:i,mapping:l}).then((()=>{a.modified();const i=a.getViews().filter((e=>e.getContainer())),s=i.find((e=>"View3D"===e.getProxyName()))||i[0];if(s&&s.activate(),a.getSources().forEach((e=>(0,W._3)(a,e))),t>=2){const{activeSourceId:t}=e,i=l[t],s=a.getProxyById(i);s&&s.activate()}else{const e=a.getSources()[0];e&&e.activate()}}))})).then((()=>s("loadingState",!1)))},resetWorkspace(){a.getSources().forEach((e=>setTimeout((()=>a.deleteProxy(e)),0))),setTimeout((()=>{a.renderAllViews(),a.resetCameraInAllViews()}),0)},resetActiveCamera(){a.resetCamera()},increaseSlice(e){let{state:t}=e;"app"===t.route&&ha(a,!0)},decreaseSlice(e){let{state:t}=e;"app"===t.route&&ha(a,!1)},takeScreenshot(e){let{commit:t,state:i}=e;const s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||a.getActiveView(),n=qt.getViewType(s);return s?s.captureImage().then((e=>{t("openScreenshotDialog",{imgSrc:e,viewName:s.getName(),viewData:{background:i.views.backgroundColors[n]}})})):Promise.resolve()},setCameraViewPoints(e,t){let{dispatch:a,state:i}=e;i.cameraViewPoints=t;const s=Object.keys(t);if(0!==s.length){a("changeCameraViewPoint",s[0]);a("views/setInteractionStyle3D","FirstPerson")}},changeCameraViewPoint(e,t){let{commit:a,getters:i,state:s}=e;const n=s.proxyManager.getViews(),o=i.proxyManager,r=i.cameraViewPoints[t]||{},l=r.camera,c=r.show,d=r.hide,u=[];n.filter((e=>"default"===e.getName())).forEach((e=>{const t=e.getCamera().getDistance(),a=[l.focalPoint[0]-l.position[0],l.focalPoint[1]-l.position[1],l.focalPoint[2]-l.position[2]],i=[l.position[0]+a[0]*t,l.position[1]+a[1]*t,l.position[2]+a[2]*t],s=e.moveCamera(i,l.position,l.viewUp,100);u.push(s)})),Promise.all(u).then((()=>{o.getSources().forEach((e=>{const t=e.getName();if(!c.includes(t)&&!d.includes(t))return;const a=c.includes(t),i=o.getRepresentations().filter((t=>t.getInput()===e))[0];i.getVisibility()!==a&&i.setVisibility(a)})),o.renderAllViews()})),a("mostRecentViewPoint",t)},previousViewPoint(e){let{dispatch:t,getters:a}=e;const i=a.mostRecentViewPoint;if(!i)return;const s=Object.keys(a.cameraViewPoints);if(!s.includes(i))return;const n=s.length,o=(s.indexOf(i)+n-1)%n;t("changeCameraViewPoint",s[o])},nextViewPoint(e){let{dispatch:t,getters:a}=e;const i=a.mostRecentViewPoint;if(!i)return;const s=Object.keys(a.cameraViewPoints);if(!s.includes(i))return;const n=(s.indexOf(i)+1)%s.length;t("changeCameraViewPoint",s[n])},rewriteProxyIds(e,t){let{dispatch:a}=e,{appState:i,mapping:s}=t;const n=e=>e.reduce(((e,t)=>({...e,[t.id]:s[t.id]})),{}),o={sources:n(i.sources),views:n(i.views),reps:n(i.representations),all:s};a("widgets/rewriteProxyIds",o),a("views/rewriteProxyIds",o)}}});return a.set({$store:o},!0),o};function fa(e){for(;e.length;)e.pop()()}class ba{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"settings";this.keyPrefix=e,this.storeSettingsMap={},this.store=null,this.storeWatchers=[]}key(e){return this.keyPrefix?`${this.keyPrefix}.${e}`:e}get(e){const t=window.localStorage.getItem(this.key(e));if(null!==t)return JSON.parse(t)}set(e,t){return window.localStorage.setItem(this.key(e),JSON.stringify(t))}syncWithStore(e,t){fa(this.storeWatchers),this.store=e,this.storeSettingsMap=t;const a=Object.keys(t);a.forEach((e=>{const a=this.get(e);if(void 0!==a){const{set:i}=t[e];i(a)}})),this.storeWatchers=a.map((a=>{const{get:i}=t[a];return e.watch(i,(e=>this.set(a,e)))}))}delete(){fa(this.storeWatchers),this.storeSettingsMap={},this.store=null}}class xa extends EventTarget{constructor(){super(),this.targets=[]}addTarget(e){this.targets.push(e),this.dispatchEvent(new CustomEvent("updateTargets"))}removeTarget(e){const t=this.targets.indexOf(e);t>-1&&(this.targets.splice(t,1),this.dispatchEvent(new CustomEvent("updateTargets")))}}var wa={install(e){const t=new xa;e.mixin({beforeCreate(){this.$toolSvgPortal=t}})}};const{getReader:_a,importBase64Dataset:Sa,listReaders:Pa,listSupportedExtensions:ka,loadFiles:Ca,openFiles:Va,registerReader:Ia,registerReadersToProxyManager:Ta}=te;i.default.use(s.ZP),i.default.use(n.Z),i.default.use(Kt),i.default.use(o.ZP),i.default.use(wa);let $a=null;function Da(e){$a=e}function Ma(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const a=t||$a||jt.Proxy,s=h.ZP.newInstance({proxyConfiguration:a}),n=new ba,o=ya({proxyManager:s,girder:m}),r=new i.default({el:e,components:{App:ae.Z},store:o,provide:m,vuetify:g.Hl,proxyManager:s,template:""});function l(e){(e.state||{}).app?o.commit("showApp"):o.commit("showLanding")}return o.watch((e=>e.route),(e=>{if(n.get("noHistory"))return;const t=window.history.state||{};"landing"===e&&t.app&&window.history.back(),"app"!==e||t.app||window.history.pushState({app:!0},"")})),window.history.replaceState({app:!1},""),window.addEventListener("popstate",l),n.set("noHistory",!1),n.syncWithStore(o,{collapseDatasetPanels:{set:e=>o.dispatch("collapseDatasetPanels",e),get:e=>e.collapseDatasetPanels},suppressBrowserWarning:{set:e=>o.dispatch("suppressBrowserWarning",e),get:e=>e.suppressBrowserWarning}}),{proxyManager:s,store:o,processURLArgs(){const e=c.Z.extractURLParameters();Object.keys(e).filter((e=>e.startsWith("setting."))).forEach((t=>{const a=t.substr("setting.".length);n.set(a,e[t])}));const{name:t,url:a}=e;if(t&&a){const e="string"==typeof t?[t]:t,i="string"==typeof a?[a]:a;r.$children[0].autoLoadRemotes("resources from url",i,e)}},addDatasetPanel(e){o.commit("addPanel",{component:e})},showApp(){o.commit("showApp")},getSetting:e=>n.get(e),setSetting:(e,t)=>n.set(e,t)}}},103:function(e,t,a){"use strict";var i=a(612),s=a(9);function n(e,t){for(let a=0;at.getInput()===e.source));for(let e=0;e{e.updateProxies(n,t,a&&a[n])})))}return i}t.Z={generateComponent:function(e,t){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{onChange:{},onUpdate:[]};const u=l(t),p={};return Object.keys(u).forEach((e=>{p[`get${s.ZP.capitalize(e)}`]=u[e].get,p[`set${s.ZP.capitalize(e)}`]=u[e].set})),{name:e,props:["sourceId"],data:()=>r(t),computed:{...u,...(0,i.rn)("views",{viewOrder:e=>e.viewOrder}),source(){return this.$proxyManager.getProxyById(this.sourceId)}},watch:{viewOrder(){a&&this.$nextTick(this.$forceUpdate)}},proxyManagerHooks:{onProxyModified(e){e.isA("vtkAbstractRepresentationProxy")&&e.getInput()&&e.getInput()===this.source&&this.updateData()},onProxyCreated(e){const{proxyGroup:t,proxy:a}=e;"Representations"===t&&a.getInput()===this.source&&this.updateAll()}},created(){this.subscriptions=c(this,t,d.onChange)},mounted(){this.updateAll()},beforeDestroy(){for(;this.subscriptions.length;)this.subscriptions.pop()()},methods:{...p,updateAll(){if(this.updateDomains(),this.updateData(),d.onUpdate)for(let e=0;ee.getInput()===this.source)),t=[this.$proxyManager.getProxyById(this.sourceId)].concat(e),a={};for(;t.length;){n(a,t.pop().getReferenceByName("ui"))}this.inUpdateDomains=!1,this.domains=a},updateData(){if(!this.inUpdateData){this.inUpdateData=!0;for(let e=0;eSpacing: ${sliceSpacing} mm
${sliceIndex} of ${sliceCount}",se:"WL: ${windowLevel} / WW: ${windowWidth}"},r={[n.default]:"3D",[n.x]:"Orientation X",[n.y]:"Orientation Y",[n.z]:"Orientation Z"},l={[n.default]:"3D",[n.x]:"Sagittal",[n.y]:"Coronal",[n.z]:"Axial"},c=[1,0,0,0,1,0,0,0,1]},174:function(e,t,a){"use strict";a.d(t,{qV:function(){return s},qg:function(){return n}});var i=a(57);const s="linear-gradient(#333, #999)",n=["#000000","#ffffff",...i.oe,"linear-gradient(#7478BE, #C1C3CA)","linear-gradient(#00002A, #52576E)",s]},378:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});var i=a(98),s=JSON.parse('[{"Name":"Medical","Children":[{"Name":"CT","Children":[{"Name":"CT-AAA","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,143.556,0,166.222,0.686275,214.389,0.696078,419.736,0.833333,3071,0.803922],"RGBPoints":[-3024,0,0,0,143.556,0.615686,0.356863,0.184314,166.222,0.882353,0.603922,0.290196,214.389,1,1,1,419.736,1,0.937033,0.954531,3071,0.827451,0.658824,1]},{"Name":"CT-AAA2","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,129.542,0,145.244,0.166667,157.02,0.5,169.918,0.627451,395.575,0.8125,1578.73,0.8125,3071,0.8125],"RGBPoints":[-3024,0,0,0,129.542,0.54902,0.25098,0.14902,145.244,0.6,0.627451,0.843137,157.02,0.890196,0.47451,0.6,169.918,0.992157,0.870588,0.392157,395.575,1,0.886275,0.658824,1578.73,1,0.829256,0.957922,3071,0.827451,0.658824,1]},{"Name":"CT-Bone","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-16.4458,0,641.385,0.715686,3071,0.705882],"RGBPoints":[-3024,0,0,0,-16.4458,0.729412,0.254902,0.301961,641.385,0.905882,0.815686,0.552941,3071,1,1,1]},{"Name":"CT-Bones","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-1000,0,152.19,0,278.93,0.190476,952,0.2],"RGBPoints":[-1000,0.3,0.3,1,-488,0.3,1,0.3,463.28,1,0,0,659.15,1,0.912535,0.0374849,953,1,0.3,0.3]},{"Name":"CT-Cardiac","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-77.6875,0,94.9518,0.285714,179.052,0.553571,260.439,0.848214,3071,0.875],"RGBPoints":[-3024,0,0,0,-77.6875,0.54902,0.25098,0.14902,94.9518,0.882353,0.603922,0.290196,179.052,1,0.937033,0.954531,260.439,0.615686,0,0,3071,0.827451,0.658824,1]},{"Name":"CT-Cardiac2","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,42.8964,0,163.488,0.428571,277.642,0.776786,1587,0.754902,3071,0.754902],"RGBPoints":[-3024,0,0,0,42.8964,0.54902,0.25098,0.14902,163.488,0.917647,0.639216,0.0588235,277.642,1,0.878431,0.623529,1587,1,1,1,3071,0.827451,0.658824,1]},{"Name":"CT-Cardiac3","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-86.9767,0,45.3791,0.169643,139.919,0.589286,347.907,0.607143,1224.16,0.607143,3071,0.616071],"RGBPoints":[-3024,0,0,0,-86.9767,0,0.25098,1,45.3791,1,0,0,139.919,1,0.894893,0.894893,347.907,1,1,0.25098,1224.16,1,1,1,3071,0.827451,0.658824,1]},{"Name":"CT-Chest-Contrast-Enhanced","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,67.0106,0,251.105,0.446429,439.291,0.625,3071,0.616071],"RGBPoints":[-3024,0,0,0,67.0106,0.54902,0.25098,0.14902,251.105,0.882353,0.603922,0.290196,439.291,1,0.937033,0.954531,3071,0.827451,0.658824,1]},{"Name":"CT-Chest-Vessels","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-1278.35,0,22.8277,0.428571,439.291,0.625,3071,0.616071],"RGBPoints":[-3024,0,0,0,-1278.35,0.54902,0.25098,0.14902,22.8277,0.882353,0.603922,0.290196,439.291,1,0.937033,0.954531,3071,0.827451,0.658824,1]},{"Name":"CT-Coronary-Arteries","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,136.47,0,159.215,0.258929,318.43,0.571429,478.693,0.776786,3661,1],"RGBPoints":[-2048,0,0,0,136.47,0,0,0,159.215,0.159804,0.159804,0.159804,318.43,0.764706,0.764706,0.764706,478.693,1,1,1,3661,1,1,1]},{"Name":"CT-Coronary-Arteries-2","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,142.677,0,145.016,0.116071,192.174,0.5625,217.24,0.776786,384.347,0.830357,3661,0.830357],"RGBPoints":[-2048,0,0,0,142.677,0,0,0,145.016,0.615686,0,0.0156863,192.174,0.909804,0.454902,0,217.24,0.972549,0.807843,0.611765,384.347,0.909804,0.909804,1,3661,1,1,1]},{"Name":"CT-Coronary-Arteries-3","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,128.643,0,129.982,0.0982143,173.636,0.669643,255.884,0.857143,584.878,0.866071,3661,1],"RGBPoints":[-2048,0,0,0,128.643,0,0,0,129.982,0.615686,0,0.0156863,173.636,0.909804,0.454902,0,255.884,0.886275,0.886275,0.886275,584.878,0.968627,0.968627,0.968627,3661,1,1,1]},{"Name":"CT-Cropped-Volume-Bone","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,-451,0,-450,1,1050,1,3661,1],"RGBPoints":[-2048,0,0,0,-451,0,0,0,-450,0.0556356,0.0556356,0.0556356,1050,1,1,1,3661,1,1,1]},{"Name":"CT-Fat","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-1000,0,-100,0,-99,0.15,-60,0.15,-59,0,101.2,0,952,0],"RGBPoints":[-1000,0.3,0.3,1,-497.5,0.3,1,0.3,-99,0,0,1,-76.946,0,1,0,-65.481,0.835431,0.888889,0.0165387,83.89,1,0,0,463.28,1,0,0,659.15,1,0.912535,0.0374849,2952,1,0.300267,0.299886]},{"Name":"CT-Liver-Vasculature","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,149.113,0,157.884,0.482143,339.96,0.660714,388.526,0.830357,1197.95,0.839286,3661,0.848214],"RGBPoints":[-2048,0,0,0,149.113,0,0,0,157.884,0.501961,0.25098,0,339.96,0.695386,0.59603,0.36886,388.526,0.854902,0.85098,0.827451,1197.95,1,1,1,3661,1,1,1]},{"Name":"CT-Lung","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-1000,0,-600,0,-599,0.15,-400,0.15,-399,0,2952,0],"RGBPoints":[-1000,0.3,0.3,1,-600,0,0,1,-530,0.134704,0.781726,0.0724558,-460,0.929244,1,0.109473,-400,0.888889,0.254949,0.0240258,2952,1,0.3,0.3]},{"Name":"CT-MIP","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-637.62,0,700,1,3071,1],"RGBPoints":[-3024,0,0,0,-637.62,1,1,1,700,1,1,1,3071,1,1,1]},{"Name":"CT-Muscle","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-3024,0,-155.407,0,217.641,0.676471,419.736,0.833333,3071,0.803922],"RGBPoints":[-3024,0,0,0,-155.407,0.54902,0.25098,0.14902,217.641,0.882353,0.603922,0.290196,419.736,1,0.937033,0.954531,3071,0.827451,0.658824,1]},{"Name":"CT-Pulmonary-Arteries","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,-568.625,0,-364.081,0.0714286,-244.813,0.401786,18.2775,0.607143,447.798,0.830357,3592.73,0.839286],"RGBPoints":[-2048,0,0,0,-568.625,0,0,0,-364.081,0.396078,0.301961,0.180392,-244.813,0.611765,0.352941,0.0705882,18.2775,0.843137,0.0156863,0.156863,447.798,0.752941,0.752941,0.752941,3592.73,1,1,1]},{"Name":"CT-Soft-Tissue","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,-167.01,0,-160,1,240,1,3661,1],"RGBPoints":[-2048,0,0,0,-167.01,0,0,0,-160,0.0556356,0.0556356,0.0556356,240,1,1,1,3661,1,1,1]}]},{"Name":"MR","Children":[{"Name":"MR-Angio","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[-2048,0,151.354,0,158.279,0.4375,190.112,0.580357,200.873,0.732143,3661,0.741071],"RGBPoints":[-2048,0,0,0,151.354,0,0,0,158.279,0.74902,0.376471,0,190.112,1,0.866667,0.733333,200.873,0.937255,0.937255,0.937255,3661,1,1,1]},{"Name":"MR-Default","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[0,0,20,0,40,0.15,120,0.3,220,0.375,1024,0.5],"RGBPoints":[0,0,0,0,20,0.168627,0,0,40,0.403922,0.145098,0.0784314,120,0.780392,0.607843,0.380392,220,0.847059,0.835294,0.788235,1024,1,1,1]},{"Name":"MR-MIP","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[0,0,98.3725,0,416.637,1,2800,1],"RGBPoints":[0,1,1,1,98.3725,1,1,1,416.637,1,1,1,2800,1,1,1]},{"Name":"MR-T2-Brain","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[0,0,36.05,0,218.302,0.171429,412.406,1,641,1],"RGBPoints":[0,0,0,0,98.7223,0.956863,0.839216,0.192157,412.406,0,0.592157,0.807843,641,1,1,1]}]},{"Name":"DTI-FA-Brain","NanColor":[1,1,0],"ColorSpace":"RGB","OpacityPoints":[0,0,0,0,0.3501,0.0158,0.49379,0.7619,0.6419,1,0.992,1,0.995,0,0.995,0],"RGBPoints":[0,1,0,0,0,1,0,0,0.24974,0.4941,1,0,0.49949,0,0.9882,1,0.7492,0.51764,0,1,0.995,1,0,0,0.995,1,0,0]}]}]');const n={...i.Z.getPresetByName("Cool to Warm"),Name:"Default (Cool to Warm)"};function o(e,t){const a=e.Name.toLowerCase(),i=t.Name.toLowerCase();return a>i?1:-(ai.Z.getPresetByName(e)));return a.sort(o),{Name:e,Children:a}}!function e(t){t.forEach((t=>{t.Children?e(t.Children):i.Z.addPreset(t)}))}(s.concat(n));var l=[].concat(n,s,r("ParaView",["2hot","Asymmtrical Earth Tones (6_21b)","Cold and Hot","Cool to Warm (Extended)","Cool to Warm","coolwarm","Grayscale","Linear Blue (8_31f)","Linear YGB 1211g","Rainbow Blended Black","Rainbow Blended Grey","Rainbow Blended White","Rainbow Desaturated","rainbow","Warm to Cool (Extended)","Warm to Cool"]),r("ERDC",["erdc_blue2cyan_BW","erdc_blue2gold","erdc_blue2gold_BW","erdc_blue2green_BW","erdc_blue2green_muted","erdc_blue2yellow","erdc_blue_BW","erdc_brown_BW","erdc_cyan2orange","erdc_divHi_purpleGreen","erdc_divHi_purpleGreen_dim","erdc_divLow_icePeach","erdc_divLow_purpleGreen","erdc_gold_BW","erdc_green2yellow_BW","erdc_iceFire_H","erdc_iceFire_L","erdc_magenta_BW","erdc_marine2gold_BW","erdc_orange_BW","erdc_pbj_lin","erdc_purple2green","erdc_purple2green_dark","erdc_purple2pink_BW","erdc_purple_BW","erdc_rainbow_bright","erdc_rainbow_dark","erdc_red2purple_BW","erdc_red2yellow_BW","erdc_red_BW","erdc_sapphire2gold_BW"]),r("Others",["Black, Blue and White","Black, Orange and White","Black-Body Radiation","blot","Blue to Red Rainbow","Blue to Yellow","BLUE-WHITE","blue2cyan","blue2yellow","Blues","bone_Matlab","BrBG","BrOrYl","BuGn","BuGnYl","BuPu","BuRd","CIELab Blue to Red","CIELab_blue2red","copper_Matlab","GBBr","gist_earth","GnBu","GnBuPu","GnRP","GnYlRd","gray_Matlab","Green-Blue Asymmetric Divergent (62Blbc)","GREEN-WHITE_LINEAR","Greens","GYPi","GyRd","Haze","Haze_cyan","Haze_green","Haze_lime","heated_object","hsv","hue_L60","Inferno (matplotlib)","jet","magenta","Magma (matplotlib)","Muted Blue-Green","nic_CubicL","nic_CubicYF","nic_Edge","Oranges","OrPu","pink_Matlab","PiYG","Plasma (matplotlib)","PRGn","PuBu","PuOr","PuRd","Purples","RdOr","RdOrYl","RdPu","Red to Blue Rainbow","Spectral_lowBlue","Viridis (matplotlib)","X Ray","Yellow 15"]))},462:function(e,t,a){"use strict";a.d(t,{u3:function(){return i}});const i={md:768}},57:function(e,t,a){"use strict";a.d(t,{oe:function(){return i},wY:function(){return s}});const i=["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],s=["#ffee00","#bbbe64","#f3b700","#91f5ad","#fdca40","#f79824","#e57c04"]},30:function(e,t,a){"use strict";a.d(t,{y5:function(){return s},Gy:function(){return n},cO:function(){return o},JL:function(){return r},Lg:function(){return l},_3:function(){return c},aX:function(){return d},XC:function(){return p}});var i=a(575);function s(){let e=null;const t={sub(a){t.unsub(),e=a},unsub(){null!==e&&(e.unsubscribe(),e=null)}};return t}function n(e){return(t,a)=>{let{commit:i}=t;return i(e,a)}}function o(e,t){const a={};return Object.keys(e).forEach((i=>{let s=i;i in t&&(s=t[i]),a[s]=e[i]})),a}function r(e,t){const a={};return Object.entries(e).forEach((e=>{let[i,s]=e,n=s;s in t&&(n=t[s]),a[i]=n})),a}function l(e,t){return e.map((e=>e in t?t[e]:e))}function c(e,t){const a=e.getViews().filter((e=>e.isA("vtkView2DProxy"))),i=a.map((e=>e.getReferenceByName("sliceRepresentation")));e.createRepresentationInAllViews(t),"LabelMap"===t.getProxyName()&&a.forEach(((e,t)=>e.bindRepresentationToManipulator(i[t])))}function d(e,t){const a=e.getViews().find((e=>"View3D"===e.getProxyName()));if(!a)throw new Error("Cannot find 3D view!");const i=e.getRepresentation(t,a);if(!i||!i.getCropFilter)throw new Error("Cannot find the volume rep with a crop filter!");return i.getCropFilter()}const u={default:{forwardAxis:1,forwardOrientation:1,upwardAxis:2,upwardOrientation:1},x:{forwardAxis:0,forwardOrientation:1,upwardAxis:2,upwardOrientation:1},y:{forwardAxis:1,forwardOrientation:1,upwardAxis:2,upwardOrientation:1},z:{forwardAxis:2,forwardOrientation:1,upwardAxis:1,upwardOrientation:-1}};function p(e,t,a){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const{forwardAxis:n,forwardOrientation:o,upwardAxis:r,upwardOrientation:l}=u[a],c=i.bA(Array(3),t.slice(3*n,3*n+3),o),d=i.bA(Array(3),t.slice(3*r,3*r+3),l),p=e.getCamera(),v=p.getPosition(),m=p.getViewUp(),g=p.getFocalPoint(),h=i.IH(Array(3),g,c);p.setPosition(...h),p.setViewUp(...d),e.resetCamera();const y=p.getFocalPoint(),f=p.getPosition(),b=p.getViewUp();return p.setFocalPoint(...g),p.setPosition(...v),p.setViewUp(...m),e.moveCamera(y,f,b,s)}},78:function(e,t,a){"use strict";var i=a(72),s=a(15),n=a(4);const{vtkErrorMacro:o}=i.ZP,r=1,l=2,c=3,d=4,u=5,p=6,v=7,m=8,g=9,h=10,y=11,f=12,b=13,x=14,w=15;const _=new Map([["Uint8Array","uint8_t"],["Int8Array","int8_t"],["Uint16Array","uint16_t"],["Int16Array","int16_t"],["Uint32Array","uint32_t"],["Int32Array","int32_t"],["Float32Array","float"],["Float64Array","double"]]);t.Z={convertItkToVtkImage:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a={origin:[0,0,0],spacing:[1,1,1]},i=[1,1,1],_=[1,0,0,0,1,0,0,0,1];for(let t=0;t1&&void 0!==arguments[1]&&arguments[1];const a={imageType:{dimension:3,pixelType:r,componentType:"",components:1},name:"name",origin:e.getOrigin(),spacing:e.getSpacing(),direction:{data:[1,0,0,0,1,0,0,0,1]},size:e.getDimensions()},i=e.getDirection(),s=a.size.length;a.imageType.dimension=s,a.direction.rows=s,a.direction.columns=s;for(let e=0;e{Number.isNaN(Number(a))?n("Provided label is not a number"):(t.colorMap[a]=i.slice(),void 0===t.colorMap[a][3]&&(t.colorMap[a][3]=255),e.modified())},e.removeLabel=a=>{Number.isNaN(Number(a))?n("Provided label is not a number"):(delete t.colorMap[a],e.modified())},null===t.colorMap&&(t.colorMap={0:[0,0,0,0],1:[0,0,0,255]})}const r={colorMap:null};function l(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,r,a),s.ZP.extend(e,t,a),i.ZP.setGet(e,t,["colorMap"]),o(e,t)}const c=i.ZP.newInstance(l,"vtkLabelMap");t.ZP={newInstance:c,extend:l}},328:function(e,t,a){var i=a(489),s=a(481);void 0===s.Glance&&(s.Glance=i),e.exports=i},524:function(e,t,a){var i={"./af":180,"./af.js":180,"./ar":181,"./ar-dz":182,"./ar-dz.js":182,"./ar-kw":183,"./ar-kw.js":183,"./ar-ly":184,"./ar-ly.js":184,"./ar-ma":185,"./ar-ma.js":185,"./ar-sa":186,"./ar-sa.js":186,"./ar-tn":187,"./ar-tn.js":187,"./ar.js":181,"./az":188,"./az.js":188,"./be":189,"./be.js":189,"./bg":190,"./bg.js":190,"./bm":191,"./bm.js":191,"./bn":192,"./bn-bd":193,"./bn-bd.js":193,"./bn.js":192,"./bo":194,"./bo.js":194,"./br":195,"./br.js":195,"./bs":196,"./bs.js":196,"./ca":197,"./ca.js":197,"./cs":198,"./cs.js":198,"./cv":199,"./cv.js":199,"./cy":200,"./cy.js":200,"./da":201,"./da.js":201,"./de":202,"./de-at":203,"./de-at.js":203,"./de-ch":204,"./de-ch.js":204,"./de.js":202,"./dv":205,"./dv.js":205,"./el":206,"./el.js":206,"./en-au":207,"./en-au.js":207,"./en-ca":208,"./en-ca.js":208,"./en-gb":209,"./en-gb.js":209,"./en-ie":210,"./en-ie.js":210,"./en-il":211,"./en-il.js":211,"./en-in":212,"./en-in.js":212,"./en-nz":213,"./en-nz.js":213,"./en-sg":214,"./en-sg.js":214,"./eo":215,"./eo.js":215,"./es":216,"./es-do":217,"./es-do.js":217,"./es-mx":218,"./es-mx.js":218,"./es-us":219,"./es-us.js":219,"./es.js":216,"./et":220,"./et.js":220,"./eu":221,"./eu.js":221,"./fa":222,"./fa.js":222,"./fi":223,"./fi.js":223,"./fil":224,"./fil.js":224,"./fo":225,"./fo.js":225,"./fr":226,"./fr-ca":227,"./fr-ca.js":227,"./fr-ch":228,"./fr-ch.js":228,"./fr.js":226,"./fy":229,"./fy.js":229,"./ga":230,"./ga.js":230,"./gd":231,"./gd.js":231,"./gl":232,"./gl.js":232,"./gom-deva":233,"./gom-deva.js":233,"./gom-latn":234,"./gom-latn.js":234,"./gu":235,"./gu.js":235,"./he":236,"./he.js":236,"./hi":237,"./hi.js":237,"./hr":238,"./hr.js":238,"./hu":239,"./hu.js":239,"./hy-am":240,"./hy-am.js":240,"./id":241,"./id.js":241,"./is":242,"./is.js":242,"./it":243,"./it-ch":244,"./it-ch.js":244,"./it.js":243,"./ja":245,"./ja.js":245,"./jv":246,"./jv.js":246,"./ka":247,"./ka.js":247,"./kk":248,"./kk.js":248,"./km":249,"./km.js":249,"./kn":250,"./kn.js":250,"./ko":251,"./ko.js":251,"./ku":252,"./ku.js":252,"./ky":253,"./ky.js":253,"./lb":254,"./lb.js":254,"./lo":255,"./lo.js":255,"./lt":256,"./lt.js":256,"./lv":257,"./lv.js":257,"./me":258,"./me.js":258,"./mi":259,"./mi.js":259,"./mk":260,"./mk.js":260,"./ml":261,"./ml.js":261,"./mn":262,"./mn.js":262,"./mr":263,"./mr.js":263,"./ms":264,"./ms-my":265,"./ms-my.js":265,"./ms.js":264,"./mt":266,"./mt.js":266,"./my":267,"./my.js":267,"./nb":268,"./nb.js":268,"./ne":269,"./ne.js":269,"./nl":270,"./nl-be":271,"./nl-be.js":271,"./nl.js":270,"./nn":272,"./nn.js":272,"./oc-lnc":273,"./oc-lnc.js":273,"./pa-in":274,"./pa-in.js":274,"./pl":275,"./pl.js":275,"./pt":276,"./pt-br":277,"./pt-br.js":277,"./pt.js":276,"./ro":278,"./ro.js":278,"./ru":279,"./ru.js":279,"./sd":280,"./sd.js":280,"./se":281,"./se.js":281,"./si":282,"./si.js":282,"./sk":283,"./sk.js":283,"./sl":284,"./sl.js":284,"./sq":285,"./sq.js":285,"./sr":286,"./sr-cyrl":287,"./sr-cyrl.js":287,"./sr.js":286,"./ss":288,"./ss.js":288,"./sv":289,"./sv.js":289,"./sw":290,"./sw.js":290,"./ta":291,"./ta.js":291,"./te":292,"./te.js":292,"./tet":293,"./tet.js":293,"./tg":294,"./tg.js":294,"./th":295,"./th.js":295,"./tk":296,"./tk.js":296,"./tl-ph":297,"./tl-ph.js":297,"./tlh":298,"./tlh.js":298,"./tr":299,"./tr.js":299,"./tzl":300,"./tzl.js":300,"./tzm":301,"./tzm-latn":302,"./tzm-latn.js":302,"./tzm.js":301,"./ug-cn":303,"./ug-cn.js":303,"./uk":304,"./uk.js":304,"./ur":305,"./ur.js":305,"./uz":306,"./uz-latn":307,"./uz-latn.js":307,"./uz.js":306,"./vi":308,"./vi.js":308,"./x-pseudo":309,"./x-pseudo.js":309,"./yo":310,"./yo.js":310,"./zh-cn":311,"./zh-cn.js":311,"./zh-hk":312,"./zh-hk.js":312,"./zh-mo":313,"./zh-mo.js":313,"./zh-tw":314,"./zh-tw.js":314};function s(e){var t=n(e);return a(t)}function n(e){if(!a.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}s.keys=function(){return Object.keys(i)},s.resolve=n,e.exports=s,s.id=524},39:function(e,t,a){"use strict";a.d(t,{Z:function(){return i}});var i={block:"Datasets-block-MOv47",blockTitle:"Datasets-blockTitle-hRnLc",blockContent:"Datasets-blockContent-a3h1_",blockRow:"Datasets-blockRow-lFOcN",slimInput:"Datasets-slimInput-Cnehi",canSelect:"Datasets-canSelect-w1m5T",clickable:"Datasets-clickable-JOYIZ",smallLabel:"Datasets-smallLabel-_8o5q",active:"Datasets-active-zv1WS",inactive:"Datasets-inactive-twtbQ",matrix:"Datasets-matrix-_nvw3",disable:"Datasets-disable-wMFzA",lutImage:"Datasets-lutImage-h8bWl",dropdownMenu:"Datasets-dropdownMenu-Z0GS3",button:"Datasets-button-W4Ok7",click:"Datasets-click-URBWc",negativeTopSpacing:"Datasets-negativeTopSpacing-HrNz2"}},74:function(e,t,a){"use strict";a.d(t,{Z:function(){return i}});var i={datasetPanel:"Datasets-datasetPanel-B9jFW",subpanel:"Datasets-subpanel-RQd0h",panelContent:"Datasets-panelContent-kpRWg",panelHeader:"Datasets-panelHeader-uNZ70",headerMenuButton:"Datasets-headerMenuButton-_t8U7",subpanelHeader:"Datasets-subpanelHeader-_vvrH"}},380:function(e,t,a){"use strict";a.d(t,{Z:function(){return i}});var i={wrapper:"TreeView-wrapper-Uw6mP",node:"TreeView-node-gbM0d",arrow:"TreeView-arrow-KW7L0",openArrow:"TreeView-openArrow-ezZCc",header:"TreeView-header-KxYvL",expander:"TreeView-expander-SVvAO",name:"TreeView-name-_uKWF"}},151:function(e,t,a){"use strict";a.d(t,{Z:function(){return B}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.available?a("div",[a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},["geometry"===e.available?[a("v-flex",{attrs:{xs3:""}},[a("span",{staticClass:"body-2"},[e._v("Color By:")])]),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("v-select",{staticClass:"pv-no-select",class:e.$style.slimInput,attrs:{dense:"",flat:"","hide-details":"",items:e.arrays,value:e.arraySelectValue},on:{change:e.setColorBy}})],1),e._v(" "),"solid"===e.colorBy?a("v-flex",{attrs:{xs12:""}},[a("palette-picker",{staticClass:"pt-1 pb-1",attrs:{palette:e.palette,size:24},model:{value:e.solidColor,callback:function(t){e.solidColor=t},expression:"solidColor"}})],1):e._e()]:e._e(),e._v(" "),"solid"!==e.colorBy?[a("v-flex",{staticClass:"pt-2",attrs:{xs12:""}},[a("v-menu",{attrs:{"close-on-content-click":!1,"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("div",e._g({class:e.$style.clickable},i),[a("span",{staticClass:"body-2"},[e._v(e._s(e.presetName))]),e._v(" "),a("img",{class:e.$style.lutImage,attrs:{src:e.lutImage}})])]}}],null,!1,2069699272),model:{value:e.presetMenu,callback:function(t){e.presetMenu=t},expression:"presetMenu"}},[e._v(" "),e.presetMenu?a("tree-view",{class:e.$style.dropdownMenu,attrs:{tree:e.presets,labelKey:"Name",childrenKey:"Children"},on:{input:e.onChangePreset}}):e._e()],1)],1),e._v(" "),a("v-flex",{staticClass:"pb-4",class:e.$style.negativeTopSpacing,attrs:{xs5:""}},[a("v-text-field",{class:e.$style.negativeTopSpacing,attrs:{label:"Min",step:"any",disabled:"geometry"!==e.available,"hide-details":"",value:e.dataRange[0]},on:{change:function(t){return e.$proxyManager.renderAllViews()},input:function(t){return e.setDataRangeIndex(0,t)}}})],1),e._v(" "),a("v-flex",{staticClass:"text-center pb-4",class:e.$style.negativeTopSpacing,attrs:{xs2:""}},["geometry"===e.available?a("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.negativeTopSpacing,attrs:{icon:"",small:""},on:{click:e.resetDataRange}},i),[a("v-icon",[e._v("mdi-arrow-expand-horizontal")])],1)]}}],null,!1,2807797372)},[e._v("\n Reset range\n ")]):a("v-spacer")],1),e._v(" "),a("v-flex",{staticClass:"pb-4",class:e.$style.negativeTopSpacing,attrs:{xs5:""}},[a("v-text-field",{class:e.$style.negativeTopSpacing,attrs:{label:"Max",step:"any",disabled:"geometry"!==e.available,reverse:"","hide-details":"",value:e.dataRange[1]},on:{change:function(t){return e.$proxyManager.renderAllViews()},input:function(t){return e.setDataRangeIndex(1,t)}}})],1)]:e._e(),e._v(" "),"volume"===e.available?[e.piecewiseFunction&&!e.hasPresetOpacity?a("v-flex",{attrs:{xs12:""},on:{touchstart:function(e){e.stopPropagation()}}},[a("piecewise-function-editor",{attrs:{piecewiseFunction:e.piecewiseFunction,source:e.source,proxyManager:e.$proxyManager}})],1):e._e(),e._v(" "),e.hasPresetOpacity?a("v-flex",{attrs:{xs12:""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("span",{class:e.$style.smallLabel},[e._v("Shift")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{min:e.shiftRange[0],max:e.shiftRange[1],step:"0","hide-details":""},model:{value:e.shift,callback:function(t){e.shift=t},expression:"shift"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{type:"number",min:e.shiftRange[0],max:e.shiftRange[1],step:"1","hide-details":""},model:{value:e.shift,callback:function(t){e.shift=t},expression:"shift"}})],1)],1)],1):e._e(),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-checkbox",{class:e.$style.slimInput,attrs:{"hide-details":"",label:"Apply color to slices"},on:{change:e.applyColorToSlices},model:{value:e.colorToSlices,callback:function(t){e.colorToSlices=t},expression:"colorToSlices"}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-checkbox",{class:e.$style.slimInput,attrs:{"hide-details":"",label:"Apply opacity to slices"},on:{change:e.applyOpacityToSlices},model:{value:e.opacityToSlices,callback:function(t){e.opacityToSlices=t},expression:"opacityToSlices"}})],1)]:e._e(),e._v(" "),"geometry"===e.available&&e.colorByName?a("v-flex",{attrs:{xs12:""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs2:""}},[a("v-icon",{class:e.$style.click,on:{click:function(t){t.stopPropagation(),e.interpolateScalarsBeforeMapping=!e.interpolateScalarsBeforeMapping}}},[e._v("\n "+e._s(e.interpolateScalarsBeforeMapping?"mdi-checkbox-marked":"mdi-checkbox-blank-outline")+"\n ")])],1),e._v(" "),a("v-flex",{attrs:{xs10:""}},[a("span",{staticClass:"body-2"},[e._v("Interpolate scalar before mapping")])])],1)],1):e._e()],2)],1)],1)],1):e._e()};i._withStripped=!0;var s=a(9),n=a(379),o=a(98),r=a(137),l=a(152),c=a(38),d=a(153),u=a(57),p=a(378);const{Mode:v}=r.Z,m={text:"Solid color",value:"solid"},g=document.createElement("canvas");g.setAttribute("width",300),g.setAttribute("height",1);var h={name:"ColorBy",props:["sourceId"],components:{PalettePicker:c.Z,PiecewiseFunctionEditor:l.Z,TreeView:d.Z},data:()=>({palette:u.oe.concat("#ffffff","#000000"),available:"",colorBy:"solid",arrays:[m],piecewiseFunction:null,solidColor:"#ffffff",lutImage:"",presetName:"",presets:p.Z,presetMenu:!1,shift:0,dataRange:[0,0],interpolateScalarsBeforeMapping:!0,colorToSlices:!1,opacityToSlices:!1,originalLUTRanges:{}}),computed:{source(){return this.$proxyManager.getProxyById(this.sourceId)},colorByName(){return Array.isArray(this.colorBy)?this.colorBy[0]:null},colorByLocation(){return Array.isArray(this.colorBy)?this.colorBy[1]:null},hasPresetOpacity(){const e=o.Z.getPresetByName(this.presetName);return Boolean(e&&e.OpacityPoints)},shiftRange(){const e=o.Z.getPresetByName(this.presetName);if(e){let t=1/0,a=-1/0;for(let i=0;iArray.isArray(e.value)?e.value[0]===this.colorByName&&e.value[1]===this.colorByLocation:e.value===this.colorBy))}},watch:{interpolateScalarsBeforeMapping(e){this.updateRepProperty("interpolateScalarsBeforeMapping",e)},colorBy(){if("geometry"===this.available){const e=this.$proxyManager.getRepresentations().filter((e=>e.getInput()===this.source));if(e.forEach((e=>e.setColorBy(this.colorByName,this.colorByLocation))),this.colorByName){const e=this.$proxyManager.getLookupTable(this.colorByName);this.setDataRange(e.getDataRange())}this.interpolateScalarsBeforeMapping=e.reduce(((e,t)=>e||t.getInterpolateScalarsBeforeMapping()),!1),this.$proxyManager.renderAllViews(),this.setPreset()}this.colorByName&&this.updateLookupTableImage()},solidColor(e){const t=n.ZP.hex2float(e);this.updateRepProperty("color",...t)},presetName(){this.renderPreset()},shift(){this.renderPreset()},hasPresetOpacity(e){const t=this.colorByName,a=this.$proxyManager.getPiecewiseFunction(t);e?a.setMode(v.Points):a.setMode(v.Gaussians)},dataRange(){this.applyColorMap()}},proxyManagerHooks:{onProxyRegistrationChange(e){let{proxyGroup:t}=e;"Representations"===t&&this.update()}},mounted(){document.addEventListener("keyup",this.onEsc),this.$nextTick(this.update)},beforeDestroy(){document.removeEventListener("keyup",this.onEsc)},methods:{updateRepProperty(e){const t=`set${s.ZP.capitalize(e)}`,a=this.$proxyManager.getRepresentations().filter((e=>e.getInput()===this.source));for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o{let[t,a]=e;return[(t-i)/n,a]}));t.setPoints(o),i+=this.shift,s+=this.shift,t.setDataRange(i,s)}else t.setDataRange(...this.dataRange)},applyColorMap(){const e=this.colorByName,t=this.$proxyManager.getLookupTable(e);if(t.setPresetName(this.presetName),this.hasPresetOpacity){let[e,a]=this.shiftRange;e+=this.shift,a+=this.shift,t.setDataRange(e,a)}else t.setDataRange(...this.dataRange)},updateLookupTableImage(){const e=this.colorByName,t=this.$proxyManager.getLookupTable(e);this.lutImage=function(e,t,a,i){g.setAttribute("width",i);const s=g.getContext("2d"),n=e.getUint8Table(t,a,i,!0),o=s.getImageData(0,0,i,1);return o.data.set(n),s.putImageData(o,0,0),g.toDataURL("image/jpg")}(t.getLookupTable(),...t.getDataRange(),256),this.piecewiseFunction=this.$proxyManager.getPiecewiseFunction(e)},setPreset(){if(this.colorByName){const e=this.$proxyManager.getLookupTable(this.colorByName);if(this.presetName=e.getPresetName(),this.hasPresetOpacity){const e=this.$proxyManager.getPiecewiseFunction(this.colorByName).getDataRange();this.shift=e[0]-this.shiftRange[0]}}},update(){const e=this.$proxyManager.getRepresentations().filter((e=>e.getInput()===this.source));if(e.length){const t=e.find((e=>"Geometry"===e.getProxyName())),a=e.find((e=>"Volume"===e.getProxyName())),i=e.find((e=>"SliceX"===e.getProxyName()));if(t)this.available="geometry";else{if(!a)return void(this.available="");this.available="volume"}const s=t||a,o=s.getReferenceByName("ui").find((e=>"colorBy"===e.name));o&&(this.arrays=function(e){const t=[];arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&t.push(m);for(let a=0;ae.getInput()===this.source)).find((e=>e.isA("vtkCustomSliceRepresentationProxy")));i&&(i.setUseColorByForColor(this.colorToSlices),i.setUseColorByForOpacity(this.opacityToSlices)),this.$proxyManager.renderAllViews()},setDataRange(e){this.dataRange=[Number(e[0])||0,Number(e[1])||0]},setColorBy(e){this.colorBy=e},saveOriginalRange(e){let{arrayName:t,dataRange:a}=e;this.$set(this.originalLUTRanges,t,a)}}},y=h,f=a(39),b=a(581),x=a(3),w=a.n(x),_=a(582),S=a(601),P=a(613),k=a(637),C=a(608),V=a(610),I=a(611),T=a(638),$=a(640),D=a(652),M=a(653),L=a(634),Z=a(654);e=a.hmd(e);var O={};e.hot,e.hot;var R=(0,b.Z)(y,i,[],!1,(function(e){O.$style=f.Z.locals||f.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return O.$style}})}),null,null);w()(R,{VBtn:_.Z,VCard:S.Z,VCheckbox:P.Z,VContainer:k.Z,VFlex:C.Z,VIcon:V.Z,VLayout:I.Z,VMenu:T.Z,VSelect:$.Z,VSlider:D.Z,VSpacer:M.Z,VTextField:L.Z,VTooltip:Z.Z}),R.options.__file="src/components/controls/ColorBy/index.vue";var B=R.exports},156:function(e,t,a){"use strict";a.d(t,{Z:function(){return y}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.hasFieldData()?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-text",{class:e.$style.blockContent},[a("v-select",{class:e.$style.noSelect,staticStyle:{"margin-bottom":"10px"},attrs:{label:e.name||e.type,items:this.getFieldData().getArrays().map((function(e){return e.getName()})),dense:"",flat:"","hide-details":""},model:{value:e.activeFieldName,callback:function(t){e.activeFieldName=t},expression:"activeFieldName"}}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[e.activeFieldName?a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("Type:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v("\n "+e._s(e.getActiveArray().getDataType())+"\n ")])],1):e._e(),e._v(" "),e.activeFieldName?a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("Min value:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v("\n "+e._s(e.getActiveArray().getRange()[0].toFixed(3))+"\n ")])],1):e._e(),e._v(" "),e.activeFieldName?a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("Max value:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v("\n "+e._s(e.getActiveArray().getRange()[1].toFixed(3))+"\n ")])],1):e._e(),e._v(" "),e.activeFieldName?a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("# of components:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v("\n "+e._s(e.getActiveArray().getNumberOfComponents())+"\n ")])],1):e._e()],1)],1)],1):e._e()};i._withStripped=!0;var s={name:"FieldDataInformation",props:{dataset:{required:!0},name:{type:String},type:{type:String,required:!0}},data:()=>({activeFieldName:null}),mounted(){if(this.hasFieldData()){const e=this.getFieldData().getArrays();this.activeFieldName=e[0].getName()}},methods:{hasFieldData(){return this.dataset[`get${this.type}`]&&this.getFieldData().getArrays().length>0},getFieldData(){return this.dataset[`get${this.type}`]()},getActiveArray(){return this.getFieldData().getArray(this.activeFieldName)}}},n=a(39),o=a(581),r=a(3),l=a.n(r),c=a(601),d=a(607),u=a(637),p=a(608),v=a(611),m=a(640);e=a.hmd(e);var g={};e.hot,e.hot;var h=(0,o.Z)(s,i,[],!1,(function(e){g.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return g.$style}})}),null,null);l()(h,{VCard:c.Z,VCardText:d.ZB,VContainer:u.Z,VFlex:p.Z,VLayout:v.Z,VSelect:m.Z}),h.options.__file="src/components/controls/Information/FieldData/index.vue";var y=h.exports},157:function(e,t,a){"use strict";a.d(t,{Z:function(){return y}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.dataset.isA("vtkImageData")?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle},[a("span",{staticClass:"body-2 font-weight-medium"},[e._v("vtkImageData")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs5:""}},[e._v("Dimensions:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs7:""}},[e._v("\n ("+e._s(e.showVect(e.dataset.getDimensions(),", "))+")\n ")])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs5:""}},[e._v("Origin:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs7:""}},[e._v("\n ("+e._s(e.showVect(e.dataset.getOrigin()))+")\n ")])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs5:""}},[e._v("Spacing:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs7:""}},[e._v("\n ("+e._s(e.showVect(e.dataset.getSpacing()))+")\n ")])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-top":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs5:""}},[e._v("Orientation:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs7:""}},[a("matrix-view",{class:e.$style.matrix,attrs:{matrix:e.dataset.getDirection(),rows:3,columns:3}})],1)],1)],1)],1)],1):e._e()};i._withStripped=!0;var s={name:"ImageDataInformation",props:["dataset"],components:{MatrixView:a(158).Z},methods:{showVect:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:", ";return e.map((e=>e.toFixed(2))).join(t)}}},n=s,o=a(39),r=a(581),l=a(3),c=a.n(l),d=a(601),u=a(607),p=a(637),v=a(608),m=a(611);e=a.hmd(e);var g={};e.hot,e.hot;var h=(0,r.Z)(n,i,[],!1,(function(e){g.$style=o.Z.locals||o.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return g.$style}})}),null,null);c()(h,{VCard:d.Z,VCardText:u.ZB,VCardTitle:u.EB,VContainer:p.Z,VFlex:v.Z,VLayout:m.Z}),h.options.__file="src/components/controls/Information/ImageData/index.vue";var y=h.exports},158:function(e,t,a){"use strict";a.d(t,{Z:function(){return m}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-container",{staticClass:"pa-1"},e._l(e.rows,(function(t){return a("v-layout",{key:t,attrs:{row:"","align-center":""}},e._l(e.columns,(function(i){return a("v-flex",{key:t*e.rows+i},[a("span",{class:e.$style.canSelect},[e._v("\n "+e._s(e.matrix[(t-1)*e.rows+(i-1)].toFixed(2))+"\n ")])])})),1)})),1)};i._withStripped=!0;var s={name:"MatrixViewInformation",props:{rows:{type:Number,required:!0},columns:{type:Number,required:!0},matrix:{required:!0}}},n=a(74),o=a(581),r=a(3),l=a.n(r),c=a(637),d=a(608),u=a(611);e=a.hmd(e);var p={};e.hot,e.hot;var v=(0,o.Z)(s,i,[],!1,(function(e){p.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return p.$style}})}),null,null);l()(v,{VContainer:c.Z,VFlex:d.Z,VLayout:u.Z}),v.options.__file="src/components/controls/Information/MatrixView/index.vue";var m=v.exports},159:function(e,t,a){"use strict";a.d(t,{Z:function(){return v}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.dataset.isA("vtkMolecule")?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle},[a("span",{staticClass:"body-2 font-weight-medium"},[e._v("vtkMolecule")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent})],1):e._e()};i._withStripped=!0;var s={name:"MoleculeInformation",props:["dataset"]},n=a(74),o=a(581),r=a(3),l=a.n(r),c=a(601),d=a(607);e=a.hmd(e);var u={};e.hot,e.hot;var p=(0,o.Z)(s,i,[],!1,(function(e){u.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return u.$style}})}),null,null);l()(p,{VCard:c.Z,VCardText:d.ZB,VCardTitle:d.EB}),p.options.__file="src/components/controls/Information/Molecule/index.vue";var v=p.exports},160:function(e,t,a){"use strict";a.d(t,{Z:function(){return f}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.dataset.isA("vtkPolyData")?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle},[a("span",{staticClass:"body-2 font-weight-medium"},[e._v("vtkPolyData")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("# of points:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v(e._s(e.formatNumbersWithThousandSeparator(e.dataset.getPoints().getNumberOfPoints(),",")))])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs6:""}},[e._v("# of cells:")]),e._v(" "),a("v-flex",{staticClass:"body-2",class:e.$style.canSelect,attrs:{xs6:""}},[e._v(e._s(e.formatNumbersWithThousandSeparator(e.dataset.getNumberOfCells(),",")))])],1)],1)],1)],1):e._e()};i._withStripped=!0;var s=a(9);const{formatNumbersWithThousandSeparator:n}=s.ZP;var o={name:"PolyDataInformation",props:["dataset"],methods:{formatNumbersWithThousandSeparator:n}},r=a(39),l=a(581),c=a(3),d=a.n(c),u=a(601),p=a(607),v=a(637),m=a(608),g=a(611);e=a.hmd(e);var h={};e.hot,e.hot;var y=(0,l.Z)(o,i,[],!1,(function(e){h.$style=r.Z.locals||r.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return h.$style}})}),null,null);d()(y,{VCard:u.Z,VCardText:p.ZB,VCardTitle:p.EB,VContainer:v.Z,VFlex:m.Z,VLayout:g.Z}),y.options.__file="src/components/controls/Information/PolyData/index.vue";var f=y.exports},155:function(e,t,a){"use strict";a.d(t,{Z:function(){return v}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.available?a("div",[a("vtk-image-data",{attrs:{dataset:e.source.getDataset()}}),e._v(" "),a("vtk-molecule",{attrs:{dataset:e.source.getDataset()}}),e._v(" "),a("vtk-poly-data",{attrs:{dataset:e.source.getDataset()}}),e._v(" "),a("vtk-field-data",{attrs:{dataset:e.source.getDataset(),name:"Point Data",type:"PointData"}}),e._v(" "),a("vtk-field-data",{attrs:{dataset:e.source.getDataset(),name:"Cell Data",type:"CellData"}})],1):e._e()};i._withStripped=!0;var s=a(156),n=a(157),o=a(159),r=a(160),l={name:"Information",props:["sourceId"],components:{VtkFieldData:s.Z,VtkImageData:n.Z,VtkMolecule:o.Z,VtkPolyData:r.Z},computed:{source(){return this.$proxyManager.getProxyById(this.sourceId)},available(){if(this.source){const e=this.source.getDataset();if(e&&e.isA)return e.isA("vtkPolyData")||e.isA("vtkImageData")}return!1}}},c=a(74),d=a(581);e=a.hmd(e);var u={};e.hot,e.hot;var p=(0,d.Z)(l,i,[],!1,(function(e){u.$style=c.Z.locals||c.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return u.$style}})}),null,null);p.options.__file="src/components/controls/Information/index.vue";var v=p.exports},161:function(e,t,a){"use strict";a.d(t,{Z:function(){return f}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.domains.atomicRadiusScaleFactor?a("div",[a("v-card",{class:e.$style.block,attrs:{light:"",flat:""}},[a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Tolerance")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.tolerance.min,max:e.domains.tolerance.max,step:e.domains.tolerance.step},model:{value:e.tolerance,callback:function(t){e.tolerance=t},expression:"tolerance"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.tolerance.min,max:e.domains.tolerance.max,step:e.domains.tolerance.step},model:{value:e.tolerance,callback:function(t){e.tolerance=t},expression:"tolerance"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Atomic")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.atomicRadiusScaleFactor.min,max:e.domains.atomicRadiusScaleFactor.max,step:e.domains.atomicRadiusScaleFactor.step},model:{value:e.atomicRadiusScaleFactor,callback:function(t){e.atomicRadiusScaleFactor=t},expression:"atomicRadiusScaleFactor"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.atomicRadiusScaleFactor.min,max:e.domains.atomicRadiusScaleFactor.max,step:e.domains.atomicRadiusScaleFactor.step},model:{value:e.atomicRadiusScaleFactor,callback:function(t){e.atomicRadiusScaleFactor=t},expression:"atomicRadiusScaleFactor"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Bond")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.bondRadius.min,max:e.atomicRadiusScaleFactor,step:e.domains.bondRadius.step},model:{value:e.bondRadius,callback:function(t){e.bondRadius=t},expression:"bondRadius"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.bondRadius.min,max:e.atomicRadiusScaleFactor,step:e.domains.bondRadius.step},model:{value:e.bondRadius,callback:function(t){e.bondRadius=t},expression:"bondRadius"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Hide Elements")])]),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":""},model:{value:e.hideElements,callback:function(t){e.hideElements=t},expression:"hideElements"}})],1)],1)],1)],1)],1)],1):e._e()};i._withStripped=!0;var s=a(103).Z.generateComponent("Molecule",[{name:"tolerance",initialValue:1},{name:"atomicRadiusScaleFactor",initialValue:1},{name:"bondRadius",initialValue:1},{name:"hideElements",initialValue:""}],!1,{onChange:{bondRadius:"updateData",atomicRadiusScaleFactor:"updateData"}}),n=a(39),o=a(581),r=a(3),l=a.n(r),c=a(601),d=a(607),u=a(637),p=a(608),v=a(611),m=a(652),g=a(634);e=a.hmd(e);var h={};e.hot,e.hot;var y=(0,o.Z)(s,i,[],!1,(function(e){h.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return h.$style}})}),null,null);l()(y,{VCard:c.Z,VCardText:d.ZB,VContainer:u.Z,VFlex:p.Z,VLayout:v.Z,VSlider:m.Z,VTextField:g.Z}),y.options.__file="src/components/controls/Molecule/index.vue";var f=y.exports},162:function(e,t,a){"use strict";a.d(t,{Z:function(){return b}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.domains.representation||e.domains.opacity||e.domains.sampleDistance?a("div",[e.domains.representation?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("v-select",{attrs:{dense:"",flat:"",label:"Type",items:e.domains.representation.items},model:{value:e.representation,callback:function(t){e.representation=t},expression:"representation"}})],1)],1)],1)],1):e._e(),e._v(" "),e.domains.opacity&&e.domains.pointSize?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle,attrs:{flat:""}},[a("span",{staticClass:"body-2"},[e._v("Mesh")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Point Size")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.pointSize.min,max:e.domains.pointSize.max,step:e.domains.pointSize.step},model:{value:e.pointSize,callback:function(t){e.pointSize=t},expression:"pointSize"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.pointSize.min,max:e.domains.pointSize.max,step:e.domains.pointSize.step},model:{value:e.pointSize,callback:function(t){e.pointSize=t},expression:"pointSize"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Opacity")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.opacity.min,max:e.domains.opacity.max,step:e.domains.opacity.step},model:{value:e.opacity,callback:function(t){e.opacity=t},expression:"opacity"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.opacity.min,max:e.domains.opacity.max,step:e.domains.opacity.step,value:e.opacity},on:{input:function(t){e.opacity=Number(t)}}})],1)],1)],1)],1)],1):e._e(),e._v(" "),e.domains.sampleDistance&&e.domains.edgeGradient?a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle,attrs:{flat:""}},[a("span",{staticClass:"body-2"},[e._v("Shadow & Edge")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-xs":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Sample Distance")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.sampleDistance.min,max:e.domains.sampleDistance.max,step:e.domains.sampleDistance.step},model:{value:e.sampleDistance,callback:function(t){e.sampleDistance=t},expression:"sampleDistance"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.sampleDistance.min,max:e.domains.sampleDistance.max,step:e.domains.sampleDistance.step},model:{value:e.sampleDistance,callback:function(t){e.sampleDistance=t},expression:"sampleDistance"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Edge Gradient")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.edgeGradient.min,max:e.domains.edgeGradient.max,step:e.domains.edgeGradient.step},model:{value:e.edgeGradient,callback:function(t){e.edgeGradient=t},expression:"edgeGradient"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.edgeGradient.min,max:e.domains.edgeGradient.max,step:e.domains.edgeGradient.step},model:{value:e.edgeGradient,callback:function(t){e.edgeGradient=t},expression:"edgeGradient"}})],1)],1)],1)],1)],1):e._e()],1):e._e()};i._withStripped=!0;var s=a(103).Z.generateComponent("Representation",[{name:"pointSize",initialValue:1},{name:"opacity",initialValue:1},{name:"sampleDistance",initialValue:1},{name:"edgeGradient",initialValue:1},{name:"representation",initialValue:"Surface"}]),n=a(39),o=a(581),r=a(3),l=a.n(r),c=a(601),d=a(607),u=a(637),p=a(608),v=a(611),m=a(640),g=a(652),h=a(634);e=a.hmd(e);var y={};e.hot,e.hot;var f=(0,o.Z)(s,i,[],!1,(function(e){y.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return y.$style}})}),null,null);l()(f,{VCard:c.Z,VCardText:d.ZB,VCardTitle:d.EB,VContainer:u.Z,VFlex:p.Z,VLayout:v.Z,VSelect:m.Z,VSlider:g.Z,VTextField:h.Z}),f.options.__file="src/components/controls/Representation/index.vue";var b=f.exports},163:function(e,t,a){"use strict";a.d(t,{Z:function(){return P}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.domains.windowWidth&&e.domains.windowLevel?a("div",[a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle},[a("span",{staticClass:"body-2"},[e._v("Window/Level")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-sm":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Window")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.windowWidth.min,max:e.domains.windowWidth.max,step:e.domains.windowWidth.step},model:{value:e.windowWidth,callback:function(t){e.windowWidth=e._n(t)},expression:"windowWidth"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.windowWidth.min,max:e.domains.windowWidth.max,step:e.domains.windowWidth.step},model:{value:e.windowWidth,callback:function(t){e.windowWidth=e._n(t)},expression:"windowWidth"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("label",{class:e.$style.smallLabel},[e._v("Level")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.domains.windowLevel.min,max:e.domains.windowLevel.max,step:e.domains.windowLevel.step},model:{value:e.windowLevel,callback:function(t){e.windowLevel=e._n(t)},expression:"windowLevel"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.domains.windowLevel.min,max:e.domains.windowLevel.max,step:e.domains.windowLevel.step},model:{value:e.windowLevel,callback:function(t){e.windowLevel=e._n(t)},expression:"windowLevel"}})],1)],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle,attrs:{flat:""}},[a("span",{staticClass:"body-2"},[e._v("Slices")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-sm":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{class:e.isSliceAvailable("x")||e.isSliceAvailable("default")&&e.xSliceVisibility?"":e.$style.disable,attrs:{xs2:""}},[a("v-btn",{staticClass:"flex-shrink-0",class:e.$style.button,attrs:{fab:"",small:"",outlined:!e.getToggleSliceX(),dark:e.getToggleSliceX(),color:"blue-grey"},on:{click:function(t){return t.stopPropagation(),e.setToggleSliceX()}}},[a("label",{class:e.$style.smallLabel},[e._v("X")])])],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("x")||e.isSliceAvailable("default")&&e.xSliceVisibility?"":e.$style.disable,attrs:{xs7:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.xSliceDomain.min,max:e.xSliceDomain.max,step:e.xSliceDomain.step},model:{value:e.xSlice,callback:function(t){e.xSlice=e._n(t)},expression:"xSlice"}})],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("x")||e.isSliceAvailable("default")&&e.xSliceVisibility?"":e.$style.disable,attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.xSliceDomain.min,max:e.xSliceDomain.max,step:e.xSliceDomain.step},model:{value:e.xSlice,callback:function(t){e.xSlice=e._n(t)},expression:"xSlice"}})],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("y")||e.isSliceAvailable("default")&&e.ySliceVisibility?"":e.$style.disable,attrs:{xs2:""}},[a("div",{staticStyle:{position:"relative"}},[a("v-btn",{class:e.$style.button,attrs:{fab:"",small:"",outlined:!e.getToggleSliceY(),dark:e.getToggleSliceY(),color:"blue-grey"},on:{click:function(t){return t.stopPropagation(),e.setToggleSliceY()}}},[a("label",{class:e.$style.smallLabel},[e._v("Y")])])],1)]),e._v(" "),a("v-flex",{class:e.isSliceAvailable("y")||e.isSliceAvailable("default")&&e.ySliceVisibility?"":e.$style.disable,attrs:{xs7:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.ySliceDomain.min,max:e.ySliceDomain.max,step:e.ySliceDomain.step},model:{value:e.ySlice,callback:function(t){e.ySlice=e._n(t)},expression:"ySlice"}})],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("y")||e.isSliceAvailable("default")&&e.ySliceVisibility?"":e.$style.disable,attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.ySliceDomain.min,max:e.ySliceDomain.max,step:e.ySliceDomain.step},model:{value:e.ySlice,callback:function(t){e.ySlice=e._n(t)},expression:"ySlice"}})],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("z")||e.isSliceAvailable("default")&&e.zSliceVisibility?"":e.$style.disable,attrs:{xs2:""}},[a("div",{staticStyle:{position:"relative"}},[a("v-btn",{class:e.$style.button,attrs:{fab:"",small:"",outlined:!e.getToggleSliceZ(),dark:e.getToggleSliceZ(),color:"blue-grey"},on:{click:function(t){return t.stopPropagation(),e.setToggleSliceZ()}}},[a("label",{class:e.$style.smallLabel},[e._v("Z")])])],1)]),e._v(" "),a("v-flex",{class:e.isSliceAvailable("z")||e.isSliceAvailable("default")&&e.zSliceVisibility?"":e.$style.disable,attrs:{xs7:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:e.zSliceDomain.min,max:e.zSliceDomain.max,step:e.zSliceDomain.step},model:{value:e.zSlice,callback:function(t){e.zSlice=e._n(t)},expression:"zSlice"}})],1),e._v(" "),a("v-flex",{class:e.isSliceAvailable("z")||e.isSliceAvailable("default")&&e.zSliceVisibility?"":e.$style.disable,attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:e.zSliceDomain.min,max:e.zSliceDomain.max,step:e.zSliceDomain.step},model:{value:e.zSlice,callback:function(t){e.zSlice=e._n(t)},expression:"zSlice"}})],1)],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.block,attrs:{flat:""}},[a("v-card-title",{class:e.$style.blockTitle},[a("span",{staticClass:"body-2"},[e._v("Opacity")])]),e._v(" "),a("v-card-text",{class:e.$style.blockContent},[a("v-container",{staticClass:"pa-0",attrs:{fluid:"","grid-list-sm":""}},[a("v-layout",{attrs:{row:"",wrap:"","align-center":""}},[a("v-flex",{attrs:{xs9:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"","always-dirty":"",min:"0",max:"1",step:"0.01"},model:{value:e.opacity,callback:function(t){e.opacity=e._n(t)},expression:"opacity"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:"0",max:"1",step:"0.01"},model:{value:e.opacity,callback:function(t){e.opacity=e._n(t)},expression:"opacity"}})],1)],1)],1)],1)],1)],1):e._e()};i._withStripped=!0;var s=a(103);function n(e){const t=`set${e}`,a=`get${e}`;function i(){let e=null;return s.Z.findProxiesWithMethod(this,a).forEach((t=>{e=t[a]()})),e}return{get:i,set:function(){const e=!i.apply(this);s.Z.findProxiesWithMethod(this,t).forEach((a=>{a[t](e)})),this.$forceUpdate()}}}function o(e){return{set(){},get(){const t={...this.domains[e]};return t&&"min"in t&&"max"in t&&(t.min=Math.floor(t.min),t.max=Math.floor(t.max)),t}}}const r=[{name:"visibility",initialValue:!1},{name:"windowLevel",initialValue:1024},{name:"windowWidth",initialValue:2048},{name:"xSlice",initialValue:-1},{name:"ySlice",initialValue:-1},{name:"zSlice",initialValue:-1},{name:"xSliceVisibility",initialValue:!1},{name:"ySliceVisibility",initialValue:!1},{name:"zSliceVisibility",initialValue:!1},{name:"opacity",initialValue:1},{name:"xSliceDomain",computed:o("xSlice")},{name:"ySliceDomain",computed:o("ySlice")},{name:"zSliceDomain",computed:o("zSlice")},{name:"toggleSliceX",computed:n("XSliceVisibility")},{name:"toggleSliceY",computed:n("YSliceVisibility")},{name:"toggleSliceZ",computed:n("ZSliceVisibility")}];const l=s.Z.generateComponent("SliceControl",r,!0,{});Object.assign(l.methods,{isSliceAvailable:function(e){return!!this.$proxyManager.getViews().filter((e=>e.getContainer())).filter((t=>t.getName()===e)).length}});var c=l,d=a(39),u=a(581),p=a(3),v=a.n(p),m=a(582),g=a(601),h=a(607),y=a(637),f=a(608),b=a(611),x=a(652),w=a(634);e=a.hmd(e);var _={};e.hot,e.hot;var S=(0,u.Z)(c,i,[],!1,(function(e){_.$style=d.Z.locals||d.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return _.$style}})}),null,null);v()(S,{VBtn:m.Z,VCard:g.Z,VCardText:h.ZB,VCardTitle:h.EB,VContainer:y.Z,VFlex:f.Z,VLayout:b.Z,VSlider:x.Z,VTextField:w.Z}),S.options.__file="src/components/controls/SliceControl/index.vue";var P=S.exports},99:function(e,t,a){"use strict";a.d(t,{Z:function(){return y}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",[a("div",{class:e.$style.close},[a("v-btn",{attrs:{text:"",icon:""},on:{click:function(t){return e.$emit("close")}}},[a("v-icon",[e._v("mdi-close")])],1)],1),e._v(" "),a("v-card-title",{staticClass:"text-center"},[a("svg-icon",{class:e.$style.glanceIcon,attrs:{icon:"glance-logo"}})],1),e._v(" "),a("v-card-text",[a("p",{staticClass:"body-1"},[a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://kitware.github.io/glance/"}},[e._v("Glance")]),e._v("\n is an open-source web application developed at\n "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://www.kitware.com/"}},[e._v("Kitware")]),e._v("\n for visualizing volumetric images, molecular structures, geometric\n objects, and point clouds. Also, it can serve as a foundation for building custom web-based\n visualization applications involving\n "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"http://insightsoftwareconsortium.github.io/itk-js/"}},[e._v("ITK.js")]),e._v("\n and\n "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://kitware.github.io/vtk-js/"}},[e._v("VTK.js")]),e._v(".\n ")]),e._v(" "),a("ul",{staticClass:"ml-5"},[a("li",{staticClass:"body-1"},[a("span",[e._v("Here is our")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://kitware.github.io/glance/doc/"}},[e._v("documentation")]),e._v(".\n ")]),e._v(" "),a("li",{staticClass:"body-1"},[a("span",[e._v("Ask questions in our")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://discourse.vtk.org/c/web/volview/13"}},[e._v("community support channel")]),e._v(".\n ")]),e._v(" "),a("li",{staticClass:"body-1"},[a("span",[e._v("Request features and report bugs in our")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://github.com/Kitware/glance/issues"}},[e._v("issue tracker")]),e._v(".\n ")]),e._v(" "),a("li",{staticClass:"body-1"},[a("span",[e._v("We are open source!")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://github.com/Kitware/glance"}},[e._v("Code is on Github")]),e._v(".\n ")]),e._v(" "),a("li",{staticClass:"body-1"},[a("span",[e._v("Current version: "+e._s(e.version))])])]),e._v(" "),a("v-layout",{staticClass:"text-center",attrs:{row:"",wrap:"","align-end":""}},[a("v-flex",{attrs:{xs4:""}},[a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://www.kitware.com"}},[a("svg-icon",{class:e.$style.aboutIcon,attrs:{icon:"kitware"}})],1)]),e._v(" "),a("v-flex",{attrs:{xs4:""}},[a("div",[e._v(" ")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://kitware.github.io/vtk-js/"}},[a("svg-icon",{class:e.$style.aboutIcon,attrs:{icon:"vtkjs"}})],1)]),e._v(" "),a("v-flex",{attrs:{xs4:""}},[a("div",[e._v(" ")]),e._v(" "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"http://insightsoftwareconsortium.github.io/itk-wasm/"}},[a("svg-icon",{class:e.$style.aboutIcon,attrs:{icon:"itkjs"}})],1)])],1),e._v(" "),a("div",{staticClass:"pt-4 d-block text-center grey--text text--darken-2"},[e._v("\n © "+e._s((new Date).getFullYear())+" — Kitware, Inc.\n ")])],1)],1)};i._withStripped=!0;var s={name:"AboutBox",components:{SvgIcon:a(69).Z},data:()=>({version:"not available"}),created(){window.GLANCE_VERSION&&("master"===window.GLANCE_VERSION?this.version="nightly (master)":this.version=window.GLANCE_VERSION)}},n={close:"AboutBox-close-_khm3",aboutIcon:"AboutBox-aboutIcon-npj_s",glanceIcon:"AboutBox-glanceIcon-x8OkE"},o=a(581),r=a(3),l=a.n(r),c=a(582),d=a(601),u=a(607),p=a(608),v=a(610),m=a(611);e=a.hmd(e);var g={};e.hot,e.hot;var h=(0,o.Z)(s,i,[],!1,(function(e){g.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return g.$style}})}),null,null);l()(h,{VBtn:c.Z,VCard:d.Z,VCardText:u.ZB,VCardTitle:u.EB,VFlex:p.Z,VIcon:v.Z,VLayout:m.Z}),h.options.__file="src/components/core/AboutBox/index.vue";var y=h.exports},150:function(e,t,a){"use strict";a.d(t,{Z:function(){return te}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("drag-and-drop",{attrs:{enabled:!e.landingVisible&&!e.fileUploadDialog},on:{drop:e.openFileList},scopedSlots:e._u([{key:"default",fn:function(t){var i,s=t.dragHover;return[a("v-app",[a("v-navigation-drawer",{attrs:{clipped:e.$vuetify.breakpoint.mdAndUp,"mobile-breakpoint":e.$vuetify.breakpoint.thresholds.sm,app:"",fixed:"","disable-resize-watcher":"",touchless:"",width:"300"},model:{value:e.controlsDrawer,callback:function(t){e.controlsDrawer=t},expression:"controlsDrawer"}},[a("controls-drawer")],1),e._v(" "),a("v-app-bar",{attrs:{app:"","clipped-left":""}},[a("v-app-bar-nav-icon",{attrs:{disabled:e.landingVisible},nativeOn:{click:function(t){t.stopPropagation(),e.controlsDrawer=!e.controlsDrawer}}}),e._v(" "),a("v-tooltip",{attrs:{bottom:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("a",e._g({attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleLanding.apply(null,arguments)}}},i),[a("svg-icon",{staticStyle:{"margin-top":"6px"},attrs:{icon:"glance-logo"+(e.smallScreen?"-mark":""),height:"36px"}})],1)]}}],null,!0)},[e._v(" "),e.landingVisible?a("span",{key:"if-landingVisible"},[e._v("Go to app")]):a("span",{key:"if-landingVisible"},[e._v("Back to landing page")])]),e._v(" "),a("v-spacer"),e._v(" "),a("v-toolbar-items",[e.errors.length?a("v-btn",{key:"if-has-errors",attrs:{text:"",color:"error"},on:{click:function(t){e.errorDialog=!0}}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-alert-circle")]),e._v(" "),a("span",[e._v(e._s(e.errors.length))]),e._v("\n  \n "),a("span",{directives:[{name:"show",rawName:"v-show",value:!e.smallScreen,expression:"!smallScreen"}]},[e._v("error(s)")])],1):e._e()],1),e._v(" "),a("collapsible-toolbar",{attrs:{collapse:e.$vuetify.breakpoint.xsOnly,dense:e.smallScreen},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.state;return[a("collapsible-toolbar-item",{attrs:{state:i},on:{click:e.showFileUpload}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-folder")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:"dense"!==i,expression:"state !== 'dense'"}]},[e._v("Open")])],1),e._v(" "),a("collapsible-toolbar-item",{directives:[{name:"show",rawName:"v-show",value:!e.landingVisible,expression:"!landingVisible"}],attrs:{state:i},on:{click:function(t){return e.saveState()}}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-cloud-download")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:"dense"!==i,expression:"state !== 'dense'"}]},[e._v("Save state")])],1),e._v(" "),a("collapsible-toolbar-item",{directives:[{name:"show",rawName:"v-show",value:!e.landingVisible,expression:"!landingVisible"}],attrs:{state:i},on:{click:function(t){e.screenshotsDrawer=!0}}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-image-multiple")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:"dense"!==i,expression:"state !== 'dense'"}]},[e._v("\n Screenshots ("+e._s(e.screenshotCount)+")\n ")])],1),e._v(" "),a("collapsible-toolbar-item",{attrs:{state:i},on:{click:function(t){e.aboutDialog=!0}}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-information")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:"dense"!==i,expression:"state !== 'dense'"}]},[e._v("About")])],1)]}}],null,!0)})],1),e._v(" "),a("v-content",{style:{position:e.landingVisible?"initial":"fixed"},attrs:{id:e.$style.appContent}},[e.landingVisible?a("landing",{key:"if-landing",on:{open:e.showFileUpload,"open-urls":e.autoLoadRemotes,"open-files":e.openFileList}}):a("layout-view",{key:"if-landing"})],1),e._v(" "),a("v-navigation-drawer",{attrs:{stateless:e.screenshotsDrawerStateless,app:"",right:"",temporary:"",touchless:"",width:"300"},model:{value:e.screenshotsDrawer,callback:function(t){e.screenshotsDrawer=t},expression:"screenshotsDrawer"}},[a("screenshots",{on:{"screenshot-count":function(t){e.screenshotCount=t},close:function(t){e.screenshotsDrawer=!1}}})],1),e._v(" "),a("file-loader",{on:{load:e.doneLoadingFiles},model:{value:e.fileUploadDialog,callback:function(t){e.fileUploadDialog=t},expression:"fileUploadDialog"}}),e._v(" "),a("v-dialog",{attrs:{persistent:"",width:"60%"},model:{value:e.autoloadDialog,callback:function(t){e.autoloadDialog=t},expression:"autoloadDialog"}},[a("v-card",{staticClass:"pa-4"},[a("v-card-title",{staticClass:"justify-center text-center title black--text pv-break-word"},[e._v("\n Loading "+e._s(e.autoloadLabel)+" \n "),1===e.fileLoadingProgress?a("span",[e._v("\n (reading...)\n ")]):e.fileLoadingProgress!==1/0?a("span",[e._v("\n ("+e._s(Math.round(100*e.fileLoadingProgress))+"%)\n ")]):e._e()]),e._v(" "),a("v-card-text",[a("v-progress-linear",{attrs:{indeterminate:e.fileLoadingProgress===1/0,value:100*e.fileLoadingProgress}})],1)],1)],1),e._v(" "),a("state-file-generator"),e._v(" "),a("div",{class:(i={},i[e.$style.overlay]=!0,i[e.$style.overlayVisible]=s,i)},[a("div",{class:e.$style.overlayText},[a("div",{staticClass:"display-3"},[e._v("Drop files here")]),e._v(" "),a("v-icon",{attrs:{size:"4.75rem"}},[e._v("mdi-publish")])],1)]),e._v(" "),a("browser-issues"),e._v(" "),a(e.dialogType,{tag:"component",attrs:{"max-width":"50%"},model:{value:e.aboutDialog,callback:function(t){e.aboutDialog=t},expression:"aboutDialog"}},[a("about-box",{on:{close:function(t){e.aboutDialog=!1}}})],1),e._v(" "),a(e.dialogType,{tag:"component",attrs:{"max-width":"50%"},model:{value:e.errorDialog,callback:function(t){e.errorDialog=t},expression:"errorDialog"}},[a("error-box",{attrs:{errors:e.errors},on:{close:function(t){e.errorDialog=!1},clear:function(t){e.errors=[]}}})],1),e._v(" "),a("v-snackbar",{attrs:{value:!!e.globalSingleNotification,bottom:"",left:"",timeout:e.notifyPermanent?0:6e3},on:{input:function(t){e.globalSingleNotification=""},click:function(t){e.globalSingleNotification=""}}},[e._v("\n "+e._s(e.globalSingleNotification)+"\n "),a("v-btn",{attrs:{text:""}},[e._v("close")])],1),e._v(" "),a("div",{attrs:{id:"app-portal-mount"}})],1)]}}])})};i._withStripped=!0;var s=a(612),n=a(141),o=a.n(n),r=a(690),l=a(622),c=a(9),d=a(99),u=a(100),p=a(101),v=a(175),m=a(176),g=a(177),h=a(315),y=a(316),f=a(319),b=a(321),x=a(69),w=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.collapse?a("v-menu",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:""}},i),[a("v-icon",[e._v("mdi-dots-vertical")])],1)]}}],null,!1,2097855828)},[e._v(" "),a("v-list",[e._t("default",null,{state:e.state})],2)],1):a("v-toolbar-items",[e._t("default",null,{state:e.state})],2)};w._withStripped=!0;var _={name:"CollapsibleToolbar",props:{collapse:{type:Boolean,default:!1},dense:{type:Boolean,default(){return this.$vuetify.breakpoint.smAndDown}}},computed:{state(){return this.collapse?"collapse":this.dense?"dense":"expand"}}},S=a(581),P=a(3),k=a.n(P),C=a(582),V=a(610),I=a(647),T=a(638),$=a(687),D=(0,S.Z)(_,w,[],!1,null,null,null);k()(D,{VBtn:C.Z,VIcon:V.Z,VList:I.Z,VMenu:T.Z,VToolbarItems:$.lj}),D.options.__file="src/components/widgets/CollapsibleToolbar/index.vue";var M=D.exports,L=function(){var e=this,t=e.$createElement,a=e._self._c||t;return"collapse"===e.state?a("v-list-item",e._g({attrs:{link:""}},e.$listeners),[e._t("default")],2):a("v-btn",e._g({attrs:{text:""}},e.$listeners),[e._t("default")],2)};L._withStripped=!0;var Z={name:"CollapsibleToolbarItem",props:{state:{type:String,default:"expand"}}},O=a(641),R=(0,S.Z)(Z,L,[],!1,null,null,null);k()(R,{VBtn:C.Z,VListItem:O.Z}),R.options.__file="src/components/widgets/CollapsibleToolbar/Item/index.vue";var B=R.exports,A=[{key:"ctrl+o",action:"files/promptForFiles"},{key:"ctrl+g",action:"takeScreenshot"},{key:"r",action:"resetActiveCamera"},{key:".",action:"increaseSlice"},{key:",",action:"decreaseSlice"},{key:"b",action:"previousViewPoint"},{key:"n",action:"nextViewPoint"}],F={name:"App",components:{AboutBox:d.Z,BrowserIssues:u.Z,CollapsibleToolbar:M,CollapsibleToolbarItem:B,ControlsDrawer:p.Z,DragAndDrop:v.Z,ErrorBox:m.Z,FileLoader:g.Z,Landing:h.Z,LayoutView:y.Z,Screenshots:f.Z,StateFileGenerator:b.Z,SvgIcon:x.Z,VBottomSheet:r.Z,VDialog:l.Z},provide(){return{$notify:this.notify}},data:()=>({aboutDialog:!1,errorDialog:!1,fileUploadDialog:!1,autoloadDialog:!1,autoloadLabel:"",internalControlsDrawer:!0,screenshotsDrawer:!1,screenshotCount:0,errors:[],globalSingleNotification:"",notifyPermanent:!1}),computed:{controlsDrawer:{get(){return!this.landingVisible&&this.internalControlsDrawer},set(e){this.landingVisible||(this.internalControlsDrawer=e)}},...(0,s.rn)({loadingState:"loadingState",landingVisible:e=>"landing"===e.route,screenshotsDrawerStateless(e){return this.screenshotsDrawer&&!!e.screenshotDialog},smallScreen(){return this.$vuetify.breakpoint.smAndDown},dialogType(){return this.smallScreen?"v-bottom-sheet":"v-dialog"}}),...(0,s.Se)("files",{anyFileLoadingErrors:"anyErrors",fileLoadingProgress:"totalProgress"})},proxyManagerHooks:{onProxyModified(){this.loadingState||this.$proxyManager.autoAnimateViews()}},created(){this.internalControlsDrawer=!this.smallScreen},mounted(){var e=this;this.$root.$on("open_girder_panel",(()=>{this.fileUploadDialog=!0})),this.initViews(),this.initializeAnimations(),A.forEach((e=>{let{key:t,action:a}=e;return o().bind(t,(e=>{e.preventDefault(),this.$store.dispatch(a)}))})),window.addEventListener("error",this.recordError),c.ZP.setLoggerFunction("error",(function(){for(var t=arguments.length,a=new Array(t),i=0;i{let{key:t}=e;return o().unbind(t)}))},methods:{...(0,s.OI)({showApp:"showApp",showLanding:"showLanding",toggleLanding(){this.landingVisible?this.showApp():this.showLanding()}}),...(0,s.nv)({saveState:"saveState",initViews:"views/initViews"}),...(0,s.nv)("files",["openFiles","openRemoteFiles","load","resetQueue"]),...(0,s.nv)("animations",["initializeAnimations"]),showFileUpload(){this.fileUploadDialog=!0},openFileList(e){this.fileUploadDialog=!0,this.$nextTick((()=>this.openFiles(Array.from(e))))},autoLoadRemotes(e,t,a){const i=t.map(((e,t)=>({name:a[t],url:e})));this.autoloadDialog=!0,this.autoloadLabel=e,setTimeout((()=>this.openRemoteFiles(i).then((()=>this.load())).then((()=>{this.anyFileLoadingErrors?this.$nextTick((()=>{this.fileUploadDialog=!0})):this.doneLoadingFiles()})).finally((()=>{this.resetQueue(),this.autoloadDialog=!1}))),10)},doneLoadingFiles(){this.showApp()},recordError(e){this.errors.push(e)},notify(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.globalSingleNotification&&(this.globalSingleNotification="",this.permanent=!1),this.$nextTick((()=>{this.globalSingleNotification=e,this.notifyPermanent=t}))}}},N=F,E={appContent:"App-appContent-GhXJH",overlay:"App-overlay-B_drw",overlayVisible:"App-overlayVisible-XKImt",overlayText:"App-overlayText-WTZRN",noTransition:"App-noTransition-IOu4K"},j=a(691),G=a(692),z=a(693),U=a(601),W=a(607),H=a(694),K=a(695),q=a(603),Y=a(666),X=a(653),J=a(654);e=a.hmd(e);var Q={};e.hot,e.hot;var ee=(0,S.Z)(N,i,[],!1,(function(e){Q.$style=E.locals||E,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return Q.$style}})}),null,null);k()(ee,{VApp:j.Z,VAppBar:G.Z,VAppBarNavIcon:z.Z,VBtn:C.Z,VCard:U.Z,VCardText:W.ZB,VCardTitle:W.EB,VContent:H.Z,VDialog:l.Z,VIcon:V.Z,VNavigationDrawer:K.Z,VProgressLinear:q.Z,VSnackbar:Y.Z,VSpacer:X.Z,VToolbarItems:$.lj,VTooltip:J.Z}),ee.options.__file="src/components/core/App/index.vue";var te=ee.exports},100:function(e,t,a){"use strict";a.d(t,{Z:function(){return y}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-dialog",{attrs:{width:"90%","max-width":"900px"},model:{value:e.dialog,callback:function(t){e.dialog=t},expression:"dialog"}},[a("v-card",[a("v-card-title",{staticClass:"title"},[e._v("Welcome to ParaView Glance!")]),e._v(" "),a("v-card-text",{staticClass:"body-2"},[a("p",[e._v("\n You may experience slower rendering speeds because of the following\n reason(s):\n ")]),e._v(" "),a("ul",{staticClass:"pl-10"},[e.issues.webglVersion?a("li",[e._v("\n Detected WebGL version "+e._s(e.issues.webglVersion)+". For best performance,\n please use a computer and/or browser with at least WebGL 2.\n ")]):e._e(),e._v(" "),e.issues.integratedGPU?a("li",[e._v('\n Using GPU "'+e._s(e.issues.integratedGPU)+'". A dedicated GPU would\n offer better performance.\n '),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://wevideo.zendesk.com/hc/en-us/articles/225259448-How-to-enable-WebGL"}},[e._v("\n More info on enabling dedicated GPUs in browsers.\n ")])]):e._e()])]),e._v(" "),a("v-card-actions",{staticClass:"d-flex justify-space-between align-center pa-5"},[a("v-checkbox",{staticClass:"mt-0 pt-0",attrs:{label:"Don't show again","hide-details":"",value:e.suppressBrowserWarning},on:{input:e.setSuppressBrowserWarning}}),e._v(" "),a("v-btn",{attrs:{color:"primary"},on:{click:function(t){e.dialog=!1}}},[e._v("\n Okay\n ")])],1)],1)],1)};i._withStripped=!0;var s=a(612);var n={name:"BrowserIssues",data:()=>({issues:{},dialog:!1}),computed:(0,s.rn)(["suppressBrowserWarning"]),mounted(){this.getBrowserIssues()},methods:{getBrowserIssues:function(){const e=this.$proxyManager.getViews()[0];if(e){const t=e.getOpenGLRenderWindow().getGLInformations(),{UNMASKED_RENDERER:a,UNMASKED_VENDOR:i,WEBGL_VERSION:s}=t;s.value<2&&this.$set(this.issues,"webglVersion",s.value);-1!==`${i.value} / ${a.value}`.toLowerCase().indexOf("intel")&&this.$set(this.issues,"integratedGPU",a.value)}Object.keys(this.issues).length&&!this.suppressBrowserWarning&&(this.dialog=!0)},...(0,s.nv)({setSuppressBrowserWarning:"suppressBrowserWarning"})}},o={},r=a(581),l=a(3),c=a.n(l),d=a(582),u=a(601),p=a(607),v=a(613),m=a(622);e=a.hmd(e);var g={};e.hot,e.hot;var h=(0,r.Z)(n,i,[],!1,(function(e){g.$style=o.locals||o,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return g.$style}})}),null,null);c()(h,{VBtn:d.Z,VCard:u.Z,VCardActions:p.h7,VCardText:p.ZB,VCardTitle:p.EB,VCheckbox:v.Z,VDialog:m.Z}),h.options.__file="src/components/core/BrowserIssues/index.vue";var y=h.exports},101:function(e,t,a){"use strict";a.d(t,{Z:function(){return f}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-tabs",{class:e.$style.tabsContainer,attrs:{centered:"",grow:""},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[a("v-tab",[e._v("Datasets")]),e._v(" "),a("v-tab",[e._v("Tools")]),e._v(" "),a("v-tab",[e._v("Global")]),e._v(" "),a("v-tabs-items",{class:e.$style.tabItems,attrs:{touchless:""},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[a("v-tab-item",{class:e.$style.tabItem},[a("datasets")],1),e._v(" "),a("v-tab-item",{class:e.$style.tabItem,attrs:{eager:""}},[a("edit-tools")],1),e._v(" "),a("v-tab-item",{class:e.$style.tabItem},[a("global-settings")],1)],1)],1)};i._withStripped=!0;var s=a(73),n=a(165),o=a(171),r={name:"ControlsDrawer",components:{Datasets:s.Z,EditTools:n.Z,GlobalSettings:o.Z},data:()=>({activeTab:0})},l={tabsContainer:"ControlsDrawer-tabsContainer-D9UMb",tabItems:"ControlsDrawer-tabItems-O9Lf9",tabItem:"ControlsDrawer-tabItem-voKeM",tabComponent:"ControlsDrawer-tabComponent-K9eUY"},c=a(581),d=a(3),u=a.n(d),p=a(670),v=a(671),m=a(672),g=a(675);e=a.hmd(e);var h={};e.hot,e.hot;var y=(0,c.Z)(r,i,[],!1,(function(e){h.$style=l.locals||l,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return h.$style}})}),null,null);u()(y,{VTab:p.Z,VTabItem:v.Z,VTabs:m.Z,VTabsItems:g.Z}),y.options.__file="src/components/core/ControlsDrawer/index.vue";var f=y.exports},73:function(e,t,a){"use strict";a.d(t,{Z:function(){return D}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-expansion-panels",{attrs:{multiple:"",accordion:""},model:{value:e.panelState,callback:function(t){e.panelState=t},expression:"panelState"}},e._l(e.datasets,(function(t,i){return a("v-expansion-panel",{key:t,class:e.$style.datasetPanel},[a("v-expansion-panel-header",{staticClass:"pv-no-select pl-3 pr-3 pt-1 pb-1",class:e.$style.panelHeader},[a("v-btn",{staticClass:"flex-shrink-0",attrs:{icon:"",small:""},on:{click:function(a){return a.stopPropagation(),e.toggleDatasetVisibility(t)}}},[a("v-icon",[e._v("\n "+e._s(e.getDatasetVisibility(t)?"mdi-eye":"mdi-eye-off")+"\n ")])],1),e._v(" "),a("div",{staticClass:"subtitle-2 text-truncate pl-2 pr-2",attrs:{title:e.getSourceName(t)}},[e._v("\n "+e._s(e.getSourceName(t))+"\n ")]),e._v(" "),a("v-spacer"),e._v(" "),e.datasets.length>1?a("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var s=i.on;return[a("v-btn",e._g({class:e.$style.headerMenuButton,attrs:{icon:"",small:""},on:{click:function(a){return a.stopPropagation(),e.activateSource(t)}}},s),[a("v-icon",[e._v("\n "+e._s(e.activeSourceId===t?"mdi-bookmark-check":"mdi-bookmark-outline")+"\n ")])],1)]}}],null,!0)},[a("span",{staticClass:"pv-no-select"},[e._v("Activate source")])]):e._e(),e._v(" "),a("div",{on:{click:function(e){e.stopPropagation()}}},[a("v-menu",{attrs:{"offset-x":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.headerMenuButton,attrs:{icon:"",small:""}},i),[a("v-icon",[e._v("mdi-dots-vertical")])],1)]}}],null,!0)},[e._v(" "),a("v-list",{attrs:{dense:""}},[a("v-list-item",{on:{click:function(a){return e.deleteDataset(t)}}},[a("v-list-item-title",[e._v("Delete")])],1),e._v(" "),a("v-list-item",{on:{click:function(a){return e.uploadDataset(t)}}},[a("v-list-item-title",[e._v("Upload To Girder")])],1)],1)],1)],1)],1),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent,attrs:{eager:""}},[a("color-group",{attrs:{index:i,visible:e.datasets.length>1}}),e._v(" "),a("v-expansion-panels",{attrs:{multiple:"",accordion:""},model:{value:e.subpanels[t],callback:function(a){e.$set(e.subpanels,t,a)},expression:"subpanels[sourceId]"}},e._l(e.panels,(function(i,s){return i.visible(e.$proxyManager.getProxyById(t))?a("v-expansion-panel",{key:s,class:e.$style.subpanel},[a("v-expansion-panel-header",{staticClass:"pv-no-select",class:e.$style.subpanelHeader},[a("v-icon",{staticClass:"flex-grow-0",attrs:{left:""}},[e._v(e._s(i.icon))]),e._v(" "),a("span",{staticClass:"body-2 font-weight-medium flex-grow-0"},[e._v("\n "+e._s(i.name)+"\n ")])],1),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent,attrs:{eager:""}},[a(i.component,{tag:"component",attrs:{sourceId:t}})],1)],1):e._e()})),1)],1)],1)})),1)};i._withStripped=!0;var s=a(612),n=a(151),o=a(155),r=a(161),l=a(162),c=a(163),d=[{component:l.Z,defaultExpand:!0,icon:"mdi-brightness-6",name:"Representation",visible:e=>e.getDataset().isA("vtkPolyData")||e.getDataset().isA("vtkImageData")},{component:n.Z,defaultExpand:!0,icon:"mdi-invert-colors",name:"Colors",visible:e=>e.getDataset().isA("vtkPolyData")||e.getDataset().isA("vtkImageData")},{component:c.Z,defaultExpand:!0,icon:"mdi-tune",name:"Slice",visible:e=>e.getDataset().isA("vtkImageData")},{component:r.Z,defaultExpand:!0,icon:"mdi-molecule",name:"Molecule",visible:e=>e.getDataset().isA("vtkMolecule")},{component:o.Z,defaultExpand:!1,icon:"mdi-help-circle-outline",name:"Information",visible:e=>e.getDataset().isA("vtkPolyData")||e.getDataset().isA("vtkImageData")}],u={name:"Datasets",components:{ColorGroup:a(164).Z},data:()=>({datasets:[],internalPanelState:{},subpanels:{},activeSourceId:-1}),computed:{...(0,s.rn)({collapseDatasetPanels:"collapseDatasetPanels",panels:e=>{const t=Object.keys(e.panels).map((e=>Number(e)));return t.sort(((e,t)=>e-t)),[].concat(...t.map((t=>e.panels[t])))}}),...(0,s.rn)("widgets",["imageToLabelmaps"]),panelState:{get(){const e=[];for(let t=0;t-1}}},smallScreen(){return this.$vuetify.breakpoint.smAndDown}},created(){d.forEach(((e,t)=>this.addPanel(e,t+10)))},mounted(){this.updateDatasetList()},proxyManagerHooks:{onProxyModified(){this.updateDatasetList()},onProxyCreated(e){let{proxyGroup:t,proxyName:a}=e;"Sources"===t&&"TrivialProducer"===a&&this.updateDatasetList()},onProxyDeleted(e){let{proxyId:t,proxyGroup:a,proxyName:i}=e;if("Sources"===a&&"TrivialProducer"===i){this.datasets.indexOf(t)>-1&&(this.$delete(this.internalPanelState,t),this.$delete(this.subpanels,t),this.updateDatasetList())}},onActiveSourceChange(e){this.activeSourceId=e?e.getProxyId():-1}},methods:{updateDatasetList(){const e=this.$proxyManager.getSources().filter((e=>"Sources"===e.getProxyGroup()&&"TrivialProducer"===e.getProxyName())).filter((e=>Boolean(e.getDataset())));for(let t=0;te.visible(a))).map(((e,t)=>e.defaultExpand?t:-1)).filter((e=>e>-1)))}this.datasets=e.map((e=>e.getProxyId())),this.$store.dispatch("views/updateMasterSourceId",this.datasets)},getSourceName(e){const t=this.$proxyManager.getProxyById(e);return t?t.getName():null},activateSource(e){const t=this.$proxyManager.getProxyById(e);return t&&t.activate(),null},deleteDataset(e){const t=this.$proxyManager.getProxyById(e);t&&this.$proxyManager.deleteProxy(t)},uploadDataset(e){this.$proxyManager.getProxyById(e)&&(this.$root.$emit("open_girder_panel"),setTimeout((()=>{this.$root.$emit("girder_upload_proxy",e)}),10))},getDatasetVisibility(e){const t=this.$proxyManager.getRepresentations().find((t=>t.getInput().getProxyId()===e));return!!t&&t.isVisible()},toggleDatasetVisibility(e){const t=!this.getDatasetVisibility(e),a=this.imageToLabelmaps[e]||[];this.$proxyManager.getRepresentations().filter((t=>{const i=t.getInput().getProxyId();return i===e||a.indexOf(i)>-1})).forEach((e=>e.setVisibility(t))),this.$forceUpdate()},addPanel(e,t){this.$store.commit("addPanel",{component:e,priority:t})}}},p=u,v=a(74),m=a(581),g=a(3),h=a.n(g),y=a(582),f=a(655),b=a(656),x=a(657),w=a(658),_=a(610),S=a(647),P=a(641),k=a(646),C=a(638),V=a(653),I=a(654);e=a.hmd(e);var T={};e.hot,e.hot;var $=(0,m.Z)(p,i,[],!1,(function(e){T.$style=v.Z.locals||v.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return T.$style}})}),null,null);h()($,{VBtn:y.Z,VExpansionPanel:f.Z,VExpansionPanelContent:b.Z,VExpansionPanelHeader:x.Z,VExpansionPanels:w.Z,VIcon:_.Z,VList:S.Z,VListItem:P.Z,VListItemTitle:k.V9,VMenu:C.Z,VSpacer:V.Z,VTooltip:I.Z}),$.options.__file="src/components/core/Datasets/index.vue";var D=$.exports},165:function(e,t,a){"use strict";a.d(t,{Z:function(){return b}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-expansion-panels",{attrs:{accordion:""}},[a("v-expansion-panel",[a("v-expansion-panel-header",{staticClass:"subtitle-2"},[e._v("\n Measurements\n ")]),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent,attrs:{eager:""}},[a("measurement-tools",{attrs:{enabled:"measurement"===e.enabledTool},on:{enable:function(t){return e.setEnabledTool("measurement",t)}}})],1)],1),e._v(" "),a("v-expansion-panel",[a("v-expansion-panel-header",{staticClass:"subtitle-2"},[e._v("\n Painting\n ")]),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent},[a("paint-tool",{attrs:{enabled:"paint"===e.enabledTool},on:{enable:function(t){return e.setEnabledTool("paint",t)}}})],1)],1),e._v(" "),a("v-expansion-panel",[a("v-expansion-panel-header",{staticClass:"subtitle-2"},[e._v("\n Cropping\n ")]),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent},[a("crop-tool",{attrs:{enabled:"crop"===e.enabledTool},on:{enable:function(t){return e.setEnabledTool("crop",t)}}})],1)],1),e._v(" "),a("v-expansion-panel",[a("v-expansion-panel-header",{staticClass:"subtitle-2"},[e._v("\n Median Filter\n ")]),e._v(" "),a("v-expansion-panel-content",{class:e.$style.panelContent},[a("median-filter")],1)],1)],1)};i._withStripped=!0;var s=a(166),n=a(104),o=a(167),r=a(168),l={name:"EditTools",components:{PaintTool:s.Z,MeasurementTools:n.Z,CropTool:o.Z,MedianFilter:r.Z},data:()=>({enabledTool:""}),methods:{setEnabledTool(e,t){this.enabledTool=t?e:""}}},c={panelContent:"EditTools-panelContent-wgcJ9"},d=a(581),u=a(3),p=a.n(u),v=a(655),m=a(656),g=a(657),h=a(658);e=a.hmd(e);var y={};e.hot,e.hot;var f=(0,d.Z)(l,i,[],!1,(function(e){y.$style=c.locals||c,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return y.$style}})}),null,null);p()(f,{VExpansionPanel:v.Z,VExpansionPanelContent:m.Z,VExpansionPanelHeader:g.Z,VExpansionPanels:h.Z}),f.options.__file="src/components/core/EditTools/index.vue";var b=f.exports},176:function(e,t,a){"use strict";a.d(t,{Z:function(){return g}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",[a("v-card-title",{staticClass:"title"},[e._v("Application errors")]),e._v(" "),a("v-card-text",[a("p",[e._v("\n The following is debug output for errors that have occurred. Please\n copy and paste the below text and post it to our\n "),a("a",{attrs:{rel:"noopener noreferrer",target:"_blank",href:"https://github.com/Kitware/Glance/issues"}},[e._v("issue tracker")]),e._v(".\n ")]),e._v(" "),a("textarea",{ref:"errorTextarea",class:e.$style.errorTextarea,attrs:{readonly:""}},[e._v(e._s(e.readableErrors))])]),e._v(" "),a("v-card-actions",[a("v-btn",{attrs:{color:"secondary"},on:{click:function(t){return e.$emit("clear")}}},[e._v("\n Clear Errors\n ")]),e._v(" "),a("v-spacer"),e._v(" "),a("v-btn",{on:{click:function(t){return e.$emit("close")}}},[e._v("Cancel")]),e._v(" "),e.isClipboardEnabled()?a("v-btn",{key:"if-clipboard-enabled",attrs:{color:"info",loading:e.copiedToClipboard},on:{click:e.copyErrorToClipboard}},[a("span",[e._v("Copy to clipboard")]),e._v(" "),a("span",{attrs:{slot:"loader"},slot:"loader"},[e._v("Copied!")])]):e._e()],1)],1)};i._withStripped=!0;var s={name:"ErrorBox",props:{errors:{type:Array,default:[]}},data:()=>({copiedToClipboard:!1}),computed:{readableErrors(){const e=window.GLANCE_VERSION||"not available",t=this.errors.map((e=>e instanceof ErrorEvent?e.message:e)).join("\n");return`ParaViewGlance: ${e}\n${navigator.userAgent}\n\n\`\`\`\n${t}\n\`\`\``}},methods:{isClipboardEnabled:function(){try{return document.queryCommandSupported("copy")}catch(e){return!1}},copyErrorToClipboard:function(){this.$refs.errorTextarea.select(),document.execCommand("copy")&&(this.copiedToClipboard=!0,window.setTimeout((()=>{this.copiedToClipboard=!1}),2e3))}}},n={errorTextarea:"ErrorBox-errorTextarea-_ViHl"},o=a(581),r=a(3),l=a.n(r),c=a(582),d=a(601),u=a(607),p=a(653);e=a.hmd(e);var v={};e.hot,e.hot;var m=(0,o.Z)(s,i,[],!1,(function(e){v.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return v.$style}})}),null,null);l()(m,{VBtn:c.Z,VCard:d.Z,VCardActions:u.h7,VCardText:u.ZB,VCardTitle:u.EB,VSpacer:p.Z}),m.options.__file="src/components/core/ErrorBox/index.vue";var g=m.exports},177:function(e,t,a){"use strict";a.d(t,{Z:function(){return M}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-dialog",{attrs:{width:"70%",value:e.value,persistent:e.loading,fullscreen:e.$vuetify.breakpoint.smAndDown},on:{input:e.onDialogChange,"click:outside":function(t){!e.loading&&e.close()}}},[a("v-card",[a("v-card-text",{staticClass:"pa-0"},[a("v-card",{attrs:{flat:""}},[a("v-card-text",[a("v-container",[a("v-tabs",{model:{value:e.active_tab,callback:function(t){e.active_tab=t},expression:"active_tab"}},[a("v-tab",[e._v("Local")]),e._v(" "),e.girderRest?a("v-tab",[e._v("Girder")]):e._e(),e._v(" "),a("v-tab-item",{attrs:{transition:"fade-transition"}},[a("drag-and-drop",{attrs:{enabled:""},on:{drop:function(t){return e.openFiles(t)}},scopedSlots:e._u([{key:"default",fn:function(t){var i,s=t.dragHover;return[a("v-row",{staticClass:"pa-3",class:(i={},i[e.$style.dragBox]=!0,i[e.$style.dropTarget]=s,i),attrs:{align:"center"},on:{click:e.promptLocal}},[a("v-btn",[e._v("browse")]),e._v(" "),a("span",{staticClass:"ml-2"},[e._v("\n or drop your files here\n ")])],1)]}}])})],1),e._v(" "),e.girderRest?a("v-tab-item",{attrs:{transition:"fade-transition"}},[a("girder-box")],1):e._e()],1),e._v(" "),a("v-row",{staticClass:"mt-2"},[a("v-expansion-panels",{attrs:{accordion:""}},e._l(e.fileList,(function(t,i){return a("v-expansion-panel",{key:i},[a("v-expansion-panel-header",{attrs:{"disable-icon-rotate":""},scopedSlots:e._u([{key:"actions",fn:function(){return[a("div",{staticClass:"d-flex flex-row align-center"},["ready"===t.state?[a("v-icon",{attrs:{color:"teal"}},[e._v("mdi-check")])]:"error"===t.state?[a("v-icon",{attrs:{color:"error"}},[e._v("mdi-alert")])]:"needsInfo"===t.state?[a("v-icon",{attrs:{color:"blue"}},[e._v("mdi-information")])]:"loading"===t.state||"needsDownload"===t.state?[a("v-progress-circular",{attrs:{indeterminate:"",color:"secondary",size:"16",width:"2"}})]:e._e(),e._v(" "),a("v-btn",{staticClass:"ml-3",attrs:{icon:""}},[a("v-icon",{on:{click:function(t){return t.stopPropagation(),e.deleteFileAtRevIndex(i)}}},[e._v("mdi-delete")])],1)],2)]},proxy:!0},{key:"default",fn:function(i){i.open;return[a("v-row",{staticStyle:{width:"80%"},attrs:{"no-gutters":""}},[a("v-col",{attrs:{cols:"8"}},[e._v(e._s(t.name))]),e._v(" "),a("v-col",{staticClass:"text--secondary pr-3 text-right",attrs:{cols:"4"}},["error"===t.state?a("span",[e._v("\n Click to see error\n ")]):"raw"===t.ext?a("span",[e._v("\n Click to edit raw file info\n ")]):"glance"===t.ext?a("span",[e._v("\n State file will be loaded first\n ")]):e._e()])],1)]}}],null,!0)}),e._v(" "),a("v-expansion-panel-content",["error"===t.state?[e._v("\n "+e._s(t.error)+"\n ")]:"raw"===t.ext?[a("raw-file-reader",{attrs:{file:t.files[0]},on:{change:function(t){return e.setRawFileInfoAtRevIndex(i,t)}}})]:e._e()],2)],1)})),1)],1)],1)],1),e._v(" "),a("v-card-actions",[a("v-spacer"),e._v(" "),e.anyErrors?a("span",{staticClass:"red--text mr-3"},[e._v("Only checked files will be loaded.")]):e._e(),e._v(" "),a("v-btn",{attrs:{text:"",disabled:e.loading},on:{click:e.close}},[e._v("\n Cancel\n ")]),e._v(" "),a("v-btn",{attrs:{color:"primary",disabled:e.loading||e.pendingFiles||!e.hasReadyFiles},on:{click:e.loadFiles}},[e._v("\n "+e._s(e.loading?"Loading...":"Load")+"\n ")])],1)],1)],1)],1)],1)};i._withStripped=!0;var s=a(612),n=a(178),o=a(175),r=a(179),l={name:"FileLoader",components:{RawFileReader:n.Z,DragAndDrop:o.Z,GirderBox:r.Z},inject:["girderRest"],props:{value:{type:Boolean,default:!1}},data:()=>({loading:!1,active_tab:0}),mounted(){this.$root.$on("open_girder_panel",(()=>{this.active_tab=1}))},computed:{...(0,s.rn)("files",{fileList:e=>Array.from(e.fileList).reverse(),pendingFiles:e=>e.fileList.reduce(((e,t)=>e||"ready"!==t.state&&"error"!==t.state),!1),hasReadyFiles:e=>e.fileList.reduce(((e,t)=>e||"ready"===t.state),!1)}),...(0,s.Se)("files",["anyErrors"])},methods:{...(0,s.nv)("files",["openFiles","promptLocal","deleteFile","setRawFileInfo","load","resetQueue"]),loadFiles(){this.loading=!0,this.load().finally((()=>{this.close(),this.$emit("load"),setTimeout((()=>{this.loading=!1}),10)}))},deleteFileAtRevIndex(e){return this.deleteFile(this.fileList.length-1-e)},setRawFileInfoAtRevIndex(e,t){return this.setRawFileInfo({index:this.fileList.length-1-e,info:t})},onDialogChange(e){e?this.$emit("input",!0):this.close()},close(){this.$emit("input",!1),setTimeout((()=>this.resetQueue()),10)}}},c={dragBox:"FileLoader-dragBox-wtic9",dropTarget:"FileLoader-dropTarget-KZYE7"},d=a(581),u=a(3),p=a.n(u),v=a(582),m=a(601),g=a(607),h=a(683),y=a(637),f=a(622),b=a(655),x=a(656),w=a(657),_=a(658),S=a(610),P=a(599),k=a(680),C=a(653),V=a(670),I=a(671),T=a(672);e=a.hmd(e);var $={};e.hot,e.hot;var D=(0,d.Z)(l,i,[],!1,(function(e){$.$style=c.locals||c,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return $.$style}})}),null,null);p()(D,{VBtn:v.Z,VCard:m.Z,VCardActions:g.h7,VCardText:g.ZB,VCol:h.Z,VContainer:y.Z,VDialog:f.Z,VExpansionPanel:b.Z,VExpansionPanelContent:x.Z,VExpansionPanelHeader:w.Z,VExpansionPanels:_.Z,VIcon:S.Z,VProgressCircular:P.Z,VRow:k.Z,VSpacer:C.Z,VTab:V.Z,VTabItem:I.Z,VTabs:T.Z}),D.options.__file="src/components/core/FileLoader/index.vue";var M=D.exports},179:function(e,t,a){"use strict";a.d(t,{Z:function(){return Z}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-container",[a("v-row",{attrs:{"no-gutters":"",align:"center"}},[a("v-col",[a("v-text-field",{attrs:{label:"Girder URL","single-line":"",outlined:"","hide-details":""},model:{value:e.newGirderURL,callback:function(t){e.newGirderURL=t},expression:"newGirderURL"}})],1),e._v(" "),a("v-btn",{staticClass:"ml-2",attrs:{disabled:e.noURLChange,text:""},on:{click:function(t){e.changeURLPrompt=!0}}},[e._v("\n Update\n ")]),e._v(" "),e.loggedOut?e._e():a("v-btn",{staticClass:"ml-2",attrs:{tile:"",color:"secondary"},on:{click:e.logout}},[e._v("\n Log out\n ")])],1),e._v(" "),a("v-row",[e.loggedOut?a("v-col",[a("GirderAuthentication",{key:e.girderRest.token,attrs:{register:"",oauth:!0}}),e._v(" "),a("div",{staticClass:"mt-2"},[a("v-icon",[e._v("mdi-information")]),e._v(" "),a("span",[e._v("Logging in will refresh and lose any unsaved data.")])],1)],1):e._e(),e._v(" "),a("v-col",[a("GirderFileManager",{ref:"girderFileManager",attrs:{"root-location-disabled":!1,selectable:!0,location:e.location},on:{"update:location":function(t){e.location=t}},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}}),e._v(" "),a("v-toolbar",[a("v-spacer"),e._v(" "),a("v-btn",{staticClass:"mt-4",attrs:{disabled:!e.selected.length},on:{click:function(t){return e.load()}}},[e._v("\n Select\n ")])],1)],1)],1),e._v(" "),a("v-dialog",{attrs:{width:"30%"},model:{value:e.changeURLPrompt,callback:function(t){e.changeURLPrompt=t},expression:"changeURLPrompt"}},[a("v-card",[a("v-card-title",[e._v("Change Girder URL")]),e._v(" "),a("v-card-text",[e._v("\n Changing the girder URL to "),a("pre",[e._v(e._s(e.newGirderURL))]),e._v(" will require a refresh.\n Do you want to continue?\n ")]),e._v(" "),a("v-card-actions",[a("v-spacer"),e._v(" "),a("v-btn",{attrs:{text:""},on:{click:function(t){e.changeURLPrompt=!1}}},[e._v("Cancel")]),e._v(" "),a("v-btn",{attrs:{color:"primary"},on:{click:e.refreshPage}},[e._v("Refresh")])],1)],1)],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}]},[a("girder-upload",{ref:"girderUploader",attrs:{dest:e.location}})],1)],1)};i._withStripped=!0;var s=a(69),n=a(612),o=a(73),r=a(677),l=a(679),c=a(523),d=a(520),u=a(78),p=a(521),v=a(406),m=a(522);function g(e,t){const a=new Blob([e]);return new File([a],t)}var h={name:"GirderBox",components:{SvgIcon:s.Z,GirderAuthentication:r.Z,GirderFileManager:l.Z,Datasets:o.Z,GirderUpload:c.Z},inject:["girderRest","$notify"],data(){return{selected:[],internalLocation:null,changeServer:!1,newGirderURL:this.girderRest.apiRoot,changeURLPrompt:!1}},computed:{currentUserLogin(){return this.girderRest.user?this.girderRest.user.login:"anonymous"},loggedOut(){return null===this.girderRest.user},location:{get(){return this.internalLocation||(this.loggedOut?{_id:"5e84eb3e2660cbefba7d71d9",_modelType:"folder"}:this.girderRest.user)},set(e){this.internalLocation=e}},noURLChange(){return this.newGirderURL===this.girderRest.apiRoot},...(0,n.rn)("widgets",{dataMeasurements:"measurements"})},mounted(){this.$root.$on("girder_upload_proxy",(e=>{this.upload(e)})),this.$root.$on("girder_upload_measurements",(e=>{this.uploadMeasurements(e)}))},methods:{load(){const e=this.selected.map((e=>({url:`${this.girderRest.apiRoot}/item/${e._id}/download`,name:e.name,withGirderToken:!0,proxyKeys:{girderProvenance:{...this.location,apiRoot:this.girderRest.apiRoot},girderItem:{itemId:e._id,itemName:e.name},meta:e.meta}})));this.$store.dispatch("files/openRemoteFiles",e)},export2pc(e){const t=this.$proxyManager.getProxyById(e).get().dataset,a=u.Z.convertVtkToItkImage(t);a.data=a.data.slice(0),(0,d.Z)(null,!1,a,"out.mha").then((e=>{let{arrayBuffer:t}=e;const a=new Blob([t]),i=URL.createObjectURL(a),s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download","out.mha"),document.body.appendChild(s),s.click(),document.body.removeChild(s)}))},checkUploadPossible(){return this.loggedOut?(this.$notify("Cannot upload to Girder unless logged in. Please log in then try again"),!1):this.location?"user"!==this.location._modelType||(this.$notify("Cannot upload here. Please select public or private and then try again"),!1):(this.$notify("Cannot upload to Girder root location. Please navigate to a folder you own then try again"),!1)},upload(e){if(!this.checkUploadPossible())return;const t=this.$proxyManager.getProxyById(e),a=t.getDataset(),i=t.getName(),s={glanceDataType:a.getClassName()};"vtkLabelMap"===a.getClassName()&&Object.assign(s,{colorMap:a.getColorMap()}),this.$notify("Uploading...",!0),function(e,t){return new Promise(((a,i)=>{if(e.isA("vtkImageData")){const i=u.Z.convertVtkToItkImage(e);i.data=i.data.slice(0),(0,d.Z)(null,!1,i,t).then((e=>a(g(e,t))))}else if(e.isA("vtkPolyData")){let s=null;t.endsWith(".vtp")?(s=p.ZP.newInstance(),s.setFormat(v.Z.FormatTypes.BINARY)):t.endsWith(".stl")&&(s=m.ZP.newInstance()),s?a(g(s.write(e),t)):i(new Error(`Cannot save polydata dataset ${t}`))}else i(new Error(`Cannot save dataset ${t}`))}))}(a,i).then((t=>{const a=this.$proxyManager.getProxyById(e).getKey("girderProvenance")||this.location;this.$refs.girderUploader.setFiles([t]),this.$refs.girderUploader.inputFilesChanged([t]),this.$refs.girderUploader.start({dest:a,postUpload:e=>{let{results:t}=e;const{itemId:a}=t[0];this.girderRest.put(`${this.girderRest.apiRoot}/item/${a}`,`metadata=${JSON.stringify(s)}`),this.$notify("Dataset uploaded"),this.$refs.girderFileManager.refresh()}}).catch((e=>{this.$notify(`Upload error: ${e}`),console.error("Upload error",e)}))}))},uploadMeasurements(e){if(!this.checkUploadPossible())return;const t=this.dataMeasurements[e];if(t){const a=`${this.$proxyManager.getProxyById(e).getName()}.measurements.json`,i=new File([JSON.stringify(t)],a),s=this.$proxyManager.getProxyById(e).getKey("girderProvenance")||this.location;this.$notify("Uploading...",!0),this.$refs.girderUploader.setFiles([i]),this.$refs.girderUploader.inputFilesChanged([i]),this.$refs.girderUploader.start({dest:s,postUpload:()=>{this.$notify("Measurements uploaded"),this.$refs.girderFileManager.refresh()}}).catch((e=>{this.$notify(`Upload error: ${e}`),console.error("Upload error",e)}))}},refreshPage(){const e=new URL(window.location.href),t=new URLSearchParams(e.search);t.set("girderRoute",this.newGirderURL),e.search=t.toString(),window.location.href=e.toString()},logout(){this.girderRest.logout()}}},y={close:"GirderBox-close-eeT8j"},f=a(581),b=a(3),x=a.n(b),w=a(582),_=a(601),S=a(607),P=a(683),k=a(637),C=a(622),V=a(610),I=a(680),T=a(653),$=a(634),D=a(684);e=a.hmd(e);var M={};e.hot,e.hot;var L=(0,f.Z)(h,i,[],!1,(function(e){M.$style=y.locals||y,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return M.$style}})}),null,null);x()(L,{VBtn:w.Z,VCard:_.Z,VCardActions:S.h7,VCardText:S.ZB,VCardTitle:S.EB,VCol:P.Z,VContainer:k.Z,VDialog:C.Z,VIcon:V.Z,VRow:I.Z,VSpacer:T.Z,VTextField:$.Z,VToolbar:D.Z}),L.options.__file="src/components/core/GirderBox/index.vue";var Z=L.exports},171:function(e,t,a){"use strict";a.d(t,{Z:function(){return I}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-container",{class:e.$style.container},[e.isAnimated?a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("Animation controls")])]),e._v(" "),a("v-divider",{staticClass:"mb-4"}),e._v(" "),a("animationControls")],1):e._e(),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("General Settings")])]),e._v(" "),a("v-divider",{staticClass:"mb-4"}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs10:""}},[a("span",{staticClass:"body-2"},[e._v("Default collapse datasets")])]),e._v(" "),a("v-flex",{attrs:{xs2:""}},[a("v-switch",{class:e.$style.slimInput,attrs:{"hide-details":""},model:{value:e.collapseDatasetPanelsModel,callback:function(t){e.collapseDatasetPanelsModel=t},expression:"collapseDatasetPanelsModel"}})],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("Measurements")])]),e._v(" "),a("v-divider",{staticClass:"mb-4"}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs9:""}},[a("span",{staticClass:"body-2"},[e._v("Distance unit symbol")])]),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{hint:"Symbol","hide-details":"",required:""},model:{value:e.distanceUnitSymbolModel,callback:function(t){e.distanceUnitSymbolModel=t},expression:"distanceUnitSymbolModel"}})],1),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("span",{staticClass:"body-2"},[e._v("Distance unit factor")])]),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{type:"number",hint:"Factor","hide-details":"",min:0,step:.1,required:""},model:{value:e.distanceUnitFactorModel,callback:function(t){e.distanceUnitFactorModel=t},expression:"distanceUnitFactorModel"}})],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("Background")])]),e._v(" "),a("v-divider",{staticClass:"mb-4"}),e._v(" "),a("palette-picker",{attrs:{palette:e.palette,size:24},model:{value:e.backgroundColorModel,callback:function(t){e.backgroundColorModel=t},expression:"backgroundColorModel"}})],1),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("Interaction Style")])]),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs6:""}},[a("span",{staticClass:"body-2"},[e._v("3D")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-select",{staticClass:"pv-no-select",class:e.$style.slimInput,attrs:{dense:"",flat:"","hide-details":"",items:e.interactionStyles3D},model:{value:e.interactionStyle3DModel,callback:function(t){e.interactionStyle3DModel=t},expression:"interactionStyle3DModel"}})],1),e._v(" "),a("v-flex",{attrs:{xs6:""}},[e.firstPersonInteraction?a("span",{staticClass:"body-2"},[e._v("\n Movement Speed\n ")]):e._e()]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[e.firstPersonInteraction?a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:0,step:.1},model:{value:e.firstPersonMovementSpeedModel,callback:function(t){e.firstPersonMovementSpeedModel=t},expression:"firstPersonMovementSpeedModel"}}):e._e()],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("Overlay")])]),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs6:""}},[a("span",{staticClass:"body-2"},[e._v("Text opacity")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"",min:0,max:1,step:.01},model:{value:e.annotationOpacityModel,callback:function(t){e.annotationOpacityModel=t},expression:"annotationOpacityModel"}})],1)],1)],1)],1),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs10:""}},[a("span",{staticClass:"subtitle-2"},[e._v("Orientation Axis")])]),e._v(" "),a("v-flex",{attrs:{xs2:""}},[a("v-switch",{class:e.$style.slimInput,attrs:{"hide-details":""},model:{value:e.orientationAxisModel,callback:function(t){e.orientationAxisModel=t},expression:"orientationAxisModel"}})],1)],1)],1)],1),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("span",{staticClass:"body-2"},[e._v("Type")])]),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("v-select",{staticClass:"pv-no-select",class:e.$style.slimInput,attrs:{dense:"",flat:"","hide-details":"",disabled:!e.orientationAxis,items:e.axisTypes},model:{value:e.axisTypeModel,callback:function(t){e.axisTypeModel=t},expression:"axisTypeModel"}})],1)],1),e._v(" "),a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[a("span",{staticClass:"body-2"},[e._v("Preset")])]),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("v-select",{staticClass:"pv-no-select",class:e.$style.slimInput,attrs:{dense:"",flat:"","hide-details":"",items:e.orientationPresets},model:{value:e.orientationPresetModel,callback:function(t){e.orientationPresetModel=t},expression:"orientationPresetModel"}})],1)],1)],1)],1),e._v(" "),a("gpu-information",{attrs:{width:250,proxyManager:e.$proxyManager}}),e._v(" "),e.hasVR()?a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs10:""}},[a("span",{staticClass:"subtitle-2"},[e._v("Virtual Reality")])]),e._v(" "),a("v-flex",{attrs:{xs2:""}},[a("v-switch",{class:e.$style.slimInput,attrs:{"hide-details":""},on:{change:e.toggleVR},model:{value:e.vrEnabled,callback:function(t){e.vrEnabled=t},expression:"vrEnabled"}})],1)],1)],1)],1),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":"",wrap:""}},[a("v-flex",{attrs:{xs5:""}},[a("span",{staticClass:"body-2"},[e._v("Physical scale")])]),e._v(" "),a("v-flex",{attrs:{xs7:""}},[a("v-slider",{class:e.$style.slimInput,attrs:{"hide-details":"",min:"0.1",max:"10",step:"any"},model:{value:e.physicalScale,callback:function(t){e.physicalScale=t},expression:"physicalScale"}})],1)],1)],1)],1):e._e(),e._v(" "),a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("span",{staticClass:"subtitle-2"},[e._v("LOD Settings")])]),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{staticClass:"pt-1",attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs7:""}},[a("span",{staticClass:"body-2"},[e._v("Max Texture LOD Size")])]),e._v(" "),a("v-flex",{attrs:{xs5:""}},[a("v-text-field",{class:e.$style.slimInput,attrs:{"hide-details":"",type:"number",min:100,suffix:"KiB"},model:{value:e.maxTextureLODSizeModel,callback:function(t){e.maxTextureLODSizeModel=t},expression:"maxTextureLODSizeModel"}})],1)],1)],1)],1)],1)};i._withStripped=!0;var s=a(612),n=a(172),o=a(173),r=a(38),l=a(174);const c=[{text:"Default",value:"3D"},{text:"First Person",value:"FirstPerson"}],d=[{text:"XYZ",value:"default"},{text:"LPS",value:"lps"}],u=[{text:"Arrows",value:"arrow"},{text:"Cube",value:"cube"}];var p={name:"GlobalSettings",components:{AnimationControls:n.Z,PalettePicker:r.Z,GpuInformation:o.Z},data:()=>({palette:l.qg,orientationPresets:d,interactionStyles3D:c,axisTypes:u,vrEnabled:!1,physicalScale:1,basePhysicalScale:1}),computed:{distanceUnitSymbolModel:{get(){return this.distanceUnitSymbol},set(e){this.setDistanceUnitSymbol(e)}},distanceUnitFactorModel:{get(){return this.distanceUnitFactor},set(e){this.setDistanceUnitFactor(e)}},collapseDatasetPanelsModel:{get(){return this.collapseDatasetPanels},set(e){this.setCollapseDatasetPanels(e)}},backgroundColorModel:{get(){return this.backgroundColor},set(e){this.setBackgroundColor(e)}},orientationAxisModel:{get(){return this.orientationAxis},set(e){this.setOrientationAxis(e)}},orientationPresetModel:{get(){return this.orientationPreset},set(e){this.setOrientationPreset(e)}},axisTypeModel:{get(){return this.axisType},set(e){this.setAxisType(e)}},annotationOpacityModel:{get(){return this.annotationOpacity},set(e){this.setAnnotationOpacity(e)}},firstPersonMovementSpeedModel:{get(){let e=this.firstPersonMovementSpeed;return null===e&&(this.resetFirstPersonMovementSpeed(),e=this.firstPersonMovementSpeed),e},set(e){this.setFirstPersonMovementSpeed(e)}},interactionStyle3DModel:{get(){return this.interactionStyle3D},set(e){this.setInteractionStyle3D(e)}},firstPersonInteraction(){return"FirstPerson"===this.interactionStyle3D},maxTextureLODSizeModel:{get(){return this.maxTextureLODSize},set(e){this.setMaxTextureLODSize(e)}},...(0,s.rn)(["collapseDatasetPanels"]),...(0,s.rn)("animations",{isAnimated:e=>e.frames.length>0}),...(0,s.rn)("views",{backgroundColor:e=>e.globalBackgroundColor,orientationAxis:e=>e.axisVisible,orientationPreset:e=>e.axisPreset,axisType:e=>e.axisType,annotationOpacity:e=>e.annotationOpacity,interactionStyle3D:e=>e.interactionStyle3D,firstPersonMovementSpeed:e=>e.firstPersonMovementSpeed,maxTextureLODSize:e=>e.maxTextureLODSize}),...(0,s.rn)("widgets",{distanceUnitSymbol:e=>e.distanceUnitSymbol,distanceUnitFactor:e=>e.distanceUnitFactor})},watch:{physicalScale(){const e=this.getViewForVR();e&&e.getCamera().setPhysicalScale(this.basePhysicalScale/Number(this.physicalScale))}},methods:{hasVR(){const e=this.getViewForVR();return e&&!!e.getOpenGLRenderWindow().getVrDisplay()},getViewForVR:function(){const e=this.$proxyManager.getViews();for(let t=0;te>0?1:-1,n=a.getDirectionOfProjection(),o=Math.max(...n.map(Math.abs));a.setPhysicalViewNorth(n.map((t=>Math.abs(t)===o?e(t):0)));const r=a.getViewUp(),l=Math.max(...r.map(Math.abs));a.setPhysicalViewUp(r.map((t=>Math.abs(t)===l?e(t):0))),s.startVR()}else s.stopVR(),t.setOrientationAxesVisibility(this.orientationAxis)}},...(0,s.nv)({setCollapseDatasetPanels:"collapseDatasetPanels"}),...(0,s.nv)("views",{setBackgroundColor:(e,t)=>e("setGlobalBackground",t),setOrientationAxis:(e,t)=>e("setAxisVisible",t),setOrientationPreset:(e,t)=>e("setAxisPreset",t),setAxisType:(e,t)=>e("setAxisType",t),setAnnotationOpacity:(e,t)=>e("setAnnotationOpacity",t),setInteractionStyle3D:(e,t)=>e("setInteractionStyle3D",t),setFirstPersonMovementSpeed:(e,t)=>e("setFirstPersonMovementSpeed",t),resetFirstPersonMovementSpeed:e=>e("resetFirstPersonMovementSpeed"),setMaxTextureLODSize:(e,t)=>e("setMaxTextureLODSize",t)}),...(0,s.nv)("widgets",{setDistanceUnitSymbol:(e,t)=>e("setDistanceUnitSymbol",t),setDistanceUnitFactor:(e,t)=>e("setDistanceUnitFactor",t)})}},v={container:"GlobalSettings-container-_zf5o",card:"GlobalSettings-card-zqI_u",heading:"GlobalSettings-heading-ftN6X",divider:"GlobalSettings-divider-_12Zl",slimInput:"GlobalSettings-slimInput-tiNot"},m=a(581),g=a(3),h=a.n(g),y=a(601),f=a(637),b=a(644),x=a(608),w=a(611),_=a(640),S=a(652),P=a(661),k=a(634);e=a.hmd(e);var C={};e.hot,e.hot;var V=(0,m.Z)(p,i,[],!1,(function(e){C.$style=v.locals||v,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return C.$style}})}),null,null);h()(V,{VCard:y.Z,VContainer:f.Z,VDivider:b.Z,VFlex:x.Z,VLayout:w.Z,VSelect:_.Z,VSlider:S.Z,VSwitch:P.Z,VTextField:k.Z}),V.options.__file="src/components/core/GlobalSettings/index.vue";var I=V.exports},315:function(e,t,a){"use strict";a.d(t,{Z:function(){return P}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"grey lighten-3",attrs:{id:e.$style.root}},[a("v-responsive",{staticClass:"grey darken-3"},[a("v-container",{attrs:{"grid-list-lg":"","fill-height":"",id:e.$style.banner}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs6:!e.$vuetify.breakpoint.smAndDown,xs12:e.$vuetify.breakpoint.smAndDown}},[a("v-card",{attrs:{flat:"",dark:"",color:"transparent"}},[a("v-card-title",{staticClass:"display-1 text-center pv-break-word"},[e._v("\n Visualize your data with Kitware Glance\n ")]),e._v(" "),a("v-card-text",[e._v("\n A general purpose standalone web application by\n "),a("a",{staticClass:"indigo--text text--lighten-3",attrs:{target:"_blank",href:"https://www.kitware.com/",rel:"noopener noreferrer"}},[e._v("Kitware, Inc.")]),e._v("\n that can be used to visualize many data types.\n It is also a great framework for building custom\n viewers on the web which can involve remote services.\n ")])],1)],1),e._v(" "),e.$vuetify.breakpoint.smAndDown?e._e():a("v-flex",{key:"if-large-enough-screen",attrs:{xs6:"","fill-height":""}},[a("drag-and-drop",{class:e.$style.dnd,attrs:{enabled:""},on:{drop:function(t){return e.$emit("open-files",t)}},scopedSlots:e._u([{key:"default",fn:function(t){var i,s=t.dragHover;return[a("div",{class:(i={},i[e.$style.fileUpload]=!0,i[e.$style.fileUploadHover]=s,i),on:{click:function(t){return t.stopPropagation(),e.$emit("open")}}},[a("div",{staticClass:"white--text body-2",class:e.$style.fileUploadContents},[a("v-btn",{attrs:{color:"primary",raised:"false"},on:{click:function(t){return t.stopPropagation(),e.$emit("open")}}},[a("span",{staticClass:"text-uppercase mr-2"},s?[e._v("drop your file")]:[e._v("open a file")]),e._v(" "),a("v-icon",[e._v("mdi-folder-outline")])],1),e._v(" "),a("div",{staticClass:"pv-no-select mt-2"},[e._v("\n or drop one anywhere in this box to begin.\n ")])],1)])]}}],null,!1,1487670387)})],1)],1)],1)],1),e._v(" "),a("v-container",{staticClass:"mt-4 pv-no-select",attrs:{"grid-list-lg":""}},[a("v-layout",{attrs:{row:"",wrap:""}},[a("v-flex",{attrs:{xs12:""}},[a("span",{staticClass:"title"},[e._v("Sample Data")])]),e._v(" "),e._l(e.samples,(function(t,i){return a("v-flex",{key:i,attrs:{xs4:e.$vuetify.breakpoint.mdAndUp,xs6:e.$vuetify.breakpoint.sm,xs12:e.$vuetify.breakpoint.xs}},[a("v-card",{class:e.$style.sampleData,attrs:{flat:"",tile:""}},[a("v-img",{attrs:{src:t.image,height:"300px"}}),e._v(" "),a("div",{class:e.$style.linkOverlay,on:{click:function(a){return a.stopPropagation(),e.openSample(t)}}},[a("div",{staticClass:"body-2",class:e.$style.linkOverlayText},[e._v("\n "+e._s(t.label)+" ("+e._s(t.size)+")\n "),t.description?a("div",{class:e.$style.description},[e._v("\n "+e._s(t.description)+"\n ")]):e._e(),e._v(" "),t.acknowledgement?a("div",{class:e.$style.acknowledgement},[e._v("\n "+e._s(t.acknowledgement)+"\n ")]):e._e()])])],1)],1)}))],2)],1),e._v(" "),a("v-footer",{staticClass:"d-flex flex-column",attrs:{height:"48px",color:"transparent"}},[a("div",{staticClass:"mb-2 text-center grey--text text--darken-2"},[a("div",[e._v("© "+e._s((new Date).getFullYear())+" — Kitware, Inc.")]),e._v(" "),a("div",[e._v("Glance ("+e._s(e.version)+")")])])])],1)};i._withStripped=!0;var s={Aneurism:a(530),CAD:a(531),Engine:a(532),F1:a(533),Lidar:a(534),Lysozyme:a(535),SinglePin:a(536),Tooth:a(537),Covid19:a(538)};const n=window.GLANCE_VERSION&&"master"!==window.GLANCE_VERSION?window.GLANCE_VERSION:"master";var o=[{label:"COVID-19",image:s.Covid19,size:"8.4 MB",description:"Lung CT Scan of a COVID-19 patient exhibiting ground-glass opacities (GGO)",acknowledgement:'Joseph Paul Cohen and Paul Morrison and Lan Dao, "COVID-19 image data collection", arXiv:2003.11597, 2020',datasets:[{name:"covid19.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/covid19.glance`}]},{label:"202-t + Edges",image:s.CAD,size:"112 KB",description:"T-Handle, Flanged Base, Solid Bar",acknowledgement:"https://www.traceparts.com/",datasets:[{name:"202-t.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/202-t.glance`}]},{label:"Lysozyme.pdb",image:s.Lysozyme,size:"135 KB",description:"an enzyme that catalyzes the destruction of the cell walls of certain bacteria, occurring notably in tears and egg white.",datasets:[{name:"Lysozyme.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/lysozyme.glance`}]},{label:"Tooth.nrrd",image:s.Tooth,size:"1.6 MB",datasets:[{name:"Tooth.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/Tooth.glance`}]},{label:"Engine",image:s.Engine,size:"3.1 MB",datasets:[{name:"Engine.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/Engine.glance`}],acknowledgement:"General Electric",description:"CT scan of two cylinders of an engine block."},{label:"lidar.vtp",image:s.Lidar,size:"5.3 MB",description:"Aerial LIDAR data",datasets:[{name:"lidar.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/lidar.glance`}]},{label:"SinglePin.vtp",image:s.SinglePin,size:"8.2 MB",description:"Mixing Vane inside reactor pin for cooling",acknowledgement:"Simulation data from Hydra-TH",datasets:[{name:"SinglePin.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/SinglePin.glance`}]},{label:"Formula 1",image:s.F1,size:"6.7 MB",datasets:[{name:"F1.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/F1.glance`}]},{label:"Aneurysm.vti",image:s.Aneurism,size:"348 KB",datasets:[{name:"Aneurism.glance",url:`https://raw.githubusercontent.com/Kitware/paraview-glance/${n}/data/Aneurism.glance`}],acknowledgement:"Philips Research, Hamburg, Germany",description:"Rotational C-arm x-ray scan of the arteries of the right half of a human head. A contrast agent was injected into the blood and an aneurism is present."}],r={name:"Landing",components:{DragAndDrop:a(175).Z},data:()=>({samples:o,version:window.GLANCE_VERSION||"no version available"}),methods:{openSample(e){const t=[],a=[];for(let i=0;ie.viewOrder,backgroundColors:e=>e.backgroundColors,visibleCount(e){return this.smallScreen?1:e.visibleCount}})},methods:{getView(e){const[t,a]=e.split(":");return this.$proxyManager.getViews().find((e=>e.getProxyName()===t&&(!a||e.getName()===a)))},...(0,s.nv)("views",["updateLayout"])},updated(){this.$proxyManager.resizeAllViews()}},l={container:"LayoutView-container-_kxKm",grid:"LayoutView-grid-T7vhg",viewContainer:"LayoutView-viewContainer-kpqmi"},c=a(581),d=a(3),u=a.n(d),p=a(637);e=a.hmd(e);var v={};e.hot,e.hot;var m=(0,c.Z)(r,i,[],!1,(function(e){v.$style=l.locals||l,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return v.$style}})}),null,null);u()(m,{VContainer:p.Z}),m.options.__file="src/components/core/LayoutView/index.vue";var g=m.exports},178:function(e,t,a){"use strict";a.d(t,{Z:function(){return x}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",{attrs:{flat:""}},[a("v-card-title",[a("span",{staticClass:"body-2"},[e._v("Enter your raw data specs below:")])]),e._v(" "),a("v-card-text",[a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs3:""}},[e._v("Filename:")]),e._v(" "),a("v-flex",{staticClass:"body-1",attrs:{xs9:""}},[e._v(e._s(e.file.name))])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs3:""}},[e._v("File size:")]),e._v(" "),a("v-flex",{staticClass:"body-1",attrs:{xs9:""}},[e._v(e._s(e.file.size)+" bytes")])],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs3:""}},[e._v("Data type:")]),e._v(" "),a("v-flex",{staticClass:"body-1",attrs:{xs9:""}},[a("v-select",{attrs:{items:e.allDataTypes,"item-text":"label","item-value":"label","single-line":"","return-object":""},model:{value:e.dataType,callback:function(t){e.dataType=t},expression:"dataType"}})],1)],1),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs3:""}},[e._v("Dimensions:")]),e._v(" "),e._l(3,(function(t){return a("v-flex",{key:t,staticClass:"body-1",attrs:{xs3:""}},[a("v-text-field",{attrs:{type:"number",min:"1",max:e.file.size},model:{value:e.dimensions[t-1],callback:function(a){e.$set(e.dimensions,t-1,a)},expression:"dimensions[i-1]"}})],1)}))],2),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{staticClass:"body-2",attrs:{xs3:""}},[e._v("Spacing:")]),e._v(" "),e._l(3,(function(t){return a("v-flex",{key:t,staticClass:"body-1",attrs:{xs3:""}},[a("v-text-field",{attrs:{type:"number",min:"1",max:e.file.size},model:{value:e.spacing[t-1],callback:function(a){e.$set(e.spacing,t-1,a)},expression:"spacing[i-1]"}})],1)}))],2),e._v(" "),a("v-layout",{attrs:{row:"","align-center":""}},[a("v-flex",{attrs:{xs3:""}},[e._v("Effective size:")]),e._v(" "),a("v-flex",{attrs:{xs3:""}},[e._v(e._s(e.effectiveSize))]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[e.effectiveSize!==e.file.size?a("span",{staticClass:"red--text"},[e._v("\n Effective size does not match total size!\n ")]):a("span",{staticClass:"teal--text"},[e._v("Effective size matches file size")])])],1)],1)],1)],1)};i._withStripped=!0;const s=[{label:"Integer 8",constructor:Int8Array,size:1},{label:"Unsigned Integer 8",constructor:Uint8Array,size:1},{label:"Integer 16",constructor:Int16Array,size:2},{label:"Unsigned Integer 16",constructor:Uint16Array,size:2},{label:"Integer 32",constructor:Int32Array,size:4},{label:"Unsigned Integer 32",constructor:Uint32Array,size:4},{label:"Float",constructor:Float32Array,size:4},{label:"Double",constructor:Float64Array,size:8}];function n(){this.effectiveSize===this.file.size?this.$emit("change",{dimensions:this.dimensions,spacing:this.spacing,dataType:this.dataType,effectiveSize:this.effectiveSize}):this.$emit("change",null)}var o={name:"RawFileReader",props:{file:{type:File,required:!0}},data:()=>({allDataTypes:s,dataType:s[0],dimensions:[1,1,1],spacing:[1,1,1]}),watch:{dimensions:n,spacing:n,dataType:n},computed:{effectiveSize(){return this.dimensions.reduce(((e,t)=>e*t),1)*this.dataType.size}}},r={toolbarButton:"RawFileReader-toolbarButton-Qwep7",overlay:"RawFileReader-overlay-EEhkR",overlayHidden:"RawFileReader-overlayHidden-A2Yvq",overlayText:"RawFileReader-overlayText-iq_lG"},l=a(581),c=a(3),d=a.n(c),u=a(601),p=a(607),v=a(637),m=a(608),g=a(611),h=a(640),y=a(634);e=a.hmd(e);var f={};e.hot,e.hot;var b=(0,l.Z)(o,i,[],!1,(function(e){f.$style=r.locals||r,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return f.$style}})}),null,null);d()(b,{VCard:u.Z,VCardText:p.ZB,VCardTitle:p.EB,VContainer:v.Z,VFlex:m.Z,VLayout:g.Z,VSelect:h.Z,VTextField:y.Z}),b.options.__file="src/components/core/RawFileReader/index.vue";var x=b.exports},320:function(e,t,a){"use strict";a.d(t,{Z:function(){return V}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a(e.dialogType,{tag:"component",attrs:{value:e.showDialog,"max-width":"60%"},on:{input:e.close}},[e.screenshot?a("v-card",{attrs:{flat:""}},[a("v-card-title",[e._v("Save Screenshot")]),e._v(" "),a("v-container",{attrs:{"grid-list-md":""}},[a("v-layout",{attrs:{row:"",wrap:""}},[a("v-flex",e._b({},"v-flex",e.flexLayout,!1),[a("v-img",{class:e.$style.imagePreview,attrs:{src:e.imageUrl,contain:"",height:e.smallScreen?"125px":"250px"}})],1),e._v(" "),a("v-flex",e._b({},"v-flex",e.flexLayout,!1),[a("v-container",{class:{"pa-1":e.smallScreen}},[a("v-layout",{attrs:{row:""}},[a("v-flex",{attrs:{xs9:""}},[a("v-text-field",{attrs:{label:"Filename"},on:{keyup:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.save(),e.close()}},model:{value:e.filename,callback:function(t){e.filename=t},expression:"filename"}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-select",{attrs:{label:"File type","hide-details":"","single-line":"",items:e.fileTypes},model:{value:e.fileType,callback:function(t){e.fileType=t},expression:"fileType"}})],1)],1),e._v(" "),a("v-layout",{attrs:{row:""}},[a("v-flex",{attrs:{xs12:""}},[a("v-checkbox",{attrs:{label:"Transparent background"},model:{value:e.transparentBackground,callback:function(t){e.transparentBackground=t},expression:"transparentBackground"}})],1)],1)],1)],1)],1)],1),e._v(" "),a("v-card-actions",[a("v-spacer"),e._v(" "),a("v-btn",{attrs:{text:"",color:"red"},nativeOn:{click:function(t){return e.close.apply(null,arguments)}}},[a("span",[e._v("Cancel")])]),e._v(" "),a("v-btn",{attrs:{color:"secondary"},nativeOn:{click:function(t){e.save(),e.close()}}},[a("span",[e._v("Save")])]),e._v(" "),a("v-btn",{attrs:{color:"primary",href:e.imageUrl,download:e.filename+e.fileType},nativeOn:{click:function(t){return e.close.apply(null,arguments)}}},[a("span",[e._v("Download")])])],1)],1):e._e()],1)};i._withStripped=!0;var s=a(612),n=a(690),o=a(622);const r=[".png",".jpeg"];function l(){const e=new Image;e.addEventListener("load",(()=>{const t=this.canvas.getContext("2d");t.clearRect(0,0,this.canvas.width,this.canvas.height),this.canvas.width=e.width,this.canvas.height=e.height,this.transparentBackground||(t.fillStyle=this.backgroundToFillStyle(this.screenshot.viewData.background),t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.drawImage(e,0,0);const a=`image/${this.fileType.substr(1)}`;this.imageUrl=this.canvas.toDataURL(a)})),e.src=this.screenshot.imgSrc}var c={name:"ScreenshotDialog",components:{VBottomSheet:n.Z,VDialog:o.Z},data:()=>({filename:"",imageUrl:"",transparentBackground:!1,fileType:"",fileTypes:r}),computed:{smallScreen(){return this.$vuetify.breakpoint.smAndDown},landscapeScreen(){const{width:e,height:t}=this.$vuetify.breakpoint;return e>t},dialogType(){return this.smallScreen?"v-bottom-sheet":"v-dialog"},flexLayout(){return{[!this.smallScreen||this.landscapeScreen?"xs6":"xs12"]:!0}},...(0,s.rn)({screenshot:e=>e.pendingScreenshot,showDialog:e=>e.screenshotDialog})},watch:{transparentBackground:l,fileType:l,showDialog(e){e&&(this.filename="Untitled",this.fileType=".png",this.generateImage())}},methods:{generateImage:l,backgroundToFillStyle:function(e){if(e.startsWith("linear-gradient(")){const t=e.substring(e.indexOf("(")+1,e.indexOf(")")).split(","),a=this.canvas.getContext("2d").createLinearGradient(0,0,0,this.canvas.height);return a.addColorStop(0,t[0]),a.addColorStop(1,t[1]),a}return e},save:function(){this.$emit("save",this.screenshot.viewName,{image:this.imageUrl,filename:this.filename+this.fileType})},...(0,s.nv)({close:"closeScreenshotDialog"})},created(){this.canvas=document.createElement("canvas")}},d={imagePreview:"ScreenshotDialog-imagePreview-UShNL"},u=a(581),p=a(3),v=a.n(p),m=a(582),g=a(601),h=a(607),y=a(613),f=a(637),b=a(608),x=a(685),w=a(611),_=a(640),S=a(653),P=a(634);e=a.hmd(e);var k={};e.hot,e.hot;var C=(0,u.Z)(c,i,[],!1,(function(e){k.$style=d.locals||d,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return k.$style}})}),null,null);v()(C,{VBtn:m.Z,VCard:g.Z,VCardActions:h.h7,VCardTitle:h.EB,VCheckbox:y.Z,VContainer:f.Z,VFlex:b.Z,VImg:x.Z,VLayout:w.Z,VSelect:_.Z,VSpacer:S.Z,VTextField:P.Z}),C.options.__file="src/components/core/Screenshots/ScreenshotDialog/index.vue";var V=C.exports},319:function(e,t,a){"use strict";a.d(t,{Z:function(){return S}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.$style.container},[a("v-toolbar",{staticClass:"flex-grow-0",attrs:{color:"transparent",flat:""}},[a("v-toolbar-title",[e._v("Screenshots")]),e._v(" "),a("v-spacer"),e._v(" "),a("v-btn",{attrs:{icon:""},on:{click:function(t){return e.$emit("close")}}},[a("v-icon",[e._v("mdi-arrow-right")])],1)],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!e.atLeastOneScreenshot,expression:"!atLeastOneScreenshot"}],class:e.$style.emptyState},[a("v-icon",{attrs:{large:""}},[e._v("mdi-image-multiple")]),e._v(" "),a("span",{staticClass:"subtitle-1 grey--text text--darken-1"},[e._v("No screenshots yet!")]),e._v(" "),a("v-btn",{staticClass:"mt-4",attrs:{disabled:!e.activeView},on:{click:e.takeScreenshot}},[e._v("\n Capture Active View\n ")])],1),e._v(" "),a("v-list",{directives:[{name:"show",rawName:"v-show",value:e.atLeastOneScreenshot,expression:"atLeastOneScreenshot"}]},e._l(Object.keys(e.screenshots),(function(t){return a("v-list-group",{key:t,attrs:{"prepend-icon":"mdi-folder","no-action":""},scopedSlots:e._u([{key:"activator",fn:function(){return[a("v-list-item-content",[a("v-list-item-title",[e._v("\n "+e._s(t)+" ("+e._s(e.screenshots[t].length)+")\n ")])],1)]},proxy:!0}],null,!0)},[e._v(" "),e._l(e.screenshots[t],(function(i,s){return a("v-tooltip",{key:s,attrs:{left:"",disabled:e.smallScreen,"content-class":e.$style.hoverTooltip},scopedSlots:e._u([{key:"activator",fn:function(n){var o=n.on;return[a("v-list-item",e._g({attrs:{link:""},on:{click:function(a){return e.viewScreenshot(t,s)}}},o),[a("v-list-item-title",{class:e.$style.filename,attrs:{title:i.filename}},[e._v("\n "+e._s(i.filename)+"\n ")]),e._v(" "),a("v-list-item-action",{class:e.$style.action},[a("v-btn",{attrs:{icon:"",href:i.image,download:i.filename},on:{click:function(e){e.stopPropagation()}}},[a("v-icon",[e._v("mdi-download")])],1)],1),e._v(" "),a("v-list-item-action",{class:e.$style.action},[a("v-btn",{attrs:{icon:""},on:{click:[function(a){return e.deleteScreenshot(t,s)},function(e){e.stopPropagation()}]}},[a("v-icon",[e._v("mdi-delete")])],1)],1)],1)]}}],null,!0)},[e._v(" "),a("img",{class:e.$style.hoverImage,attrs:{src:i.image}})])}))],2)})),1),e._v(" "),a("screenshot-dialog",{on:{save:e.addScreenshot}})],1)};i._withStripped=!0;var s=a(612);var n={name:"Screenshots",components:{ScreenshotDialog:a(320).Z},data:()=>({screenshots:{},activeViewId:-1}),computed:{atLeastOneScreenshot(){const e=Object.keys(this.screenshots);for(let t=0;te.length)).reduce(((e,t)=>e+t))},...(0,s.nv)({takeScreenshot(e){return e("takeScreenshot",this.activeView)}})}},o={container:"Screenshots-container-QUtU6",emptyState:"Screenshots-emptyState-A_kb2",filename:"Screenshots-filename-_4xgf",action:"Screenshots-action-BSST7",hoverTooltip:"Screenshots-hoverTooltip-WDQlH",hoverImage:"Screenshots-hoverImage-_Qhil"},r=a(581),l=a(3),c=a.n(l),d=a(582),u=a(610),p=a(647),v=a(648),m=a(641),g=a(642),h=a(646),y=a(653),f=a(684),b=a(687),x=a(654);e=a.hmd(e);var w={};e.hot,e.hot;var _=(0,r.Z)(n,i,[],!1,(function(e){w.$style=o.locals||o,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return w.$style}})}),null,null);c()(_,{VBtn:d.Z,VIcon:u.Z,VList:p.Z,VListGroup:v.Z,VListItem:m.Z,VListItemAction:g.Z,VListItemContent:h.km,VListItemTitle:h.V9,VSpacer:y.Z,VToolbar:f.Z,VToolbarTitle:b.qW,VTooltip:x.Z}),_.options.__file="src/components/core/Screenshots/index.vue";var S=_.exports},321:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.fileGenerationInProgress?e.$style.visible:e.$style.hidden},[a("v-progress-circular",{attrs:{indeterminate:"",color:"green",size:70,width:7}}),e._v(" "),a("label",{class:e.$style.label},[e._v("\n Compressing..."),a("br"),e._v(e._s(e.fileName)+"\n ")])],1)};i._withStripped=!0;var s={name:"StateFileGenerator",computed:(0,a(612).rn)({proxyManager:"proxyManager",fileGenerationInProgress:e=>!!e.savingStateName,fileName:"savingStateName"})},n={hidden:"StateFileGenerator-hidden-W1iZI",visible:"StateFileGenerator-visible-mpB0c",label:"StateFileGenerator-label-kWzey"},o=a(581),r=a(3),l=a.n(r),c=a(599);e=a.hmd(e);var d={};e.hot,e.hot;var u=(0,o.Z)(s,i,[],!1,(function(e){d.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return d.$style}})}),null,null);l()(u,{VProgressCircular:c.Z}),u.options.__file="src/components/core/StateFileGenerator/index.vue";var p=u.exports},318:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var i=function(){var e,t=this,a=t.$createElement,i=t._self._c||a;return i("div",{class:(e={},e[t.$style.sheet]=!0,e[t.$style.visible]=t.value,e),style:{top:t.sheetTop+"px"}},[i("div",{ref:"slotWrapper",staticClass:"grey darken-3 white--text",class:t.$style.slotWrapper,style:{transform:"translateY("+(t.visible?0:"100%")+")"}},[t._t("default")],2)])};i._withStripped=!0;var s={props:{value:{type:Boolean,default:!1}},data:()=>({sheetTop:0,visible:!1}),methods:{onMouseDown:function(e){this.$el.contains(e.target)||this.$emit("input",!1)},updateHeight:function(){this.sheetTop=-this.$refs.slotWrapper.offsetHeight}},watch:{value:function(e,t){e&&!t?(document.addEventListener("mousedown",this.onMouseDown,!0),this.$nextTick((()=>{this.updateHeight(),this.visible=!0}))):(document.removeEventListener("mousedown",this.onMouseDown,!0),this.visible=!1)}},mounted(){window.addEventListener("resize",this.updateHeight)},beforeDestroy(){window.removeEventListener("resize",this.updateHeight)}},n={sheet:"ToolbarSheet-sheet-xndXH",slotWrapper:"ToolbarSheet-slotWrapper-NSeT7",visible:"ToolbarSheet-visible-dRAdL"},o=a(581);e=a.hmd(e);var r={};e.hot,e.hot;var l=(0,o.Z)(s,i,[],!1,(function(e){r.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return r.$style}})}),null,null);l.options.__file="src/components/core/ToolbarSheet/index.vue";var c=l.exports},317:function(e,t,a){"use strict";a.d(t,{Z:function(){return O}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-container",{class:e.$style.container,attrs:{fluid:""}},[a("v-layout",{class:e.$style.floatToolbar,attrs:{column:""}},[a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.resetCamera()}}},i),[a("v-icon",[e._v("mdi-image-filter-center-focus")])],1)]}}])},[a("span",{staticClass:"pv-no-select"},[e._v("Reset camera")])]),e._v(" "),a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.rollLeft()}}},i),[a("v-icon",[e._v("mdi-rotate-left")])],1)]}}])},[a("span",{staticClass:"pv-no-select"},[e._v("Rotate camera left 90°")])]),e._v(" "),a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.rollRight()}}},i),[a("v-icon",[e._v("mdi-rotate-right")])],1)]}}])},[a("span",{staticClass:"pv-no-select"},[e._v("Rotate camera right 90°")])]),e._v(" "),"View3D"===e.type?a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.updateOrientation("x")}}},i),[e._v("\n "+e._s(e.orientationLabels[0])+"\n ")])]}}],null,!1,2132146526)},[a("span",{staticClass:"pv-no-select"},[e._v("Reset Camera to Orientation "+e._s(e.orientationLabels[0]))])]):e._e(),e._v(" "),"View3D"===e.type?a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.updateOrientation("y")}}},i),[e._v("\n "+e._s(e.orientationLabels[1])+"\n ")])]}}],null,!1,1991408638)},[a("span",{staticClass:"pv-no-select"},[e._v("Reset Camera to Orientation "+e._s(e.orientationLabels[1]))])]):e._e(),e._v(" "),"View3D"===e.type?a("v-tooltip",{attrs:{left:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({attrs:{icon:"",dark:""},on:{click:function(t){return e.updateOrientation("z")}}},i),[e._v("\n "+e._s(e.orientationLabels[2])+"\n ")])]}}],null,!1,617031326)},[a("span",{staticClass:"pv-no-select"},[e._v("Reset Camera to Orientation "+e._s(e.orientationLabels[2]))])]):e._e()],1),e._v(" "),a("v-layout",{attrs:{column:"","fill-height":""}},[a("v-flex",{staticClass:"js-view",class:e.$style.vtkView,style:{background:e.backgroundColor},attrs:{"fill-height":""},on:{mousedown:function(t){return e.view.activate()}}}),e._v(" "),e.isActive?a("div",{class:e.$style.activeView}):e._e(),e._v(" "),a("tool-svg-target",{class:e.$style.svgLayer,attrs:{"view-proxy-id":e.viewProxyId,viewBox:e.svgViewBox}}),e._v(" "),a("div",{class:e.$style.toolbarWrapper},[a("toolbar-sheet",{model:{value:e.backgroundSheet,callback:function(t){e.backgroundSheet=t},expression:"backgroundSheet"}},[a("v-container",{staticClass:"mr-0",attrs:{"grid-list-md":""}},[a("v-layout",{attrs:{row:""}},[a("v-spacer"),e._v(" "),a("palette-picker",{attrs:{size:24,palette:e.palette,value:e.backgroundColor},on:{input:e.changeBackgroundColor}})],1)],1)],1),e._v(" "),a("v-toolbar",{class:e.$style.smallToolbar,attrs:{dark:"",height:"45px"}},[a("v-select",{class:e.$style.viewTypeSelector,attrs:{dense:"",flat:"","hide-details":"",items:e.viewTypeItems,value:e.viewType},on:{change:e.changeViewType}}),e._v(" "),a("v-spacer"),e._v(" "),"View3D"===e.type?a("v-tooltip",{attrs:{top:"",disabled:e.smallScreen||e.viewPointMenuVisible},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-menu",{attrs:{"offset-y":"",top:"",left:""},scopedSlots:e._u([{key:"activator",fn:function(t){var s=t.on;return[a("v-btn",e._g({directives:[{name:"show",rawName:"v-show",value:e.cameraViewPoints.length,expression:"cameraViewPoints.length"}],class:e.$style.button,attrs:{icon:"",disabled:e.viewPointMenuVisible}},Object.assign({},i,s)),[a("v-icon",[e._v("mdi-camera-switch")])],1)]}}],null,!0),model:{value:e.viewPointMenuVisible,callback:function(t){e.viewPointMenuVisible=t},expression:"viewPointMenuVisible"}},[e._v(" "),a("v-list",e._l(e.cameraViewPoints,(function(t,i){return a("v-list-item",{key:i,on:{click:function(a){return e.changeCameraViewPoint(t)}}},[a("v-list-item-title",[e._v(e._s(t))])],1)})),1)],1)]}}],null,!1,205776964)},[e._v(" "),a("span",{staticClass:"pv-no-select"},[e._v("Change View Point")])]):e._e(),e._v(" "),a("v-tooltip",{attrs:{top:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.button,attrs:{icon:"",disabled:e.backgroundSheet||!e.view},on:{click:function(t){e.backgroundSheet=!e.backgroundSheet}}},i),[a("v-icon",[e._v("mdi-palette")])],1)]}}])},[a("span",{staticClass:"pv-no-select"},[e._v("Background color")])]),e._v(" "),a("v-tooltip",{attrs:{top:"",disabled:e.smallScreen},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.button,attrs:{icon:""},on:{click:function(t){return e.screenCapture()}}},i),[a("v-icon",[e._v("mdi-camera-plus")])],1)]}}])},[a("span",{staticClass:"pv-no-select"},[e._v("Screenshot")])]),e._v(" "),!e.smallScreen&&e.singleViewButton?a("v-tooltip",{key:"singleView",attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.button,attrs:{icon:""},on:{click:function(t){return e.singleView(e.layoutIndex)}}},i),[a("v-icon",[e._v("mdi-fullscreen")])],1)]}}],null,!1,3656610843)},[a("span",{staticClass:"pv-no-select"},[e._v("Single view")])]):e._e(),e._v(" "),!e.smallScreen&&e.flipViewButton?a("v-tooltip",{key:"flipView",attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.button,attrs:{icon:""},on:{click:function(t){return e.splitView(e.layoutIndex)}}},i),[a("v-icon",[e._v("mdi-flip-horizontal")])],1)]}}],null,!1,1302128140)},[a("span",{staticClass:"pv-no-select"},[e._v("Split view")])]):e._e(),e._v(" "),!e.smallScreen&&e.quadViewButton?a("v-tooltip",{key:"quadView",attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-btn",e._g({class:e.$style.button,attrs:{icon:""},on:{click:function(t){return e.quadView(e.layoutIndex)}}},i),[a("v-icon",[e._v("mdi-widgets")])],1)]}}],null,!1,1168904256)},[a("span",{staticClass:"pv-no-select"},[e._v("Quad view")])]):e._e()],1)],1)],1)],1)};i._withStripped=!0;var s=a(612),n=a(462),o=a(463),r=a(38),l=a(318),c=a(174),d=function(){var e=this,t=e.$createElement;return(e._self._c||t)("portal-target",{attrs:{name:e.portalName,multiple:"",tag:"svg","slot-props":{viewProxyId:e.viewProxyId}}})};d._withStripped=!0;var u={name:"ToolsSvg",components:{PortalTarget:a(82).YC},props:{viewProxyId:{type:String,required:!0}},computed:{portalName(){return`PortalTarget__${this.viewProxyId}`}},mounted(){this.$toolSvgPortal.addTarget(this.portalName)},beforeDestroy(){this.$toolSvgPortal.removeTarget(this.portalName)}},p=a(581),v=(0,p.Z)(u,d,[],!1,null,null,null);v.options.__file="src/components/tools/ToolSvgTarget.vue";var m=v.exports,g=a(30);var h={name:"VtkView",components:{PalettePicker:r.Z,ToolbarSheet:l.Z,ToolSvgTarget:m},props:{layoutIndex:{default:0,type:Number},layoutCount:{default:1,type:Number},viewType:{default:"",type:String},backgroundColor:{default:"#000",type:String}},data:()=>({internalViewId:-1,internalIsActive:!1,palette:c.qg,backgroundSheet:!1,inAnimation:!1,viewPointMenuVisible:!1,svgViewBox:"0 0 10 10"}),computed:{...(0,s.rn)("views",{viewProxyId(e){return e.viewTypeToId[this.viewType]},view(e){return this.$proxyManager.getProxyById(e.viewTypeToId[this.viewType])},axisVisible:e=>e.axisVisible,axisType:e=>e.axisType,axisPreset:e=>e.axisPreset,viewOrientation:e=>e.viewOrientation,viewTypeItems:e=>Object.entries(e.viewTypes).map((e=>{let[t,a]=e;return{text:a,value:t}}))}),...(0,s.Se)(["cameraViewPoints"]),type(){return this.viewType.split(":")[0]},name(){return this.viewType.split(":")[1]},orientationLabels(){return"lps"===this.axisPreset?["L","P","S"]:["X","Y","Z"]},smallScreen(){return this.$vuetify.breakpoint.width1},flipViewButton(){return 1===this.layoutCount||4===this.layoutCount&&this.layoutIndex%2==1},quadViewButton(){return 2===this.layoutCount&&1===this.layoutIndex},isActive(){return this.internalIsActive||this.view===this.$proxyManager.getActiveView()}},watch:{view(e){this.tryMountView(e)}},proxyManagerHooks:{onActiveViewChange(e){this.internalIsActive=e===this.view},onActiveSourceChange(e){if(e&&"TrivialProducer"===e.getProxyName()&&this.view.bindRepresentationToManipulator){const t=this.$proxyManager.getRepresentation(e,this.view);this.view.bindRepresentationToManipulator(t),this.view.updateWidthHeightAnnotation()}},onProxyRegistrationChange(){const e=this.$proxyManager.getSources().find((e=>e.getDataset().isA&&e.getDataset().isA("vtkImageData"))),t=this.$proxyManager.getViews();for(let a=0;a{this.resizeCurrentView()})),this.resizeObserver.observe(this.$el),this.resizeCurrentView()},beforeDestroy(){this.resizeObserver.disconnect(),this.view&&this.unmountView(this.view)},beforeUpdate(){this.view||this.changeViewType(o.H_)},methods:{tryMountView(e){if(this.internalViewId>-1){const e=this.$proxyManager.getProxyById(this.internalViewId);this.unmountView(e),this.internalViewId=-1}if(e){this.internalViewId=e.getProxyId(),e.setContainer(this.$el.querySelector(".js-view")),e.setOrientationAxesVisibility(this.axisVisible);const t=e.getReferenceByName("widgetManager");t&&(t.getPickingEnabled()||t.disablePicking())}},unmountView(e){e.setContainer(null)},changeViewType(e){this.swapViews({index:this.layoutIndex,viewType:e})},getAvailableActions(){return{single:this.layoutCount>1,split:this.layoutCount<4}},resetCamera(){this.view&&this.view.resetCamera()},rollLeft(){if(this.view){this.view.setAnimation(!0,this);let e=0,t=null;t=setInterval((()=>{e<90?(e+=2,this.view.rotate(2)):(clearInterval(t),this.view.setAnimation(!1,this))}),1)}},rollRight(){if(this.view){this.view.setAnimation(!0,this);let e=0,t=null;t=setInterval((()=>{e<90?(e+=2,this.view.rotate(-2)):(clearInterval(t),this.view.setAnimation(!1,this))}),1)}},updateOrientation(e){this.view&&!this.inAnimation&&(this.inAnimation=!0,(0,g.XC)(this.view,this.viewOrientation,e,"View3D"===this.type?100:0).then((()=>{this.inAnimation=!1})))},resizeCurrentView(){if(this.view){this.view.resize();const[e,t]=this.view.getOpenGLRenderWindow().getSize();this.svgViewBox=`0 0 ${e} ${t}`}},screenCapture(){this.takeScreenshot(this.view)},changeBackgroundColor(e){this.changeBackground({viewType:this.viewType,color:e})},...(0,s.nv)("views",["changeBackground","swapViews","singleView","splitView","quadView"]),...(0,s.nv)(["takeScreenshot","changeCameraViewPoint"])}},y={container:"VtkView-container-xoSjw",vtkView:"VtkView-vtkView-_T34c",viewTypeSelector:"VtkView-viewTypeSelector-Y_5cJ",floatToolbar:"VtkView-floatToolbar-_eQCk",toolbarWrapper:"VtkView-toolbarWrapper-_mikW",button:"VtkView-button-B4bSE",smallToolbar:"VtkView-smallToolbar-ZdwuJ",activeView:"VtkView-activeView-ES8oq",svgLayer:"VtkView-svgLayer-BTr2n"},f=a(3),b=a.n(f),x=a(582),w=a(637),_=a(608),S=a(610),P=a(611),k=a(647),C=a(641),V=a(646),I=a(638),T=a(640),$=a(653),D=a(684),M=a(654);e=a.hmd(e);var L={};e.hot,e.hot;var Z=(0,p.Z)(h,i,[],!1,(function(e){L.$style=y.locals||y,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return L.$style}})}),null,null);b()(Z,{VBtn:x.Z,VContainer:w.Z,VFlex:_.Z,VIcon:S.Z,VLayout:P.Z,VList:k.Z,VListItem:C.Z,VListItemTitle:V.V9,VMenu:I.Z,VSelect:T.Z,VSpacer:$.Z,VToolbar:D.Z,VTooltip:M.Z}),Z.options.__file="src/components/core/VtkView/index.vue";var O=Z.exports},167:function(e,t,a){"use strict";a.d(t,{Z:function(){return x}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("source-select",{attrs:{label:"Target volume",filterFunc:e.filterImages,bindToActiveSource:"",hideIfOneDataset:""},on:{input:e.setTargetVolume}})],1)],1)],1),e._v(" "),a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[e.enabled?[a("v-btn",{attrs:{text:""},on:{click:e.disable}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-crop-free")]),e._v("\n Hide\n ")],1)]:[a("v-btn",{attrs:{text:"",disabled:!e.canCrop},on:{click:e.enable}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-crop")]),e._v("\n Crop\n ")],1)],e._v(" "),a("v-spacer"),e._v(" "),a("v-btn",{attrs:{disabled:!e.canReset,text:""},on:{click:e.reset}},[a("v-icon",{attrs:{left:""}},[e._v("mdi-replay")]),e._v("\n Reset\n ")],1)],2)],1)],1)};i._withStripped=!0;var s=a(612),n=a(76),o=a(30),r={name:"CropTool",components:{SourceSelect:n.Z},props:["enabled"],data:()=>({targetVolumeId:-1,widgetId:-1,canReset:!1}),computed:{targetVolume(){return this.$proxyManager.getProxyById(this.targetVolumeId)},cropProxy(){return this.$proxyManager.getProxyById(this.widgetId)},canCrop(){return this.targetVolumeId>-1},...(0,s.rn)("widgets",{allCropStates:"croppingStates"})},watch:{enabled(e){if(e){const e=this.getCropFilter(this.targetVolume);let t=this.cropProxy;t||(t=this.$proxyManager.getProxyInGroup("Widgets").find((e=>"Crop"===e.getProxyName())),t||(t=this.$proxyManager.createProxy("Widgets","Crop")),this.widgetId=t.getProxyId());const a=t.getWidget(),i=t.getWidgetState();a.setFaceHandlesEnabled(!1),a.setEdgeHandlesEnabled(!1);const s=this.targetVolume.getDataset();if(a.copyImageDataDescription(s),a.placeWidget(s.getBounds()),e.isResetAvailable()){i.getCroppingPlanes().setPlanes(e.getCroppingPlanes())}const n=i.getCroppingPlanes();this.stateSub.sub(n.onModified((()=>{const t=n.getPlanes();e.setCroppingPlanes(t),this.canReset=e.isResetAvailable(),this.storeCropState(this.targetVolumeId,t)}))),t.addToViews()}else this.cropProxy.removeFromViews(),this.$proxyManager.deleteProxy(this.cropProxy),this.widgetId=-1,this.stateSub.unsub()},targetVolumeId(e){if(this.enabled&&this.disable(),this.canReset=!1,-1!==e){const e=this.getCropFilter(this.targetVolume);this.canReset=e.isResetAvailable()}}},mounted(){this.stateSub=(0,o.y5)()},beforeDestroy(){this.stateSub.unsub()},methods:{filterImages:e=>"TrivialProducer"===e.getProxyName()&&"vtkImageData"===e.getType(),getCropFilter(e){return(0,o.aX)(this.$proxyManager,e)},setTargetVolume(e){this.targetVolumeId=e},enable(){this.$emit("enable",!0)},disable(){this.$emit("enable",!1)},reset(){if(this.targetVolume){const e=this.getCropFilter(this.targetVolume);if(e.reset(),this.canReset=!1,this.cropProxy){this.cropProxy.getWidgetState().getCroppingPlanes().setPlanes(e.getCroppingPlanes())}}},storeCropState(e,t){this.setCroppingState({datasetId:e,planes:t})},...(0,s.nv)("widgets",["setCroppingState"])}},l={container:"CropTool-container-O3Hvl"},c=a(581),d=a(3),u=a.n(d),p=a(582),v=a(637),m=a(608),g=a(610),h=a(611),y=a(653);e=a.hmd(e);var f={};e.hot,e.hot;var b=(0,c.Z)(r,i,[],!1,(function(e){f.$style=l.locals||l,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return f.$style}})}),null,null);u()(b,{VBtn:p.Z,VContainer:v.Z,VFlex:m.Z,VIcon:g.Z,VLayout:h.Z,VSpacer:y.Z}),b.options.__file="src/components/tools/CropTool/index.vue";var x=b.exports},104:function(e,t,a){"use strict";a.d(t,{Z:function(){return ve}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("source-select",{attrs:{label:"Target Dataset",filterFunc:e.filterImageData,bindToActiveSource:""},on:{input:e.setTargetDataset}})],1)],1),e._v(" "),a("v-card",{attrs:{flat:""}},[a("div",{class:e.$style.heading},[a("v-layout",{attrs:{"align-center":""}},[a("v-flex",{attrs:{xs10:""}},[a("span",{staticClass:"body-2"},[e._v("Tool List")])]),e._v(" "),a("v-flex",{attrs:{xs6:""}},[a("v-btn-toggle",{class:e.$style.toolList,attrs:{value:e.activeToolIndex},on:{change:e.toggleActiveTool}},e._l(e.uiToolList,(function(t){return a("v-tooltip",{key:t.name,attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var s=i.on;return[a("v-btn",e._g({class:e.$style.toolButton,attrs:{small:"",text:"",disabled:-1===e.targetPid}},s),[a("svg-icon",{class:e.$style.toolIcon,attrs:{icon:t.icon}})],1)]}}],null,!0)},[e._v("\n "+e._s(t.name)+"\n ")])})),1)],1)],1)],1),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("div",{class:e.$style.fullWidth},[e.tools.length>0?e._l(e.tools,(function(t,i){return a(t.component,{key:i,tag:"component",attrs:{targetPid:e.targetPid,"tool-data":t.data},on:{remove:function(t){return e.removeTool(i)},saveData:function(t){return e.saveToolData(i,t)}},scopedSlots:e._u([{key:"default",fn:function(i){return[a("div",{class:e.$style.row},[a("span",{class:e.$style.rowAvatar},[a("svg-icon",{class:e.$style.toolIcon,attrs:{icon:t.icon}})],1),e._v(" "),a("div",{class:e.$style.rowContent},[a("span",{class:e.$style.rowContentName,attrs:{title:i.toolName}},[e._v("\n "+e._s(i.toolName||t.name)+"\n ")]),e._v(" "),e._l(i.labels,(function(t){return a("span",{key:t,class:e.$style.rowContentDetails},[e._v("\n "+e._s(t)+": "+e._s(i.measurements[t])+"\n ")])}))],2),e._v(" "),a("div",{class:e.$style.action},[a("v-tooltip",{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(i){var s=i.on;return[a("v-btn",e._g({attrs:{small:"",icon:""},on:{click:function(a){return e.jumpTo(t.data.axis,t.data.lockToSlice)}}},s),[a("v-icon",[e._v("mdi-crosshairs-gps")])],1)]}}],null,!0)},[e._v("\n Jump to slice\n ")])],1),e._v(" "),a("div",{class:e.$style.action},[a("pop-up",{scopedSlots:e._u([{key:"trigger",fn:function(){return[a("v-btn",{attrs:{small:"",icon:""}},[a("v-icon",[e._v("mdi-dots-vertical")])],1)]},proxy:!0},{key:"popup",fn:function(s){var n=s.close;return[a("v-container",{class:[e.$style.container,e.$style.popup],attrs:{"grid-list-md":""}},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("v-text-field",{attrs:{label:"Name",placeholder:t.name,value:i.toolName},on:{input:i.setName}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("div",{staticClass:"body-1"},[e._v("Tool color")]),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("palette-picker",{staticClass:"pt-2",attrs:{palette:e.palette,size:28,value:i.color},on:{input:i.setColor}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("div",{staticClass:"body-1"},[e._v("Text Size")]),e._v(" "),a("v-divider",{class:e.$style.divider})],1),e._v(" "),a("v-flex",{attrs:{xs9:""}},[a("v-slider",{attrs:{min:"8",max:"32",step:"1",dirty:"","hide-details":"",value:i.textSize},on:{input:i.setTextSize}})],1),e._v(" "),a("v-flex",{attrs:{xs3:""}},[a("v-text-field",{attrs:{type:"number",min:"8",max:"32",step:"1",value:i.textSize},on:{input:i.setTextSize}})],1)],1),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("v-layout",{attrs:{"align-center":""}},[a("v-flex",{staticClass:"text-center",attrs:{xs3:""}},[a("v-btn",{attrs:{icon:""},on:{click:n}},[a("v-icon",[e._v("mdi-content-save")])],1)],1),e._v(" "),a("v-spacer"),e._v(" "),a("v-flex",{staticClass:"text-center",attrs:{xs3:""}},[a("v-btn",{attrs:{icon:""},on:{click:function(e){i.remove(),n()}}},[a("v-icon",{attrs:{color:"red"}},[e._v("mdi-delete")])],1)],1)],1)],1)]}}],null,!0)})],1)])]}}],null,!0)})})):[a("div",{staticClass:"pt-2 body-1 teal--text text-center"},[e._v("No measurements yet")])],e._v(" "),a("v-btn",{attrs:{disabled:!e.targetProxy||!e.girderRest||!e.girderRest.user},on:{click:e.upload}},[e._v("\n Upload\n ")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:!e.girderRest||!e.girderRest.user,expression:"!girderRest || !girderRest.user"}],staticClass:"body-2"},[e._v("Log in to upload")])],2)],1)],1)],1)};i._withStripped=!0;var s=a(612),n=a(75),o=a(38),r=a(76),l=a(69),c=a(57),d=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",e._l(e.portalDestinations,(function(t){return a("portal",{key:t,attrs:{to:t},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.viewProxyId;return[e._t("default",null,{viewProxyId:a})]}}],null,!0)})})),1)};d._withStripped=!0;var u={name:"ToolSvgPortal",components:{Portal:a(82).h_},data:()=>({portalDestinations:[]}),mounted(){this.$toolSvgPortal.addEventListener("updateTargets",this.updateTargets),this.updateTargets()},beforeDestroy(){this.$toolSvgPortal.removeEventListener("updateTargets",this.updateTargets)},methods:{updateTargets(){this.portalDestinations=[...this.$toolSvgPortal.targets]}}},p=a(581),v=(0,p.Z)(u,d,[],!1,null,null,null);v.options.__file="src/components/tools/ToolSvgPortal.vue";var m=v.exports,g=a(490);var h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{name:`${e}Tool`,components:{ToolSvgPortal:m},props:{targetPid:{required:!0},toolData:{required:!0}},data(){return{name:`2D ${e}`,finalized:!1,lockToSlice:null,axis:null,widgetPid:-1,targetViewId:-1,color:c.wY[0],textSize:16,measurements:this.initialMeasurements(),measurementLabels:this.getMeasurementLabels(),initialSlicePlacement:null,mouseFocusedViewId:-1,svgComponent:t.svgComponent,viewWidgetProperties:{}}},computed:{targetProxy(){return this.$proxyManager.getProxyById(this.targetPid)},targetView(){return this.$proxyManager.getProxyById(this.targetViewId)},widgetProxy(){return this.$proxyManager.getProxyById(this.widgetPid)},targetRepresentation(){return this.$proxyManager.getRepresentation(this.targetProxy,this.targetView)},displayedMeasurements(){return this.getDisplayedMeasurements()},...(0,s.rn)("widgets",{distanceUnitSymbol:e=>e.distanceUnitSymbol,distanceUnitFactor:e=>e.distanceUnitFactor})},watch:t.watch||{},proxyManagerHooks:{onProxyModified(e){if(e&&e===this.targetRepresentation&&this.widgetProxy&&(this.finalized?this.updateWidgetVisibility():null!==this.initialSlicePlacement&&Math.round(e.getSlice())!==this.initialSlicePlacement?this.emitRemove():this.updateOrientation()),e===this.widgetProxy){1===this.widgetProxy.getWidgetState().getHandleList().length&&-1===this.targetViewId&&null===this.initialSlicePlacement&&(this.targetViewId=this.mouseFocusedViewId,this.initialSlicePlacement=Math.round(this.targetRepresentation.getSlice()),this.constrainPickableViews(this.targetViewId)),!this.finalized&&this.donePlacing()&&(this.lockToSlice=this.initialSlicePlacement,this.axis=this.targetView.getAxis(),this.finalized=!0),this.updateMeasurements(),this.finalized&&this.saveData()}}},mounted(){const t=this.$proxyManager.createProxy("Widgets",e);if(this.widgetPid=t.getProxyId(),this.toolData){const{name:e,lockToSlice:a,points:i,color:s,textSize:n,axis:o}=this.toolData;this.name=e,this.lockToSlice=a,this.color=s,this.textSize=n;const r=this.$proxyManager.getViews().filter((e=>e.isA("vtkView2DProxy"))).find((e=>e.getAxis()===o));if(!r)throw new Error("Cannot restore saved data: invalid axis");this.targetViewId=r.getProxyId();const l=t.getWidgetState();for(let e=0;e{this.setupViewWidget(i),this.setVisibility(i,t,this.axis===t.getAxis());const s=t.getInteractor().onMouseMove((()=>{-1===this.targetViewId&&t.getProxyId()!==this.mouseFocusedViewId&&(this.mouseFocusedViewId=t.getProxyId(),this.updateOrientation(),i.getVisibility()||(this.setVisibility(i,t,!0),e.getAllViewWidgets().filter((e=>{let[t]=e;return t!==i})).forEach((e=>{let[t,a]=e;return this.setVisibility(t,a,!1)})),a.renderWidgets(),this.$proxyManager.renderAllViews()))}),i.getPriority()+1);return a.grabFocus(i),a.enablePicking(),[s.unsubscribe]};e.addToViews(),e.executeViewFuncs({View3D:(e,t,a)=>{t.removeWidget(a)},View2D_X:t,View2D_Y:t,View2D_Z:t})},updateOrientation(){const e=this.targetView||this.$proxyManager.getProxyById(this.mouseFocusedViewId),t=this.$proxyManager.getRepresentation(this.targetProxy,e),a=Math.round(t.getSlice()),i=e.getAxis(),s=this.widgetProxy.getWidget().getManipulator(),n=[0,0,0];n[i]=1;const o=n.map((e=>e*a));s.setUserNormal(n),s.setUserOrigin(o)},toggleLock(){null===this.lockToSlice?this.lockToSlice=Math.round(this.targetRepresentation.getSlice()):this.lockToSlice=null,this.updateWidgetVisibility()},updateWidgetVisibility(){const e=this.widgetProxy.getViewWidget(this.targetView);if(!e)return;const t=Math.round(this.targetRepresentation.getSlice());this.setVisibility(e,this.targetView,null===this.lockToSlice||this.lockToSlice===t),this.renderViewWidgets()},remove(){this.widgetProxy&&(this.widgetProxy.releaseFocus(),this.widgetProxy.removeFromViews(),this.$proxyManager.deleteProxy(this.widgetProxy),this.widgetPid=-1)},setVisibility(e,t,a){const i=t.getProxyId();g.default.set(this.viewWidgetProperties,t.getProxyId(),{...this.viewWidgetProperties[i],visible:a}),e.setVisibility(a)},setName(e){this.name=e,this.saveData()},setColor(e){this.color=e,this.saveData()},setTextSize(e){this.textSize=e,this.saveData()},renderViewWidgets(){this.$proxyManager.getViews().forEach((e=>{const t=e.getReferenceByName("widgetManager");t&&(t.renderWidgets(),e.renderLater())}))},saveData(){const e=this.widgetProxy.getWidgetState(),t={name:this.name,lockToSlice:this.lockToSlice,points:e.getHandleList().map((e=>e.getOrigin())),color:this.color,textSize:this.textSize,axis:this.targetView.getAxis()};this.$emit("saveData",t)},emitRemove(){this.$emit("remove")},constrainPickableViews(e){this.$proxyManager.getViews().forEach((t=>{const a=this.widgetProxy.getViewWidget(t);a&&a.setPickable(t.getProxyId()===e)}))},initialMeasurements(){throw new Error("initialMeasurements not implemented")},getMeasurementLabels(){throw new Error("getMeasurementLabels not implemented")},getDisplayedMeasurements(){throw new Error("getDisplayedMeasurements not implemented")},updateMeasurements(){throw new Error("updateMeasurements not implemented")},donePlacing(){throw new Error("donePlacing not implemented")},setupViewWidget(){throw new Error("setupViewWidget not implemented")},...t.methods||{}},template:'\n
\n \n \n \n \n
\n '}},y=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",[a("svg-circle-handles",{attrs:{"state-labels":["handles","moveHandle"],"widget-state":e.widgetState,"view-proxy-id":e.viewProxyId,stroke:e.color,"stroke-width":"3",fill:"transparent",r:"8"}}),e._v(" "),a("svg-poly-line",{attrs:{"state-labels":["handles","moveHandle"],"widget-state":e.widgetState,"view-proxy-id":e.viewProxyId,stroke:e.color,"stroke-width":"2"}}),e._v(" "),a("svg-label",{attrs:{labels:e.svgLabels,"view-proxy-id":e.viewProxyId,fill:e.color,dx:"12",dy:"-12",styles:{fontSize:e.fontSize+"px"}}})],1):e._e()};y._withStripped=!0;var f=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",e._l(e.points,(function(t,i){return a("circle",e._b({key:i,attrs:{cx:t[0],cy:t[1]}},"circle",e.$attrs,!1))})),0):e._e()};f._withStripped=!0;var b=a(13),x=a(383),w=a(5);const _="$$PixelSpaceMixinData";var S={props:{viewProxyId:{type:String,required:!0}},computed:{view(){return this.$proxyManager.getProxyById(this.viewProxyId)}},created(){this[_]={},this[_].deferred=[],this[_].actor=b.ZP.newInstance(),this[_].mapper=x.ZP.newInstance(),this[_].pointsPd=w.ZP.newInstance(),this[_].mapper.setInputData(this[_].pointsPd),this[_].mapper.setCallback(((e,t,a,i,s)=>{const n=e.map((e=>[e[0],s[1]-e[1],e[2],e[3]])),{deferred:o}=this[_];o.map((e=>{let{resolve:t}=e;return t(n)})),this[_].deferred.length=0})),this[_].actor.setMapper(this[_].mapper)},mounted(){this.view.getRenderer().addActor(this[_].actor)},beforeDestroy(){this.view.getRenderer().removeActor(this[_].actor),this[_].mapper.delete(),this[_].actor.delete()},methods:{mapToPixelSpace(e){const t=this[_].pointsPd.getPoints().getData(),a=[...t,...e.flat()];this[_].pointsPd.getPoints().setData(a,3),this[_].pointsPd.modified();const i=t.length/3,s=a.length/3,n=function(){let e,t;return{promise:new Promise(((a,i)=>{e=a,t=i})),resolve:e,reject:t}}();return this[_].deferred.push(n),n.promise.then((e=>e.slice(i,s)))}}};const P=Symbol("VtkSubscriptionsKey");var k={mounted(){this[P]=[]},beforeDestroy(){for(;this[P].length;)this[P].pop().unsubscribe()},methods:{trackVtkSubscription(e){this[P].push(e)}}},C={name:"SvgCircleHandles",mixins:[S,k],props:{visible:{type:Boolean,default:!0},stateLabels:{type:Array,required:!0},widgetState:{type:Object,required:!0},viewProxyId:{type:String,required:!0}},data:()=>({points:[]}),mounted(){this.trackVtkSubscription(this.widgetState.onModified(this.updatePoints)),this.updatePoints()},methods:{async updatePoints(){const e=this.stateLabels.flatMap((e=>this.widgetState.getStatesWithLabel(e))).filter(Boolean).filter((e=>e.isVisible())).flatMap((e=>e.getOrigin()));this.points=await this.mapToPixelSpace(e)}}},V=(0,p.Z)(C,f,[],!1,null,null,null);V.options.__file="src/components/tools/MeasurementTools/svg/SvgCircleHandles.vue";var I=V.exports,T=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",e._l(e.lines,(function(t,i){return a("line",e._b({key:i,attrs:{x1:t[0][0],y1:t[0][1],x2:t[1][0],y2:t[1][1]}},"line",e.$attrs,!1))})),0):e._e()};T._withStripped=!0;var $={name:"SvgPolyLine",mixins:[S,k],props:{visible:{type:Boolean,default:!0},stateLabels:{type:Array,required:!0},widgetState:{type:Object,required:!0},viewProxyId:{type:String,required:!0}},data:()=>({points:[]}),computed:{lines(){const e=[];for(let t=0;tthis.widgetState.getStatesWithLabel(e))).filter(Boolean).filter((e=>e.isVisible())).flatMap((e=>e.getOrigin()));this.points=await this.mapToPixelSpace(e)}}},D=(0,p.Z)($,T,[],!1,null,null,null);D.options.__file="src/components/tools/MeasurementTools/svg/SvgPolyLine.vue";var M=D.exports,L=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",e._l(e.svgSpaceLabels,(function(t,i){return a("text",e._b({key:i,style:e.styles,attrs:{abc:JSON.stringify(e.styles),x:t.x,y:t.y}},"text",e.$attrs,!1),[e._v("\n "+e._s(t.text)+"\n ")])})),0):e._e()};L._withStripped=!0;var Z={name:"SvgLabel",mixins:[S],props:{visible:{type:Boolean,default:!0},labels:{type:Array,default:()=>[]},viewProxyId:{type:String,required:!0},styles:{type:Object,default:()=>({})}},data:()=>({svgSpaceLabels:[]}),watch:{labels(){this.updatePoints(),this.view.renderLater()}},mounted(){this.updatePoints()},methods:{async updatePoints(){const e=this.labels.flatMap((e=>e.xyz)),t=await this.mapToPixelSpace(e);this.svgSpaceLabels=t.map(((e,t)=>({x:e[0],y:e[1],text:this.labels[t].text})))}}},O=(0,p.Z)(Z,L,[],!1,null,null,null);O.options.__file="src/components/tools/MeasurementTools/svg/SvgLabel.vue";var R=O.exports,B={name:"AngleSvg",components:{SvgCircleHandles:I,SvgPolyLine:M,SvgLabel:R},mixins:[k],props:{finalized:Boolean,widgetState:{type:Object,required:!0},visible:{type:Boolean,default:!0},viewProxyId:{type:String,required:!0},toolName:{type:String,required:!0},color:{type:String,required:!0},textSize:{type:Number,required:!0},measurements:{type:Object,required:!0},labels:{type:Array,required:!0}},data:()=>({svgLabels:[]}),computed:{angleValue(){return this.measurements[this.labels[0]]},fontSize(){return this.textSize*(window.devicePixelRatio||1)}},watch:{angleValue(){this.updateLabels()}},mounted(){this.trackVtkSubscription(this.widgetState.onModified(this.updateLabels)),this.updateLabels()},methods:{updateLabels(){const e=this.widgetState.getHandleList().map((e=>e.getOrigin()));3===e.length&&(this.svgLabels=[{xyz:e[1],text:this.angleValue}])}}},A=(0,p.Z)(B,y,[],!1,null,null,null);A.options.__file="src/components/tools/MeasurementTools/svg/AngleSvg.vue";var F=h("Angle",{svgComponent:A.exports,methods:{initialMeasurements:()=>({angle:0}),getMeasurementLabels:()=>["Angle"],getDisplayedMeasurements(){return{Angle:`${this.measurements.angle.toFixed(2)}°`}},updateMeasurements(){const e=this.widgetProxy.getWidget();this.measurements.angle=180*e.getAngle()/Math.PI},donePlacing(){return 3===this.widgetProxy.getWidgetState().getHandleList().length},setupViewWidget(e){e.setHandleVisibility(!1)}}}),N=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",[a("svg-circle-handles",{attrs:{"state-labels":["handles","moveHandle"],"widget-state":e.widgetState,"view-proxy-id":e.viewProxyId,stroke:e.color,"stroke-width":"3",fill:"transparent",r:"8"}}),e._v(" "),a("svg-poly-line",{attrs:{"state-labels":["handles","moveHandle"],"widget-state":e.widgetState,"view-proxy-id":e.viewProxyId,stroke:e.color,"stroke-width":"2"}}),e._v(" "),a("svg-label",{attrs:{labels:e.svgLabels,"view-proxy-id":e.viewProxyId,fill:e.color,dx:"12",dy:"-12",styles:{fontSize:e.fontSize+"px"}}})],1):e._e()};N._withStripped=!0;var E={name:"RulerSvg",components:{SvgCircleHandles:I,SvgPolyLine:M,SvgLabel:R},mixins:[k],props:{finalized:Boolean,widgetState:{type:Object,required:!0},visible:{type:Boolean,default:!0},viewProxyId:{type:String,required:!0},toolName:{type:String,required:!0},color:{type:String,required:!0},textSize:{type:Number,required:!0},measurements:{type:Object,required:!0},labels:{type:Array,required:!0}},data:()=>({svgLabels:[]}),computed:{rulerValue(){return this.measurements[this.labels[0]]},fontSize(){return this.textSize*(window.devicePixelRatio||1)}},watch:{angleValue(){this.updateLabels()}},mounted(){this.trackVtkSubscription(this.widgetState.onModified(this.updateLabels)),this.updateLabels()},methods:{updateLabels(){const e=this.widgetState.getHandleList().map((e=>e.getOrigin()));2===e.length&&(this.svgLabels=[{xyz:e[0],text:this.rulerValue}])}}},j=(0,p.Z)(E,N,[],!1,null,null,null);j.options.__file="src/components/tools/MeasurementTools/svg/RulerSvg.vue";var G=h("Ruler",{svgComponent:j.exports,methods:{initialMeasurements:()=>({length:0}),getMeasurementLabels:()=>["Length"],getDisplayedMeasurements(){return{Length:`${(this.measurements.length*(this.distanceUnitFactor||1)).toFixed(2)} ${this.distanceUnitSymbol||""}`}},updateMeasurements(){const e=this.widgetProxy.getWidget();this.measurements.length=e.getDistance()},donePlacing(){return 2===this.widgetProxy.getWidgetState().getHandleList().length},setupViewWidget(e){e.setHandleVisibility(!1)}},watch:{distanceUnitSymbol(){this.widgetProxy.modified()},distanceUnitFactor(){this.widgetProxy.modified()}}}),z=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.visible?a("g",[a("svg-circle-handles",{attrs:{"state-labels":["handles","moveHandle"],"widget-state":e.widgetState,"view-proxy-id":e.viewProxyId,stroke:e.color,"stroke-width":"3",fill:"transparent",r:"8"}}),e._v(" "),a("svg-label",{attrs:{labels:e.svgLabels,"view-proxy-id":e.viewProxyId,fill:e.color,dx:"12",dy:"-12",styles:{fontSize:e.fontSize+"px"}}})],1):e._e()};z._withStripped=!0;var U={name:"TextSvg",components:{SvgCircleHandles:I,SvgLabel:R},mixins:[k],props:{finalized:Boolean,widgetState:{type:Object,required:!0},visible:{type:Boolean,default:!0},viewProxyId:{type:String,required:!0},toolName:{type:String,required:!0},color:{type:String,required:!0},textSize:{type:Number,required:!0},measurements:{type:Object,required:!0},labels:{type:Array,required:!0}},data:()=>({svgLabels:[]}),computed:{fontSize(){return this.textSize*(window.devicePixelRatio||1)}},watch:{toolName(){this.updateLabels()}},mounted(){this.trackVtkSubscription(this.widgetState.onModified(this.updateLabels)),this.updateLabels()},methods:{updateLabels(){const e=this.widgetState.getHandleList().map((e=>e.getOrigin()));1===e.length&&(this.svgLabels=[{xyz:e[0],text:this.toolName}])}}},W=(0,p.Z)(U,z,[],!1,null,null,null);W.options.__file="src/components/tools/MeasurementTools/svg/TextSvg.vue";const H=[{name:"2D Angle",icon:"angle-tool",component:F},{name:"2D Ruler",icon:"length-tool",component:G},{name:"2D Text",icon:"text-tool",component:h("Text",{svgComponent:W.exports,watch:{name(){this.updateMeasurements()}},methods:{initialMeasurements:()=>({}),getMeasurementLabels:()=>[],getDisplayedMeasurements:()=>({}),updateMeasurements(){},donePlacing(){return 1===this.widgetProxy.getWidgetState().getHandleList().length},setupViewWidget(e){e.setHandleVisibility(!1)}}})}],K={};H.forEach((e=>{K[e.component.name]=e}));var q={name:"MeasurementTools",props:["enabled"],components:{PopUp:n.Z,PalettePicker:o.Z,SvgIcon:l.Z,SourceSelect:r.Z},inject:["$notify","girderRest"],data:()=>({uiToolList:H,activeToolIndex:void 0,activeToolId:-1,targetPid:-1,pendingTool:null,palette:c.wY}),computed:{...(0,s.rn)("widgets",["measurements"]),tools(){let e=[];if(this.measurements[this.targetPid]){const t=this.measurements[this.targetPid];e=e.concat(t.map((e=>({...K[e.componentName],data:e.data}))))}return this.pendingTool&&(e=e.concat(this.pendingTool)),e},targetProxy(){return this.$proxyManager.getProxyById(this.targetPid)}},watch:{enabled(e){e?this.enableActiveTool():this.clearActiveTool()},targetPid(){this.enabled&&this.clearActiveTool()}},methods:{...(0,s.nv)("widgets",["addMeasurementTool","removeMeasurementTool","updateMeasurementTool"]),filterImageData:e=>"TrivialProducer"===e.getProxyName()&&"vtkImageData"===e.getType(),setTargetDataset(e){this.targetPid=e},toggleActiveTool(e){this.enabled?void 0===e?this.$emit("enable",!1):(this.removeTool(this.activeToolIndex),this.activeToolIndex=e,this.enableActiveTool()):void 0!==e&&(this.activeToolIndex=e,this.$emit("enable",!0))},enableActiveTool(){-1!==this.targetPid&&void 0!==this.activeToolIndex&&(this.pendingTool=H[this.activeToolIndex])},clearActiveTool(){this.pendingTool=null,this.activeToolIndex=void 0,this.activeToolId=-1},removeTool(e){this.pendingTool&&e===this.tools.length-1?(this.pendingTool=null,this.clearActiveTool()):this.removeMeasurementTool({datasetId:this.targetPid,index:e})},jumpTo(e,t){if(null!==t){const a=this.$proxyManager.getViews().find((t=>t.getAxis&&t.getAxis()===e));if(a){const e=a.getRepresentations().find((e=>e.getInput()===this.targetProxy));e&&e.setSlice(t)}}},saveToolData(e,t){this.pendingTool&&e===this.tools.length-1?(this.addMeasurementTool({datasetId:this.targetPid,componentName:this.pendingTool.component.name,data:t}),this.pendingTool=null,this.$emit("enable",!1)):this.updateMeasurementTool({datasetId:this.targetPid,index:e,data:t})},upload(){this.targetProxy&&setTimeout((()=>{this.$root.$emit("girder_upload_measurements",this.targetPid)}),10)}}},Y={container:"MeasurementTools-container-T9yiM",fullWidth:"MeasurementTools-fullWidth-jg_o5",heading:"MeasurementTools-heading-x9G8M",popup:"MeasurementTools-popup-Rgjca",toolButton:"MeasurementTools-toolButton-AuiAl",tools:"MeasurementTools-tools-Zplkp",toolIcon:"MeasurementTools-toolIcon-_ACfO",row:"MeasurementTools-row-IsEDx",rowAvatar:"MeasurementTools-rowAvatar-AoIB_",rowContent:"MeasurementTools-rowContent-OAflc",rowContentName:"MeasurementTools-rowContentName-qZi21",rowContentDetails:"MeasurementTools-rowContentDetails-IT3d5",action:"MeasurementTools-action-pSwKW",toolIconOverlay:"MeasurementTools-toolIconOverlay-PpV_8"},X=a(3),J=a.n(X),Q=a(582),ee=a(667),te=a(601),ae=a(637),ie=a(644),se=a(608),ne=a(610),oe=a(611),re=a(652),le=a(653),ce=a(634),de=a(654);e=a.hmd(e);var ue={};e.hot,e.hot;var pe=(0,p.Z)(q,i,[],!1,(function(e){ue.$style=Y.locals||Y,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return ue.$style}})}),null,null);J()(pe,{VBtn:Q.Z,VBtnToggle:ee.Z,VCard:te.Z,VContainer:ae.Z,VDivider:ie.Z,VFlex:se.Z,VIcon:ne.Z,VLayout:oe.Z,VSlider:re.Z,VSpacer:le.Z,VTextField:ce.Z,VTooltip:de.Z}),pe.options.__file="src/components/tools/MeasurementTools/index.vue";var ve=pe.exports},168:function(e,t,a){"use strict";a.d(t,{Z:function(){return R}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("source-select",{attrs:{label:"Target volume",filterFunc:e.filterImages,bindToActiveSource:"",disabled:e.running},on:{input:e.setTargetImage}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-menu",{attrs:{"offset-x":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-select",{staticStyle:{overflow:"hidden","text-overflow":"ellipses"},attrs:{label:"Select/create an output image","append-outer-icon":"mdi-dots-vertical",items:e.imageList,"item-text":"name","item-value":"proxyId",disabled:!e.targetImage||e.running,value:e.outputImageSelection},on:{input:e.setOutputImage,"click:append-outer":i.click}})]}}])},[e._v(" "),a("v-list",[e.outputImageSelection?[a("v-list-item",{on:{click:e.editOutputImageName}},[a("v-list-item-title",[e._v("Edit Name")])],1),e._v(" "),a("v-list-item",{on:{click:e.deleteOutputImage}},[a("v-list-item-title",[e._v("Delete")])],1)]:[a("v-list-item",[a("v-list-item-title",[e._v("(no image selected)")])],1)]],2)],1)],1),e._v(" "),e.editingOutputName?[a("v-flex",{attrs:{xs10:""}},[a("v-text-field",{attrs:{label:"Renaming image"},on:{keydown:function(t){if(!t.type.indexOf("key")&&13!==t.keyCode)return null;e.editingOutputName=!1}},model:{value:e.editableOutputImageName,callback:function(t){e.editableOutputImageName=t},expression:"editableOutputImageName"}})],1),e._v(" "),a("v-flex",{staticClass:"text-center",attrs:{xs2:""}},[a("v-btn",{attrs:{icon:""},on:{click:function(t){e.editingOutputName=!1}}},[a("v-icon",[e._v("mdi-content-save")])],1)],1)]:e._e()],2)],1),e._v(" "),a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs10:""}},[a("v-slider",{attrs:{label:"Radius",min:"1",max:"20",step:"1",disabled:e.running,"hide-details":""},model:{value:e.blurRadius,callback:function(t){e.blurRadius=t},expression:"blurRadius"}})],1),e._v(" "),a("v-flex",{attrs:{xs2:""}},[a("v-text-field",{attrs:{type:"number",min:"1",max:"20",disabled:e.running,step:"1"},model:{value:e.blurRadius,callback:function(t){e.blurRadius=t},expression:"blurRadius"}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-btn",{attrs:{text:"",loading:e.running,disabled:e.buttonDisabled},on:{click:e.runBlur},scopedSlots:e._u([{key:"loader",fn:function(){return[a("v-progress-circular",{attrs:{indeterminate:"",size:"24",width:"3"}}),e._v(" "),a("span",{staticClass:"ml-2"},[e._v("Running...")])]},proxy:!0}])},[a("v-icon",{attrs:{left:""}},[e._v("mdi-blur")]),e._v(" "),e._v("\n Blur Image\n ")],1)],1)],1)],1),e._v(" "),e.error?a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("v-alert",{attrs:{type:"error",dismissible:""},on:{input:function(t){e.error=null}}},[e._v("\n Median filter error: "+e._s(e.error.message)+"\n ")])],1)],1)],1):e._e(),e._v(" "),e.snackbar.show?a("portal",{attrs:{selector:"#app-portal-mount"}},[a("v-snackbar",{attrs:{top:"",color:e.snackbar.type,timeout:6e3},model:{value:e.snackbar.show,callback:function(t){e.$set(e.snackbar,"show",t)},expression:"snackbar.show"}},[e._v("\n "+e._s(e.snackbar.msg)+"\n "),a("v-btn",{attrs:{dark:"",text:""},on:{click:function(t){e.snackbar.show=!1}}},[e._v("close")])],1)],1):e._e()],1)};i._withStripped=!0;var s=a(518),n=a(59),o=a.n(n),r=a(9),l=a(78),c=a(382),d=a(76),u=a(30);const{vtkErrorMacro:p}=r.ZP,v=-2;var m={name:"MedianFilter",components:{SourceSelect:d.Z,Portal:c.h_},props:["enabled"],data:()=>({targetImageId:-1,outputImageId:-1,imageList:[],blurRadius:1,running:!1,webWorker:null,error:null,editingOutputName:!1,editableOutputImageName:"",snackbar:{show:!1,type:"",msg:""}}),computed:{targetImage(){return this.$proxyManager.getProxyById(this.targetImageId)},outputImage(){return this.$proxyManager.getProxyById(this.outputImageId)},outputImageSelection(){return this.outputImage?{name:this.outputImage.getName(),proxyId:this.outputImageId}:null},buttonDisabled(){return this.running||!this.outputImage}},watch:{targetImageId(){this.targetImageId===this.outputImageId&&(this.outputImageId=-1),this.refreshImageList()},outputImage(){this.outputImage?this.editableOutputImageName=this.outputImage.getName():this.editableOutputImageName=""},editableOutputImageName(e){this.outputImage&&this.outputImage.setName(e)}},proxyManagerHooks:{onProxyModified(){this.refreshImageList()},onProxyCreated(){this.refreshImageList()},onProxyDeleted(e){let{proxyId:t}=e;t===this.targetImageId&&(this.targetImageId=-1),t===this.outputImageId&&(this.outputImageId=-1)}},mounted(){this.refreshImageList()},methods:{filterImages:e=>"TrivialProducer"===e.getProxyName()&&"vtkImageData"===e.getType(),setTargetImage(e){this.targetImageId=e},setOutputImage(e){if(e===v){const e=this.createOutputImageProxy();this.outputImageId=e.getProxyId()}else this.outputImageId=e;this.editingOutputName=!1},refreshImageList(){const e=this.$proxyManager.getSources().filter((e=>e.getProxyId()!==this.targetImageId)).map((e=>({name:e.getName(),proxyId:e.getProxyId()})));this.imageList=[{name:"Create image",proxyId:v}].concat(e)},createOutputImageProxy(){return this.$proxyManager.createProxy("Sources","TrivialProducer",{name:`Median filter of ${this.targetImage.getName()}`})},runBlur(){const e=l.Z.convertVtkToItkImage(this.targetImage.getDataset());e.data=e.data.slice(0),this.running=!0;const t=String(this.blurRadius);(0,s.Z)(this.webWorker,"itkfiltering",["medianfilter","input.json","output.json",t],[{path:"output.json",type:o().Image}],[{path:"input.json",type:o().Image,data:e}]).then((e=>{if(this.webWorker=e.webWorker,!this.outputImage){const e=this.createOutputImageProxy();this.outputImageId=e.getProxyId()}const t=e.outputs[0].data;t.data=new Float32Array(t.data);const a=l.Z.convertItkToVtkImage(t);this.outputImage.setInputData(a),this.targetImage.getKey("girderProvenance")&&this.outputImage.setKey("girderProvenance",this.targetImage.getKey("girderProvenance")),(0,u._3)(this.$proxyManager,this.outputImage),this.$proxyManager.renderAllViews(),this.running=!1,this.showSnack({type:"success",msg:"Median filter done!"})})).catch((e=>{p(`Median filter error: ${e.message}`),this.error=e,this.showSnack({type:"error",msg:"Median filter error!"})}))},showSnack(e){let{type:t,msg:a}=e;this.snackbar.show=!0,this.snackbar.type=t,this.snackbar.msg=a},editOutputImageName(){this.outputImage&&(this.editingOutputName=!this.editingOutputName)},deleteOutputImage(){this.$proxyManager.deleteProxy(this.outputImage)}}},g={container:"MedianFilter-container-Bl5Bg"},h=a(581),y=a(3),f=a.n(y),b=a(668),x=a(582),w=a(637),_=a(608),S=a(610),P=a(611),k=a(647),C=a(641),V=a(646),I=a(638),T=a(599),$=a(640),D=a(652),M=a(666),L=a(634);e=a.hmd(e);var Z={};e.hot,e.hot;var O=(0,h.Z)(m,i,[],!1,(function(e){Z.$style=g.locals||g,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return Z.$style}})}),null,null);f()(O,{VAlert:b.Z,VBtn:x.Z,VContainer:w.Z,VFlex:_.Z,VIcon:S.Z,VLayout:P.Z,VList:k.Z,VListItem:C.Z,VListItemTitle:V.V9,VMenu:I.Z,VProgressCircular:T.Z,VSelect:$.Z,VSlider:D.Z,VSnackbar:M.Z,VTextField:L.Z}),O.options.__file="src/components/tools/MedianFilter/index.vue";var R=O.exports},166:function(e,t,a){"use strict";a.d(t,{Z:function(){return U}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-container",{class:e.$style.container},[a("v-layout",{attrs:{wrap:"","align-center":""}},[a("v-flex",{attrs:{xs12:""}},[a("source-select",{attrs:{label:"Select a Base Image",filterFunc:e.filterImageData,bindToActiveSource:"",hideIfOneDataset:""},on:{input:e.setTargetVolume}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-menu",{attrs:{"offset-x":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-select",{staticStyle:{overflow:"hidden","text-overflow":"ellipses"},attrs:{label:"Select a Labelmap","append-outer-icon":"mdi-dots-vertical",items:e.labelmaps,"item-text":"name","item-value":"sourceId",disabled:-1===e.targetImageId,value:e.labelmapSelection},on:{input:e.setLabelMap,"click:append-outer":i.click}})]}}])},[e._v(" "),a("v-list",[e.labelmapSelection?[a("v-list-item",{on:{click:e.editName}},[a("v-list-item-title",[e._v("Edit Name")])],1),e._v(" "),a("v-list-item",{on:{click:e.deleteLabelmap}},[a("v-list-item-title",[e._v("Delete")])],1)]:[a("v-list-item",[a("v-list-item-title",[e._v("(no labelmap selected)")])],1)]],2)],1)],1),e._v(" "),e.editingName?[a("v-flex",{attrs:{xs10:""}},[a("v-text-field",{attrs:{label:"Renaming labelmap"},model:{value:e.editableLabelmapName,callback:function(t){e.editableLabelmapName=t},expression:"editableLabelmapName"}})],1),e._v(" "),a("v-flex",{staticClass:"text-center",attrs:{xs2:""}},[a("v-btn",{attrs:{icon:""},on:{click:function(t){e.editingName=!1}}},[a("v-icon",[e._v("mdi-content-save")])],1)],1)]:e._e()],2)],1),e._v(" "),a("v-card",{attrs:{color:"teal lighten-5"}},[a("v-card-text",{class:e.$style.paintActions},[a("v-switch",{class:e.$style.paintSwitch,attrs:{value:e.enabled,"hide-details":"",label:"Paint Mode",disabled:!e.canPaint},on:{change:function(t){e.$emit("enable",Boolean(t))}}}),e._v(" "),a("v-spacer"),e._v(" "),a("v-btn",{staticClass:"mr-3",attrs:{icon:"",small:"",disabled:!e.canPaint},on:{click:e.undo}},[a("v-icon",[e._v("mdi-undo")])],1),e._v(" "),a("v-btn",{attrs:{icon:"",small:"",disabled:!e.canPaint},on:{click:e.redo}},[a("v-icon",[e._v("mdi-redo")])],1)],1)],1),e._v(" "),a("v-container",{class:e.$style.container,attrs:{"grid-list-md":""}},[a("v-layout",{directives:[{name:"show",rawName:"v-show",value:e.canPaint,expression:"canPaint"}],attrs:{wrap:"","align-center":""}},[a("v-flex",{staticClass:"mt-1",attrs:{xs10:""}},[a("label",{staticClass:"v-label theme--light",attrs:{for:"paint-2D-brush-toggle"}},[e._v("2D Brush")])]),e._v(" "),a("v-flex",{staticClass:"mt-1",attrs:{xs2:""}},[a("v-switch",{staticClass:"mt-n1 pt-0",attrs:{id:"paint-2D-brush-toggle","hide-details":""},model:{value:e.brush2D,callback:function(t){e.brush2D=t},expression:"brush2D"}})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-slider",{attrs:{label:"Radius",min:"1",max:e.brushSizeMax,step:"1",dirty:"","hide-details":"",value:e.radius},on:{input:e.setRadius},scopedSlots:e._u([{key:"append",fn:function(){return[a("v-text-field",{staticClass:"mt-n1 pt-0",attrs:{type:"number",min:"1",max:e.brushSizeMax,step:"1","hide-details":"","single-line":"",value:e.radius},on:{input:e.setRadius}})]},proxy:!0}])})],1),e._v(" "),a("v-flex",{attrs:{xs12:""}},[a("v-list",{class:e.$style.fullWidth},[a("v-subheader",{class:e.$style.headerRow},[a("span",{staticClass:"black--text subtitle-1 body-2"},[e._v("Labels")]),e._v(" "),a("v-spacer"),e._v(" "),a("v-btn",{class:e.$style.lowercaseText,attrs:{text:""},on:{click:e.addLabel}},[a("v-icon",{attrs:{small:"",color:"blue"}},[e._v("mdi-plus-circle")]),e._v(" "),a("span",{staticClass:"pl-2 grey--text text--darken-2"},[e._v("Add Label")])],1)],1),e._v(" "),a("v-radio-group",{class:e.$style.radioGroup,attrs:{value:e.activeLabel},on:{change:e.setLabel}},[e._l(e.colormapArray,(function(t,i){return[a("v-divider",{key:"divider_"+i}),e._v(" "),a("v-list-item",{key:t.label},[a("v-list-item-action",[a("v-radio",{class:e.$style.activeRadio,attrs:{value:t.label}})],1),e._v(" "),a("v-list-item-content",{class:e.$style.listRow},[0===t.label?[a("div",{class:e.$style.colorBoxBackground},[a("div",{class:e.$style.colorBox,style:e.colorToBackgroundCSS(e.colormapArray,0)})]),e._v(" "),a("span",{staticClass:"pl-1"},[e._v("Eraser")])]:[a("pop-up",{staticClass:"flex-grow-0 flex-shrink-1",scopedSlots:e._u([{key:"trigger",fn:function(){return[a("div",{class:e.$style.colorBoxBackground},[a("div",{class:e.$style.colorBox,style:e.colorToBackgroundCSS(e.colormapArray,i)})])]},proxy:!0},{key:"popup",fn:function(){return[a("div",{class:e.$style.colorPicker},[a("palette-picker",{attrs:{palette:e.palette,size:28,value:e.asHex(t.color)},on:{input:function(a){return e.setLabelColor(t.label,arguments[0])}}}),e._v(" "),a("div",{class:e.$style.opacitySlider},[a("v-slider",{attrs:{label:"Opacity",value:t.opacity,min:0,max:255,step:1},on:{input:function(a){return e.setLabelOpacity(t.label,arguments[0])}}})],1)],1)]},proxy:!0}],null,!0)}),e._v(" "),a("span",{staticClass:"pl-1"},[e._v("Label "+e._s(t.label))])]],2),e._v(" "),a("v-list-item-action",[0!==t.label?a("v-btn",{class:e.$style.deleteButton,attrs:{icon:""},on:{click:function(a){return e.deleteLabel(t.label)}}},[a("v-icon",[e._v("mdi-delete")])],1):e._e()],1)],1)]})),e._v(" "),a("v-divider")],2)],1)],1),e._v(" "),a("v-btn",{attrs:{disabled:!e.girderRest||!e.girderRest.user},on:{click:function(t){return e.upload()}}},[e._v("\n Upload\n ")]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:!e.girderRest||!e.girderRest.user,expression:"!girderRest || !girderRest.user"}],staticClass:"body-2"},[e._v("Log in to upload")])],1)],1)],1)};i._withStripped=!0;var s=a(612),n=a(4),o=a(517),r=a(66),l=a(381),c=a(38),d=a(75),u=a(76),p=a(30),v=a(57);const m="PaintToolSync",g=-2;function h(e){const t=e.slice(1),a=[];for(let e=0;e({targetImageId:-1,activeLabelmapId:-1,internalLabelmaps:[],widgetId:-1,editingName:!1,editableLabelmapName:"",brushSizeMax:100,radius:5,brush2D:!1,colormapArray:[]}),computed:{...(0,s.rn)("widgets",{imageToLabelmaps:e=>e.imageToLabelmaps,labelmapToImage:e=>e.labelmapToImage,labelmapStates:e=>e.labelmapStates}),labelmaps(){return[{name:"Create new labelmap",sourceId:g}].concat(this.internalLabelmaps)},activeLabel(){return this.activeLabelmapState?this.activeLabelmapState.selectedLabel:-1},activeLabelmapProxy(){return this.$proxyManager.getProxyById(this.activeLabelmapId)},activeLabelmapParentImageProxy(){return this.$proxyManager.getProxyById(this.labelmapToImage[this.activeLabelmapId])},activeLabelmapState(){return this.labelmapStates[this.activeLabelmapId]},targetImageProxy(){return this.$proxyManager.getProxyById(this.targetImageId)},labelmapSelection(){return this.activeLabelmapProxy?{name:this.editableLabelmapName||this.activeLabelmapProxy.getName(),sourceId:this.activeLabelmapProxy.getProxyId()}:null},canPaint(){return this.targetImageId>-1&&this.activeLabelmapId>-1},paintProxy(){return this.$proxyManager.getProxyById(this.widgetId)}},watch:{editableLabelmapName(e){this.activeLabelmapProxy&&this.activeLabelmapProxy.setName(e)},activeLabel(e){this.filter&&this.filter.setLabel(e)},radius(e){this.filter&&this.filter.setRadius(e),this.paintProxy&&this.paintProxy.getWidget().setRadius(e)},enabled(e){e?this.enablePainting():this.disablePainting()},activeLabelmapProxy(){if(this.activeLabelmapProxy){this.editableLabelmapName=this.activeLabelmapProxy.getName();const e=this.activeLabelmapProxy.getDataset().getDimensions();this.brushSizeMax=Math.floor(Math.max(...e)/2);const t=this.activeLabelmapProxy.getDataset();this.labelmapSub.sub(t.onModified(this.updateColorMap)),this.updateColorMap()}else this.labelmapSub.unsub();this.editingName=!1}},proxyManagerHooks:{onProxyModified(e){if(this.enabled&&"Representations"===e.getProxyGroup()&&e.getInput()===this.activeLabelmapProxy&&this.mousedViewId>-1){const e=this.$proxyManager.getProxyById(this.mousedViewId);this.updateHandleSlice(e)}if("Sources"===e.getProxyGroup()&&"LabelMap"===e.getProxyName()){const t=this.internalLabelmaps.find((t=>t.sourceId===e.getProxyId()));t&&(t.name=e.getName())}},onProxyCreated(e){let{proxy:t,proxyGroup:a,proxyName:i,proxyId:s}=e;"Sources"===a&&"LabelMap"===i&&this.internalLabelmaps.push({name:t.getName(),sourceId:s})},onProxyDeleted(e){let{proxyGroup:t,proxyName:a,proxyId:i}=e;if("Sources"===t&&"LabelMap"===a){const e=this.internalLabelmaps.findIndex((e=>e.sourceId===i));e>-1&&this.internalLabelmaps.splice(e,1)}i===this.activeLabelmapId?(this.activeLabelmapId=-1,this.$emit("enable",!1)):i===this.targetImageId&&(this.targetImageId=-1,this.$emit("enable",!1))}},created(){this.palette=v.oe,this.mousedViewId=-1,this.filter=null,this.labelmapSub=(0,p.y5)(),this.internalLabelmaps=this.$proxyManager.getSources().filter((e=>"LabelMap"===e.getProxyName())).map((e=>({name:e.getName(),sourceId:e.getProxyId()})))},beforeDestroy(){this.enabled&&this.disablePainting(),this.labelmapSub.unsub()},methods:{...(0,s.nv)({addLabelmapToImage:(e,t,a)=>e("widgets/addLabelmapToImage",{imageId:a,labelmapId:t}),setLabelmapState:(e,t,a)=>e("widgets/setLabelmapState",{labelmapId:t,labelmapState:a}),deleteLabelmapInternal:(e,t)=>e("widgets/deleteLabelmap",t)}),setRadius(e){this.radius=Math.max(1,Math.round(e))},setLabel(e){const t=this.activeLabelmapState;t&&(t.selectedLabel=Number(e))},editName(){this.labelmapSelection&&(this.editingName=!this.editingName)},deleteLabelmap(){this.activeLabelmapProxy&&(this.deleteLabelmapInternal(this.activeLabelmapProxy.getProxyId()),this.$proxyManager.deleteProxy(this.activeLabelmapProxy))},filterImageData:e=>"TrivialProducer"===e.getProxyName()&&"vtkImageData"===e.getType(),asHex:e=>`#${e.map((e=>`00${e.toString(16)}`.slice(-2))).join("")}`,setTargetVolume(e){this.targetImageId=e,this.$emit("enable",!1)},setLabelMap(e){if(this.filter=o.ZP.newInstance(),e===g){const e=this.targetImageProxy.getDataset();this.filter.setBackgroundImage(e);const t=this.$proxyManager.createProxy("Sources","LabelMap"),a=t.getProxyId();this.activeLabelmapId=a,this.addLabelmapToImage(a,this.targetImageId);const i=this.imageToLabelmaps[this.targetImageId].length,s={selectedLabel:1,lastColorIndex:0};this.setLabelmapState(a,s);const o=this.targetImageProxy.getName();t.setName(`Labelmap ${i} ${o}`);const r=function(e){const t=l.ZP.newInstance(e.get("spacing","origin","direction"));t.setDimensions(e.getDimensions());const a=new Uint16Array(e.getNumberOfPoints()),i=n.ZP.newInstance({numberOfComponents:1,values:a});return t.getPointData().setScalars(i),t.computeTransforms(),t}(e);r.setLabelColor(s.selectedLabel,h(this.palette[0])),t.setInputData(r),this.filter.setLabelMap(r),(0,p._3)(this.$proxyManager,t),this.$proxyManager.renderAllViews()}else{const t=this.$proxyManager.getProxyById(e);t&&(this.activeLabelmapId=t.getProxyId(),this.filter.setLabelMap(t.getDataset()))}this.filter.setLabel(this.activeLabelmapState.selectedLabel),this.filter.setRadius(this.radius),this.$proxyManager.getViews().forEach((e=>{const t=this.targetImageProxy,a=this.$proxyManager.getRepresentation(t,e);e.bindRepresentationToManipulator&&a&&e.bindRepresentationToManipulator(a)}))},updateColorMap(){const e=this.activeLabelmapProxy;if(e){const t=e.getDataset().getColorMap(),a=(e,t)=>e-t;this.colormapArray=Object.keys(t).sort(a).map((e=>({label:Number(e),color:t[e].slice(0,3),opacity:t[e][3]})))}},setLabelColor(e,t){const a=this.activeLabelmapProxy.getDataset(),i=a.getColorMap()[e],s=h(t);3===s.length&&(a.setLabelColor(e,[...s,i[3]]),this.$proxyManager.renderAllViews())},setLabelOpacity(e,t){const a=this.activeLabelmapProxy.getDataset(),i=a.getColorMap()[e].slice();t&&(i[3]=Number(t),a.setLabelColor(e,i)),this.$proxyManager.renderAllViews()},addLabel(){const e=this.colormapArray.map((e=>e.label));let t=0;for(;e.length;){const a=e.shift();if(a-t>1){t++;break}if(0===e.length){t=a+1;break}t=a}const a=this.activeLabelmapState,i=(a.lastColorIndex+1)%this.palette.length,s=h(this.palette[i]);this.activeLabelmapProxy.getDataset().setLabelColor(t,s),a.lastColorIndex=i,this.setLabel(t)},deleteLabel(e){const t=this.activeLabelmapProxy.getDataset();t.removeLabel(e);const a=t.getPointData().getScalars().getData();for(let t=0;t{e.getInteractor().requestAnimation(m),t.grabFocus(a);const i=a.getPriority()+1,s=e.getInteractor().onMouseMove((()=>{this.mousedViewId!==e.getProxyId()&&(this.mousedViewId=e.getProxyId(),this.updateHandleSlice(e))}),i),n=a.onStartInteractionEvent((()=>{this.brush2D?this.filter.setSlicingMode(r.P["XYZ"[e.getAxis()]]):this.filter.setSlicingMode(r.P.NONE),this.filter.startStroke(),this.filter.addPoint(this.paintProxy.getWidgetState().getTrueOrigin())})),o=a.onInteractionEvent((()=>{a.getPainting()&&this.filter.addPoint(this.paintProxy.getWidgetState().getTrueOrigin())})),l=a.onEndInteractionEvent((()=>{this.filter.addPoint(this.paintProxy.getWidgetState().getTrueOrigin()),this.filter.endStroke()}));return[()=>e.getInteractor().cancelAnimation(m),s.unsubscribe,n.unsubscribe,o.unsubscribe,l.unsubscribe]};e.addToViews(),e.executeViewFuncs({View3D:e=>(e.getInteractor().requestAnimation(m),()=>{e.getInteractor().cancelAnimation(m)}),View2D_X:t,View2D_Y:t,View2D_Z:t})},disablePainting(){this.paintProxy.removeFromViews(),this.$proxyManager.deleteProxy(this.paintProxy),this.widgetId=-1},upload(){setTimeout((()=>{const e=this.activeLabelmapProxy,t=this.activeLabelmapParentImageProxy;e&&t&&(t.getKey("girderProvenance")&&e.setKey("girderProvenance",t.getKey("girderProvenance")),this.$root.$emit("girder_upload_proxy",this.activeLabelmapId))}),10)}}},f={container:"PaintTool-container-K_01H",fullWidth:"PaintTool-fullWidth-ygvJa",labelInput:"PaintTool-labelInput-CX7Np",paintActions:"PaintTool-paintActions-NWnXC",paintSwitch:"PaintTool-paintSwitch-CEy8P",radioGroup:"PaintTool-radioGroup-oAs8K",headerRow:"PaintTool-headerRow-SXk6M",listRow:"PaintTool-listRow-QOnht",lowercaseText:"PaintTool-lowercaseText-Cncdr",colorBoxBackground:"PaintTool-colorBoxBackground-uCP_B",colorBox:"PaintTool-colorBox-MGe3f",colorPicker:"PaintTool-colorPicker-LSW1f",opacitySlider:"PaintTool-opacitySlider-_m6x7",activeRadio:"PaintTool-activeRadio-BOPEG"},b=a(581),x=a(3),w=a.n(x),_=a(582),S=a(601),P=a(607),k=a(637),C=a(644),V=a(608),I=a(610),T=a(611),$=a(647),D=a(641),M=a(642),L=a(646),Z=a(638),O=a(659),R=a(660),B=a(640),A=a(652),F=a(653),N=a(645),E=a(661),j=a(634);e=a.hmd(e);var G={};e.hot,e.hot;var z=(0,b.Z)(y,i,[],!1,(function(e){G.$style=f.locals||f,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return G.$style}})}),null,null);w()(z,{VBtn:_.Z,VCard:S.Z,VCardText:P.ZB,VContainer:k.Z,VDivider:C.Z,VFlex:V.Z,VIcon:I.Z,VLayout:T.Z,VList:$.Z,VListItem:D.Z,VListItemAction:M.Z,VListItemContent:L.km,VListItemTitle:L.V9,VMenu:Z.Z,VRadio:O.Z,VRadioGroup:R.Z,VSelect:B.Z,VSlider:A.Z,VSpacer:F.Z,VSubheader:N.Z,VSwitch:E.Z,VTextField:j.Z}),z.options.__file="src/components/tools/PaintTool/index.vue";var U=z.exports},172:function(e,t,a){"use strict";a.d(t,{Z:function(){return g}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.$style.wrapper},[a("v-btn",{attrs:{text:"",disabled:e.playing||e.isOnFirstFrame,small:""},on:{click:e.firstFrame}},[a("v-icon",[e._v("\n mdi-chevron-double-left\n ")])],1),e._v(" "),a("v-btn",{attrs:{text:"",disabled:e.playing||e.isOnFirstFrame,small:""},on:{click:e.previousFrame}},[a("v-icon",[e._v("\n mdi-chevron-left\n ")])],1),e._v(" "),e.playing?a("v-btn",{attrs:{text:"",small:""},on:{click:e.pause}},[a("v-icon",[e._v("\n mdi-pause\n ")])],1):a("v-btn",{attrs:{text:"",small:"",disabled:e.isOnLastFrame},on:{click:e.play}},[a("v-icon",[e._v("\n mdi-play\n ")])],1),e._v(" "),a("v-btn",{attrs:{text:"",disabled:e.playing||e.isOnLastFrame,small:""},on:{click:e.nextFrame}},[a("v-icon",[e._v("\n mdi-chevron-right\n ")])],1),e._v(" "),a("v-btn",{attrs:{text:"",disabled:e.playing||e.isOnLastFrame,small:""},on:{click:e.lastFrame}},[a("v-icon",[e._v("\n mdi-chevron-double-right\n ")])],1),e._v(" "),a("v-select",{staticClass:"pv-no-select",attrs:{disabled:e.playing,items:e.frames,value:e.currentFrame,dense:"",flat:"","hide-details":""},on:{change:e.setCurrentFrame}})],1)};i._withStripped=!0;var s=a(612),n={name:"AnimationControls",computed:{...(0,s.rn)("animations",{playing:e=>e.playing,currentFrame:e=>e.currentFrame,frames:e=>e.frames}),isOnFirstFrame(){return this.frames.length>0&&this.currentFrame===this.frames[0]},isOnLastFrame(){return this.frames.length>0&&this.currentFrame===this.frames[this.frames.length-1]}},methods:{setCurrentFrame(e){this.setFrameIndex(this.frames.indexOf(e))},...(0,s.nv)("animations",["play","pause","nextFrame","previousFrame","firstFrame","lastFrame","setFrameIndex"])}},o={wrapper:"AnimationControls-wrapper-LJEUM"},r=a(581),l=a(3),c=a.n(l),d=a(582),u=a(610),p=a(640);e=a.hmd(e);var v={};e.hot,e.hot;var m=(0,r.Z)(n,i,[],!1,(function(e){v.$style=o.locals||o,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return v.$style}})}),null,null);c()(m,{VBtn:d.Z,VIcon:u.Z,VSelect:p.Z}),m.options.__file="src/components/widgets/AnimationControls/index.vue";var g=m.exports},164:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var i=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{class:e.$style.container,style:e.style})};i._withStripped=!0;var s={name:"ColorGroup",props:{index:{type:Number,default:0},top:{type:Number,default:0},visible:{type:Boolean,default:!0},colors:{this:Array,default:()=>["#e1002a","#417dc0","#1d9a57","#e9bc2f","#9b3880"]}},computed:{style(){return this.visible?{background:this.colors[this.index%this.colors.length],top:`${this.top}px`}:"display: none;"}}},n={container:"ColorGroup-container-xP4_7"},o=a(581);e=a.hmd(e);var r={};e.hot,e.hot;var l=(0,o.Z)(s,i,[],!1,(function(e){r.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return r.$style}})}),null,null);l.options.__file="src/components/widgets/ColorGroup/index.vue";var c=l.exports},175:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var i=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{on:{dragover:function(t){return t.preventDefault(),e.onDragOver.apply(null,arguments)},dragleave:e.onDragLeave,drop:function(t){return t.preventDefault(),e.onDrop.apply(null,arguments)}}},[e._t("default",null,{dragHover:e.dragHover})],2)};i._withStripped=!0;var s={name:"DragAndDrop",props:{enabled:Boolean},data:()=>({dragHover:!1}),methods:{onDragOver:function(e){if(this.enabled){const t=e.dataTransfer.types;(t&&t instanceof Array?-1!==t.indexOf("Files"):"Files"in t)&&(this.dragHover=!0,null!==this.dragTimeout&&(window.clearTimeout(this.dragTimeout),this.dragTimeout=null))}},onDragLeave:function(){this.enabled&&(this.dragTimeout=window.setTimeout((()=>{this.dragHover=!1,this.dragTimeout=null}),50))},onDrop:function(e){this.enabled&&(this.$emit("drop",Array.from(e.dataTransfer.files)),this.dragHover=!1)}},created(){this.dragTimeout=null}},n=(0,a(581).Z)(s,i,[],!1,null,null,null);n.options.__file="src/components/widgets/DragAndDrop/index.vue";var o=n.exports},173:function(e,t,a){"use strict";a.d(t,{Z:function(){return b}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",{class:e.$style.card,attrs:{flat:""}},[a("v-container",{staticClass:"pa-0",attrs:{"grid-list-xs":""}},[a("v-layout",{attrs:{row:"","align-center":""}},[a("span",{staticClass:"subtitle-2"},[e._v("Rendering")]),e._v(" "),a("v-spacer"),e._v(" "),a("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[a("v-icon",e._g({attrs:{small:""}},i),[e._v("mdi-help-circle")])]}}])},[a("table",{class:e.$style.table},[a("tr",[a("td",{staticClass:"body-2"},[e._v("WebGL")]),e._v(" "),a("td",{staticClass:"body-1"},[e._v(e._s(e.webgl))])]),e._v(" "),a("tr",[a("td",{staticClass:"body-2"},[e._v("Vendor")]),e._v(" "),a("td",{staticClass:"body-1"},[e._v(e._s(e.vendor))])]),e._v(" "),a("tr",[a("td",{staticClass:"body-2"},[e._v("GPU")]),e._v(" "),a("td",{staticClass:"body-1"},[e._v(e._s(e.gpu))])])])])],1)],1),e._v(" "),a("v-divider",{class:e.$style.divider}),e._v(" "),a("div",{class:["js-monitor",e.$style.monitor]})],1)};i._withStripped=!0;var s=a(519);var n={props:{width:{default:268,type:Number},proxyManager:{required:!0}},data:()=>({vendor:"Unknown",gpu:"Unknown",webgl:0,infoDialog:!1}),methods:{onMounted:function(){this.monitor=s.ZP.newInstance({bufferSize:this.width}),this.updateActiveView=()=>{const e=this.proxyManager.getActiveView(),t=e?e.getRenderWindow():null;if(e){const t=e.getOpenGLRenderWindow().getGLInformations(),{UNMASKED_RENDERER:a,UNMASKED_VENDOR:i,WEBGL_VERSION:s}=t;this.vendor=i.value,this.gpu=a.value,this.webgl=s.value}this.monitor.setRenderWindow(t),this.monitor.update()},window.addEventListener("resize",this.monitor.update),this.subscriptions=[this.proxyManager.onModified(this.monitor.update).unsubscribe,this.proxyManager.onActiveViewChange(this.updateActiveView).unsubscribe,()=>window.removeEventListener("resize",this.monitor.update)],this.monitor.setContainer(this.$el.querySelector(".js-monitor")),this.monitor.getFpsMonitorContainer().style.flexDirection="column",this.updateActiveView()}},mounted(){this.$nextTick(this.onMounted)},beforeDestroy:function(){for(this.monitor&&(this.monitor.delete(),this.monitor=null);this.subscriptions.length;)this.subscriptions.pop()()}},o={card:"GPUInformation-card-uYItl",heading:"GPUInformation-heading-_XHR1",divider:"GPUInformation-divider-JhBB2",monitor:"GPUInformation-monitor-Fu0yC",table:"GPUInformation-table-BU0Qk"},r=a(581),l=a(3),c=a.n(l),d=a(601),u=a(637),p=a(644),v=a(610),m=a(611),g=a(653),h=a(654);e=a.hmd(e);var y={};e.hot,e.hot;var f=(0,r.Z)(n,i,[],!1,(function(e){y.$style=o.locals||o,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return y.$style}})}),null,null);c()(f,{VCard:d.Z,VContainer:u.Z,VDivider:p.Z,VIcon:v.Z,VLayout:m.Z,VSpacer:g.Z,VTooltip:h.Z}),f.options.__file="src/components/widgets/GPUInformation/index.vue";var b=f.exports},38:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.$style.wrapper},e._l(e.palette,(function(t){return a("div",{key:t,class:e.$style.item},[a("div",{class:e.$style.blot,style:e.getStyles(t),on:{click:function(a){return e.$emit("input",t)}}},[t.toLowerCase()===e.selectedColor?a("v-icon",{class:e.$style.check,attrs:{size:e.size}},[e._v("\n mdi-check\n ")]):e._e()],1)])})),0)};i._withStripped=!0;var s={name:"PalettePicker",props:{palette:{type:Array,default:()=>[]},size:{type:Number,default:24},value:{type:String,default:""}},computed:{selectedColor(){return this.value.toLowerCase()}},methods:{getStyles(e){return{width:`${this.size}px`,height:`${this.size}px`,background:e}}}},n={wrapper:"PalettePicker-wrapper-Cz9zR",item:"PalettePicker-item-q0Hig",check:"PalettePicker-check-m60ux",blot:"PalettePicker-blot-JTooX"},o=a(581),r=a(3),l=a.n(r),c=a(610);e=a.hmd(e);var d={};e.hot,e.hot;var u=(0,o.Z)(s,i,[],!1,(function(e){d.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return d.$style}})}),null,null);l()(u,{VIcon:c.Z}),u.options.__file="src/components/widgets/PalettePicker/index.vue";var p=u.exports},152:function(e,t,a){"use strict";a.d(t,{Z:function(){return u}});var i=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{class:e.$style.container})};i._withStripped=!0;var s=a(370);let n=null;var o={props:{source:{type:Object},piecewiseFunction:{required:!0,type:Object},proxyManager:{required:!0}},data:()=>({}),methods:{onOpacityChange:function(){if(n)return;n=this.piecewiseWidget;const e=this.piecewiseFunction;if(e){e.setGaussians(this.piecewiseWidget.getGaussians());const t=this.piecewiseWidget.getOpacityRange();e.getLookupTableProxy().setDataRange(...t)}n=null},updateWidget:function(){const e=this.piecewiseFunction;if(e){const t=e.getLookupTableProxy().getLookupTable();this.piecewiseWidget.setGaussians(e.getGaussians()),this.source?this.piecewiseWidget.setDataArray(this.source.getDataset().getPointData().getScalars().getData()):this.piecewiseWidget.setDataArray(Float32Array.from(e.getDataRange())),this.piecewiseWidget.setColorTransferFunction(t),this.subscriptions.push(t.onModified((()=>{if(n)return;n=this.piecewiseWidget;const t=this.piecewiseWidget.getOpacityRange();e.getLookupTableProxy().setDataRange(...t),this.piecewiseWidget.render(),n=null}))),this.piecewiseWidget.render()}},onMounted:function(){this.piecewiseWidget=s.ZP.newInstance({numberOfBins:256,size:[280,150]}),this.piecewiseWidget.updateStyle({backgroundColor:"rgba(255, 255, 255, 0.6)",histogramColor:"rgba(100, 100, 100, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(255, 255, 255)",handleColor:"rgb(50, 150, 50)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:0,padding:10}),this.subscriptions=[],this.widgetSubscriptions=[this.piecewiseWidget.onOpacityChange((()=>{this.onOpacityChange()})),this.piecewiseWidget.onAnimation((e=>{this.piecewiseFunction&&this.proxyManager.setAnimationOnAllViews(e)}))],this.piecewiseWidget.setContainer(this.$el),this.piecewiseWidget.bindMouseListeners(),this.updateWidget(),this.onOpacityChange()}},mounted(){this.$nextTick(this.onMounted)},beforeDestroy:function(){for(;this.widgetSubscriptions.length;)this.widgetSubscriptions.pop().unsubscribe();for(;this.subscriptions.length;)this.subscriptions.pop().unsubscribe();this.piecewiseWidget.unbindMouseListeners(),this.piecewiseWidget.setContainer(null)},updated(){for(;this.subscriptions.length;)this.subscriptions.pop().unsubscribe();this.updateWidget()}},r={container:"PiecewiseFunctionEditor-container-_jIUo"},l=a(581);e=a.hmd(e);var c={};e.hot,e.hot;var d=(0,l.Z)(o,i,[],!1,(function(e){c.$style=r.locals||r,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return c.$style}})}),null,null);d.options.__file="src/components/widgets/PiecewiseFunctionEditor/index.vue";var u=d.exports},75:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"container",class:e.$style.container},[a("div",{on:{click:function(t){e.visible=!e.visible}}},[e._t("trigger"),e._v(" "),a("div",{ref:"anchor",staticStyle:{width:"0",height:"0",margin:"0",padding:"0"}})],2),e._v(" "),e.visible?a("portal",{attrs:{selector:"#app-portal-mount"}},[a("div",{ref:"popup",class:e.$style.popup,style:e.getPositioning()},[e._t("popup",null,{close:e.close})],2)]):e._e()],1)};i._withStripped=!0;var s={name:"PopUp",components:{Portal:a(382).h_},data:()=>({visible:!1}),mounted(){document.addEventListener("mousedown",this.handleMouse,!0),document.addEventListener("keydown",this.handleEsc)},beforeDestroy(){document.removeEventListener("mousedown",this.handleMouse,!0),document.removeEventListener("keydown",this.handleEsc)},methods:{handleMouse(e){if(this.visible){let t=e.target;for(;t&&t!==this.$refs.container&&t!==this.$refs.popup;)t=t.parentElement;null===t&&(this.visible=!1)}},handleEsc(e){this.visible&&27===e.keyCode&&this.close()},getPositioning(){const e=this.$refs.anchor,{top:t,left:a}=e.getBoundingClientRect(),i=window.innerHeight;return t>i/2?{bottom:i-t+"px",left:`${a}px`}:{top:`${t}px`,left:`${a}px`}},close(){this.visible=!1}}},n={container:"PopUp-container-MOF8K",popup:"PopUp-popup-P9jw2"},o=a(581);e=a.hmd(e);var r={};e.hot,e.hot;var l=(0,o.Z)(s,i,[],!1,(function(e){r.$style=n.locals||n,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return r.$style}})}),null,null);l.options.__file="src/components/widgets/PopUp/index.vue";var c=l.exports},76:function(e,t,a){"use strict";a.d(t,{Z:function(){return u}});var i=function(){var e=this,t=e.$createElement;return(e._self._c||t)("v-select",{directives:[{name:"show",rawName:"v-show",value:!e.shouldHide,expression:"!shouldHide"}],attrs:{label:e.label,items:e.sourceList,"item-text":"name","item-value":"proxyId",disabled:e.disabled,value:e.selection},on:{input:e.setInternalValue}})};i._withStripped=!0;function s(e){return{name:e.getName(),proxyId:e.getProxyId()}}var n={name:"SourceSelect",props:{filterFunc:{type:Function,default:()=>()=>!0},label:{type:String,default:()=>""},bindToActiveSource:{type:Boolean,default:()=>!1},hideIfOneDataset:{type:Boolean,default:()=>!1},value:{default:()=>-1},disabled:{type:Boolean,default:()=>!1}},data:()=>({sourceList:[],internalValue:-1}),computed:{selection(){const e=this.$proxyManager.getProxyById(this.internalValue);return e&&"Sources"===e.getProxyGroup()?s(e):null},shouldHide(){return this.hideIfOneDataset&&this.sourceList.length<=1}},watch:{value(e){this.internalValue=e}},mounted(){const e=this.$proxyManager.getActiveSource();e&&this.setInternalValue(e.getProxyId()),this.updateSourceList()},proxyManagerHooks:{onProxyModified(e){e.getProxyId()===this.waitForActiveDataset&&(this.waitForActiveDataset=null,this.setInternalValue(e.getProxyId())),this.updateSourceList()},onActiveSourceChange(e){if(this.bindToActiveSource)if(e){if(e.getProxyId()!==this.internalValue){const t=e.getProxyId();e.getDataset()?this.setInternalValue(t):this.waitForActiveDataset=t}}else this.setInternalValue(-1)},onProxyRegistrationChange(e){const{proxyGroup:t}=e;"Sources"===t&&this.updateSourceList()}},methods:{updateSourceList(){const e=this.$proxyManager.getSources().filter((e=>e&&!!e.getDataset()&&this.filterFunc(e)));this.sourceList=e.map((e=>s(e)))},setInternalValue(e){e!==this.internalValue&&(this.internalValue=e,this.$emit("input",e))}}},o=a(581),r=a(3),l=a.n(r),c=a(640),d=(0,o.Z)(n,i,[],!1,null,null,null);l()(d,{VSelect:c.Z}),d.options.__file="src/components/widgets/SourceSelect/index.vue";var u=d.exports},69:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.svg?a("img",{staticClass:"pv-no-select",attrs:{src:e.svg}}):e._e()};i._withStripped=!0;var s={name:"SvgIcon",props:{icon:String},data:()=>({svg:null}),watch:{icon(e){this.icon&&this.importIcon(e)}},mounted(){this.icon&&this.importIcon(this.icon)},methods:{importIcon(e){return a(505)(`./${e}.svg`).then((e=>{this.svg=e.default||e})).catch((e=>{throw this.svg=null,e}))}}},n=(0,a(581).Z)(s,i,[],!1,null,null,null);n.options.__file="src/components/widgets/SvgIcon/index.vue";var o=n.exports},154:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=function(){var e,t=this,a=t.$createElement,i=t._self._c||a;return i("li",{class:t.$style.node},[i("div",{class:t.$style.header,on:{click:t.onItemClick}},[t.item[t.childrenKey]?i("div",{class:t.$style.expander},[i("v-icon",{class:(e={},e[t.$style.arrow]=!0,e[t.$style.openArrow]=t.open||t.value,e)},[t._v("\n mdi-menu-down\n ")])],1):t._e(),t._v(" "),i("span",{staticClass:"body-2",class:t.$style.name},[t._v(t._s(t.item[t.labelKey]))])]),t._v(" "),t.item[t.childrenKey]?i("ul",{directives:[{name:"show",rawName:"v-show",value:t.open||t.value,expression:"open || value"}]},t._l(t.item[t.childrenKey],(function(e,a){return i("node",t._b({key:a,attrs:{item:e},on:{input:function(e){return t.$emit("input",e)}}},"node",{open:t.open,labelKey:t.labelKey,childrenKey:t.childrenKey},!1))})),1):t._e()])};i._withStripped=!0;var s={name:"Node",props:{item:{},open:{type:Boolean,default:!1},labelKey:{type:String,default:()=>"name"},childrenKey:{type:String,default:()=>"children"}},data:()=>({value:!1}),methods:{onItemClick:function(){this.item[this.childrenKey]?this.value=!this.value:this.$emit("input",this.item)}}},n=a(380),o=a(581),r=a(3),l=a.n(r),c=a(610);e=a.hmd(e);var d={};e.hot,e.hot;var u=(0,o.Z)(s,i,[],!1,(function(e){d.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return d.$style}})}),null,null);l()(u,{VIcon:c.Z}),u.options.__file="src/components/widgets/TreeView/Node/index.vue";var p=u.exports},153:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.$style.wrapper},[a("v-text-field",{ref:"filterInput",attrs:{placeholder:"Filter...",clearable:"","hide-details":""},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.trySelect(e.filteredTree)}},model:{value:e.filterText,callback:function(t){e.filterText=t},expression:"filterText"}}),e._v(" "),e._l(e.filteredTree,(function(t,i){return a("node",{key:i,attrs:{item:t,open:!!e.filterText,labelKey:e.labelKey,childrenKey:e.childrenKey},on:{input:e.onSelect}})}))],2)};i._withStripped=!0;var s={name:"TreeView",components:{Node:a(154).Z},props:{tree:{type:Array,default:()=>[]},filterFunc:Function,labelKey:{type:String,default:()=>"name"},childrenKey:{type:String,default:()=>"children"}},data:()=>({filterText:null}),computed:{filteredTree(){return this.filterText?this.filter(this.tree,this.filterText,this.filterFunc||this.indexOfFilterFunc):this.tree}},methods:{onSelect:function(e){this.$emit("input",e)},trySelect:function(e){1===e.length&&(e[0][this.childrenKey]?this.trySelect(e[0][this.childrenKey]):this.onSelect(e[0]))},filter:function(e,t,a){const i=[];for(let s=0;s-1}}},n=a(380),o=a(581),r=a(3),l=a.n(r),c=a(634);e=a.hmd(e);var d={};e.hot,e.hot;var u=(0,o.Z)(s,i,[],!1,(function(e){d.$style=n.Z.locals||n.Z,Object.defineProperty(this,"$style",{configurable:!0,get:function(){return d.$style}})}),null,null);l()(u,{VTextField:c.Z}),u.options.__file="src/components/widgets/TreeView/index.vue";var p=u.exports},505:function(e,t,a){var i={"./angle-tool.svg":506,"./glance-logo-mark.svg":507,"./glance-logo.svg":508,"./itkjs.svg":509,"./kitware-logo.svg":510,"./kitware.svg":511,"./length-tool.svg":512,"./paraview-glance-small.svg":513,"./paraview-glance.svg":514,"./text-tool.svg":515,"./vtkjs.svg":516};function s(e){return n(e).then((function(e){return a.t(e,1)}))}function n(e){return Promise.resolve().then((function(){if(!a.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}))}s.keys=function(){return Object.keys(i)},s.resolve=n,s.id=505,e.exports=s},533:function(e,t,a){"use strict";e.exports=a.p+"7de480b60ea07530becf.jpg"},534:function(e,t,a){"use strict";e.exports=a.p+"08bbd2aa53dc8eac397c.jpg"},530:function(e,t,a){"use strict";e.exports=a.p+"fe1adfb1c2a6e035a806.jpg"},531:function(e,t,a){"use strict";e.exports=a.p+"132e309e274fe1882773.jpg"},538:function(e,t,a){"use strict";e.exports=a.p+"3a94be6267c413f24562.jpg"},532:function(e,t,a){"use strict";e.exports=a.p+"e046987d1271a351d59b.jpg"},535:function(e,t,a){"use strict";e.exports=a.p+"0bbce93537f566337c90.jpg"},536:function(e,t,a){"use strict";e.exports=a.p+"a7687b09d48560c2931e.jpg"},537:function(e,t,a){"use strict";e.exports=a.p+"286af999372ee982d6c8.jpg"},506:function(e,t,a){"use strict";e.exports=a.p+"5a39a3263089fab6ab24.svg"},507:function(e,t,a){"use strict";e.exports=a.p+"739652544df2c34fdc58.svg"},508:function(e,t,a){"use strict";e.exports=a.p+"e19981c655f2cfd0e03a.svg"},509:function(e,t,a){"use strict";e.exports=a.p+"19b58d68d243be25286a.svg"},510:function(e,t,a){"use strict";e.exports=a.p+"cc5d8973c8e2af638075.svg"},511:function(e,t,a){"use strict";e.exports=a.p+"011374e7707f227f9666.svg"},512:function(e,t,a){"use strict";e.exports=a.p+"9b3eb3ca56e835ab0258.svg"},513:function(e,t,a){"use strict";e.exports=a.p+"731e62f43c121e953a77.svg"},514:function(e,t,a){"use strict";e.exports=a.p+"f1c3d9cead24b2badd18.svg"},515:function(e,t,a){"use strict";e.exports=a.p+"a3e7e875d73fd955cf5e.svg"},516:function(e,t,a){"use strict";e.exports=a.p+"033029be7d659ffab8c6.svg"},357:function(){}},function(e){return e.O(0,[1],(function(){return t=328,e(e.s=t);var t})),e.O()}])})); \ No newline at end of file diff --git a/app/index-ga.html b/app/index-ga.html index 8716c2cb..63b818bb 100644 --- a/app/index-ga.html +++ b/app/index-ga.html @@ -39,11 +39,11 @@ - + - + - + diff --git a/app/index.html b/app/index.html index 8716c2cb..63b818bb 100644 --- a/app/index.html +++ b/app/index.html @@ -39,11 +39,11 @@ - + - + - + diff --git a/app/serviceWorker.js b/app/serviceWorker.js index 0c33a2df..7a719236 100644 --- a/app/serviceWorker.js +++ b/app/serviceWorker.js @@ -1 +1 @@ -if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return s[e]||(i=new Promise((async i=>{if("document"in self){const s=document.createElement("script");s.src=e,document.head.appendChild(s),s.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!s[e])throw new Error(`Module ${e} didn’t register its module`);return s[e]}))},i=(i,s)=>{Promise.all(i.map(e)).then((e=>s(1===e.length?e[0]:e)))},s={require:Promise.resolve(i)};self.define=(i,a,d)=>{s[i]||(s[i]=Promise.resolve().then((()=>{let s={};const r={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return s;case"module":return r;default:return e(i)}}))).then((e=>{const i=d(...e);return s.default||(s.default=i),s}))})))}}define("./serviceWorker.js",["./workbox-a61a63fc"],(function(e){"use strict";e.setCacheNameDetails({prefix:"paraview-glance-2-"}),self.skipWaiting(),e.precacheAndRoute([{url:"glance-external-ITKReader.6e07a93211be7978c9d3.js",revision:null},{url:"glance-external-Workbox.90844adf6eef162f4191.js",revision:null},{url:"glance.69366fc90a4f93faf670.js",revision:null},{url:"itk/FloatTypes.js",revision:"786c92c0279ce8eacd7cd96eba8a48f3"},{url:"itk/IOTypes.js",revision:"274a7502c8f12328d3746e0492504140"},{url:"itk/Image.js",revision:"088184a92ce08bbc0cb664cade150176"},{url:"itk/ImageIOIndex.js",revision:"9b88a4190ddca44da03daa1474d1d3f6"},{url:"itk/ImageIOs/itkBMPImageIOJSBinding.js",revision:"889f9d195a7711352a0be7add794330d"},{url:"itk/ImageIOs/itkBMPImageIOJSBindingWasm.js",revision:"8fa7ea58bc324f1f6bab3c83f75c52c0"},{url:"itk/ImageIOs/itkBioRadImageIOJSBinding.js",revision:"6b0ce1b6c569e2218db68bd34161275c"},{url:"itk/ImageIOs/itkBioRadImageIOJSBindingWasm.js",revision:"a90ad60c7c445db850d71abbe1529b78"},{url:"itk/ImageIOs/itkDCMTKImageIOJSBindingWasm.js",revision:"963b5fef715be1595f41be55f265dd8b"},{url:"itk/ImageIOs/itkDICOMImageSeriesReaderJSBindingWasm.js",revision:"445e866e5a5166a1b98cf537dc9d6aa6"},{url:"itk/ImageIOs/itkGDCMImageIOJSBindingWasm.js",revision:"9b6055c270a56c9e94cc4a970006db56"},{url:"itk/ImageIOs/itkGE4ImageIOJSBinding.js",revision:"5cbeec9a5fac8340994629456de47952"},{url:"itk/ImageIOs/itkGE4ImageIOJSBindingWasm.js",revision:"4239e335fe6ec9cf1a29817eb53ceecb"},{url:"itk/ImageIOs/itkGE5ImageIOJSBinding.js",revision:"233422c8b9d0f6d476a30b649fdc9746"},{url:"itk/ImageIOs/itkGE5ImageIOJSBindingWasm.js",revision:"27b2b3eea6fb46e4a2e9c6125654061a"},{url:"itk/ImageIOs/itkGEAdwImageIOJSBinding.js",revision:"dc66dd020e66394855dabfc604864fec"},{url:"itk/ImageIOs/itkGEAdwImageIOJSBindingWasm.js",revision:"f3e5c01d06606da4cb35d2820c7c441a"},{url:"itk/ImageIOs/itkGiplImageIOJSBinding.js",revision:"77bc6c98cb7d72796267d87be150dbaf"},{url:"itk/ImageIOs/itkGiplImageIOJSBindingWasm.js",revision:"f1e98050188ddbb993bb83341ed06ac7"},{url:"itk/ImageIOs/itkHDF5ImageIOJSBindingWasm.js",revision:"7f61e95c7a31619cedce0fbe6cc98c96"},{url:"itk/ImageIOs/itkJPEGImageIOJSBinding.js",revision:"73361785ff600d0aed946259b3dff643"},{url:"itk/ImageIOs/itkJPEGImageIOJSBindingWasm.js",revision:"3719dcbb85641da2cbac0f798722e614"},{url:"itk/ImageIOs/itkJSONImageIOJSBinding.js",revision:"9e77cc7625625537fbd3a588c1b7ccf1"},{url:"itk/ImageIOs/itkJSONImageIOJSBindingWasm.js",revision:"eaa4c63301a532805cbc5adb82f17267"},{url:"itk/ImageIOs/itkLSMImageIOJSBinding.js",revision:"cb4b0f30537baa118dfad179aee05c9f"},{url:"itk/ImageIOs/itkLSMImageIOJSBindingWasm.js",revision:"09ecb40ae91c21c2d7a1a013aef792d5"},{url:"itk/ImageIOs/itkMGHImageIOJSBinding.js",revision:"5b541dd791a44bf01a3b66db246bb096"},{url:"itk/ImageIOs/itkMGHImageIOJSBindingWasm.js",revision:"53e1b34486bda44d104b29fe4f9473cb"},{url:"itk/ImageIOs/itkMINCImageIOJSBindingWasm.js",revision:"3aac6ff038a4c826a76376f9cd53ec3c"},{url:"itk/ImageIOs/itkMRCImageIOJSBinding.js",revision:"f9f72e99b6f5b1f7d926e2f9dc517bd9"},{url:"itk/ImageIOs/itkMRCImageIOJSBindingWasm.js",revision:"c91ed8f2d12d7b47ea12ae7c833e424f"},{url:"itk/ImageIOs/itkMetaImageIOJSBinding.js",revision:"68515e36872fce3532c7a90ed8938f0d"},{url:"itk/ImageIOs/itkMetaImageIOJSBindingWasm.js",revision:"0962c8f9c432315ed81fe3394b38ad8c"},{url:"itk/ImageIOs/itkNiftiImageIOJSBinding.js",revision:"2fb9aa992de55d384c1b168629573d81"},{url:"itk/ImageIOs/itkNiftiImageIOJSBindingWasm.js",revision:"68b9d0fe93132deca39b0eeda5a44715"},{url:"itk/ImageIOs/itkNrrdImageIOJSBinding.js",revision:"8482cea201c035e968ae8b1a4181b46c"},{url:"itk/ImageIOs/itkNrrdImageIOJSBindingWasm.js",revision:"de24ebae38bed65f952c720a909dd2db"},{url:"itk/ImageIOs/itkPNGImageIOJSBinding.js",revision:"c2b3f9100f1c08e48098e8be2b837a11"},{url:"itk/ImageIOs/itkPNGImageIOJSBindingWasm.js",revision:"17d415929f1ed7c133b36f3527faf38f"},{url:"itk/ImageIOs/itkTIFFImageIOJSBinding.js",revision:"acdbedf68070b66cd317316b845d4961"},{url:"itk/ImageIOs/itkTIFFImageIOJSBindingWasm.js",revision:"f706c76ba2cfdfb2e859eccd1da3cc5f"},{url:"itk/ImageIOs/itkVTKImageIOJSBinding.js",revision:"53e381ef0269a5b7221838c6f807c65e"},{url:"itk/ImageIOs/itkVTKImageIOJSBindingWasm.js",revision:"0fc4db16de68c66ca74b0abc309fe67c"},{url:"itk/ImageType.js",revision:"4d52f2d76a46b0adffd2b184b41028e3"},{url:"itk/IntTypes.js",revision:"32a87875e1d723c67e39b439d662af79"},{url:"itk/Matrix.js",revision:"696e1fd396a08372c12853fe14520607"},{url:"itk/Mesh.js",revision:"39ee277da2b2eaa8c94f989aa4cd4a6e"},{url:"itk/MeshIOIndex.js",revision:"663e93bd8be843afff0354112e3287e8"},{url:"itk/MeshIOs/itkBYUMeshIOJSBinding.js",revision:"ebcf31ef16e061ab032d4c584d9b6356"},{url:"itk/MeshIOs/itkBYUMeshIOJSBindingWasm.js",revision:"36d5e0ef3ff1fec52f2202196448657a"},{url:"itk/MeshIOs/itkFreeSurferAsciiMeshIOJSBinding.js",revision:"9e910eaa6bef62aa99d6bc0d4787bee2"},{url:"itk/MeshIOs/itkFreeSurferAsciiMeshIOJSBindingWasm.js",revision:"3cf17876e22b258ed013f623ed2657c4"},{url:"itk/MeshIOs/itkFreeSurferBinaryMeshIOJSBinding.js",revision:"739f487d8ad0542b248ec95cac7b2dbf"},{url:"itk/MeshIOs/itkFreeSurferBinaryMeshIOJSBindingWasm.js",revision:"ca511b81bd9c191e5d7944e53afc61ef"},{url:"itk/MeshIOs/itkOBJMeshIOJSBinding.js",revision:"30abc9150b803a6a23aa582f4e0632ea"},{url:"itk/MeshIOs/itkOBJMeshIOJSBindingWasm.js",revision:"6bbc811d0e60838bfeb6ed96a707a1c8"},{url:"itk/MeshIOs/itkOFFMeshIOJSBinding.js",revision:"efbb8e17528a6831ba57a310ac00e20d"},{url:"itk/MeshIOs/itkOFFMeshIOJSBindingWasm.js",revision:"75a90a0bc18001a682654733a97ad83c"},{url:"itk/MeshIOs/itkSTLMeshIOJSBinding.js",revision:"e530252c0228ff4a35cbcf10eb23a709"},{url:"itk/MeshIOs/itkSTLMeshIOJSBindingWasm.js",revision:"6af94a13f349ea268bb473119ec7da28"},{url:"itk/MeshIOs/itkVTKPolyDataMeshIOJSBinding.js",revision:"450cd8a882452b13791843ba93f5a5f3"},{url:"itk/MeshIOs/itkVTKPolyDataMeshIOJSBindingWasm.js",revision:"eaeede273d523d3e97e8e68e3e92dae5"},{url:"itk/MeshType.js",revision:"f2ec2302c5f1bf554ca8d3cac9e19c05"},{url:"itk/MimeToImageIO.js",revision:"3e76827bb8cbf4b7c540ed2805eb9b9e"},{url:"itk/MimeToMeshIO.js",revision:"aba361459fce0489e3be3cc8b0b58e23"},{url:"itk/MimeToPolyDataIO.js",revision:"aba361459fce0489e3be3cc8b0b58e23"},{url:"itk/Pipelines/MeshToPolyDataWasm.js",revision:"8e8d8af3b50221e471bcff9d896b5212"},{url:"itk/Pipelines/itkfiltering.js",revision:"58956cdac3c0d8838b771abf7cfdd9e6"},{url:"itk/Pipelines/itkfilteringWasm.js",revision:"e14b48e1bf552a5beebada601e900c8c"},{url:"itk/PixelTypes.js",revision:"4fa031705ef3b81acc4a2717e0fd2049"},{url:"itk/PolyDataIOIndex.js",revision:"9c4ff3746125324d240de953be9d145d"},{url:"itk/PolyDataIOs/VTKExodusFileReaderWasm.js",revision:"0cea2bdb624f7697f7e3bb44ef27b807"},{url:"itk/PolyDataIOs/VTKLegacyFileReaderWasm.js",revision:"f275d9c9ac776f20858e58aa921a4637"},{url:"itk/PolyDataIOs/VTKXMLFileReaderWasm.js",revision:"c4a64b4da793879d85412d2ba19e6ba2"},{url:"itk/WebWorkers/ImageIO.worker.js",revision:"c4c39e7fe464621d0c7ed77433251e52"},{url:"itk/WebWorkers/MeshIO.worker.js",revision:"eebdc13b008b70bcd4f4086ac3b913e5"},{url:"itk/WebWorkers/Pipeline.worker.js",revision:"9d7e5c4e6c90e89c8b8296cda1828d67"},{url:"itk/WorkerPool.js",revision:"1874ba62ef52aefb3580e0a32563be89"},{url:"itk/bufferToTypedArray.js",revision:"fc3c0b40eb13b33f260a70baa3797763"},{url:"itk/copyImage.js",revision:"8e7505ce417db0921c954227e4ef6f4b"},{url:"itk/createWebworkerPromise.js",revision:"a67988d2ac2f03d131f3b654f3caa233"},{url:"itk/extensionToImageIO.js",revision:"3103aff5e1935d3349fd6987e65bb6d9"},{url:"itk/extensionToMeshIO.js",revision:"6047791b09b38e5e2dfc3e976a8ffda1"},{url:"itk/extensionToPolyDataIO.js",revision:"9819ccde92d374ae2455823dc2ef95fa"},{url:"itk/getFileExtension.js",revision:"04917c3ff34191f39354bb00332572ef"},{url:"itk/getMatrixElement.js",revision:"b5b833b11487416068b17f1395023a40"},{url:"itk/imageIOComponentToJSComponent.js",revision:"895102fb7c928d61e36e10d8d9391b11"},{url:"itk/imageIOPixelTypeToJSPixelType.js",revision:"5603b2b293f344b99ee6f1823ef13824"},{url:"itk/imageJSComponentToIOComponent.js",revision:"2088702a4cb9117c9116bef51376d658"},{url:"itk/imageJSPixelTypeToIOPixelType.js",revision:"31b0f68a30ede357ed4ea68fc3719601"},{url:"itk/imageSharedBufferOrCopy.js",revision:"a12d739ea218567712ff063a33330984"},{url:"itk/index.js",revision:"8e17e22871671433c9d04dacc27427c4"},{url:"itk/itk-js-cli.js",revision:"0a10667dff038be6bad69eefc02121d0"},{url:"itk/itkConfig.js",revision:"a9da642a4fc895b80a933bea1de52377"},{url:"itk/itkConfigCDN.js",revision:"0d81309dd9518d64c9006374a77e946c"},{url:"itk/loadEmscriptenModuleBrowser.js",revision:"6b4e95540d9b4bf38adb149c877788be"},{url:"itk/loadEmscriptenModuleNode.js",revision:"662f4d63587344b9304226d96222833f"},{url:"itk/meshIOComponentToJSComponent.js",revision:"90de7c32cf5cd3d60126c6f919b68787"},{url:"itk/meshIOPixelTypeToJSPixelType.js",revision:"ec7177162b0dc19137f59b9f583e6add"},{url:"itk/meshJSComponentToIOComponent.js",revision:"2b27cef5a7d43957a28f4da96626fd14"},{url:"itk/meshJSPixelTypeToIOPixelType.js",revision:"05f00c2dd4bc66db539e4f414de6a2b1"},{url:"itk/node_modules/axios/dist/axios.js",revision:"73fcc4182a225c2dcb1d8dde1538535f"},{url:"itk/node_modules/axios/dist/axios.min.js",revision:"e63531350b726384f625ead641f5ad66"},{url:"itk/node_modules/axios/index.js",revision:"7057c14dacb26642c8e57acd1febb0b8"},{url:"itk/node_modules/axios/lib/adapters/http.js",revision:"2804d3e4b600ce93fa099528359ec6e1"},{url:"itk/node_modules/axios/lib/adapters/xhr.js",revision:"eec82f5a4702043bd9f13becf397945e"},{url:"itk/node_modules/axios/lib/axios.js",revision:"bbc19b5030890f2bab53eba3fe6a01e8"},{url:"itk/node_modules/axios/lib/cancel/Cancel.js",revision:"e583d0dcca1cc1d22a26e5482d99e599"},{url:"itk/node_modules/axios/lib/cancel/CancelToken.js",revision:"d42641a6c22ec71365e24f453e730b18"},{url:"itk/node_modules/axios/lib/cancel/isCancel.js",revision:"0a6a3b3ade1a42f61f2c7ebf56b38419"},{url:"itk/node_modules/axios/lib/core/Axios.js",revision:"b326b462d63ddbe80b1083a16b8de9cb"},{url:"itk/node_modules/axios/lib/core/InterceptorManager.js",revision:"54214e1330787e4ed5735a9996f39fe5"},{url:"itk/node_modules/axios/lib/core/buildFullPath.js",revision:"fa83814d8b074afbf7585c716a7d0f9b"},{url:"itk/node_modules/axios/lib/core/createError.js",revision:"47b9e8b556cbbfafaa16494df8c5a343"},{url:"itk/node_modules/axios/lib/core/dispatchRequest.js",revision:"7e3797355c56b9c8ad268615fbad0f8d"},{url:"itk/node_modules/axios/lib/core/enhanceError.js",revision:"8359e5e9a065491266049799295037cb"},{url:"itk/node_modules/axios/lib/core/mergeConfig.js",revision:"be9feba2b764778bd84294a4373e65bf"},{url:"itk/node_modules/axios/lib/core/settle.js",revision:"45f0e2244bc031a06c6061c4eb2726ab"},{url:"itk/node_modules/axios/lib/core/transformData.js",revision:"917700b21d020f1d2446b5bc14cb50e4"},{url:"itk/node_modules/axios/lib/defaults.js",revision:"36850c1f0b016e4ed28a9bd9e4a7b82f"},{url:"itk/node_modules/axios/lib/helpers/bind.js",revision:"38600da1e81ede8cd8f1d10fd1012cda"},{url:"itk/node_modules/axios/lib/helpers/buildURL.js",revision:"0cf7887862ffc192863ff71c1d7a4ec8"},{url:"itk/node_modules/axios/lib/helpers/combineURLs.js",revision:"6a5f44f8bc3b8460552c15743c96be11"},{url:"itk/node_modules/axios/lib/helpers/cookies.js",revision:"3eb7ef75580020e60df0e5409288e8e3"},{url:"itk/node_modules/axios/lib/helpers/deprecatedMethod.js",revision:"aed58ab654a201e2309c73cd93aec84c"},{url:"itk/node_modules/axios/lib/helpers/isAbsoluteURL.js",revision:"5e91f207890f3cdb48a2021685b7f19a"},{url:"itk/node_modules/axios/lib/helpers/isURLSameOrigin.js",revision:"df1b887c1130ecf8dd7e588b8b33ec4a"},{url:"itk/node_modules/axios/lib/helpers/normalizeHeaderName.js",revision:"87472e06b6f430c59b2c419f62086cc4"},{url:"itk/node_modules/axios/lib/helpers/parseHeaders.js",revision:"9afdf3d5ed4e2f60770faf8d063fedc6"},{url:"itk/node_modules/axios/lib/helpers/spread.js",revision:"f3932e6bab8473987bd2ee295c773606"},{url:"itk/node_modules/axios/lib/utils.js",revision:"4a98ffa0b72062280dc2555154a7bb31"},{url:"itk/node_modules/debug/karma.conf.js",revision:"06f3babbdc43c6c4dd1493b6c1af32e2"},{url:"itk/node_modules/debug/node.js",revision:"79f3814f32362c1c6f9dbb8a1e3b01bf"},{url:"itk/node_modules/debug/src/browser.js",revision:"23d5a69338855f953a919ce32b53a2d2"},{url:"itk/node_modules/debug/src/debug.js",revision:"140d46ef8644efa440cd8b602d56b1e0"},{url:"itk/node_modules/debug/src/index.js",revision:"afd4620d6095583cdae71b234c60c13a"},{url:"itk/node_modules/debug/src/node.js",revision:"2754f6e90cbac39ee063f9b010b135f3"},{url:"itk/node_modules/follow-redirects/http.js",revision:"f94bfd10b869e19d4ebf749ccbc44fb4"},{url:"itk/node_modules/follow-redirects/https.js",revision:"4db3f05178b291f5f607f677d82d064f"},{url:"itk/node_modules/follow-redirects/index.js",revision:"1065000060594967ec83a45eed174189"},{url:"itk/node_modules/fs-extra/lib/copy-sync/copy-sync.js",revision:"23f879c19b9f42b90b56648362e092a2"},{url:"itk/node_modules/fs-extra/lib/copy-sync/index.js",revision:"95494fc7a02209518e070c5470727df1"},{url:"itk/node_modules/fs-extra/lib/copy/copy.js",revision:"f7d861c3469b46cc419136ff585c9f97"},{url:"itk/node_modules/fs-extra/lib/copy/index.js",revision:"562ca7a595a7b1b7270f140c32689ac2"},{url:"itk/node_modules/fs-extra/lib/empty/index.js",revision:"d2e0e0eb95ac259bc7f8fb65b992ef0f"},{url:"itk/node_modules/fs-extra/lib/ensure/file.js",revision:"cf3696fe43fe778d704fcf8fcd486d74"},{url:"itk/node_modules/fs-extra/lib/ensure/index.js",revision:"27a43257b6009138ffaa8a7462ddba66"},{url:"itk/node_modules/fs-extra/lib/ensure/link.js",revision:"ff62149b525aef3fbfbd4accd2256aca"},{url:"itk/node_modules/fs-extra/lib/ensure/symlink-paths.js",revision:"be9c8f74132d37198fabee775b684481"},{url:"itk/node_modules/fs-extra/lib/ensure/symlink-type.js",revision:"75871bc803a6046deefe24a3f02f4f3d"},{url:"itk/node_modules/fs-extra/lib/ensure/symlink.js",revision:"f8f10d59b5a7630a949c716876003c3f"},{url:"itk/node_modules/fs-extra/lib/fs/index.js",revision:"605f637e4a7753f3124035794c882c4f"},{url:"itk/node_modules/fs-extra/lib/index.js",revision:"f42d0d00f3abb1bd2153a75dcc7a0c49"},{url:"itk/node_modules/fs-extra/lib/json/index.js",revision:"dbced9952c4222c32a88bba2d8b4ef06"},{url:"itk/node_modules/fs-extra/lib/json/jsonfile.js",revision:"9a378d46c0c6a89b9e32d5c90ae44be9"},{url:"itk/node_modules/fs-extra/lib/json/output-json-sync.js",revision:"2e5409e141cc5ed747bf744dc62b3362"},{url:"itk/node_modules/fs-extra/lib/json/output-json.js",revision:"551ad6b0fe72dd3b16fdbde88679f03a"},{url:"itk/node_modules/fs-extra/lib/mkdirs/index.js",revision:"9cc1d8bb2c89810566f60c0664d974b9"},{url:"itk/node_modules/fs-extra/lib/mkdirs/make-dir.js",revision:"4ff0d3aa621c19135e377be1dd121bca"},{url:"itk/node_modules/fs-extra/lib/move-sync/index.js",revision:"c2e4f586bcc5bc6e0db8369003bcfd6b"},{url:"itk/node_modules/fs-extra/lib/move-sync/move-sync.js",revision:"cc9339e7d4e2ce08f6d79d08d348d824"},{url:"itk/node_modules/fs-extra/lib/move/index.js",revision:"1895bdcd799c951badcafda242a46247"},{url:"itk/node_modules/fs-extra/lib/move/move.js",revision:"75b52861f7cd90b6ed7cece7279ce037"},{url:"itk/node_modules/fs-extra/lib/output/index.js",revision:"b0adfc74c8e51ce2ab659bfc13752ed3"},{url:"itk/node_modules/fs-extra/lib/path-exists/index.js",revision:"dfb2813673ea5279a9aa7305e5fe33f3"},{url:"itk/node_modules/fs-extra/lib/remove/index.js",revision:"e8c6a5092ac319dec6888ff3686e1dd5"},{url:"itk/node_modules/fs-extra/lib/remove/rimraf.js",revision:"8af4d4abb5011a6543699bfc934d2522"},{url:"itk/node_modules/fs-extra/lib/util/stat.js",revision:"cbbd1b4970fa837c23013c2431b8c35e"},{url:"itk/node_modules/fs-extra/lib/util/utimes.js",revision:"b95e8f0f6d31e27cacaf907e04d44ad7"},{url:"itk/node_modules/jsonfile/index.js",revision:"c18cdb1953c23651297eecd0c2a35df9"},{url:"itk/node_modules/jsonfile/utils.js",revision:"dbf76159ea111d8f0a848e94285b0b68"},{url:"itk/node_modules/universalify/index.js",revision:"86ef0931da77d998bfa45c365b1300e1"},{url:"itk/readArrayBuffer.js",revision:"52c7067839ff7a061d7b7ab36c6f3060"},{url:"itk/readBlob.js",revision:"b9c4329a7319055ed6fa6bc207f38c26"},{url:"itk/readFile.js",revision:"bedc9547efc2fea97cc526a4669a0d35"},{url:"itk/readImageArrayBuffer.js",revision:"a259a00465ba77dab3ab7af895c1963b"},{url:"itk/readImageBlob.js",revision:"37c28c5ca49b26a58a643701d05b3615"},{url:"itk/readImageDICOMFileSeries.js",revision:"78a4b3503aa2f8b9fc6c6fc11b59a4a8"},{url:"itk/readImageEmscriptenFSDICOMFileSeries.js",revision:"e55d37cf66d30aa0af09dfc793c05d64"},{url:"itk/readImageEmscriptenFSFile.js",revision:"9dcb75216b2bcc76fb82a17a3efd49d3"},{url:"itk/readImageFile.js",revision:"972c0f132fa59f991c69870f7334e793"},{url:"itk/readImageHTTP.js",revision:"16d70e5fdc745c1f135f79b9c75af71e"},{url:"itk/readImageLocalDICOMFileSeries.js",revision:"ae400fe4b398d153b238c3235a9bd359"},{url:"itk/readImageLocalDICOMFileSeriesSync.js",revision:"f5304b91ab32c64e97cb7914073e1e09"},{url:"itk/readImageLocalFile.js",revision:"737d2cb279cddbd825f37d09847700d5"},{url:"itk/readImageLocalFileSync.js",revision:"109df853264bcf775af5dd0b3b55f61e"},{url:"itk/readLocalFile.js",revision:"eb491746332118fe063931f33418d59a"},{url:"itk/readLocalFileSync.js",revision:"e5a2bd3e980bcebc9c693298e7da386d"},{url:"itk/readMeshArrayBuffer.js",revision:"3ac0c0d4ad2b914277576007a7f0a9d6"},{url:"itk/readMeshBlob.js",revision:"761e3e9e45b214e01df98f1f9c14f6ad"},{url:"itk/readMeshEmscriptenFSFile.js",revision:"25dc1fdbab7b50e8e47222cd8f80458f"},{url:"itk/readMeshFile.js",revision:"4846a9eda71178535634b335617e29c5"},{url:"itk/readMeshLocalFile.js",revision:"a257c746adfc7f224dd00585882d4d57"},{url:"itk/readMeshLocalFileSync.js",revision:"93367c12748c47e1b1f420285feec59e"},{url:"itk/readPolyDataArrayBuffer.js",revision:"3e4fbdd59d13e372d685d6f6c0ab8438"},{url:"itk/readPolyDataBlob.js",revision:"054aebd1b227eb71dc9220dc32c2bde5"},{url:"itk/readPolyDataFile.js",revision:"c4d76cf30c4d6b3d16d7a7c5d01c4831"},{url:"itk/readPolyDataLocalFile.js",revision:"72d197d73334673dae99747216b6f052"},{url:"itk/readPolyDataLocalFileSync.js",revision:"8a9c327159998fe88c4792c6f633a387"},{url:"itk/runPipelineBrowser.js",revision:"3eb328f58bd29b037ff91a94d6b5289a"},{url:"itk/runPipelineEmscripten.js",revision:"2c996749c20c37aee6df7a7fc6818300"},{url:"itk/runPipelineNode.js",revision:"bad2e6fb64ae0258958b5da17d166789"},{url:"itk/runPipelineNodeSync.js",revision:"5361e5412d619c76d357a7568e51d6b8"},{url:"itk/setMatrixElement.js",revision:"a0099a7c2321a96954e51816e53c6074"},{url:"itk/stackImages.js",revision:"68382b996c21f8e4d5167f6b1a63a8b8"},{url:"itk/umd/itk.js",revision:"c78d2de58568fcd53468b76dabaffcfa"},{url:"itk/writeArrayBuffer.js",revision:"30d656c5e27d8146da1c971482dd8706"},{url:"itk/writeImageArrayBuffer.js",revision:"a6bccc57b7bb0453900b445c52c3b894"},{url:"itk/writeImageEmscriptenFSFile.js",revision:"6b45773bc0eccf6dd0ef17773a7dbc46"},{url:"itk/writeImageLocalFile.js",revision:"4e0622719fdc7a2e51dea811a1aa401a"},{url:"itk/writeImageLocalFileSync.js",revision:"38932fa7a9d4746850294a61ad1b7a80"},{url:"itk/writeLocalFile.js",revision:"f9d99f8f674622d089cbecabd848669b"},{url:"itk/writeLocalFileSync.js",revision:"811f2e370fac4bf4ce9dd05180903807"},{url:"itk/writeMeshArrayBuffer.js",revision:"4766a1caa590a090ea1078c9a9fb2cc5"},{url:"itk/writeMeshEmscriptenFSFile.js",revision:"ec1057f541c847b05666501a649c9327"},{url:"itk/writeMeshLocalFile.js",revision:"0797ad346c4a1b0e6655b79c78813313"},{url:"itk/writeMeshLocalFileSync.js",revision:"23fb1410a127c4861127777e7d39ab87"},{url:"runtime.f5a0ef0d83d36acd666a.js",revision:null}],{}),e.cleanupOutdatedCaches(),e.registerRoute(/(\.css|\.ttf|\.eot|\.woff|\.js|\.png|\.svg|\.wasm)$/,new e.NetworkFirst,"GET")})); +if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return s[e]||(i=new Promise((async i=>{if("document"in self){const s=document.createElement("script");s.src=e,document.head.appendChild(s),s.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!s[e])throw new Error(`Module ${e} didn’t register its module`);return s[e]}))},i=(i,s)=>{Promise.all(i.map(e)).then((e=>s(1===e.length?e[0]:e)))},s={require:Promise.resolve(i)};self.define=(i,a,d)=>{s[i]||(s[i]=Promise.resolve().then((()=>{let s={};const r={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return s;case"module":return r;default:return e(i)}}))).then((e=>{const i=d(...e);return s.default||(s.default=i),s}))})))}}define("./serviceWorker.js",["./workbox-a61a63fc"],(function(e){"use strict";e.setCacheNameDetails({prefix:"paraview-glance-2-"}),self.skipWaiting(),e.precacheAndRoute([{url:"glance-external-ITKReader.702e8255409968addaa5.js",revision:null},{url:"glance-external-Workbox.90844adf6eef162f4191.js",revision:null},{url:"glance.3e3b4956bf2c53a021ef.js",revision:null},{url:"itk/FloatTypes.js",revision:"786c92c0279ce8eacd7cd96eba8a48f3"},{url:"itk/IOTypes.js",revision:"274a7502c8f12328d3746e0492504140"},{url:"itk/Image.js",revision:"088184a92ce08bbc0cb664cade150176"},{url:"itk/ImageIOIndex.js",revision:"9b88a4190ddca44da03daa1474d1d3f6"},{url:"itk/ImageIOs/itkBMPImageIOJSBinding.js",revision:"889f9d195a7711352a0be7add794330d"},{url:"itk/ImageIOs/itkBMPImageIOJSBindingWasm.js",revision:"8fa7ea58bc324f1f6bab3c83f75c52c0"},{url:"itk/ImageIOs/itkBioRadImageIOJSBinding.js",revision:"6b0ce1b6c569e2218db68bd34161275c"},{url:"itk/ImageIOs/itkBioRadImageIOJSBindingWasm.js",revision:"a90ad60c7c445db850d71abbe1529b78"},{url:"itk/ImageIOs/itkDCMTKImageIOJSBindingWasm.js",revision:"963b5fef715be1595f41be55f265dd8b"},{url:"itk/ImageIOs/itkDICOMImageSeriesReaderJSBindingWasm.js",revision:"445e866e5a5166a1b98cf537dc9d6aa6"},{url:"itk/ImageIOs/itkGDCMImageIOJSBindingWasm.js",revision:"9b6055c270a56c9e94cc4a970006db56"},{url:"itk/ImageIOs/itkGE4ImageIOJSBinding.js",revision:"5cbeec9a5fac8340994629456de47952"},{url:"itk/ImageIOs/itkGE4ImageIOJSBindingWasm.js",revision:"4239e335fe6ec9cf1a29817eb53ceecb"},{url:"itk/ImageIOs/itkGE5ImageIOJSBinding.js",revision:"233422c8b9d0f6d476a30b649fdc9746"},{url:"itk/ImageIOs/itkGE5ImageIOJSBindingWasm.js",revision:"27b2b3eea6fb46e4a2e9c6125654061a"},{url:"itk/ImageIOs/itkGEAdwImageIOJSBinding.js",revision:"dc66dd020e66394855dabfc604864fec"},{url:"itk/ImageIOs/itkGEAdwImageIOJSBindingWasm.js",revision:"f3e5c01d06606da4cb35d2820c7c441a"},{url:"itk/ImageIOs/itkGiplImageIOJSBinding.js",revision:"77bc6c98cb7d72796267d87be150dbaf"},{url:"itk/ImageIOs/itkGiplImageIOJSBindingWasm.js",revision:"f1e98050188ddbb993bb83341ed06ac7"},{url:"itk/ImageIOs/itkHDF5ImageIOJSBindingWasm.js",revision:"7f61e95c7a31619cedce0fbe6cc98c96"},{url:"itk/ImageIOs/itkJPEGImageIOJSBinding.js",revision:"73361785ff600d0aed946259b3dff643"},{url:"itk/ImageIOs/itkJPEGImageIOJSBindingWasm.js",revision:"3719dcbb85641da2cbac0f798722e614"},{url:"itk/ImageIOs/itkJSONImageIOJSBinding.js",revision:"9e77cc7625625537fbd3a588c1b7ccf1"},{url:"itk/ImageIOs/itkJSONImageIOJSBindingWasm.js",revision:"eaa4c63301a532805cbc5adb82f17267"},{url:"itk/ImageIOs/itkLSMImageIOJSBinding.js",revision:"cb4b0f30537baa118dfad179aee05c9f"},{url:"itk/ImageIOs/itkLSMImageIOJSBindingWasm.js",revision:"09ecb40ae91c21c2d7a1a013aef792d5"},{url:"itk/ImageIOs/itkMGHImageIOJSBinding.js",revision:"5b541dd791a44bf01a3b66db246bb096"},{url:"itk/ImageIOs/itkMGHImageIOJSBindingWasm.js",revision:"53e1b34486bda44d104b29fe4f9473cb"},{url:"itk/ImageIOs/itkMINCImageIOJSBindingWasm.js",revision:"3aac6ff038a4c826a76376f9cd53ec3c"},{url:"itk/ImageIOs/itkMRCImageIOJSBinding.js",revision:"f9f72e99b6f5b1f7d926e2f9dc517bd9"},{url:"itk/ImageIOs/itkMRCImageIOJSBindingWasm.js",revision:"c91ed8f2d12d7b47ea12ae7c833e424f"},{url:"itk/ImageIOs/itkMetaImageIOJSBinding.js",revision:"68515e36872fce3532c7a90ed8938f0d"},{url:"itk/ImageIOs/itkMetaImageIOJSBindingWasm.js",revision:"0962c8f9c432315ed81fe3394b38ad8c"},{url:"itk/ImageIOs/itkNiftiImageIOJSBinding.js",revision:"2fb9aa992de55d384c1b168629573d81"},{url:"itk/ImageIOs/itkNiftiImageIOJSBindingWasm.js",revision:"68b9d0fe93132deca39b0eeda5a44715"},{url:"itk/ImageIOs/itkNrrdImageIOJSBinding.js",revision:"8482cea201c035e968ae8b1a4181b46c"},{url:"itk/ImageIOs/itkNrrdImageIOJSBindingWasm.js",revision:"de24ebae38bed65f952c720a909dd2db"},{url:"itk/ImageIOs/itkPNGImageIOJSBinding.js",revision:"c2b3f9100f1c08e48098e8be2b837a11"},{url:"itk/ImageIOs/itkPNGImageIOJSBindingWasm.js",revision:"17d415929f1ed7c133b36f3527faf38f"},{url:"itk/ImageIOs/itkTIFFImageIOJSBinding.js",revision:"acdbedf68070b66cd317316b845d4961"},{url:"itk/ImageIOs/itkTIFFImageIOJSBindingWasm.js",revision:"f706c76ba2cfdfb2e859eccd1da3cc5f"},{url:"itk/ImageIOs/itkVTKImageIOJSBinding.js",revision:"53e381ef0269a5b7221838c6f807c65e"},{url:"itk/ImageIOs/itkVTKImageIOJSBindingWasm.js",revision:"0fc4db16de68c66ca74b0abc309fe67c"},{url:"itk/ImageType.js",revision:"4d52f2d76a46b0adffd2b184b41028e3"},{url:"itk/IntTypes.js",revision:"32a87875e1d723c67e39b439d662af79"},{url:"itk/Matrix.js",revision:"696e1fd396a08372c12853fe14520607"},{url:"itk/Mesh.js",revision:"39ee277da2b2eaa8c94f989aa4cd4a6e"},{url:"itk/MeshIOIndex.js",revision:"663e93bd8be843afff0354112e3287e8"},{url:"itk/MeshIOs/itkBYUMeshIOJSBinding.js",revision:"ebcf31ef16e061ab032d4c584d9b6356"},{url:"itk/MeshIOs/itkBYUMeshIOJSBindingWasm.js",revision:"36d5e0ef3ff1fec52f2202196448657a"},{url:"itk/MeshIOs/itkFreeSurferAsciiMeshIOJSBinding.js",revision:"9e910eaa6bef62aa99d6bc0d4787bee2"},{url:"itk/MeshIOs/itkFreeSurferAsciiMeshIOJSBindingWasm.js",revision:"3cf17876e22b258ed013f623ed2657c4"},{url:"itk/MeshIOs/itkFreeSurferBinaryMeshIOJSBinding.js",revision:"739f487d8ad0542b248ec95cac7b2dbf"},{url:"itk/MeshIOs/itkFreeSurferBinaryMeshIOJSBindingWasm.js",revision:"ca511b81bd9c191e5d7944e53afc61ef"},{url:"itk/MeshIOs/itkOBJMeshIOJSBinding.js",revision:"30abc9150b803a6a23aa582f4e0632ea"},{url:"itk/MeshIOs/itkOBJMeshIOJSBindingWasm.js",revision:"6bbc811d0e60838bfeb6ed96a707a1c8"},{url:"itk/MeshIOs/itkOFFMeshIOJSBinding.js",revision:"efbb8e17528a6831ba57a310ac00e20d"},{url:"itk/MeshIOs/itkOFFMeshIOJSBindingWasm.js",revision:"75a90a0bc18001a682654733a97ad83c"},{url:"itk/MeshIOs/itkSTLMeshIOJSBinding.js",revision:"e530252c0228ff4a35cbcf10eb23a709"},{url:"itk/MeshIOs/itkSTLMeshIOJSBindingWasm.js",revision:"6af94a13f349ea268bb473119ec7da28"},{url:"itk/MeshIOs/itkVTKPolyDataMeshIOJSBinding.js",revision:"450cd8a882452b13791843ba93f5a5f3"},{url:"itk/MeshIOs/itkVTKPolyDataMeshIOJSBindingWasm.js",revision:"eaeede273d523d3e97e8e68e3e92dae5"},{url:"itk/MeshType.js",revision:"f2ec2302c5f1bf554ca8d3cac9e19c05"},{url:"itk/MimeToImageIO.js",revision:"3e76827bb8cbf4b7c540ed2805eb9b9e"},{url:"itk/MimeToMeshIO.js",revision:"aba361459fce0489e3be3cc8b0b58e23"},{url:"itk/MimeToPolyDataIO.js",revision:"aba361459fce0489e3be3cc8b0b58e23"},{url:"itk/Pipelines/MeshToPolyDataWasm.js",revision:"8e8d8af3b50221e471bcff9d896b5212"},{url:"itk/Pipelines/itkfiltering.js",revision:"58956cdac3c0d8838b771abf7cfdd9e6"},{url:"itk/Pipelines/itkfilteringWasm.js",revision:"e14b48e1bf552a5beebada601e900c8c"},{url:"itk/PixelTypes.js",revision:"4fa031705ef3b81acc4a2717e0fd2049"},{url:"itk/PolyDataIOIndex.js",revision:"9c4ff3746125324d240de953be9d145d"},{url:"itk/PolyDataIOs/VTKExodusFileReaderWasm.js",revision:"0cea2bdb624f7697f7e3bb44ef27b807"},{url:"itk/PolyDataIOs/VTKLegacyFileReaderWasm.js",revision:"f275d9c9ac776f20858e58aa921a4637"},{url:"itk/PolyDataIOs/VTKXMLFileReaderWasm.js",revision:"c4a64b4da793879d85412d2ba19e6ba2"},{url:"itk/WebWorkers/ImageIO.worker.js",revision:"c4c39e7fe464621d0c7ed77433251e52"},{url:"itk/WebWorkers/MeshIO.worker.js",revision:"eebdc13b008b70bcd4f4086ac3b913e5"},{url:"itk/WebWorkers/Pipeline.worker.js",revision:"9d7e5c4e6c90e89c8b8296cda1828d67"},{url:"itk/WorkerPool.js",revision:"1874ba62ef52aefb3580e0a32563be89"},{url:"itk/bufferToTypedArray.js",revision:"fc3c0b40eb13b33f260a70baa3797763"},{url:"itk/copyImage.js",revision:"8e7505ce417db0921c954227e4ef6f4b"},{url:"itk/createWebworkerPromise.js",revision:"a67988d2ac2f03d131f3b654f3caa233"},{url:"itk/extensionToImageIO.js",revision:"3103aff5e1935d3349fd6987e65bb6d9"},{url:"itk/extensionToMeshIO.js",revision:"6047791b09b38e5e2dfc3e976a8ffda1"},{url:"itk/extensionToPolyDataIO.js",revision:"9819ccde92d374ae2455823dc2ef95fa"},{url:"itk/getFileExtension.js",revision:"04917c3ff34191f39354bb00332572ef"},{url:"itk/getMatrixElement.js",revision:"b5b833b11487416068b17f1395023a40"},{url:"itk/imageIOComponentToJSComponent.js",revision:"895102fb7c928d61e36e10d8d9391b11"},{url:"itk/imageIOPixelTypeToJSPixelType.js",revision:"5603b2b293f344b99ee6f1823ef13824"},{url:"itk/imageJSComponentToIOComponent.js",revision:"2088702a4cb9117c9116bef51376d658"},{url:"itk/imageJSPixelTypeToIOPixelType.js",revision:"31b0f68a30ede357ed4ea68fc3719601"},{url:"itk/imageSharedBufferOrCopy.js",revision:"a12d739ea218567712ff063a33330984"},{url:"itk/index.js",revision:"8e17e22871671433c9d04dacc27427c4"},{url:"itk/itk-js-cli.js",revision:"0a10667dff038be6bad69eefc02121d0"},{url:"itk/itkConfig.js",revision:"a9da642a4fc895b80a933bea1de52377"},{url:"itk/itkConfigCDN.js",revision:"0d81309dd9518d64c9006374a77e946c"},{url:"itk/loadEmscriptenModuleBrowser.js",revision:"6b4e95540d9b4bf38adb149c877788be"},{url:"itk/loadEmscriptenModuleNode.js",revision:"662f4d63587344b9304226d96222833f"},{url:"itk/meshIOComponentToJSComponent.js",revision:"90de7c32cf5cd3d60126c6f919b68787"},{url:"itk/meshIOPixelTypeToJSPixelType.js",revision:"ec7177162b0dc19137f59b9f583e6add"},{url:"itk/meshJSComponentToIOComponent.js",revision:"2b27cef5a7d43957a28f4da96626fd14"},{url:"itk/meshJSPixelTypeToIOPixelType.js",revision:"05f00c2dd4bc66db539e4f414de6a2b1"},{url:"itk/node_modules/axios/dist/axios.js",revision:"73fcc4182a225c2dcb1d8dde1538535f"},{url:"itk/node_modules/axios/dist/axios.min.js",revision:"e63531350b726384f625ead641f5ad66"},{url:"itk/node_modules/axios/index.js",revision:"7057c14dacb26642c8e57acd1febb0b8"},{url:"itk/node_modules/axios/lib/adapters/http.js",revision:"2804d3e4b600ce93fa099528359ec6e1"},{url:"itk/node_modules/axios/lib/adapters/xhr.js",revision:"eec82f5a4702043bd9f13becf397945e"},{url:"itk/node_modules/axios/lib/axios.js",revision:"bbc19b5030890f2bab53eba3fe6a01e8"},{url:"itk/node_modules/axios/lib/cancel/Cancel.js",revision:"e583d0dcca1cc1d22a26e5482d99e599"},{url:"itk/node_modules/axios/lib/cancel/CancelToken.js",revision:"d42641a6c22ec71365e24f453e730b18"},{url:"itk/node_modules/axios/lib/cancel/isCancel.js",revision:"0a6a3b3ade1a42f61f2c7ebf56b38419"},{url:"itk/node_modules/axios/lib/core/Axios.js",revision:"b326b462d63ddbe80b1083a16b8de9cb"},{url:"itk/node_modules/axios/lib/core/InterceptorManager.js",revision:"54214e1330787e4ed5735a9996f39fe5"},{url:"itk/node_modules/axios/lib/core/buildFullPath.js",revision:"fa83814d8b074afbf7585c716a7d0f9b"},{url:"itk/node_modules/axios/lib/core/createError.js",revision:"47b9e8b556cbbfafaa16494df8c5a343"},{url:"itk/node_modules/axios/lib/core/dispatchRequest.js",revision:"7e3797355c56b9c8ad268615fbad0f8d"},{url:"itk/node_modules/axios/lib/core/enhanceError.js",revision:"8359e5e9a065491266049799295037cb"},{url:"itk/node_modules/axios/lib/core/mergeConfig.js",revision:"be9feba2b764778bd84294a4373e65bf"},{url:"itk/node_modules/axios/lib/core/settle.js",revision:"45f0e2244bc031a06c6061c4eb2726ab"},{url:"itk/node_modules/axios/lib/core/transformData.js",revision:"917700b21d020f1d2446b5bc14cb50e4"},{url:"itk/node_modules/axios/lib/defaults.js",revision:"36850c1f0b016e4ed28a9bd9e4a7b82f"},{url:"itk/node_modules/axios/lib/helpers/bind.js",revision:"38600da1e81ede8cd8f1d10fd1012cda"},{url:"itk/node_modules/axios/lib/helpers/buildURL.js",revision:"0cf7887862ffc192863ff71c1d7a4ec8"},{url:"itk/node_modules/axios/lib/helpers/combineURLs.js",revision:"6a5f44f8bc3b8460552c15743c96be11"},{url:"itk/node_modules/axios/lib/helpers/cookies.js",revision:"3eb7ef75580020e60df0e5409288e8e3"},{url:"itk/node_modules/axios/lib/helpers/deprecatedMethod.js",revision:"aed58ab654a201e2309c73cd93aec84c"},{url:"itk/node_modules/axios/lib/helpers/isAbsoluteURL.js",revision:"5e91f207890f3cdb48a2021685b7f19a"},{url:"itk/node_modules/axios/lib/helpers/isURLSameOrigin.js",revision:"df1b887c1130ecf8dd7e588b8b33ec4a"},{url:"itk/node_modules/axios/lib/helpers/normalizeHeaderName.js",revision:"87472e06b6f430c59b2c419f62086cc4"},{url:"itk/node_modules/axios/lib/helpers/parseHeaders.js",revision:"9afdf3d5ed4e2f60770faf8d063fedc6"},{url:"itk/node_modules/axios/lib/helpers/spread.js",revision:"f3932e6bab8473987bd2ee295c773606"},{url:"itk/node_modules/axios/lib/utils.js",revision:"4a98ffa0b72062280dc2555154a7bb31"},{url:"itk/node_modules/debug/karma.conf.js",revision:"06f3babbdc43c6c4dd1493b6c1af32e2"},{url:"itk/node_modules/debug/node.js",revision:"79f3814f32362c1c6f9dbb8a1e3b01bf"},{url:"itk/node_modules/debug/src/browser.js",revision:"23d5a69338855f953a919ce32b53a2d2"},{url:"itk/node_modules/debug/src/debug.js",revision:"140d46ef8644efa440cd8b602d56b1e0"},{url:"itk/node_modules/debug/src/index.js",revision:"afd4620d6095583cdae71b234c60c13a"},{url:"itk/node_modules/debug/src/node.js",revision:"2754f6e90cbac39ee063f9b010b135f3"},{url:"itk/node_modules/follow-redirects/http.js",revision:"f94bfd10b869e19d4ebf749ccbc44fb4"},{url:"itk/node_modules/follow-redirects/https.js",revision:"4db3f05178b291f5f607f677d82d064f"},{url:"itk/node_modules/follow-redirects/index.js",revision:"1065000060594967ec83a45eed174189"},{url:"itk/node_modules/fs-extra/lib/copy-sync/copy-sync.js",revision:"23f879c19b9f42b90b56648362e092a2"},{url:"itk/node_modules/fs-extra/lib/copy-sync/index.js",revision:"95494fc7a02209518e070c5470727df1"},{url:"itk/node_modules/fs-extra/lib/copy/copy.js",revision:"f7d861c3469b46cc419136ff585c9f97"},{url:"itk/node_modules/fs-extra/lib/copy/index.js",revision:"562ca7a595a7b1b7270f140c32689ac2"},{url:"itk/node_modules/fs-extra/lib/empty/index.js",revision:"d2e0e0eb95ac259bc7f8fb65b992ef0f"},{url:"itk/node_modules/fs-extra/lib/ensure/file.js",revision:"cf3696fe43fe778d704fcf8fcd486d74"},{url:"itk/node_modules/fs-extra/lib/ensure/index.js",revision:"27a43257b6009138ffaa8a7462ddba66"},{url:"itk/node_modules/fs-extra/lib/ensure/link.js",revision:"ff62149b525aef3fbfbd4accd2256aca"},{url:"itk/node_modules/fs-extra/lib/ensure/symlink-paths.js",revision:"be9c8f74132d37198fabee775b684481"},{url:"itk/node_modules/fs-extra/lib/ensure/symlink-type.js",revision:"75871bc803a6046deefe24a3f02f4f3d"},{url:"itk/node_modules/fs-extra/lib/ensure/symlink.js",revision:"f8f10d59b5a7630a949c716876003c3f"},{url:"itk/node_modules/fs-extra/lib/fs/index.js",revision:"605f637e4a7753f3124035794c882c4f"},{url:"itk/node_modules/fs-extra/lib/index.js",revision:"f42d0d00f3abb1bd2153a75dcc7a0c49"},{url:"itk/node_modules/fs-extra/lib/json/index.js",revision:"dbced9952c4222c32a88bba2d8b4ef06"},{url:"itk/node_modules/fs-extra/lib/json/jsonfile.js",revision:"9a378d46c0c6a89b9e32d5c90ae44be9"},{url:"itk/node_modules/fs-extra/lib/json/output-json-sync.js",revision:"2e5409e141cc5ed747bf744dc62b3362"},{url:"itk/node_modules/fs-extra/lib/json/output-json.js",revision:"551ad6b0fe72dd3b16fdbde88679f03a"},{url:"itk/node_modules/fs-extra/lib/mkdirs/index.js",revision:"9cc1d8bb2c89810566f60c0664d974b9"},{url:"itk/node_modules/fs-extra/lib/mkdirs/make-dir.js",revision:"4ff0d3aa621c19135e377be1dd121bca"},{url:"itk/node_modules/fs-extra/lib/move-sync/index.js",revision:"c2e4f586bcc5bc6e0db8369003bcfd6b"},{url:"itk/node_modules/fs-extra/lib/move-sync/move-sync.js",revision:"cc9339e7d4e2ce08f6d79d08d348d824"},{url:"itk/node_modules/fs-extra/lib/move/index.js",revision:"1895bdcd799c951badcafda242a46247"},{url:"itk/node_modules/fs-extra/lib/move/move.js",revision:"75b52861f7cd90b6ed7cece7279ce037"},{url:"itk/node_modules/fs-extra/lib/output/index.js",revision:"b0adfc74c8e51ce2ab659bfc13752ed3"},{url:"itk/node_modules/fs-extra/lib/path-exists/index.js",revision:"dfb2813673ea5279a9aa7305e5fe33f3"},{url:"itk/node_modules/fs-extra/lib/remove/index.js",revision:"e8c6a5092ac319dec6888ff3686e1dd5"},{url:"itk/node_modules/fs-extra/lib/remove/rimraf.js",revision:"8af4d4abb5011a6543699bfc934d2522"},{url:"itk/node_modules/fs-extra/lib/util/stat.js",revision:"cbbd1b4970fa837c23013c2431b8c35e"},{url:"itk/node_modules/fs-extra/lib/util/utimes.js",revision:"b95e8f0f6d31e27cacaf907e04d44ad7"},{url:"itk/node_modules/jsonfile/index.js",revision:"c18cdb1953c23651297eecd0c2a35df9"},{url:"itk/node_modules/jsonfile/utils.js",revision:"dbf76159ea111d8f0a848e94285b0b68"},{url:"itk/node_modules/universalify/index.js",revision:"86ef0931da77d998bfa45c365b1300e1"},{url:"itk/readArrayBuffer.js",revision:"52c7067839ff7a061d7b7ab36c6f3060"},{url:"itk/readBlob.js",revision:"b9c4329a7319055ed6fa6bc207f38c26"},{url:"itk/readFile.js",revision:"bedc9547efc2fea97cc526a4669a0d35"},{url:"itk/readImageArrayBuffer.js",revision:"a259a00465ba77dab3ab7af895c1963b"},{url:"itk/readImageBlob.js",revision:"37c28c5ca49b26a58a643701d05b3615"},{url:"itk/readImageDICOMFileSeries.js",revision:"78a4b3503aa2f8b9fc6c6fc11b59a4a8"},{url:"itk/readImageEmscriptenFSDICOMFileSeries.js",revision:"e55d37cf66d30aa0af09dfc793c05d64"},{url:"itk/readImageEmscriptenFSFile.js",revision:"9dcb75216b2bcc76fb82a17a3efd49d3"},{url:"itk/readImageFile.js",revision:"972c0f132fa59f991c69870f7334e793"},{url:"itk/readImageHTTP.js",revision:"16d70e5fdc745c1f135f79b9c75af71e"},{url:"itk/readImageLocalDICOMFileSeries.js",revision:"ae400fe4b398d153b238c3235a9bd359"},{url:"itk/readImageLocalDICOMFileSeriesSync.js",revision:"f5304b91ab32c64e97cb7914073e1e09"},{url:"itk/readImageLocalFile.js",revision:"737d2cb279cddbd825f37d09847700d5"},{url:"itk/readImageLocalFileSync.js",revision:"109df853264bcf775af5dd0b3b55f61e"},{url:"itk/readLocalFile.js",revision:"eb491746332118fe063931f33418d59a"},{url:"itk/readLocalFileSync.js",revision:"e5a2bd3e980bcebc9c693298e7da386d"},{url:"itk/readMeshArrayBuffer.js",revision:"3ac0c0d4ad2b914277576007a7f0a9d6"},{url:"itk/readMeshBlob.js",revision:"761e3e9e45b214e01df98f1f9c14f6ad"},{url:"itk/readMeshEmscriptenFSFile.js",revision:"25dc1fdbab7b50e8e47222cd8f80458f"},{url:"itk/readMeshFile.js",revision:"4846a9eda71178535634b335617e29c5"},{url:"itk/readMeshLocalFile.js",revision:"a257c746adfc7f224dd00585882d4d57"},{url:"itk/readMeshLocalFileSync.js",revision:"93367c12748c47e1b1f420285feec59e"},{url:"itk/readPolyDataArrayBuffer.js",revision:"3e4fbdd59d13e372d685d6f6c0ab8438"},{url:"itk/readPolyDataBlob.js",revision:"054aebd1b227eb71dc9220dc32c2bde5"},{url:"itk/readPolyDataFile.js",revision:"c4d76cf30c4d6b3d16d7a7c5d01c4831"},{url:"itk/readPolyDataLocalFile.js",revision:"72d197d73334673dae99747216b6f052"},{url:"itk/readPolyDataLocalFileSync.js",revision:"8a9c327159998fe88c4792c6f633a387"},{url:"itk/runPipelineBrowser.js",revision:"3eb328f58bd29b037ff91a94d6b5289a"},{url:"itk/runPipelineEmscripten.js",revision:"2c996749c20c37aee6df7a7fc6818300"},{url:"itk/runPipelineNode.js",revision:"bad2e6fb64ae0258958b5da17d166789"},{url:"itk/runPipelineNodeSync.js",revision:"5361e5412d619c76d357a7568e51d6b8"},{url:"itk/setMatrixElement.js",revision:"a0099a7c2321a96954e51816e53c6074"},{url:"itk/stackImages.js",revision:"68382b996c21f8e4d5167f6b1a63a8b8"},{url:"itk/umd/itk.js",revision:"c78d2de58568fcd53468b76dabaffcfa"},{url:"itk/writeArrayBuffer.js",revision:"30d656c5e27d8146da1c971482dd8706"},{url:"itk/writeImageArrayBuffer.js",revision:"a6bccc57b7bb0453900b445c52c3b894"},{url:"itk/writeImageEmscriptenFSFile.js",revision:"6b45773bc0eccf6dd0ef17773a7dbc46"},{url:"itk/writeImageLocalFile.js",revision:"4e0622719fdc7a2e51dea811a1aa401a"},{url:"itk/writeImageLocalFileSync.js",revision:"38932fa7a9d4746850294a61ad1b7a80"},{url:"itk/writeLocalFile.js",revision:"f9d99f8f674622d089cbecabd848669b"},{url:"itk/writeLocalFileSync.js",revision:"811f2e370fac4bf4ce9dd05180903807"},{url:"itk/writeMeshArrayBuffer.js",revision:"4766a1caa590a090ea1078c9a9fb2cc5"},{url:"itk/writeMeshEmscriptenFSFile.js",revision:"ec1057f541c847b05666501a649c9327"},{url:"itk/writeMeshLocalFile.js",revision:"0797ad346c4a1b0e6655b79c78813313"},{url:"itk/writeMeshLocalFileSync.js",revision:"23fb1410a127c4861127777e7d39ab87"},{url:"runtime.f5a0ef0d83d36acd666a.js",revision:null}],{}),e.cleanupOutdatedCaches(),e.registerRoute(/(\.css|\.ttf|\.eot|\.woff|\.js|\.png|\.svg|\.wasm)$/,new e.NetworkFirst,"GET")})); diff --git a/app/vendors.03873153ec84569c797f.js b/app/vendors.03873153ec84569c797f.js new file mode 100644 index 00000000..0308dc3f --- /dev/null +++ b/app/vendors.03873153ec84569c797f.js @@ -0,0 +1,2 @@ +/*! For license information please see vendors.03873153ec84569c797f.js.LICENSE.txt */ +(self.webpackChunkglance=self.webpackChunkglance||[]).push([[1],[function(e,t,n){"use strict";n.d(t,{a:function(){return x},b:function(){return w},c:function(){return le},d:function(){return H},e:function(){return U},f:function(){return $},g:function(){return R},h:function(){return K},i:function(){return Y},j:function(){return ie},k:function(){return G},l:function(){return j},m:function(){return se},n:function(){return Z},o:function(){return I},p:function(){return re},r:function(){return g},s:function(){return V},v:function(){return v}});var r=n(97),i=n.n(r),o=n(23),a=n(355);let s=0;const l=Symbol("void");const u={};function c(){}["log","debug","info","warn","error","time","timeEnd","group","groupEnd"].forEach((e=>{u[e]=c})),o.I.console=console.hasOwnProperty("log")?console:u;const d={debug:c,error:o.I.console.error||c,info:o.I.console.info||c,log:o.I.console.log||c,warn:o.I.console.warn||c};function p(e,t){d[e]&&(d[e]=t||c)}function f(){d.log(...arguments)}function h(){d.info(...arguments)}function m(){d.debug(...arguments)}function g(){d.error(...arguments)}function v(){d.warn(...arguments)}const y={};function _(e){y[e]||(d.error(e),y[e]=!0)}const b=Object.create(null);b.Float32Array=Float32Array,b.Float64Array=Float64Array,b.Uint8Array=Uint8Array,b.Int8Array=Int8Array,b.Uint16Array=Uint16Array,b.Int16Array=Int16Array,b.Uint32Array=Uint32Array,b.Int32Array=Int32Array,b.Uint8ClampedArray=Uint8ClampedArray;try{b.BigInt64Array=BigInt64Array,b.BigUint64Array=BigUint64Array}catch{}function x(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;const r=["TB","GB","MB","KB"];let i=Number(e),o="B";for(;i>n;)i/=n,o=r.pop();return`${i.toFixed(t)} ${o}`}function D(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";const n=[];let r=e;for(;r>1e3;)n.push(("000"+r%1e3).slice(-3)),r=Math.floor(r/1e3);return r>0&&n.push(r),n.reverse(),n.join(t)}function A(e){Object.keys(e).forEach((t=>{Array.isArray(e[t])&&(e[t]=[].concat(e[t]))}))}function P(e){return Object.values(b).some((t=>e instanceof t))}function k(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n{const e=performance.now()-n;t(e)}))}function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};A(t);const n=[];if(Number.isInteger(t.mtime)||(t.mtime=++s),"classHierarchy"in t){if(!(t.classHierarchy instanceof a.Z)){const e=new a.Z;for(let n=0;n!!t.deleted,e.modified=r=>{t.deleted?g("instance deleted - cannot call any method"):r&&rt&&t(e))))},e.onModified=e=>{if(t.deleted)return g("instance deleted - cannot call any method"),null;const r=n.length;return n.push(e),i(r)},e.getMTime=()=>t.mtime,e.isA=e=>{let n=t.classHierarchy.length;for(;n--;)if(t.classHierarchy[n]===e)return!0;return!1},e.getClassName=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.classHierarchy[t.classHierarchy.length-1-e]},e.set=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return Object.keys(n).forEach((a=>{const s=i?null:e[`set${S(a)}`];s&&Array.isArray(n[a])&&s.length>1?o=s(...n[a])||o:s?o=s(n[a])||o:(-1!==["mtime"].indexOf(a)||r||v(`Warning: Set value to model directly ${a}, ${n[a]}`),o=t[a]!==n[a]||o,t[a]=n[a])})),o},e.get=function(){for(var e=arguments.length,n=new Array(e),r=0;r{i[e]=t[e]})),i},e.getReferenceByName=e=>t[e],e.delete=()=>{Object.keys(t).forEach((e=>delete t[e])),n.forEach(((e,t)=>r(t))),t.deleted=!0},e.getState=()=>{if(t.deleted)return null;const n={...t,vtkClass:e.getClassName()};Object.keys(n).forEach((e=>{null===n[e]||void 0===n[e]||"_"===e[0]?delete n[e]:n[e].isA?n[e]=n[e].getState():Array.isArray(n[e])?n[e]=n[e].map(L):P(n[e])&&(n[e]=Array.from(n[e]))}));const r={};return Object.keys(n).sort().forEach((e=>{r[e]=n[e]})),r.mtime&&delete r.mtime,r},e.shallowCopy=function(n){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n.getClassName()!==e.getClassName())throw new Error(`Cannot ShallowCopy ${n.getClassName()} into ${e.getClassName()}`);const i=n.get(),o=Object.keys(t).sort(),a=Object.keys(i).sort();a.forEach((e=>{const n=o.indexOf(e);-1===n?r&&m(`add ${e} in shallowCopy`):o.splice(n,1),t[e]=i[e]})),o.length&&r&&m(`Untouched keys: ${o.join(", ")}`),e.modified()},e.toJSON=function(){return e.getState()},e}const N={object:(e,t,n)=>function(){return{...t[n.name]}}};function R(e,t,n){n.forEach((n=>{if("object"==typeof n){const r=N[n.type];e[`get${C(n.name)}`]=r?r(e,t,n):()=>t[n.name]}else e[`get${C(n)}`]=()=>t[n]}))}const B={enum(e,t,n){const r=`_on${C(n.name)}Changed`;return i=>{if("string"==typeof i){if(void 0!==n.enum[i])return t[n.name]!==n.enum[i]&&(t[n.name]=n.enum[i],e.modified(),!0);throw g(`Set Enum with invalid argument ${n}, ${i}`),new RangeError("Set Enum with invalid string argument")}if("number"==typeof i){if(t[n.name]!==i){if(-1!==Object.keys(n.enum).map((e=>n.enum[e])).indexOf(i)){const o=t[n.name];return t[n.name]=i,t[r]?.(e,t,i,o),e.modified(),!0}throw g(`Set Enum outside numeric range ${n}, ${i}`),new RangeError("Set Enum outside numeric range")}return!1}throw g(`Set Enum with invalid argument (String/Number) ${n}, ${i}`),new TypeError("Set Enum with invalid argument (String/Number)")}},object(e,t,n){const r=`_on${C(n.name)}Changed`;return o=>{if(!i()(t[n.name],o)){const i=t[n.name];return t[n.name]=o,t[r]?.(e,t,o,i),e.modified(),!0}return!1}}};function F(e){if("object"==typeof e){const t=B[e.type];if(t)return(n,r)=>t(n,r,e);throw g(`No setter for field ${e}`),new TypeError("No setter for field")}return function(t,n){const r=`_on${C(e)}Changed`;return function(i){if(n.deleted)return g("instance deleted - cannot call any method"),!1;if(n[e]!==i){const o=n[e.name];return n[e]=i,n[r]?.(t,n,i,o),t.modified(),!0}return!1}}}function V(e,t,n){n.forEach((n=>{"object"==typeof n?e[`set${C(n.name)}`]=F(n)(e,t):e[`set${C(n)}`]=F(n)(e,t)}))}function U(e,t,n){R(e,t,n),V(e,t,n)}function G(e,t,n){n.forEach((n=>{e[`get${C(n)}`]=()=>t[n]?Array.from(t[n]):t[n],e[`get${C(n)}ByReference`]=()=>t[n]}))}function z(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;n.forEach((n=>{if(t[n]&&r&&t[n].length!==r)throw new RangeError(`Invalid initial number of values for array (${n})`);const o=`_on${C(n)}Changed`;e[`set${C(n)}`]=function(){if(t.deleted)return g("instance deleted - cannot call any method"),!1;for(var a=arguments.length,s=new Array(a),l=0;l=0)&&(c=c[0],d=!0),null==c)u=t[n]!==c;else{if(r&&c.length!==r){if(!(c.length{const r=t[n];e.forEach(((e,t)=>{r[t]=e}))}}))}function j(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;G(e,t,n),z(e,t,n,r,i)}function Y(e,t,n){for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:0;t.deleted?g("instance deleted - cannot call any method"):r>=t.numberOfInputs?g(`algorithm ${e.getClassName()} only has ${t.numberOfInputs} input ports. To add more input ports, use addInputData()`):(t.inputData[r]!==n||t.inputConnection[r])&&(t.inputData[r]=n,t.inputConnection[r]=null,e.modified&&e.modified())}function a(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t.deleted)g("instance deleted - cannot call any method");else{if(r>=t.numberOfInputs){let n=`algorithm ${e.getClassName()} only has `;return n+=`${t.numberOfInputs}`,n+=" input ports. To add more input ports, use addInputConnection()",void g(n)}t.inputData[r]=null,t.inputConnection[r]=n}}function s(){let e=t.numberOfInputs;for(;e&&!t.inputData[e-1]&&!t.inputConnection[e-1];)e--;return e===t.numberOfInputs&&t.numberOfInputs++,e}function l(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.deleted?(g("instance deleted - cannot call any method"),null):(e.shouldUpdate()&&e.update(),t.output[n])}if(t.inputData?t.inputData=t.inputData.map(o.Z):t.inputData=[],t.inputConnection?t.inputConnection=t.inputConnection.map(o.Z):t.inputConnection=[],t.output?t.output=t.output.map(o.Z):t.output=[],t.inputArrayToProcess?t.inputArrayToProcess=t.inputArrayToProcess.map(o.Z):t.inputArrayToProcess=[],t.numberOfInputs=n,e.shouldUpdate=()=>{const n=e.getMTime();let i=1/0,o=r;for(;o--;){if(!t.output[o]||t.output[o].isDeleted())return!0;const e=t.output[o].getMTime();if(ei)return!0;return!1},t.numberOfInputs){let n=t.numberOfInputs;for(;n--;)t.inputData.push(null),t.inputConnection.push(null);e.setInputData=i,e.setInputConnection=a,e.addInputData=function(e){t.deleted?g("instance deleted - cannot call any method"):i(e,s())},e.addInputConnection=function(e){t.deleted?g("instance deleted - cannot call any method"):a(e,s())},e.getInputData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]&&(t.inputData[e]=t.inputConnection[e]()),t.inputData[e]},e.getInputConnection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]}}r&&(e.getOutputData=l,e.getOutputPort=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const n=()=>l(t);return n.filter=e,n}),e.update=()=>{const n=[];if(t.numberOfInputs){let r=0;for(;rt.numberOfInputs,e.getNumberOfOutputPorts=()=>r||t.output.length,e.getInputArrayToProcess=e=>{const n=t.inputArrayToProcess[e],r=t.inputData[e];return n&&r?r[`get${n.fieldAssociation}`]().getArray(n.arrayName):null},e.setInputArrayToProcess=function(e,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Scalars";for(;t.inputArrayToProcess.lengthr.apply(e,arguments)),1-i);else{if(r.apply(e,arguments)===W)break}}},e[`on${C(n)}`]=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e.apply)return console.error(`Invalid callback for event ${n}`),null;if(t.deleted)return g("instance deleted - cannot call any method"),null;const a=o++;return r.push([a,e,i]),r.sort(((e,t)=>t[2]-e[2])),s(a)},e.delete=()=>{i(),r.forEach((e=>{let[t]=e;return a(t)}))}}function Z(e,t){const n=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n={},r={};return e(r,n,t),Object.freeze(r)};return t&&o.Z.register(t,n),n}function K(){for(var e=arguments.length,t=new Array(e),n=0;n!!e)).map((e=>e(...n)))}}function q(e){return e&&e.isA&&e.isA("vtkObject")}function X(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(q(e)){if(r.indexOf(e)>=0)return n;r.push(e);const i=t(e);void 0!==i&&n.push(i);const o=e.get();Object.keys(o).forEach((e=>{const i=o[e];Array.isArray(i)?i.forEach((e=>{X(e,t,n,r)})):X(i,t,n,r)}))}return n}function J(e,t,n){var r=this;let i;const o=function(){for(var o=arguments.length,a=new Array(o),s=0;s{i=null,n||e.apply(l,a)},c=n&&!i;clearTimeout(i),i=setTimeout(u,t),c&&e.apply(l,a)};return o.cancel=()=>clearTimeout(i),o}function Q(e,t){let n=!1,r=null;function i(){n=!1,null!==r&&(o(...r),r=null)}function o(){for(var o=arguments.length,a=new Array(o),s=0;s2&&void 0!==arguments[2]?arguments[2]:{};t.keystore=Object.assign(t.keystore||{},n),e.setKey=(e,n)=>{t.keystore[e]=n},e.getKey=e=>t.keystore[e],e.getAllKeys=()=>Object.keys(t.keystore),e.deleteKey=e=>delete t.keystore[e],e.clearKeystore=()=>e.getAllKeys().forEach((e=>delete t.keystore[e]))}let te=1;const ne="__root__";function re(e,t){ee(e,t);const n=e.delete;t.proxyId=""+te++,t.ui=JSON.parse(JSON.stringify(t.ui||[])),R(e,t,["proxyId","proxyGroup","proxyName"]),U(e,t,["proxyManager"]);const r={},i={};function o(e,t){i[t]||(i[t]=[]);const n=i[t];for(let t=0;t0&&void 0!==arguments[0]?arguments[0]:ne;return i[e]}function s(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne;const r=[],i=t.proxyId,o=a(n)||[];for(let t=0;t{t.ui=JSON.parse(JSON.stringify(n||[])),Object.keys(r).forEach((e=>delete r[e])),Object.keys(i).forEach((e=>delete i[e])),o(t.ui,ne),e.modified()},e.updateProxyProperty=(e,t)=>{const n=r[e];n?Object.assign(n,t):r[e]={...t}},e.activate=()=>{if(t.proxyManager){const n=`setActive${C(e.getProxyGroup().slice(0,-1))}`;t.proxyManager[n]&&t.proxyManager[n](e)}},t.propertyLinkSubscribers={},e.registerPropertyLinkForGC=(e,n)=>{n in t.propertyLinkSubscribers||(t.propertyLinkSubscribers[n]=[]),t.propertyLinkSubscribers[n].push(e)},e.gcPropertyLinks=n=>{const r=t.propertyLinkSubscribers[n]||[];for(;r.length;)r.pop().unbind(e)},t.propertyLinkMap={},e.getPropertyLink=function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.propertyLinkMap[e])return t.propertyLinkMap[e];let r=null;const i=[];let o=0,a=!1;function s(n){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(a)return null;const l=[];let u=null;for(o=i.length;o--;){const e=i[o];e.instance===n?u=e:l.push(e)}if(!u)return null;const c=u.instance[`get${C(u.propertyName)}`]();if(!k(c,r)||s){for(r=c,a=!0;l.length;){const e=l.pop();e.instance.set({[e.propertyName]:r})}a=!1}return t.propertyLinkMap[e].persistent&&(t.propertyLinkMap[e].value=c),c}function l(e,t){const n=[];for(o=i.length;o--;){const r=i[o];r.instance!==e||r.propertyName!==t&&void 0!==t||(r.subscription.unsubscribe(),n.push(o))}for(;n.length;)i.splice(n.pop(),1)}function u(n,r){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const a=n.onModified(s),u=i[0];return i.push({instance:n,propertyName:r,subscription:a}),o&&(t.propertyLinkMap[e].persistent&&void 0!==t.propertyLinkMap[e].value?n.set({[r]:t.propertyLinkMap[e].value}):u&&s(u.instance,!0)),{unsubscribe:()=>l(n,r)}}function c(){for(;i.length;)i.pop().subscription.unsubscribe()}const d={bind:u,unbind:l,unsubscribe:c,persistent:n};return t.propertyLinkMap[e]=d,d},e.listPropertyNames=()=>s().map((e=>e.name)),e.getPropertyByName=e=>s().find((t=>t.name===e)),e.getPropertyDomainByName=e=>(r[e]||{}).domain,e.getProxySection=()=>({id:t.proxyId,name:t.proxyGroup,ui:t.ui,properties:s()}),e.delete=()=>{const r=Object.keys(t.propertyLinkMap);let i=r.length;for(;i--;)t.propertyLinkMap[r[i]].unsubscribe();Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks),n()},e.getState=()=>null,O((function(){if(t.links)for(let n=0;n{for(;i.length;)i.pop().unsubscribe();r()}}function oe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};function i(e){const n=Object.keys(e);let r=n.length;for(;r--;){const i=n[r];t[i].set(e[i])}}t.this=e;const o=Object.keys(r);let a=o.length;for(;a--;){const s=o[a];t[s]=r[s];const l=n[s];e[`set${C(s)}`]=n=>{if(n!==t[s]){t[s]=n;i(l[n]),e.modified()}}}o.length&&R(e,t,o)}function ae(e){let t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,i=10*n,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(1===e.deltaMode?(r*=40,i*=40):(r*=800,i*=800)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}var se={algo:H,capitalize:S,chain:K,debounce:J,enumToString:function(e,t){return Object.keys(e).find((n=>e[n]===t))},event:$,EVENT_ABORT:W,formatBytesToProperUnit:M,formatNumbersWithThousandSeparator:D,get:R,getArray:G,getCurrentGlobalMTime:function(){return s},getStateArrayMapFunc:L,isVtkObject:q,keystore:ee,measurePromiseExecution:E,moveToProtected:Y,newInstance:Z,newTypedArray:x,newTypedArrayFrom:w,normalizeWheel:ae,obj:I,proxy:re,proxyPropertyMapping:ie,proxyPropertyState:oe,safeArrays:A,set:V,setArray:z,setGet:U,setGetArray:j,setImmediate:O,setLoggerFunction:p,throttle:Q,traverseInstanceTree:X,TYPED_ARRAYS:b,uncapitalize:T,VOID:l,vtkDebugMacro:m,vtkErrorMacro:g,vtkInfoMacro:h,vtkLogMacro:f,vtkOnceErrorMacro:_,vtkWarningMacro:v},le=Object.freeze({__proto__:null,VOID:l,setLoggerFunction:p,vtkLogMacro:f,vtkInfoMacro:h,vtkDebugMacro:m,vtkErrorMacro:g,vtkWarningMacro:v,vtkOnceErrorMacro:_,TYPED_ARRAYS:b,newTypedArray:x,newTypedArrayFrom:w,capitalize:S,_capitalize:C,uncapitalize:T,formatBytesToProperUnit:M,formatNumbersWithThousandSeparator:D,setImmediateVTK:O,measurePromiseExecution:E,obj:I,get:R,set:V,setGet:U,getArray:G,setArray:z,setGetArray:j,moveToProtected:Y,algo:H,EVENT_ABORT:W,event:$,newInstance:Z,chain:K,isVtkObject:q,traverseInstanceTree:X,debounce:J,throttle:Q,keystore:ee,proxy:re,proxyPropertyMapping:ie,proxyPropertyState:oe,normalizeWheel:ae,default:se})},function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,r;function i(){return t.apply(null,arguments)}function o(e){t=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(l(e,t))return!1;return!0}function c(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function p(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,r=[];for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var B=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},U={};function G(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(U[e]=i),t&&(U[t[0]]=function(){return R(i.apply(this,arguments),t[1],t[2])}),n&&(U[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function z(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function j(e){var t,n,r=e.match(B);for(t=0,n=r.length;t=0&&F.test(e);)e=e.replace(F,r),F.lastIndex=0,n-=1;return e}var W={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function $(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(B).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var Z="Invalid date";function K(){return this._invalidDate}var q="%d",X=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var Q={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ee(e,t,n,r){var i=this._relativeTime[n];return k(i)?i(e,t,n,r):i.replace(/%d/i,e)}function te(e,t){var n=this._relativeTime[e>0?"future":"past"];return k(n)?n(t):n.replace(/%s/i,t)}var ne={};function re(e,t){var n=e.toLowerCase();ne[n]=ne[n+"s"]=ne[t]=e}function ie(e){return"string"==typeof e?ne[e]||ne[e.toLowerCase()]:void 0}function oe(e){var t,n,r={};for(n in e)l(e,n)&&(t=ie(n))&&(r[t]=e[n]);return r}var ae={};function se(e,t){ae[e]=t}function le(e){var t,n=[];for(t in e)l(e,t)&&n.push({unit:t,priority:ae[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function ue(e){return e%4==0&&e%100!=0||e%400==0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function de(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}function pe(e,t){return function(n){return null!=n?(he(this,e,n),i.updateOffset(this,t),this):fe(this,e)}}function fe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function he(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ue(e.year())&&1===e.month()&&29===e.date()?(n=de(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),et(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function me(e){return k(this[e=ie(e)])?this[e]():this}function ge(e,t){if("object"==typeof e){var n,r=le(e=oe(e));for(n=0;n68?1900:2e3)};var vt=pe("FullYear",!0);function yt(){return ue(this.year())}function _t(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function bt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function xt(e,t,n){var r=7+t-n;return-(7+bt(e,0,r).getUTCDay()-t)%7+r-1}function wt(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+xt(e,r,i);return s<=0?a=gt(o=e-1)+s:s>gt(e)?(o=e+1,a=s-gt(e)):(o=e,a=s),{year:o,dayOfYear:a}}function St(e,t,n){var r,i,o=xt(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Ct(i=e.year()-1,t,n):a>Ct(e.year(),t,n)?(r=a-Ct(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ct(e,t,n){var r=xt(e,t,n),i=xt(e+1,t,n);return(gt(e)-r+i)/7}function Tt(e){return St(e,this._week.dow,this._week.doy).week}G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),re("week","w"),re("isoWeek","W"),se("week",5),se("isoWeek",5),Ne("w",Se),Ne("ww",Se,_e),Ne("W",Se),Ne("WW",Se,_e),Ge(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=de(e)}));var Mt={dow:0,doy:6};function Dt(){return this._week.dow}function At(){return this._week.doy}function Pt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function kt(e){var t=St(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Lt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ot(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Et(e,t){return e.slice(t,7).concat(e.slice(0,t))}G("d",0,"do","day"),G("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),G("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),G("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),re("day","d"),re("weekday","e"),re("isoWeekday","E"),se("day",11),se("weekday",11),se("isoWeekday",11),Ne("d",Se),Ne("e",Se),Ne("E",Se),Ne("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ne("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ne("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ge(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:v(n).invalidWeekday=e})),Ge(["d","e","E"],(function(e,t,n,r){t[r]=de(e)}));var It="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Nt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Rt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Bt=Ie,Ft=Ie,Vt=Ie;function Ut(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Et(n,this._week.dow):e?n[e.day()]:n}function Gt(e){return!0===e?Et(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function zt(e){return!0===e?Et(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function jt(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=je.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=je.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=je.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=je.call(this._weekdaysParse,a))||-1!==(i=je.call(this._shortWeekdaysParse,a))||-1!==(i=je.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=je.call(this._shortWeekdaysParse,a))||-1!==(i=je.call(this._weekdaysParse,a))||-1!==(i=je.call(this._minWeekdaysParse,a))?i:null:-1!==(i=je.call(this._minWeekdaysParse,a))||-1!==(i=je.call(this._weekdaysParse,a))||-1!==(i=je.call(this._shortWeekdaysParse,a))?i:null}function Yt(e,t,n){var r,i,o;if(this._weekdaysParseExact)return jt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Lt(e,this.localeData()),this.add(e-t,"d")):t}function Wt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function $t(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ot(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Zt(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Bt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Kt(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ft),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function qt(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Xt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Xt(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),r=Fe(this.weekdaysMin(n,"")),i=Fe(this.weekdaysShort(n,"")),o=Fe(this.weekdays(n,"")),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);a.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Jt(){return this.hours()%12||12}function Qt(){return this.hours()||24}function en(e,t){G(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function tn(e,t){return t._meridiemParse}function nn(e){return"p"===(e+"").toLowerCase().charAt(0)}G("H",["HH",2],0,"hour"),G("h",["hh",2],0,Jt),G("k",["kk",2],0,Qt),G("hmm",0,0,(function(){return""+Jt.apply(this)+R(this.minutes(),2)})),G("hmmss",0,0,(function(){return""+Jt.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)})),G("Hmm",0,0,(function(){return""+this.hours()+R(this.minutes(),2)})),G("Hmmss",0,0,(function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)})),en("a",!0),en("A",!1),re("hour","h"),se("hour",13),Ne("a",tn),Ne("A",tn),Ne("H",Se),Ne("h",Se),Ne("k",Se),Ne("HH",Se,_e),Ne("hh",Se,_e),Ne("kk",Se,_e),Ne("hmm",Ce),Ne("hmmss",Te),Ne("Hmm",Ce),Ne("Hmmss",Te),Ue(["H","HH"],$e),Ue(["k","kk"],(function(e,t,n){var r=de(e);t[$e]=24===r?0:r})),Ue(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Ue(["h","hh"],(function(e,t,n){t[$e]=de(e),v(n).bigHour=!0})),Ue("hmm",(function(e,t,n){var r=e.length-2;t[$e]=de(e.substr(0,r)),t[Ze]=de(e.substr(r)),v(n).bigHour=!0})),Ue("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[$e]=de(e.substr(0,r)),t[Ze]=de(e.substr(r,2)),t[Ke]=de(e.substr(i)),v(n).bigHour=!0})),Ue("Hmm",(function(e,t,n){var r=e.length-2;t[$e]=de(e.substr(0,r)),t[Ze]=de(e.substr(r))})),Ue("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[$e]=de(e.substr(0,r)),t[Ze]=de(e.substr(r,2)),t[Ke]=de(e.substr(i))}));var rn=/[ap]\.?m?\.?/i,on=pe("Hours",!0);function an(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var sn,ln={calendar:I,longDateFormat:W,invalidDate:Z,ordinal:q,dayOfMonthOrdinalParse:X,relativeTime:Q,months:tt,monthsShort:nt,week:Mt,weekdays:It,weekdaysMin:Rt,weekdaysShort:Nt,meridiemParse:rn},un={},cn={};function dn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(r=hn(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&dn(i,n)>=t-1)break;t--}o++}return sn}function hn(t){var r=null;if(void 0===un[t]&&e&&e.exports)try{r=sn._abbr,n(524)("./"+t),mn(r)}catch(e){un[t]=null}return un[t]}function mn(e,t){var n;return e&&((n=c(t)?yn(e):gn(e,t))?sn=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),sn._abbr}function gn(e,t){if(null!==t){var n,r=ln;if(t.abbr=e,null!=un[e])P("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=un[e]._config;else if(null!=t.parentLocale)if(null!=un[t.parentLocale])r=un[t.parentLocale]._config;else{if(null==(n=hn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return un[e]=new E(O(r,t)),cn[e]&&cn[e].forEach((function(e){gn(e.name,e.config)})),mn(e),un[e]}return delete un[e],null}function vn(e,t){if(null!=t){var n,r,i=ln;null!=un[e]&&null!=un[e].parentLocale?un[e].set(O(un[e]._config,t)):(null!=(r=hn(e))&&(i=r._config),t=O(i,t),null==r&&(t.abbr=e),(n=new E(t)).parentLocale=un[e],un[e]=n),mn(e)}else null!=un[e]&&(null!=un[e].parentLocale?(un[e]=un[e].parentLocale,e===mn()&&mn(e)):null!=un[e]&&delete un[e]);return un[e]}function yn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return sn;if(!a(e)){if(t=hn(e))return t;e=[e]}return fn(e)}function _n(){return D(un)}function bn(e){var t,n=e._a;return n&&-2===v(e).overflow&&(t=n[He]<0||n[He]>11?He:n[We]<1||n[We]>et(n[Ye],n[He])?We:n[$e]<0||n[$e]>24||24===n[$e]&&(0!==n[Ze]||0!==n[Ke]||0!==n[qe])?$e:n[Ze]<0||n[Ze]>59?Ze:n[Ke]<0||n[Ke]>59?Ke:n[qe]<0||n[qe]>999?qe:-1,v(e)._overflowDayOfYear&&(tWe)&&(t=We),v(e)._overflowWeeks&&-1===t&&(t=Xe),v(e)._overflowWeekday&&-1===t&&(t=Je),v(e).overflow=t),e}var xn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,Cn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Tn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mn=/^\/?Date\((-?\d+)/i,Dn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,An={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Pn(e){var t,n,r,i,o,a,s=e._i,l=xn.exec(s)||wn.exec(s);if(l){for(v(e).iso=!0,t=0,n=Cn.length;tgt(o)||0===e._dayOfYear)&&(v(e)._overflowDayOfYear=!0),n=bt(o,0,e._dayOfYear),e._a[He]=n.getUTCMonth(),e._a[We]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[$e]&&0===e._a[Ze]&&0===e._a[Ke]&&0===e._a[qe]&&(e._nextDay=!0,e._a[$e]=0),e._d=(e._useUTC?bt:_t).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[$e]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(v(e).weekdayMismatch=!0)}}function Un(e){var t,n,r,i,o,a,s,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,n=Bn(t.GG,e._a[Ye],St(Kn(),1,4).year),r=Bn(t.W,1),((i=Bn(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,u=St(Kn(),o,a),n=Bn(t.gg,e._a[Ye],u.year),r=Bn(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>Ct(n,o,a)?v(e)._overflowWeeks=!0:null!=l?v(e)._overflowWeekday=!0:(s=wt(n,r,i,o,a),e._a[Ye]=s.year,e._dayOfYear=s.dayOfYear)}function Gn(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],v(e).empty=!0;var t,n,r,o,a,s,l=""+e._i,u=l.length,c=0;for(r=H(e._f,e._locale).match(B)||[],t=0;t0&&v(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),c+=n.length),U[o]?(n?v(e).empty=!1:v(e).unusedTokens.push(o),ze(o,n,e)):e._strict&&!n&&v(e).unusedTokens.push(o);v(e).charsLeftOver=u-c,l.length>0&&v(e).unusedInput.push(l),e._a[$e]<=12&&!0===v(e).bigHour&&e._a[$e]>0&&(v(e).bigHour=void 0),v(e).parsedDateParts=e._a.slice(0),v(e).meridiem=e._meridiem,e._a[$e]=zn(e._locale,e._a[$e],e._meridiem),null!==(s=v(e).era)&&(e._a[Ye]=e._locale.erasConvertYear(s,e._a[Ye])),Vn(e),bn(e)}else Nn(e);else Pn(e)}function zn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function jn(e){var t,n,r,i,o,a,s=!1;if(0===e._f.length)return v(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:_()}));function Jn(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Kn();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Wn(t))._a?(e=t._isUTC?m(t._a):Kn(t._a),this._isDSTShifted=this.isValid()&&ur(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Sr(){return!!this.isValid()&&!this._isUTC}function Cr(){return!!this.isValid()&&this._isUTC}function Tr(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Mr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Dr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ar(e,t){var n,r,i,o=e,a=null;return sr(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=Mr.exec(e))?(n="-"===a[1]?-1:1,o={y:0,d:de(a[We])*n,h:de(a[$e])*n,m:de(a[Ze])*n,s:de(a[Ke])*n,ms:de(lr(1e3*a[qe]))*n}):(a=Dr.exec(e))?(n="-"===a[1]?-1:1,o={y:Pr(a[2],n),M:Pr(a[3],n),w:Pr(a[4],n),d:Pr(a[5],n),h:Pr(a[6],n),m:Pr(a[7],n),s:Pr(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=Lr(Kn(o.from),Kn(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new ar(o),sr(e)&&l(e,"_locale")&&(r._locale=e._locale),sr(e)&&l(e,"_isValid")&&(r._isValid=e._isValid),r}function Pr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function kr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Lr(e,t){var n;return e.isValid()&&t.isValid()?(t=fr(t,e),e.isBefore(t)?n=kr(e,t):((n=kr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Or(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(P(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Er(this,Ar(n,r),e),this}}function Er(e,t,n,r){var o=t._milliseconds,a=lr(t._days),s=lr(t._months);e.isValid()&&(r=null==r||r,s&&ct(e,fe(e,"Month")+s*n),a&&he(e,"Date",fe(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&i.updateOffset(e,a||s))}Ar.fn=ar.prototype,Ar.invalid=or;var Ir=Or(1,"add"),Nr=Or(-1,"subtract");function Rr(e){return"string"==typeof e||e instanceof String}function Br(e){return C(e)||p(e)||Rr(e)||d(e)||Vr(e)||Fr(e)||null==e}function Fr(e){var t,n,r=s(e)&&!u(e),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;tn.valueOf():n.valueOf()9999?Y(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Y(n,"Z")):Y(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=o+'[")]',this.format(e+t+n+r)}function ti(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=Y(this,e);return this.localeData().postformat(t)}function ni(e,t){return this.isValid()&&(C(e)&&e.isValid()||Kn(e).isValid())?Ar({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ri(e){return this.from(Kn(),e)}function ii(e,t){return this.isValid()&&(C(e)&&e.isValid()||Kn(e).isValid())?Ar({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oi(e){return this.to(Kn(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yn(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var si=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function li(){return this._locale}var ui=1e3,ci=60*ui,di=60*ci,pi=3506328*di;function fi(e,t){return(e%t+t)%t}function hi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-pi:new Date(e,t,n).valueOf()}function mi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-pi:Date.UTC(e,t,n)}function gi(e){var t,n;if(void 0===(e=ie(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:hi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fi(t+(this._isUTC?0:this.utcOffset()*ci),di);break;case"minute":t=this._d.valueOf(),t-=fi(t,ci);break;case"second":t=this._d.valueOf(),t-=fi(t,ui)}return this._d.setTime(t),i.updateOffset(this,!0),this}function vi(e){var t,n;if(void 0===(e=ie(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mi:hi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=di-fi(t+(this._isUTC?0:this.utcOffset()*ci),di)-1;break;case"minute":t=this._d.valueOf(),t+=ci-fi(t,ci)-1;break;case"second":t=this._d.valueOf(),t+=ui-fi(t,ui)-1}return this._d.setTime(t),i.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function _i(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function xi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function wi(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Si(){return this.isValid()?this.toISOString():null}function Ci(){return y(this)}function Ti(){return h({},v(this))}function Mi(){return v(this).overflow}function Di(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ai(e,t){var n,r,o,a=this._eras||yn("en")._eras;for(n=0,r=a.length;n=0)return l[r]}function ki(e,t){var n=e.since<=e.until?1:-1;return void 0===t?i(e.since).year():i(e.since).year()+(t-e.offset)*n}function Li(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e(o=Ct(e,r,i))&&(t=o),Xi.call(this,e,t,n,r,i))}function Xi(e,t,n,r,i){var o=wt(e,t,n,r,i),a=bt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Ji(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}G("N",0,0,"eraAbbr"),G("NN",0,0,"eraAbbr"),G("NNN",0,0,"eraAbbr"),G("NNNN",0,0,"eraName"),G("NNNNN",0,0,"eraNarrow"),G("y",["y",1],"yo","eraYear"),G("y",["yy",2],0,"eraYear"),G("y",["yyy",3],0,"eraYear"),G("y",["yyyy",4],0,"eraYear"),Ne("N",Fi),Ne("NN",Fi),Ne("NNN",Fi),Ne("NNNN",Vi),Ne("NNNNN",Ui),Ue(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?v(n).era=i:v(n).invalidEra=e})),Ne("y",Pe),Ne("yy",Pe),Ne("yyy",Pe),Ne("yyyy",Pe),Ne("yo",Gi),Ue(["y","yy","yyy","yyyy"],Ye),Ue(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ye]=n._locale.eraYearOrdinalParse(e,i):t[Ye]=parseInt(e,10)})),G(0,["gg",2],0,(function(){return this.weekYear()%100})),G(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ji("gggg","weekYear"),ji("ggggg","weekYear"),ji("GGGG","isoWeekYear"),ji("GGGGG","isoWeekYear"),re("weekYear","gg"),re("isoWeekYear","GG"),se("weekYear",1),se("isoWeekYear",1),Ne("G",ke),Ne("g",ke),Ne("GG",Se,_e),Ne("gg",Se,_e),Ne("GGGG",De,xe),Ne("gggg",De,xe),Ne("GGGGG",Ae,we),Ne("ggggg",Ae,we),Ge(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=de(e)})),Ge(["gg","GG"],(function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)})),G("Q",0,"Qo","quarter"),re("quarter","Q"),se("quarter",7),Ne("Q",ye),Ue("Q",(function(e,t){t[He]=3*(de(e)-1)})),G("D",["DD",2],"Do","date"),re("date","D"),se("date",9),Ne("D",Se),Ne("DD",Se,_e),Ne("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ue(["D","DD"],We),Ue("Do",(function(e,t){t[We]=de(e.match(Se)[0])}));var Qi=pe("Date",!0);function eo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}G("DDD",["DDDD",3],"DDDo","dayOfYear"),re("dayOfYear","DDD"),se("dayOfYear",4),Ne("DDD",Me),Ne("DDDD",be),Ue(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=de(e)})),G("m",["mm",2],0,"minute"),re("minute","m"),se("minute",14),Ne("m",Se),Ne("mm",Se,_e),Ue(["m","mm"],Ze);var to=pe("Minutes",!1);G("s",["ss",2],0,"second"),re("second","s"),se("second",15),Ne("s",Se),Ne("ss",Se,_e),Ue(["s","ss"],Ke);var no,ro,io=pe("Seconds",!1);for(G("S",0,0,(function(){return~~(this.millisecond()/100)})),G(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),G(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),G(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),G(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),G(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),G(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),re("millisecond","ms"),se("millisecond",16),Ne("S",Me,ye),Ne("SS",Me,_e),Ne("SSS",Me,be),no="SSSS";no.length<=9;no+="S")Ne(no,Pe);function oo(e,t){t[qe]=de(1e3*("0."+e))}for(no="S";no.length<=9;no+="S")Ue(no,oo);function ao(){return this._isUTC?"UTC":""}function so(){return this._isUTC?"Coordinated Universal Time":""}ro=pe("Milliseconds",!1),G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var lo=S.prototype;function uo(e){return Kn(1e3*e)}function co(){return Kn.apply(null,arguments).parseZone()}function po(e){return e}lo.add=Ir,lo.calendar=zr,lo.clone=jr,lo.diff=qr,lo.endOf=vi,lo.format=ti,lo.from=ni,lo.fromNow=ri,lo.to=ii,lo.toNow=oi,lo.get=me,lo.invalidAt=Mi,lo.isAfter=Yr,lo.isBefore=Hr,lo.isBetween=Wr,lo.isSame=$r,lo.isSameOrAfter=Zr,lo.isSameOrBefore=Kr,lo.isValid=Ci,lo.lang=si,lo.locale=ai,lo.localeData=li,lo.max=Xn,lo.min=qn,lo.parsingFlags=Ti,lo.set=ge,lo.startOf=gi,lo.subtract=Nr,lo.toArray=xi,lo.toObject=wi,lo.toDate=bi,lo.toISOString=Qr,lo.inspect=ei,"undefined"!=typeof Symbol&&null!=Symbol.for&&(lo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lo.toJSON=Si,lo.toString=Jr,lo.unix=_i,lo.valueOf=yi,lo.creationData=Di,lo.eraName=Li,lo.eraNarrow=Oi,lo.eraAbbr=Ei,lo.eraYear=Ii,lo.year=vt,lo.isLeapYear=yt,lo.weekYear=Yi,lo.isoWeekYear=Hi,lo.quarter=lo.quarters=Ji,lo.month=dt,lo.daysInMonth=pt,lo.week=lo.weeks=Pt,lo.isoWeek=lo.isoWeeks=kt,lo.weeksInYear=Zi,lo.weeksInWeekYear=Ki,lo.isoWeeksInYear=Wi,lo.isoWeeksInISOWeekYear=$i,lo.date=Qi,lo.day=lo.days=Ht,lo.weekday=Wt,lo.isoWeekday=$t,lo.dayOfYear=eo,lo.hour=lo.hours=on,lo.minute=lo.minutes=to,lo.second=lo.seconds=io,lo.millisecond=lo.milliseconds=ro,lo.utcOffset=mr,lo.utc=vr,lo.local=yr,lo.parseZone=_r,lo.hasAlignedHourOffset=br,lo.isDST=xr,lo.isLocal=Sr,lo.isUtcOffset=Cr,lo.isUtc=Tr,lo.isUTC=Tr,lo.zoneAbbr=ao,lo.zoneName=so,lo.dates=M("dates accessor is deprecated. Use date instead.",Qi),lo.months=M("months accessor is deprecated. Use month instead",dt),lo.years=M("years accessor is deprecated. Use year instead",vt),lo.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),lo.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wr);var fo=E.prototype;function ho(e,t,n,r){var i=yn(),o=m().set(r,t);return i[n](o,e)}function mo(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return ho(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=ho(e,r,n,"month");return i}function go(e,t,n,r){"boolean"==typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var i,o=yn(),a=e?o._week.dow:0,s=[];if(null!=n)return ho(t,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=ho(t,(i+a)%7,r,"day");return s}function vo(e,t){return mo(e,t,"months")}function yo(e,t){return mo(e,t,"monthsShort")}function _o(e,t,n){return go(e,t,n,"weekdays")}function bo(e,t,n){return go(e,t,n,"weekdaysShort")}function xo(e,t,n){return go(e,t,n,"weekdaysMin")}fo.calendar=N,fo.longDateFormat=$,fo.invalidDate=K,fo.ordinal=J,fo.preparse=po,fo.postformat=po,fo.relativeTime=ee,fo.pastFuture=te,fo.set=L,fo.eras=Ai,fo.erasParse=Pi,fo.erasConvertYear=ki,fo.erasAbbrRegex=Ri,fo.erasNameRegex=Ni,fo.erasNarrowRegex=Bi,fo.months=at,fo.monthsShort=st,fo.monthsParse=ut,fo.monthsRegex=ht,fo.monthsShortRegex=ft,fo.week=Tt,fo.firstDayOfYear=At,fo.firstDayOfWeek=Dt,fo.weekdays=Ut,fo.weekdaysMin=zt,fo.weekdaysShort=Gt,fo.weekdaysParse=Yt,fo.weekdaysRegex=Zt,fo.weekdaysShortRegex=Kt,fo.weekdaysMinRegex=qt,fo.isPM=nn,fo.meridiem=an,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===de(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=M("moment.lang is deprecated. Use moment.locale instead.",mn),i.langData=M("moment.langData is deprecated. Use moment.localeData instead.",yn);var wo=Math.abs;function So(){var e=this._data;return this._milliseconds=wo(this._milliseconds),this._days=wo(this._days),this._months=wo(this._months),e.milliseconds=wo(e.milliseconds),e.seconds=wo(e.seconds),e.minutes=wo(e.minutes),e.hours=wo(e.hours),e.months=wo(e.months),e.years=wo(e.years),this}function Co(e,t,n,r){var i=Ar(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function To(e,t){return Co(this,e,t,1)}function Mo(e,t){return Co(this,e,t,-1)}function Do(e){return e<0?Math.floor(e):Math.ceil(e)}function Ao(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Do(ko(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=ce(o/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,n=ce(t/60),l.hours=n%24,a+=ce(n/24),s+=i=ce(Po(a)),a-=Do(ko(i)),r=ce(s/12),s%=12,l.days=a,l.months=s,l.years=r,this}function Po(e){return 4800*e/146097}function ko(e){return 146097*e/4800}function Lo(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=ie(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Po(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(ko(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Oo(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*de(this._months/12):NaN}function Eo(e){return function(){return this.as(e)}}var Io=Eo("ms"),No=Eo("s"),Ro=Eo("m"),Bo=Eo("h"),Fo=Eo("d"),Vo=Eo("w"),Uo=Eo("M"),Go=Eo("Q"),zo=Eo("y");function jo(){return Ar(this)}function Yo(e){return e=ie(e),this.isValid()?this[e+"s"]():NaN}function Ho(e){return function(){return this.isValid()?this._data[e]:NaN}}var Wo=Ho("milliseconds"),$o=Ho("seconds"),Zo=Ho("minutes"),Ko=Ho("hours"),qo=Ho("days"),Xo=Ho("months"),Jo=Ho("years");function Qo(){return ce(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function na(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ra(e,t,n,r){var i=Ar(e).abs(),o=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),l=ea(i.as("d")),u=ea(i.as("M")),c=ea(i.as("w")),d=ea(i.as("y")),p=o<=n.ss&&["s",o]||o0,p[4]=r,na.apply(null,p)}function ia(e){return void 0===e?ea:"function"==typeof e&&(ea=e,!0)}function oa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=ta;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=ra(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var sa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ua(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,a,s,l=sa(this._milliseconds)/1e3,u=sa(this._days),c=sa(this._months),d=this.asSeconds();return d?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,n=ce(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=la(this._months)!==la(d)?"-":"",a=la(this._days)!==la(d)?"-":"",s=la(this._milliseconds)!==la(d)?"-":"",i+"P"+(n?o+n+"Y":"")+(c?o+c+"M":"")+(u?a+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var ca=ar.prototype;return ca.isValid=ir,ca.abs=So,ca.add=To,ca.subtract=Mo,ca.as=Lo,ca.asMilliseconds=Io,ca.asSeconds=No,ca.asMinutes=Ro,ca.asHours=Bo,ca.asDays=Fo,ca.asWeeks=Vo,ca.asMonths=Uo,ca.asQuarters=Go,ca.asYears=zo,ca.valueOf=Oo,ca._bubble=Ao,ca.clone=jo,ca.get=Yo,ca.milliseconds=Wo,ca.seconds=$o,ca.minutes=Zo,ca.hours=Ko,ca.days=qo,ca.weeks=Qo,ca.months=Xo,ca.years=Jo,ca.humanize=aa,ca.toISOString=ua,ca.toString=ua,ca.toJSON=ua,ca.locale=ai,ca.localeData=li,ca.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ua),ca.lang=si,G("X",0,0,"unix"),G("x",0,0,"valueOf"),Ne("x",ke),Ne("X",Ee),Ue("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Ue("x",(function(e,t,n){n._d=new Date(de(e))})),i.version="2.29.1",o(Kn),i.fn=lo,i.min=Qn,i.max=er,i.now=tr,i.utc=m,i.unix=uo,i.months=vo,i.isDate=p,i.locale=mn,i.invalid=_,i.duration=Ar,i.isMoment=C,i.weekdays=_o,i.parseZone=co,i.localeData=yn,i.isDuration=sr,i.monthsShort=yo,i.weekdaysMin=xo,i.defineLocale=gn,i.updateLocale=vn,i.locales=_n,i.weekdaysShort=bo,i.normalizeUnits=ie,i.relativeTimeRounding=ia,i.relativeTimeThreshold=oa,i.calendarFormat=Gr,i.prototype=lo,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()},function(e,t,n){"use strict";n.d(t,{A:function(){return g},B:function(){return he},C:function(){return Ke},D:function(){return C},E:function(){return dt},F:function(){return ct},G:function(){return y},H:function(){return at},I:function(){return Fe},J:function(){return Ye},K:function(){return He},L:function(){return v},M:function(){return re},N:function(){return D},O:function(){return le},P:function(){return pt},Q:function(){return $e},R:function(){return A},S:function(){return J},a:function(){return me},b:function(){return we},c:function(){return qe},d:function(){return z},e:function(){return X},f:function(){return vt},g:function(){return Le},h:function(){return Ve},i:function(){return ut},j:function(){return Y},k:function(){return R},l:function(){return W},m:function(){return U},n:function(){return H},o:function(){return ie},r:function(){return m},s:function(){return B},u:function(){return We},w:function(){return F},x:function(){return I}});var r=n(67),i=n.n(r),o=n(0),a=n(68);const{vtkErrorMacro:s,vtkWarningMacro:l}=o.m;let u=0;function c(e){return()=>s(`vtkMath::${e} - NOT IMPLEMENTED`)}function d(e,t,n,r){let i;for(let o=0;o0&&void 0!==arguments[0]?arguments[0]:3;const t=Array(e);for(let n=0;nMath.PI;function m(e){return e/180*Math.PI}function g(e){return 180*e/Math.PI}const{round:v,floor:y,ceil:_,min:b,max:x}=Math;function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=1/0;for(let i=t,o=e.length;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=-1/0;for(let i=t,o=e.length;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=1/0,i=-1/0;for(let o=t,a=e.length;o=0;--i)if(n[i]0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=t-e;return e+n*Math.random()}const N=c("gaussian");function R(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n}function B(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n}function F(e,t){return e[0]*=t,e[1]*=t,e[2]*=t,e}function V(e,t){return e[0]*=t,e[1]*=t,e}function U(e,t,n,r){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r[2]=e[2]+t[2]*n,r}function G(e,t,n,r){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function z(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function j(e,t,n){n[0]=e[0]*t[0],n[1]=e[0]*t[1],n[2]=e[0]*t[2],n[3]=e[1]*t[0],n[4]=e[1]*t[1],n[5]=e[1]*t[2],n[6]=e[2]*t[0],n[7]=e[2]*t[1],n[8]=e[2]*t[2]}function Y(e,t,n){const r=e[1]*t[2]-e[2]*t[1],i=e[2]*t[0]-e[0]*t[2],o=e[0]*t[1]-e[1]*t[0];return n[0]=r,n[1]=i,n[2]=o,n}function H(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;switch(t){case 1:return Math.abs(e);case 2:return Math.sqrt(e[0]*e[0]+e[1]*e[1]);case 3:return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);default:{let n=0;for(let r=0;ro&&i>a?(l=0,u=1,c=2):o>a?(l=1,u=2,c=0):(l=2,u=0,c=1);const d=e[l]/s,p=e[u]/s,f=e[c]/s,h=Math.sqrt(d*d+f*f);if(0!==r){const e=Math.sin(r),i=Math.cos(r);t&&(t[l]=(f*i-d*p*e)/h,t[u]=e*h,t[c]=(-d*i-p*f*e)/h),n&&(n[l]=(-f*e-d*p*i)/h,n[u]=i*h,n[c]=(d*e-p*f*i)/h)}else t&&(t[l]=f/h,t[u]=0,t[c]=-d/h),n&&(n[l]=-d*p/h,n[u]=h,n[c]=-p*f/h)}function Z(e,t,n){const r=z(t,t);if(0===r)return n[0]=0,n[1]=0,n[2]=0,!1;const i=z(e,t)/r;for(let e=0;e<3;e++)n[e]=t[e];return F(n,i),!0}function K(e,t){return e[0]*t[0]+e[1]*t[1]}function q(e,t,n){const r=K(t,t);if(0===r)return n[0]=0,n[1]=0,!1;const i=K(e,t)/r;for(let e=0;e<2;e++)n[e]=t[e];return V(n,i),!0}function X(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])+(e[2]-t[2])*(e[2]-t[2])}function J(e,t){const n=[0,0,0];return Y(e,t,n),Math.atan2(H(n),z(e,t))}function Q(e,t,n){const r=Math.abs(e-n);return 1/Math.sqrt(2*Math.PI*t)*Math.exp(-(r**2)/(2*t))}function ee(e,t,n){const r=Math.abs(e-n);return Math.exp(-(r**2)/(2*t))}function te(e,t,n){n[0]=e[0]*t[0],n[1]=e[0]*t[1],n[2]=e[1]*t[0],n[3]=e[1]*t[1]}function ne(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function re(e){const t=ne(e);return 0!==t&&(e[0]/=t,e[1]/=t),t}function ie(){for(var e=arguments.length,t=new Array(e),n=0;ni&&(i=r),(r=Math.abs(e[3*t+2]))>i&&(i=r),o[t]=1/i;i=o[0]*Math.abs(e[0]),n=0,(r=o[1]*Math.abs(e[3]))>=i&&(i=r,n=1),(r=o[2]*Math.abs(e[6]))>=i&&(n=2),0!==n&&(d(e,3,n,0),o[n]=o[0]),t[0]=n,e[3]/=e[0],e[6]/=e[0],e[4]-=e[3]*e[1],e[7]-=e[6]*e[1],i=o[1]*Math.abs(e[4]),n=1,(r=o[2]*Math.abs(e[7]))>=i&&(n=2,d(e,3,1,2),o[2]=o[1]),t[1]=n,e[7]/=e[4],e[5]-=e[3]*e[2],e[8]-=e[6]*e[2]+e[7]*e[5],t[2]=2}function ae(e,t,n){let r=n[t[0]];n[t[0]]=n[0],n[0]=r,r=n[t[1]],n[t[1]]=n[1],n[1]=r-e[3]*n[0],r=n[t[2]],n[t[2]]=n[2],n[2]=r-e[6]*n[0]-e[7]*n[1],n[2]/=e[8],n[1]=(n[1]-e[5]*n[2])/e[4],n[0]=(n[0]-e[1]*n[1]-e[2]*n[2])/e[0]}function se(e,t,n){const r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],p=+ie(s,c,l,d),f=-ie(a,u,l,d),h=+ie(a,u,s,c),m=-ie(i,c,o,d),g=+ie(r,u,o,d),v=-ie(r,u,i,c),y=+ie(i,s,o,l),_=-ie(r,a,o,l),b=+ie(r,a,i,s),x=r*p+i*f+o*h,w=p*t[0]+m*t[1]+y*t[2],S=f*t[0]+g*t[1]+_*t[2],C=h*t[0]+v*t[1]+b*t[2];n[0]=w/x,n[1]=S/x,n[2]=C/x}function le(e,t,n){const r=e[0]*t[0]+e[1]*t[1]+e[2]*t[2],i=e[3]*t[0]+e[4]*t[1]+e[5]*t[2],o=e[6]*t[0]+e[7]*t[1]+e[8]*t[2];n[0]=r,n[1]=i,n[2]=o}function ue(e,t,n){const r=[...e],i=[...t];for(let e=0;e<3;e++)n[e]=r[0]*i[e]+r[1]*i[e+3]+r[2]*i[e+6],n[e+3]=r[3]*i[e]+r[4]*i[e+3]+r[5]*i[e+6],n[e+6]=r[6]*i[e]+r[7]*i[e+3]+r[8]*i[e+6]}function ce(e,t,n,r,i,o,a){r!==i&&s("Number of columns of A must match number of rows of B.");const l=[...e],u=[...t];for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:a.Ib;if(e.length!==t.length)return!1;function r(e,r){return Math.abs(e-t[r])<=n}return e.every(r)}const me=he;function ge(e){for(let t=0;t<3;t++)e[3*t]=e[3*t+1]=e[3*t+2]=0,e[3*t+t]=1}function ve(e,t){for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:a.Ib;return me(e,a.Wd,t)}function _e(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Ib;return me(e,a.qt,t)}function be(e,t){const n=e[0]*e[0],r=e[0]*e[1],i=e[0]*e[2],o=e[0]*e[3],a=e[1]*e[1],s=e[2]*e[2],l=e[3]*e[3],u=e[1]*e[2],c=e[1]*e[3],d=e[2]*e[3],p=a+s+l;let f=1/(n+p);const h=(n-p)*f;f*=2,t[0]=a*f+h,t[3]=(u+o)*f,t[6]=(c-i)*f,t[1]=(u-o)*f,t[4]=s*f+h,t[7]=(d+r)*f,t[2]=(c+i)*f,t[5]=(d-r)*f,t[8]=l*f+h}function xe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!`${e}`.includes("e"))return+`${Math.round(`${e}e+${t}`)}e-${t}`;const n=`${e}`.split("e");let r="";return+n[1]+t>0&&(r="+"),+`${Math.round(`${+n[0]}e${r}${+n[1]+t}`)}e-${t}`}function we(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t[0]=xe(e[0],n),t[1]=xe(e[1],n),t[2]=xe(e[2],n),t}function Se(e,t,n,r){let i,o,s,u,c,d,h,m,g,v,y,_,b,x,w,S;const C=f(t),T=f(t),M=(e,t,n)=>{x=e[t],b=e[n],e[t]=x-_*(b+x*v),e[n]=b+_*(x-b*v)};for(ve(t,r),c=0;c3&&Math.abs(n[c])+x===Math.abs(n[c])&&Math.abs(n[u])+x===Math.abs(n[u]))e[c*t+u]=0;else if(Math.abs(e[c*t+u])>h){for(b=n[u]-n[c],Math.abs(b)+x===Math.abs(b)?g=e[c*t+u]/b:(m=.5*b/e[c*t+u],g=1/(Math.abs(m)+Math.sqrt(1+m*m)),m<0&&(g=-g)),w=1/Math.sqrt(1+g*g),_=g*w,v=_/(1+w),b=g*e[c*t+u],T[c]-=b,T[u]+=b,n[c]-=b,n[u]+=b,e[c*t+u]=0,o=0;o<=c-1;o++)M(e,o*t+c,o*t+u);for(o=c+1;o<=u-1;o++)M(e,c*t+o,o*t+u);for(o=u+1;o=20)return l("vtkMath::Jacobi: Error extracting eigenfunctions"),0;for(o=0;o=S||Math.abs(n[i]-S)>1)+(1&t);for(d=0,i=0;i=0&&d++;if(dr?o:r,i=a>i?a:i,n[e]=1,0!==i&&(n[e]/=i)}const o=Math.abs(t[0])*n[0],a=Math.abs(t[3])*n[1],s=Math.abs(t[6])*n[2];r[0]=0,i=o,a>=i&&(i=a,r[0]=1),s>=i&&(r[0]=2),0!==r[0]&&(p(t,3,r[0],0),n[r[0]]=n[0]);const l=Math.abs(t[4])*n[1],u=Math.abs(t[7])*n[2];r[1]=1,i=l,u>=i&&(r[1]=2,p(t,3,1,2)),r[2]=2;let c=0;if(fe(t)<0){c=1;for(let e=0;e<9;e++)t[e]=-t[e]}const d=f(4);if(Ce(t,d),be(d,t),c)for(let e=0;e<9;e++)t[e]=-t[e];1!==r[1]&&p(t,3,r[1],1),0!==r[0]&&p(t,3,r[0],0)}function De(e,t,n){let r,i,o,a,s,l;if(Se([...e],3,t,n),t[0]!==t[1]||t[0]!==t[2]){for(de(n,n),r=0;r<3;r++)if(t[(r+1)%3]===t[(r+2)%3]){for(l=Math.abs(n[3*r]),a=0,i=1;i<3;i++)l<(s=Math.abs(n[3*r+i]))&&(l=s,a=i);a!==r&&(s=t[a],t[a]=t[r],t[r]=s,d(n,3,r,a)),n[3*a+a]<0&&(n[3*a]=-n[3*a],n[3*a+1]=-n[3*a+1],n[3*a+2]=-n[3*a+2]),i=(a+1)%3,o=(a+2)%3,n[3*i]=0,n[3*i+1]=0,n[3*i+2]=0,n[3*i+i]=1;const e=Y([n[3*a],n[3*a+1],n[3*a+2]],[n[3*i],n[3*i+1],n[3*i+2]],[]);W(e);const u=Y(e,[n[3*a],n[3*a+1],n[3*a+2]],[]);for(let t=0;t<3;t++)n[3*o+t]=e[t],n[3*i+t]=u[t];return void de(n,n)}for(l=Math.abs(n[0]),a=0,r=1;r<3;r++)l<(s=Math.abs(n[3*r]))&&(l=s,a=r);if(0!==a){const e=t[a];t[a]=t[0],t[0]=e,d(n,3,a,0)}if(Math.abs(n[4])s&&(s=d);if(0===s)return l("Unable to factor linear system"),0;h[r]=1/s}for(i=0;i=s&&(s=c,p=r)}if(i!==p){for(o=0;o=0)for(o=a;o<=i-1;o++)l-=e[i*r+o]*n[o];else 0!==l&&(a=i);n[i]=l}for(i=r-1;i>=0;i--){for(l=n[i],o=i+1;o3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const o=r||f(n),a=i||f(n);if(0===Pe(e,o,n))return null;for(let r=0;rr&&(r=Math.abs(e[n*t+i]));for(let r=0;r6&&void 0!==arguments[6])||arguments[6];if(ea.B0&&(m=0,u[p]=0);if(m&&1===i)return l("Detected homogeneous system (Y=0), calling SolveHomogeneousLeastSquares()"),Ne(e,t,n,o);if(m)v=1;else for(p=0;p1&&void 0!==arguments[1]?arguments[1]:[0,.5,1];switch(e.length){case 3:return t[0]=17*parseInt(e[0],16)/255,t[1]=17*parseInt(e[1],16)/255,t[2]=17*parseInt(e[2],16)/255,t;case 4:return t[0]=17*parseInt(e[1],16)/255,t[1]=17*parseInt(e[2],16)/255,t[2]=17*parseInt(e[3],16)/255,t;case 6:return t[0]=parseInt(e.substr(0,2),16)/255,t[1]=parseInt(e.substr(2,2),16)/255,t[2]=parseInt(e.substr(4,2),16)/255,t;case 7:return t[0]=parseInt(e.substr(1,2),16)/255,t[1]=parseInt(e.substr(3,2),16)/255,t[2]=parseInt(e.substr(5,2),16)/255,t;case 9:return t[0]=parseInt(e.substr(1,2),16)/255,t[1]=parseInt(e.substr(3,2),16)/255,t[2]=parseInt(e.substr(5,2),16)/255,t[3]=parseInt(e.substr(7,2),16)/255,t;default:return t}}function Fe(e,t){let n,r;const[i,o,a]=e,s=1/6;let l=i,u=i;o>l?l=o:ol?l=a:a0?(l-u)/l:0,r>0?(n=i===l?s*(o-a)/(l-u):o===l?.3333333333333333+s*(a-i)/(l-u):.6666666666666666+s*(i-o)/(l-u),n<0&&(n+=1)):n=0,t[0]=n,t[1]=r,t[2]=c}function Ve(e,t){const[n,r,i]=e,o=1/3,a=1/6,s=2/3,l=5/6;let u,c,d;n>a&&n<=o?(c=1,u=(o-n)/a,d=0):n>o&&n<=.5?(c=1,d=(n-o)/a,u=0):n>.5&&n<=s?(d=1,c=(s-n)/a,u=0):n>s&&n<=l?(d=1,u=(n-s)/a,c=0):n>l&&n<=1?(u=1,d=(1-n)/a,c=0):(u=1,c=n/a,d=0),u=r*u+(1-r),c=r*c+(1-r),d=r*d+(1-r),u*=i,c*=i,d*=i,t[0]=u,t[1]=c,t[2]=d}function Ue(e,t){const[n,r,i]=e;let o=(n+16)/116,a=r/500+o,s=o-i/200;o**3>.008856?o**=3:o=(o-16/116)/7.787,a**3>.008856?a**=3:a=(a-16/116)/7.787,s**3>.008856?s**=3:s=(s-16/116)/7.787;t[0]=.9505*a,t[1]=1*o,t[2]=1.089*s}function Ge(e,t){const[n,r,i]=e;let o=n/.9505,a=r/1,s=i/1.089;o>.008856?o**=1/3:o=7.787*o+16/116,a>.008856?a**=1/3:a=7.787*a+16/116,s>.008856?s**=1/3:s=7.787*s+16/116,t[0]=116*a-16,t[1]=500*(o-a),t[2]=200*(a-s)}function ze(e,t){const[n,r,i]=e;let o=3.2406*n+-1.5372*r+-.4986*i,a=-.9689*n+1.8758*r+.0415*i,s=.0557*n+-.204*r+1.057*i;o>.0031308?o=1.055*o**(1/2.4)-.055:o*=12.92,a>.0031308?a=1.055*a**(1/2.4)-.055:a*=12.92,s>.0031308?s=1.055*s**(1/2.4)-.055:s*=12.92;let l=o;l1&&(o/=l,a/=l,s/=l),o<0&&(o=0),a<0&&(a=0),s<0&&(s=0),t[0]=o,t[1]=a,t[2]=s}function je(e,t){let[n,r,i]=e;n>.04045?n=((n+.055)/1.055)**2.4:n/=12.92,r>.04045?r=((r+.055)/1.055)**2.4:r/=12.92,i>.04045?i=((i+.055)/1.055)**2.4:i/=12.92,t[0]=.4124*n+.3576*r+.1805*i,t[1]=.2126*n+.7152*r+.0722*i,t[2]=.0193*n+.1192*r+.9505*i}function Ye(e,t){const n=[0,0,0];je(e,n),Ge(n,t)}function He(e,t){const n=[0,0,0];Ue(e,n),ze(n,t)}function We(e){return e[0]=1,e[1]=-1,e[2]=1,e[3]=-1,e[4]=1,e[5]=-1,e}function $e(e){return!(e[1]-e[0]<0)}function Ze(e,t,n){return n[0]=Math.min(e[0],t[0]),n[1]=Math.max(e[0],t[0]),n[2]=Math.min(e[1],t[1]),n[3]=Math.max(e[1],t[1]),n[4]=Math.min(e[2],t[2]),n[5]=Math.max(e[2],t[2]),n}function Ke(e,t,n){return en?n:e}function qe(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[0,0,0];return r[0]=Ke(e[0],t[0],n[0]),r[1]=Ke(e[1],t[1],n[1]),r[2]=Ke(e[2],t[2],n[2]),r}function Xe(e,t){let n=0;return t[0]!==t[1]&&(n=et[1]?t[1]:e,n=(n-t[0])/(t[1]-t[0])),n}const Je=c("GetScalarTypeFittingRange"),Qe=c("GetAdjustedScalarRange");function et(e,t){if(!e||!t)return 0;for(let n=0;n<6;n+=2)if(e[n]t[n+1]||e[n+1]t[n+1])return 0;return 1}function tt(e,t,n){if(!e||!t)return 0;for(let r=0;r<6;r+=2)if(e[r]+n[r/2]t[r+1]||e[r+1]+n[r/2]t[r+1])return 0;return 1}function nt(e,t,n){if(!e||!t||!n)return 0;for(let r=0;r<3;r++)if(e[r]+n[r]t[2*r+1])return 0;return 1}function rt(e,t,n,r){const i=f(3),o=f(3),a=f(3),s=f(3),l=f(3),u=f(3);for(let r=0;r<3;++r)i[r]=e[r]-t[r],o[r]=t[r]-n[r],a[r]=n[r]-e[r],s[r]=-i[r],l[r]=-o[r],u[r]=-a[r];const c=H(s),d=H(l),p=H(a),h=f(3);Y(i,o,h);const m=H(h),g=c*d*p/(2*m),v=2*m*m,y=d*d*z(i,u)/v,_=p*p*z(s,o)/v,b=c*c*z(a,l)/v;for(let i=0;i<3;++i)r[i]=y*e[i]+_*t[i]+b*n[i];return g}const it=1/0,ot=-1/0,at=e=>!Number.isFinite(e),{isFinite:st,isNaN:lt}=Number,ut=lt;function ct(){return[].concat([Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE])}function dt(e){let t=-1,n=-1;for(let r=0;rt&&(n=r,t=i)}return n}function pt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const n=new Array(t),r=new Array(t);for(let e=0;e0;i--){let o=-1/0,a=0,s=0;for(let l=0;l<=i;++l){const u=n[l];for(let n=0;n<=i;++n){const i=r[n],c=Math.abs(e[u+t*i]);c>o&&(o=c,a=l,s=n)}}[n[i],n[a]]=[n[a],n[i]],[r[i],r[s]]=[r[s],r[i]]}const i=new Array(t*t).fill(0);for(let o=0;o15?t.toString(16):`0${t.toString(16)}`}function ht(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#";return`${t}${e.map(ft).join("")}`}function mt(e){return Math.round(255*e)}function gt(e){return 3===e.length?`rgb(${e.map(mt).join(", ")})`:`rgba(${mt(e[0]||0)}, ${mt(e[1]||0)}, ${mt(e[2]||0)}, ${e[3]||0})`}var vt={Pi:h,radiansFromDegrees:m,degreesFromRadians:g,round:v,floor:y,ceil:_,ceilLog2:T,min:b,max:x,arrayMin:w,arrayMax:S,arrayRange:C,isPowerOfTwo:A,nearestPowerOfTwo:D,factorial:M,binomial:P,beginCombination:k,nextCombination:L,randomSeed:O,getSeed:E,random:I,gaussian:N,add:R,subtract:B,multiplyScalar:F,multiplyScalar2D:V,multiplyAccumulate:U,multiplyAccumulate2D:G,dot:z,outer:j,cross:Y,norm:H,normalize:W,perpendiculars:$,projectVector:Z,projectVector2D:q,distance2BetweenPoints:X,angleBetweenVectors:J,gaussianAmplitude:Q,gaussianWeight:ee,dot2D:K,outer2D:te,norm2D:ne,normalize2D:re,determinant2x2:ie,LUFactor3x3:oe,LUSolve3x3:ae,linearSolve3x3:se,multiply3x3_vect3:le,multiply3x3_mat3:ue,multiplyMatrix:ce,transpose3x3:de,invert3x3:pe,identity3x3:ge,identity:ve,isIdentity:ye,isIdentity3x3:_e,determinant3x3:fe,quaternionToMatrix3x3:be,areEquals:he,areMatricesEqual:me,roundNumber:xe,roundVector:we,matrix3x3ToQuaternion:Ce,multiplyQuaternion:Te,orthogonalize3x3:Me,diagonalize3x3:De,singularValueDecomposition3x3:Ae,solveLinearSystem:Le,invertMatrix:Oe,luFactorLinearSystem:Pe,luSolveLinearSystem:ke,estimateMatrixCondition:Ee,jacobi:Ie,jacobiN:Se,solveHomogeneousLeastSquares:Ne,solveLeastSquares:Re,hex2float:Be,rgb2hsv:Fe,hsv2rgb:Ve,lab2xyz:Ue,xyz2lab:Ge,xyz2rgb:ze,rgb2xyz:je,rgb2lab:Ye,lab2rgb:He,uninitializeBounds:We,areBoundsInitialized:$e,computeBoundsFromPoints:Ze,clampValue:Ke,clampVector:qe,clampAndNormalizeValue:Xe,getScalarTypeFittingRange:Je,getAdjustedScalarRange:Qe,extentIsWithinOtherExtent:et,boundsIsWithinOtherBounds:tt,pointIsWithinBounds:nt,solve3PointCircle:rt,inf:it,negInf:ot,isInf:at,isNan:lt,isNaN:lt,isFinite:st,createUninitializedBounds:ct,getMajorAxisIndex:dt,getSparseOrthogonalMatrix:pt,floatToHex2:ft,floatRGB2HexCode:ht,float2CssRGBA:gt}},function(e){e.exports=function(e,t){var n="function"==typeof e.exports?e.exports.extendOptions:e.options;for(var r in"function"==typeof e.exports&&(n.components=e.exports.options.components),n.components=n.components||{},t)n.components[r]=n.components[r]||t[r]}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return y}});var r=n(14),i=n(0),o=n(2);const{vtkErrorMacro:a}=i.c,{DefaultDataType:s}=r.ZP,l=1e-6;function u(e,t,n){const r=e.length;let i,o,a=Number.MAX_VALUE,s=-Number.MAX_VALUE;for(o=t;os&&(s=i);return{min:a,max:s}}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(t<0&&n>1){const t=e.length/n,r=new Float64Array(t);for(let i=0,o=0;i1&&void 0!==arguments[1]?arguments[1]:0;const n=e||[];for(;n.length<=t;)n.push(null);return n}function p(e){return Object.prototype.toString.call(e).slice(8,-1)}const f={computeRange:c,createRangeHelper:function(){let e=Number.MAX_VALUE,t=-Number.MAX_VALUE,n=0,r=0;return{add(i){e>i&&(e=i),t({min:e,max:t,count:n,sum:r,mean:r/n}),getRange:()=>({min:e,max:t})}},fastComputeRange:u,getDataType:p,getMaxNorm:function(e){const t=e.getNumberOfComponents();let n=0;const r=new Array(t);for(let i=0;in&&(n=a)}return n}};function h(e,t){function n(n){if(n<0)return!1;const r=e.getNumberOfComponents(),o=t.values.length/(r>0?r:1);if(n===o)return!0;if(n>o){const e=t.values;return t.values=(0,i.a)(t.dataType,(n+o)*r),t.values.set(e),!0}return t.size>n*r&&(t.size=n*r,e.dataChange()),!0}t.classHierarchy.push("vtkDataArray"),e.dataChange=()=>{t.ranges=null,e.modified()},e.resize=r=>{n(r);const i=r*e.getNumberOfComponents();return t.size!==i&&(t.size=i,e.dataChange(),!0)},e.initialize=()=>{e.resize(0)},e.getElementComponentSize=()=>t.values.BYTES_PER_ELEMENT,e.getComponent=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.values[e*t.numberOfComponents+n]},e.setComponent=(n,r,i)=>{i!==t.values[n*t.numberOfComponents+r]&&(t.values[n*t.numberOfComponents+r]=i,e.dataChange())},e.getValue=n=>{const r=n/t.numberOfComponents,i=n%t.numberOfComponents;return e.getComponent(r,i)},e.setValue=(n,r)=>{const i=n/t.numberOfComponents,o=n%t.numberOfComponents;e.setComponent(i,o,r)},e.getData=()=>t.size===t.values.length?t.values:t.values.subarray(0,t.size),e.getRange=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,r=n;r<0&&(r=1===t.numberOfComponents?0:t.numberOfComponents);let i=null;return t.ranges||(t.ranges=d(t.ranges,t.numberOfComponents)),i=t.ranges[r],i?(t.rangeTuple[0]=i.min,t.rangeTuple[1]=i.max,t.rangeTuple):(i=c(e.getData(),n,t.numberOfComponents),t.ranges[r]=i,t.rangeTuple[0]=i.min,t.rangeTuple[1]=i.max,t.rangeTuple)},e.setRange=(e,n)=>{t.ranges||(t.ranges=d(t.ranges,t.numberOfComponents));const r={min:e.min,max:e.max};return t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple},e.setTuple=(e,n)=>{const r=e*t.numberOfComponents;for(let e=0;e{let r=e*t.numberOfComponents;const i=Math.min(n.length,t.size-r);for(let e=0;e(t.size<=r*t.numberOfComponents&&(t.size=(r+1)*t.numberOfComponents,n(r+1)),e.setTuple(r,i),r),e.insertTuples=(r,i)=>{const o=r+i.length/t.numberOfComponents;return t.size{const r=t.size/t.numberOfComponents;return e.insertTuple(r,n)},e.insertNextTuples=n=>{const r=t.size/t.numberOfComponents;return e.insertTuples(r,n)},e.findTuple=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;for(let r=0;rn){i=!1;break}if(i)return r/t.numberOfComponents}return-1},e.getTuple=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=t.numberOfComponents||1,i=e*r;switch(r){case 4:n[3]=t.values[i+3];case 3:n[2]=t.values[i+2];case 2:n[1]=t.values[i+1];case 1:n[0]=t.values[i];break;default:for(let e=r-1;e>=0;--e)n[e]=t.values[i+e]}return n},e.getTuples=(n,r)=>{const i=(n??0)*t.numberOfComponents,o=(r??e.getNumberOfTuples())*t.numberOfComponents,a=e.getData().subarray(i,o);return a.length>0?a:null},e.getTupleLocation=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return e*t.numberOfComponents},e.getNumberOfComponents=()=>t.numberOfComponents,e.getNumberOfValues=()=>t.size,e.getNumberOfTuples=()=>t.size/t.numberOfComponents,e.getDataType=()=>t.dataType,e.newClone=()=>v({empty:!0,name:t.name,dataType:t.dataType,numberOfComponents:t.numberOfComponents}),e.getName=()=>(t.name||(e.modified(),t.name=`vtkDataArray${e.getMTime()}`),t.name),e.setData=(n,r)=>{t.values=n,t.size=n.length,t.dataType=p(n),r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),e.dataChange()},e.getState=()=>{if(t.deleted)return null;const n={...t,vtkClass:e.getClassName()};n.values=Array.from(n.values),delete n.buffer,Object.keys(n).forEach((e=>{n[e]||delete n[e]}));const r={};return Object.keys(n).sort().forEach((e=>{r[e]=n[e]})),r.mtime&&delete r.mtime,r},e.deepCopy=n=>{const r=e.getDataType(),i=t.values;e.shallowCopy(n),i?.length>=n.getNumberOfValues()&&r===n.getDataType()?(i.set(n.getData()),t.values=i,e.dataChange()):e.setData(n.getData().slice())},e.interpolateTuple=(n,r,i,o,s,l)=>{const u=t.numberOfComponents||1;u===r.getNumberOfComponents()&&u===o.getNumberOfComponents()||a("numberOfComponents must match");const c=r.getTuple(i),d=o.getTuple(s),p=[];switch(p.length=u,u){case 4:p[3]=c[3]+(d[3]-c[3])*l;case 3:p[2]=c[2]+(d[2]-c[2])*l;case 2:p[1]=c[1]+(d[1]-c[1])*l;case 1:p[0]=c[0]+(d[0]-c[0])*l;break;default:for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,m,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkDataArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=(0,i.b)(t.dataType,t.values)):t.values=(0,i.a)(t.dataType,t.size),t.values&&(t.size=t.size??t.values.length,t.dataType=p(t.values)),(0,i.o)(e,t),(0,i.s)(e,t,["name","numberOfComponents"]),h(e,t)}const v=(0,i.n)(g,"vtkDataArray");var y={newInstance:v,extend:g,...f,...r.ZP}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return O}});var r=n(0),i=n(23),o=n(44),a=n(109);function s(e,t){t.classHierarchy.push("vtkCellLinks"),e.buildLinks=n=>{const r=n.getPoints().getNumberOfPoints(),i=n.getNumberOfCells(),o=new Uint32Array(r);if(n.isA("vtkPolyData")){for(let t=0;t{e.incrementLinkCount(t)}))}e.allocateLinks(r),t.maxId=r-1;for(let t=0;t{e.insertCellReference(n,o[n]++,t)}))}}else{for(let t=0;t{e.incrementLinkCount(t)}))}e.allocateLinks(r),t.maxId=r-1;for(let t=0;t{e.insertCellReference(n,o[n]++,t)}))}}},e.allocate=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;t.array=Array(e).fill().map((()=>({ncells:0,cells:null}))),t.extend=n,t.maxId=-1},e.initialize=()=>{t.array=null},e.getLink=e=>t.array[e],e.getNcells=e=>t.array[e].ncells,e.getCells=e=>t.array[e].cells,e.insertNextPoint=e=>{t.array.push({ncells:e,cells:Array(e)}),++t.maxId},e.insertNextCellReference=(e,n)=>{t.array[e].cells[t.array[e].ncells++]=n},e.deletePoint=e=>{t.array[e].ncells=0,t.array[e].cells=null},e.removeCellReference=(e,n)=>{t.array[n].cells=t.array[n].cells.filter((t=>t!==e)),t.array[n].ncells=t.array[n].cells.length},e.addCellReference=(e,n)=>{t.array[n].cells[t.array[n].ncells++]=e},e.resizeCellList=(e,n)=>{t.array[e].cells.length=n},e.squeeze=()=>{!function(e,t){let n=t;for(t>=e.array.length&&(n+=e.array.length);n>e.array.length;)e.array.push({ncells:0,cells:null});e.array.length=n}(t,t.maxId+1)},e.reset=()=>{t.maxId=-1},e.deepCopy=e=>{t.array=[...e.array],t.extend=e.extend,t.maxId=e.maxId},e.incrementLinkCount=e=>{++t.array[e].ncells},e.allocateLinks=e=>{for(let n=0;n{t.array[e].cells[n]=r}}const l={array:null,maxId:0,extend:0};function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l,n),r.m.obj(e,t),s(e,t)}var c={newInstance:r.m.newInstance(u,"vtkCellLinks"),extend:u};const d={VTK_EMPTY_CELL:0,VTK_VERTEX:1,VTK_POLY_VERTEX:2,VTK_LINE:3,VTK_POLY_LINE:4,VTK_TRIANGLE:5,VTK_TRIANGLE_STRIP:6,VTK_POLYGON:7,VTK_PIXEL:8,VTK_QUAD:9,VTK_TETRA:10,VTK_VOXEL:11,VTK_HEXAHEDRON:12,VTK_WEDGE:13,VTK_PYRAMID:14,VTK_PENTAGONAL_PRISM:15,VTK_HEXAGONAL_PRISM:16,VTK_QUADRATIC_EDGE:21,VTK_QUADRATIC_TRIANGLE:22,VTK_QUADRATIC_QUAD:23,VTK_QUADRATIC_POLYGON:36,VTK_QUADRATIC_TETRA:24,VTK_QUADRATIC_HEXAHEDRON:25,VTK_QUADRATIC_WEDGE:26,VTK_QUADRATIC_PYRAMID:27,VTK_BIQUADRATIC_QUAD:28,VTK_TRIQUADRATIC_HEXAHEDRON:29,VTK_QUADRATIC_LINEAR_QUAD:30,VTK_QUADRATIC_LINEAR_WEDGE:31,VTK_BIQUADRATIC_QUADRATIC_WEDGE:32,VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON:33,VTK_BIQUADRATIC_TRIANGLE:34,VTK_CUBIC_LINE:35,VTK_CONVEX_POINT_SET:41,VTK_POLYHEDRON:42,VTK_PARAMETRIC_CURVE:51,VTK_PARAMETRIC_SURFACE:52,VTK_PARAMETRIC_TRI_SURFACE:53,VTK_PARAMETRIC_QUAD_SURFACE:54,VTK_PARAMETRIC_TETRA_REGION:55,VTK_PARAMETRIC_HEX_REGION:56,VTK_HIGHER_ORDER_EDGE:60,VTK_HIGHER_ORDER_TRIANGLE:61,VTK_HIGHER_ORDER_QUAD:62,VTK_HIGHER_ORDER_POLYGON:63,VTK_HIGHER_ORDER_TETRAHEDRON:64,VTK_HIGHER_ORDER_WEDGE:65,VTK_HIGHER_ORDER_PYRAMID:66,VTK_HIGHER_ORDER_HEXAHEDRON:67,VTK_LAGRANGE_CURVE:68,VTK_LAGRANGE_TRIANGLE:69,VTK_LAGRANGE_QUADRILATERAL:70,VTK_LAGRANGE_TETRAHEDRON:71,VTK_LAGRANGE_HEXAHEDRON:72,VTK_LAGRANGE_WEDGE:73,VTK_LAGRANGE_PYRAMID:74,VTK_NUMBER_OF_CELL_TYPES:75},p=["vtkEmptyCell","vtkVertex","vtkPolyVertex","vtkLine","vtkPolyLine","vtkTriangle","vtkTriangleStrip","vtkPolygon","vtkPixel","vtkQuad","vtkTetra","vtkVoxel","vtkHexahedron","vtkWedge","vtkPyramid","vtkPentagonalPrism","vtkHexagonalPrism","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkQuadraticEdge","vtkQuadraticTriangle","vtkQuadraticQuad","vtkQuadraticTetra","vtkQuadraticHexahedron","vtkQuadraticWedge","vtkQuadraticPyramid","vtkBiQuadraticQuad","vtkTriQuadraticHexahedron","vtkQuadraticLinearQuad","vtkQuadraticLinearWedge","vtkBiQuadraticQuadraticWedge","vtkBiQuadraticQuadraticHexahedron","vtkBiQuadraticTriangle","vtkCubicLine","vtkQuadraticPolygon","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkConvexPointSet","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkParametricCurve","vtkParametricSurface","vtkParametricTriSurface","vtkParametricQuadSurface","vtkParametricTetraRegion","vtkParametricHexRegion","UnknownClass","UnknownClass","UnknownClass","vtkHigherOrderEdge","vtkHigherOrderTriangle","vtkHigherOrderQuad","vtkHigherOrderPolygon","vtkHigherOrderTetrahedron","vtkHigherOrderWedge","vtkHigherOrderPyramid","vtkHigherOrderHexahedron"];const f={getClassNameFromTypeId:function(e){return e0&&void 0!==arguments[0]?arguments[0]:512,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;t.size=e>0?e:1,t.extend=n>0?n:1,t.maxId=-1,t.typeArray=new Uint8Array(e),t.locationArray=new Uint32Array(e)},e.insertCell=(e,n,r)=>{t.typeArray[e]=n,t.locationArray[e]=r,e>t.maxId&&(t.maxId=e)},e.insertNextCell=(n,r)=>(e.insertCell(++t.maxId,n,r),t.maxId),e.setCellTypes=(e,n,r)=>{t.size=e,t.typeArray=n,t.locationArray=r,t.maxId=e-1},e.getCellLocation=e=>t.locationArray[e],e.deleteCell=e=>{t.typeArray[e]=d.VTK_EMPTY_CELL},e.getNumberOfTypes=()=>t.maxId+1,e.isType=t=>{const n=e.getNumberOfTypes();for(let r=0;re.insertNextCell(t,-1),e.getCellType=e=>t.typeArray[e],e.reset=()=>{t.maxId=-1},e.deepCopy=n=>{e.allocate(n.getSize(),n.getExtend()),t.typeArray.set(n.getTypeArray()),t.locationArray.set(n.getLocationArray()),t.maxId=n.getMaxId()}}const m={size:0,maxId:-1,extend:1e3};function g(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,m,n),r.m.obj(e,t),r.m.get(e,t,["size","maxId","extend"]),r.m.getArray(e,t,["typeArray","locationArray"]),h(e,t)}var v={newInstance:r.m.newInstance(g,"vtkCellTypes"),extend:g,...f},y=n(110),_=n(36),b=n(37);function x(e,t){t.classHierarchy.push("vtkPointSet"),t.points?t.points=(0,i.Z)(t.points):t.points=b.ZP.newInstance(),e.getNumberOfPoints=()=>t.points.getNumberOfPoints(),e.getBounds=()=>t.points.getBounds(),e.computeBounds=()=>{e.getBounds()};const n=e.shallowCopy;e.shallowCopy=function(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n(e,r),t.points=b.ZP.newInstance(),t.points.shallowCopy(e.getPoints())}}const w={};function S(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,w,n),_.ZP.extend(e,t,n),r.m.setGet(e,t,["points"]),x(e,t)}var C={newInstance:r.m.newInstance(S,"vtkPointSet"),extend:S},T=n(578),M=n(361);const{vtkWarningMacro:D}=r.m,A={[d.VTK_LINE]:y.ZP,[d.VTK_POLY_LINE]:y.ZP,[d.VTK_TRIANGLE]:T.ZP};function P(e,t){t.classHierarchy.push("vtkPolyData"),M.a.forEach((n=>{var r;e[`getNumberOf${r=n,r.replace(/(?:^\w|[A-Z]|\b\w)/g,(e=>e.toUpperCase())).replace(/\s+/g,"")}`]=()=>t[n].getNumberOfCells(),t[n]?t[n]=(0,i.Z)(t[n]):t[n]=o.ZP.newInstance()})),e.getNumberOfCells=()=>M.a.reduce(((e,n)=>e+t[n].getNumberOfCells()),0);const n=e.shallowCopy;e.shallowCopy=function(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n(e,r),M.a.forEach((n=>{t[n]=o.ZP.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))},e.buildCells=()=>{const n=e.getNumberOfVerts(),r=e.getNumberOfLines(),i=e.getNumberOfPolys(),o=e.getNumberOfStrips(),a=n+r+i+o,s=new Uint8Array(a);let l=s;const u=new Uint32Array(a);let c=u;if(n){let e=0;t.verts.getCellSizes().forEach(((t,n)=>{c[n]=e,l[n]=t>1?d.VTK_POLY_VERTEX:d.VTK_VERTEX,e+=t+1})),c=c.subarray(n),l=l.subarray(n)}if(r){let e=0;t.lines.getCellSizes().forEach(((t,n)=>{c[n]=e,l[n]=t>2?d.VTK_POLY_LINE:d.VTK_LINE,1===t&&D("Building VTK_LINE ",n," with only one point, but VTK_LINE needs at least two points. Check the input."),e+=t+1})),c=c.subarray(r),l=l.subarray(r)}if(i){let e=0;t.polys.getCellSizes().forEach(((t,n)=>{switch(c[n]=e,t){case 3:l[n]=d.VTK_TRIANGLE;break;case 4:l[n]=d.VTK_QUAD;break;default:l[n]=d.VTK_POLYGON}t<3&&D("Building VTK_TRIANGLE ",n," with less than three points, but VTK_TRIANGLE needs at least three points. Check the input."),e+=t+1})),c+=c.subarray(i),l+=l.subarray(i)}if(o){let e=0;l.fill(d.VTK_TRIANGLE_STRIP,0,o),t.strips.getCellSizes().forEach(((t,n)=>{c[n]=e,e+=t+1}))}t.cells=v.newInstance(),t.cells.setCellTypes(a,s,u)},e.buildLinks=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;void 0===t.cells&&e.buildCells(),t.links=c.newInstance(),n>0?t.links.allocate(n):t.links.allocate(e.getPoints().getNumberOfPoints()),t.links.buildLinks(e)},e.getCellType=e=>t.cells.getCellType(e),e.getCellPoints=n=>{const r=e.getCellType(n);let i=null;switch(r){case d.VTK_VERTEX:case d.VTK_POLY_VERTEX:i=t.verts;break;case d.VTK_LINE:case d.VTK_POLY_LINE:i=t.lines;break;case d.VTK_TRIANGLE:case d.VTK_QUAD:case d.VTK_POLYGON:i=t.polys;break;case d.VTK_TRIANGLE_STRIP:i=t.strips;break;default:return i=null,{type:0,cellPointIds:null}}const o=t.cells.getCellLocation(n);return{cellType:r,cellPointIds:i.getCell(o)}},e.getPointCells=e=>t.links.getCells(e),e.getCellEdgeNeighbors=(e,n,r)=>{const i=t.links.getLink(n),o=t.links.getLink(r);return i.cells.filter((t=>t!==e&&-1!==o.cells.indexOf(t)))},e.getCell=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=e.getCellPoints(t),i=n||A[r.cellType].newInstance();return i.initialize(e.getPoints(),r.cellPointIds),i}}const k={};function L(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,k,n),C.extend(e,t,n),r.m.get(e,t,["cells","links"]),r.m.setGet(e,t,["verts","lines","polys","strips"]),P(e,t)}var O={newInstance:r.m.newInstance(L,"vtkPolyData"),extend:L}},function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(0);const{vtkErrorMacro:i}=r.m;function o(e,t){t.classHierarchy.push("vtkViewNode"),e.build=e=>{},e.render=e=>{},e.traverse=n=>{const r=n.getTraverseOperation(),i=e[r];if(i)i(n);else{e.apply(n,!0);for(let e=0;e{const r=e[t.getOperation()];r&&r(n,t)},e.getViewNodeFor=n=>{if(t.renderable===n)return e;for(let e=0;et._parent?t._parent.isA(e)?t._parent:t._parent.getFirstAncestorOfType(e):null,e.addMissingNode=n=>{if(!n)return;const r=t._renderableChildMap.get(n);if(void 0!==r)r.setVisited(!0);else{const r=e.createViewNode(n);r&&(r.setParent(e),r.setVisited(!0),t._renderableChildMap.set(n,r),t.children.push(r))}},e.addMissingNodes=n=>{if(n&&n.length)for(let r=0;r{if(n&&n.length)for(let r=0;r{for(let e=0;e{t.visited=e},e.removeUnusedNodes=()=>{let e=0;for(let n=0;n{if(!t.myFactory)return i("Cannot create view nodes without my own factory"),null;const n=t.myFactory.createNode(e);return n&&n.setRenderable(e),n};const n=e.delete;e.delete=()=>{for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a,n),r.m.obj(e,t),r.m.event(e,t,"event"),t._renderableChildMap=new Map,r.m.get(e,t,["visited"]),r.m.setGet(e,t,["_parent","renderable","myFactory"]),r.m.getArray(e,t,["children"]),r.m.moveToProtected(e,t,["parent"]),o(e,t)}var l={newInstance:r.m.newInstance(s,"vtkViewNode"),extend:s,PASS_TYPES:["Build","Render"]}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),u=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,c=n(408);var d=/[&<>"]/,p=/[&<>"]/g,f={"&":"&","<":"<",">":">",'"':"""};function h(e){return f[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var g=n(85);t.lib={},t.lib.mdurl=n(409),t.lib.ucmicro=n(527),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return i(c,t)?c[t]:35===t.charCodeAt(0)&&u.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return d.test(e)?e.replace(p,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return c},vw:function(){return a}});var r=n(0),i=n(356);const o=Object.create(null);function a(e,t){o[e]=t}function s(e,t){t.classHierarchy.push("vtkOpenGLViewNodeFactory")}const l={};function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l,n),t.overrides=o,i.ZP.extend(e,t,n),s(0,t)}var c={newInstance:r.m.newInstance(u,"vtkOpenGLViewNodeFactory"),extend:u}},function(e,t,n){"use strict";var r=n(78);t.ZP=r.ZP},function(e,t,n){"use strict";n.d(t,{ZP:function(){return G}});var r=n(2),i=n(575),o=n(43);const a=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE];function s(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function l(e){return e?.length>=6&&e[0]<=e[1]&&e[2]<=e[3]&&e[4]<=e[5]}function u(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function c(e){return u(e,a)}function d(e,t,n,r){const[i,o,a,s,l,u]=e;return e[0]=it?o:t,e[2]=an?s:n,e[4]=lr?u:r,e}function p(e,t){if(0===t.length)return e;if(Array.isArray(t[0]))for(let n=0;no?t:o,e[2]=n,e[3]=n>s?n:s,e[4]=r,e[5]=r>u?r:u,i!==t||a!==n||l!==r}function m(e,t,n,r){const[i,o,a,s,l,u]=e;return e[0]=t=0?(e[0]*=t,e[1]*=t):(e[0]=t*e[1],e[1]=t*e[0]),n>=0?(e[2]*=n,e[3]*=n):(e[2]=n*e[3],e[3]=n*e[2]),r>=0?(e[4]*=r,e[5]*=r):(e[4]=r*e[5],e[5]=r*e[4]),!0)}function y(e){return[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])]}function _(e,t){return e[2*t+1]-e[2*t]}function b(e){return[_(e,0),_(e,1),_(e,2)]}function x(e){return e.slice(0,2)}function w(e){return e.slice(2,4)}function S(e){return e.slice(4,6)}function C(e){const t=b(e);return t[0]>t[1]?t[0]>t[2]?t[0]:t[2]:t[1]>t[2]?t[1]:t[2]}function T(e){if(l(e)){const t=b(e);return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])}return null}function M(e){return[e[0],e[2],e[4]]}function D(e){return[e[1],e[3],e[5]]}function A(e,t){return e<=0&&t>=0||e>=0&&t<=0}function P(e,t){let n=0;for(let r=0;r<2;r++)for(let i=2;i<4;i++)for(let o=4;o<6;o++)t[n++]=[e[r],e[i],e[o]];return t}function k(e,t,n){return t[0]=e[0],t[1]=e[2],t[2]=e[4],n[0]=e[1],n[1]=e[3],n[2]=e[5],t}function L(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=P(e,[]);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:[];return t[0]=.5*(e[1]-e[0]),t[1]=.5*(e[3]-e[2]),t[2]=.5*(e[5]-e[4]),t}function E(e,t,n,i){const o=[].concat(a),s=e.getData();for(let e=0;ee[2*n+1]?(a[n]=0,u[n]=e[2*n+1],o=!1):a[n]=2;if(o)return r[0]=t[0],r[1]=t[1],r[2]=t[2],i[0]=0,1;for(let e=0;e<3;e++)2!==a[e]&&0!==n[e]?l[e]=(u[e]-t[e])/n[e]:l[e]=-1;for(let e=0;e<3;e++)l[s]1||l[s]<0)return 0;i[0]=l[s];for(let i=0;i<3;i++)if(s!==i){if(r[i]=t[i]+l[s]*n[i],r[i]e[2*i+1])return 0}else r[i]=u[i];return 1}function N(e,t,n){const r=[];let i=0,a=1,s=1;for(let l=4;l<=5;++l){r[2]=e[l];for(let l=2;l<=3;++l){r[1]=e[l];for(let l=0;l<=1;++l)if(r[0]=e[l],i=o.ZP.evaluate(n,t,r),s&&(a=i>=0?1:-1,s=0),0===i||a>0&&i<0||a<0&&i>0)return 1}}return 0}function R(e,t){if(!l(e)||!l(t))return!1;const n=[0,0,0,0,0,0];let r;for(let i=0;i<3;i++)if(r=!1,t[2*i]>=e[2*i]&&t[2*i]<=e[2*i+1]?(r=!0,n[2*i]=t[2*i]):e[2*i]>=t[2*i]&&e[2*i]<=t[2*i+1]&&(r=!0,n[2*i]=e[2*i]),t[2*i+1]>=e[2*i]&&t[2*i+1]<=e[2*i+1]?(r=!0,n[2*i+1]=t[2*i+1]):e[2*i+1]>=t[2*i]&&e[2*i+1]<=t[2*i+1]&&(r=!0,n[2*i+1]=e[2*i+1]),!r)return!1;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],!0}function B(e,t){if(!l(e)||!l(t))return!1;for(let n=0;n<3;n++)if(!(t[2*n]>=e[2*n]&&t[2*n]<=e[2*n+1]||e[2*n]>=t[2*n]&&e[2*n]<=t[2*n+1]||t[2*n+1]>=e[2*n]&&t[2*n+1]<=e[2*n+1]||e[2*n+1]>=t[2*n]&&e[2*n+1]<=t[2*n+1]))return!1;return!0}function F(e,t,n,r){return!(te[1])&&(!(ne[3])&&!(re[5]))}function V(e,t,n){const r=[[0,1,2,3,4,5,6,7],[0,1,4,5,2,3,6,7],[0,2,4,6,1,3,5,7]],i=[0,0,0,0,0,0,0,0];let a=0;for(let r=0;r<2;r++)for(let s=2;s<4;s++)for(let l=4;l<6;l++){const u=[e[r],e[s],e[l]];i[a++]=o.ZP.evaluate(n,t,u)}let s=2;for(;s--&&!(A(i[r[s][0]],i[r[s][4]])&&A(i[r[s][1]],i[r[s][5]])&&A(i[r[s][2]],i[r[s][6]])&&A(i[r[s][3]],i[r[s][7]])););if(s<0)return!1;const l=Math.sign(n[s]),u=Math.abs((e[2*s+1]-e[2*s])*n[s]);let c=l>0?1:0;for(let e=0;e<4;e++){if(0===u)continue;const t=Math.abs(i[r[s][e]])/u;l>0&&tc&&(c=t)}const d=(1-c)*e[2*s]+c*e[2*s+1];return l>0?e[2*s]=d:e[2*s+1]=d,!0}class U{constructor(e){this.bounds=e,this.bounds||(this.bounds=new Float64Array(a))}getBounds(){return this.bounds}equals(e){return s(this.bounds,e)}isValid(){return l(this.bounds)}setBounds(e){return u(this.bounds,e)}reset(){return c(this.bounds)}addPoint(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:[];return L(this.bounds,e,t)}computeScale3(e){return O(this.bounds,e)}cutWithPlane(e,t){return V(this.bounds,e,t)}intersectBox(e,t,n,r){return I(this.bounds,e,t,n,r)}intersectPlane(e,t){return N(this.bounds,e,t)}intersect(e){return R(this.bounds,e)}intersects(e){return B(this.bounds,e)}containsPoint(e,t,n){return F(this.bounds,e,t,n)}contains(e){return B(this.bounds,e)}}var G={newInstance:function(e){const t=e&&e.bounds;return new U(t)},...{equals:s,isValid:l,setBounds:u,reset:c,addPoint:d,addPoints:p,addBounds:f,setMinPoint:h,setMaxPoint:m,inflate:g,scale:v,scaleAboutCenter:function(e,t,n,r){if(!l(e))return!1;const i=y(e);return e[0]-=i[0],e[1]-=i[0],e[2]-=i[1],e[3]-=i[1],e[4]-=i[2],e[5]-=i[2],v(e,t,n,r),e[0]+=i[0],e[1]+=i[0],e[2]+=i[1],e[3]+=i[1],e[4]+=i[2],e[5]+=i[2],!0},getCenter:y,getLength:_,getLengths:b,getMaxLength:C,getDiagonalLength:T,getMinPoint:M,getMaxPoint:D,getXRange:x,getYRange:w,getZRange:S,getCorners:P,computeCornerPoints:k,computeLocalBounds:E,transformBounds:L,computeScale3:O,cutWithPlane:V,intersectBox:I,intersectPlane:N,intersect:R,intersects:B,containsPoint:F,contains:function(e,t){return!!B(e,t)&&(!!F(e,...M(t))&&!!F(e,...D(t)))},INIT_BOUNDS:a}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return M}});var r=n(0),i=n(358),o=n(4),a=n(15),s=n(359),l=n(2),u=n(107),c=n(101),d=n(70),p=n(36),f=n(108);const{FieldAssociations:h}=p.ZP,{staticOffsetAPI:m,otherStaticMethods:g}=c.Z,{ColorMode:v,ScalarMode:y,GetArray:_}=d.ZP,{VectorMode:b}=u.ZP,{VtkDataTypes:x}=o.ZP;function w(e){return()=>r.m.vtkErrorMacro(`vtkMapper::${e} - NOT IMPLEMENTED`)}function S(e,t){t.classHierarchy.push("vtkMapper"),e.getBounds=()=>{const n=e.getInputData();return n?(t.static||e.update(),t.bounds=n.getBounds()):t.bounds=(0,l.F)(),t.bounds},e.setForceCompileOnly=e=>{t.forceCompileOnly=e},e.setSelectionWebGLIdsToVTKIds=e=>{t.selectionWebGLIdsToVTKIds=e},e.createDefaultLookupTable=()=>{t.lookupTable=s.ZP.newInstance()},e.getColorModeAsString=()=>r.m.enumToString(v,t.colorMode),e.setColorModeToDefault=()=>e.setColorMode(0),e.setColorModeToMapScalars=()=>e.setColorMode(1),e.setColorModeToDirectScalars=()=>e.setColorMode(2),e.getScalarModeAsString=()=>r.m.enumToString(y,t.scalarMode),e.setScalarModeToDefault=()=>e.setScalarMode(0),e.setScalarModeToUsePointData=()=>e.setScalarMode(1),e.setScalarModeToUseCellData=()=>e.setScalarMode(2),e.setScalarModeToUsePointFieldData=()=>e.setScalarMode(3),e.setScalarModeToUseCellFieldData=()=>e.setScalarMode(4),e.setScalarModeToUseFieldData=()=>e.setScalarMode(5),e.getAbstractScalars=(e,n,r,i,o)=>{if(!e||!t.scalarVisibility)return{scalars:null,cellFLag:!1};let a=null,s=!1;if(n===y.DEFAULT)a=e.getPointData().getScalars(),a||(a=e.getCellData().getScalars(),s=!0);else if(n===y.USE_POINT_DATA)a=e.getPointData().getScalars();else if(n===y.USE_CELL_DATA)a=e.getCellData().getScalars(),s=!0;else if(n===y.USE_POINT_FIELD_DATA){const t=e.getPointData();a=r===_.BY_ID?t.getArrayByIndex(i):t.getArrayByName(o)}else if(n===y.USE_CELL_FIELD_DATA){const t=e.getCellData();s=!0,a=r===_.BY_ID?t.getArrayByIndex(i):t.getArrayByName(o)}else if(n===y.USE_FIELD_DATA){const t=e.getFieldData();a=r===_.BY_ID?t.getArrayByIndex(i):t.getArrayByName(o)}return{scalars:a,cellFlag:s}},e.mapScalars=(n,r)=>{const i=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName).scalars;if(!i)return t.colorCoordinates=null,t.colorTextureMap=null,void(t.colorMapColors=null);const o=`${e.getMTime()}${i.getMTime()}${r}`;if(t.colorBuildString!==o){if(t.useLookupTableScalarRange||e.getLookupTable().setRange(t.scalarRange[0],t.scalarRange[1]),e.canUseTextureMapForColoring(n))e.mapScalarsToTexture(i,r);else{t.colorCoordinates=null,t.colorTextureMap=null;const n=e.getLookupTable();n&&(n.build(),t.colorMapColors=n.mapScalars(i,t.colorMode,t.fieldDataTupleId))}t.colorBuildString=`${e.getMTime()}${i.getMTime()}${r}`}},e.scalarToTextureCoordinate=(e,t,n)=>{let r=.5,i=1;return(0,l.i)(e)||(i=.49,r=(e-t)*n,r>1e3?r=1e3:r<-1e3&&(r=-1e3)),{texCoordS:r,texCoordT:i}},e.createColorTextureCoordinates=(t,n,r,i,o,a,l,u,c)=>{const d=(a[1]-a[0])/u,p=[];p[0]=a[0]-d,p[1]=a[1]+d;const f=1/(p[1]-p[0]),h=n.getData(),m=t.getData();let g=0,v=0;if(o<0||o>=i)for(let t=0;t{const i=t.lookupTable.getRange(),l=t.lookupTable.usingLogScale();l&&s.ZP.getLogRange(i,i);const u=t.lookupTable.getAlpha();if(t.colorMapColors=null,null==t.colorTextureMap||e.getMTime()>t.colorTextureMap.getMTime()||t.lookupTable.getMTime()>t.colorTextureMap.getMTime()||t.lookupTable.getAlpha()!==r){t.lookupTable.setAlpha(r),t.colorTextureMap=null,t.lookupTable.build();let e=t.lookupTable.getNumberOfAvailableColors();e>4094&&(e=4094),e<64&&(e=64),e+=2;const n=(i[1]-i[0])/(e-2),s=new Float64Array(2*e);for(let t=0;tt.colorCoordinates.getMTime()||e.getInputData(0).getMTime()>t.colorCoordinates.getMTime()||t.lookupTable.getMTime()>t.colorCoordinates.getMTime()){t.colorCoordinates=null;const r=n.getNumberOfComponents(),a=n.getNumberOfTuples();t.colorCoordinates=o.ZP.newInstance({numberOfComponents:2,values:new Float32Array(2*a)});let s=t.lookupTable.getVectorComponent();t.lookupTable.getVectorMode()===b.MAGNITUDE&&n.getNumberOfComponents()>1&&(s=-1),e.createColorTextureCoordinates(n,t.colorCoordinates,a,r,s,i,t.lookupTable.getRange(),t.colorTextureMap.getPointData().getScalars().getNumberOfTuples()/2-2,l)}},e.getIsOpaque=()=>{const n=e.getInputData(),r=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName).scalars;if(!t.scalarVisibility||null==r)return!0;const i=e.getLookupTable();return!i||(i.build(),i.areScalarsOpaque(r,t.colorMode,-1))},e.canUseTextureMapForColoring=n=>{if(!t.interpolateScalarsBeforeMapping)return!1;if(t.lookupTable&&t.lookupTable.getIndexedLookup())return!1;const r=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName),i=r.scalars;return!!i&&(!r.cellFlag&&((t.colorMode!==v.DEFAULT||i.getDataType()!==x.UNSIGNED_CHAR)&&t.colorMode!==v.DIRECT_SCALARS))},e.clearColorArrays=()=>{t.colorMapColors=null,t.colorCoordinates=null,t.colorTextureMap=null},e.getLookupTable=()=>(t.lookupTable||e.createDefaultLookupTable(),t.lookupTable),e.getMTime=()=>{let e=t.mtime;if(null!==t.lookupTable){const n=t.lookupTable.getMTime();e=n>e?n:e}return e},e.getPrimitiveCount=()=>{const t=e.getInputData();return{points:t.getPoints().getNumberOfValues()/3,verts:t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells(),lines:t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells(),triangles:t.getPolys().getNumberOfValues()-3*t.getPolys().getNumberOfCells()}},e.acquireInvertibleLookupTable=w("AcquireInvertibleLookupTable"),e.valueToColor=w("ValueToColor"),e.colorToValue=w("ColorToValue"),e.useInvertibleColorFor=w("UseInvertibleColorFor"),e.clearInvertibleColor=w("ClearInvertibleColor"),e.processSelectorPixelBuffers=(e,n)=>{if(!e||!t.selectionWebGLIdsToVTKIds||!t.populateSelectionSettings)return;const r=e.getRawPixelBuffer(f.X.ID_LOW24),i=e.getRawPixelBuffer(f.X.ID_HIGH24),o=e.getCurrentPass(),a=e.getFieldAssociation();let s=null;a===h.FIELD_ASSOCIATION_POINTS?s=t.selectionWebGLIdsToVTKIds.points:a===h.FIELD_ASSOCIATION_CELLS&&(s=t.selectionWebGLIdsToVTKIds.cells),s&&n.forEach((t=>{if(o===f.X.ID_LOW24){let n=0;i&&(n+=i[t],n*=256),n+=r[t+2],n*=256,n+=r[t+1],n*=256,n+=r[t];const o=s[n],a=e.getPixelBuffer(f.X.ID_LOW24);a[t]=255&o,a[t+1]=(65280&o)>>8,a[t+2]=(16711680&o)>>16}else if(o===f.X.ID_HIGH24&&i){let n=0;n+=i[t],n*=256,n+=r[t],n*=256,n+=r[t+1],n*=256,n+=r[t+2];const o=s[n];e.getPixelBuffer(f.X.ID_HIGH24)[t]=(4278190080&o)>>24}}))}}const C={colorMapColors:null,static:!1,lookupTable:null,scalarVisibility:!0,scalarRange:[0,1],useLookupTableScalarRange:!1,colorMode:0,scalarMode:0,arrayAccessMode:1,renderTime:0,colorByArrayName:null,fieldDataTupleId:-1,populateSelectionSettings:!0,selectionWebGLIdsToVTKIds:null,interpolateScalarsBeforeMapping:!1,colorCoordinates:null,colorTextureMap:null,forceCompileOnly:0,useInvertibleColors:!1,invertibleScalars:null,customShaderAttributes:[]};function T(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,C,n),i.Z.extend(e,t,n),r.m.get(e,t,["colorCoordinates","colorMapColors","colorTextureMap","selectionWebGLIdsToVTKIds"]),r.m.setGet(e,t,["colorByArrayName","arrayAccessMode","colorMode","fieldDataTupleId","interpolateScalarsBeforeMapping","lookupTable","populateSelectionSettings","renderTime","scalarMode","scalarVisibility","static","useLookupTableScalarRange","customShaderAttributes"]),r.m.setGetArray(e,t,["scalarRange"],2),c.Z.implementCoincidentTopologyMethods(e,t),S(e,t)}var M={newInstance:r.m.newInstance(T,"vtkMapper"),extend:T,...m,...g,...d.ZP}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return c},vw:function(){return a}});var r=n(0),i=n(356);const o=Object.create(null);function a(e,t){o[e]=t}function s(e,t){t.classHierarchy.push("vtkWebGPUViewNodeFactory")}const l={};function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l,n),t.overrides=o,i.ZP.extend(e,t,n),s(0,t)}var c={newInstance:r.m.newInstance(u,"vtkWebGPUViewNodeFactory"),extend:u}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return f}});var r=n(572),i=n(575),o=n(0),a=n(10),s=n(493),l=n(26);const{vtkDebugMacro:u}=o.m;function c(e,t){t.classHierarchy.push("vtkActor");const n={...e};e.getActors=()=>[e],e.getIsOpaque=()=>{if(t.forceOpaque)return!0;if(t.forceTranslucent)return!1;t.property||e.getProperty();let n=t.property.getOpacity()>=1;return n=n&&(!t.texture||!t.texture.isTranslucent()),n=n&&(!t.mapper||t.mapper.getIsOpaque()),n},e.hasTranslucentPolygonalGeometry=()=>null!==t.mapper&&(null===t.property&&e.setProperty(e.makeProperty()),!e.getIsOpaque()),e.makeProperty=l.ZP.newInstance,e.getProperty=()=>(null===t.property&&(t.property=e.makeProperty()),t.property),e.getBounds=()=>{if(null===t.mapper)return t.bounds;const n=t.mapper.getBounds();if(!n||6!==n.length)return n;if(n[0]>n[1])return t.mapperBounds=n.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),n;if(!t.mapperBounds||n[0]!==t.mapperBounds[0]||n[1]!==t.mapperBounds[1]||n[2]!==t.mapperBounds[2]||n[3]!==t.mapperBounds[3]||n[4]!==t.mapperBounds[4]||n[5]!==t.mapperBounds[5]||e.getMTime()>t.boundsMTime.getMTime()){u("Recomputing bounds..."),t.mapperBounds=n.concat();const o=[];a.ZP.getCorners(n,o),e.computeMatrix();const s=new Float64Array(16);r.transpose(s,t.matrix),o.forEach((e=>i.fF(e,e,s))),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map(((e,t)=>t%2==0?o.reduce(((e,n)=>e>n[t/2]?n[t/2]:e),e):o.reduce(((e,n)=>e{let e=n.getMTime();if(null!==t.property){const n=t.property.getMTime();e=n>e?n:e}if(null!==t.backfaceProperty){const n=t.backfaceProperty.getMTime();e=n>e?n:e}return e},e.getRedrawMTime=()=>{let e=t.mtime;if(null!==t.mapper){let n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),n=t.mapper.getInput().getMTime(),e=n>e?n:e)}return e},e.getSupportsSelection=()=>!!t.mapper&&t.mapper.getSupportsSelection(),e.processSelectorPixelBuffers=(e,n)=>{t.mapper&&t.mapper.processSelectorPixelBuffers&&t.mapper.processSelectorPixelBuffers(e,n)}}const d={mapper:null,property:null,backfaceProperty:null,forceOpaque:!1,forceTranslucent:!1,bounds:[1,-1,1,-1,1,-1]};function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),s.ZP.extend(e,t,n),t.boundsMTime={},o.m.obj(t.boundsMTime),o.m.set(e,t,["property"]),o.m.setGet(e,t,["backfaceProperty","forceOpaque","forceTranslucent","mapper"]),c(e,t)}var f={newInstance:o.m.newInstance(p,"vtkActor"),extend:p}},function(e,t,n){"use strict";n.d(t,{Xe:function(){return r},Tu:function(){return i},ZP:function(){return o}});const r={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},i={VOID:"",CHAR:"Int8Array",SIGNED_CHAR:"Int8Array",UNSIGNED_CHAR:"Uint8Array",SHORT:"Int16Array",UNSIGNED_SHORT:"Uint16Array",INT:"Int32Array",UNSIGNED_INT:"Uint32Array",FLOAT:"Float32Array",DOUBLE:"Float64Array"};var o={DefaultDataType:i.FLOAT,DataTypeByteSize:r,VtkDataTypes:i}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return y}});var r=n(0),i=n(2),o=n(10),a=n(36);const s={UNCHANGED:0,SINGLE_POINT:1,X_LINE:2,Y_LINE:3,Z_LINE:4,XY_PLANE:5,YZ_PLANE:6,XZ_PLANE:7,XYZ_GRID:8,EMPTY:9};var l={StructuredType:s};const{StructuredType:u}=l;var c={getDataDescriptionFromExtent:function(e){let t=0;for(let n=0;n<3;++n)e[2*n]e[1]||e[2]>e[3]||e[4]>e[5]?u.EMPTY:3===t?u.XYZ_GRID:2===t?e[0]===e[1]?u.YZ_PLANE:e[2]===e[3]?u.XZ_PLANE:u.XY_PLANE:1===t?e[0]e!==o[t]));return a&&(t.extent=o.slice(),t.dataDescription=c.getDataDescriptionFromExtent(t.extent),e.modified()),a},e.setDimensions=function(){let n,r,i;if(t.deleted)h("instance deleted - cannot call any method");else{if(1===arguments.length){const e=arguments.length<=0?void 0:arguments[0];n=e[0],r=e[1],i=e[2]}else{if(3!==arguments.length)return void h("Bad dimension specification");n=arguments.length<=0?void 0:arguments[0],r=arguments.length<=1?void 0:arguments[1],i=arguments.length<=2?void 0:arguments[2]}e.setExtent(0,n-1,0,r-1,0,i-1)}},e.getDimensions=()=>[t.extent[1]-t.extent[0]+1,t.extent[3]-t.extent[2]+1,t.extent[5]-t.extent[4]+1],e.getNumberOfCells=()=>{const t=e.getDimensions();let n=1;for(let e=0;e<3;e++){if(0===t[e])return 0;t[e]>1&&(n*=t[e]-1)}return n},e.getNumberOfPoints=()=>{const t=e.getDimensions();return t[0]*t[1]*t[2]},e.getPoint=n=>{const r=e.getDimensions();if(0===r[0]||0===r[1]||0===r[2])return h("Requesting a point from an empty image."),null;const i=new Float64Array(3);switch(t.dataDescription){case s.EMPTY:return null;case s.SINGLE_POINT:break;case s.X_LINE:i[0]=n;break;case s.Y_LINE:i[1]=n;break;case s.Z_LINE:i[2]=n;break;case s.XY_PLANE:i[0]=n%r[0],i[1]=n/r[0];break;case s.YZ_PLANE:i[1]=n%r[1],i[2]=n/r[1];break;case s.XZ_PLANE:i[0]=n%r[0],i[2]=n/r[0];break;case s.XYZ_GRID:i[0]=n%r[0],i[1]=n/r[0]%r[1],i[2]=n/(r[0]*r[1]);break;default:h("Invalid dataDescription")}const o=[0,0,0];return e.indexToWorld(i,o),o},e.getBounds=()=>e.extentToBounds(e.getSpatialExtent()),e.extentToBounds=e=>o.ZP.transformBounds(e,t.indexToWorld),e.getSpatialExtent=()=>o.ZP.inflate([...t.extent],.5),e.computeTransforms=()=>{d.fromTranslation(t.indexToWorld,t.origin),t.indexToWorld[0]=t.direction[0],t.indexToWorld[1]=t.direction[1],t.indexToWorld[2]=t.direction[2],t.indexToWorld[4]=t.direction[3],t.indexToWorld[5]=t.direction[4],t.indexToWorld[6]=t.direction[5],t.indexToWorld[8]=t.direction[6],t.indexToWorld[9]=t.direction[7],t.indexToWorld[10]=t.direction[8],d.scale(t.indexToWorld,t.indexToWorld,t.spacing),d.invert(t.worldToIndex,t.indexToWorld)},e.indexToWorld=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return p.fF(n,e,t.indexToWorld),n},e.indexToWorldVec3=e.indexToWorld,e.worldToIndex=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return p.fF(n,e,t.worldToIndex),n},e.worldToIndexVec3=e.worldToIndex,e.indexToWorldBounds=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return o.ZP.transformBounds(e,t.indexToWorld,n)},e.worldToIndexBounds=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return o.ZP.transformBounds(e,t.worldToIndex,n)},e.onModified(e.computeTransforms),e.computeTransforms(),e.getCenter=()=>o.ZP.getCenter(e.getBounds()),e.computeHistogram=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=[0,0,0,0,0,0];e.worldToIndexBounds(t,r);const a=[0,0,0],s=[0,0,0];o.ZP.computeCornerPoints(r,a,s),(0,i.b)(a,a),(0,i.b)(s,s);const l=e.getDimensions();(0,i.c)(a,[0,0,0],[l[0]-1,l[1]-1,l[2]-1],a),(0,i.c)(s,[0,0,0],[l[0]-1,l[1]-1,l[2]-1],s);const u=l[0],c=l[0]*l[1],d=e.getPointData().getScalars().getData();let p=-1/0,f=1/0,h=0,m=0,g=0;for(let e=a[2];e<=s[2];e++)for(let t=a[1];t<=s[1];t++){let i=a[0]+t*u+e*c;for(let o=a[0];o<=s[0];o++){if(!n||n([o,t,e],r)){const e=d[i];e>p&&(p=e),e0?m/g:0,y=g?Math.abs(h/g-v*v):0,_=Math.sqrt(y);return{minimum:f,maximum:p,average:v,variance:y,sigma:_,count:g}},e.computeIncrements=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=[];let r=t;for(let t=0;t<3;++t)n[t]=r,r*=e[2*t+1]-e[2*t]+1;return n},e.computeOffsetIndex=t=>{let[n,r,i]=t;const o=e.getExtent(),a=e.getPointData().getScalars().getNumberOfComponents(),s=e.computeIncrements(o,a);return Math.floor((Math.round(n)-o[0])*s[0]+(Math.round(r)-o[2])*s[1]+(Math.round(i)-o[4])*s[2])},e.getOffsetIndexFromWorld=t=>{const n=e.getExtent(),r=e.worldToIndex(t);for(let e=0;e<3;++e)if(r[e]n[2*e+1])return h(`GetScalarPointer: Pixel ${r} is not in memory. Current extent = ${n}`),NaN;return e.computeOffsetIndex(r)},e.getScalarValueFromWorld=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=e.getPointData().getScalars().getNumberOfComponents();if(n<0||n>=r)return h(`GetScalarPointer: Scalar Component ${n} is not within bounds. Current Scalar numberOfComponents: ${r}`),NaN;const i=e.getOffsetIndexFromWorld(t);return Number.isNaN(i)?i:e.getPointData().getScalars().getComponent(i,n)}}const g={direction:null,indexToWorld:null,worldToIndex:null,spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:s.EMPTY};function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,g,n),a.ZP.extend(e,t,n),t.direction?Array.isArray(t.direction)&&(t.direction=new Float64Array(t.direction.slice(0,9))):t.direction=f.identity(new Float64Array(9)),t.indexToWorld=new Float64Array(16),t.worldToIndex=new Float64Array(16),r.m.get(e,t,["indexToWorld","worldToIndex"]),r.m.setGetArray(e,t,["origin","spacing"],3),r.m.setGetArray(e,t,["direction"],9),r.m.getArray(e,t,["extent"],6),m(e,t)}var y={newInstance:r.m.newInstance(v,"vtkImageData"),extend:v}},function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(0);const{vtkErrorMacro:i}=r.m;function o(e,t){t.classHierarchy.push("vtkShader"),e.compile=()=>{let e=t.context.VERTEX_SHADER;if(!t.source||!t.source.length||"Unknown"===t.shaderType)return!1;if(0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0),"Fragment"===t.shaderType)e=t.context.FRAGMENT_SHADER;else e=t.context.VERTEX_SHADER;t.handle=t.context.createShader(e),t.context.shaderSource(t.handle,t.source),t.context.compileShader(t.handle);if(!t.context.getShaderParameter(t.handle,t.context.COMPILE_STATUS)){const e=t.context.getShaderInfoLog(t.handle);return i(`Error compiling shader '${t.source}': ${e}`),t.context.deleteShader(t.handle),t.handle=0,!1}return!0},e.cleanup=()=>{"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0,t.dirty=!0)}}const a={shaderType:"Unknown",source:"",error:"",handle:0,dirty:!1,context:null};function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a,n),r.m.obj(e,t),r.m.setGet(e,t,["shaderType","source","error","handle","context"]),o(e,t)}var l={newInstance:r.m.newInstance(s,"vtkShader"),extend:s};const{vtkErrorMacro:u}=r.m;function c(e,t){t.classHierarchy.push("vtkShaderProgram"),e.compileShader=()=>t.vertexShader.compile()?t.fragmentShader.compile()?e.attachShader(t.vertexShader)&&e.attachShader(t.fragmentShader)?e.link()?(e.setCompiled(!0),1):(u(`Links failed: ${t.error}`),0):(u(t.error),0):(u(t.fragmentShader.getSource().split("\n").map(((e,t)=>`${t}: ${e}`)).join("\n")),u(t.fragmentShader.getError()),0):(u(t.vertexShader.getSource().split("\n").map(((e,t)=>`${t}: ${e}`)).join("\n")),u(t.vertexShader.getError()),0),e.cleanup=()=>{"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0)},e.bind=()=>!(!t.linked&&!e.link())&&(t.context.useProgram(t.handle),e.setBound(!0),!0),e.isBound=()=>!!t.bound,e.release=()=>{t.context.useProgram(null),e.setBound(!1)},e.setContext=e=>{t.vertexShader.setContext(e),t.fragmentShader.setContext(e),t.geometryShader.setContext(e)},e.link=()=>{if(t.linked)return!0;if(0===t.handle)return t.error="Program has not been initialized, and/or does not have shaders.",!1;t.uniformLocs={},t.context.linkProgram(t.handle);if(!t.context.getProgramParameter(t.handle,t.context.LINK_STATUS)){const e=t.context.getProgramInfoLog(t.handle);return u(`Error linking shader ${e}`),t.handle=0,!1}return e.setLinked(!0),t.attributeLocs={},!0},e.setUniformMatrix=(n,r)=>{const i=e.findUniform(n);if(-1===i)return t.error=`Could not set uniform ${n} . No such uniform.`,!1;const o=new Float32Array(r);return t.context.uniformMatrix4fv(i,!1,o),!0},e.setUniformMatrix3x3=(n,r)=>{const i=e.findUniform(n);if(-1===i)return t.error=`Could not set uniform ${n} . No such uniform.`,!1;const o=new Float32Array(r);return t.context.uniformMatrix3fv(i,!1,o),!0},e.setUniformf=(n,r)=>{const i=e.findUniform(n);return-1===i?(t.error=`Could not set uniform ${n} . No such uniform.`,!1):(t.context.uniform1f(i,r),!0)},e.setUniformfv=(n,r)=>{const i=e.findUniform(n);return-1===i?(t.error=`Could not set uniform ${n} . No such uniform.`,!1):(t.context.uniform1fv(i,r),!0)},e.setUniformi=(n,r)=>{const i=e.findUniform(n);return-1===i?(t.error=`Could not set uniform ${n} . No such uniform.`,!1):(t.context.uniform1i(i,r),!0)},e.setUniformiv=(n,r)=>{const i=e.findUniform(n);return-1===i?(t.error=`Could not set uniform ${n} . No such uniform.`,!1):(t.context.uniform1iv(i,r),!0)},e.setUniform2f=(n,r,i)=>{const o=e.findUniform(n);if(-1===o)return t.error=`Could not set uniform ${n} . No such uniform.`,!1;if(void 0===i)throw new RangeError("Invalid number of values for array");return t.context.uniform2f(o,r,i),!0},e.setUniform2fv=(n,r)=>{const i=e.findUniform(n);return-1===i?(t.error=`Could not set uniform ${n} . No such uniform.`,!1):(t.context.uniform2fv(i,r),!0)},e.setUniform2i=(n,r,i)=>{const o=e.findUniform(n);if(-1===o)return t.error=`Could not set uniform ${n} . No such uniform.`,!1;if(void 0===i)throw new RangeError("Invalid number of values for array");return t.context.uniform2i(o,r,i),!0},e.setUniform2iv=(n,r)=>{const i=e.findUniform(n);return-1===i?(t.error=`Could not set uniform ${n} . No such uniform.`,!1):(t.context.uniform2iv(i,r),!0)},e.setUniform3f=(n,r,i,o)=>{const a=e.findUniform(n);if(-1===a)return t.error=`Could not set uniform ${n} . No such uniform.`,!1;if(void 0===o)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(a,r,i,o),!0},e.setUniform3fArray=(n,r)=>{const i=e.findUniform(n);if(-1===i)return t.error=`Could not set uniform ${n} . No such uniform.`,!1;if(!Array.isArray(r)||3!==r.length)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(i,r[0],r[1],r[2]),!0},e.setUniform3fv=(n,r)=>{const i=e.findUniform(n);return-1===i?(t.error=`Could not set uniform ${n} . No such uniform.`,!1):(t.context.uniform3fv(i,r),!0)},e.setUniform3i=function(n){const r=e.findUniform(n);if(-1===r)return t.error=`Could not set uniform ${n} . No such uniform.`,!1;for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a{const i=e.findUniform(n);return-1===i?(t.error=`Could not set uniform ${n} . No such uniform.`,!1):(t.context.uniform3iv(i,r),!0)},e.setUniform4f=function(n){const r=e.findUniform(n);if(-1===r)return t.error=`Could not set uniform ${n} . No such uniform.`,!1;for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a{const i=e.findUniform(n);return-1===i?(t.error=`Could not set uniform ${n} . No such uniform.`,!1):(t.context.uniform4fv(i,r),!0)},e.setUniform4i=function(n){const r=e.findUniform(n);if(-1===r)return t.error=`Could not set uniform ${n} . No such uniform.`,!1;for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a{const i=e.findUniform(n);return-1===i?(t.error=`Could not set uniform ${n} . No such uniform.`,!1):(t.context.uniform4iv(i,r),!0)},e.findUniform=e=>{if(!e||!t.linked)return-1;let n=t.uniformLocs[e];return void 0!==n?n:(n=t.context.getUniformLocation(t.handle,e),null===n?(t.error=`Uniform ${e} not found in current shader program.`,t.uniformLocs[e]=-1,-1):(t.uniformLocs[e]=n,n))},e.isUniformUsed=e=>{if(!e)return!1;let n=t.uniformLocs[e];return void 0!==n?null!==n:t.linked?(n=t.context.getUniformLocation(t.handle,e),t.uniformLocs[e]=n,null!==n):(u("attempt to find uniform when the shader program is not linked"),!1)},e.isAttributeUsed=e=>{if(!e)return!1;if(e in t.attributeLocs)return!0;if(!t.linked)return u("attempt to find uniform when the shader program is not linked"),!1;const n=t.context.getAttribLocation(t.handle,e);return-1!==n&&(t.attributeLocs[e]=n,!0)},e.attachShader=n=>{if(0===n.getHandle())return t.error="Shader object was not initialized, cannot attach it.",!1;if("Unknown"===n.getShaderType())return t.error="Shader object is of type Unknown and cannot be used.",!1;if(0===t.handle){const e=t.context.createProgram();if(0===e)return t.error="Could not create shader program.",!1;t.handle=e,t.linked=!1}return"Vertex"===n.getShaderType()&&(0!==t.vertexShaderHandle&&t.comntext.detachShader(t.handle,t.vertexShaderHandle),t.vertexShaderHandle=n.getHandle()),"Fragment"===n.getShaderType()&&(0!==t.fragmentShaderHandle&&t.context.detachShader(t.handle,t.fragmentShaderHandle),t.fragmentShaderHandle=n.getHandle()),t.context.attachShader(t.handle,n.getHandle()),e.setLinked(!1),!0},e.detachShader=e=>{if(0===e.getHandle())return t.error="shader object was not initialized, cannot attach it.",!1;if("Unknown"===e.getShaderType())return t.error="Shader object is of type Unknown and cannot be used.",!1;switch(0===t.handle&&(t.error="This shader program has not been initialized yet."),e.getShaderType()){case"Vertex":return t.vertexShaderHandle!==e.getHandle()?(t.error="The supplied shader was not attached to this program.",!1):(t.context.detachShader(t.handle,e.getHandle()),t.vertexShaderHandle=0,t.linked=!1,!0);case"Fragment":return t.fragmentShaderHandle!==e.getHandle()?(t.error="The supplied shader was not attached to this program.",!1):(t.context.detachShader(t.handle,e.getHandle()),t.fragmentShaderHandle=0,t.linked=!1,!0);default:return!1}},e.setContext=e=>{t.context=e,t.vertexShader.setContext(e),t.fragmentShader.setContext(e),t.geometryShader.setContext(e)},e.setLastCameraMTime=e=>{t.lastCameraMTime=e}}const d={vertexShaderHandle:0,fragmentShaderHandle:0,geometryShaderHandle:0,vertexShader:null,fragmentShader:null,geometryShader:null,linked:!1,bound:!1,compiled:!1,error:"",handle:0,numberOfOutputs:0,attributesLocs:null,uniformLocs:null,md5Hash:0,context:null,lastCameraMTime:null};function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),t.attributesLocs={},t.uniformLocs={},t.vertexShader=l.newInstance(),t.vertexShader.setShaderType("Vertex"),t.fragmentShader=l.newInstance(),t.fragmentShader.setShaderType("Fragment"),t.geometryShader=l.newInstance(),t.geometryShader.setShaderType("Geometry"),r.m.obj(e,t),r.m.get(e,t,["lastCameraMTime"]),r.m.setGet(e,t,["error","handle","compiled","bound","md5Hash","vertexShader","fragmentShader","geometryShader","linked"]),c(e,t)}var f={newInstance:r.m.newInstance(p,"vtkShaderProgram"),extend:p,substitute:function(e,t,n,r){const i="string"==typeof n?n:n.join("\n"),o=!1===r?t:new RegExp(t,"g"),a=e.replace(o,i);return{replace:a!==i,result:a}}}},function(e,t,n){"use strict";var r=n(89),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n{t.device=e,t.handle=t.device.getHandle().createShaderModule({code:n.getCode()})}}const o={device:null,handle:null};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.obj(e,t),r.m.get(e,t,["lastCameraMTime"]),r.m.setGet(e,t,["device","handle"]),i(e,t)}var s={newInstance:r.m.newInstance(a,"vtkWebGPUShaderModule"),extend:a};function l(e,t){t.classHierarchy.push("vtkWebGPUShaderCache"),e.getShaderModule=e=>{const n=e.getType(),r=e.getHash(),i=t._shaderModules.keys();for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),t._shaderModules=new Map,r.m.obj(e,t),r.m.setGet(e,t,["device","window"]),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkWebGPUShaderCache"),extend:c,substitute:function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const i=Array.isArray(n)?n.join("\n"):n;let o=!1;-1!==e.search(t)&&(o=!0);let a="";r&&(a="g");const s=new RegExp(t,a),l=e.replace(s,i);return{replace:o,result:l}}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return a},e$:function(){return i},Fn:function(){return o}});const r={};function i(e){return!!r[e]}function o(e,t){r[e]=t}var a={get:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r[e](t)},has:i,registerType:o}},function(e,t,n){"use strict";var r=n(146),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n{},e.endInteraction=()=>{},e.onButtonDown=(e,t,n)=>{},e.onButtonUp=e=>{},e.onMouseMove=(e,t,n)=>{},e.onStartScroll=(e,t,n)=>{},e.onScroll=(e,t,n)=>{},e.onEndScroll=e=>{},e.isDragEnabled=()=>t.dragEnabled,e.isScrollEnabled=()=>t.scrollEnabled}const o={button:1,shift:!1,control:!1,alt:!1,dragEnabled:!0,scrollEnabled:!1};var a={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.setGet(e,t,["button","shift","control","alt"]),r.m.set(e,t,["dragEnabled","scrollEnabled"]),i(e,t)}}},function(e,t,n){"use strict";n.d(t,{Z:function(){return a},I:function(){return i}});var r=n(351);const i=n.n(r)()(),o={vtkObject:()=>null};function a(e){if(null==e)return e;if(e.isA)return e;if(!e.vtkClass)return i.console&&i.console.error&&i.console.error("Invalid VTK object"),null;const t=o[e.vtkClass];if(!t)return i.console&&i.console.error&&i.console.error(`No vtk class found for Object of type ${e.vtkClass}`),null;const n={...e};Object.keys(n).forEach((e=>{n[e]&&"object"==typeof n[e]&&n[e].vtkClass&&(n[e]=a(n[e]))}));const r=t(n);return r&&r.modified&&r.modified(),r}a.register=function(e,t){o[e]=t}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return x}});var r=n(45),i=n(111),o=n(0),a=n(4),s=n(2),l=n(6),u=n(8);const{Wrap:c,Filter:d}=r.ZP,{VtkDataTypes:p}=a.ZP,{vtkDebugMacro:f,vtkErrorMacro:h,vtkWarningMacro:m}=o.c,{toHalf:g}=i.Z;function v(e,t){function n(e,n){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=[];let o=t.width*t.height*t.components;if(r&&(o*=t.depth),e!==p.FLOAT&&t.openGLDataType===t.context.FLOAT)for(let e=0;eo?n[e].subarray(0,o):n[e];i.push(new Float32Array(t))}else i.push(null);if(e!==p.UNSIGNED_CHAR&&t.openGLDataType===t.context.UNSIGNED_BYTE)for(let e=0;eo?n[e].subarray(0,o):n[e];i.push(new Uint8Array(t))}else i.push(null);let a=!1;if(t._openGLRenderWindow.getWebgl2())a=t.openGLDataType===t.context.HALF_FLOAT;else{const e=t.context.getExtension("OES_texture_half_float");a=e&&t.openGLDataType===e.HALF_FLOAT_OES}if(a)for(let e=0;e=o&&(d=o-1);const g=l-c,v=1-g;c=c*r*a,d=d*r*a;for(let t=0;t=r&&(f=r-1);const y=l-u;u*=a,f*=a;for(let t=0;t2048||i<-2048||i>2048)return!1}return!0}(r,i)||o);t.useHalfFloat=s}(o,u.offset,u.scale,r),t.useHalfFloat||e.getOpenGLDataType(o,!0),{numComps:i,dataType:o,data:a,scaleOffsets:u}}t.classHierarchy.push("vtkOpenGLTexture"),e.render=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(n?t._openGLRenderWindow=n:(t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t._openGLRenderWindow=t._openGLRenderer.getParent()),t.context=t._openGLRenderWindow.getContext(),t.renderable.getInterpolate()?(t.generateMipmap?e.setMinificationFilter(d.LINEAR_MIPMAP_LINEAR):e.setMinificationFilter(d.LINEAR),e.setMagnificationFilter(d.LINEAR)):(e.setMinificationFilter(d.NEAREST),e.setMagnificationFilter(d.NEAREST)),t.renderable.getRepeat()&&(e.setWrapR(c.REPEAT),e.setWrapS(c.REPEAT),e.setWrapT(c.REPEAT)),t.renderable.getInputData()&&t.renderable.setImage(null),!t.handle||t.renderable.getMTime()>t.textureBuildTime.getMTime()){if(null!==t.renderable.getImage()&&(t.renderable.getInterpolate()&&(t.generateMipmap=!0,e.setMinificationFilter(d.LINEAR_MIPMAP_LINEAR)),t.renderable.getImage()&&t.renderable.getImageLoaded()&&(e.create2DFromImage(t.renderable.getImage()),e.activate(),e.sendParameters(),t.textureBuildTime.modified())),null!==t.renderable.getCanvas()){t.renderable.getInterpolate()&&(t.generateMipmap=!0,e.setMinificationFilter(d.LINEAR_MIPMAP_LINEAR));const n=t.renderable.getCanvas();e.create2DFromRaw(n.width,n.height,4,p.UNSIGNED_CHAR,n,!0),e.activate(),e.sendParameters(),t.textureBuildTime.modified()}if(null!==t.renderable.getJsImageData()){const n=t.renderable.getJsImageData();t.renderable.getInterpolate()&&(t.generateMipmap=!0,e.setMinificationFilter(d.LINEAR_MIPMAP_LINEAR)),e.create2DFromRaw(n.width,n.height,4,p.UNSIGNED_CHAR,n.data,!0),e.activate(),e.sendParameters(),t.textureBuildTime.modified()}const n=t.renderable.getInputData(0);if(n&&n.getPointData().getScalars()){const r=n.getExtent(),i=n.getPointData().getScalars(),o=[];for(let e=0;e{e.deactivate(),t.context&&t.handle&&t.context.deleteTexture(t.handle),t.handle=0,t.numberOfDimensions=0,t.target=0,t.components=0,t.width=0,t.height=0,t.depth=0,e.resetFormatAndType()},e.createTexture=()=>{t.handle||(t.handle=t.context.createTexture(),t.target&&(t.context.bindTexture(t.target,t.handle),t.context.texParameteri(t.target,t.context.TEXTURE_MIN_FILTER,e.getOpenGLFilterMode(t.minificationFilter)),t.context.texParameteri(t.target,t.context.TEXTURE_MAG_FILTER,e.getOpenGLFilterMode(t.magnificationFilter)),t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_S,e.getOpenGLWrapMode(t.wrapS)),t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_T,e.getOpenGLWrapMode(t.wrapT)),t._openGLRenderWindow.getWebgl2()&&t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_R,e.getOpenGLWrapMode(t.wrapR)),t.context.bindTexture(t.target,null)))},e.getTextureUnit=()=>t._openGLRenderWindow?t._openGLRenderWindow.getTextureUnitForTexture(e):-1,e.activate=()=>{t._openGLRenderWindow.activateTexture(e),e.bind()},e.deactivate=()=>{t._openGLRenderWindow&&t._openGLRenderWindow.deactivateTexture(e)},e.releaseGraphicsResources=n=>{n&&t.handle&&(n.activateTexture(e),n.deactivateTexture(e),t.context.deleteTexture(t.handle),t.handle=0,t.numberOfDimensions=0,t.target=0,t.internalFormat=0,t.format=0,t.openGLDataType=0,t.components=0,t.width=0,t.height=0,t.depth=0),t.shaderProgram&&(t.shaderProgram.releaseGraphicsResources(n),t.shaderProgram=null)},e.bind=()=>{t.context.bindTexture(t.target,t.handle),t.autoParameters&&e.getMTime()>t.sendParametersTime.getMTime()&&e.sendParameters()},e.isBound=()=>{let e=!1;if(t.context&&t.handle){let n=0;if(t.target===t.context.TEXTURE_2D)n=t.context.TEXTURE_BINDING_2D;else m("impossible case");e=t.context.getIntegerv(n)===t.handle}return e},e.sendParameters=()=>{t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_S,e.getOpenGLWrapMode(t.wrapS)),t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_T,e.getOpenGLWrapMode(t.wrapT)),t._openGLRenderWindow.getWebgl2()&&t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_R,e.getOpenGLWrapMode(t.wrapR)),t.context.texParameteri(t.target,t.context.TEXTURE_MIN_FILTER,e.getOpenGLFilterMode(t.minificationFilter)),t.context.texParameteri(t.target,t.context.TEXTURE_MAG_FILTER,e.getOpenGLFilterMode(t.magnificationFilter)),t._openGLRenderWindow.getWebgl2()&&(t.context.texParameteri(t.target,t.context.TEXTURE_BASE_LEVEL,t.baseLevel),t.context.texParameteri(t.target,t.context.TEXTURE_MAX_LEVEL,t.maxLevel)),t.sendParametersTime.modified()},e.getInternalFormat=(n,r)=>(t._forceInternalFormat||(t.internalFormat=e.getDefaultInternalFormat(n,r)),t.internalFormat||f(`Unable to find suitable internal format for T=${n} NC= ${r}`),t.internalFormat),e.getDefaultInternalFormat=(e,n)=>{let r=0;return r=t._openGLRenderWindow.getDefaultTextureInternalFormat(e,n,t.oglNorm16Ext,t.useHalfFloat),r||(r||(f("Unsupported internal texture type!"),f(`Unable to find suitable internal format for T=${e} NC= ${n}`)),r)},e.setInternalFormat=n=>{t._forceInternalFormat=!0,n!==t.internalFormat&&(t.internalFormat=n,e.modified())},e.getFormat=(n,r)=>(t.format=e.getDefaultFormat(n,r),t.format),e.getDefaultFormat=(e,n)=>{if(t._openGLRenderWindow.getWebgl2())switch(n){case 1:return t.context.RED;case 2:return t.context.RG;default:return t.context.RGB;case 4:return t.context.RGBA}else switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;default:return t.context.RGB;case 4:return t.context.RGBA}},e.resetFormatAndType=()=>{t.format=0,t.internalFormat=0,t._forceInternalFormat=!1,t.openGLDataType=0},e.getDefaultDataType=e=>{if(t._openGLRenderWindow.getWebgl2())switch(e){case p.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case t.oglNorm16Ext&&!t.useHalfFloat&&p.SHORT:return t.context.SHORT;case t.oglNorm16Ext&&!t.useHalfFloat&&p.UNSIGNED_SHORT:return t.context.UNSIGNED_SHORT;case t.useHalfFloat&&p.SHORT:case t.useHalfFloat&&p.UNSIGNED_SHORT:return t.context.HALF_FLOAT;case p.FLOAT:case p.VOID:default:return t.context.FLOAT}switch(e){case p.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case p.FLOAT:case p.VOID:default:if(t.context.getExtension("OES_texture_float")&&t.context.getExtension("OES_texture_float_linear"))return t.context.FLOAT;{const e=t.context.getExtension("OES_texture_half_float");if(e&&t.context.getExtension("OES_texture_half_float_linear"))return e.HALF_FLOAT_OES}return t.context.UNSIGNED_BYTE}},e.getOpenGLDataType=function(n){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.openGLDataType&&!r||(t.openGLDataType=e.getDefaultDataType(n)),t.openGLDataType},e.getShiftAndScale=()=>{let e=0,n=1;switch(t.openGLDataType){case t.context.BYTE:n=127.5,e=n-128;break;case t.context.UNSIGNED_BYTE:n=255,e=0;break;case t.context.SHORT:n=32767.5,e=n-32768;break;case t.context.UNSIGNED_SHORT:n=65536,e=0;break;case t.context.INT:n=2147483647.5,e=n-2147483648;break;case t.context.UNSIGNED_INT:n=4294967295,e=0;case t.context.FLOAT:}return{shift:e,scale:n}},e.getOpenGLFilterMode=e=>{switch(e){case d.NEAREST:return t.context.NEAREST;case d.LINEAR:return t.context.LINEAR;case d.NEAREST_MIPMAP_NEAREST:return t.context.NEAREST_MIPMAP_NEAREST;case d.NEAREST_MIPMAP_LINEAR:return t.context.NEAREST_MIPMAP_LINEAR;case d.LINEAR_MIPMAP_NEAREST:return t.context.LINEAR_MIPMAP_NEAREST;case d.LINEAR_MIPMAP_LINEAR:return t.context.LINEAR_MIPMAP_LINEAR;default:return t.context.NEAREST}},e.getOpenGLWrapMode=e=>{switch(e){case c.CLAMP_TO_EDGE:return t.context.CLAMP_TO_EDGE;case c.REPEAT:return t.context.REPEAT;case c.MIRRORED_REPEAT:return t.context.MIRRORED_REPEAT;default:return t.context.CLAMP_TO_EDGE}},e.create2DFromRaw=function(i,o,a,s,u){let c=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(e.getOpenGLDataType(s,!0),e.getInternalFormat(s,a),e.getFormat(s,a),!t.internalFormat||!t.format||!t.openGLDataType)return h("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=a,t.width=i,t.height=o,t.depth=1,t.numberOfDimensions=2,t._openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind();const d=[u],p=n(s,d),f=r(p);return t.context.pixelStorei(t.context.UNPACK_FLIP_Y_WEBGL,c),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),l(s)?(t.context.texStorage2D(t.target,1,t.internalFormat,t.width,t.height),null!=f[0]&&t.context.texSubImage2D(t.target,0,0,0,t.width,t.height,t.format,t.openGLDataType,f[0])):t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,f[0]),t.generateMipmap&&t.context.generateMipmap(t.target),c&&t.context.pixelStorei(t.context.UNPACK_FLIP_Y_WEBGL,!1),e.deactivate(),!0},e.createCubeFromRaw=(i,a,s,u,c)=>{if(e.getOpenGLDataType(u),e.getInternalFormat(u,s),e.getFormat(u,s),!t.internalFormat||!t.format||!t.openGLDataType)return h("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_CUBE_MAP,t.components=s,t.width=i,t.height=a,t.depth=1,t.numberOfDimensions=2,t._openGLRenderWindow.activateTexture(e),t.maxLevel=c.length/6-1,e.createTexture(),e.bind();const d=r(n(u,c)),p=[];let f=t.width,m=t.height;for(let e=0;e=1&&i>=1;){let o=null;n<=t.maxLevel&&(o=p[6*n+e]),l(u)?null!=o&&t.context.texSubImage2D(t.context.TEXTURE_CUBE_MAP_POSITIVE_X+e,n,0,0,r,i,t.format,t.openGLDataType,o):t.context.texImage2D(t.context.TEXTURE_CUBE_MAP_POSITIVE_X+e,n,t.internalFormat,r,i,0,t.format,t.openGLDataType,o),n++,r/=2,i/=2}}return e.deactivate(),!0},e.createDepthFromRaw=(n,r,i,o)=>(e.getOpenGLDataType(i),t.format=t.context.DEPTH_COMPONENT,t._openGLRenderWindow.getWebgl2()?i===p.FLOAT?t.internalFormat=t.context.DEPTH_COMPONENT32F:t.internalFormat=t.context.DEPTH_COMPONENT16:t.internalFormat=t.context.DEPTH_COMPONENT,t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_2D,t.components=1,t.width=n,t.height=r,t.depth=1,t.numberOfDimensions=2,t._openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),l(i)?(t.context.texStorage2D(t.target,1,t.internalFormat,t.width,t.height),null!=o&&t.context.texSubImage2D(t.target,0,0,0,t.width,t.height,t.format,t.openGLDataType,o)):t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,o),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(h("Failed to determine texture parameters."),!1)),e.create2DFromImage=n=>{if(e.getOpenGLDataType(p.UNSIGNED_CHAR),e.getInternalFormat(p.UNSIGNED_CHAR,4),e.getFormat(p.UNSIGNED_CHAR,4),!t.internalFormat||!t.format||!t.openGLDataType)return h("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=4,t.depth=1,t.numberOfDimensions=2,t._openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1);const r=!(t._openGLRenderWindow.getWebgl2()||(0,s.R)(n.width)&&(0,s.R)(n.height)),i=document.createElement("canvas");i.width=r?(0,s.N)(n.width):n.width,i.height=r?(0,s.N)(n.height):n.height,t.width=i.width,t.height=i.height;const o=i.getContext("2d");o.translate(0,i.height),o.scale(1,-1),o.drawImage(n,0,0,n.width,n.height,0,0,i.width,i.height);const a=i;return l(p.UNSIGNED_CHAR)?(t.context.texStorage2D(t.target,1,t.internalFormat,t.width,t.height),null!=a&&t.context.texSubImage2D(t.target,0,0,0,t.width,t.height,t.format,t.openGLDataType,a)):t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,a),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.create2DFilterableFromRaw=function(t,n,r,i,o){let s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return e.create2DFilterableFromDataArray(t,n,a.ZP.newInstance({numberOfComponents:r,dataType:i,values:o}),s)},e.create2DFilterableFromDataArray=function(t,n,r){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const{numComps:o,dataType:a,data:s}=u(r,i);e.create2DFromRaw(t,n,o,a,s)},e.create3DFromRaw=(i,o,a,s,u,c)=>{if(e.getOpenGLDataType(u),e.getInternalFormat(u,s),e.getFormat(u,s),!t.internalFormat||!t.format||!t.openGLDataType)return h("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_3D,t.components=s,t.width=i,t.height=o,t.depth=a,t.numberOfDimensions=3,t._openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind();const d=r(n(u,[c],!0));return t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),l(u)?(t.context.texStorage3D(t.target,1,t.internalFormat,t.width,t.height,t.depth),null!=d[0]&&t.context.texSubImage3D(t.target,0,0,0,0,t.width,t.height,t.depth,t.format,t.openGLDataType,d[0])):t.context.texImage3D(t.target,0,t.internalFormat,t.width,t.height,t.depth,0,t.format,t.openGLDataType,d[0]),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.create3DFilterableFromRaw=function(t,n,r,i,o,s){let l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return e.create3DFilterableFromDataArray(t,n,r,a.ZP.newInstance({numberOfComponents:i,dataType:o,values:s}),l)},e.create3DFilterableFromDataArray=function(n,r,i,o){let a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{numComps:c,dataType:d,data:f,scaleOffsets:m}=u(o,a),g=n*r*i,v=[],y=[];for(let e=0;e1/e));for(let e=0;e{e[t]=n},x=p.UNSIGNED_CHAR;if(d===p.UNSIGNED_CHAR)for(let e=0;e{e[t]=(n-r)/i}):(x=p.UNSIGNED_CHAR,b=(e,t,n,r,i)=>{e[t]=255*(n-r)/i});if(e.getOpenGLDataType(x),e.getInternalFormat(x,c),e.getFormat(x,c),!t.internalFormat||!t.format||!t.openGLDataType)return h("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=c,t.depth=1,t.numberOfDimensions=2;let w=t.context.getParameter(t.context.MAX_TEXTURE_SIZE);w>4096&&(x===p.FLOAT||c>=3)&&(w=4096);let S=1,C=1;g>w*w&&(S=Math.ceil(Math.sqrt(g/(w*w))),C=S);let T=Math.sqrt(g)/S;T=(0,s.N)(T);const M=Math.floor(T*S/n),D=Math.ceil(i/M),A=(0,s.N)(r*D/C);let P;t.width=T,t.height=A,t._openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.volumeInfo.xreps=M,t.volumeInfo.yreps=D,t.volumeInfo.xstride=S,t.volumeInfo.ystride=C,t.volumeInfo.offset=_.offset,t.volumeInfo.scale=_.scale;const k=T*A*c;P=x===p.FLOAT?new Float32Array(k):new Uint8Array(k);let L=0;const O=Math.floor(n/S),E=Math.floor(r/C);for(let e=0;e{t._openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t._openGLRenderWindow=n,t.context=null,n&&(t.context=t._openGLRenderWindow.getContext()))},e.getMaximumTextureSize=e=>e&&e.isCurrent()?e.getIntegerv(e.MAX_TEXTURE_SIZE):-1}const y={_openGLRenderWindow:null,_forceInternalFormat:!1,context:null,handle:0,sendParametersTime:null,textureBuildTime:null,numberOfDimensions:0,target:0,format:0,openGLDataType:0,components:0,width:0,height:0,depth:0,autoParameters:!0,wrapS:c.CLAMP_TO_EDGE,wrapT:c.CLAMP_TO_EDGE,wrapR:c.CLAMP_TO_EDGE,minificationFilter:d.NEAREST,magnificationFilter:d.NEAREST,minLOD:-1e3,maxLOD:1e3,baseLevel:0,maxLevel:1e3,generateMipmap:!1,useHalfFloat:!0,oglNorm16Ext:null};function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,y,n),l.Z.extend(e,t,n),t.sendParametersTime={},(0,o.o)(t.sendParametersTime,{mtime:0}),t.textureBuildTime={},(0,o.o)(t.textureBuildTime,{mtime:0}),(0,o.s)(e,t,["format","openGLDataType"]),(0,o.e)(e,t,["keyMatrixTime","minificationFilter","magnificationFilter","wrapS","wrapT","wrapR","generateMipmap","oglNorm16Ext"]),(0,o.g)(e,t,["width","height","volumeInfo","components","handle","target"]),(0,o.i)(e,t,["openGLRenderWindow"]),v(e,t)}const b=(0,o.n)(_,"vtkOpenGLTexture");var x={newInstance:b,extend:_,...r.ZP};(0,u.vw)("vtkTexture",b)},function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(572),i=n(573),o=n(575),a=n(2),s=n(68);const l=e=>e,u=1e-6;class c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.matrix=r.identity(new Float64Array(16)),this.tmp=new Float64Array(3),this.angleConv=e?i.c$:l}rotateFromDirections(e,t){const n=new Float64Array(3),i=new Float64Array(3),a=new Float64Array(16);o.t8(n,e[0],e[1],e[2]),o.t8(i,t[0],t[1],t[2]),o.Fv(n,n),o.Fv(i,i);const s=o.AK(n,i);return s>=1||(o.kC(this.tmp,n,i),o.kE(this.tmp)1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if((0,a.a)(s.Wd,this.matrix))return this;const r=-1===n?e.length:t+3*n;for(let n=t;nr.m.vtkErrorMacro(`vtkProperty::${e} - NOT IMPLEMENTED`)}function l(e,t){t.classHierarchy.push("vtkProperty"),e.setColor=(n,r,i)=>{Array.isArray(n)?t.color[0]===n[0]&&t.color[1]===n[1]&&t.color[2]===n[2]||(t.color[0]=n[0],t.color[1]=n[1],t.color[2]=n[2],e.modified()):t.color[0]===n&&t.color[1]===r&&t.color[2]===i||(t.color[0]=n,t.color[1]=r,t.color[2]=i,e.modified()),e.setDiffuseColor(t.color),e.setAmbientColor(t.color),e.setSpecularColor(t.color)},e.computeCompositeColor=s("ComputeCompositeColor"),e.getColor=()=>{let e=0;t.ambient+t.diffuse+t.specular>0&&(e=1/(t.ambient+t.diffuse+t.specular));for(let n=0;n<3;n++)t.color[n]=e*(t.ambient*t.ambientColor[n]+t.diffuse*t.diffuseColor[n]+t.specular*t.specularColor[n]);return[].concat(t.color)},e.setSpecularPower=n=>{const r=1/Math.max(1,n);t.roughness===r&&t.specularPower===n||(t.specularPower=n,t.roughness=r,e.modified())},e.addShaderVariable=s("AddShaderVariable"),e.setInterpolationToFlat=()=>e.setInterpolation(a.FLAT),e.setInterpolationToGouraud=()=>e.setInterpolation(a.GOURAUD),e.setInterpolationToPhong=()=>e.setInterpolation(a.PHONG),e.getInterpolationAsString=()=>r.m.enumToString(a,t.interpolation),e.setRepresentationToWireframe=()=>e.setRepresentation(o.WIREFRAME),e.setRepresentationToSurface=()=>e.setRepresentation(o.SURFACE),e.setRepresentationToPoints=()=>e.setRepresentation(o.POINTS),e.getRepresentationAsString=()=>r.m.enumToString(o,t.representation)}const u={color:[1,1,1],ambientColor:[1,1,1],diffuseColor:[1,1,1],specularColor:[1,1,1],edgeColor:[0,0,0],ambient:0,diffuse:1,metallic:0,roughness:.6,normalStrength:1,emission:1,baseIOR:1.45,specular:0,specularPower:1,opacity:1,interpolation:a.GOURAUD,representation:o.SURFACE,edgeVisibility:!1,backfaceCulling:!1,frontfaceCulling:!1,pointSize:1,lineWidth:1,lighting:!0,shading:!1,materialName:null};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),r.m.obj(e,t),r.m.setGet(e,t,["lighting","interpolation","ambient","diffuse","metallic","roughness","normalStrength","emission","baseIOR","specular","specularPower","opacity","edgeVisibility","lineWidth","pointSize","backfaceCulling","frontfaceCulling","representation","diffuseTexture","metallicTexture","roughnessTexture","normalTexture","ambientOcclusionTexture","emissionTexture"]),r.m.setGetArray(e,t,["ambientColor","specularColor","diffuseColor","edgeColor"],3),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkProperty"),extend:c,...i.ZP}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return x}});var r=n(0),i=n(575),o=n(572),a=n(576),s=n(71),l=n(53),u=n(31);const{vtkErrorMacro:c}=r.m;function d(e,t){t.classHierarchy.push("vtkOpenGLCellArrayBufferObject"),e.setType(l.L.ARRAY_BUFFER),e.createVBO=function(n,r,i,o){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(!n.getData()||!n.getData().length)return t.elementCount=0,0;t.blockSize=3,t.vertexOffset=0,t.normalOffset=0,t.tCoordOffset=0,t.tCoordComponents=0,t.colorComponents=0,t.colorOffset=0,t.customData=[];const c=o.points.getData();let d=null,p=null,f=null;const h=o.colors?o.colors.getNumberOfComponents():0,m=o.tcoords?o.tcoords.getNumberOfComponents():0;o.normals&&(t.normalOffset=4*t.blockSize,t.blockSize+=3,d=o.normals.getData()),o.customAttributes&&o.customAttributes.forEach((e=>{e&&(t.customData.push({data:e.getData(),offset:4*t.blockSize,components:e.getNumberOfComponents(),name:e.getName()}),t.blockSize+=e.getNumberOfComponents())})),o.tcoords&&(t.tCoordOffset=4*t.blockSize,t.tCoordComponents=m,t.blockSize+=m,p=o.tcoords.getData()),o.colors?(t.colorComponents=o.colors.getNumberOfComponents(),t.colorOffset=0,f=o.colors.getData(),t.colorBO||(t.colorBO=s.ZP.newInstance()),t.colorBO.setOpenGLRenderWindow(t._openGLRenderWindow)):t.colorBO=null,t.stride=4*t.blockSize;let g,v=0,y=0,_=0,b=0,x=0,w=0;const S={anythingToPoints(e,t,n){for(let r=0;r2)for(let r=0;r2){for(let r=0;re,linesToWireframe:(e,t)=>e>1?2*(e-1):0,polysToWireframe:(e,t)=>e>2?2*e:0,stripsToWireframe:(e,t)=>e>2?4*e-6:0,polysToSurface:(e,t)=>e>2?3*(e-2):0,stripsToSurface:(e,t,n)=>e>2?3*(e-2):0};let T=null,M=null;i===u.hX.POINTS||"verts"===r?(T=S.anythingToPoints,M=C.anythingToPoints):i===u.hX.WIREFRAME||"lines"===r?(T=S[`${r}ToWireframe`],M=C[`${r}ToWireframe`]):(T=S[`${r}ToSurface`],M=C[`${r}ToSurface`]);const D=n.getData(),A=D.length;let P=0;for(let e=0;e0&&(Math.abs(N)/I>1e6||Math.abs(Math.log10(I))>3||0===I&&N>1e6);if(R){const t=new Float64Array(3),n=new Float64Array(3);for(let e=0;e<3;++e){const r=o.points.getRange(e),i=r[1]-r[0];t[e]=.5*(r[1]+r[0]),n[e]=i>0?1/i:1}e.setCoordShiftAndScale(t,n)}else!0===t.coordShiftAndScaleEnabled&&e.setCoordShiftAndScale(null,null);if(a)if(a.points||a.cells){const e=new Int32Array(P+a.points.length);e.set(a.points),a.points=e;const t=new Int32Array(P+a.cells.length);t.set(a.cells),a.cells=t}else a.points=new Int32Array(P),a.cells=new Int32Array(P);let B=o.vertexOffset;g=function(e){if(a&&(a.points[B]=e,a.cells[B]=w+o.cellOffset),++B,v=3*e,t.coordShiftAndScaleEnabled?(L[O++]=(c[v++]-t.coordShift[0])*t.coordScale[0],L[O++]=(c[v++]-t.coordShift[1])*t.coordScale[1],L[O++]=(c[v++]-t.coordShift[2])*t.coordScale[2]):(L[O++]=c[v++],L[O++]=c[v++],L[O++]=c[v++]),null!==d&&(y=o.haveCellNormals?3*(w+o.cellOffset):3*e,L[O++]=d[y++],L[O++]=d[y++],L[O++]=d[y++]),t.customData.forEach((t=>{x=e*t.components;for(let e=0;e{null===e||e.constructor===Float64Array&&3===e.length?null===n||n.constructor===Float64Array&&3===n.length?(null!==t.coordShift&&null!==e&&i.fS(e,t.coordShift)||(t.coordShift=e),null!==t.coordScale&&null!==n&&i.fS(n,t.coordScale)||(t.coordScale=n),t.coordShiftAndScaleEnabled=function(e,t){return null!==e&&null!==t&&!(i.I6(e,[0,0,0])&&i.I6(t,[1,1,1]))}(t.coordShift,t.coordScale),t.coordShiftAndScaleEnabled?t.inverseShiftAndScaleMatrix=function(e,t){const n=new Float64Array(3);i.SO(n,t);const r=new Float64Array(16);return o.fromRotationTranslationScale(r,a.Ue(),e,n),r}(t.coordShift,t.coordScale):t.inverseShiftAndScaleMatrix=null):c("Wrong type for coordScale, expected vec3 or null"):c("Wrong type for coordShift, expected vec3 or null")}}const p={elementCount:0,stride:0,colorBOStride:0,vertexOffset:0,normalOffset:0,tCoordOffset:0,tCoordComponents:0,colorOffset:0,colorComponents:0,tcoordBO:null,customData:[],coordShift:null,coordScale:null,coordShiftAndScaleEnabled:!1,inverseShiftAndScaleMatrix:null};function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),s.ZP.extend(e,t,n),r.m.setGet(e,t,["colorBO","elementCount","stride","colorBOStride","vertexOffset","normalOffset","tCoordOffset","tCoordComponents","colorOffset","colorComponents","customData"]),r.m.get(e,t,["coordShift","coordScale","coordShiftAndScaleEnabled","inverseShiftAndScaleMatrix"]),d(e,t)}var h={newInstance:r.m.newInstance(f),extend:f},m=n(16),g=n(54);const v={Start:0,Points:0,Lines:1,Tris:2,TriStrips:3,TrisEdges:4,TriStripsEdges:5,End:6};function y(e,t){t.classHierarchy.push("vtkOpenGLHelper"),e.setOpenGLRenderWindow=e=>{t.context=e.getContext(),t.program.setContext(t.context),t.VAO.setOpenGLRenderWindow(e),t.CABO.setOpenGLRenderWindow(e)},e.releaseGraphicsResources=e=>{t.VAO.releaseGraphicsResources(),t.CABO.releaseGraphicsResources(),t.CABO.setElementCount(0)},e.drawArrays=(n,r,i,o)=>{if(t.CABO.getElementCount()){const a=e.getOpenGLMode(i),s=e.haveWideLines(n,r),l=t.context,u=l.getParameter(l.DEPTH_WRITEMASK);t.pointPicking&&l.depthMask(!1);a===l.LINES&&s?(e.updateShaders(n,r,o),l.drawArraysInstanced(a,0,t.CABO.getElementCount(),2*Math.ceil(r.getProperty().getLineWidth()))):(l.lineWidth(r.getProperty().getLineWidth()),e.updateShaders(n,r,o),l.drawArrays(a,0,t.CABO.getElementCount()),l.lineWidth(1));const c=(a===l.POINTS?1:0)||(a===l.LINES?2:3);return t.pointPicking&&l.depthMask(u),t.CABO.getElementCount()/c}return 0},e.getOpenGLMode=e=>{if(t.pointPicking)return t.context.POINTS;const n=t.primitiveType;return e===u.hX.POINTS||n===v.Points?t.context.POINTS:e===u.hX.WIREFRAME||n===v.Lines||n===v.TrisEdges||n===v.TriStripsEdges?t.context.LINES:t.context.TRIANGLES},e.haveWideLines=(e,n)=>n.getProperty().getLineWidth()>1&&!(t.CABO.getOpenGLRenderWindow()&&t.CABO.getOpenGLRenderWindow().getHardwareMaximumLineWidth()>=n.getProperty().getLineWidth()),e.getNeedToRebuildShaders=(t,n,r)=>!!(r.getNeedToRebuildShaders(e,t,n)||0===e.getProgram()||e.getShaderSourceTime().getMTime(){if(e.getNeedToRebuildShaders(n,r,i)){const o={Vertex:null,Fragment:null,Geometry:null};i.buildShaders(o,n,r);const a=t.CABO.getOpenGLRenderWindow().getShaderCache().readyShaderProgramArray(o.Vertex,o.Fragment,o.Geometry);a!==e.getProgram()&&(e.setProgram(a),e.getVAO().releaseGraphicsResources()),e.getShaderSourceTime().modified()}else t.CABO.getOpenGLRenderWindow().getShaderCache().readyShaderProgram(e.getProgram());e.getVAO().bind(),i.setMapperShaderParameters(e,n,r),i.setPropertyShaderParameters(e,n,r),i.setCameraShaderParameters(e,n,r),i.setLightingShaderParameters(e,n,r),i.invokeShaderCallbacks(e,n,r)},e.setMapperShaderParameters=(n,r,i)=>{if(e.haveWideLines(n,r)){e.getProgram().setUniform2f("viewportSize",i.usize,i.vsize);const t=parseFloat(r.getProperty().getLineWidth()),n=t/2;e.getProgram().setUniformf("lineWidthStepSize",t/Math.ceil(t)),e.getProgram().setUniformf("halfLineWidth",n)}t.primitiveType===v.Points||r.getProperty().getRepresentation()===u.hX.POINTS?e.getProgram().setUniformf("pointSize",r.getProperty().getPointSize()):t.pointPicking&&e.getProgram().setUniformf("pointSize",e.getPointPickingPrimitiveSize())},e.replaceShaderPositionVC=(n,r,i)=>{let o=n.Vertex;o=m.Z.substitute(o,"//VTK::PositionVC::Dec",["//VTK::PositionVC::Dec","uniform float pointSize;"]).result,o=m.Z.substitute(o,"//VTK::PositionVC::Impl",["//VTK::PositionVC::Impl"," gl_PointSize = pointSize;"],!1).result,e.getOpenGLMode(i.getProperty().getRepresentation())===t.context.LINES&&e.haveWideLines(r,i)&&(o=m.Z.substitute(o,"//VTK::PositionVC::Dec",["//VTK::PositionVC::Dec","uniform vec2 viewportSize;","uniform float lineWidthStepSize;","uniform float halfLineWidth;"]).result,o=m.Z.substitute(o,"//VTK::PositionVC::Impl",["//VTK::PositionVC::Impl"," if (halfLineWidth > 0.0)"," {"," float offset = float(gl_InstanceID / 2) * lineWidthStepSize - halfLineWidth;"," vec4 tmpPos = gl_Position;"," vec3 tmpPos2 = tmpPos.xyz / tmpPos.w;"," tmpPos2.x = tmpPos2.x + 2.0 * mod(float(gl_InstanceID), 2.0) * offset / viewportSize[0];"," tmpPos2.y = tmpPos2.y + 2.0 * mod(float(gl_InstanceID + 1), 2.0) * offset / viewportSize[1];"," gl_Position = vec4(tmpPos2.xyz * tmpPos.w, tmpPos.w);"," }"]).result),n.Vertex=o},e.getPointPickingPrimitiveSize=()=>t.primitiveType===v.Points?2:t.primitiveType===v.Lines?4:6}const _={context:null,program:null,shaderSourceTime:null,VAO:null,attributeUpdateTime:null,CABO:null,primitiveType:0,pointPicking:!1};function b(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_,n),r.m.obj(e,t),t.shaderSourceTime={},r.m.obj(t.shaderSourceTime),t.attributeUpdateTime={},r.m.obj(t.attributeUpdateTime),r.m.setGet(e,t,["program","shaderSourceTime","VAO","attributeUpdateTime","CABO","primitiveType","pointPicking"]),t.program=m.Z.newInstance(),t.VAO=g.ZP.newInstance(),t.CABO=h.newInstance(),y(e,t)}var x={newInstance:r.m.newInstance(b),extend:b,primTypes:v}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return E}});var r=n(0),i=n(2),o=n(4),a=n(73),s=n(115),l=n(26);const{Representation:u}=l.ZP,{PrimitiveTypes:c}=s.ZP;class d{constructor(){this.keys=new Uint32Array(10),this.values=new Uint32Array(10),this.count=0}clear(){this.count=0}has(e){for(let t=0;t2)for(let o=0;o2){for(let o=0;o{const n=e.cells,r=e.primitiveType,i=e.representation,o=e.cellOffset,a=n.getData(),s=a.length,l=function(e){switch(e){case c.Points:return"points";case c.Lines:return"lines";case c.Triangles:case c.TriangleEdges:return"polys";case c.TriangleStripEdges:case c.TriangleStrips:return"strips";default:return""}}(r),p=e.numberOfPoints,g={provokedPointIds:new Uint8Array(p),extraPoints:0,iboSize:0,flatId:0,iboId:0,cellProvokedMap:new d};let v=null;v=i===u.POINTS||r===c.Points?_.anythingToPoints:i===u.WIREFRAME||r===c.Lines?_[`${l}ToWireframe`]:_[`${l}ToSurface`],m=h;let y=o||0;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,x,n),a.ZP.extend(e,t,n),r.m.setGet(e,t,["flatIdToPointId","flatIdToCellId","flatSize","indexCount"]),b(e,t)}var S={newInstance:r.m.newInstance(w),extend:w,...s.ZP},C=n(34);const{BufferUsage:T}=s.ZP,{vtkErrorMacro:M}=r.c,{VtkDataTypes:D}=o.ZP;function A(e,t,n,i,o){const a={},s=e.getFlatSize();if(!s)return a;let l=[0,0,0,0];o.shift&&(o.shift.length?l=o.shift:l.fill(o.shift));let u=[1,1,1,1];o.scale&&(o.scale.length?u=o.scale:u.fill(o.scale));const c=!!Object.prototype.hasOwnProperty.call(o,"packExtra")&&o.packExtra;let d,p=0;const f=n+(c?1:0),h=(0,r.a)(i,s*f);let m=e.getFlatIdToPointId();o.cellData&&(m=e.getFlatIdToCellId()),1===n?d=function(e){h[p++]=u[0]*t[e]+l[0]}:2===n?d=function(e){h[p++]=u[0]*t[e]+l[0],h[p++]=u[1]*t[e+1]+l[1]}:3!==n||c?3===n&&c?d=function(e){h[p++]=u[0]*t[e]+l[0],h[p++]=u[1]*t[e+1]+l[1],h[p++]=u[2]*t[e+2]+l[2],h[p++]=1*u[3]+l[3]}:4===n&&(d=function(e){h[p++]=u[0]*t[e]+l[0],h[p++]=u[1]*t[e+1]+l[1],h[p++]=u[2]*t[e+2]+l[2],h[p++]=u[3]*t[e+3]+l[3]}):d=function(e){h[p++]=u[0]*t[e]+l[0],h[p++]=u[1]*t[e+1]+l[1],h[p++]=u[2]*t[e+2]+l[2]};for(let e=0;et.device.hasCachedObject(e),e.getBuffer=e=>e.hash?t.device.getCachedObject(e.hash,n,e):n(e),e.getBufferForPointArray=(t,n)=>{const r=function(e){let t;switch(e.getDataType()){case D.UNSIGNED_CHAR:t="uint8";break;case D.FLOAT:t="float32";break;case D.UNSIGNED_INT:t="uint32";break;case D.INT:t="sint32";break;case D.DOUBLE:t="float32";break;case D.UNSIGNED_SHORT:t="uint16";break;case D.SHORT:t="sin16";break;default:t="float32"}switch(e.getNumberOfComponents()){case 2:t+="x2";break;case 3:t.includes("32")||M(`unsupported x3 type for ${t}`),t+="x3";break;case 4:t+="x4"}return t}(t),i={hash:`${t.getMTime()}I${n.getMTime()}${r}`,usage:T.PointArray,format:r,dataArray:t,indexBuffer:n};return e.getBuffer(i)},e.getFullScreenQuadBuffer=()=>{if(t.fullScreenQuadBuffer)return t.fullScreenQuadBuffer;t.fullScreenQuadBuffer=a.ZP.newInstance(),t.fullScreenQuadBuffer.setDevice(t.device);const e=new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,1,0]);return t.fullScreenQuadBuffer.createAndWrite(e,GPUBufferUsage.VERTEX),t.fullScreenQuadBuffer.setStrideInBytes(12),t.fullScreenQuadBuffer.setArrayInformation([{offset:0,format:"float32x3"}]),t.fullScreenQuadBuffer}}const L={device:null,fullScreenQuadBuffer:null};function O(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,L,n),(0,r.o)(e,t),(0,r.e)(e,t,["device"]),k(e,t)}var E={newInstance:(0,r.n)(O),extend:O,...s.ZP}},function(e,t,n){"use strict";var r=n(0),i=n(118),o=n(14),a=n(19);const{vtkErrorMacro:s,vtkDebugMacro:l}=r.m,u=()=>(s("LiteHttpDataAccessHelper does not support compression. Need to register HttpDataAccessHelper instead."),Promise.reject(new Error("LiteHttpDataAccessHelper does not support compression. Need to register HttpDataAccessHelper instead.")));let c=0;function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new XMLHttpRequest;return r.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((e=>{let[t,n]=e;return r.setRequestHeader(t,n)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}const p={fetchArray:function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a&&a.compression?u():n.ref&&!n.ref.pending?new Promise(((u,p)=>{const f=d("GET",[t,n.ref.basepath,n.ref.id].join("/"),a);f.onreadystatechange=t=>{1===f.readyState&&(n.ref.pending=!0,1==++c&&e?.invokeBusy&&e.invokeBusy(!0)),4===f.readyState&&(n.ref.pending=!1,200===f.status||0===f.status?(n.buffer=f.response,"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(i.ZP.ENDIANNESS!==n.ref.encode&&i.ZP.ENDIANNESS&&(l(`Swap bytes of ${n.name}`),i.ZP.swapBytes(n.buffer,o.Xe[n.dataType])),n.values=r.m.newTypedArray(n.dataType,n.buffer)),n.values.length!==n.size&&s(`Error in FetchArray: ${n.name}, does not have the proper array size. Got ${n.values.length}, instead of ${n.size}`),delete n.ref,0==--c&&e?.invokeBusy&&e.invokeBusy(!1),e?.modified&&e.modified(),u(n)):p({xhr:f,e:t}))},f.responseType="string"!==n.dataType?"arraybuffer":"text",f.send()})):Promise.resolve(n)},fetchJSON:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?u():new Promise(((r,i)=>{const o=d("GET",t,n);o.onreadystatechange=t=>{1===o.readyState&&1==++c&&e?.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--c&&e?.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(JSON.parse(o.responseText)):i({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchText:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?u():new Promise(((r,i)=>{const o=d("GET",t,n);o.onreadystatechange=t=>{1===o.readyState&&1==++c&&e?.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--c&&e?.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(o.responseText):i({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchBinary:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((n,r)=>{const i=d("GET",e,t);i.onreadystatechange=e=>{4===i.readyState&&(200===i.status||0===i.status?n(i.response):r({xhr:i,e:e}))},i.responseType="arraybuffer",i.send()}))},fetchImage:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((e,r)=>{const i=new Image;n.crossOrigin&&(i.crossOrigin=n.crossOrigin),i.onload=()=>e(i),i.onerror=r,i.src=t}))}};(0,a.e$)("http")||(0,a.Fn)("http",(e=>p))},,function(e,t,n){"use strict";n.d(t,{hX:function(){return i},ZP:function(){return o}});const r={FLAT:0,GOURAUD:1,PHONG:2},i={POINTS:0,WIREFRAME:1,SURFACE:2};var o={Shading:r,Representation:i,Interpolation:r}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(0);var i={CoordinateSystem:{DISPLAY:0,WORLD:1}};const{CoordinateSystem:o}=i;function a(e){return()=>r.m.vtkErrorMacro(`vtkProp::${e} - NOT IMPLEMENTED`)}function s(e,t){t.classHierarchy.push("vtkProp"),e.getMTime=()=>{let e=t.mtime;for(let n=0;ne&&(e=r)}return e},e.processSelectorPixelBuffers=(e,t)=>{},e.getNestedProps=()=>null,e.getActors=()=>[],e.getActors2D=()=>[],e.getVolumes=()=>[],e.pick=a("pick"),e.hasKey=a("hasKey"),e.getNestedVisibility=()=>t.visibility&&(!t._parentProp||t._parentProp.getNestedVisibility()),e.getNestedPickable=()=>t.pickable&&(!t._parentProp||t._parentProp.getNestedPickable()),e.getNestedDragable=()=>t.dragable&&(!t._parentProp||t._parentProp.getNestedDragable()),e.getRedrawMTime=()=>t.mtime,e.setEstimatedRenderTime=e=>{t.estimatedRenderTime=e,t.savedEstimatedRenderTime=e},e.restoreEstimatedRenderTime=()=>{t.estimatedRenderTime=t.savedEstimatedRenderTime},e.addEstimatedRenderTime=e=>{t.estimatedRenderTime+=e},e.setAllocatedRenderTime=e=>{t.allocatedRenderTime=e,t.savedEstimatedRenderTime=t.estimatedRenderTime,t.estimatedRenderTime=0},e.getSupportsSelection=()=>!1,e.getTextures=()=>t.textures,e.hasTexture=e=>-1!==t.textures.indexOf(e),e.addTexture=n=>{n&&!e.hasTexture(n)&&(t.textures=t.textures.concat(n),e.modified())},e.removeTexture=n=>{const r=t.textures.filter((e=>e!==n));t.textures.length!==r.length&&(t.textures=r,e.modified())},e.removeAllTextures=()=>{t.textures=[],e.modified()},e.setCoordinateSystemToWorld=()=>e.setCoordinateSystem(o.WORLD),e.setCoordinateSystemToDisplay=()=>e.setCoordinateSystem(o.DISPLAY)}const l={allocatedRenderTime:10,coordinateSystem:o.WORLD,dragable:!0,estimatedRenderTime:0,paths:null,pickable:!0,renderTimeMultiplier:1,savedEstimatedRenderTime:0,textures:[],useBounds:!0,visibility:!0};function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l,n),r.m.obj(e,t),r.m.get(e,t,["estimatedRenderTime","allocatedRenderTime"]),r.m.setGet(e,t,["_parentProp","coordinateSystem","dragable","pickable","renderTimeMultiplier","useBounds","visibility"]),r.m.moveToProtected(e,t,["parentProp"]),s(e,t)}var c={newInstance:r.m.newInstance(u,"vtkProp"),extend:u,...i}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return s}});var r=n(0);function i(e,t){t.classHierarchy.push("vtkTexture"),e.imageLoaded=()=>{t.image.removeEventListener("load",e.imageLoaded),t.imageLoaded=!0,e.modified()},e.setJsImageData=n=>{t.jsImageData!==n&&(null!==n&&(e.setInputData(null),e.setInputConnection(null),t.image=null,t.canvas=null),t.jsImageData=n,t.imageLoaded=!0,e.modified())},e.setCanvas=n=>{t.canvas!==n&&(null!==n&&(e.setInputData(null),e.setInputConnection(null),t.image=null,t.jsImageData=null),t.canvas=n,e.modified())},e.setImage=n=>{t.image!==n&&(null!==n&&(e.setInputData(null),e.setInputConnection(null),t.canvas=null,t.jsImageData=null),t.image=n,t.imageLoaded=!1,n.complete?e.imageLoaded():n.addEventListener("load",e.imageLoaded),e.modified())},e.getDimensionality=()=>{let n=0,r=0,i=1;if(e.getInputData()){const t=e.getInputData();n=t.getDimensions()[0],r=t.getDimensions()[1],i=t.getDimensions()[2]}t.jsImageData&&(n=t.jsImageData.width,r=t.jsImageData.height),t.canvas&&(n=t.canvas.width,r=t.canvas.height),t.image&&(n=t.image.width,r=t.image.height);return(n>1)+(r>1)+(i>1)},e.getInputAsJsImageData=()=>{if(!t.imageLoaded||e.getInputData())return null;if(t.jsImageData)return t.jsImageData();if(t.canvas){return t.canvas.getContext("2d").getImageData(0,0,t.canvas.width,t.canvas.height)}if(t.image){const e=document.createElement("canvas");e.width=t.image.width,e.height=t.image.height;const n=e.getContext("2d");n.translate(0,e.height),n.scale(1,-1),n.drawImage(t.image,0,0,t.image.width,t.image.height);return n.getImageData(0,0,e.width,e.height)}return null}}const o={image:null,canvas:null,jsImageData:null,imageLoaded:!1,repeat:!1,interpolate:!1,edgeClamp:!1,mipLevel:0,resizable:!1};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.obj(e,t),r.m.algo(e,t,6,0),r.m.get(e,t,["canvas","image","jsImageData","imageLoaded","resizable"]),r.m.setGet(e,t,["repeat","edgeClamp","interpolate","mipLevel"]),i(e,t)}var s={newInstance:r.m.newInstance(a,"vtkTexture"),extend:a,...{generateMipmaps:(e,t,n,r)=>{const i=[1,2,1],o=e.length/(t*n);let a=t,s=n,l=e;const u=[l];for(let e=0;eo&&(c+=t),d<-o&&(c-=t),r[c]?u+=r[c]*i[l]:s-=i[l],a+=1}l[e+n]=u/s}r=[...l];for(let e=0;e`:3===n?`vec3<${t}>`:2===n?`vec2<${t}>`:t},getByteStrideFromShaderFormat:function(e){if(!e)return 0;let t=1;return"vec"===e.substring(0,3)?t=Number(e[3]):"mat"===e.substring(0,3)&&(t=e[3]*e[5]),4*t},getNativeTypeFromShaderFormat:function(e){if(e)return e.includes("f32")?"Float32Array":e.includes("i32")?"Int32Array":e.includes("u32")?"Uint32Array":void(0,r.r)(`unknown format ${e}`)}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(0),i=n(13),o=n(324),a=n(383);function s(e,t){function n(n){if(t.displayCallback){const r=[],i=e.getRepresentationStates();for(let e=0;et._pipeline.glyph.getPhiResolution(),e.setGlyphResolution=e=>t._pipeline.glyph.setPhiResolution(e)||t._pipeline.glyph.setThetaResolution(e),e.setDisplayCallback=e=>{t.displayCallback=e,t.displayMapper.setCallback(e?n:null)}}function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o.ZP.extend(e,t,n),s(e,t)}var u={newInstance:r.m.newInstance(l,"vtkSphereHandleRepresentation"),extend:l}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return T}});var r=n(0),i=n(23),o=n(4);const{vtkErrorMacro:a,vtkWarningMacro:s}=r.m;function l(e,t){t.classHierarchy.push("vtkFieldData");const n=e.getState;t.arrays&&(t.arrays=t.arrays.map((e=>({data:(0,i.Z)(e.data)})))),e.initialize=()=>{e.initializeFields(),e.copyAllOn(),e.clearFieldFlags()},e.initializeFields=()=>{t.arrays=[],t.copyFieldFlags={},e.modified()},e.copyStructure=n=>{e.initializeFields(),t.copyFieldFlags=n.getCopyFieldFlags().map((e=>e)),t.arrays=n.arrays().map((e=>({array:e})))},e.getNumberOfArrays=()=>t.arrays.length,e.getNumberOfActiveArrays=()=>t.arrays.length,e.addArray=n=>{const r=n.getName(),{array:i,index:o}=e.getArrayWithIndex(r);return null!=i?(t.arrays[o]={data:n},o):(t.arrays=[].concat(t.arrays,{data:n}),t.arrays.length-1)},e.removeAllArrays=()=>{t.arrays=[]},e.removeArray=n=>{const r=t.arrays.findIndex((e=>e.data.getName()===n));return e.removeArrayByIndex(r)},e.removeArrayByIndex=e=>-1!==e&&et.arrays.map((e=>e.data)),e.getArray=t=>"number"==typeof t?e.getArrayByIndex(t):e.getArrayByName(t),e.getArrayByName=e=>t.arrays.reduce(((t,n,r)=>n.data.getName()===e?n.data:t),null),e.getArrayWithIndex=e=>{const n=t.arrays.findIndex((t=>t.data.getName()===e));return{array:-1!==n?t.arrays[n].data:null,index:n}},e.getArrayByIndex=e=>e>=0&&ee.getArrayWithIndex(t).index>=0,e.getArrayName=e=>{const n=t.arrays[e];return n?n.data.getName():""},e.getCopyFieldFlags=()=>t.copyFieldFlags,e.getFlag=e=>t.copyFieldFlags[e],e.passData=function(n){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;n.getArrays().forEach((l=>{const u=e.getFlag(l.getName());if(!1!==u&&(!t.doCopyAllOff||!0===u)&&l){let t=e.getArrayByName(l.getName());if(t)if(l.getNumberOfComponents()===t.getNumberOfComponents())if(i>-1&&i-1?s:i;t.insertTuple(e,l.getTuple(i))}else t.insertTuples(0,l.getTuples());else a("Unhandled case in passData");else if(i<0||i>l.getNumberOfTuples())e.addArray(l),n.getAttributes(l).forEach((t=>{e.setAttribute(l,t)}));else{const a=l.getNumberOfComponents();let u=l.getNumberOfValues();const c=s>-1?s:i;u<=c*a&&(u=(c+1)*a),t=o.ZP.newInstance({name:l.getName(),dataType:l.getDataType(),numberOfComponents:a,values:r.m.newTypedArray(l.getDataType(),u),size:0}),t.insertTuple(c,l.getTuple(i)),e.addArray(t),n.getAttributes(l).forEach((n=>{e.setAttribute(t,n)}))}}}))},e.interpolateData=function(n){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5;n.getArrays().forEach((d=>{const p=e.getFlag(d.getName());if(!1!==p&&(!t.doCopyAllOff||!0===p)&&d){let t=e.getArrayByName(d.getName());if(t)if(d.getNumberOfComponents()===t.getNumberOfComponents())if(i>-1&&i-1?u:i;t.interpolateTuple(e,d,i,d,l,c),s("Unexpected case in interpolateData")}else t.insertTuples(d.getTuples());else a("Unhandled case in interpolateData");else if(i<0||l<0||i>d.getNumberOfTuples())e.addArray(d),n.getAttributes(d).forEach((t=>{e.setAttribute(d,t)}));else{const a=d.getNumberOfComponents();let s=d.getNumberOfValues();const p=u>-1?u:i;s<=p*a&&(s=(p+1)*a),t=o.ZP.newInstance({name:d.getName(),dataType:d.getDataType(),numberOfComponents:a,values:r.m.newTypedArray(d.getDataType(),s),size:0}),t.interpolateTuple(p,d,i,d,l,c),e.addArray(t),n.getAttributes(d).forEach((n=>{e.setAttribute(t,n)}))}}}))},e.copyFieldOn=e=>{t.copyFieldFlags[e]=!0},e.copyFieldOff=e=>{t.copyFieldFlags[e]=!1},e.copyAllOn=()=>{t.doCopyAllOn&&!t.doCopyAllOff||(t.doCopyAllOn=!0,t.doCopyAllOff=!1,e.modified())},e.copyAllOff=()=>{!t.doCopyAllOn&&t.doCopyAllOff||(t.doCopyAllOn=!1,t.doCopyAllOff=!0,e.modified())},e.clearFieldFlags=()=>{t.copyFieldFlags={}},e.deepCopy=e=>{t.arrays=e.getArrays().map((e=>{const t=e.newClone();return t.deepCopy(e),{data:t}}))},e.copyFlags=e=>e.getCopyFieldFlags().map((e=>e)),e.reset=()=>t.arrays.forEach((e=>e.data.reset())),e.getMTime=()=>t.arrays.reduce(((e,t)=>t.data.getMTime()>e?t.data.getMTime():e),t.mtime),e.getNumberOfComponents=()=>t.arrays.reduce(((e,t)=>e+t.data.getNumberOfComponents()),0),e.getNumberOfTuples=()=>t.arrays.length>0?t.arrays[0].getNumberOfTuples():0,e.getState=()=>{const e=n();return e&&(e.arrays=t.arrays.map((e=>({data:e.data.getState()})))),e}}const u={arrays:[],copyFieldFlags:[],doCopyAllOn:!0,doCopyAllOff:!1};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),r.m.obj(e,t),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkFieldData"),extend:c},p=n(145);const{AttributeTypes:f,AttributeCopyOperations:h}=p.ZP,{vtkWarningMacro:m}=r.m;function g(e,t){const n=["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"];function i(e){let t=n.find((t=>f[t.toUpperCase()]===e||"number"!=typeof e&&t.toLowerCase()===e.toLowerCase()));return void 0===t&&(t=null),t}t.classHierarchy.push("vtkDataSetAttributes");const a={...e};e.checkNumberOfComponents=e=>!0,e.setAttribute=(n,r)=>{const o=i(r);if(n&&"PEDIGREEIDS"===o.toUpperCase()&&!n.isA("vtkDataArray"))return m(`Cannot set attribute ${o}. The attribute must be a vtkDataArray.`),-1;if(n&&!e.checkNumberOfComponents(n,o))return m(`Cannot set attribute ${o}. Incorrect number of components.`),-1;let a=t[`active${o}`];if(a>=0&&an.filter((n=>e[`get${n}`]()===t)),e.setActiveAttributeByName=(t,n)=>e.setActiveAttributeByIndex(e.getArrayWithIndex(t).index,n),e.setActiveAttributeByIndex=(n,r)=>{const o=i(r);if(n>=0&&n{const n=i(t);return e[`get${n}`]()},e.removeAllArrays=()=>{n.forEach((e=>{t[`active${e}`]=-1})),a.removeAllArrays()},e.removeArrayByIndex=e=>(-1!==e&&n.forEach((n=>{e===t[`active${n}`]?t[`active${n}`]=-1:e{const r=`active${n}`;e[`get${n}`]=()=>e.getArrayByIndex(t[r]),e[`set${n}`]=t=>e.setAttribute(t,n),e[`setActive${n}`]=t=>e.setActiveAttributeByIndex(e.getArrayWithIndex(t).index,n),e[`copy${n}Off`]=()=>{const e=n.toUpperCase();t.copyAttributeFlags[h.PASSDATA][f[e]]=!1},e[`copy${n}On`]=()=>{const e=n.toUpperCase();t.copyAttributeFlags[h.PASSDATA][f[e]]=!0}})),e.initializeAttributeCopyFlags=()=>{t.copyAttributeFlags=[],Object.keys(h).filter((e=>"ALLCOPY"!==e)).forEach((e=>{t.copyAttributeFlags[h[e]]=Object.keys(f).filter((e=>"NUM_ATTRIBUTES"!==e)).reduce(((e,t)=>(e[f[t]]=!0,e)),[])})),t.copyAttributeFlags[h.COPYTUPLE][f.GLOBALIDS]=!1,t.copyAttributeFlags[h.INTERPOLATE][f.GLOBALIDS]=!1,t.copyAttributeFlags[h.COPYTUPLE][f.PEDIGREEIDS]=!1},e.initialize=r.m.chain(e.initialize,e.initializeAttributeCopyFlags),t.dataArrays&&Object.keys(t.dataArrays).length&&Object.keys(t.dataArrays).forEach((n=>{t.dataArrays[n].ref||"vtkDataArray"!==t.dataArrays[n].type||e.addArray(o.ZP.newInstance(t.dataArrays[n]))}));const s=e.shallowCopy;e.shallowCopy=(e,n)=>{s(e,n),t.arrays=e.getArrays().map((e=>{const t=e.newClone();return t.shallowCopy(e,n),{data:t}}))},e.initializeAttributeCopyFlags()}const v={activeScalars:-1,activeVectors:-1,activeTensors:-1,activeNormals:-1,activeTCoords:-1,activeGlobalIds:-1,activePedigreeIds:-1};function y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,v,n),d.extend(e,t,n),r.m.setGet(e,t,["activeScalars","activeNormals","activeTCoords","activeVectors","activeTensors","activeGlobalIds","activePedigreeIds"]),t.arrays||(t.arrays={}),g(e,t)}var _={newInstance:r.m.newInstance(y,"vtkDataSetAttributes"),extend:y,...p.ZP},b=n(106);const x=["pointData","cellData","fieldData"];function w(e,t){t.classHierarchy.push("vtkDataSet"),x.forEach((e=>{t[e]?t[e]=(0,i.Z)(t[e]):t[e]=_.newInstance()}));const n=e.shallowCopy;e.shallowCopy=function(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n(e,r),x.forEach((n=>{t[n]=_.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))}}const S={};function C(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,S,n),r.m.obj(e,t),r.m.setGet(e,t,x),w(e,t)}var T={newInstance:r.m.newInstance(C,"vtkDataSet"),extend:C,...b.ZP}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return d}});var r=n(0),i=n(4),o=n(14);const{vtkErrorMacro:a}=r.m,s=[1,-1,1,-1,1,-1];function l(e,t){t.classHierarchy.push("vtkPoints"),e.getNumberOfPoints=e.getNumberOfTuples,e.setNumberOfPoints=function(n){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;e.getNumberOfPoints()!==n&&(t.size=n*i,t.values=r.m.newTypedArray(t.dataType,t.size),e.setNumberOfComponents(i),e.modified())},e.setPoint=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;ie.insertNextTuple([t,n,r]),e.getBounds=()=>{if(3===e.getNumberOfComponents()){const n=e.getRange(0);t.bounds[0]=n[0],t.bounds[1]=n[1];const r=e.getRange(1);t.bounds[2]=r[0],t.bounds[3]=r[1];const i=e.getRange(2);return t.bounds[4]=i[0],t.bounds[5]=i[1],t.bounds}if(2!==e.getNumberOfComponents())return a(`getBounds called on an array with components of\n ${e.getNumberOfComponents()}`),s;const n=e.getRange(0);t.bounds[0]=n[0],t.bounds[1]=n[1];const r=e.getRange(1);return t.bounds[2]=r[0],t.bounds[3]=r[1],t.bounds[4]=0,t.bounds[5]=0,t.bounds},e.computeBounds=e.getBounds,e.setNumberOfComponents(t.numberOfComponents<2?3:t.numberOfComponents)}const u={empty:!0,numberOfComponents:3,dataType:o.Tu.FLOAT,bounds:[1,-1,1,-1,1,-1]};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),i.ZP.extend(e,t,n),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkPoints"),extend:c}},,,function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(0),i=n(32),o=n(11),a=n(69),s=n(10);function l(e,t){function n(){if(t.input)for(let e=0;e{if(t.sourceSubscription&&(t.sourceSubscription.unsubscribe(),t.sourceSubscription=null),e.gcPropertyLinks("source"),t.input=r,e.updateColorByDomain(),t.input&&(n(),t.sourceSubscription=t.input.onDatasetChange(n)),t.links)for(let n=0;nt.input?t.input.getDataset():null,e.getDataArray=(t,n)=>{const[r,i]=e.getColorBy(),o=e.getInputDataSet(),a=o?o.getReferenceByName(n||i):null;return a?a.getArrayByName(t||r):null},e.getLookupTableProxy=n=>{const r=n||e.getColorBy()[0];return r?t.proxyManager.getLookupTable(r):null},e.setLookupTableProxy=()=>{},e.getPiecewiseFunctionProxy=n=>{const r=n||e.getColorBy()[0];return r?t.proxyManager.getPiecewiseFunction(r):null},e.setPiecewiseFunctionProxy=()=>{},e.rescaleTransferFunctionToDataRange=function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;const o=e.getDataArray(n,r),a=o.getRange(i);t.proxyManager.rescaleTransferFunctionToDataRange(n,a)},e.isVisible=()=>t.actors.length?t.actors[0].getVisibility():!!t.volumes.length&&t.volumes[0].getVisibility(),e.setVisibility=n=>{let r=0,i=t.actors.length;for(;i--;)r+=t.actors[i].setVisibility(n);for(i=t.volumes.length;i--;)r+=t.volumes[i].setVisibility(n);r&&e.modified()},e.setColorBy=function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,a=o.ZP.ColorMode.DEFAULT,s=o.ZP.ScalarMode.DEFAULT;const l=n,u=e.getDataArray(n,r),c=!!u,d=n?e.getLookupTableProxy(n).getLookupTable():null;d&&(-1===i?d.setVectorModeToMagnitude():(d.setVectorModeToComponent(),d.setVectorComponent(i))),c&&(a=o.ZP.ColorMode.MAP_SCALARS,s="pointData"===r?o.ZP.ScalarMode.USE_POINT_FIELD_DATA:o.ZP.ScalarMode.USE_CELL_FIELD_DATA,t.mapper.setLookupTable&&t.mapper.setLookupTable(d),t.rescaleOnColorBy&&e.rescaleTransferFunctionToDataRange(n,r,i)),t.mapper.set({colorByArrayName:l,colorMode:a,scalarMode:s,scalarVisibility:c},!0)},e.getColorBy=()=>{if(!t.mapper.getColorByArrayName){const t=e.getInputDataSet();return t.getPointData().getScalars()?[t.getPointData().getScalars().getName(),"pointData",-1]:t.getCellData().getScalars()?[t.getCellData().getScalars().getName(),"cellData",-1]:t.getPointData().getNumberOfArrays()?[t.getPointData().getArrayByIndex(0).getName(),"pointData",-1]:t.getCellData().getNumberOfArrays()?[t.getCellData().getArrayByIndex(0).getName(),"cellData",-1]:[]}const n=[],{colorByArrayName:r,colorMode:i,scalarMode:s,scalarVisibility:l}=t.mapper.get("colorByArrayName","colorMode","scalarMode","scalarVisibility");if(l&&r&&(n.push(r),n.push(s===o.ZP.ScalarMode.USE_POINT_FIELD_DATA?"pointData":"cellData")),i===o.ZP.ColorMode.MAP_SCALARS&&r){const t=e.getLookupTableProxy(r).getLookupTable(),i=t.getVectorMode()===a.ZP.VectorMode.MAGNITUDE?-1:t.getVectorComponent();n.push(i)}return n},e.listDataArrays=()=>{const n=[];if(!t.input)return n;const r=e.getInputDataSet(),i=r.getPointData();let o=i.getNumberOfArrays();for(let e=0;e{e.updateProxyProperty("colorBy",{domain:{arrays:e.listDataArrays(),solidColor:!t.disableSolidColor}})},e.delete=(0,r.h)((()=>{t.sourceSubscription&&(t.sourceSubscription.unsubscribe(),t.sourceSubscription=null)}),e.delete);const i=[],l=[...s.ZP.INIT_BOUNDS];function u(e){e&&(s.ZP.addBounds(l,e.getBounds()),i.push(e))}e.getNestedProps=()=>i,e.getBounds=()=>(t.boundMTime2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),i.ZP.extend(e,t,n),(0,r.e)(e,t,["rescaleOnColorBy"]),(0,r.g)(e,t,["input","mapper","actors","volumes"]),l(e,t),(0,r.p)(e,t)}}},function(e,t,n){"use strict";n.d(t,{Z:function(){return J}});var r=n(0);const i="default";function o(e,t){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}function a(e,t){t.classHierarchy.push("vtkWidgetState");const n=[];t.labels={},t.nestedStates=[],e.bindState=function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[i];if(t.nestedStates.push(r),n.push(r.onModified(e.modified)),Array.isArray(o)&&o.length)for(let e=0;e{for(;n.length;)n.pop().unsubscribe();o(t.nestedStates,r);for(let r=0;r{o(t.labels[e],r)}))},e.unbindAll=()=>{for(;n.length;)n.pop().unsubscribe();t.nestedStates=[]},e.activate=()=>e.setActive(!0),e.deactivate=n=>{n!==e&&e.setActive(!1);for(let e=0;e{t&&t.setActive(!0),e.deactivate(t)},e.getStatesWithLabel=e=>t.labels[e],e.getAllNestedStates=()=>t.nestedStates,e.delete=r.m.chain(e.unbindAll,e.delete)}const s={active:!1};var l={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),r.m.obj(e,t),r.m.setGet(e,t,["active"]),a(e,t)}},u=n(10);function c(e,t){const n=[],r=[...u.ZP.INIT_BOUNDS];e.containsPoint=(e,t,n)=>Array.isArray(e)?u.ZP.containsPoint(r,e[0],e[1],e[2]):u.ZP.containsPoint(r,e,t,n),e.placeWidget=i=>{t.bounds=[];const o=[(i[0]+i[1])/2,(i[2]+i[3])/2,(i[4]+i[5])/2];for(let e=0;e<6;e++){const r=o[Math.floor(e/2)];n[e]=i[e],t.bounds[e]=(i[e]-r)*t.placeFactor+r}u.ZP.setBounds(r,t.bounds),e.invokeBoundsChange(t.bounds),e.modified()},e.setPlaceFactor=i=>{if(t.placeFactor!==i){t.placeFactor=i,t.bounds=[];const o=[(n[0]+n[1])/2,(n[2]+n[3])/2,(n[4]+n[5])/2];for(let e=0;e<6;e++){const r=o[Math.floor(e/2)];t.bounds[e]=(n[e]-r)*t.placeFactor+r}u.ZP.setBounds(r,t.bounds),e.invokeBoundsChange(t.bounds),e.modified()}}}const d={bounds:[-1,1,-1,1,-1,1],placeFactor:1};var p={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),r.m.setGetArray(e,t,["bounds"],6),r.m.get(e,t,["placeFactor"]),r.m.event(e,t,"BoundsChange"),t.bounds=t.bounds.slice(),c(e,t)}};const f={color:.5};var h={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,f,n),r.m.setGet(e,t,["color"])}};const m={color3:[255,255,255],opacity:255};var g={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,m,n),r.m.setGetArray(e,t,["color3"],3,255),r.m.setGet(e,t,["opacity"])}};function v(e,t){e.translate=(t,n,r)=>{const[i,o,a]=e.getCornerByReference();e.setCorner(i+t,o+n,a+r)}}const y={corner:[0,0,0]};var _={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,y,n),r.m.setGetArray(e,t,["corner"],3),v(e)}},b=n(25);function x(e,t){const n="degree"===t.angleUnit?b.Z.buildFromDegree():b.Z.buildFromRadian();e.rotateFromDirections=(r,i)=>{n.identity().rotateFromDirections(r,i).apply(t.direction),e.modified()},e.rotate=(e,r)=>{n.identity().rotate(e,r).apply(t.direction)},e.rotateX=e=>{n.identity().rotateX(e).apply(t.direction)},e.rotateY=e=>{n.identity().rotateY(e).apply(t.direction)},e.rotateZ=e=>{n.identity().rotateZ(e).apply(t.direction)}}const w={direction:[1,0,0]};var S={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,w,n),r.m.setGetArray(e,t,["direction"],3),x(e,t)}};function C(e,t){e.updateManipulator=()=>{if(t.manipulator){const{origin:e,normal:n,direction:r}=t,{setHandleOrigin:i,setHandleCenter:o,setHandleNormal:a,setHandleDirection:s}=t.manipulator;e&&i?i(e):e&&o&&o(e),r&&s?s(r):r&&!n&&a?a(r):n&&s&&s(n)}}}const T={manipulator:null};var M={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,T,n),r.m.setGet(e,t,["manipulator"]),C(e,t)}};const D={name:""};var A={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,D,n),r.m.setGet(e,t,["name"])}},P=n(2);function k(e,t){return 3===e.length&&3===t.length&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function L(e,t){const n={o:[],p1:[],p2:[]};e.normalize=()=>{(0,P.l)(t.up),(0,P.l)(t.right),(0,P.l)(t.direction),e.modified()},e.updateFromOriginRightUp=(r,i,o)=>{(function(e,t,n,r){return k(e,r.o)&&k(t,r.p1)&&k(n,r.p2)})(r,i,o,n)||(n.o=r.slice(),n.p1=i.slice(),n.p2=o.slice(),t.up=[o[0]-r[0],o[1]-r[1],o[2]-r[2]],t.right=[i[0]-r[0],i[1]-r[1],i[2]-r[2]],(0,P.j)(t.up,t.right,t.direction),(0,P.j)(t.direction,t.up,t.right),e.normalize(),e.modified())}}const O={up:[0,1,0],right:[1,0,0],direction:[0,0,1]};var E={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,O,n),r.m.setGetArray(e,t,["up","right","direction"],3),L(e,t)}},I=n(62);function N(e,t){const n={...e};e.translate=(t,n,r)=>{const[i,o,a]=e.getOriginByReference();e.setOrigin(i+t,o+n,a+r)},e.getOrigin=e=>{const r=n.getOrigin();if(!t.offset)return r;if(!e)return P.f.add(r,t.offset,r);const i=(0,I.j3)(r,e),{rendererPixelDims:o}=e,a=Math.min(o[0],o[1]);return P.f.multiplyAccumulate(r,t.offset,a*i,r)}}const R={origin:null,offset:null};var B={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,R,n),r.m.setGetArray(e,t,["origin","offset"],3),N(e,t)}};const F={scale1:.5};var V={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,F,n),r.m.setGet(e,t,["scale1"])}};const U={scale3:[1,1,1]};var G={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,U,n),r.m.setGetArray(e,t,["scale3"],3)}};const z={text:"DefaultText"};var j={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,z,n),r.m.setGet(e,t,["text"])}};const Y={visible:!0};var H={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Y,n),r.m.setGet(e,t,["visible"]),e.isVisible=e.getVisible}};const W={shape:""};var $={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,W,n),r.m.setGet(e,t,["shape"])}};const{vtkErrorMacro:Z}=r.m,K={bounds:p,color:h,color3:g,corner:_,direction:S,manipulator:M,name:A,orientation:E,origin:B,scale1:V,scale3:G,text:j,visible:H,shape:$};function q(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];o||l.extend(n,i,t);for(let r=0;r{const r=q(n,{...o,...e});return this.publicAPI.bindState(r,t),this.model[a].push(r),this.publicAPI.modified(),r},this.publicAPI[`remove${r.m.capitalize(i)}`]=e=>{let t=this.model[a].indexOf(e);-1===t&&ethis.model[a].slice(),this.publicAPI[`clear${r.m.capitalize(i)}List`]=()=>{for(;this.model[a].length;){const e=this.model[a].pop();e&&this.publicAPI.unbindState(e)}this.publicAPI.modified()},this}addStateFromMixin(e){let{labels:t,mixins:n,name:i,initialValues:o}=e;const a=q(n,o);return this.model[i]=a,this.publicAPI.bindState(a,t),r.m.setGet(this.publicAPI,this.model,[i]),this}addStateFromInstance(e){let{labels:t,name:n,instance:i}=e;return this.model[n]=i,this.publicAPI.bindState(i,t),r.m.setGet(this.publicAPI,this.model,[n]),this}addField(e){let{name:t,initialValue:n}=e;return Array.isArray(n)?r.m.setGetArray(this.publicAPI,this.model,[t],n.length):r.m.setGet(this.publicAPI,this.model,[t]),this.model[t]=n,this}build(){for(var e=arguments.length,t=new Array(e),n=0;n=0&&a.t<=1),a}function f(e,t,n,i){const l={intersection:!1,l0:[],l1:[],error:null},u=[];(0,r.j)(t,i,u);const c=u.map((e=>Math.abs(e)));if(c[0]+c[1]+c[2]c[1]&&c[0]>c[2]?"x":c[1]>c[2]?"y":"z";const p=[],f=-(0,r.d)(t,e),h=-(0,r.d)(i,n);switch(d){case"x":p[0]=0,p[1]=(h*t[2]-f*i[2])/u[0],p[2]=(f*i[1]-h*t[1])/u[0];break;case"y":p[0]=(f*i[2]-h*t[2])/u[1],p[1]=0,p[2]=(h*t[0]-f*i[0])/u[1];break;case"z":p[0]=(h*t[1]-f*i[1])/u[2],p[1]=(f*i[0]-h*t[0])/u[2],p[2]=0}return l.l0=p,(0,r.k)(p,u,l.l1),l.intersection=!0,l}const h={evaluate:function(e,t,n){return e[0]*(n[0]-t[0])+e[1]*(n[1]-t[1])+e[2]*(n[2]-t[2])},distanceToPlane:l,projectPoint:u,projectVector:c,generalizedProjectPoint:d,intersectWithLine:p,intersectWithPlane:f,DISJOINT:s,COINCIDE:a};function m(e,t){t.classHierarchy.push("vtkPlane"),e.distanceToPlane=e=>l(e,t.origin,t.normal),e.projectPoint=(e,n)=>{u(e,t.origin,t.normal,n)},e.projectVector=(e,n)=>c(e,t.normal,n),e.push=e=>{if(0!==e)for(let n=0;n<3;n++)t.origin[n]+=e*t.normal[n]},e.generalizedProjectPoint=(e,n)=>{d(e,t.origin,t.normal,n)},e.evaluateFunction=(e,n,r)=>Array.isArray(e)?t.normal[0]*(e[0]-t.origin[0])+t.normal[1]*(e[1]-t.origin[1])+t.normal[2]*(e[2]-t.origin[2]):t.normal[0]*(e-t.origin[0])+t.normal[1]*(n-t.origin[1])+t.normal[2]*(r-t.origin[2]),e.evaluateGradient=e=>[t.normal[0],t.normal[1],t.normal[2]],e.intersectWithLine=(e,n)=>p(e,n,t.origin,t.normal),e.intersectWithPlane=(e,n)=>f(e,n,t.origin,t.normal)}const g={normal:[0,0,1],origin:[0,0,0]};function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,g,n),i.m.obj(e,t),i.m.setGetArray(e,t,["normal","origin"],3),m(e,t)}var y={newInstance:i.m.newInstance(v,"vtkPlane"),extend:v,...h}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return p}});var r=n(0),i=n(4),o=n(14);function a(e){let t=0;return e.filter(((e,n)=>n===t&&(t+=e+1,!0)))}function s(e){let t=0;for(let n=0;nvoid 0===t.numberOfCells||n?(t.cellSizes?t.numberOfCells=t.cellSizes.length:t.numberOfCells=s(e.getData()),t.numberOfCells):t.numberOfCells,e.getCellSizes=n=>void 0===t.cellSizes||n?(t.cellSizes=a(e.getData()),t.cellSizes):t.cellSizes,e.resize=r=>{const i=e.getNumberOfTuples();n.resize(r);const o=e.getNumberOfTuples();o{n.setData(e,1),t.numberOfCells=void 0,t.cellSizes=void 0},e.getCell=e=>{let n=e;const r=t.values[n++];return t.values.subarray(n,n+r)},e.insertNextCell=n=>{const r=e.getNumberOfCells();return e.insertNextTuples([n.length,...n]),++t.numberOfCells,null!=t.cellSizes&&t.cellSizes.push(n.length),r}}function c(e){return{empty:!0,numberOfComponents:1,dataType:o.Tu.UNSIGNED_INT,...e}}function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.ZP.extend(e,t,c(n)),u(e,t)}var p={newInstance:r.m.newInstance(d,"vtkCellArray"),extend:d,...l}},function(e,t,n){"use strict";n.d(t,{wn:function(){return i},Eq:function(){return r},ZP:function(){return o}});const r={CLAMP_TO_EDGE:0,REPEAT:1,MIRRORED_REPEAT:2},i={NEAREST:0,LINEAR:1,NEAREST_MIPMAP_NEAREST:2,NEAREST_MIPMAP_LINEAR:3,LINEAR_MIPMAP_NEAREST:4,LINEAR_MIPMAP_LINEAR:5};var o={Wrap:r,Filter:i}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(0),i=n(24),o=n(14),a=n(45);function s(e,t){t.classHierarchy.push("vtkFramebuffer"),e.getBothMode=()=>t.context.FRAMEBUFFER,e.saveCurrentBindingsAndBuffers=t=>{const n=void 0!==t?t:e.getBothMode();e.saveCurrentBindings(n),e.saveCurrentBuffers(n)},e.saveCurrentBindings=e=>{if(!t.context)return void(0,r.r)("you must set the OpenGLRenderWindow before calling saveCurrentBindings");const n=t.context;t.previousDrawBinding=n.getParameter(t.context.FRAMEBUFFER_BINDING),t.previousActiveFramebuffer=t._openGLRenderWindow.getActiveFramebuffer()},e.saveCurrentBuffers=e=>{},e.restorePreviousBindingsAndBuffers=t=>{const n=void 0!==t?t:e.getBothMode();e.restorePreviousBindings(n),e.restorePreviousBuffers(n)},e.restorePreviousBindings=e=>{if(!t.context)return void(0,r.r)("you must set the OpenGLRenderWindow before calling restorePreviousBindings");const n=t.context;n.bindFramebuffer(n.FRAMEBUFFER,t.previousDrawBinding),t._openGLRenderWindow.setActiveFramebuffer(t.previousActiveFramebuffer)},e.restorePreviousBuffers=e=>{},e.bind=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=n;null===r&&(r=t.context.FRAMEBUFFER),t.context.bindFramebuffer(r,t.glFramebuffer);for(let e=0;e{t.context?(t.glFramebuffer=t.context.createFramebuffer(),t.glFramebuffer.width=e,t.glFramebuffer.height=n):(0,r.r)("you must set the OpenGLRenderWindow before calling create")},e.setColorBuffer=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=t.context;if(!i)return void(0,r.r)("you must set the OpenGLRenderWindow before calling setColorBuffer");let o=i.COLOR_ATTACHMENT0;if(n>0){if(!t._openGLRenderWindow.getWebgl2())return void(0,r.r)("Using multiple framebuffer attachments requires WebGL 2");o+=n}t.colorBuffers[n]=e,i.framebufferTexture2D(i.FRAMEBUFFER,o,i.TEXTURE_2D,e.getHandle(),0)},e.removeColorBuffer=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const n=t.context;if(!n)return void(0,r.r)("you must set the OpenGLRenderWindow before calling removeColorBuffer");let i=n.COLOR_ATTACHMENT0;if(e>0){if(!t._openGLRenderWindow.getWebgl2())return void(0,r.r)("Using multiple framebuffer attachments requires WebGL 2");i+=e}n.framebufferTexture2D(n.FRAMEBUFFER,i,n.TEXTURE_2D,null,0),t.colorBuffers=t.colorBuffers.splice(e,1)},e.setDepthBuffer=e=>{if(t.context)if(t._openGLRenderWindow.getWebgl2()){const n=t.context;n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,e.getHandle(),0)}else(0,r.r)("Attaching depth buffer textures to fbo requires WebGL 2");else(0,r.r)("you must set the OpenGLRenderWindow before calling setDepthBuffer")},e.removeDepthBuffer=()=>{if(t.context)if(t._openGLRenderWindow.getWebgl2()){const e=t.context;e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,null,0)}else(0,r.r)("Attaching depth buffer textures to framebuffers requires WebGL 2");else(0,r.r)("you must set the OpenGLRenderWindow before calling removeDepthBuffer")},e.getGLFramebuffer=()=>t.glFramebuffer,e.setOpenGLRenderWindow=n=>{t._openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t._openGLRenderWindow=n,t.context=null,n&&(t.context=t._openGLRenderWindow.getContext()))},e.releaseGraphicsResources=()=>{t.glFramebuffer&&t.context.deleteFramebuffer(t.glFramebuffer)},e.getSize=()=>{const e=[0,0];return null!==t.glFramebuffer&&(e[0]=t.glFramebuffer.width,e[1]=t.glFramebuffer.height),e},e.populateFramebuffer=()=>{if(!t.context)return void(0,r.r)("you must set the OpenGLRenderWindow before calling populateFrameBuffer");e.bind();const n=t.context,s=i.ZP.newInstance();s.setOpenGLRenderWindow(t._openGLRenderWindow),s.setMinificationFilter(a.wn.LINEAR),s.setMagnificationFilter(a.wn.LINEAR),s.create2DFromRaw(t.glFramebuffer.width,t.glFramebuffer.height,4,o.Tu.UNSIGNED_CHAR,null),e.setColorBuffer(s),t.depthTexture=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,t.depthTexture),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t.glFramebuffer.width,t.glFramebuffer.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,t.depthTexture)},e.getColorTexture=()=>t.colorBuffers[0]}const l={glFramebuffer:null,colorBuffers:null,depthTexture:null,previousDrawBinding:0,previousReadBinding:0,previousDrawBuffer:0,previousReadBuffer:0,previousActiveFramebuffer:null};function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l,n),(0,r.o)(e,t),t.colorBuffers&&(0,r.r)("you cannot initialize colorBuffers through the constructor. You should call setColorBuffer() instead."),t.colorBuffers=[],(0,r.k)(e,t,["colorBuffers"]),s(e,t)}var c={newInstance:(0,r.n)(u,"vtkFramebuffer"),extend:u}},function(e,t,n){"use strict";n.d(t,{Z:function(){return r},C:function(){return i}});const r={NEAREST:0,LINEAR:1};var i={InterpolationType:r}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(0),i=n(18),o=n(102);function a(e,t){t.classHierarchy.push("vtkWebGPUFullScreenQuad"),e.replaceShaderPosition=(e,t,n)=>{const r=t.getShaderDescription("vertex");r.addBuiltinOutput("vec4","@builtin(position) Position"),r.addOutput("vec4","vertexVC");let o=r.getCode();o=i.ZP.substitute(o,"//VTK::Position::Impl",["output.tcoordVS = vec2(vertexBC.x * 0.5 + 0.5, 1.0 - vertexBC.y * 0.5 - 0.5);","output.Position = vec4(vertexBC, 1.0);","output.vertexVC = vec4(vertexBC, 1);"]).result,r.setCode(o)},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition),e.updateBuffers=()=>{const e=t.device.getBufferManager().getFullScreenQuadBuffer();t.vertexInput.addBuffer(e,["vertexBC"]),t.numberOfVertices=6}}const s={};function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),o.ZP.extend(e,t,n),a(e,t)}var u={newInstance:r.m.newInstance(l,"vtkWebGPUFullScreenQuad"),extend:l}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return f}});var r=n(0),i=n(111),o=n(28),a=n(367),s=n(34),l=n(33);const{BufferUsage:u}=o.ZP;function c(e,t){t.classHierarchy.push("vtkWebGPUTexture"),e.create=(e,n)=>{t.device=e,t.width=n.width,t.height=n.height,t.depth=n.depth?n.depth:1;const r=1===t.depth?"2d":"3d";t.format=n.format?n.format:"rgba8unorm",t.mipLevel=n.mipLevel?n.mipLevel:0,t.usage=n.usage?n.usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST,t.handle=t.device.getHandle().createTexture({size:[t.width,t.height,t.depth],format:t.format,usage:t.usage,label:t.label,dimension:r,mipLevelCount:t.mipLevel+1})},e.assignFromHandle=(e,n,r)=>{t.device=e,t.handle=n,t.width=r.width,t.height=r.height,t.depth=r.depth?r.depth:1,t.format=r.format?r.format:"rgba8unorm",t.usage=r.usage?r.usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST},e.writeImageData=n=>{let o=[];if(n.canvas)return t.device.getHandle().queue.copyExternalImageToTexture({source:n.canvas,flipY:n.flip},{texture:t.handle,premultipliedAlpha:!0},[t.width,t.height,t.depth]),void(t.ready=!0);n.jsImageData&&!n.nativeArray&&(n.width=n.jsImageData.width,n.height=n.jsImageData.height,n.depth=1,n.format="rgba8unorm",n.flip=!0,n.nativeArray=n.jsImageData.data);const a=s.Z.getDetailsFromTextureFormat(t.format);let c=t.width*a.stride;const d=(e,t,n)=>{const o=e.length/(t*n)*e.BYTES_PER_ELEMENT,s=2===a.elementSize&&"float"===a.sampleType;if(s||o%256){const l=e,u=o/l.BYTES_PER_ELEMENT,c=a.elementSize,d=256*Math.floor((u*c+255)/256),p=d/c,f=r.m.newTypedArray(s?"Uint16Array":l.constructor.name,p*t*n);for(let e=0;e{const e=s.Z.getDetailsFromTextureFormat(t.format);return 2===e.elementSize&&"float"===e.sampleType?1:255},e.getNumberOfComponents=()=>s.Z.getDetailsFromTextureFormat(t.format).numComponents,e.getDimensionality=()=>{let e=0;return t.width>1&&e++,t.height>1&&e++,t.depth>1&&e++,e},e.resizeToMatch=e=>{e.getWidth()===t.width&&e.getHeight()===t.height&&e.getDepth()===t.depth||(t.width=e.getWidth(),t.height=e.getHeight(),t.depth=e.getDepth(),t.handle=t.device.getHandle().createTexture({size:[t.width,t.height,t.depth],format:t.format,usage:t.usage,label:t.label}))},e.resize=function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e===t.width&&n===t.height&&r===t.depth||(t.width=e,t.height=n,t.depth=r,t.handle=t.device.getHandle().createTexture({size:[t.width,t.height,t.depth],format:t.format,usage:t.usage,label:t.label}))},e.createView=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r.dimension||(r.dimension=1===t.depth?"2d":"3d");const i=a.ZP.newInstance({label:n});return i.create(e,r),i}}const d={device:null,handle:null,buffer:null,ready:!1,label:null};function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),r.m.obj(e,t),r.m.get(e,t,["handle","ready","width","height","depth","format","usage"]),r.m.setGet(e,t,["device","label"]),c(e,t)}var f={newInstance:r.m.newInstance(p),extend:p}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return l}});var r=n(0);const{vtkErrorMacro:i}=r.m;function o(e,t){t.classHierarchy.push("vtkPiecewiseFunction"),e.getSize=()=>t.nodes.length,e.getType=()=>{let e,n=0,r=0;t.nodes.length>0&&(n=t.nodes[0].y);for(let i=1;in)switch(r){case 0:case 1:r=1;break;default:r=3}else switch(r){case 0:case 2:r=2;break;default:r=3}if(n=e,3===r)break}switch(r){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:return"Varied"}},e.getDataPointer=()=>{const e=t.nodes.length;if(t.function=null,e>0){t.function=[];for(let n=0;n{if(0===t.nodes.length)return 0;let e=1,n=0,r=0;for(;r0?t.nodes[r-1].x:t.clamping?-Number.MAX_VALUE:t.nodes[0].x,n},e.getNodeValue=(e,n)=>{const r=t.nodes.length;return e<0||e>=r?(i("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].y,n[2]=t.nodes[e].midpoint,n[3]=t.nodes[e].sharpness,1)},e.setNodeValue=(n,r)=>{const o=t.nodes.length;if(n<0||n>=o)return i("Index out of range!"),-1;const a=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].y=r[1],t.nodes[n].midpoint=r[2],t.nodes[n].sharpness=r[3],a!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.addPoint=(t,n)=>e.addPointLong(t,n,.5,0),e.addPointLong=(n,r,o,a)=>{if(o<0||o>1)return i("Midpoint outside range [0.0, 1.0]"),-1;if(a<0||a>1)return i("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);const s={x:n,y:r,midpoint:o,sharpness:a};let l;for(t.nodes.push(s),e.sortAndUpdateRange(),l=0;l{t.nodes!==n&&(t.nodes=n,e.sortAndUpdateRange())},e.sortAndUpdateRange=()=>{t.nodes.sort(((e,t)=>e.x-t.x));e.updateRange()||e.modified()},e.updateRange=()=>{const n=t.range.slice(),r=t.nodes.length;return r?(t.range[0]=t.nodes[0].x,t.range[1]=t.nodes[r-1].x):(t.range[0]=0,t.range[1]=0),(n[0]!==t.range[0]||n[1]!==t.range[1])&&(e.modified(),!0)},e.removePoint=n=>{let r;for(r=0;r=t.nodes.length)return-1;const i=r;let o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),i},e.removeAllPoints=()=>{t.nodes=[],e.sortAndUpdateRange()},e.addSegment=(n,r,i,o)=>{e.sortAndUpdateRange();for(let e=0;e=n&&t.nodes[e].x<=i?t.nodes.splice(e,1):e++;e.addPoint(n,r,.5,0),e.addPoint(i,o,.5,0)},e.getValue=t=>{const n=[];return e.getTable(t,t,1,n),n[0]},e.adjustRange=n=>{if(n.length<2)return 0;const r=e.getRange();r[0]n[1]?e.addPoint(n[1],e.getValue(n[1])):e.addPoint(n[1],e.getValue(r[1])),e.sortAndUpdateRange();for(let e=0;e=n[0]&&t.nodes[e].x<=n[1]?t.nodes.splice(e,1):++e;return e.sortAndUpdateRange(),1},e.estimateMinNumberOfSamples=(t,n)=>{const r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=()=>{const e=t.nodes.length;if(e<2)return-1;let n=t.nodes[1].x-t.nodes[0].x;for(let r=0;r4&&void 0!==arguments[4]?arguments[4]:1,s=0;const l=t.nodes.length;let u=0;0!==l&&(u=t.nodes[l-1].y);let c=0,d=0,p=0,f=0,h=0,m=0,g=0;for(o=0;o1?e+o/(r-1)*(n-e):.5*(e+n);st.nodes[s].x;)s++,s.99999&&(m=.99999));if(s>=l)i[v]=t.clamping?u:0;else if(0===s)i[v]=t.clamping?t.nodes[0].y:0;else{let e=(c-d)/(p-d);if(e=e.99){if(e<.5){i[v]=f;continue}i[v]=h;continue}if(g<.01){i[v]=(1-e)*f+e*h;continue}e<.5?e=.5*(2*e)**(1+10*g):e>.5&&(e=1-.5*(2*(1-e))**(1+10*g));const t=e*e,n=t*e,r=2*n-3*t+1,o=-2*n+3*t,a=n-2*t+e,s=n-t,l=(1-g)*(h-f);i[v]=r*f+o*h+a*l+s*l;const u=fh?f:h;i[v]=i[v]y?y:i[v]}}}}const a={range:[0,0],clamping:!0,allowDuplicateScalars:!1};function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a,n),r.m.obj(e,t),t.nodes=[],r.m.setGet(e,t,["allowDuplicateScalars","clamping"]),r.m.setArray(e,t,["range"],2),r.m.getArray(e,t,["range"]),o(e,t)}var l={newInstance:r.m.newInstance(s,"vtkPiecewiseFunction"),extend:s}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return _}});var r=n(0),i=n(2),o=n(69);var a={ColorSpace:{RGB:0,HSV:1,LAB:2,DIVERGING:3},Scale:{LINEAR:0,LOG10:1}};const{ColorSpace:s,Scale:l}=a,{ScalarMappingTarget:u}=o.ZP,{vtkDebugMacro:c,vtkErrorMacro:d,vtkWarningMacro:p}=r.m;function f(e,t){const n=e[0],r=e[1],i=e[2],o=Math.sqrt(n*n+r*r+i*i),a=o>.001?Math.acos(n/o):0,s=a>.001?Math.atan2(i,r):0;t[0]=o,t[1]=a,t[2]=s}function h(e,t){if(e[0]>=t-.1)return e[2];const n=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+n:e[2]-n}function m(e,t,n,r){const o=[],a=[];(0,i.J)(t,o),(0,i.J)(n,a);const s=[],l=[];f(o,s),f(a,l);let u=e;if(s[1]>.05&&l[1]>.05&&function(e,t){let n=e-t;for(n<0&&(n=-n);n>=2*Math.PI;)n-=2*Math.PI;return n>Math.PI&&(n=2*Math.PI-n),n}(s[2],l[2])>.33*Math.PI){let t=Math.max(s[0],l[0]);t=Math.max(88,t),e<.5?(l[0]=t,l[1]=0,l[2]=0,u*=2):(s[0]=t,s[1]=0,s[2]=0,u=2*u-1)}s[1]<.05&&l[1]>.05?s[2]=h(l,s[0]):l[1]<.05&&s[1]>.05&&(l[2]=h(s,l[0]));const c=[];c[0]=(1-u)*s[0]+u*l[0],c[1]=(1-u)*s[1]+u*l[1],c[2]=(1-u)*s[2]+u*l[2];const d=[];!function(e,t){const n=e[0],r=e[1],i=e[2];t[0]=n*Math.cos(r),t[1]=n*Math.sin(r)*Math.cos(i),t[2]=n*Math.sin(r)*Math.sin(i)}(c,d),(0,i.K)(d,r)}function g(e,t){t.classHierarchy.push("vtkColorTransferFunction"),e.getSize=()=>t.nodes.length,e.addRGBPoint=(t,n,r,i)=>e.addRGBPointLong(t,n,r,i,.5,0),e.addRGBPointLong=function(n,r,i,o){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(a<0||a>1)return d("Midpoint outside range [0.0, 1.0]"),-1;if(s<0||s>1)return d("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);const l={x:n,r:r,g:i,b:o,midpoint:a,sharpness:s};t.nodes.push(l),e.sortAndUpdateRange();let u=0;for(;ue.addHSVPointLong(t,n,r,i,.5,0),e.addHSVPointLong=function(t,n,r,o){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;const l=[],u=[n,r,o];return(0,i.h)(u,l),e.addRGBPoint(t,l[0],l[1],l[2],a,s)},e.setNodes=n=>{if(t.nodes!==n){const r=JSON.stringify(t.nodes);t.nodes=n;const i=JSON.stringify(t.nodes);if(e.sortAndUpdateRange()||r!==i)return e.modified(),!0}return!1},e.sortAndUpdateRange=()=>{const n=JSON.stringify(t.nodes);t.nodes.sort(((e,t)=>e.x-t.x));const r=JSON.stringify(t.nodes),i=e.updateRange();return i||n===r?i:(e.modified(),!0)},e.updateRange=()=>{const n=[2];n[0]=t.mappingRange[0],n[1]=t.mappingRange[1];const r=t.nodes.length;return r?(t.mappingRange[0]=t.nodes[0].x,t.mappingRange[1]=t.nodes[r-1].x):(t.mappingRange[0]=0,t.mappingRange[1]=0),(n[0]!==t.mappingRange[0]||n[1]!==t.mappingRange[1])&&(e.modified(),!0)},e.removePoint=n=>{let r=0;for(;r=t.nodes.length)return-1;let o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),i},e.movePoint=(n,r)=>{if(n!==r){e.removePoint(r);for(let i=0;i{t.nodes=[],e.sortAndUpdateRange()},e.addRGBSegment=(n,r,i,o,a,s,l,u)=>{e.sortAndUpdateRange();for(let e=0;e=n&&t.nodes[e].x<=a?t.nodes.splice(e,1):e++;e.addRGBPointLong(n,r,i,o,.5,0),e.addRGBPointLong(a,s,l,u,.5,0),e.modified()},e.addHSVSegment=(t,n,r,o,a,s,l,u)=>{const c=[n,r,o],d=[s,l,u],p=[],f=[];(0,i.h)(c,p),(0,i.h)(d,f),e.addRGBSegment(t,p[0],p[1],p[2],a,f[0],f[1],f[2])},e.mapValue=t=>{const n=[];return e.getColor(t,n),[Math.floor(255*n[0]+.5),Math.floor(255*n[1]+.5),Math.floor(255*n[2]+.5),255]},e.getColor=(n,r)=>{if(t.indexedLookup){const t=e.getSize(),i=e.getAnnotatedValueIndexInternal(n);if(i<0||0===t){const t=e.getNanColorByReference();r[0]=t[0],r[1]=t[1],r[2]=t[2]}else{const n=[];e.getNodeValue(i%t,n),r[0]=n[1],r[1]=n[2],r[2]=n[3]}}else e.getTable(n,n,1,r)},e.getRedValue=t=>{const n=[];return e.getColor(t,n),n[0]},e.getGreenValue=t=>{const n=[];return e.getColor(t,n),n[1]},e.getBlueValue=t=>{const n=[];return e.getColor(t,n),n[2]},e.getTable=(n,r,o,a)=>{const u=Number(n),c=Number(r);if((0,i.i)(u)||(0,i.i)(c)){for(let e=0;e0);let D=0,A=0,P=0;M&&(D=Math.log10(u),A=Math.log10(c));for(let n=0;n1?M?(P=D+n/(o-1)*(A-D),y=10**P):y=u+n/(o-1)*(c-u):M?(P=.5*(D+A),y=10**P):y=.5*(u+c),t.discretize){const e=t.mappingRange;if(y>=e[0]&&y<=e[1]){const n=t.numberOfValues,r=e[1]-e[0];if(n<=1)y=e[0]+r/2;else{const t=(y-e[0])/r,o=(0,i.G)(n*t);y=e[0]+o/(n-1)*r}}}for(;pt.nodes[p].x;)p++,p.99999&&(S=.99999));if(y>t.mappingRange[1])a[r]=0,a[r+1]=0,a[r+2]=0,t.clamping&&(e.getUseAboveRangeColor()?(a[r]=t.aboveRangeColor[0],a[r+1]=t.aboveRangeColor[1],a[r+2]=t.aboveRangeColor[2]):(a[r]=h,a[r+1]=g,a[r+2]=v));else if(y0&&(a[r]=t.nodes[0].r,a[r+1]=t.nodes[0].g,a[r+2]=t.nodes[0].b));else if(0===p&&(Math.abs(y-u)<1e-6||t.discretize))f>0?(a[r]=t.nodes[0].r,a[r+1]=t.nodes[0].g,a[r+2]=t.nodes[0].b):(a[r]=0,a[r+1]=0,a[r+2]=0);else{let e=0;if(e=M?(P-_)/(b-_):(y-_)/(b-_),e=e.99){if(e<.5){a[r]=x[0],a[r+1]=x[1],a[r+2]=x[2];continue}a[r]=w[0],a[r+1]=w[1],a[r+2]=w[2];continue}if(C<.01){if(t.colorSpace===s.RGB)a[r]=(1-e)*x[0]+e*w[0],a[r+1]=(1-e)*x[1]+e*w[1],a[r+2]=(1-e)*x[2]+e*w[2];else if(t.colorSpace===s.HSV){const n=[],o=[];(0,i.I)(x,n),(0,i.I)(w,o),t.hSVWrap&&(n[0]-o[0]>.5||o[0]-n[0]>.5)&&(n[0]>o[0]?n[0]-=1:o[0]-=1);const s=[];s[0]=(1-e)*n[0]+e*o[0],s[0]<0&&(s[0]+=1),s[1]=(1-e)*n[1]+e*o[1],s[2]=(1-e)*n[2]+e*o[2],(0,i.h)(s,T),a[r]=T[0],a[r+1]=T[1],a[r+2]=T[2]}else if(t.colorSpace===s.LAB){const t=[],n=[];(0,i.J)(x,t),(0,i.J)(w,n);const o=[];o[0]=(1-e)*t[0]+e*n[0],o[1]=(1-e)*t[1]+e*n[1],o[2]=(1-e)*t[2]+e*n[2],(0,i.K)(o,T),a[r]=T[0],a[r+1]=T[1],a[r+2]=T[2]}else t.colorSpace===s.DIVERGING?(m(e,x,w,T),a[r]=T[0],a[r+1]=T[1],a[r+2]=T[2]):d("ColorSpace set to invalid value.",t.colorSpace);continue}e<.5?e=.5*(2*e)**(1+10*C):e>.5&&(e=1-.5*(2*(1-e))**(1+10*C));const n=e*e,o=n*e,l=2*o-3*n+1,u=-2*o+3*n,c=o-2*n+e,p=o-n;let f,h;if(t.colorSpace===s.RGB)for(let e=0;e<3;e++)f=w[e]-x[e],h=(1-C)*f,a[r+e]=l*x[e]+u*w[e]+c*h+p*h;else if(t.colorSpace===s.HSV){const e=[],n=[];(0,i.I)(x,e),(0,i.I)(w,n),t.hSVWrap&&(e[0]-n[0]>.5||n[0]-e[0]>.5)&&(e[0]>n[0]?e[0]-=1:n[0]-=1);const o=[];for(let t=0;t<3;t++)f=n[t]-e[t],h=(1-C)*f,o[t]=l*e[t]+u*n[t]+c*h+p*h,0===t&&o[t]<0&&(o[t]+=1);(0,i.h)(o,T),a[r]=T[0],a[r+1]=T[1],a[r+2]=T[2]}else if(t.colorSpace===s.LAB){const e=[],t=[];(0,i.J)(x,e),(0,i.J)(w,t);const n=[];for(let r=0;r<3;r++)f=t[r]-e[r],h=(1-C)*f,n[r]=l*e[r]+u*t[r]+c*h+p*h;(0,i.K)(n,T),a[r]=T[0],a[r+1]=T[1],a[r+2]=T[2]}else t.colorSpace===s.DIVERGING?(m(e,x,w,T),a[r]=T[0],a[r+1]=T[1],a[r+2]=T[2]):d("ColorSpace set to invalid value.");for(let e=0;e<3;e++)a[r+e]=a[r+e]<0?0:a[r+e],a[r+e]=a[r+e]>1?1:a[r+e]}}},e.getUint8Table=function(n,r,i){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.getMTime()<=t.buildTime&&t.tableSize===i&&t.tableWithAlpha!==o)return t.table;if(0===t.nodes.length)return d("Attempting to lookup a value with no points in the function"),t.table;const a=o?4:3;t.tableSize===i&&t.tableWithAlpha===o||(t.table=new Uint8Array(i*a),t.tableSize=i,t.tableWithAlpha=o);const s=[];e.getTable(n,r,i,s);for(let e=0;e{e.removeAllPoints();const r=n.getNumberOfComponents();for(let e=0;e{let a=0;e.removeAllPoints(),i>1&&(a=(r-n)/(i-1));for(let e=0;ee<0||e>=t.nodes.length?(d("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].r,n[2]=t.nodes[e].g,n[3]=t.nodes[e].b,n[4]=t.nodes[e].midpoint,n[5]=t.nodes[e].sharpness,1),e.setNodeValue=(n,r)=>{if(n<0||n>=t.nodes.length)return d("Index out of range!"),-1;const i=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].r=r[1],t.nodes[n].g=r[2],t.nodes[n].b=r[3],t.nodes[n].midpoint=r[4],t.nodes[n].sharpness=r[5],i!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.getNumberOfAvailableColors=()=>t.indexedLookup&&e.getSize()?e.getSize():t.tableSize?t.tableSize:16777216,e.getIndexedColor=(t,n)=>{const r=e.getSize();if(r>0&&t>=0){const i=[];e.getNodeValue(t%r,i);for(let e=0;e<3;++e)n[e]=i[e+1];return void(n[3]=1)}const i=e.getNanColorByReference();n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=1},e.fillFromDataPointer=(t,n)=>{if(!(t<=0)&&n){e.removeAllPoints();for(let r=0;r{const i=[n,r],o=e.getRange();if(o[1]===i[1]&&o[0]===i[0])return;if(i[1]===i[0])return void d("attempt to set zero width color range");const a=(i[1]-i[0])/(o[1]-o[0]),s=i[0]-o[0]*a;for(let e=0;e{const r=e.getRange(),i=[];r[0]n[1]?(e.getColor(n[1],i),e.addRGBPoint(n[1],i[0],i[1],i[2])):(e.getColor(r[1],i),e.addRGBPoint(n[1],i[0],i[1],i[2])),e.sortAndUpdateRange();for(let e=0;e=n[0]&&t.nodes[e].x<=n[1]?t.nodes.splice(e,1):++e;return 1},e.estimateMinNumberOfSamples=(t,n)=>{const r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=()=>{if(t.nodes.length<2)return-1;let e=Number.MAX_VALUE;for(let n=0;n{0!==e.getSize()?t.indexedLookup?e.mapDataIndexed(n,r,i,o):e.mapData(n,r,i,o):c("Transfer Function Has No Points!")},e.mapData=(t,n,r,i)=>{if(0===e.getSize())return void p("Transfer Function Has No Points!");const o=Math.floor(255*e.getAlpha()+.5),a=t.getNumberOfTuples(),s=t.getNumberOfComponents(),l=n.getData(),c=t.getData(),d=[];if(r===u.RGBA)for(let t=0;t{const r=JSON.stringify(t.colorSpace);n.ColorSpace&&(t.colorSpace=s[n.ColorSpace.toUpperCase()],void 0===t.colorSpace&&(d(`ColorSpace ${n.ColorSpace} not supported, using RGB instead`),t.colorSpace=s.RGB));let i=r!==JSON.stringify(t.colorSpace);const o=i||JSON.stringify(t.nanColor);if(n.NanColor)for(t.nanColor=[].concat(n.NanColor);t.nanColor.length<4;)t.nanColor.push(1);i=i||o!==JSON.stringify(t.nanColor);const a=i||JSON.stringify(t.nodes);if(n.RGBPoints){const e=n.RGBPoints.length;t.nodes=[];const r=.5,i=0;for(let o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,v,n),o.ZP.extend(e,t,n),t.table=[],t.nodes=[],t.nanColor=[.5,0,0,1],t.belowRangeColor=[0,0,0,1],t.aboveRangeColor=[1,1,1,1],t.buildTime={},r.m.obj(t.buildTime),r.m.get(e,t,["buildTime","mappingRange"]),r.m.setGet(e,t,["useAboveRangeColor","useBelowRangeColor","colorSpace","discretize","numberOfValues"]),r.m.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),r.m.getArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"]),g(e,t)}var _={newInstance:r.m.newInstance(y,"vtkColorTransferFunction"),extend:y,...a}},function(e){"use strict";"undefined"!=typeof self?e.exports=self:"undefined"!=typeof window?e.exports=window:e.exports=Function("return this")()},function(e,t,n){"use strict";n.d(t,{L:function(){return r},Z:function(){return i}});const r={ARRAY_BUFFER:0,ELEMENT_ARRAY_BUFFER:1,TEXTURE_BUFFER:2};var i={ObjectType:r}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return l}});var r=n(0),i=n(53);function o(e,t){t.classHierarchy.push("vtkOpenGLVertexArrayObject"),e.exposedMethod=()=>{},e.initialize=()=>{t.instancingExtension=null,t._openGLRenderWindow.getWebgl2()||(t.instancingExtension=t.context.getExtension("ANGLE_instanced_arrays")),!t.forceEmulation&&t._openGLRenderWindow&&t._openGLRenderWindow.getWebgl2()?(t.extension=null,t.supported=!0,t.handleVAO=t.context.createVertexArray()):(t.extension=t.context.getExtension("OES_vertex_array_object"),!t.forceEmulation&&t.extension?(t.supported=!0,t.handleVAO=t.extension.createVertexArrayOES()):t.supported=!1)},e.isReady=()=>0!==t.handleVAO||!1===t.supported,e.bind=()=>{if(e.isReady()||e.initialize(),e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(t.handleVAO):t.context.bindVertexArray(t.handleVAO);else if(e.isReady()){const e=t.context;for(let n=0;n0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+n,1):e.vertexAttribDivisor(i.index+n,1))}}}},e.release=()=>{if(e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(null):t.context.bindVertexArray(null);else if(e.isReady()){const e=t.context;for(let n=0;n0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+n,0):e.vertexAttribDivisor(i.index+n,0)),e.disableVertexAttribArray(i.index+n)}}}},e.shaderProgramChanged=()=>{e.release(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.handleProgram=0},e.releaseGraphicsResources=()=>{e.shaderProgramChanged(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.supported=!0,t.handleProgram=0},e.addAttributeArray=(t,n,r,i,o,a,s,l)=>e.addAttributeArrayWithDivisor(t,n,r,i,o,a,s,l,0,!1),e.addAttributeArrayWithDivisor=(n,r,o,a,s,l,u,c,d,p)=>{if(!n)return!1;if(!n.isBound()||0===r.getHandle()||r.getType()!==i.L.ARRAY_BUFFER)return!1;if(0===t.handleProgram&&(t.handleProgram=n.getHandle()),e.isReady()||e.initialize(),!e.isReady()||t.handleProgram!==n.getHandle())return!1;const f=t.context,h={};if(h.name=o,h.index=f.getAttribLocation(t.handleProgram,o),h.offset=a,h.stride=s,h.type=l,h.size=u,h.normalize=c,h.isMatrix=p,h.divisor=d,-1===h.Index)return!1;if(r.bind(),f.enableVertexAttribArray(h.index),f.vertexAttribPointer(h.index,h.size,h.type,h.normalize,h.stride,h.offset),d>0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(h.index,1):f.vertexAttribDivisor(h.index,1)),h.buffer=r.getHandle(),!t.supported){let e=!1;for(let n=0;n{const d=e.addAttributeArrayWithDivisor(n,r,i,o,a,s,l,u,c,!0);if(!d)return d;const p=t.context,f=p.getAttribLocation(t.handleProgram,i);for(let e=1;e0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(f+e,1):p.vertexAttribDivisor(f+e,1));return!0},e.removeAttributeArray=n=>{if(!e.isReady()||0===t.handleProgram)return!1;if(!t.supported)for(let e=0;e{t._openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t._openGLRenderWindow=n,t.context=null,n&&(t.context=t._openGLRenderWindow.getContext()))}}const a={forceEmulation:!1,handleVAO:0,handleProgram:0,supported:!0,buffers:null,context:null};function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a,n),t.buffers=[],r.m.obj(e,t),r.m.get(e,t,["supported"]),r.m.setGet(e,t,["forceEmulation"]),o(e,t)}var l={newInstance:r.m.newInstance(s,"vtkOpenGLVertexArrayObject"),extend:s}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return d}});var r=n(0),i=n(28),o=n(34);const{BufferUsage:a}=i.ZP,{vtkErrorMacro:s}=r.m;function l(e,t){t.classHierarchy.push("vtkWebGPUUniformBuffer"),e.addEntry=(e,n)=>{t._bufferEntryNames.has(e)?s(`entry named ${e} already exists`):(t.sortDirty=!0,t._bufferEntryNames.set(e,t.bufferEntries.length),t.bufferEntries.push({name:e,type:n,sizeInBytes:o.Z.getByteStrideFromShaderFormat(n),offset:-1,nativeType:o.Z.getNativeTypeFromShaderFormat(n),packed:!1}))},e.sortBufferEntries=()=>{if(!t.sortDirty)return;let e=0;const n=[];let r=4;for(let e=0;e4&&(i.packed=!0,i.offset=e,n.push(i),e+=i.sizeInBytes)}for(let r=0;r{if(!t.UBO){const n={nativeArray:t.Float32Array,usage:a.UniformArray,label:t.label};t.UBO=e.getBufferManager().getBuffer(n),t.bindGroupTime.modified(),t.sendDirty=!1}t.sendDirty&&(e.getHandle().queue.writeBuffer(t.UBO.getHandle(),0,t.arrayBuffer,0,t.sizeInBytes),t.sendDirty=!1),t.sendTime.modified()},e.createView=e=>{e in t==!1&&(t.arrayBuffer||(t.arrayBuffer=new ArrayBuffer(t.sizeInBytes)),t[e]=r.m.newTypedArray(e,t.arrayBuffer))},e.setValue=(n,r)=>{e.sortBufferEntries();const i=t._bufferEntryNames.get(n);if(void 0===i)return void s(`entry named ${n} not found in UBO`);const o=t.bufferEntries[i];e.createView(o.nativeType);const a=t[o.nativeType];o.lastValue!==r&&(a[o.offset/a.BYTES_PER_ELEMENT]=r,t.sendDirty=!0),o.lastValue=r},e.setArray=(n,r)=>{e.sortBufferEntries();const i=t._bufferEntryNames.get(n);if(void 0===i)return void s(`entry named ${n} not found in UBO`);const o=t.bufferEntries[i];e.createView(o.nativeType);const a=t[o.nativeType];let l=!1;for(let e=0;e({resource:{buffer:t.UBO.getHandle()}}),e.getSendTime=()=>t.sendTime.getMTime(),e.getShaderCode=(n,r)=>{e.sortBufferEntries();const i=[`struct ${t.label}Struct\n{`];for(let e=0;e ${t.label}: ${t.label}Struct;`),i.join("\n")}}const u={bufferEntries:null,bufferEntryNames:null,sizeInBytes:0,label:null,bindGroupLayoutEntry:null,bindGroupEntry:null};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),r.m.obj(e,t),t._bufferEntryNames=new Map,t.bufferEntries=[],t.bindGroupLayoutEntry=t.bindGroupLayoutEntry||{buffer:{type:"uniform"}},t.sendTime={},r.m.obj(t.sendTime,{mtime:0}),t.bindGroupTime={},r.m.obj(t.bindGroupTime,{mtime:0}),t.sendDirty=!0,t.sortDirty=!0,r.m.get(e,t,["binding","bindGroupTime"]),r.m.setGet(e,t,["bindGroupLayoutEntry","device","label","sizeInBytes"]),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkWebGPUUniformBuffer"),extend:c}},function(e,t,n){e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){return i(t[a][1][e]||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a>2,s=(3&t)<<4|n>>4,l=1>6:64,u=2>4,n=(15&a)<<4|(s=o.indexOf(e.charAt(u++)))>>2,r=(3&s)<<6|(l=o.indexOf(e.charAt(u++))),p[c++]=t,64!==s&&(p[c++]=n),64!==l&&(p[c++]=r);return p}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new a("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(e){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e("./utils"),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s>>8^o[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s>>8^o[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),a=e("./stream/GenericWorker"),s=r?"uint8array":"array";function l(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",o.inherits(l,a),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,e.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r="";for(n=0;n>>=8;return r}function i(e,t,n,i,a,c){var d,p,f=e.file,h=e.compression,m=c!==s.utf8encode,g=o.transformTo("string",c(f.name)),v=o.transformTo("string",s.utf8encode(f.name)),y=f.comment,_=o.transformTo("string",c(y)),b=o.transformTo("string",s.utf8encode(y)),x=v.length!==f.name.length,w=b.length!==y.length,S="",C="",T="",M=f.dir,D=f.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var P=0;t&&(P|=8),m||!x&&!w||(P|=2048);var k=0,L=0;M&&(k|=16),"UNIX"===a?(L=798,k|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(f.unixPermissions,M)):(L=20,k|=function(e){return 63&(e||0)}(f.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,p=D.getUTCFullYear()-1980,p<<=4,p|=D.getUTCMonth()+1,p<<=5,p|=D.getUTCDate(),x&&(C=r(1,1)+r(l(g),4)+v,S+="up"+r(C.length,2)+C),w&&(T=r(1,1)+r(l(_),4)+b,S+="uc"+r(T.length,2)+T);var O="";return O+="\n\0",O+=r(P,2),O+=h.magic,O+=r(d,2),O+=r(p,2),O+=r(A.crc32,4),O+=r(A.compressedSize,4),O+=r(A.uncompressedSize,4),O+=r(g.length,2),O+=r(S.length,2),{fileRecord:u.LOCAL_FILE_HEADER+O+g+S,dirRecord:u.CENTRAL_FILE_HEADER+r(L,2)+O+r(_.length,2)+"\0\0\0\0"+r(k,4)+r(i,4)+g+S+_}}var o=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),l=e("../crc32"),u=e("../signature");function c(e,t,n,r){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(c,a),c.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},c.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return u.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e("./Uint8ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e("./ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../support"),o=e("./ArrayReader"),a=e("./StringReader"),s=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new l(r.transformTo("uint8array",e)):new o(r.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../utils");function o(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,r),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,r),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(o,i),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}r.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}},t.exports=r},{}],29:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./ConvertWorker"),o=e("./GenericWorker"),a=e("../base64"),s=e("../support"),l=e("../external"),u=null;if(s.nodestream)try{u=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function c(e,t){return new l.Promise((function(n,i){var o=[],s=e._internalType,l=e._outputType,u=e._mimeType;e.on("data",(function(e,n){o.push(e),t&&t(n)})).on("error",(function(e){o=[],i(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return r.newBlob(r.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return r.transformTo(e,t)}}(l,function(e,t){var n,r=0,i=null,o=0;for(n=0;n>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,i,o,a=e.length,l=new Array(2*a);for(t=n=0;t>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),r.applyFromCharCode(l)}(e=r.transformTo(i.uint8array?"uint8array":"array",e))},r.inherits(u,a),u.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+s[e[n]]>t?n:t}(t),l=t;a!==t.length&&(i.uint8array?(l=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(l=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:n.utf8decode(l),meta:e.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=u,r.inherits(c,a),c.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){"use strict";var r=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),a=e("set-immediate-shim"),s=e("./external");function l(e){return e}function u(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,u[r++]=56320|1023&i)}return l(u,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var o=r,a=i+n;e^=-1;for(var s=i;s>>8^o[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){"use strict";var r,i=e("../utils/common"),o=e("./trees"),a=e("./adler32"),s=e("./crc32"),l=e("./messages"),u=0,c=4,d=0,p=-2,f=-1,h=4,m=2,g=8,v=9,y=286,_=30,b=19,x=2*y+1,w=15,S=3,C=258,T=C+S+1,M=42,D=113,A=1,P=2,k=3,L=4;function O(e,t){return e.msg=l[t],t}function E(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function R(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,N(e.strm)}function B(e,t){e.pending_buf[e.pending++]=t}function F(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function V(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,u=e.window,c=e.w_mask,d=e.prev,p=e.strstart+C,f=u[o+a-1],h=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+a]===h&&u[n+a-1]===f&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&ol&&0!=--i);return a<=e.lookahead?a:e.lookahead}function U(e){var t,n,r,o,l,u,c,d,p,f,h=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=h+(h-T)){for(i.arraySet(e.window,e.window,h,h,0),e.match_start-=h,e.strstart-=h,e.block_start-=h,t=n=e.hash_size;r=e.head[--t],e.head[t]=h<=r?r-h:0,--n;);for(t=n=h;r=e.prev[--t],e.prev[t]=h<=r?r-h:0,--n;);o+=h}if(0===e.strm.avail_in)break;if(u=e.strm,c=e.window,d=e.strstart+e.lookahead,f=void 0,(p=o)<(f=u.avail_in)&&(f=p),n=0===f?0:(u.avail_in-=f,i.arraySet(c,u.input,u.next_in,f,d),1===u.state.wrap?u.adler=a(u.adler,c,f,d):2===u.state.wrap&&(u.adler=s(u.adler,c,f,d)),u.next_in+=f,u.total_in+=f,f),e.lookahead+=n,e.lookahead+e.insert>=S)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=S&&(e.ins_h=(e.ins_h<=S)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-S),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=S){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=S&&(e.ins_h=(e.ins_h<=S&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-S,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-S),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(U(e),0===e.lookahead&&t===u)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,R(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-T&&(R(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===c?(R(e,!0),0===e.strm.avail_out?k:L):(e.strstart>e.block_start&&(R(e,!1),e.strm.avail_out),A)})),new j(4,4,8,4,G),new j(4,5,16,8,G),new j(4,6,32,32,G),new j(4,4,16,16,z),new j(8,16,32,32,z),new j(8,16,128,128,z),new j(8,32,128,256,z),new j(32,128,258,1024,z),new j(32,258,258,4096,z)],n.deflateInit=function(e,t){return $(e,t,g,15,8,0)},n.deflateInit2=$,n.deflateReset=W,n.deflateResetKeep=H,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?p:(e.state.gzhead=t,d):p},n.deflate=function(e,t){var n,i,a,l;if(!e||!e.state||5>8&255),B(i,i.gzhead.time>>16&255),B(i,i.gzhead.time>>24&255),B(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),B(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(B(i,255&i.gzhead.extra.length),B(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(B(i,0),B(i,0),B(i,0),B(i,0),B(i,0),B(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),B(i,3),i.status=D);else{var f=g+(i.w_bits-8<<4)<<8;f|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=D,F(i,f),0!==i.strstart&&(F(i,e.adler>>>16),F(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),N(e),a=i.pending,i.pending!==i.pending_buf_size));)B(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),N(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),N(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&N(e),i.pending+2<=i.pending_buf_size&&(B(i,255&e.adler),B(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),0!==i.pending){if(N(e),0===e.avail_out)return i.last_flush=-1,d}else if(0===e.avail_in&&E(t)<=E(n)&&t!==c)return O(e,-5);if(666===i.status&&0!==e.avail_in)return O(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==u&&666!==i.status){var h=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(U(e),0===e.lookahead)){if(t===u)return A;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(R(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===c?(R(e,!0),0===e.strm.avail_out?k:L):e.last_lit&&(R(e,!1),0===e.strm.avail_out)?A:P}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,s=e.window;;){if(e.lookahead<=C){if(U(e),e.lookahead<=C&&t===u)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=S&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=S?(n=o._tr_tally(e,1,e.match_length-S),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(R(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===c?(R(e,!0),0===e.strm.avail_out?k:L):e.last_lit&&(R(e,!1),0===e.strm.avail_out)?A:P}(i,t):r[i.level].func(i,t);if(h!==k&&h!==L||(i.status=666),h===A||h===k)return 0===e.avail_out&&(i.last_flush=-1),d;if(h===P&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(I(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),N(e),0===e.avail_out))return i.last_flush=-1,d}return t!==c?d:i.wrap<=0?1:(2===i.wrap?(B(i,255&e.adler),B(i,e.adler>>8&255),B(i,e.adler>>16&255),B(i,e.adler>>24&255),B(i,255&e.total_in),B(i,e.total_in>>8&255),B(i,e.total_in>>16&255),B(i,e.total_in>>24&255)):(F(i,e.adler>>>16),F(i,65535&e.adler)),N(e),0=n.w_size&&(0===s&&(I(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new i.Buf8(n.w_size),i.arraySet(f,t,h-n.w_size,n.w_size,0),t=f,h=n.w_size),l=e.avail_in,u=e.next_in,c=e.input,e.avail_in=h,e.next_in=0,e.input=t,U(n);n.lookahead>=S;){for(r=n.strstart,o=n.lookahead-(S-1);n.ins_h=(n.ins_h<>>=b=_>>>24,h-=b,0==(b=_>>>16&255))M[o++]=65535&_;else{if(!(16&b)){if(0==(64&b)){_=m[(65535&_)+(f&(1<>>=b,h-=b),h<15&&(f+=T[r++]<>>=b=_>>>24,h-=b,!(16&(b=_>>>16&255))){if(0==(64&b)){_=g[(65535&_)+(f&(1<>>=b,h-=b,(b=o-a)>3,f&=(1<<(h-=x<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){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 r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=p,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(f),t.distcode=t.distdyn=new r.Buf32(h),t.sane=1,t.back=-1,c):d}function y(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,v(e)):d}function _(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(o=a.wsize-a.wnext)&&(o=i),r.arraySet(a.window,t,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=o(n.check,U,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&b)){e.msg="unknown compression method",n.mode=30;break}if(x-=4,N=8+(15&(b>>>=4)),0===n.wbits)n.wbits=N;else if(N>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(U[0]=255&b,U[1]=b>>>8&255,n.check=o(n.check,U,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(0===y)break e;y--,b+=f[g++]<>>8&255,U[2]=b>>>16&255,U[3]=b>>>24&255,n.check=o(n.check,U,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(0===y)break e;y--,b+=f[g++]<>8),512&n.flags&&(U[0]=255&b,U[1]=b>>>8&255,n.check=o(n.check,U,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(0===y)break e;y--,b+=f[g++]<>>8&255,n.check=o(n.check,U,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(y<(M=n.length)&&(M=y),M&&(n.head&&(N=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,f,g,M,N)),512&n.flags&&(n.check=o(n.check,f,M,g)),y-=M,g+=M,n.length-=M),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===y)break e;for(M=0;N=f[g+M++],n.head&&N&&n.length<65536&&(n.head.name+=String.fromCharCode(N)),N&&M>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(0===y)break e;y--,b+=f[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===y)break e;y--,b+=f[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(C(n),n.mode=20,6!==t)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(0===y)break e;y--,b+=f[g++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(M=n.length){if(y>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[G[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},R=s(0,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,R){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,L=65535&V,!((P=V>>>24)<=x);){if(0===y)break e;y--,b+=f[g++]<>>=P,x-=P,n.lens[n.have++]=L;else{if(16===L){for(F=P+2;x>>=P,x-=P,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}N=n.lens[n.have-1],M=3+(3&b),b>>>=2,x-=2}else if(17===L){for(F=P+3;x>>=P)),b>>>=3,x-=3}else{for(F=P+7;x>>=P)),b>>>=7,x-=7}if(n.have+M>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;M--;)n.lens[n.have++]=N}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,B={bits:n.lenbits},R=s(l,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,R){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},R=s(u,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,R){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=y&&258<=_){e.next_out=v,e.avail_out=_,e.next_in=g,e.avail_in=y,n.hold=b,n.bits=x,a(e,S),v=e.next_out,h=e.output,_=e.avail_out,g=e.next_in,f=e.input,y=e.avail_in,b=n.hold,x=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;k=(V=n.lencode[b&(1<>>16&255,L=65535&V,!((P=V>>>24)<=x);){if(0===y)break e;y--,b+=f[g++]<>O)])>>>16&255,L=65535&V,!(O+(P=V>>>24)<=x);){if(0===y)break e;y--,b+=f[g++]<>>=O,x-=O,n.back+=O}if(b>>>=P,x-=P,n.back+=P,n.length=L,0===k){n.mode=26;break}if(32&k){n.back=-1,n.mode=12;break}if(64&k){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&k,n.mode=22;case 22:if(n.extra){for(F=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;k=(V=n.distcode[b&(1<>>16&255,L=65535&V,!((P=V>>>24)<=x);){if(0===y)break e;y--,b+=f[g++]<>O)])>>>16&255,L=65535&V,!(O+(P=V>>>24)<=x);){if(0===y)break e;y--,b+=f[g++]<>>=O,x-=O,n.back+=O}if(b>>>=P,x-=P,n.back+=P,64&k){e.msg="invalid distance code",n.mode=30;break}n.offset=L,n.extra=15&k,n.mode=24;case 24:if(n.extra){for(F=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===_)break e;if(M=S-_,n.offset>M){if((M=n.offset-M)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}D=M>n.wnext?(M-=n.wnext,n.wsize-M):n.wnext-M,M>n.length&&(M=n.length),A=n.window}else A=h,D=v-n.offset,M=n.length;for(_y?(b=B[F+d[C]],E[I+d[C]]):(b=96,0),f=1<>P)+(h-=f)]=_<<24|b<<16|x|0,0!==h;);for(f=1<>=1;if(0!==f?(O&=f-1,O+=f):O=0,C++,0==--N[S]){if(S===M)break;S=t[n+d[C]]}if(D>>7)]}function B(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function F(e,t,n){e.bi_valid>m-n?(e.bi_buf|=t<>m-e.bi_valid,e.bi_valid+=n-m):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function G(e,t,n){var r,i,o=new Array(h+1),a=0;for(r=1;r<=h;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=U(o[s]++,s))}}function z(e){var t;for(t=0;t>1;1<=n;n--)H(e,o,n);for(i=l;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],H(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,H(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,d=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,g=t.stat_desc.max_length,v=0;for(o=0;o<=h;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return i;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=a&&(a=s)):a=s=n+5,n+4<=a&&-1!==t?X(e,t,n,r):4===e.strategy||s===a?(F(e,2+(r?1:0),3),W(e,T,M)):(F(e,4+(r?1:0),3),function(e,t,n,r){var i;for(F(e,t-257,5),F(e,n-1,5),F(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(A[n]+u+1)]++,e.dyn_dtree[2*R(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){F(e,2,3),V(e,v,T),function(e){16===e.bi_valid?(B(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){"use strict";t.exports="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}},{}]},{},[10])(10)},,function(e,t){"use strict";t.Z={itkModulesPath:"itk"}},function(e){e.exports={Text:"Text",Binary:"Binary",Image:"Image",Mesh:"Mesh",vtkPolyData:"vtkPolyData"}},function(e,t,n){"use strict";n.d(t,{n7:function(){return g},ZP:function(){return _}});var r=n(0),i=n(32),o=n(44),a=n(4),s=n(37),l=n(61),u=n(21),c=n(101),d=n(361);const{vtkErrorMacro:p,vtkWarningMacro:f}=r.m,h=["active","inactive","static"];function m(e,t){e&&e.setResolveCoincidentTopologyToPolygonOffset&&(e.setResolveCoincidentTopologyToPolygonOffset(),c.a.forEach((n=>{if(t[n]){const r=`setRelativeCoincidentTopology${n}OffsetParameters`;if(e[r]){const{factor:i,offset:o}=t[n];e[r](i,o)}}})))}function g(e,t,n,i,l){let u=e[`get${r.m.capitalize(t)}`]?.()||e.getPointData().getArrayByName(t);if(!u||void 0!==i&&u.getDataType()!==i||void 0!==l&&u.getNumberOfComponents()!==l){let c=a.ZP,p=i,f=l;"points"===t?(c=s.ZP,p=p??"Float32Array",f=l??3):d.a.includes(t)?(c=o.ZP,p=p??"Uint16Array",f=l??1):(p=p??"Float32Array",f=l??1),u=c.newInstance({name:t,dataType:p,numberOfComponents:f,size:f*n,empty:0===n}),"points"===t||d.a.includes(t)?e[`set${r.m.capitalize(t)}`](u):e.getPointData().addArray(u)}else u.getNumberOfTuples()!==n&&u.resize(n);return u}function v(e,t){t.classHierarchy.push("vtkWidgetRepresentation");const n={mtimes:{},states:[]};t._onCoincidentTopologyParametersChanged=()=>{e.getActors().forEach((e=>{m(e.getMapper(),t.coincidentTopologyParameters)}))},e.getActors=()=>t.actors,e.getNestedProps=e.getActors,e.setLabels=function(){for(var n=arguments.length,r=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:t.inputData[0];return n.mtimes.representation===e.getMTime()&&n.mtimes.input===r.getMTime()||(n.mtimes.representation=e.getMTime(),n.mtimes.input=r.getMTime(),n.states=[],t.labels.forEach((e=>{n.states=n.states.concat(r.getStatesWithLabel(e)||[])}))),n.states},e.getSelectedState=(t,n)=>{const r=e.getRepresentationStates();return n0&&void 0!==arguments[0]?arguments[0]:u.rT.FRONT_BUFFER,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=!0;switch(t.behavior){case l.c.HANDLE:i=e===u.rT.PICKING_BUFFER||r;break;case l.c.CONTEXT:i=n;break;default:i=!0}const o=i;for(let e=0;ee.addActor(t)))},e.addActor=e=>{m(e.getMapper(),t.coincidentTopologyParameters),Array.prototype.push.apply(t.actors,[e])},e.setLabels(t.labels)}function y(e){return{activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,actors:[],labels:[],behavior:l.c.CONTEXT,coincidentTopologyParameters:{Point:{factor:-1,offset:-1},Line:{factor:-1,offset:-1},Polygon:{factor:-1,offset:-1}},scaleInPixels:!1,displayScaleParams:{dispHeightFactor:1,cameraPosition:[0,0,0],cameraDir:[1,0,0],isParallel:!1,rendererPixelDims:[1,1]},_internalArrays:{},...e}}var _={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.ZP.extend(e,t,y(n)),r.m.algo(e,t,1,1),r.m.get(e,t,["labels","displayScaleParams","coincidentTopologyParameters"]),r.m.set(e,t,[{type:"object",name:"displayScaleParams"},{type:"object",name:"coincidentTopologyParameters"}]),r.m.setGet(e,t,["scaleInPixels","activeScaleFactor","activeColor","useActiveColor"]),v(e,t)},mergeStyles:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=i[t];e.forEach((e=>{r[e]||(r[e]={}),n.filter((n=>n&&n[t]&&n[t][e])).forEach((n=>Object.assign(r[e],n[t][e])))}))})),i},applyStyles:function(e,t,n){n?Object.keys(e).forEach((r=>{const i=e[r].actor===n?t.active[r]:t.inactive[r];i&&e[r].actor.getProperty().set(i)})):(Object.keys(t.static).forEach((n=>{e[n]&&e[n].actor.getProperty().set(t.static[n])})),Object.keys(t.inactive).forEach((n=>{e[n]&&e[n].actor.getProperty().set(t.inactive[n])})))},connectPipeline:function(e){let t=e.source;e.filter&&(t.isA("vtkDataSet")?e.filter.setInputData(t):e.filter.setInputConnection(t.getOutputPort()),t=e.filter),t&&(t.isA("vtkDataSet")?e.mapper.setInputData(t):e.mapper.setInputConnection(t.getOutputPort())),e.glyph&&e.mapper.setInputConnection(e.glyph.getOutputPort(),1),e.actor.setMapper(e.mapper)}}},function(e,t,n){"use strict";n.d(t,{c:function(){return r}});const r={HANDLE:0,CONTEXT:1}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return _},xB:function(){return h},j3:function(){return m}});var r=n(2),i=n(106),o=n(0),a=n(21),s=n(472);const{ViewTypes:l,RenderingTypes:u,CaptureOn:c}=a.ZP,{vtkErrorMacro:d,vtkWarningMacro:p}=o.m;let f=1;function h(e){const t=e.getActiveCamera(),n=e.getRenderWindow(),r=n.getInteractor(),i=r.getView();return{renderer:e,renderWindow:n,interactor:r,apiSpecificRenderWindow:i,camera:t}}function m(e,t){const{dispHeightFactor:n,cameraPosition:i,cameraDir:o,isParallel:a,rendererPixelDims:s}=t;let l=1;if(a)l=n;else{const t=[...e];r.f.subtract(t,i,t),l=r.f.dot(t,o)*n}return l/s[1]}function g(e,t){t.viewId||(t.viewId="view-"+f++),t.classHierarchy.push("vtkWidgetManager");const n=new WeakMap,a=[];function m(e){return e&&(e.isA("vtkAbstractWidget")?e:e.getWidgetForView({viewId:t.viewId}))}function g(){const{_apiSpecificRenderWindow:e,_camera:n,_renderer:i}=t;if(i&&e&&n){const[o,a]=e.getSize(),[s,l,u,c]=i.getViewport(),d=e.getComputedDevicePixelRatio(),p=[o*(u-s)/d,a*(c-l)/d],f=n.getPosition(),h=n.getDirectionOfProjection(),m=n.getParallelProjection(),g=m?2*n.getParallelScale():2*Math.tan(r.f.radiansFromDegrees(n.getViewAngle())/2);t.widgets.forEach((e=>{e.getNestedProps().forEach((e=>{e.getScaleInPixels()&&e.setDisplayScaleParams({dispHeightFactor:g,cameraPosition:f,cameraDir:h,isParallel:m,rendererPixelDims:p})}))}))}}async function v(n,r,i){const{position:o}=n,{requestCount:a,selectedState:s,representation:l,widget:u}=await e.getSelectedDataForXY(o.x,o.y);if(a||i!==t._currentUpdateSelectionCallID)return;function c(e){r&&t._interactor.invokeLeftButtonRelease(n),e.activateHandle({selectedState:s,representation:l}),r&&t._interactor.invokeLeftButtonPress(n)}t._apiSpecificRenderWindow.setCursor(u?"pointer":"default"),t.activeWidget=null;let d=!1;if(t.widgetInFocus===u&&u.hasFocus())c(u),t.activeWidget=u,d=!0;else for(let e=0;e1&&void 0!==arguments[1]&&arguments[1];if(!t.isAnimating&&t.pickingEnabled&&e.pokedRenderer===t._renderer){const r=Symbol("UpdateSelection");t._currentUpdateSelectionCallID=r,await v(e,n,r)}};function _(e){e.updateRepresentationForRender(t.renderingType)}function b(){t.renderingType=u.FRONT_BUFFER,t.widgets.forEach(_)}async function x(e,n,r,i){t._captureInProgress||(t._captureInProgress=!0,t.renderingType=u.PICKING_BUFFER,t.widgets.forEach(_),t._capturedBuffers=null,t._capturedBuffers=await t._selector.getSourceDataAsync(t._renderer,e,n,r,i),t.previousSelectedData=null,b(),t._captureInProgress=!1)}function w(r){r.setWidgetManager(e),function(e){const t=e.getRepresentations();for(let r=0;r{t.pickingEnabled=!0,e.renderWidgets()},e.renderWidgets=()=>{if(t.pickingEnabled&&t.captureOn===c.MOUSE_RELEASE){const[e,n]=t._apiSpecificRenderWindow.getSize();x(0,0,e,n)}b(),e.modified()},e.disablePicking=()=>{t.pickingEnabled=!1},e.setRenderer=n=>{const r=h(n);for(Object.assign(t,r),o.m.moveToProtected({},t,Object.keys(r));a.length;)a.pop().unsubscribe();t._selector=t._apiSpecificRenderWindow.createSelector(),t._selector.setFieldAssociation(i.M_.FIELD_ASSOCIATION_POINTS),a.push(t._apiSpecificRenderWindow.onWindowResizeEvent(g)),a.push(t._camera.onModified(g)),g(),a.push(t._interactor.onStartAnimation((()=>{t.isAnimating=!0}))),a.push(t._interactor.onEndAnimation((()=>{t.isAnimating=!1,e.renderWidgets()}))),a.push(t._interactor.onMouseMove((e=>(y(e),o.m.VOID)))),a.push(t._interactor.onLeftButtonPress((e=>{const{deviceType:t}=e,n="touch"===t||"pen"===t;return n&&y(e,n),o.m.VOID}),s.e/2)),e.modified(),t.pickingEnabled&&e.enablePicking()},e.addWidget=(n,r,i)=>{if(!t._renderer)return d("Widget manager MUST BE link to a view before registering widgets"),null;const{viewId:o,_renderer:a}=t,s=n.getWidgetForView({viewId:o,renderer:a,viewType:r||l.DEFAULT,initialValues:i});return null!=s&&-1===t.widgets.indexOf(s)&&(t.widgets.push(s),w(s),e.modified()),s},e.removeWidgets=()=>{t.widgets.forEach(S),t.widgets=[],t.widgetInFocus=null,C()},e.removeWidget=n=>{const r=m(n),i=t.widgets.indexOf(r);if(-1!==i){t.widgets.splice(i,1);t.widgetInFocus===r&&e.releaseFocus(),S(r),C()}},e.getSelectedDataForXY=async(n,r)=>{if(t.selections=null,t.pickingEnabled){if(t._capturedBuffers&&t.captureOn!==c.MOUSE_MOVE){const e=t._capturedBuffers.area;(ne[2]||re[3])&&await x(n,r,n,r)}else await x(n,r,n,r);t.selections=t._capturedBuffers.generateSelection(n,r,n,r)}return e.getSelectedData()},e.updateSelectionFromXY=(e,n)=>{p("updateSelectionFromXY is deprecated, please use getSelectedDataForXY"),t.pickingEnabled&&t.captureOn===c.MOUSE_MOVE&&x(e,n,e,n)},e.updateSelectionFromMouseEvent=n=>{p("updateSelectionFromMouseEvent is deprecated, please use getSelectedDataForXY");const{pageX:r,pageY:i}=n,{top:o,left:a,height:s}=t._apiSpecificRenderWindow.getCanvas().getBoundingClientRect(),l=r-a,u=s-(i-o);e.updateSelectionFromXY(l,u)},e.getSelectedData=()=>{if(!t.selections||!t.selections.length)return t.previousSelectedData=null,{};const{propID:e,compositeID:r,prop:i}=t.selections[0].getProperties();let{widget:o,representation:a}=t.selections[0].getProperties();if(t.previousSelectedData&&t.previousSelectedData.prop===i&&t.previousSelectedData.widget===o&&t.previousSelectedData.compositeID===r)return t.previousSelectedData.requestCount++,t.previousSelectedData;if(n.has(i)){const e=n.get(i);o=e.widget,a=e.representation}if(o&&a){const n=a.getSelectedState(i,r);return t.previousSelectedData={requestCount:0,propID:e,compositeID:r,prop:i,widget:o,representation:a,selectedState:n},t.previousSelectedData}return t.previousSelectedData=null,{}},e.grabFocus=e=>{const n=m(e);t.widgetInFocus&&t.widgetInFocus!==n&&t.widgetInFocus.loseFocus(),t.widgetInFocus=n,t.widgetInFocus&&t.widgetInFocus.grabFocus()},e.releaseFocus=()=>e.grabFocus(null);const T=e.delete;e.delete=()=>{for(;a.length;)a.pop().unsubscribe();T()}}const v={viewId:null,widgets:[],activeWidget:null,renderer:null,viewType:l.DEFAULT,isAnimating:!1,pickingEnabled:!0,selections:null,previousSelectedData:null,widgetInFocus:null,captureOn:c.MOUSE_MOVE};function y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,v,n),o.m.obj(e,t),o.m.setGet(e,t,["captureOn",{type:"enum",name:"viewType",enum:l}]),o.m.get(e,t,["selections","widgets","viewId","pickingEnabled","activeWidget"]),g(e,t)}var _={newInstance:o.m.newInstance(y,"vtkWidgetManager"),extend:y,Constants:a.ZP,getPixelWorldHeightAtCoord:m}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return g}});var r=n(0),i=n(468),o=n(32),a=n(21),s=n(472);function l(e,t){t.classHierarchy.push("vtkAbstractWidget"),t.actorToRepresentationMap=new WeakMap,e.getBounds=t.widgetState.getBounds,e.getNestedProps=()=>t.representations,e.activateHandle=n=>{let{selectedState:r,representation:i}=n;t.widgetState.activateOnly(r),t.activeState=r,r&&r.updateManipulator&&r.updateManipulator(),e.invokeActivateHandle({selectedState:r,representation:i}),e.updateCursor&&e.updateCursor()},e.deactivateAllHandles=()=>{t.widgetState.deactivate()},e.hasActor=e=>t.actorToRepresentationMap.has(e),e.grabFocus=()=>{t.hasFocus=!0},e.loseFocus=()=>{t.hasFocus=!1},e.hasFocus=()=>t.hasFocus,e.placeWidget=e=>t.widgetState.placeWidget(e),e.getPlaceFactor=()=>t.widgetState.getPlaceFactor(),e.setPlaceFactor=e=>t.widgetState.setPlaceFactor(e),e.getRepresentationFromActor=e=>t.actorToRepresentationMap.get(e),e.updateRepresentationForRender=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.rT.FRONT_BUFFER;for(let n=0;nt._factory.getViewWidgets(),e.setPriority(s.e)}const u={contextVisibility:!0,handleVisibility:!0,hasFocus:!1};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),o.ZP.extend(e,t,n),i.ZP.extend(e,t,n),r.m.setGet(e,t,["contextVisibility","handleVisibility","_widgetManager"]),r.m.get(e,t,["representations","widgetState","activeState"]),r.m.moveToProtected(e,t,["widgetManager"]),r.m.event(e,t,"ActivateHandle"),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkAbstractWidget"),extend:c},p=n(62);function f(){}function h(e,t){t.classHierarchy.push("vtkAbstractWidgetFactory");const n={};e.getWidgetForView=i=>{let{viewId:o,renderer:a,viewType:s,initialValues:l}=i;if(!n[o]){if(!a)return null;const{interactor:i,apiSpecificRenderWindow:u,camera:c}=(0,p.xB)(a),f={},h={};r.m.obj(h,f),Object.assign(h,{onWidgetChange:e.onWidgetChange}),Object.assign(f,{widgetState:t.widgetState,manipulator:t.manipulator,viewType:s,renderer:a,camera:c,apiSpecificRenderWindow:u,factory:e}),r.m.moveToProtected(h,f,["renderer","camera","apiSpecificRenderWindow","factory"]),r.m.get(h,f,["viewType"]),r.m.safeArrays(f),d.extend(h,f,l);const m=l;f.representations=e.getRepresentationsForViewType(s).map((e=>{let{builder:t,labels:n,initialValues:r}=e;return t.newInstance({_parentProp:h,labels:n,...r,...m})})),f.representations.forEach((e=>{e.setInputData(f.widgetState),e.getActors().forEach((t=>{f.actorToRepresentationMap.set(t,e)}))})),t.behavior(h,f),["coincidentTopologyParameters",...t.methodsToLink||[]].forEach((e=>{const t=`set${r.m.capitalize(e)}`,n=`get${r.m.capitalize(e)}`,i={[e]:[],[t]:[],[n]:[]};f.representations.forEach((r=>{r[e]&&i[e].push(r[e]),r[t]&&i[t].push(r[t]),r[n]&&i[n].push(r[n])})),Object.keys(i).forEach((e=>{const t=i[e];1===t.length?h[e]=t[0]:t.length>1&&(h[e]=r.m.chain(...t))}))})),h.delete=r.m.chain((()=>{delete n[o]}),h.delete),h.setInteractor(i);const g=Object.freeze(h);return n[o]=g,g}return n[o]},e.getViewIds=()=>Object.keys(n),e.getViewWidgets=()=>Object.values(n),e.setVisibility=e=>{const t=Object.keys(n);for(let r=0;r{const t=Object.keys(n);for(let r=0;r{const t=Object.keys(n);for(let r=0;r{const t=Object.keys(n);for(let r=0;r{const t=Object.keys(n);for(let r=0;rt.widgetState.placeWidget(e),e.getPlaceFactor=()=>t.widgetState.getPlaceFactor(),e.setPlaceFactor=e=>t.widgetState.setPlaceFactor(e);let i=f;e.delete=r.m.chain(e.delete,(()=>i())),t.widgetState&&(i=t.widgetState.onModified((()=>e.invokeWidgetChange(t.widgetState))).unsubscribe)}function m(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,n),r.m.obj(e,t),r.m.get(e,t,["widgetState"]),r.m.event(e,t,"WidgetChange"),h(e,t)}var g={newInstance:r.m.newInstance(m,"vtkAbstractWidget"),extend:m}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(0),i=n(43),o=n(474);function a(e,t,n,r,o,a){const s=a.displayToWorld(e,t,0,o),l=a.displayToWorld(e,t,1,o);return i.ZP.intersectWithLine(s,l,n,r).x}function s(e,t){t.classHierarchy.push("vtkPlaneManipulator"),e.handleEvent=(t,n)=>({worldCoords:a(t.position.x,t.position.y,e.getOrigin(t),e.getNormal(t),t.pokedRenderer,n)})}function l(e){return{...e}}function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o.ZP.extend(e,t,l(n)),s(e,t)}var c={intersectDisplayWithPlane:a,extend:u,newInstance:r.m.newInstance(u,"vtkPlaneManipulator")}},function(e,t,n){"use strict";var r=n(17),i=n(336),o=n(91),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(l=n(138)),l),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(a)})),e.exports=u},function(e){"use strict";var t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),i=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),r=t.obj[t.prop];if(n(r)){for(var i=[],o=0;o=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?o+=i.charAt(a):s<128?o+=r[s]:s<2048?o+=r[192|s>>6]+r[128|63&s]:s<55296||s>=57344?o+=r[224|s>>12]+r[128|s>>6&63]+r[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&i.charCodeAt(a)),o+=r[240|s>>18]+r[128|s>>12&63]+r[128|s>>6&63]+r[128|63&s])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(n(e)){for(var r=[],i=0;ie.setVectorMode(l.MAGNITUDE),e.setVectorModeToComponent=()=>e.setVectorMode(l.COMPONENT),e.setVectorModeToRGBColors=()=>e.setVectorMode(l.RGBCOLORS),e.build=()=>{},e.isOpaque=()=>!0,e.setAnnotations=(n,r)=>{if(!(n&&!r||!n&&r))if(n&&r&&n.length!==r.length)d("Values and annotations do not have the same number of tuples so ignoring");else{if(t.annotationArray=[],r&&n){const e=r.length;for(let i=0;i{let i=e.checkForAnnotatedValue(n),o=!1;return i>=0?t.annotationArray[i].annotation!==r&&(t.annotationArray[i].annotation=r,o=!0):(t.annotationArray.push({value:n,annotation:r}),i=t.annotationArray.length-1,o=!0),o&&(e.updateAnnotatedValueMap(),e.modified()),i},e.getNumberOfAnnotatedValues=()=>t.annotationArray.length,e.getAnnotatedValue=e=>e<0||e>=t.annotationArray.length?null:t.annotationArray[e].value,e.getAnnotation=e=>void 0===t.annotationArray[e]?null:t.annotationArray[e].annotation,e.getAnnotatedValueIndex=n=>t.annotationArray.length?e.checkForAnnotatedValue(n):-1,e.removeAnnotation=n=>{const r=e.checkForAnnotatedValue(n),i=r>=0;return i&&(t.annotationArray.splice(r,1),e.updateAnnotatedValueMap(),e.modified()),i},e.resetAnnotations=()=>{t.annotationArray=[],t.annotatedValueMap=[],e.modified()},e.getAnnotationColor=(n,r)=>{if(t.indexedLookup){const t=e.getAnnotatedValueIndex(n);e.getIndexedColor(t,r)}else e.getColor(parseFloat(n),r),r[3]=1},e.checkForAnnotatedValue=t=>e.getAnnotatedValueIndexInternal(t),e.getAnnotatedValueIndexInternal=e=>{if(void 0!==t.annotatedValueMap[e]){const n=t.annotationArray.length;return t.annotatedValueMap[e]%n}return-1},e.getIndexedColor=(e,t)=>{t[0]=0,t[1]=0,t[2]=0,t[3]=0},e.updateAnnotatedValueMap=()=>{t.annotatedValueMap=[];const e=t.annotationArray.length;for(let n=0;n{const a=t.getNumberOfComponents();let l=null;if(n===c.DEFAULT&&t.getDataType()===u.UNSIGNED_CHAR||n===c.DIRECT_SCALARS&&t)l=e.convertToRGBA(t,a,t.getNumberOfTuples());else{const n={type:"vtkDataArray",name:"temp",numberOfComponents:4,dataType:u.UNSIGNED_CHAR},c=r.m.newTypedArray(n.dataType,4*t.getNumberOfTuples());n.values=c,n.size=c.length,l=i.ZP.newInstance(n);let d=o;d<0&&a>1?e.mapVectorsThroughTable(t,l,s.RGBA,-1,-1):(d<0&&(d=0),d>=a&&(d=a-1),e.mapScalarsThroughTable(t,l,s.RGBA,d))}return l},e.mapVectorsToMagnitude=(e,t,n)=>{const r=e.getNumberOfTuples(),i=e.getNumberOfComponents(),o=t.getData(),a=e.getData();for(let e=0;e{let s=e.getVectorMode(),u=a,c=o;const d=t.getNumberOfComponents();s===l.COMPONENT?(-1===c&&(c=e.getVectorComponent()),c<0&&(c=0),c>=d&&(c=d-1)):(-1===u&&(u=e.getVectorSize()),u<=0?(c=0,u=d):(c<0&&(c=0),c>=d&&(c=d-1),c+u>d&&(u=d-c)),s!==l.MAGNITUDE||1!==d&&1!==u||(s=l.COMPONENT));let p=0;switch(c>0&&(p=c),s){case l.COMPONENT:e.mapScalarsThroughTable(t,n,r,p);break;case l.RGBCOLORS:break;case l.MAGNITUDE:default:{const o=i.ZP.newInstance({numberOfComponents:1,values:new Float32Array(t.getNumberOfTuples())});e.mapVectorsToMagnitude(t,o,u),e.mapScalarsThroughTable(o,n,r,0);break}}},e.luminanceToRGBA=(e,t,n,r)=>{const i=r(n),o=t.getData(),a=e.getData(),s=o.length;let l=0;for(let e=0;e{const i=t.getData(),o=e.getData(),a=i.length;let s=0;for(let e=0;e{const i=f(n),o=t.getData(),a=e.getData(),s=o.length;let l=0;for(let e=0;e{const i=t.getData(),o=e.getData(),a=i.length;let s=0;for(let e=0;e{let{alpha:a}=t;if(4===r&&a>=1&&n.getDataType()===u.UNSIGNED_CHAR)return n;const s=i.ZP.newInstance({numberOfComponents:4,empty:!0,size:4*o,dataType:u.UNSIGNED_CHAR});if(o<=0)return s;a=a>0?a:0,a=a<1?a:1;let l=p;switch(n.getDataType()!==u.FLOAT&&n.getDataType()!==u.DOUBLE||(l=f),r){case 1:e.luminanceToRGBA(s,n,a,l);break;case 2:e.luminanceAlphaToRGBA(s,n,l);break;case 3:e.rGBToRGBA(s,n,a,l);break;case 4:e.rGBAToRGBA(s,n,a,l);break;default:return d("Cannot convert colors"),null}return s},e.usingLogScale=()=>!1,e.getNumberOfAvailableColors=()=>16777216,e.setRange=(t,n)=>e.setMappingRange(t,n),e.getRange=()=>e.getMappingRange(),e.areScalarsOpaque=(n,r,i)=>{if(!n)return e.isOpaque();const o=n.getNumberOfComponents();if(r===c.DEFAULT&&n.getDataType()===u.UNSIGNED_CHAR||r===c.DIRECT_SCALARS){if(3===o||1===o)return t.alpha>=1;return 255===n.getRange(o-1)[0]}return!0}}const m={alpha:1,vectorComponent:0,vectorSize:-1,vectorMode:l.COMPONENT,mappingRange:null,annotationArray:null,annotatedValueMap:null,indexedLookup:!1};function g(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,m,n),r.m.obj(e,t),t.mappingRange=[0,255],t.annotationArray=[],t.annotatedValueMap=[],r.m.setGet(e,t,["vectorSize","vectorComponent","vectorMode","alpha","indexedLookup"]),r.m.setArray(e,t,["mappingRange"],2),r.m.getArray(e,t,["mappingRange"]),h(e,t)}var v={newInstance:r.m.newInstance(g,"vtkScalarsToColors"),extend:g,...o.ZP}},function(e,t,n){"use strict";n.d(t,{_5:function(){return r},ZP:function(){return i}});const r={DEFAULT:0,USE_POINT_DATA:1,USE_CELL_DATA:2,USE_POINT_FIELD_DATA:3,USE_CELL_FIELD_DATA:4,USE_FIELD_DATA:5};var i={ColorMode:{DEFAULT:0,MAP_SCALARS:1,DIRECT_SCALARS:2},GetArray:{BY_ID:0,BY_NAME:1},ScalarMode:r}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(0),i=n(53);const{ObjectType:o}=i.Z;function a(e,t){function n(e){switch(e){case o.ELEMENT_ARRAY_BUFFER:return t.context.ELEMENT_ARRAY_BUFFER;case o.TEXTURE_BUFFER:if("TEXTURE_BUFFER"in t.context)return t.context.TEXTURE_BUFFER;case o.ARRAY_BUFFER:default:return t.context.ARRAY_BUFFER}}t.classHierarchy.push("vtkOpenGLBufferObject");let r=null,i=null,a=!0,s="";e.getType=()=>r,e.setType=e=>{r=e},e.getHandle=()=>i,e.isReady=()=>!1===a,e.generateBuffer=e=>{const o=n(e);return null===i&&(i=t.context.createBuffer(),r=e),n(r)===o},e.upload=(o,l)=>e.generateBuffer(l)?(t.context.bindBuffer(n(r),i),t.context.bufferData(n(r),o,t.context.STATIC_DRAW),a=!1,!0):(s="Trying to upload array buffer to incompatible buffer.",!1),e.bind=()=>!!i&&(t.context.bindBuffer(n(r),i),!0),e.release=()=>!!i&&(t.context.bindBuffer(n(r),null),!0),e.releaseGraphicsResources=()=>{null!==i&&(t.context.bindBuffer(n(r),null),t.context.deleteBuffer(i),i=null)},e.setOpenGLRenderWindow=n=>{t._openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t._openGLRenderWindow=n,t.context=null,n&&(t.context=t._openGLRenderWindow.getContext()))},e.getError=()=>s}const s={objectType:o.ARRAY_BUFFER,context:null};function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),r.m.obj(e,t),r.m.get(e,t,["_openGLRenderWindow"]),r.m.moveToProtected(e,t,["openGLRenderWindow"]),a(e,t)}var u={newInstance:r.m.newInstance(l),extend:l,...i.Z}},function(e,t,n){"use strict";n.d(t,{P:function(){return r},Z:function(){return i}});const r={NONE:-1,I:0,J:1,K:2,X:3,Y:4,Z:5};var i={SlicingMode:r}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(0),i=n(115);const o=["getMappedRange","mapAsync","unmap"];function a(e,t){t.classHierarchy.push("vtkWebGPUBuffer"),e.create=(e,n)=>{t.handle=t.device.getHandle().createBuffer({size:e,usage:n,label:t.label}),t.sizeInBytes=e,t.usage=n},e.write=e=>{!function(e,t,n,r){const i=r.byteLength,o=e.createBuffer({size:i,usage:GPUBufferUsage.COPY_SRC,mappedAtCreation:!0}),a=o.getMappedRange(0,i);new Uint8Array(a).set(new Uint8Array(r)),o.unmap();const s=e.createCommandEncoder();s.copyBufferToBuffer(o,0,t,n,i);const l=s.finish();e.queue.submit([l]),o.destroy()}(t.device.getHandle(),t.handle,0,e.buffer)},e.createAndWrite=(e,n)=>{t.handle=t.device.getHandle().createBuffer({size:e.byteLength,usage:n,mappedAtCreation:!0,label:t.label}),t.sizeInBytes=e.byteLength,t.usage=n,new Uint8Array(t.handle.getMappedRange()).set(new Uint8Array(e.buffer)),t.handle.unmap()};for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),r.m.obj(e,t),r.m.get(e,t,["handle","sizeInBytes","usage"]),r.m.setGet(e,t,["strideInBytes","device","arrayInformation","label","sourceTime"]),a(e,t)}var u={newInstance:r.m.newInstance(l),extend:l,...i.ZP}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return s}});var r=n(0);function i(e,t){t.classHierarchy.push("vtkWebGPUSampler"),e.create=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.device=e,t.options.addressModeU=n.addressModeU?n.addressModeU:"clamp-to-edge",t.options.addressModeV=n.addressModeV?n.addressModeV:"clamp-to-edge",t.options.addressModeW=n.addressModeW?n.addressModeW:"clamp-to-edge",t.options.magFilter=n.magFilter?n.magFilter:"nearest",t.options.minFilter=n.minFilter?n.minFilter:"nearest",t.options.mipmapFilter=n.mipmapFilter?n.mipmapFilter:"nearest",t.options.label=t.label,t.handle=t.device.getHandle().createSampler(t.options),t.bindGroupTime.modified()},e.getShaderCode=(e,n)=>`@binding(${e}) @group(${n}) var ${t.label}: sampler;`,e.getBindGroupEntry=()=>({resource:t.handle})}const o={device:null,handle:null,label:null,options:null};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.obj(e,t),t.options={},t.bindGroupLayoutEntry={visibility:GPUShaderStage.VERTEX|GPUShaderStage.FRAGMENT,sampler:{}},t.bindGroupTime={},r.m.obj(t.bindGroupTime,{mtime:0}),r.m.get(e,t,["bindGroupTime","handle","options"]),r.m.setGet(e,t,["bindGroupLayoutEntry","device","label"]),i(e,t)}var s={newInstance:r.m.newInstance(a),extend:a}},,function(){},function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=184)}([function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(240)),r(n(251)),r(n(175)),r(n(107)),r(n(29)),r(n(73)),r(n(106)),r(n(30)),r(n(252)),r(n(52)),r(n(97)),r(n(253)),r(n(37)),r(n(51)),r(n(173)),r(n(176)),r(n(172)),r(n(108)),r(n(254)),r(n(255)),r(n(256)),r(n(72)),r(n(177)),r(n(105)),r(n(17)),r(n(257)),r(n(12)),r(n(174))},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(212);t.FixedSizeSet=i.FixedSizeSet;var o=n(213);t.ObjectCache=o.ObjectCache;var a=n(214);t.CompareCache=a.CompareCache;var s=n(215);t.Lazy=s.Lazy;var l=n(216);function u(e,t,n){if(m(e))e.forEach((function(e,r){return t.call(n,r,e)}));else for(var r in e)e.hasOwnProperty(r)&&t.call(n,r,e[r])}function c(e){var t,n;if(d(e))return e;if(f(e)){var i=[];try{for(var o=r(e),a=o.next();!a.done;a=o.next()){var s=a.value;i.push(c(s))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}if(p(e)){for(var l in i={},e)if(e.hasOwnProperty(l)){var u=e[l];i[l]=c(u)}return i}return e}function d(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)}function p(e){var t=typeof e;return!!e&&("function"===t||"object"===t)}function f(e){return Array.isArray(e)}function h(e){return e instanceof Set}function m(e){return e instanceof Map}function g(e){if(p(e)){var t=Object.getPrototypeOf(e),n=t.constructor;return t&&n&&"function"==typeof n&&n instanceof n&&Function.prototype.toString.call(n)===Function.prototype.toString.call(Object)}return!1}t.StringWalker=l.StringWalker,t.applyMixin=function(e,t){for(var n=[],r=2;r>6|192;else{if(i>55295&&i<56320){if(++r>=e.length)throw new Error("Incomplete surrogate pair.");var o=e.charCodeAt(r);if(o<56320||o>57343)throw new Error("Invalid surrogate character.");i=65536+((1023&i)<<10)+(1023&o),t[n++]=i>>18|240,t[n++]=i>>12&63|128}else t[n++]=i>>12|224;t[n++]=i>>6&63|128}t[n++]=63&i|128}}return t.subarray(0,n)},t.utf8Decode=function(e){for(var t="",n=0;n127)if(r>191&&r<224){if(n>=e.length)throw new Error("Incomplete 2-byte sequence.");r=(31&r)<<6|63&e[n++]}else if(r>223&&r<240){if(n+1>=e.length)throw new Error("Incomplete 3-byte sequence.");r=(15&r)<<12|(63&e[n++])<<6|63&e[n++]}else{if(!(r>239&&r<248))throw new Error("Unknown multi-byte start.");if(n+2>=e.length)throw new Error("Incomplete 4-byte sequence.");r=(7&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++]}if(r<=65535)t+=String.fromCharCode(r);else{if(!(r<=1114111))throw new Error("Code point exceeds UTF-16 limit.");r-=65536,t+=String.fromCharCode(r>>10|55296),t+=String.fromCharCode(1023&r|56320)}}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Before=0]="Before",e[e.Equal=1]="Equal",e[e.After=2]="After"}(t.BoundaryPosition||(t.BoundaryPosition={})),function(e){e[e.None=0]="None",e[e.Capturing=1]="Capturing",e[e.AtTarget=2]="AtTarget",e[e.Bubbling=3]="Bubbling"}(t.EventPhase||(t.EventPhase={})),function(e){e[e.Element=1]="Element",e[e.Attribute=2]="Attribute",e[e.Text=3]="Text",e[e.CData=4]="CData",e[e.EntityReference=5]="EntityReference",e[e.Entity=6]="Entity",e[e.ProcessingInstruction=7]="ProcessingInstruction",e[e.Comment=8]="Comment",e[e.Document=9]="Document",e[e.DocumentType=10]="DocumentType",e[e.DocumentFragment=11]="DocumentFragment",e[e.Notation=12]="Notation"}(t.NodeType||(t.NodeType={})),function(e){e[e.Disconnected=1]="Disconnected",e[e.Preceding=2]="Preceding",e[e.Following=4]="Following",e[e.Contains=8]="Contains",e[e.ContainedBy=16]="ContainedBy",e[e.ImplementationSpecific=32]="ImplementationSpecific"}(t.Position||(t.Position={})),function(e){e[e.Accept=1]="Accept",e[e.Reject=2]="Reject",e[e.Skip=3]="Skip"}(t.FilterResult||(t.FilterResult={})),function(e){e[e.All=4294967295]="All",e[e.Element=1]="Element",e[e.Attribute=2]="Attribute",e[e.Text=4]="Text",e[e.CDataSection=8]="CDataSection",e[e.EntityReference=16]="EntityReference",e[e.Entity=32]="Entity",e[e.ProcessingInstruction=64]="ProcessingInstruction",e[e.Comment=128]="Comment",e[e.Document=256]="Document",e[e.DocumentType=512]="DocumentType",e[e.DocumentFragment=1024]="DocumentFragment",e[e.Notation=2048]="Notation"}(t.WhatToShow||(t.WhatToShow={})),function(e){e[e.StartToStart=0]="StartToStart",e[e.StartToEnd=1]="StartToEnd",e[e.EndToEnd=2]="EndToEnd",e[e.EndToStart=3]="EndToStart"}(t.HowToCompare||(t.HowToCompare={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(241);t.Cast=r.Cast;var i=n(150);t.Guard=i.Guard;var o=n(242);t.EmptySet=o.EmptySet},function(e,t,n){var r=n(11),i=n(55).f,o=n(21),a=n(25),s=n(80),l=n(119),u=n(123);e.exports=function(e,t){var n,c,d,p,f,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||s(h,{}):(r[h]||{}).prototype)for(c in t){if(p=t[c],d=e.noTargetGet?(f=i(n,c))&&f.value:n[c],!u(m?c:h+(g?".":"#")+c,e.forced)&&void 0!==d){if(typeof p==typeof d)continue;l(p,d)}(e.sham||d&&d.sham)&&o(p,"sham",!0),a(n,c,p,e)}}},function(e,t,n){var r=n(11),i=n(81),o=n(14),a=n(58),s=n(86),l=n(124),u=i("wks"),c=r.Symbol,d=l?c:c&&c.withoutSetter||a;e.exports=function(e){return o(u,e)||(s&&o(c,e)?u[e]=c[e]:u[e]=d("Symbol."+e)),u[e]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(29),o=function(){function e(){this._features={mutationObservers:!0,customElements:!0,slots:!0,steps:!0},this._window=null,this._compareCache=new r.CompareCache,this._rangeList=new r.FixedSizeSet}return e.prototype.setFeatures=function(e){if(void 0===e&&(e=!0),r.isObject(e))for(var t in e)this._features[t]=e[t]||!1;else for(var t in this._features)this._features[t]=e},Object.defineProperty(e.prototype,"features",{get:function(){return this._features},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return null===this._window&&(this._window=i.create_window()),this._window},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"compareCache",{get:function(){return this._compareCache},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rangeList",{get:function(){return this._rangeList},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return e._instance||(e._instance=new e),e._instance},enumerable:!0,configurable:!0}),e}();t.dom=o.instance},function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(228));t.base64=i;var o=r(n(146));t.byte=o;var a=r(n(147));t.byteSequence=a;var s=r(n(96));t.codePoint=s;var l=r(n(232));t.json=l;var u=r(n(233));t.list=u;var c=r(n(234));t.map=c;var d=r(n(235));t.namespace=d;var p=r(n(236));t.queue=p;var f=r(n(237));t.set=f;var h=r(n(238));t.stack=h;var m=r(n(239));t.string=m},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n){void 0===n&&(n="");var r=e.call(this,n)||this;return r.name=t,r}return i(t,e),t}(Error);t.DOMException=o;var a=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"DOMStringSizeError",t)||this}return i(t,e),t}(o);t.DOMStringSizeError=a;var s=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"WrongDocumentError","The object is in the wrong document. "+t)||this}return i(t,e),t}(o);t.WrongDocumentError=s;var l=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NoDataAllowedError",t)||this}return i(t,e),t}(o);t.NoDataAllowedError=l;var u=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NoModificationAllowedError","The object can not be modified. "+t)||this}return i(t,e),t}(o);t.NoModificationAllowedError=u;var c=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NotSupportedError","The operation is not supported. "+t)||this}return i(t,e),t}(o);t.NotSupportedError=c;var d=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InUseAttributeError",t)||this}return i(t,e),t}(o);t.InUseAttributeError=d;var p=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidStateError","The object is in an invalid state. "+t)||this}return i(t,e),t}(o);t.InvalidStateError=p;var f=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidModificationError","The object can not be modified in this way. "+t)||this}return i(t,e),t}(o);t.InvalidModificationError=f;var h=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NamespaceError","The operation is not allowed by Namespaces in XML. [XMLNS] "+t)||this}return i(t,e),t}(o);t.NamespaceError=h;var m=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidAccessError","The object does not support the operation or argument. "+t)||this}return i(t,e),t}(o);t.InvalidAccessError=m;var g=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"ValidationError",t)||this}return i(t,e),t}(o);t.ValidationError=g;var v=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"TypeMismatchError",t)||this}return i(t,e),t}(o);t.TypeMismatchError=v;var y=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"SecurityError","The operation is insecure. "+t)||this}return i(t,e),t}(o);t.SecurityError=y;var _=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NetworkError","A network error occurred. "+t)||this}return i(t,e),t}(o);t.NetworkError=_;var b=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"AbortError","The operation was aborted. "+t)||this}return i(t,e),t}(o);t.AbortError=b;var x=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"URLMismatchError","The given URL does not match another URL. "+t)||this}return i(t,e),t}(o);t.URLMismatchError=x;var w=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"QuotaExceededError","The quota has been exceeded. "+t)||this}return i(t,e),t}(o);t.QuotaExceededError=w;var S=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"TimeoutError","The operation timed out. "+t)||this}return i(t,e),t}(o);t.TimeoutError=S;var C=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidNodeTypeError","The supplied node is incorrect or has an incorrect ancestor for this operation. "+t)||this}return i(t,e),t}(o);t.InvalidNodeTypeError=C;var T=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"DataCloneError","The object can not be cloned. "+t)||this}return i(t,e),t}(o);t.DataCloneError=T;var M=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NotImplementedError","The DOM method is not implemented by this module. "+t)||this}return i(t,e),t}(o);t.NotImplementedError=M;var D=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"HierarchyRequestError","The operation would yield an incorrect node tree. "+t)||this}return i(t,e),t}(o);t.HierarchyRequestError=D;var A=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NotFoundError","The object can not be found here. "+t)||this}return i(t,e),t}(o);t.NotFoundError=A;var P=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"IndexSizeError","The index is not in the allowed range. "+t)||this}return i(t,e),t}(o);t.IndexSizeError=P;var k=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"SyntaxError","The string did not match the expected pattern. "+t)||this}return i(t,e),t}(o);t.SyntaxError=k;var L=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidCharacterError","The string contains invalid characters. "+t)||this}return i(t,e),t}(o);t.InvalidCharacterError=L},function(e,t,n){"use strict";var r=n(53),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===i.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(78))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.idl_defineConst=function(e,t,n){Object.defineProperty(e,t,{writable:!1,enumerable:!0,configurable:!1,value:n})}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(16),i=n(115),o=n(18),a=n(56),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(8);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(2);function a(e,t,n){if(void 0===n&&(n=!1),n&&i.Guard.isElementNode(t)&&i.Guard.isShadowRoot(t.shadowRoot)&&t.shadowRoot._firstChild)return t.shadowRoot._firstChild;if(t._firstChild)return t._firstChild;if(t===e)return null;if(t._nextSibling)return t._nextSibling;for(var r=t._parent;r&&r!==e;){if(r._nextSibling)return r._nextSibling;r=r._parent}return null}function s(){var e;return(e={})[Symbol.iterator]=function(){return{next:function(){return{done:!0,value:null}}}},e}function l(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);for(var i=t?e:a(e,e,n);i&&r&&!r(i);)i=a(e,i,n);return i}function u(e,t,n,r,i){void 0===n&&(n=!1),void 0===r&&(r=!1);for(var o=a(e,t,r);o&&i&&!i(o);)o=a(e,o,r);return o}function c(e,t,n,r){var i;return void 0===t&&(t=!1),void 0===n&&(n=!1),t||0!==e._children.size?((i={})[Symbol.iterator]=function(){var i=t?e:a(e,e,n);return{next:function(){for(;i&&r&&!r(i);)i=a(e,i,n);if(null===i)return{done:!0,value:null};var t={done:!1,value:i};return i=a(e,i,n),t}}},i):s()}function d(e,t,n){void 0===t&&(t=!1);for(var r=t?e:e._parent;r&&n&&!n(r);)r=r._parent;return r}function p(e,t,n,r){void 0===n&&(n=!1);for(var i=t._parent;i&&r&&!r(i);)i=i._parent;return i}function f(e){return i.Guard.isDocumentTypeNode(e)?0:i.Guard.isCharacterDataNode(e)?e._data.length:e._children.size}function h(e,t){if(void 0===t&&(t=!1),t){var n=h(e,!1);return i.Guard.isShadowRoot(n)?h(n._host,!0):n}return e._parent?h(e._parent):e}function m(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r=!1);for(var o=n?e:r&&i.Guard.isShadowRoot(e)?e._host:e._parent;null!==o;){if(o===t)return!0;o=r&&i.Guard.isShadowRoot(o)?o._host:o._parent}return!1}function g(e){for(var t=h(e),n=0,r=l(t);null!==r;){if(n++,r===e)return n;r=u(t,r)}return-1}t.tree_getFirstDescendantNode=l,t.tree_getNextDescendantNode=u,t.tree_getDescendantNodes=c,t.tree_getDescendantElements=function(e,t,n,r){var o;return void 0===t&&(t=!1),void 0===n&&(n=!1),t||0!==e._children.size?((o={})[Symbol.iterator]=function(){var o=c(e,t,n,(function(e){return i.Guard.isElementNode(e)}))[Symbol.iterator](),a=o.next().value;return{next:function(){for(;a&&r&&!r(a);)a=o.next().value;if(null===a)return{done:!0,value:null};var e={done:!1,value:a};return a=o.next().value,e}}},o):s()},t.tree_getSiblingNodes=function(e,t,n){var r;return void 0===t&&(t=!1),e._parent&&0!==e._parent._children.size?((r={})[Symbol.iterator]=function(){var r=e._parent?e._parent._firstChild:null;return{next:function(){for(;r&&(n&&!n(r)||!t&&r===e);)r=r._nextSibling;if(null===r)return{done:!0,value:null};var i={done:!1,value:r};return r=r._nextSibling,i}}},r):s()},t.tree_getFirstAncestorNode=d,t.tree_getNextAncestorNode=p,t.tree_getAncestorNodes=function(e,t,n){var r;return void 0===t&&(t=!1),t||e._parent?((r={})[Symbol.iterator]=function(){var r=d(e,t,n);return{next:function(){if(null===r)return{done:!0,value:null};var e={done:!1,value:r};return r=p(0,r,t,n),e}}},r):s()},t.tree_getCommonAncestor=function(e,t){if(e===t)return e._parent;for(var n=[],r=[],i=d(e,!0);null!==i;)n.push(i),i=p(0,i,!0);for(var o=d(t,!0);null!==o;)r.push(o),o=p(0,o,!0);for(var a=n.length,s=r.length,l=null,u=Math.min(a,s);u>0;u--){var c=n[--a];if(c!==r[--s])break;l=c}return l},t.tree_getFollowingNode=function(e,t){if(t._firstChild)return t._firstChild;if(t._nextSibling)return t._nextSibling;for(;;){var n=t._parent;if(null===n||n===e)return null;if(n._nextSibling)return n._nextSibling;t=n}},t.tree_getPrecedingNode=function(e,t){return t===e?null:t._previousSibling?(t=t._previousSibling)._lastChild?t._lastChild:t:t._parent},t.tree_isConstrained=function e(t){var n,i,a,s,l,u;switch(t._nodeType){case o.NodeType.Document:var c=!1,d=!1;try{for(var p=r(t._children),f=p.next();!f.done;f=p.next())switch(f.value._nodeType){case o.NodeType.ProcessingInstruction:case o.NodeType.Comment:break;case o.NodeType.DocumentType:if(c||d)return!1;c=!0;break;case o.NodeType.Element:if(d)return!1;d=!0;break;default:return!1}}catch(e){n={error:e}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}break;case o.NodeType.DocumentFragment:case o.NodeType.Element:try{for(var h=r(t._children),m=h.next();!m.done;m=h.next())switch(m.value._nodeType){case o.NodeType.Element:case o.NodeType.Text:case o.NodeType.ProcessingInstruction:case o.NodeType.CData:case o.NodeType.Comment:break;default:return!1}}catch(e){a={error:e}}finally{try{m&&!m.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}break;case o.NodeType.DocumentType:case o.NodeType.Text:case o.NodeType.ProcessingInstruction:case o.NodeType.CData:case o.NodeType.Comment:return!t.hasChildNodes()}try{for(var g=r(t._children),v=g.next();!v.done;v=g.next())if(!e(v.value))return!1}catch(e){l={error:e}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(l)throw l.error}}return!0},t.tree_nodeLength=f,t.tree_isEmpty=function(e){return 0===f(e)},t.tree_rootNode=h,t.tree_isDescendantOf=function(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r=!1);for(var i=l(e,n,r);null!==i;){if(i===t)return!0;i=u(e,i,n,r)}return!1},t.tree_isAncestorOf=m,t.tree_isHostIncludingAncestorOf=function e(t,n,r){if(void 0===r&&(r=!1),m(t,n,r))return!0;var o=h(t);return!(!i.Guard.isDocumentFragmentNode(o)||null===o._host||!e(o._host,n,r))},t.tree_isSiblingOf=function(e,t,n){return void 0===n&&(n=!1),e!==t?null!==e._parent&&e._parent===t._parent:!!n},t.tree_isPreceding=function(e,t){var n=g(e),r=g(t);return-1!==n&&-1!==r&&h(e)===h(t)&&rn},t.tree_isParentOf=function(e,t){return e._parent===t},t.tree_isChildOf=function(e,t){return t._parent===e},t.tree_previousSibling=function(e){return e._previousSibling},t.tree_nextSibling=function(e){return e._nextSibling},t.tree_firstChild=function(e){return e._firstChild},t.tree_lastChild=function(e){return e._lastChild},t.tree_treePosition=g,t.tree_index=function(e){for(var t=0;null!==e._previousSibling;)t++,e=e._previousSibling;return t},t.tree_retarget=function(e,t){for(;;){if(!e||!i.Guard.isNode(e))return e;var n=h(e);if(!i.Guard.isShadowRoot(n))return e;if(t&&i.Guard.isNode(t)&&m(n,t,!0,!0))return e;e=n.host}}},function(e,t,n){var r=n(13);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";var r=n(24),i=n(130),o=n(49),a=n(43),s=n(88),l=a.set,u=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var r=n(90),i=n(25),o=n(202);r||i(Object.prototype,"toString",o,{unsafe:!0})},function(e,t,n){var r=n(16),i=n(15),o=n(40);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var r=n(137).charAt,i=n(43),o=n(88),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(11),i=n(203),o=n(19),a=n(21),s=n(5),l=s("iterator"),u=s("toStringTag"),c=o.values;for(var d in i){var p=r[d],f=p&&p.prototype;if(f){if(f[l]!==c)try{a(f,l,c)}catch(e){f[l]=c}if(f[u]||a(f,u,d),i[d])for(var h in o)if(f[h]!==o[h])try{a(f,h,o[h])}catch(e){f[h]=o[h]}}}},function(e,t,n){var r=n(41),i=n(35);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(11),i=n(21),o=n(14),a=n(80),s=n(117),l=n(43),u=l.get,c=l.enforce,d=String(String).split("String");(e.exports=function(e,t,n,s){var l=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),c(n).source=d.join("string"==typeof t?t:"")),e!==r?(l?!p&&e[t]&&(u=!0):delete e[t],u?e[t]=n:i(e,t,n)):u?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},function(e,t,n){var r=n(47),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(35);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(16),i=n(8),o=n(14),a=Object.defineProperty,s={},l=function(e){throw e};e.exports=function(e,t){if(o(s,e))return s[e];t||(t={});var n=[][e],u=!!o(t,"ACCESSORS")&&t.ACCESSORS,c=o(t,0)?t[0]:l,d=o(t,1)?t[1]:void 0;return s[e]=!!n&&!i((function(){if(u&&!r)return!0;var e={length:-1};u?a(e,1,{enumerable:!0,get:l}):e[1]=1,n.call(e,c,d)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(148),i=n(149),o=n(151),a=n(98),s=n(153),l=n(154),u=n(155),c=n(99),d=n(100),p=n(156),f=n(157),h=n(101),m=n(158),g=n(159),v=n(160),y=n(161),_=n(162),b=n(163),x=n(164),w=n(165),S=n(166),C=n(167),T=n(168),M=n(169),D=n(170);t.create_domImplementation=function(e){return r.DOMImplementationImpl._create(e)},t.create_window=function(){return i.WindowImpl._create()},t.create_xmlDocument=function(){return new o.XMLDocumentImpl},t.create_document=function(){return new a.DocumentImpl},t.create_abortController=function(){return new s.AbortControllerImpl},t.create_abortSignal=function(){return l.AbortSignalImpl._create()},t.create_documentType=function(e,t,n,r){return u.DocumentTypeImpl._create(e,t,n,r)},t.create_element=function(e,t,n,r){return c.ElementImpl._create(e,t,n,r)},t.create_htmlElement=function(e,t,n,r){return c.ElementImpl._create(e,t,n,r)},t.create_htmlUnknownElement=function(e,t,n,r){return c.ElementImpl._create(e,t,n,r)},t.create_documentFragment=function(e){return d.DocumentFragmentImpl._create(e)},t.create_shadowRoot=function(e,t){return p.ShadowRootImpl._create(e,t)},t.create_attr=function(e,t){return f.AttrImpl._create(e,t)},t.create_text=function(e,t){return h.TextImpl._create(e,t)},t.create_cdataSection=function(e,t){return m.CDATASectionImpl._create(e,t)},t.create_comment=function(e,t){return g.CommentImpl._create(e,t)},t.create_processingInstruction=function(e,t,n){return v.ProcessingInstructionImpl._create(e,t,n)},t.create_htmlCollection=function(e,t){return void 0===t&&(t=function(){return!0}),y.HTMLCollectionImpl._create(e,t)},t.create_nodeList=function(e){return _.NodeListImpl._create(e)},t.create_nodeListStatic=function(e,t){return b.NodeListStaticImpl._create(e,t)},t.create_namedNodeMap=function(e){return x.NamedNodeMapImpl._create(e)},t.create_range=function(e,t){return w.RangeImpl._create(e,t)},t.create_nodeIterator=function(e,t,n){return S.NodeIteratorImpl._create(e,t,n)},t.create_treeWalker=function(e,t){return C.TreeWalkerImpl._create(e,t)},t.create_nodeFilter=function(){return T.NodeFilterImpl._create()},t.create_mutationRecord=function(e,t,n,r,i,o,a,s,l){return M.MutationRecordImpl._create(e,t,n,r,i,o,a,s,l)},t.create_domTokenList=function(e,t){return D.DOMTokenListImpl._create(e,t)}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(17),a=n(3),s=n(72),l=new Map;function u(e,t){if(t!==e._root&&o.tree_isAncestorOf(e._reference,t,!0)){if(e._pointerBeforeReference)for(;;){var n=o.tree_getFollowingNode(e._root,t);if(null!==n&&o.tree_isDescendantOf(e._root,n,!0)&&!o.tree_isDescendantOf(t,n,!0))return void(e._reference=n);if(null===n)return void(e._pointerBeforeReference=!1)}if(null===t._previousSibling)null!==t._parent&&(e._reference=t._parent);else{for(var r=t._previousSibling,i=o.tree_getFirstDescendantNode(t._previousSibling,!0,!1);null!==i;)null!==i&&(r=i),i=o.tree_getNextDescendantNode(t._previousSibling,i,!0,!1);e._reference=r}}}function c(e,t,n,r,i){if(a.Guard.isSlot(e)&&"name"===t&&null===i){if(r===n)return;if(null===r&&""===n)return;if(""===r&&null===n)return;e._name=null===r||""===r?"":r,s.shadowTree_assignSlotablesForATree(o.tree_rootNode(e))}}function d(e,t,n,r,i){if(a.Guard.isSlotable(e)&&"slot"===t&&null===i){if(r===n)return;if(null===r&&""===n)return;if(""===r&&null===n)return;e._name=null===r||""===r?"":r,s.shadowTree_isAssigned(e)&&s.shadowTree_assignSlotables(e._assignedSlot),s.shadowTree_assignASlot(e)}}function p(e,t,n,r){"id"===t&&null===r&&(e._uniqueIdentifier=n||void 0)}t.dom_runRemovingSteps=function(e,t){},t.dom_runCloningSteps=function(e,t,n,r){},t.dom_runAdoptingSteps=function(e,t){},t.dom_runAttributeChangeSteps=function(e,t,n,o,a){var s,l;i.dom.features.slots&&(d.call(e,e,t,n,o,a),c.call(e,e,t,n,o,a)),p.call(e,e,t,o,a);try{for(var u=r(e._attributeChangeSteps),f=u.next();!f.done;f=u.next())f.value.call(e,e,t,n,o,a)}catch(e){s={error:e}}finally{try{f&&!f.done&&(l=u.return)&&l.call(u)}finally{if(s)throw s.error}}},t.dom_runInsertionSteps=function(e){},t.dom_runNodeIteratorPreRemovingSteps=function(e,t){u.call(e,e,t)},t.dom_hasSupportedTokens=function(e){return l.has(e)},t.dom_getSupportedTokens=function(e){return l.get(e)||new Set},t.dom_runEventConstructingSteps=function(e){},t.dom_runChildTextContentChangeSteps=function(e){}},function(e,t,n){"use strict";var r=n(4),i=n(11),o=n(46),a=n(44),s=n(16),l=n(86),u=n(124),c=n(8),d=n(14),p=n(59),f=n(13),h=n(18),m=n(27),g=n(24),v=n(56),y=n(40),_=n(60),b=n(61),x=n(82),w=n(190),S=n(85),C=n(55),T=n(15),M=n(79),D=n(21),A=n(25),P=n(81),k=n(57),L=n(45),O=n(58),E=n(5),I=n(125),N=n(126),R=n(62),B=n(43),F=n(36).forEach,V=k("hidden"),U=E("toPrimitive"),G=B.set,z=B.getterFor("Symbol"),j=Object.prototype,Y=i.Symbol,H=o("JSON","stringify"),W=C.f,$=T.f,Z=w.f,K=M.f,q=P("symbols"),X=P("op-symbols"),J=P("string-to-symbol-registry"),Q=P("symbol-to-string-registry"),ee=P("wks"),te=i.QObject,ne=!te||!te.prototype||!te.prototype.findChild,re=s&&c((function(){return 7!=_($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=W(j,t);r&&delete j[t],$(e,t,n),r&&e!==j&&$(j,t,r)}:$,ie=function(e,t){var n=q[e]=_(Y.prototype);return G(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},oe=u?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof Y},ae=function(e,t,n){e===j&&ae(X,t,n),h(e);var r=v(t,!0);return h(n),d(q,r)?(n.enumerable?(d(e,V)&&e[V][r]&&(e[V][r]=!1),n=_(n,{enumerable:y(0,!1)})):(d(e,V)||$(e,V,y(1,{})),e[V][r]=!0),re(e,r,n)):$(e,r,n)},se=function(e,t){h(e);var n=g(t),r=b(n).concat(de(n));return F(r,(function(t){s&&!le.call(n,t)||ae(e,t,n[t])})),e},le=function(e){var t=v(e,!0),n=K.call(this,t);return!(this===j&&d(q,t)&&!d(X,t))&&(!(n||!d(this,t)||!d(q,t)||d(this,V)&&this[V][t])||n)},ue=function(e,t){var n=g(e),r=v(t,!0);if(n!==j||!d(q,r)||d(X,r)){var i=W(n,r);return!i||!d(q,r)||d(n,V)&&n[V][r]||(i.enumerable=!0),i}},ce=function(e){var t=Z(g(e)),n=[];return F(t,(function(e){d(q,e)||d(L,e)||n.push(e)})),n},de=function(e){var t=e===j,n=Z(t?X:g(e)),r=[];return F(n,(function(e){!d(q,e)||t&&!d(j,e)||r.push(q[e])})),r};l||(A((Y=function(){if(this instanceof Y)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=O(e),n=function(e){this===j&&n.call(X,e),d(this,V)&&d(this[V],t)&&(this[V][t]=!1),re(this,t,y(1,e))};return s&&ne&&re(j,t,{configurable:!0,set:n}),ie(t,e)}).prototype,"toString",(function(){return z(this).tag})),A(Y,"withoutSetter",(function(e){return ie(O(e),e)})),M.f=le,T.f=ae,C.f=ue,x.f=w.f=ce,S.f=de,I.f=function(e){return ie(E(e),e)},s&&($(Y.prototype,"description",{configurable:!0,get:function(){return z(this).description}}),a||A(j,"propertyIsEnumerable",le,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:Y}),F(b(ee),(function(e){N(e)})),r({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=String(e);if(d(J,t))return J[t];var n=Y(t);return J[t]=n,Q[n]=t,n},keyFor:function(e){if(!oe(e))throw TypeError(e+" is not a symbol");if(d(Q,e))return Q[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),r({target:"Object",stat:!0,forced:!l,sham:!s},{create:function(e,t){return void 0===t?_(e):se(_(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:ue}),r({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:ce,getOwnPropertySymbols:de}),r({target:"Object",stat:!0,forced:c((function(){S.f(1)}))},{getOwnPropertySymbols:function(e){return S.f(m(e))}}),H&&r({target:"JSON",stat:!0,forced:!l||c((function(){var e=Y();return"[null]"!=H([e])||"{}"!=H({a:e})||"{}"!=H(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=t,(f(t)||void 0!==e)&&!oe(e))return p(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!oe(t))return t}),i[1]=t,H.apply(null,i)}}),Y.prototype[U]||D(Y.prototype,U,Y.prototype.valueOf),R(Y,"Symbol"),L[V]=!0},function(e,t,n){"use strict";var r=n(4),i=n(16),o=n(11),a=n(14),s=n(13),l=n(15).f,u=n(119),c=o.Symbol;if(i&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var d={},p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof p?new c(e):void 0===e?c():c(e);return""===e&&(d[t]=!0),t};u(p,c);var f=p.prototype=c.prototype;f.constructor=p;var h=f.toString,m="Symbol(test)"==String(c("test")),g=/^Symbol\((.*)\)[^)]+$/;l(f,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=h.call(e);if(a(d,e))return"";var n=m?t.slice(7,-1):t.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},function(e,t,n){n(126)("iterator")},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=n(2),l=n(70),u=n(3),c=n(9),d=n(0),p=n(152),f=n(12),h=function(e){function t(){var t=e.call(this)||this;return t._parent=null,t._firstChild=null,t._lastChild=null,t._previousSibling=null,t._nextSibling=null,t}return i(t,e),Object.defineProperty(t.prototype,"_childNodes",{get:function(){return this.__childNodes||(this.__childNodes=d.create_nodeList(this))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_nodeDocument",{get:function(){return this._nodeDocumentOverride||a.dom.window._associatedDocument},set:function(e){this._nodeDocumentOverride=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_registeredObserverList",{get:function(){return this.__registeredObserverList||(this.__registeredObserverList=[])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeType",{get:function(){return this._nodeType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeName",{get:function(){return u.Guard.isElementNode(this)?this._htmlUppercasedQualifiedName:u.Guard.isAttrNode(this)?this._qualifiedName:u.Guard.isExclusiveTextNode(this)?"#text":u.Guard.isCDATASectionNode(this)?"#cdata-section":u.Guard.isProcessingInstructionNode(this)?this._target:u.Guard.isCommentNode(this)?"#comment":u.Guard.isDocumentNode(this)?"#document":u.Guard.isDocumentTypeNode(this)?this._name:u.Guard.isDocumentFragmentNode(this)?"#document-fragment":""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"baseURI",{get:function(){return p.urlSerializer(this._nodeDocument._URL)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){return u.Guard.isElementNode(this)&&d.shadowTree_isConnected(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ownerDocument",{get:function(){return this._nodeType===s.NodeType.Document?null:this._nodeDocument},enumerable:!0,configurable:!0}),t.prototype.getRootNode=function(e){return d.tree_rootNode(this,!!e&&e.composed)},Object.defineProperty(t.prototype,"parentNode",{get:function(){return this._nodeType===s.NodeType.Attribute?null:this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentElement",{get:function(){return this._parent&&u.Guard.isElementNode(this._parent)?this._parent:null},enumerable:!0,configurable:!0}),t.prototype.hasChildNodes=function(){return null!==this._firstChild},Object.defineProperty(t.prototype,"childNodes",{get:function(){return this._childNodes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._firstChild},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this._lastChild},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this._previousSibling},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this._nextSibling},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return u.Guard.isAttrNode(this)?this._value:u.Guard.isCharacterDataNode(this)?this._data:null},set:function(e){null===e&&(e=""),u.Guard.isAttrNode(this)?d.attr_setAnExistingAttributeValue(this,e):u.Guard.isCharacterDataNode(this)&&d.characterData_replaceData(this,0,this._data.length,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textContent",{get:function(){return u.Guard.isDocumentFragmentNode(this)||u.Guard.isElementNode(this)?d.text_descendantTextContent(this):u.Guard.isAttrNode(this)?this._value:u.Guard.isCharacterDataNode(this)?this._data:null},set:function(e){null===e&&(e=""),u.Guard.isDocumentFragmentNode(this)||u.Guard.isElementNode(this)?d.node_stringReplaceAll(e,this):u.Guard.isAttrNode(this)?d.attr_setAnExistingAttributeValue(this,e):u.Guard.isCharacterDataNode(this)&&d.characterData_replaceData(this,0,d.tree_nodeLength(this),e)},enumerable:!0,configurable:!0}),t.prototype.normalize=function(){for(var e,t,n,r,i=[],s=d.tree_getFirstDescendantNode(this,!1,!1,(function(e){return u.Guard.isExclusiveTextNode(e)}));null!==s;)i.push(s),s=d.tree_getNextDescendantNode(this,s,!1,!1,(function(e){return u.Guard.isExclusiveTextNode(e)}));for(var l=0;lS;S++)if((p||S in b)&&(y=x(v=b[S],S,_),e))if(t)T[S]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return S;case 2:l.call(T,v)}else if(c)return!1;return d?-1:u||c?c:T}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t1)throw new s.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has "+y+" element nodes.");if(1===y){try{for(var w=r(t._children),S=w.next();!S.done;S=w.next())if(S.value._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("The document node already has a document element node.")}catch(e){a={error:e}}finally{try{S&&!S.done&&(u=w.return)&&u.call(w)}finally{if(a)throw a.error}}if(n){if(v===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node.");for(var C=n._nextSibling;C;){if(C._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node.");C=C._nextSibling}}}}else if(g===l.NodeType.Element){try{for(var T=r(t._children),M=T.next();!M.done;M=T.next())if(M.value._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Document already has a document element node. Node is "+e.nodeName+".")}catch(e){c={error:e}}finally{try{M&&!M.done&&(d=T.return)&&d.call(T)}finally{if(c)throw c.error}}if(n){if(v===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node. Node is "+e.nodeName+".");for(C=n._nextSibling;C;){if(C._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node. Node is "+e.nodeName+".");C=C._nextSibling}}}else if(g===l.NodeType.DocumentType){try{for(var D=r(t._children),A=D.next();!A.done;A=D.next())if(A.value._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Document already has a document type node. Node is "+e.nodeName+".")}catch(e){p={error:e}}finally{try{A&&!A.done&&(h=D.return)&&h.call(D)}finally{if(p)throw p.error}}if(n)for(var P=n._previousSibling;P;){if(P._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Cannot insert a document type node before an element node. Node is "+e.nodeName+".");P=P._previousSibling}else for(P=t._firstChild;P;){if(P._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Cannot insert a document type node before an element node. Node is "+e.nodeName+".");P=P._nextSibling}}}function b(e,t,n){_(e,t,n);var r=n;return r===e&&(r=e._nextSibling),y.document_adopt(e,t._nodeDocument),x(e,t,r),e}function x(e,t,n,i){var s,h;if(null!==n||e._nodeType===l.NodeType.DocumentFragment){var y=e._nodeType===l.NodeType.DocumentFragment?e._children.size:1;if(null!==n&&0!==a.dom.rangeList.size){var _=f.tree_index(n);try{for(var b=r(a.dom.rangeList),x=b.next();!x.done;x=b.next()){var S=x.value;S._start[0]===t&&S._start[1]>_&&(S._start[1]+=y),S._end[0]===t&&S._end[1]>_&&(S._end[1]+=y)}}catch(e){s={error:e}}finally{try{x&&!x.done&&(h=b.return)&&h.call(b)}finally{if(s)throw s.error}}}var C=e._nodeType===l.NodeType.DocumentFragment?new(Array.bind.apply(Array,o([void 0],e._children))):[e];if(e._nodeType===l.NodeType.DocumentFragment)for(;e._firstChild;)w(e._firstChild,e,!0);a.dom.features.mutationObservers&&e._nodeType===l.NodeType.DocumentFragment&&g.observer_queueTreeMutationRecord(e,[],C,null,null);for(var T=n?n._previousSibling:t._lastChild,M=null===n?-1:f.tree_index(n),D=0;Dx&&C._start[1]--,C._end[0]===t&&C._end[1]>x&&C._end[1]--}}catch(e){i={error:e}}finally{try{S&&!S.done&&(o=w.return)&&o.call(w)}finally{if(i)throw i.error}}try{for(var T=r(a.dom.rangeList),M=T.next();!M.done;M=T.next())(C=M.value)._start[0]===t&&C._start[1]>x&&(C._start[1]-=1),C._end[0]===t&&C._end[1]>x&&(C._end[1]-=1)}catch(e){s={error:e}}finally{try{M&&!M.done&&(l=T.return)&&l.call(T)}finally{if(s)throw s.error}}}if(a.dom.features.steps)try{for(var D=r(h.nodeIterator_iteratorList()),A=D.next();!A.done;A=D.next()){var P=A.value;P._root._nodeDocument===e._nodeDocument&&v.dom_runNodeIteratorPreRemovingSteps(P,e)}}catch(e){d={error:e}}finally{try{A&&!A.done&&(y=D.return)&&y.call(D)}finally{if(d)throw d.error}}var k=e._previousSibling,L=e._nextSibling;u.Guard.isDocumentNode(t)&&u.Guard.isElementNode(e)&&(t._documentElement=null),e._parent=null,t._children.delete(e);var O=e._previousSibling,E=e._nextSibling;e._previousSibling=null,e._nextSibling=null,O&&(O._nextSibling=E),E&&(E._previousSibling=O),O||(t._firstChild=E),E||(t._lastChild=O),a.dom.features.slots&&u.Guard.isSlotable(e)&&null!==e._assignedSlot&&m.shadowTree_isAssigned(e)&&m.shadowTree_assignSlotables(e._assignedSlot),a.dom.features.slots&&u.Guard.isShadowRoot(f.tree_rootNode(t))&&u.Guard.isSlot(t)&&c.isEmpty(t._assignedNodes)&&m.shadowTree_signalASlotChange(t),a.dom.features.slots&&null!==f.tree_getFirstDescendantNode(e,!0,!1,(function(e){return u.Guard.isSlot(e)}))&&(m.shadowTree_assignSlotablesForATree(f.tree_rootNode(t)),m.shadowTree_assignSlotablesForATree(e)),a.dom.features.steps&&v.dom_runRemovingSteps(e,t),a.dom.features.customElements&&u.Guard.isCustomElementNode(e)&&p.customElement_enqueueACustomElementCallbackReaction(e,"disconnectedCallback",[]);for(var I=f.tree_getFirstDescendantNode(e,!1,!0);null!==I;)a.dom.features.steps&&v.dom_runRemovingSteps(I,e),a.dom.features.customElements&&u.Guard.isCustomElementNode(I)&&p.customElement_enqueueACustomElementCallbackReaction(I,"disconnectedCallback",[]),I=f.tree_getNextDescendantNode(e,I,!1,!0);if(a.dom.features.mutationObservers)for(var N=f.tree_getFirstAncestorNode(t,!0);null!==N;){try{for(var R=(_=void 0,r(N._registeredObserverList)),B=R.next();!B.done;B=R.next()){var F=B.value;F.options.subtree&&e._registeredObserverList.push({observer:F.observer,options:F.options,source:F})}}catch(e){_={error:e}}finally{try{B&&!B.done&&(b=R.return)&&b.call(R)}finally{if(_)throw _.error}}N=f.tree_getNextAncestorNode(t,N,!0)}a.dom.features.mutationObservers&&(n||g.observer_queueTreeMutationRecord(t,[],[e],k,L)),a.dom.features.steps&&u.Guard.isTextNode(e)&&v.dom_runChildTextContentChangeSteps(t)}t.mutation_ensurePreInsertionValidity=_,t.mutation_preInsert=b,t.mutation_insert=x,t.mutation_append=function(e,t){return b(e,t,null)},t.mutation_replace=function(e,t,n){var i,o,u,c,d,p,h,m;if(n._nodeType!==l.NodeType.Document&&n._nodeType!==l.NodeType.DocumentFragment&&n._nodeType!==l.NodeType.Element)throw new s.HierarchyRequestError("Only document, document fragment and element nodes can contain child nodes. Parent node is "+n.nodeName+".");if(f.tree_isHostIncludingAncestorOf(n,t,!0))throw new s.HierarchyRequestError("The node to be inserted cannot be an ancestor of parent node. Node is "+t.nodeName+", parent node is "+n.nodeName+".");if(e._parent!==n)throw new s.NotFoundError("The reference child node cannot be found under parent node. Child node is "+e.nodeName+", parent node is "+n.nodeName+".");if(t._nodeType!==l.NodeType.DocumentFragment&&t._nodeType!==l.NodeType.DocumentType&&t._nodeType!==l.NodeType.Element&&t._nodeType!==l.NodeType.Text&&t._nodeType!==l.NodeType.ProcessingInstruction&&t._nodeType!==l.NodeType.CData&&t._nodeType!==l.NodeType.Comment)throw new s.HierarchyRequestError("Only document fragment, document type, element, text, processing instruction, cdata section or comment nodes can be inserted. Node is "+t.nodeName+".");if(t._nodeType===l.NodeType.Text&&n._nodeType===l.NodeType.Document)throw new s.HierarchyRequestError("Cannot insert a text node as a child of a document node. Node is "+t.nodeName+".");if(t._nodeType===l.NodeType.DocumentType&&n._nodeType!==l.NodeType.Document)throw new s.HierarchyRequestError("A document type node can only be inserted under a document node. Parent node is "+n.nodeName+".");if(n._nodeType===l.NodeType.Document)if(t._nodeType===l.NodeType.DocumentFragment){var v=0;try{for(var _=r(t._children),b=_.next();!b.done;b=_.next()){var S=b.value;if(S._nodeType===l.NodeType.Element)v++;else if(S._nodeType===l.NodeType.Text)throw new s.HierarchyRequestError("Cannot insert text a node as a child of a document node. Node is "+S.nodeName+".")}}catch(e){i={error:e}}finally{try{b&&!b.done&&(o=_.return)&&o.call(_)}finally{if(i)throw i.error}}if(v>1)throw new s.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has "+v+" element nodes.");if(1===v){try{for(var C=r(n._children),T=C.next();!T.done;T=C.next())if((L=T.value)._nodeType===l.NodeType.Element&&L!==e)throw new s.HierarchyRequestError("The document node already has a document element node.")}catch(e){u={error:e}}finally{try{T&&!T.done&&(c=C.return)&&c.call(C)}finally{if(u)throw u.error}}for(var M=e._nextSibling;M;){if(M._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node.");M=M._nextSibling}}}else if(t._nodeType===l.NodeType.Element){try{for(var D=r(n._children),A=D.next();!A.done;A=D.next())if((L=A.value)._nodeType===l.NodeType.Element&&L!==e)throw new s.HierarchyRequestError("Document already has a document element node. Node is "+t.nodeName+".")}catch(e){d={error:e}}finally{try{A&&!A.done&&(p=D.return)&&p.call(D)}finally{if(d)throw d.error}}for(M=e._nextSibling;M;){if(M._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node. Node is "+t.nodeName+".");M=M._nextSibling}}else if(t._nodeType===l.NodeType.DocumentType){try{for(var P=r(n._children),k=P.next();!k.done;k=P.next()){var L;if((L=k.value)._nodeType===l.NodeType.DocumentType&&L!==e)throw new s.HierarchyRequestError("Document already has a document type node. Node is "+t.nodeName+".")}}catch(e){h={error:e}}finally{try{k&&!k.done&&(m=P.return)&&m.call(P)}finally{if(h)throw h.error}}for(var O=e._previousSibling;O;){if(O._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Cannot insert a document type node before an element node. Node is "+t.nodeName+".");O=O._previousSibling}}var E=e._nextSibling;E===t&&(E=t._nextSibling);var I=e._previousSibling;y.document_adopt(t,n._nodeDocument);var N=[];null!==e._parent&&(N.push(e),w(e,e._parent,!0));var R=[];return t._nodeType===l.NodeType.DocumentFragment?R=Array.from(t._children):R.push(t),x(t,n,E,!0),a.dom.features.mutationObservers&&g.observer_queueTreeMutationRecord(n,R,N,I,E),e},t.mutation_replaceAll=function(e,t){var n,i;null!==e&&y.document_adopt(e,t._nodeDocument);var o=Array.from(t._children),s=[];e&&e._nodeType===l.NodeType.DocumentFragment?s=Array.from(e._children):null!==e&&s.push(e);try{for(var u=r(o),c=u.next();!c.done;c=u.next())w(c.value,t,!0)}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}null!==e&&x(e,t,null,!0),a.dom.features.mutationObservers&&g.observer_queueTreeMutationRecord(t,s,o,null,null)},t.mutation_preRemove=function(e,t){if(e._parent!==t)throw new s.NotFoundError("The child node cannot be found under parent node. Child node is "+e.nodeName+", parent node is "+t.nodeName+".");return w(e,t),e},t.mutation_remove=w},function(e,t,n){"use strict";function r(e){return null==e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n0?r:n)(e)}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t){e.exports={}},function(e,t,n){"use strict";n(31),n(32),n(33),n(220),n(64),n(19),n(65),n(20),n(68),n(66),n(92),n(144),n(22),n(94),n(23);var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t/g,">");this.text(n)},e.prototype._serializeDocumentFragmentNS=function(e,t,n,i,o){var a,s;try{for(var l=r(e.childNodes),u=l.next();!u.done;u=l.next()){var c=u.value;this._serializeNodeNS(c,t,n,i,o)}}catch(e){a={error:e}}finally{try{u&&!u.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}},e.prototype._serializeDocumentFragment=function(e,t){var n,i;try{for(var o=r(e._children),a=o.next();!a.done;a=o.next()){var s=a.value;this._serializeNode(s,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},e.prototype._serializeDocumentType=function(e,t){if(t&&!c.xml_isPubidChar(e.publicId))throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");if(t&&(!c.xml_isLegalChar(e.systemId)||-1!==e.systemId.indexOf('"')&&-1!==e.systemId.indexOf("'")))throw new Error("DocType system identifier contains invalid characters (well-formed required).");this.docType(e.name,e.publicId,e.systemId)},e.prototype._serializeProcessingInstruction=function(e,t){if(t&&(-1!==e.target.indexOf(":")||/^xml$/i.test(e.target)))throw new Error("Processing instruction target contains invalid characters (well-formed required).");if(t&&(!c.xml_isLegalChar(e.data)||-1!==e.data.indexOf("?>")))throw new Error("Processing instruction data contains invalid characters (well-formed required).");this.instruction(e.target,e.data)},e.prototype._serializeCData=function(e,t){if(t&&-1!==e.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters (well-formed required).");this.cdata(e.data)},e.prototype._serializeAttributesNS=function(e,t,n,i,o,a){var l,d,p=[],f=a?new s.LocalNameSet:void 0;try{for(var h=r(e.attributes),m=h.next();!m.done;m=h.next()){var g=m.value;if(a||o||null!==g.namespaceURI){if(a&&f&&f.has(g.namespaceURI,g.localName))throw new Error("Element contains duplicate attributes (well-formed required).");a&&f&&f.set(g.namespaceURI,g.localName);var v=g.namespaceURI,y=null;if(null!==v)if(y=t.get(g.prefix,v),v===u.namespace.XMLNS){if(g.value===u.namespace.XML||null===g.prefix&&o||null!==g.prefix&&(!(g.localName in i)||i[g.localName]!==g.value)&&t.has(g.localName,g.value))continue;if(a&&g.value===u.namespace.XMLNS)throw new Error("XMLNS namespace is reserved (well-formed required).");if(a&&""===g.value)throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");"xmlns"===g.prefix&&(y="xmlns")}else null===y&&(y=null===g.prefix||t.hasPrefix(g.prefix)&&!t.has(g.prefix,v)?this._generatePrefix(v,t,n):g.prefix,p.push([null,"xmlns",y,this._serializeAttributeValue(v,a)]));if(a&&(-1!==g.localName.indexOf(":")||!c.xml_isName(g.localName)||"xmlns"===g.localName&&null===v))throw new Error("Attribute local name contains invalid characters (well-formed required).");p.push([v,y,g.localName,this._serializeAttributeValue(g.value,a)])}else p.push([null,null,g.localName,this._serializeAttributeValue(g.value,a)])}}catch(e){l={error:e}}finally{try{m&&!m.done&&(d=h.return)&&d.call(h)}finally{if(l)throw l.error}}return p},e.prototype._serializeAttributes=function(e,t){var n,i,o=[],a=t?{}:void 0;try{for(var s=r(e.attributes),l=s.next();!l.done;l=s.next()){var u=l.value;if(t){if(t&&a&&u.localName in a)throw new Error("Element contains duplicate attributes (well-formed required).");if(t&&a&&(a[u.localName]=!0),t&&(-1!==u.localName.indexOf(":")||!c.xml_isName(u.localName)))throw new Error("Attribute local name contains invalid characters (well-formed required).");o.push([null,null,u.localName,this._serializeAttributeValue(u.value,t)])}else o.push([null,null,u.localName,this._serializeAttributeValue(u.value,t)])}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},e.prototype._recordNamespaceInformation=function(e,t,n){var i,o,a=null;try{for(var s=r(e.attributes),l=s.next();!l.done;l=s.next()){var c=l.value,d=c.namespaceURI,p=c.prefix;if(d===u.namespace.XMLNS){if(null===p){a=c.value;continue}var f=c.localName,h=c.value;if(h===u.namespace.XML)continue;if(""===h&&(h=null),t.has(f,h))continue;t.set(f,h),n[f]=h||""}}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},e.prototype._generatePrefix=function(e,t,n){var r="ns"+n.value.toString();return n.value++,t.set(r,e),r},e.prototype._serializeAttributeValue=function(e,t){if(t&&null!==e&&!c.xml_isLegalChar(e))throw new Error("Invalid characters in attribute value.");return null===e?"":e.replace(/(?!&([^&;]*);)&/g,"&").replace(//g,">").replace(/"/g,""")},e._VoidElementNames=new Set(["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]),e}();t.BaseWriter=d},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=n(3),s=n(7),l=n(29),u=n(17),c=n(97);function d(){var e=o.dom.window;e._mutationObserverMicrotaskQueued||(e._mutationObserverMicrotaskQueued=!0,Promise.resolve().then((function(){p()})))}function p(){var e,t,n,i,l=o.dom.window;l._mutationObserverMicrotaskQueued=!1;var u=s.set.clone(l._mutationObservers),d=s.set.clone(l._signalSlots);s.set.empty(l._signalSlots);var p=function(e){var t=s.list.clone(e._recordQueue);s.list.empty(e._recordQueue);for(var n=0;n"+e+"<\/script>"},f=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;f=r?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=u("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete f.prototype[a[n]];return f()};s[c]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=i(e),n=new d,d.prototype=null,n[c]=e):n=f(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(121),i=n(84);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(15).f,i=n(14),o=n(5)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(8),i=n(5),o=n(129),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";var r=n(4),i=n(122).indexOf,o=n(48),a=n(28),s=[].indexOf,l=!!s&&1/[1].indexOf(1,-0)<0,u=o("indexOf"),c=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:l||!u||!c},{indexOf:function(e){return l?s.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(16),i=n(15).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/;r&&!("name"in o)&&i(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(25),i=n(18),o=n(8),a=n(136),s=RegExp.prototype,l=s.toString,u=o((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),c="toString"!=l.name;(u||c)&&r(RegExp.prototype,"toString",(function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(138),n(20),n(66),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=n(2),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._writerOptions=a.applyDefaults(n,{format:"object",wellFormed:!1,group:!1,verbose:!1}),r}return i(t,e),t.prototype.serialize=function(e){return this._currentList=[],this._currentIndex=0,this._listRegister=[this._currentList],this.serializeNode(e,this._writerOptions.wellFormed),this._process(this._currentList,this._writerOptions)},t.prototype._process=function(e,t){var n,r,i,o,l,u,c;if(0===e.length)return{};for(var d={},p=!1,f=0,h=0,m=0,g=0,v=0;v2)try{for(var c=o(e),d=c.next();!d.done;d=c.next()){var p=d.value;t[r+(s++).toString()]=p}}catch(e){l={error:e}}finally{try{d&&!d.done&&(u=c.return)&&u.call(c)}finally{if(l)throw l.error}}else t[i>1?r+(s++).toString():r]=e;return s},t.prototype.beginElement=function(e){var t,n,r=[];if(0===this._currentList.length)this._currentList.push(((t={})[e]=r,t));else{var i=this._currentList[this._currentList.length-1];this._isElementNode(i,e)?0!==i[e].length&&a.isArray(i[e][0])?i[e].push(r):i[e]=[i[e],r]:this._currentList.push(((n={})[e]=r,n))}this._currentIndex++,this._listRegister.length>this._currentIndex?this._listRegister[this._currentIndex]=r:this._listRegister.push(r),this._currentList=r},t.prototype.endElement=function(){this._currentList=this._listRegister[--this._currentIndex]},t.prototype.attribute=function(e,t){var n,r;if(0===this._currentList.length)this._currentList.push({"@":(n={},n[e]=t,n)});else{var i=this._currentList[this._currentList.length-1];this._isAttrNode(i)?i["@"][e]=t:this._currentList.push({"@":(r={},r[e]=t,r)})}},t.prototype.comment=function(e){if(0===this._currentList.length)this._currentList.push({"!":e});else{var t=this._currentList[this._currentList.length-1];this._isCommentNode(t)?a.isArray(t["!"])?t["!"].push(e):t["!"]=[t["!"],e]:this._currentList.push({"!":e})}},t.prototype.text=function(e){if(0===this._currentList.length)this._currentList.push({"#":e});else{var t=this._currentList[this._currentList.length-1];this._isTextNode(t)?a.isArray(t["#"])?t["#"].push(e):t["#"]=[t["#"],e]:this._currentList.push({"#":e})}},t.prototype.instruction=function(e,t){var n=""===t?e:e+" "+t;if(0===this._currentList.length)this._currentList.push({"?":n});else{var r=this._currentList[this._currentList.length-1];this._isInstructionNode(r)?a.isArray(r["?"])?r["?"].push(n):r["?"]=[r["?"],n]:this._currentList.push({"?":n})}},t.prototype.cdata=function(e){if(0===this._currentList.length)this._currentList.push({$:e});else{var t=this._currentList[this._currentList.length-1];this._isCDATANode(t)?a.isArray(t.$)?t.$.push(e):t.$=[t.$,e]:this._currentList.push({$:e})}},t.prototype._isAttrNode=function(e){return"@"in e},t.prototype._isTextNode=function(e){return"#"in e},t.prototype._isCommentNode=function(e){return"!"in e},t.prototype._isInstructionNode=function(e){return"?"in e},t.prototype._isCDATANode=function(e){return"$"in e},t.prototype._isElementNode=function(e,t){return t in e},t.prototype._getAttrKey=function(){return this._builderOptions.convert.att},t.prototype._getNodeKey=function(e){switch(e){case s.NodeType.Comment:return this._builderOptions.convert.comment;case s.NodeType.Text:return this._builderOptions.convert.text;case s.NodeType.ProcessingInstruction:return this._builderOptions.convert.ins;case s.NodeType.CData:return this._builderOptions.convert.cdata;default:throw new Error("Invalid node type.")}},t}(n(50).BaseWriter);t.ObjectWriter=l},function(e,t,n){"use strict";var r=n(4),i=n(93);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._items={},this._nullItems={}}return e.prototype.set=function(e,t){null===e?this._nullItems[t]=!0:(this._items[e]||(this._items[e]={}),this._items[e][t]=!0)},e.prototype.has=function(e,t){return null===e?!0===this._nullItems[t]:!!this._items[e]&&!0===this._items[e][t]},e}();t.LocalNameSet=r},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),o=n(3),a=n(0),s=function(){function e(){}return Object.defineProperty(e.prototype,"_eventListenerList",{get:function(){return this.__eventListenerList||(this.__eventListenerList=[])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventHandlerMap",{get:function(){return this.__eventHandlerMap||(this.__eventHandlerMap={})},enumerable:!0,configurable:!0}),e.prototype.addEventListener=function(e,t,n){void 0===n&&(n={passive:!1,once:!1,capture:!1});var i,s=r(a.eventTarget_flattenMore(n),3),l=s[0],u=s[1],c=s[2];t&&(i=o.Guard.isEventListener(t)?t:{handleEvent:t},a.eventTarget_addEventListener(this,{type:e,callback:i,capture:l,passive:u,once:c,removed:!1}))},e.prototype.removeEventListener=function(e,t,n){void 0===n&&(n={capture:!1});var r=a.eventTarget_flatten(n);if(t)for(var i=0;i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t",amp:"&",quot:'"',apos:"'"},e}();t.BaseReader=i},function(e,t,n){"use strict";var r=n(39);e.exports=r.DEFAULT=new r({include:[n(54)],explicit:[n(299),n(300),n(301)]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(185);t.XMLBuilderImpl=r.XMLBuilderImpl;var i=n(304);t.XMLBuilderCBImpl=i.XMLBuilderCBImpl;var o=n(183);t.builder=o.builder,t.create=o.create,t.fragment=o.fragment,t.convert=o.convert;var a=n(309);t.createCB=a.createCB,t.fragmentCB=a.fragmentCB},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(11),i=n(21);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(44),i=n(118);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(121),i=n(84).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(47),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(8);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){var r=n(127);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var r=n(4),i=n(195),o=n(132),a=n(133),s=n(62),l=n(21),u=n(25),c=n(5),d=n(44),p=n(49),f=n(131),h=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,g=c("iterator"),v=function(){return this};e.exports=function(e,t,n,c,f,y,_){i(n,t,c);var b,x,w,S=function(e){if(e===f&&A)return A;if(!m&&e in M)return M[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},C=t+" Iterator",T=!1,M=e.prototype,D=M[g]||M["@@iterator"]||f&&M[f],A=!m&&D||S(f),P="Array"==t&&M.entries||D;if(P&&(b=o(P.call(new e)),h!==Object.prototype&&b.next&&(d||o(b)===h||(a?a(b,h):"function"!=typeof b[g]&&l(b,g,v)),s(b,C,!0,!0),d&&(p[C]=v))),"values"==f&&D&&"values"!==D.name&&(T=!0,A=function(){return D.call(this)}),d&&!_||M[g]===A||l(M,g,A),p[t]=A,f)if(x={values:S("values"),keys:y?A:S("keys"),entries:S("entries")},_)for(w in x)(m||T||!(w in M))&&u(M,w,x[w]);else r({target:t,proto:!0,forced:m||T},x);return x}},function(e,t,n){"use strict";var r=n(4),i=n(13),o=n(59),a=n(83),s=n(26),l=n(24),u=n(134),c=n(5),d=n(63),p=n(28),f=d("slice"),h=p("slice",{ACCESSORS:!0,0:0,1:2}),m=c("species"),g=[].slice,v=Math.max;r({target:"Array",proto:!0,forced:!f||!h},{slice:function(e,t){var n,r,c,d=l(this),p=s(d.length),f=a(e,p),h=a(void 0===t?p:t,p);if(o(d)&&("function"!=typeof(n=d.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[m])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(d,f,h);for(r=new(void 0===n?Array:n)(v(h-f,0)),c=0;f0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(h="(?: "+h+")",g=" "+g,m++),n=new RegExp("^(?:"+h+")",f)),p&&(n=new RegExp("^"+h+"$(?!\\s)",f)),c&&(t=a.lastIndex),r=s.call(u?n:a,g),u?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:c&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),p&&r&&r.length>1&&l.call(r[0],n,(function(){for(i=1;i]*>)/g,m=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n,r){var g=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=r.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,r){var i=l(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!g&&v||"string"==typeof r&&-1===r.indexOf(y)){var o=n(t,e,this,r);if(o.done)return o.value}var l=i(e),f=String(this),h="function"==typeof r;h||(r=String(r));var m=l.global;if(m){var b=l.unicode;l.lastIndex=0}for(var x=[];;){var w=c(l,f);if(null===w)break;if(x.push(w),!m)break;""===String(w[0])&&(l.lastIndex=u(f,a(l.lastIndex),b))}for(var S,C="",T=0,M=0;M=T&&(C+=f.slice(T,A)+E,T=A+D.length)}return C+f.slice(T)}];function _(e,n,r,i,a,s){var l=r+e.length,u=i.length,c=m;return void 0!==a&&(a=o(a),c=h),t.call(s,c,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(l);case"<":s=a[o.slice(1,-1)];break;default:var c=+o;if(0===c)return t;if(c>u){var d=f(c/10);return 0===d?t:d<=u?void 0===i[d-1]?o.charAt(1):i[d-1]+o.charAt(1):t}s=i[c-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._items={},this._nullItems=[]}return e.prototype.copy=function(){var t=new e;for(var n in this._items)t._items[n]=this._items[n].slice(0);return t._nullItems=this._nullItems.slice(0),t},e.prototype.get=function(e,t){var n=null===t?this._nullItems:this._items[t]||null;if(null===n)return null;for(var r=null,i=0;i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t=0;E--)if(null!==(N=O[E]).shadowAdjustedTarget){L=N;break}if(null!==L)if(l.Guard.isNode(L.shadowAdjustedTarget)&&l.Guard.isShadowRoot(p.tree_rootNode(L.shadowAdjustedTarget,!0)))d=!0;else if(l.Guard.isNode(L.relatedTarget)&&l.Guard.isShadowRoot(p.tree_rootNode(L.relatedTarget,!0)))d=!0;else for(var I=0;I=0;E--)null!==(N=O[E]).shadowAdjustedTarget?e._eventPhase=s.EventPhase.AtTarget:e._eventPhase=s.EventPhase.Capturing,_(N,e,"capturing",i);for(E=0;E0&&null!==(l=i[a-1]).shadowAdjustedTarget)&&(t._target=l.shadowAdjustedTarget)}if(t._relatedTarget=e.relatedTarget,t._touchTargetList=e.touchTargetList,!t._stopPropagationFlag){t._currentTarget=e.invocationTarget;var u=t._currentTarget._eventListenerList,c=new(Array.bind.apply(Array,o([void 0],u)));if(!b(t,c,n,e,r)&&t._isTrusted){var d=t._type;"animationend"===d?t._type="webkitAnimationEnd":"animationiteration"===d?t._type="webkitAnimationIteration":"animationstart"===d?t._type="webkitAnimationStart":"transitionend"===d&&(t._type="webkitTransitionEnd"),b(t,c,n,e,r),t._type=d}}}function b(e,t,n,r,i){void 0===i&&(i={value:!1});for(var o=!1,a=0;a=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(6),l=n(2),u=n(9),c=n(34),d=n(3),p=n(1),f=n(7),h=n(152),m=n(0),g=n(12),v=function(e){function t(){var t=e.call(this)||this;return t._children=new Set,t._encoding={name:"UTF-8",labels:["unicode-1-1-utf-8","utf-8","utf8"]},t._contentType="application/xml",t._URL={scheme:"about",username:"",password:"",host:null,port:null,path:["blank"],query:null,fragment:null,_cannotBeABaseURLFlag:!0,_blobURLEntry:null},t._origin=null,t._type="xml",t._mode="no-quirks",t._documentElement=null,t._hasNamespaces=!1,t._nodeDocumentOverwrite=null,t}return i(t,e),Object.defineProperty(t.prototype,"_nodeDocument",{get:function(){return this._nodeDocumentOverwrite||this},set:function(e){this._nodeDocumentOverwrite=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"implementation",{get:function(){return this._implementation||(this._implementation=m.create_domImplementation(this))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"URL",{get:function(){return h.urlSerializer(this._URL)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"documentURI",{get:function(){return this.URL},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"origin",{get:function(){return"null"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"compatMode",{get:function(){return"quirks"===this._mode?"BackCompat":"CSS1Compat"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"characterSet",{get:function(){return this._encoding.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"charset",{get:function(){return this._encoding.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputEncoding",{get:function(){return this._encoding.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentType",{get:function(){return this._contentType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"doctype",{get:function(){var e,t;try{for(var n=o(this._children),r=n.next();!r.done;r=n.next()){var i=r.value;if(d.Guard.isDocumentTypeNode(i))return i}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"documentElement",{get:function(){return this._documentElement},enumerable:!0,configurable:!0}),t.prototype.getElementsByTagName=function(e){return m.node_listOfElementsWithQualifiedName(e,this)},t.prototype.getElementsByTagNameNS=function(e,t){return m.node_listOfElementsWithNamespace(e,t,this)},t.prototype.getElementsByClassName=function(e){return m.node_listOfElementsWithClassNames(e,this)},t.prototype.createElement=function(e,t){if(!m.xml_isName(e))throw new u.InvalidCharacterError;"html"===this._type&&(e=e.toLowerCase());var n=null;void 0!==t&&(n=p.isString(t)?t:t.is);var r="html"===this._type||"application/xhtml+xml"===this._contentType?f.namespace.HTML:null;return m.element_createAnElement(this,e,r,null,n,!0)},t.prototype.createElementNS=function(e,t,n){return m.document_internalCreateElementNS(this,e,t,n)},t.prototype.createDocumentFragment=function(){return m.create_documentFragment(this)},t.prototype.createTextNode=function(e){return m.create_text(this,e)},t.prototype.createCDATASection=function(e){if("html"===this._type)throw new u.NotSupportedError;if(-1!==e.indexOf("]]>"))throw new u.InvalidCharacterError;return m.create_cdataSection(this,e)},t.prototype.createComment=function(e){return m.create_comment(this,e)},t.prototype.createProcessingInstruction=function(e,t){if(!m.xml_isName(e))throw new u.InvalidCharacterError;if(-1!==t.indexOf("?>"))throw new u.InvalidCharacterError;return m.create_processingInstruction(this,e,t)},t.prototype.importNode=function(e,t){if(void 0===t&&(t=!1),d.Guard.isDocumentNode(e)||d.Guard.isShadowRoot(e))throw new u.NotSupportedError;return m.node_clone(e,this,t)},t.prototype.adoptNode=function(e){if(d.Guard.isDocumentNode(e))throw new u.NotSupportedError;if(d.Guard.isShadowRoot(e))throw new u.HierarchyRequestError;return m.document_adopt(e,this),e},t.prototype.createAttribute=function(e){if(!m.xml_isName(e))throw new u.InvalidCharacterError;return"html"===this._type&&(e=e.toLowerCase()),m.create_attr(this,e)},t.prototype.createAttributeNS=function(e,t){var n=a(m.namespace_validateAndExtract(e,t),3),r=n[0],i=n[1],o=n[2],s=m.create_attr(this,o);return s._namespace=r,s._namespacePrefix=i,s},t.prototype.createEvent=function(e){return m.event_createLegacyEvent(e)},t.prototype.createRange=function(){var e=m.create_range();return e._start=[this,0],e._end=[this,0],e},t.prototype.createNodeIterator=function(e,t,n){void 0===t&&(t=l.WhatToShow.All),void 0===n&&(n=null);var r=m.create_nodeIterator(e,e,!0);return r._whatToShow=t,r._iteratorCollection=m.create_nodeList(e),p.isFunction(n)?(r._filter=m.create_nodeFilter(),r._filter.acceptNode=n):r._filter=n,r},t.prototype.createTreeWalker=function(e,t,n){void 0===t&&(t=l.WhatToShow.All),void 0===n&&(n=null);var r=m.create_treeWalker(e,e);return r._whatToShow=t,p.isFunction(n)?(r._filter=m.create_nodeFilter(),r._filter.acceptNode=n):r._filter=n,r},t.prototype._getTheParent=function(e){return"load"===e._type?null:s.dom.window},t.prototype.getElementById=function(e){throw new Error("Mixin: NonElementParentNode not implemented.")},Object.defineProperty(t.prototype,"children",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstElementChild",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastElementChild",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childElementCount",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),t.prototype.prepend=function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2),l=n(34),u=n(9),c=n(7),d=n(0),p=n(12),f=function(e){function t(){var t=e.call(this)||this;return t._children=new Set,t._namespace=null,t._namespacePrefix=null,t._localName="",t._customElementState="undefined",t._customElementDefinition=null,t._is=null,t._shadowRoot=null,t._attributeList=d.create_namedNodeMap(t),t._attributeChangeSteps=[],t._name="",t._assignedSlot=null,t}return i(t,e),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return this._namespace},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prefix",{get:function(){return this._namespacePrefix},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"localName",{get:function(){return this._localName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this._htmlUppercasedQualifiedName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return d.element_getAnAttributeValue(this,"id")},set:function(e){d.element_setAnAttributeValue(this,"id",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return d.element_getAnAttributeValue(this,"class")},set:function(e){d.element_setAnAttributeValue(this,"class",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classList",{get:function(){var e=d.element_getAnAttributeByName("class",this);return null===e&&(e=d.create_attr(this._nodeDocument,"class")),d.create_domTokenList(this,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"slot",{get:function(){return d.element_getAnAttributeValue(this,"slot")},set:function(e){d.element_setAnAttributeValue(this,"slot",e)},enumerable:!0,configurable:!0}),t.prototype.hasAttributes=function(){return 0!==this._attributeList.length},Object.defineProperty(t.prototype,"attributes",{get:function(){return this._attributeList},enumerable:!0,configurable:!0}),t.prototype.getAttributeNames=function(){var e,t,n=[];try{for(var r=o(this._attributeList),i=r.next();!i.done;i=r.next()){var a=i.value;n.push(a._qualifiedName)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},t.prototype.getAttribute=function(e){var t=d.element_getAnAttributeByName(e,this);return t?t._value:null},t.prototype.getAttributeNS=function(e,t){var n=d.element_getAnAttributeByNamespaceAndLocalName(e,t,this);return n?n._value:null},t.prototype.setAttribute=function(e,t){if(!d.xml_isName(e))throw new u.InvalidCharacterError;this._namespace===c.namespace.HTML&&"html"===this._nodeDocument._type&&(e=e.toLowerCase());for(var n=null,r=0;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),s=n(71),l=n(0),u=n(12),c=function(e){function t(t){void 0===t&&(t="");var n=e.call(this,t)||this;return n._name="",n._assignedSlot=null,n}return i(t,e),Object.defineProperty(t.prototype,"wholeText",{get:function(){var e,t,n="";try{for(var r=o(l.text_contiguousTextNodes(this,!0)),i=r.next();!i.done;i=r.next())n+=i.value._data}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},enumerable:!0,configurable:!0}),t.prototype.splitText=function(e){return l.text_split(this,e)},Object.defineProperty(t.prototype,"assignedSlot",{get:function(){throw new Error("Mixin: Slotable not implemented.")},enumerable:!0,configurable:!0}),t._create=function(e,n){void 0===n&&(n="");var r=new t(n);return r._nodeDocument=e,r},t}(s.CharacterDataImpl);t.TextImpl=c,u.idl_defineConst(c.prototype,"_nodeType",a.NodeType.Text)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return Object.defineProperty(e.prototype,"_startNode",{get:function(){return this._start[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_startOffset",{get:function(){return this._start[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_endNode",{get:function(){return this._end[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_endOffset",{get:function(){return this._end[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_collapsed",{get:function(){return this._start[0]===this._end[0]&&this._start[1]===this._end[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startContainer",{get:function(){return this._startNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startOffset",{get:function(){return this._startOffset},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endContainer",{get:function(){return this._endNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endOffset",{get:function(){return this._endOffset},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapsed",{get:function(){return this._collapsed},enumerable:!0,configurable:!0}),e}();t.AbstractRangeImpl=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(e){this._activeFlag=!1,this._root=e,this._whatToShow=r.WhatToShow.All,this._filter=null}return Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"whatToShow",{get:function(){return this._whatToShow},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),e}();t.TraverserImpl=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(0),o=n(12),a=function(){function e(e,t){this._target=null,this._relatedTarget=null,this._touchTargetList=[],this._path=[],this._currentTarget=null,this._eventPhase=r.EventPhase.None,this._stopPropagationFlag=!1,this._stopImmediatePropagationFlag=!1,this._canceledFlag=!1,this._inPassiveListenerFlag=!1,this._composedFlag=!1,this._initializedFlag=!1,this._dispatchFlag=!1,this._isTrusted=!1,this._bubbles=!1,this._cancelable=!1,this._type=e,t&&(this._bubbles=t.bubbles||!1,this._cancelable=t.cancelable||!1,this._composedFlag=t.composed||!1),this._initializedFlag=!0,this._timeStamp=(new Date).getTime()}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"srcElement",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this._currentTarget},enumerable:!0,configurable:!0}),e.prototype.composedPath=function(){var e=[],t=this._path;if(0===t.length)return e;var n=this._currentTarget;if(null===n)throw new Error("Event currentTarget is null.");e.push(n);for(var r=0,i=0,o=t.length-1;o>=0;){if(t[o].rootOfClosedTree&&i++,t[o].invocationTarget===n){r=o;break}t[o].slotInClosedTree&&i--,o--}var a=i,s=i;for(o=r-1;o>=0;)t[o].rootOfClosedTree&&a++,a<=s&&e.unshift(t[o].invocationTarget),t[o].slotInClosedTree&&--a0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=n(3),s=n(1),l=n(99),u=n(73),c=n(17),d=n(173),p=n(30),f=n(52),h=n(37);t.document_elementInterface=function(e,t){return l.ElementImpl},t.document_internalCreateElementNS=function(e,t,n,i){var o=r(d.namespace_validateAndExtract(t,n),3),a=o[0],l=o[1],u=o[2],c=null;return void 0!==i&&(c=s.isString(i)?i:i.is),f.element_createAnElement(e,u,a,l,c,!0)},t.document_adopt=function(e,t){var n,r;if(e._nodeDocument!==t||null!==e._parent){var s=e._nodeDocument;if(e._parent&&h.mutation_remove(e,e._parent),t!==s)for(var l=c.tree_getFirstDescendantNode(e,!0,!0);null!==l;){if(l._nodeDocument=t,a.Guard.isElementNode(l))try{for(var d=(n=void 0,i(l._attributeList._asArray())),f=d.next();!f.done;f=d.next())f.value._nodeDocument=t}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}o.dom.features.customElements&&a.Guard.isElementNode(l)&&"custom"===l._customElementState&&u.customElement_enqueueACustomElementCallbackReaction(l,"adoptedCallback",[s,t]),o.dom.features.steps&&p.dom_runAdoptingSteps(l,s),l=c.tree_getNextDescendantNode(e,l,!0,!0)}}}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(9),s=n(17),l=n(51),u=n(30);t.characterData_replaceData=function(e,t,n,c){var d,p,f=s.tree_nodeLength(e);if(t>f)throw new a.IndexSizeError("Offset exceeds character data length. Offset: "+t+", Length: "+f+", Node is "+e.nodeName+".");t+n>f&&(n=f-t),i.dom.features.mutationObservers&&l.observer_queueMutationRecord("characterData",e,null,null,e._data,[],[],null,null);var h=e._data.substring(0,t)+c+e._data.substring(t+n);e._data=h;try{for(var m=r(i.dom.rangeList),g=m.next();!g.done;g=m.next()){var v=g.value;v._start[0]===e&&v._start[1]>t&&v._start[1]<=t+n&&(v._start[1]=t),v._end[0]===e&&v._end[1]>t&&v._end[1]<=t+n&&(v._end[1]=t),v._start[0]===e&&v._start[1]>t+n&&(v._start[1]+=c.length-n),v._end[0]===e&&v._end[1]>t+n&&(v._end[1]+=c.length-n)}}catch(e){d={error:e}}finally{try{g&&!g.done&&(p=m.return)&&p.call(m)}finally{if(d)throw d.error}}i.dom.features.steps&&o.Guard.isTextNode(e)&&null!==e._parent&&u.dom_runChildTextContentChangeSteps(e._parent)},t.characterData_substringData=function(e,t,n){var r=s.tree_nodeLength(e);if(t>r)throw new a.IndexSizeError("Offset exceeds character data length. Offset: "+t+", Length: "+r+", Node is "+e.nodeName+".");return t+n>r?e._data.substr(t):e._data.substr(t,n)}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(7);function s(e){var t=a.string.splitAStringOnASCIIWhitespace(e);return new Set(t)}function l(e){return i(e).join(" ")}t.orderedSet_parse=s,t.orderedSet_serialize=l,t.orderedSet_sanitize=function(e){return l(s(e))},t.orderedSet_contains=function(e,t,n){var r,i,a,s;try{for(var l=o(t),u=l.next();!u.done;u=l.next()){var c=u.value,d=!1;try{for(var p=(a=void 0,o(e)),f=p.next();!f.done;f=p.next()){var h=f.value;if(n){if(h===c){d=!0;break}}else if(h.toUpperCase()===c.toUpperCase()){d=!0;break}}}catch(e){a={error:e}}finally{try{f&&!f.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}if(!d)return!1}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return!0}},function(e,t,n){"use strict";n(179),Object.defineProperty(t,"__esModule",{value:!0});var r=n(262),i=n(110),o=n(1);i.dom.setFeatures(!1),t.createDocument=function(){var e=(new r.DOMImplementation).createDocument(null,"root",null);return e.documentElement&&e.removeChild(e.documentElement),e},t.sanitizeInput=function(e,t){if(null==e)return e;if(void 0===t)return e+"";var n="";e+="";for(var r=0;r=32&&i<=55295||i>=57344&&i<=65533)n+=e.charAt(r);else if(i>=55296&&i<=56319&&r=56320&&a<=57343?(i=1024*(i-55296)+a-56320+65536,n+=String.fromCodePoint(i),r++):n+=o.isString(t)?t:t(e.charAt(r),r,e)}else n+=o.isString(t)?t:t(e.charAt(r),r,e)}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(153);t.AbortController=i.AbortControllerImpl;var o=n(154);t.AbortSignal=o.AbortSignalImpl;var a=n(102);t.AbstractRange=a.AbstractRangeImpl;var s=n(157);t.Attr=s.AttrImpl;var l=n(158);t.CDATASection=l.CDATASectionImpl;var u=n(71);t.CharacterData=u.CharacterDataImpl;var c=n(263),d=n(159);t.Comment=d.CommentImpl;var p=n(171);t.CustomEvent=p.CustomEventImpl;var f=n(100);t.DocumentFragment=f.DocumentFragmentImpl;var h=n(98);t.Document=h.DocumentImpl;var m=n(264),g=n(155);t.DocumentType=g.DocumentTypeImpl;var v=n(6);t.dom=v.dom;var y=n(148);t.DOMImplementation=y.DOMImplementationImpl;var _=n(170);t.DOMTokenList=_.DOMTokenListImpl;var b=n(99);t.Element=b.ElementImpl;var x=n(104);t.Event=x.EventImpl;var w=n(70);t.EventTarget=w.EventTargetImpl;var S=n(161);t.HTMLCollection=S.HTMLCollectionImpl;var C=n(265);t.MutationObserver=C.MutationObserverImpl;var T=n(169);t.MutationRecord=T.MutationRecordImpl;var M=n(164);t.NamedNodeMap=M.NamedNodeMapImpl;var D=n(168);t.NodeFilter=D.NodeFilterImpl;var A=n(34);t.Node=A.NodeImpl;var P=n(166);t.NodeIterator=P.NodeIteratorImpl;var k=n(162);t.NodeList=k.NodeListImpl;var L=n(163);t.NodeListStatic=L.NodeListStaticImpl;var O=n(266),E=n(267),I=n(268),N=n(160);t.ProcessingInstruction=N.ProcessingInstructionImpl;var R=n(165);t.Range=R.RangeImpl;var B=n(156);t.ShadowRoot=B.ShadowRootImpl;var F=n(269),V=n(270);t.StaticRange=V.StaticRangeImpl;var U=n(101);t.Text=U.TextImpl;var G=n(103);t.Traverser=G.TraverserImpl;var z=n(167);t.TreeWalker=z.TreeWalkerImpl;var j=n(149);t.Window=j.WindowImpl;var Y=n(151);t.XMLDocument=Y.XMLDocumentImpl,r.applyMixin(b.ElementImpl,c.ChildNodeImpl),r.applyMixin(u.CharacterDataImpl,c.ChildNodeImpl),r.applyMixin(g.DocumentTypeImpl,c.ChildNodeImpl),r.applyMixin(h.DocumentImpl,m.DocumentOrShadowRootImpl),r.applyMixin(B.ShadowRootImpl,m.DocumentOrShadowRootImpl),r.applyMixin(b.ElementImpl,O.NonDocumentTypeChildNodeImpl),r.applyMixin(u.CharacterDataImpl,O.NonDocumentTypeChildNodeImpl),r.applyMixin(h.DocumentImpl,E.NonElementParentNodeImpl),r.applyMixin(f.DocumentFragmentImpl,E.NonElementParentNodeImpl),r.applyMixin(h.DocumentImpl,I.ParentNodeImpl),r.applyMixin(f.DocumentFragmentImpl,I.ParentNodeImpl),r.applyMixin(b.ElementImpl,I.ParentNodeImpl),r.applyMixin(U.TextImpl,F.SlotableImpl),r.applyMixin(b.ElementImpl,F.SlotableImpl)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.EOF=0]="EOF",e[e.Declaration=1]="Declaration",e[e.DocType=2]="DocType",e[e.Element=3]="Element",e[e.Text=4]="Text",e[e.CDATA=5]="CDATA",e[e.PI=6]="PI",e[e.Comment=7]="Comment",e[e.ClosingTag=8]="ClosingTag"}(t.TokenType||(t.TokenType={}))},function(e,t,n){"use strict";n(64),n(20),n(66);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){var n=this,r=this._builderOptions,i=null;return o.isFunction(t)?i=this.parse(e,t.apply(this)):o.isArray(t)||o.isSet(t)?o.forEachArray(t,(function(t){return i=n.parse(e,t)}),this):o.isMap(t)||o.isObject(t)?o.forEachObject(t,(function(t,a){if(o.isFunction(a)&&(a=a.apply(n)),r.ignoreConverters||0!==t.indexOf(r.convert.att))if(r.ignoreConverters||0!==t.indexOf(r.convert.text))if(r.ignoreConverters||0!==t.indexOf(r.convert.cdata))if(r.ignoreConverters||0!==t.indexOf(r.convert.comment))if(r.ignoreConverters||0!==t.indexOf(r.convert.ins)){if((o.isArray(a)||o.isSet(a))&&o.isEmpty(a));else if((o.isMap(a)||o.isObject(a))&&o.isEmpty(a))i=n.element(e,void 0,n.sanitize(t))||i;else if(r.keepNullNodes||null!=a)if(o.isArray(a)||o.isSet(a))o.forEachArray(a,(function(r){var o={};o[t]=r,i=n.parse(e,o)}),n);else if(o.isMap(a)||o.isObject(a))(s=n.element(e,void 0,n.sanitize(t)))&&(i=s,n.parse(s,a));else if(null!=a&&""!==a){var s;(s=n.element(e,void 0,n.sanitize(t)))&&(i=s,n.text(s,n._decodeText(n.sanitize(a))))}else i=n.element(e,void 0,n.sanitize(t))||i}else if(o.isString(a)){var l=a.indexOf(" "),u=-1===l?a:a.substr(0,l),c=-1===l?"":a.substr(l+1);i=n.instruction(e,n.sanitize(u),n.sanitize(c))||i}else o.isArray(a)||o.isSet(a)?o.forEachArray(a,(function(t){var r=t.indexOf(" "),o=-1===r?t:t.substr(0,r),a=-1===r?"":t.substr(r+1);i=n.instruction(e,n.sanitize(o),n.sanitize(a))||i}),n):o.forEachObject(a,(function(t,r){return i=n.instruction(e,n.sanitize(t),n.sanitize(r))||i}),n);else o.isArray(a)||o.isSet(a)?o.forEachArray(a,(function(t){return i=n.comment(e,n.sanitize(t))||i}),n):i=n.comment(e,n.sanitize(a))||i;else o.isArray(a)||o.isSet(a)?o.forEachArray(a,(function(t){return i=n.cdata(e,n.sanitize(t))||i}),n):i=n.cdata(e,n.sanitize(a))||i;else i=o.isMap(a)||o.isObject(a)?n.parse(e,a):n.text(e,n._decodeText(n.sanitize(a)))||i;else if(t===r.convert.att){if(o.isArray(a)||o.isSet(a))throw new Error("Invalid attribute: "+a.toString()+". "+e._debugInfo());o.forEachObject(a,(function(t,r){i=n.attribute(e,void 0,n.sanitize(t),n._decodeAttributeValue(n.sanitize(r)))||i}))}else i=n.attribute(e,void 0,n.sanitize(t.substr(r.convert.att.length)),n._decodeAttributeValue(n.sanitize(a)))||i}),this):(r.keepNullNodes||null!=t)&&(i=this.text(e,this._decodeText(this.sanitize(t)))||i),i||e},t}(n(75).BaseReader);t.ObjectReader=a},function(e,t,n){"use strict";var r=n(39);e.exports=new r({explicit:[n(286),n(287),n(288)]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.level=0,this._builderOptions=e,this._writerOptions=e};t.BaseCBWriter=r},function(e,t,n){var r=n(16),i=n(8),o=n(116);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(11),i=n(13),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(118),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(11),i=n(80),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(14),i=n(187),o=n(55),a=n(15);e.exports=function(e,t){for(var n=i(t),s=a.f,l=o.f,u=0;ul;)r(s,n=t[l++])&&(~o(u,n)||u.push(n));return u}},function(e,t,n){var r=n(24),i=n(26),o=n(83),a=function(e){return function(t,n,a){var s,l=r(t),u=i(l.length),c=o(a,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(8),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==u||n!=l&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},function(e,t,n){var r=n(86);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(5);t.f=r},function(e,t,n){var r=n(120),i=n(14),o=n(125),a=n(15).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(13),i=n(59),o=n(5)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r,i,o=n(11),a=n(193),s=o.process,l=s&&s.versions,u=l&&l.v8;u?i=(r=u.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},function(e,t,n){var r=n(5),i=n(60),o=n(15),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},function(e,t,n){"use strict";var r,i,o,a=n(132),s=n(21),l=n(14),u=n(5),c=n(44),d=u("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):p=!0),null==r&&(r={}),c||l(r,d)||s(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(e,t,n){var r=n(14),i=n(27),o=n(57),a=n(196),s=o("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){var r=n(18),i=n(197);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){"use strict";var r=n(56),i=n(15),o=n(40);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},function(e,t,n){var r=n(90),i=n(42),o=n(5)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){"use strict";var r=n(18);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(47),i=n(35),o=function(e){return function(t,n){var o,a,s=String(i(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t,n){var r=n(4),i=n(27),o=n(61);r({target:"Object",stat:!0,forced:n(8)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){"use strict";var r=n(4),i=n(11),o=n(123),a=n(25),s=n(140),l=n(141),u=n(142),c=n(13),d=n(8),p=n(208),f=n(62),h=n(209);e.exports=function(e,t,n){var m=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),v=m?"set":"add",y=i[e],_=y&&y.prototype,b=y,x={},w=function(e){var t=_[e];a(_,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(o(e,"function"!=typeof y||!(g||_.forEach&&!d((function(){(new y).entries().next()})))))b=n.getConstructor(t,e,m,v),s.REQUIRED=!0;else if(o(e,!0)){var S=new b,C=S[v](g?{}:-0,1)!=S,T=d((function(){S.has(1)})),M=p((function(e){new y(e)})),D=!g&&d((function(){for(var e=new y,t=5;t--;)e[v](t,t);return!e.has(-0)}));M||((b=t((function(t,n){u(t,b,e);var r=h(new y,t,b);return null!=n&&l(n,r[v],r,m),r}))).prototype=_,_.constructor=b),(T||D)&&(w("delete"),w("has"),m&&w("get")),(D||C)&&w(v),g&&_.clear&&delete _.clear}return x[e]=b,r({global:!0,forced:b!=y},x),f(b,e),g||n.setStrong(b,e,m),b}},function(e,t,n){var r=n(45),i=n(13),o=n(14),a=n(15).f,s=n(58),l=n(204),u=s("meta"),c=0,d=Object.isExtensible||function(){return!0},p=function(e){a(e,u,{value:{objectID:"O"+ ++c,weakData:{}}})},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,u)){if(!d(e))return"F";if(!t)return"E";p(e)}return e[u].objectID},getWeakData:function(e,t){if(!o(e,u)){if(!d(e))return!0;if(!t)return!1;p(e)}return e[u].weakData},onFreeze:function(e){return l&&f.REQUIRED&&d(e)&&!o(e,u)&&p(e),e}};r[u]=!0},function(e,t,n){var r=n(18),i=n(205),o=n(26),a=n(87),s=n(206),l=n(207),u=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,d){var p,f,h,m,g,v,y,_=a(t,n,c?2:1);if(d)p=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(i(f)){for(h=0,m=o(e.length);m>h;h++)if((g=c?_(r(y=e[h])[0],y[1]):_(e[h]))&&g instanceof u)return g;return new u(!1)}p=f.call(e)}for(v=p.next;!(y=v.call(p)).done;)if("object"==typeof(g=l(p,_,y.value,c))&&g&&g instanceof u)return g;return new u(!1)}).stop=function(e){return new u(!0,e)}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";var r=n(15).f,i=n(60),o=n(210),a=n(87),s=n(142),l=n(141),u=n(88),c=n(211),d=n(16),p=n(140).fastKey,f=n(43),h=f.set,m=f.getterFor;e.exports={getConstructor:function(e,t,n,u){var c=e((function(e,r){s(e,c,t),h(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),d||(e.size=0),null!=r&&l(r,e[u],e,n)})),f=m(t),g=function(e,t,n){var r,i,o=f(e),a=v(e,t);return a?a.value=n:(o.last=a={index:i=p(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),d?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},v=function(e,t){var n,r=f(e),i=p(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(c.prototype,{clear:function(){for(var e=f(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=f(this),n=v(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),d?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=f(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),o(c.prototype,n?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),d&&r(c.prototype,"size",{get:function(){return f(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",i=m(t),o=m(r);u(e,t,(function(e,t){h(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},function(e,t,n){"use strict";var r,i=n(4),o=n(55).f,a=n(26),s=n(222),l=n(35),u=n(224),c=n(44),d="".endsWith,p=Math.min,f=u("endsWith");i({target:"String",proto:!0,forced:!(!c&&!f&&(r=o(String.prototype,"endsWith"),r&&!r.writable)||f)},{endsWith:function(e){var t=String(l(this));s(e);var n=arguments.length>1?arguments[1]:void 0,r=a(t.length),i=void 0===n?r:p(a(n),r),o=String(e);return d?d.call(t,o,i):t.slice(i-o.length,i)===o}})},function(e,t,n){"use strict";(function(e){var r=n(229),i=n(230),o=n(231);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return D(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var d=!0,p=0;pi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function T(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=n)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function E(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function I(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,o){return o||N(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,o){return o||N(e,0,n,8),i.write(e,t,n,r,52,8),n+8}t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return u(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):E(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):E(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):E(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):E(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(78))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isASCIIByte=function(e){return e>=0&&e<=127}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spread||function(){for(var e=[],t=0;t=65&&n<=90&&(e[t]=n+32)}},t.byteUppercase=function(e){for(var t=0;t=97&&n<=122&&(e[t]=n-32)}},t.byteCaseInsensitiveMatch=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n=65&&r<=90&&(r+=32),i>=65&&i<=90&&(i+=32),r!==i)return!1}return!0},t.startsWith=function(e,t){for(var n=0;;){if(n>=e.length)return!1;if(n>=t.length)return!0;if(e[n]!==t[n])return!1;n++}},t.byteLessThan=function(e,t){for(var n=0;;){if(n>=e.length)return!1;if(n>=t.length)return!0;var r=e[n],i=t[n];if(ri)return!1;n++}},t.isomorphicDecode=function(e){return String.fromCodePoint.apply(String,i(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=n(7),o=n(0),a=n(12),s=function(){function e(e){this._associatedDocument=e||r.dom.window.document}return e.prototype.createDocumentType=function(e,t,n){return o.namespace_validate(e),o.create_documentType(this._associatedDocument,e,t,n)},e.prototype.createDocument=function(e,t,n){void 0===n&&(n=null);var r=o.create_xmlDocument(),a=null;return t&&(a=o.document_internalCreateElementNS(r,e,t)),n&&r.appendChild(n),a&&r.appendChild(a),r._origin=this._associatedDocument._origin,e===i.namespace.HTML?r._contentType="application/xhtml+xml":e===i.namespace.SVG?r._contentType="image/svg+xml":r._contentType="application/xml",r},e.prototype.createHTMLDocument=function(e){var t=o.create_document();t._type="html",t._contentType="text/html",t.appendChild(o.create_documentType(t,"html","",""));var n=o.element_createAnElement(t,"html",i.namespace.HTML);t.appendChild(n);var r=o.element_createAnElement(t,"head",i.namespace.HTML);if(n.appendChild(r),void 0!==e){var a=o.element_createAnElement(t,"title",i.namespace.HTML);r.appendChild(a);var s=o.create_text(t,e);a.appendChild(s)}var l=o.element_createAnElement(t,"body",i.namespace.HTML);return n.appendChild(l),t._origin=this._associatedDocument._origin,t},e.prototype.hasFeature=function(){return!0},e._create=function(t){return new e(t)},e}();t.DOMImplementationImpl=s,a.idl_defineConst(s.prototype,"_ID","@oozcitak/dom")},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(70),a=n(1),s=n(0),l=function(e){function t(){var t=e.call(this)||this;return t._signalSlots=new Set,t._mutationObserverMicrotaskQueued=!1,t._mutationObservers=new Set,t._iteratorList=new a.FixedSizeSet,t._associatedDocument=s.create_document(),t}return i(t,e),Object.defineProperty(t.prototype,"document",{get:function(){return this._associatedDocument},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this._currentEvent},enumerable:!0,configurable:!0}),t._create=function(){return new t},t}(o.EventTargetImpl);t.WindowImpl=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(){}return e.isNode=function(e){return!!e&&void 0!==e._nodeType},e.isDocumentNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Document},e.isDocumentTypeNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.DocumentType},e.isDocumentFragmentNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.DocumentFragment},e.isAttrNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Attribute},e.isCharacterDataNode=function(t){if(!e.isNode(t))return!1;var n=t._nodeType;return n===r.NodeType.Text||n===r.NodeType.ProcessingInstruction||n===r.NodeType.Comment||n===r.NodeType.CData},e.isTextNode=function(t){return e.isNode(t)&&(t._nodeType===r.NodeType.Text||t._nodeType===r.NodeType.CData)},e.isExclusiveTextNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Text},e.isCDATASectionNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.CData},e.isCommentNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Comment},e.isProcessingInstructionNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.ProcessingInstruction},e.isElementNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Element},e.isCustomElementNode=function(t){return e.isElementNode(t)&&"custom"===t._customElementState},e.isShadowRoot=function(e){return!!e&&void 0!==e.host},e.isMouseEvent=function(e){return!!e&&void 0!==e.screenX&&null!=e.screenY},e.isSlotable=function(t){return!!t&&void 0!==t._name&&void 0!==t._assignedSlot&&(e.isTextNode(t)||e.isElementNode(t))},e.isSlot=function(t){return!!t&&void 0!==t._name&&void 0!==t._assignedNodes&&e.isElementNode(t)},e.isWindow=function(e){return!!e&&void 0!==e.navigator},e.isEventListener=function(e){return!!e&&void 0!==e.handleEvent},e.isRegisteredObserver=function(e){return!!e&&void 0!==e.observer&&void 0!==e.options},e.isTransientRegisteredObserver=function(t){return!!t&&void 0!==t.source&&e.isRegisteredObserver(t)},e}();t.Guard=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return e.call(this)||this}return i(t,e),t}(n(98).DocumentImpl);t.XMLDocumentImpl=o},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var o,a=n(1),s=n(243),l=n(7),u=n(244),c={ftp:21,file:null,http:80,https:443,ws:80,wss:443},d=/[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,p=/[ "<>`]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[ "<>`#?{}]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h=/[ "<>`#?{}/:;=@\[\]\\\^\|]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[0-9A-Za-z!\$&-\/:;=\?@_~\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB40-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD]/,g=/[\0\t\f\r #%/:?@\[\\\]]/;function v(e){void 0!==o&&o.call(null,"Validation Error: "+e)}function y(){return{scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,_cannotBeABaseURLFlag:!1,_blobURLEntry:null}}function _(e){return e in c}function b(e){return _(e.scheme)}function x(e){return c[e]||null}function w(e){return""!==e.username||""!==e.password}function S(e,t){var n,i;void 0===t&&(t=!1);var o=e.scheme+":";if(null!==e.host?(o+="//",w(e)&&(o+=e.username,""!==e.password&&(o+=":"+e.password),o+="@"),o+=C(e.host),null!==e.port&&(o+=":"+e.port)):null===e.host&&"file"===e.scheme&&(o+="//"),e._cannotBeABaseURLFlag)o+=e.path[0];else try{for(var a=r(e.path),s=a.next();!s.done;s=a.next())o+="/"+s.value}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return null!==e.query&&(o+="?"+e.query),t||null===e.fragment||(o+="#"+e.fragment),o}function C(e){return a.isNumber(e)?T(e):a.isArray(e)?"["+M(e)+"]":e}function T(e){for(var t="",n=e,r=1;r<=4;r++)t=(n%256).toString()+t,4!==r&&(t="."+t),n=Math.floor(n/256);return t}function M(e){for(var t="",n=null,r=-1,i=0,o=0,a=0;a<8;a++)if(0===e[a]){i=1;for(var s=a+1;s<8&&0===e[s];s++)i++;i>o&&(o=i,r=a)}o>1&&(n=r);for(var l=!1,u=0;u<8;u++)l&&0===e[u]||(l&&(l=!1),n!==u?(t+=e[u].toString(16),7!==u&&(t+=":")):(t+=0===u?"::":":",l=!0));return t}function D(e,t,n,i,o){var u,c,g,y;if(void 0===i){i={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,_cannotBeABaseURLFlag:!1,_blobURLEntry:null};var S=/^[\u0000-\u001F\u0020]+/,C=/[\u0000-\u001F\u0020]+$/;(S.test(e)||C.test(e))&&v("Input string contains leading or trailing control characters or space."),e=(e=e.replace(S,"")).replace(C,"")}var T=/[\u0009\u000A\u000D]/g;T.test(e)&&v("Input string contains tab or newline characters."),e=e.replace(T,"");var M=void 0===o?s.ParserState.SchemeStart:o;void 0===t&&(t=null);for(var D=void 0===n||"replacement"===n||"UTF-16BE"===n||"UTF-16LE"===n?"UTF-8":n,N="",R=!1,B=!1,F=!1,V=new a.StringWalker(e);;){switch(M){case s.ParserState.SchemeStart:if(l.codePoint.ASCIIAlpha.test(V.c()))N+=V.c().toLowerCase(),M=s.ParserState.Scheme;else{if(void 0!==o)return v("Invalid scheme start character."),null;M=s.ParserState.NoScheme,V.pointer--}break;case s.ParserState.Scheme:if(l.codePoint.ASCIIAlphanumeric.test(V.c())||"+"===V.c()||"-"===V.c()||"."===V.c())N+=V.c().toLowerCase();else{if(":"!==V.c()){if(void 0===o){N="",M=s.ParserState.NoScheme,V.pointer=0;continue}return v("Invalid input string."),null}if(void 0!==o){if(_(i.scheme)&&!_(N))return i;if(!_(i.scheme)&&_(N))return i;if((w(i)||null!==i.port)&&"file"===N)return i;if("file"===i.scheme&&(""===i.host||null===i.host))return i}if(i.scheme=N,void 0!==o)return i.port===x(i.scheme)&&(i.port=null),i;N="","file"===i.scheme?(V.remaining().startsWith("//")||v("Invalid file URL scheme, '//' expected."),M=s.ParserState.File):b(i)&&null!==t&&t.scheme===i.scheme?M=s.ParserState.SpecialRelativeOrAuthority:b(i)?M=s.ParserState.SpecialAuthoritySlashes:V.remaining().startsWith("/")?(M=s.ParserState.PathOrAuthority,V.pointer++):(i._cannotBeABaseURLFlag=!0,i.path.push(""),M=s.ParserState.CannotBeABaseURLPath)}break;case s.ParserState.NoScheme:if(null===t||t._cannotBeABaseURLFlag&&"#"!==V.c())return v("Invalid input string."),null;t._cannotBeABaseURLFlag&&"#"===V.c()?(i.scheme=t.scheme,i.path=l.list.clone(t.path),i.query=t.query,i.fragment="",i._cannotBeABaseURLFlag=!0,M=s.ParserState.Fragment):"file"!==t.scheme?(M=s.ParserState.Relative,V.pointer--):(M=s.ParserState.File,V.pointer--);break;case s.ParserState.SpecialRelativeOrAuthority:"/"===V.c()&&V.remaining().startsWith("/")?(M=s.ParserState.SpecialAuthorityIgnoreSlashes,V.pointer++):(v("Invalid input string."),M=s.ParserState.Relative,V.pointer--);break;case s.ParserState.PathOrAuthority:"/"===V.c()?M=s.ParserState.Authority:(M=s.ParserState.Path,V.pointer--);break;case s.ParserState.Relative:if(null===t)throw new Error("Invalid parser state. Base URL is null.");switch(i.scheme=t.scheme,V.c()){case"":i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),i.query=t.query;break;case"/":M=s.ParserState.RelativeSlash;break;case"?":i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),i.query="",M=s.ParserState.Query;break;case"#":i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),i.query=t.query,i.fragment="",M=s.ParserState.Fragment;break;default:b(i)&&"\\"===V.c()?(v("Invalid input string."),M=s.ParserState.RelativeSlash):(i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),0!==i.path.length&&i.path.splice(i.path.length-1,1),M=s.ParserState.Path,V.pointer--)}break;case s.ParserState.RelativeSlash:if(!b(i)||"/"!==V.c()&&"\\"!==V.c())if("/"===V.c())M=s.ParserState.Authority;else{if(null===t)throw new Error("Invalid parser state. Base URL is null.");i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,M=s.ParserState.Path,V.pointer--}else"\\"===V.c()&&v("Invalid input string."),M=s.ParserState.SpecialAuthorityIgnoreSlashes;break;case s.ParserState.SpecialAuthoritySlashes:"/"===V.c()&&V.remaining().startsWith("/")?(M=s.ParserState.SpecialAuthorityIgnoreSlashes,V.pointer++):(v("Expected '//'."),M=s.ParserState.SpecialAuthorityIgnoreSlashes,V.pointer--);break;case s.ParserState.SpecialAuthorityIgnoreSlashes:"/"!==V.c()&&"\\"!==V.c()?(M=s.ParserState.Authority,V.pointer--):v("Unexpected '/' or '\\'.");break;case s.ParserState.Authority:if("@"===V.c()){v("Unexpected '@'."),R&&(N="%40"+N),R=!0;try{for(var G=(u=void 0,r(N)),z=G.next();!z.done;z=G.next()){var Y=z.value;if(":"!==Y||F){var H=j(Y,h);F?i.password+=H:i.username+=H}else F=!0}}catch(e){u={error:e}}finally{try{z&&!z.done&&(c=G.return)&&c.call(G)}finally{if(u)throw u.error}}N=""}else if(""===V.c()||"/"===V.c()||"?"===V.c()||"#"===V.c()||b(i)&&"\\"===V.c()){if(R&&""===N)return v("Invalid input string."),null;V.pointer-=N.length+1,N="",M=s.ParserState.Host}else N+=V.c();break;case s.ParserState.Host:case s.ParserState.Hostname:if(void 0!==o&&"file"===i.scheme)V.pointer--,M=s.ParserState.FileHost;else if(":"!==V.c()||B)if(""===V.c()||"/"===V.c()||"?"===V.c()||"#"===V.c()||b(i)&&"\\"===V.c()){if(V.pointer--,b(i)&&""===N)return v("Invalid input string."),null;if(void 0!==o&&""===N&&(w(i)||null!==i.port))return v("Invalid input string."),i;if(null===($=I(N,!b(i))))return null;if(i.host=$,N="",M=s.ParserState.PathStart,void 0!==o)return i}else"["===V.c()&&(B=!0),"]"===V.c()&&(B=!1),N+=V.c();else{if(""===N)return v("Invalid input string."),null;if(null===($=I(N,!b(i))))return null;if(i.host=$,N="",M=s.ParserState.Port,o===s.ParserState.Hostname)return i}break;case s.ParserState.Port:if(l.codePoint.ASCIIDigit.test(V.c()))N+=V.c();else{if(!(""===V.c()||"/"===V.c()||"?"===V.c()||"#"===V.c()||b(i)&&"\\"===V.c()||o))return v("Invalid input string."),null;if(""!==N&&""!==N){var W=parseInt(N,10);if(W>Math.pow(2,16)-1)return v("Invalid port number."),null;i.port=W===x(i.scheme)?null:W,N=""}if(void 0!==o)return i;M=s.ParserState.PathStart,V.pointer--}break;case s.ParserState.File:if(i.scheme="file","/"===V.c()||"\\"===V.c())"\\"===V.c()&&v("Invalid input string."),M=s.ParserState.FileSlash;else if(null!==t&&"file"===t.scheme)switch(V.c()){case"":i.host=t.host,i.path=l.list.clone(t.path),i.query=t.query;break;case"?":i.host=t.host,i.path=l.list.clone(t.path),i.query="",M=s.ParserState.Query;break;case"#":i.host=t.host,i.path=l.list.clone(t.path),i.query=t.query,i.fragment="",M=s.ParserState.Fragment;break;default:E(V.substring())?v("Unexpected windows drive letter in input string."):(i.host=t.host,i.path=l.list.clone(t.path),k(i)),M=s.ParserState.Path,V.pointer--}else M=s.ParserState.Path,V.pointer--;break;case s.ParserState.FileSlash:"/"===V.c()||"\\"===V.c()?("\\"===V.c()&&v("Invalid input string."),M=s.ParserState.FileHost):(null===t||"file"!==t.scheme||E(V.substring())||(L(t.path[0])?i.path.push(t.path[0]):i.host=t.host),M=s.ParserState.Path,V.pointer--);break;case s.ParserState.FileHost:if(""===V.c()||"/"===V.c()||"\\"===V.c()||"?"===V.c()||"#"===V.c())if(V.pointer--,void 0===o&&O(N))v("Unexpected windows drive letter in input string."),M=s.ParserState.Path;else if(""===N){if(i.host="",void 0!==o)return i;M=s.ParserState.PathStart}else{var $;if(null===($=I(N,!b(i))))return null;if("localhost"===$&&($=""),i.host=$,void 0!==o)return i;N="",M=s.ParserState.PathStart}else N+=V.c();break;case s.ParserState.PathStart:b(i)?("\\"===V.c()&&v("Invalid input string."),M=s.ParserState.Path,"/"!==V.c()&&"\\"!==V.c()&&V.pointer--):void 0===o&&"?"===V.c()?(i.query="",M=s.ParserState.Query):void 0===o&&"#"===V.c()?(i.fragment="",M=s.ParserState.Fragment):""!==V.c()&&(M=s.ParserState.Path,"/"!==V.c()&&V.pointer--);break;case s.ParserState.Path:if(""===V.c()||"/"===V.c()||b(i)&&"\\"===V.c()||void 0===o&&("?"===V.c()||"#"===V.c())){if(b(i)&&"\\"===V.c()&&v("Invalid input string."),P(N))k(i),"/"===V.c()||b(i)&&"\\"===V.c()||i.path.push("");else if(!A(N)||"/"===V.c()||b(i)&&"\\"===V.c()){if(!A(N)){if("file"===i.scheme&&0===i.path.length&&O(N)){null!==i.host&&""!==i.host&&(v("Invalid input string."),i.host="");var Z=Array.from(N);N=Z.slice(0,1)+":"+Z.slice(2)}i.path.push(N)}}else i.path.push("");if(N="","file"===i.scheme&&(""===V.c()||"?"===V.c()||"#"===V.c()))for(;i.path.length>1&&""===i.path[0];)v("Invalid input string."),i.path.splice(0,1);"?"===V.c()&&(i.query="",M=s.ParserState.Query),"#"===V.c()&&(i.fragment="",M=s.ParserState.Fragment)}else m.test(V.c())||"%"===V.c()||v("Character is not a URL code point or a percent encoded character."),"%"!==V.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(V.remaining())||v("Percent encoded character must be followed by two hex digits."),N+=j(V.c(),f);break;case s.ParserState.CannotBeABaseURLPath:"?"===V.c()?(i.query="",M=s.ParserState.Query):"#"===V.c()?(i.fragment="",M=s.ParserState.Fragment):(""===V.c()||m.test(V.c())||"%"===V.c()||v("Character is not a URL code point or a percent encoded character."),"%"!==V.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(V.remaining())||v("Percent encoded character must be followed by two hex digits."),""!==V.c()&&(i.path[0]+=j(V.c(),d)));break;case s.ParserState.Query:if("UTF-8"===D||b(i)&&"ws"!==i.scheme&&"wss"!==i.scheme||(D="UTF-8"),void 0===o&&"#"===V.c())i.fragment="",M=s.ParserState.Fragment;else if(""!==V.c()){if(m.test(V.c())||"%"===V.c()||v("Character is not a URL code point or a percent encoded character."),"%"!==V.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(V.remaining())||v("Percent encoded character must be followed by two hex digits."),"UTF-8"!==D.toUpperCase())throw new Error("Only UTF-8 encoding is supported.");var K=a.utf8Encode(V.c());if(K.length>=3&&38===K[0]&&35===K[1]&&59===K[K.length-1])K=K.subarray(2,K.length-1),i.query+="%26%23"+l.byteSequence.isomorphicDecode(K)+"%3B";else try{for(var q=(g=void 0,r(K)),X=q.next();!X.done;X=q.next()){var J=X.value;J<33||J>126||34===J||35===J||60===J||62===J||39===J&&b(i)?i.query+=U(J):i.query+=String.fromCharCode(J)}}catch(e){g={error:e}}finally{try{X&&!X.done&&(y=q.return)&&y.call(q)}finally{if(g)throw g.error}}}break;case s.ParserState.Fragment:""===V.c()||("\0"===V.c()?v("NULL character in input string."):(m.test(V.c())||"%"===V.c()||v("Unexpected character in fragment string."),"%"!==V.c()||/^[A-Za-z0-9][A-Za-z0-9]/.test(V.remaining())||v("Unexpected character in fragment string."),i.fragment+=j(V.c(),p)))}if(V.eof)break;V.pointer++}return i}function A(e){return"."===e||"%2e"===e.toLowerCase()}function P(e){var t=e.toLowerCase();return".."===t||".%2e"===t||"%2e."===t||"%2e%2e"===t}function k(e){var t=e.path;0!==t.length&&("file"===e.scheme&&1===t.length&&L(t[0])||e.path.splice(e.path.length-1,1))}function L(e){return e.length>=2&&l.codePoint.ASCIIAlpha.test(e[0])&&":"===e[1]}function O(e){return e.length>=2&&l.codePoint.ASCIIAlpha.test(e[0])&&(":"===e[1]||"|"===e[1])}function E(e){return e.length>=2&&O(e)&&(2===e.length||"/"===e[2]||"\\"===e[2]||"?"===e[2]||"#"===e[2])}function I(e,t){if(void 0===t&&(t=!1),e.startsWith("["))return e.endsWith("]")?B(e.substring(1,e.length-1)):(v("Expected ']' after '['."),null);if(t)return F(e);var n=W(a.utf8Decode(z(e)));if(null===n)return v("Invalid domain."),null;if(g.test(n))return v("Invalid domain."),null;var r=R(n);return null===r||a.isNumber(r)?r:n}function N(e,t){void 0===t&&(t={value:!1});var n=10;return e.startsWith("0x")||e.startsWith("0X")?(t.value=!0,e=e.substr(2),n=16):e.length>=2&&"0"===e[0]&&(t.value=!0,e=e.substr(1),n=8),""===e?0:(10===n?/^[0-9]+$/:16===n?/^[0-9A-Fa-f]+$/:/^[0-7]+$/).test(e)?parseInt(e,n):null}function R(e){var t,n,i,o,a={value:!1},s=e.split(".");if(""===s[s.length-1]&&(a.value=!0,s.length>1&&s.pop()),s.length>4)return e;var l=[];try{for(var u=r(s),c=u.next();!c.done;c=u.next()){var d=c.value;if(""===d)return e;if(null===(y=N(d,a)))return e;l.push(y)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}a.value&&v("Invalid IP v4 address.");for(var p=0;p255&&(v("Invalid IP v4 address."),p=Math.pow(256,5-l.length))return v("Invalid IP v4 address."),null;var f=l[l.length-1];l.pop();var h=0;try{for(var m=r(l),g=m.next();!g.done;g=m.next()){var y;f+=(y=g.value)*Math.pow(256,3-h),h++}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}return f}function B(e){var t,n=[0,0,0,0,0,0,0,0],r=0,o=null,s=new a.StringWalker(e);if(":"===s.c()){if(!s.remaining().startsWith(":"))return v("Invalid IP v6 address."),null;s.pointer+=2,o=r+=1}for(;""!==s.c();){if(8===r)return v("Invalid IP v6 address."),null;if(":"!==s.c()){for(var u=0,c=0;c<4&&l.codePoint.ASCIIHexDigit.test(s.c());)u=16*u+parseInt(s.c(),16),s.pointer++,c++;if("."===s.c()){if(0===c)return v("Invalid IP v6 address."),null;if(s.pointer-=c,r>6)return v("Invalid IP v6 address."),null;for(var d=0;""!==s.c();){var p=null;if(d>0){if(!("."===s.c()&&d<4))return v("Invalid IP v6 address."),null;s.pointer++}if(!l.codePoint.ASCIIDigit.test(s.c()))return v("Invalid IP v6 address."),null;for(;l.codePoint.ASCIIDigit.test(s.c());){var f=parseInt(s.c(),10);if(null===p)p=f;else{if(0===p)return v("Invalid IP v6 address."),null;p=10*p+f}if(p>255)return v("Invalid IP v6 address."),null;s.pointer++}if(null===p)return v("Invalid IP v6 address."),null;n[r]=256*n[r]+p,2!=++d&&4!==d||r++}if(4!==d)return v("Invalid IP v6 address."),null;break}if(":"===s.c()){if(s.pointer++,""===s.c())return v("Invalid IP v6 address."),null}else if(""!==s.c())return v("Invalid IP v6 address."),null;n[r]=u,r++}else{if(null!==o)return v("Invalid IP v6 address."),null;s.pointer++,o=++r}}if(null!==o){var h=r-o;for(r=7;0!==r&&h>0;)t=i([n[o+h-1],n[r]],2),n[r]=t[0],n[o+h-1]=t[1],r--,h--}else if(null===o&&8!==r)return v("Invalid IP v6 address."),null;return n}function F(e){var t,n;if(/[\x00\t\f\r #/:?@\[\\\]]/.test(e))return v("Invalid host string."),null;var i="";try{for(var o=r(e),a=o.next();!a.done;a=o.next())i+=j(a.value,d)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function V(e){return null}function U(e){return"%"+("00"+e.toString(16).toUpperCase()).slice(-2)}function G(e){for(var t=function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},n=new Uint8Array(e.length),r=0,i=0;i=e.length-2)n[r]=o,r++;else if(37!==o||t(e[i+1])&&t(e[i+2])){var s=parseInt(a.utf8Decode(Uint8Array.of(e[i+1],e[i+2])),16);n[r]=s,r++,i+=2}else n[r]=o,r++}return n.subarray(0,r)}function z(e){return G(a.utf8Encode(e))}function j(e,t){var n,i;if(!t.test(e))return e;var o=a.utf8Encode(e),s="";try{for(var l=r(o),u=l.next();!u.done;u=l.next())s+=U(u.value)}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return s}function Y(e){var t,n,i,o,s=[],l=[];try{for(var u=r(e),c=u.next();!c.done;c=u.next()){var d=c.value;38===d?(s.push(Uint8Array.from(l)),l=[]):l.push(d)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}0!==l.length&&s.push(Uint8Array.from(l));var p=[];try{for(var f=r(s),h=f.next();!h.done;h=f.next()){var m=h.value;if(0!==m.length){for(var g=m.indexOf(61),v=-1!==g?m.slice(0,g):m,y=-1!==g?m.slice(g+1):new Uint8Array,_=0;_=48&&s<=57||s>=65&&s<=90||95===s||s>=97&&s<=122?String.fromCodePoint(s):U(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function W(e,t){void 0===t&&(t=!1);var n=u.domainToASCII(e);return""===n?(v("Invalid domain name."),null):n}t.setValidationErrorCallback=function(e){o=e},t.newURL=y,t.isSpecialScheme=_,t.isSpecial=b,t.defaultPort=x,t.includesCredentials=w,t.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||e._cannotBeABaseURLFlag||"file"===e.scheme},t.urlSerializer=S,t.hostSerializer=C,t.iPv4Serializer=T,t.iPv6Serializer=M,t.urlParser=function(e,t,n){var r=D(e,t,n);return null===r?null:("blob"!==r.scheme||(r._blobURLEntry=null),r)},t.basicURLParser=D,t.setTheUsername=function(e,t){var n,i,o="";try{for(var a=r(t),s=a.next();!s.done;s=a.next())o+=j(s.value,h)}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}e.username=o},t.setThePassword=function(e,t){var n,i,o="";try{for(var a=r(t),s=a.next();!s.done;s=a.next())o+=j(s.value,h)}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}e.password=o},t.isSingleDotPathSegment=A,t.isDoubleDotPathSegment=P,t.shorten=k,t.isNormalizedWindowsDriveLetter=L,t.isWindowsDriveLetter=O,t.startsWithAWindowsDriveLetter=E,t.hostParser=I,t.iPv4NumberParser=N,t.iPv4Parser=R,t.iPv6Parser=B,t.opaqueHostParser=F,t.resolveABlobURL=V,t.percentEncode=U,t.percentDecode=G,t.stringPercentDecode=z,t.utf8PercentEncode=j,t.hostEquals=function(e,t){return e===t},t.urlEquals=function(e,t,n){return void 0===n&&(n=!1),S(e,n)===S(t,n)},t.urlEncodedStringParser=function(e){return Y(a.utf8Encode(e))},t.urlEncodedParser=Y,t.urlEncodedByteSerializer=H,t.urlEncodedSerializer=function(e,t){var n,i;if("UTF-8"!==(void 0===t||"replacement"===t||"UTF-16BE"===t||"UTF-16LE"===t?"UTF-8":t).toUpperCase())throw new Error("Only UTF-8 encoding is supported.");var o="";try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var u=l.value,c=H(a.utf8Encode(u[0])),d=u[1];d=H(a.utf8Encode(d)),""!==o&&(o+="&"),o+=c+"="+d}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},t.origin=function e(t){switch(t.scheme){case"blob":t._blobURLEntry;var n=D(t.path[0]);return null===n?s.OpaqueOrigin:e(n);case"ftp":case"http":case"https":case"ws":case"wss":return[t.scheme,null===t.host?"":t.host,t.port,null];default:return s.OpaqueOrigin}},t.domainToASCII=W,t.domainToUnicode=function(e,t){void 0===t&&(t=!1);var n=u.domainToUnicode(e);return""===n&&v("Invalid domain name."),n},t.asciiSerializationOfAnOrigin=function(e){if(""===e[0]&&""===e[1]&&null===e[2]&&null===e[3])return"null";var t=e[0]+"://"+C(e[1]);return null!==e[2]&&(t+=":"+e[2].toString()),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=function(){function e(){this._signal=r.create_abortSignal()}return Object.defineProperty(e.prototype,"signal",{get:function(){return this._signal},enumerable:!0,configurable:!0}),e.prototype.abort=function(){r.abort_signalAbort(this._signal)},e}();t.AbortControllerImpl=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(70),a=n(0),s=function(e){function t(){var t=e.call(this)||this;return t._abortedFlag=!1,t._abortAlgorithms=new Set,t}return i(t,e),Object.defineProperty(t.prototype,"aborted",{get:function(){return this._abortedFlag},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onabort",{get:function(){return a.event_getterEventHandlerIDLAttribute(this,"onabort")},set:function(e){a.event_setterEventHandlerIDLAttribute(this,"onabort",e)},enumerable:!0,configurable:!0}),t._create=function(){return new t},t}(o.EventTargetImpl);t.AbortSignalImpl=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=n(34),s=n(12),l=function(e){function t(t,n,r){var i=e.call(this)||this;return i._name="",i._publicId="",i._systemId="",i._name=t,i._publicId=n,i._systemId=r,i}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"publicId",{get:function(){return this._publicId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this._systemId},enumerable:!0,configurable:!0}),t.prototype.before=function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(1),a=n(0),s=function(){function e(e){return this._live=!0,this._filter=null,this._length=0,this._root=e,new Proxy(this,this)}return Object.defineProperty(e.prototype,"length",{get:function(){return this._root._children.size},enumerable:!0,configurable:!0}),e.prototype.item=function(e){if(e<0||e>this.length-1)return null;if(e=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(1),a=function(){function e(e){return this._live=!1,this._items=[],this._length=0,this._root=e,this._items=[],this._filter=function(e){return!0},new Proxy(this,this)}return Object.defineProperty(e.prototype,"length",{get:function(){return this._items.length},enumerable:!0,configurable:!0}),e.prototype.item=function(e){return e<0||e>this.length-1?null:this._items[e]},e.prototype.keys=function(){var e;return(e={})[Symbol.iterator]=function(){var e=0;return{next:function(){return e===this.length?{done:!0,value:null}:{done:!1,value:e++}}.bind(this)}}.bind(this),e},e.prototype.values=function(){var e;return(e={})[Symbol.iterator]=function(){var e=this[Symbol.iterator]();return{next:function(){return e.next()}}}.bind(this),e},e.prototype.entries=function(){var e;return(e={})[Symbol.iterator]=function(){var e=this[Symbol.iterator](),t=0;return{next:function(){var n=e.next();return n.done?{done:!0,value:null}:{done:!1,value:[t++,n.value]}}}}.bind(this),e},e.prototype[Symbol.iterator]=function(){var e=this._items[Symbol.iterator]();return{next:function(){return e.next()}}},e.prototype.forEach=function(e,t){var n,o;void 0===t&&(t=i.dom.window);var a=0;try{for(var s=r(this._items),l=s.next();!l.done;l=s.next()){var u=l.value;e.call(t,u,a++,this)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},e.prototype.get=function(e,t,n){if(!o.isString(t))return Reflect.get(e,t,n);var r=Number(t);return isNaN(r)?Reflect.get(e,t,n):e._items[r]||void 0},e.prototype.set=function(e,t,n,r){if(!o.isString(t))return Reflect.set(e,t,n,r);var i=Number(t);return isNaN(i)?Reflect.set(e,t,n,r):i>=0&&i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=n(2),l=n(102),u=n(9),c=n(0),d=n(12),p=n(3),f=function(e){function t(){var t=e.call(this)||this,n=a.dom.window._associatedDocument;return t._start=[n,0],t._end=[n,0],a.dom.rangeList.add(t),t}return i(t,e),Object.defineProperty(t.prototype,"commonAncestorContainer",{get:function(){for(var e=this._start[0];!c.tree_isAncestorOf(this._end[0],e,!0);){if(null===e._parent)throw new Error("Parent node is null.");e=e._parent}return e},enumerable:!0,configurable:!0}),t.prototype.setStart=function(e,t){c.range_setTheStart(this,e,t)},t.prototype.setEnd=function(e,t){c.range_setTheEnd(this,e,t)},t.prototype.setStartBefore=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheStart(this,t,c.tree_index(e))},t.prototype.setStartAfter=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheStart(this,t,c.tree_index(e)+1)},t.prototype.setEndBefore=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheEnd(this,t,c.tree_index(e))},t.prototype.setEndAfter=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheEnd(this,t,c.tree_index(e)+1)},t.prototype.collapse=function(e){e?this._end=this._start:this._start=this._end},t.prototype.selectNode=function(e){c.range_select(e,this)},t.prototype.selectNodeContents=function(e){if(p.Guard.isDocumentTypeNode(e))throw new u.InvalidNodeTypeError;var t=c.tree_nodeLength(e);this._start=[e,0],this._end=[e,t]},t.prototype.compareBoundaryPoints=function(e,t){if(e!==s.HowToCompare.StartToStart&&e!==s.HowToCompare.StartToEnd&&e!==s.HowToCompare.EndToEnd&&e!==s.HowToCompare.EndToStart)throw new u.NotSupportedError;if(c.range_root(this)!==c.range_root(t))throw new u.WrongDocumentError;var n,r;switch(e){case s.HowToCompare.StartToStart:n=this._start,r=t._start;break;case s.HowToCompare.StartToEnd:n=this._end,r=t._start;break;case s.HowToCompare.EndToEnd:n=this._end,r=t._end;break;case s.HowToCompare.EndToStart:n=this._start,r=t._end;break;default:throw new u.NotSupportedError}var i=c.boundaryPoint_position(n,r);return i===s.BoundaryPosition.Before?-1:i===s.BoundaryPosition.After?1:0},t.prototype.deleteContents=function(){var e,t,n,r;if(!c.range_collapsed(this)){var i=this._startNode,a=this._startOffset,s=this._endNode,l=this._endOffset;if(i===s&&p.Guard.isCharacterDataNode(i))c.characterData_replaceData(i,a,l-a,"");else{var u,d,f=[];try{for(var h=o(c.range_getContainedNodes(this)),m=h.next();!m.done;m=h.next()){var g=(b=m.value)._parent;null!==g&&c.range_isContained(g,this)||f.push(b)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}if(c.tree_isAncestorOf(s,i,!0))u=i,d=a;else{for(var v=i;null!==v._parent&&!c.tree_isAncestorOf(s,v._parent,!0);)v=v._parent;if(null===v._parent)throw new Error("Parent node is null.");u=v._parent,d=c.tree_index(v)+1}p.Guard.isCharacterDataNode(i)&&c.characterData_replaceData(i,a,c.tree_nodeLength(i)-a,"");try{for(var y=o(f),_=y.next();!_.done;_=y.next()){var b;(b=_.value)._parent&&c.mutation_remove(b,b._parent)}}catch(e){n={error:e}}finally{try{_&&!_.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}p.Guard.isCharacterDataNode(s)&&c.characterData_replaceData(s,0,l,""),this._start=[u,d],this._end=[u,d]}}},t.prototype.extractContents=function(){return c.range_extract(this)},t.prototype.cloneContents=function(){return c.range_cloneTheContents(this)},t.prototype.insertNode=function(e){return c.range_insert(e,this)},t.prototype.surroundContents=function(e){var t,n;try{for(var r=o(c.range_getPartiallyContainedNodes(this)),i=r.next();!i.done;i=r.next()){var a=i.value;if(!p.Guard.isTextNode(a))throw new u.InvalidStateError}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}if(p.Guard.isDocumentNode(e)||p.Guard.isDocumentTypeNode(e)||p.Guard.isDocumentFragmentNode(e))throw new u.InvalidNodeTypeError;var s=c.range_extract(this);0!==e._children.size&&c.mutation_replaceAll(null,e),c.range_insert(e,this),c.mutation_append(s,e),c.range_select(e,this)},t.prototype.cloneRange=function(){return c.create_range(this._start,this._end)},t.prototype.detach=function(){a.dom.rangeList.delete(this)},t.prototype.isPointInRange=function(e,t){if(c.tree_rootNode(e)!==c.range_root(this))return!1;if(p.Guard.isDocumentTypeNode(e))throw new u.InvalidNodeTypeError;if(t>c.tree_nodeLength(e))throw new u.IndexSizeError;var n=[e,t];return c.boundaryPoint_position(n,this._start)!==s.BoundaryPosition.Before&&c.boundaryPoint_position(n,this._end)!==s.BoundaryPosition.After},t.prototype.comparePoint=function(e,t){if(c.tree_rootNode(e)!==c.range_root(this))throw new u.WrongDocumentError;if(p.Guard.isDocumentTypeNode(e))throw new u.InvalidNodeTypeError;if(t>c.tree_nodeLength(e))throw new u.IndexSizeError;var n=[e,t];return c.boundaryPoint_position(n,this._start)===s.BoundaryPosition.Before?-1:c.boundaryPoint_position(n,this._end)===s.BoundaryPosition.After?1:0},t.prototype.intersectsNode=function(e){if(c.tree_rootNode(e)!==c.range_root(this))return!1;var t=e._parent;if(null===t)return!0;var n=c.tree_index(e);return c.boundaryPoint_position([t,n],this._end)===s.BoundaryPosition.Before&&c.boundaryPoint_position([t,n+1],this._start)===s.BoundaryPosition.After},t.prototype.toString=function(){var e,t,n="";if(this._startNode===this._endNode&&p.Guard.isTextNode(this._startNode))return this._startNode._data.substring(this._startOffset,this._endOffset);p.Guard.isTextNode(this._startNode)&&(n+=this._startNode._data.substring(this._startOffset));try{for(var r=o(c.range_getContainedNodes(this)),i=r.next();!i.done;i=r.next()){var a=i.value;p.Guard.isTextNode(a)&&(n+=a._data)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return p.Guard.isTextNode(this._endNode)&&(n+=this._endNode._data.substring(0,this._endOffset)),n},t._create=function(e,n){var r=new t;return e&&(r._start=e),n&&(r._end=n),r},t.START_TO_START=0,t.START_TO_END=1,t.END_TO_END=2,t.END_TO_START=3,t}(l.AbstractRangeImpl);t.RangeImpl=f,d.idl_defineConst(f.prototype,"START_TO_START",0),d.idl_defineConst(f.prototype,"START_TO_END",1),d.idl_defineConst(f.prototype,"END_TO_END",2),d.idl_defineConst(f.prototype,"END_TO_START",3)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(103),a=n(0),s=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i._iteratorCollection=void 0,i._reference=n,i._pointerBeforeReference=r,a.nodeIterator_iteratorList().add(i),i}return i(t,e),Object.defineProperty(t.prototype,"referenceNode",{get:function(){return this._reference},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pointerBeforeReferenceNode",{get:function(){return this._pointerBeforeReference},enumerable:!0,configurable:!0}),t.prototype.nextNode=function(){return a.nodeIterator_traverse(this,!0)},t.prototype.previousNode=function(){return a.nodeIterator_traverse(this,!1)},t.prototype.detach=function(){a.nodeIterator_iteratorList().delete(this)},t._create=function(e,n,r){return new t(e,n,r)},t}(o.TraverserImpl);t.NodeIteratorImpl=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=n(103),s=n(0),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._current=n,r}return i(t,e),Object.defineProperty(t.prototype,"currentNode",{get:function(){return this._current},set:function(e){this._current=e},enumerable:!0,configurable:!0}),t.prototype.parentNode=function(){for(var e=this._current;null!==e&&e!==this._root;)if(null!==(e=e._parent)&&s.traversal_filter(this,e)===o.FilterResult.Accept)return this._current=e,e;return null},t.prototype.firstChild=function(){return s.treeWalker_traverseChildren(this,!0)},t.prototype.lastChild=function(){return s.treeWalker_traverseChildren(this,!1)},t.prototype.nextSibling=function(){return s.treeWalker_traverseSiblings(this,!0)},t.prototype.previousNode=function(){for(var e=this._current;e!==this._root;){for(var t=e._previousSibling;t;){e=t;for(var n=s.traversal_filter(this,e);n!==o.FilterResult.Reject&&e._lastChild;)e=e._lastChild,n=s.traversal_filter(this,e);if(n===o.FilterResult.Accept)return this._current=e,e;t=e._previousSibling}if(e===this._root||null===e._parent)return null;if(e=e._parent,s.traversal_filter(this,e)===o.FilterResult.Accept)return this._current=e,e}return null},t.prototype.previousSibling=function(){return s.treeWalker_traverseSiblings(this,!1)},t.prototype.nextNode=function(){for(var e=this._current,t=o.FilterResult.Accept;;){for(;t!==o.FilterResult.Reject&&e._firstChild;)if(e=e._firstChild,(t=s.traversal_filter(this,e))===o.FilterResult.Accept)return this._current=e,e;for(var n=null,r=e;null!==r;){if(r===this._root)return null;if(null!==(n=r._nextSibling)){e=n;break}r=r._parent}if((t=s.traversal_filter(this,e))===o.FilterResult.Accept)return this._current=e,e}},t._create=function(e,n){return new t(e,n)},t}(a.TraverserImpl);t.TreeWalkerImpl=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(12),o=function(){function e(){}return e.prototype.acceptNode=function(e){return r.FilterResult.Accept},e._create=function(){return new e},e.FILTER_ACCEPT=1,e.FILTER_REJECT=2,e.FILTER_SKIP=3,e.SHOW_ALL=4294967295,e.SHOW_ELEMENT=1,e.SHOW_ATTRIBUTE=2,e.SHOW_TEXT=4,e.SHOW_CDATA_SECTION=8,e.SHOW_ENTITY_REFERENCE=16,e.SHOW_ENTITY=32,e.SHOW_PROCESSING_INSTRUCTION=64,e.SHOW_COMMENT=128,e.SHOW_DOCUMENT=256,e.SHOW_DOCUMENT_TYPE=512,e.SHOW_DOCUMENT_FRAGMENT=1024,e.SHOW_NOTATION=2048,e}();t.NodeFilterImpl=o,i.idl_defineConst(o.prototype,"FILTER_ACCEPT",1),i.idl_defineConst(o.prototype,"FILTER_REJECT",2),i.idl_defineConst(o.prototype,"FILTER_SKIP",3),i.idl_defineConst(o.prototype,"SHOW_ALL",4294967295),i.idl_defineConst(o.prototype,"SHOW_ELEMENT",1),i.idl_defineConst(o.prototype,"SHOW_ATTRIBUTE",2),i.idl_defineConst(o.prototype,"SHOW_TEXT",4),i.idl_defineConst(o.prototype,"SHOW_CDATA_SECTION",8),i.idl_defineConst(o.prototype,"SHOW_ENTITY_REFERENCE",16),i.idl_defineConst(o.prototype,"SHOW_ENTITY",32),i.idl_defineConst(o.prototype,"SHOW_PROCESSING_INSTRUCTION",64),i.idl_defineConst(o.prototype,"SHOW_COMMENT",128),i.idl_defineConst(o.prototype,"SHOW_DOCUMENT",256),i.idl_defineConst(o.prototype,"SHOW_DOCUMENT_TYPE",512),i.idl_defineConst(o.prototype,"SHOW_DOCUMENT_FRAGMENT",1024),i.idl_defineConst(o.prototype,"SHOW_NOTATION",2048)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,r,i,o,a,s,l){this._type=e,this._target=t,this._addedNodes=n,this._removedNodes=r,this._previousSibling=i,this._nextSibling=o,this._attributeName=a,this._attributeNamespace=s,this._oldValue=l}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addedNodes",{get:function(){return this._addedNodes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removedNodes",{get:function(){return this._removedNodes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this._previousSibling},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this._nextSibling},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attributeName",{get:function(){return this._attributeName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attributeNamespace",{get:function(){return this._attributeNamespace},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"oldValue",{get:function(){return this._oldValue},enumerable:!0,configurable:!0}),e._create=function(t,n,r,i,o,a,s,l,u){return new e(t,n,r,i,o,a,s,l,u)},e}();t.MutationRecordImpl=r},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(9),a=n(7),s=n(0),l=function(){function e(e,t){this._element=e,this._attribute=t,this._tokenSet=new Set;var n=t._localName,r=s.element_getAnAttributeValue(e,n),o=this;this._element._attributeChangeSteps.push((function(e,t,n,r,i){t===o._attribute._localName&&null===i&&(r?o._tokenSet=s.orderedSet_parse(r):o._tokenSet.clear())})),i.dom.features.steps&&s.dom_runAttributeChangeSteps(e,n,r,r,null)}return Object.defineProperty(e.prototype,"length",{get:function(){return this._tokenSet.size},enumerable:!0,configurable:!0}),e.prototype.item=function(e){var t,n,i=0;try{for(var o=r(this._tokenSet),a=o.next();!a.done;a=o.next()){var s=a.value;if(i===e)return s;i++}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return null},e.prototype.contains=function(e){return this._tokenSet.has(e)},e.prototype.add=function(){for(var e,t,n=[],i=0;i=97&&n<=122||n>=65&&n<=90||58===n||95===n||n>=192&&n<=214||n>=216&&n<=246||n>=248&&n<=767||n>=880&&n<=893||n>=895&&n<=8191||n>=8204&&n<=8205||n>=8304&&n<=8591||n>=11264&&n<=12271||n>=12289&&n<=55295||n>=63744&&n<=64975||n>=65008&&n<=65533||0!==t&&(45===n||46===n||n>=48&&n<=57||183===n||n>=768&&n<=879||n>=8255&&n<=8256))){if(n>=55296&&n<=56319&&t=56320&&r<=57343&&(t++,(n=1024*(n-55296)+r-56320+65536)>=65536&&n<=983039))continue}return!1}}return!0},t.xml_isQName=function(e){for(var t=!1,n=0;n=97&&r<=122||r>=65&&r<=90||95===r||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533||0!==n&&(45===r||46===r||r>=48&&r<=57||183===r||r>=768&&r<=879||r>=8255&&r<=8256))){if(0===n||58!==r){if(r>=55296&&r<=56319&&n=56320&&i<=57343&&(n++,(r=1024*(r-55296)+i-56320+65536)>=65536&&r<=983039))continue}return!1}if(t)return!1;if(n===e.length-1)return!1;t=!0}}return!0},t.xml_isLegalChar=function(e){for(var t=0;t=32&&n<=55295||n>=57344&&n<=65533)){if(n>=55296&&n<=56319&&t=56320&&r<=57343&&(t++,(n=1024*(n-55296)+r-56320+65536)>=65536&&n<=1114111))continue}return!1}}return!0},t.xml_isPubidChar=function(e){for(var t=0;t=97&&n<=122||n>=65&&n<=90||n>=39&&n<=59||32===n||13===n||10===n||n>=35&&n<=37||33===n||61===n||63===n||64===n||95===n))return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(17);t.boundaryPoint_position=function e(t,n){var o=t[0],a=t[1],s=n[0],l=n[1];if(console.assert(i.tree_rootNode(o)===i.tree_rootNode(s),"Boundary points must share the same root node."),o===s)return a===l?r.BoundaryPosition.Equal:a=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(7),s=n(29),l=n(108),u=n(30),c=n(37),d=n(52);t.node_stringReplaceAll=function(e,t){var n=null;""!==e&&(n=s.create_text(t._nodeDocument,e)),c.mutation_replaceAll(n,t)},t.node_clone=function e(t,n,a){var l,p,f,h,m;if(void 0===n&&(n=null),void 0===a&&(a=!1),null===n&&(n=t._nodeDocument),o.Guard.isElementNode(t)){m=d.element_createAnElement(n,t._localName,t._namespace,t._namespacePrefix,t._is,!1);try{for(var g=r(t._attributeList),v=g.next();!v.done;v=g.next()){var y=e(v.value,n);d.element_append(y,m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(p=g.return)&&p.call(g)}finally{if(l)throw l.error}}}else if(o.Guard.isDocumentNode(t)){var _=s.create_document();_._encoding=t._encoding,_._contentType=t._contentType,_._URL=t._URL,_._origin=t._origin,_._type=t._type,_._mode=t._mode,m=_}else if(o.Guard.isDocumentTypeNode(t))m=s.create_documentType(n,t._name,t._publicId,t._systemId);else if(o.Guard.isAttrNode(t)){var b=s.create_attr(n,t.localName);b._namespace=t._namespace,b._namespacePrefix=t._namespacePrefix,b._value=t._value,m=b}else m=o.Guard.isExclusiveTextNode(t)?s.create_text(n,t._data):o.Guard.isCDATASectionNode(t)?s.create_cdataSection(n,t._data):o.Guard.isCommentNode(t)?s.create_comment(n,t._data):o.Guard.isProcessingInstructionNode(t)?s.create_processingInstruction(n,t._target,t._data):o.Guard.isDocumentFragmentNode(t)?s.create_documentFragment(n):Object.create(t);if(o.Guard.isDocumentNode(m)?(m._nodeDocument=m,n=m):m._nodeDocument=n,i.dom.features.steps&&u.dom_runCloningSteps(m,t,n,a),a)try{for(var x=r(t._children),w=x.next();!w.done;w=x.next()){var S=e(w.value,n,!0);c.mutation_append(S,m)}}catch(e){f={error:e}}finally{try{w&&!w.done&&(h=x.return)&&h.call(x)}finally{if(f)throw f.error}}return m},t.node_equals=function e(t,n){var i,a,s,l;if(t._nodeType!==n._nodeType)return!1;if(o.Guard.isDocumentTypeNode(t)&&o.Guard.isDocumentTypeNode(n)){if(t._name!==n._name||t._publicId!==n._publicId||t._systemId!==n._systemId)return!1}else if(o.Guard.isElementNode(t)&&o.Guard.isElementNode(n)){if(t._namespace!==n._namespace||t._namespacePrefix!==n._namespacePrefix||t._localName!==n._localName||t._attributeList.length!==n._attributeList.length)return!1}else if(o.Guard.isAttrNode(t)&&o.Guard.isAttrNode(n)){if(t._namespace!==n._namespace||t._localName!==n._localName||t._value!==n._value)return!1}else if(o.Guard.isProcessingInstructionNode(t)&&o.Guard.isProcessingInstructionNode(n)){if(t._target!==n._target||t._data!==n._data)return!1}else if(o.Guard.isCharacterDataNode(t)&&o.Guard.isCharacterDataNode(n)&&t._data!==n._data)return!1;if(o.Guard.isElementNode(t)&&o.Guard.isElementNode(n)){var u={};try{for(var c=r(t._attributeList),d=c.next();!d.done;d=c.next())u[(h=d.value)._localName]=h}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}try{for(var p=r(n._attributeList),f=p.next();!f.done;f=p.next()){var h,m=f.value;if(!(h=u[m._localName]))return!1;if(!e(h,m))return!1}}catch(e){s={error:e}}finally{try{f&&!f.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}}if(t._children.size!==n._children.size)return!1;for(var g=t._children[Symbol.iterator](),v=n._children[Symbol.iterator](),y=g.next(),_=v.next();!y.done&&!_.done;){if(!e(y.value,_.value))return!1;y=g.next(),_=v.next()}return!0},t.node_listOfElementsWithQualifiedName=function(e,t){return"*"===e?s.create_htmlCollection(t):"html"===t._nodeDocument._type?s.create_htmlCollection(t,(function(t){return t._namespace===a.namespace.HTML&&t._qualifiedName===e.toLowerCase()||t._namespace!==a.namespace.HTML&&t._qualifiedName===e})):s.create_htmlCollection(t,(function(t){return t._qualifiedName===e}))},t.node_listOfElementsWithNamespace=function(e,t,n){return""===e&&(e=null),"*"===e&&"*"===t?s.create_htmlCollection(n):"*"===e?s.create_htmlCollection(n,(function(e){return e._localName===t})):"*"===t?s.create_htmlCollection(n,(function(t){return t._namespace===e})):s.create_htmlCollection(n,(function(n){return n._localName===t&&n._namespace===e}))},t.node_listOfElementsWithClassNames=function(e,t){var n=l.orderedSet_parse(e);if(0===n.size)return s.create_htmlCollection(t,(function(){return!1}));var r="quirks"!==t._nodeDocument._mode;return s.create_htmlCollection(t,(function(e){var t=e.classList;return l.orderedSet_contains(t._tokenSet,n,r)}))},t.node_locateANamespacePrefix=function e(t,n){if(t._namespace===n&&null!==t._namespacePrefix)return t._namespacePrefix;for(var r=0;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(9),s=n(29),l=n(17),u=n(107),c=n(37);t.text_contiguousTextNodes=function(e,t){var n;return void 0===t&&(t=!1),(n={})[Symbol.iterator]=function(){for(var n=e;n&&o.Guard.isTextNode(n._previousSibling);)n=n._previousSibling;return{next:function(){if(n&&!t&&n===e&&(n=o.Guard.isTextNode(n._nextSibling)?n._nextSibling:null),null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=o.Guard.isTextNode(n._nextSibling)?n._nextSibling:null,r}}},n},t.text_contiguousExclusiveTextNodes=function(e,t){var n;return void 0===t&&(t=!1),(n={})[Symbol.iterator]=function(){for(var n=e;n&&o.Guard.isExclusiveTextNode(n._previousSibling);)n=n._previousSibling;return{next:function(){if(n&&!t&&n===e&&(n=o.Guard.isExclusiveTextNode(n._nextSibling)?n._nextSibling:null),null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=o.Guard.isExclusiveTextNode(n._nextSibling)?n._nextSibling:null,r}}},n},t.text_descendantTextContent=function(e){for(var t="",n=l.tree_getFirstDescendantNode(e,!1,!1,(function(e){return o.Guard.isTextNode(e)}));null!==n;)t+=n._data,n=l.tree_getNextDescendantNode(e,n,!1,!1,(function(e){return o.Guard.isTextNode(e)}));return t},t.text_split=function(e,t){var n,o,d=e._data.length;if(t>d)throw new a.IndexSizeError;var p=d-t,f=u.characterData_substringData(e,t,p),h=s.create_text(e._nodeDocument,f),m=e._parent;if(null!==m){c.mutation_insert(h,m,e._nextSibling);try{for(var g=r(i.dom.rangeList),v=g.next();!v.done;v=g.next()){var y=v.value;y._start[0]===e&&y._start[1]>t&&(y._start[0]=h,y._start[1]-=t),y._end[0]===e&&y._end[1]>t&&(y._end[0]=h,y._end[1]-=t);var _=l.tree_index(e);y._start[0]===m&&y._start[1]===_+1&&y._start[1]++,y._end[0]===m&&y._end[1]===_+1&&y._end[1]++}}catch(e){n={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(n)throw n.error}}}return u.characterData_replaceData(e,t,p,""),h}},function(e,t,n){"use strict";var r=n(4),i=n(41),o=n(24),a=n(48),s=[].join,l=i!=Object,u=a("join",",");r({target:"Array",proto:!0,forced:l||!u},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},function(e,t,n){var r=n(4),i=n(83),o=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i=n(111),o=function(){function e(e,t){this._options={skipWhitespaceOnlyText:!1},this.err={line:-1,col:-1,index:-1,str:""},this._str=e,this._index=0,this._length=e.length,t&&(this._options.skipWhitespaceOnlyText=t.skipWhitespaceOnlyText||!1)}return e.prototype.nextToken=function(){if(this.eof())return{type:i.TokenType.EOF};var t=this.skipIfStartsWith("<")?this.openBracket():this.text();return this._options.skipWhitespaceOnlyText&&t.type===i.TokenType.Text&&e.isWhiteSpaceToken(t)&&(t=this.nextToken()),t},e.prototype.openBracket=function(){return this.skipIfStartsWith("?")?this.skipIfStartsWith("xml")?e.isSpace(this._str[this._index])?this.declaration():(this.seek(-3),this.pi()):this.pi():this.skipIfStartsWith("!")?this.skipIfStartsWith("--")?this.comment():this.skipIfStartsWith("[CDATA[")?this.cdata():this.skipIfStartsWith("DOCTYPE")?this.doctype():void this.throwError("Invalid '!' in opening tag."):this.skipIfStartsWith("/")?this.closeTag():this.openTag()},e.prototype.declaration=function(){for(var e="",t="",n="";!this.eof();){if(this.skipSpace(),this.skipIfStartsWith("?>"))return{type:i.TokenType.Declaration,version:e,encoding:t,standalone:n};var o=r(this.attribute(),2),a=o[0],s=o[1];"version"===a?e=s:"encoding"===a?t=s:"standalone"===a?n=s:this.throwError("Invalid attribute name: "+a)}this.throwError("Missing declaration end symbol `?>`")},e.prototype.doctype=function(){var e="",t="";this.skipSpace();var n=this.takeUntil2("[",">",!0);return this.skipSpace(),this.skipIfStartsWith("PUBLIC")?(e=this.quotedString(),t=this.quotedString()):this.skipIfStartsWith("SYSTEM")&&(t=this.quotedString()),this.skipSpace(),this.skipIfStartsWith("[")&&(this.skipUntil("]"),this.skipIfStartsWith("]")||this.throwError("Missing end bracket of DTD internal subset")),this.skipSpace(),this.skipIfStartsWith(">")||this.throwError("Missing doctype end symbol `>`"),{type:i.TokenType.DocType,name:n,pubId:e,sysId:t}},e.prototype.pi=function(){var e=this.takeUntilStartsWith("?>",!0);if(this.eof()&&this.throwError("Missing processing instruction end symbol `?>`"),this.skipSpace(),this.skipIfStartsWith("?>"))return{type:i.TokenType.PI,target:e,data:""};var t=this.takeUntilStartsWith("?>");return this.eof()&&this.throwError("Missing processing instruction end symbol `?>`"),this.seek(2),{type:i.TokenType.PI,target:e,data:t}},e.prototype.text=function(){var e=this.takeUntil("<");return{type:i.TokenType.Text,data:e}},e.prototype.comment=function(){var e=this.takeUntilStartsWith("--\x3e");return this.eof()&&this.throwError("Missing comment end symbol `--\x3e`"),this.seek(3),{type:i.TokenType.Comment,data:e}},e.prototype.cdata=function(){var e=this.takeUntilStartsWith("]]>");return this.eof()&&this.throwError("Missing CDATA end symbol `]>`"),this.seek(3),{type:i.TokenType.CDATA,data:e}},e.prototype.openTag=function(){this.skipSpace();var e=this.takeUntil2(">","/",!0);if(this.skipSpace(),this.skipIfStartsWith(">"))return{type:i.TokenType.Element,name:e,attributes:[],selfClosing:!1};if(this.skipIfStartsWith("/>"))return{type:i.TokenType.Element,name:e,attributes:[],selfClosing:!0};for(var t=[];!this.eof();){if(this.skipSpace(),this.skipIfStartsWith(">"))return{type:i.TokenType.Element,name:e,attributes:t,selfClosing:!1};if(this.skipIfStartsWith("/>"))return{type:i.TokenType.Element,name:e,attributes:t,selfClosing:!0};var n=this.attribute();t.push(n)}this.throwError("Missing opening element tag end symbol `>`")},e.prototype.closeTag=function(){this.skipSpace();var e=this.takeUntil(">",!0);return this.skipSpace(),this.skipIfStartsWith(">")||this.throwError("Missing closing element tag end symbol `>`"),{type:i.TokenType.ClosingTag,name:e}},e.prototype.attribute=function(){this.skipSpace();var e=this.takeUntil("=",!0);return this.skipSpace(),this.skipIfStartsWith("=")||this.throwError("Missing equals sign before attribute value"),[e,this.quotedString()]},e.prototype.quotedString=function(){this.skipSpace();var t=this.take(1);e.isQuote(t)||this.throwError("Missing start quote character before quoted value");var n=this.takeUntil(t);return this.skipIfStartsWith(t)||this.throwError("Missing end quote character after quoted value"),n},e.prototype.eof=function(){return this._index>=this._length},e.prototype.skipIfStartsWith=function(e){var t=e.length;if(1===t)return this._str[this._index]===e&&(this._index++,!0);for(var n=0;nthis._length&&(this._index=this._length)},e.prototype.skipSpace=function(){for(;!this.eof()&&e.isSpace(this._str[this._index]);)this._index++},e.prototype.take=function(e){if(1===e)return this._str[this._index++];var t=this._index;return this.seek(e),this._str.slice(t,this._index)},e.prototype.takeUntil=function(t,n){void 0===n&&(n=!1);for(var r=this._index;this._indexthis._index){o=n.index;break}throw this.err={line:r,col:this._index-i,index:this._index,str:this._str.substring(i,o)},new Error(e+"\nIndex: "+this.err.index+"\nLn: "+this.err.line+", Col: "+this.err.col+"\nInput: "+this.err.str)},e.prototype[Symbol.iterator]=function(){return this._index=0,{next:function(){var e=this.nextToken();return e.type===i.TokenType.EOF?{done:!0,value:null}:{done:!1,value:e}}.bind(this)}},e}();t.XMLStringLexer=o},function(e,t,n){"use strict";var r=n(39);e.exports=new r({include:[n(182)]})},function(e,t,n){"use strict";var r=n(39);e.exports=new r({include:[n(113)],implicit:[n(289),n(290),n(291),n(292)]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(91),i=n(1),o=n(3),a=n(77),s=n(109);function l(e,t){var n=c(void 0===e||u(e)?e:r.DefaultBuilderOptions),i=u(e)?t:e,o=s.createDocument();d(o,n);var l=new a.XMLBuilderImpl(o);return void 0!==i&&l.ele(i),l}function u(e){if(!i.isPlainObject(e))return!1;for(var t in e)if(e.hasOwnProperty(t)&&!r.XMLBuilderOptionKeys.has(t))return!1;return!0}function c(e){void 0===e&&(e={});var t=i.applyDefaults(e,r.DefaultBuilderOptions);if(0===t.convert.att.length||0===t.convert.ins.length||0===t.convert.text.length||0===t.convert.cdata.length||0===t.convert.comment.length)throw new Error("JS object converter strings cannot be zero length.");return t}function d(e,t,n){var r=e;r._xmlBuilderOptions=t,r._isFragment=n}t.builder=function(e,t){var n=c(u(e)?e:r.DefaultBuilderOptions),s=o.Guard.isNode(e)||i.isArray(e)?e:t;if(void 0===s)throw new Error("Invalid arguments.");if(i.isArray(s)){for(var l=[],d=0;d0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(91),a=n(1),s=n(217),l=n(2),u=n(3),c=n(0),d=n(109),p=n(7),f=n(276),h=function(){function e(e){this._domNode=e}return Object.defineProperty(e.prototype,"node",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),e.prototype.set=function(e){return this._options=a.applyDefaults(a.applyDefaults(this._options,e,!0),o.DefaultBuilderOptions),this},e.prototype.ele=function(t,n,i){var o,s,l,u,p,h;if(a.isObject(t))return new f.ObjectReader(this._options).parse(this,t);if(null!==t&&/^\s*0&&(void 0===e&&(e=t.slice(r+1)),t=t.slice(0,r)),void 0===e)e=n?this._options.defaultNamespace.ele:this._options.defaultNamespace.att;else if(null!==e&&"@"===e[0]){var i=e.slice(1);if(void 0===(e=this._options.namespaceAlias[i]))throw new Error("Namespace alias `"+i+"` is not defined. "+this._debugInfo())}return[e,t]},e.prototype._updateNamespace=function(t){var n,o,a,s,l=this._domNode;if(u.Guard.isElementNode(l)&&null!==t&&l.namespaceURI!==t){var d=r(c.namespace_extractQName(l.prefix?l.prefix+":"+l.localName:l.localName),2),p=d[0],f=d[1],h=c.create_element(this._doc,f,t,p);try{for(var m=i(l.attributes),g=m.next();!g.done;g=m.next()){var v=g.value,y=v.prefix?v.prefix+":"+v.localName:v.localName,_=r(c.namespace_extractQName(y),1)[0],b=v.namespaceURI;null===b&&null!==_&&(b=l.lookupNamespaceURI(_)),null===b?h.setAttribute(y,v.value):h.setAttributeNS(b,y,v.value)}}catch(e){n={error:e}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}var x=l.parentNode;if(null===x)throw new Error("Parent node is null."+this._debugInfo());x.replaceChild(h,l),this._domNode=h;try{for(var w=i(l.childNodes),S=w.next();!S.done;S=w.next()){var C=S.value.cloneNode(!0);if(h.appendChild(C),u.Guard.isElementNode(C)){var T=r(c.namespace_extractQName(C.prefix?C.prefix+":"+C.localName:C.localName),1)[0],M=h.lookupNamespaceURI(T);new e(C)._updateNamespace(M)}}}catch(e){a={error:e}}finally{try{S&&!S.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}}},Object.defineProperty(e.prototype,"_doc",{get:function(){var e=this.node;if(u.Guard.isDocumentNode(e))return e;var t=e.ownerDocument;if(!t)throw new Error("Owner document is null. "+this._debugInfo());return t},enumerable:!0,configurable:!0}),e.prototype._debugInfo=function(e){var t=this.node,n=t.parentNode;e=e||t.nodeName;var r=n?n.nodeName:"";return r?"node: <"+e+">, parent: <"+r+">":"node: <"+e+">"},Object.defineProperty(e.prototype,"_options",{get:function(){var e=this._doc;if(void 0===e._xmlBuilderOptions)throw new Error("Builder options is not set.");return e._xmlBuilderOptions},set:function(e){this._doc._xmlBuilderOptions=e},enumerable:!0,configurable:!0}),e}();t.XMLBuilderImpl=h},function(e,t,n){var r=n(11),i=n(117),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},function(e,t,n){var r=n(46),i=n(82),o=n(85),a=n(18);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(16),i=n(15),o=n(18),a=n(61);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,l=0;s>l;)i.f(e,n=r[l++],t[n]);return e}},function(e,t,n){var r=n(46);e.exports=r("document","documentElement")},function(e,t,n){var r=n(24),i=n(82).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){"use strict";var r=n(4),i=n(36).every,o=n(48),a=n(28),s=o("every"),l=a("every");r({target:"Array",proto:!0,forced:!s||!l},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(4),i=n(36).filter,o=n(63),a=n(28),s=o("filter"),l=a("filter");r({target:"Array",proto:!0,forced:!s||!l},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(46);e.exports=r("navigator","userAgent")||""},function(e,t,n){"use strict";var r=n(4),i=n(36).find,o=n(130),a=n(28),s=!0,l=a("find");"find"in[]&&Array(1).find((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!l},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(e,t,n){"use strict";var r=n(131).IteratorPrototype,i=n(60),o=n(40),a=n(62),s=n(49),l=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,u,!1,!0),s[u]=l,e}},function(e,t,n){var r=n(8);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(13);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(4),i=n(36).map,o=n(63),a=n(28),s=o("map"),l=a("map");r({target:"Array",proto:!0,forced:!s||!l},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(4),i=n(200).left,o=n(48),a=n(28),s=o("reduce"),l=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!s||!l},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(127),i=n(27),o=n(41),a=n(26),s=function(e){return function(t,n,s,l){r(n);var u=i(t),c=o(u),d=a(u.length),p=e?d-1:0,f=e?-1:1;if(s<2)for(;;){if(p in c){l=c[p],p+=f;break}if(p+=f,e?p<0:d<=p)throw TypeError("Reduce of empty array with no initial value")}for(;e?p>=0:d>p;p+=f)p in c&&(l=n(l,c[p],p,u));return l}};e.exports={left:s(!1),right:s(!0)}},function(e,t,n){"use strict";var r=n(4),i=n(36).some,o=n(48),a=n(28),s=o("some"),l=a("some");r({target:"Array",proto:!0,forced:!s||!l},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(90),i=n(135);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(e,t){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}},function(e,t,n){var r=n(8);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){var r=n(5),i=n(49),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,n){var r=n(135),i=n(49),o=n(5)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(18);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(5)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){var r=n(13),i=n(133);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},function(e,t,n){var r=n(25);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(46),i=n(15),o=n(5),a=n(16),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){void 0===e&&(e=1e3),this._items=new Set,this._limit=e}return e.prototype.add=function(e){if(this._items.add(e),this._items.size>this._limit){var t=this._items.values().next();t.done||this._items.delete(t.value)}return this},e.prototype.delete=function(e){return this._items.delete(e)},e.prototype.has=function(e){return this._items.has(e)},e.prototype.clear=function(){this._items.clear()},Object.defineProperty(e.prototype,"size",{get:function(){return this._items.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;this._items.forEach((function(r){return e.call(t,r,r,n)}))},e.prototype.keys=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.keys())];case 1:return e.sent(),[2]}}))},e.prototype.values=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.values())];case 1:return e.sent(),[2]}}))},e.prototype.entries=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.entries())];case 1:return e.sent(),[2]}}))},e.prototype[Symbol.iterator]=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items)];case 1:return e.sent(),[2]}}))},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"FixedSizeSet"},enumerable:!0,configurable:!0}),e}();t.FixedSizeSet=o},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){void 0===e&&(e=1e3),this._items=new Map,this._limit=e}return e.prototype.get=function(e){return this._items.get(e)},e.prototype.set=function(e,t){if(this._items.set(e,t),this._items.size>this._limit){var n=this._items.keys().next();n.done||this._items.delete(n.value)}},e.prototype.delete=function(e){return this._items.delete(e)},e.prototype.has=function(e){return this._items.has(e)},e.prototype.clear=function(){this._items.clear()},Object.defineProperty(e.prototype,"size",{get:function(){return this._items.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e,t){this._items.forEach((function(n,r){return e.call(t,r,n)}))},e.prototype.keys=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.keys())];case 1:return e.sent(),[2]}}))},e.prototype.values=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.values())];case 1:return e.sent(),[2]}}))},e.prototype.entries=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.entries())];case 1:return e.sent(),[2]}}))},e.prototype[Symbol.iterator]=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items)];case 1:return e.sent(),[2]}}))},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"ObjectCache"},enumerable:!0,configurable:!0}),e}();t.ObjectCache=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){void 0===e&&(e=1e3),this._items=new Map,this._limit=e}return e.prototype.check=function(e,t){if(this._items.get(e)===t)return!0;if(this._items.get(t)===e)return!1;var n=Math.random()<.5;if(n?this._items.set(e,t):this._items.set(t,e),this._items.size>this._limit){var r=this._items.keys().next();r.done||this._items.delete(r.value)}return n},e}();t.CompareCache=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._initialized=!1,this._value=void 0,this._initFunc=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._initialized||(this._value=this._initFunc(),this._initialized=!0),this._value},enumerable:!0,configurable:!0}),e}();t.Lazy=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._pointer=0,this._chars=Array.from(e),this._length=this._chars.length}return Object.defineProperty(e.prototype,"eof",{get:function(){return this._pointer>=this._length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),e.prototype.codePoint=function(){if(void 0===this._codePoint)if(this.eof)this._codePoint=-1;else{var e=this._chars[this._pointer].codePointAt(0);this._codePoint=void 0!==e?e:-1}return this._codePoint},e.prototype.c=function(){return void 0===this._c&&(this._c=this.eof?"":this._chars[this._pointer]),this._c},e.prototype.remaining=function(){return void 0===this._remaining&&(this._remaining=this.eof?"":this._chars.slice(this._pointer+1).join("")),this._remaining},e.prototype.substring=function(){return void 0===this._substring&&(this._substring=this.eof?"":this._chars.slice(this._pointer).join("")),this._substring},Object.defineProperty(e.prototype,"pointer",{get:function(){return this._pointer},set:function(e){e!==this._pointer&&(this._pointer=e,this._codePoint=void 0,this._c=void 0,this._remaining=void 0,this._substring=void 0)},enumerable:!0,configurable:!0}),e}();t.StringWalker=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(218);t.MapWriter=r.MapWriter;var i=n(258);t.XMLWriter=i.XMLWriter;var o=n(67);t.ObjectWriter=o.ObjectWriter;var a=n(260);t.JSONWriter=a.JSONWriter;var s=n(261);t.YAMLWriter=s.YAMLWriter},function(e,t,n){"use strict";n(19),n(219),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(67),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r._writerOptions=o.applyDefaults(n,{format:"map",wellFormed:!1,group:!1,verbose:!1}),r}return i(t,e),t.prototype.serialize=function(e){var t=o.applyDefaults(this._writerOptions,{format:"object",wellFormed:!1,verbose:!1}),n=new a.ObjectWriter(this._builderOptions,t).serialize(e);return this._convertObject(n)},t.prototype._convertObject=function(e){if(o.isArray(e)){for(var t=0;t=51||!i((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),g=d("concat"),v=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!m||!g},{concat:function(e){var t,n,r,i,o,a=s(this),d=c(a,0),p=0;for(t=-1,r=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");u(d,p++,o)}return d.length=p,d}})},function(e,t,n){"use strict";var r=n(8);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){var r=n(223);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(13),i=n(42),o=n(5)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(5)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){"use strict";n(68);var r=n(25),i=n(8),o=n(5),a=n(93),s=n(21),l=o("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),c="$0"==="a".replace(/./,"$0"),d=o("replace"),p=!!/./[d]&&""===/./[d]("a","$0"),f=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var h=o(e),m=!i((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),g=m&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!m||!g||"replace"===e&&(!u||!c||p)||"split"===e&&!f){var v=/./[h],y=n(h,""[e],(function(e,t,n,r,i){return t.exec===a?m&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),_=y[0],b=y[1];r(String.prototype,e,_),r(RegExp.prototype,h,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}d&&s(RegExp.prototype[h],"sham",!0)}},function(e,t,n){"use strict";var r=n(137).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(42),i=n(93);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(96);t.forgivingBase64Encode=function(t){return e.from(t).toString("base64")},t.forgivingBase64Decode=function(t){return""===t?"":((t=t.replace(r.ASCIIWhiteSpace,"")).length%4==0&&(t.endsWith("==")?t=t.substr(0,t.length-2):t.endsWith("=")&&(t=t.substr(0,t.length-1))),t.length%4==1?null:/[0-9A-Za-z+/]/.test(t)?e.from(t,"base64").toString("utf8"):null)}}).call(this,n(145).Buffer)},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),c=0,d=s>0?a-4:a;for(n=0;n>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[c++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;as?s:a+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,p=n?-1:1,f=e[t+d];for(d+=p,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=u}return(f?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(a=a<0;e[n+f]=255&a,f+=h,a/=256,u-=8);e[n+f-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);function o(e){var t,n;if(null===e||i.isString(e)||i.isNumber(e))return e;if(i.isArray(e)){var a=new Array;try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var u=l.value;a.push(o(u))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}if(i.isObject(e)){for(var c in a=new Map,e)if(e.hasOwnProperty(c)){var d=e[c];a.set(c,o(d))}return a}return e}t.parseJSONFromBytes=function(e){var t=i.utf8Decode(e);return JSON.parse.call(void 0,t)},t.serializeJSONToBytes=function(e){var t=JSON.stringify.call(void 0,e);return i.utf8Encode(t)},t.parseJSONIntoInfraValues=function(e){return o(JSON.parse.call(void 0,e))},t.convertAJSONDerivedJavaScriptValueToAnInfraValue=o},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1);t.append=function(e,t){e.push(t)},t.extend=function(e,t){e.push.apply(e,o(t))},t.prepend=function(e,t){e.unshift(t)},t.replace=function(e,t,n){var r,i,o=0;try{for(var l=a(e),u=l.next();!u.done;u=l.next()){var c=u.value;if(s.isFunction(t))t.call(null,c)&&(e[o]=n);else if(c===t)return void(e[o]=n);o++}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}},t.insert=function(e,t,n){e.splice(n,0,t)},t.remove=function(e,t){for(var n=e.length;n--;){var r=e[n];if(s.isFunction(t))t.call(null,r)&&e.splice(n,1);else if(r===t)return void e.splice(n,1)}},t.empty=function(e){e.length=0},t.contains=function(e,t){var n,r;try{for(var i=a(e),o=i.next();!o.done;o=i.next()){var l=o.value;if(s.isFunction(t)){if(t.call(null,l))return!0}else if(l===t)return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},t.size=function(e,t){var n,r;if(void 0===t)return e.length;var i=0;try{for(var o=a(e),s=o.next();!s.done;s=o.next()){var l=s.value;t.call(null,l)&&i++}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t.isEmpty=function(e){return 0===e.length},t.forEach=function(e,t){var n,i,o,s,l,u;return r(this,(function(r){switch(r.label){case 0:return void 0!==t?[3,2]:[5,a(e)];case 1:return r.sent(),[3,9];case 2:r.trys.push([2,7,8,9]),n=a(e),i=n.next(),r.label=3;case 3:return i.done?[3,6]:(o=i.value,t.call(null,o)?[4,o]:[3,5]);case 4:r.sent(),r.label=5;case 5:return i=n.next(),[3,3];case 6:return[3,9];case 7:return s=r.sent(),l={error:s},[3,9];case 8:try{i&&!i.done&&(u=n.return)&&u.call(n)}finally{if(l)throw l.error}return[7];case 9:return[2]}}))},t.clone=function(e){return new(Array.bind.apply(Array,o([void 0],e)))},t.sortInAscendingOrder=function(e,t){return e.sort((function(e,n){return t.call(null,e,n)?-1:1}))},t.sortInDescendingOrder=function(e,t){return e.sort((function(e,n){return t.call(null,e,n)?1:-1}))}},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(96),o=n(147),a=n(146),s=n(1);function l(e,t){for(var n=0;;){var r=n=65&&l<=90?String.fromCodePoint(l+32):s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function p(e){return e.replace(/^[\t\n\f\r ]+/,"").replace(/[\t\n\f\r ]+$/,"")}function f(e,t,n){if(!s.isArray(t))return f(e,Array.from(t),n);for(var r="";n.position=97&&l<=122?String.fromCodePoint(l-32):s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i},t.asciiCaseInsensitiveMatch=function(e,t){return d(e)===d(t)},t.asciiEncode=function(e){return console.assert(c(e),"asciiEncode requires an ASCII string."),u(e)},t.asciiDecode=function(e){var t,n;try{for(var i=r(e),s=i.next();!s.done;s=i.next()){var l=s.value;console.assert(a.isASCIIByte(l),"asciiDecode requires an ASCII byte sequence.")}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o.isomorphicDecode(e)},t.stripNewlines=function(e){return e.replace(/[\n\r]/g,"")},t.normalizeNewlines=function(e){return e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")},t.stripLeadingAndTrailingASCIIWhitespace=p,t.stripAndCollapseASCIIWhitespace=function(e){return p(e.replace(/[\t\n\f\r ]{2,}/g," "))},t.collectASequenceOfCodePoints=f,t.skipASCIIWhitespace=h,t.strictlySplit=function e(t,n){if(!s.isArray(t))return e(Array.from(t),n);var r={position:0},i=[],o=f((function(e){return n!==e}),t,r);for(i.push(o);r.position=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(97);t.abort_add=function(e,t){t._abortedFlag||t._abortAlgorithms.add(e)},t.abort_remove=function(e,t){t._abortAlgorithms.delete(e)},t.abort_signalAbort=function(e){var t,n;if(!e._abortedFlag){e._abortedFlag=!0;try{for(var o=r(e._abortAlgorithms),a=o.next();!a.done;a=o.next())a.value.call(e)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}e._abortAlgorithms.clear(),i.event_fireAnEvent("abort",e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(150),i=function(){function e(){}return e.asNode=function(e){if(r.Guard.isNode(e))return e;throw new Error("Invalid object. Node expected.")},e}();t.Cast=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return Object.defineProperty(e.prototype,"size",{get:function(){return 0},enumerable:!0,configurable:!0}),e.prototype.add=function(e){throw new Error("Cannot add to an empty set.")},e.prototype.clear=function(){},e.prototype.delete=function(e){return!1},e.prototype.forEach=function(e,t){},e.prototype.has=function(e){return!1},e.prototype[Symbol.iterator]=function(){return new i},e.prototype.entries=function(){return new i},e.prototype.keys=function(){return new i},e.prototype.values=function(){return new i},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"EmptySet"},enumerable:!0,configurable:!0}),e}();t.EmptySet=r;var i=function(){function e(){}return e.prototype[Symbol.iterator]=function(){return this},e.prototype.next=function(){return{done:!0,value:null}},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.SchemeStart=0]="SchemeStart",e[e.Scheme=1]="Scheme",e[e.NoScheme=2]="NoScheme",e[e.SpecialRelativeOrAuthority=3]="SpecialRelativeOrAuthority",e[e.PathOrAuthority=4]="PathOrAuthority",e[e.Relative=5]="Relative",e[e.RelativeSlash=6]="RelativeSlash",e[e.SpecialAuthoritySlashes=7]="SpecialAuthoritySlashes",e[e.SpecialAuthorityIgnoreSlashes=8]="SpecialAuthorityIgnoreSlashes",e[e.Authority=9]="Authority",e[e.Host=10]="Host",e[e.Hostname=11]="Hostname",e[e.Port=12]="Port",e[e.File=13]="File",e[e.FileSlash=14]="FileSlash",e[e.FileHost=15]="FileHost",e[e.PathStart=16]="PathStart",e[e.Path=17]="Path",e[e.CannotBeABaseURLPath=18]="CannotBeABaseURLPath",e[e.Query=19]="Query",e[e.Fragment=20]="Fragment"}(t.ParserState||(t.ParserState={})),t.OpaqueOrigin=["","",null,null]},function(e,t,n){"use strict";var r=n(245),i=n(247);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=_,t.resolve=function(e,t){return _(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?_(e,!1,!0).resolveObject(t):t},t.format=function(e){return i.isString(e)&&(e=_(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),d=["%","/","?",";","#"].concat(c),p=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(248);function _(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o127?E+="x":E+=O[I];if(!E.match(f)){var R=k.slice(0,D),B=k.slice(D+1),F=O.match(h);F&&(R.push(F[1]),B.unshift(F[2])),B.length&&(_="/"+B.join(".")+_),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=r.toASCII(this.hostname));var V=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+V,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!m[w])for(D=0,L=c.length;D0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift())),n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!S.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var T=S.slice(-1)[0],M=(n.host||e.host||S.length>1)&&("."===T||".."===T)||""===T,D=0,A=S.length;A>=0;A--)"."===(T=S[A])?S.splice(A,1):".."===T?(S.splice(A,1),D++):D&&(S.splice(A,1),D--);if(!x&&!w)for(;D--;D)S.unshift("..");!x||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),M&&"/"!==S.join("/").substr(-1)&&S.push("");var P,k=""===S[0]||S[0]&&"/"===S[0].charAt(0);return C&&(n.hostname=n.host=k?"":S.length?S.shift():"",(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift())),(x=x||n.host&&S.length)&&!k&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;!function(o){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,l=2147483647,u=/^xn--/,c=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,h=String.fromCharCode;function m(e){throw new RangeError(p[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function v(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(d,".")).split("."),t).join(".")}function y(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+h(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var r=0;for(e=n?f(e/700):e>>1,e+=f(e/t);e>455;r+=36)e=f(e/35);return f(r+36*e/(e+38))}function w(e){var t,n,r,i,o,a,s,u,c,d,p,h=[],g=e.length,v=0,y=128,b=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&m("not-basic"),h.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=g&&m("invalid-input"),((u=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||u>f((l-v)/a))&&m("overflow"),v+=u*a,!(u<(c=s<=b?1:s>=b+26?26:s-b));s+=36)a>f(l/(d=36-c))&&m("overflow"),a*=d;b=x(v-o,t=h.length+1,0==o),f(v/t)>l-y&&m("overflow"),y+=f(v/t),v%=t,h.splice(v++,0,y)}return _(h)}function S(e){var t,n,r,i,o,a,s,u,c,d,p,g,v,_,w,S=[];for(g=(e=y(e)).length,t=128,n=0,o=72,a=0;a=t&&pf((l-n)/(v=r+1))&&m("overflow"),n+=(s-t)*v,t=s,a=0;al&&m("overflow"),p==t){for(u=n,c=36;!(u<(d=c<=o?1:c>=o+26?26:c-o));c+=36)w=u-d,_=36-d,S.push(h(b(d+w%_,0))),u=f(w/_);S.push(h(b(u,0))),o=x(n,v,r==i),n=0,++r}++n,++t}return S.join("")}s={version:"1.4.1",ucs2:{decode:y,encode:_},decode:w,encode:S,toASCII:function(e){return v(e,(function(e){return c.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return v(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(246)(e),n(78))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(249),t.encode=t.stringify=n(250)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var u=e.length;l>0&&u>l&&(u=l);for(var c=0;c=0?(d=m.substr(0,g),p=m.substr(g+1)):(d=m,p=""),f=decodeURIComponent(d),h=decodeURIComponent(p),r(a,f)?i(a[f])?a[f].push(h):a[f]=[a[f],h]:a[f]=h}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),(function(a){var s=encodeURIComponent(r(a))+n;return i(e[a])?o(e[a],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[a]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);function o(e){return i.isBoolean(e)?e:e.capture||!1}t.eventTarget_flatten=o,t.eventTarget_flattenMore=function(e){var t=o(e),n=!1,r=!1;return i.isBoolean(e)||(n=e.once||!1,r=e.passive||!1),[t,r,n]},t.eventTarget_addEventListener=function(e,t){if(null!==t.callback){for(var n=0;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(29);t.parentNode_convertNodesIntoANode=function(e,t){for(var n,a,s=null,l=0;l=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t0;L--){var O;if(_(O=k[L],e)){P=O;break}}var E,I,N=[];try{for(var R=r(T._children),B=R.next();!B.done;B=R.next())if(y(j=B.value,e)){if(l.Guard.isDocumentTypeNode(j))throw new s.HierarchyRequestError;N.push(j)}}catch(e){i={error:e}}finally{try{B&&!B.done&&(a=R.return)&&a.call(R)}finally{if(i)throw i.error}}if(c.tree_isAncestorOf(S,x,!0))E=x,I=w;else{for(var F=x;null!==F._parent&&!c.tree_isAncestorOf(S,F._parent);)F=F._parent;if(null===F._parent)throw new Error("Parent node is null.");E=F._parent,I=1+c.tree_index(F)}if(l.Guard.isCharacterDataNode(M))(V=f.node_clone(x))._data=p.characterData_substringData(x,w,c.tree_nodeLength(x)-w),h.mutation_append(V,v),p.characterData_replaceData(x,w,c.tree_nodeLength(x)-w,"");else if(null!==M){var V=f.node_clone(M);h.mutation_append(V,v);var U=b(u.create_range([x,w],[M,c.tree_nodeLength(M)]));h.mutation_append(U,V)}try{for(var G=r(N),z=G.next();!z.done;z=G.next()){var j=z.value;h.mutation_append(j,v)}}catch(e){d={error:e}}finally{try{z&&!z.done&&(m=G.return)&&m.call(G)}finally{if(d)throw d.error}}return l.Guard.isCharacterDataNode(P)?((V=f.node_clone(S))._data=p.characterData_substringData(S,0,C),h.mutation_append(V,v),p.characterData_replaceData(S,0,C,"")):null!==P&&(V=f.node_clone(P),h.mutation_append(V,v),U=b(u.create_range([P,0],[S,C])),h.mutation_append(U,V)),e._start=[E,I],e._end=[E,I],v}t.range_collapsed=g,t.range_root=v,t.range_isContained=y,t.range_isPartiallyContained=_,t.range_setTheStart=function(e,t,n){if(l.Guard.isDocumentTypeNode(t))throw new s.InvalidNodeTypeError;if(n>c.tree_nodeLength(t))throw new s.IndexSizeError;var r=[t,n];v(e)===c.tree_rootNode(t)&&d.boundaryPoint_position(r,e._end)!==a.BoundaryPosition.After||(e._end=r),e._start=r},t.range_setTheEnd=function(e,t,n){if(l.Guard.isDocumentTypeNode(t))throw new s.InvalidNodeTypeError;if(n>c.tree_nodeLength(t))throw new s.IndexSizeError;var r=[t,n];v(e)===c.tree_rootNode(t)&&d.boundaryPoint_position(r,e._start)!==a.BoundaryPosition.Before||(e._start=r),e._end=r},t.range_select=function(e,t){var n=e._parent;if(null===n)throw new s.InvalidNodeTypeError;var r=c.tree_index(e);t._start=[n,r],t._end=[n,r+1]},t.range_extract=b,t.range_cloneTheContents=function e(t){var n,i,a,d,m,v,x=u.create_documentFragment(t._startNode._nodeDocument);if(g(t))return x;var w=t._startNode,S=t._startOffset,C=t._endNode,T=t._endOffset;w===C&&l.Guard.isCharacterDataNode(w)&&((B=f.node_clone(w))._data=p.characterData_substringData(w,S,T-S),h.mutation_append(B,x));for(var M=w;!c.tree_isAncestorOf(C,M,!0);){if(null===M._parent)throw new Error("Parent node is null.");M=M._parent}var D=null;if(!c.tree_isAncestorOf(C,w,!0))try{for(var A=r(M._children),P=A.next();!P.done;P=A.next())if(_(E=P.value,t)){D=E;break}}catch(e){n={error:e}}finally{try{P&&!P.done&&(i=A.return)&&i.call(A)}finally{if(n)throw n.error}}var k=null;if(!c.tree_isAncestorOf(w,C,!0))for(var L=o(M._children),O=L.length-1;O>0;O--){var E;if(_(E=L[O],t)){k=E;break}}var I=[];try{for(var N=r(M._children),R=N.next();!R.done;R=N.next())if(y(G=R.value,t)){if(l.Guard.isDocumentTypeNode(G))throw new s.HierarchyRequestError;I.push(G)}}catch(e){a={error:e}}finally{try{R&&!R.done&&(d=N.return)&&d.call(N)}finally{if(a)throw a.error}}if(l.Guard.isCharacterDataNode(D))(B=f.node_clone(w))._data=p.characterData_substringData(w,S,c.tree_nodeLength(w)-S),h.mutation_append(B,x);else if(null!==D){var B=f.node_clone(D);h.mutation_append(B,x);var F=e(u.create_range([w,S],[D,c.tree_nodeLength(D)]));h.mutation_append(F,B)}try{for(var V=r(I),U=V.next();!U.done;U=V.next()){var G=U.value;B=f.node_clone(G),h.mutation_append(B,x)}}catch(e){m={error:e}}finally{try{U&&!U.done&&(v=V.return)&&v.call(V)}finally{if(m)throw m.error}}return l.Guard.isCharacterDataNode(k)?((B=f.node_clone(C))._data=p.characterData_substringData(C,0,T),h.mutation_append(B,x)):null!==k&&(B=f.node_clone(k),x.append(B),F=b(u.create_range([k,0],[C,T])),h.mutation_append(F,B)),x},t.range_insert=function(e,t){var n,i;if(l.Guard.isProcessingInstructionNode(t._startNode)||l.Guard.isCommentNode(t._startNode)||l.Guard.isTextNode(t._startNode)&&null===t._startNode._parent||t._startNode===e)throw new s.HierarchyRequestError;var o,a=null;if(l.Guard.isTextNode(t._startNode))a=t._startNode;else{var u=0;try{for(var d=r(t._startNode._children),p=d.next();!p.done;p=d.next()){var f=p.value;if(u===t._startOffset){a=f;break}u++}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(null===a)o=t._startNode;else{if(null===a._parent)throw new Error("Parent node is null.");o=a._parent}h.mutation_ensurePreInsertionValidity(e,o,a),l.Guard.isTextNode(t._startNode)&&(a=m.text_split(t._startNode,t._startOffset)),e===a&&(a=e._nextSibling),null!==e._parent&&h.mutation_remove(e,e._parent);var v=null===a?c.tree_nodeLength(o):c.tree_index(a);l.Guard.isDocumentFragmentNode(e)?v+=c.tree_nodeLength(e):v++,h.mutation_preInsert(e,o,a),g(t)&&(t._end=[o,v])},t.range_getContainedNodes=function(e){var t;return(t={})[Symbol.iterator]=function(){var t=e.commonAncestorContainer,n=c.tree_getFirstDescendantNode(t);return{next:function(){for(;n&&!y(n,e);)n=c.tree_getNextDescendantNode(t,n);if(null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=c.tree_getNextDescendantNode(t,n),r}}},t},t.range_getPartiallyContainedNodes=function(e){var t;return(t={})[Symbol.iterator]=function(){var t=e.commonAncestorContainer,n=c.tree_getFirstDescendantNode(t);return{next:function(){for(;n&&!_(n,e);)n=c.tree_getNextDescendantNode(t,n);if(null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=c.tree_getNextDescendantNode(t,n),r}}},t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9);t.selectors_scopeMatchASelectorsString=function(e,t){throw new r.NotSupportedError}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(105);t.treeWalker_traverseChildren=function(e,t){for(var n=t?e._current._firstChild:e._current._lastChild;null!==n;){var o=i.traversal_filter(e,n);if(o===r.FilterResult.Accept)return e._current=n,n;if(o===r.FilterResult.Skip){var a=t?n._firstChild:n._lastChild;if(null!==a){n=a;continue}}for(;null!==n;){var s=t?n._nextSibling:n._previousSibling;if(null!==s){n=s;break}var l=n._parent;if(null===l||l===e._root||l===e._current)return null;n=l}}return null},t.treeWalker_traverseSiblings=function(e,t){var n=e._current;if(n===e._root)return null;for(;;){for(var o=t?n._nextSibling:n._previousSibling;null!==o;){n=o;var a=i.traversal_filter(e,n);if(a===r.FilterResult.Accept)return e._current=n,n;o=t?n._firstChild:n._lastChild,a!==r.FilterResult.Reject&&null!==o||(o=t?n._nextSibling:n._previousSibling)}if(null===(n=n._parent)||n===e._root)return null;if(i.traversal_filter(e,n)===r.FilterResult.Accept)return null}}},function(e,t,n){"use strict";n(89),n(74);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(2),s=n(50),l=n(3),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r._indentation={},r._lengthToLastNewline=0,r._writerOptions=o.applyDefaults(n,{wellFormed:!1,headless:!1,prettyPrint:!1,indent:" ",newline:"\n",offset:0,width:0,allowEmptyTags:!1,indentTextOnlyNodes:!1,spaceBeforeSlash:!1}),r}return i(t,e),t.prototype.serialize=function(e){return this._refs={suppressPretty:!1,emptyNode:!1,markup:""},e.nodeType!==a.NodeType.Document||this._writerOptions.headless||this.declaration(this._builderOptions.version,this._builderOptions.encoding,this._builderOptions.standalone),this.serializeNode(e,this._writerOptions.wellFormed),this._writerOptions.prettyPrint&&this._refs.markup.slice(-this._writerOptions.newline.length)===this._writerOptions.newline&&(this._refs.markup=this._refs.markup.slice(0,-this._writerOptions.newline.length)),this._refs.markup},t.prototype.declaration=function(e,t,n){this._beginLine(),this._refs.markup+='",this._endLine()},t.prototype.docType=function(e,t,n){this._beginLine(),this._refs.markup+=t&&n?"':t?"':n?"':"",this._endLine()},t.prototype.openTagBegin=function(e){this._beginLine(),this._refs.markup+="<"+e},t.prototype.openTagEnd=function(e,t,n){if(this._refs.suppressPretty=!1,this._refs.emptyNode=!1,this._writerOptions.prettyPrint&&!t&&!n){for(var r=!0,i=!0,o=this.currentNode.firstChild,a=0,s=0;o;){if(l.Guard.isExclusiveTextNode(o))s++;else{if(!l.Guard.isCDATASectionNode(o)){r=!1,i=!1;break}a++}""!==o.data&&(i=!1),o=o.nextSibling}this._refs.suppressPretty=!this._writerOptions.indentTextOnlyNodes&&r&&(a<=1&&0===s||0===a),this._refs.emptyNode=i}(n||t||this._refs.emptyNode)&&this._writerOptions.allowEmptyTags?this._refs.markup+=">":this._refs.markup+=n?" />":t||this._refs.emptyNode?this._writerOptions.spaceBeforeSlash?" />":"/>":">",this._endLine()},t.prototype.closeTag=function(e){this._refs.emptyNode||(this._beginLine(),this._refs.markup+=""),this._refs.suppressPretty=!1,this._refs.emptyNode=!1,this._endLine()},t.prototype.attribute=function(e,t){var n=e+'="'+t+'"';this._writerOptions.prettyPrint&&this._writerOptions.width>0&&this._refs.markup.length-this._lengthToLastNewline+1+n.length>this._writerOptions.width?(this._endLine(),this._beginLine(),this._refs.markup+=this._indent(1)+n):this._refs.markup+=" "+n},t.prototype.text=function(e){""!==e&&(this._beginLine(),this._refs.markup+=e,this._endLine())},t.prototype.cdata=function(e){""!==e&&(this._beginLine(),this._refs.markup+="",this._endLine())},t.prototype.comment=function(e){this._beginLine(),this._refs.markup+="\x3c!--"+e+"--\x3e",this._endLine()},t.prototype.instruction=function(e,t){this._beginLine(),this._refs.markup+="",this._endLine()},t.prototype._beginLine=function(){this._writerOptions.prettyPrint&&!this._refs.suppressPretty&&(this._refs.markup+=this._indent(this._writerOptions.offset+this.level))},t.prototype._endLine=function(){this._writerOptions.prettyPrint&&!this._refs.suppressPretty&&(this._refs.markup+=this._writerOptions.newline,this._lengthToLastNewline=this._refs.markup.length)},t.prototype._indent=function(e){if(e<=0)return"";if(void 0!==this._indentation[e])return this._indentation[e];var t=this._writerOptions.indent.repeat(e);return this._indentation[e]=t,t},t}(s.BaseWriter);t.XMLWriter=u},function(e,t,n){"use strict";var r=n(47),i=n(35);e.exports="".repeat||function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(178),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(67),s=n(1),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._writerOptions=s.applyDefaults(n,{wellFormed:!1,prettyPrint:!1,indent:" ",newline:"\n",offset:0,group:!1,verbose:!1}),r}return i(t,e),t.prototype.serialize=function(e){var t=s.applyDefaults(this._writerOptions,{format:"object",wellFormed:!1}),n=new a.ObjectWriter(this._builderOptions,t).serialize(e);return this._beginLine(this._writerOptions,0)+this._convertObject(n,this._writerOptions)},t.prototype._convertObject=function(e,t,n){var r,i,a=this;void 0===n&&(n=0);var l="",u=this._isLeafNode(e);if(s.isArray(e)){l+="[";var c=e.length,d=0;try{for(var p=o(e),f=p.next();!f.done;f=p.next()){var h=f.value;l+=this._endLine(t,n+1)+this._beginLine(t,n+1)+this._convertObject(h,t,n+1),d0?new Array(n).join(e.indent):""},t.prototype._endLine=function(e,t){return e.prettyPrint?e.newline:""},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t.prototype._isLeafNode=function(e){return this._descendantCount(e)<=1},t.prototype._descendantCount=function(e,t){var n=this;return void 0===t&&(t=0),s.isArray(e)?s.forEachArray(e,(function(e){return t+=n._descendantCount(e,t)}),this):s.isObject(e)?s.forEachObject(e,(function(e,r){return t+=n._descendantCount(r,t)}),this):t++,t},t}(n(50).BaseWriter);t.JSONWriter=l},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(178),n(89),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(67),s=n(1),l=function(e){function t(t,n){var r=e.call(this,t)||this;if(r._writerOptions=s.applyDefaults(n,{wellFormed:!1,indent:" ",newline:"\n",offset:0,group:!1,verbose:!1}),r._writerOptions.indent.length<2)throw new Error("YAML indententation string must be at least two characters long.");if(r._writerOptions.offset<0)throw new Error("YAML offset should be zero or a positive number.");return r}return i(t,e),t.prototype.serialize=function(e){var t=s.applyDefaults(this._writerOptions,{format:"object",wellFormed:!1}),n=new a.ObjectWriter(this._builderOptions,t).serialize(e),r=this._beginLine(this._writerOptions,0)+"---"+this._endLine(this._writerOptions)+this._convertObject(n,this._writerOptions,0);return r.slice(-this._writerOptions.newline.length)===this._writerOptions.newline&&(r=r.slice(0,-this._writerOptions.newline.length)),r},t.prototype._convertObject=function(e,t,n,r){var i,a,l=this;void 0===r&&(r=!1);var u="";if(s.isArray(e))try{for(var c=o(e),d=c.next();!d.done;d=c.next()){var p=d.value;u+=this._beginLine(t,n,!0),s.isObject(p)?s.isEmpty(p)?u+='""'+this._endLine(t):u+=this._convertObject(p,t,n,!0):u+=this._val(p)+this._endLine(t)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}else s.forEachObject(e,(function(e,i){r?(u+=l._key(e),r=!1):u+=l._beginLine(t,n)+l._key(e),s.isObject(i)?s.isEmpty(i)?u+=' ""'+l._endLine(t):u+=l._endLine(t)+l._convertObject(i,t,n+1):u+=" "+l._val(i)+l._endLine(t)}),this);return u},t.prototype._beginLine=function(e,t,n){void 0===n&&(n=!1);var r=e.offset+t+1,i=new Array(r).join(e.indent);return n?i.substr(0,i.length-2)+"-"+i.substr(-1,1):i},t.prototype._endLine=function(e){return e.newline},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t}(n(50).BaseWriter);t.YAMLWriter=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(110).dom.setFeatures(!0);var r=n(110);t.DOMImplementation=r.DOMImplementation;var i=n(271);t.DOMParser=i.DOMParser;var o=n(274);t.XMLSerializer=o.XMLSerializer},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(0),o=function(){function e(){}return e.prototype.before=function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(7),s=function(){function e(e){this._nodeList=[],this._recordQueue=[],this._callback=e;var t=i.dom.window;a.set.append(t._mutationObservers,this)}return e.prototype.observe=function(e,t){var n,i;if(void 0===(t=t||{childList:!1,subtree:!1}).attributeOldValue&&void 0===t.attributeFilter||void 0!==t.attributes||(t.attributes=!0),void 0!==t.characterDataOldValue&&void 0===t.characterData&&(t.characterData=!0),!t.childList&&!t.attributes&&!t.characterData)throw new TypeError;if(t.attributeOldValue&&!t.attributes)throw new TypeError;if(void 0!==t.attributeFilter&&!t.attributes)throw new TypeError;if(t.characterDataOldValue&&!t.characterData)throw new TypeError;var s=!1,l=t,u=function(e){var t,n;if(e.observer===c){s=!0;try{for(var i=(t=void 0,r(c._nodeList)),u=i.next();!u.done;u=i.next()){var d=u.value;a.list.remove(d._registeredObserverList,(function(t){return o.Guard.isTransientRegisteredObserver(t)&&t.source===e}))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.options=l}},c=this;try{for(var d=r(e._registeredObserverList),p=d.next();!p.done;p=d.next())u(p.value)}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}s||(e._registeredObserverList.push({observer:this,options:t}),this._nodeList.push(e))},e.prototype.disconnect=function(){var e,t,n=this;try{for(var i=r(this._nodeList),o=i.next();!o.done;o=i.next()){var s=o.value;a.list.remove(s._registeredObserverList,(function(e){return e.observer===n}))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this._recordQueue=[]},e.prototype.takeRecords=function(){var e=this._recordQueue;return this._recordQueue=[],e},e}();t.MutationObserverImpl=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=function(){function e(){}return Object.defineProperty(e.prototype,"previousElementSibling",{get:function(){for(var e=r.Cast.asNode(this)._previousSibling;e;){if(r.Guard.isElementNode(e))return e;e=e._previousSibling}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextElementSibling",{get:function(){for(var e=r.Cast.asNode(this)._nextSibling;e;){if(r.Guard.isElementNode(e))return e;e=e._nextSibling}return null},enumerable:!0,configurable:!0}),e}();t.NonDocumentTypeChildNodeImpl=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(0),o=function(){function e(){}return e.prototype.getElementById=function(e){for(var t=i.tree_getFirstDescendantNode(r.Cast.asNode(this),!1,!1,(function(e){return r.Guard.isElementNode(e)}));null!==t;){if(t._uniqueIdentifier===e)return t;t=i.tree_getNextDescendantNode(r.Cast.asNode(this),t,!1,!1,(function(e){return r.Guard.isElementNode(e)}))}return null},e}();t.NonElementParentNodeImpl=o},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(0),a=function(){function e(){}return Object.defineProperty(e.prototype,"children",{get:function(){return o.create_htmlCollection(i.Cast.asNode(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){for(var e=i.Cast.asNode(this)._firstChild;e;){if(i.Guard.isElementNode(e))return e;e=e._nextSibling}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){for(var e=i.Cast.asNode(this)._lastChild;e;){if(i.Guard.isElementNode(e))return e;e=e._previousSibling}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){var e,t,n=0;try{for(var o=r(i.Cast.asNode(this)._children),a=o.next();!a.done;a=o.next()){var s=a.value;i.Guard.isElementNode(s)&&n++}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},enumerable:!0,configurable:!0}),e.prototype.prepend=function(){for(var e=[],t=0;t0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(180),a=n(111),s=n(7),l=n(0),u=n(69),c=function(){function e(){}return e.prototype.parse=function(e){for(var t,n,c,d,p=new o.XMLStringLexer(e,{skipWhitespaceOnlyText:!0}),f=l.create_document(),h=f,m=p.nextToken();m.type!==a.TokenType.EOF;){switch(m.type){case a.TokenType.Declaration:var g=m;if("1.0"!==g.version)throw new Error("Invalid xml version: "+g.version);break;case a.TokenType.DocType:var v=m;if(!l.xml_isPubidChar(v.pubId))throw new Error("DocType public identifier does not match PubidChar construct.");if(!l.xml_isLegalChar(v.sysId)||-1!==v.sysId.indexOf('"')&&-1!==v.sysId.indexOf("'"))throw new Error("DocType system identifier contains invalid characters.");h.appendChild(f.implementation.createDocumentType(v.name,v.pubId,v.sysId));break;case a.TokenType.CDATA:var y=m;if(!l.xml_isLegalChar(y.data)||-1!==y.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters.");h.appendChild(f.createCDATASection(y.data));break;case a.TokenType.Comment:var _=m;if(!l.xml_isLegalChar(_.data)||-1!==_.data.indexOf("--")||_.data.endsWith("-"))throw new Error("Comment data contains invalid characters.");h.appendChild(f.createComment(_.data));break;case a.TokenType.PI:var b=m;if(-1!==b.target.indexOf(":")||/^xml$/i.test(b.target))throw new Error("Processing instruction target contains invalid characters.");if(!l.xml_isLegalChar(b.data)||-1!==b.data.indexOf("?>"))throw new Error("Processing instruction data contains invalid characters.");h.appendChild(f.createProcessingInstruction(b.target,b.data));break;case a.TokenType.Text:var x=m;if(!l.xml_isLegalChar(x.data))throw new Error("Text data contains invalid characters.");h.appendChild(f.createTextNode(this._decodeText(x.data)));break;case a.TokenType.Element:var w=m,S=r(l.namespace_extractQName(w.name),2),C=S[0],T=S[1];if(-1!==T.indexOf(":")||!l.xml_isName(T))throw new Error("Node local name contains invalid characters.");if("xmlns"===C)throw new Error("An element cannot have the 'xmlns' prefix.");var M=h.lookupNamespaceURI(C),D={};try{for(var A=(t=void 0,i(w.attributes)),P=A.next();!P.done;P=A.next()){var k=r(P.value,2),L=k[0],O=k[1];if("xmlns"===L)M=O;else{var E=r(l.namespace_extractQName(L),2),I=E[0],N=E[1];"xmlns"===I&&(N===C&&(M=O),D[N]=O)}}}catch(e){t={error:e}}finally{try{P&&!P.done&&(n=A.return)&&n.call(A)}finally{if(t)throw t.error}}var R=null!==M?f.createElementNS(M,w.name):f.createElement(w.name);h.appendChild(R);var B=new u.LocalNameSet;try{for(var F=(c=void 0,i(w.attributes)),V=F.next();!V.done;V=F.next()){var U=r(V.value,2),G=(L=U[0],O=U[1],r(l.namespace_extractQName(L),2)),z=(I=G[0],N=G[1],null);if("xmlns"===I||null===I&&"xmlns"===N?z=s.namespace.XMLNS:null!==(z=R.lookupNamespaceURI(I))&&R.isDefaultNamespace(z)?z=null:null===z&&null!==I&&(z=D[I]||null),B.has(z,N))throw new Error("Element contains duplicate attributes.");if(B.set(z,N),z===s.namespace.XMLNS&&O===s.namespace.XMLNS)throw new Error("XMLNS namespace is reserved.");if(-1!==N.indexOf(":")||!l.xml_isName(N))throw new Error("Attribute local name contains invalid characters.");if("xmlns"===I&&""===O)throw new Error("Empty XML namespace is not allowed.");null!==z?R.setAttributeNS(z,L,this._decodeAttributeValue(O)):R.setAttribute(L,this._decodeAttributeValue(O))}}catch(e){c={error:e}}finally{try{V&&!V.done&&(d=F.return)&&d.call(F)}finally{if(c)throw c.error}}w.selfClosing||(h=R);break;case a.TokenType.ClosingTag:if(m.name!==h.nodeName)throw new Error("Closing tag name does not match opening tag name.");h._parent&&(h=h._parent)}m=p.nextToken()}return f},e.prototype._decodeText=function(e){return null==e?e:e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")},e.prototype._decodeAttributeValue=function(e){return null==e?e:e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")},e}();t.XMLParserImpl=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(275);t.XMLSerializer=r.XMLSerializerImpl},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(69),a=n(95),s=n(9),l=n(7),u=n(0),c=function(){function e(){}return e.prototype.serializeToString=function(e){return this._xmlSerialization(e,!1)},e.prototype._xmlSerialization=function(e,t){if(void 0===e._nodeDocument||e._nodeDocument._hasNamespaces){var n=new a.NamespacePrefixMap;n.set("xml",l.namespace.XML);try{return this._serializeNodeNS(e,null,n,{value:1},t)}catch(e){throw new s.InvalidStateError}}else try{return this._serializeNode(e,t)}catch(e){throw new s.InvalidStateError}},e.prototype._serializeNodeNS=function(e,t,n,r,o){switch(e.nodeType){case i.NodeType.Element:return this._serializeElementNS(e,t,n,r,o);case i.NodeType.Document:return this._serializeDocumentNS(e,t,n,r,o);case i.NodeType.Comment:return this._serializeComment(e,o);case i.NodeType.Text:return this._serializeText(e,o);case i.NodeType.DocumentFragment:return this._serializeDocumentFragmentNS(e,t,n,r,o);case i.NodeType.DocumentType:return this._serializeDocumentType(e,o);case i.NodeType.ProcessingInstruction:return this._serializeProcessingInstruction(e,o);case i.NodeType.CData:return this._serializeCData(e,o);default:throw new Error("Unknown node type: "+e.nodeType)}},e.prototype._serializeNode=function(e,t){switch(e.nodeType){case i.NodeType.Element:return this._serializeElement(e,t);case i.NodeType.Document:return this._serializeDocument(e,t);case i.NodeType.Comment:return this._serializeComment(e,t);case i.NodeType.Text:return this._serializeText(e,t);case i.NodeType.DocumentFragment:return this._serializeDocumentFragment(e,t);case i.NodeType.DocumentType:return this._serializeDocumentType(e,t);case i.NodeType.ProcessingInstruction:return this._serializeProcessingInstruction(e,t);case i.NodeType.CData:return this._serializeCData(e,t);default:throw new Error("Unknown node type: "+e.nodeType)}},e.prototype._serializeElementNS=function(t,n,i,o,a){var s,c;if(a&&(-1!==t.localName.indexOf(":")||!u.xml_isName(t.localName)))throw new Error("Node local name contains invalid characters (well-formed required).");var d="<",p="",f=!1,h=!1,m=i.copy(),g={},v=this._recordNamespaceInformation(t,m,g),y=n,_=t.namespaceURI;if(y===_)null!==v&&(h=!0),d+=p=_===l.namespace.XML?"xml:"+t.localName:t.localName;else{var b=t.prefix,x=null;if(null===b&&_===v||(x=m.get(b,_)),"xmlns"===b){if(a)throw new Error("An element cannot have the 'xmlns' prefix (well-formed required).");x=b}null!==x?(p=x+":"+t.localName,null!==v&&v!==l.namespace.XML&&(y=v||null),d+=p):null!==b?(b in g&&(b=this._generatePrefix(_,m,o)),m.set(b,_),d+=p+=b+":"+t.localName,d+=" xmlns:"+b+'="'+this._serializeAttributeValue(_,a)+'"',null!==v&&(y=v||null)):null===v||null!==v&&v!==_?(h=!0,y=_,d+=p+=t.localName,d+=' xmlns="'+this._serializeAttributeValue(_,a)+'"'):(y=_,d+=p+=t.localName)}d+=this._serializeAttributesNS(t,m,o,g,h,a);var w=_===l.namespace.HTML;if(w&&0===t.childNodes.length&&e._VoidElementNames.has(t.localName)?(d+=" /",f=!0):w||0!==t.childNodes.length||(d+="/",f=!0),d+=">",f)return d;if(w&&"template"===t.localName);else try{for(var S=r(t._children||t.childNodes),C=S.next();!C.done;C=S.next()){var T=C.value;d+=this._serializeNodeNS(T,y,m,o,a)}}catch(e){s={error:e}}finally{try{C&&!C.done&&(c=S.return)&&c.call(S)}finally{if(s)throw s.error}}return d+""},e.prototype._serializeDocumentNS=function(e,t,n,i,o){var a,s;if(o&&null===e.documentElement)throw new Error("Missing document element (well-formed required).");var l="";try{for(var u=r(e._children||e.childNodes),c=u.next();!c.done;c=u.next()){var d=c.value;l+=this._serializeNodeNS(d,t,n,i,o)}}catch(e){a={error:e}}finally{try{c&&!c.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}return l},e.prototype._serializeComment=function(e,t){if(t&&(!u.xml_isLegalChar(e.data)||-1!==e.data.indexOf("--")||e.data.endsWith("-")))throw new Error("Comment data contains invalid characters (well-formed required).");return"\x3c!--"+e.data+"--\x3e"},e.prototype._serializeText=function(e,t){if(t&&!u.xml_isLegalChar(e.data))throw new Error("Text data contains invalid characters (well-formed required).");for(var n="",r=0;r"===i?">":i}return n},e.prototype._serializeDocumentFragmentNS=function(e,t,n,i,o){var a,s,l="";try{for(var u=r(e._children||e.childNodes),c=u.next();!c.done;c=u.next()){var d=c.value;l+=this._serializeNodeNS(d,t,n,i,o)}}catch(e){a={error:e}}finally{try{c&&!c.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}return l},e.prototype._serializeDocumentType=function(e,t){if(t&&!u.xml_isPubidChar(e.publicId))throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");if(t&&(!u.xml_isLegalChar(e.systemId)||-1!==e.systemId.indexOf('"')&&-1!==e.systemId.indexOf("'")))throw new Error("DocType system identifier contains invalid characters (well-formed required).");return e.publicId&&e.systemId?"':e.publicId?"':e.systemId?"':""},e.prototype._serializeProcessingInstruction=function(e,t){if(t&&(-1!==e.target.indexOf(":")||/^xml$/i.test(e.target)))throw new Error("Processing instruction target contains invalid characters (well-formed required).");if(t&&(!u.xml_isLegalChar(e.data)||-1!==e.data.indexOf("?>")))throw new Error("Processing instruction data contains invalid characters (well-formed required).");return""},e.prototype._serializeCData=function(e,t){if(t&&-1!==e.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters (well-formed required).");return""},e.prototype._serializeAttributesNS=function(e,t,n,i,a,s){var c,d,p="",f=s?new o.LocalNameSet:void 0;try{for(var h=r(e.attributes),m=h.next();!m.done;m=h.next()){var g=m.value;if(a||s||null!==g.namespaceURI){if(s&&f&&f.has(g.namespaceURI,g.localName))throw new Error("Element contains duplicate attributes (well-formed required).");s&&f&&f.set(g.namespaceURI,g.localName);var v=g.namespaceURI,y=null;if(null!==v)if(y=t.get(g.prefix,v),v===l.namespace.XMLNS){if(g.value===l.namespace.XML||null===g.prefix&&a||null!==g.prefix&&(!(g.localName in i)||i[g.localName]!==g.value)&&t.has(g.localName,g.value))continue;if(s&&g.value===l.namespace.XMLNS)throw new Error("XMLNS namespace is reserved (well-formed required).");if(s&&""===g.value)throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");"xmlns"===g.prefix&&(y="xmlns")}else null===y&&(p+=" xmlns:"+(y=null===g.prefix||t.hasPrefix(g.prefix)&&!t.has(g.prefix,v)?this._generatePrefix(v,t,n):g.prefix)+'="'+this._serializeAttributeValue(v,s)+'"');if(p+=" ",null!==y&&(p+=y+":"),s&&(-1!==g.localName.indexOf(":")||!u.xml_isName(g.localName)||"xmlns"===g.localName&&null===v))throw new Error("Attribute local name contains invalid characters (well-formed required).");p+=g.localName+'="'+this._serializeAttributeValue(g.value,s)+'"'}else p+=" "+g.localName+'="'+this._serializeAttributeValue(g.value,s)+'"'}}catch(e){c={error:e}}finally{try{m&&!m.done&&(d=h.return)&&d.call(h)}finally{if(c)throw c.error}}return p},e.prototype._recordNamespaceInformation=function(e,t,n){var i,o,a=null;try{for(var s=r(e.attributes),u=s.next();!u.done;u=s.next()){var c=u.value,d=c.namespaceURI,p=c.prefix;if(d===l.namespace.XMLNS){if(null===p){a=c.value;continue}var f=c.localName,h=c.value;if(h===l.namespace.XML)continue;if(""===h&&(h=null),t.has(f,h))continue;t.set(f,h),n[f]=h||""}}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},e.prototype._generatePrefix=function(e,t,n){var r="ns"+n.value;return n.value++,t.set(r,e),r},e.prototype._serializeAttributeValue=function(e,t){if(t&&null!==e&&!u.xml_isLegalChar(e))throw new Error("Invalid characters in attribute value.");if(null===e)return"";for(var n="",r=0;r"===i?">":i}return n},e.prototype._serializeElement=function(e,t){var n,i;if(t&&(-1!==e.localName.indexOf(":")||!u.xml_isName(e.localName)))throw new Error("Node local name contains invalid characters (well-formed required).");var o=!1,a=e.localName,s="<"+a;if(s+=this._serializeAttributes(e,t),0===e._children.size&&(s+="/",o=!0),s+=">",o)return s;try{for(var l=r(e._children),c=l.next();!c.done;c=l.next()){var d=c.value;s+=this._serializeNode(d,t)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return s+""},e.prototype._serializeDocument=function(e,t){var n,i;if(t&&null===e.documentElement)throw new Error("Missing document element (well-formed required).");var o="";try{for(var a=r(e._children),s=a.next();!s.done;s=a.next()){var l=s.value;o+=this._serializeNode(l,t)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},e.prototype._serializeDocumentFragment=function(e,t){var n,i,o="";try{for(var a=r(e._children),s=a.next();!s.done;s=a.next()){var l=s.value;o+=this._serializeNode(l,t)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},e.prototype._serializeAttributes=function(e,t){var n,i,o="",a=t?{}:void 0;try{for(var s=r(e.attributes),l=s.next();!l.done;l=s.next()){var c=l.value;if(t&&a&&c.localName in a)throw new Error("Element contains duplicate attributes (well-formed required).");if(t&&a&&(a[c.localName]=!0),t&&(-1!==c.localName.indexOf(":")||!u.xml_isName(c.localName)))throw new Error("Attribute local name contains invalid characters (well-formed required).");o+=" "+c.localName+'="'+this._serializeAttributeValue(c.value,t)+'"'}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},e._VoidElementNames=new Set(["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]),e}();t.XMLSerializerImpl=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(277);t.XMLReader=r.XMLReader;var i=n(112);t.ObjectReader=i.ObjectReader;var o=n(280);t.JSONReader=o.JSONReader;var a=n(281);t.YAMLReader=a.YAMLReader},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(65),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var s=n(180),l=n(111),u=n(7),c=n(0),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){for(var n,r,i,d,p=new s.XMLStringLexer(t,{skipWhitespaceOnlyText:!0}),f=e,h=e,m=p.nextToken();m.type!==l.TokenType.EOF;){switch(m.type){case l.TokenType.Declaration:var g=m,v=this.sanitize(g.version);if("1.0"!==v)throw new Error("Invalid xml version: "+v);var y={version:v};g.encoding&&(y.encoding=this.sanitize(g.encoding)),g.standalone&&(y.standalone="yes"===this.sanitize(g.standalone)),h.set(y);break;case l.TokenType.DocType:var _=m;h=this.docType(h,this.sanitize(_.name),this.sanitize(_.pubId),this.sanitize(_.sysId))||h;break;case l.TokenType.CDATA:var b=m;h=this.cdata(h,this.sanitize(b.data))||h;break;case l.TokenType.Comment:var x=m;h=this.comment(h,this.sanitize(x.data))||h;break;case l.TokenType.PI:var w=m;h=this.instruction(h,this.sanitize(w.target),this.sanitize(w.data))||h;break;case l.TokenType.Text:var S=m;h=this.text(h,this._decodeText(this.sanitize(S.data)))||h;break;case l.TokenType.Element:var C=m,T=this.sanitize(C.name),M=o(c.namespace_extractQName(T),1)[0],D=h.node.lookupNamespaceURI(M),A={};try{for(var P=(n=void 0,a(C.attributes)),k=P.next();!k.done;k=P.next()){var L=o(k.value,2),O=L[0],E=L[1];if(O=this.sanitize(O),E=this.sanitize(E),"xmlns"===O)D=E;else{var I=o(c.namespace_extractQName(O),2),N=I[0],R=I[1];"xmlns"===N&&(R===M&&(D=E),A[R]=E)}}}catch(e){n={error:e}}finally{try{k&&!k.done&&(r=P.return)&&r.call(P)}finally{if(n)throw n.error}}var B=null!==D?this.element(h,D,T):this.element(h,void 0,T);if(void 0===B)break;h.node===e.node&&(f=B);try{for(var F=(i=void 0,a(C.attributes)),V=F.next();!V.done;V=F.next()){var U=o(V.value,2);O=U[0],E=U[1],O=this.sanitize(O),E=this.sanitize(E);var G=o(c.namespace_extractQName(O),2),z=(N=G[0],R=G[1],null);"xmlns"===N||null===N&&"xmlns"===R?z=u.namespace.XMLNS:null!==(z=B.node.lookupNamespaceURI(N))&&B.node.isDefaultNamespace(z)?z=null:null===z&&null!==N&&(z=A[N]||null),null!==z?this.attribute(B,z,O,this._decodeAttributeValue(E)):this.attribute(B,void 0,O,this._decodeAttributeValue(E))}}catch(e){i={error:e}}finally{try{V&&!V.done&&(d=F.return)&&d.call(F)}finally{if(i)throw i.error}}C.selfClosing||(h=B);break;case l.TokenType.ClosingTag:h.node.parentNode&&(h=h.up())}m=p.nextToken()}return f},t}(n(75).BaseReader);t.XMLReader=d},function(e,t,n){var r=n(4),i=n(279);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){"use strict";var r=n(16),i=n(8),o=n(61),a=n(85),s=n(79),l=n(27),u=n(41),c=Object.assign,d=Object.defineProperty;e.exports=!c||i((function(){if(r&&1!==c({b:1},c(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")}))?function(e,t){for(var n=l(e),i=arguments.length,c=1,d=a.f,p=s.f;i>c;)for(var f,h=u(arguments[c++]),m=d?o(h).concat(d(h)):o(h),g=m.length,v=0;g>v;)f=m[v++],r&&!p.call(h,f)||(n[f]=h[f]);return n}:c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(112),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){return new o.ObjectReader(this._builderOptions).parse(e,JSON.parse(t))},t}(n(75).BaseReader);t.JSONReader=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(112),a=n(75),s=n(282),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){var n=s.safeLoad(t);if(void 0===n)throw new Error("Unable to parse YAML document.");return new o.ObjectReader(this._builderOptions).parse(e,n)},t}(a.BaseReader);t.YAMLReader=l},function(e,t,n){"use strict";var r=n(283);e.exports=r},function(e,t,n){"use strict";var r=n(284),i=n(303);function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(10),e.exports.Schema=n(39),e.exports.FAILSAFE_SCHEMA=n(113),e.exports.JSON_SCHEMA=n(182),e.exports.CORE_SCHEMA=n(181),e.exports.DEFAULT_SAFE_SCHEMA=n(54),e.exports.DEFAULT_FULL_SCHEMA=n(76),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=i.dump,e.exports.safeDump=i.safeDump,e.exports.YAMLException=n(53),e.exports.MINIMAL_SCHEMA=n(113),e.exports.SAFE_SCHEMA=n(54),e.exports.DEFAULT_SCHEMA=n(76),e.exports.scan=o("scan"),e.exports.parse=o("parse"),e.exports.compose=o("compose"),e.exports.addConstructor=o("addConstructor")},function(e,t,n){"use strict";var r=n(38),i=n(53),o=n(285),a=n(54),s=n(76),l=Object.prototype.hasOwnProperty,u=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=/[\x85\u2028\u2029]/,d=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,f=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function h(e){return Object.prototype.toString.call(e)}function m(e){return 10===e||13===e}function g(e){return 9===e||32===e}function v(e){return 9===e||32===e||10===e||13===e}function y(e){return 44===e||91===e||93===e||123===e||125===e}function _(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function b(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function x(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var w=new Array(256),S=new Array(256),C=0;C<256;C++)w[C]=b(C)?1:0,S[C]=b(C);function T(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function M(e,t){return new i(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function D(e,t){throw M(e,t)}function A(e,t){e.onWarning&&e.onWarning.call(null,M(e,t))}var P={YAML:function(e,t,n){var r,i,o;null!==e.version&&D(e,"duplication of %YAML directive"),1!==n.length&&D(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&D(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&D(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&A(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&D(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],p.test(r)||D(e,"ill-formed tag handle (first argument) of the TAG directive"),l.call(e.tagMap,r)&&D(e,'there is a previously declared suffix for "'+r+'" tag handle'),f.test(i)||D(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};function k(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=r.repeat("\n",t-1))}function B(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&45===r&&v(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,I(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,U(e,t,3,!1,!0),a.push(e.result),I(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)D(e,"bad indentation of a sequence entry");else if(e.lineIndentt?b=1:e.lineIndent===t?b=0:e.lineIndentt?b=1:e.lineIndent===t?b=0:e.lineIndentt)&&(U(e,t,4,!0,i)&&(m?f=e.result:h=e.result),m||(O(e,c,d,p,f,h,o,a),p=f=h=null),I(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)D(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?D(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?D(e,"repeat of an indentation width identifier"):(d=t+o-1,c=!0)}if(g(a)){do{a=e.input.charCodeAt(++e.position)}while(g(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!m(a)&&0!==a)}for(;0!==a;){for(E(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!c||e.lineIndentd&&(d=e.lineIndent),m(a))p++;else{if(e.lineIndent0){for(i=a,o=0;i>0;i--)(a=_(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:D(e,"expected hexadecimal character");e.result+=x(o),e.position++}else D(e,"unknown escape sequence");n=r=e.position}else m(s)?(k(e,n,r,!0),R(e,I(e,!1,t)),n=r=e.position):e.position===e.lineStart&&N(e)?D(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}D(e,"unexpected end of the stream within a double quoted scalar")}(e,f)?T=!0:function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!v(r)&&!y(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&D(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||D(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],I(e,!0,-1),!0}(e)?(T=!0,null===e.tag&&null===e.anchor||D(e,"alias node should not have any properties")):function(e,t,n){var r,i,o,a,s,l,u,c,d=e.kind,p=e.result;if(v(c=e.input.charCodeAt(e.position))||y(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(v(r=e.input.charCodeAt(e.position+1))||n&&y(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==c;){if(58===c){if(v(r=e.input.charCodeAt(e.position+1))||n&&y(r))break}else if(35===c){if(v(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&N(e)||n&&y(c))break;if(m(c)){if(s=e.line,l=e.lineStart,u=e.lineIndent,I(e,!1,-1),e.lineIndent>=t){a=!0,c=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=u;break}}a&&(k(e,i,o,!1),R(e,e.line-s),i=o=e.position,a=!1),g(c)||(o=e.position+1),c=e.input.charCodeAt(++e.position)}return k(e,i,o,!1),!!e.result||(e.kind=d,e.result=p,!1)}(e,f,1===n)&&(T=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===b&&(T=u&&B(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&D(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),c=0,d=e.implicitTypes.length;c tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):D(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):D(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||T}function G(e){var t,n,r,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(i=e.input.charCodeAt(e.position))&&(I(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!v(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&D(e,"directive name must not be less than one character in length");0!==i;){for(;g(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!m(i));break}if(m(i))break;for(t=e.position;0!==i&&!v(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&E(e),l.call(P,n)?P[n](e,n,r):A(e,'unknown document directive "'+n+'"')}I(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,I(e,!0,-1)):a&&D(e,"directives end mark is expected"),U(e,e.lineIndent-1,4,!1,!0),I(e,!0,-1),e.checkLineBreaks&&c.test(e.input.slice(o,e.position))&&A(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&N(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,I(e,!0,-1)):e.position0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=i},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(38),i=n(10);function o(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,i=0,s=!1;if(!r)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,n){"use strict";var r=n(38),i=n(10),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,r,i;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){i.unshift(parseFloat(e,10))})),t=0,r=1,i.forEach((function(e){t+=e*r,r*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(10),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==i.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,r,a,s,l,u,c,d=0,p=null;if(null===(t=i.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(s=+t[4],l=+t[5],u=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(p=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(p=-p)),c=new Date(Date.UTC(n,r,a,s,l,u,d)),p&&c.setTime(c.getTime()-p),c},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,n){"use strict";var r;try{r=n(145).Buffer}catch(e){}var i=n(10),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,i=e.length,a=o;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),a=i.length,s=o,l=0,u=[];for(t=0;t>16&255),u.push(l>>8&255),u.push(255&l)),l=l<<6|s.indexOf(i.charAt(t));return 0==(n=a%4*6)?(u.push(l>>16&255),u.push(l>>8&255),u.push(255&l)):18===n?(u.push(l>>10&255),u.push(l>>2&255)):12===n&&u.push(l>>4&255),r?r.from?r.from(u):new r(u):u},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){var t,n,r="",i=0,a=e.length,s=o;for(t=0;t>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+e[t];return 0==(n=a%3)?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}})},function(e,t,n){"use strict";var r=n(10),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,s,l=[],u=e;for(t=0,n=u.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,n){"use strict";var r;try{r=n(302)}catch(e){"undefined"!=typeof window&&(r=window.esprima)}var i=n(10);e.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",i=r.parse(n,{range:!0}),o=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach((function(e){o.push(e.name)})),t=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type?new Function(o,n.slice(t[0]+1,t[1]-1)):new Function(o,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(3),o=n(8),a=n(15);function s(e,t,n){var a=null,s=function(e,t){n&&n(e,t),a&&a.visit(e,t)},l="function"==typeof n?s:null,u=!1;if(t){u="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(u||c)&&((a=new r.CommentHandler).attach=c,t.comment=!0,l=s)}var d,p=!1;t&&"string"==typeof t.sourceType&&(p="module"===t.sourceType),d=t&&"boolean"==typeof t.jsx&&t.jsx?new i.JSXParser(e,t,l):new o.Parser(e,t,l);var f=p?d.parseModule():d.parseScript();return u&&a&&(f.comments=a.comments),d.config.tokens&&(f.tokens=d.tokens),d.config.tolerant&&(f.errors=d.errorHandler.errors),f}t.parse=s,t.parseModule=function(e,t,n){var r=t||{};return r.sourceType="module",s(e,r,n)},t.parseScript=function(e,t,n){var r=t||{};return r.sourceType="script",s(e,r,n)},t.tokenize=function(e,t,n){var r,i=new a.Tokenizer(e,t);r=[];try{for(;;){var o=i.getNextToken();if(!o)break;n&&(o=n(o)),r.push(o)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(r.errors=i.errors()),r};var l=n(2);t.Syntax=l.Syntax,t.version="4.0.1"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var r=this.trailing[n];r.start>=e.end.offset&&t.unshift(r.comment)}return this.trailing.length=0,t}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=i.node.trailingComments,delete i.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&(o=this.stack[this.stack.length-1])&&o.start>=e.start.offset;)t=o.node,this.stack.pop();if(t){for(var r=(t.leadingComments?t.leadingComments.length:0)-1;r>=0;--r){var i=t.leadingComments[r];i.range[1]<=e.start.offset&&(n.unshift(i),t.leadingComments.splice(r,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(r=this.leading.length-1;r>=0;--r){var o;(o=this.leading[r]).start<=e.start.offset&&(n.unshift(o.comment),this.leading.splice(r,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),i=this.findLeadingComments(t);i.length>0&&(e.leadingComments=i),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),a=n(5),s=n(6),l=n(7),u=n(8),c=n(13),d=n(14);function p(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:t=e.name;break;case s.JSXSyntax.JSXNamespacedName:var n=e;t=p(n.namespace)+":"+p(n.name);break;case s.JSXSyntax.JSXMemberExpression:var r=e;t=p(r.object)+"."+p(r.property)}return t}c.TokenName[100]="JSXIdentifier",c.TokenName[101]="JSXText";var f=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return i(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,r=!1,i=!1,a=!1;!this.scanner.eof()&&n&&!r;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(r=";"===s,t+=s,++this.scanner.index,!r)switch(t.length){case 2:i="#"===s;break;case 3:i&&(n=(a="x"===s)||o.Character.isDecimalDigit(s.charCodeAt(0)),i=i&&!a);break;default:n=(n=n&&!(i&&!o.Character.isDecimalDigit(s.charCodeAt(0))))&&!(a&&!o.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&r&&t.length>2){var l=t.substr(1,t.length-2);i&&l.length>1?t=String.fromCharCode(parseInt(l.substr(1),10)):a&&l.length>2?t=String.fromCharCode(parseInt("0"+l.substr(1),16)):i||a||!d.XHTMLEntities[l]||(t=d.XHTMLEntities[l])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:s=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],r="";!this.scanner.eof()&&(l=this.scanner.source[this.scanner.index++])!==n;)r+="&"===l?this.scanXHTMLEntity(n):l;return{type:8,value:r,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var i=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===i&&46===a?"...":".";return t=this.scanner.index,this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var l=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(l)&&92!==l)++this.scanner.index;else{if(45!==l)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,o.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var r={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new a.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(i,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=n;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new a.JSXNamespacedName(r,i))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new a.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new a.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(n,i,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new a.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new a.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;o=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(o),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],r=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:n});n=i.children,r=i.closing}return this.finalize(e,new a.JSXElement(t,n,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(u.Parser);t.JSXParser=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=function(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=i;var o=function(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXElement=o;var a=function(){this.type=r.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=a;var s=function(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=s;var l=function(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=l;var u=function(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=u;var c=function(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=c;var d=function(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=d;var p=function(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXOpeningElement=p;var f=function(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=f;var h=function(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(e){this.type=r.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=i;var o=function(e){this.type=r.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=o;var a=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.ArrowFunctionExpression=a;var s=function(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentExpression=s;var l=function(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=l;var u=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncArrowFunctionExpression=u;var c=function(e,t,n){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=c;var d=function(e,t,n){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=d;var p=function(e){this.type=r.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=p;var f=function(e,t,n){var i="||"===e||"&&"===e;this.type=i?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BinaryExpression=f;var h=function(e){this.type=r.Syntax.BlockStatement,this.body=e};t.BlockStatement=h;var m=function(e){this.type=r.Syntax.BreakStatement,this.label=e};t.BreakStatement=m;var g=function(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=g;var v=function(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=v;var y=function(e){this.type=r.Syntax.ClassBody,this.body=e};t.ClassBody=y;var _=function(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassDeclaration=_;var b=function(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=b;var x=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=x;var w=function(e,t,n){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ConditionalExpression=w;var S=function(e){this.type=r.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=S;var C=function(){this.type=r.Syntax.DebuggerStatement};t.DebuggerStatement=C;var T=function(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=T;var M=function(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=M;var D=function(){this.type=r.Syntax.EmptyStatement};t.EmptyStatement=D;var A=function(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=A;var P=function(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=P;var k=function(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=k;var L=function(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=L;var O=function(e){this.type=r.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=O;var E=function(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=E;var I=function(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=I;var N=function(e,t,n,i){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=i};t.ForStatement=N;var R=function(e,t,n,i){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.FunctionDeclaration=R;var B=function(e,t,n,i){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.FunctionExpression=B;var F=function(e){this.type=r.Syntax.Identifier,this.name=e};t.Identifier=F;var V=function(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.IfStatement=V;var U=function(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=U;var G=function(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=G;var z=function(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=z;var j=function(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=j;var Y=function(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=Y;var H=function(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t};t.Literal=H;var W=function(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=W;var $=function(e,t,n,i,o){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=i,this.static=o};t.MethodDefinition=$;var Z=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=Z;var K=function(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=K;var q=function(e){this.type=r.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=q;var X=function(e){this.type=r.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=X;var J=function(e,t,n,i,o,a){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=i,this.kind=e,this.method=o,this.shorthand=a};t.Property=J;var Q=function(e,t,n,i){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:i}};t.RegexLiteral=Q;var ee=function(e){this.type=r.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=r.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ne=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ne;var re=function(e){this.type=r.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=re;var ie=function(e){this.type=r.Syntax.SpreadElement,this.argument=e};t.SpreadElement=ie;var oe=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=oe;var ae=function(){this.type=r.Syntax.Super};t.Super=ae;var se=function(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=se;var le=function(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=le;var ue=function(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=ue;var ce=function(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=ce;var de=function(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=de;var pe=function(){this.type=r.Syntax.ThisExpression};t.ThisExpression=pe;var fe=function(e){this.type=r.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=fe;var he=function(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.TryStatement=he;var me=function(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=me;var ge=function(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.UpdateExpression=ge;var ve=function(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=ve;var ye=function(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=ye;var _e=function(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=_e;var be=function(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=be;var xe=function(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=xe},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(10),o=n(11),a=n(7),s=n(12),l=n(2),u=n(13),c=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(r,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(r,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(r,new a.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new a.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new a.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new a.AsyncFunctionExpression(null,r.params,i))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,o.Messages.StrictOctalLiteral);var r=this.getTokenRaw(n);e=this.finalize(t,new a.Literal(n.value,r));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new a.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===l.Syntax.Identifier&&e.name===t||e.type===l.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),r=this.lookahead,i=null,s=null,l=!1,u=!1,c=!1,d=!1;if(3===r.type){var p=r.value;this.nextToken(),l=this.match("["),i=(d=!(this.hasLineTerminator||"async"!==p||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new a.Identifier(p))}else this.match("*")?this.nextToken():(l=this.match("["),i=this.parseObjectPropertyKey());var f=this.qualifiedPropertyName(this.lookahead);if(3===r.type&&!d&&"get"===r.value&&f)t="get",l=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===r.type&&!d&&"set"===r.value&&f)t="set",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===r.type&&"*"===r.value&&f)t="init",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),u=!0;else if(i||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!d)!l&&this.isPropertyKey(i,"__proto__")&&(e.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=d?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),u=!0;else if(3===r.type)if(p=this.finalize(n,new a.Identifier(r.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var h=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(n,new a.AssignmentPattern(p,h))}else c=!0,s=p;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new a.Property(t,i,l,s,u,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new a.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new a.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:e.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case l.Syntax.ArrayExpression:e.type=l.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o")||this.expect("=>"),this.context.isBindingElement=!1,o=0;o")&&(e.type===l.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:"ArrowParameterPlaceHolder",params:[e],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===l.Syntax.SequenceExpression)for(o=0;o")){for(var l=0;l0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],o=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[o,n.value,s],u=[r];!((r=this.binaryPrecedence(this.lookahead))<=0);){for(;l.length>2&&r<=u[u.length-1];){s=l.pop();var c=l.pop();u.pop(),o=l.pop(),i.pop();var d=this.startNode(i[i.length-1]);l.push(this.finalize(d,new a.BinaryExpression(c,o,s)))}l.push(this.nextToken().value),u.push(r),i.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=l.length-1;t=l[p];for(var f=i.pop();p>1;){var h=i.pop(),m=f&&f.lineStart;d=this.startNode(h,m),c=l[p-1],t=this.finalize(d,new a.BinaryExpression(c,l[p-2],t)),p-=2,f=h}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.ConditionalExpression(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case l.Syntax.Identifier:this.validateParam(e,t,t.name);break;case l.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case l.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=e.async,s=this.reinterpretAsCoverFormalsList(e);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var u=this.context.strict,c=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var d=this.context.allowYield,p=this.context.await;this.context.allowYield=!0,this.context.await=i;var f=this.startNode(t);this.expect("=>");var h=void 0;if(this.match("{")){var m=this.context.allowIn;this.context.allowIn=!0,h=this.parseFunctionSourceElements(),this.context.allowIn=m}else h=this.isolateCoverGrammar(this.parseAssignmentExpression);var g=h.type!==l.Syntax.BlockStatement;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),e=i?this.finalize(f,new a.AsyncArrowFunctionExpression(s.params,h,g)):this.finalize(f,new a.ArrowFunctionExpression(s.params,h,g)),this.context.strict=u,this.context.allowStrictDirective=c,this.context.allowYield=d,this.context.await=p}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===l.Syntax.Identifier){var v=e;this.scanner.isRestrictedWord(v.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(v.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var y=(n=this.nextToken()).value,_=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.AssignmentExpression(y,e,_)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new a.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new a.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),r=this.parsePattern([],e);this.context.strict&&r.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(o.Messages.StrictVarName);var i=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&r.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),i=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new a.VariableDeclarator(r,i))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;r.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var i=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new a.VariableDeclaration(i,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e,t);return this.finalize(n,new a.RestElement(r))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(e,t));break}r.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new a.ArrayPattern(r))},e.prototype.parsePropertyPattern=function(e,t){var n,r,i=this.createNode(),o=!1,s=!1;if(3===this.lookahead.type){var l=this.lookahead;n=this.parseVariableIdentifier();var u=this.finalize(i,new a.Identifier(l.value));if(this.match("=")){e.push(l),s=!0,this.nextToken();var c=this.parseAssignmentExpression();r=this.finalize(this.startNode(l),new a.AssignmentPattern(u,c))}else this.match(":")?(this.expect(":"),r=this.parsePatternWithDefault(e,t)):(e.push(l),s=!0,r=u)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),r=this.parsePatternWithDefault(e,t);return this.finalize(i,new a.Property("init",n,o,r,!1,s))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new a.ObjectPattern(r))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,r=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,r=this.finalize(this.startNode(n),new a.AssignmentPattern(r,o))}return r},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new a.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictVarName);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===l.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new a.VariableDeclarator(n,r))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new a.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new a.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new a.IfStatement(r,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new a.DoWhileStatement(n,r))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=r}return this.finalize(t,new a.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,r=null,i=null,s=null,u=!0,c=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var d=this.context.allowIn;this.context.allowIn=!1;var p=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=d,1===p.length&&this.matchKeyword("in")){var f=p[0];f.init&&(f.id.type===l.Syntax.ArrayPattern||f.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new a.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,u=!1):(r=this.finalize(r,new a.VariableDeclaration(p,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var h=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(d=this.context.allowIn,this.context.allowIn=!1,p=this.parseBindingList(h,{inFor:!0}),this.context.allowIn=d,1===p.length&&null===p[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new a.VariableDeclaration(p,h)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(p,h)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,u=!1):(this.consumeSemicolon(),r=this.finalize(r,new a.VariableDeclaration(p,h)))):(r=this.finalize(r,new a.Identifier(h)),this.nextToken(),e=r,t=this.parseExpression(),r=null)}else{var m=this.lookahead;if(d=this.context.allowIn,this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=d,this.matchKeyword("in"))this.context.isAssignmentTarget&&r.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&r.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,u=!1;else{if(this.match(",")){for(var g=[r];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(m),new a.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(i=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(c,new a.ForStatement(r,i,s,n)):u?this.finalize(c,new a.ForInStatement(e,t,n)):this.finalize(c,new a.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(o.Messages.IllegalContinue),this.finalize(e,new a.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(o.Messages.IllegalBreak),this.finalize(e,new a.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new a.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new a.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],i=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(i&&this.throwError(o.Messages.MultipleDefaultsInSwitch),i=!0),r.push(s)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new a.SwitchStatement(t,r))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var r=n,i="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(o.Messages.Redeclaration,"Label",r.name),this.context.labelSet[i]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var u=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(u,o.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(u,o.Messages.GeneratorInLegacyContext),s=c}else s=this.parseStatement();delete this.context.labelSet[i],e=new a.LabeledStatement(r,s)}else this.consumeSemicolon(),e=new a.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),r={},i=0;i0&&this.tolerateError(o.Messages.BadGetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(o.Messages.BadSetterArity):n.params[0]instanceof a.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(e,new a.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),r="",i=null,s=null,l=!1,u=!1,c=!1,d=!1;if(this.match("*"))this.nextToken();else if(l=this.match("["),"static"===(i=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,l=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var p=this.lookahead.value;":"!==p&&"("!==p&&"*"!==p&&(d=!0,t=this.lookahead,i=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,o.Messages.ConstructorIsAsync))}var f=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&f?(r="get",l=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===t.value&&f&&(r="set",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===t.type&&"*"===t.value&&f&&(r="init",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),u=!0),!r&&i&&this.match("(")&&(r="init",s=d?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),u=!0),r||this.throwUnexpectedToken(this.lookahead),"init"===r&&(r="method"),l||(c&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(t,o.Messages.StaticPrototype),!c&&this.isPropertyKey(i,"constructor")&&(("method"!==r||!u||s&&s.generator)&&this.throwUnexpectedToken(t,o.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,o.Messages.DuplicateConstructor):e.value=!0,r="constructor")),this.finalize(n,new a.MethodDefinition(i,l,s,r,c))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new a.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(t,new a.ClassDeclaration(r,i,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new a.ClassExpression(n,r,i))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(o.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new a.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new a.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new a.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new a.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new a.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new a.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new a.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new a.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new a.ExportAllDeclaration(i))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null));else{var s=[],l=null,u=!1;for(this.expect("{");!this.match("}");)u=u||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),l=this.parseModuleSpecifier(),this.consumeSemicolon()):u?(r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause,this.throwError(r,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new a.ExportNamedDeclaration(null,s,l))}return e},e}();t.Parser=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,r){var i="Line "+t+": "+r,o=this.constructError(i,n);return o.index=e,o.lineNumber=t,o.description=r,o},e.prototype.throwError=function(e,t,n,r){throw this.createError(e,t,n,r)},e.prototype.tolerateError=function(e,t,n,r){var i=this.createError(e,t,n,r);if(!this.tolerant)throw i;this.recordError(i)},e}();t.ErrorHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(4),o=n(11);function a(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function s(e){return"01234567".indexOf(e)}var l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,r=[];for(this.trackComment&&(r=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,i.Character.isLineTerminator(o)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};r.push(a)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,r}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},r.push(a)),r},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(i.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(o)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(o)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(i.Character.isWhiteSpace(n))++this.index;else if(i.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2,r=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,r=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(r))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,r=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,r=0;r1114111||"}"!==e)&&this.throwUnexpectedToken(),i.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!i.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=i.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),i.Character.isIdentifierPart(t));)n+=e=i.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=s(e);return!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+s(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+s(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var r=this.index;this.index=t,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&i.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),i.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(i.Character.isIdentifierStart(t)||i.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(i.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(i.Character.isIdentifierStart(this.source.charCodeAt(this.index))||i.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var i=parseInt(t||n,16);return i>1114111&&r.throwUnexpectedToken(o.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(n)}catch(e){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];r.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,a=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],i.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t+=e;else if(i.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){a=!0;break}"["===e&&(n=!0)}return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!i.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,r=this.scanHexEscape("u");if(null!==r)for(e+=r;n=55296&&e<57343&&i.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),i=n(12),o=n(13),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(r=this.values[this.curly-4])&&!this.beforeFunctionExpression(r);else if("function"===this.values[this.curly-4]){var r;t=!(r=this.values[this.curly-5])||!this.beforeFunctionExpression(r)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new i.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t0?e.charCodeAt(o-1):null,f=f&&v(a,s)}else{for(o=0;or&&" "!==e[p+1],p=o);else if(!g(a))return 5;s=o>0?e.charCodeAt(o-1):null,f=f&&v(a,s)}c=c||d&&o-p-1>r&&" "!==e[p+1]}return u||c?n>9&&y(e)?5:c?4:3:f&&!i(e)?1:2}function b(e,t,n,r){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==c.indexOf(t))return"'"+t+"'";var o=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=r||e.flowLevel>-1&&n>=e.flowLevel;switch(_(t,s,e.indent,a,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+x(t,e.indent)+w(f(function(e,t){for(var n,r,i,o=/(\n+)([^\n]*)/g,a=(i=-1!==(i=e.indexOf("\n"))?i:e.length,o.lastIndex=i,S(e.slice(0,i),t)),s="\n"===e[0]||" "===e[0];r=o.exec(e);){var l=r[1],u=r[2];n=" "===u[0],a+=l+(s||n||""===u?"":"\n")+S(u,t),s=n}return a}(t,a),o));case 5:return'"'+function(e){for(var t,n,r,i="",o=0;o=55296&&t<=56319&&(n=e.charCodeAt(o+1))>=56320&&n<=57343?(i+=d(1024*(t-55296)+n-56320+65536),o++):i+=!(r=u[t])&&g(t)?e[o]:r||d(t);return i}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function x(e,t){var n=y(e)?String(t):"",r="\n"===e[e.length-1];return n+(!r||"\n"!==e[e.length-2]&&"\n"!==e?r?"":"-":"+")+"\n"}function w(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function S(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,l="";n=i.exec(e);)(s=n.index)-o>t&&(r=a>o?a:s,l+="\n"+e.slice(o,r),o=r+1),a=s;return l+="\n",e.length-o>t&&a>o?l+=e.slice(o,a)+"\n"+e.slice(a+1):l+=e.slice(o),l.slice(1)}function C(e,t,n){var r,o,a,u,c,d;for(a=0,u=(o=n?e.explicitTypes:e.implicitTypes).length;a tag resolver accepts not "'+d+'" style');r=c.represent[d](t,d)}e.dump=r}return!0}return!1}function T(e,t,n,r,o,a){e.tag=null,e.dump=n,C(e,n,!1)||C(e,n,!0);var l=s.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var u,c,d="[object Object]"===l||"[object Array]"===l;if(d&&(c=-1!==(u=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(o=!1),c&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(d&&c&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===l)r&&0!==Object.keys(e.dump).length?(function(e,t,n,r){var o,a,s,l,u,c,d="",p=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,a=f.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,u&&(c+=h(e,t)),T(e,t+1,l,!0,u)&&(e.dump&&10===e.dump.charCodeAt(0)?c+=":":c+=": ",d+=c+=e.dump));e.tag=p,e.dump=d||"{}"}(e,t,e.dump,o),c&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var r,i,o,a,s,l="",u=e.tag,c=Object.keys(n);for(r=0,i=c.length;r1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),T(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=u,e.dump="{"+l+"}"}(e,t,e.dump),c&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===l){var p=e.noArrayIndent&&t>0?t-1:t;r&&0!==e.dump.length?(function(e,t,n,r){var i,o,a="",s=e.tag;for(i=0,o=n.length;i "+e.dump)}return!0}function M(e,t){var n,r,i=[],o=[];for(function e(t,n,r){var i,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(91),l=n(1),u=n(183),c=n(0),d=n(7),p=n(95),f=n(69),h=n(3),m=n(305),g=n(306),v=n(307),y=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return r._hasDeclaration=!1,r._docTypeName="",r._hasDocumentElement=!1,r._currentElementSerialized=!1,r._openTags=[],r._ended=!1,r._fragment=n,r._options=l.applyDefaults(t||{},s.DefaultXMLBuilderCBOptions),r._builderOptions={defaultNamespace:r._options.defaultNamespace,namespaceAlias:r._options.namespaceAlias},"json"===r._options.format?r._writer=new g.JSONCBWriter(r._options):"yaml"===r._options.format?r._writer=new v.YAMLCBWriter(r._options):r._writer=new m.XMLCBWriter(r._options),void 0!==r._options.data&&r.on("data",r._options.data),void 0!==r._options.end&&r.on("end",r._options.end),void 0!==r._options.error&&r.on("error",r._options.error),r._prefixMap=new p.NamespacePrefixMap,r._prefixMap.set("xml",d.namespace.XML),r._prefixIndex={value:1},r._push(r._writer.frontMatter()),r}return i(t,e),t.prototype.ele=function(e,t,n){var r,i;if(l.isObject(e)||l.isString(e)&&(/^\s*/g,">");return this._push(this._writer.text(n)),this},t.prototype.ins=function(e,t){var n;void 0===t&&(t=""),this._serializeOpenTag(!0);try{n=u.fragment(this._builderOptions).ins(e,t).first().node}catch(e){return this.emit("error",e),this}return this._options.wellFormed&&(-1!==n.target.indexOf(":")||/^xml$/i.test(n.target))?(this.emit("error",new Error("Processing instruction target contains invalid characters (well-formed required).")),this):this._options.wellFormed&&!c.xml_isLegalChar(n.data)?(this.emit("error",Error("Processing instruction data contains invalid characters (well-formed required).")),this):(this._push(this._writer.instruction(n.target,n.data)),this)},t.prototype.dat=function(e){var t;this._serializeOpenTag(!0);try{t=u.fragment(this._builderOptions).dat(e).first().node}catch(e){return this.emit("error",e),this}return this._push(this._writer.cdata(t.data)),this},t.prototype.dec=function(e){return void 0===e&&(e={version:"1.0"}),this._fragment?(this.emit("error",Error("Cannot insert an XML declaration into a document fragment.")),this):this._hasDeclaration?(this.emit("error",Error("XML declaration is already inserted.")),this):(this._push(this._writer.declaration(e.version||"1.0",e.encoding,e.standalone)),this._hasDeclaration=!0,this)},t.prototype.dtd=function(e){if(this._fragment)return this.emit("error",Error("Cannot insert a DocType declaration into a document fragment.")),this;if(""!==this._docTypeName)return this.emit("error",new Error("DocType declaration is already inserted.")),this;if(this._hasDocumentElement)return this.emit("error",new Error("Cannot insert DocType declaration after document element.")),this;var t;try{t=u.create().dtd(e).first().node}catch(e){return this.emit("error",e),this}return this._options.wellFormed&&!c.xml_isPubidChar(t.publicId)?(this.emit("error",new Error("DocType public identifier does not match PubidChar construct (well-formed required).")),this):this._options.wellFormed&&(!c.xml_isLegalChar(t.systemId)||-1!==t.systemId.indexOf('"')&&-1!==t.systemId.indexOf("'"))?(this.emit("error",new Error("DocType system identifier contains invalid characters (well-formed required).")),this):(this._docTypeName=e.name,this._push(this._writer.docType(e.name,t.publicId,t.systemId)),this)},t.prototype.import=function(e){var t,n,r=u.fragment().set(this._options);try{r.import(e)}catch(e){return this.emit("error",e),this}try{for(var i=o(r.node.childNodes),a=i.next();!a.done;a=i.next()){var s=a.value;this._fromNode(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},t.prototype.up=function(){return this._serializeOpenTag(!1),this._serializeCloseTag(),this},t.prototype.end=function(){for(this._serializeOpenTag(!1);this._openTags.length>0;)this._serializeCloseTag();return this._push(null),this},t.prototype._serializeOpenTag=function(e){if(!this._currentElementSerialized&&void 0!==this._currentElement){var n=this._currentElement.node;if(!this._options.wellFormed||-1===n.localName.indexOf(":")&&c.xml_isName(n.localName)){var r="",i=!1,o=this._prefixMap.copy(),a={},s=this._recordNamespaceInformation(n,o,a),l=0===this._openTags.length?null:this._openTags[this._openTags.length-1][1],u=n.namespaceURI;if(null===u&&(u=l),l===u)null!==s&&(i=!0),r=u===d.namespace.XML?"xml:"+n.localName:n.localName,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r));else{var p=n.prefix,f=null;if(null===p&&u===s||(f=o.get(p,u)),"xmlns"===p){if(this._options.wellFormed)return void this.emit("error",new Error("An element cannot have the 'xmlns' prefix (well-formed required)."));f=p}null!==f?(r=f+":"+n.localName,null!==s&&s!==d.namespace.XML&&(l=s||null),this._writer.beginElement(r),this._push(this._writer.openTagBegin(r))):null!==p?(p in a&&(p=this._generatePrefix(u,o,this._prefixIndex)),o.set(p,u),r+=p+":"+n.localName,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r)),this._push(this._writer.attribute("xmlns:"+p,this._serializeAttributeValue(u,this._options.wellFormed))),null!==s&&(l=s||null)):null===s||null!==s&&s!==u?(i=!0,r+=n.localName,l=u,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r)),this._push(this._writer.attribute("xmlns",this._serializeAttributeValue(u,this._options.wellFormed)))):(r+=n.localName,l=u,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r)))}this._serializeAttributes(n,o,this._prefixIndex,a,i,this._options.wellFormed);var h=u===d.namespace.HTML;h&&!e&&t._VoidElementNames.has(n.localName)?(this._push(this._writer.openTagEnd(r,!0,!0)),this._writer.endElement(r)):h||e?this._push(this._writer.openTagEnd(r,!1,!1)):(this._push(this._writer.openTagEnd(r,!0,!1)),this._writer.endElement(r)),this._currentElementSerialized=!0,this._openTags.push([r,l,this._prefixMap,e]),this._isPrefixMapModified(this._prefixMap,o)&&(this._prefixMap=o),this._writer.level++}else this.emit("error",new Error("Node local name contains invalid characters (well-formed required)."))}},t.prototype._serializeCloseTag=function(){this._writer.level--;var e=this._openTags.pop();if(void 0!==e){var t=a(e,4),n=t[0],r=(t[1],t[2]),i=t[3];this._prefixMap=r,i&&(this._push(this._writer.closeTag(n)),this._writer.endElement(n))}else this.emit("error",new Error("Last element is undefined."))},t.prototype._push=function(e){null===e?(this._ended=!0,this.emit("end")):this._ended?this.emit("error",new Error("Cannot push to ended stream.")):0!==e.length&&(this._writer.hasData=!0,this.emit("data",e,this._writer.level))},t.prototype._fromNode=function(e){var t,n,r,i;if(h.Guard.isElementNode(e)){var a=e.prefix?e.prefix+":"+e.localName:e.localName;null!==e.namespaceURI?this.ele(e.namespaceURI,a):this.ele(a);try{for(var s=o(e.attributes),l=s.next();!l.done;l=s.next()){var u=l.value,c=u.prefix?u.prefix+":"+u.localName:u.localName;null!==u.namespaceURI?this.att(u.namespaceURI,c,u.value):this.att(c,u.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}try{for(var d=o(e.childNodes),p=d.next();!p.done;p=d.next()){var f=p.value;this._fromNode(f)}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}this.up()}else h.Guard.isExclusiveTextNode(e)&&e.data?this.txt(e.data):h.Guard.isCommentNode(e)?this.com(e.data):h.Guard.isCDATASectionNode(e)?this.dat(e.data):h.Guard.isProcessingInstructionNode(e)&&this.ins(e.target,e.data)},t.prototype._serializeAttributes=function(e,t,n,r,i,a){var s,l,u=a?new f.LocalNameSet:void 0;try{for(var p=o(e.attributes),h=p.next();!h.done;h=p.next()){var m=h.value;if(a||i||null!==m.namespaceURI){if(a&&u&&u.has(m.namespaceURI,m.localName))return void this.emit("error",new Error("Element contains duplicate attributes (well-formed required)."));a&&u&&u.set(m.namespaceURI,m.localName);var g=m.namespaceURI,v=null;if(null!==g)if(v=t.get(m.prefix,g),g===d.namespace.XMLNS){if(m.value===d.namespace.XML||null===m.prefix&&i||null!==m.prefix&&(!(m.localName in r)||r[m.localName]!==m.value)&&t.has(m.localName,m.value))continue;if(a&&m.value===d.namespace.XMLNS)return void this.emit("error",new Error("XMLNS namespace is reserved (well-formed required)."));if(a&&""===m.value)return void this.emit("error",new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required)."));"xmlns"===m.prefix&&(v="xmlns")}else null===v&&(v=null===m.prefix||t.hasPrefix(m.prefix)&&!t.has(m.prefix,g)?this._generatePrefix(g,t,n):m.prefix,this._push(this._writer.attribute("xmlns:"+v,this._serializeAttributeValue(g,this._options.wellFormed))));if(a&&(-1!==m.localName.indexOf(":")||!c.xml_isName(m.localName)||"xmlns"===m.localName&&null===g))return void this.emit("error",new Error("Attribute local name contains invalid characters (well-formed required)."));this._push(this._writer.attribute((null!==v?v+":":"")+m.localName,this._serializeAttributeValue(m.value,this._options.wellFormed)))}else this._push(this._writer.attribute(m.localName,this._serializeAttributeValue(m.value,this._options.wellFormed)))}}catch(e){s={error:e}}finally{try{h&&!h.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}},t.prototype._serializeAttributeValue=function(e,t){return t&&null!==e&&!c.xml_isLegalChar(e)?(this.emit("error",new Error("Invalid characters in attribute value.")),""):null===e?"":e.replace(/(?!&(lt|gt|amp|apos|quot);)&/g,"&").replace(//g,">").replace(/"/g,""")},t.prototype._recordNamespaceInformation=function(e,t,n){var r,i,a=null;try{for(var s=o(e.attributes),l=s.next();!l.done;l=s.next()){var u=l.value,c=u.namespaceURI,p=u.prefix;if(c===d.namespace.XMLNS){if(null===p){a=u.value;continue}var f=u.localName,h=u.value;if(h===d.namespace.XML)continue;if(""===h&&(h=null),t.has(f,h))continue;t.set(f,h),n[f]=h||""}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a},t.prototype._generatePrefix=function(e,t,n){var r="ns"+n.value;return n.value++,t.set(r,e),r},t.prototype._isPrefixMapModified=function(e,t){var n=e._items,r=t._items,i=e._nullItems,o=t._nullItems;for(var a in r){var s=n[a];if(void 0===s)return!0;var l=r[a];if(s.length!==l.length)return!0;for(var u=0;u"},t.prototype.docType=function(e,t,n){return this._beginLine()+(t&&n?"':t?"':n?"':"")},t.prototype.comment=function(e){return this._beginLine()+"\x3c!--"+e+"--\x3e"},t.prototype.text=function(e){return this._beginLine()+e},t.prototype.instruction=function(e,t){return t?this._beginLine()+"":this._beginLine()+""},t.prototype.cdata=function(e){return this._beginLine()+""},t.prototype.openTagBegin=function(e){return this._lineLength+=1+e.length,this._beginLine()+"<"+e},t.prototype.openTagEnd=function(e,t,n){return n?" />":t?this._writerOptions.allowEmptyTags?">":this._writerOptions.spaceBeforeSlash?" />":"/>":">"},t.prototype.closeTag=function(e){return this._beginLine()+""},t.prototype.attribute=function(e,t){var n=e+'="'+t+'"';return this._writerOptions.prettyPrint&&this._writerOptions.width>0&&this._lineLength+1+n.length>this._writerOptions.width?(n=this._beginLine()+this._indent(1)+n,this._lineLength=n.length,n):(this._lineLength+=1+n.length," "+n)},t.prototype.beginElement=function(e){},t.prototype.endElement=function(e){},t.prototype._beginLine=function(){if(this._writerOptions.prettyPrint){var e=(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level);return this._lineLength=e.length,e}return""},t.prototype._indent=function(e){return e<=0?"":this._writerOptions.indent.repeat(e)},t}(n(114).BaseCBWriter);t.XMLCBWriter=o},function(e,t,n){"use strict";n(74);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n._hasChildren=[],n._additionalLevel=0,n}return i(t,e),t.prototype.frontMatter=function(){return""},t.prototype.declaration=function(e,t,n){return""},t.prototype.docType=function(e,t,n){return""},t.prototype.comment=function(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.comment)+this._sep()+this._val(e)+this._sep()+"}"},t.prototype.text=function(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.text)+this._sep()+this._val(e)+this._sep()+"}"},t.prototype.instruction=function(e,t){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.ins)+this._sep()+this._val(t?e+" "+t:e)+this._sep()+"}"},t.prototype.cdata=function(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.cdata)+this._sep()+this._val(e)+this._sep()+"}"},t.prototype.attribute=function(e,t){return this._comma()+this._beginLine(1)+"{"+this._sep()+this._key(this._builderOptions.convert.att+e)+this._sep()+this._val(t)+this._sep()+"}"},t.prototype.openTagBegin=function(e){var t=this._comma()+this._beginLine()+"{"+this._sep()+this._key(e)+this._sep()+"{";return this._additionalLevel++,this.hasData=!0,t+=this._beginLine()+this._key(this._builderOptions.convert.text)+this._sep()+"[",this._hasChildren.push(!1),t},t.prototype.openTagEnd=function(e,t,n){if(t){var r=this._sep()+"]";return this._additionalLevel--,r+(this._beginLine()+"}")+this._sep()+"}"}return""},t.prototype.closeTag=function(e){var t=this._beginLine()+"]";return this._additionalLevel--,t+(this._beginLine()+"}")+this._sep()+"}"},t.prototype.beginElement=function(e){},t.prototype.endElement=function(e){this._hasChildren.pop()},t.prototype._beginLine=function(e){return void 0===e&&(e=0),this._writerOptions.prettyPrint?(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level+e):""},t.prototype._indent=function(e){return e+this._additionalLevel<=0?"":this._writerOptions.indent.repeat(e+this._additionalLevel)},t.prototype._comma=function(){var e=this._hasChildren[this._hasChildren.length-1]?",":"";return this._hasChildren.length>0&&(this._hasChildren[this._hasChildren.length-1]=!0),e},t.prototype._sep=function(){return this._writerOptions.prettyPrint?" ":""},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t}(n(114).BaseCBWriter);t.JSONCBWriter=o},function(e,t,n){"use strict";n(74);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;if(n._rootWritten=!1,n._additionalLevel=0,t.indent.length<2)throw new Error("YAML indententation string must be at least two characters long.");if(t.offset<0)throw new Error("YAML offset should be zero or a positive number.");return n}return i(t,e),t.prototype.frontMatter=function(){return this._beginLine()+"---"},t.prototype.declaration=function(e,t,n){return""},t.prototype.docType=function(e,t,n){return""},t.prototype.comment=function(e){return this._beginLine()+this._key(this._builderOptions.convert.comment)+" "+this._val(e)},t.prototype.text=function(e){return this._beginLine()+this._key(this._builderOptions.convert.text)+" "+this._val(e)},t.prototype.instruction=function(e,t){return this._beginLine()+this._key(this._builderOptions.convert.ins)+" "+this._val(t?e+" "+t:e)},t.prototype.cdata=function(e){return this._beginLine()+this._key(this._builderOptions.convert.cdata)+" "+this._val(e)},t.prototype.attribute=function(e,t){this._additionalLevel++;var n=this._beginLine()+this._key(this._builderOptions.convert.att+e)+" "+this._val(t);return this._additionalLevel--,n},t.prototype.openTagBegin=function(e){var t=this._beginLine()+this._key(e);return this._rootWritten||(this._rootWritten=!0),this.hasData=!0,this._additionalLevel++,t+(this._beginLine(!0)+this._key(this._builderOptions.convert.text))},t.prototype.openTagEnd=function(e,t,n){return t?" "+this._val(""):""},t.prototype.closeTag=function(e){return this._additionalLevel--,""},t.prototype.beginElement=function(e){},t.prototype.endElement=function(e){},t.prototype._beginLine=function(e){return void 0===e&&(e=!1),(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level,e)},t.prototype._indent=function(e,t){if(e+this._additionalLevel<=0)return"";var n=this._writerOptions.indent.repeat(e+this._additionalLevel);return!t&&this._rootWritten?n.substr(0,n.length-2)+"-"+n.substr(-1,1):n},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t}(n(114).BaseCBWriter);t.YAMLCBWriter=o},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,o,a,s;if(u(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=p.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var u=l.length,c=g(l,u);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(77);t.createCB=function(e){return new r.XMLBuilderCBImpl(e)},t.fragmentCB=function(e){return new r.XMLBuilderCBImpl(e,!0)}}])},function(e,t,n){"use strict";n.d(t,{ZP:function(){return r.m}});n(97),n(23),n(355);var r=n(0)},,,,,function(e,t,n){"use strict";var r=n(401),i=n.n(r),o=n(384),a=n.n(o),s=n(58);t.Z=function(e,t){if(t){var n=new(i())(t);return Promise.resolve({webworkerPromise:n,worker:t})}var r="".concat(s.Z.itkModulesPath,"/WebWorkers/").concat(e,".worker.js");if(r.startsWith("http"))return a().get(r,{responseType:"blob"}).then((function(e){var t=new window.Worker(URL.createObjectURL(e.data));return{webworkerPromise:new(i())(t),worker:t}}));var o=new window.Worker(r),l=new(i())(o);return Promise.resolve({webworkerPromise:l,worker:o})}},,function(e){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e){"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t=0&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=t},function(e,t,n){"use strict";var r,i=(r=n(490))&&"object"==typeof r&&"default"in r?r.default:r;function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t1&&void 0!==arguments[1]&&arguments[1],n=e.to,r=e.from;if(n&&(r||!1!==t)&&this.transports[n])if(t)this.transports[n]=[];else{var i=this.$_getTransportIndex(e);if(i>=0){var o=this.transports[n].slice(0);o.splice(i,1),this.transports[n]=o}}},registerTarget:function(e,t,n){s&&(this.trackInstances&&!n&&this.targets[e]&&console.warn("[portal-vue]: Target ".concat(e," already exists")),this.$set(this.targets,e,Object.freeze([t])))},unregisterTarget:function(e){this.$delete(this.targets,e)},registerSource:function(e,t,n){s&&(this.trackInstances&&!n&&this.sources[e]&&console.warn("[portal-vue]: source ".concat(e," already exists")),this.$set(this.sources,e,Object.freeze([t])))},unregisterSource:function(e){this.$delete(this.sources,e)},hasTarget:function(e){return!(!this.targets[e]||!this.targets[e][0])},hasSource:function(e){return!(!this.sources[e]||!this.sources[e][0])},hasContentFor:function(e){return!!this.transports[e]&&!!this.transports[e].length},$_getTransportIndex:function(e){var t=e.to,n=e.from;for(var r in this.transports[t])if(this.transports[t][r].from===n)return+r;return-1}}}),f=new p(u),h=1,m=i.extend({name:"portal",props:{disabled:{type:Boolean},name:{type:String,default:function(){return String(h++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}}},created:function(){var e=this;this.$nextTick((function(){f.registerSource(e.name,e)}))},mounted:function(){this.disabled||this.sendUpdate()},updated:function(){this.disabled?this.clear():this.sendUpdate()},beforeDestroy:function(){f.unregisterSource(this.name),this.clear()},watch:{to:function(e,t){t&&t!==e&&this.clear(t),this.sendUpdate()}},methods:{clear:function(e){var t={from:this.name,to:e||this.to};f.close(t)},normalizeSlots:function(){return this.$scopedSlots.default?[this.$scopedSlots.default]:this.$slots.default},normalizeOwnChildren:function(e){return"function"==typeof e?e(this.slotProps):e},sendUpdate:function(){var e=this.normalizeSlots();if(e){var t={from:this.name,to:this.to,passengers:a(e),order:this.order};f.open(t)}else this.clear()}},render:function(e){var t=this.$slots.default||this.$scopedSlots.default||[],n=this.tag;return t&&this.disabled?t.length<=1&&this.slim?this.normalizeOwnChildren(t)[0]:e(n,[this.normalizeOwnChildren(t)]):this.slim?e():e(n,{class:{"v-portal":!0},style:{display:"none"},key:"v-portal-placeholder"})}}),g=i.extend({name:"portalTarget",props:{multiple:{type:Boolean,default:!1},name:{type:String,required:!0},slim:{type:Boolean,default:!1},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},data:function(){return{transports:f.transports,firstRender:!0}},created:function(){var e=this;this.$nextTick((function(){f.registerTarget(e.name,e)}))},watch:{ownTransports:function(){this.$emit("change",this.children().length>0)},name:function(e,t){f.unregisterTarget(t),f.registerTarget(e,this)}},mounted:function(){var e=this;this.transition&&this.$nextTick((function(){e.firstRender=!1}))},beforeDestroy:function(){f.unregisterTarget(this.name)},computed:{ownTransports:function(){var e=this.transports[this.name]||[];return this.multiple?e:0===e.length?[]:[e[e.length-1]]},passengers:function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.reduce((function(e,n){var r=n.passengers[0],i="function"==typeof r?r(t):n.passengers;return e.concat(i)}),[])}(this.ownTransports,this.slotProps)}},methods:{children:function(){return 0!==this.passengers.length?this.passengers:this.$scopedSlots.default?this.$scopedSlots.default(this.slotProps):this.$slots.default||[]},noWrapper:function(){var e=this.slim&&!this.transition;return e&&this.children().length>1&&console.warn("[portal-vue]: PortalTarget with `slim` option received more than one child element."),e}},render:function(e){var t=this.noWrapper(),n=this.children(),r=this.transition||this.tag;return t?n[0]:this.slim&&!r?e():e(r,{props:{tag:this.transition&&this.tag?this.tag:void 0},class:{"vue-portal-target":!0}},n)}}),v=0,y=["disabled","name","order","slim","slotProps","tag","to"],_=["multiple","transition"],b=i.extend({name:"MountingPortal",inheritAttrs:!1,props:{append:{type:[Boolean,String]},bail:{type:Boolean},mountTo:{type:String,required:!0},disabled:{type:Boolean},name:{type:String,default:function(){return"mounted_"+String(v++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}},multiple:{type:Boolean,default:!1},targetSlim:{type:Boolean},targetSlotProps:{type:Object,default:function(){return{}}},targetTag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},created:function(){if("undefined"!=typeof document){var e=document.querySelector(this.mountTo);if(e){var t=this.$props;if(f.targets[t.name])t.bail?console.warn("[portal-vue]: Target ".concat(t.name," is already mounted.\n Aborting because 'bail: true' is set")):this.portalTarget=f.targets[t.name];else{var n=t.append;if(n){var r="string"==typeof n?n:"DIV",i=document.createElement(r);e.appendChild(i),e=i}var o=l(this.$props,_);o.slim=this.targetSlim,o.tag=this.targetTag,o.slotProps=this.targetSlotProps,o.name=this.to,this.portalTarget=new g({el:e,parent:this.$parent||this,propsData:o})}}else console.error("[portal-vue]: Mount Point '".concat(this.mountTo,"' not found in document"))}},beforeDestroy:function(){var e=this.portalTarget;if(this.append){var t=e.$el;t.parentNode.removeChild(t)}e.$destroy()},render:function(e){if(!this.portalTarget)return console.warn("[portal-vue] Target wasn't mounted"),e();if(!this.$scopedSlots.manual){var t=l(this.$props,y);return e(m,{props:t,attrs:this.$attrs,on:this.$listeners,scopedSlots:this.$scopedSlots},this.$slots.default)}var n=this.$scopedSlots.manual({to:this.to});return Array.isArray(n)&&(n=n[0]),n||e()}});var x={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(t.portalName||"Portal",m),e.component(t.portalTargetName||"PortalTarget",g),e.component(t.MountingPortalName||"MountingPortal",b)}};t.ZP=x,t.h_=m,t.YC=g},function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s=0&&"[object Function]"===t.call(e.callee)),r}},function(e,t,n){"use strict";var r=n(52);e.exports=function(){return"object"==typeof n.g&&n.g&&n.g.Math===Math&&n.g.Array===Array?n.g:r}},function(e,t,n){"use strict";n.d(t,{a:function(){return c},Z:function(){return p}});let r=1,i=0;const o=["VTK_RESOLVE_OFF","VTK_RESOLVE_POLYGON_OFFSET"];function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;i=e}var s={getResolveCoincidentTopologyAsString:function(){return o[i]},getResolveCoincidentTopologyPolygonOffsetFaces:function(){return r},getResolveCoincidentTopology:function(){return i},setResolveCoincidentTopology:a,setResolveCoincidentTopologyPolygonOffsetFaces:function(e){r=e},setResolveCoincidentTopologyToDefault:function(){a(0)},setResolveCoincidentTopologyToOff:function(){a(0)},setResolveCoincidentTopologyToPolygonOffset:function(){a(1)}},l=n(0);function u(e,t,n){n.forEach((n=>{e[`get${n.method}`]=()=>t[n.key],e[`set${n.method}`]=(e,r)=>{t[n.key]={factor:e,offset:r}}}))}const c=["Polygon","Line","Point"],d={};u(d,{Polygon:{factor:2,offset:0},Line:{factor:1,offset:-1},Point:{factor:0,offset:-2}},c.map((e=>({key:e,method:`ResolveCoincidentTopology${e}OffsetParameters`}))));var p={implementCoincidentTopologyMethods:function(e,t){void 0===t.resolveCoincidentTopology&&(t.resolveCoincidentTopology=!1),l.m.setGet(e,t,["resolveCoincidentTopology"]),t.topologyOffset={Polygon:{factor:0,offset:0},Line:{factor:0,offset:0},Point:{factor:0,offset:0}},Object.keys(s).forEach((t=>{e[t]=s[t]})),Object.keys(d).forEach((t=>{e[t]=d[t]})),u(e,t.topologyOffset,c.map((e=>({key:e,method:`RelativeCoincidentTopology${e}OffsetParameters`})))),e.getCoincidentTopologyPolygonOffsetParameters=()=>{const t=d.getResolveCoincidentTopologyPolygonOffsetParameters(),n=e.getRelativeCoincidentTopologyPolygonOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyLineOffsetParameters=()=>{const t=d.getResolveCoincidentTopologyLineOffsetParameters(),n=e.getRelativeCoincidentTopologyLineOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyPointOffsetParameter=()=>{const t=d.getResolveCoincidentTopologyPointOffsetParameters(),n=e.getRelativeCoincidentTopologyPointOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}}},staticOffsetAPI:d,otherStaticMethods:s,CATEGORIES:c}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return M}});var r=n(0),i=n(6),o=n(366);function a(e,t){t.classHierarchy.push("vtkWebGPUPipeline"),e.getShaderDescriptions=()=>t.shaderDescriptions,e.initialize=(e,n)=>{t.pipelineDescription=t.renderEncoder.getPipelineSettings(),t.pipelineDescription.primitive.topology=t.topology,t.pipelineDescription.vertex=t.vertexState,t.pipelineDescription.label=n;const r=[];for(let e=0;e{for(let n=0;n{e&&t.layouts.push({layout:e.getBindGroupLayout(t.device),label:e.getLabel()})},e.getBindGroupLayout=e=>t.layouts[e].layout,e.getBindGroupLayoutCount=e=>{for(let n=0;n{t.bindBuffers(e)}}const s={handle:null,layouts:null,renderEncoder:null,shaderDescriptions:null,vertexState:null,topology:null,pipelineDescription:null};function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),(0,r.o)(e,t),t.layouts=[],t.shaderDescriptions=[],(0,r.g)(e,t,["handle","pipelineDescription"]),(0,r.e)(e,t,["device","renderEncoder","topology","vertexState"]),a(e,t)}var u={newInstance:(0,r.n)(l,"vtkWebGPUPipeline"),extend:l},c=n(18);function d(e,t){t.classHierarchy.push("vtkWebGPUShaderDescription"),e.hasOutput=e=>t.outputNames.includes(e),e.addOutput=function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;t.outputTypes.push(e),t.outputNames.push(n),t.outputInterpolations.push(r)},e.addBuiltinOutput=(e,n)=>{t.builtinOutputTypes.push(e),t.builtinOutputNames.push(n)},e.addBuiltinInput=(e,n)=>{t.builtinInputTypes.push(e),t.builtinInputNames.push(n)},e.replaceShaderCode=(e,n)=>{const r=[];let i=[];if(n&&r.push(n.getShaderCode()),e||t.builtinInputNames.length){const n=[];if(n.push(`struct ${t.type}Input\n{`),e){const t=e.getOutputNamesByReference(),r=e.getOutputTypesByReference(),i=e.getOutputInterpolationsByReference();for(let e=0;e1&&(n.push("};"),i=n,r[r.length-1]+=",",r.push(`input: ${t.type}Input`))}if(r.length&&(t.code=c.ZP.substitute(t.code,"//VTK::IOStructs::Input",r).result),t.outputNames.length+t.builtinOutputNames.length){const e=[`struct ${t.type}Output\n{`];for(let n=0;n ${t.type}Output`]).result}t.code=c.ZP.substitute(t.code,"//VTK::IOStructs::Dec",i).result}}const p={type:null,hash:null,code:null,outputNames:null,outputTypes:null};function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),t.outputNames=[],t.outputTypes=[],t.outputInterpolations=[],t.builtinOutputNames=[],t.builtinOutputTypes=[],t.builtinInputNames=[],t.builtinInputTypes=[],r.m.obj(e,t),r.m.setGet(e,t,["type","hash","code"]),r.m.getArray(e,t,["outputTypes","outputNames","outputInterpolations"]),d(e,t)}var h={newInstance:r.m.newInstance(f,"vtkWebGPUShaderDescription"),extend:f},m=n(34);function g(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:"vertex",i=n;Array.isArray(i)||(i=[i]);for(let n=0;ne.names[0]t.names[0]?1:0))},e.removeBufferIfPresent=e=>{for(let n=0;n{for(let n=0;n{for(let n=0;n{for(let n=0;n{let e="",n=0;for(let r=0;r0&&(e+=",\n"),e=`${e} @location(${n}) ${t.inputs[r].names[i]} : ${a}`,n++}return e},e.getVertexInputInformation=()=>{const e={};if(t.inputs.length){const n=[];let r=0;for(let e=0;e{for(let n=0;n{},e.releaseGraphicsResources=()=>{t.created&&(t.inputs=[],t.bindingDescriptions=[],t.attributeDescriptions=[])}}const y={inputs:null,bindingDescriptions:!1,attributeDescriptions:null,indexBuffer:null};function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,y,n),(0,r.o)(e,t),t.bindingDescriptions=[],t.attributeDescriptions=[],t.inputs=[],(0,r.e)(e,t,["created","device","handle","indexBuffer"]),v(e,t)}var b={newInstance:(0,r.n)(_,"vtkWebGPUVertexInput"),extend:_};const x="\n//VTK::Renderer::Dec\n\n//VTK::Color::Dec\n\n//VTK::Normal::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Select::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::IOStructs::Dec\n\n@vertex\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : vertexOutput;\n\n // var vertex: vec4 = vertexBC;\n\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Select::Impl\n\n //VTK::Position::Impl\n\n return output;\n}\n",w="\n//VTK::Renderer::Dec\n\n//VTK::Color::Dec\n\n//VTK::Normal::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Select::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::IOStructs::Dec\n\n@fragment\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : fragmentOutput;\n\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::Light::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Select::Impl\n\n // var computedColor:vec4 = vec4(1.0,0.5,0.5,1.0);\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n";function S(e,t){t.classHierarchy.push("vtkWebGPUSimpleMapper"),e.generateShaderDescriptions=(n,r,i)=>{const o=h.newInstance({type:"vertex",hash:n,code:t.vertexShaderTemplate}),a=h.newInstance({type:"fragment",hash:n,code:t.fragmentShaderTemplate}),s=r.getShaderDescriptions();s.push(o),s.push(a);const l=t.vertexShaderTemplate+t.fragmentShaderTemplate,u=new RegExp("//VTK::[^:]*::","g"),c=l.match(u).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>`replaceShader${e.substring(7,e.length-2)}`));for(let e=0;e{const r=t.getShaderDescription("vertex");r.replaceShaderCode(null,n);t.getShaderDescription("fragment").replaceShaderCode(r)},e.replaceShaderRenderEncoder=(e,n,r)=>{t.renderEncoder.replaceShaderCode(n)},t.shaderReplacements.set("replaceShaderRenderEncoder",e.replaceShaderRenderEncoder),e.replaceShaderRenderer=(e,n,r)=>{if(!t.WebGPURenderer)return;const i=t.WebGPURenderer.getBindGroup().getShaderCode(n),o=n.getShaderDescription("vertex");let a=o.getCode();a=c.ZP.substitute(a,"//VTK::Renderer::Dec",[i]).result,o.setCode(a);const s=n.getShaderDescription("fragment");a=s.getCode(),a=c.ZP.substitute(a,"//VTK::Renderer::Dec",[i]).result,s.setCode(a)},t.shaderReplacements.set("replaceShaderRenderer",e.replaceShaderRenderer),e.replaceShaderMapper=(e,n,r)=>{const i=t.bindGroup.getShaderCode(n),o=n.getShaderDescription("vertex");let a=o.getCode();a=c.ZP.substitute(a,"//VTK::Mapper::Dec",[i]).result,o.setCode(a);const s=n.getShaderDescription("fragment");s.addBuiltinInput("bool","@builtin(front_facing) frontFacing"),a=s.getCode(),a=c.ZP.substitute(a,"//VTK::Mapper::Dec",[i]).result,s.setCode(a)},t.shaderReplacements.set("replaceShaderMapper",e.replaceShaderMapper),e.replaceShaderPosition=(e,t,n)=>{const r=t.getShaderDescription("vertex");r.addBuiltinOutput("vec4","@builtin(position) Position");let i=r.getCode();i=c.ZP.substitute(i,"//VTK::Position::Impl",[" output.Position = rendererUBO.SCPCMatrix*vertexBC;"]).result,r.setCode(i)},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition),e.replaceShaderTCoord=(e,t,n)=>{t.getShaderDescription("vertex").addOutput("vec2","tcoordVS")},t.shaderReplacements.set("replaceShaderTCoord",e.replaceShaderTCoord),e.addTextureView=e=>{t.textureViews.includes(e)||t.textureViews.push(e)},e.prepareToDraw=n=>{t.renderEncoder=n,e.updateInput(),e.updateBuffers(),e.updateBindings(),e.updatePipeline()},e.updateInput=()=>{},e.updateBuffers=()=>{},e.updateBindings=()=>{t.bindGroup.setBindables(e.getBindables())},e.computePipelineHash=()=>{},e.registerDrawCallback=n=>{n.registerDrawCallback(t.pipeline,e.draw)},e.prepareAndDraw=n=>{e.prepareToDraw(n),n.setPipeline(t.pipeline),e.draw(n)},e.draw=e=>{const n=e.getBoundPipeline();e.activateBindGroup(t.bindGroup),t.WebGPURenderer&&t.WebGPURenderer.bindUBO(e),n.bindVertexInput(e,t.vertexInput);const r=t.vertexInput.getIndexBuffer();r?e.drawIndexed(r.getIndexCount(),t.numberOfInstances,0,0,0):e.draw(t.numberOfVertices,t.numberOfInstances,0,0)},e.getBindables=()=>{const e=[...t.additionalBindables];t.UBO&&e.push(t.UBO),t.SSBO&&e.push(t.SSBO);for(let n=0;n{e.computePipelineHash(),t.pipeline=t.device.getPipeline(t.pipelineHash),t.pipeline||(t.pipeline=u.newInstance(),t.pipeline.setDevice(t.device),t.WebGPURenderer&&t.pipeline.addBindGroupLayout(t.WebGPURenderer.getBindGroup()),t.pipeline.addBindGroupLayout(t.bindGroup),e.generateShaderDescriptions(t.pipelineHash,t.pipeline,t.vertexInput),t.pipeline.setTopology(t.topology),t.pipeline.setRenderEncoder(t.renderEncoder),t.pipeline.setVertexState(t.vertexInput.getVertexInputInformation()),t.device.createPipeline(t.pipelineHash,t.pipeline))}}const C={additionalBindables:void 0,bindGroup:null,device:null,fragmentShaderTemplate:null,numberOfInstances:1,numberOfVertices:0,pipelineHash:null,shaderReplacements:null,SSBO:null,textureViews:null,topology:"triangle-list",UBO:null,vertexShaderTemplate:null,WebGPURenderer:null};function T(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,C,n),i.Z.extend(e,t,n),t.textureViews=[],t.vertexInput=b.newInstance(),t.bindGroup=o.ZP.newInstance({label:"mapperBG"}),t.additionalBindables=[],t.fragmentShaderTemplate=t.fragmentShaderTemplate||w,t.vertexShaderTemplate=t.vertexShaderTemplate||x,t.shaderReplacements=new Map,r.m.get(e,t,["pipeline","vertexInput"]),r.m.setGet(e,t,["additionalBindables","device","fragmentShaderTemplate","interpolate","numberOfInstances","numberOfVertices","pipelineHash","shaderReplacements","SSBO","textureViews","topology","UBO","vertexShaderTemplate","WebGPURenderer"]),S(e,t)}var M={newInstance:r.m.newInstance(T,"vtkWebGPUSimpleMapper"),extend:T}},function(e,t,n){const r=n(371);e.exports=class extends r{constructor(e){super(),this._messageId=1,this._messages=new Map,this._worker=e,this._worker.onmessage=this._onMessage.bind(this),this._id=Math.ceil(1e7*Math.random())}terminate(){this._worker.terminate()}isFree(){return 0===this._messages.size}jobsLength(){return this._messages.size}exec(e,t=null,n=[],r){return new Promise(((i,o)=>{const a=this._messageId++;this._messages.set(a,[i,o,r]),this._worker.postMessage([a,t,e],n||[])}))}postMessage(e=null,t=[],n){return new Promise(((r,i)=>{const o=this._messageId++;this._messages.set(o,[r,i,n]),this._worker.postMessage([o,e],t||[])}))}emit(e,...t){this._worker.postMessage({eventName:e,args:t})}_onMessage(e){if(!Array.isArray(e.data)&&e.data.eventName)return super.emit(e.data.eventName,...e.data.args);const[t,...n]=e.data;if(1===t)this._onEvent(...n);else{if(0!==t)throw new Error(`Wrong message type '${t}'`);this._onResult(...n)}}_onResult(e,t,n){const[r,i]=this._messages.get(e);return this._messages.delete(e),1===t?r(n):i(n)}_onEvent(e,t,n){const[,,r]=this._messages.get(e);r&&r(t,n)}}},function(e,t,n){var r=n(136).default;function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),s=new A(r||[]);return a(o,"_invoke",{value:C(e,n,s)}),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h={};function m(){}function g(){}function v(){}var y={};d(y,l,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(P([])));b&&b!==n&&o.call(b,l)&&(y=b);var x=v.prototype=m.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,a,s,l){var u=f(e[i],e,a);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==r(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,l)}))}l(u.arg)}var i;a(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function C(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=f(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function T(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,T(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=f(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function P(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;D(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(0);function i(e,t){t.classHierarchy.push("vtkAbstractMapper"),e.update=()=>{e.getInputData()},e.addClippingPlane=n=>!!n.isA("vtkPlane")&&(!t.clippingPlanes.includes(n)&&(t.clippingPlanes.push(n),e.modified(),!0)),e.getNumberOfClippingPlanes=()=>t.clippingPlanes.length,e.removeAllClippingPlanes=()=>0!==t.clippingPlanes.length&&(t.clippingPlanes.length=0,e.modified(),!0),e.removeClippingPlane=n=>{const r=t.clippingPlanes.indexOf(n);return-1!==r&&(t.clippingPlanes.splice(r,1),e.modified(),!0)},e.getClippingPlanes=()=>t.clippingPlanes,e.setClippingPlanes=t=>{if(t)if(Array.isArray(t)){const n=t.length;for(let r=0;r{const o=t.clippingPlanes,a=e;if(o){const e=o.length;if(n>=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.obj(e,t),r.m.algo(e,t,1,0),t.clippingPlanes||(t.clippingPlanes=[]),i(e,t)}}},function(e,t,n){"use strict";n.d(t,{M_:function(){return r},ZP:function(){return i}});const r={FIELD_ASSOCIATION_POINTS:0,FIELD_ASSOCIATION_CELLS:1,FIELD_ASSOCIATION_NONE:2,FIELD_ASSOCIATION_POINTS_THEN_CELLS:3,FIELD_ASSOCIATION_VERTICES:4,FIELD_ASSOCIATION_EDGES:5,FIELD_ASSOCIATION_ROWS:6,NUMBER_OF_ASSOCIATIONS:7};var i={FieldDataTypes:{UNIFORM:0,DATA_OBJECT_FIELD:0,COORDINATE:1,POINT_DATA:1,POINT:2,POINT_FIELD_DATA:2,CELL:3,CELL_FIELD_DATA:3,VERTEX:4,VERTEX_FIELD_DATA:4,EDGE:5,EDGE_FIELD_DATA:5,ROW:6,ROW_DATA:6},FieldAssociations:r}},function(e,t,n){"use strict";n.d(t,{OG:function(){return r},ZP:function(){return i}});const r={LUMINANCE:1,LUMINANCE_ALPHA:2,RGB:3,RGBA:4};var i={VectorMode:{MAGNITUDE:0,COMPONENT:1,RGBCOLORS:2},ScalarMappingTarget:r}},function(e,t,n){"use strict";n.d(t,{X:function(){return r},Z:function(){return i}});const r={MIN_KNOWN_PASS:0,ACTOR_PASS:0,COMPOSITE_INDEX_PASS:1,ID_LOW24:2,ID_HIGH24:3,MAX_KNOWN_PASS:3};var i={PassTypes:r}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(0),i=n(2),o=n(37);function a(e,t){t.classHierarchy.push("vtkCell"),e.initialize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(n){t.pointsIds=n;let i=t.points.getData();i.length!==3*t.pointsIds.length&&(i=r.m.newTypedArray(e.getDataType(),3*t.pointsIds.length));const o=e.getData();t.pointsIds.forEach(((e,t)=>{let n=3*e,r=3*t;i[r]=o[n],i[++r]=o[++n],i[++r]=o[++n]})),t.points.setData(i)}else{t.points=e,t.pointsIds=new Array(e.getNumberOfPoints());for(let n=e.getNumberOfPoints()-1;n>=0;--n)t.pointsIds[n]=n}},e.getBounds=()=>{const e=t.points.getNumberOfPoints(),n=[];if(e){t.points.getPoint(0,n),t.bounds[0]=n[0],t.bounds[1]=n[0],t.bounds[2]=n[1],t.bounds[3]=n[1],t.bounds[4]=n[2],t.bounds[5]=n[2];for(let r=1;rt.bounds[1]?n[0]:t.bounds[1],t.bounds[2]=n[1]t.bounds[3]?n[1]:t.bounds[3],t.bounds[4]=n[2]t.bounds[5]?n[2]:t.bounds[5]}else(0,i.u)(t.bounds);return t.bounds},e.getLength2=()=>{e.getBounds();let n=0,r=0;for(let e=0;e<3;e++)r=t.bounds[2*e+1]-t.bounds[2*e],n+=r*r;return n},e.getParametricDistance=e=>{let t,n=0;for(let r=0;r<3;r++)t=e[r]<0?-e[r]:e[r]>1?e[r]-1:0,t>n&&(n=t);return n},e.getNumberOfPoints=()=>t.points.getNumberOfPoints(),e.deepCopy=e=>{e.initialize(t.points,t.pointsIds)},e.getCellDimension=()=>{},e.intersectWithLine=(e,t,n,r,i,o,a)=>{},e.evaluatePosition=(e,t,n,i,o,a)=>{r.m.vtkErrorMacro("vtkCell.evaluatePosition is not implemented.")}}const s={bounds:[-1,-1,-1,-1,-1,-1],pointsIds:[]};function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),r.m.obj(e,t),t.points||(t.points=o.ZP.newInstance()),r.m.get(e,t,["points","pointsIds"]),a(e,t)}var u={newInstance:r.m.newInstance(l,"vtkCell"),extend:l}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return m}});var r=n(0),i=n(360),o=n(109),a=n(2),s=n(576);const{IntersectionState:l}=i.Z;function u(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const i={t:Number.MIN_VALUE,distance:0},o=[];let s;o[0]=n[0]-t[0],o[1]=n[1]-t[1],o[2]=n[2]-t[2];const l=o[0]*(e[0]-t[0])+o[1]*(e[1]-t[1])+o[2]*(e[2]-t[2]),u=(0,a.d)(o,o);let c=1e-5*l;return 0!==u&&(i.t=l/u),c<0&&(c=-c),-c1?s=n:(s=o,o[0]=t[0]+i.t*o[0],o[1]=t[1]+i.t*o[1],o[2]=t[2]+i.t*o[2]),r&&(r[0]=s[0],r[1]=s[1],r[2]=s[2]),i.distance=(0,a.e)(s,e),i}function c(e,t,n,r,i,o){const s=[],c=[],d=[];i[0]=0,o[0]=0,(0,a.s)(t,e,s),(0,a.s)(r,n,c),(0,a.s)(n,e,d);const p=[(0,a.d)(s,s),-(0,a.d)(s,c),-(0,a.d)(s,c),(0,a.d)(c,c)],f=[];if(f[0]=(0,a.d)(s,d),f[1]=-(0,a.d)(c,d),0===(0,a.g)(p,f,2)){let a=Number.MAX_VALUE;const s=[e,t,n,r],c=[n,n,e,e],d=[r,r,t,t];let p;o[0],o[0],i[0],i[0],i[0],i[0],o[0],o[0];for(let e=0;e<4;e++)p=u(s[e],c[e],d[e]),p.distance=0&&i[0]<=1&&o[0]>=0&&o[0]<=1?l.YES_INTERSECTION:l.NO_INTERSECTION}const d={distanceToLine:u,intersection:c};function p(e,t){t.classHierarchy.push("vtkLine"),e.getCellDimension=()=>1,e.intersectWithLine=(e,n,r,i,o)=>{const s={intersect:0,t:Number.MAX_VALUE,subId:0,betweenPoints:null};o[1]=0,o[2]=0;const d=[],p=[],f=[];t.points.getPoint(0,p),t.points.getPoint(1,f);const h=[],m=[],g=c(e,n,p,f,h,m);var v;if(s.t=h[0],s.betweenPoints=(v=s.t)>=0&&v<=1,o[0]=m[0],g===l.YES_INTERSECTION){for(let t=0;t<3;t++)i[t]=p[t]+o[0]*(f[t]-p[t]),d[t]=e[t]+s.t*(n[t]-e[t]);if((0,a.e)(i,d)<=r*r)return s.intersect=1,s}else{let t;if(s.t<0)return t=u(e,p,f,i),t.distance<=r*r?(s.t=0,s.intersect=1,s.betweenPoints=!0,s):s;if(s.t>1)return t=u(n,p,f,i),t.distance<=r*r?(s.t=1,s.intersect=1,s.betweenPoints=!0,s):s;if(o[0]<0)return o[0]=0,t=u(p,e,n,i),s.t=t.t,t.distance<=r*r?(s.intersect=1,s):s;if(o[0]>1)return o[0]=1,t=u(f,e,n,i),s.t=t.t,t.distance<=r*r?(s.intersect=1,s):s}return s},e.evaluateLocation=(e,n,r)=>{const i=[],o=[];t.points.getPoint(0,i),t.points.getPoint(1,o);for(let t=0;t<3;t++)n[t]=i[t]+e[0]*(o[t]-i[t]);r[0]=1-e[0],r[1]=e[0]},e.evaluateOrientation=(e,n,r)=>!!t.orientations&&(s.ZA(n,t.orientations[0],t.orientations[1],e[0]),r[0]=1-e[0],r[1]=e[0],!0)}const f={orientations:null};function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,f,n),o.ZP.extend(e,t,n),r.m.setGet(e,t,["orientations"]),p(e,t)}var m={newInstance:r.m.newInstance(h,"vtkLine"),extend:h,...d,...i.Z}},function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});const r=new Float32Array(1),i=new Int32Array(r.buffer);var o={fromHalf:function(e){const t=(32768&e)>>15,n=(31744&e)>>10,r=1023&e;return 0===n?(t?-1:1)*2**-14*(r/1024):31===n?r?NaN:1/0*(t?-1:1):(t?-1:1)*2**(n-15)*(1+r/1024)},toHalf:function(e){r[0]=e;const t=i[0];let n=t>>16&32768,o=t>>12&2047;const a=t>>23&255;return a<103?n:a>142?(n|=31744,n|=(255===a?0:1)&&8388607&t,n):a<113?(o|=2048,n|=(o>>114-a)+(o>>113-a&1),n):(n|=a-112<<10|o>>1,n+=1&o,n)}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return f}});var r=n(0),i=n(44),o=n(4),a=n(5),s=n(25);const l=[2,0,1,2,2,3,2,4,5,2,6,7,2,0,2,2,1,3,2,4,6,2,5,7,2,0,4,2,1,5,2,2,6,2,3,7],u=[4,0,1,3,2,4,4,6,7,5,4,8,10,11,9,4,12,13,15,14,4,16,18,19,17,4,20,21,23,22];function c(e,t){t.classHierarchy.push("vtkCubeSource"),e.setBounds=function(){let t=[];if(Array.isArray(arguments.length<=0?void 0:arguments[0]))t=arguments.length<=0?void 0:arguments[0];else for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),r.m.obj(e,t),r.m.setGet(e,t,["xLength","yLength","zLength","generate3DTextureCoordinates","generateFaces","generateLines"]),r.m.setGetArray(e,t,["center","rotations"],3),r.m.setGetArray(e,t,["matrix"],16),t._polys=i.ZP.newInstance({values:Uint16Array.from(u)}),t._lineCells=i.ZP.newInstance({values:Uint16Array.from(l)}),r.m.moveToProtected(e,t,["polys","lineCells"]),r.m.algo(e,t,0,1),c(e,t)}var f={newInstance:r.m.newInstance(p,"vtkCubeSource"),extend:p}},function(e,t,n){"use strict";n.d(t,{bt:function(){return r},ZP:function(){return i}});const r={COMPOSITE_BLEND:0,MAXIMUM_INTENSITY_BLEND:1,MINIMUM_INTENSITY_BLEND:2,AVERAGE_INTENSITY_BLEND:3,ADDITIVE_INTENSITY_BLEND:4,RADON_TRANSFORM_BLEND:5};var i={BlendMode:r,FilterMode:{OFF:0,NORMALIZED:1,RAW:2}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return d}});var r=n(0),i=n(28),o=n(34);const{BufferUsage:a}=i.ZP,{vtkErrorMacro:s}=r.m;function l(e,t){t.classHierarchy.push("vtkWebGPUStorageBuffer"),e.addEntry=(e,n)=>{if(t._bufferEntryNames.has(e))return void s(`entry named ${e} already exists`);t._bufferEntryNames.set(e,t.bufferEntries.length);const r=o.Z.getByteStrideFromShaderFormat(n);t.bufferEntries.push({name:e,type:n,sizeInBytes:r,offset:t.sizeInBytes,nativeType:o.Z.getNativeTypeFromShaderFormat(n)}),t.sizeInBytes+=r},e.send=e=>{if(!t._buffer){const n={nativeArray:t.Float32Array,usage:a.Storage,label:t.label};return t._buffer=e.getBufferManager().getBuffer(n),t.bindGroupTime.modified(),void t._sendTime.modified()}e.getHandle().queue.writeBuffer(t._buffer.getHandle(),0,t.arrayBuffer,0,t.sizeInBytes*t.numberOfInstances),t._sendTime.modified()},e.createView=e=>{e in t==!1&&(t.arrayBuffer||(t.arrayBuffer=new ArrayBuffer(t.sizeInBytes*t.numberOfInstances)),t[e]=r.m.newTypedArray(e,t.arrayBuffer))},e.setValue=(n,r,i)=>{const o=t._bufferEntryNames.get(n);if(void 0===o)return void s(`entry named ${n} not found in UBO`);const a=t.bufferEntries[o];e.createView(a.nativeType);const l=t[a.nativeType];l[(a.offset+r*t.sizeInBytes)/l.BYTES_PER_ELEMENT]=i},e.setArray=(n,r,i)=>{const o=t._bufferEntryNames.get(n);if(void 0===o)return void s(`entry named ${n} not found in UBO`);const a=t.bufferEntries[o];e.createView(a.nativeType);const l=t[a.nativeType],u=(a.offset+r*t.sizeInBytes)/l.BYTES_PER_ELEMENT;for(let e=0;e{const i=t._bufferEntryNames.get(n);if(void 0===i)return void s(`entry named ${n} not found in UBO`);const o=t.bufferEntries[i];e.createView(o.nativeType);const a=t[o.nativeType],l=r.length/t.numberOfInstances;for(let e=0;e{const i=t._bufferEntryNames.get(n);if(void 0===i)return void s(`entry named ${n} not found in UBO`);const o=t.bufferEntries[i];e.createView(o.nativeType);const a=t[o.nativeType],l=r.length/t.numberOfInstances;for(let e=0;e{const i=t._bufferEntryNames.get(n);if(void 0===i)return void s(`entry named ${n} not found in UBO`);const o=t.bufferEntries[i];e.createView(o.nativeType);const a=t[o.nativeType];for(let e=0;et._sendTime.getMTime(),e.getShaderCode=(e,n)=>{const r=[`struct ${t.label}StructEntry\n{`];for(let e=0;e,\n};\n@binding(${e}) @group(${n}) var ${t.label}: ${t.label}Struct;\n`),r.join("\n")},e.getBindGroupEntry=()=>({resource:{buffer:t._buffer.getHandle()}}),e.clearData=()=>{t.numberOfInstances=0,t.sizeInBytes=0,t.bufferEntries=[],t._bufferEntryNames=new Map,t._buffer=null,delete t.arrayBuffer,delete t.Float32Array}}const u={bufferEntries:null,bufferEntryNames:null,sizeInBytes:0,label:null,numberOfInstances:1};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),r.m.obj(e,t),t._bufferEntryNames=new Map,t.bufferEntries=[],t._sendTime={},r.m.obj(t._sendTime,{mtime:0}),t.bindGroupTime={},r.m.obj(t.bindGroupTime,{mtime:0}),t.bindGroupLayoutEntry=t.bindGroupLayoutEntry||{buffer:{type:"read-only-storage"}},r.m.get(e,t,["bindGroupTime"]),r.m.setGet(e,t,["device","bindGroupLayoutEntry","label","numberOfInstances","sizeInBytes"]),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkWebGPUStorageBuffer"),extend:c}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return r}});var r={BufferUsage:{Verts:0,Lines:1,Triangles:2,Strips:3,LinesFromStrips:4,LinesFromTriangles:5,Points:6,UniformArray:7,PointArray:8,NormalsFromPoints:9,Texture:10,RawVertex:11,Storage:12,Index:13},PrimitiveTypes:{Start:0,Points:0,Lines:1,Triangles:2,TriangleStrips:3,TriangleEdges:4,TriangleStripEdges:5,End:6}}},function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r={Defaults:{Gaussians:[{position:.5,height:1,width:.5,xBias:.5,yBias:.5}],Points:[[0,0],[1,1]],Nodes:[{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}]},Mode:{Gaussians:0,Points:1,Nodes:2}}},function(e,t,n){"use strict";function r(e){return new TextDecoder("latin1").decode(e)}n.d(t,{Z:function(){return i}});var i={arrayBufferToString:r,extractBinary:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const i=r(e),o=t.exec(i);if(!o)return{text:i};const a=o.index+o[0].length,s=i.substring(0,a);let l=null;const u=n?n.exec(i):null;if(u){l={text:s+i.substr(u.index),binaryBuffer:e.slice(a,u.index)}}else l={text:s,binaryBuffer:e.slice(a)};return l}}},function(e,t,n){"use strict";function r(){const e=new ArrayBuffer(4),t=new Uint8Array(e),n=new Uint32Array(e);return t[0]=161,t[1]=178,t[2]=195,t[3]=212,3569595041===n[0]?"LittleEndian":2712847316===n[0]?"BigEndian":null}n.d(t,{ZP:function(){return i}});var i={ENDIANNESS:r(),getEndianness:r,swapBytes:function(e,t){if(t<2)return;const n=new Int8Array(e),r=n.length,i=[];for(let e=0;e{let e,n=t.mtime;for(let r=0;r<4;r++)1===t.componentData[r].colorChannels?t.componentData[r].grayTransferFunction&&(e=t.componentData[r].grayTransferFunction.getMTime(),n=n>e?n:e):3===t.componentData[r].colorChannels&&t.componentData[r].rGBTransferFunction&&(e=t.componentData[r].rGBTransferFunction.getMTime(),n=n>e?n:e),t.componentData[r].scalarOpacity&&(e=t.componentData[r].scalarOpacity.getMTime(),n=n>e?n:e),t.componentData[r].gradientOpacity&&(t.componentData[r].disableGradientOpacity||(e=t.componentData[r].gradientOpacity.getMTime(),n=n>e?n:e));return n},e.getColorChannels=e=>e<0||e>3?(f("Bad index - must be between 0 and 3"),0):t.componentData[e].colorChannels,e.setGrayTransferFunction=(n,r)=>{let i=!1;return t.componentData[n].grayTransferFunction!==r&&(t.componentData[n].grayTransferFunction=r,i=!0),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1,i=!0),i&&e.modified(),i},e.getGrayTransferFunction=n=>(null===t.componentData[n].grayTransferFunction&&(t.componentData[n].grayTransferFunction=u.ZP.newInstance(),t.componentData[n].grayTransferFunction.addPoint(0,0),t.componentData[n].grayTransferFunction.addPoint(1024,1),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1),e.modified()),t.componentData[n].grayTransferFunction),e.setRGBTransferFunction=(n,r)=>{let i=!1;return t.componentData[n].rGBTransferFunction!==r&&(t.componentData[n].rGBTransferFunction=r,i=!0),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3,i=!0),i&&e.modified(),i},e.getRGBTransferFunction=n=>(null===t.componentData[n].rGBTransferFunction&&(t.componentData[n].rGBTransferFunction=l.ZP.newInstance(),t.componentData[n].rGBTransferFunction.addRGBPoint(0,0,0,0),t.componentData[n].rGBTransferFunction.addRGBPoint(1024,1,1,1),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3),e.modified()),t.componentData[n].rGBTransferFunction),e.setScalarOpacity=(n,r)=>t.componentData[n].scalarOpacity!==r&&(t.componentData[n].scalarOpacity=r,e.modified(),!0),e.getScalarOpacity=n=>(null===t.componentData[n].scalarOpacity&&(t.componentData[n].scalarOpacity=u.ZP.newInstance(),t.componentData[n].scalarOpacity.addPoint(0,1),t.componentData[n].scalarOpacity.addPoint(1024,1),e.modified()),t.componentData[n].scalarOpacity),e.setComponentWeight=(n,r)=>{if(n<0||n>=4)return f("Invalid index"),!1;const i=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==i&&(t.componentData[n].componentWeight=i,e.modified(),!0)},e.getComponentWeight=e=>e<0||e>=4?(f("Invalid index"),0):t.componentData[e].componentWeight,e.setInterpolationTypeToNearest=()=>e.setInterpolationType(d.NEAREST),e.setInterpolationTypeToLinear=()=>e.setInterpolationType(d.LINEAR),e.setInterpolationTypeToFastLinear=()=>e.setInterpolationType(d.FAST_LINEAR),e.getInterpolationTypeAsString=()=>o.m.enumToString(d,t.interpolationType);["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((n=>{const r=o.m.capitalize(n);e[`set${r}`]=(r,i)=>t.componentData[r][`${n}`]!==i&&(t.componentData[r][`${n}`]=i,e.modified(),!0)}));["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((n=>{const r=o.m.capitalize(n);e[`get${r}`]=e=>t.componentData[e][`${n}`]}))}const m={independentComponents:!0,interpolationType:d.FAST_LINEAR,shade:!1,ambient:.1,diffuse:.7,specular:.2,specularPower:10,useLabelOutline:!1,labelOutlineThickness:1,labelOutlineOpacity:1};function g(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,m,n),o.m.obj(e,t),!t.componentData){t.componentData=[];for(let e=0;e<4;++e)t.componentData.push({colorChannels:1,grayTransferFunction:null,rGBTransferFunction:null,scalarOpacity:null,scalarOpacityUnitDistance:1,opacityMode:p.FRACTIONAL,gradientOpacityMinimumValue:0,gradientOpacityMinimumOpacity:0,gradientOpacityMaximumValue:1,gradientOpacityMaximumOpacity:1,useGradientOpacity:!1,componentWeight:1})}o.m.setGet(e,t,["independentComponents","interpolationType","shade","ambient","diffuse","specular","specularPower","useLabelOutline","labelOutlineThickness","labelOutlineOpacity"]),h(e,t)}var v={newInstance:o.m.newInstance(g,"vtkVolumeProperty"),extend:g,...c.ZP};const{vtkDebugMacro:y}=o.m;function _(e,t){t.classHierarchy.push("vtkVolume"),e.getVolumes=()=>e,e.makeProperty=v.newInstance,e.getProperty=()=>(null===t.property&&(t.property=e.makeProperty()),t.property),e.getBounds=()=>{if(null===t.mapper)return t.bounds;const n=t.mapper.getBounds();if(!n||6!==n.length)return n;if(n[0]>n[1])return t.mapperBounds=n.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),n;if(!t.mapperBounds||!(o=[n,t.mapperBounds],o[0].map(((e,t)=>o.map((e=>e[t]))))).reduce(((e,t)=>e&&t[0]===t[1]),!0)||e.getMTime()>t.boundsMTime.getMTime()){y("Recomputing bounds..."),t.mapperBounds=n.map((e=>e));const o=[];a.ZP.getCorners(n,o),e.computeMatrix();const s=new Float64Array(16);r.transpose(s,t.matrix),o.forEach((e=>i.fF(e,e,s))),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map(((e,t)=>t%2==0?o.reduce(((e,n)=>e>n[t/2]?n[t/2]:e),e):o.reduce(((e,n)=>e{let e=t.mtime;if(null!==t.property){const n=t.property.getMTime();e=n>e?n:e}return e},e.getRedrawMTime=()=>{let e=t.mtime;if(null!==t.mapper){let n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),n=t.mapper.getInput().getMTime(),e=n>e?n:e)}return e}}const b={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function x(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,b,n),s.ZP.extend(e,t,n),t.boundsMTime={},o.m.obj(t.boundsMTime),o.m.set(e,t,["property"]),o.m.setGet(e,t,["mapper"]),o.m.getArray(e,t,["bounds"],6),_(e,t)}var w={newInstance:o.m.newInstance(x,"vtkVolume"),extend:x}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return h}});var r=n(0),i=n(2),o=n(113),a=n(105),s=n(50);const{BlendMode:l,FilterMode:u}=o.ZP;const c={createRadonTransferFunction:function(e,t,n,r,i){let o=null;return i?(o=i,o.removeAllPoints()):o=s.ZP.newInstance(),o.addPointLong(-1024,0,1,1),o.addPoint(e,t),o.addPoint(n,r),o}};function d(e,t){t.classHierarchy.push("vtkVolumeMapper");const n={...e};e.getBounds=()=>{const n=e.getInputData();return n?(t.static||e.update(),t.bounds=n.getBounds()):t.bounds=(0,i.F)(),t.bounds},e.update=()=>{e.getInputData()},e.setBlendModeToComposite=()=>{e.setBlendMode(l.COMPOSITE_BLEND)},e.setBlendModeToMaximumIntensity=()=>{e.setBlendMode(l.MAXIMUM_INTENSITY_BLEND)},e.setBlendModeToMinimumIntensity=()=>{e.setBlendMode(l.MINIMUM_INTENSITY_BLEND)},e.setBlendModeToAverageIntensity=()=>{e.setBlendMode(l.AVERAGE_INTENSITY_BLEND)},e.setBlendModeToAdditiveIntensity=()=>{e.setBlendMode(l.ADDITIVE_INTENSITY_BLEND)},e.setBlendModeToRadonTransform=()=>{e.setBlendMode(l.RADON_TRANSFORM_BLEND)},e.getBlendModeAsString=()=>r.m.enumToString(l,t.blendMode),e.setAverageIPScalarRange=(t,n)=>{console.warn("setAverageIPScalarRange is deprecated use setIpScalarRange"),e.setIpScalarRange(t,n)},e.getFilterModeAsString=()=>r.m.enumToString(u,t.filterMode),e.setFilterModeToOff=()=>{e.setFilterMode(u.OFF)},e.setFilterModeToNormalized=()=>{e.setFilterMode(u.NORMALIZED)},e.setFilterModeToRaw=()=>{e.setFilterMode(u.RAW)},e.setGlobalIlluminationReach=e=>n.setGlobalIlluminationReach((0,i.C)(e,0,1)),e.setVolumetricScatteringBlending=e=>n.setVolumetricScatteringBlending((0,i.C)(e,0,1)),e.setVolumeShadowSamplingDistFactor=e=>n.setVolumeShadowSamplingDistFactor(e>=1?e:1),e.setAnisotropy=e=>n.setAnisotropy((0,i.C)(e,-.99,.99)),e.setLAOKernelSize=e=>n.setLAOKernelSize((0,i.G)((0,i.C)(e,1,32))),e.setLAOKernelRadius=e=>n.setLAOKernelRadius(e>=1?e:1)}const p={bounds:[1,-1,1,-1,1,-1],sampleDistance:1,imageSampleDistance:1,maximumSamplesPerRay:1e3,autoAdjustSampleDistances:!0,initialInteractionScale:1,interactionSampleDistanceFactor:1,blendMode:l.COMPOSITE_BLEND,ipScalarRange:[-1e6,1e6],filterMode:u.OFF,preferSizeOverAccuracy:!1,computeNormalFromOpacity:!1,volumetricScatteringBlending:0,globalIlluminationReach:0,volumeShadowSamplingDistFactor:5,anisotropy:0,localAmbientOcclusion:!1,LAOKernelSize:15,LAOKernelRadius:7};function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),a.Z.extend(e,t,n),r.m.setGet(e,t,["sampleDistance","imageSampleDistance","maximumSamplesPerRay","autoAdjustSampleDistances","initialInteractionScale","interactionSampleDistanceFactor","blendMode","filterMode","preferSizeOverAccuracy","computeNormalFromOpacity","volumetricScatteringBlending","globalIlluminationReach","volumeShadowSamplingDistFactor","anisotropy","localAmbientOcclusion","LAOKernelSize","LAOKernelRadius"]),r.m.setGetArray(e,t,["ipScalarRange"],2),r.m.event(e,t,"lightingActivated"),d(e,t)}var h={newInstance:r.m.newInstance(f,"vtkVolumeMapper"),extend:f,...c}},function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});const r=Object.create(null);[{Name:"KAAMS",IndexedColors:[1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,.63,.63,1,.67,.5,.33,1,.5,.75,.53,.35,.7,1,.75,.5],Annotations:[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11]},{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Cool to Warm (Extended)",NanColor:[.25,0,0],RGBPoints:[0,0,0,.34902,.03125,.039216,.062745,.380392,.0625,.062745,.117647,.411765,.09375,.090196,.184314,.45098,.125,.12549,.262745,.501961,.15625,.160784,.337255,.541176,.1875,.2,.396078,.568627,.21875,.239216,.454902,.6,.25,.286275,.521569,.65098,.28125,.337255,.592157,.701961,.3125,.388235,.654902,.74902,.34375,.466667,.737255,.819608,.375,.572549,.819608,.878431,.40625,.654902,.866667,.909804,.4375,.752941,.917647,.941176,.46875,.823529,.956863,.968627,.5,.988235,.960784,.901961,.5,.941176,.984314,.988235,.52,.988235,.945098,.85098,.54,.980392,.898039,.784314,.5625,.968627,.835294,.698039,.59375,.94902,.733333,.588235,.625,.929412,.65098,.509804,.65625,.909804,.564706,.435294,.6875,.878431,.458824,.352941,.71875,.839216,.388235,.286275,.75,.760784,.294118,.211765,.78125,.701961,.211765,.168627,.8125,.65098,.156863,.129412,.84375,.6,.094118,.094118,.875,.54902,.066667,.098039,.90625,.501961,.05098,.12549,.9375,.45098,.054902,.172549,.96875,.4,.054902,.192157,1,.34902,.070588,.211765]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Warm to Cool (Extended)",NanColor:[.250004,0,0],RGBPoints:[0,.34902,0,.129412,.025,.4,.00392157,.101961,.05,.470588,.0156863,.0901961,.075,.54902,.027451,.0705882,.1,.619608,.0627451,.0431373,.125,.690196,.12549,.0627451,.15,.741176,.184314,.0745098,.175,.788235,.266667,.0941176,.2,.811765,.345098,.113725,.225,.831373,.411765,.133333,.25,.85098,.47451,.145098,.275,.870588,.54902,.156863,.3,.878431,.619608,.168627,.325,.890196,.658824,.196078,.35,.909804,.717647,.235294,.375,.929412,.776471,.278431,.395522,.94902,.823529,.321569,.418905,.968627,.87451,.407843,.444278,.980392,.917647,.509804,.470149,.988235,.956863,.643137,.483582,.992157,.964706,.713725,.499,.988235,.980392,.870588,.5,1,1,1,.501,.913725,.988235,.937255,.516418,.827451,.980392,.886275,.531343,.764706,.980392,.866667,.546766,.658824,.980392,.843137,.564179,.572549,.964706,.835294,.587562,.423529,.941176,.87451,.60597,.262745,.901961,.862745,.629851,.0705882,.854902,.870588,.651741,.0509804,.8,.85098,.681592,.0235294,.709804,.831373,.712935,.0313725,.615686,.811765,.75,.0313725,.537255,.788235,.775,.0392157,.466667,.768627,.8,.0509804,.396078,.741176,.825,.054902,.317647,.709804,.85,.054902,.243137,.678431,.875,.0431373,.164706,.639216,.9,.0313725,.0980392,.6,.925,.0392157,.0392157,.560784,.95,.105882,.0509804,.509804,.975,.113725,.0235294,.45098,1,.12549,0,.380392]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"BkRd",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,1,0,0]},{ColorSpace:"RGB",Name:"BkGn",NanColor:[1,0,1],RGBPoints:[0,0,0,0,1,0,1,0]},{ColorSpace:"RGB",Name:"BkBu",NanColor:[1,1,0],RGBPoints:[0,0,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"BkMa",NanColor:[0,1,0],RGBPoints:[0,0,0,0,1,1,0,1]},{ColorSpace:"RGB",Name:"BkCy",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,0,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear YGB 1211g",NanColor:[.25,0,0],RGBPoints:[0,1,.988235,.968627,.02,1,.952941,.878431,.05,.968627,.905882,.776471,.1,.94902,.898039,.647059,.15,.901961,.878431,.556863,.2,.847059,.858824,.482353,.25,.690196,.819608,.435294,.3,.513725,.768627,.384314,.35,.337255,.721569,.337255,.4,.278431,.658824,.392157,.45,.231373,.639216,.435294,.5,.203922,.6,.486275,.55,.172549,.568627,.537255,.6,.141176,.517647,.54902,.65,.133333,.458824,.541176,.7,.12549,.396078,.529412,.75,.117647,.321569,.521569,.8,.121569,.258824,.509804,.85,.133333,.227451,.501961,.9,.145098,.192157,.490196,.95,.188235,.164706,.470588,1,.258824,.196078,.439216]},{ColorSpace:"CIELAB",Creator:"Francesca Samsel",Name:"Linear Green (Gr4L)",NanColor:[.25,0,0],RGBPoints:[0,.054902,.109804,.121569,.05,.07451,.172549,.180392,.1,.086275,.231373,.219608,.15,.094118,.278431,.25098,.2,.109804,.34902,.278431,.25,.113725,.4,.278431,.3,.117647,.45098,.270588,.35,.117647,.490196,.243137,.4,.113725,.521569,.203922,.45,.109804,.54902,.152941,.5,.082353,.588235,.082353,.55,.109804,.631373,.05098,.6,.211765,.678431,.082353,.65,.317647,.721569,.113725,.7,.431373,.760784,.160784,.75,.556863,.8,.239216,.8,.666667,.839216,.294118,.85,.784314,.878431,.396078,.9,.886275,.921569,.533333,.95,.960784,.94902,.670588,1,1,.984314,.901961]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear Blue (8_31f)",NanColor:[.25,0,0],RGBPoints:[0,.960784,1,.980392,.05,.815686,.960784,.913725,.1,.670588,.929412,.870588,.15,.556863,.901961,.843137,.2,.478431,.870588,.823529,.25,.439216,.831373,.803922,.3,.4,.8,.788235,.35,.376471,.768627,.768627,.4,.34902,.709804,.729412,.45,.32549,.654902,.690196,.5,.301961,.607843,.658824,.55,.247059,.545098,.619608,.6,.239216,.494118,.580392,.65,.227451,.439216,.541176,.7,.227451,.403922,.521569,.75,.231373,.368627,.501961,.8,.227451,.321569,.470588,.85,.219608,.282353,.439216,.9,.192157,.235294,.4,.95,.160784,.184314,.34902,1,.133333,.12549,.301961]},{ColorSpace:"HSV",Name:"Blue to Red Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,0,0,1,1,1,0,0]},{ColorSpace:"HSV",Name:"Red to Blue Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,1,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended White",NanColor:[1,1,0],RGBPoints:[0,1,1,1,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Grey",NanColor:[1,1,0],RGBPoints:[0,.317647058824,.341176470588,.43137254902,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Black",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Blue to Yellow",NanColor:[1,0,0],RGBPoints:[0,.0392156862745,.0392156862745,.949019607843,1,.949019607843,.949019607843,.0392156862745]},{ColorSpace:"HSV",Name:"blot",RGBPoints:[0,0,0,1,.166,0,0,1,.167,1,0,1,.332,1,0,1,.333,0,1,1,.5,0,1,1,.501,0,1,0,.666,0,1,0,.667,1,1,0,.832,1,1,0,.833,1,0,0,1,1,0,0]},{ColorSpace:"Lab",Name:"CIELab Blue to Red",NanColor:[1,1,0],RGBPoints:[0,0,.6,.749019607843,1,.76862745098,.466666666667,.341176470588]},{ColorSpace:"RGB",Name:"jet",RGBPoints:[-1,0,0,.5625,-.777778,0,0,1,-.269841,0,1,1,-.015873,.5,1,.5,.238095,1,1,0,.746032,1,0,0,1,.5,0,0]},{ColorSpace:"RGB",Name:"rainbow",RGBPoints:[-1,0,0,1,-.5,0,1,1,0,0,1,0,.5,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"nic_CubicL",RGBPoints:[-1,.479965,.0118108,.5307,-.87451,.522213,.0551282,.706919,-.74902,.50839,.237278,.867764,-.623529,.451617,.373834,.987255,-.498039,.39365,.497255,.97506,-.372549,.328631,.599639,.891843,-.247059,.250043,.690286,.778553,-.121569,.249656,.764905,.645857,.00392157,.297954,.821466,.50449,.129412,.337509,.872595,.358447,.254902,.430011,.913789,.297079,.380392,.587191,.931381,.333353,.505882,.727937,.93591,.353742,.631373,.826403,.921081,.365066,.756863,.893201,.846317,.372662,.882353,.965347,.73884,.378506,1,.983235,.597451,.366856]},{ColorSpace:"Lab",Name:"nic_CubicYF",RGBPoints:[-1,.5151,.0482,.6697,-.87451,.520711,.168955,.800574,-.74902,.493694,.278596,.911824,-.623529,.440026,.369475,.984978,-.498039,.398932,.457593,.987053,-.372549,.350651,.540644,.929608,-.247059,.298827,.615625,.857729,-.121569,.239928,.685061,.769531,.00392157,.228832,.739349,.673287,.129412,.263297,.78608,.569988,.254902,.298107,.828337,.460214,.380392,.33092,.864071,.352674,.505882,.38306,.898169,.287309,.631373,.49023,.917481,.307961,.756863,.62372,.926026,.332309,.882353,.717458,.92527,.342476,1,.8,.9255,.3529]},{ColorSpace:"Lab",Name:"gist_earth",RGBPoints:[-1,0,0,0,-.87451,.239216,.027451,.415686,-.74902,.0901961,.254902,.556863,-.623529,.0941176,.352941,.54902,-.498039,.105882,.435294,.533333,-.372549,.12549,.52549,.501961,-.247059,.156863,.596078,.443137,-.121569,.196078,.65098,.380392,.00392157,.282353,.717647,.301961,.129412,.466667,.772549,.27451,.254902,.678431,.784314,.309804,.380392,.901961,.756863,.376471,.505882,.992157,.705882,.521569,.631373,1,.721569,.701961,.756863,1,.784314,.784314,.882353,1,.866667,.866667,1,1,1,1]},{ColorSpace:"Lab",Name:"2hot",RGBPoints:[-1,.0416667,0,0,-.873016,.208333,0,0,-.746032,.375,0,0,-.619048,.541667,0,0,-.492063,.708333,0,0,-.365079,.854137,0,0,-.238095,.937488,.039062,0,-.111111,1,.208333,0,.015873,1,.375,0,.142857,1,.541667,0,.269841,1,.708333,0,.396825,1,.858805,.03125,.52381,1,.947392,.15625,.650794,1,1,.3125,.777778,1,1,.5625,.904762,1,1,.8125,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_red2yellow_BW",RGBPoints:[-1,7.54296e-7,0,109827e-10,-.87451,.18285,.0264094,0,-.74902,.3066,0,0,-.623529,.422841,0,0,-.498039,.522945,0,0,-.372549,.605721,0,0,-.247059,.672502,.14168,0,-.121569,.728167,.244025,0,.00392157,.781215,.333454,0,.129412,.825,.423586,0,.254902,.855893,.516793,0,.380392,.880491,.608846,0,.505882,.910305,.695505,0,.631373,.94109,.779067,.223528,.756863,.967873,.858572,.473521,.882353,.986815,.933211,.751583,1,1,1,.999997]},{ColorSpace:"Lab",Name:"erdc_marine2gold_BW",RGBPoints:[-1,1.11641e-7,0,162551e-11,-.87451,.0413146,.0619808,.209857,-.74902,.0185557,.101341,.350684,-.623529,.00486405,.149847,.461054,-.498039,.0836345,.210845,.517906,-.372549,.173222,.276134,.541793,-.247059,.259857,.343877,.535869,-.121569,.362299,.408124,.504293,.00392157,.468266,.468276,.468257,.129412,.582781,.527545,.374914,.254902,.691591,.585251,.274266,.380392,.784454,.645091,.247332,.505882,.862299,.710383,.27518,.631373,.920863,.782923,.351563,.756863,.955792,.859699,.533541,.882353,.976162,.93433,.780671,1,1,1,.999983]},{ColorSpace:"Lab",Name:"erdc_blue2gold_BW",RGBPoints:[-1,0,0,0,-.87451,.0742735,.0440331,.230013,-.74902,.125276,.0258685,.415826,-.623529,.143879,.0163031,.591346,-.498039,.212261,.0627855,.705239,-.372549,.306048,.141178,.763636,-.247059,.391537,.232286,.773263,-.121569,.461734,.336633,.708321,.00392157,.54209,.427581,.590007,.129412,.61704,.508623,.460978,.254902,.702703,.579586,.309117,.380392,.790336,.644811,.170397,.505882,.870173,.710733,.117134,.631373,.93656,.781991,.157144,.756863,.965672,.862068,.409836,.882353,.985751,.936296,.714162,1,1,1,.999999]},{ColorSpace:"Lab",Name:"erdc_sapphire2gold_BW",RGBPoints:[-1,.107704,.107708,.107694,-.87451,.1851,.112354,.308554,-.74902,.236782,.114233,.48788,-.623529,.28296,.126187,.639464,-.498039,.344787,.171643,.739713,-.372549,.413325,.242371,.76913,-.247059,.481863,.3131,.719841,-.121569,.550402,.383829,.612222,.00392157,.61894,.454558,.51126,.129412,.687478,.525287,.39993,.254902,.756017,.596016,.289923,.380392,.824555,.666745,.255498,.505882,.892979,.736822,.27696,.631373,.938851,.804966,.351734,.756863,.966491,.874853,.53572,.882353,.982105,.94153,.782579,1,1,1,.999986]},{ColorSpace:"Lab",Name:"erdc_red2purple_BW",RGBPoints:[-1,0,0,0,-.87451,.167793,.0166271,.0431278,-.74902,.262608,.0107595,.0791181,-.623529,.351902,.0101858,.100926,-.498039,.441257,.0160835,.131919,-.372549,.5221,.0555972,.195625,-.247059,.593852,.104294,.310234,-.121569,.654628,.158115,.448486,.00392157,.707443,.220914,.570253,.129412,.749504,.293268,.67897,.254902,.781587,.370517,.779269,.380392,.809951,.451099,.855831,.505882,.84424,.531462,.900451,.631373,.865174,.620901,.91606,.756863,.875041,.714054,.910284,.882353,.880764,.80554,.896276,1,.887572,.887591,.887556]},{ColorSpace:"Lab",Name:"erdc_purple2pink_BW",RGBPoints:[-1,0,0,0,-.87451,.117562,.0291202,.175876,-.74902,.178368,.0458476,.285454,-.623529,.237731,.0680173,.387717,-.498039,.300877,.0956291,.484802,-.372549,.370929,.136858,.554985,-.247059,.449033,.189273,.58863,-.121569,.529971,.245796,.598587,.00392157,.609914,.300643,.610244,.129412,.697079,.351286,.616371,.254902,.785858,.401991,.617376,.380392,.862517,.45745,.64463,.505882,.91359,.525462,.705336,.631373,.932583,.61064,.767412,.756863,.922478,.706966,.817522,.882353,.901302,.803071,.856311,1,.887571,.887591,.887549]},{ColorSpace:"Lab",Name:"erdc_pbj_lin",RGBPoints:[-1,0,0,0,-.87451,.091821,.0611476,.10617,-.74902,.160311,.0900022,.192713,-.623529,.22484,.12126,.272128,-.498039,.291263,.157469,.340828,-.372549,.360015,.200388,.388903,-.247059,.437497,.250058,.387201,-.121569,.512636,.304969,.355955,.00392157,.582603,.360874,.33488,.129412,.655126,.416374,.306351,.254902,.725889,.473329,.279051,.380392,.778125,.537928,.302697,.505882,.815894,.606931,.382431,.631373,.839159,.679308,.497608,.756863,.854748,.751666,.631792,.882353,.869483,.822508,.768592,1,.887572,.887589,.887565]},{ColorSpace:"Lab",Name:"erdc_blue2green_muted",RGBPoints:[-1,.107704,.107708,.107695,-.87451,.141522,.13066,.270741,-.74902,.180123,.146119,.42308,-.623529,.210161,.169674,.551795,-.498039,.239701,.212939,.634969,-.372549,.253916,.282947,.653641,-.247059,.242791,.366933,.608521,-.121569,.226302,.446776,.52693,.00392157,.236237,.514689,.458798,.129412,.274641,.577589,.376069,.254902,.349625,.633993,.288131,.380392,.4437,.683677,.260497,.505882,.536247,.731214,.285424,.631373,.628472,.777128,.349151,.756863,.718259,.819287,.496825,.882353,.804768,.856164,.703299,1,.887571,.887591,.887548]},{ColorSpace:"Lab",Name:"erdc_blue2green_BW",RGBPoints:[-1,3.63578e-7,0,529374e-11,-.87451,.0539915,.0577948,.212806,-.74902,.0620393,.0758942,.388959,-.623529,.0697499,.102032,.54177,-.498039,.113295,.156156,.64334,-.372549,.152047,.243196,.670283,-.247059,.158096,.344084,.622864,-.121569,.151142,.43922,.532767,.00392157,.17155,.521588,.457719,.129412,.225861,.599141,.363997,.254902,.32328,.67007,.259083,.380392,.442344,.733697,.223754,.505882,.558409,.794941,.257411,.631373,.673875,.854344,.340822,.756863,.787244,.909326,.524717,.882353,.896483,.958063,.775914,1,1,1,.999982]},{ColorSpace:"Lab",Name:"GREEN-WHITE_LINEAR",RGBPoints:[-1,0,0,0,-.87451,0,.062745,0,-.74902,0,.12549,0,-.623529,0,.188235,0,-.498039,0,.25098,0,-.372549,0,.313725,0,-.247059,0,.376471,0,-.121569,.094118,.439216,0,.00392157,.196078,.501961,0,.129412,.294118,.564706,0,.254902,.396078,.627451,0,.380392,.498039,.690196,0,.505882,.6,.752941,.145098,.631373,.701961,.815686,.364706,.756863,.8,.878431,.580392,.882353,.901961,.941176,.796078,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_green2yellow_BW",RGBPoints:[-1,0,0,0,-.87451,0,.105542,.0603919,-.74902,0,.159454,.104148,-.623529,0,.219502,.15542,-.498039,0,.282276,.203811,-.372549,0,.346331,.235652,-.247059,0,.411765,.235428,-.121569,0,.477177,.217977,.00392157,.0593644,.541635,.21361,.129412,.233081,.604722,.210591,.254902,.369803,.664942,.226536,.380392,.498446,.722367,.288237,.505882,.601929,.782244,.380815,.631373,.703207,.840497,.512134,.756863,.803186,.896433,.674462,.882353,.903834,.950266,.846715,1,1,1,.999981]},{ColorSpace:"Lab",Name:"blue2cyan",RGBPoints:[-1,0,0,0,-.87451,0,.152941,.364706,-.74902,0,.254902,.470588,-.623529,0,.34902,.572549,-.498039,0,.443137,.670588,-.372549,0,.537255,.772549,-.247059,0,.627451,.870588,-.121569,0,.717647,.964706,.00392157,.0784314,.772549,1,.129412,.207843,.858824,1,.254902,.32549,.941176,1,.380392,.45098,1,1,.505882,.560784,1,1,.631373,.662745,1,1,.756863,.760784,1,1,.882353,.870588,1,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_blue2cyan_BW",RGBPoints:[-1,4.05298e-7,0,59012e-10,-.87451,.0207526,.0740933,.18093,-.74902,0,.121033,.30343,-.623529,0,.166892,.416095,-.498039,0,.216768,.524796,-.372549,.0164769,.275471,.608585,-.247059,.0544527,.344824,.659267,-.121569,.0880643,.419118,.688675,.00392157,.127938,.492556,.720256,.129412,.149476,.566946,.756918,.254902,.188961,.641333,.792122,.380392,.245482,.715336,.827609,.505882,.329216,.786235,.874761,.631373,.453558,.852803,.918466,.756863,.626281,.910493,.954,.882353,.82257,.958709,.980146,1,1,1,.999989]},{ColorSpace:"Lab",Name:"erdc_blue_BW",RGBPoints:[-1,0,0,0,-.87451,.0425591,.0763529,.150682,-.74902,.0569472,.119154,.275403,-.623529,.0635978,.164772,.395427,-.498039,.0774342,.213851,.510014,-.372549,.106815,.267034,.615102,-.247059,.122093,.324649,.720068,-.121569,.160851,.387068,.806956,.00392157,.213754,.453516,.878012,.129412,.26722,.524656,.932436,.254902,.326844,.599279,.968038,.380392,.403403,.674712,.984784,.505882,.499703,.745519,1,.631373,.615055,.813983,1,.756863,.74405,.879228,1,.882353,.877909,.941913,1,1,1,1,.999996]},{ColorSpace:"Lab",Name:"BLUE-WHITE",RGBPoints:[-1,0,0,0,-.87451,0,0,.082353,-.74902,0,0,.168627,-.623529,0,0,.254902,-.498039,0,0,.337255,-.372549,0,0,.423529,-.247059,0,0,.509804,-.121569,0,.101961,.592157,.00392157,0,.203922,.678431,.129412,0,.301961,.764706,.254902,0,.403922,.85098,.380392,0,.505882,.933333,.505882,0,.603922,1,.631373,.254902,.705882,1,.756863,.509804,.807843,1,.882353,.764706,.905882,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_purple_BW",RGBPoints:[-1,4.264e-8,0,6.20844e-7,-.87451,.100579,.0593111,.145666,-.74902,.167794,.0889224,.254953,-.623529,.231446,.123339,.360511,-.498039,.296699,.163027,.461278,-.372549,.363211,.209286,.55306,-.247059,.431136,.260776,.637195,-.121569,.498202,.320012,.705799,.00392157,.567456,.380459,.778091,.129412,.629381,.445284,.8448,.254902,.688373,.517374,.895694,.380392,.74891,.590906,.93976,.505882,.805017,.667956,.977626,.631373,.850914,.752618,.992396,.756863,.89724,.838454,.994093,.882353,.948461,.922603,.994449,1,1,1,.999967]},{ColorSpace:"Lab",Name:"erdc_magenta_BW",RGBPoints:[-1,0,0,254023e-10,-.87451,.128696,.0456782,.11635,-.74902,.228133,.0476299,.201452,-.623529,.327273,.0374065,.282107,-.498039,.420953,.0408166,.35709,-.372549,.511562,.0642203,.430511,-.247059,.599552,.102686,.504257,-.121569,.684646,.150536,.579429,.00392157,.765817,.205978,.656062,.129412,.839176,.27229,.731807,.254902,.89536,.357594,.797309,.380392,.930238,.457825,.846984,.505882,.945921,.564536,.880571,.631373,.948995,.670753,.902279,.756863,.947124,.772819,.918171,.882353,.947265,.869424,.934352,1,.954719,.95475,.954726]},{ColorSpace:"Lab",Name:"magenta",RGBPoints:[-1,0,0,0,-.87451,.364706,0,.152941,-.74902,.470588,0,.254902,-.623529,.572549,0,.34902,-.498039,.670588,0,.443137,-.372549,.772549,0,.537255,-.247059,.870588,0,.627451,-.121569,.964706,0,.717647,.00392157,1,.0784314,.772549,.129412,1,.207843,.858824,.254902,1,.32549,.941176,.380392,1,.45098,1,.505882,1,.560784,1,.631373,1,.662745,1,.756863,1,.760784,1,.882353,1,.870588,1,1,1,1,1]},{ColorSpace:"Lab",Name:"RED-PURPLE",RGBPoints:[-1,0,0,0,-.87451,.188235,0,.007843,-.74902,.345098,0,.035294,-.623529,.439216,0,.098039,-.498039,.533333,0,.152941,-.372549,.627451,.015686,.211765,-.247059,.721569,.031373,.266667,-.121569,.8,.047059,.329412,.00392157,.862745,.047059,.403922,.129412,.941176,.062745,.466667,.254902,.988235,.078431,.54902,.380392,.988235,.141176,.643137,.505882,.988235,.25098,.729412,.631373,.988235,.376471,.811765,.756863,.988235,.54902,.886275,.882353,.988235,.752941,.952941,1,.996078,.996078,.996078]},{ColorSpace:"Lab",Name:"erdc_red_BW",RGBPoints:[-1,0,0,0,-.87451,.147204,.0480135,.0401815,-.74902,.253411,.0617478,.0301333,-.623529,.356059,.0746331,.0446897,-.498039,.457731,.0934935,.0636931,-.372549,.557199,.122714,.0860013,-.247059,.665179,.144238,.105585,-.121569,.763833,.187056,.138326,.00392157,.847035,.254558,.189407,.129412,.905663,.345937,.258215,.254902,.941431,.447111,.346277,.380392,.962608,.546927,.457571,.505882,.987833,.637276,.569944,.631373,.994202,.732176,.687958,.756863,.993304,.826268,.800567,.882353,.994413,.917205,.906393,1,1,1,.999979]},{ColorSpace:"Lab",Name:"RED_TEMPERATURE",RGBPoints:[-1,0,0,0,-.87451,.090196,0,0,-.74902,.180392,0,0,-.623529,.270588,0,0,-.498039,.360784,0,0,-.372549,.45098,0,0,-.247059,.545098,0,0,-.121569,.635294,0,0,.00392157,.72549,.058824,0,.129412,.815686,.176471,0,.254902,.905882,.294118,0,.380392,1,.411765,0,.505882,1,.533333,.027451,.631373,1,.65098,.27451,.756863,1,.768627,.521569,.882353,1,.886275,.768627,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_orange_BW",RGBPoints:[-1,0,0,253806e-10,-.87451,.135871,.0593824,0,-.74902,.224328,.0907216,0,-.623529,.318083,.119647,0,-.498039,.414443,.150246,0,-.372549,.511077,.184884,0,-.247059,.605501,.226033,0,-.121569,.695274,.275491,0,.00392157,.777826,.334445,0,.129412,.851498,.402441,0,.254902,.915899,.47759,602975e-9,.380392,.971984,.557882,.0361443,.505882,1,.641287,.135967,.631373,1,.725198,.27997,.756863,1,.808205,.438135,.882353,1,.89306,.587036,1,1,.977928,.721599]},{ColorSpace:"Lab",Name:"heated_object",RGBPoints:[-1,0,0,0,-.87451,.34902,.0862745,0,-.74902,.45098,.172549,0,-.623529,.52549,.231373,0,-.498039,.580392,.278431,0,-.372549,.623529,.313725,0,-.247059,.670588,.352941,0,-.121569,.717647,.392157,0,.00392157,.772549,.439216,0,.129412,.839216,.494118,0,.254902,.901961,.541176,0,.380392,.968627,.6,0,.505882,1,.658824,0,.631373,1,.721569,0,.756863,1,.827451,.298039,.882353,1,.976471,.72549,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_gold_BW",RGBPoints:[-1,0,0,190933e-10,-.87451,.128363,.0636265,0,-.74902,.193795,.111057,0,-.623529,.25976,.15987,0,-.498039,.328546,.210589,0,-.372549,.399726,.26332,0,-.247059,.472969,.318261,0,-.121569,.546245,.375827,0,.00392157,.61745,.436719,0,.129412,.685545,.501113,0,.254902,.749578,.568799,0,.380392,.80962,.6394,0,.505882,.865572,.712699,.10257,.631373,.917709,.787569,.233665,.756863,.966914,.863138,.369608,.882353,1,.939405,.496104,1,.999225,1,.612275]},{ColorSpace:"Lab",Name:"erdc_brown_BW",RGBPoints:[-1,3.3216e-7,0,483629e-11,-.87451,.14693,.0518172,0,-.74902,.225806,.0814996,0,-.623529,.301681,.111452,0,-.498039,.370487,.150664,0,-.372549,.43108,.199477,0,-.247059,.4849,.255107,0,-.121569,.536798,.313486,0,.00392157,.59286,.371167,0,.129412,.653119,.428135,0,.254902,.714589,.485917,.0379541,.380392,.774667,.54565,.116634,.505882,.831222,.608047,.183895,.631373,.880305,.674199,.260298,.756863,.922314,.742472,.367086,.882353,.959408,.811222,.497258,1,.993548,.875183,.622093]},{ColorSpace:"Lab",Name:"copper_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0784314,.0501961,.0313725,-.74902,.156863,.100392,.0627451,-.623529,.235294,.150588,.0941176,-.498039,.313725,.200784,.12549,-.372549,.392157,.25098,.156863,-.247059,.470588,.301176,.188235,-.121569,.54902,.351373,.219608,.00392157,.627451,.401569,.25098,.129412,.705882,.451765,.282353,.254902,.784314,.501961,.313725,.380392,.862745,.552157,.345098,.505882,.941176,.602353,.376471,.631373,1,.652549,.407843,.756863,1,.702745,.439216,.882353,1,.752941,.470588,1,1,.8,.5]},{ColorSpace:"Lab",Name:"pink_Matlab",RGBPoints:[-1,0,0,0,-.87451,.312416,.204524,.204524,-.74902,.441822,.289241,.289241,-.623529,.54112,.354246,.354246,-.498039,.624831,.409048,.409048,-.372549,.698582,.45733,.45733,-.247059,.764404,.502282,.500979,-.121569,.791292,.591516,.54112,.00392157,.817297,.66895,.578481,.129412,.842499,.738308,.613572,.254902,.866968,.801687,.646762,.380392,.890766,.86041,.678329,.505882,.913944,.913944,.711254,.631373,.936549,.936549,.79459,.756863,.958621,.958621,.869979,.882353,.980196,.980196,.939336,1,1,1,1]},{ColorSpace:"Lab",Name:"bone_Matlab",RGBPoints:[-1,0,0,0,-.87451,.054902,.054902,.075817,-.74902,.109804,.109804,.151634,-.623529,.164706,.164706,.227451,-.498039,.219608,.219608,.303268,-.372549,.27451,.27451,.379085,-.247059,.329412,.329902,.454412,-.121569,.384314,.405719,.509314,.00392157,.439216,.481536,.564216,.129412,.494118,.557353,.619118,.254902,.54902,.63317,.67402,.380392,.603922,.708987,.728922,.505882,.660294,.783824,.783824,.631373,.746569,.838725,.838725,.756863,.832843,.893627,.893627,.882353,.919118,.948529,.948529,1,1,1,1]},{ColorSpace:"Lab",Name:"gray_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0627451,.0627451,.0627451,-.74902,.12549,.12549,.12549,-.623529,.188235,.188235,.188235,-.498039,.25098,.25098,.25098,-.372549,.313725,.313725,.313725,-.247059,.376471,.376471,.376471,-.121569,.439216,.439216,.439216,.00392157,.501961,.501961,.501961,.129412,.564706,.564706,.564706,.254902,.627451,.627451,.627451,.380392,.690196,.690196,.690196,.505882,.752941,.752941,.752941,.631373,.815686,.815686,.815686,.756863,.878431,.878431,.878431,.882353,.941176,.941176,.941176,1,1,1,1]},{ColorSpace:"Lab",Name:"Purples",RGBPoints:[-1,.247059,0,.490196,-.87451,.288397,.07677,.525629,-.74902,.32975,.153587,.561092,-.623529,.373057,.236263,.600461,-.498039,.416363,.319,.639923,-.372549,.459669,.405613,.685198,-.247059,.503345,.491534,.730058,-.121569,.562399,.54862,.757616,.00392157,.621453,.606075,.785544,.129412,.680508,.674971,.824914,.254902,.739562,.743406,.863899,.380392,.798616,.800492,.893426,.505882,.85684,.856655,.922491,.631373,.898178,.894056,.942176,.756863,.938654,.930919,.961646,.882353,.964245,.958478,.977393,1,.988235,.984314,.992157]},{ColorSpace:"Lab",Name:"Blues",RGBPoints:[-1,.031373,.188235,.419608,-.87451,.031373,.253195,.516063,-.74902,.031757,.318139,.612149,-.623529,.080969,.38113,.661361,-.498039,.130427,.444152,.710327,-.372549,.195386,.509112,.743791,-.247059,.260715,.573841,.777209,-.121569,.341423,.628958,.808704,.00392157,.422745,.684075,.839892,.129412,.523137,.739193,.861546,.254902,.622684,.793464,.883429,.380392,.701423,.826928,.910988,.505882,.778685,.8603,.937993,.631373,.825928,.891795,.953741,.756863,.87328,.923291,.969489,.882353,.922491,.954787,.985236,1,.968627,.984314,1]},{ColorSpace:"Lab",Name:"Greens",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546082,.271326,-.372549,.197232,.609073,.31857,-.247059,.257255,.671742,.365859,-.121569,.357647,.720953,.415071,.00392157,.45767,.769919,.465021,.129412,.546251,.811257,.537855,.254902,.634295,.852211,.610688,.380392,.709097,.883706,.683522,.505882,.78316,.914833,.755894,.631373,.842215,.938454,.818885,.756863,.899977,.961538,.880692,.882353,.935409,.975317,.92203,1,.968627,.988235,.960784]},{ColorSpace:"Lab",Name:"PuBu",RGBPoints:[-1,.301961,0,.294118,-.87451,.404321,.029527,.390573,-.74902,.50599,.059592,.486782,-.623529,.519769,.158016,.551742,-.498039,.533456,.256194,.616301,-.372549,.54133,.33887,.655671,-.247059,.54902,.421592,.695087,-.121569,.54902,.506236,.736424,.00392157,.550127,.590573,.777701,.129412,.585559,.665375,.81707,.254902,.622145,.739023,.855825,.380392,.687105,.784298,.879446,.505882,.752065,.829758,.903253,.631373,.817024,.87897,.930811,.756863,.880907,.927213,.957832,.882353,.926182,.958708,.975548,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"BuPu",RGBPoints:[-1,.007843,.219608,.345098,-.87451,.01178,.286536,.449427,-.74902,.015702,.35328,.553479,-.623529,.01767,.396586,.622376,-.498039,.021115,.4402,.690688,-.372549,.11757,.503191,.722184,-.247059,.214625,.565859,.753633,-.121569,.336671,.615071,.78316,.00392157,.457978,.663975,.812503,.129412,.556401,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821638,.903068,.631373,.873387,.864944,.92669,.756863,.927536,.907605,.949988,.882353,.964937,.9391,.967705,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGn",RGBPoints:[-1,.031373,.25098,.505882,-.87451,.031373,.329719,.590527,-.74902,.031911,.408397,.674787,-.623529,.100807,.479262,.710219,-.498039,.169704,.550219,.745744,-.372549,.238601,.62699,.787082,-.247059,.307958,.703114,.826759,-.121569,.39654,.752326,.797232,.00392157,.485121,.801046,.767705,.129412,.573702,.83451,.738178,.254902,.661592,.867743,.711034,.380392,.732457,.895302,.74253,.505882,.801845,.922307,.774579,.631373,.841215,.938055,.817885,.756863,.880907,.95391,.861084,.882353,.926182,.971626,.902422,1,.968627,.988235,.941176]},{ColorSpace:"Lab",Name:"GnBu",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546175,.272095,-.372549,.197232,.615071,.368551,-.247059,.256609,.683276,.464867,-.121569,.329443,.722645,.555417,.00392157,.403137,.762138,.645413,.129412,.503529,.805444,.718247,.254902,.603922,.848597,.790465,.380392,.704314,.887966,.847551,.505882,.802307,.926321,.903714,.631373,.851519,.944037,.941115,.756863,.899977,.961538,.976901,.882353,.935409,.975317,.984775,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"GnBuPu",RGBPoints:[-1,.003922,.27451,.211765,-.87451,.003922,.349312,.280661,-.74902,.003937,.423852,.349773,-.623529,.005905,.46519,.446228,-.498039,.009443,.506344,.542837,-.372549,.111803,.535871,.649135,-.247059,.214025,.565859,.753633,-.121569,.310481,.615071,.78316,.00392157,.407797,.663975,.812503,.129412,.531811,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821176,.902884,.631373,.873387,.854641,.922568,.756863,.927536,.888535,.942361,.882353,.964937,.929873,.964014,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGnYl",RGBPoints:[-1,.031373,.113725,.345098,-.87451,.088458,.159,.463206,-.74902,.145052,.204567,.5807,-.623529,.139146,.287243,.620069,-.498039,.13318,.370196,.659562,-.372549,.123337,.470588,.706805,-.247059,.115386,.570335,.753126,-.121569,.186251,.643168,.761,.00392157,.258716,.71514,.768074,.129412,.380761,.760415,.750358,.254902,.503576,.806075,.732795,.380392,.645306,.861192,.719016,.505882,.783899,.91511,.705606,.631373,.858701,.944637,.6997,.756863,.931349,.973303,.698424,.882353,.966782,.987082,.777163,1,1,1,.85098]},{ColorSpace:"Lab",Name:"PuRd",RGBPoints:[-1,.286275,0,.415686,-.87451,.38273,.001968,.441276,-.74902,.479231,.003922,.466774,-.623529,.581592,.003922,.480554,-.498039,.683799,.00549,.494887,-.372549,.776317,.105882,.544098,-.247059,.867866,.206321,.592618,-.121569,.919047,.308681,.612303,.00392157,.968812,.411226,.632603,.129412,.974717,.519493,.671972,.254902,.980546,.626451,.71065,.380392,.984483,.701253,.732303,.505882,.988328,.77504,.755617,.631373,.990296,.828189,.812703,.756863,.992372,.880907,.869035,.882353,.996309,.926182,.912341,1,1,.968627,.952941]},{ColorSpace:"Lab",Name:"RdPu",RGBPoints:[-1,.403922,0,.121569,-.87451,.500377,0,.192434,-.74902,.596909,277e-6,.263037,-.623529,.703206,.035709,.300438,-.498039,.808612,.071296,.338854,-.372549,.857824,.116571,.441215,-.247059,.905513,.163552,.54293,-.121569,.889765,.281661,.617732,.00392157,.873156,.39897,.691611,.129412,.82985,.491488,.736886,.254902,.789081,.583237,.781853,.380392,.810734,.656071,.819254,.505882,.833126,.729181,.85684,.631373,.870527,.80792,.898178,.756863,.907605,.884398,.938331,.882353,.9391,.921799,.958016,1,.968627,.956863,.976471]},{ColorSpace:"Lab",Name:"Oranges",RGBPoints:[-1,.498039,.152941,.015686,-.87451,.57481,.182468,.013718,-.74902,.651765,.212042,.011734,-.623529,.752157,.247474,.007797,-.498039,.851719,.283368,.004475,-.372549,.898962,.348328,.039908,-.247059,.945652,.413426,.076401,-.121569,.969273,.484291,.157109,.00392157,.992157,.554971,.238185,.129412,.992157,.619931,.330704,.254902,.992157,.684967,.423837,.380392,.992157,.751895,.532103,.505882,.992249,.817716,.639354,.631373,.994218,.861023,.725967,.756863,.996186,.903576,.810965,.882353,.998155,.933103,.868051,1,1,.960784,.921569]},{ColorSpace:"Lab",Name:"Reds",RGBPoints:[-1,.403922,0,.05098,-.87451,.525967,.029527,.066728,-.74902,.647643,.058962,.082476,-.623529,.722445,.076678,.098224,-.498039,.797186,.095194,.114187,-.372549,.868051,.164091,.143714,-.247059,.937809,.233541,.173933,-.121569,.96143,.326059,.232987,.00392157,.984375,.418147,.292657,.129412,.986344,.496886,.371396,.254902,.988235,.575702,.450673,.380392,.988235,.656409,.543191,.505882,.98842,.736747,.635894,.631373,.992357,.809581,.732349,.756863,.996186,.880692,.826759,.882353,.998155,.92203,.885813,1,1,.960784,.941176]},{ColorSpace:"Lab",Name:"RdOr",RGBPoints:[-1,.498039,0,0,-.87451,.6004,0,0,-.74902,.702514,738e-6,477e-6,-.623529,.773379,.095225,.061499,-.498039,.843875,.189865,.12283,-.372549,.891119,.294195,.203537,-.247059,.937855,.397924,.283137,-.121569,.963445,.476663,.316601,.00392157,.988297,.555771,.351665,.129412,.990265,.646321,.436309,.254902,.992157,.735256,.519646,.380392,.992157,.784468,.570827,.505882,.992249,.833218,.623483,.631373,.994218,.872587,.706159,.756863,.996186,.911419,.788189,.882353,.998155,.940946,.859054,1,1,.968627,.92549]},{ColorSpace:"Lab",Name:"BrOrYl",RGBPoints:[-1,.4,.145098,.023529,-.87451,.500392,.174625,.019592,-.74902,.600784,.204291,.015656,-.623529,.701176,.251534,.011719,-.498039,.800984,.299146,.008397,-.372549,.863975,.370012,.043829,-.247059,.926321,.441107,.0794,-.121569,.961753,.521815,.120738,.00392157,.996078,.602645,.163122,.129412,.996078,.68729,.237924,.254902,.996078,.771011,.314879,.380392,.996078,.832034,.444798,.505882,.996171,.892042,.572595,.631373,.998139,.931411,.65724,.756863,1,.969489,.741669,.882353,1,.985236,.822376,1,1,1,.898039]},{ColorSpace:"Lab",Name:"RdOrYl",RGBPoints:[-1,.501961,0,.14902,-.87451,.622038,0,.14902,-.74902,.741761,4e-4,.148866,-.623529,.816563,.05158,.129181,-.498039,.890965,.10356,.110235,-.372549,.940177,.205921,.137793,-.247059,.988281,.308789,.165536,-.121569,.99025,.432803,.200969,.00392157,.992218,.555217,.236278,.129412,.994187,.628051,.267774,.254902,.996078,.701038,.301269,.380392,.996078,.777809,.383945,.505882,.996171,.852826,.466621,.631373,.998139,.892195,.549296,.756863,1,.931349,.632188,.882353,1,.966782,.7188,1,1,1,.8]},{ColorSpace:"Lab",Name:"CIELab_blue2red",RGBPoints:[-1,0,.6,.74902,1,.76863,.46667,.34118]},{ColorSpace:"Lab",Name:"blue2yellow",RGBPoints:[-1,0,0,1,0,.5,.5,.5,1,1,1,0]},{ColorSpace:"Lab",Name:"erdc_blue2gold",RGBPoints:[-1,.175119,.0438468,1,-.874016,.22383,.159771,.94557,-.748031,.27254,.233611,.891216,-.622047,.321251,.296526,.836857,-.496063,.369962,.354296,.782359,-.370079,.418672,.409139,.72754,-.244094,.467383,.462152,.672148,-.11811,.51609,.51396,.615825,.00787402,.572863,.55452,.559172,.133858,.630269,.593822,.517729,.259843,.689588,.624668,.47446,.385827,.745394,.656113,.428638,.511811,.798624,.688104,.379105,.637795,.849926,.720593,.323834,.76378,.899765,.753543,.258657,.889764,.948487,.78692,.171778,1,.990413,.816451,.00729848]},{ColorSpace:"Lab",Name:"erdc_blue2yellow",RGBPoints:[-1,.0830122,0,.495617,-.87451,.141973,.0551288,.57363,-.74902,.193048,.110258,.604561,-.623529,.234231,.165386,.57643,-.498039,.275413,.220515,.548299,-.372549,.316596,.275644,.520169,-.247059,.357778,.330773,.492038,-.121569,.398961,.385901,.463908,.00392157,.449929,.438487,.426815,.129412,.511572,.488299,.379944,.254902,.581222,.53603,.325741,.380392,.650871,.583761,.271538,.505882,.720521,.631493,.217335,.631373,.79017,.679224,.163132,.756863,.85982,.726955,.108929,.882353,.910254,.774159,.14112,1,.927513,.81759,.306289]},{ColorSpace:"Lab",Name:"erdc_cyan2orange",RGBPoints:[-1,.0471513,.213874,.414329,-.87451,.0674702,.256648,.439027,-.74902,.0959957,.299331,.462089,-.623529,.132428,.341872,.483212,-.498039,.188743,.38277,.500597,-.372549,.268511,.420229,.512179,-.247059,.352945,.455602,.519101,-.121569,.43893,.489368,.521538,.00392157,.522445,.522495,.522436,.129412,.600089,.555682,.53205,.254902,.67988,.587981,.539163,.380392,.761011,.619586,.544439,.505882,.84278,.650741,.548567,.631373,.910713,.687347,.557822,.756863,.952232,.734972,.577775,.882353,.975642,.789858,.604868,1,.990752,.843643,.632857]},{ColorSpace:"Lab",Name:"erdc_purple2green",RGBPoints:[-1,.235006,.0483128,.530899,-.87451,.302968,.108419,.552391,-.74902,.360241,.166059,.569502,-.623529,.406746,.226782,.579373,-.498039,.444073,.28964,.582094,-.372549,.473648,.353774,.577947,-.247059,.497636,.418154,.567911,-.121569,.519086,.481741,.553968,.00392157,.542884,.542914,.542875,.129412,.566303,.603989,.527499,.254902,.595218,.662965,.516857,.380392,.628641,.720701,.510673,.505882,.665373,.777849,.508165,.631373,.704182,.834921,.508303,.756863,.743846,.892328,.50999,.882353,.783158,.950422,.512181,1,.818617,1,.513888]},{ColorSpace:"Lab",Name:"erdc_purple2green_dark",RGBPoints:[-1,.107656,0,.428682,-.87451,.1924,0,.449799,-.74902,.255118,.0648939,.466726,-.623529,.304256,.133066,.476703,-.498039,.343202,.19716,.479793,-.372549,.373876,.260353,.476241,-.247059,.398497,.322872,.466953,-.121569,.420016,.384252,.453785,.00392157,.44319,.443216,.443186,.129412,.465553,.502139,.428233,.254902,.492959,.559151,.417591,.380392,.524654,.615092,.411016,.505882,.55959,.670583,.40779,.631373,.596614,.726102,.406948,.756863,.634544,.782032,.407439,.882353,.672183,.838703,.408237,1,.706131,.892759,.408452]},{ColorSpace:"Lab",Name:"coolwarm",RGBPoints:[-1,.229806,.298718,.753683,-.875,.303869,.406535,.844959,-.75,.383013,.509419,.917388,-.625,.466667,.604563,.968155,-.5,.552953,.688929,.995376,-.375,.639176,.7596,.998151,-.25,.722193,.813953,.976575,-.125,.798692,.849786,.931689,0,.865395,.86541,.865396,.125,.924128,.827385,.774508,.25,.958853,.769768,.678008,.375,.969954,.694267,.579375,.5,.958003,.602842,.481776,.625,.923945,.497309,.38797,.75,.869187,.378313,.300267,.875,.795632,.241284,.220526,1,.705673,.0155562,.150233]},{ColorSpace:"Lab",Name:"BuRd",RGBPoints:[-1,.019608,.188235,.380392,-.87451,.088504,.321107,.564937,-.74902,.163399,.444983,.697501,-.623529,.247059,.555709,.754095,-.498039,.420684,.676432,.818685,-.372549,.606459,.789773,.880277,-.247059,.761476,.868512,.924567,-.121569,.878047,.925721,.951942,.00392157,.969089,.966474,.964937,.129412,.983852,.897578,.846828,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"Spectral_lowBlue",RGBPoints:[-1,.368627,.309804,.635294,-.87451,.260361,.450058,.70173,-.74902,.248058,.591311,.717186,-.623529,.376009,.734025,.658132,-.498039,.537947,.814764,.64506,-.372549,.702345,.879585,.636678,-.247059,.84752,.938639,.607151,-.121569,.940408,.976163,.656055,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.937793,.398539,.270127,.756863,.861515,.282891,.299654,.882353,.746482,.144637,.288812,1,.619608,.003922,.258824]},{ColorSpace:"Lab",Name:"GnRP",RGBPoints:[-1,0,.266667,.105882,-.87451,.066436,.394617,.174779,-.74902,.168858,.524567,.25767,-.623529,.323875,.657439,.361015,-.498039,.504883,.772318,.506344,-.372549,.678431,.870127,.654902,-.247059,.803922,.921799,.780392,-.121569,.897116,.951942,.882814,.00392157,.967397,.965936,.967474,.129412,.928028,.879815,.930565,.254902,.866052,.780777,.882891,.380392,.77501,.665129,.821376,.505882,.675663,.537024,.737024,.631373,.57847,.396155,.645982,.756863,.492349,.223914,.547559,.882353,.375548,.096886,.423299,1,.25098,0,.294118]},{ColorSpace:"Lab",Name:"GYPi",RGBPoints:[-1,.152941,.392157,.098039,-.87451,.246444,.505344,.117724,-.74902,.351942,.614533,.161399,-.623529,.474971,.717878,.240138,-.498039,.611995,.811226,.392849,-.372549,.746328,.893118,.565321,-.247059,.859516,.94233,.747405,-.121569,.928105,.96386,.875663,.00392157,.969089,.966859,.968012,.129412,.983852,.910265,.948328,.254902,.979239,.833218,.914648,.380392,.949712,.729873,.862976,.505882,.905652,.58293,.763552,.631373,.85521,.410073,.652211,.756863,.793695,.183699,.531642,.882353,.683737,.063899,.420761,1,.556863,.003922,.321569]},{ColorSpace:"Lab",Name:"GnYlRd",RGBPoints:[-1,0,.407843,.215686,-.87451,.063975,.525952,.277201,-.74902,.177932,.633064,.332718,-.623529,.364937,.724106,.379469,-.498039,.527951,.797155,.40223,-.372549,.678431,.862822,.433449,-.247059,.803922,.916955,.514648,-.121569,.909419,.961861,.625067,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.939023,.389927,.245521,.756863,.867666,.239831,.176624,.882353,.762399,.110727,.151326,1,.647059,0,.14902]},{ColorSpace:"Lab",Name:"GBBr",RGBPoints:[-1,0,.235294,.188235,-.87451,.002461,.338639,.301423,-.74902,.055902,.448981,.417609,-.623529,.183852,.56955,.538178,-.498039,.357785,.700115,.660746,-.372549,.540177,.819531,.77624,-.247059,.714879,.890888,.864821,-.121569,.851134,.934564,.922645,.00392157,.960861,.959785,.95694,.129412,.963322,.927797,.83391,.254902,.939946,.868897,.68935,.380392,.883353,.775394,.517109,.505882,.808074,.625836,.324106,.631373,.717647,.476355,.15494,.756863,.592157,.358247,.06882,.882353,.458593,.26436,.031142,1,.329412,.188235,.019608]},{ColorSpace:"Lab",Name:"PuOr",RGBPoints:[-1,.498039,.231373,.031373,-.87451,.62599,.30273,.026451,-.74902,.746943,.387082,.037524,-.623529,.85767,.490427,.071972,-.498039,.936409,.617762,.236371,-.372549,.992695,.743099,.43291,-.247059,.995156,.841523,.63714,-.121569,.985313,.913802,.813687,.00392157,.966244,.966398,.967705,.129412,.889965,.89504,.938178,.254902,.806151,.804306,.894656,.380392,.712649,.688658,.833141,.505882,.594233,.554325,.744637,.631373,.474894,.404229,.652364,.756863,.366628,.217224,.563783,.882353,.266436,.089965,.434833,1,.176471,0,.294118]},{ColorSpace:"Lab",Name:"PRGn",RGBPoints:[-1,.25098,0,.294118,-.87451,.383852,.103345,.431911,-.74902,.497732,.234679,.55371,-.623529,.583852,.40692,.652134,-.498039,.681968,.545175,.742561,-.372549,.7807,.672357,.825221,-.247059,.871742,.788005,.886736,-.121569,.930488,.885198,.932872,.00392157,.966321,.968089,.965859,.129412,.892503,.950865,.877278,.254902,.796078,.91857,.772549,.380392,.670588,.866897,.647059,.505882,.493195,.765398,.496655,.631373,.314187,.649135,.354556,.756863,.15917,.516263,.251211,.882353,.062284,.386621,.170473,1,0,.266667,.105882]},{ColorSpace:"Lab",Name:"PiYG",RGBPoints:[-1,.556863,.003922,.321569,-.87451,.692195,.067897,.427374,-.74902,.797539,.197847,.539177,-.623529,.859054,.424221,.659746,-.498039,.908574,.592618,.770319,-.372549,.951557,.736332,.866205,-.247059,.981084,.839677,.917878,-.121569,.98293,.913802,.949558,.00392157,.96732,.968474,.965629,.129412,.92549,.963552,.869666,.254902,.852441,.939254,.736025,.380392,.739254,.890042,.553941,.505882,.60323,.805536,.382238,.631373,.467282,.711419,.235217,.756863,.344252,.608074,.156478,.882353,.2406,.49827,.116494,1,.152941,.392157,.098039]},{ColorSpace:"Lab",Name:"OrPu",RGBPoints:[-1,.176471,0,.294118,-.87451,.272434,.095963,.444214,-.74902,.373395,.228912,.56932,-.623529,.481661,.415917,.657901,-.498039,.601922,.562937,.750481,-.372549,.718493,.695886,.836986,-.247059,.811995,.811534,.898501,-.121569,.894733,.8995,.940023,.00392157,.969166,.966859,.963629,.129412,.98639,.910265,.803691,.254902,.995002,.835371,.624375,.380392,.992541,.736947,.420146,.505882,.931949,.609458,.224221,.631373,.85075,.483968,.069819,.756863,.740023,.380623,.035371,.882353,.617993,.29827,.026759,1,.498039,.231373,.031373]},{ColorSpace:"Lab",Name:"BrBG",RGBPoints:[-1,.329412,.188235,.019608,-.87451,.467205,.269435,.031911,-.74902,.6,.365629,.074202,-.623529,.72549,.483737,.160323,-.498039,.812995,.635832,.336409,-.372549,.88689,.781238,.527874,-.247059,.943483,.87474,.700115,-.121569,.963168,.929796,.841599,.00392157,.957247,.959938,.959554,.129412,.84406,.932872,.920185,.254902,.70396,.886428,.859285,.380392,.529258,.815071,.770704,.505882,.346251,.691811,.653057,.631373,.175855,.562015,.530642,.756863,.047905,.441446,.410073,.882353,.002307,.33218,.294348,1,0,.235294,.188235]},{ColorSpace:"Lab",Name:"GyRd",RGBPoints:[-1,.101961,.101961,.101961,-.87451,.227451,.227451,.227451,-.74902,.359939,.359939,.359939,-.623529,.502653,.502653,.502653,-.498039,.631373,.631373,.631373,-.372549,.749865,.749865,.749865,-.247059,.843368,.843368,.843368,-.121569,.926105,.926105,.926105,.00392157,.999846,.997232,.995694,.129412,.994925,.908651,.857901,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen",RGBPoints:[-1,.297553,0,.489074,-.87451,.40259,.151146,.567754,-.74902,.516038,.284843,.658231,-.623529,.629783,.423646,.750938,-.498039,.735198,.563697,.835956,-.372549,.82408,.695541,.903582,-.247059,.889091,.807454,.944862,-.121569,.92334,.886917,.951839,.00392157,.921045,.921084,.921003,.129412,.877324,.907455,.845381,.254902,.797649,.849713,.734695,.380392,.691646,.75964,.600532,.505882,.568981,.649159,.453807,.631373,.438945,.529756,.304259,.756863,.30973,.412001,.158303,.882353,.187078,.305111,.00251458,1,.101655,.220836,0]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen_dim",RGBPoints:[-1,.404088,.131038,.592767,-.87451,.486469,.230957,.651243,-.74902,.575165,.339335,.717723,-.623529,.662741,.454332,.784263,-.498039,.742071,.570213,.842918,-.372549,.806935,.678992,.886227,-.247059,.852219,.771315,.90763,-.121569,.873345,.837327,.901572,.00392157,.866783,.86682,.866745,.129412,.82839,.858225,.796812,.254902,.762578,.814287,.700202,.380392,.676429,.744229,.585735,.505882,.577033,.65732,.461526,.631373,.47128,.562476,.33476,.756863,.365461,.467957,.21076,.882353,.264758,.381138,.0878313,1,.182591,.312249,0]},{ColorSpace:"Lab",Name:"erdc_divLow_icePeach",RGBPoints:[-1,.480048,.817441,.998056,-.87451,.425898,.726921,.883187,-.74902,.366682,.629445,.761936,-.623529,.308756,.531002,.640217,-.498039,.258021,.43705,.523433,-.372549,.219244,.352381,.416348,-.247059,.195127,.281032,.322979,-.121569,.186286,.22627,.246525,.00392157,.192352,.19236,.192364,.129412,.255927,.214469,.191756,.254902,.340459,.254426,.206666,.380392,.444655,.309315,.234029,.505882,.565353,.376004,.270969,.631373,.697917,.450748,.314293,.756863,.836657,.529064,.360227,.882353,.972695,.614884,.413123,1,1,.705904,.472699]},{ColorSpace:"Lab",Name:"erdc_divLow_purpleGreen",RGBPoints:[-1,.956034,.666487,.952663,-.87451,.874457,.572698,.936352,-.74902,.753465,.488253,.909063,-.623529,.63309,.413507,.763833,-.498039,.514491,.345878,.620015,-.372549,.405008,.288141,.484376,-.247059,.311388,.241986,.363556,-.121569,.238722,.209044,.263449,.00392157,.192352,.192366,.192362,.129412,.200379,.233201,.168618,.254902,.230151,.291737,.165227,.380392,.279481,.366076,.178607,.505882,.344927,.453267,.205703,.631373,.421554,.549449,.242643,.756863,.503334,.649999,.284377,.882353,.583497,.749672,.324969,1,.650705,.837228,.356264]},{ColorSpace:"Lab",Name:"Haze_green",RGBPoints:[-1,1,.835294,.886275,-.87451,.937255,.756863,.870443,-.74902,.875817,.666376,.857807,-.623529,.778359,.583007,.808134,-.498039,.676253,.494118,.745098,-.372549,.561365,.390123,.682353,-.247059,.438344,.262745,.621496,-.121569,.321133,.141031,.558751,.00392157,.203922,.0217865,.495861,.129412,.265505,.129412,.433261,.254902,.311692,.255338,.37008,.380392,.356282,.377342,.310821,.505882,.39971,.488889,.258243,.631373,.442556,.604357,.205519,.756863,.48671,.71968,.152941,.882353,.529847,.830356,.100944,1,.572549,.933333,.054902]},{ColorSpace:"Lab",Name:"Haze_lime",RGBPoints:[-1,.704034,.784196,1,-.87451,.633111,.691418,.956078,-.74902,.564021,.600606,.912157,-.623529,.496827,.51189,.868235,-.498039,.43157,.425416,.824314,-.372549,.368248,.341347,.780392,-.247059,.306767,.259855,.736471,-.121569,.246862,.181069,.692549,.00392157,.191619,.109542,.648627,.129412,.257404,.194031,.604706,.254902,.321794,.278775,.560784,.380392,.387909,.364617,.516863,.505882,.456569,.451881,.472941,.631373,.527424,.540773,.42902,.756863,.599759,.631427,.385098,.882353,.673065,.723898,.341176,1,.742751,.812252,.3]},{ColorSpace:"RGB",Name:"Haze",RGBPoints:[-1,1,.835294,.996078,-.00392157,.023529,.141176,.498039,.00392157,.015686,.137255,.494118,1,.984314,.764706,0]},{ColorSpace:"Lab",Name:"Haze_cyan",RGBPoints:[-1,.956863,1,.835294,-.87451,.933188,.921714,.760784,-.74902,.870588,.803486,.671605,-.623529,.807843,.684096,.583297,-.498039,.745098,.569208,.494118,-.372549,.682353,.437763,.390123,-.247059,.621496,.288163,.262745,-.121569,.558751,.144517,.141031,.00392157,.495861,.0217865,.0413943,.129412,.433261,.137255,.129412,.254902,.37008,.263181,.255338,.380392,.306318,.381845,.372694,.505882,.243137,.503994,.494263,.631373,.180392,.629484,.619753,.756863,.117647,.754975,.747131,.882353,.054902,.876398,.866812,1,0,.988235,.976471]},{ColorSpace:"Lab",Name:"nic_Edge",RGBPoints:[-1,.191208,.191208,.191208,-.87451,.239484,.00545035,.614821,-.74902,.220593,.0617459,.863547,-.623529,.17509,.278988,.97794,-.498039,.143526,.576069,.998553,-.372549,.166456,.871883,.96594,-.247059,.376202,.993555,.981833,-.121569,.681996,.991297,.999239,.00392157,.954172,.952734,.94374,.129412,.999735,.99301,.662896,.254902,.979399,.991466,.357973,.380392,.968771,.854967,.162659,.505882,.999245,.556697,.144323,.631373,.973959,.26223,.177946,.756863,.852358,.0526707,.222974,.882353,.593889,.00912724,.238855,1,.191208,.191208,.191208]},{ColorSpace:"Lab",Name:"erdc_iceFire_H",RGBPoints:[-1,4.05432e-7,0,590122e-11,-.87451,0,.120401,.302675,-.74902,0,.216583,.524574,-.623529,.0552475,.345025,.6595,-.498039,.128047,.492588,.720288,-.372549,.188955,.641309,.792092,-.247059,.327673,.784935,.873434,-.121569,.60824,.892164,.935547,.00392157,.881371,.912178,.818099,.129412,.951407,.835621,.449279,.254902,.904481,.690489,0,.380392,.85407,.510864,0,.505882,.777093,.33018,88199e-8,.631373,.672862,.139087,.00269398,.756863,.508815,0,0,.882353,.299417,366289e-9,547829e-9,1,.0157519,.00332021,4.55569e-8]},{ColorSpace:"Lab",Name:"erdc_iceFire_L",RGBPoints:[-1,.870485,.913768,.832905,-.87451,.586919,.887865,.934003,-.74902,.31583,.776442,.867858,-.623529,.18302,.632034,.787722,-.498039,.117909,.484134,.713825,-.372549,.0507239,.335979,.654741,-.247059,0,.209874,.511832,-.121569,0,.114689,.28935,.00392157,.0157519,.00332021,4.55569e-8,.129412,.312914,0,0,.254902,.520865,0,0,.380392,.680105,.15255,.0025996,.505882,.785109,.339479,797922e-9,.631373,.857354,.522494,0,.756863,.910974,.699774,0,.882353,.951921,.842817,.478545,1,.881371,.912178,.818099]},{ColorSpace:"RGB",Name:"hsv",RGBPoints:[-1,1,0,0,-.666666,1,0,1,-.333333,0,0,1,0,0,1,1,.33333,0,1,0,.66666,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"hue_L60",RGBPoints:[-1,.964784,.400592,.349549,-.87451,.964915,.372498,.53785,-.74902,.892353,.401039,.759569,-.623529,.79263,.446956,.903017,-.498039,.682208,.49954,.966673,-.372549,.56392,.553082,.968836,-.247059,.442031,.606396,.901601,-.121569,.305499,.65701,.765784,.00392157,.197251,.687914,.620914,.129412,.193882,.701887,.472654,.254902,.249866,.706123,.320005,.380392,.35132,.697417,.202919,.505882,.498097,.669467,.125232,.631373,.637477,.626239,.107431,.756863,.762115,.56872,.155812,.882353,.889434,.481116,.240445,1,.964784,.400592,.349549]},{IndexedColors:[0,0,0,.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,.6509803921568628,.3372549019607843,.1568627450980392],Name:"Spectrum",NanColor:[.6509803921568628,.3372549019607843,.1568627450980392]},{IndexedColors:[.4745098039215686,.09019607843137255,.09019607843137255,.7098039215686275,.00392156862745098,.00392156862745098,.9372549019607843,.2784313725490196,.09803921568627451,.9764705882352941,.5137254901960784,.1411764705882353,1,.7058823529411765,0,1,.8980392156862745,.02352941176470588],Name:"Warm",NanColor:[1,.8980392156862745,.02352941176470588]},{IndexedColors:[.4588235294117647,.6941176470588235,.00392156862745098,.3450980392156863,.5019607843137255,.1607843137254902,.3137254901960784,.8431372549019608,.7490196078431373,.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.6039215686274509,.407843137254902,1,.3725490196078431,.2,.5019607843137255],Name:"Cool",NanColor:[.3725490196078431,.2,.5019607843137255]},{IndexedColors:[.2313725490196079,.407843137254902,.6705882352941176,.1098039215686274,.5843137254901961,.803921568627451,.3058823529411765,.8509803921568627,.9176470588235294,.4509803921568628,.6039215686274509,.8352941176470589,.2588235294117647,.2392156862745098,.6627450980392157,.3137254901960784,.3294117647058823,.5294117647058824,.06274509803921569,.1647058823529412,.3215686274509804],Name:"Blues",NanColor:[.06274509803921569,.1647058823529412,.3215686274509804]},{IndexedColors:[.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.4,.2431372549019608,.7176470588235294,.6352941176470588,.3294117647058823,.8117647058823529,.8705882352941177,.3803921568627451,.807843137254902,.8627450980392157,.3803921568627451,.5843137254901961,.2392156862745098,.06274509803921569,.3215686274509804],Name:"Wild Flower",NanColor:[.2392156862745098,.06274509803921569,.3215686274509804]},{IndexedColors:[.396078431372549,.4862745098039216,.2156862745098039,.4588235294117647,.6941176470588235,.00392156862745098,.6980392156862745,.7294117647058823,.1882352941176471,1,.8980392156862745,.02352941176470588,1,.7058823529411765,0,.9764705882352941,.5137254901960784,.1411764705882353],Name:"Citrus",NanColor:[.9764705882352941,.5137254901960784,.1411764705882353]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (11)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (10)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (9)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (8)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (7)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (6)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.9686274509803922,.9686274509803922,.9686274509803922,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (5)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (4)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9450980392156862,.6392156862745098,.2509803921568627,.9686274509803922,.9686274509803922,.9686274509803922,.6,.5568627450980392,.7647058823529411],Name:"Brewer Diverging Purple-Orange (3)",NanColor:[.6,.5568627450980392,.7647058823529411]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (11)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (10)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (9)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (8)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (7)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (6)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,1,1,.7490196078431373,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (5)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (4)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.9882352941176471,.5529411764705883,.3490196078431372,1,1,.7490196078431373,.6,.8352941176470589,.5803921568627451],Name:"Brewer Diverging Spectral (3)",NanColor:[.6,.8352941176470589,.5803921568627451]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (11)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (10)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (9)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (8)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (7)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (6)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.9607843137254902,.9607843137254902,.9607843137254902,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (5)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (4)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.8470588235294118,.7019607843137254,.396078431372549,.9607843137254902,.9607843137254902,.9607843137254902,.3529411764705883,.7058823529411765,.6745098039215687],Name:"Brewer Diverging Brown-Blue-Green (3)",NanColor:[.3529411764705883,.7058823529411765,.6745098039215687]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.4274509803921568,.1725490196078431,0,.2666666666666667,.1058823529411765],Name:"Brewer Sequential Blue-Green (9)",NanColor:[0,.2666666666666667,.1058823529411765]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (8)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.8,.9254901960784314,.9019607843137255,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (7)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (6)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (5)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1372549019607843,.5450980392156862,.2705882352941176],Name:"Brewer Sequential Blue-Green (4)",NanColor:[.1372549019607843,.5450980392156862,.2705882352941176]},{IndexedColors:[.8980392156862745,.9607843137254902,.9764705882352941,.6,.8470588235294118,.788235294117647,.1725490196078431,.6352941176470588,.3725490196078431],Name:"Brewer Sequential Blue-Green (3)",NanColor:[.1725490196078431,.6352941176470588,.3725490196078431]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.6,.203921568627451,.01568627450980392,.4,.1450980392156863,.02352941176470588],Name:"Brewer Sequential Yellow-Orange-Brown (9)",NanColor:[.4,.1450980392156863,.02352941176470588]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (8)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (7)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (6)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (5)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8,.2980392156862745,.00784313725490196],Name:"Brewer Sequential Yellow-Orange-Brown (4)",NanColor:[.8,.2980392156862745,.00784313725490196]},{IndexedColors:[1,.9686274509803922,.7372549019607844,.996078431372549,.7686274509803922,.3098039215686275,.8509803921568627,.3725490196078431,.05490196078431372],Name:"Brewer Sequential Yellow-Orange-Brown (3)",NanColor:[.8509803921568627,.3725490196078431,.05490196078431372]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.5058823529411764,.05882352941176471,.4862745098039216,.3019607843137255,0,.2941176470588235],Name:"Brewer Sequential Blue-Purple (9)",NanColor:[.3019607843137255,0,.2941176470588235]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (8)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (7)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (6)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (5)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.2549019607843137,.615686274509804],Name:"Brewer Sequential Blue-Purple (4)",NanColor:[.5333333333333333,.2549019607843137,.615686274509804]},{IndexedColors:[.8784313725490196,.9254901960784314,.9568627450980393,.6196078431372549,.7372549019607844,.8549019607843137,.5333333333333333,.3372549019607843,.6549019607843137],Name:"Brewer Sequential Blue-Purple (3)",NanColor:[.5333333333333333,.3372549019607843,.6549019607843137]},{IndexedColors:[.4980392156862745,.788235294117647,.4980392156862745,.7450980392156863,.6823529411764706,.8313725490196079,.9921568627450981,.7529411764705882,.5254901960784314,1,1,.6,.2196078431372549,.4235294117647059,.6901960784313725,.9411764705882353,.00784313725490196,.4980392156862745,.7490196078431373,.3568627450980392,.09019607843137255,.4,.4,.4],Name:"Brewer Qualitative Accent",NanColor:[.4,.4,.4]},{IndexedColors:[.1058823529411765,.6196078431372549,.4666666666666667,.8509803921568627,.3725490196078431,.00784313725490196,.4588235294117647,.4392156862745098,.7019607843137254,.9058823529411765,.1607843137254902,.5411764705882353,.4,.6509803921568628,.1176470588235294,.9019607843137255,.6705882352941176,.00784313725490196,.6509803921568628,.4627450980392157,.1137254901960784,.4,.4,.4],Name:"Brewer Qualitative Dark2",NanColor:[.4,.4,.4]},{IndexedColors:[.4,.7607843137254902,.6470588235294118,.9882352941176471,.5529411764705883,.3843137254901961,.5529411764705883,.6274509803921569,.796078431372549,.9058823529411765,.5411764705882353,.7647058823529411,.6509803921568628,.8470588235294118,.3294117647058823,1,.8509803921568627,.1843137254901961,.8980392156862745,.7686274509803922,.5803921568627451,.7019607843137254,.7019607843137254,.7019607843137254],Name:"Brewer Qualitative Set2",NanColor:[.7019607843137254,.7019607843137254,.7019607843137254]},{IndexedColors:[.7019607843137254,.8862745098039215,.803921568627451,.9921568627450981,.803921568627451,.6745098039215687,.796078431372549,.8352941176470589,.9098039215686274,.9568627450980393,.792156862745098,.8941176470588236,.9019607843137255,.9607843137254902,.788235294117647,1,.9490196078431372,.6823529411764706,.9450980392156862,.8862745098039215,.8,.8,.8,.8],Name:"Brewer Qualitative Pastel2",NanColor:[.8,.8,.8]},{IndexedColors:[.984313725490196,.7058823529411765,.6823529411764706,.7019607843137254,.803921568627451,.8901960784313725,.8,.9215686274509803,.7725490196078432,.8705882352941177,.796078431372549,.8941176470588236,.996078431372549,.8509803921568627,.6509803921568628,1,1,.8,.8980392156862745,.8470588235294118,.7411764705882353,.9921568627450981,.8549019607843137,.9254901960784314,.9490196078431372,.9490196078431372,.9490196078431372],Name:"Brewer Qualitative Pastel1",NanColor:[.9490196078431372,.9490196078431372,.9490196078431372]},{IndexedColors:[.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,1,1,.2,.6509803921568628,.3372549019607843,.1568627450980392,.9686274509803922,.5058823529411764,.7490196078431373,.6,.6,.6],Name:"Brewer Qualitative Set1",NanColor:[.6,.6,.6]},{IndexedColors:[.6509803921568628,.807843137254902,.8901960784313725,.1215686274509804,.4705882352941176,.7058823529411765,.6980392156862745,.8745098039215686,.5411764705882353,.2,.6274509803921569,.1725490196078431,.984313725490196,.6039215686274509,.6,.8901960784313725,.1019607843137255,.1098039215686274,.9921568627450981,.7490196078431373,.4352941176470588,1,.4980392156862745,0,.792156862745098,.6980392156862745,.8392156862745098,.4156862745098039,.2392156862745098,.6039215686274509,1,1,.6],Name:"Brewer Qualitative Paired",NanColor:[1,1,.6]},{IndexedColors:[.5529411764705883,.8274509803921568,.7803921568627451,1,1,.7019607843137254,.7450980392156863,.7294117647058823,.8549019607843137,.984313725490196,.5019607843137255,.4470588235294118,.5019607843137255,.6941176470588235,.8274509803921568,.9921568627450981,.7058823529411765,.3843137254901961,.7019607843137254,.8705882352941177,.4117647058823529,.9882352941176471,.803921568627451,.8980392156862745,.8509803921568627,.8509803921568627,.8509803921568627,.7372549019607844,.5019607843137255,.7411764705882353,.8,.9215686274509803,.7725490196078432,1,.9294117647058824,.4352941176470588],Name:"Brewer Qualitative Set3",NanColor:[1,.9294117647058824,.4352941176470588]},{IndexedColors:[1,0,0,1,.862745,0,0,.695201,0],Name:"Traffic Lights",NanColor:[.803922,0,.803922]},{IndexedColors:[.908659,.604013,.581857,1,.862745,0,0,.695201,0],Name:"Traffic Lights For Deuteranopes",NanColor:[.803922,0,.803922]},{IndexedColors:[.4196078431372549,0,.07058823529411765,.9019607843137255,.9411764705882353,.0196078431372549,.01568627450980392,.6196078431372549,.00784313725490196],Name:"Traffic Lights For Deuteranopes 2",NanColor:[.803922,0,.803922]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Muted Blue-Green",NanColor:[.25,0,0],RGBPoints:[0,.109804,.27451,.301961,.02,.129412,.309804,.341176,.05,.14902,.341176,.380392,.1,.188235,.403922,.458824,.15,.227451,.447059,.521569,.2,.290196,.494118,.588235,.25,.368627,.552941,.670588,.3,.458824,.619608,.74902,.35,.588235,.713725,.85098,.4,.72549,.815686,.941176,.45,.831373,.882353,.980392,.475,.909804,.933333,1,.5,.980392,.984314,1,.5,.996078,1,.94902,.5,1,1,.980392,.5,.980392,.984314,1,.525,.972549,.988235,.890196,.55,.917647,.960784,.835294,.6,.835294,.921569,.772549,.65,.768627,.901961,.737255,.7,.670588,.831373,.654902,.75,.576471,.760784,.584314,.8,.498039,.678431,.521569,.85,.392157,.560784,.427451,.9,.294118,.45098,.333333,.95,.211765,.34902,.254902,1,.152941,.278431,.196078]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Green-Blue Asymmetric Divergent (62Blbc)",NanColor:[.25,0,0],RGBPoints:[0,.121569,.2,.145098,.05,.196078,.301961,.223529,.1,.258824,.4,.278431,.2,.341176,.54902,.341176,.25,.419608,.619608,.376471,.3,.545098,.701961,.392157,.35,.643137,.780392,.403922,.4,.729412,.819608,.45098,.45,.811765,.870588,.521569,.5,.898039,.909804,.564706,.55,.941176,.92549,.686275,.6,.960784,.94902,.776471,.64,1,1,1,.65,.890196,.988235,.972549,.7,.721569,.894118,.901961,.75,.631373,.823529,.839216,.8,.517647,.662745,.701961,.85,.384314,.494118,.54902,.9,.298039,.360784,.45098,.95,.223529,.25098,.34902,.99,.156863,.172549,.25098,1,.137255,.137255,.188235]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Asymmtrical Earth Tones (6_21b)",NanColor:[.25,0,0],RGBPoints:[0,.141176,.14902,.2,.05,.215686,.258824,.321569,.1,.243137,.368627,.380392,.15,.27451,.439216,.4,.2,.32549,.501961,.384314,.25,.403922,.6,.419608,.3,.486275,.701961,.454902,.35,.556863,.74902,.494118,.4,.670588,.8,.545098,.5,.854902,.901961,.631373,.55,.92549,.941176,.694118,.6,.960784,.94902,.776471,.65,.988235,.968627,.909804,.7,.839216,.815686,.772549,.75,.701961,.662745,.615686,.8,.6,.529412,.478431,.85,.501961,.403922,.360784,.9,.439216,.313725,.290196,1,.301961,.164706,.176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Yellow 15",NanColor:[.25,0,0],RGBPoints:[0,1,1,.988235,.002,1,1,.988235,.05,.984314,.988235,.843137,.1,.988235,.988235,.741176,.15,.980392,.968627,.654902,.2,.980392,.945098,.576471,.25,.968627,.905882,.486275,.3,.968627,.862745,.388235,.35,.960784,.803922,.286275,.4,.94902,.741176,.219608,.45,.941176,.678431,.14902,.5,.929412,.607843,.094118,.55,.921569,.545098,.054902,.6,.909804,.486275,.035294,.65,.890196,.411765,.019608,.7,.8,.305882,0,.75,.760784,.239216,0,.8,.678431,.180392,.011765,.85,.6,.121569,.023529,.9,.501961,.054902,.031373,.95,.4,.039216,.058824,1,.301961,.047059,.090196]},{ColorSpace:"Diverging",Name:"Magma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002258,.001295,.018331,.007843,.003279,.002305,.023708,.011765,.004512,.00349,.029965,.015686,.00595,.004843,.03713,.019608,.007588,.006356,.044973,.023529,.009426,.008022,.052844,.027451,.011465,.009828,.06075,.031373,.013708,.011771,.068667,.035294,.016156,.01384,.076603,.039216,.018815,.016026,.084584,.043137,.021692,.01832,.09261,.047059,.024792,.020715,.100676,.05098,.028123,.023201,.108787,.054902,.031696,.025765,.116965,.058824,.03552,.028397,.125209,.062745,.039608,.03109,.133515,.066667,.04383,.03383,.141886,.070588,.048062,.036607,.150327,.07451,.05232,.039407,.158841,.078431,.056615,.04216,.167446,.082353,.060949,.044794,.176129,.086275,.06533,.047318,.184892,.090196,.069764,.049726,.193735,.094118,.074257,.052017,.20266,.098039,.078815,.054184,.211667,.101961,.083446,.056225,.220755,.105882,.088155,.058133,.229922,.109804,.092949,.059904,.239164,.113725,.097833,.061531,.248477,.117647,.102815,.06301,.257854,.121569,.107899,.064335,.267289,.12549,.113094,.065492,.276784,.129412,.118405,.066479,.286321,.133333,.123833,.067295,.295879,.137255,.12938,.067935,.305443,.141176,.135053,.068391,.315,.145098,.140858,.068654,.324538,.14902,.146785,.068738,.334011,.152941,.152839,.068637,.343404,.156863,.159018,.068354,.352688,.160784,.165308,.067911,.361816,.164706,.171713,.067305,.370771,.168627,.178212,.066576,.379497,.172549,.184801,.065732,.387973,.176471,.19146,.064818,.396152,.180392,.198177,.063862,.404009,.184314,.204935,.062907,.411514,.188235,.211718,.061992,.418647,.192157,.218512,.061158,.425392,.196078,.225302,.060445,.431742,.2,.232077,.059889,.437695,.203922,.238826,.059517,.443256,.207843,.245543,.059352,.448436,.211765,.25222,.059415,.453248,.215686,.258857,.059706,.45771,.219608,.265447,.060237,.46184,.223529,.271994,.060994,.46566,.227451,.278493,.061978,.46919,.231373,.284951,.063168,.472451,.235294,.291366,.064553,.475462,.239216,.29774,.066117,.478243,.243137,.304081,.067835,.480812,.247059,.310382,.069702,.483186,.25098,.316654,.07169,.48538,.254902,.322899,.073782,.487408,.258824,.329114,.075972,.489287,.262745,.335308,.078236,.491024,.266667,.341482,.080564,.492631,.270588,.347636,.082946,.494121,.27451,.353773,.085373,.495501,.278431,.359898,.087831,.496778,.282353,.366012,.090314,.49796,.286275,.372116,.092816,.499053,.290196,.378211,.095332,.500067,.294118,.384299,.097855,.501002,.298039,.390384,.100379,.501864,.301961,.396467,.102902,.502658,.305882,.402548,.10542,.503386,.309804,.408629,.10793,.504052,.313725,.414709,.110431,.504662,.317647,.420791,.11292,.505215,.321569,.426877,.115395,.505714,.32549,.432967,.117855,.50616,.329412,.439062,.120298,.506555,.333333,.445163,.122724,.506901,.337255,.451271,.125132,.507198,.341176,.457386,.127522,.507448,.345098,.463508,.129893,.507652,.34902,.46964,.132245,.507809,.352941,.47578,.134577,.507921,.356863,.481929,.136891,.507989,.360784,.488088,.139186,.508011,.364706,.494258,.141462,.507988,.368627,.500438,.143719,.50792,.372549,.506629,.145958,.507806,.376471,.512831,.148179,.507648,.380392,.519045,.150383,.507443,.384314,.52527,.152569,.507192,.388235,.531507,.154739,.506895,.392157,.537755,.156894,.506551,.396078,.544015,.159033,.506159,.4,.550287,.161158,.505719,.403922,.556571,.163269,.50523,.407843,.562866,.165368,.504692,.411765,.569172,.167454,.504105,.415686,.57549,.16953,.503466,.419608,.581819,.171596,.502777,.423529,.588158,.173652,.502035,.427451,.594508,.175701,.501241,.431373,.600868,.177743,.500394,.435294,.607238,.179779,.499492,.439216,.613617,.181811,.498536,.443137,.620005,.18384,.497524,.447059,.626401,.185867,.496456,.45098,.632805,.187893,.495332,.454902,.639216,.189921,.49415,.458824,.645633,.191952,.49291,.462745,.652056,.193986,.491611,.466667,.658483,.196027,.490253,.470588,.664915,.198075,.488836,.47451,.671349,.200133,.487358,.478431,.677786,.202203,.485819,.482353,.684224,.204286,.484219,.486275,.690661,.206384,.482558,.490196,.697098,.208501,.480835,.494118,.703532,.210638,.479049,.498039,.709962,.212797,.477201,.501961,.716387,.214982,.47529,.505882,.722805,.217194,.473316,.509804,.729216,.219437,.471279,.513725,.735616,.221713,.46918,.517647,.742004,.224025,.467018,.521569,.748378,.226377,.464794,.52549,.754737,.228772,.462509,.529412,.761077,.231214,.460162,.533333,.767398,.233705,.457755,.537255,.773695,.236249,.455289,.541176,.779968,.238851,.452765,.545098,.786212,.241514,.450184,.54902,.792427,.244242,.447543,.552941,.798608,.24704,.444848,.556863,.804752,.249911,.442102,.560784,.810855,.252861,.439305,.564706,.816914,.255895,.436461,.568627,.822926,.259016,.433573,.572549,.828886,.262229,.430644,.576471,.834791,.26554,.427671,.580392,.840636,.268953,.424666,.584314,.846416,.272473,.421631,.588235,.852126,.276106,.418573,.592157,.857763,.279857,.415496,.596078,.86332,.283729,.412403,.6,.868793,.287728,.409303,.603922,.874176,.291859,.406205,.607843,.879464,.296125,.403118,.611765,.884651,.30053,.400047,.615686,.889731,.305079,.397002,.619608,.8947,.309773,.393995,.623529,.899552,.314616,.391037,.627451,.904281,.31961,.388137,.631373,.908884,.324755,.385308,.635294,.913354,.330052,.382563,.639216,.917689,.3355,.379915,.643137,.921884,.341098,.377376,.647059,.925937,.346844,.374959,.65098,.929845,.352734,.372677,.654902,.933606,.358764,.370541,.658824,.937221,.364929,.368567,.662745,.940687,.371224,.366762,.666667,.944006,.377643,.365136,.670588,.94718,.384178,.363701,.67451,.95021,.39082,.362468,.678431,.953099,.397563,.361438,.682353,.955849,.4044,.360619,.686275,.958464,.411324,.360014,.690196,.960949,.418323,.35963,.694118,.96331,.42539,.359469,.698039,.965549,.432519,.359529,.701961,.967671,.439703,.35981,.705882,.96968,.446936,.360311,.709804,.971582,.45421,.36103,.713725,.973381,.46152,.361965,.717647,.975082,.468861,.363111,.721569,.97669,.476226,.364466,.72549,.97821,.483612,.366025,.729412,.979645,.491014,.367783,.733333,.981,.498428,.369734,.737255,.982279,.505851,.371874,.741176,.983485,.51328,.374198,.745098,.984622,.520713,.376698,.74902,.985693,.528148,.379371,.752941,.9867,.535582,.38221,.756863,.987646,.543015,.38521,.760784,.988533,.550446,.388365,.764706,.989363,.557873,.391671,.768627,.990138,.565296,.395122,.772549,.990871,.572706,.398714,.776471,.991558,.580107,.402441,.780392,.992196,.587502,.406299,.784314,.992785,.594891,.410283,.788235,.993326,.602275,.41439,.792157,.993834,.609644,.418613,.796078,.994309,.616999,.42295,.8,.994738,.62435,.427397,.803922,.995122,.631696,.431951,.807843,.99548,.639027,.436607,.811765,.99581,.646344,.441361,.815686,.996096,.653659,.446213,.819608,.996341,.660969,.45116,.823529,.99658,.668256,.456192,.827451,.996775,.675541,.461314,.831373,.996925,.682828,.466526,.835294,.997077,.690088,.471811,.839216,.997186,.697349,.477182,.843137,.997254,.704611,.482635,.847059,.997325,.711848,.488154,.85098,.997351,.719089,.493755,.854902,.997351,.726324,.499428,.858824,.997341,.733545,.505167,.862745,.997285,.740772,.510983,.866667,.997228,.747981,.516859,.870588,.997138,.75519,.522806,.87451,.997019,.762398,.528821,.878431,.996898,.769591,.534892,.882353,.996727,.776795,.541039,.886275,.996571,.783977,.547233,.890196,.996369,.791167,.553499,.894118,.996162,.798348,.55982,.898039,.995932,.805527,.566202,.901961,.99568,.812706,.572645,.905882,.995424,.819875,.57914,.909804,.995131,.827052,.585701,.913725,.994851,.834213,.592307,.917647,.994524,.841387,.598983,.921569,.994222,.84854,.605696,.92549,.993866,.855711,.612482,.929412,.993545,.862859,.619299,.933333,.99317,.870024,.626189,.937255,.992831,.877168,.633109,.941176,.99244,.88433,.640099,.945098,.992089,.89147,.647116,.94902,.991688,.898627,.654202,.952941,.991332,.905763,.661309,.956863,.99093,.912915,.668481,.960784,.99057,.920049,.675675,.964706,.990175,.927196,.682926,.968627,.989815,.934329,.690198,.972549,.989434,.94147,.697519,.976471,.989077,.948604,.704863,.980392,.988717,.955742,.712242,.984314,.988367,.962878,.719649,.988235,.988033,.970012,.727077,.992157,.987691,.977154,.734536,.996078,.987387,.984288,.742002,1,.987053,.991438,.749504]},{ColorSpace:"Diverging",Name:"Inferno (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002267,.00127,.01857,.007843,.003299,.002249,.024239,.011765,.004547,.003392,.030909,.015686,.006006,.004692,.038558,.019608,.007676,.006136,.046836,.023529,.009561,.007713,.055143,.027451,.011663,.009417,.06346,.031373,.013995,.011225,.071862,.035294,.016561,.013136,.080282,.039216,.019373,.015133,.088767,.043137,.022447,.017199,.097327,.047059,.025793,.019331,.10593,.05098,.029432,.021503,.114621,.054902,.033385,.023702,.123397,.058824,.037668,.025921,.132232,.062745,.042253,.028139,.141141,.066667,.046915,.030324,.150164,.070588,.051644,.032474,.159254,.07451,.056449,.034569,.168414,.078431,.06134,.03659,.177642,.082353,.066331,.038504,.186962,.086275,.071429,.040294,.196354,.090196,.076637,.041905,.205799,.094118,.081962,.043328,.215289,.098039,.087411,.044556,.224813,.101961,.09299,.045583,.234358,.105882,.098702,.046402,.243904,.109804,.104551,.047008,.25343,.113725,.110536,.047399,.262912,.117647,.116656,.047574,.272321,.121569,.122908,.047536,.281624,.12549,.129285,.047293,.290788,.129412,.135778,.046856,.299776,.133333,.142378,.046242,.308553,.137255,.149073,.045468,.317085,.141176,.15585,.044559,.325338,.145098,.162689,.043554,.333277,.14902,.169575,.042489,.340874,.152941,.176493,.041402,.348111,.156863,.183429,.040329,.354971,.160784,.190367,.039309,.361447,.164706,.197297,.0384,.367535,.168627,.204209,.037632,.373238,.172549,.211095,.03703,.378563,.176471,.217949,.036615,.383522,.180392,.224763,.036405,.388129,.184314,.231538,.036405,.3924,.188235,.238273,.036621,.396353,.192157,.244967,.037055,.400007,.196078,.25162,.037705,.403378,.2,.258234,.038571,.406485,.203922,.26481,.039647,.409345,.207843,.271347,.040922,.411976,.211765,.27785,.042353,.414392,.215686,.284321,.043933,.416608,.219608,.290763,.045644,.418637,.223529,.297178,.04747,.420491,.227451,.303568,.049396,.422182,.231373,.309935,.051407,.423721,.235294,.316282,.05349,.425116,.239216,.32261,.055634,.426377,.243137,.328921,.057827,.427511,.247059,.335217,.06006,.428524,.25098,.3415,.062325,.429425,.254902,.347771,.064616,.430217,.258824,.354032,.066925,.430906,.262745,.360284,.069247,.431497,.266667,.366529,.071579,.431994,.270588,.372768,.073915,.4324,.27451,.379001,.076253,.432719,.278431,.385228,.078591,.432955,.282353,.391453,.080927,.433109,.286275,.397674,.083257,.433183,.290196,.403894,.08558,.433179,.294118,.410113,.087896,.433098,.298039,.416331,.090203,.432943,.301961,.422549,.092501,.432714,.305882,.428768,.09479,.432412,.309804,.434987,.097069,.432039,.313725,.441207,.099338,.431594,.317647,.447428,.101597,.43108,.321569,.453651,.103848,.430498,.32549,.459875,.106089,.429846,.329412,.4661,.108322,.429125,.333333,.472328,.110547,.428334,.337255,.478558,.112764,.427475,.341176,.484789,.114974,.426548,.345098,.491022,.117179,.425552,.34902,.497257,.119379,.424488,.352941,.503493,.121575,.423356,.356863,.50973,.123769,.422156,.360784,.515967,.12596,.420887,.364706,.522206,.12815,.419549,.368627,.528444,.130341,.418142,.372549,.534683,.132534,.416667,.376471,.54092,.134729,.415123,.380392,.547157,.136929,.413511,.384314,.553392,.139134,.411829,.388235,.559624,.141346,.410078,.392157,.565854,.143567,.408258,.396078,.572081,.145797,.406369,.4,.578304,.148039,.404411,.403922,.584521,.150294,.402385,.407843,.590734,.152563,.40029,.411765,.59694,.154848,.398125,.415686,.603139,.157151,.395891,.419608,.60933,.159474,.393589,.423529,.615513,.161817,.391219,.427451,.621685,.164184,.388781,.431373,.627847,.166575,.386276,.435294,.633998,.168992,.383704,.439216,.640135,.171438,.381065,.443137,.64626,.173914,.378359,.447059,.652369,.176421,.375586,.45098,.658463,.178962,.372748,.454902,.66454,.181539,.369846,.458824,.670599,.184153,.366879,.462745,.676638,.186807,.363849,.466667,.682656,.189501,.360757,.470588,.688653,.192239,.357603,.47451,.694627,.195021,.354388,.478431,.700576,.197851,.351113,.482353,.7065,.200728,.347777,.486275,.712396,.203656,.344383,.490196,.718264,.206636,.340931,.494118,.724103,.20967,.337424,.498039,.729909,.212759,.333861,.501961,.735683,.215906,.330245,.505882,.741423,.219112,.326576,.509804,.747127,.222378,.322856,.513725,.752794,.225706,.319085,.517647,.758422,.229097,.315266,.521569,.76401,.232554,.311399,.52549,.769556,.236077,.307485,.529412,.775059,.239667,.303526,.533333,.780517,.243327,.299523,.537255,.785929,.247056,.295477,.541176,.791293,.250856,.29139,.545098,.796607,.254728,.287264,.54902,.801871,.258674,.283099,.552941,.807082,.262692,.278898,.556863,.812239,.266786,.274661,.560784,.817341,.270954,.27039,.564706,.822386,.275197,.266085,.568627,.827372,.279517,.26175,.572549,.832299,.283913,.257383,.576471,.837165,.288385,.252988,.580392,.841969,.292933,.248564,.584314,.846709,.297559,.244113,.588235,.851384,.30226,.239636,.592157,.855992,.307038,.235133,.596078,.860533,.311892,.230606,.6,.865006,.316822,.226055,.603922,.869409,.321827,.221482,.607843,.873741,.326906,.216886,.611765,.878001,.33206,.212268,.615686,.882188,.337287,.207628,.619608,.886302,.342586,.202968,.623529,.890341,.347957,.198286,.627451,.894305,.353399,.193584,.631373,.898192,.358911,.18886,.635294,.902003,.364492,.184116,.639216,.905735,.37014,.17935,.643137,.90939,.375856,.174563,.647059,.912966,.381636,.169755,.65098,.916462,.387481,.164924,.654902,.919879,.393389,.16007,.658824,.923215,.399359,.155193,.662745,.92647,.405389,.150292,.666667,.929644,.411479,.145367,.670588,.932737,.417627,.140417,.67451,.935747,.423831,.13544,.678431,.938675,.430091,.130438,.682353,.941521,.436405,.125409,.686275,.944285,.442772,.120354,.690196,.946965,.449191,.115272,.694118,.949562,.45566,.110164,.698039,.952075,.462178,.105031,.701961,.954506,.468744,.099874,.705882,.956852,.475356,.094695,.709804,.959114,.482014,.089499,.713725,.961293,.488716,.084289,.717647,.963387,.495462,.079073,.721569,.965397,.502249,.073859,.72549,.967322,.509078,.068659,.729412,.969163,.515946,.063488,.733333,.970919,.522853,.058367,.737255,.97259,.529798,.053324,.741176,.974176,.53678,.048392,.745098,.975677,.543798,.043618,.74902,.977092,.55085,.03905,.752941,.978422,.557937,.034931,.756863,.979666,.565057,.031409,.760784,.980824,.572209,.028508,.764706,.981895,.579392,.02625,.768627,.982881,.586606,.024661,.772549,.983779,.593849,.02377,.776471,.984591,.601122,.023606,.780392,.985315,.608422,.024202,.784314,.985952,.61575,.025592,.788235,.986502,.623105,.027814,.792157,.986964,.630485,.030908,.796078,.987337,.63789,.034916,.8,.987622,.64532,.039886,.803922,.987819,.652773,.045581,.807843,.987926,.66025,.05175,.811765,.987945,.667748,.058329,.815686,.987874,.675267,.065257,.819608,.987714,.682807,.072489,.823529,.987464,.690366,.07999,.827451,.987124,.697944,.087731,.831373,.986694,.70554,.095694,.835294,.986175,.713153,.103863,.839216,.985566,.720782,.112229,.843137,.984865,.728427,.120785,.847059,.984075,.736087,.129527,.85098,.983196,.743758,.138453,.854902,.982228,.751442,.147565,.858824,.981173,.759135,.156863,.862745,.980032,.766837,.166353,.866667,.978806,.774545,.176037,.870588,.977497,.782258,.185923,.87451,.976108,.789974,.196018,.878431,.974638,.797692,.206332,.882353,.973088,.805409,.216877,.886275,.971468,.813122,.227658,.890196,.969783,.820825,.238686,.894118,.968041,.828515,.249972,.898039,.966243,.836191,.261534,.901961,.964394,.843848,.273391,.905882,.962517,.851476,.285546,.909804,.960626,.859069,.29801,.913725,.95872,.866624,.31082,.917647,.956834,.874129,.323974,.921569,.954997,.881569,.337475,.92549,.953215,.888942,.351369,.929412,.951546,.896226,.365627,.933333,.950018,.903409,.380271,.937255,.948683,.910473,.395289,.941176,.947594,.917399,.410665,.945098,.946809,.924168,.426373,.94902,.946392,.930761,.442367,.952941,.946403,.937159,.458592,.956863,.946903,.943348,.47497,.960784,.947937,.949318,.491426,.964706,.949545,.955063,.50786,.968627,.95174,.960587,.524203,.972549,.954529,.965896,.540361,.976471,.957896,.971003,.556275,.980392,.961812,.975924,.571925,.984314,.966249,.980678,.587206,.988235,.971162,.985282,.602154,.992157,.976511,.989753,.61676,.996078,.982257,.994109,.631017,1,.988362,.998364,.644924]},{ColorSpace:"Diverging",Name:"Plasma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.050383,.029803,.527975,.003922,.063536,.028426,.533124,.007843,.075353,.027206,.538007,.011765,.086222,.026125,.542658,.015686,.096379,.025165,.547103,.019608,.10598,.024309,.551368,.023529,.115124,.023556,.555468,.027451,.123903,.022878,.559423,.031373,.132381,.022258,.56325,.035294,.140603,.021687,.566959,.039216,.148607,.021154,.570562,.043137,.156421,.020651,.574065,.047059,.16407,.020171,.577478,.05098,.171574,.019706,.580806,.054902,.17895,.019252,.584054,.058824,.186213,.018803,.587228,.062745,.193374,.018354,.59033,.066667,.200445,.017902,.593364,.070588,.207435,.017442,.596333,.07451,.21435,.016973,.599239,.078431,.221197,.016497,.602083,.082353,.227983,.016007,.604867,.086275,.234715,.015502,.607592,.090196,.241396,.014979,.610259,.094118,.248032,.014439,.612868,.098039,.254627,.013882,.615419,.101961,.261183,.013308,.617911,.105882,.267703,.012716,.620346,.109804,.274191,.012109,.622722,.113725,.280648,.011488,.625038,.117647,.287076,.010855,.627295,.121569,.293478,.010213,.62949,.12549,.299855,.009561,.631624,.129412,.30621,.008902,.633694,.133333,.312543,.008239,.6357,.137255,.318856,.007576,.63764,.141176,.32515,.006915,.639512,.145098,.331426,.006261,.641316,.14902,.337683,.005618,.643049,.152941,.343925,.004991,.64471,.156863,.35015,.004382,.646298,.160784,.356359,.003798,.64781,.164706,.362553,.003243,.649245,.168627,.368733,.002724,.650601,.172549,.374897,.002245,.651876,.176471,.381047,.001814,.653068,.180392,.387183,.001434,.654177,.184314,.393304,.001114,.655199,.188235,.399411,859e-6,.656133,.192157,.405503,678e-6,.656977,.196078,.41158,577e-6,.65773,.2,.417642,564e-6,.65839,.203922,.423689,646e-6,.658956,.207843,.429719,831e-6,.659425,.211765,.435734,.001127,.659797,.215686,.441732,.00154,.660069,.219608,.447714,.00208,.66024,.223529,.453677,.002755,.66031,.227451,.459623,.003574,.660277,.231373,.46555,.004545,.660139,.235294,.471457,.005678,.659897,.239216,.477344,.00698,.659549,.243137,.48321,.00846,.659095,.247059,.489055,.010127,.658534,.25098,.494877,.01199,.657865,.254902,.500678,.014055,.657088,.258824,.506454,.016333,.656202,.262745,.512206,.018833,.655209,.266667,.517933,.021563,.654109,.270588,.523633,.024532,.652901,.27451,.529306,.027747,.651586,.278431,.534952,.031217,.650165,.282353,.54057,.03495,.64864,.286275,.546157,.038954,.64701,.290196,.551715,.043136,.645277,.294118,.557243,.047331,.643443,.298039,.562738,.051545,.641509,.301961,.568201,.055778,.639477,.305882,.573632,.060028,.637349,.309804,.579029,.064296,.635126,.313725,.584391,.068579,.632812,.317647,.589719,.072878,.630408,.321569,.595011,.07719,.627917,.32549,.600266,.081516,.625342,.329412,.605485,.085854,.622686,.333333,.610667,.090204,.619951,.337255,.615812,.094564,.61714,.341176,.620919,.098934,.614257,.345098,.625987,.103312,.611305,.34902,.631017,.107699,.608287,.352941,.636008,.112092,.605205,.356863,.640959,.116492,.602065,.360784,.645872,.120898,.598867,.364706,.650746,.125309,.595617,.368627,.65558,.129725,.592317,.372549,.660374,.134144,.588971,.376471,.665129,.138566,.585582,.380392,.669845,.142992,.582154,.384314,.674522,.147419,.578688,.388235,.67916,.151848,.575189,.392157,.683758,.156278,.57166,.396078,.688318,.160709,.568103,.4,.69284,.165141,.564522,.403922,.697324,.169573,.560919,.407843,.701769,.174005,.557296,.411765,.706178,.178437,.553657,.415686,.710549,.182868,.550004,.419608,.714883,.187299,.546338,.423529,.719181,.191729,.542663,.427451,.723444,.196158,.538981,.431373,.72767,.200586,.535293,.435294,.731862,.205013,.531601,.439216,.736019,.209439,.527908,.443137,.740143,.213864,.524216,.447059,.744232,.218288,.520524,.45098,.748289,.222711,.516834,.454902,.752312,.227133,.513149,.458824,.756304,.231555,.509468,.462745,.760264,.235976,.505794,.466667,.764193,.240396,.502126,.470588,.76809,.244817,.498465,.47451,.771958,.249237,.494813,.478431,.775796,.253658,.491171,.482353,.779604,.258078,.487539,.486275,.783383,.2625,.483918,.490196,.787133,.266922,.480307,.494118,.790855,.271345,.476706,.498039,.794549,.27577,.473117,.501961,.798216,.280197,.469538,.505882,.801855,.284626,.465971,.509804,.805467,.289057,.462415,.513725,.809052,.293491,.45887,.517647,.812612,.297928,.455338,.521569,.816144,.302368,.451816,.52549,.819651,.306812,.448306,.529412,.823132,.311261,.444806,.533333,.826588,.315714,.441316,.537255,.830018,.320172,.437836,.541176,.833422,.324635,.434366,.545098,.836801,.329105,.430905,.54902,.840155,.33358,.427455,.552941,.843484,.338062,.424013,.556863,.846788,.342551,.420579,.560784,.850066,.347048,.417153,.564706,.853319,.351553,.413734,.568627,.856547,.356066,.410322,.572549,.85975,.360588,.406917,.576471,.862927,.365119,.403519,.580392,.866078,.36966,.400126,.584314,.869203,.374212,.396738,.588235,.872303,.378774,.393355,.592157,.875376,.383347,.389976,.596078,.878423,.387932,.3866,.6,.881443,.392529,.383229,.603922,.884436,.397139,.37986,.607843,.887402,.401762,.376494,.611765,.89034,.406398,.37313,.615686,.89325,.411048,.369768,.619608,.896131,.415712,.366407,.623529,.898984,.420392,.363047,.627451,.901807,.425087,.359688,.631373,.904601,.429797,.356329,.635294,.907365,.434524,.35297,.639216,.910098,.439268,.34961,.643137,.9128,.444029,.346251,.647059,.915471,.448807,.34289,.65098,.918109,.453603,.339529,.654902,.920714,.458417,.336166,.658824,.923287,.463251,.332801,.662745,.925825,.468103,.329435,.666667,.928329,.472975,.326067,.670588,.930798,.477867,.322697,.67451,.933232,.48278,.319325,.678431,.93563,.487712,.315952,.682353,.93799,.492667,.312575,.686275,.940313,.497642,.309197,.690196,.942598,.502639,.305816,.694118,.944844,.507658,.302433,.698039,.947051,.512699,.299049,.701961,.949217,.517763,.295662,.705882,.951344,.52285,.292275,.709804,.953428,.52796,.288883,.713725,.95547,.533093,.28549,.717647,.957469,.53825,.282096,.721569,.959424,.543431,.278701,.72549,.961336,.548636,.275305,.729412,.963203,.553865,.271909,.733333,.965024,.559118,.268513,.737255,.966798,.564396,.265118,.741176,.968526,.5697,.261721,.745098,.970205,.575028,.258325,.74902,.971835,.580382,.254931,.752941,.973416,.585761,.25154,.756863,.974947,.591165,.248151,.760784,.976428,.596595,.244767,.764706,.977856,.602051,.241387,.768627,.979233,.607532,.238013,.772549,.980556,.613039,.234646,.776471,.981826,.618572,.231287,.780392,.983041,.624131,.227937,.784314,.984199,.629718,.224595,.788235,.985301,.63533,.221265,.792157,.986345,.640969,.217948,.796078,.987332,.646633,.214648,.8,.98826,.652325,.211364,.803922,.989128,.658043,.2081,.807843,.989935,.663787,.204859,.811765,.990681,.669558,.201642,.815686,.991365,.675355,.198453,.819608,.991985,.681179,.195295,.823529,.992541,.68703,.19217,.827451,.993032,.692907,.189084,.831373,.993456,.69881,.186041,.835294,.993814,.704741,.183043,.839216,.994103,.710698,.180097,.843137,.994324,.716681,.177208,.847059,.994474,.722691,.174381,.85098,.994553,.728728,.171622,.854902,.994561,.734791,.168938,.858824,.994495,.74088,.166335,.862745,.994355,.746995,.163821,.866667,.994141,.753137,.161404,.870588,.993851,.759304,.159092,.87451,.993482,.765499,.156891,.878431,.993033,.77172,.154808,.882353,.992505,.777967,.152855,.886275,.991897,.784239,.151042,.890196,.991209,.790537,.149377,.894118,.990439,.796859,.14787,.898039,.989587,.803205,.146529,.901961,.988648,.809579,.145357,.905882,.987621,.815978,.144363,.909804,.986509,.822401,.143557,.913725,.985314,.828846,.142945,.917647,.984031,.835315,.142528,.921569,.982653,.841812,.142303,.92549,.98119,.848329,.142279,.929412,.979644,.854866,.142453,.933333,.977995,.861432,.142808,.937255,.976265,.868016,.143351,.941176,.974443,.874622,.144061,.945098,.97253,.88125,.144923,.94902,.970533,.887896,.145919,.952941,.968443,.894564,.147014,.956863,.966271,.901249,.14818,.960784,.964021,.90795,.14937,.964706,.961681,.914672,.15052,.968627,.959276,.921407,.151566,.972549,.956808,.928152,.152409,.976471,.954287,.934908,.152921,.980392,.951726,.941671,.152925,.984314,.949151,.948435,.152178,.988235,.946602,.95519,.150328,.992157,.944152,.961916,.146861,.996078,.941896,.96859,.140956,1,.940015,.975158,.131326]},{ColorSpace:"Diverging",Name:"Viridis (matplotlib)",NanColor:[1,0,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Eric Firing",RGBPoints:[0,.267004,.004874,.329415,.003922,.26851,.009605,.335427,.007843,.269944,.014625,.341379,.011765,.271305,.019942,.347269,.015686,.272594,.025563,.353093,.019608,.273809,.031497,.358853,.023529,.274952,.037752,.364543,.027451,.276022,.044167,.370164,.031373,.277018,.050344,.375715,.035294,.277941,.056324,.381191,.039216,.278791,.062145,.386592,.043137,.279566,.067836,.391917,.047059,.280267,.073417,.397163,.05098,.280894,.078907,.402329,.054902,.281446,.08432,.407414,.058824,.281924,.089666,.412415,.062745,.282327,.094955,.417331,.066667,.282656,.100196,.42216,.070588,.28291,.105393,.426902,.07451,.283091,.110553,.431554,.078431,.283197,.11568,.436115,.082353,.283229,.120777,.440584,.086275,.283187,.125848,.44496,.090196,.283072,.130895,.449241,.094118,.282884,.13592,.453427,.098039,.282623,.140926,.457517,.101961,.28229,.145912,.46151,.105882,.281887,.150881,.465405,.109804,.281412,.155834,.469201,.113725,.280868,.160771,.472899,.117647,.280255,.165693,.476498,.121569,.279574,.170599,.479997,.12549,.278826,.17549,.483397,.129412,.278012,.180367,.486697,.133333,.277134,.185228,.489898,.137255,.276194,.190074,.493001,.141176,.275191,.194905,.496005,.145098,.274128,.199721,.498911,.14902,.273006,.20452,.501721,.152941,.271828,.209303,.504434,.156863,.270595,.214069,.507052,.160784,.269308,.218818,.509577,.164706,.267968,.223549,.512008,.168627,.26658,.228262,.514349,.172549,.265145,.232956,.516599,.176471,.263663,.237631,.518762,.180392,.262138,.242286,.520837,.184314,.260571,.246922,.522828,.188235,.258965,.251537,.524736,.192157,.257322,.25613,.526563,.196078,.255645,.260703,.528312,.2,.253935,.265254,.529983,.203922,.252194,.269783,.531579,.207843,.250425,.27429,.533103,.211765,.248629,.278775,.534556,.215686,.246811,.283237,.535941,.219608,.244972,.287675,.53726,.223529,.243113,.292092,.538516,.227451,.241237,.296485,.539709,.231373,.239346,.300855,.540844,.235294,.237441,.305202,.541921,.239216,.235526,.309527,.542944,.243137,.233603,.313828,.543914,.247059,.231674,.318106,.544834,.25098,.229739,.322361,.545706,.254902,.227802,.326594,.546532,.258824,.225863,.330805,.547314,.262745,.223925,.334994,.548053,.266667,.221989,.339161,.548752,.270588,.220057,.343307,.549413,.27451,.21813,.347432,.550038,.278431,.21621,.351535,.550627,.282353,.214298,.355619,.551184,.286275,.212395,.359683,.55171,.290196,.210503,.363727,.552206,.294118,.208623,.367752,.552675,.298039,.206756,.371758,.553117,.301961,.204903,.375746,.553533,.305882,.203063,.379716,.553925,.309804,.201239,.38367,.554294,.313725,.19943,.387607,.554642,.317647,.197636,.391528,.554969,.321569,.19586,.395433,.555276,.32549,.1941,.399323,.555565,.329412,.192357,.403199,.555836,.333333,.190631,.407061,.556089,.337255,.188923,.41091,.556326,.341176,.187231,.414746,.556547,.345098,.185556,.41857,.556753,.34902,.183898,.422383,.556944,.352941,.182256,.426184,.55712,.356863,.180629,.429975,.557282,.360784,.179019,.433756,.55743,.364706,.177423,.437527,.557565,.368627,.175841,.44129,.557685,.372549,.174274,.445044,.557792,.376471,.172719,.448791,.557885,.380392,.171176,.45253,.557965,.384314,.169646,.456262,.55803,.388235,.168126,.459988,.558082,.392157,.166617,.463708,.558119,.396078,.165117,.467423,.558141,.4,.163625,.471133,.558148,.403922,.162142,.474838,.55814,.407843,.160665,.47854,.558115,.411765,.159194,.482237,.558073,.415686,.157729,.485932,.558013,.419608,.15627,.489624,.557936,.423529,.154815,.493313,.55784,.427451,.153364,.497,.557724,.431373,.151918,.500685,.557587,.435294,.150476,.504369,.55743,.439216,.149039,.508051,.55725,.443137,.147607,.511733,.557049,.447059,.14618,.515413,.556823,.45098,.144759,.519093,.556572,.454902,.143343,.522773,.556295,.458824,.141935,.526453,.555991,.462745,.140536,.530132,.555659,.466667,.139147,.533812,.555298,.470588,.13777,.537492,.554906,.47451,.136408,.541173,.554483,.478431,.135066,.544853,.554029,.482353,.133743,.548535,.553541,.486275,.132444,.552216,.553018,.490196,.131172,.555899,.552459,.494118,.129933,.559582,.551864,.498039,.128729,.563265,.551229,.501961,.127568,.566949,.550556,.505882,.126453,.570633,.549841,.509804,.125394,.574318,.549086,.513725,.124395,.578002,.548287,.517647,.123463,.581687,.547445,.521569,.122606,.585371,.546557,.52549,.121831,.589055,.545623,.529412,.121148,.592739,.544641,.533333,.120565,.596422,.543611,.537255,.120092,.600104,.54253,.541176,.119738,.603785,.5414,.545098,.119512,.607464,.540218,.54902,.119423,.611141,.538982,.552941,.119483,.614817,.537692,.556863,.119699,.61849,.536347,.560784,.120081,.622161,.534946,.564706,.120638,.625828,.533488,.568627,.12138,.629492,.531973,.572549,.122312,.633153,.530398,.576471,.123444,.636809,.528763,.580392,.12478,.640461,.527068,.584314,.126326,.644107,.525311,.588235,.128087,.647749,.523491,.592157,.130067,.651384,.521608,.596078,.132268,.655014,.519661,.6,.134692,.658636,.517649,.603922,.137339,.662252,.515571,.607843,.14021,.665859,.513427,.611765,.143303,.669459,.511215,.615686,.146616,.67305,.508936,.619608,.150148,.676631,.506589,.623529,.153894,.680203,.504172,.627451,.157851,.683765,.501686,.631373,.162016,.687316,.499129,.635294,.166383,.690856,.496502,.639216,.170948,.694384,.493803,.643137,.175707,.6979,.491033,.647059,.180653,.701402,.488189,.65098,.185783,.704891,.485273,.654902,.19109,.708366,.482284,.658824,.196571,.711827,.479221,.662745,.202219,.715272,.476084,.666667,.20803,.718701,.472873,.670588,.214,.722114,.469588,.67451,.220124,.725509,.466226,.678431,.226397,.728888,.462789,.682353,.232815,.732247,.459277,.686275,.239374,.735588,.455688,.690196,.24607,.73891,.452024,.694118,.252899,.742211,.448284,.698039,.259857,.745492,.444467,.701961,.266941,.748751,.440573,.705882,.274149,.751988,.436601,.709804,.281477,.755203,.432552,.713725,.288921,.758394,.428426,.717647,.296479,.761561,.424223,.721569,.304148,.764704,.419943,.72549,.311925,.767822,.415586,.729412,.319809,.770914,.411152,.733333,.327796,.77398,.40664,.737255,.335885,.777018,.402049,.741176,.344074,.780029,.397381,.745098,.35236,.783011,.392636,.74902,.360741,.785964,.387814,.752941,.369214,.788888,.382914,.756863,.377779,.791781,.377939,.760784,.386433,.794644,.372886,.764706,.395174,.797475,.367757,.768627,.404001,.800275,.362552,.772549,.412913,.803041,.357269,.776471,.421908,.805774,.35191,.780392,.430983,.808473,.346476,.784314,.440137,.811138,.340967,.788235,.449368,.813768,.335384,.792157,.458674,.816363,.329727,.796078,.468053,.818921,.323998,.8,.477504,.821444,.318195,.803922,.487026,.823929,.312321,.807843,.496615,.826376,.306377,.811765,.506271,.828786,.300362,.815686,.515992,.831158,.294279,.819608,.525776,.833491,.288127,.823529,.535621,.835785,.281908,.827451,.545524,.838039,.275626,.831373,.555484,.840254,.269281,.835294,.565498,.84243,.262877,.839216,.575563,.844566,.256415,.843137,.585678,.846661,.249897,.847059,.595839,.848717,.243329,.85098,.606045,.850733,.236712,.854902,.616293,.852709,.230052,.858824,.626579,.854645,.223353,.862745,.636902,.856542,.21662,.866667,.647257,.8584,.209861,.870588,.657642,.860219,.203082,.87451,.668054,.861999,.196293,.878431,.678489,.863742,.189503,.882353,.688944,.865448,.182725,.886275,.699415,.867117,.175971,.890196,.709898,.868751,.169257,.894118,.720391,.87035,.162603,.898039,.730889,.871916,.156029,.901961,.741388,.873449,.149561,.905882,.751884,.874951,.143228,.909804,.762373,.876424,.137064,.913725,.772852,.877868,.131109,.917647,.783315,.879285,.125405,.921569,.79376,.880678,.120005,.92549,.804182,.882046,.114965,.929412,.814576,.883393,.110347,.933333,.82494,.88472,.106217,.937255,.83527,.886029,.102646,.941176,.845561,.887322,.099702,.945098,.85581,.888601,.097452,.94902,.866013,.889868,.095953,.952941,.876168,.891125,.09525,.956863,.886271,.892374,.095374,.960784,.89632,.893616,.096335,.964706,.906311,.894855,.098125,.968627,.916242,.896091,.100717,.972549,.926106,.89733,.104071,.976471,.935904,.89857,.108131,.980392,.945636,.899815,.112838,.984314,.9553,.901065,.118128,.988235,.964894,.902323,.123941,.992157,.974417,.90359,.130215,.996078,.983868,.904867,.136897,1,.993248,.906157,.143936]},{ShowIndexedColorActiveValues:1,IndexedColors:[.07,.5,.7,1,1,1,.85,1,1,.8,.5,1,.76,1,0,1,.71,.71,.5,.5,.5,.05,.05,1,1,.05,.05,.7,1,1,.7,.89,.96,.67,.36,.95,.54,1,0,.75,.65,.65,.5,.6,.6,1,.5,0,1,1,.19,.12,.94,.12,.5,.82,.89,.56,.25,.83,.24,1,0,.9,.9,.9,.75,.76,.78,.65,.65,.67,.54,.6,.78,.61,.48,.78,.5,.48,.78,.44,.48,.78,.36,.48,.76,1,.48,.38,.49,.5,.69,.76,.56,.56,.4,.56,.56,.74,.5,.89,1,.63,0,.65,.16,.16,.36,.72,.82,.44,.18,.69,0,1,0,.58,1,1,.58,.88,.88,.45,.76,.79,.33,.71,.71,.23,.62,.62,.14,.56,.56,.04,.49,.55,0,.41,.52,.88,.88,1,1,.85,.56,.65,.46,.45,.4,.5,.5,.62,.39,.71,.83,.48,0,.58,0,.58,.26,.62,.69,.34,.09,.56,0,.79,0,.44,.83,1,1,1,.78,.85,1,.78,.78,1,.78,.64,1,.78,.56,1,.78,.38,1,.78,.27,1,.78,.19,1,.78,.12,1,.78,0,1,.61,0,.9,.46,0,.83,.32,0,.75,.22,0,.67,.14,.3,.76,1,.3,.65,1,.13,.58,.84,.15,.49,.67,.15,.4,.59,.09,.33,.53,.96,.93,.82,.8,.82,.12,.71,.71,.76,.65,.33,.3,.34,.35,.38,.62,.31,.71,.67,.36,0,.46,.31,.27,.26,.51,.59,.26,0,.4,0,.49,0,.44,.67,.98,0,.73,1,0,.63,1,0,.56,1,0,.5,1,0,.42,1,.33,.36,.95,.47,.36,.89,.54,.31,.89,.63,.21,.83,.7,.12,.83,.7,.12,.73,.7,.05,.65,.74,.05,.53,.78,0,.4,.8,0,.35,.82,0,.31,.85,0,.27,.88,0,.22,.9,0,.18,.91,0,.15,.92,0,.14,.93,0,.13,.94,0,.12,.95,0,.11,.96,0,.1,.97,0,.09,.98,0,.08,.99,0,.07,1,0,.06],Annotations:[0,"Xx",1,"H",2,"He",3,"Li",4,"Be",5,"B",6,"C",7,"N",8,"O",9,"F",10,"Ne",11,"Na",12,"Mg",13,"Al",14,"Si",15,"P",16,"S",17,"Cl",18,"Ar",19,"K",20,"Ca",21,"Sc",22,"Ti",23,"V",24,"Cr",25,"Mn",26,"Fe",27,"Co",28,"Ni",29,"Cu",30,"Zn",31,"Ga",32,"Ge",33,"As",34,"Se",35,"Br",36,"Kr",37,"Rb",38,"Sr",39,"Y",40,"Zr",41,"Nb",42,"Mo",43,"Tc",44,"Ru",45,"Rh",46,"Pd",47,"Ag",48,"Cd",49,"In",50,"Sn",51,"Sb",52,"Te",53,"I",54,"Xe",55,"Cs",56,"Ba",57,"La",58,"Ce",59,"Pr",60,"Nd",61,"Pm",62,"Sm",63,"Eu",64,"Gd",65,"Tb",66,"Dy",67,"Ho",68,"Er",69,"Tm",70,"Yb",71,"Lu",72,"Hf",73,"Ta",74,"W",75,"Re",76,"Os",77,"Ir",78,"Pt",79,"Au",80,"Hg",81,"Tl",82,"Pb",83,"Bi",84,"Po",85,"At",86,"Rn",87,"Fr",88,"Ra",89,"Ac",90,"Th",91,"Pa",92,"U",93,"Np",94,"Pu",95,"Am",96,"Cm",97,"Bk",98,"Cf",99,"Es",100,"Fm",101,"Md",102,"No",103,"Lr",104,"Rf",105,"Db",106,"Sg",107,"Bh",108,"Hs",109,"Mt",110,"Ds",111,"Rg",112,"Cn",113,"Uut",114,"Uuq",115,"Uup",116,"Uuh",117,"Uus",118,"Uuo"],Name:"BlueObeliskElements"}].filter((e=>e.RGBPoints)).filter((e=>"CIELAB"!==e.ColorSpace)).forEach((e=>{r[e.Name]=e}));const i=Object.keys(r);i.sort();var o={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(r[e.Name]||(i.push(e.Name),i.sort()),r[e.Name]=e)},removePresetByName:function(e){const t=i.indexOf(e);t>-1&&i.splice(t,1),delete r[e]},getPresetByName:function(e){return r[e]},rgbPresetNames:i}},function(e,t,n){var r;!function(i,o,a){if(i){for(var s,l={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},u={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},c={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},d={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)l[111+p]="f"+p;for(p=0;p<=9;++p)l[p+96]=p.toString();_.prototype.bind=function(e,t,n){var r=this;return e=e instanceof Array?e:[e],r._bindMultiple.call(r,e,t,n),r},_.prototype.unbind=function(e,t){return this.bind.call(this,e,(function(){}),t)},_.prototype.trigger=function(e,t){var n=this;return n._directMap[e+":"+t]&&n._directMap[e+":"+t]({},e),n},_.prototype.reset=function(){var e=this;return e._callbacks={},e._directMap={},e},_.prototype.stopCallback=function(e,t){if((" "+t.className+" ").indexOf(" mousetrap ")>-1)return!1;if(y(t,this.target))return!1;if("composedPath"in e&&"function"==typeof e.composedPath){var n=e.composedPath()[0];n!==e.target&&(t=n)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},_.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},_.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(l[t]=e[t]);s=null},_.init=function(){var e=_(o);for(var t in e)"_"!==t.charAt(0)&&(_[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},_.init(),i.Mousetrap=_,e.exports&&(e.exports=_),void 0===(r=function(){return _}.call(t,n,t,e))||(e.exports=r)}function f(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function h(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return l[e.which]?l[e.which]:u[e.which]?u[e.which]:String.fromCharCode(e.which).toLowerCase()}function m(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function g(e,t,n){return n||(n=function(){if(!s)for(var e in s={},l)e>95&&e<112||l.hasOwnProperty(e)&&(s[l[e]]=e);return s}()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function v(e,t){var n,r,i,o=[];for(n=function(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus")).split("+")}(e),i=0;i1?p(e,s,n,r):(a=v(e,r),t._callbacks[a.key]=t._callbacks[a.key]||[],u(a.key,a.modifiers,{type:a.action},i,e,o),t._callbacks[a.key][i?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:i,level:o,combo:e}))}t._handleKey=function(e,t,n){var r,i=u(e,t,n),o={},d=0,p=!1;for(r=0;r=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(o)})),e.exports=l},function(e){var t="int64_t",n="uint64_t",r=n;e.exports={Int8:"int8_t",UInt8:"uint8_t",Int16:"int16_t",UInt16:"uint16_t",Int32:"int32_t",UInt32:"uint32_t",Int64:t,UInt64:n,SizeValueType:r,IdentifierType:"uint64_t",IndexValueType:"int64_t",OffsetValueType:"int64_t"}},function(e){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r;!function(i,o,a){var s,l=256,u=a.pow(l,6),c=a.pow(2,52),d=2*c,p=255;function f(e,t,n){var r=[],p=v(g((t=1==t?{entropy:!0}:t||{}).entropy?[e,y(o)]:null==e?function(){try{var e;return s&&(e=s.randomBytes)?e=e(l):(e=new Uint8Array(l),(i.crypto||i.msCrypto).getRandomValues(e)),y(e)}catch(e){var t=i.navigator,n=t&&t.plugins;return[+new Date,i,n,i.screen,y(o)]}}():e,3),r),f=new h(r),_=function(){for(var e=f.g(6),t=u,n=0;e=d;)e/=2,t/=2,n>>>=1;return(e+n)/t};return _.int32=function(){return 0|f.g(4)},_.quick=function(){return f.g(4)/4294967296},_.double=_,v(y(f.S),o),(t.pass||n||function(e,t,n,r){return r&&(r.S&&m(r,f),e.state=function(){return m(f,{})}),n?(a.random=e,t):e})(_,p,"global"in t?t.global:this==a,t.state)}function h(e){var t,n=e.length,r=this,i=0,o=r.i=r.j=0,a=r.S=[];for(n||(e=[n++]);i>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function s(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function l(e,t){var n=new a(e),r=t&&t.state,i=n.next;return i.int32=function(){return 4294967296*n.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.alea=l}(0,e=n.nmd(e),n.amdD)},function(e,t,n){var r;!function(e,i,o){function a(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xor128=l}(0,e=n.nmd(e),n.amdD)},function(e,t,n){var r;!function(e,i,o){function a(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r>>4),t.next()}function s(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function l(e,t){var n=new a(e),r=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xorwow=l}(0,e=n.nmd(e),n.amdD)},function(e,t,n){var r;!function(e,i,o){function a(e){var t=this;t.next=function(){var e,n,r=t.x,i=t.i;return e=r[i],n=(e^=e>>>7)^e<<24,n^=(e=r[i+1&7])^e>>>10,n^=(e=r[i+3&7])^e>>>3,n^=(e=r[i+4&7])^e<<7,e=r[i+7&7],n^=(e^=e<<13)^e<<9,r[i]=n,t.i=i+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n0;--n)e.next()}(t,e)}function s(e,t){return t.x=e.x.slice(),t.i=e.i,t}function l(e,t){null==e&&(e=+new Date);var n=new a(e),r=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,r&&(r.x&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xorshift7=l}(0,e=n.nmd(e),n.amdD)},function(e,t,n){var r;!function(e,i,o){function a(e){var t=this;t.next=function(){var e,n,r=t.w,i=t.X,o=t.i;return t.w=r=r+1640531527|0,n=i[o+34&127],e=i[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=i[o]=n^e,t.i=o,n+(r^r>>>16)|0},function(e,t){var n,r,i,o,a,s=[],l=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,l=Math.max(l,t.length)),i=0,o=-32;o>>15,r^=r<<4,r^=r>>>13,o>=0&&(a=a+1640531527|0,i=0==(n=s[127&o]^=r+a)?i+1:0);for(i>=128&&(s[127&(t&&t.length||0)]=-1),i=127,o=512;o>0;--o)r=s[i+34&127],n=s[i=i+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,s[i]=r^n;e.w=a,e.X=s,e.i=i}(t,e)}function s(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function l(e,t){null==e&&(e=+new Date);var n=new a(e),r=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,r&&(r.X&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xor4096=l}(0,e=n.nmd(e),n.amdD)},function(e,t,n){var r;!function(e,i,o){function a(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,i=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^i,i=i-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^i,t.a=i-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.tychei=l}(0,e=n.nmd(e),n.amdD)},function(e,t,n){"use strict";n.d(t,{XJ:function(){return r},ZP:function(){return i}});const r={DEFAULT:0,SINGLE:1,DOUBLE:2};var i={AttributeCopyOperations:{COPYTUPLE:0,INTERPOLATE:1,PASSDATA:2,ALLCOPY:3},AttributeLimitTypes:{MAX:0,EXACT:1,NOLIMIT:2},AttributeTypes:{SCALARS:0,VECTORS:1,NORMALS:2,TCOORDS:3,TENSORS:4,GLOBALIDS:5,PEDIGREEIDS:6,EDGEFLAG:7,NUM_ATTRIBUTES:8},CellGhostTypes:{DUPLICATECELL:1,HIGHCONNECTIVITYCELL:2,LOWCONNECTIVITYCELL:4,REFINEDCELL:8,EXTERIORCELL:16,HIDDENCELL:32},DesiredOutputPrecision:r,PointGhostTypes:{DUPLICATEPOINT:1,HIDDENPOINT:2},ghostArrayName:"vtkGhostType"}},function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=20?"ste":"de")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},o=function(e){return function(t,n,o,a){var s=r(t),l=i[e][r(t)];return 2===s&&(l=l[n?0:1]),l.replace(/%d/i,t)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:o("s"),ss:o("s"),m:o("m"),mm:o("m"),h:o("h"),hh:o("h"),d:o("d"),dd:o("d"),M:o("M"),MM:o("M"),y:o("y"),yy:o("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(1))},function(e,t,n){!function(e){"use strict";var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(r,i,o,a){var s=t(r),l=n[e][t(r)];return 2===s&&(l=l[i?0:1]),l.replace(/%d/i,r)}},i=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-dz",{months:i,monthsShort:i,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,i,o,a){var s=n(t),l=r[e][n(t)];return 2===s&&(l=l[i?0:1]),l.replace(/%d/i,t)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10,r=e%100-n,i=e>=100?100:null;return e+(t[n]||t[r]||t[i])},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t){var n=e.split("_");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){return"m"===r?n?"хвіліна":"хвіліну":"h"===r?n?"гадзіна":"гадзіну":e+" "+t({ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:n?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[r],+e)}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:n,mm:n,h:n,hh:n,d:"дзень",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t?e<4?e:e+12:"ভোর"===t||"সকাল"===t?e:"দুপুর"===t?e>=3?e:e+12:"বিকাল"===t||"সন্ধ্যা"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n){return e+" "+i({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}function n(e){switch(r(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function r(e){return e>9?r(e%10):e}function i(e,t){return 2===t?o(e):e}function o(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}var a=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],s=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,l=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,u=/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,c=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],d=[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],p=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:p,fullWeekdaysParse:c,shortWeekdaysParse:d,minWeekdaysParse:p,monthsRegex:s,monthsShortRegex:s,monthsStrictRegex:l,monthsShortStrictRegex:u,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:n},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),r=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],i=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function o(e){return e>1&&e<5&&1!=~~(e/10)}function a(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"ss":return t||r?i+(o(e)?"sekundy":"sekund"):i+"sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?i+(o(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?i+(o(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?i+(o(e)?"dny":"dní"):i+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?i+(o(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?i+(o(e)?"roky":"let"):i+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){return 6===this.day()?"[το προηγούμενο] dddd [{}] LT":"[την προηγούμενη] dddd [{}] LT"},sameElse:"L"},calendar:function(e,n){var r=this._calendarEl[e],i=n&&n.hours();return t(r)&&(r=r.apply(n)),r.replace("{}",i%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}(n(1))},function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"})}(n(1))},function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?i[n][2]?i[n][2]:i[n][1]:r?i[n][0]:i[n][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n(1))},function(e,t,n){!function(e){"use strict";var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function r(e,t,n,r){var o="";switch(n){case"s":return r?"muutaman sekunnin":"muutama sekunti";case"ss":o=r?"sekunnin":"sekuntia";break;case"m":return r?"minuutin":"minuutti";case"mm":o=r?"minuutin":"minuuttia";break;case"h":return r?"tunnin":"tunti";case"hh":o=r?"tunnin":"tuntia";break;case"d":return r?"päivän":"päivä";case"dd":o=r?"päivän":"päivää";break;case"M":return r?"kuukauden":"kuukausi";case"MM":o=r?"kuukauden":"kuukautta";break;case"y":return r?"vuoden":"vuosi";case"yy":o=r?"vuoden":"vuotta"}return o=i(e,r)+" "+o}function i(e,r){return e<10?r?n[e]:t[e]:e}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,r=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,i=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i];e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:t,monthsShortStrictRegex:n,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t=["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],n=["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],r=["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],i=["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],o=["Do","Lu","Má","Cé","Dé","A","Sa"];e.defineLocale("ga",{months:t,monthsShort:n,monthsParseExact:!0,weekdays:r,weekdaysShort:i,weekdaysMin:o,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],n=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],r=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],i=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],o=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"];e.defineLocale("gd",{months:t,monthsShort:n,monthsParseExact:!0,weekdays:r,weekdaysShort:i,weekdaysMin:o,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return r?i[n][0]:i[n][1]}e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){return"D"===t?e+"वेर":e},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return r?i[n][0]:i[n][1]}e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){return"D"===t?e+"er":e},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i],i=[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i];e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:r,longMonthsParse:r,shortMonthsParse:i,monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,r){var i=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"ss":return i+(r||t)?" másodperc":" másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return i+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return i+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return i+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return i+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return i+(r||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e){return e%100==11||e%10!=1}function n(e,n,r,i){var o=e+" ";switch(r){case"s":return n||i?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?o+(n||i?"sekúndur":"sekúndum"):o+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?o+(n||i?"mínútur":"mínútum"):n?o+"mínúta":o+"mínútu";case"hh":return t(e)?o+(n||i?"klukkustundir":"klukkustundum"):o+"klukkustund";case"d":return n?"dagur":i?"dag":"degi";case"dd":return t(e)?n?o+"dagar":o+(i?"daga":"dögum"):n?o+"dagur":o+(i?"dag":"degi");case"M":return n?"mánuður":i?"mánuð":"mánuði";case"MM":return t(e)?n?o+"mánuðir":o+(i?"mánuði":"mánuðum"):n?o+"mánuður":o+(i?"mánuð":"mánuði");case"y":return n||i?"ár":"ári";case"yy":return t(e)?o+(n||i?"ár":"árum"):o+(n||i?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){return 0===this.day()?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT":"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){return 0===this.day()?"[la scorsa] dddd [alle] LT":"[lo scorso] dddd [alle] LT"},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return"元"===t[1]?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,t,n){return"ი"===n?t+"ში":t+n+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,n){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];e.defineLocale("ku",{months:r,monthsShort:r,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,n){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[n][0]:i[n][1]}function n(e){return i(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e}function r(e){return i(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e}function i(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return i(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return i(e)}return i(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:r,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"}function r(e,t,n,r){return t?o(n)[0]:r?o(n)[1]:o(n)[2]}function i(e){return e%10==0||e>10&&e<20}function o(e){return t[e].split("_")}function a(e,t,n,a){var s=e+" ";return 1===e?s+r(e,t,n[0],a):t?s+(i(e)?o(n)[1]:o(n)[0]):a?s+o(n)[1]:s+(i(e)?o(n)[1]:o(n)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:n,ss:a,m:r,mm:a,h:r,hh:a,d:r,dd:a,M:r,MM:a,y:r,yy:a},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function r(e,r,i){return e+" "+n(t[i],e,r)}function i(e,r,i){return n(t[i],e,r)}function o(e,t){return t?"dažas sekundes":"dažām sekundēm"}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:o,ss:r,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,n){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function r(e,t,n,r){var i="";if(t)switch(n){case"s":i="काही सेकंद";break;case"ss":i="%d सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे"}else switch(n){case"s":i="काही सेकंदां";break;case"ss":i="%d सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां"}return i.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){return 12===e&&(e=0),"पहाटे"===t||"सकाळी"===t?e:"दुपारी"===t||"सायंकाळी"===t||"रात्री"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,n){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),r=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function i(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function o(e,t,n){var r=e+" ";switch(n){case"ss":return r+(i(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(i(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(i(e)?"godziny":"godzin");case"ww":return r+(i(e)?"tygodnie":"tygodni");case"MM":return r+(i(e)?"miesiące":"miesięcy");case"yy":return r+(i(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,r){return e?/D MMMM/.test(r)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:o,m:o,mm:o,h:o,hh:o,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:o,M:"miesiąc",MM:o,y:"rok",yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var r=" ";return(e%100>=20||e>=100&&e%100==0)&&(r=" de "),e+r+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"}[n]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t){var n=e.split("_");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){return"m"===r?n?"минута":"минуту":e+" "+t({ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[r],+e)}var r=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:n,m:n,mm:n,h:"час",hh:n,d:"день",dd:n,w:"неделя",ww:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}})}(n(1))},function(e,t,n){!function(e){"use strict";var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function r(e){return e>1&&e<5}function i(e,t,n,i){var o=e+" ";switch(n){case"s":return t||i?"pár sekúnd":"pár sekundami";case"ss":return t||i?o+(r(e)?"sekundy":"sekúnd"):o+"sekundami";case"m":return t?"minúta":i?"minútu":"minútou";case"mm":return t||i?o+(r(e)?"minúty":"minút"):o+"minútami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?o+(r(e)?"hodiny":"hodín"):o+"hodinami";case"d":return t||i?"deň":"dňom";case"dd":return t||i?o+(r(e)?"dni":"dní"):o+"dňami";case"M":return t||i?"mesiac":"mesiacom";case"MM":return t||i?o+(r(e)?"mesiace":"mesiacov"):o+"mesiacmi";case"y":return t||i?"rok":"rokom";case"yy":return t||i?o+(r(e)?"roky":"rokov"):o+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:case 4:case 5:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"ss":return i+=1===e?t?"sekundo":"sekundi":2===e?t||r?"sekundi":"sekundah":e<5?t||r?"sekunde":"sekundah":"sekund";case"m":return t?"ena minuta":"eno minuto";case"mm":return i+=1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return i+=1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami";case"d":return t||r?"en dan":"enim dnem";case"dd":return i+=1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi";case"M":return t||r?"en mesec":"enim mesecem";case"MM":return i+=1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci";case"y":return t||r?"eno leto":"enim letom";case"yy":return i+=1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti"}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?":e":1===t||2===t?":a":":e")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"};e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var r=e%10,i=e%100-r,o=e>=100?100:null;return e+(t[r]||t[i]||t[o])}},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"}function r(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"}function i(e,t,n,r){var i=o(e);switch(n){case"ss":return i+" lup";case"mm":return i+" tup";case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}function o(e){var n=Math.floor(e%1e3/100),r=Math.floor(e%100/10),i=e%10,o="";return n>0&&(o+=t[n]+"vatlh"),r>0&&(o+=(""!==o?" ":"")+t[r]+"maH"),i>0&&(o+=(""!==o?" ":"")+t[i]),""===o?"pagh":o}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:n,past:r,s:"puS lup",ss:i,m:"wa’ tup",mm:i,h:"wa’ rep",hh:i,d:"wa’ jaj",dd:i,M:"wa’ jar",MM:i,y:"wa’ DIS",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){return e<12?n?"öö":"ÖÖ":n?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var r=e%10,i=e%100-r,o=e>=100?100:null;return e+(t[r]||t[i]||t[o])}},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var i={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r||t?i[n][0]:i[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"يېرىم كېچە":r<900?"سەھەر":r<1130?"چۈشتىن بۇرۇن":r<1230?"چۈش":r<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t){var n=e.split("_");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){return"m"===r?n?"хвилина":"хвилину":"h"===r?n?"година":"годину":e+" "+t({ss:n?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:n?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:n?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[r],+e)}function r(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative}function i(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:r,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:n,m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1200?"上午":1200===r?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(1))},function(e,t,n){!function(e){"use strict";e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(1))},,,,,,,,function(e,t,n){"use strict";n.d(t,{AS:function(){return r},II:function(){return i},ZP:function(){return o}});const r={Unknown:0,LeftController:1,RightController:2},i={Unknown:0,Trigger:1,TrackPad:2,Grip:3,Thumbstick:4,A:5,B:6,ApplicationMenu:7};var o={Device:r,Input:i,Axis:{Unknown:0,TouchpadX:1,TouchpadY:2,ThumbstickX:3,ThumbstickY:4}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(0),i=n(5),o=n(4);function a(e,t){t.classHierarchy.push("vtkSphereSource"),e.requestData=(e,n)=>{if(t.deleted)return;let a=n[0];const s=a?a.getPoints().getDataType():t.pointType;a=i.ZP.newInstance();let l=0,{thetaResolution:u}=t,c=t.startThetat.startTheta?t.endTheta:t.startTheta;d*=Math.PI/180;let p=t.startPhit.startPhi?t.endPhi:t.startPhi;f*=Math.PI/180,Math.abs(c-d)<2*Math.PI&&++u;const h=(d-c)/t.thetaResolution,m=t.startPhi<=0?1:0,g=t.phiResolution+(t.endPhi>=180?-1:0),v=t.phiResolution*u+2,y=2*t.phiResolution*t.thetaResolution;let _=0,b=r.m.newTypedArray(s,3*v),x=new Float32Array(3*v),w=0,S=new Uint32Array(5*y);t.startPhi<=0&&(b[3*_+0]=t.center[0],b[3*_+1]=t.center[1],b[3*_+2]=t.center[2]+t.radius,x[3*_+0]=0,x[3*_+1]=0,x[3*_+2]=1,_++,l++),t.endPhi>=180&&(b[3*_+0]=t.center[0],b[3*_+1]=t.center[1],b[3*_+2]=t.center[2]-t.radius,x[3*_+0]=0,x[3*_+1]=0,x[3*_+2]=-1,_++,l++);const C=t.phiResolution-l,T=(f-p)/(t.phiResolution-1);for(let e=0;e=180){const e=C-1+l;for(let t=0;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),r.m.obj(e,t),r.m.setGet(e,t,["radius","latLongTessellation","thetaResolution","startTheta","endTheta","phiResolution","startPhi","endPhi"]),r.m.setGetArray(e,t,["center"],3),r.m.algo(e,t,0,1),a(e,t)}var u={newInstance:r.m.newInstance(l,"vtkSphereSource"),extend:l}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return P},hW:function(){return v}});var r=n(0),i=n(13),o=n(696),a=n(60),s=n(61);function l(e,t){t.classHierarchy.push("vtkHandleRepresentation")}const u={behavior:s.c.HANDLE,pickable:!0,dragable:!0,scaleInPixels:!0};var c={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={...u,...n};a.ZP.extend(e,t,r),l(0,t)}},d=n(550),p=n(323),f=n(5),h=n(70),m=n(62),g=n(546);function v(e,t){return(e,n)=>{const r=(0,a.n7)(e,"points",n.length).getData();let i=0;for(let e=0;e{t._pipeline.mapper.setColorByArrayName("color");const r=(0,a.n7)(e,"color",n.length,"Uint8Array",4),i=r.getData();let o=0;for(let e=0;e{t._pipeline.mapper.setColorByArrayName("color");const r=(0,a.n7)(e,"color",n.length).getData();for(let e=0;e{t._pipeline.mapper.setColorByArrayName(null)}}function x(e,t){return(n,r)=>{t._pipeline.mapper.setScaleArray("scale"),t._pipeline.mapper.setScaleFactor(1),t._pipeline.mapper.setScaling(!0),t._pipeline.mapper.setScaleMode(o.ZP.ScaleModes.SCALE_BY_COMPONENTS);const i=(0,a.n7)(n,"scale",r.length,"Float32Array",3).getData();let s=0;for(let n=0;n{t._pipeline.mapper.setScaleArray("scale"),t._pipeline.mapper.setScaleFactor(1),t._pipeline.mapper.setScaling(!0);const i=(0,a.n7)(n,"scale",r.length).getData();for(let n=0;n{t._pipeline.mapper.setScaleArray(null),t._pipeline.mapper.setScaleFactor(t.defaultScale),t._pipeline.mapper.setScaling(1!==t.defaultScale)}}function C(e,t){return(e,n)=>{t._pipeline.mapper.setOrientationArray("orientation"),t._pipeline.mapper.setOrientationMode(g.mk.MATRIX);const r=(0,a.n7)(e,"orientation",n.length,"Float32Array",9).getData();for(let e=0;e{t._pipeline.mapper.setOrientationArray(null)}}function M(e,t){t.classHierarchy.push("vtkGlyphRepresentation");const n={...e},i=f.ZP.newInstance({mtime:0});function o(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;inull!=e[0]?.[`get${r.m.capitalize(t)}`]?.()))}e.getRepresentationStates=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.inputData[0];return n.getRepresentationStates(e).filter((e=>e.getOrigin?.()&&(e.isVisible?.()??!0)))},e.getMixins=e=>{const n={};return o(e,"origin")?n.position=t.applyMixin.origin:n.position=t.applyMixin.noPosition,o(e,"color3")?n.color=t.applyMixin.color3:o(e,"color")?n.color=t.applyMixin.color:n.color=t.applyMixin.noColor,o(e,"scale3")?n.scale=t.applyMixin.scale3:o(e,"scale1")?n.scale=t.applyMixin.scale1:n.scale=t.applyMixin.noScale,o(e,"direction")?n.orientation=t.applyMixin.direction:n.orientation=t.applyMixin.noOrientation,n},e.requestData=(t,n)=>{const r=e.getRepresentationStates(t[0]);n[0]=i;const o=e.getMixins(r);Object.values(o).forEach((e=>e(i,r))),i.getPoints().modified(),i.modified()},a.ZP.connectPipeline(t._pipeline),e.addActor(t._pipeline.actor)}function D(e,t,n){return{defaultScale:1,...n,_pipeline:{source:n._pipeline?.source??e,glyph:n._pipeline?.glyph??p.ZP.newInstance({phiResolution:8,thetaResolution:8}),mapper:n._pipeline?.mapper??o.ZP.newInstance({scalarMode:h._5.USE_POINT_FIELD_DATA}),actor:n._pipeline?.actor??i.ZP.newInstance({parentProp:e}),...n._pipeline},applyMixin:{origin:n.applyMixin?.origin??v(0,t),noPosition:n.applyMixin?.noPosition??((e,t)=>{(0,a.n7)(e,"points",0)}),color3:n.applyMixin?.color3??y(0,t),color:n.applyMixin?.color??_(0,t),noColor:n.applyMixin?.noColor??b(0,t),scale3:n.applyMixin?.scale3??x(e,t),scale1:n.applyMixin?.scale1??w(e,t),noScale:n.applyMixin?.noScale??S(0,t),direction:n.applyMixin?.direction??C(0,t),noOrientation:n.applyMixin?.noOrientation??T(0,t),...n.applyMixin}}}function A(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.behavior===s.c.CONTEXT?d.Z.extend(e,t,D(e,t,n)):c.extend(e,t,D(e,t,n)),"lighting"in n&&t._pipeline.actor.getProperty().setLighting(n.lighting),r.m.setGet(e,t._pipeline,["defaultScale"]),r.m.get(e,t._pipeline,["glyph","mapper","actor"]),r.m.setGet(e,t.applyMixin,Object.keys(t.applyMixin)),M(e,t)}var P={newInstance:r.m.newInstance(A,"vtkGlyphRepresentation"),extend:A}},function(e){var t=new Map([["gen","VTKExodusFileReader"],["e","VTKExodusFileReader"],["exo","VTKExodusFileReader"],["exii","VTKExodusFileReader"],["ex2","VTKExodusFileReader"],["vtk","VTKLegacyFileReader"],["VTK","VTKLegacyFileReader"],["vtp","VTKXMLFileReader"],["VTP","VTKXMLFileReader"],["vtu","VTKXMLFileReader"],["VTU","VTKXMLFileReader"],["vtr","VTKXMLFileReader"],["VTR","VTKXMLFileReader"]]);e.exports=t},function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new P(r||[]);return i(a,"_invoke",{value:T(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function v(){}function y(){}var _={};u(_,a,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(k([])));x&&x!==n&&r.call(x,a)&&(_=x);var w=y.prototype=g.prototype=Object.create(_);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function T(e,t,n){var r=p;return function(i,o){if(r===f)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return L()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=M(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===p)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var l=d(e,t,n);if("normal"===l.type){if(r=n.done?h:"suspendedYield",l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=h,n.method="throw",n.arg=l.arg)}}}function M(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,M(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function k(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:k(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},function(e){function t(e,n){if(e instanceof t){var r=e;this.rows=r.rows,this.columns=r.columns,this.data=r.data.slice()}else this.rows=e,this.columns=n,this.data=new Array(e*n),this.data.fill(0)}t.prototype.setIdentity=function(){for(var e=0;ei(e.trim()))):""===e||Number.isNaN(Number(e))?e:Number(e):void 0)}n.d(t,{Z:function(){return o}});var o={toNativeType:i,extractURLParameters:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search;const n={},o=e?i:r,a=(t||"").replace(/#.*/,"").replace("?","").split("&");return a.forEach((e=>{const[t,r]=e.split("=").map((e=>decodeURIComponent(e)));t&&(n[t]=!r||o(r))})),n}}},function(e,t,n){e.exports=n(331)},function(e,t,n){"use strict";var r=n(17),i=n(89),o=n(332),a=n(94);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var l=s(n(65));l.Axios=o,l.create=function(e){return s(a(l.defaults,e))},l.Cancel=n(95),l.CancelToken=n(345),l.isCancel=n(93),l.all=function(e){return Promise.all(e)},l.spread=n(346),l.isAxiosError=n(347),e.exports=l,e.exports.default=l},function(e,t,n){"use strict";var r=n(17),i=n(90),o=n(333),a=n(334),s=n(94),l=n(344),u=l.validators;function c(e){this.defaults=e,this.interceptors={request:new o,response:new o}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var c=[a,void 0];for(Array.prototype.unshift.apply(c,n),c=c.concat(o),i=Promise.resolve(e);c.length;)i=i.then(c.shift(),c.shift());return i}for(var d=e;n.length;){var p=n.shift(),f=n.shift();try{d=p(d)}catch(e){f(e);break}}try{i=a(d)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},c.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=c},function(e,t,n){"use strict";var r=n(17);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,n){"use strict";var r=n(17),i=n(335),o=n(93),a=n(65);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(17),i=n(65);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},function(e,t,n){"use strict";var r=n(17);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(92);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(17);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(340),i=n(341);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(17),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(17);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(491),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={},a=r.version.split(".");function s(e,t){for(var n=t?t.split("."):a,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},function(e,t,n){"use strict";var r=n(95);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,n){var r,i;!function(o){if(void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i),!0,e.exports=o(),!!0){var a=window.Cookies,s=window.Cookies=o();s.noConflict=function(){return window.Cookies=a,s}}}((function(){function e(){for(var e=0,t={};e0?y+v:""}},function(e,t,n){"use strict";var r=n(66),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),u=s?o.slice(0,s.index):o,c=[];if(u){if(!n.plainObjects&&i.call(Object.prototype,u)&&!n.allowPrototypes)return;c.push(u)}for(var d=0;n.depth>0&&null!==(s=a.exec(o))&&d=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(u,10);n.parseArrays||""!==u?!isNaN(c)&&s!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[])[c]=i:a[u]=i:a={0:i}}i=a}return i}(c,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var c="string"==typeof e?function(e,t){var n,u={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,p=c.split(t.delimiter,d),f=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(g=o(g)?[g]:g),i.call(u,m)?u[m]=r.combine(u[m],g):u[m]=g}return u}(e,n):e,d=n.plainObjects?Object.create(null):{},p=Object.keys(c),f=0;f0&&!i.call(e,0))for(var m=0;m0)for(var g=0;g{if(n.isDeleted())return null;let r=0,i=n.getClassName(r++),o=!1;const a=Object.keys(t.overrides);for(;i&&!o;)-1!==a.indexOf(i)?o=!0:i=n.getClassName(r++);if(!o)return null;const s=t.overrides[i]();return s.setMyFactory(e),s},e.registerOverride=(e,n)=>{t.overrides[e]=n}}const o={};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.obj(e,t),i(e,t)}var s={newInstance:r.m.newInstance(a,"vtkViewNodeFactory"),extend:a}},,function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(0),i=n(105),o=n(10),a=n(2);function s(e,t){e.getBounds=()=>(r.m.vtkErrorMacro("vtkAbstractMapper3D.getBounds - NOT IMPLEMENTED"),(0,a.F)()),e.getCenter=()=>{const n=e.getBounds();return t.center=o.ZP.isValid(n)?o.ZP.getCenter(n):null,t.center?.slice()},e.getLength=()=>{const t=e.getBounds();return o.ZP.getDiagonalLength(t)}}const l=e=>({bounds:[...o.ZP.INIT_BOUNDS],center:[0,0,0],viewSpecificProperties:{},...e});var u={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l(n)),i.Z.extend(e,t,n),r.m.setGet(e,t,["viewSpecificProperties"]),s(e,t)}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return p}});var r=n(0),i=n(2),o=n(69),a=n(107),s=n(14);const{vtkErrorMacro:l}=r.m;function u(e,t){t.classHierarchy.push("vtkLookupTable"),e.isOpaque=()=>{if(t.opaqueFlagBuildTime.getMTime()!1,e.getNumberOfAvailableColors=()=>t.table.length/4,e.linearIndexLookup=(e,t)=>{let n=0;const r=Number(e);return rt.range[1]?n=t.maxIndex+1+1.5:(n=(r+t.shift)*t.scale,n=n{let o=0;o=(0,i.i)(t)?Math.floor(r.maxIndex+1.5+2):e.linearIndexLookup(t,r);const a=4*o;return n.slice(a,a+4)},e.indexedLookupFunction=(n,r,i)=>{let o=e.getAnnotatedValueIndexInternal(n);-1===o&&(o=t.numberOfColors+2);const a=4*o;return[r[a],r[a+1],r[a+2],r[a+3]]},e.lookupShiftAndScale=(e,t)=>{t.shift=-e[0],t.scale=Number.MAX_VALUE,e[1]>e[0]&&(t.scale=(t.maxIndex+1)/(e[1]-e[0]))},e.mapScalarsThroughTable=(n,r,i,o)=>{let s=e.linearLookup;t.indexedLookup&&(s=e.indexedLookupFunction);const l=e.getMappingRange(),u={maxIndex:e.getNumberOfColors()-1,range:l,shift:0,scale:0};e.lookupShiftAndScale(l,u);const c=e.getAlpha(),d=n.getNumberOfTuples(),p=n.getNumberOfComponents(),f=r.getData(),h=n.getData();if(c>=1){if(i===a.OG.RGBA)for(let e=0;e{let n=0,r=0,o=0,a=0;const s=t.numberOfColors-1;s&&(n=(t.hueRange[1]-t.hueRange[0])/s,r=(t.saturationRange[1]-t.saturationRange[0])/s,o=(t.valueRange[1]-t.valueRange[0])/s,a=(t.alphaRange[1]-t.alphaRange[0])/s),t.table.length=4*s+16;const l=[],u=[];for(let e=0;e<=s;e++)l[0]=t.hueRange[0]+e*n,l[1]=t.saturationRange[0]+e*r,l[2]=t.valueRange[0]+e*o,(0,i.h)(l,u),u[3]=t.alphaRange[0]+e*a,t.table[4*e]=255*u[0]+.5,t.table[4*e+1]=255*u[1]+.5,t.table[4*e+2]=255*u[2]+.5,t.table[4*e+3]=255*u[3]+.5;e.buildSpecialColors(),t.buildTime.modified()},e.setTable=n=>{if(Array.isArray(n)){const r=n[0].length;t.numberOfColors=n.length;const i=4-r;let o=0;for(let e=0;e{const{numberOfColors:e}=t,n=t.table;let r=4*(e+0);t.useBelowRangeColor||0===e?(n[r]=255*t.belowRangeColor[0]+.5,n[r+1]=255*t.belowRangeColor[1]+.5,n[r+2]=255*t.belowRangeColor[2]+.5,n[r+3]=255*t.belowRangeColor[3]+.5):(n[r]=n[0],n[r+1]=n[1],n[r+2]=n[2],n[r+3]=n[3]),r=4*(e+1),t.useAboveRangeColor||0===e?(n[r]=255*t.aboveRangeColor[0]+.5,n[r+1]=255*t.aboveRangeColor[1]+.5,n[r+2]=255*t.aboveRangeColor[2]+.5,n[r+3]=255*t.aboveRangeColor[3]+.5):(n[r]=n[4*(e-1)+0],n[r+1]=n[4*(e-1)+1],n[r+2]=n[4*(e-1)+2],n[r+3]=n[4*(e-1)+3]),r=4*(e+2),n[r]=255*t.nanColor[0]+.5,n[r+1]=255*t.nanColor[1]+.5,n[r+2]=255*t.nanColor[2]+.5,n[r+3]=255*t.nanColor[3]+.5},e.build=()=>{(t.table.length<1||e.getMTime()>t.buildTime.getMTime()&&t.insertTime.getMTime()<=t.buildTime.getMTime())&&e.forceBuild()},t.table.length>0&&(e.buildSpecialColors(),t.insertTime.modified())}const c={numberOfColors:256,hueRange:[0,.66667],saturationRange:[1,1],valueRange:[1,1],alphaRange:[1,1],nanColor:[.5,0,0,1],belowRangeColor:[0,0,0,1],aboveRangeColor:[1,1,1,1],useAboveRangeColor:!1,useBelowRangeColor:!1,alpha:1};function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,c,n),o.ZP.extend(e,t,n),t.table||(t.table=[]),t.buildTime={},r.m.obj(t.buildTime),t.opaqueFlagBuildTime={},r.m.obj(t.opaqueFlagBuildTime,{mtime:0}),t.insertTime={},r.m.obj(t.insertTime,{mtime:0}),r.m.get(e,t,["buildTime"]),r.m.setGet(e,t,["numberOfColors","useAboveRangeColor","useBelowRangeColor"]),r.m.setArray(e,t,["alphaRange","hueRange","saturationRange","valueRange"],2),r.m.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),r.m.getArray(e,t,["hueRange","saturationRange","valueRange","alphaRange","nanColor","belowRangeColor","aboveRangeColor"]),u(e,t)}var p={newInstance:r.m.newInstance(d,"vtkLookupTable"),extend:d}},function(e,t,n){"use strict";n.d(t,{C:function(){return r},Z:function(){return i}});const r={NO_INTERSECTION:0,YES_INTERSECTION:1,ON_LINE:2};var i={IntersectionState:r}},function(e,t,n){"use strict";n.d(t,{a:function(){return r}});const r=["verts","lines","polys","strips"]},function(e,t,n){"use strict";n.d(t,{ZP:function(){return C}});var r=n(0),i=n(108),o=n(363),a=n(46),s=n(364),l=n(36);const{PassTypes:u}=i.Z,{SelectionContent:c,SelectionField:d}=s.ZP,{FieldAssociations:p}=l.ZP,{vtkErrorMacro:f}=r.m;function h(e){return`${e.propID} ${e.compositeID}`}function m(e,t,n,r){if(!n)return 0;return n[4*(t*(r[2]-r[0]+1)+e)+3]}function g(e,t,n,r){if(!n)return 0;const i=4*(t*(r[2]-r[0]+1)+e),o=n[i],a=n[i+1];return 256*(256*n[i+2]+a)+o}function v(e,t){let n=t;return n<<=24,n|=e,n}function y(e,t,n,r){const i=n<0?0:n;if(0===i){if(r[0]=t[0],r[1]=t[1],t[0]e.area[2]||t[1]e.area[3])return null;const n=[t[0]-e.area[0],t[1]-e.area[1]],i=g(n[0],n[1],e.pixBuffer[u.ACTOR_PASS],e.area);if(i<=0||i-1>=e.props.length)return null;const o={valid:!0};o.propID=i-1,o.prop=e.props[o.propID];let a=g(n[0],n[1],e.pixBuffer[u.COMPOSITE_INDEX_PASS],e.area);if((a<0||a>16777215)&&(a=0),o.compositeID=a-1,e.captureZValues){const r=4*(n[1]*(e.area[2]-e.area[0]+1)+n[0]);o.zValue=(256*e.zBuffer[r]+e.zBuffer[r+1])/65535,o.displayPosition=t}if(e.pixBuffer[u.ID_LOW24]&&0===m(n[0],n[1],e.pixBuffer[u.ID_LOW24],e.area))return o;const s=g(n[0],n[1],e.pixBuffer[u.ID_LOW24],e.area),l=g(n[0],n[1],e.pixBuffer[u.ID_HIGH24],e.area);return o.attributeID=v(s,l),o}const o=[t[0],t[1]],a=[0,0];let s=y(e,t,0,r);if(s&&s.valid)return s;for(let t=1;tt?o[1]-t:0;n<=o[1]+t;++n){if(a[1]=n,o[0]>=t&&(a[0]=o[0]-t,s=y(e,a,0,r),s&&s.valid))return s;if(a[0]=o[0]+t,s=y(e,a,0,r),s&&s.valid)return s}for(let n=o[0]>=t?o[0]-(t-1):0;n<=o[0]+(t-1);++n){if(a[0]=n,o[1]>=t&&(a[1]=o[1]-t,s=y(e,a,0,r),s&&s.valid))return s;if(a[1]=o[1]+t,s=y(e,a,0,r),s&&s.valid)return s}}return r[0]=t[0],r[1]=t[1],null}function _(e,t,n,r,i){const o=[];let a=0;return t.forEach(((t,l)=>{const u=s.ZP.newInstance();switch(u.setContentType(c.INDICES),e){case p.FIELD_ASSOCIATION_CELLS:u.setFieldType(d.CELL);break;case p.FIELD_ASSOCIATION_POINTS:u.setFieldType(d.POINT);break;default:f("Unknown field association")}u.getProperties().propID=t.info.propID,u.getProperties().prop=t.info.prop,u.getProperties().compositeID=t.info.compositeID,u.getProperties().attributeID=t.info.attributeID,u.getProperties().pixelCount=t.pixelCount,n&&(u.getProperties().displayPosition=[t.info.displayPosition[0],t.info.displayPosition[1],t.info.zValue],u.getProperties().worldPosition=i.displayToWorld(t.info.displayPosition[0],t.info.displayPosition[1],t.info.zValue,r)),u.setSelectionList(t.attributeIDs),o[a]=u,a++})),o}function b(e,t,n,r,i){const o=Math.floor(t),a=Math.floor(n),s=Math.floor(r),l=Math.floor(i),u=new Map,c=[0,0];for(let t=a;t<=l;t++)for(let n=o;n<=s;n++){const r=y(e,[n,t],0,c);if(r&&r.valid){const t=h(r);if(u.has(t)){const n=u.get(t);n.pixelCount++,e.captureZValues&&r.zValue{t.rawPixBuffer=[],t.pixBuffer=[],t.zBuffer=null},e.beginSelection=()=>{t._openGLRenderer=t._openGLRenderWindow.getViewNodeFor(t._renderer),t.maxAttributeId=0;const n=t._openGLRenderWindow.getSize();if(t.framebuffer){t.framebuffer.setOpenGLRenderWindow(t._openGLRenderWindow),t.framebuffer.saveCurrentBindingsAndBuffers();const e=t.framebuffer.getSize();e[0]!==n[0]||e[1]!==n[1]?(t.framebuffer.create(n[0],n[1]),t.framebuffer.populateFramebuffer()):t.framebuffer.bind()}else t.framebuffer=a.ZP.newInstance(),t.framebuffer.setOpenGLRenderWindow(t._openGLRenderWindow),t.framebuffer.saveCurrentBindingsAndBuffers(),t.framebuffer.create(n[0],n[1]),t.framebuffer.populateFramebuffer();if(t._openGLRenderer.clear(),t._openGLRenderer.setSelector(e),t.hitProps={},t.propPixels={},t.props=[],e.releasePixBuffers(),t.fieldAssociation===p.FIELD_ASSOCIATION_POINTS){const e=t._openGLRenderWindow.getContext(),n=e.isEnabled(e.BLEND);e.disable(e.BLEND),t._openGLRenderWindow.traverseAllPasses(),n&&e.enable(e.BLEND)}},e.endSelection=()=>{t.hitProps={},t._openGLRenderer.setSelector(null),t.framebuffer.restorePreviousBindingsAndBuffers()},e.preCapturePass=()=>{const e=t._openGLRenderWindow.getContext();t.originalBlending=e.isEnabled(e.BLEND),e.disable(e.BLEND)},e.postCapturePass=()=>{const e=t._openGLRenderWindow.getContext();t.originalBlending&&e.enable(e.BLEND)},e.select=()=>{let n=null;return e.captureBuffers()&&(n=e.generateSelection(t.area[0],t.area[1],t.area[2],t.area[3]),e.releasePixBuffers()),n},e.getSourceDataAsync=async(n,r,i,o,a)=>{if(t._renderer=n,void 0===r){const n=t._openGLRenderWindow.getSize();e.setArea(0,0,n[0]-1,n[1]-1)}else e.setArea(r,i,o,a);if(!e.captureBuffers())return!1;const s={area:[...t.area],pixBuffer:[...t.pixBuffer],captureZValues:t.captureZValues,zBuffer:t.zBuffer,props:[...t.props],fieldAssociation:t.fieldAssociation,renderer:n,openGLRenderWindow:t._openGLRenderWindow,generateSelection:function(){for(var e=arguments.length,t=new Array(e),n=0;n{if(!t._renderer||!t._openGLRenderWindow)return f("Renderer and view must be set before calling Select."),!1;t._openGLRenderer=t._openGLRenderWindow.getViewNodeFor(t._renderer),t._openGLRenderWindow.getRenderable().preRender(),e.invokeEvent({type:"StartEvent"}),t.originalBackground=t._renderer.getBackgroundByReference(),t._renderer.setBackground(0,0,0,0);const n=t._openGLRenderWindow.getRenderPasses();for(e.beginSelection(),t.currentPass=u.MIN_KNOWN_PASS;t.currentPass<=u.MAX_KNOWN_PASS;t.currentPass++)e.passRequired(t.currentPass)&&(e.preCapturePass(t.currentPass),t.captureZValues&&t.currentPass===u.ACTOR_PASS&&"function"==typeof n[0].requestDepth&&"function"==typeof n[0].getFramebuffer?(n[0].requestDepth(),t._openGLRenderWindow.traverseAllPasses()):t._openGLRenderWindow.traverseAllPasses(),e.postCapturePass(t.currentPass),e.savePixelBuffer(t.currentPass),e.processPixelBuffers());return e.endSelection(),t._renderer.setBackground(t.originalBackground),e.invokeEvent({type:"EndEvent"}),!0},e.processPixelBuffers=()=>{t.props.forEach(((n,r)=>{e.isPropHit(r)&&n.processSelectorPixelBuffers(e,t.propPixels[r])}))},e.passRequired=e=>{if(e===u.ID_HIGH24){if(t.fieldAssociation===p.FIELD_ASSOCIATION_POINTS)return t.maximumPointId>16777215;if(t.fieldAssociation===p.FIELD_ASSOCIATION_CELLS)return t.maximumCellId>16777215}return!0},e.savePixelBuffer=n=>{if(t.pixBuffer[n]=t._openGLRenderWindow.getPixelData(t.area[0],t.area[1],t.area[2],t.area[3]),!t.rawPixBuffer[n]){const e=(t.area[2]-t.area[0]+1)*(t.area[3]-t.area[1]+1)*4;t.rawPixBuffer[n]=new Uint8Array(e),t.rawPixBuffer[n].set(t.pixBuffer[n])}if(n===u.ACTOR_PASS){if(t.captureZValues){const e=t._openGLRenderWindow.getRenderPasses();if("function"==typeof e[0].requestDepth&&"function"==typeof e[0].getFramebuffer){const n=e[0].getFramebuffer();n.saveCurrentBindingsAndBuffers(),n.bind(),t.zBuffer=t._openGLRenderWindow.getPixelData(t.area[0],t.area[1],t.area[2],t.area[3]),n.restorePreviousBindingsAndBuffers()}}e.buildPropHitList(t.rawPixBuffer[n])}},e.buildPropHitList=e=>{let n=0;for(let r=0;r<=t.area[3]-t.area[1];r++)for(let i=0;i<=t.area[2]-t.area[0];i++){let o=g(i,r,e,t.area);o>0&&(o--,o in t.hitProps||(t.hitProps[o]=!0,t.propPixels[o]=[]),t.propPixels[o].push(4*n)),++n}},e.renderProp=n=>{t.currentPass===u.ACTOR_PASS&&(e.setPropColorValueFromInt(t.props.length+1),t.props.push(n))},e.renderCompositeIndex=n=>{t.currentPass===u.COMPOSITE_INDEX_PASS&&e.setPropColorValueFromInt(n+1)},e.renderAttributeId=e=>{e<0||(t.maxAttributeId=e>t.maxAttributeId?e:t.maxAttributeId)},e.passTypeToString=e=>r.m.enumToString(u,e),e.isPropHit=e=>Boolean(t.hitProps[e]),e.setPropColorValueFromInt=e=>{t.propColorValue[0]=e%256/255,t.propColorValue[1]=Math.floor(e/256)%256/255,t.propColorValue[2]=Math.floor(e/65536)%256/255},e.getPixelInformation=(n,r,i)=>{const o=r<0?0:r;if(0===o){if(i[0]=n[0],i[1]=n[1],n[0]t.area[2]||n[1]t.area[3])return null;const e=[n[0]-t.area[0],n[1]-t.area[1]],r=g(e[0],e[1],t.pixBuffer[u.ACTOR_PASS],t.area);if(r<=0||r-1>=t.props.length)return null;const o={valid:!0};o.propID=r-1,o.prop=t.props[o.propID];let a=g(e[0],e[1],t.pixBuffer[u.COMPOSITE_INDEX_PASS],t.area);if((a<0||a>16777215)&&(a=0),o.compositeID=a-1,t.captureZValues){const r=4*(e[1]*(t.area[2]-t.area[0]+1)+e[0]);o.zValue=(256*t.zBuffer[r]+t.zBuffer[r+1])/65535,o.displayPosition=n}if(t.pixBuffer[u.ID_LOW24]&&0===m(e[0],e[1],t.pixBuffer[u.ID_LOW24],t.area))return o;const s=g(e[0],e[1],t.pixBuffer[u.ID_LOW24],t.area),l=g(e[0],e[1],t.pixBuffer[u.ID_HIGH24],t.area);return o.attributeID=v(s,l),o}const a=[n[0],n[1]],s=[0,0];let l=e.getPixelInformation(n,0,i);if(l&&l.valid)return l;for(let t=1;tt?a[1]-t:0;n<=a[1]+t;++n){if(s[1]=n,a[0]>=t&&(s[0]=a[0]-t,l=e.getPixelInformation(s,0,i),l&&l.valid))return l;if(s[0]=a[0]+t,l=e.getPixelInformation(s,0,i),l&&l.valid)return l}for(let n=a[0]>=t?a[0]-(t-1):0;n<=a[0]+(t-1);++n){if(s[0]=n,a[1]>=t&&(s[1]=a[1]-t,l=e.getPixelInformation(s,0,i),l&&l.valid))return l;if(s[1]=a[1]+t,l=e.getPixelInformation(s,0,i),l&&l.valid)return l}}return i[0]=n[0],i[1]=n[1],null},e.generateSelection=(n,r,i,o)=>{const a=Math.floor(n),s=Math.floor(r),l=Math.floor(i),u=Math.floor(o),c=new Map,d=[0,0];for(let n=s;n<=u;n++)for(let r=a;r<=l;r++){const i=[r,n],o=e.getPixelInformation(i,0,d);if(o&&o.valid){const e=h(o);if(c.has(e)){const n=c.get(e);n.pixelCount++,t.captureZValues&&o.zValuet.rawPixBuffer[e],e.getPixelBuffer=e=>t.pixBuffer[e],e.attach=(e,n)=>{t._openGLRenderWindow=e,t._renderer=n};const n=e.setArea;e.setArea=function(){return!!n(...arguments)&&(t.area[0]=Math.floor(t.area[0]),t.area[1]=Math.floor(t.area[1]),t.area[2]=Math.floor(t.area[2]),t.area[3]=Math.floor(t.area[3]),!0)}}const w={area:void 0,currentPass:-1,propColorValue:null,props:null,maximumPointId:0,maximumCellId:0,idOffset:1};function S(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,w,n),o.ZP.extend(e,t,n),t.propColorValue=[0,0,0],t.props=[],t.area||(t.area=[0,0,0,0]),r.m.setGetArray(e,t,["area"],4),r.m.setGet(e,t,["_renderer","currentPass","_openGLRenderWindow","maximumPointId","maximumCellId"]),r.m.setGetArray(e,t,["propColorValue"],3),r.m.moveToProtected(e,t,["renderer","openGLRenderWindow"]),r.m.event(e,t,"event"),x(e,t)}var C={newInstance:r.m.newInstance(S,"vtkOpenGLHardwareSelector"),extend:S,...i.Z}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(0),i=n(36);const{FieldAssociations:o}=i.ZP;function a(e,t){t.classHierarchy.push("vtkHardwareSelector"),e.getSourceDataAsync=async(e,t,n,r,i)=>{},e.selectAsync=async(t,n,r,i,o)=>{const a=await e.getSourceDataAsync(t,n,r,i,o);return a?a.generateSelection(n,r,i,o):[]}}const s={fieldAssociation:o.FIELD_ASSOCIATION_CELLS,captureZValues:!1};function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),r.m.obj(e,t),r.m.setGet(e,t,["fieldAssociation","captureZValues"]),a(e,t)}var u={newInstance:r.m.newInstance(l,"vtkHardwareSelector"),extend:l}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return l}});var r=n(0);var i={SelectionContent:{GLOBALIDS:0,PEDIGREEIDS:1,VALUES:2,INDICES:3,FRUSTUM:4,LOCATIONS:5,THRESHOLDS:6,BLOCKS:7,QUERY:8},SelectionField:{CELL:0,POINT:1,FIELD:2,VERTEX:3,EDGE:4,ROW:5}};function o(e,t){t.classHierarchy.push("vtkSelectionNode"),e.getBounds=()=>t.points.getBounds()}const a={contentType:-1,fieldType:-1,properties:null,selectionList:[]};function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a,n),r.m.obj(e,t),t.properties={},r.m.setGet(e,t,["contentType","fieldType","properties","selectionList"]),o(e,t)}var l={newInstance:r.m.newInstance(s,"vtkSelectionNode"),extend:s,...i}},function(e,t,n){"use strict";n.d(t,{ZG:function(){return r},Xk:function(){return i},ZP:function(){return o}});const r={NEAREST:0,LINEAR:1,FAST_LINEAR:2},i={FRACTIONAL:0,PROPORTIONAL:1};var o={InterpolationType:r,OpacityMode:i}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return s}});var r=n(0);function i(e,t){t.classHierarchy.push("vtkWebGPUBindGroup"),e.setBindables=n=>{if(t.bindables.length===n.length){let e=!0;for(let r=0;r{const n=[];for(let e=0;e{let r=e.getMTime();for(let e=0;er?n:r}if(r{const n=[],r=e.getBindGroupLayoutCount(t.label);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.obj(e,t),t.bindables=[],t.bindGroupTime={},r.m.obj(t.bindGroupTime,{mtime:0}),r.m.get(e,t,["bindGroupTime","handle","sizeInBytes","usage"]),r.m.setGet(e,t,["label","device","arrayInformation"]),i(e,t)}var s={newInstance:r.m.newInstance(a),extend:a}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(0),i=n(74),o=n(34);function a(e,t){t.classHierarchy.push("vtkWebGPUTextureView"),e.create=(e,n)=>{t.texture=e,t.options=n,t.options.dimension=t.options.dimension||"2d",t.options.label=t.label,t.textureHandle=e.getHandle(),t.handle=t.textureHandle.createView(t.options),t.bindGroupLayoutEntry.texture.viewDimension=t.options.dimension;const r=o.Z.getDetailsFromTextureFormat(t.texture.getFormat());t.bindGroupLayoutEntry.texture.sampleType=r.sampleType},e.createFromTextureHandle=(e,n)=>{t.texture=null,t.options=n,t.options.dimension=t.options.dimension||"2d",t.options.label=t.label,t.textureHandle=e,t.handle=t.textureHandle.createView(t.options),t.bindGroupLayoutEntry.texture.viewDimension=t.options.dimension;const r=o.Z.getDetailsFromTextureFormat(n.format);t.bindGroupLayoutEntry.texture.sampleType=r.sampleType,t.bindGroupTime.modified()},e.getBindGroupEntry=()=>({resource:e.getHandle()}),e.getShaderCode=(e,n)=>{let r="f32";"sint"===t.bindGroupLayoutEntry.texture.sampleType?r="i32":"uint"===t.bindGroupLayoutEntry.texture.sampleType&&(r="u32");let i=`@binding(${e}) @group(${n}) var ${t.label}: texture_${t.options.dimension}<${r}>;`;return"depth"===t.bindGroupLayoutEntry.texture.sampleType&&(i=`@binding(${e}) @group(${n}) var ${t.label}: texture_depth_${t.options.dimension};`),i},e.addSampler=(n,r)=>{const o=i.ZP.newInstance({label:`${t.label}Sampler`});o.create(n,r),e.setSampler(o)},e.getBindGroupTime=()=>(t.texture&&t.texture.getHandle()!==t.textureHandle&&(t.textureHandle=t.texture.getHandle(),t.handle=t.textureHandle.createView(t.options),t.bindGroupTime.modified()),t.bindGroupTime),e.getHandle=()=>(t.texture&&t.texture.getHandle()!==t.textureHandle&&(t.textureHandle=t.texture.getHandle(),t.handle=t.textureHandle.createView(t.options),t.bindGroupTime.modified()),t.handle)}const s={texture:null,handle:null,sampler:null,label:null};function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),r.m.obj(e,t),t.bindGroupLayoutEntry={visibility:GPUShaderStage.VERTEX|GPUShaderStage.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d"}},t.bindGroupTime={},r.m.obj(t.bindGroupTime,{mtime:0}),r.m.get(e,t,["bindGroupTime","texture"]),r.m.setGet(e,t,["bindGroupLayoutEntry","label","sampler"]),a(e,t)}var u={newInstance:r.m.newInstance(l),extend:l}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return f}});var r=n(0);const{vtkErrorMacro:i}=r.m;function o(e,t){function n(n){const r=n.getProxyId?n.getProxyId():n,i=t.proxyIdMapping[r];return Object.keys(t.proxyByGroup).forEach((e=>{const n=t.proxyByGroup[e],r=n.indexOf(i);-1!==r&&n.splice(r,1)})),delete t.proxyIdMapping[r],i.gcPropertyLinks("application"),i.gcPropertyLinks("source"),i.setProxyManager(null),e.invokeProxyRegistrationChange({action:"unregister",proxyId:r,proxyName:i.getProxyName(),proxyGroup:i.getProxyGroup(),proxy:i}),i}e.setActiveSource=n=>{t.activeSource!==n&&(t.activeSourceSubscription&&(t.activeSourceSubscription.unsubscribe(),t.activeSourceSubscription=null),t.activeSource=n,n&&(t.activeSourceSubscription=n.onModified(e.modified)),e.modified(),e.invokeActiveSourceChange(n))},e.setActiveView=n=>{t.activeView!==n&&(t.activeViewSubscription&&(t.activeViewSubscription.unsubscribe(),t.activeViewSubscription=null),t.activeView=n,n&&(t.activeViewSubscription=n.onModified(e.modified)),e.modified(),e.invokeActiveViewChange(n))},e.getProxyById=e=>t.proxyIdMapping[e],e.getProxyGroups=()=>Object.keys(t.proxyByGroup),e.getProxyInGroup=e=>[].concat(t.proxyByGroup[e]||[]),e.getSources=()=>[].concat(t.proxyByGroup.Sources||[]),e.getRepresentations=()=>[].concat(t.proxyByGroup.Representations||[]),e.getViews=()=>[].concat(t.proxyByGroup.Views||[]),e.createProxy=(n,i,o)=>{const{definitions:a}=t.proxyConfiguration;if(!a[n]||!a[n][i])return null;const s=a[n][i],l={...s.options,...o},u=s.class.newInstance({...l,proxyGroup:n,proxyName:i,proxyManager:e});if(s.proxyProps){const t={};Object.keys(s.proxyProps).forEach((n=>{const r=s.proxyProps[n];t[n]=e.createProxy(r.group,r.name,r.options)})),u.set(t)}return s.props&&u.set(s.props),function(n){if(!n)return;t.proxyIdMapping[n.getProxyId()]=n;const i=n.getProxyGroup();t.proxyByGroup[i]||(t.proxyByGroup[i]=[]),-1===t.proxyByGroup[i].indexOf(n)&&t.proxyByGroup[i].push(n),n.setProxyManager(e),r.m.setImmediate((()=>{e.invokeProxyRegistrationChange({action:"register",proxyId:n.getProxyId(),proxyName:n.getProxyName(),proxyGroup:n.getProxyGroup(),proxy:n})}))}(u),l.activateOnCreate&&u.activate(),u},e.getRepresentation=(n,r)=>{const o=n||e.getActiveSource(),a=r||e.getActiveView();if(!o||!a||!o.getType())return null;const s=o.getProxyId(),l=a.getProxyId();let u=t.sv2rMapping[s];u||(u={},t.sv2rMapping[s]=u);let c=u[l];if(!c){const n=a.getProxyName(),r=o.getType(),d=t.proxyConfiguration.representations[n][r];if(!d)return i(`No definition for representation of ${r} in view ${n}`),null;c=e.createProxy("Representations",d.name,d.options),t.r2svMapping[c.getProxyId()]={sourceId:s,viewId:l},u[l]=c,c.setInput(o),a.addRepresentation(c)}return c},e.deleteProxy=r=>{const i=r.getProxyGroup().toLowerCase();if("views"===i)r.getRepresentations().forEach((t=>{e.deleteProxy(t)})),r.setContainer(null),n(r),e.getActiveView()===r&&e.setActiveView(e.getViews()[0]);else if("representations"===i){const{sourceId:i,viewId:o}=t.r2svMapping[r.getProxyId()];e.getProxyById(o).removeRepresentation(r),delete t.r2svMapping[r.getProxyId()],delete t.sv2rMapping[i][o],n(r)}else if("sources"===i){const i=t.sv2rMapping[r.getProxyId()];Object.keys(i).forEach((t=>{e.deleteProxy(i[t])})),n(r),e.getActiveSource()===r&&e.setActiveSource(e.getSources()[0])}else n(r);r.delete()}}var a=n(23),s=n(369);function l(e){const t={};return e.listPropertyNames().forEach((n=>{t[n]=e.getPropertyByName(n).value})),t}function u(e,t){e.loadState=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((r,i)=>{const o={},l={},u={},c=n.datasetHandler||a.Z,d=[];t.sources.forEach((t=>{let{id:n,group:r,name:i,props:a}=t;d.push(Promise.resolve(c(a.dataset)).then((t=>{if(t){const s=e.createProxy(r,i);return s.setName(a.name),s.setInputData(t,a.type),o[n]=s,s}return null})))})),Promise.all(d).then((()=>{const n=e.getViews();function i(e){o[e]&&u[e]&&o[e].resetOrientation().then((()=>{o[e].getCamera().set(u[e]),o[e].getRenderer().updateLightsGeometryToFollowCamera(),o[e].renderLater()}))}t.views.forEach((r=>{let{id:i,group:a,name:s,props:l,camera:c}=r,d=null;t.options.recycleViews&&(d=n.find((e=>e.getProxyGroup()===a&&e.getProxyName()===s&&e.getName()===l.name))),d?d.setDisableAnimation(!0):d=e.createProxy(a,s,{disableAnimation:!0}),d.set(l,!0),o[i]=d,u[i]=c})),t.representations.forEach((t=>{let{source:n,view:r,props:a}=t;e.getRepresentation(o[n],o[r]).set(a,!0),i(r)})),Object.keys(t.fields).forEach((n=>{const{lookupTable:r,piecewiseFunction:i}=t.fields[n],o=e.getLookupTable(n,r);o.setPresetName(r.presetName),o.setDataRange(...r.dataRange);const a=e.getPiecewiseFunction(n,i);switch(i.mode){case s.Z.Mode.Gaussians:a.setGaussians(i.gaussians);break;case s.Z.Mode.Points:a.setPoints(i.points);break;case s.Z.Mode.Nodes:a.setNodes(i.nodes)}a.setMode(i.mode),a.setDataRange(...i.dataRange)})),Object.keys(u).forEach(i),Object.keys(o).forEach((e=>{const t=o[e].getProxyId();l[e]=t})),t.views.forEach((e=>{let{id:t}=e;o[t].setDisableAnimation(!1)})),r({...t.userData,$oldToNewIdMapping:l})})).catch(i)}))},e.saveState=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((r,i)=>{const o=e.getSources(),a=e.getViews(),s=t.datasetHandler||(e=>e.getState());delete t.datasetHandler;const u=[],c=new Set,d={userData:n,options:t,sources:[],views:[],representations:[],fields:{}};o.forEach((e=>{const t=Promise.resolve(s(e.getDataset(),e));u.push(t),d.sources.push({id:e.getProxyId(),group:e.getProxyGroup(),name:e.getProxyName(),props:{name:e.getName(),type:e.getType(),dataset:t}})})),a.forEach((e=>{const t=e.getCamera().get("position","viewUp","focalPoint");d.views.push({id:e.getProxyId(),group:e.getProxyGroup(),name:e.getProxyName(),props:Object.assign(l(e),e.get("axis","orientation","viewUp")),camera:t});e.getRepresentations().forEach((t=>{d.representations.push({source:t.getInput().getProxyId(),view:e.getProxyId(),props:l(t)}),c.add(t.getColorBy()[0])}))})),c.forEach((t=>{d.fields[t]={lookupTable:e.getLookupTable(t).get("mode","presetName","rgbPoints","hsvPoints","nodes","arrayName","arrayLocation","dataRange"),piecewiseFunction:e.getPiecewiseFunction(t).get("mode","gaussians","points","nodes","arrayName","arrayLocation","dataRange")}})),Promise.all(u).then((()=>{for(let e=0;e{d.sources[e].props.dataset=t}));r(d)})).catch(i)}))}}function c(e,t){function n(){t.animating=!1;const n=e.getViews();for(let t=0;te.createProxy("Views","View3D",t),e.create2DView=t=>e.createProxy("Views","View2D",t),e.render=t=>{const n=t||e.getActiveView();n&&n.renderLater()},e.renderAllViews=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=e.getViews();for(let e=0;e0&&void 0!==arguments[0]&&arguments[0];const n=e.getViews().filter((e=>!t||e.getContainer()));for(let r=0;r0&&void 0!==arguments[0]?arguments[0]:250;if(!t.animating){t.animating=!0;const o=e.getViews().filter((e=>e.getContainer()));for(let t=0;t{const t=e.getViews();for(let e=0;e{const n=t||e.getActiveView();n&&n.resetCamera&&n.resetCamera()},e.createRepresentationInAllViews=t=>{const n=e.getViews();for(let r=0;r{const t=e.getViews();for(let e=0;e{const n=[],r=e.getActiveSource();if(!r)return[];const i=e.getActiveView();if(r){const e=r.getProxySection();e.ui.length&&n.push(Object.assign(e,{collapsed:t.collapseState[e.name]}))}if(r&&i){const o=e.getRepresentation(r,i);if(o){const e=o.getProxySection();e.ui.length&&n.push(Object.assign(e,{collapsed:t.collapseState[e.name]}))}}if(i){const e=i.getProxySection();e.ui.length&&n.push(Object.assign(e,{collapsed:t.collapseState[e.name]}))}return n},e.updateCollapseState=(n,r)=>{t.collapseState[n]=r,e.modified()},e.applyChanges=t=>{const n={},r=Object.keys(t);let i=r.length;for(;i--;){const o=r[i],[a,s]=o.split(":");if(n[a]||(n[a]={}),"__command_execute__"===t[o]){const t=e.getProxyById(a);t&&t[s]()}else n[a][s]=t[o]}const o=Object.keys(n);for(i=o.length;i--;){const t=o[i],r=e.getProxyById(t);r&&r.set(n[t])}e.modified(),e.renderAllViews()},e.getLookupTable=(n,r)=>(t.lookupTables[n]||(t.lookupTables[n]=e.createProxy("Proxy","LookupTable",{arrayName:n,...r})),t.lookupTables[n]),e.getPiecewiseFunction=(n,r)=>(t.piecewiseFunctions[n]||(t.piecewiseFunctions[n]=e.createProxy("Proxy","PiecewiseFunction",{arrayName:n,...r})),t.piecewiseFunctions[n]),e.rescaleTransferFunctionToDataRange=(t,n)=>{const r=e.getLookupTable(t),i=e.getPiecewiseFunction(t);r.setDataRange(n[0],n[1]),i.setDataRange(n[0],n[1])}}function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,{proxyIdMapping:{},proxyByGroup:{},proxyConfiguration:{},sv2rMapping:{},r2svMapping:{},collapseState:{},lookupTables:{},piecewiseFunctions:{},animating:!1},n),r.m.obj(e,t),r.m.setGet(e,t,["proxyConfiguration","activeSource","activeView"]),r.m.event(e,t,"ActiveSourceChange"),r.m.event(e,t,"ActiveViewChange"),r.m.event(e,t,"ProxyRegistrationChange"),o(e,t),u(e),c(e,t),d(e,t),r.m.proxy(e,t),t.classHierarchy.push("vtkProxyManager")}var f={newInstance:r.m.newInstance(p,"vtkProxyManager"),extend:p}},function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(0),i=n(50),o=n(370),a=n(116);const{Mode:s,Defaults:l}=a.Z;function u(e){return e.map((e=>({...e})))}function c(e,t){t.classHierarchy.push("vtkPiecewiseFunctionProxy"),t.piecewiseFunction=t.piecewiseFunction||i.ZP.newInstance(),e.setGaussians=n=>{t.gaussians=u(n||[]),0===t.gaussians.length&&(t.gaussians=u(l.Gaussians)),e.applyMode()},e.setPoints=n=>{t.points=(n||[]).slice(),0===t.points.length&&(t.points=l.Points.slice()),e.applyMode()},e.setNodes=n=>{t.nodes=(n||[]).slice(),0===t.nodes.length&&(t.nodes=l.Nodes.slice()),e.applyMode()},e.setMode=n=>{t.mode!==n&&(t.mode=n,e.applyMode())},e.applyMode=()=>{switch(t.mode){case s.Gaussians:o.ZP.applyGaussianToPiecewiseFunction(t.gaussians,255,t.dataRange,t.piecewiseFunction),e.modified();break;case s.Points:!function(e,t,n){const r=t[1]-t[0],i=e.map((e=>{let[n,i]=e;return[n*r+t[0],i]}));n.removeAllPoints(),i.forEach((e=>{let[t,r]=e;return n.addPoint(t,r)}))}(t.points,t.dataRange,t.piecewiseFunction),e.modified();break;case s.Nodes:!function(e,t,n){const r=t[1]-t[0],i=e.map((e=>({...e,x:e.x*r+t[0]})));n.setNodes(i)}(t.nodes,t.dataRange,t.piecewiseFunction),e.modified()}},e.getLookupTableProxy=()=>t.proxyManager.getLookupTable(t.arrayName),e.setDataRange=(n,r)=>{t.dataRange[0]===n&&t.dataRange[1]===r||(t.dataRange[0]=n,t.dataRange[1]=r,e.applyMode())},e.applyMode()}const d={mode:s.Gaussians,gaussians:l.Gaussians,points:l.Points,nodes:l.Nodes,arrayName:"No array associated",arrayLocation:"pointData",dataRange:[0,1]};function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),r.m.obj(e,t),r.m.setGet(e,t,["arrayName"]),r.m.get(e,t,["piecewiseFunction","gaussians","nodes","points","mode","dataRange"]),c(e,t),r.m.proxy(e,t)}var f={newInstance:r.m.newInstance(p,"vtkPiecewiseFunctionProxy"),extend:p,Mode:s,Defaults:l}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return T}});var r=n(0),i=n(2),o=n(103),a=n.n(o),s=(0,n(579).c)((function(){!function(){var e={exports:{}},t=function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r1?t-1:0),r=1;r1?r-1:0),a=1;a3&&void 0!==arguments[3]?arguments[3]:[];h([0,e,t,n],r)},_=function(e,t,n){if(!t)throw new Error("eventName is required");if("string"!=typeof t)throw new Error("eventName should be string");h([1,e,t,n])};return self.addEventListener("message",(function(e){var t=e.data;Array.isArray(t)?g.apply(void 0,s(t)):t&&t.eventName&&m.emitLocally.apply(m,[t.eventName].concat(s(t.args)))})),m},e.exports.TransferableResponse=p;var f=e.exports;f((function(e,t){var n=e.array,r=e.min,i=e.max,o=e.component||0,a=e.numberOfComponents||1,s=e.numberOfBins,l=i-r,u=new Float32Array(s);u.fill(0);for(var c=n.length,d=o;d1&&void 0!==arguments[1]?arguments[1]:256;const n=[];for(;n.lengthi+a||ri+s?c===s?i:i+c/(c-s)*(r-i-s):-c===s?i:i-c/(c+s)*(r-i-s);const p=(d-i)/c,f=Math.exp(-4*p*p),h=1-p*p,m=1;let g;g=u<1?u*h+(1-u)*f:(2-u)*h+(u-1)*m;const v=o*g;v>n[e]&&(n[e]=v)}}return n}function f(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{lineWidth:1,strokeStyle:"#000"};const i=t[3],o=t[2]/(n.length-1),a=!!r.fillStyle,s=i+t[1];e.lineWidth=r.lineWidth,e.strokeStyle=r.strokeStyle,e.beginPath(),e.moveTo(t[0],t[1]+t[3]);for(let r=0;r3&&void 0!==arguments[3]?arguments[3]:[0,1];return[r[0]+(e-n[0])/n[2]*(r[1]-r[0]),(t-n[1])/n[3]]}function m(e,t){const n=t.map((t=>Math.abs(t.position-e))),r=Math.min(...n);return n.indexOf(r)}function g(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{const{offsetX:r,offsetY:i}=n;t&&n.preventDefault(),e(r,i)}}function v(){c.filter((e=>e.ready)).forEach((e=>{e.callbacks.forEach((t=>{t.touches===e.touches&&t.clicks===e.count&&t.action(...e.singleTouche)})),e.ts=0,e.count=0,e.touches=0,e.ready=!1}))}function y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return i=>{const o=i.target.getBoundingClientRect(),a=Array.prototype.map.call(i.touches,(e=>[e.pageX-o.left,e.pageY-o.top])).reduce(((e,t)=>[e[0]+t[0],e[1]+t[1]]),[0,0]).map((e=>e/i.touches.length));"touchstart"===i.type?(clearTimeout(c[e].timeout),c[e].ts=i.timeStamp,c[e].singleTouche=a,c[e].touches=i.touches.length):"touchmove"===i.type?(c[e].ts=0,c[e].count=0,c[e].ready=!1):"touchend"===i.type&&(i.timeStamp-c[e].tse()?t(r):n(r)}function b(e,t){if(!t)return e;const n=e.length-1,r=t.map((e=>Math.round(e*n)));return e.slice(r[0],r[1]+1)}const x={applyGaussianToPiecewiseFunction:function(e,t,n,r){const i=p(e,t),o=[],a=(n[1]-n[0])/(i.length-1);for(let e=0;e{t.container&&t.container!==n&&t.container.removeChild(t.canvas),t.container!==n&&(t.container=n,t.container&&t.container.appendChild(t.canvas),e.modified())},e.setGaussians=n=>{t.gaussians!==n&&(t.gaussians=n,t.opacities=p(t.gaussians,t.piecewiseSize),e.invokeOpacityChange(e),e.modified())},e.addGaussian=(n,r,i,o,a)=>{const s=t.gaussians.length;return t.gaussians.push({position:n,height:r,width:i,xBias:o,yBias:a}),t.opacities=p(t.gaussians,t.piecewiseSize),e.invokeOpacityChange(e),e.modified(),s},e.removeGaussian=n=>{t.gaussians.splice(n,1),t.opacities=p(t.gaussians,t.piecewiseSize),e.invokeOpacityChange(e),e.modified()},e.setSize=(n,r)=>{t.canvas.setAttribute("width",n),t.canvas.setAttribute("height",r),t.size[0]===n&&t.size[1]===r||(t.size=[n,r],t.colorCanvasMTime=0,e.modified())},e.updateStyle=n=>{t.style={...t.style,...n},e.modified()},e.setDataArray=function(n){let{numberOfBinToConsiders:r=1,numberOfBinsToSkip:o=1,numberOfComponents:l=1,component:u=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.histogram=null,t.histogramArray=n,t.dataRange=(0,i.D)(n,u,l);const[c,d]=t.dataRange,p=4;let f=Math.floor(n.length/p)||1;f+=f%l;let h=0;const m=[],g=[];for(;h{g.forEach((e=>e.terminate())),t.histogram=new Float32Array(t.numberOfBins),t.histogram.fill(0),n.forEach((e=>{for(let n=0,r=e.length;nNumber(e)-Number(t)));for(let e=0;ei;)a.shift();const s=a.reduce(((e,t)=>e+t),0)/i;for(let e=0,n=t.histogram.length;e{const[o,a]=h(n,i,t.graphArea,t.enableRangeZoom?t.rangeZoom:null);if(o<0&&t.style.iconSize>1){const o=t.style.iconSize+t.style.padding;let a=o,s=0;for(;i>a;)s+=1,a+=o;switch(s){case 0:{const o=e.addGaussian(0,1,.1,0,0),a=t.gaussians[o],s={...a},l=d.adjustPosition;t.activeGaussian=o,t.selectedGaussian=o,r.m.setImmediate((()=>{e.onDown(n,i),t.dragAction={originalXY:[0,0],action:l,gaussian:a,originalGaussian:s}}));break}case 1:-1!==t.selectedGaussian&&e.removeGaussian(t.selectedGaussian);break;default:t.selectedGaussian=-1,t.dragAction=null}}else if(o<0||o>1||a<0||a>1)t.selectedGaussian=-1,t.dragAction=null;else{const n=m(o,t.gaussians);n!==t.selectedGaussian&&(t.selectedGaussian=n,e.modified())}return!0},e.onHover=(n,r)=>{const i=20/t.canvas.height,[o,a]=h(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),[s]=h(n,r,t.graphArea),l=o<0?t.selectedGaussian:m(o,t.gaussians);t.canvas.style.cursor="default";const c=t.gaussians[l];if(t.enableRangeZoom&&s>=0&&rt.rangeZoom[1]-e?t.canvas.style.cursor=u.adjustZoom:t.canvas.style.cursor=u.adjustPosition,t.dragAction={rangeZoom:t.rangeZoom,action:d.adjustZoom}}else if(c&&s>=0){const e=1-a;let n=null;n=e>c.height+i?"adjustPosition":e>c.height-i?Math.abs(o-c.position).5*c.height+i?"adjustPosition":e>.5*c.height-i?Math.abs(o-c.position)i?"adjustPosition":"adjustWidth",t.canvas.style.cursor=u[n];const r=d[n],s={...c};t.dragAction={originalXY:[o,a],action:r,gaussian:c,originalGaussian:s}}return l!==t.activeGaussian&&(t.activeGaussian=l,e.modified()),!0},e.onDown=(n,r)=>{t.mouseIsDown||e.invokeAnimation(!0),t.mouseIsDown=!0;const i=h(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=m(i,t.gaussians);t.gaussianSide=0;const a=t.gaussians[o];return a&&(t.gaussianSide=a.position-i),o!==t.selectedGaussian&&i>0&&(t.selectedGaussian=o,e.modified()),!0},e.onDrag=(n,r)=>{if(t.dragAction){const[i,o]=h(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),{action:a}=t.dragAction;a(i,o,{gaussianSide:t.gaussianSide,model:t,publicAPI:e,...t.dragAction})&&(t.opacities=p(t.gaussians,t.piecewiseSize),e.invokeOpacityChange(e,!0)),e.modified()}return!0},e.onUp=(n,r)=>(t.mouseIsDown&&e.invokeAnimation(!1),t.mouseIsDown=!1,!0),e.onLeave=(n,r)=>(e.onUp(n,r),t.canvas.style.cursor="default",t.activeGaussian=-1,e.modified(),!0),e.onAddGaussian=(n,r)=>{const[i,o]=h(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null);return i>=0&&e.addGaussian(i,1-o,.1,0,0),!0},e.onRemoveGaussian=(n,r)=>{const i=h(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=m(i,t.gaussians);return i>=0&&-1!==o&&e.removeGaussian(o),!0},e.bindMouseListeners=()=>{if(!t.listeners){const n=()=>!!t.mouseIsDown,i=function(){const e=c.length;for(var t=arguments.length,n=new Array(t),r=0;r{t.canvas.addEventListener(e,t.listeners[e],!1)}))}},e.unbindMouseListeners=()=>{t.listeners&&(Object.keys(t.listeners).forEach((e=>{t.canvas.removeEventListener(e,t.listeners[e])})),delete t.listeners)},e.render=()=>{const e=t.canvas.getContext("2d");e.imageSmoothingEnabled=!0;const[n,r]=t.size,i=t.style.padding,o=[Math.floor(t.style.iconSize+i),Math.floor(i),Math.ceil(n-2*i-t.style.iconSize),Math.ceil(r-2*i)],a=t.style.zoomControlHeight;if(t.enableRangeZoom&&(o[1]+=Math.floor(a),o[3]-=Math.floor(a)),t.graphArea=o,e.clearRect(0,0,n,r),e.lineJoin="round",e.fillStyle=t.style.backgroundColor,e.fillRect(...o),t.style.iconSize>1){const n=Math.round(t.style.iconSize/2-t.style.strokeWidth),r=Math.round(n+i+t.style.strokeWidth);e.beginPath(),e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor,e.arc(r-i/2,r,n,0,2*Math.PI,!1),e.fillStyle=t.style.buttonFillColor,e.fill(),e.stroke(),e.moveTo(r-n+t.style.strokeWidth+2-i/2,r),e.lineTo(r+n-t.style.strokeWidth-2-i/2,r),e.stroke(),e.moveTo(r-i/2,r-n+t.style.strokeWidth+2),e.lineTo(r-i/2,r+n-t.style.strokeWidth-2),e.stroke(),-1===t.selectedGaussian?(e.fillStyle=t.style.buttonDisableFillColor,e.lineWidth=t.style.buttonDisableStrokeWidth,e.strokeStyle=t.style.buttonDisableStrokeColor):(e.fillStyle=t.style.buttonFillColor,e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor),e.beginPath(),e.arc(r-i/2,r+i/2+t.style.iconSize,n,0,2*Math.PI,!1),e.fill(),e.stroke(),e.moveTo(r-n+t.style.strokeWidth+2-i/2,r+i/2+t.style.iconSize),e.lineTo(r+n-t.style.strokeWidth-2-i/2,r+i/2+t.style.iconSize),e.stroke()}if(t.histogram&&f(e,o,b(t.histogram,t.rangeZoom),{lineWidth:1,strokeStyle:t.style.histogramColor,fillStyle:t.style.histogramColor}),f(e,o,b(t.opacities,t.enableRangeZoom&&t.rangeZoom),{lineWidth:t.style.strokeWidth,strokeStyle:t.style.strokeColor}),t.colorTransferFunction&&t.colorTransferFunction.getSize()){const n=t.dataRange||t.colorTransferFunction.getMappingRange();t.colorCanvas&&t.colorCanvasMTime===t.colorTransferFunction.getMTime()||(t.colorCanvasMTime=t.colorTransferFunction.getMTime(),t.colorCanvas=function(e,t,n,r){const i=r||document.createElement("canvas");i.setAttribute("width",t),i.setAttribute("height",256);const o=i.getContext("2d"),a=e.getUint8Table(n[0],n[1],t,4),s=o.getImageData(0,0,t,256);for(let e=0;e<256;e++)s.data.set(a,4*e*t);const l=256*t*4,u=4*t;for(let e=3;e{const n=e||t.dataRange,r=(n[1]-n[0])/(t.opacities.length-1),i=[];for(let e=0;e{const r=e.getOpacityNodes(n);t.setNodes(r)},e.getOpacityRange=e=>{const n=e||t.dataRange,r=(n[1]-n[0])/(t.opacities.length-1);let i=t.opacities.length-1,o=0;for(let e=0;e0&&(i=Math.min(i,e)),t.opacities[e]>0&&(o=Math.max(o,e));return[n[0]+i*r,n[0]+o*r]};const n=e.setEnableRangeZoom;e.setEnableRangeZoom=e=>{const r=n(e);return r&&(t.colorCanvasMTime=0,t.rangeZoom=[0,1]),r};const o=e.setRangeZoom;e.setRangeZoom=function(){const e=o(...arguments);return e&&(t.colorCanvasMTime=0),e},e.onModified((()=>e.render())),e.setSize(...t.size)}const S={histogram:[],numberOfBins:256,histogramArray:null,dataRange:[0,1],gaussians:[],opacities:[],size:[600,300],piecewiseSize:256,colorCanvasMTime:0,gaussianMinimumHeight:.05,style:{backgroundColor:"rgba(255, 255, 255, 1)",histogramColor:"rgba(200, 200, 200, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(0, 0, 150)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",handleColor:"rgb(0, 150, 0)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:20,padding:10,zoomControlHeight:10,zoomControlColor:"#999"},activeGaussian:-1,selectedGaussian:-1,enableRangeZoom:!0,rangeZoom:[0,1]};function C(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,S,n),r.m.obj(e,t),r.m.setGet(e,t,["piecewiseSize","numberOfBins","colorTransferFunction","backgroundImage","enableRangeZoom","gaussianMinimumHeight"]),r.m.setGetArray(e,t,["rangeZoom"],2),r.m.get(e,t,["size","canvas","gaussians"]),r.m.event(e,t,"opacityChange"),r.m.event(e,t,"animation"),r.m.event(e,t,"zoomChange"),w(e,t)}var T={newInstance:r.m.newInstance(C,"vtkPiecewiseGaussianWidget"),extend:C,...x}},function(e){e.exports=class{constructor(){Object.defineProperty(this,"__listeners",{value:{},enumerable:!1,writable:!1})}emit(e,...t){if(!this.__listeners[e])return this;for(const n of this.__listeners[e])n(...t);return this}once(e,t){const n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}on(e,t){return this.__listeners[e]||(this.__listeners[e]=[]),this.__listeners[e].push(t),this}off(e,t){return this.__listeners[e]=t?this.__listeners[e].filter((e=>e!==t)):[],this}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return S}});var r=n(77),i=n(580),o=n(19),a=n(373),s=n(0),l=n(4),u=n(374),c=n(117);n(29);function d(e,t){return function(e,t){return[...e.getElementsByTagName(t)]}(e,t)[0]}const p={Int8:Int8Array,UInt8:Uint8Array,Int16:Int16Array,UInt16:Uint16Array,Int32:Int32Array,UInt32:Uint32Array,Int64:Int32Array,UInt64:Uint32Array,Float32:Float32Array,Float64:Float64Array},f={Int8:1,UInt8:1,Int16:2,UInt16:2,Int32:4,UInt32:4,Int64:8,UInt64:8,Float32:4,Float64:8};function h(e){const t=e.length-1;return e.filter(((e,n)=>n0&&(a=0===o?r*i:(r-1)*i+o);const s=new ArrayBuffer(a),l={offset:0,uint8:new Uint8Array(s)};let u=function(e,t){const[n]=e;return(e.length-1)*n}(n);for(;u{e.trim().length&&(d[n++]=Number(e))}))}else if("binary"===u){const e=new Uint8Array(a.ZP.toArrayBuffer(t.firstChild.nodeValue.trim()));if("vtkZLibDataCompressor"===n){const t=v(e,i);d=new p[s](t.buffer),/^U?Int64$/.test(s)&&(d=h(d))}else d=new p[s](e.buffer,f[i]),-1!==s.indexOf("Int64")&&(d=h(d))}else if("appended"===u){const e=Number(t.getAttribute("offset"));d=m(new Uint8Array(o,e),s,i)}else console.error("Format not supported",u);return{name:l,values:d,numberOfComponents:c}}function _(e){return(new TextDecoder).decode(e).split("\0").slice(0,-1)}function b(e,t,n,r,i){const o=[...e.getElementsByTagName("DataArray")].map((e=>l.ZP.newInstance(y(Number(e.getAttribute("NumberOfTuples")),e,t,0,r,i)))),c=[...e.getElementsByTagName("Array")].filter((e=>"String"===e.getAttribute("type"))).map((e=>{const n=u.ZP.newInstance(function(e,t,n,r,i){const o=e.getAttribute("Name"),l=e.getAttribute("format"),u=Number(e.getAttribute("NumberOfComponents")||"1"),c=Number(e.getAttribute("NumberOfTuples")||"1")*u,d=[];if("ascii"===l){const t=e.firstChild.nodeValue.trim().split(/\s+/);let n=0;const r=[];for(;d.length1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchBinary(e,n)}t.classHierarchy.push("vtkXMLReader"),t.dataAccessHelper||(t.dataAccessHelper=o.ZP.get("http")),e.setUrl=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.url=n;const i=n.split("/");return i.pop(),t.baseURL=i.join("/"),e.loadData(r)},e.loadData=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsArrayBuffer)},e.parseAsArrayBuffer=n=>{if(!n)return!1;if(n===t.rawDataBuffer)return!0;e.modified();const{text:i,binaryBuffer:o}=(s=n,c.Z.extractBinary(s,/^\s*\s*_/m,/\n\s*<\/AppendedData>/m));var s;t.rawDataBuffer=n,t.binaryBuffer=o;var l;const u=(l=i,(0,r.create)(l)).root(),h=u.node,m=h.getAttribute("type"),g=h.getAttribute("compressor"),y=h.getAttribute("byte_order"),_=h.getAttribute("header_type")||"UInt32";if(g&&"vtkZLibDataCompressor"!==g)return console.error("Invalid compressor",g),!1;if(y&&"LittleEndian"!==y)return console.error("Only LittleEndian encoding is supported"),!1;if(m!==t.dataType)return console.error("Invalid data type",m,"expecting",t.dataType),!1;if(d(h,"AppendedData")){const e=d(h,"AppendedData"),n=e.getAttribute("encoding"),r=u.filter((e=>{const{node:t}=e;return t.nodeType===Node.ELEMENT_NODE&&"appended"===t.getAttribute("format")&&t.hasAttribute("offset")}),!1,!0).map((e=>({node:e.node,offset:Number(e.node.getAttribute("offset"))})));r.sort(((e,t)=>e.offset-t.offset));let i=t.binaryBuffer;"base64"===n&&(i=e.textContent.trim().substr(1));const o=[];for(let e=0;ee+t.length),0),l=new ArrayBuffer(s),c=new Uint8Array(l);for(let e=0,t=0;e{e.parseAsArrayBuffer(t.rawDataBuffer)}}const w={};var S={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,w,n),s.m.obj(e,t),s.m.get(e,t,["url","baseURL"]),s.m.setGet(e,t,["dataAccessHelper"]),s.m.algo(e,t,0,1),x(e,t)},processDataArray:y,processFieldData:function(e,t,n,r,i,o,a){if(t){const i={};["Scalars","Vectors","Normals","Tensors","TCoords"].forEach((e=>{const r=t.getAttribute(e);r&&(i[r]=n[`set${e}`])}));const s=t.getElementsByTagName("DataArray"),u=s.length;for(let t=0;t{const t=e-f;d[p++]=t;for(let e=0;e>16&255,i[p++]=d>>8&255,i[p++]=255&d}switch(l){case 3:for(;!o(e[c]);)c++;for(d=r[e.charCodeAt(c++)]<<10;!o(e[c]);)c++;for(d|=r[e.charCodeAt(c++)]<<4;!o(e[c]);)c++;d|=r[e.charCodeAt(c++)]>>2,i[p++]=d>>8&255,i[p++]=255&d;break;case 2:for(;!o(e[c]);)c++;for(d=r[e.charCodeAt(c++)]<<2;!o(e[c]);)c++;d|=r[e.charCodeAt(c++)]>>4,i[p++]=255&d;break;case 1:throw new Error("BASE64: remain 1 should not happen")}return p}function s(e,t,n){const r=(e<<16)+(t<<8)+n;return i[r>>18]+i[r>>12&63]+i[r>>6&63]+i[63&r]}function l(e){const t=new Uint8Array(e),n=e.byteLength%3,r=e.byteLength-n,i=Array(r/3);for(let e=0;e0){const e=s(t[r],t[r+1]||0,t[r+2]||0);1===n?i.push(`${e.substr(0,2)}==`):2===n&&i.push(`${e.substr(0,3)}=`)}return i.join("")}var u={toArrayBuffer:function(e){const t=function(e){const t=e.length,n=[];let r=null;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:0;return t.values[e*t.numberOfComponents+n]},e.setComponent=(n,r,i)=>{i!==t.values[n*t.numberOfComponents+r]&&(t.values[n*t.numberOfComponents+r]=i,e.modified())},e.getData=()=>t.values,e.getTuple=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=t.numberOfComponents||1;n.length&&(n.length=r);const i=e*r;for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:1;return e*t.numberOfComponents},e.getNumberOfComponents=()=>t.numberOfComponents,e.getNumberOfValues=()=>t.values.length,e.getNumberOfTuples=()=>t.values.length/t.numberOfComponents,e.getDataType=()=>t.dataType,e.newClone=()=>s({name:t.name,numberOfComponents:t.numberOfComponents}),e.getName=()=>(t.name||e.setName(`vtkStringArray${e.getMTime()}`),t.name),e.setData=(n,r)=>{t.values=n,t.size=n.length,r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),e.modified()}}const o={name:"",numberOfComponents:1,size:0,dataType:"string"};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,o,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkStringArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=[...t.values]):t.values=[],t.values&&(t.size=t.values.length),r.m.obj(e,t),r.m.set(e,t,["name"]),i(e,t)}const s=r.m.newInstance(a,"vtkStringArray");var l={newInstance:s,extend:a}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return m}});var r=n(0),i=n(19),o=n(4),a=n(5);n(29);const s={};function l(e,t,n,r,i){for(let o=0;oNumber(e))),n=t[0]-1;return[n,t[1]?t[1]-1:n,t[2]?t[2]-1:n]}function c(e){if("#"===e[0])return;const t=e.split(/[ \t]+/);if(t[0]===s.splitOn)t.shift(),s.pieces.push(t.join(" ").trim()),s.f.push([]),s.size++;else if("v"===t[0])s.v.push(Number(t[1])),s.v.push(Number(t[2])),s.v.push(Number(t[3]));else if("vt"===t[0])s.vt.push(Number(t[1])),s.vt.push(Number(t[2]));else if("vn"===t[0])s.vn.push(Number(t[1])),s.vn.push(Number(t[2])),s.vn.push(Number(t[3]));else if("f"===t[0]){0===s.size&&s.size++;const e=s.f[s.size-1];t.shift();const n=t.filter((e=>e.length>0&&"\r"!==e)),r=n.length;e.push(r);for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkOBJReader"),t.dataAccessHelper||(t.dataAccessHelper=i.ZP.get("http")),e.setUrl=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf(".obj")||r.fullpath){t.url=n;const e=n.split("/");e.pop(),t.baseURL=e.join("/")}else t.baseURL=n,t.url=`${n}/index.obj`;return e.loadData(r)},e.loadData=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then((t=>!e.isDeleted()&&e.parseAsText(t)))},e.parseAsText=n=>{return!n||(n!==t.parseData&&e.modified(),t.parseData=n,t.numberOfOutputs=0,r=t.splitMode,s.splitOn=r,s.pieces=[],s.v=[],s.vt=[],s.vn=[],s.f=[[]],s.size=0,n.split("\n").forEach(c),function(e){const t=!!s.vt.length,n=!!s.vn.length;if(e.splitMode){e.numberOfOutputs=s.size;for(let r=0;r1?c+n:t;for(let i=1;i{e.parseAsText(t.parseData)},e.isBusy=()=>!!t.requestCount,e.getNumberOfOutputPorts=()=>t.numberOfOutputs}const f={numberOfOutputs:1,requestCount:0,splitMode:null,trackDuplicates:!1};function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,f,n),r.m.obj(e,t),r.m.get(e,t,["url","baseURL"]),r.m.setGet(e,t,["dataAccessHelper","splitMode","trackDuplicates"]),r.m.algo(e,t,0,1),r.m.event(e,t,"busy"),p(e,t)}var m={newInstance:r.m.newInstance(h,"vtkOBJReader"),extend:h,...d}},function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(15),i=n(4);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0];const[n,o,a,s]=t,l=e.getContext("2d"),u=l.getImageData(n,o,a||e.width,s||e.height),c=r.ZP.newInstance({type:"vtkImageData"});c.setOrigin(0,0,0),c.setSpacing(1,1,1),c.setExtent(0,(a||e.width)-1,0,(s||e.height)-1,0,0);const d=i.ZP.newInstance({numberOfComponents:4,values:new Uint8Array(u.data.buffer)});return d.setName("scalars"),c.getPointData().setScalars(d),c}var a={canvasToImageData:o,imageToImageData:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{flipX:!1,flipY:!1,rotate:0};const n=document.createElement("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d"),{flipX:i,flipY:a,rotate:s}=t;return r.translate(n.width/2,n.height/2),r.scale(i?-1:1,a?-1:1),r.rotate(s*Math.PI/180),r.drawImage(e,-e.width/2,-e.height/2),o(n)}}},function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r={Defaults:{Preset:"Cool to Warm",RGBPoints:[[0,0,0,0],[1,1,1,1]],HSVPoints:[[0,0,0,0],[1,0,0,1]],Nodes:[{x:0,r:0,g:0,b:0,midpoint:.5,sharpness:0},{x:1,r:1,g:1,b:1,midpoint:.5,sharpness:0}]},Mode:{Preset:0,RGBPoints:1,HSVPoints:2,Nodes:3}}},,function(e,t,n){"use strict";n.d(t,{ZP:function(){return r.f},NZ:function(){return r.P}});n(67),n(0),n(68);var r=n(2)},,,function(e,t,n){"use strict";n.d(t,{h_:function(){return u}});var r=n(490);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o={selector:"vue-portal-target-".concat(((e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t})())},a=function(e){return o.selector=e},s="undefined"!=typeof window&&void 0!==("undefined"==typeof document?"undefined":i(document)),l=r.default.extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(e){return{updatedNodes:e.nodes}},render:function(e){var t=this.updatedNodes&&this.updatedNodes();return t?1!==t.length||t[0].text?e(this.tag||"DIV",t):t:e()},destroyed:function(){var e=this.$el;e&&e.parentNode.removeChild(e)}}),u=r.default.extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(o.selector)}},tag:{type:String,default:"DIV"}},render:function(e){if(this.disabled){var t=this.$scopedSlots&&this.$scopedSlots.default();return t?t.length<2&&!t[0].text?t:e(this.tag,t):e()}return e()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var e=this;this.$nextTick((function(){e.disabled||e.slotFn===e.$scopedSlots.default||(e.container.updatedNodes=e.$scopedSlots.default),e.slotFn=e.$scopedSlots.default}))},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(e){e?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(s)return document.querySelector(this.selector)},insertTargetEl:function(){if(s){var e=document.querySelector("body"),t=document.createElement(this.tag);t.id=this.selector.substring(1),e.appendChild(t)}},mount:function(){if(s){var e=this.getTargetEl(),t=document.createElement("DIV");this.prepend&&e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t),this.container=new l({el:t,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})}},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(t.name||"portal",u),t.defaultSelector&&a(t.defaultSelector)}"undefined"!=typeof window&&window.Vue&&window.Vue===r.default&&r.default.use(c)},function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(572),i=n(575),o=n(0),a=n(11);function s(e,t){t.classHierarchy.push("vtkPixelSpaceCallbackMapper"),t.callback||(t.callback=()=>{}),e.invokeCallback=(e,n,o,a,s)=>{if(!t.callback)return;const l=n.getCompositeProjectionMatrix(o,-1,1);r.transpose(l,l);const u=e.getPoints(),c=new Float64Array(3),d=a.usize,p=a.vsize,f=d/2,h=p/2,m=[];for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l,n),a.ZP.extend(e,t,n),o.m.setGet(e,t,["callback","useZValues"]),s(e,t)}var c={newInstance:o.m.newInstance(u,"vtkPixelSpaceCallbackMapper"),extend:u}},function(e,t,n){e.exports=n(385)},function(e,t,n){"use strict";var r=n(20),i=n(146),o=n(386),a=n(148);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var l=s(n(131));l.Axios=o,l.create=function(e){return s(a(l.defaults,e))},l.Cancel=n(149),l.CancelToken=n(399),l.isCancel=n(147),l.all=function(e){return Promise.all(e)},l.spread=n(400),e.exports=l,e.exports.default=l},function(e,t,n){"use strict";var r=n(20),i=n(130),o=n(387),a=n(388),s=n(148);function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,i){return this.request(r.merge(i||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){"use strict";var r=n(20);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,n){"use strict";var r=n(20),i=n(389),o=n(147),a=n(131);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(20);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(20);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(169);e.exports=function(e,t,n){var i=n.config.validateStatus;!i||i(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(394),i=n(395);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(20),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(20);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(20);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(149);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){const r=n(402);e.exports=class extends r{constructor(e){super(),this._messageId=1,this._messages=new Map,this._worker=e,this._worker.onmessage=this._onMessage.bind(this),this._id=Math.ceil(1e7*Math.random())}terminate(){this._worker.terminate()}isFree(){return 0===this._messages.size}jobsLength(){return this._messages.size}exec(e,t=null,n=[],r){return new Promise(((i,o)=>{const a=this._messageId++;this._messages.set(a,[i,o,r]),this._worker.postMessage([a,t,e],n||[])}))}postMessage(e=null,t=[],n){return new Promise(((r,i)=>{const o=this._messageId++;this._messages.set(o,[r,i,n]),this._worker.postMessage([o,e],t||[])}))}emit(e,...t){this._worker.postMessage({eventName:e,args:t})}_onMessage(e){if(!Array.isArray(e.data)&&e.data.eventName)return super.emit(e.data.eventName,...e.data.args);const[t,...n]=e.data;if(1===t)this._onEvent(...n);else{if(0!==t)throw new Error(`Wrong message type '${t}'`);this._onResult(...n)}}_onResult(e,t,n){const[r,i]=this._messages.get(e);return this._messages.delete(e),1===t?r(n):i(n)}_onEvent(e,t,n){const[,,r]=this._messages.get(e);r&&r(t,n)}}},function(e){e.exports=class{constructor(){Object.defineProperty(this,"__listeners",{value:{},enumerable:!1,writable:!1})}emit(e,...t){if(!this.__listeners[e])return this;for(const n of this.__listeners[e])n(...t);return this}once(e,t){const n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}on(e,t){return this.__listeners[e]||(this.__listeners[e]=[]),this.__listeners[e].push(t),this}off(e,t){return this.__listeners[e]=t?this.__listeners[e].filter((e=>e!==t)):[],this}}},function(e,t,n){var r=n(59),i=n(404),o=function(e,t){return new("undefined"!=typeof window?window[e]:n.g[e])(t)};e.exports=function(e,t,n,a){a&&a.forEach((function(t){switch(t.type){case r.Text:case r.Binary:e.writeFile(t.path,t.data);break;case r.Image:var n={};for(var i in t.data)Object.prototype.hasOwnProperty.call(t.data,i)&&"data"!==i&&(n[i]=t.data[i]);n.data=t.path+".data",e.writeFile(t.path,JSON.stringify(n)),e.writeFile(n.data,new Uint8Array(t.data.data.buffer));break;case r.Mesh:var o={};for(var a in t.data)Object.prototype.hasOwnProperty.call(t.data,a)&&"points"!==a&&"pointData"!==a&&"cells"!==a&&"cellData"!==a&&(o[a]=t.data[a]);o.points=t.path+".points.data",o.pointData=t.path+".pointData.data",o.cells=t.path+".cells.data",o.cellData=t.path+".cellData.data",e.writeFile(t.path,JSON.stringify(o)),o.numberOfPoints&&e.writeFile(o.points,new Uint8Array(t.data.points.buffer)),o.numberOfPointPixels&&e.writeFile(o.pointData,new Uint8Array(t.data.pointData.buffer)),o.numberOfCells&&e.writeFile(o.cells,new Uint8Array(t.data.cells.buffer)),o.numberOfCellPixels&&e.writeFile(o.cellData,new Uint8Array(t.data.cellData.buffer));break;default:throw Error("Unsupported input IOType")}})),e.resetModuleStdout(),e.resetModuleStderr(),e.callMain(t);var s=e.getModuleStdout(),l=e.getModuleStderr(),u=[];return n&&n.forEach((function(t){var n={};switch(Object.assign(n,t),t.type){case r.Text:n.data=e.readFile(t.path,{encoding:"utf8"});break;case r.Binary:n.data=e.readFile(t.path,{encoding:"binary"});break;case r.Image:var a=e.readFile(t.path,{encoding:"utf8"}),s=JSON.parse(a),l=e.readFile(s.data,{encoding:"binary"});s.data=i(s.imageType.componentType,l.buffer),n.data=s;break;case r.Mesh:var c=e.readFile(t.path,{encoding:"utf8"}),d=JSON.parse(c);if(d.numberOfPoints){var p=e.readFile(d.points,{encoding:"binary"});d.points=i(d.meshType.pointComponentType,p.buffer)}else d.points=i(d.meshType.pointComponentType,new ArrayBuffer(0));if(d.numberOfPointPixels){var f=e.readFile(d.pointData,{encoding:"binary"});d.pointData=i(d.meshType.pointPixelComponentType,f.buffer)}else d.pointData=i(d.meshType.pointPixelComponentType,new ArrayBuffer(0));if(d.numberOfCells){var h=e.readFile(d.cells,{encoding:"binary"});d.cells=i(d.meshType.cellComponentType,h.buffer)}else d.cells=i(d.meshType.cellComponentType,new ArrayBuffer(0));if(d.numberOfCellPixels){var m=e.readFile(d.cellData,{encoding:"binary"});d.cellData=i(d.meshType.cellPixelComponentType,m.buffer)}else d.cellData=i(d.meshType.cellPixelComponentType,new ArrayBuffer(0));n.data=d;break;case r.vtkPolyData:var g=e.readFile("".concat(t.path,"/index.json"),{encoding:"utf8"}),v=JSON.parse(g);["points","verts","lines","polys","strips"].forEach((function(n){if(v[n]){var r=v[n];if(r.ref){var i=e.readFile("".concat(t.path,"/").concat(r.ref.basepath,"/").concat(r.ref.id),{encoding:"binary"});v[n].buffer=i.buffer,v[n].values=o(v[n].dataType,i.buffer),delete r.ref}}}));["pointData","cellData","fieldData"].forEach((function(n){v[n]&&v[n].arrays.forEach((function(n){if(n.data.ref){var r=e.readFile("".concat(t.path,"/").concat(n.data.ref.basepath,"/").concat(n.data.ref.id),{encoding:"binary"});n.data.buffer=r.buffer,n.data.values=o(n.data.dataType,r.buffer),delete n.data.ref}}))})),n.data=v;break;default:throw Error("Unsupported output IOType")}u.push(n)})),{stdout:s,stderr:l,outputs:u}}},function(e,t,n){var r=n(132),i=n(405);e.exports=function(e,t){var n=null;switch(e){case r.UInt8:n=new Uint8Array(t);break;case r.Int8:n=new Int8Array(t);break;case r.UInt16:n=new Uint16Array(t);break;case r.Int16:n=new Int16Array(t);break;case r.UInt32:n=new Uint32Array(t);break;case r.Int32:n=new Int32Array(t);break;case r.UInt64:case r.Int64:throw new Error("Type is not supported as a TypedArray");case i.Float32:n=new Float32Array(t);break;case i.Float64:n=new Float64Array(t);break;case"null":case null:n=null;break;default:throw new Error("Type is not supported as a TypedArray")}return n}},function(e){e.exports={Float32:"float",Float64:"double",SpacePrecisionType:"double"}},function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(77),i=n(580),o=n(0),a=n(373);const s={ASCII:"ascii",BINARY:"binary",APPENDED:"appended"},l={Int8Array:"Int8",Uint8Array:"UInt8",Int16Array:"Int16",Uint16Array:"UInt16",Int32Array:"Int32",Uint32Array:"UInt32",Float32Array:"Float32",Float64Array:"Float64"};function u(e){return(0,i.iZ)(e)}function c(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vtkZLibDataCompressor";if(t===s.ASCII)return e.getData().join(" ");if(t===s.BINARY){if("vtkZLibDataCompressor"===r){const t=e.getElementComponentSize(),r=e.getNumberOfValues()*t,i=n,o=r%i,s=Math.trunc(r/i)+(o?1:0),l=new Uint32Array(3+s);l[0]=s,l[1]=i,l[2]=o;let c=0;const d=[];let p=0;const f=s-1;for(let t=0;t(0,r.create)().ele("VTKFile").att("type",t.dataType).att("version","0.1").att("byte_order","LittleEndian").att("header_type","UInt32").att("compressor",t.format===s.ASCII?"":"vtkZLibDataCompressor"),e.write=t=>e.create(t).end({pretty:!0}),e.processDataSetAttributes=(t,n,r)=>{const i={};["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"].forEach((e=>{const t=r.getActiveAttribute(e);t&&(i[e]=t.getName())}));const o=t.ele(n,i);for(let t=0;tt.ele("DataArray",{type:l[n.getDataType()],Name:n.getName(),format:e.getFormat(),RangeMin:n.getRange()[0],RangeMax:n.getRange()[1],NumberOfComponents:n.getNumberOfComponents()}).txt(c(n,e.getFormat(),e.getBlockSize())),e.requestData=(n,r)=>{t.file=e.write(n)}}const p={blockSize:1024,format:s.BINARY};var f={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),o.m.obj(e,t),o.m.setGet(e,t,["blockSize","format"]),o.m.get(e,t,["file"]),o.m.algo(e,t,1,0),d(e,t)},compressBlock:u,processDataArray:c,FormatTypes:s}},function(e,t,n){"use strict";var r=n(7),i=n(528),o=n(418),a=n(419),s=n(427),l=n(442),u=n(455),c=n(409),d=n(529),p={default:n(457),zero:n(458),commonmark:n(459)},f=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function m(e){var t=e.trim().toLowerCase();return!f.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function v(e){var t=c.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=d.toASCII(t.hostname)}catch(e){}return c.encode(c.format(t))}function y(e){var t=c.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=d.toUnicode(t.hostname)}catch(e){}return c.decode(c.format(t))}function _(e,t){if(!(this instanceof _))return new _(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new a,this.renderer=new o,this.linkify=new u,this.validateLink=m,this.normalizeLink=v,this.normalizeLinkText=y,this.utils=r,this.helpers=r.assign({},i),this.options={},this.configure(e),t&&this.set(t)}_.prototype.set=function(e){return r.assign(this.options,e),this},_.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=p[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},_.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},_.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},_.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},_.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},_.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},_.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},_.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=_},function(e,t,n){"use strict";e.exports=n(526)},function(e,t,n){"use strict";e.exports.encode=n(410),e.exports.decode=n(411),e.exports.format=n(412),e.exports.parse=n(413)},function(e){"use strict";var t={};function n(e,r,i){var o,a,s,l,u,c="";for("string"!=typeof r&&(i=r,r=n.defaultChars),void 0===i&&(i=!0),u=function(e){var n,r,i=t[e];if(i)return i;for(i=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?i.push(r):i.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&l<=57343){c+=encodeURIComponent(e[o]+e[o+1]),o++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[o]);return c}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",e.exports=n},function(e){"use strict";var t={};function n(e,r){var i;return"string"!=typeof r&&(r=n.defaultChars),i=function(e){var n,r,i=t[e];if(i)return i;for(i=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),i.push(r);for(n=0;n=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&r)&&t+91114111?u+="����":(l-=65536,u+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):u+="�";return u}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="",e.exports=n},function(e){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},function(e){"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),a=["'"].concat(o),s=["%","/","?",";","#"].concat(a),l=["/","?","#"],u=/^[+a-z0-9A-Z_-]{0,63}$/,c=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var r,o,a,f,h,m=e;if(m=m.trim(),!t&&1===e.split("#").length){var g=i.exec(m);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var v=n.exec(m);if(v&&(a=(v=v[0]).toLowerCase(),this.protocol=v,m=m.substr(v.length)),(t||v||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===m.substr(0,2))||v&&d[v]||(m=m.substr(2),this.slashes=!0)),!d[v]&&(h||v&&!p[v])){var y,_,b=-1;for(r=0;r127?T+="x":T+=C[M];if(!T.match(u)){var A=S.slice(0,r),P=S.slice(r+1),k=C.match(c);k&&(A.push(k[1]),P.unshift(k[2])),P.length&&(m=P.join(".")+m),this.hostname=A.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var L=m.indexOf("#");-1!==L&&(this.hash=m.substr(L),m=m.slice(0,L));var O=m.indexOf("?");return-1!==O&&(this.search=m.substr(O),m=m.slice(0,O)),m&&(this.pathname=m),p[a]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=r.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,n){if(e&&e instanceof t)return e;var r=new t;return r.parse(e,n),r}},function(e){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},function(e){"use strict";e.exports=function(e,t,n){var r,i,o,a,s=-1,l=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos=n)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t"+o(e[t].content)+""},a.code_block=function(e,t,n,r,i){var a=e[t];return""+o(e[t].content)+"\n"},a.fence=function(e,t,n,r,a){var s,l,u,c,d=e[t],p=d.info?i(d.info).trim():"",f="";return p&&(f=p.split(/\s+/g)[0]),0===(s=n.highlight&&n.highlight(d.content,f)||o(d.content)).indexOf(""+s+"\n"):"
"+s+"
\n"},a.image=function(e,t,n,r,i){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},a.hardbreak=function(e,t,n){return n.xhtmlOut?"
\n":"
\n"},a.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
\n":"
\n":"\n"},a.text=function(e,t){return o(e[t].content)},a.html_block=function(e,t){return e[t].content},a.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,i="",o=this.rules,a=0,s=e.length;a/i.test(e)}e.exports=function(e){var t,n,o,a,s,l,u,c,d,p,f,h,m,g,v,y,_,b,x=e.tokens;if(e.md.options.linkify)for(n=0,o=x.length;n=0;t--)if("link_close"!==(l=a[t]).type){if("html_inline"===l.type&&(b=l.content,/^\s]/i.test(b)&&m>0&&m--,i(l.content)&&m++),!(m>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(d=l.content,_=e.md.linkify.match(d),u=[],h=l.level,f=0,c=0;c<_.length;c++)g=_[c].url,v=e.md.normalizeLink(g),e.md.validateLink(v)&&(y=_[c].text,y=_[c].schema?"mailto:"!==_[c].schema||/^mailto:/i.test(y)?e.md.normalizeLinkText(y):e.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,""),(p=_[c].index)>f&&((s=new e.Token("text","",0)).content=d.slice(f,p),s.level=h,u.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",v]],s.level=h++,s.markup="linkify",s.info="auto",u.push(s),(s=new e.Token("text","",0)).content=y,s.level=h,u.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",u.push(s),f=_[c].lastIndex);f=0;t--)"text"!==(n=e[t]).type||i||(n.content=n.content.replace(r,o)),"link_open"===n.type&&"auto"===n.info&&i--,"link_close"===n.type&&"auto"===n.info&&i++}function s(e){var n,r,i=0;for(n=e.length-1;n>=0;n--)"text"!==(r=e[n]).type||i||t.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&i--,"link_close"===r.type&&"auto"===r.info&&i++}e.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(n.test(e.tokens[r].content)&&a(e.tokens[r].children),t.test(e.tokens[r].content)&&s(e.tokens[r].children))}},function(e,t,n){"use strict";var r=n(7).isWhiteSpace,i=n(7).isPunctChar,o=n(7).isMdAsciiPunct,a=/['"]/,s=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function u(e,t){var n,a,u,c,d,p,f,h,m,g,v,y,_,b,x,w,S,C,T,M,D;for(T=[],n=0;n=0&&!(T[S].level<=f);S--);if(T.length=S+1,"text"===a.type){d=0,p=(u=a.content).length;e:for(;d=0)m=u.charCodeAt(c.index-1);else for(S=n-1;S>=0&&("softbreak"!==e[S].type&&"hardbreak"!==e[S].type);S--)if(e[S].content){m=e[S].content.charCodeAt(e[S].content.length-1);break}if(g=32,d=48&&m<=57&&(w=x=!1),x&&w&&(x=v,w=y),x||w){if(w)for(S=T.length-1;S>=0&&(h=T[S],!(T[S].level=0;t--)"inline"===e.tokens[t].type&&a.test(e.tokens[t].content)&&u(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(87);function i(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}i.prototype.Token=r,e.exports=i},function(e,t,n){"use strict";var r=n(86),i=[["table",n(428),["paragraph","reference"]],["code",n(429)],["fence",n(430),["paragraph","reference","blockquote","list"]],["blockquote",n(431),["paragraph","reference","blockquote","list"]],["hr",n(432),["paragraph","reference","blockquote","list"]],["list",n(433),["paragraph","reference","blockquote"]],["reference",n(434)],["heading",n(435),["paragraph","reference","blockquote"]],["lheading",n(436)],["html_block",n(437),["paragraph","reference","blockquote"]],["paragraph",n(440)]];function o(){this.ruler=new r;for(var e=0;e=n))&&!(e.sCount[a]=l){e.line=n;break}for(r=0;rn)return!1;if(d=t+1,e.sCount[d]=4)return!1;if((u=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(s=e.src.charCodeAt(u++))&&45!==s&&58!==s)return!1;for(;u=4)return!1;if((f=(p=o(l.replace(/^\||\|$/g,""))).length)>m.length)return!1;if(a)return!0;for((h=e.push("table_open","table",1)).map=v=[t,0],(h=e.push("thead_open","thead",1)).map=[t,t+1],(h=e.push("tr_open","tr",1)).map=[t,t+1],c=0;c=4);d++){for(p=o(l.replace(/^\||\|$/g,"")),h=e.push("tr_open","tr",1),c=0;c=4))break;i=++r}return e.line=i,(o=e.push("code_block","code",0)).content=e.getLines(t,i,4+e.blkIndent,!0),o.map=[t,e.line],!0}},function(e){"use strict";e.exports=function(e,t,n,r){var i,o,a,s,l,u,c,d=!1,p=e.bMarks[t]+e.tShift[t],f=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(p+3>f)return!1;if(126!==(i=e.src.charCodeAt(p))&&96!==i)return!1;if(l=p,(o=(p=e.skipChars(p,i))-l)<3)return!1;if(c=e.src.slice(l,p),a=e.src.slice(p,f),96===i&&a.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((p=l=e.bMarks[s]+e.tShift[s])<(f=e.eMarks[s])&&e.sCount[s]=4||(p=e.skipChars(p,i))-l=4)return!1;if(62!==e.src.charCodeAt(M++))return!1;if(i)return!0;for(l=f=e.sCount[t]+1,32===e.src.charCodeAt(M)?(M++,l++,f++,o=!1,b=!0):9===e.src.charCodeAt(M)?(b=!0,(e.bsCount[t]+f)%4==3?(M++,l++,f++,o=!1):o=!0):b=!1,h=[e.bMarks[t]],e.bMarks[t]=M;M=D,y=[e.sCount[t]],e.sCount[t]=f-l,_=[e.tShift[t]],e.tShift[t]=M-e.bMarks[t],w=e.md.block.ruler.getRules("blockquote"),v=e.parentType,e.parentType="blockquote",p=t+1;p=(D=e.eMarks[p])));p++)if(62!==e.src.charCodeAt(M++)||C){if(c)break;for(x=!1,s=0,u=w.length;s=D,m.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(b?1:0),y.push(e.sCount[p]),e.sCount[p]=f-l,_.push(e.tShift[p]),e.tShift[p]=M-e.bMarks[p]}for(g=e.blkIndent,e.blkIndent=0,(S=e.push("blockquote_open","blockquote",1)).markup=">",S.map=d=[t,0],e.md.block.tokenize(e,t,p),(S=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=T,e.parentType=v,d[1]=e.line,s=0;s<_.length;s++)e.bMarks[s+t]=h[s],e.tShift[s+t]=_[s],e.sCount[s+t]=y[s],e.bsCount[s+t]=m[s];return e.blkIndent=g,!0}},function(e,t,n){"use strict";var r=n(7).isSpace;e.exports=function(e,t,n,i){var o,a,s,l,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(o=e.src.charCodeAt(u++))&&45!==o&&95!==o)return!1;for(a=1;u=a)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=a)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-i>=10)return-1}return o=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]=e.blkIndent&&(I=!0),(A=o(e,t))>=0){if(p=!0,k=e.bMarks[t]+e.tShift[t],y=Number(e.src.substr(k,A-k-1)),I&&1!==y)return!1}else{if(!((A=i(e,t))>=0))return!1;p=!1}if(I&&e.skipSpaces(A)>=e.eMarks[t])return!1;if(v=e.src.charCodeAt(A-1),r)return!0;for(g=e.tokens.length,p?(E=e.push("ordered_list_open","ol",1),1!==y&&(E.attrs=[["start",y]])):E=e.push("bullet_list_open","ul",1),E.map=m=[t,0],E.markup=String.fromCharCode(v),b=t,P=!1,O=e.md.block.ruler.getRules("list"),S=e.parentType,e.parentType="list";b=_?1:x-d)>4&&(c=1),u=d+c,(E=e.push("list_item_open","li",1)).markup=String.fromCharCode(v),E.map=f=[t,0],M=e.tight,T=e.tShift[t],C=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=u,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=x,s>=_&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!P||(N=!1),P=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=T,e.sCount[t]=C,e.tight=M,(E=e.push("list_item_close","li",-1)).markup=String.fromCharCode(v),b=t=e.line,f[1]=b,s=e.bMarks[t],b>=n)break;if(e.sCount[b]=4)break;for(L=!1,l=0,h=O.length;l=4)return!1;if(91!==e.src.charCodeAt(S))return!1;for(;++S3||e.sCount[T]<0)){for(_=!1,d=0,p=b.length;d=4)return!1;if(35!==(o=e.src.charCodeAt(u))||u>=c)return!1;for(a=1,o=e.src.charCodeAt(++u);35===o&&u6||uu&&r(e.src.charCodeAt(s-1))&&(c=s),e.line=t+1,(l=e.push("heading_open","h"+String(a),1)).markup="########".slice(0,a),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(u,c).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(a),-1)).markup="########".slice(0,a)),!0)}},function(e){"use strict";e.exports=function(e,t,n){var r,i,o,a,s,l,u,c,d,p,f=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(p=e.parentType,e.parentType="paragraph";f3)){if(e.sCount[f]>=e.blkIndent&&(l=e.bMarks[f]+e.tShift[f])<(u=e.eMarks[f])&&(45===(d=e.src.charCodeAt(l))||61===d)&&(l=e.skipChars(l,d),(l=e.skipSpaces(l))>=u)){c=61===d?1:2;break}if(!(e.sCount[f]<0)){for(i=!1,o=0,a=h.length;o|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(i.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var i,a,s,l,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(u))return!1;for(l=e.src.slice(u,c),i=0;i`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+t+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),i=new RegExp("^(?:"+t+"|"+n+")");e.exports.n=r,e.exports.q=i},function(e){"use strict";e.exports=function(e,t){var n,r,i,o,a,s,l=t+1,u=e.md.block.ruler.getRules("paragraph"),c=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l3||e.sCount[l]<0)){for(r=!1,i=0,o=u.length;i0&&this.level++,this.tokens.push(i),i},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!i(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,a,s,l,u,c,d,p=e;if(e>=t)return"";for(c=new Array(t-e),o=0;pn?new Array(a-n+1).join(" ")+this.src.slice(l,u):this.src.slice(l,u)}return c.join("")},o.prototype.Token=r,e.exports=o},function(e,t,n){"use strict";var r=n(86),i=[["text",n(443)],["newline",n(444)],["escape",n(445)],["backticks",n(446)],["strikethrough",n(460).w],["emphasis",n(461).w],["link",n(447)],["image",n(448)],["autolink",n(449)],["html_inline",n(450)],["entity",n(451)]],o=[["balance_pairs",n(452)],["strikethrough",n(460).g],["emphasis",n(461).g],["text_collapse",n(453)]];function a(){var e;for(this.ruler=new r,e=0;e=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},a.prototype.parse=function(e,t,n,r){var i,o,a,s=new this.State(e,t,n,r);for(this.tokenize(s),a=(o=this.ruler2.getRules("")).length,i=0;i=0&&32===e.pending.charCodeAt(n)?n>=1&&32===e.pending.charCodeAt(n-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),o++;o?@[]^_`{|}~-".split("").forEach((function(e){i[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,a=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o=m)return!1;for(g=u,(c=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(f=e.md.normalizeLink(c.str),e.md.validateLink(f)?u=c.pos:f=""),g=u;u=m||41!==e.src.charCodeAt(u))&&(v=!0),u++}if(v){if(void 0===e.env.references)return!1;if(u=0?a=e.src.slice(g,u++):u=s+1):u=s+1,a||(a=e.src.slice(l,s)),!(d=e.env.references[r(a)]))return e.pos=h,!1;f=d.href,p=d.title}return t||(e.pos=l,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",f]],p&&n.push(["title",p]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=u,e.posMax=m,!0}},function(e,t,n){"use strict";var r=n(7).normalizeReference,i=n(7).isSpace;e.exports=function(e,t){var n,o,a,s,l,u,c,d,p,f,h,m,g,v="",y=e.pos,_=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(u=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((c=l+1)<_&&40===e.src.charCodeAt(c)){for(c++;c<_&&(o=e.src.charCodeAt(c),i(o)||10===o);c++);if(c>=_)return!1;for(g=c,(p=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok&&(v=e.md.normalizeLink(p.str),e.md.validateLink(v)?c=p.pos:v=""),g=c;c<_&&(o=e.src.charCodeAt(c),i(o)||10===o);c++);if(p=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<_&&g!==c&&p.ok)for(f=p.str,c=p.pos;c<_&&(o=e.src.charCodeAt(c),i(o)||10===o);c++);else f="";if(c>=_||41!==e.src.charCodeAt(c))return e.pos=y,!1;c++}else{if(void 0===e.env.references)return!1;if(c<_&&91===e.src.charCodeAt(c)?(g=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?s=e.src.slice(g,c++):c=l+1):c=l+1,s||(s=e.src.slice(u,l)),!(d=e.env.references[r(s)]))return e.pos=y,!1;v=d.href,f=d.title}return t||(a=e.src.slice(u,l),e.md.inline.parse(a,e.md,e.env,m=[]),(h=e.push("image","img",0)).attrs=n=[["src",v],["alt",""]],h.children=m,h.content=a,f&&n.push(["title",f])),e.pos=c,e.posMax=_,!0}},function(e){"use strict";var t=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,n=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;e.exports=function(e,r){var i,o,a,s,l,u,c=e.pos;return 60===e.src.charCodeAt(c)&&(!((i=e.src.slice(c)).indexOf(">")<0)&&(n.test(i)?(s=(o=i.match(n))[0].slice(1,-1),l=e.md.normalizeLink(s),!!e.md.validateLink(l)&&(r||((u=e.push("link_open","a",1)).attrs=[["href",l]],u.markup="autolink",u.info="auto",(u=e.push("text","",0)).content=e.md.normalizeLinkText(s),(u=e.push("link_close","a",-1)).markup="autolink",u.info="auto"),e.pos+=o[0].length,!0)):!!t.test(i)&&(s=(a=i.match(t))[0].slice(1,-1),l=e.md.normalizeLink("mailto:"+s),!!e.md.validateLink(l)&&(r||((u=e.push("link_open","a",1)).attrs=[["href",l]],u.markup="autolink",u.info="auto",(u=e.push("text","",0)).content=e.md.normalizeLinkText(s),(u=e.push("link_close","a",-1)).markup="autolink",u.info="auto"),e.pos+=a[0].length,!0))))}},function(e,t,n){"use strict";var r=n(439).n;e.exports=function(e,t){var n,i,o,a=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(a)||a+2>=o)&&(!(33!==(n=e.src.charCodeAt(a+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(i=e.src.slice(a).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(a,a+i[0].length)),e.pos+=i[0].length,!0))))}},function(e,t,n){"use strict";var r=n(408),i=n(7).has,o=n(7).isValidEntityCode,a=n(7).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,u,c=e.pos,d=e.posMax;if(38!==e.src.charCodeAt(c))return!1;if(c+1a;r-=o.jump+1)if((o=t[r]).marker===i.marker&&(-1===s&&(s=r),o.open&&o.end<0&&(l=!1,(o.close||i.open)&&(o.length+i.length)%3==0&&(o.length%3==0&&i.length%3==0||(l=!0)),!l))){u=r>0&&!t[r-1].open?t[r-1].jump+1:0,i.jump=n-r+u,i.open=!1,o.end=n,o.jump=u,o.close=!1,s=-1;break}-1!==s&&(c[i.marker][(i.length||0)%3]=s)}}e.exports=function(e){var n,r=e.tokens_meta,i=e.tokens_meta.length;for(t(0,e.delimiters),n=0;n0&&r++,"text"===i[t].type&&t+10&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i},s.prototype.scanDelims=function(e,t){var n,r,s,l,u,c,d,p,f,h=e,m=!0,g=!0,v=this.posMax,y=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function c(e){var t=e.re=n(456)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function u(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===i(n))return!function(e){return"[object RegExp]"===i(e)}(n.validate)?o(n.validate)?r.validate=n.validate:u(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(o(n.normalize)?r.normalize=n.normalize:n.normalize?u(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===i(e)}(n)?u(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var c=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+c+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+c+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function d(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function p(e,t){var n=new d(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function f(e,t){if(!(this instanceof f))return new f(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,e),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},c(this)}f.prototype.add=function(e,t){return this.__schemas__[e]=t,c(this),this},f.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},f.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(i=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),this.__index__>=0},f.prototype.pretest=function(e){return this.re.pretest.test(e)},f.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},f.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(p(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(p(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},f.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),c(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,c(this),this)},f.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},f.prototype.onCompile=function(){},e.exports=f},function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(133).source,t.src_Cc=n(134).source,t.src_Z=n(135).source,t.src_P=n(85).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+"[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},function(e){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},function(e){"use strict";function t(e,t){var n,r,i,o,a,s=[],l=t.length;for(n=0;n=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(i=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1&&t[n-1].marker===r.marker,a=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?a+a:a,o.content="",(o=e.tokens[i.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?a+a:a,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.w=function(e,t){var n,r,i=e.pos,o=e.src.charCodeAt(i);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n0?n.set(e,0):n.set(e,a)}e.setHorizontalListener=function(r,i,o,a,s){let l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6];const c=Number.isFinite(a)?()=>a:a;t.horizontalListener={min:r,max:i,step:o,getValue:c,setValue:s,scale:l,exponentialScroll:u},n.set(t.horizontalListener,0),e.modified()},e.setVerticalListener=function(r,i,o,a,s){let l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6];const c=Number.isFinite(a)?()=>a:a;t.verticalListener={min:r,max:i,step:o,getValue:c,setValue:s,scale:l,exponentialScroll:u},n.set(t.verticalListener,0),e.modified()},e.setScrollListener=function(i,o,a,s,l){let u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];a<0&&(0,r.v)("Value of step cannot be negative. If you want to invert the scrolling direction, use a negative scale value instead.");const d=Math.abs(a),p=Number.isFinite(s)?()=>s:s;t.scrollListener={min:i,max:o,step:d,getValue:p,setValue:l,scale:u,exponentialScroll:c},n.set(t.scrollListener,0),e.modified()},e.removeHorizontalListener=()=>{t.horizontalListener&&(n.delete(t.horizontalListener),delete t.horizontalListener,e.modified())},e.removeVerticalListener=()=>{t.verticalListener&&(n.delete(t.verticalListener),delete t.verticalListener,e.modified())},e.removeScrollListener=()=>{t.scrollListener&&(n.delete(t.scrollListener),delete t.scrollListener,e.modified())},e.removeAllListeners=()=>{e.removeHorizontalListener(),e.removeVerticalListener(),e.removeScrollListener()},e.onButtonDown=(e,n,r)=>{t.previousPosition=r,t.interactionNetDelta=0;const i=e.getView(),o=i.getContainerSize()[0]/i.getSize()[0],a=i.getViewportSize(n);t.containerSize=a.map((e=>e*o))},e.onButtonUp=e=>{e.exitPointerLock()},e.startPointerLockEvent=(t,n)=>{const r=r=>{e.onPointerLockMove(t,n,r)};document.addEventListener("mousemove",r);let i=null;i=t?.onEndPointerLock((()=>{document.removeEventListener("mousemove",r),i?.unsubscribe()}))},e.onPointerLockMove=(n,r,i)=>{n.isPointerLocked()&&null!=t.previousPosition&&(t.previousPosition.x+=i.movementX,t.previousPosition.y+=i.movementY,e.onMouseMove(n,r,t.previousPosition))},e.onMouseMove=(n,r,a)=>{if((t.verticalListener||t.horizontalListener)&&(t.usePointerLock&&!n.isPointerLocked()&&(n.requestPointerLock(),e.startPointerLockEvent(n,r)),a)){if(t.horizontalListener){const e=(a.x-t.previousPosition.x)/t.containerSize[0],n=i(t.horizontalListener,e);t.interactionNetDelta+=n,o(t.horizontalListener,n)}if(t.verticalListener){const e=(a.y-t.previousPosition.y)/t.containerSize[1],n=i(t.verticalListener,e);t.interactionNetDelta+=n,o(t.verticalListener,n)}t.previousPosition=a}},e.onScroll=(e,n,r)=>{t.scrollListener&&r&&(t.interactionNetDelta+=r*t.scrollListener.step,o(t.scrollListener,r*t.scrollListener.step))},e.onStartScroll=()=>{t.interactionNetDelta=0}}const a={horizontalListener:null,verticalListener:null,scrollListener:null};function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a,n),r.m.obj(e,t),i.Z.extend(e,t,n),r.m.setGet(e,t,["usePointerLock"]),o(e,t)}var l={newInstance:r.m.newInstance(s,"vtkMouseRangeManipulator"),extend:s}},function(e,t,n){"use strict";n.d(t,{Z:function(){return To}});var r=n(0),i=n(13),o=n(11),a=n(33),s=n(112),l=n(376);const u={default:{defaultStyle:{fontStyle:"bold",fontFamily:"Arial",fontColor:"black",fontSizeScale:e=>e/2,faceColor:"white",edgeThickness:.1,edgeColor:"black",resolution:400},xMinusFaceProperty:{text:"X-",faceColor:"yellow"},xPlusFaceProperty:{text:"X+",faceColor:"yellow"},yMinusFaceProperty:{text:"Y-",faceColor:"red"},yPlusFaceProperty:{text:"Y+",faceColor:"red"},zMinusFaceProperty:{text:"Z-",faceColor:"#008000"},zPlusFaceProperty:{text:"Z+",faceColor:"#008000"}},lps:{xMinusFaceProperty:{text:"R",faceRotation:-90},xPlusFaceProperty:{text:"L",faceRotation:90},yMinusFaceProperty:{text:"A",faceRotation:0},yPlusFaceProperty:{text:"P",faceRotation:180},zMinusFaceProperty:{text:"I",faceRotation:180},zPlusFaceProperty:{text:"S",faceRotation:0}}};function c(e,t){t.set(e)}var d={applyDefinitions:c,applyPreset:function(e,t){return c(u[e],t)},registerStylePreset:function(e,t){u[e]=t}};const p={xPlus:0,xMinus:1,yPlus:2,yMinus:3,zPlus:4,zMinus:5};function f(e,t){t.classHierarchy.push("vtkAnnotatedCubeActor"),t.xPlusFaceProperty={...t.xPlusFaceProperty},t.xMinusFaceProperty={...t.xMinusFaceProperty},t.yPlusFaceProperty={...t.yPlusFaceProperty},t.yMinusFaceProperty={...t.yMinusFaceProperty},t.zPlusFaceProperty={...t.zPlusFaceProperty},t.zMinusFaceProperty={...t.zMinusFaceProperty};let n=null;const r=document.createElement("canvas"),i=o.ZP.newInstance(),u=a.ZP.newInstance();function c(n){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;i&&Object.assign(t[`${n}FaceProperty`],i);const o={...t.defaultStyle,...t[`${n}FaceProperty`]};r.width=o.resolution,r.height=o.resolution;const a=r.getContext("2d");a.fillStyle=o.faceColor,a.fillRect(0,0,r.width,r.height),o.edgeThickness>0&&(a.strokeStyle=o.edgeColor,a.lineWidth=o.edgeThickness*r.width,a.strokeRect(0,0,r.width,r.height)),a.save(),a.translate(0,r.height),a.scale(1,-1),a.translate(r.width/2,r.height/2),a.rotate(-Math.PI*(o.faceRotation/180));const s=o.fontSizeScale(o.resolution);a.fillStyle=o.fontColor,a.textAlign="center",a.textBaseline="middle",a.font=`${o.fontStyle} ${s}px "${o.fontFamily}"`,a.fillText(o.text,0,0),a.restore();const c=l.Z.canvasToImageData(r);u.setInputData(c,p[n]),e.modified()}function d(){n=s.ZP.newInstance({generate3DTextureCoordinates:!0}),i.setInputConnection(n.getOutputPort()),c("xPlus"),c("xMinus"),c("yPlus"),c("yMinus"),c("zPlus"),c("zMinus")}u.setInterpolate(!0),e.setDefaultStyle=e=>{t.defaultStyle={...t.defaultStyle,...e},d()},e.setXPlusFaceProperty=e=>c("xPlus",e),e.setXMinusFaceProperty=e=>c("xMinus",e),e.setYPlusFaceProperty=e=>c("yPlus",e),e.setYMinusFaceProperty=e=>c("yMinus",e),e.setZPlusFaceProperty=e=>c("zPlus",e),e.setZMinusFaceProperty=e=>c("zMinus",e),d(),i.setInputConnection(n.getOutputPort()),e.setMapper(i),e.addTexture(u)}const h={defaultStyle:{text:"",faceColor:"white",faceRotation:0,fontFamily:"Arial",fontColor:"black",fontStyle:"normal",fontSizeScale:e=>e/1.8,edgeThickness:.1,edgeColor:"black",resolution:200}};function m(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,h,n),i.ZP.extend(e,t,n),r.m.get(e,t,["defaultStyle","xPlusFaceProperty","xMinusFaceProperty","yPlusFaceProperty","yMinusFaceProperty","zPlusFaceProperty","zMinusFaceProperty"]),f(e,t)}var g={newInstance:r.m.newInstance(m,"vtkAnnotatedCubeActor"),extend:m,Presets:d},v=n(25),y=n(4),_=n(466),b=n(467);function x(e){const t=e.getPoints().getBounds(),n=[.5*-(t[0]+t[1]),.5*-(t[2]+t[3]),.5*-(t[4]+t[5])];v.Z.buildFromDegree().translate(...n).apply(e.getPoints().getData())}function w(e,t){const n=e.getPoints().getBounds(),r=[0,0,0];r[t]=-n[2*t],v.Z.buildFromDegree().translate(...r).apply(e.getPoints().getData())}function S(e,t,n,r){const i=e.getPoints().getData().length,o=new Uint8Array(i);let a=0;for(;a{const e=_.ZP.newInstance({direction:[1,0,0],...t.config}).getOutputData();t.config.recenter?x(e):w(e,0),S(e,...t.xAxisColor);const r=_.ZP.newInstance({direction:[0,1,0],...t.config}).getOutputData();t.config.recenter?x(r):w(r,1),S(r,...t.yAxisColor);const i=_.ZP.newInstance({direction:[0,0,1],...t.config}).getOutputData();t.config.recenter?x(i):w(i,2),S(i,...t.zAxisColor);const o=b.ZP.newInstance();o.setInputData(e),o.addInputData(r),o.addInputData(i),n.setInputConnection(o.getOutputPort())},e.update();const i=r.m.debounce(e.update,0),{setConfig:a,setXAxisColor:s,setYAxisColor:l,setZAxisColor:u}=e;e.setConfig=e=>!!a(e)&&(i(),!0),e.setXAxisColor=e=>!!s(e)&&(i(),!0),e.setYAxisColor=e=>!!l(e)&&(i(),!0),e.setZAxisColor=e=>!!u(e)&&(i(),!0)}const T={config:{recenter:!0,tipResolution:60,tipRadius:.1,tipLength:.2,shaftResolution:60,shaftRadius:.03,invert:!1},xAxisColor:[255,0,0],yAxisColor:[255,255,0],zAxisColor:[0,128,0]};function M(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,T,n),i.ZP.extend(e,t,n),r.m.setGet(e,t,["config"]),r.m.setGetArray(e,t,["xAxisColor","yAxisColor","zAxisColor"],3,255),C(e,t)}var D={newInstance:r.m.newInstance(M,"vtkAxesActor"),extend:M},A=n(669),P="CornerAnnotation-module_container__2mZcn",k="CornerAnnotation-module_topRow__1OP5f CornerAnnotation-module_row__23t97",L="CornerAnnotation-module_middleRow__1xYK_ CornerAnnotation-module_row__23t97",O="CornerAnnotation-module_bottomRow__1V34_ CornerAnnotation-module_row__23t97",E="CornerAnnotation-module_east__xyYFe CornerAnnotation-module_item__BavOy",I="CornerAnnotation-module_west__3DsS- CornerAnnotation-module_item__BavOy",N="CornerAnnotation-module_north__2jPzf CornerAnnotation-module_item__BavOy",R="CornerAnnotation-module_south__FZyGo CornerAnnotation-module_item__BavOy",B="CornerAnnotation-module_northEast__-GjXi CornerAnnotation-module_east__xyYFe CornerAnnotation-module_item__BavOy",F="CornerAnnotation-module_northWest__23pUR CornerAnnotation-module_west__3DsS- CornerAnnotation-module_item__BavOy",V="CornerAnnotation-module_southEast__tmLmN CornerAnnotation-module_east__xyYFe CornerAnnotation-module_item__BavOy",U="CornerAnnotation-module_southWest__FLNPM CornerAnnotation-module_west__3DsS- CornerAnnotation-module_item__BavOy";function G(){}(0,A.s)(".CornerAnnotation-module_container__2mZcn {\n display: flex;\n align-items: stretch;\n justify-content: space-between;\n flex-direction: column;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n z-index: 100;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.CornerAnnotation-module_row__23t97 {\n flex: 1;\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n}\n\n.CornerAnnotation-module_topRow__1OP5f {\n align-items: flex-start;\n}\n\n.CornerAnnotation-module_middleRow__1xYK_ {\n align-items: center;\n}\n\n.CornerAnnotation-module_bottomRow__1V34_ {\n align-items: flex-end;\n}\n\n.CornerAnnotation-module_item__BavOy {\n flex: 1;\n padding: 5px;\n}\n\n.CornerAnnotation-module_east__xyYFe {\n text-align: right;\n}\n\n.CornerAnnotation-module_west__3DsS- {\n text-align: left;\n}\n\n.CornerAnnotation-module_north__2jPzf {\n text-align: center;\n}\n\n.CornerAnnotation-module_south__FZyGo {\n text-align: center;\n}\n\n.CornerAnnotation-module_northEast__-GjXi {\n}\n\n.CornerAnnotation-module_northWest__23pUR {\n}\n\n.CornerAnnotation-module_southEast__tmLmN {\n}\n\n.CornerAnnotation-module_southWest__FLNPM {\n}\n\n");const z={nw:"northWestContainer",n:"northContainer",ne:"northEastContainer",w:"westContainer",e:"eastContainer",sw:"southWestContainer",s:"southContainer",se:"southEastContainer"};function j(e,t){function n(){const e=Object.keys(t.templates);let n=e.length;for(;n--;){const r=t[z[e[n]]],i=t.templates[e[n]];r&&i&&(r.innerHTML=i(t.metadata))}}t.classHierarchy.push("vtkCornerAnnotation"),t.templates||(t.templates={}),t.metadata||(t.metadata={}),t.annotationContainer=document.createElement("div"),t.annotationContainer.setAttribute("class",P),t.annotationContainer.innerHTML=`\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
`,t.northWestContainer=t.annotationContainer.querySelector(".js-nw"),t.northContainer=t.annotationContainer.querySelector(".js-n"),t.northEastContainer=t.annotationContainer.querySelector(".js-ne"),t.westContainer=t.annotationContainer.querySelector(".js-w"),t.eastContainer=t.annotationContainer.querySelector(".js-e"),t.southWestContainer=t.annotationContainer.querySelector(".js-sw"),t.southContainer=t.annotationContainer.querySelector(".js-s"),t.southEastContainer=t.annotationContainer.querySelector(".js-se"),e.setContainer=n=>{t.container&&t.container!==n&&t.container.removeChild(t.annotationContainer),t.container!==n&&(t.container=n,t.container&&(t.container.appendChild(t.annotationContainer),e.resize()),e.modified())},e.resize=G,e.updateTemplates=r=>{t.templates=Object.assign(t.templates,r),n(),e.modified()},e.updateMetadata=r=>{t.metadata=Object.assign(t.metadata,r),n(),e.modified()}}const Y={templates:null,metadata:null};function H(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Y,n),r.m.obj(e,t),r.m.get(e,t,["annotationContainer","northWestContainer","northContainer","northEastContainer","westContainer","eastContainer","southWestContainer","southContainer","southEastContainer","metadata"]),j(e,t)}var W={newInstance:r.m.newInstance(H,"vtkCornerAnnotation"),extend:H,applyTemplate:function(e,t,n){return e.replace(/\${([^{]+)}/g,(e=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:`\${${e}}`;return e.split(".").reduce(((e,t)=>void 0!==e[t]?e[t]:n),t)}(e.substr(2,e.length-3).trim(),t,n)))}},$=n(468);const Z={IS_START:0,IS_NONE:0,IS_ROTATE:1,IS_PAN:2,IS_SPIN:3,IS_DOLLY:4,IS_CAMERA_POSE:11,IS_WINDOW_LEVEL:1024,IS_SLICE:1025};var K={States:Z};const{States:q}=K,X={Rotate:q.IS_ROTATE,Pan:q.IS_PAN,Spin:q.IS_SPIN,Dolly:q.IS_DOLLY,CameraPose:q.IS_CAMERA_POSE,WindowLevel:q.IS_WINDOW_LEVEL,Slice:q.IS_SLICE};function J(e,t){t.classHierarchy.push("vtkInteractorStyle"),Object.keys(X).forEach((n=>{r.m.event(e,t,`Start${n}Event`),e[`start${n}`]=()=>{t.state===q.IS_NONE&&(t.state=X[n],t._interactor.requestAnimation(e),e.invokeStartInteractionEvent({type:"StartInteractionEvent"}),e[`invokeStart${n}Event`]({type:`Start${n}Event`}))},r.m.event(e,t,`End${n}Event`),e[`end${n}`]=()=>{t.state===X[n]&&(t.state=q.IS_NONE,t._interactor.cancelAnimation(e),e.invokeEndInteractionEvent({type:"EndInteractionEvent"}),e[`invokeEnd${n}Event`]({type:`End${n}Event`}),t._interactor.render())}})),e.handleKeyPress=e=>{const n=t._interactor;let r=null;switch(e.key){case"r":case"R":e.pokedRenderer.resetCamera(),n.render();break;case"w":case"W":r=e.pokedRenderer.getActors(),r.forEach((e=>{const t=e.getProperty();t.setRepresentationToWireframe&&t.setRepresentationToWireframe()})),n.render();break;case"s":case"S":r=e.pokedRenderer.getActors(),r.forEach((e=>{const t=e.getProperty();t.setRepresentationToSurface&&t.setRepresentationToSurface()})),n.render();break;case"v":case"V":r=e.pokedRenderer.getActors(),r.forEach((e=>{const t=e.getProperty();t.setRepresentationToPoints&&t.setRepresentationToPoints()})),n.render()}}}const Q={state:q.IS_NONE,handleObservers:1,autoAdjustCameraClippingRange:1};function ee(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Q,n),$.ZP.extend(e,t,n),J(e,t)}var te={newInstance:r.m.newInstance(ee,"vtkInteractorStyle"),extend:ee,...K};const{vtkDebugMacro:ne}=r.m,{States:re}=te,ie={type:"StartInteractionEvent"},oe={type:"InteractionEvent"},ae={type:"EndInteractionEvent"};function se(e,t,n,r,i,o){const a=e.getActiveCamera();let s=a.getFocalPoint();s=t.getInteractorStyle().computeWorldToDisplay(e,s[0],s[1],s[2]);const l=s[2],u=t.getInteractorStyle().computeDisplayToWorld(e,n,r,l),c=t.getInteractorStyle().computeDisplayToWorld(e,i,o,l),d=[c[0]-u[0],c[1]-u[1],c[2]-u[2]];s=a.getFocalPoint();const p=a.getPosition();a.setFocalPoint(d[0]+s[0],d[1]+s[1],d[2]+s[2]),a.setPosition(d[0]+p[0],d[1]+p[1],d[2]+p[2])}const le={dollyToPosition:function(e,t,n,r){const i=n.getActiveCamera();if(i.getParallelProjection()){const o=r.getView(),a=o.getViewportSize(n),s=n.getViewport(),l=o.getSize(),u=a[0]/2,c=a[1]/2,d=t.x-s[0]*l[0],p=t.y-s[1]*l[1];se(n,r,u,c,d,p),i.setParallelScale(i.getParallelScale()/e),se(n,r,d,p,u,c)}else{let o=i.getFocalPoint();const a=i.getViewPlaneNormal();o=r.getInteractorStyle().computeWorldToDisplay(n,o[0],o[1],o[2]);const s=r.getInteractorStyle().computeDisplayToWorld(n,t.x,t.y,o[2]);i.setFocalPoint(s[0],s[1],s[2]),i.dolly(e),n.resetCameraClippingRange();const l=i.getPosition();o=i.getFocalPoint();const u=[0,0,0];let c=a[0]*(o[0]-l[0])+a[1]*(o[1]-l[1])+a[2]*(o[2]-l[2]);c/=a[0]**2+a[1]**2+a[2]**2,u[0]=l[0]+a[0]*c,u[1]=l[1]+a[1]*c,u[2]=l[2]+a[2]*c,i.setFocalPoint(u[0],u[1],u[2]),n.resetCameraClippingRange()}},translateCamera:se,dollyByFactor:function(e,t,n){if(Number.isNaN(n))return;const r=t.getActiveCamera();r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/n):(r.dolly(n),t.resetCameraClippingRange()),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}};function ue(e,t){t.classHierarchy.push("vtkInteractorStyleManipulator"),t.mouseManipulators=[],t.keyboardManipulators=[],t.vrManipulators=[],t.gestureManipulators=[],t.currentManipulator=null,t.currentWheelManipulator=null,t.centerOfRotation=[0,0,0],t.rotationFactor=1,e.removeAllManipulators=()=>{e.removeAllMouseManipulators(),e.removeAllKeyboardManipulators(),e.removeAllVRManipulators(),e.removeAllGestureManipulators()},e.removeAllMouseManipulators=()=>{t.mouseManipulators=[]},e.removeAllKeyboardManipulators=()=>{t.keyboardManipulators=[]},e.removeAllVRManipulators=()=>{t.vrManipulators=[]},e.removeAllGestureManipulators=()=>{t.gestureManipulators=[]};const n=(t,n)=>{const r=n.indexOf(t);return-1!==r&&(n.splice(r,1),e.modified(),!0)};e.removeMouseManipulator=e=>n(e,t.mouseManipulators),e.removeKeyboardManipulator=e=>n(e,t.keyboardManipulators),e.removeVRManipulator=e=>n(e,t.vrManipulators),e.removeGestureManipulator=e=>n(e,t.gestureManipulators);const r=(t,n)=>-1===n.indexOf(t)&&(n.push(t),e.modified(),!0);e.addMouseManipulator=e=>r(e,t.mouseManipulators),e.addKeyboardManipulator=e=>r(e,t.keyboardManipulators),e.addVRManipulator=e=>r(e,t.vrManipulators),e.addGestureManipulator=e=>r(e,t.gestureManipulators),e.getNumberOfMouseManipulators=()=>t.mouseManipulators.length,e.getNumberOfKeyboardManipulators=()=>t.keyboardManipulators.length,e.getNumberOfVRManipulators=()=>t.vrManipulators.length,e.getNumberOfGestureManipulators=()=>t.gestureManipulators.length,e.resetCurrentManipulator=()=>{t.currentManipulator=null,t.currentWheelManipulator=null},e.handleLeftButtonPress=n=>{t.previousPosition=n.position,e.onButtonDown(1,n)},e.handleMiddleButtonPress=n=>{t.previousPosition=n.position,e.onButtonDown(2,n)},e.handleRightButtonPress=n=>{t.previousPosition=n.position,e.onButtonDown(3,n)},e.handleButton3D=n=>{n&&(t.currentManipulator=e.findVRManipulator(n.device,n.input,n.pressed),t.currentManipulator?(t.currentManipulator.onButton3D(e,n.pokedRenderer,t.state,n.device,n.input,n.pressed),n.pressed?e.startCameraPose():e.endCameraPose()):ne("No manipulator found"))},e.handleMove3D=n=>{t.currentManipulator&&t.state===re.IS_CAMERA_POSE&&t.currentManipulator.onMove3D(e,n.pokedRenderer,t.state,n)},e.onButtonDown=(n,r)=>{t.currentManipulator||(t.currentManipulator=e.findMouseManipulator(n,r.shiftKey,r.controlKey,r.altKey),t.currentManipulator?(t.currentManipulator.setCenter&&t.currentManipulator.setCenter(t.centerOfRotation),t.currentManipulator.setRotationFactor&&t.currentManipulator.setRotationFactor(t.rotationFactor),t.currentManipulator.startInteraction(),t.currentManipulator.onButtonDown(t._interactor,r.pokedRenderer,r.position),t._interactor.requestAnimation(e.onButtonDown),e.invokeStartInteractionEvent(ie)):ne("No manipulator found"))},e.findMouseManipulator=(e,n,r,i)=>{let o=null,a=t.mouseManipulators.length;for(;a--;){const s=t.mouseManipulators[a];s&&s.getButton()===e&&s.getShift()===n&&s.getControl()===r&&s.getAlt()===i&&s.isDragEnabled()&&(o=s)}return o},e.findVRManipulator=(e,n)=>{let r=null,i=t.vrManipulators.length;for(;i--;){const o=t.vrManipulators[i];o&&o.getDevice()===e&&o.getInput()===n&&(r=o)}return r},e.handleLeftButtonRelease=()=>{e.onButtonUp(1)},e.handleMiddleButtonRelease=()=>{e.onButtonUp(2)},e.handleRightButtonRelease=()=>{e.onButtonUp(3)},e.onButtonUp=n=>{t.currentManipulator&&t.currentManipulator.getButton&&t.currentManipulator.getButton()===n&&(t.currentManipulator.onButtonUp(t._interactor),t.currentManipulator.endInteraction(),t.currentManipulator=null,t._interactor.cancelAnimation(e.onButtonDown),e.invokeEndInteractionEvent(ae))},e.handleStartMouseWheel=n=>{if(t.currentWheelManipulator)return;let r=null,i=t.mouseManipulators.length;for(;i--;){const e=t.mouseManipulators[i];e&&e.isScrollEnabled()&&e.getShift()===n.shiftKey&&e.getControl()===n.controlKey&&e.getAlt()===n.altKey&&(r=e)}r?(t.currentWheelManipulator=r,t.currentWheelManipulator.onStartScroll(t._interactor,n.pokedRenderer,n.spinY),t.currentWheelManipulator.startInteraction(),t._interactor.requestAnimation(e.handleStartMouseWheel),e.invokeStartInteractionEvent(ie)):ne("No manipulator found")},e.handleEndMouseWheel=()=>{t.currentWheelManipulator&&t.currentWheelManipulator.onEndScroll&&(t.currentWheelManipulator.onEndScroll(t._interactor),t.currentWheelManipulator.endInteraction(),t.currentWheelManipulator=null,t._interactor.cancelAnimation(e.handleStartMouseWheel),e.invokeEndInteractionEvent(ae))},e.handleMouseWheel=n=>{t.currentWheelManipulator&&t.currentWheelManipulator.onScroll&&(t.currentWheelManipulator.onScroll(t._interactor,n.pokedRenderer,n.spinY,t.cachedMousePosition),e.invokeInteractionEvent(oe))},e.handleMouseMove=n=>{t.cachedMousePosition=n.position,t.currentManipulator&&t.currentManipulator.onMouseMove&&(t.currentManipulator.onMouseMove(t._interactor,n.pokedRenderer,n.position),e.invokeInteractionEvent(oe))},e.handleKeyPress=n=>{t.keyboardManipulators.filter((e=>e.onKeyPress)).forEach((r=>{r.onKeyPress(t._interactor,n.pokedRenderer,n.key),e.invokeInteractionEvent(oe)}))},e.handleKeyDown=n=>{t.keyboardManipulators.filter((e=>e.onKeyDown)).forEach((r=>{r.onKeyDown(t._interactor,n.pokedRenderer,n.key),e.invokeInteractionEvent(oe)}))},e.handleKeyUp=n=>{t.keyboardManipulators.filter((e=>e.onKeyUp)).forEach((r=>{r.onKeyUp(t._interactor,n.pokedRenderer,n.key),e.invokeInteractionEvent(oe)}))},e.handleStartPinch=n=>{e.startDolly();let r=t.gestureManipulators.length;for(;r--;){const e=t.gestureManipulators[r];e&&e.isPinchEnabled()&&(e.onStartPinch(t._interactor,n.scale),e.startInteraction())}t._interactor.requestAnimation(e.handleStartPinch),e.invokeStartInteractionEvent(ie)},e.handleEndPinch=()=>{e.endDolly();let n=t.gestureManipulators.length;for(;n--;){const e=t.gestureManipulators[n];e&&e.isPinchEnabled()&&(e.onEndPinch(t._interactor),e.endInteraction())}t._interactor.cancelAnimation(e.handleStartPinch),e.invokeEndInteractionEvent(ae)},e.handleStartRotate=n=>{e.startRotate();let r=t.gestureManipulators.length;for(;r--;){const e=t.gestureManipulators[r];e&&e.isRotateEnabled()&&(e.onStartRotate(t._interactor,n.rotation),e.startInteraction())}t._interactor.requestAnimation(e.handleStartRotate),e.invokeStartInteractionEvent(ie)},e.handleEndRotate=()=>{e.endRotate();let n=t.gestureManipulators.length;for(;n--;){const e=t.gestureManipulators[n];e&&e.isRotateEnabled()&&(e.onEndRotate(t._interactor),e.endInteraction())}t._interactor.cancelAnimation(e.handleStartRotate),e.invokeEndInteractionEvent(ae)},e.handleStartPan=n=>{e.startPan();let r=t.gestureManipulators.length;for(;r--;){const e=t.gestureManipulators[r];e&&e.isPanEnabled()&&(e.onStartPan(t._interactor,n.translation),e.startInteraction())}t._interactor.requestAnimation(e.handleStartPan),e.invokeStartInteractionEvent(ie)},e.handleEndPan=()=>{e.endPan();let n=t.gestureManipulators.length;for(;n--;){const e=t.gestureManipulators[n];e&&e.isPanEnabled()&&(e.onEndPan(t._interactor),e.endInteraction())}t._interactor.cancelAnimation(e.handleStartPan),e.invokeEndInteractionEvent(ae)},e.handlePinch=n=>{let r=t.gestureManipulators.length,i=0;for(;r--;){const e=t.gestureManipulators[r];e&&e.isPinchEnabled()&&(e.onPinch(t._interactor,n.pokedRenderer,n.scale),i++)}i&&e.invokeInteractionEvent(oe)},e.handlePan=n=>{let r=t.gestureManipulators.length,i=0;for(;r--;){const e=t.gestureManipulators[r];e&&e.isPanEnabled()&&(e.onPan(t._interactor,n.pokedRenderer,n.translation),i++)}i&&e.invokeInteractionEvent(oe)},e.handleRotate=n=>{let r=t.gestureManipulators.length,i=0;for(;r--;){const e=t.gestureManipulators[r];e&&e.isRotateEnabled()&&(e.onRotate(t._interactor,n.pokedRenderer,n.rotation),i++)}i&&e.invokeInteractionEvent(oe)}}const ce={cachedMousePosition:null,currentManipulator:null,currentWheelManipulator:null,centerOfRotation:[0,0,0],rotationFactor:1};function de(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ce,n),te.extend(e,t,n),r.m.setGet(e,t,["rotationFactor"]),r.m.get(e,t,["mouseManipulators","keyboardManipulators","vrManipulators","gestureManipulators"]),r.m.setGetArray(e,t,["centerOfRotation"],3),ue(e,t)}var pe={newInstance:r.m.newInstance(de,"vtkInteractorStyleManipulator"),extend:de,...le},fe=n(14);const he=Object.create(null);function me(e,t){he[e]=t}function ge(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return he[e]&&he[e](t)}function ve(e,t){t.classHierarchy.push("vtkRenderWindow"),e.addRenderer=n=>{e.hasRenderer(n)||(n.setRenderWindow(e),t.renderers.push(n),e.modified())},e.removeRenderer=n=>{t.renderers=t.renderers.filter((e=>e!==n)),e.modified()},e.hasRenderer=e=>-1!==t.renderers.indexOf(e),e.newAPISpecificView=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ge(e||t.defaultViewAPI,n)},e.addView=n=>{e.hasView(n)||(n.setRenderable(e),t._views.push(n),e.modified())},e.removeView=n=>{t._views=t._views.filter((e=>e!==n)),e.modified()},e.hasView=e=>-1!==t._views.indexOf(e),e.preRender=()=>{t.renderers.forEach((e=>{e.isActiveCameraCreated()||e.resetCamera()}))},e.render=()=>{e.preRender(),t.interactor?t.interactor.render():t._views.forEach((e=>e.traverseAllPasses()))},e.getStatistics=()=>{const e={propCount:0,invisiblePropCount:0};return t.renderers.forEach((t=>{t.getViewProps().forEach((t=>{if(t.getVisibility()){e.propCount+=1;const n=t.getMapper&&t.getMapper();if(n&&n.getPrimitiveCount){const t=n.getPrimitiveCount();Object.keys(t).forEach((n=>{e[n]||(e[n]=0),e[n]+=t[n]}))}}else e.invisiblePropCount+=1}))})),e.str=Object.keys(e).map((t=>`${t}: ${e[t]}`)).join("\n"),e},e.captureImages=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.m.setImmediate(e.render),t._views.map((e=>e.captureNextImage?e.captureNextImage(n,i):void 0)).filter((e=>!!e))}}const ye={defaultViewAPI:"WebGL",renderers:[],views:[],interactor:null,neverRendered:!0,numberOfLayers:1};function _e(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ye,n),r.m.obj(e,t),r.m.setGet(e,t,["interactor","numberOfLayers","_views","defaultViewAPI"]),r.m.get(e,t,["neverRendered"]),r.m.getArray(e,t,["renderers"]),r.m.moveToProtected(e,t,["views"]),r.m.event(e,t,"completion"),ve(e,t)}var be={newInstance:r.m.newInstance(_e,"vtkRenderWindow"),extend:_e,registerViewConstructor:me,listViewAPIs:function(){return Object.keys(he)},newAPISpecificView:ge},xe=n(46);function we(e,t){t.classHierarchy.push("vtkRenderPass"),e.getOperation=()=>t.currentOperation,e.setCurrentOperation=e=>{t.currentOperation=e,t.currentTraverseOperation=`traverse${r.m.capitalize(t.currentOperation)}`},e.getTraverseOperation=()=>t.currentTraverseOperation,e.traverse=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.deleted||(t._currentParent=r,t.preDelegateOperations.forEach((t=>{e.setCurrentOperation(t),n.traverse(e)})),t.delegates.forEach((t=>{t.traverse(n,e)})),t.postDelegateOperations.forEach((t=>{e.setCurrentOperation(t),n.traverse(e)})))}}const Se={delegates:[],currentOperation:null,preDelegateOperations:[],postDelegateOperations:[],currentParent:null};function Ce(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Se,n),r.m.obj(e,t),r.m.get(e,t,["currentOperation"]),r.m.setGet(e,t,["delegates","_currentParent","preDelegateOperations","postDelegateOperations"]),r.m.moveToProtected(e,t,["currentParent"]),we(e,t)}var Te={newInstance:r.m.newInstance(Ce,"vtkRenderPass"),extend:Ce},Me=n(24),De=n(27),Ae=n(26),Pe=n(16),ke=n(54);const{Representation:Le}=Ae.ZP,{vtkErrorMacro:Oe}=r.m;function Ee(e){const t=Pe.Z.substitute(e.Fragment,"//VTK::RenderPassFragmentShader::Impl","\n float weight = gl_FragData[0].a * pow(max(1.1 - gl_FragCoord.z, 0.0), 2.0);\n gl_FragData[0] = vec4(gl_FragData[0].rgb*weight, gl_FragData[0].a);\n gl_FragData[1].r = weight;\n ",!1);e.Fragment=t.result}function Ie(e,t){t.classHierarchy.push("vtkOpenGLOrderIndependentTranslucentPass"),e.createVertexBuffer=()=>{const e=new Float32Array([-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1]),n=new Float32Array([0,0,1,0,0,1,1,1]),r=new Uint16Array([4,0,1,3,2]),i=y.ZP.newInstance({numberOfComponents:3,values:e});i.setName("points");const o=y.ZP.newInstance({numberOfComponents:2,values:n});o.setName("tcoords");const a=y.ZP.newInstance({numberOfComponents:1,values:r});t.tris.getCABO().createVBO(a,"polys",Le.SURFACE,{points:i,tcoords:o,cellOffset:0}),t.VBOBuildTime.modified()},e.createFramebuffer=e=>{const n=e.getSize(),r=e.getContext();t.framebuffer=xe.ZP.newInstance(),t.framebuffer.setOpenGLRenderWindow(e),t.framebuffer.create(...n),t.framebuffer.saveCurrentBindingsAndBuffers(),t.framebuffer.bind(),t.translucentRGBATexture=Me.ZP.newInstance(),t.translucentRGBATexture.setInternalFormat(r.RGBA16F),t.translucentRGBATexture.setFormat(r.RGBA),t.translucentRGBATexture.setOpenGLDataType(r.HALF_FLOAT),t.translucentRGBATexture.setOpenGLRenderWindow(e),t.translucentRGBATexture.create2DFromRaw(n[0],n[1],4,"Float32Array",null),t.translucentRTexture=Me.ZP.newInstance(),t.translucentRTexture.setInternalFormat(r.R16F),t.translucentRTexture.setFormat(r.RED),t.translucentRTexture.setOpenGLDataType(r.HALF_FLOAT),t.translucentRTexture.setOpenGLRenderWindow(e),t.translucentRTexture.create2DFromRaw(n[0],n[1],1,"Float32Array",null),t.translucentZTexture=Me.ZP.newInstance(),t.translucentZTexture.setOpenGLRenderWindow(e),t.translucentZTexture.createDepthFromRaw(n[0],n[1],"Float32Array",null),t.framebuffer.setColorBuffer(t.translucentRGBATexture,0),t.framebuffer.setColorBuffer(t.translucentRTexture,1),t.framebuffer.setDepthBuffer(t.translucentZTexture)},e.createCopyShader=e=>{t.copyShader=e.getShaderCache().readyShaderProgramArray(["//VTK::System::Dec","attribute vec4 vertexDC;","attribute vec2 tcoordTC;","varying vec2 tcoord;","void main() { tcoord = tcoordTC; gl_Position = vertexDC; }"].join("\n"),"//VTK::System::Dec\n\nin vec2 tcoord;\n\nuniform sampler2D translucentRTexture;\nuniform sampler2D translucentRGBATexture;\n\n// the output of this shader\n//VTK::Output::Dec\n\nvoid main()\n{\n vec4 t1Color = texture(translucentRGBATexture, tcoord);\n float t2Color = texture(translucentRTexture, tcoord).r;\n gl_FragData[0] = vec4(t1Color.rgb/max(t2Color,0.01), 1.0 - t1Color.a);\n}\n","")},e.createVBO=n=>{const r=n.getContext();t.tris.setOpenGLRenderWindow(n),e.createVertexBuffer();const i=t.copyShader;t.tris.getCABO().bind(),t.copyVAO.addAttributeArray(i,t.tris.getCABO(),"vertexDC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),r.FLOAT,3,r.FALSE)||Oe("Error setting vertexDC in copy shader VAO."),t.copyVAO.addAttributeArray(i,t.tris.getCABO(),"tcoordTC",t.tris.getCABO().getTCoordOffset(),t.tris.getCABO().getStride(),r.FLOAT,2,r.FALSE)||Oe("Error setting vertexDC in copy shader VAO.")},e.traverse=(n,r,i)=>{if(t.deleted)return;const o=n.getSize(),a=n.getContext();if(t._supported=!1,r.getSelector()||!a||!n.getWebgl2()||!a.getExtension("EXT_color_buffer_half_float")&&!a.getExtension("EXT_color_buffer_float"))return e.setCurrentOperation("translucentPass"),void r.traverse(e);if(t._supported=!0,null===t.framebuffer)e.createFramebuffer(n);else{const r=t.framebuffer.getSize();null===r||r[0]!==o[0]||r[1]!==o[1]?(t.framebuffer.releaseGraphicsResources(),t.translucentRGBATexture.releaseGraphicsResources(n),t.translucentRTexture.releaseGraphicsResources(n),t.translucentZTexture.releaseGraphicsResources(n),e.createFramebuffer(n)):(t.framebuffer.saveCurrentBindingsAndBuffers(),t.framebuffer.bind())}a.drawBuffers([a.COLOR_ATTACHMENT0]),a.clearBufferfv(a.COLOR,0,[0,0,0,0]),a.clearBufferfv(a.DEPTH,0,[1]),a.colorMask(!1,!1,!1,!1),i.getOpaqueActorCount()>0&&(i.setCurrentOperation("opaqueZBufferPass"),r.traverse(i)),a.colorMask(!0,!0,!0,!0),a.drawBuffers([a.COLOR_ATTACHMENT0,a.COLOR_ATTACHMENT1]),a.viewport(0,0,o[0],o[1]),a.scissor(0,0,o[0],o[1]),a.clearBufferfv(a.COLOR,0,[0,0,0,1]),a.clearBufferfv(a.COLOR,1,[0,0,0,0]),a.enable(a.DEPTH_TEST),a.enable(a.BLEND),a.blendFuncSeparate(a.ONE,a.ONE,a.ZERO,a.ONE_MINUS_SRC_ALPHA),e.setCurrentOperation("translucentPass"),r.traverse(e),a.drawBuffers([a.NONE]),t.framebuffer.restorePreviousBindingsAndBuffers(),null===t.copyShader?e.createCopyShader(n):n.getShaderCache().readyShaderProgram(t.copyShader),t.copyVAO||(t.copyVAO=ke.ZP.newInstance(),t.copyVAO.setOpenGLRenderWindow(n)),t.copyVAO.bind(),t.VBOBuildTime.getMTime()t._supported?Ee:null,e.releaseGraphicsResources=n=>{t.framebuffer&&(t.framebuffer.releaseGraphicsResources(n),t.framebuffer=null),t.translucentRGBATexture&&(t.translucentRGBATexture.releaseGraphicsResources(n),t.translucentRGBATexture=null),t.translucentRTexture&&(t.translucentRTexture.releaseGraphicsResources(n),t.translucentRTexture=null),t.translucentZTexture&&(t.translucentZTexture.releaseGraphicsResources(n),t.translucentZTexture=null),t.copyVAO&&(t.copyVAO.releaseGraphicsResources(n),t.copyVAO=null),t.copyShader&&(t.copyShader.releaseGraphicsResources(n),t.copyShader=null),t.tris&&(t.tris.releaseGraphicsResources(n),t.tris=null),e.modified()}}const Ne={framebuffer:null,copyShader:null,tris:null};function Re(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ne,n),Te.extend(e,t,n),t.VBOBuildTime={},r.m.obj(t.VBOBuildTime,{mtime:0}),t.tris=De.ZP.newInstance(),r.m.get(e,t,["framebuffer"]),Ie(e,t)}var Be={newInstance:r.m.newInstance(Re,"vtkOpenGLOrderIndependentTranslucentPass"),extend:Re};function Fe(e,t){t.classHierarchy.push("vtkForwardPass"),e.traverse=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t.deleted)return;t._currentParent=r,e.setCurrentOperation("buildPass"),n.traverse(e);const i=n.getRenderable().getNumberOfLayers(),o=n.getChildren();for(let r=0;r0||t.translucentActorCount>0)&&t.volumeCount>0||t.depthRequested){const r=n.getFramebufferSize();null===t.framebuffer&&(t.framebuffer=xe.ZP.newInstance()),t.framebuffer.setOpenGLRenderWindow(n),t.framebuffer.saveCurrentBindingsAndBuffers();const i=t.framebuffer.getSize();null!==i&&i[0]===r[0]&&i[1]===r[1]||(t.framebuffer.create(r[0],r[1]),t.framebuffer.populateFramebuffer()),t.framebuffer.bind(),e.setCurrentOperation("zBufferPass"),a.traverse(e),t.framebuffer.restorePreviousBindingsAndBuffers(),t.depthRequested=!1}e.setCurrentOperation("cameraPass"),a.traverse(e),t.opaqueActorCount>0&&(e.setCurrentOperation("opaquePass"),a.traverse(e)),t.translucentActorCount>0&&(t.translucentPass||(t.translucentPass=Be.newInstance()),t.translucentPass.traverse(n,a,e)),t.volumeCount>0&&(e.setCurrentOperation("volumePass"),a.traverse(e)),t.overlayActorCount>0&&(e.setCurrentOperation("overlayPass"),a.traverse(e))}}},e.getZBufferTexture=()=>t.framebuffer?t.framebuffer.getColorTexture():null,e.requestDepth=()=>{t.depthRequested=!0},e.incrementOpaqueActorCount=()=>t.opaqueActorCount++,e.incrementTranslucentActorCount=()=>t.translucentActorCount++,e.incrementVolumeCount=()=>t.volumeCount++,e.incrementOverlayActorCount=()=>t.overlayActorCount++}const Ve={opaqueActorCount:0,translucentActorCount:0,volumeCount:0,overlayActorCount:0,framebuffer:null,depthRequested:!1};function Ue(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ve,n),Te.extend(e,t,n),r.m.get(e,t,["framebuffer","opaqueActorCount","translucentActorCount","volumeCount"]),Fe(e,t)}var Ge={newInstance:r.m.newInstance(Ue,"vtkForwardPass"),extend:Ue},ze=n(362),je=n(469),Ye=n.n(je);const He=["lastShaderBound","context","_openGLRenderWindow"];function We(e,t){t.classHierarchy.push("vtkShaderCache"),e.replaceShaderValues=(e,n,r)=>{let i=n;r.length>0&&(i=Pe.Z.substitute(i,"VSOut","GSOut").result);const o=t._openGLRenderWindow.getWebgl2();let a="\n",s="#version 100\n";o?s="#version 300 es\n#define attribute in\n#define textureCube texture\n#define texture2D texture\n#define textureCubeLod textureLod\n#define texture2DLod textureLod\n":(t.context.getExtension("OES_standard_derivatives"),t.context.getExtension("EXT_frag_depth")&&(a="#extension GL_EXT_frag_depth : enable\n"),t.context.getExtension("EXT_shader_texture_lod")&&(a+="#extension GL_EXT_shader_texture_lod : enable\n#define textureCubeLod textureCubeLodEXT\n#define texture2DLod texture2DLodEXT")),i=Pe.Z.substitute(i,"//VTK::System::Dec",[`${s}\n`,o?"":"#extension GL_OES_standard_derivatives : enable\n",a,"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;let l=Pe.Z.substitute(e,"//VTK::System::Dec",[`${s}\n`,"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;if(o){l=Pe.Z.substitute(l,"varying","out").result,i=Pe.Z.substitute(i,"varying","in").result;let e="",t=0;for(;i.includes(`gl_FragData[${t}]`);)i=Pe.Z.substitute(i,`gl_FragData\\[${t}\\]`,`fragOutput${t}`).result,e+=`layout(location = ${t}) out vec4 fragOutput${t};\n`,t++;i=Pe.Z.substitute(i,"//VTK::Output::Dec",e).result}return{VSSource:l,FSSource:i,GSSource:Pe.Z.substitute(r,"//VTK::System::Dec",s).result}},e.readyShaderProgramArray=(t,n,r)=>{const i=e.replaceShaderValues(t,n,r),o=e.getShaderProgram(i.VSSource,i.FSSource,i.GSSource);return e.readyShaderProgram(o)},e.readyShaderProgram=t=>t&&(t.getCompiled()||t.compileShader())&&e.bindShader(t)?t:null,e.getShaderProgram=(e,n,r)=>{const i=`${e}${n}${r}`,o=Ye().hash(i);if(!(o in t.shaderPrograms)){const i=Pe.Z.newInstance();return i.setContext(t.context),i.getVertexShader().setSource(e),i.getFragmentShader().setSource(n),r&&i.getGeometryShader().setSource(r),i.setMd5Hash(o),t.shaderPrograms[o]=i,i}return t.shaderPrograms[o]},e.releaseGraphicsResources=n=>{e.releaseCurrentShader(),Object.keys(t.shaderPrograms).map((e=>t.shaderPrograms[e])).forEach((e=>e.releaseGraphicsResources(n)))},e.releaseGraphicsResources=()=>{t.astShaderBound&&(t.lastShaderBound.release(),t.lastShaderBound=null)},e.bindShader=e=>(t.lastShaderBound===e||(t.lastShaderBound&&t.lastShaderBound.release(),e.bind(),t.lastShaderBound=e),1)}const $e={lastShaderBound:null,shaderPrograms:null,context:null};function Ze(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$e,n),t.shaderPrograms={},r.m.obj(e,t),r.m.setGet(e,t,He),r.m.moveToProtected(e,t,["openGLRenderWindow"]),We(e,t)}var Ke={newInstance:r.m.newInstance(Ze,"vtkShaderCache"),extend:Ze};const{vtkErrorMacro:qe}=r.m;function Xe(e,t){t.classHierarchy.push("vtkOpenGLTextureUnitManager"),e.deleteTable=()=>{for(let e=0;e{if(t.context!==n){if(0!==t.context&&e.deleteTable(),t.context=n,t.context){t.numberOfTextureUnits=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS);for(let e=0;e{for(let n=0;ne.isAllocated(n)?-1:(t.textureUnits[n]=!0,n),e.isAllocated=e=>t.textureUnits[e],e.free=e=>{t.textureUnits[e]=!1}}const Je={context:null,numberOfTextureUnits:0,textureUnits:0};function Qe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Je,n),r.m.obj(e,t),t.textureUnits=[],r.m.get(e,t,["numberOfTextureUnits"]),r.m.setGet(e,t,["context"]),Xe(e,t)}var et={newInstance:r.m.newInstance(Qe,"vtkOpenGLTextureUnitManager"),extend:Qe},tt=n(8),nt=n(6);function rt(e,t){t.classHierarchy.push("vtkRenderWindowViewNode"),e.getViewNodeFactory=()=>null,e.getAspectRatio=()=>t.size[0]/t.size[1],e.getAspectRatioForRenderer=e=>{const n=e.getViewportByReference();return t.size[0]*(n[2]-n[0])/((n[3]-n[1])*t.size[1])},e.isInViewport=(t,n,r)=>{const i=r.getViewportByReference(),o=e.getFramebufferSize();return i[0]*o[0]<=t&&i[2]*o[0]>=t&&i[1]*o[1]<=n&&i[3]*o[1]>=n},e.getViewportSize=t=>{const n=t.getViewportByReference(),r=e.getFramebufferSize();return[(n[2]-n[0])*r[0],(n[3]-n[1])*r[1]]},e.getViewportCenter=t=>{const n=e.getViewportSize(t);return[.5*n[0],.5*n[1]]},e.displayToNormalizedDisplay=(t,n,r)=>{const i=e.getFramebufferSize();return[t/i[0],n/i[1],r]},e.normalizedDisplayToDisplay=(t,n,r)=>{const i=e.getFramebufferSize();return[t*i[0],n*i[1],r]},e.worldToView=(e,t,n,r)=>r.worldToView(e,t,n),e.viewToWorld=(e,t,n,r)=>r.viewToWorld(e,t,n),e.worldToDisplay=(t,n,r,i)=>{const o=i.worldToView(t,n,r),a=e.getViewportSize(i),s=i.viewToProjection(o[0],o[1],o[2],a[0]/a[1]),l=i.projectionToNormalizedDisplay(s[0],s[1],s[2]);return e.normalizedDisplayToDisplay(l[0],l[1],l[2])},e.displayToWorld=(t,n,r,i)=>{const o=e.displayToNormalizedDisplay(t,n,r),a=i.normalizedDisplayToProjection(o[0],o[1],o[2]),s=e.getViewportSize(i),l=i.projectionToView(a[0],a[1],a[2],s[0]/s[1]);return i.viewToWorld(l[0],l[1],l[2])},e.normalizedDisplayToViewport=(t,n,r,i)=>{let o=i.getViewportByReference();o=e.normalizedDisplayToDisplay(o[0],o[1],0);const a=e.normalizedDisplayToDisplay(t,n,r);return[a[0]-o[0]-.5,a[1]-o[1]-.5,r]},e.viewportToNormalizedViewport=(t,n,r,i)=>{const o=e.getViewportSize(i);return o&&0!==o[0]&&0!==o[1]?[t/(o[0]-1),n/(o[1]-1),r]:[t,n,r]},e.normalizedViewportToViewport=(t,n,r,i)=>{const o=e.getViewportSize(i);return[t*(o[0]-1),n*(o[1]-1),r]},e.displayToLocalDisplay=(t,n,r)=>[t,e.getFramebufferSize()[1]-n-1,r],e.viewportToNormalizedDisplay=(t,n,r,i)=>{let o=i.getViewportByReference();o=e.normalizedDisplayToDisplay(o[0],o[1],0);const a=t+o[0]+.5,s=n+o[1]+.5;return e.displayToNormalizedDisplay(a,s,r)},e.getComputedDevicePixelRatio=()=>t.size[0]/e.getContainerSize()[0],e.getContainerSize=()=>{r.m.vtkErrorMacro("not implemented")},e.getPixelData=(e,t,n,i)=>{r.m.vtkErrorMacro("not implemented")},e.createSelector=()=>{r.m.vtkErrorMacro("not implemented")}}const it={size:void 0,selector:void 0};function ot(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,it,n),t.size||(t.size=[300,300]),r.m.getArray(e,t,["size"],2),r.m.get(e,t,["selector"]),nt.Z.extend(e,t,n),rt(e,t)}var at={newInstance:r.m.newInstance(ot,"vtkRenderWindowViewNode"),extend:ot};var st={XrSessionTypes:{HmdVR:0,MobileAR:1,LookingGlassVR:2,HmdAR:3}};const lt="__getUnderlyingContext";function ut(){const e=new Map,t={apply:(t,n,r)=>e.has(r[0])?e.get(r[0]):t.apply(n,r)};const n=Object.create(null);return n.getParameter=(e,n,r,i)=>new Proxy(i.bind(e),t),n.depthMask=(t,n,r,i)=>{return new Proxy(i.bind(t),(o=t.DEPTH_WRITEMASK,{apply:(t,n,r)=>(e.set(o,r[0]),t.apply(n,r))}));var o},{get(e,t,r){if(t===lt)return()=>e;let i=Reflect.get(e,t,e);i instanceof Function&&(i=i.bind(e));const o=n[t];return o?o(e,t,r,i):i}}}const{vtkDebugMacro:ct,vtkErrorMacro:dt}=r.m,{XrSessionTypes:pt}=st,ft={position:"absolute",top:0,left:0,width:"100%",height:"100%"},ht=.25,mt=-1.5;function gt(e,t,n){const r=e.createFramebuffer(),i=e.createTexture();e.bindTexture(e.TEXTURE_2D,i),e.texImage2D(e.TEXTURE_2D,0,t,2,2,0,t,n,null),e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,i,0);const o=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindTexture(e.TEXTURE_2D,null),o===e.FRAMEBUFFER_COMPLETE}let vt=0;const yt=[];function _t(){vt++,yt.forEach((e=>e(vt)))}function bt(){vt--,yt.forEach((e=>e(vt)))}function xt(e){e.preventDefault()}function wt(e,t){t.classHierarchy.push("vtkOpenGLRenderWindow");const i=ut();e.getViewNodeFactory=()=>t.myFactory,t.canvas.addEventListener("webglcontextlost",xt,!1),t.canvas.addEventListener("webglcontextrestored",e.restoreContext,!1);const o=[0,0];let a;e.onModified((function(){t.renderable&&(t.size[0]===o[0]&&t.size[1]===o[1]||(o[0]=t.size[0],o[1]=t.size[1],t.canvas.setAttribute("width",t.size[0]),t.canvas.setAttribute("height",t.size[1]))),t.viewStream&&t.viewStream.setSize(t.size[0],t.size[1]),t.canvas.style.display=t.useOffScreen?"none":"block",t.el&&(t.el.style.cursor=t.cursorVisibility?t.cursor:"none"),t.containerSize=null})),e.buildPass=n=>{if(n){if(!t.renderable)return;e.prepareNodes(),e.addMissingNodes(t.renderable.getRenderersByReference()),e.removeUnusedNodes(),e.initialize(),t.children.forEach((t=>{t.setOpenGLRenderWindow(e)}))}},e.initialize=()=>{if(!t.initialized){t.context=e.get3DContext(),t.textureUnitManager=et.newInstance(),t.textureUnitManager.setContext(t.context),t.shaderCache.setContext(t.context);const n=t.context;n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA),n.depthFunc(n.LEQUAL),n.enable(n.BLEND),t.initialized=!0}},e.makeCurrent=()=>{t.context.makeCurrent()},e.setContainer=n=>{t.el&&t.el!==n&&(t.canvas.parentNode!==t.el&&dt("Error: canvas parent node does not match container"),t.el.removeChild(t.canvas),t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)),t.el!==n&&(t.el=n,t.el&&(t.el.appendChild(t.canvas),t.useBackgroundImage&&t.el.appendChild(t.bgImage)),e.modified())},e.getContainer=()=>t.el,e.getContainerSize=()=>{if(!t.containerSize&&t.el){const{width:e,height:n}=t.el.getBoundingClientRect();t.containerSize=[e,n]}return t.containerSize||t.size},e.getFramebufferSize=()=>t.activeFramebuffer?t.activeFramebuffer.getSize():t.size,e.getPixelData=(e,n,r,i)=>{const o=new Uint8Array((r-e+1)*(i-n+1)*4);return t.context.readPixels(e,n,r-e+1,i-n+1,t.context.RGBA,t.context.UNSIGNED_BYTE,o),o},e.get3DContext=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{preserveDrawingBuffer:!1,depth:!0,alpha:!0,powerPreference:"high-performance"},n=null;const r="undefined"!=typeof WebGL2RenderingContext;return t.webgl2=!1,t.defaultToWebgl2&&r&&(n=t.canvas.getContext("webgl2",e),n&&(t.webgl2=!0,ct("using webgl2"))),n||(ct("using webgl1"),n=t.canvas.getContext("webgl",e)||t.canvas.getContext("experimental-webgl",e)),new Proxy(n,i)},e.startXR=n=>{if(void 0===navigator.xr)throw new Error("WebXR is not available");t.xrSessionType=void 0!==n?n:pt.HmdVR;const r=[pt.HmdAR,pt.MobileAR].includes(t.xrSessionType),i=r?"immersive-ar":"immersive-vr";if(!navigator.xr.isSessionSupported(i))throw r?new Error("Device does not support AR session"):new Error("VR display is not available");if(null!==t.xrSession)throw new Error("XR Session already exists!");navigator.xr.requestSession(i).then(e.enterXR,(()=>{throw new Error("Failed to create XR session!")}))},e.enterXR=async r=>{if(t.xrSession=r,t.oldCanvasSize=t.size.slice(),null===t.xrSession)throw new Error("Failed to enter XR with a null xrSession.");{const r=e.get3DContext();await r.makeXRCompatible();const i=new n.g.XRWebGLLayer(t.xrSession,r.__getUnderlyingContext());e.setSize(i.framebufferWidth,i.framebufferHeight),t.xrSession.updateRenderState({baseLayer:i}),t.xrSession.requestReferenceSpace("local").then((e=>{t.xrReferenceSpace=e}));if([pt.HmdAR,pt.MobileAR].includes(t.xrSessionType)){const e=t.renderable.getRenderers()[0];t.preXrSessionBackground=e.getBackground(),e.setBackground([0,0,0,0])}e.resetXRScene(),t.renderable.getInteractor().switchToXRAnimation(),t.xrSceneFrame=t.xrSession.requestAnimationFrame(e.xrRender)}},e.resetXRScene=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ht,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mt;const r=t.renderable.getRenderers()[0];r.resetCamera();const i=r.getActiveCamera();let o=i.getPhysicalScale();const a=i.getPhysicalTranslation(),s=n*o;o/=e,a[2]+=s,i.setPhysicalScale(o),i.setPhysicalTranslation(a),i.setClippingRange(.1*o,100*o)},e.stopXR=async()=>{if(void 0===navigator.xr)return;if(null!==t.xrSession){t.xrSession.cancelAnimationFrame(t.xrSceneFrame),t.renderable.getInteractor().returnFromXRAnimation();const n=e.get3DContext();n.bindFramebuffer(n.FRAMEBUFFER,null),await t.xrSession.end().catch((e=>{if(!(e instanceof DOMException))throw e})),t.xrSession=null}void 0!==t.oldCanvasSize&&e.setSize(...t.oldCanvasSize);const n=t.renderable.getRenderers()[0];null!=t.preXrSessionBackground&&(n.setBackground(t.preXrSessionBackground),t.preXrSessionBackground=null),n.getActiveCamera().setProjectionMatrix(null),n.resetCamera(),n.setViewport(0,0,1,1),e.traverseAllPasses()},e.xrRender=async(n,r)=>{const i=r.session,o=[pt.HmdVR,pt.HmdAR].includes(t.xrSessionType);t.renderable.getInteractor().updateXRGamepads(i,r,t.xrReferenceSpace),t.xrSceneFrame=t.xrSession.requestAnimationFrame(e.xrRender);const a=r.getViewerPose(t.xrReferenceSpace);if(a){const n=e.get3DContext();t.xrSessionType===pt.MobileAR&&void 0!==t.oldCanvasSize&&(n.canvas.width=t.oldCanvasSize[0],n.canvas.height=t.oldCanvasSize[1]);const r=i.renderState.baseLayer;n.bindFramebuffer(n.FRAMEBUFFER,r.framebuffer),n.clear(n.COLOR_BUFFER_BIT),n.clear(n.DEPTH_BUFFER_BIT),e.setSize(r.framebufferWidth,r.framebufferHeight);const s=t.renderable.getRenderers()[0];a.views.forEach(((n,i)=>{const a=r.getViewport(n);if(o)if("left"===n.eye)s.setViewport(0,0,.5,1);else{if("right"!==n.eye)return;s.setViewport(.5,0,1,1)}else if(t.xrSessionType===pt.LookingGlassVR){const e=a.x/r.framebufferWidth,t=a.y/r.framebufferHeight,n=(a.x+a.width)/r.framebufferWidth,i=(a.y+a.height)/r.framebufferHeight;s.setViewport(e,t,n,i)}else s.setViewport(0,0,1,1);s.getActiveCamera().computeViewParametersFromPhysicalMatrix(n.transform.inverse.matrix),s.getActiveCamera().setProjectionMatrix(n.projectionMatrix),e.traverseAllPasses()})),n.scissor(0,0,r.framebufferWidth,r.framebufferHeight),n.disable(n.SCISSOR_TEST)}},e.restoreContext=()=>{const t=Te.newInstance();t.setCurrentOperation("Release"),t.traverse(e,null)},e.activateTexture=n=>{const r=t._textureResourceIds.get(n);if(void 0!==r)return void t.context.activeTexture(t.context.TEXTURE0+r);const i=e.getTextureUnitManager().allocate();i<0?dt("Hardware does not support the number of textures defined."):(t._textureResourceIds.set(n,i),t.context.activeTexture(t.context.TEXTURE0+i))},e.deactivateTexture=n=>{const r=t._textureResourceIds.get(n);void 0!==r&&(e.getTextureUnitManager().free(r),t._textureResourceIds.delete(n))},e.getTextureUnitForTexture=e=>{const n=t._textureResourceIds.get(e);return void 0!==n?n:-1},e.getDefaultTextureInternalFormat=function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t.webgl2)switch(e){case fe.Tu.UNSIGNED_CHAR:switch(n){case 1:return t.context.R8;case 2:return t.context.RG8;case 3:return t.context.RGB8;default:return t.context.RGBA8}case r&&!i&&fe.Tu.UNSIGNED_SHORT:switch(n){case 1:return r.R16_EXT;case 2:return r.RG16_EXT;case 3:return r.RGB16_EXT;default:return r.RGBA16_EXT}case r&&!i&&fe.Tu.SHORT:switch(n){case 1:return r.R16_SNORM_EXT;case 2:return r.RG16_SNORM_EXT;case 3:return r.RGB16_SNORM_EXT;default:return r.RGBA16_SNORM_EXT}case fe.Tu.FLOAT:default:switch(n){case 1:return t.context.R16F;case 2:return t.context.RG16F;case 3:return t.context.RGB16F;default:return t.context.RGBA16F}}switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;default:return t.context.RGBA}},e.setBackgroundImage=e=>{t.bgImage.src=e.src},e.setUseBackgroundImage=e=>{t.useBackgroundImage=e,t.useBackgroundImage&&!t.el.contains(t.bgImage)?t.el.appendChild(t.bgImage):!t.useBackgroundImage&&t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)},e.captureNextImage=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png",{resetCamera:r=!1,size:i=null,scale:o=1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.deleted)return null;t.imageFormat=n;const a=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,t._screenshot={size:i||1!==o?i||t.size.map((e=>e*o)):null},new Promise(((n,i)=>{const o=e.onImageReady((i=>{if(null===t._screenshot.size)t.notifyStartCaptureImage=a,o.unsubscribe(),t._screenshot.placeHolder&&(t.size=t._screenshot.originalSize,e.modified(),t._screenshot.cameras&&t._screenshot.cameras.forEach((e=>{let{restoreParamsFn:t,arg:n}=e;return t(n)})),e.traverseAllPasses(),t.el.removeChild(t._screenshot.placeHolder),t._screenshot.placeHolder.remove(),t._screenshot=null),n(i);else{const n=document.createElement("img");if(n.style=ft,n.src=i,t._screenshot.placeHolder=t.el.appendChild(n),t.canvas.style.display="none",t._screenshot.originalSize=t.size,t.size=t._screenshot.size,t._screenshot.size=null,e.modified(),r){const e=!0!==r;t._screenshot.cameras=t.renderable.getRenderers().map((t=>{const n=t.getActiveCamera(),i=n.get("focalPoint","position","parallelScale");return{resetCameraArgs:e?{renderer:t}:void 0,resetCameraFn:e?r:t.resetCamera,restoreParamsFn:n.set,arg:JSON.parse(JSON.stringify(i))}})),t._screenshot.cameras.forEach((e=>{let{resetCameraFn:t,resetCameraArgs:n}=e;return t(n)}))}e.traverseAllPasses()}}))}))},e.getHardwareMaximumLineWidth=()=>{if(null!=a)return a;const t=e.get3DContext(),n=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE);return a=n[1],n[1]},e.getGLInformations=()=>{const n=e.get3DContext(),r=n.getExtension("OES_texture_float"),i=n.getExtension("OES_texture_half_float"),o=n.getExtension("WEBGL_debug_renderer_info"),a=n.getExtension("WEBGL_draw_buffers"),s=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),l=[["Max Vertex Attributes","MAX_VERTEX_ATTRIBS",n.getParameter(n.MAX_VERTEX_ATTRIBS)],["Max Varying Vectors","MAX_VARYING_VECTORS",n.getParameter(n.MAX_VARYING_VECTORS)],["Max Vertex Uniform Vectors","MAX_VERTEX_UNIFORM_VECTORS",n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS)],["Max Fragment Uniform Vectors","MAX_FRAGMENT_UNIFORM_VECTORS",n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS)],["Max Fragment Texture Image Units","MAX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)],["Max Vertex Texture Image Units","MAX_VERTEX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS)],["Max Combined Texture Image Units","MAX_COMBINED_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS)],["Max 2D Texture Size","MAX_TEXTURE_SIZE",n.getParameter(n.MAX_TEXTURE_SIZE)],["Max Cube Texture Size","MAX_CUBE_MAP_TEXTURE_SIZE",n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE)],["Max Texture Anisotropy","MAX_TEXTURE_MAX_ANISOTROPY_EXT",s&&n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT)],["Point Size Range","ALIASED_POINT_SIZE_RANGE",n.getParameter(n.ALIASED_POINT_SIZE_RANGE).join(" - ")],["Line Width Range","ALIASED_LINE_WIDTH_RANGE",n.getParameter(n.ALIASED_LINE_WIDTH_RANGE).join(" - ")],["Max Viewport Dimensions","MAX_VIEWPORT_DIMS",n.getParameter(n.MAX_VIEWPORT_DIMS).join(" - ")],["Max Renderbuffer Size","MAX_RENDERBUFFER_SIZE",n.getParameter(n.MAX_RENDERBUFFER_SIZE)],["Framebuffer Red Bits","RED_BITS",n.getParameter(n.RED_BITS)],["Framebuffer Green Bits","GREEN_BITS",n.getParameter(n.GREEN_BITS)],["Framebuffer Blue Bits","BLUE_BITS",n.getParameter(n.BLUE_BITS)],["Framebuffer Alpha Bits","ALPHA_BITS",n.getParameter(n.ALPHA_BITS)],["Framebuffer Depth Bits","DEPTH_BITS",n.getParameter(n.DEPTH_BITS)],["Framebuffer Stencil Bits","STENCIL_BITS",n.getParameter(n.STENCIL_BITS)],["Framebuffer Subpixel Bits","SUBPIXEL_BITS",n.getParameter(n.SUBPIXEL_BITS)],["MSAA Samples","SAMPLES",n.getParameter(n.SAMPLES)],["MSAA Sample Buffers","SAMPLE_BUFFERS",n.getParameter(n.SAMPLE_BUFFERS)],["Supported Formats for UByte Render Targets ","UNSIGNED_BYTE RENDER TARGET FORMATS",[r&>(n,n.RGBA,n.UNSIGNED_BYTE)?"RGBA":"",r&>(n,n.RGB,n.UNSIGNED_BYTE)?"RGB":"",r&>(n,n.LUMINANCE,n.UNSIGNED_BYTE)?"LUMINANCE":"",r&>(n,n.ALPHA,n.UNSIGNED_BYTE)?"ALPHA":"",r&>(n,n.LUMINANCE_ALPHA,n.UNSIGNED_BYTE)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Half Float Render Targets","HALF FLOAT RENDER TARGET FORMATS",[i&>(n,n.RGBA,i.HALF_FLOAT_OES)?"RGBA":"",i&>(n,n.RGB,i.HALF_FLOAT_OES)?"RGB":"",i&>(n,n.LUMINANCE,i.HALF_FLOAT_OES)?"LUMINANCE":"",i&>(n,n.ALPHA,i.HALF_FLOAT_OES)?"ALPHA":"",i&>(n,n.LUMINANCE_ALPHA,i.HALF_FLOAT_OES)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Full Float Render Targets","FLOAT RENDER TARGET FORMATS",[r&>(n,n.RGBA,n.FLOAT)?"RGBA":"",r&>(n,n.RGB,n.FLOAT)?"RGB":"",r&>(n,n.LUMINANCE,n.FLOAT)?"LUMINANCE":"",r&>(n,n.ALPHA,n.FLOAT)?"ALPHA":"",r&>(n,n.LUMINANCE_ALPHA,n.FLOAT)?"LUMINANCE_ALPHA":""].join(" ")],["Max Multiple Render Targets Buffers","MAX_DRAW_BUFFERS_WEBGL",a?n.getParameter(a.MAX_DRAW_BUFFERS_WEBGL):0],["High Float Precision in Vertex Shader","HIGH_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Vertex Shader","MEDIUM_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Vertex Shader","LOW_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Float Precision in Fragment Shader","HIGH_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Fragment Shader","MEDIUM_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Fragment Shader","LOW_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Int Precision in Vertex Shader","HIGH_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Vertex Shader","MEDIUM_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Vertex Shader","LOW_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMax,")"].join("")],["High Int Precision in Fragment Shader","HIGH_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Fragment Shader","MEDIUM_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Fragment Shader","LOW_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMax,")"].join("")],["Supported Extensions","EXTENSIONS",n.getSupportedExtensions().join("
\t\t\t\t\t ")],["WebGL Renderer","RENDERER",n.getParameter(n.RENDERER)],["WebGL Vendor","VENDOR",n.getParameter(n.VENDOR)],["WebGL Version","VERSION",n.getParameter(n.VERSION)],["Shading Language Version","SHADING_LANGUAGE_VERSION",n.getParameter(n.SHADING_LANGUAGE_VERSION)],["Unmasked Renderer","UNMASKED_RENDERER",o&&n.getParameter(o.UNMASKED_RENDERER_WEBGL)],["Unmasked Vendor","UNMASKED_VENDOR",o&&n.getParameter(o.UNMASKED_VENDOR_WEBGL)],["WebGL Version","WEBGL_VERSION",t.webgl2?2:1]],u={};for(;l.length;){const[e,t,n]=l.pop();t&&(u[t]={label:e,value:n})}return u},e.traverseAllPasses=()=>{if(t.renderPasses)for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:t.imageFormat;const r=document.createElement("canvas"),i=r.getContext("2d");r.width=t.canvas.width,r.height=t.canvas.height,i.drawImage(t.canvas,0,0);const o=t.canvas.getBoundingClientRect(),a=t.renderable;a.getRenderers().forEach((e=>{e.getViewProps().forEach((e=>{if(e.getContainer){const t=e.getContainer().getElementsByTagName("canvas");for(let e=0;e{t.cullFaceEnabled&&(t.context.disable(t.context.CULL_FACE),t.cullFaceEnabled=!1)},e.enableCullFace=()=>{t.cullFaceEnabled||(t.context.enable(t.context.CULL_FACE),t.cullFaceEnabled=!0)},e.setViewStream=n=>{if(t.viewStream===n)return!1;if(t.subscription&&(t.subscription.unsubscribe(),t.subscription=null),t.viewStream=n,t.viewStream){t.renderable.getRenderers()[0].getBackgroundByReference()[3]=0,e.setUseBackgroundImage(!0),t.subscription=t.viewStream.onImageReady((t=>e.setBackgroundImage(t.image))),t.viewStream.setSize(t.size[0],t.size[1]),t.viewStream.invalidateCache(),t.viewStream.render(),e.modified()}return!0},e.createSelector=()=>{const t=ze.ZP.newInstance();return t.setOpenGLRenderWindow(e),t},e.delete=r.m.chain((function(){t.canvas.removeEventListener("webglcontextlost",xt),t.canvas.removeEventListener("webglcontextrestored",e.restoreContext)}),e.delete,e.setViewStream,bt),e.setActiveFramebuffer=e=>{t.activeFramebuffer=e};const s=e.setSize;e.setSize=(t,n)=>{const r=s(t,n);return r&&e.invokeWindowResizeEvent({width:t,height:n}),r}}const St={cullFaceEnabled:!1,shaderCache:null,initialized:!1,context:null,canvas:null,cursorVisibility:!0,cursor:"pointer",textureUnitManager:null,textureResourceIds:null,containerSize:null,renderPasses:[],notifyStartCaptureImage:!1,webgl2:!1,defaultToWebgl2:!0,activeFramebuffer:null,xrSession:null,xrReferenceSpace:null,xrSupported:!0,imageFormat:"image/png",useOffScreen:!1,useBackgroundImage:!1};function Ct(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,St,n),at.extend(e,t,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",_t(),t.selector||(t.selector=ze.ZP.newInstance(),t.selector.setOpenGLRenderWindow(e)),t.bgImage=new Image,t.bgImage.style.position="absolute",t.bgImage.style.left="0",t.bgImage.style.top="0",t.bgImage.style.width="100%",t.bgImage.style.height="100%",t.bgImage.style.zIndex="-1",t._textureResourceIds=new Map,t.myFactory=tt.ZP.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",Tt),t.shaderCache=Ke.newInstance(),t.shaderCache.setOpenGLRenderWindow(e),t.renderPasses[0]=Ge.newInstance(),r.m.event(e,t,"imageReady"),r.m.get(e,t,["shaderCache","textureUnitManager","webgl2","vrDisplay","useBackgroundImage","xrSupported","activeFramebuffer"]),r.m.setGet(e,t,["initialized","context","canvas","renderPasses","notifyStartCaptureImage","defaultToWebgl2","cursor","useOffScreen"]),r.m.setGetArray(e,t,["size"],2),r.m.event(e,t,"windowResizeEvent"),wt(e,t)}const Tt=r.m.newInstance(Ct,"vtkOpenGLRenderWindow");me("WebGL",Tt);var Mt=n(48),Dt=n(18);const At=["setBindGroup","setIndexBuffer","setVertexBuffer","draw","drawIndexed"];function Pt(e,t){t.classHierarchy.push("vtkWebGPURenderEncoder"),e.begin=e=>{t.drawCallbacks=[],t.handle=e.beginRenderPass(t.description),t.label&&t.handle.pushDebugGroup(t.label)},e.end=()=>{for(let n=0;n{if(t.boundPipeline===e)return;t.handle.setPipeline(e.getHandle());const n=e.getPipelineDescription();if(t.colorTextureViews.length!==n.fragment.targets.length)console.log(`mismatched attachment counts on pipeline ${n.fragment.targets.length} while encoder has ${t.colorTextureViews.length}`),console.trace();else for(let e=0;e{t.replaceShaderCodeFunction(e)},e.setColorTextureView=(e,n)=>{t.colorTextureViews[e]!==n&&(t.colorTextureViews[e]=n)},e.activateBindGroup=e=>{const n=t.boundPipeline.getDevice(),r=t.boundPipeline.getBindGroupLayoutCount(e.getLabel());t.handle.setBindGroup(r,e.getBindGroup(n));const i=n.getBindGroupLayoutDescription(e.getBindGroupLayout(n)),o=n.getBindGroupLayoutDescription(t.boundPipeline.getBindGroupLayout(r));i!==o&&(console.log(`renderEncoder ${t.pipelineHash} mismatched bind group layouts bind group has\n${i}\n versus pipeline\n${o}\n`),console.trace())},e.attachTextureViews=()=>{for(let e=0;e{for(let r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kt,n),(0,r.o)(e,t),t.description={colorAttachments:[{view:void 0,loadOp:"load",storeOp:"store"}],depthStencilAttachment:{view:void 0,depthLoadOp:"clear",depthClearValue:0,depthStoreOp:"store"}},t.replaceShaderCodeFunction=e=>{const t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor");let n=t.getCode();n=Dt.ZP.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = computedColor;"]).result,t.setCode(n)},t.pipelineSettings={primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!0,depthCompare:"greater-equal",format:"depth32float"},fragment:{targets:[{format:"rgba16float",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}},t.colorTextureViews=[],(0,r.g)(e,t,["boundPipeline","colorTextureViews"]),(0,r.e)(e,t,["depthTextureView","description","handle","label","pipelineHash","pipelineSettings","replaceShaderCodeFunction"]),Pt(e,t)}var Ot={newInstance:(0,r.n)(Lt,"vtkWebGPURenderEncoder"),extend:Lt},Et=n(49);function It(e,t){t.classHierarchy.push("vtkWebGPUOpaquePass"),e.traverse=(n,r)=>{if(t.deleted)return;t._currentParent=r;const i=r.getDevice();if(t.renderEncoder)t.colorTexture.resize(r.getCanvas().width,r.getCanvas().height),t.depthTexture.resize(r.getCanvas().width,r.getCanvas().height);else{e.createRenderEncoder(),t.colorTexture=Et.ZP.newInstance({label:"opaquePassColor"}),t.colorTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:"rgba16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC});const n=t.colorTexture.createView("opaquePassColorTexture");t.renderEncoder.setColorTextureView(0,n),t.depthFormat="depth32float",t.depthTexture=Et.ZP.newInstance({label:"opaquePassDepth"}),t.depthTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:t.depthFormat,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC});const o=t.depthTexture.createView("opaquePassDepthTexture");t.renderEncoder.setDepthTextureView(o)}t.renderEncoder.attachTextureViews(),e.setCurrentOperation("opaquePass"),n.setRenderEncoder(t.renderEncoder),n.traverse(e)},e.getColorTextureView=()=>t.renderEncoder.getColorTextureViews()[0],e.getDepthTextureView=()=>t.renderEncoder.getDepthTextureView(),e.createRenderEncoder=()=>{t.renderEncoder=Ot.newInstance({label:"OpaquePass"}),t.renderEncoder.setPipelineHash("op")}}const Nt={renderEncoder:null,colorTexture:null,depthTexture:null};function Rt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nt,n),Te.extend(e,t,n),r.m.get(e,t,["colorTexture","depthTexture"]),It(e,t)}var Bt={newInstance:r.m.newInstance(Rt,"vtkWebGPUOpaquePass"),extend:Rt};function Ft(e,t){t.classHierarchy.push("vtkWebGPUOrderIndependentTranslucentPass"),e.traverse=(n,r)=>{if(t.deleted)return;t._currentParent=r;const i=r.getDevice();if(t.translucentRenderEncoder)t.translucentColorTexture.resizeToMatch(t.colorTextureView.getTexture()),t.translucentAccumulateTexture.resizeToMatch(t.colorTextureView.getTexture());else{e.createRenderEncoder(),e.createFinalEncoder(),t.translucentColorTexture=Et.ZP.newInstance({label:"translucentPassColor"}),t.translucentColorTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:"rgba16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING});const n=t.translucentColorTexture.createView("oitpColorTexture");t.translucentRenderEncoder.setColorTextureView(0,n),t.translucentAccumulateTexture=Et.ZP.newInstance({label:"translucentPassAccumulate"}),t.translucentAccumulateTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:"r16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING});const o=t.translucentAccumulateTexture.createView("oitpAccumTexture");t.translucentRenderEncoder.setColorTextureView(1,o),t.fullScreenQuad=Mt.ZP.newInstance(),t.fullScreenQuad.setDevice(r.getDevice()),t.fullScreenQuad.setPipelineHash("oitpfsq"),t.fullScreenQuad.setTextureViews(t.translucentRenderEncoder.getColorTextureViews()),t.fullScreenQuad.setFragmentShaderTemplate("\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n@fragment\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n var tcoord: vec2 = vec2(i32(input.fragPos.x), i32(input.fragPos.y));\n var reveal: f32 = textureLoad(oitpAccumTexture, tcoord, 0).r;\n if (reveal == 1.0) { discard; }\n var tcolor: vec4 = textureLoad(oitpColorTexture, tcoord, 0);\n var total: f32 = max(tcolor.a, 0.01);\n var computedColor: vec4 = vec4(tcolor.r/total, tcolor.g/total, tcolor.b/total, 1.0 - reveal);\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n")}t.translucentRenderEncoder.setDepthTextureView(t.depthTextureView),t.translucentRenderEncoder.attachTextureViews(),e.setCurrentOperation("translucentPass"),n.setRenderEncoder(t.translucentRenderEncoder),n.traverse(e),e.finalPass(r,n)},e.finalPass=(e,n)=>{t.translucentFinalEncoder.setColorTextureView(0,t.colorTextureView),t.translucentFinalEncoder.attachTextureViews(),t.translucentFinalEncoder.begin(e.getCommandEncoder()),n.scissorAndViewport(t.translucentFinalEncoder),t.fullScreenQuad.prepareAndDraw(t.translucentFinalEncoder),t.translucentFinalEncoder.end()},e.getTextures=()=>[t.translucentColorTexture,t.translucentAccumulateTexture],e.createRenderEncoder=()=>{t.translucentRenderEncoder=Ot.newInstance({label:"translucentRender"});const e=t.translucentRenderEncoder.getDescription();e.colorAttachments=[{view:void 0,clearValue:[0,0,0,0],loadOp:"clear",storeOp:"store"},{view:void 0,clearValue:[1,0,0,0],loadOp:"clear",storeOp:"store"}],e.depthStencilAttachment={view:void 0,depthLoadOp:"load",depthStoreOp:"store"},t.translucentRenderEncoder.setReplaceShaderCodeFunction((e=>{const t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor"),t.addOutput("f32","outAccum"),t.addBuiltinInput("vec4","@builtin(position) fragPos");let n=t.getCode();n=Dt.ZP.substitute(n,"//VTK::RenderEncoder::Impl",["var w: f32 = computedColor.a * pow(0.1 + input.fragPos.z, 2.0);","output.outColor = vec4(computedColor.rgb*w, w);","output.outAccum = computedColor.a;"]).result,t.setCode(n)})),t.translucentRenderEncoder.setPipelineHash("oitpr"),t.translucentRenderEncoder.setPipelineSettings({primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!1,depthCompare:"greater",format:"depth32float"},fragment:{targets:[{format:"rgba16float",blend:{color:{srcFactor:"one",dstFactor:"one"},alpha:{srcfactor:"one",dstFactor:"one"}}},{format:"r16float",blend:{color:{srcFactor:"zero",dstFactor:"one-minus-src"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.createFinalEncoder=()=>{t.translucentFinalEncoder=Ot.newInstance({label:"translucentFinal"}),t.translucentFinalEncoder.setDescription({colorAttachments:[{view:null,loadOp:"load",storeOp:"store"}]}),t.translucentFinalEncoder.setReplaceShaderCodeFunction((e=>{const t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor"),t.addBuiltinInput("vec4","@builtin(position) fragPos");let n=t.getCode();n=Dt.ZP.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = vec4(computedColor.rgb, computedColor.a);"]).result,t.setCode(n)})),t.translucentFinalEncoder.setPipelineHash("oitpf"),t.translucentFinalEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"rgba16float",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})}}const Vt={colorTextureView:null,depthTextureView:null};function Ut(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vt,n),Te.extend(e,t,n),r.m.setGet(e,t,["colorTextureView","depthTextureView"]),Ft(e,t)}var Gt={newInstance:r.m.newInstance(Ut,"vtkWebGPUOrderIndependentTranslucentPass"),extend:Ut},zt=n(5),jt=n(28),Yt=n(102),Ht=n(55),Wt=n(572),$t=n(114),Zt=n(74),Kt=n(34),qt=n(113);const Xt="\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Volume::TraverseDec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\nfn getTextureValue(vTex: texture_3d, tpos: vec4) -> f32\n{\n // todo multicomponent support\n return textureSampleLevel(vTex, clampSampler, tpos.xyz, 0.0).r;\n}\n\nfn getGradient(vTex: texture_3d, tpos: vec4, vNum: i32, scalar: f32) -> vec4\n{\n var result: vec4;\n\n var tstep: vec4 = volumeSSBO.values[vNum].tstep;\n result.x = getTextureValue(vTex, tpos + vec4(tstep.x, 0.0, 0.0, 1.0)) - scalar;\n result.y = getTextureValue(vTex, tpos + vec4(0.0, tstep.y, 0.0, 1.0)) - scalar;\n result.z = getTextureValue(vTex, tpos + vec4(0.0, 0.0, tstep.z, 1.0)) - scalar;\n result.w = 0.0;\n\n // divide by spacing as that is our delta\n result = result / volumeSSBO.values[vNum].spacing;\n // now we have a gradient in unit tcoords\n\n var grad: f32 = length(result.xyz);\n if (grad > 0.0)\n {\n // rotate to View Coords, needed for lighting and shading\n var nMat: mat4x4 = rendererUBO.SCVCMatrix * volumeSSBO.values[vNum].planeNormals;\n result = nMat * result;\n result = result / length(result);\n }\n\n // store gradient magnitude in .w\n result.w = grad;\n\n return result;\n}\n\nfn processVolume(vTex: texture_3d, vNum: i32, cNum: i32, posSC: vec4, tfunRows: f32) -> vec4\n{\n var outColor: vec4 = vec4(0.0, 0.0, 0.0, 0.0);\n\n // convert to tcoords and reject if outside the volume\n var tpos: vec4 = volumeSSBO.values[vNum].SCTCMatrix*posSC;\n if (tpos.x < 0.0 || tpos.y < 0.0 || tpos.z < 0.0 ||\n tpos.x > 1.0 || tpos.y > 1.0 || tpos.z > 1.0) { return outColor; }\n\n var scalar: f32 = getTextureValue(vTex, tpos);\n\n var coord: vec2 =\n vec2(scalar * componentSSBO.values[cNum].cScale + componentSSBO.values[cNum].cShift,\n (0.5 + 2.0 * f32(vNum)) / tfunRows);\n var color: vec4 = textureSampleLevel(tfunTexture, clampSampler, coord, 0.0);\n\n var gofactor: f32 = 1.0;\n var normal: vec4 = vec4(0.0,0.0,0.0,0.0);\n if (componentSSBO.values[cNum].gomin < 1.0 || volumeSSBO.values[vNum].shade[0] > 0.0)\n {\n normal = getGradient(vTex, tpos, vNum, scalar);\n if (componentSSBO.values[cNum].gomin < 1.0)\n {\n gofactor = clamp(normal.a*componentSSBO.values[cNum].goScale + componentSSBO.values[cNum].goShift,\n componentSSBO.values[cNum].gomin, componentSSBO.values[cNum].gomax);\n }\n }\n\n coord.x = (scalar * componentSSBO.values[cNum].oScale + componentSSBO.values[cNum].oShift);\n var opacity: f32 = textureSampleLevel(ofunTexture, clampSampler, coord, 0.0).r;\n\n if (volumeSSBO.values[vNum].shade[0] > 0.0)\n {\n color = color*abs(normal.z);\n }\n\n outColor = vec4(color.rgb, gofactor * opacity);\n\n return outColor;\n}\n\n// adjust the start and end point of a raycast such that it intersects the unit cube.\n// This function is used to take a raycast starting point and step vector\n// and numSteps and return the startijng and ending steps for intersecting the\n// unit cube. Recall for a 3D texture, the unit cube is the range of texture coordsinates\n// that have valid values. So this funtion can be used to take a ray in texture coordinates\n// and bound it to intersecting the texture.\n//\nfn adjustBounds(tpos: vec4, tstep: vec4, numSteps: f32) -> vec2\n{\n var result: vec2 = vec2(0.0, numSteps);\n var tpos2: vec4 = tpos + tstep*numSteps;\n\n // move tpos to the start of the volume\n var adjust: f32 =\n min(\n max(tpos.x/tstep.x, (tpos.x - 1.0)/tstep.x),\n min(\n max((tpos.y - 1.0)/tstep.y, tpos.y/tstep.y),\n max((tpos.z - 1.0)/tstep.z, tpos.z/tstep.z)));\n if (adjust < 0.0)\n {\n result.x = result.x - adjust;\n }\n\n // adjust length to the end\n adjust =\n max(\n min(tpos2.x/tstep.x, (tpos2.x - 1.0)/tstep.x),\n max(\n min((tpos2.y - 1.0)/tstep.y, tpos2.y/tstep.y),\n min((tpos2.z - 1.0)/tstep.z, tpos2.z/tstep.z)));\n if (adjust > 0.0)\n {\n result.y = result.y - adjust;\n }\n\n return result;\n}\n\nfn getSimpleColor(scalar: f32, vNum: i32, cNum: i32) -> vec4\n{\n // how many rows (tfuns) do we have in our tfunTexture\n var tfunRows: f32 = f32(textureDimensions(tfunTexture).y);\n\n var coord: vec2 =\n vec2(scalar * componentSSBO.values[cNum].cScale + componentSSBO.values[cNum].cShift,\n (0.5 + 2.0 * f32(vNum)) / tfunRows);\n var color: vec4 = textureSampleLevel(tfunTexture, clampSampler, coord, 0.0);\n coord.x = (scalar * componentSSBO.values[cNum].oScale + componentSSBO.values[cNum].oShift);\n var opacity: f32 = textureSampleLevel(ofunTexture, clampSampler, coord, 0.0).r;\n return vec4(color.rgb, opacity);\n}\n\nfn traverseMax(vTex: texture_3d, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4, rayStepSC: vec4)\n{\n // convert to tcoords and reject if outside the volume\n var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;\n var tpos: vec4 = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;\n var tpos2: vec4 = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);\n var tstep: vec4 = tpos2 - tpos;\n\n var rayBounds: vec2 = adjustBounds(tpos, tstep, numSteps);\n\n // did we hit anything\n if (rayBounds.x >= rayBounds.y)\n {\n traverseVals[vNum] = vec4(0.0,0.0,0.0,0.0);\n return;\n }\n\n tpos = tpos + tstep*rayBounds.x;\n var curDist: f32 = rayBounds.x;\n var maxVal: f32 = -1.0e37;\n loop\n {\n var scalar: f32 = getTextureValue(vTex, tpos);\n if (scalar > maxVal)\n {\n maxVal = scalar;\n }\n\n // increment position\n curDist = curDist + 1.0;\n tpos = tpos + tstep;\n\n // check if we have reached a terminating condition\n if (curDist > rayBounds.y) { break; }\n }\n\n // process to get the color and opacity\n traverseVals[vNum] = getSimpleColor(maxVal, vNum, cNum);\n}\n\nfn traverseMin(vTex: texture_3d, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4, rayStepSC: vec4)\n{\n // convert to tcoords and reject if outside the volume\n var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;\n var tpos: vec4 = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;\n var tpos2: vec4 = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);\n var tstep: vec4 = tpos2 - tpos;\n\n var rayBounds: vec2 = adjustBounds(tpos, tstep, numSteps);\n\n // did we hit anything\n if (rayBounds.x >= rayBounds.y)\n {\n traverseVals[vNum] = vec4(0.0,0.0,0.0,0.0);\n return;\n }\n\n tpos = tpos + tstep*rayBounds.x;\n var curDist: f32 = rayBounds.x;\n var minVal: f32 = 1.0e37;\n loop\n {\n var scalar: f32 = getTextureValue(vTex, tpos);\n if (scalar < minVal)\n {\n minVal = scalar;\n }\n\n // increment position\n curDist = curDist + 1.0;\n tpos = tpos + tstep;\n\n // check if we have reached a terminating condition\n if (curDist > rayBounds.y) { break; }\n }\n\n // process to get the color and opacity\n traverseVals[vNum] = getSimpleColor(minVal, vNum, cNum);\n}\n\nfn traverseAverage(vTex: texture_3d, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4, rayStepSC: vec4)\n{\n // convert to tcoords and reject if outside the volume\n var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;\n var tpos: vec4 = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;\n var tpos2: vec4 = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);\n var tstep: vec4 = tpos2 - tpos;\n\n var rayBounds: vec2 = adjustBounds(tpos, tstep, numSteps);\n\n // did we hit anything\n if (rayBounds.x >= rayBounds.y)\n {\n traverseVals[vNum] = vec4(0.0,0.0,0.0,0.0);\n return;\n }\n\n let ipRange: vec4 = volumeSSBO.values[vNum].ipScalarRange;\n tpos = tpos + tstep*rayBounds.x;\n var curDist: f32 = rayBounds.x;\n var avgVal: f32 = 0.0;\n var sampleCount: f32 = 0.0;\n loop\n {\n var sample: f32 = getTextureValue(vTex, tpos);\n // right now leave filtering off until WebGL changes get merged\n // if (ipRange.z == 0.0 || sample >= ipRange.x && sample <= ipRange.y)\n // {\n avgVal = avgVal + sample;\n sampleCount = sampleCount + 1.0;\n // }\n\n // increment position\n curDist = curDist + 1.0;\n tpos = tpos + tstep;\n\n // check if we have reached a terminating condition\n if (curDist > rayBounds.y) { break; }\n }\n\n if (sampleCount <= 0.0)\n {\n traverseVals[vNum] = vec4(0.0,0.0,0.0,0.0);\n }\n\n // process to get the color and opacity\n traverseVals[vNum] = getSimpleColor(avgVal/sampleCount, vNum, cNum);\n}\n\nfn traverseAdditive(vTex: texture_3d, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4, rayStepSC: vec4)\n{\n // convert to tcoords and reject if outside the volume\n var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;\n var tpos: vec4 = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;\n var tpos2: vec4 = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);\n var tstep: vec4 = tpos2 - tpos;\n\n var rayBounds: vec2 = adjustBounds(tpos, tstep, numSteps);\n\n // did we hit anything\n if (rayBounds.x >= rayBounds.y)\n {\n traverseVals[vNum] = vec4(0.0,0.0,0.0,0.0);\n return;\n }\n\n let ipRange: vec4 = volumeSSBO.values[vNum].ipScalarRange;\n tpos = tpos + tstep*rayBounds.x;\n var curDist: f32 = rayBounds.x;\n var sumVal: f32 = 0.0;\n loop\n {\n var sample: f32 = getTextureValue(vTex, tpos);\n // right now leave filtering off until WebGL changes get merged\n // if (ipRange.z == 0.0 || sample >= ipRange.x && sample <= ipRange.y)\n // {\n sumVal = sumVal + sample;\n // }\n\n // increment position\n curDist = curDist + 1.0;\n tpos = tpos + tstep;\n\n // check if we have reached a terminating condition\n if (curDist > rayBounds.y) { break; }\n }\n\n // process to get the color and opacity\n traverseVals[vNum] = getSimpleColor(sumVal, vNum, cNum);\n}\n\nfn composite(rayLengthSC: f32, minPosSC: vec4, rayStepSC: vec4) -> vec4\n{\n // initial ray position is at the beginning\n var rayPosSC: vec4 = minPosSC;\n\n // how many rows (tfuns) do we have in our tfunTexture\n var tfunRows: f32 = f32(textureDimensions(tfunTexture).y);\n\n var curDist: f32 = 0.0;\n var computedColor: vec4 = vec4(0.0, 0.0, 0.0, 0.0);\n var sampleColor: vec4;\n//VTK::Volume::TraverseCalls\n\n loop\n {\n // for each volume, sample and accumulate color\n//VTK::Volume::CompositeCalls\n\n // increment position\n curDist = curDist + mapperUBO.SampleDistance;\n rayPosSC = rayPosSC + rayStepSC;\n\n // check if we have reached a terminating condition\n if (curDist > rayLengthSC) { break; }\n if (computedColor.a > 0.98) { break; }\n }\n return computedColor;\n}\n\n@fragment\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n var rayMax: f32 = textureSampleLevel(maxTexture, clampSampler, input.tcoordVS, 0.0).r;\n var rayMin: f32 = textureSampleLevel(minTexture, clampSampler, input.tcoordVS, 0.0).r;\n\n // discard empty rays\n if (rayMax <= rayMin) { discard; }\n else\n {\n // compute start and end ray positions in view coordinates\n var minPosSC: vec4 = rendererUBO.PCSCMatrix*vec4(2.0 * input.tcoordVS.x - 1.0, 1.0 - 2.0 * input.tcoordVS.y, rayMax, 1.0);\n minPosSC = minPosSC * (1.0 / minPosSC.w);\n var maxPosSC: vec4 = rendererUBO.PCSCMatrix*vec4(2.0 * input.tcoordVS.x - 1.0, 1.0 - 2.0 * input.tcoordVS.y, rayMin, 1.0);\n maxPosSC = maxPosSC * (1.0 / maxPosSC.w);\n\n var rayLengthSC: f32 = distance(minPosSC.xyz, maxPosSC.xyz);\n var rayStepSC: vec4 = (maxPosSC - minPosSC)*(mapperUBO.SampleDistance/rayLengthSC);\n rayStepSC.w = 0.0;\n\n var computedColor: vec4;\n\n//VTK::Volume::Loop\n\n//VTK::RenderEncoder::Impl\n }\n\n return output;\n}\n",Jt=new Float64Array(16),Qt=new Float64Array(16);function en(e,t){t.classHierarchy.push("vtkWebGPUVolumePassFSQ"),e.replaceShaderPosition=(e,t,n)=>{const r=t.getShaderDescription("vertex");r.addBuiltinOutput("vec4","@builtin(position) Position");let i=r.getCode();i=Dt.ZP.substitute(i,"//VTK::Position::Impl",["output.tcoordVS = vec2(vertexBC.x * 0.5 + 0.5, 1.0 - vertexBC.y * 0.5 - 0.5);","output.Position = vec4(vertexBC, 1.0);"]).result,r.setCode(i);t.getShaderDescription("fragment").addBuiltinInput("vec4","@builtin(position) fragPos")},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition),e.replaceShaderVolume=(e,n,r)=>{const i=n.getShaderDescription("fragment");let o=i.getCode();const a=[],s=[];for(let e=0;e(\n sampleColor.a * sampleColor.rgb * (1.0 - computedColor.a) + computedColor.rgb,\n (1.0 - computedColor.a)*sampleColor.a + computedColor.a);")):(s.push(` sampleColor = traverseVals[${e}];`),s.push(" computedColor = vec4(\n sampleColor.a * sampleColor.rgb * (1.0 - computedColor.a) + computedColor.rgb,\n (1.0 - computedColor.a)*sampleColor.a + computedColor.a);"))}o=Dt.ZP.substitute(o,"//VTK::Volume::CompositeCalls",a).result,o=Dt.ZP.substitute(o,"//VTK::Volume::TraverseCalls",s).result,o=Dt.ZP.substitute(o,"//VTK::Volume::TraverseDec",[`var traverseVals: array,${t.volumes.length}>;`]).result;let l=!1;for(let e=0;e{let r=e.getMTime();for(let e=0;e{let r=Math.max(e.getMTime(),t.WebGPURenderer.getStabilizedTime());for(let e=0;e"),t.SSBO.addEntry("planeNormals","mat4x4"),t.SSBO.addEntry("shade","vec4"),t.SSBO.addEntry("tstep","vec4"),t.SSBO.addEntry("spacing","vec4"),t.SSBO.addEntry("ipScalarRange","vec4"),t.SSBO.setAllInstancesFromArray("SCTCMatrix",o),t.SSBO.setAllInstancesFromArray("planeNormals",a),t.SSBO.setAllInstancesFromArray("shade",l),t.SSBO.setAllInstancesFromArray("tstep",s),t.SSBO.setAllInstancesFromArray("spacing",u),t.SSBO.setAllInstancesFromArray("ipScalarRange",c),t.SSBO.send(n),t.componentSSBO.clearData(),t.componentSSBO.setNumberOfInstances(t.numRows);const d=new Float64Array(t.numRows),p=new Float64Array(t.numRows),f=new Float64Array(t.numRows),h=new Float64Array(t.numRows),m=new Float64Array(t.numRows),g=new Float64Array(t.numRows),v=new Float64Array(t.numRows),y=new Float64Array(t.numRows);let _=0;for(let e=0;e{n();let r=t.volumes[0].getRenderable().getMapper().getSampleDistance();for(let e=0;e{t.pipelineHash="volfsq";for(let e=0;e{if(!t.volumes||t.volumes.length!==n.length)return t.volumes=[...n],void e.modified();for(let r=0;r{const e=r();return e.push(t.componentSSBO),e.push(t.clampSampler),e}}const tn={volumes:null,rowLength:1024,lastVolumeLength:0};function nn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,tn,n),Mt.ZP.extend(e,t,n),t.fragmentShaderTemplate=Xt,t.UBO=Ht.ZP.newInstance({label:"mapperUBO"}),t.UBO.addEntry("SampleDistance","f32"),t.SSBO=$t.ZP.newInstance({label:"volumeSSBO"}),t.componentSSBO=$t.ZP.newInstance({label:"componentSSBO"}),t.lutBuildTime={},r.m.obj(t.lutBuildTime,{mtime:0}),en(e,t)}var rn={newInstance:r.m.newInstance(nn,"vtkWebGPUVolumePassFSQ"),extend:nn},on=n(2);const{Representation:an}=Ae.ZP,{BufferUsage:sn,PrimitiveTypes:ln}=jt.ZP,un=[[0,4,6],[0,6,2],[1,3,7],[1,7,5],[0,5,4],[0,1,5],[2,6,7],[2,7,3],[0,3,1],[0,2,3],[4,5,7],[4,7,6]],cn="\n//VTK::Renderer::Dec\n\n//VTK::Select::Dec\n\n//VTK::VolumePass::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::IOStructs::Dec\n\n@fragment\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : fragmentOutput;\n\n //VTK::Select::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::VolumePass::Impl\n\n // use the maximum (closest) of the current value and the zbuffer\n // the blend func will then take the min to find the farthest stop value\n var stopval: f32 = max(input.fragPos.z, textureLoad(opaquePassDepthTexture, vec2(i32(input.fragPos.x), i32(input.fragPos.y)), 0));\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n";function dn(e,t){t.classHierarchy.push("vtkWebGPUVolumePass"),e.initialize=n=>{t._clearEncoder||e.createClearEncoder(n),t._mergeEncoder||e.createMergeEncoder(n),t._copyEncoder||e.createCopyEncoder(n),t._depthRangeEncoder||e.createDepthRangeEncoder(n),t.fullScreenQuad||(t.fullScreenQuad=rn.newInstance(),t.fullScreenQuad.setDevice(n.getDevice()),t.fullScreenQuad.setTextureViews([...t._depthRangeEncoder.getColorTextureViews()])),t._volumeCopyQuad||(t._volumeCopyQuad=Mt.ZP.newInstance(),t._volumeCopyQuad.setPipelineHash("volpassfsq"),t._volumeCopyQuad.setDevice(n.getDevice()),t._volumeCopyQuad.setFragmentShaderTemplate("\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n@fragment\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n var computedColor: vec4 = textureSample(volumePassColorTexture,\n volumePassColorTextureSampler, mapperUBO.tscale*input.tcoordVS);\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n"),t._copyUBO=Ht.ZP.newInstance({label:"mapperUBO"}),t._copyUBO.addEntry("tscale","vec2"),t._volumeCopyQuad.setUBO(t._copyUBO),t._volumeCopyQuad.setTextureViews([t._colorTextureView]))},e.traverse=(n,r)=>{if(t.deleted)return;t._currentParent=r,e.initialize(r),e.computeTiming(r),e.renderDepthBounds(n,r),t._firstGroup=!0;const i=r.getDevice(),o=i.getHandle().limits.maxSampledTexturesPerShaderStage-4;if(t.volumes.length>o){const i=n.getRenderable().getActiveCamera().getPosition(),a=[];for(let e=0;ea[t]-a[e]));let l=[],u=s.length%o;for(let i=0;i=u&&(e.rayCastPass(r,n,l),l=[],u=o,t._firstGroup=!1)}else e.rayCastPass(r,n,t.volumes);if(t._volumeCopyQuad.setWebGPURenderer(n),t._useSmallViewport){const e=t._colorTextureView.getTexture().getWidth(),n=t._colorTextureView.getTexture().getHeight();t._copyUBO.setArray("tscale",[t._smallViewportWidth/e,t._smallViewportHeight/n])}else t._copyUBO.setArray("tscale",[1,1]);t._copyUBO.sendIfNeeded(i),t._copyEncoder.setColorTextureView(0,t.colorTextureView),t._copyEncoder.attachTextureViews(),t._copyEncoder.begin(r.getCommandEncoder()),n.scissorAndViewport(t._copyEncoder),t._volumeCopyQuad.prepareAndDraw(t._copyEncoder),t._copyEncoder.end()},e.delete=r.m.chain((()=>{t._animationRateSubscription&&(t._animationRateSubscription.unsubscribe(),t._animationRateSubscription=null)}),e.delete),e.computeTiming=e=>{const n=e.getRenderable().getInteractor();if(null==t._lastScale){const e=t.volumes[0].getRenderable().getMapper();t._lastScale=e.getInitialInteractionScale()||1}t._useSmallViewport=!1,n.isAnimating()&&t._lastScale>1.5&&(t._useSmallViewport=!0),t._colorTexture.resize(e.getCanvas().width,e.getCanvas().height),t._animationRateSubscription||(t._animationRateSubscription=n.onAnimationFrameRateUpdate((()=>{const e=t.volumes[0].getRenderable().getMapper();if(e.getAutoAdjustSampleDistances()){const e=n.getRecentAnimationFrameRate(),r=t._lastScale*n.getDesiredUpdateRate()/e;t._lastScale=r,t._lastScale>400&&(t._lastScale=400)}else t._lastScale=e.getImageSampleDistance()*e.getImageSampleDistance();t._lastScale<1.5&&(t._lastScale=1.5)})))},e.rayCastPass=(e,n,r)=>{const i=t._firstGroup?t._clearEncoder:t._mergeEncoder;i.attachTextureViews(),i.begin(e.getCommandEncoder());let o=t._colorTextureView.getTexture().getWidth(),a=t._colorTextureView.getTexture().getHeight();if(t._useSmallViewport){const n=e.getCanvas(),r=1/Math.sqrt(t._lastScale);t._smallViewportWidth=Math.ceil(r*n.width),t._smallViewportHeight=Math.ceil(r*n.height),o=t._smallViewportWidth,a=t._smallViewportHeight}i.getHandle().setViewport(0,0,o,a,0,1),i.getHandle().setScissorRect(0,0,o,a),t.fullScreenQuad.setWebGPURenderer(n),t.fullScreenQuad.setVolumes(r),t.fullScreenQuad.prepareAndDraw(i),i.end()},e.renderDepthBounds=(n,r)=>{e.updateDepthPolyData(n);const i=t._boundsPoly,o=i.getPoints(),a=i.getPolys();let s={hash:`vp${a.getMTime()}`,usage:sn.Index,cells:a,numberOfPoints:o.getNumberOfPoints(),primitiveType:ln.Triangles,representation:an.SURFACE};const l=r.getDevice().getBufferManager().getBuffer(s);t._mapper.getVertexInput().setIndexBuffer(l),s={usage:sn.PointArray,format:"float32x4",hash:`vp${o.getMTime()}${a.getMTime()}`,dataArray:o,indexBuffer:l,packExtra:!0};const u=r.getDevice().getBufferManager().getBuffer(s);t._mapper.getVertexInput().addBuffer(u,["vertexBC"]),t._mapper.setNumberOfVertices(u.getSizeInBytes()/u.getStrideInBytes()),e.drawDepthRange(n,r)},e.updateDepthPolyData=e=>{let n=!1;for(let e=0;e{t._depthRangeTexture.resizeToMatch(t.colorTextureView.getTexture()),t._depthRangeTexture2.resizeToMatch(t.colorTextureView.getTexture()),t._depthRangeEncoder.attachTextureViews(),e.setCurrentOperation("volumeDepthRangePass"),n.setRenderEncoder(t._depthRangeEncoder),n.volumeDepthRangePass(!0),t._mapper.setWebGPURenderer(n),t._mapper.prepareToDraw(t._depthRangeEncoder),t._mapper.registerDrawCallback(t._depthRangeEncoder),n.volumeDepthRangePass(!1)},e.createDepthRangeEncoder=e=>{const n=e.getDevice();t._depthRangeEncoder=Ot.newInstance({label:"VolumePass DepthRange"}),t._depthRangeEncoder.setPipelineHash("volr"),t._depthRangeEncoder.setReplaceShaderCodeFunction((e=>{const t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor1"),t.addOutput("vec4","outColor2");let n=t.getCode();n=Dt.ZP.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor1 = vec4(input.fragPos.z, 0.0, 0.0, 0.0);","output.outColor2 = vec4(stopval, 0.0, 0.0, 0.0);"]).result,t.setCode(n)})),t._depthRangeEncoder.setDescription({colorAttachments:[{view:null,clearValue:[0,0,0,0],loadOp:"clear",storeOp:"store"},{view:null,clearValue:[1,1,1,1],loadOp:"clear",storeOp:"store"}]}),t._depthRangeEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"r16float",blend:{color:{srcFactor:"one",dstFactor:"one",operation:"max"},alpha:{srcfactor:"one",dstFactor:"one",operation:"max"}}},{format:"r16float",blend:{color:{srcFactor:"one",dstFactor:"one",operation:"min"},alpha:{srcfactor:"one",dstFactor:"one",operation:"min"}}}]}}),t._depthRangeTexture=Et.ZP.newInstance({label:"volumePassMaxDepth"}),t._depthRangeTexture.create(n,{width:e.getCanvas().width,height:e.getCanvas().height,format:"r16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING});const r=t._depthRangeTexture.createView("maxTexture");t._depthRangeEncoder.setColorTextureView(0,r),t._depthRangeTexture2=Et.ZP.newInstance({label:"volumePassDepthMin"}),t._depthRangeTexture2.create(n,{width:e.getCanvas().width,height:e.getCanvas().height,format:"r16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING});const i=t._depthRangeTexture2.createView("minTexture");t._depthRangeEncoder.setColorTextureView(1,i),t._mapper.setDevice(e.getDevice()),t._mapper.setTextureViews([t.depthTextureView])},e.createClearEncoder=e=>{t._colorTexture=Et.ZP.newInstance({label:"volumePassColor"}),t._colorTexture.create(e.getDevice(),{width:e.getCanvas().width,height:e.getCanvas().height,format:"bgra8unorm",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC}),t._colorTextureView=t._colorTexture.createView("volumePassColorTexture"),t._colorTextureView.addSampler(e.getDevice(),{minFilter:"linear",magFilter:"linear"}),t._clearEncoder=Ot.newInstance({label:"VolumePass Clear"}),t._clearEncoder.setColorTextureView(0,t._colorTextureView),t._clearEncoder.setDescription({colorAttachments:[{view:null,clearValue:[0,0,0,0],loadOp:"clear",storeOp:"store"}]}),t._clearEncoder.setPipelineHash("volpf"),t._clearEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"bgra8unorm",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.createCopyEncoder=e=>{t._copyEncoder=Ot.newInstance({label:"volumePassCopy"}),t._copyEncoder.setDescription({colorAttachments:[{view:null,loadOp:"load",storeOp:"store"}]}),t._copyEncoder.setPipelineHash("volcopypf"),t._copyEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"rgba16float",blend:{color:{srcFactor:"one",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.createMergeEncoder=e=>{t._mergeEncoder=Ot.newInstance({label:"volumePassMerge"}),t._mergeEncoder.setColorTextureView(0,t._colorTextureView),t._mergeEncoder.setDescription({colorAttachments:[{view:null,loadOp:"load",storeOp:"store"}]}),t._mergeEncoder.setReplaceShaderCodeFunction((e=>{const t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor");let n=t.getCode();n=Dt.ZP.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = vec4(computedColor.rgb, computedColor.a);"]).result,t.setCode(n)})),t._mergeEncoder.setPipelineHash("volpf"),t._mergeEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"bgra8unorm",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.setVolumes=n=>{if(!t.volumes||t.volumes.length!==n.length)return t.volumes=[...n],void e.modified();for(let r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pn,n),Te.extend(e,t,n),t._mapper=Yt.ZP.newInstance(),t._mapper.setFragmentShaderTemplate(cn),t._mapper.getShaderReplacements().set("replaceShaderVolumePass",((e,t,n)=>{t.getShaderDescription("fragment").addBuiltinInput("vec4","@builtin(position) fragPos")})),t._boundsPoly=zt.ZP.newInstance(),t._lastMTimes=[],r.m.setGet(e,t,["colorTextureView","depthTextureView"]),dn(e,t)}var hn={newInstance:r.m.newInstance(fn,"vtkWebGPUVolumePass"),extend:fn},mn=n(367);function gn(e,t){t.classHierarchy.push("vtkForwardPass"),e.traverse=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t.deleted)return;t._currentParent=r,e.setCurrentOperation("buildPass"),n.traverse(e),t.opaquePass||(t.opaquePass=Bt.newInstance());const i=n.getRenderable().getNumberOfLayers(),o=n.getChildren();for(let r=0;r0&&(t.translucentPass||(t.translucentPass=Gt.newInstance()),t.translucentPass.setColorTextureView(t.opaquePass.getColorTextureView()),t.translucentPass.setDepthTextureView(t.opaquePass.getDepthTextureView()),t.translucentPass.traverse(a,n)),t.volumes.length>0&&(t.volumePass||(t.volumePass=hn.newInstance()),t.volumePass.setColorTextureView(t.opaquePass.getColorTextureView()),t.volumePass.setDepthTextureView(t.opaquePass.getDepthTextureView()),t.volumePass.setVolumes(t.volumes),t.volumePass.traverse(a,n)),e.finalPass(n,a))}},e.finalPass=(n,r)=>{t._finalBlitEncoder||e.createFinalBlitEncoder(n),t._finalBlitOutputTextureView.createFromTextureHandle(n.getCurrentTexture(),{depth:1,format:n.getPresentationFormat()}),t._finalBlitEncoder.attachTextureViews(),t._finalBlitEncoder.begin(n.getCommandEncoder()),r.scissorAndViewport(t._finalBlitEncoder),t._fullScreenQuad.prepareAndDraw(t._finalBlitEncoder),t._finalBlitEncoder.end()},e.createFinalBlitEncoder=e=>{t._finalBlitEncoder=Ot.newInstance({label:"forwardPassBlit"}),t._finalBlitEncoder.setDescription({colorAttachments:[{view:null,loadOp:"load",storeOp:"store"}]}),t._finalBlitEncoder.setPipelineHash("fpf"),t._finalBlitEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:e.getPresentationFormat(),blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}}),t._fsqSampler=Zt.ZP.newInstance({label:"finalPassSampler"}),t._fsqSampler.create(e.getDevice(),{minFilter:"linear",magFilter:"linear"}),t._fullScreenQuad=Mt.ZP.newInstance(),t._fullScreenQuad.setDevice(e.getDevice()),t._fullScreenQuad.setPipelineHash("fpfsq"),t._fullScreenQuad.setTextureViews([t.opaquePass.getColorTextureView()]),t._fullScreenQuad.setAdditionalBindables([t._fsqSampler]),t._fullScreenQuad.setFragmentShaderTemplate("\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n@fragment\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n var computedColor: vec4 = clamp(textureSampleLevel(opaquePassColorTexture, finalPassSampler, input.tcoordVS, 0),vec4(0.0),vec4(1.0));\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n"),t._finalBlitOutputTextureView=mn.ZP.newInstance(),t._finalBlitEncoder.setColorTextureView(0,t._finalBlitOutputTextureView)},e.incrementOpaqueActorCount=()=>t.opaqueActorCount++,e.incrementTranslucentActorCount=()=>t.translucentActorCount++,e.addVolume=e=>{t.volumes.push(e)}}const vn={opaqueActorCount:0,translucentActorCount:0,volumes:null,opaqueRenderEncoder:null,translucentPass:null,volumePass:null};function yn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vn,n),Te.extend(e,t,n),r.m.setGet(e,t,["opaquePass","translucentPass","volumePass"]),gn(e,t)}var _n={newInstance:r.m.newInstance(yn,"vtkForwardPass"),extend:yn},bn=n(73);const{VtkDataTypes:xn}=y.ZP;function wn(e,t){function n(e){if(e.imageData){e.dataArray=e.imageData.getPointData().getScalars(),e.time=e.dataArray.getMTime(),e.nativeArray=e.dataArray.getData();const t=e.imageData.getDimensions();e.width=t[0],e.height=t[1],e.depth=t[2];switch(e.dataArray.getNumberOfComponents()){case 1:e.format="r";break;case 2:e.format="rg";break;default:e.format="rgba"}switch(e.dataArray.getDataType()){case xn.UNSIGNED_CHAR:e.format+="8unorm";break;case xn.FLOAT:case xn.UNSIGNED_INT:case xn.INT:case xn.DOUBLE:case xn.UNSIGNED_SHORT:case xn.SHORT:default:e.format+="16float"}}e.image&&(e.width=e.image.width,e.height=e.image.height,e.depth=1,e.format="rgba8unorm"),e.jsImageData&&(e.width=e.jsImageData.width,e.height=e.jsImageData.height,e.depth=1,e.format="rgba8unorm",e.flip=!0,e.nativeArray=e.jsImageData.data),e.canvas&&(e.width=e.canvas.width,e.height=e.canvas.height,e.depth=1,e.format="rgba8unorm",e.flip=!0,e.usage=GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT)}function r(e){const n=Et.ZP.newInstance();return n.create(t.device,{width:e.width,height:e.height,depth:e.depth,format:e.format,usage:e.usage,mipLevel:e.mipLevel}),(e.nativeArray||e.image||e.canvas)&&n.writeImageData(e),n}t.classHierarchy.push("vtkWebGPUTextureManager"),e.getTexture=e=>e.hash?t.device.getCachedObject(e.hash,r,e):r(e),e.getTextureForImageData=e=>{const r={time:e.getMTime()};return r.imageData=e,n(r),r.hash=r.time+r.format+r.mipLevel,t.device.getTextureManager().getTexture(r)},e.getTextureForVTKTexture=e=>{const r={time:e.getMTime()};return e.getInputData()?r.imageData=e.getInputData():e.getImage()?r.image=e.getImage():e.getJsImageData()?r.jsImageData=e.getJsImageData():e.getCanvas()&&(r.canvas=e.getCanvas()),n(r),r.mipLevel=e.getMipLevel(),r.hash=r.time+r.format+r.mipLevel,t.device.getTextureManager().getTexture(r)}}const Sn={handle:null,device:null};function Cn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Sn,n),r.m.obj(e,t),r.m.setGet(e,t,["device"]),wn(e,t)}var Tn={newInstance:r.m.newInstance(Cn),extend:Cn};class Mn extends Map{constructor(){super(),this.registry=new FinalizationRegistry((e=>{const t=super.get(e);t&&t.deref&&void 0===t.deref()&&super.delete(e)}))}getValue(e){const t=super.get(e);if(t){const n=t.deref();if(void 0!==n)return n;super.delete(e)}}setValue(e,t){let n;return t&&"object"==typeof t&&(n=new WeakRef(t),this.registry.register(t,e),super.set(e,n)),n}}function Dn(e,t){t.classHierarchy.push("vtkWebGPUDevice"),e.initialize=e=>{t.handle=e},e.createCommandEncoder=()=>t.handle.createCommandEncoder(),e.submitCommandEncoder=e=>{t.handle.queue.submit([e.finish()])},e.getShaderModule=e=>t.shaderCache.getShaderModule(e),e.getBindGroupLayout=e=>{if(!e.entries)return null;for(let t=0;t{for(let n=0;ne in t.pipelines?t.pipelines[e]:null,e.createPipeline=(n,r)=>{r.initialize(e,n),t.pipelines[n]=r},e.onSubmittedWorkDone=()=>t.handle.queue.onSubmittedWorkDone(),e.hasCachedObject=e=>t.objectCache.getValue(e),e.getCachedObject=function(e,n){if(!e)return vtkErrorMacro("attempt to cache an object without a hash"),null;const r=t.objectCache.getValue(e);if(r)return r;for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,An,n),(0,r.o)(e,t),(0,r.e)(e,t,["handle"]),(0,r.g)(e,t,["bufferManager","shaderCache","textureManager"]),t.objectCache=new Mn,t.shaderCache=Dt.ZP.newInstance(),t.shaderCache.setDevice(e),t.bindGroupLayouts=[],t.bufferManager=jt.ZP.newInstance(),t.bufferManager.setDevice(e),t.textureManager=Tn.newInstance(),t.textureManager.setDevice(e),t.pipelines={},Dn(e,t)}var kn={newInstance:(0,r.n)(Pn,"vtkWebGPUDevice"),extend:Pn},Ln=n(363);function On(e,t){t.classHierarchy.push("vtkWebGPUHardwareSelectionPass"),e.traverse=(n,r)=>{if(t.deleted)return;t._currentParent=null,e.setCurrentOperation("buildPass"),n.traverse(e);const i=n.getDevice();if(t.selectionRenderEncoder)t.colorTexture.resize(n.getCanvas().width,n.getCanvas().height),t.depthTexture.resizeToMatch(t.colorTexture);else{e.createRenderEncoder(),t.colorTexture=Et.ZP.newInstance({label:"hardwareSelectorColor"}),t.colorTexture.create(i,{width:n.getCanvas().width,height:n.getCanvas().height,format:"rgba32uint",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC});const r=t.colorTexture.createView("hardwareSelectColorTexture");t.selectionRenderEncoder.setColorTextureView(0,r),t.depthTexture=Et.ZP.newInstance({label:"hardwareSelectorDepth"}),t.depthTexture.create(i,{width:n.getCanvas().width,height:n.getCanvas().height,format:"depth32float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC});const o=t.depthTexture.createView("hardwareSelectDepthTexture");t.selectionRenderEncoder.setDepthTextureView(o)}t.selectionRenderEncoder.attachTextureViews(),r.setRenderEncoder(t.selectionRenderEncoder),e.setCurrentOperation("cameraPass"),r.traverse(e),e.setCurrentOperation("opaquePass"),r.traverse(e)},e.createRenderEncoder=()=>{t.selectionRenderEncoder=Ot.newInstance({label:"HardwareSelectionPass"}),t.selectionRenderEncoder.setPipelineHash("sel"),t.selectionRenderEncoder.setReplaceShaderCodeFunction((e=>{const t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor");let n=t.getCode();n=Dt.ZP.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = vec4(mapperUBO.PropID, compositeID, 0u, 0u);"]).result,t.setCode(n)}));t.selectionRenderEncoder.getDescription().colorAttachments[0].clearValue=[0,0,0,0],t.selectionRenderEncoder.setPipelineSettings({primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!0,depthCompare:"greater",format:"depth32float"},fragment:{targets:[{format:"rgba32uint",blend:void 0}]}})}}const En={selectionRenderEncoder:null,colorTexture:null,depthTexture:null};function In(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,En,n),Te.extend(e,t,n),r.m.get(e,t,["colorTexture","depthTexture"]),On(e,t)}var Nn={newInstance:r.m.newInstance(In,"vtkWebGPUHardwareSelectionPass"),extend:In},Rn=n(364),Bn=n(36);const{SelectionContent:Fn,SelectionField:Vn}=Rn.ZP,{FieldAssociations:Un}=Bn.ZP,{vtkErrorMacro:Gn}=r.m;function zn(e){return`${e.propID} ${e.compositeID}`}function jn(e,t,n,r){const i=4*((n.height-t-1)*n.colorBufferWidth+e)+r;return n.colorValues[i]}function Yn(e,t,n,r){const i=n<0?0:n;if(0===i){if(r[0]=t[0],r[1]=t[1],t[0]<0||t[0]>=e.width||t[1]<0||t[1]>=e.height)return null;const n=jn(t[0],t[1],e,0);if(n<=0)return null;const i={};i.propID=n;let o=jn(t[0],t[1],e,1);if((o<0||o>16777215)&&(o=0),i.compositeID=o,e.captureZValues){const n=(e.height-t[1]-1)*e.zbufferBufferWidth+t[0];i.zValue=e.depthValues[n],i.zValue=e.webGPURenderer.convertToOpenGLDepth(i.zValue),i.displayPosition=t}return i}const o=[t[0],t[1]],a=[0,0];let s=Yn(e,t,0,r);if(s)return s;for(let t=1;tt?o[1]-t:0;n<=o[1]+t;++n){if(a[1]=n,o[0]>=t&&(a[0]=o[0]-t,s=Yn(e,a,0,r),s))return s;if(a[0]=o[0]+t,s=Yn(e,a,0,r),s)return s}for(let n=o[0]>=t?o[0]-(t-1):0;n<=o[0]+(t-1);++n){if(a[0]=n,o[1]>=t&&(a[1]=o[1]-t,s=Yn(e,a,0,r),s))return s;if(a[1]=o[1]+t,s=Yn(e,a,0,r),s)return s}}return r[0]=t[0],r[1]=t[1],null}function Hn(e,t,n,r,i){const o=Math.floor(t),a=Math.floor(n),s=Math.floor(r),l=Math.floor(i),u=new Map,c=[0,0];for(let t=a;t<=l;t++)for(let n=o;n<=s;n++){const r=Yn(e,[n,t],0,c);if(r){const t=zn(r);if(u.has(t)){const n=u.get(t);n.pixelCount++,e.captureZValues&&r.zValue{const a=Rn.ZP.newInstance();switch(a.setContentType(Fn.INDICES),e){case Un.FIELD_ASSOCIATION_CELLS:a.setFieldType(Vn.CELL);break;case Un.FIELD_ASSOCIATION_POINTS:a.setFieldType(Vn.POINT);break;default:Gn("Unknown field association")}a.getProperties().propID=t.info.propID;const s=n.webGPURenderer.getPropFromID(t.info.propID);a.getProperties().prop=s.getRenderable(),a.getProperties().compositeID=t.info.compositeID,a.getProperties().pixelCount=t.pixelCount,n.captureZValues&&(a.getProperties().displayPosition=[t.info.displayPosition[0],t.info.displayPosition[1],t.info.zValue],a.getProperties().worldPosition=n.webGPURenderWindow.displayToWorld(t.info.displayPosition[0],t.info.displayPosition[1],t.info.zValue,n.renderer)),a.setSelectionList(t.attributeIDs),r[i]=a,i++})),r}(e.fieldAssociation,u,e)}function Wn(e,t){t.classHierarchy.push("vtkWebGPUHardwareSelector"),e.endSelection=()=>{t.WebGPURenderer.setSelector(null)},e.getSourceDataAsync=async e=>{if(!e||!t._WebGPURenderWindow)return Gn("Renderer and view must be set before calling Select."),!1;t._WebGPURenderWindow.getRenderable().preRender(),t._WebGPURenderWindow.getInitialized()||(t._WebGPURenderWindow.initialize(),await new Promise((e=>{t._WebGPURenderWindow.onInitialized(e)})));const n=t._WebGPURenderWindow.getViewNodeFor(e);if(!n)return!1;const r=n.getSuppressClear();n.setSuppressClear(!0),t._selectionPass.traverse(t._WebGPURenderWindow,n),n.setSuppressClear(r);const i=t._WebGPURenderWindow.getDevice(),o=t._selectionPass.getColorTexture(),a=t._selectionPass.getDepthTexture(),s={area:[0,0,o.getWidth()-1,o.getHeight()-1],captureZValues:t.captureZValues,fieldAssociation:t.fieldAssociation,renderer:e,webGPURenderer:n,webGPURenderWindow:t._WebGPURenderWindow,width:o.getWidth(),height:o.getHeight()};s.colorBufferWidth=16*Math.floor((s.width+15)/16),s.colorBufferSizeInBytes=s.colorBufferWidth*s.height*4*4;const l=bn.ZP.newInstance({label:"hardwareSelectColorBuffer"});l.setDevice(i),l.create(s.colorBufferSizeInBytes,GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST);const u=t._WebGPURenderWindow.getCommandEncoder();let c;u.copyTextureToBuffer({texture:o.getHandle()},{buffer:l.getHandle(),bytesPerRow:16*s.colorBufferWidth,rowsPerImage:s.height},{width:s.width,height:s.height,depthOrArrayLayers:1}),t.captureZValues&&(s.zbufferBufferWidth=64*Math.floor((s.width+63)/64),c=bn.ZP.newInstance({label:"hardwareSelectDepthBuffer"}),c.setDevice(i),s.zbufferSizeInBytes=s.height*s.zbufferBufferWidth*4,c.create(s.zbufferSizeInBytes,GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST),u.copyTextureToBuffer({texture:a.getHandle(),aspect:"depth-only"},{buffer:c.getHandle(),bytesPerRow:4*s.zbufferBufferWidth,rowsPerImage:s.height},{width:s.width,height:s.height,depthOrArrayLayers:1})),i.submitCommandEncoder(u);const d=l.mapAsync(GPUMapMode.READ);if(t.captureZValues){const e=c.mapAsync(GPUMapMode.READ);await Promise.all([d,e]),s.depthValues=new Float32Array(c.getMappedRange().slice()),c.unmap()}else await d;return s.colorValues=new Uint32Array(l.getMappedRange().slice()),l.unmap(),s.generateSelection=(e,t,n,r)=>Hn(s,e,t,n,r),s}}const $n={};function Zn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$n,n),Ln.ZP.extend(e,t,n),t._selectionPass=Nn.newInstance(),r.m.setGet(e,t,["_WebGPURenderWindow"]),r.m.moveToProtected(e,t,["WebGPURenderWindow"]),Wn(e,t)}var Kn={newInstance:r.m.newInstance(Zn,"vtkWebGPUHardwareSelector"),extend:Zn},qn=n(12),Xn=n(111);const{vtkErrorMacro:Jn}=r.m,Qn={position:"absolute",top:0,left:0,width:"100%",height:"100%"};function er(e,t){t.classHierarchy.push("vtkWebGPURenderWindow"),e.getViewNodeFactory=()=>t.myFactory;const n=[0,0];e.onModified((function(){t.renderable&&(t.size[0]===n[0]&&t.size[1]===n[1]||(n[0]=t.size[0],n[1]=t.size[1],t.canvas.setAttribute("width",t.size[0]),t.canvas.setAttribute("height",t.size[1]),e.recreateSwapChain())),t.viewStream&&t.viewStream.setSize(t.size[0],t.size[1]),t.canvas.style.display=t.useOffScreen?"none":"block",t.el&&(t.el.style.cursor=t.cursorVisibility?t.cursor:"none"),t.containerSize=null})),e.recreateSwapChain=()=>{t.context&&(t.context.unconfigure(),t.presentationFormat=navigator.gpu.getPreferredCanvasFormat(t.adapter),t.context.configure({device:t.device.getHandle(),format:t.presentationFormat,alphaMode:"premultiplied",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_DST,width:t.size[0],height:t.size[1]}),t._configured=!0)},e.getCurrentTexture=()=>t.context.getCurrentTexture(),e.buildPass=n=>{if(n){if(!t.renderable)return;e.prepareNodes(),e.addMissingNodes(t.renderable.getRenderersByReference()),e.removeUnusedNodes(),e.initialize()}else t.initialized&&(t._configured||e.recreateSwapChain(),t.commandEncoder=t.device.createCommandEncoder())},e.initialize=()=>{if(!t.initializing){if(t.initializing=!0,!navigator.gpu)return void Jn("WebGPU is not enabled.");e.create3DContextAsync().then((()=>{t.initialized=!0,t.deleted||e.invokeInitialized()}))}},e.setContainer=n=>{t.el&&t.el!==n&&(t.canvas.parentNode!==t.el&&Jn("Error: canvas parent node does not match container"),t.el.removeChild(t.canvas),t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)),t.el!==n&&(t.el=n,t.el&&(t.el.appendChild(t.canvas),t.useBackgroundImage&&t.el.appendChild(t.bgImage)),e.modified())},e.getContainer=()=>t.el,e.getContainerSize=()=>{if(!t.containerSize&&t.el){const{width:e,height:n}=t.el.getBoundingClientRect();t.containerSize=[e,n]}return t.containerSize||t.size},e.getFramebufferSize=()=>t.size,e.create3DContextAsync=async()=>{t.adapter=await navigator.gpu.requestAdapter({powerPreference:"high-performance"}),t.deleted||(t.device=kn.newInstance(),t.device.initialize(await t.adapter.requestDevice()),t.deleted?t.device=null:t.context=t.canvas.getContext("webgpu"))},e.releaseGraphicsResources=()=>{const n=Te.newInstance();n.setCurrentOperation("Release"),n.traverse(e,null),t.adapter=null,t.device=null,t.context=null,t.initialized=!1,t.initializing=!1},e.setBackgroundImage=e=>{t.bgImage.src=e.src},e.setUseBackgroundImage=e=>{t.useBackgroundImage=e,t.useBackgroundImage&&!t.el.contains(t.bgImage)?t.el.appendChild(t.bgImage):!t.useBackgroundImage&&t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)},e.captureNextImage=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png",{resetCamera:r=!1,size:i=null,scale:o=1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.deleted)return null;t.imageFormat=n;const a=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,t._screenshot={size:i||1!==o?i||t.size.map((e=>e*o)):null},new Promise(((n,i)=>{const o=e.onImageReady((i=>{if(null===t._screenshot.size)t.notifyStartCaptureImage=a,o.unsubscribe(),t._screenshot.placeHolder&&(t.size=t._screenshot.originalSize,e.modified(),t._screenshot.cameras&&t._screenshot.cameras.forEach((e=>{let{restoreParamsFn:t,arg:n}=e;return t(n)})),e.traverseAllPasses(),t.el.removeChild(t._screenshot.placeHolder),t._screenshot.placeHolder.remove(),t._screenshot=null),n(i);else{const n=document.createElement("img");if(n.style=Qn,n.src=i,t._screenshot.placeHolder=t.el.appendChild(n),t.canvas.style.display="none",t._screenshot.originalSize=t.size,t.size=t._screenshot.size,t._screenshot.size=null,e.modified(),r){const e=!0!==r;t._screenshot.cameras=t.renderable.getRenderers().map((t=>{const n=t.getActiveCamera(),i=n.get("focalPoint","position","parallelScale");return{resetCameraArgs:e?{renderer:t}:void 0,resetCameraFn:e?r:t.resetCamera,restoreParamsFn:n.set,arg:JSON.parse(JSON.stringify(i))}})),t._screenshot.cameras.forEach((e=>{let{resetCameraFn:t,resetCameraArgs:n}=e;return t(n)}))}e.traverseAllPasses()}}))}))},e.traverseAllPasses=()=>{if(!t.deleted)if(t.initialized){if(t.renderPasses)for(let n=0;n{!async function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.imageFormat;const r=document.createElement("canvas"),i=r.getContext("2d");r.width=t.canvas.width,r.height=t.canvas.height;const o=await e.getPixelsAsync(),a=new ImageData(o.colorValues,o.width,o.height);i.putImageData(a,0,0);const s=t.canvas.getBoundingClientRect(),l=t.renderable;l.getRenderers().forEach((e=>{e.getViewProps().forEach((e=>{if(e.getContainer){const t=e.getContainer().getElementsByTagName("canvas");for(let e=0;e{t.unsubscribe(),e.traverseAllPasses()}))}},e.setViewStream=n=>{if(t.viewStream===n)return!1;if(t.subscription&&(t.subscription.unsubscribe(),t.subscription=null),t.viewStream=n,t.viewStream){t.renderable.getRenderers()[0].getBackgroundByReference()[3]=0,e.setUseBackgroundImage(!0),t.subscription=t.viewStream.onImageReady((t=>e.setBackgroundImage(t.image))),t.viewStream.setSize(t.size[0],t.size[1]),t.viewStream.invalidateCache(),t.viewStream.render(),e.modified()}return!0},e.getUniquePropID=()=>t.nextPropID++,e.getPropFromID=e=>{for(let n=0;n{const e=t.device,n=t.renderPasses[0].getOpaquePass().getColorTexture(),r={width:n.getWidth(),height:n.getHeight()};r.colorBufferWidth=32*Math.floor((r.width+31)/32),r.colorBufferSizeInBytes=r.colorBufferWidth*r.height*8;const i=bn.ZP.newInstance();i.setDevice(e),i.create(r.colorBufferSizeInBytes,GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST);const o=t.device.createCommandEncoder();o.copyTextureToBuffer({texture:n.getHandle()},{buffer:i.getHandle(),bytesPerRow:8*r.colorBufferWidth,rowsPerImage:r.height},{width:r.width,height:r.height,depthOrArrayLayers:1}),e.submitCommandEncoder(o);const a=i.mapAsync(GPUMapMode.READ);await a,r.colorValues=new Uint16Array(i.getMappedRange().slice()),i.unmap();const s=new Uint8ClampedArray(r.height*r.width*4);for(let e=0;e{const t=Kn.newInstance();return t.setWebGPURenderWindow(e),t},e.delete=r.m.chain(e.delete,e.setViewStream)}const tr={initialized:!1,context:null,adapter:null,device:null,canvas:null,cursorVisibility:!0,cursor:"pointer",containerSize:null,renderPasses:[],notifyStartCaptureImage:!1,imageFormat:"image/png",useOffScreen:!1,useBackgroundImage:!1,nextPropID:1,xrSupported:!1,presentationFormat:null};function nr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,tr,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",t.bgImage=new Image,t.bgImage.style.position="absolute",t.bgImage.style.left="0",t.bgImage.style.top="0",t.bgImage.style.width="100%",t.bgImage.style.height="100%",t.bgImage.style.zIndex="-1",at.extend(e,t,n),t.myFactory=qn.ZP.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",rr),t.renderPasses[0]=_n.newInstance(),t.selector||(t.selector=Kn.newInstance(),t.selector.setWebGPURenderWindow(e)),r.m.event(e,t,"imageReady"),r.m.event(e,t,"initialized"),r.m.get(e,t,["commandEncoder","device","presentationFormat","useBackgroundImage","xrSupported"]),r.m.setGet(e,t,["initialized","context","canvas","device","renderPasses","notifyStartCaptureImage","cursor","useOffScreen"]),r.m.setGetArray(e,t,["size"],2),er(e,t)}const rr=r.m.newInstance(nr,"vtkWebGPURenderWindow");me("WebGPU",rr);var ir=n(575),or=n(577),ar=n(576);const{vtkDebugMacro:sr}=r.m;function lr(e,t){t.classHierarchy.push("vtkCamera");const n=new Float64Array(3),r=new Float64Array([0,0,-1]),i=new Float64Array([0,1,0]),o=Wt.identity(new Float64Array(16)),a=Wt.identity(new Float64Array(16)),s=new Float64Array(3),l=new Float64Array(3),u=new Float64Array(3),c=Wt.identity(new Float64Array(16)),d=Wt.identity(new Float64Array(16)),p=new Float64Array(3),f=new Float64Array(3);function h(){t.viewPlaneNormal[0]=-t.directionOfProjection[0],t.viewPlaneNormal[1]=-t.directionOfProjection[1],t.viewPlaneNormal[2]=-t.directionOfProjection[2]}e.orthogonalizeViewUp=()=>{const n=e.getViewMatrix();t.viewUp[0]=n[4],t.viewUp[1]=n[5],t.viewUp[2]=n[6],e.modified()},e.setPosition=(n,r,i)=>{n===t.position[0]&&r===t.position[1]&&i===t.position[2]||(t.position[0]=n,t.position[1]=r,t.position[2]=i,e.computeDistance(),e.modified())},e.setFocalPoint=(n,r,i)=>{n===t.focalPoint[0]&&r===t.focalPoint[1]&&i===t.focalPoint[2]||(t.focalPoint[0]=n,t.focalPoint[1]=r,t.focalPoint[2]=i,e.computeDistance(),e.modified())},e.setDistance=n=>{if(t.distance===n)return;t.distance=n,t.distance<1e-20&&(t.distance=1e-20,sr("Distance is set to minimum."));const r=t.directionOfProjection;t.focalPoint[0]=t.position[0]+r[0]*t.distance,t.focalPoint[1]=t.position[1]+r[1]*t.distance,t.focalPoint[2]=t.position[2]+r[2]*t.distance,e.modified()},e.computeDistance=()=>{const e=t.focalPoint[0]-t.position[0],n=t.focalPoint[1]-t.position[1],r=t.focalPoint[2]-t.position[2];if(t.distance=Math.sqrt(e*e+n*n+r*r),t.distance<1e-20){t.distance=1e-20,sr("Distance is set to minimum.");const e=t.directionOfProjection;t.focalPoint[0]=t.position[0]+e[0]*t.distance,t.focalPoint[1]=t.position[1]+e[1]*t.distance,t.focalPoint[2]=t.position[2]+e[2]*t.distance}t.directionOfProjection[0]=e/t.distance,t.directionOfProjection[1]=n/t.distance,t.directionOfProjection[2]=r/t.distance,h()},e.dolly=n=>{if(n<=0)return;const r=t.distance/n;e.setPosition(t.focalPoint[0]-r*t.directionOfProjection[0],t.focalPoint[1]-r*t.directionOfProjection[1],t.focalPoint[2]-r*t.directionOfProjection[2])},e.roll=n=>{const r=t.position,i=t.focalPoint,o=t.viewUp,a=new Float64Array([o[0],o[1],o[2],0]);Wt.identity(c);const s=new Float64Array([i[0]-r[0],i[1]-r[1],i[2]-r[2]]);Wt.rotate(c,c,(0,on.r)(n),s),or.fF(a,a,c),t.viewUp[0]=a[0],t.viewUp[1]=a[1],t.viewUp[2]=a[2],e.modified()},e.azimuth=n=>{const r=t.focalPoint;Wt.identity(d),Wt.translate(d,d,r),Wt.rotate(d,d,(0,on.r)(n),t.viewUp),Wt.translate(d,d,[-r[0],-r[1],-r[2]]),ir.fF(p,t.position,d),e.setPosition(p[0],p[1],p[2])},e.yaw=n=>{const r=t.position;Wt.identity(d),Wt.translate(d,d,r),Wt.rotate(d,d,(0,on.r)(n),t.viewUp),Wt.translate(d,d,[-r[0],-r[1],-r[2]]),ir.fF(f,t.focalPoint,d),e.setFocalPoint(f[0],f[1],f[2])},e.elevation=n=>{const r=t.focalPoint,i=e.getViewMatrix(),o=[-i[0],-i[1],-i[2]];Wt.identity(d),Wt.translate(d,d,r),Wt.rotate(d,d,(0,on.r)(n),o),Wt.translate(d,d,[-r[0],-r[1],-r[2]]),ir.fF(p,t.position,d),e.setPosition(p[0],p[1],p[2])},e.pitch=n=>{const r=t.position,i=e.getViewMatrix(),o=[i[0],i[1],i[2]];Wt.identity(d),Wt.translate(d,d,r),Wt.rotate(d,d,(0,on.r)(n),o),Wt.translate(d,d,[-r[0],-r[1],-r[2]]),ir.fF(f,t.focalPoint,d),e.setFocalPoint(...f)},e.zoom=n=>{n<=0||(t.parallelProjection?t.parallelScale/=n:t.viewAngle/=n,e.modified())},e.translate=(n,r,i)=>{const o=[n,r,i];(0,on.k)(t.position,o,t.position),(0,on.k)(t.focalPoint,o,t.focalPoint),e.computeDistance(),e.modified()},e.applyTransform=n=>{const r=[...t.viewUp,1],i=[],o=[],a=[];r[0]+=t.position[0],r[1]+=t.position[1],r[2]+=t.position[2],or.fF(i,[...t.position,1],n),or.fF(o,[...t.focalPoint,1],n),or.fF(a,r,n),a[0]-=i[0],a[1]-=i[1],a[2]-=i[2],e.setPosition(...i.slice(0,3)),e.setFocalPoint(...o.slice(0,3)),e.setViewUp(...a.slice(0,3))},e.getThickness=()=>t.clippingRange[1]-t.clippingRange[0],e.setThickness=n=>{let r=n;r<1e-20&&(r=1e-20,sr("Thickness is set to minimum.")),e.setClippingRange(t.clippingRange[0],t.clippingRange[0]+r)},e.setThicknessFromFocalPoint=n=>{let r=n;r<1e-20&&(r=1e-20,sr("Thickness is set to minimum.")),e.setClippingRange(t.distance-r/2,t.distance+r/2)},e.setRoll=e=>{},e.getRoll=()=>{},e.setObliqueAngles=(e,t)=>{},e.getOrientation=()=>{},e.getOrientationWXYZ=()=>{},e.getFrustumPlanes=e=>{},e.getCameraLightTransformMatrix=e=>(Wt.copy(e,t.cameraLightTransform),e),e.computeCameraLightTransform=()=>{Wt.copy(o,e.getViewMatrix()),Wt.invert(o,o),Wt.fromScaling(a,[t.distance,t.distance,t.distance]),Wt.multiply(o,o,a),Wt.identity(t.cameraLightTransform),Wt.translate(t.cameraLightTransform,o,[0,0,-1])},e.deepCopy=e=>{},e.physicalOrientationToWorldDirection=e=>{const t=ar.al(e[0],e[1],e[2],e[3]),n=ar.Ue(),r=ar.al(0,0,1,0);return ar.Kx(n,t),ar.Jp(r,t,r),ar.Jp(r,r,n),[r[0],r[1],r[2]]},e.getPhysicalToWorldMatrix=t=>{e.getWorldToPhysicalMatrix(t),Wt.invert(t,t)},e.getWorldToPhysicalMatrix=e=>{Wt.identity(e);const n=[3];(0,on.j)(t.physicalViewNorth,t.physicalViewUp,n),e[0]=n[0],e[1]=n[1],e[2]=n[2],e[4]=t.physicalViewUp[0],e[5]=t.physicalViewUp[1],e[6]=t.physicalViewUp[2],e[8]=-t.physicalViewNorth[0],e[9]=-t.physicalViewNorth[1],e[10]=-t.physicalViewNorth[2],Wt.transpose(e,e),ir.t8(s,1/t.physicalScale,1/t.physicalScale,1/t.physicalScale),Wt.scale(e,e,s),Wt.translate(e,e,t.physicalTranslation)},e.computeViewParametersFromViewMatrix=a=>{Wt.invert(o,a),ir.fF(s,n,o),e.computeDistance();const c=t.distance;e.setPosition(s[0],s[1],s[2]),ir.fF(l,r,o),ir.$X(l,l,s),ir.Fv(l,l),e.setDirectionOfProjection(l[0],l[1],l[2]),ir.fF(u,i,o),ir.$X(u,u,s),ir.Fv(u,u),e.setViewUp(u[0],u[1],u[2]),e.setDistance(c)},e.computeViewParametersFromPhysicalMatrix=t=>{e.getWorldToPhysicalMatrix(o),Wt.multiply(o,t,o),e.computeViewParametersFromViewMatrix(o)},e.setViewMatrix=n=>{t.viewMatrix=n,t.viewMatrix&&(Wt.copy(o,t.viewMatrix),e.computeViewParametersFromViewMatrix(o),Wt.transpose(t.viewMatrix,t.viewMatrix))},e.getViewMatrix=()=>{if(t.viewMatrix)return t.viewMatrix;Wt.lookAt(o,t.position,t.focalPoint,t.viewUp),Wt.transpose(o,o);const e=new Float64Array(16);return Wt.copy(e,o),e},e.setProjectionMatrix=e=>{t.projectionMatrix=e},e.getProjectionMatrix=(e,n,r)=>{const i=new Float64Array(16);if(Wt.identity(i),t.projectionMatrix){const e=1/t.physicalScale;return ir.t8(s,e,e,e),Wt.copy(i,t.projectionMatrix),Wt.scale(i,i,s),Wt.transpose(i,i),i}Wt.identity(o);const a=t.clippingRange[1]-t.clippingRange[0],l=[t.clippingRange[0]+(n+1)*a/2,t.clippingRange[0]+(r+1)*a/2];if(t.parallelProjection){const n=t.parallelScale*e,r=t.parallelScale,i=(t.windowCenter[0]-1)*n,a=(t.windowCenter[0]+1)*n,s=(t.windowCenter[1]-1)*r,u=(t.windowCenter[1]+1)*r;Wt.ortho(o,i,a,s,u,l[0],l[1]),Wt.transpose(o,o)}else{if(t.useOffAxisProjection)throw new Error("Off-Axis projection is not supported at this time");{const n=Math.tan((0,on.r)(t.viewAngle)/2);let r,i;!0===t.useHorizontalViewAngle?(r=t.clippingRange[0]*n,i=t.clippingRange[0]*n/e):(r=t.clippingRange[0]*n*e,i=t.clippingRange[0]*n);const a=(t.windowCenter[0]-1)*r,s=(t.windowCenter[0]+1)*r,u=(t.windowCenter[1]-1)*i,c=(t.windowCenter[1]+1)*i,d=l[0],p=l[1];o[0]=2*d/(s-a),o[5]=2*d/(c-u),o[2]=(a+s)/(s-a),o[6]=(u+c)/(c-u),o[10]=-(d+p)/(p-d),o[14]=-1,o[11]=-2*d*p/(p-d),o[15]=0}}return Wt.copy(i,o),i},e.getCompositeProjectionMatrix=(t,n,r)=>{const i=e.getViewMatrix(),o=e.getProjectionMatrix(t,n,r);return Wt.multiply(o,i,o),o},e.setDirectionOfProjection=(e,n,r)=>{if(t.directionOfProjection[0]===e&&t.directionOfProjection[1]===n&&t.directionOfProjection[2]===r)return;t.directionOfProjection[0]=e,t.directionOfProjection[1]=n,t.directionOfProjection[2]=r;const i=t.directionOfProjection;t.focalPoint[0]=t.position[0]+i[0]*t.distance,t.focalPoint[1]=t.position[1]+i[1]*t.distance,t.focalPoint[2]=t.position[2]+i[2]*t.distance,h()},e.setDeviceAngles=(n,r,i,o)=>{const a=[3];(0,on.j)(t.physicalViewNorth,t.physicalViewUp,a);const s=Wt.identity(new Float64Array(16));Wt.rotate(s,s,(0,on.r)(n),t.physicalViewUp),Wt.rotate(s,s,(0,on.r)(r),a),Wt.rotate(s,s,(0,on.r)(i),t.physicalViewNorth),Wt.rotate(s,s,(0,on.r)(-o),t.physicalViewUp);const l=new Float64Array([-t.physicalViewUp[0],-t.physicalViewUp[1],-t.physicalViewUp[2]]),u=new Float64Array(t.physicalViewNorth);ir.fF(l,l,s),ir.fF(u,u,s),e.setDirectionOfProjection(l[0],l[1],l[2]),e.setViewUp(u[0],u[1],u[2]),e.modified()},e.setOrientationWXYZ=(t,n,r,i)=>{const o=Wt.identity(new Float64Array(16));if(0!==t&&(0!==n||0!==r||0!==i)){const e=(0,on.r)(t),a=ar.Ue();ar.yY(a,[n,r,i],e),Wt.fromQuat(o,a)}const a=new Float64Array(3);ir.fF(a,[0,0,-1],o);const s=new Float64Array(3);ir.fF(s,[0,1,0],o),e.setDirectionOfProjection(...a),e.setViewUp(...s),e.modified()},e.computeClippingRange=e=>{let n=null,r=null;n=t.viewPlaneNormal,r=t.position;const i=-n[0],o=-n[1],a=-n[2],s=-(i*r[0]+o*r[1]+a*r[2]),l=[i*e[0]+o*e[2]+a*e[4]+s,1e-18];for(let t=0;t<2;t++)for(let n=0;n<2;n++)for(let r=0;r<2;r++){const u=i*e[r]+o*e[2+n]+a*e[4+t]+s;l[0]=ul[1]?u:l[1]}return l}}const ur={position:[0,0,1],focalPoint:[0,0,0],viewUp:[0,1,0],directionOfProjection:[0,0,-1],parallelProjection:!1,useHorizontalViewAngle:!1,viewAngle:30,parallelScale:1,clippingRange:[.01,1000.01],windowCenter:[0,0],viewPlaneNormal:[0,0,1],useOffAxisProjection:!1,screenBottomLeft:[-.5,-.5,-.5],screenBottomRight:[.5,-.5,-.5],screenTopRight:[.5,.5,-.5],freezeFocalPoint:!1,projectionMatrix:null,viewMatrix:null,cameraLightTransform:Wt.create(),physicalTranslation:[0,0,0],physicalScale:1,physicalViewUp:[0,1,0],physicalViewNorth:[0,0,-1]};function cr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ur,n),r.m.obj(e,t),r.m.get(e,t,["distance"]),r.m.setGet(e,t,["parallelProjection","useHorizontalViewAngle","viewAngle","parallelScale","useOffAxisProjection","freezeFocalPoint","physicalScale"]),r.m.getArray(e,t,["directionOfProjection","viewPlaneNormal","position","focalPoint"]),r.m.setGetArray(e,t,["clippingRange","windowCenter"],2),r.m.setGetArray(e,t,["viewUp","screenBottomLeft","screenBottomRight","screenTopRight","physicalTranslation","physicalViewUp","physicalViewNorth"],3),lr(e,t)}var dr={newInstance:r.m.newInstance(cr,"vtkCamera"),extend:cr};function pr(e,t){t.classHierarchy.push("vtkLight");const n=new Float64Array(3);e.getTransformedPosition=()=>(t.transformMatrix?ir.fF(n,t.position,t.transformMatrix):ir.t8(n,t.position[0],t.position[1],t.position[2]),n),e.getTransformedFocalPoint=()=>(t.transformMatrix?ir.fF(n,t.focalPoint,t.transformMatrix):ir.t8(n,t.focalPoint[0],t.focalPoint[1],t.focalPoint[2]),n),e.getDirection=()=>(t.directionMTime{const n=new Float64Array(3);ir.lu(n,t.position,e),t.focalPoint=n},e.setDirectionAngle=(t,n)=>{const r=(0,on.r)(t),i=(0,on.r)(n);e.setPosition(Math.cos(r)*Math.sin(i),Math.sin(r),Math.cos(r)*Math.cos(i)),e.setFocalPoint(0,0,0),e.setPositional(0)},e.setLightTypeToHeadLight=()=>{e.setLightType("HeadLight")},e.setLightTypeToCameraLight=()=>{e.setLightType("CameraLight")},e.setLightTypeToSceneLight=()=>{e.setTransformMatrix(null),e.setLightType("SceneLight")},e.lightTypeIsHeadLight=()=>"HeadLight"===t.lightType,e.lightTypeIsSceneLight=()=>"SceneLight"===t.lightType,e.lightTypeIsCameraLight=()=>"CameraLight"===t.lightType}const fr={switch:!0,intensity:1,color:[1,1,1],position:[0,0,1],focalPoint:[0,0,0],positional:!1,exponent:1,coneAngle:30,coneFalloff:5,attenuationValues:[1,0,0],transformMatrix:null,lightType:"SceneLight",shadowAttenuation:1,direction:[0,0,0],directionMTime:0};function hr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fr,n),r.m.obj(e,t),r.m.setGet(e,t,["intensity","switch","positional","exponent","coneAngle","coneFalloff","transformMatrix","lightType","shadowAttenuation","attenuationValues"]),r.m.setGetArray(e,t,["color","position","focalPoint","attenuationValues"],3),pr(e,t)}var mr={newInstance:r.m.newInstance(hr,"vtkLight"),extend:hr,LIGHT_TYPES:["HeadLight","CameraLight","SceneLight"]};const{vtkErrorMacro:gr}=r.m;function vr(e,t){function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.push(e);const r=e.getNestedProps();if(r&&r.length)for(let e=0;et.props,e.hasViewProp=e=>t.props.includes(e),e.addViewProp=n=>{n&&!e.hasViewProp(n)&&t.props.push(n)},e.removeViewProp=e=>{const n=t.props.filter((t=>t!==e));t.props.length!==n.length&&(t.props=n)},e.removeAllViewProps=()=>{t.props=[]},e.getViewPropsWithNestedProps=()=>{const e=[];for(let r=0;r{e.removeViewProp(t)},e.getActors2D=()=>(t.actors2D=[],t.props.forEach((e=>{t.actors2D=t.actors2D.concat(e.getActors2D())})),t.actors2D),e.displayToView=()=>gr("call displayToView on your view instead"),e.viewToDisplay=()=>gr("callviewtodisplay on your view instead"),e.getSize=()=>gr("call getSize on your View instead"),e.normalizedDisplayToProjection=(t,n,r)=>{const i=e.normalizedDisplayToNormalizedViewport(t,n,r);return e.normalizedViewportToProjection(i[0],i[1],i[2])},e.normalizedDisplayToNormalizedViewport=(e,n,r)=>{const i=[t.viewport[2]-t.viewport[0],t.viewport[3]-t.viewport[1]];return[(e-t.viewport[0])/i[0],(n-t.viewport[1])/i[1],r]},e.normalizedViewportToProjection=(e,t,n)=>[2*e-1,2*t-1,2*n-1],e.projectionToNormalizedDisplay=(t,n,r)=>{const i=e.projectionToNormalizedViewport(t,n,r);return e.normalizedViewportToNormalizedDisplay(i[0],i[1],i[2])},e.normalizedViewportToNormalizedDisplay=(e,n,r)=>{const i=[t.viewport[2]-t.viewport[0],t.viewport[3]-t.viewport[1]];return[e*i[0]+t.viewport[0],n*i[1]+t.viewport[1],r]},e.projectionToNormalizedViewport=(e,t,n)=>[.5*(e+1),.5*(t+1),.5*(n+1)],e.PickPropFrom=(r="PickPropFrom",()=>gr(`vtkViewport::${r} - NOT IMPLEMENTED`))}const yr={background:[0,0,0],background2:[.2,.2,.2],gradientBackground:!1,viewport:[0,0,1,1],aspect:[1,1],pixelAspect:[1,1],props:[],actors2D:[]};function _r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yr,n),r.m.obj(e,t),r.m.event(e,t,"event"),r.m.setGetArray(e,t,["viewport"],4),r.m.setGetArray(e,t,["background","background2"],3),vr(e,t)}var br={newInstance:r.m.newInstance(_r,"vtkViewport"),extend:_r},xr=n(10);const{vtkDebugMacro:wr,vtkErrorMacro:Sr,vtkWarningMacro:Cr}=r.c;function Tr(e){return()=>Sr(`vtkRenderer::${e} - NOT IMPLEMENTED`)}function Mr(e,t){t.classHierarchy.push("vtkRenderer");const n={type:"ComputeVisiblePropBoundsEvent",renderer:e},r={type:"ResetCameraClippingRangeEvent",renderer:e},i={type:"ResetCameraEvent",renderer:e};e.updateCamera=()=>(t.activeCamera||(wr("No cameras are on, creating one."),e.getActiveCameraAndResetIfCreated()),t.activeCamera.render(e),!0),e.updateLightsGeometryToFollowCamera=()=>{const n=e.getActiveCameraAndResetIfCreated();t.lights.forEach((e=>{e.lightTypeIsSceneLight()||(e.lightTypeIsHeadLight()?(e.setPositionFrom(n.getPositionByReference()),e.setFocalPointFrom(n.getFocalPointByReference()),e.modified(n.getMTime())):e.lightTypeIsCameraLight()?e.setTransformMatrix(n.getCameraLightTransformMatrix(Wt.create())):Sr("light has unknown light type",e.get()))}))},e.updateLightGeometry=()=>!t.lightFollowCamera||e.updateLightsGeometryToFollowCamera(),e.allocateTime=Tr("allocateTime"),e.updateGeometry=Tr("updateGeometry"),e.getVTKWindow=()=>t._renderWindow,e.setLayer=n=>{wr(e.getClassName(),e,"setting Layer to ",n),t.layer!==n&&(t.layer=n,e.modified()),e.setPreserveColorBuffer(!!n)},e.setActiveCamera=n=>t.activeCamera!==n&&(t.activeCamera=n,e.modified(),e.invokeEvent({type:"ActiveCameraEvent",camera:n}),!0),e.makeCamera=()=>{const t=dr.newInstance();return e.invokeEvent({type:"CreateCameraEvent",camera:t}),t},e.getActiveCamera=()=>(t.activeCamera||(t.activeCamera=e.makeCamera()),t.activeCamera),e.getActiveCameraAndResetIfCreated=()=>(t.activeCamera||(e.getActiveCamera(),e.resetCamera()),t.activeCamera),e.getActors=()=>(t.actors=[],t.props.forEach((e=>{t.actors=t.actors.concat(e.getActors())})),t.actors),e.addActor=e.addViewProp,e.removeActor=n=>{t.actors=t.actors.filter((e=>e!==n)),e.removeViewProp(n),e.modified()},e.removeAllActors=()=>{e.getActors().forEach((t=>{e.removeViewProp(t)})),t.actors=[],e.modified()},e.getVolumes=()=>(t.volumes=[],t.props.forEach((e=>{t.volumes=t.volumes.concat(e.getVolumes())})),t.volumes),e.addVolume=e.addViewProp,e.removeVolume=n=>{t.volumes=t.volumes.filter((e=>e!==n)),e.removeViewProp(n),e.modified()},e.removeAllVolumes=()=>{e.getVolumes().forEach((t=>{e.removeViewProp(t)})),t.volumes=[],e.modified()},e.hasLight=e=>t.lights.includes(e),e.addLight=n=>{n&&!e.hasLight(n)&&(t.lights.push(n),e.modified())},e.removeLight=n=>{t.lights=t.lights.filter((e=>e!==n)),e.modified()},e.removeAllLights=()=>{t.lights=[],e.modified()},e.setLightCollection=n=>{t.lights=n,e.modified()},e.makeLight=mr.newInstance,e.createLight=()=>{t.automaticLightCreation&&(t._createdLight&&(e.removeLight(t._createdLight),t._createdLight.delete(),t._createdLight=null),t._createdLight=e.makeLight(),e.addLight(t._createdLight),t._createdLight.setLightTypeToHeadLight(),t._createdLight.setPosition(e.getActiveCamera().getPosition()),t._createdLight.setFocalPoint(e.getActiveCamera().getFocalPoint()))},e.normalizedDisplayToWorld=(t,n,r,i)=>{let o=e.normalizedDisplayToProjection(t,n,r);return o=e.projectionToView(o[0],o[1],o[2],i),e.viewToWorld(o[0],o[1],o[2])},e.worldToNormalizedDisplay=(t,n,r,i)=>{let o=e.worldToView(t,n,r);return o=e.viewToProjection(o[0],o[1],o[2],i),e.projectionToNormalizedDisplay(o[0],o[1],o[2])},e.viewToWorld=(e,n,r)=>{if(null===t.activeCamera)return Sr("ViewToWorld: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];const i=t.activeCamera.getViewMatrix();Wt.invert(i,i),Wt.transpose(i,i);const o=new Float64Array([e,n,r]);return ir.fF(o,o,i),o},e.projectionToView=(e,n,r,i)=>{if(null===t.activeCamera)return Sr("ProjectionToView: no active camera, cannot compute projection to view, returning 0,0,0"),[0,0,0];const o=t.activeCamera.getProjectionMatrix(i,-1,1);Wt.invert(o,o),Wt.transpose(o,o);const a=new Float64Array([e,n,r]);return ir.fF(a,a,o),a},e.worldToView=(e,n,r)=>{if(null===t.activeCamera)return Sr("WorldToView: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];const i=t.activeCamera.getViewMatrix();Wt.transpose(i,i);const o=new Float64Array([e,n,r]);return ir.fF(o,o,i),o},e.viewToProjection=(e,n,r,i)=>{if(null===t.activeCamera)return Sr("ViewToProjection: no active camera, cannot compute view to projection, returning 0,0,0"),[0,0,0];const o=t.activeCamera.getProjectionMatrix(i,-1,1);Wt.transpose(o,o);const a=new Float64Array([e,n,r]);return ir.fF(a,a,o),a},e.computeVisiblePropBounds=()=>{t.allBounds[0]=xr.ZP.INIT_BOUNDS[0],t.allBounds[1]=xr.ZP.INIT_BOUNDS[1],t.allBounds[2]=xr.ZP.INIT_BOUNDS[2],t.allBounds[3]=xr.ZP.INIT_BOUNDS[3],t.allBounds[4]=xr.ZP.INIT_BOUNDS[4],t.allBounds[5]=xr.ZP.INIT_BOUNDS[5];let r=!0;e.invokeEvent(n);for(let e=0;et.allBounds[1]&&(t.allBounds[1]=e[1]),e[2]t.allBounds[3]&&(t.allBounds[3]=e[3]),e[4]t.allBounds[5]&&(t.allBounds[5]=e[5]))}}return r&&((0,on.u)(t.allBounds),wr("Can't compute bounds, no 3D props are visible")),t.allBounds},e.resetCamera=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const r=n||e.computeVisiblePropBounds(),o=[0,0,0];if(!(0,on.Q)(r))return wr("Cannot reset camera!"),!1;let a=null;if(!e.getActiveCamera())return Sr("Trying to reset non-existent camera"),!1;a=t.activeCamera.getViewPlaneNormal(),t.activeCamera.setViewAngle(30),o[0]=(r[0]+r[1])/2,o[1]=(r[2]+r[3])/2,o[2]=(r[4]+r[5])/2;let s=r[1]-r[0],l=r[3]-r[2],u=r[5]-r[4];s*=s,l*=l,u*=u;let c=s+l+u;c=0===c?1:c,c=.5*Math.sqrt(c);const d=(0,on.r)(t.activeCamera.getViewAngle()),p=c,f=c/Math.sin(.5*d),h=t.activeCamera.getViewUp();return Math.abs((0,on.d)(h,a))>.999&&(Cr("Resetting view-up since view plane normal is parallel"),t.activeCamera.setViewUp(-h[2],h[0],h[1])),t.activeCamera.setFocalPoint(o[0],o[1],o[2]),t.activeCamera.setPosition(o[0]+f*a[0],o[1]+f*a[1],o[2]+f*a[2]),e.resetCameraClippingRange(r),t.activeCamera.setParallelScale(p),t.activeCamera.setPhysicalScale(c),t.activeCamera.setPhysicalTranslation(-o[0],-o[1],-o[2]),e.invokeEvent(i),!0},e.resetCameraClippingRange=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const i=n||e.computeVisiblePropBounds();if(!(0,on.Q)(i))return wr("Cannot reset camera clipping range!"),!1;if(e.getActiveCameraAndResetIfCreated(),!t.activeCamera)return Sr("Trying to reset clipping range of non-existent camera"),!1;const o=t.activeCamera.computeClippingRange(i);let a=0;if(t.activeCamera.getParallelProjection())a=.2*t.activeCamera.getParallelScale();else{const e=(0,on.r)(t.activeCamera.getViewAngle());a=.2*Math.tan(e/2)*o[1]}return o[1]-o[0]=o[1]?.01*o[1]:o[0],t.nearClippingPlaneTolerance||(t.nearClippingPlaneTolerance=.01),o[0]{e!==t._renderWindow&&(t._vtkWindow=e,t._renderWindow=e)},e.visibleActorCount=()=>t.props.filter((e=>e.getVisibility())).length,e.visibleVolumeCount=e.visibleActorCount,e.getMTime=()=>{let e=t.mtime;const n=t.activeCamera?t.activeCamera.getMTime():0;n>e&&(e=n);const r=t._createdLight?t._createdLight.getMTime():0;return r>e&&(e=r),e},e.getTransparent=()=>!!t.preserveColorBuffer,e.isActiveCameraCreated=()=>!!t.activeCamera}const Dr={pickedProp:null,activeCamera:null,allBounds:[],ambient:[1,1,1],allocatedRenderTime:100,timeFactor:1,automaticLightCreation:!0,twoSidedLighting:!0,lastRenderTimeInSeconds:-1,renderWindow:null,lights:[],actors:[],volumes:[],lightFollowCamera:!0,numberOfPropsRendered:0,propArray:null,pathArray:null,layer:0,preserveColorBuffer:!1,preserveDepthBuffer:!1,computeVisiblePropBounds:(0,on.F)(),interactive:!0,nearClippingPlaneTolerance:0,clippingRangeExpansion:.05,erase:!0,draw:!0,useShadows:!1,useDepthPeeling:!1,occlusionRatio:0,maximumNumberOfPeels:4,selector:null,delegate:null,texturedBackground:!1,backgroundTexture:null,environmentTexture:null,environmentTextureDiffuseStrength:1,environmentTextureSpecularStrength:1,useEnvironmentTextureAsBackground:!1,pass:0};function Ar(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(Object.assign(t,Dr,n),br.extend(e,t,n),t.background||(t.background=[0,0,0,1]);t.background.length<3;)t.background.push(0);3===t.background.length&&t.background.push(1),(0,r.g)(e,t,["_renderWindow","allocatedRenderTime","timeFactor","lastRenderTimeInSeconds","numberOfPropsRendered","lastRenderingUsedDepthPeeling","selector"]),(0,r.e)(e,t,["twoSidedLighting","lightFollowCamera","automaticLightCreation","erase","draw","nearClippingPlaneTolerance","clippingRangeExpansion","backingStore","interactive","layer","preserveColorBuffer","preserveDepthBuffer","useDepthPeeling","occlusionRatio","maximumNumberOfPeels","delegate","backgroundTexture","texturedBackground","environmentTexture","environmentTextureDiffuseStrength","environmentTextureSpecularStrength","useEnvironmentTextureAsBackground","useShadows","pass"]),(0,r.k)(e,t,["actors","volumes","lights"]),(0,r.l)(e,t,["background"],4,1),(0,r.i)(e,t,["renderWindow"]),Mr(e,t)}var Pr={newInstance:(0,r.n)(Ar,"vtkRenderer"),extend:Ar};var kr={Corners:{TOP_LEFT:"TOP_LEFT",TOP_RIGHT:"TOP_RIGHT",BOTTOM_LEFT:"BOTTOM_LEFT",BOTTOM_RIGHT:"BOTTOM_RIGHT"}};const{vtkErrorMacro:Lr}=r.m,{Corners:Or}=kr;function Er(e,t){t.classHierarchy.push("vtkOrientationMarkerWidget");const n={...e},r=[],i=Pr.newInstance(),o=new ResizeObserver((t=>{e.updateViewport()}));let a=null,s=null,l=null,u=null,c=null;function d(){t._interactor.isAnimating()||e.updateMarkerOrientation()}t._onParentRendererChanged=()=>e.updateViewport(),e.computeViewport=()=>{const e=t.parentRenderer||t._interactor.getCurrentRenderer(),[n,r,i,o]=e.getViewport(),a=t._interactor.getView(),s=a.getSize(),[l,u]=a.getViewportSize(e),c=Math.min(l,u);let d=t.viewportSize*c;d=Math.max(Math.min(t.minPixelSize,c),Math.min(t.maxPixelSize,d));const p=d/s[0],f=d/s[1];switch(t.viewportCorner){case Or.TOP_LEFT:return[n,o-f,n+p,o];case Or.TOP_RIGHT:return[i-p,o-f,i,o];case Or.BOTTOM_LEFT:return[n,r,n+p,r+f];case Or.BOTTOM_RIGHT:return[i-p,r,i,r+f];default:return Lr("Invalid widget corner"),null}},e.updateViewport=()=>{t.enabled&&(i.setViewport(...e.computeViewport()),t._interactor.render())},e.updateMarkerOrientation=()=>{const e=(t.parentRenderer||t._interactor.getCurrentRenderer()).getActiveCamera();if(!e)return;const n=e.getReferenceByName("position"),o=e.getReferenceByName("focalPoint"),a=e.getReferenceByName("viewUp");if(r[0]!==n[0]||r[1]!==n[1]||r[2]!==n[2]||r[3]!==o[0]||r[4]!==o[1]||r[5]!==o[2]||r[6]!==a[0]||r[7]!==a[1]||r[8]!==a[2]){r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=o[0],r[4]=o[1],r[5]=o[2],r[6]=a[0],r[7]=a[1],r[8]=a[2];const e=i.getActiveCamera();e.setPosition(n[0],n[1],n[2]),e.setFocalPoint(o[0],o[1],o[2]),e.setViewUp(a[0],a[1],a[2]),i.resetCamera()}},e.setEnabled=n=>{if(n){if(t.enabled)return;if(!t.actor)return void Lr("Must set actor before enabling orientation marker.");if(!t._interactor)return void Lr("Must set interactor before enabling orientation marker.");const n=t.parentRenderer||t._interactor.getCurrentRenderer(),r=n.getRenderWindow();r.addRenderer(i),r.getNumberOfLayers()<2&&r.setNumberOfLayers(2),i.setLayer(r.getNumberOfLayers()-1),i.setInteractive(!1),i.addViewProp(t.actor),t.actor.setVisibility(!0),a=n.onEvent((e=>{"ActiveCameraEvent"===e.type&&(s&&s.unsubscribe(),s=e.camera.onModified(d))})),s=n.getActiveCamera().onModified(d),l=t._interactor.onAnimation(e.updateMarkerOrientation),u=t._interactor.onEndAnimation(e.updateMarkerOrientation),o.observe(t._interactor.getView().getCanvas()),e.updateViewport(),e.updateMarkerOrientation(),t.enabled=!0}else{if(!t.enabled)return;t.enabled=!1,o.disconnect(),a.unsubscribe(),a=null,s.unsubscribe(),s=null,l.unsubscribe(),l=null,u.unsubscribe(),u=null,t.actor.setVisibility(!1),i.removeViewProp(t.actor);const e=t._interactor?.findPokedRenderer()?.getRenderWindow();e&&e.removeRenderer(i)}e.modified()},e.setViewportCorner=n=>{n!==t.viewportCorner&&(t.viewportCorner=n,e.updateViewport())},e.setViewportSize=n=>{const r=Math.min(1,Math.max(0,n));r!==t.viewportSize&&(t.viewportSize=r,e.updateViewport())},e.setActor=n=>{const r=t.enabled;e.setEnabled(!1),t.actor=n,e.setEnabled(r)},e.getRenderer=()=>i,e.delete=()=>{n.delete(),c&&(c.unsubscribe(),c=null),a&&(a.unsubscribe(),a=null),s&&(s.unsubscribe(),s=null),l&&(l.unsubscribe(),l=null),u&&(u.unsubscribe(),u=null),o.disconnect()},c=e.onModified(e.updateViewport)}const Ir={viewportCorner:kr.Corners.BOTTOM_LEFT,viewportSize:.2,minPixelSize:50,maxPixelSize:200,parentRenderer:null};function Nr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ir,n),r.m.obj(e,t),r.m.get(e,t,["enabled","viewportCorner","viewportSize"]),r.m.setGet(e,t,["_interactor","minPixelSize","maxPixelSize","parentRenderer"]),r.m.get(e,t,["actor"]),r.m.moveToProtected(e,t,["interactor"]),Er(e,t)}var Rr={newInstance:r.m.newInstance(Nr,"vtkOrientationMarkerWidget"),extend:Nr,...kr},Br=n(542);function Fr(e,t){t.classHierarchy.push("vtkCompositeCameraManipulator"),e.computeDisplayCenter=(e,n)=>{const r=e.computeWorldToDisplay(n,t.center[0],t.center[1],t.center[2]);t.displayCenter[0]=r[0],t.displayCenter[1]=r[1]}}const Vr={center:[0,0,0],rotationFactor:1,displayCenter:[0,0]};var Ur={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vr,n),r.m.setGet(e,t,["rotationFactor"]),r.m.setGetArray(e,t,["displayCenter"],2),r.m.setGetArray(e,t,["center"],3),Fr(e,t)}};function Gr(e,t){t.classHierarchy.push("vtkCompositeGestureManipulator"),e.startInteraction=()=>{},e.endInteraction=()=>{},e.onStartPinch=(e,t)=>{},e.onStartRotate=(e,t)=>{},e.onStartPan=(e,t)=>{},e.onPinch=(e,t,n)=>{},e.onRotate=(e,t,n)=>{},e.onPan=(e,t,n)=>{},e.onEndPinch=e=>{},e.onEndRotate=e=>{},e.onEndPan=e=>{},e.isPinchEnabled=()=>t.pinchEnabled,e.isPanEnabled=()=>t.panEnabled,e.isRotateEnabled=()=>t.rotateEnabled}const zr={pinchEnabled:!0,panEnabled:!0,rotateEnabled:!0};var jr={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zr,n),r.m.set(e,t,["pinchEnabled","panEnabled","rotateEnabled"]),r.m.setGet(e,t,["interactorStyle"]),Gr(e,t)}};function Yr(e,t){t.classHierarchy.push("vtkCompositeKeyboardManipulator"),e.onKeyPress=(e,t,n)=>{},e.onKeyDown=(e,t,n)=>{},e.onKeyUp=(e,t,n)=>{}}const Hr={};var Wr={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hr,n),Yr(e,t)}},$r=n(22),Zr=n(322);function Kr(e,t){t.classHierarchy.push("vtkCompositeVRManipulator"),e.onButton3D=(e,t,n,r,i,o)=>{},e.onMove3D=(e,t,n,r,i,o)=>{}}const qr={};var Xr={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qr,n),r.m.setGet(e,t,["device","input"]),Kr(e,t)},Device:Zr.AS,Input:Zr.II};function Jr(e,t){t.classHierarchy.push("vtkGestureCameraManipulator"),e.onStartPinch=(e,n)=>{t.previousScale=n},e.onStartRotate=(e,n)=>{t.previousRotation=n},e.onStartPan=(e,n)=>{t.previousTranslation=n},e.onPinch=(e,n,r)=>{pe.dollyByFactor(e,n,r/t.previousScale),t.previousScale=r},e.onPan=(e,n,r)=>{const i=n.getActiveCamera(),o=e.getInteractorStyle();let a=i.getFocalPoint();a=o.computeWorldToDisplay(n,a[0],a[1],a[2]);const s=a[2],l=r,u=t.previousTranslation,c=o.computeDisplayToWorld(n,a[0]+l[0]-u[0],a[1]+l[1]-u[1],s),d=o.computeDisplayToWorld(n,a[0],a[1],s),p=[];p[0]=d[0]-c[0],p[1]=d[1]-c[1],p[2]=d[2]-c[2],a=i.getFocalPoint();const f=i.getPosition();i.setFocalPoint(p[0]+a[0],p[1]+a[1],p[2]+a[2]),i.setPosition(p[0]+f[0],p[1]+f[1],p[2]+f[2]),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),i.orthogonalizeViewUp(),t.previousTranslation=r},e.onRotate=(e,n,r)=>{const i=n.getActiveCamera();i.roll(r-t.previousRotation),i.orthogonalizeViewUp(),t.previousRotation=r}}const Qr={};function ei(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qr,n),r.m.obj(e,t),jr.extend(e,t,n),Ur.extend(e,t,n),Jr(e,t)}var ti={newInstance:r.m.newInstance(ei,"vtkGestureCameraManipulator"),extend:ei};const{vtkErrorMacro:ni}=r.m,ri="vtkKeyboardCameraManipulator";function ii(e,t){t.classHierarchy.push("vtkKeyboardCameraManipulator");const n={keysDown:[],direction:[0,0,0],skipUpdateDirection:!1,animationSub:null,cameraModifiedSub:null};e.inMotion=()=>null!==n.animationSub,e.resetMovementSpeed=()=>{const{renderer:e}=t,n=e.computeVisiblePropBounds();t.movementSpeed=xr.ZP.getMaxLength(n)/500},e.startMovement=()=>{if(e.inMotion())return void ni("Camera is already in motion!");null===t.movementSpeed&&e.resetMovementSpeed();const{interactor:r,renderer:i}=t;e.calculateCurrentDirection();const o=i.getActiveCamera();n.cameraModifiedSub=o.onModified(e.calculateCurrentDirection),r.requestAnimation(ri),n.animationSub=r.onAnimation((()=>{0!==n.keysDown.length&&(n.skipUpdateDirection=!0,e.moveCamera(i.getActiveCamera(),n.direction,t.movementSpeed),i.resetCameraClippingRange(),r.getLightFollowCamera()&&i.updateLightsGeometryToFollowCamera(),n.skipUpdateDirection=!1)}))},e.endMovement=()=>{n.animationSub&&(n.animationSub.unsubscribe(),n.animationSub=null),t._interactor.cancelAnimation(ri),n.cameraModifiedSub&&(n.cameraModifiedSub.unsubscribe(),n.cameraModifiedSub=null)},e.calculateCurrentDirection=()=>{if(n.skipUpdateDirection)return;n.direction=[0,0,0];const{renderer:r}=t;if(!r)return;const i=r.getActiveCamera();if(!i)return;if(0===n.keysDown.length)return;let o=n.keysDown.map((t=>e.getDirectionFromKey(t,i)));if(o=o.filter((e=>e)),0===o.length)return;const a=o.reduce(((e,t)=>((0,on.k)(e,t,t),t)));(0,on.l)(a),n.direction=a},e.getDirectionFromKey=(e,n)=>{let r;if(t.moveForwardKeys.includes(e))r=n.getDirectionOfProjection();else if(t.moveLeftKeys.includes(e)){const e=n.getDirectionOfProjection();r=[0,0,0],(0,on.j)(n.getViewUp(),e,r)}else if(t.moveBackwardKeys.includes(e))r=n.getDirectionOfProjection().map((e=>-e));else if(t.moveRightKeys.includes(e)){const e=n.getDirectionOfProjection();r=[0,0,0],(0,on.j)(e,n.getViewUp(),r)}else if(t.moveUpKeys.includes(e))r=n.getViewUp();else{if(!t.moveDownKeys.includes(e))return;r=n.getViewUp().map((e=>-e))}return(0,on.l)(r),r},e.moveCamera=(e,t,n)=>{const r=e.getPosition(),i=e.getFocalPoint();e.setFocalPoint(i[0]+t[0]*n,i[1]+t[1]*n,i[2]+t[2]*n),e.setPosition(r[0]+t[0]*n,r[1]+t[1]*n,r[2]+t[2]*n)},e.onKeyPress=(e,t,n)=>{},e.onKeyDown=(r,i,o)=>{n.keysDown.includes(o)||(n.keysDown.push(o),e.calculateCurrentDirection()),e.inMotion()||(Object.assign(t,{interactor:r,renderer:i}),e.startMovement())},e.onKeyUp=(t,r,i)=>{n.keysDown=n.keysDown.filter((e=>e.toUpperCase()!==i.toUpperCase())),e.calculateCurrentDirection(),0===n.keysDown.length&&e.endMovement()}}const oi={movementSpeed:null,moveForwardKeys:["w","W","ArrowUp"],moveLeftKeys:["a","A","ArrowLeft"],moveBackwardKeys:["s","S","ArrowDown"],moveRightKeys:["d","D","ArrowRight"],moveUpKeys:[" "],moveDownKeys:["Shift"],interactor:null,renderer:null};function ai(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oi,n),r.m.obj(e,t),Wr.extend(e,t,n),r.m.setGet(e,t,["movementSpeed","moveForwardKeys","moveLeftKeys","moveBackwardKeys","moveRightKeys","moveUpKeys","moveDownKeys","interactor","renderer"]),ii(e,t)}var si={newInstance:r.m.newInstance(ai,"vtkKeyboardCameraManipulator"),extend:ai};const li=[-2,-1,-2,-1],ui={position:"absolute",zIndex:1,border:"2px solid #F44336",backgroundColor:"rgba(0, 0, 0, 0.1)",borderRadius:"4px",boxSizing:"border-box"};function ci(e,t){t.classHierarchy.push("vtkMouseBoxSelectionManipulator");let n=null,r=null,i=null,o=null,a=null,s=!1;function l(){return i&&o?[Math.min(i.x,o.x),Math.max(i.x,o.x),Math.min(i.y,o.y),Math.max(i.y,o.y)]:li}function u(){if(!n||!r)return;const[e,t]=n.getSize(),{width:i,height:o}=r.getBoundingClientRect(),[s,u,c,d]=l();a.style.left=i*s/e+"px",a.style.top=o-o*d/t+"px",a.style.width=i*(u-s)/e+"px",a.style.height=o*(d-c)/t+"px"}e.onButtonDown=(e,o,l)=>{i=l,t.renderSelection&&(n||(n=e.getView()),!r&&n?.getContainer&&(r=n.getContainer()),r||(r=t.container),a||(a=document.createElement("div"),function(e,t){Object.keys(t).forEach((n=>{e.style[n]=t[n]}))}(a,t.selectionStyle)),u(),r&&!s&&(s=!0,r.appendChild(a)))},e.onMouseMove=(a,s,c)=>{i&&c&&(o=c,e.invokeBoxSelectInput({view:n,container:r,selection:l()}),t.renderSelection&&u())},e.onButtonUp=(u,c)=>{i&&(o||t.boxChangeOnClick)&&(o||(o=i),e.invokeBoxSelectChange({view:n,container:r,selection:l()}),s&&(a.parentElement.removeChild(a),s=!1),n=null,r=null,i=null,o=null)}}function di(e){return{boxChangeOnClick:!1,renderSelection:!0,...e,selectionStyle:{...ui,...e.selectionStyle}}}function pi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,di(n)),(0,r.o)(e,t),$r.Z.extend(e,t,n),(0,r.f)(e,t,"BoxSelectChange"),(0,r.f)(e,t,"BoxSelectInput"),(0,r.e)(e,t,["renderSelection","boxChangeOnClick","selectionStyle","container"]),ci(e,t)}var fi={newInstance:(0,r.n)(pi,"vtkMouseBoxSelectionManipulator"),extend:pi};function hi(e,t){t.classHierarchy.push("vtkMouseCameraAxisRotateManipulator");const n=new Float64Array(3),r=new Float64Array(3),i=new Float64Array(3),o=new Float64Array(3),a=new Float64Array(16),s=new Float64Array(16),l=new Float64Array(3),u=new Float64Array(3),c=new Float64Array(3);e.onButtonDown=(e,n,r)=>{t.previousPosition=r},e.onMouseMove=(e,d,p)=>{if(!p)return;const f=d.getActiveCamera(),h=f.getPosition(),m=f.getFocalPoint(),g=f.getViewUp(),v=f.getDirectionOfProjection();ir.tk(n,v),Wt.identity(a),Wt.identity(s);const{center:y,rotationFactor:_,rotationAxis:b}=t;ir.tk(c,b);const x=t.previousPosition.x-p.x,w=t.previousPosition.y-p.y,S=e.getView().getViewportSize(d),C=(0,on.r)(360*x/S[0]*_);Wt.rotate(s,s,C,b),(0,on.j)(v,g,l);let T=(0,on.r)(-360*w/S[1]*_);const M=Math.acos(ir.AK(n,b)),D=Math.acos(ir.AK(n,c)),A=M<=D,P=Math.min(M,D);t.useHalfAxis&&!A?T=Math.PI/2-M:A&&P+T<0?T=-P:!A&&M+T>Math.PI&&(T=P),Wt.rotate(s,s,T,l),Wt.translate(a,a,y),Wt.multiply(a,a,s),ir.tk(u,y),Wt.translate(a,a,u),ir.fF(r,h,a),ir.fF(i,m,a),ir.fF(o,g,s),f.setPosition(r[0],r[1],r[2]),f.setFocalPoint(i[0],i[1],i[2]),f.setViewUp(o),d.resetCameraClippingRange(),e.getLightFollowCamera()&&d.updateLightsGeometryToFollowCamera(),t.previousPosition=p}}const mi={rotationAxis:[0,0,1],useHalfAxis:!0};function gi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mi,n),r.m.obj(e,t),r.m.setGet(e,t,["rotationAxis","useHalfAxis"]),$r.Z.extend(e,t,n),Ur.extend(e,t,n),hi(e,t)}var vi={newInstance:r.m.newInstance(gi,"vtkMouseCameraAxisRotateManipulator"),extend:gi};function yi(e,t){t.classHierarchy.push("vtkMouseCameraSliceManipulator"),e.onButtonDown=(e,n,r)=>{t.previousPosition=r},e.onMouseMove=(e,n,r)=>{if(!r)return;const i=r.y-t.previousPosition.y,o=n.getActiveCamera(),a=o.getClippingRange();let s=o.getDistance(),l=0;if(o.getParallelProjection())l=2*o.getParallelScale();else{const e=(0,on.r)(o.getViewAngle());l=2*s*Math.tan(.5*e)}s+=i*l/e.getView().getViewportSize(n)[1],sa[1]&&(s=a[1]-.001*l),o.setDistance(s),t.previousPosition=r},e.onScroll=(e,t,n)=>{if(!n)return;let r=1-n;r*=25;const i=t.getActiveCamera(),o=i.getClippingRange();let a=i.getDistance();a+=r,ao[1]&&(a=o[1]),i.setDistance(a)}}const _i={};function bi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_i,n),r.m.obj(e,t),Ur.extend(e,t,n),$r.Z.extend(e,t,n),yi(e,t)}var xi={newInstance:r.m.newInstance(bi,"vtkMouseCameraSliceManipulator"),extend:bi},wi=n(470),Si=n(323),Ci=n(106);const{States:Ti}=K;function Mi(e,t){t.classHierarchy.push("vtkMouseCameraUnicamRotateManipulator"),t.picker=wi.ZP.newInstance(),t.downPoint=[0,0,0],t.isDot=!1,t.state=Ti.IS_NONE;const n=Si.ZP.newInstance();n.setThetaResolution(6),n.setPhiResolution(6);const r=o.ZP.newInstance();r.setInputConnection(n.getOutputPort()),t.focusSphere=i.ZP.newInstance(),t.focusSphere.setMapper(r),t.focusSphere.getProperty().setColor(.89,.66,.41),t.focusSphere.getProperty().setAmbient(1),t.focusSphere.getProperty().setDiffuse(0),t.focusSphere.getProperty().setRepresentationToWireframe();const a=e=>{if(e){if(t.useWorldUpVec){const n=e.findPokedRenderer().getActiveCamera();(0,on.B)(t.worldUpVec,n.getViewPlaneNormal())||n.setViewUp(t.worldUpVec)}e.render()}},s=(e,t)=>{const n=t.findPokedRenderer(),[r,i]=t.getView().getViewportSize(n);return{x:2*e.x/r-1,y:2*e.y/i-1}},l=(e,t,n,r,i,o,a,s)=>{const l=e.getPosition(),u=e.getFocalPoint(),c=e.getViewUp();l[3]=1,u[3]=1,c[3]=0;const d=Wt.identity(new Float64Array(16));Wt.translate(d,d,[t,n,r]),Wt.rotate(d,d,s,[i,o,a]),Wt.translate(d,d,[-t,-n,-r]);const p=[],f=[];ir.fF(p,l,d),ir.fF(f,u,d),Wt.identity(d),Wt.rotate(d,d,s,[i,o,a]);const h=[];ir.fF(h,c,d),e.setPosition(...p),e.setFocalPoint(...f),e.setViewUp(...h)},u=e=>{(e=>{const n=e.findPokedRenderer();t.focusSphere.setPosition(...t.downPoint);const r=n.getActiveCamera(),i=r.getPosition(),o=[];(0,on.s)(t.downPoint,i,o),r.getParallelProjection()&&(0,on.w)(o,r.getParallelScale());const a=r.getDirectionOfProjection();(0,on.l)(a);const s=.02*(0,on.d)(a,o)*t.focusSphereRadiusFactor;t.focusSphere.setScale(s,s,s)})(e),e.findPokedRenderer().addActor(t.focusSphere),t.isDot=!0},c=(e,n)=>{const r=e.findPokedRenderer();let i=null;if(t.useHardwareSelector){const t=e.getView().getSelector();t.setCaptureZValues(!0),t.setFieldAssociation(Ci.M_.FIELD_ASSOCIATION_POINTS),t.attach(e.getView(),r),t.setArea(n.x,n.y,n.x,n.y),i=t.select()}return i&&0!==i.length?Array.from(i[0].getProperties().worldPosition):((e,n)=>{const r=e.findPokedRenderer();t.picker.pick([n.x,n.y,n.z],r);const i=t.picker.getPickedPositions();if(0===i.length)return t.picker.getPickPosition();const o=r.getActiveCamera().getPosition();return i.sort(((e,t)=>(0,on.e)(e,o)-(0,on.e)(t,o))),i[0]})(e,n)};e.onButtonDown=(e,n,r)=>{t.buttonPressed=!0,t.startPosition=r,t.previousPosition=r;const i=s(r,e);if(Math.abs(i.x)>.9||Math.abs(i.y)>.9)return t.state=Ti.IS_ROTATE,void u(e);t.downPoint=c(e,r),t.isDot?t.state=Ti.IS_ROTATE:(t.state=Ti.IS_NONE,t.displayFocusSphereOnButtonDown&&u(e))},e.onMouseMove=(n,r,i)=>{t.buttonPressed&&(t.state=Ti.IS_ROTATE,((n,r)=>{const i=n.findPokedRenderer(),o=s(r,n),u=s(t.previousPosition,n),c=t.focusSphere.getPosition();let d=n.getView().worldToDisplay(...c,i);d=s({x:c[0],y:c[1]},n),d=[d.x,d.y,c[2]];const p=(1+Math.abs(d[0]))**2,f=[u.x,0,0],h=[o.x,0,0],m=f[0]**2,g=h[0]**2,v=m>p?0:Math.sqrt(p-m),y=g>p?0:Math.sqrt(p-g),_=[f[0],0,v];(0,on.l)(_);const b=[h[0],0,y];(0,on.l)(b);const x=(0,on.d)(_,b);if(Math.abs(x)>1e-4){const s=-2*Math.acos((0,on.C)(x,-1,1))*Math.sign(o.x-u.x)*e.getRotationFactor(),d=i.getActiveCamera(),p=t.useWorldUpVec?t.worldUpVec:d.getViewUp();(0,on.l)(p),l(d,...c,...p,s);const f=[],h=d.getPosition();(0,on.s)(h,r,f);let m=(o.y-u.y)*e.getRotationFactor();(0,on.l)(f);const g=d.getViewPlaneNormal(),v=d.getViewUp(),y=[];if((0,on.j)(v,g,y),(0,on.l)(y),t.useWorldUpVec){const e=.99;(0,on.d)(p,g)>e&&m<0&&(m=0),(0,on.d)(p,g)<-e&&m>0&&(m=0)}l(d,...c,...y,m),t.useWorldUpVec&&!(0,on.B)(p,d.getViewPlaneNormal())&&d.setViewUp(...p),t.previousPosition=r,i.resetCameraClippingRange(),a(n)}})(n,i),t.previousPosition=i)},e.onButtonUp=e=>{const n=e.findPokedRenderer();t.buttonPressed=!1,(t.state!==Ti.IS_ROTATE||t.isDot)&&(t.state===Ti.IS_ROTATE?(e=>{e.findPokedRenderer().removeActor(t.focusSphere),t.isDot=!1})(e):t.state===Ti.IS_NONE&&u(e),n.resetCameraClippingRange(),a(e))},e.getFocusSphereColor=()=>{t.focusSphere.getProperty().getColor()},e.setFocusSphereColor=(e,n,r)=>{t.focusSphere.getProperty().setColor(e,n,r)}}const Di={focusSphereRadiusFactor:1,displayFocusSphereOnButtonDown:!0,useHardwareSelector:!0,useWorldUpVec:!0,worldUpVec:[0,0,1]};function Ai(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Di,n),r.m.obj(e,t),Ur.extend(e,t,n),$r.Z.extend(e,t,n),r.m.setGet(e,t,["focusSphereRadiusFactor","displayFocusSphereOnButtonDown","useHardwareSelector","useWorldUpVec"]),r.m.get(e,t,["state"]),r.m.getArray(e,t,["downPoint"],3),r.m.setGetArray(e,t,["worldUpVec"],3),Mi(e,t)}var Pi={newInstance:r.m.newInstance(Ai,"vtkMouseCameraUnicamRotateManipulator"),extend:Ai};const{States:ki}=K;function Li(e,t){t.classHierarchy.push("vtkMouseCameraUnicamManipulator"),t.state=ki.IS_NONE,t.rotateManipulator=Pi.newInstance({button:t.button,shift:t.shift,control:t.control,alt:t.alt,dragEnabled:t.dragEnabled,scrollEnabled:t.scrollEnabled,displayFocusSphereOnButtonDown:!1});const n=(e,t)=>{const n=t.findPokedRenderer(),[r,i]=t.getView().getViewportSize(n);return{x:2*e.x/r-1,y:2*e.y/i-1}},r=(e,t)=>{const n=t.findPokedRenderer().getActiveCamera(),r=n.getPosition(),i=[0,0,0];(0,on.s)(e,r,i),n.getParallelProjection()&&(0,on.w)(i,n.getParallelScale());const o=n.getViewPlaneNormal();(0,on.l)(o);const a=(0,on.d)(i,o),s=(0,on.r)(n.getViewAngle()),l=t.findPokedRenderer(),[u,c]=t.getView().getViewportSize(l),d=u/c*(2*a*Math.tan(s/2)/2),p=2*a*Math.tan(s/2)/2,f=n.getViewUp(),h=[];return(0,on.j)(f,o,h),(0,on.j)(o,h,f),(0,on.l)(h),(0,on.l)(f),(0,on.w)(h,d),(0,on.w)(f,p),{rightV:h,upV:f}};e.onButtonDown=(e,n,r)=>{t.buttonPressed=!0,t.startPosition=r,t.previousPosition=r,t.time=Date.now()/1e3,t.dist=0,t.rotateManipulator.onButtonDown(e,n,r),t.downPoint=t.rotateManipulator.getDownPoint()},e.onMouseMove=(e,i,o)=>{if(t.buttonPressed){if(t.rotateManipulator.getState()===ki.IS_ROTATE)t.rotateManipulator.onMouseMove(e,i,o);else switch(t.state){case ki.IS_NONE:((e,r)=>{const i=n(r,e),o=n(t.previousPosition,e),a=i.x-o.x,s=i.y-o.y;t.previousPosition=r;const l=Date.now()/1e3-t.time;t.dist+=Math.sqrt(a**2+s**2);const u={x:r.x-t.startPosition.x,y:r.y-t.startPosition.y},c=Math.sqrt(u.x**2+u.y**2);Math.abs(u.y)/c>.9&&l>.05?t.state=ki.IS_DOLLY:(l>=.1||t.dist>=.03)&&(Math.abs(u.x)/c>.6?t.state=ki.IS_PAN:t.state=ki.IS_DOLLY)})(e,o);break;case ki.IS_PAN:((e,i)=>{const o=e.findPokedRenderer(),a=n(i,e),s=n(t.previousPosition,e),l=a.x-s.x,u=a.y-s.y,c=o.getActiveCamera();t.previousPosition=i;const{rightV:d,upV:p}=r(t.downPoint,e),f=[];for(let e=0;e<3;e++)f[e]=l*d[e]+u*p[e];c.translate(...f),o.resetCameraClippingRange(),e.render()})(e,o);break;case ki.IS_DOLLY:((e,i)=>{const o=e.findPokedRenderer(),a=n(i,e),s=n(t.previousPosition,e),l={x:a.x-s.x,y:a.y-s.y},u=o.getActiveCamera(),c=u.getPosition();if(u.getParallelProjection())u.zoom(1-l.y);else{const e=[];(0,on.s)(t.downPoint,c,e),(0,on.w)(e,-4*l.y),u.translate(...e)}const{rightV:d}=r(t.downPoint,e);(0,on.w)(d,l.x),u.translate(...d),o.resetCameraClippingRange(),e.render()})(e,o)}t.previousPosition=o}},e.onButtonUp=e=>{t.buttonPressed=!1,t.state===ki.IS_NONE&&t.rotateManipulator.onButtonUp(e),t.state=ki.IS_NONE},e.getUseWorldUpVec=()=>t.rotateManipulator.getUseWorldUpVec(),e.setUseWorldUpVec=e=>{t.rotateManipulator.setUseWorldUpVec(e)},e.getWorldUpVec=()=>t.rotateManipulator.getWorldUpVec(),e.setWorldUpVec=(e,n,r)=>{t.rotateManipulator.setWorldUpVec(e,n,r)},e.getUseHardwareSelector=()=>t.rotateManipulator.getUseHardwareSelector(),e.setUseHardwareSelector=e=>{t.rotateManipulator.setUseHardwareSelector(e)},e.getFocusSphereColor=()=>{t.rotateManipulator.getFocusSphereColor()},e.setFocusSphereColor=(e,n,r)=>{t.rotateManipulator.setFocusSphereColor(e,n,r)},e.getFocusSphereRadiusFactor=()=>t.rotateManipulator.getFocusSphereRadiusFactor(),e.setFocusSphereRadiusFactor=e=>{t.rotateManipulator.setFocusSphereRadiusFactor(e)}}const Oi={};function Ei(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Oi,n),r.m.obj(e,t),Ur.extend(e,t,n),$r.Z.extend(e,t,n),Li(e,t)}var Ii={newInstance:r.m.newInstance(Ei,"vtkMouseCameraUnicamManipulator"),extend:Ei};function Ni(e,t){t.classHierarchy.push("vtkMouseCameraTrackballFirstPersonManipulator");const n={interactor:null,renderer:null,previousPosition:null};e.onButtonDown=(r,i,o)=>{n.previousPosition=o,t.usePointerLock&&!r.isPointerLocked()&&(Object.assign(n,{interactor:r,renderer:i}),r.requestPointerLock(),e.startPointerLockInteraction())},e.startPointerLockInteraction=()=>{const{interactor:t}=n;document.addEventListener("mousemove",e.onPointerLockMove);let r=null;r=t.onEndPointerLock((()=>{document.removeEventListener("mousemove",e.onPointerLockMove),r.unsubscribe()}))},e.onPointerLockMove=n=>{const r=t.sensitivity,i=-1*n.movementX*r,o=-1*n.movementY*r;e.moveCamera(i,o)},e.onMouseMove=(r,i,o)=>{if(!o)return;const{previousPosition:a}=n,s=t.sensitivity,l=(a.x-o.x)*s,u=(o.y-a.y)*s;Object.assign(n,{interactor:r,renderer:i}),e.moveCamera(l,u),n.previousPosition=o},e.moveCamera=(e,r)=>{const{renderer:i,interactor:o}=n,a=i.getActiveCamera(),s=t.numAnimationSteps,l=e/s,u=r/s,c=`vtkMouseCameraTrackballFirstPersonManipulator.${performance.now().toString()}`;let d=0,p=null;o.requestAnimation(c),p=o.onAnimation((()=>(a.yaw(l),a.pitch(u),a.orthogonalizeViewUp(),d+=1,void(d===s&&(p.unsubscribe(),i.resetCameraClippingRange(),o.getLightFollowCamera()&&i.updateLightsGeometryToFollowCamera(),setTimeout((()=>{n.interactor.cancelAnimation(c)}),0))))))}}const Ri={numAnimationSteps:5,sensitivity:.05,usePointerLock:!0};function Bi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ri,n),r.m.obj(e,t),Ur.extend(e,t,n),$r.Z.extend(e,t,n),r.m.setGet(e,t,["numAnimationSteps","sensitivity","usePointerLock"]),Ni(e,t)}var Fi={newInstance:r.m.newInstance(Bi,"vtkMouseCameraTrackballFirstPersonManipulator"),extend:Bi};function Vi(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRotateManipulator");const n=new Float64Array(3),r=new Float64Array(3),i=new Float64Array(3),o=new Float64Array(16),a=new Float64Array(3),s=new Float64Array(3),l=new Float64Array(3);e.onButtonDown=(e,n,r)=>{t.previousPosition=r},e.onMouseMove=(e,u,c)=>{if(!c)return;const d=u.getActiveCamera(),p=d.getPosition(),f=d.getFocalPoint();Wt.identity(o);const{center:h,rotationFactor:m}=t;t.useFocalPointAsCenterOfRotation&&(h[0]=f[0],h[1]=f[1],h[2]=f[2]);const g=t.previousPosition.x-c.x,v=t.previousPosition.y-c.y,y=e.getView().getViewportSize(u),_=d.getViewUp();if(t.useWorldUpVec){const e=new Float64Array(3);ir.JG(e,t.worldUpVec),(0,on.w)(e,(0,on.d)(p,t.worldUpVec)/(0,on.d)(t.worldUpVec,t.worldUpVec)),(0,on.k)(h,e,e),Wt.translate(o,o,e),Wt.rotate(o,o,(0,on.r)(360*g/y[0]*m),t.worldUpVec),e[0]=-e[0],e[1]=-e[1],e[2]=-e[2],Wt.translate(o,o,e),Wt.translate(o,o,h)}else Wt.translate(o,o,h),Wt.rotate(o,o,(0,on.r)(360*g/y[0]*m),_);(0,on.j)(d.getDirectionOfProjection(),_,a),Wt.rotate(o,o,(0,on.r)(-360*v/y[1]*m),a),s[0]=-h[0],s[1]=-h[1],s[2]=-h[2],Wt.translate(o,o,s),ir.fF(n,p,o),ir.fF(r,f,o),l[0]=_[0]+p[0],l[1]=_[1]+p[1],l[2]=_[2]+p[2],ir.fF(i,l,o),d.setPosition(n[0],n[1],n[2]),d.setFocalPoint(r[0],r[1],r[2]),d.setViewUp(i[0]-n[0],i[1]-n[1],i[2]-n[2]),d.orthogonalizeViewUp(),u.resetCameraClippingRange(),e.getLightFollowCamera()&&u.updateLightsGeometryToFollowCamera(),t.previousPosition=c}}const Ui={useWorldUpVec:!1,worldUpVec:[0,1,0],useFocalPointAsCenterOfRotation:!1};function Gi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ui,n),r.m.obj(e,t),$r.Z.extend(e,t,n),Ur.extend(e,t,n),r.m.setGet(e,t,["useWorldUpVec"]),r.m.setGetArray(e,t,["worldUpVec"],3),r.m.setGet(e,t,["useFocalPointAsCenterOfRotation"]),Vi(e,t)}var zi={newInstance:r.m.newInstance(Gi,"vtkMouseCameraTrackballRotateManipulator"),extend:Gi};function ji(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRollManipulator");const n=new Float64Array(3),r=new Float64Array(3),i=new Float64Array(3),o=new Float64Array(16),a=new Float64Array(3),s=new Float64Array(3),l=new Float64Array(3);e.onButtonDown=(e,n,r)=>{t.previousPosition=r},e.onMouseMove=(u,c,d)=>{if(!d)return;const p=c.getActiveCamera(),f=p.getPosition(),h=p.getFocalPoint(),m=p.getViewUp();n[0]=h[0]-f[0],n[1]=h[1]-f[1],n[2]=h[2]-f[2],e.computeDisplayCenter(u.getInteractorStyle(),c);const g=t.previousPosition.x-t.displayCenter[0],v=d.x-t.displayCenter[0],y=t.previousPosition.y-t.displayCenter[1],_=d.y-t.displayCenter[1];if(0===v&&0===_||0===g&&0===y)return;const b=(0,on.A)((g*_-y*v)/(Math.sqrt(g*g+y*y)*Math.sqrt(v*v+_*_))),{center:x}=t;Wt.identity(o),i[0]=-x[0],i[1]=-x[1],i[2]=-x[2],Wt.translate(o,o,x),Wt.rotate(o,o,(0,on.r)(b),n),Wt.translate(o,o,i),ir.fF(a,f,o),ir.fF(s,h,o),r[0]=m[0]+f[0],r[1]=m[1]+f[1],r[2]=m[2]+f[2],ir.fF(l,r,o),p.setPosition(a[0],a[1],a[2]),p.setFocalPoint(s[0],s[1],s[2]),p.setViewUp(l[0]-a[0],l[1]-a[1],l[2]-a[2]),p.orthogonalizeViewUp(),c.resetCameraClippingRange(),u.getLightFollowCamera()&&c.updateLightsGeometryToFollowCamera(),t.previousPosition=d}}const Yi={};function Hi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yi,n),r.m.obj(e,t),Ur.extend(e,t,n),$r.Z.extend(e,t,n),ji(e,t)}var Wi={newInstance:r.m.newInstance(Hi,"vtkMouseCameraTrackballRollManipulator"),extend:Hi};function $i(e){return e*e}function Zi(e,t){t.classHierarchy.push("vtkMouseCameraTrackballMultiRotateManipulator");const n=zi.newInstance(),r=Wi.newInstance();let i=null;e.onButtonDown=(t,o,a)=>{const s=t.getView().getViewportSize(o),l=[.5*s[0],.5*s[1]],u=.9*((c=l[0])<(d=l[1])?d:c);var c,d;const p=$i(l[0]-a.x)+$i(l[1]-a.y);i=u*u>p?n:r,i.setButton(e.getButton()),i.setShift(e.getShift()),i.setControl(e.getControl()),i.setCenter(e.getCenter()),i.onButtonDown(t,a)},e.onButtonUp=e=>{i&&i.onButtonUp(e)},e.onMouseMove=(e,t,n)=>{i&&i.onMouseMove(e,t,n)}}const Ki={};function qi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ki,n),r.m.obj(e,t),$r.Z.extend(e,t,n),Ur.extend(e,t,n),Zi(e,t)}var Xi={newInstance:r.m.newInstance(qi,"vtkMouseCameraTrackballMultiRotateManipulator"),extend:qi};function Ji(e,t){t.classHierarchy.push("vtkMouseCameraTrackballPanManipulator"),e.onButtonDown=(e,n,r)=>{t.previousPosition=r},e.onMouseMove=(e,n,r)=>{if(!r)return;const i=r,o=t.previousPosition;t.previousPosition=r;const a=n.getActiveCamera(),s=a.getPosition(),l=a.getFocalPoint();if(a.getParallelProjection()){a.orthogonalizeViewUp();const t=a.getViewUp(),r=a.getViewPlaneNormal(),u=[0,0,0];(0,on.j)(r,t,u);const c=e.getView().getViewportSize(n)[1];let d=(i.x-o.x)/c,p=(o.y-i.y)/c;const f=a.getParallelScale();d*=2*f,p*=2*f;let h=u[0]*d+t[0]*p;s[0]+=h,l[0]+=h,h=u[1]*d+t[1]*p,s[1]+=h,l[1]+=h,h=u[2]*d+t[2]*p,s[2]+=h,l[2]+=h,a.setPosition(s[0],s[1],s[2]),a.setFocalPoint(l[0],l[1],l[2])}else{const{center:r}=t,u=e.getInteractorStyle(),c=u.computeWorldToDisplay(n,r[0],r[1],r[2])[2],d=u.computeDisplayToWorld(n,i.x,i.y,c),p=u.computeDisplayToWorld(n,o.x,o.y,c),f=[s[0]+(p[0]-d[0]),s[1]+(p[1]-d[1]),s[2]+(p[2]-d[2])],h=[l[0]+(p[0]-d[0]),l[1]+(p[1]-d[1]),l[2]+(p[2]-d[2])];a.setPosition(f[0],f[1],f[2]),a.setFocalPoint(h[0],h[1],h[2])}n.resetCameraClippingRange(),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera()}}const Qi={};function eo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qi,n),r.m.obj(e,t),Ur.extend(e,t,n),$r.Z.extend(e,t,n),Ji(e,t)}var to={newInstance:r.m.newInstance(eo,"vtkMouseCameraTrackballPanManipulator"),extend:eo};function no(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomManipulator"),e.onButtonDown=(e,n,r)=>{t.previousPosition=r;const i=e.getView().getViewportSize(n),o=n.getActiveCamera(),a=t.flipDirection?-1:1;if(o.getParallelProjection())t.zoomScale=1.5/i[1]*a;else{const e=o.getClippingRange();t.zoomScale=e[1]/i[1]*1.5*a}},e.onMouseMove=(e,n,r)=>{if(!r)return;const i=t.previousPosition.y-r.y,o=n.getActiveCamera();if(o.getParallelProjection()){const e=i*t.zoomScale;o.setParallelScale((1-e)*o.getParallelScale())}else{const e=o.getPosition(),r=o.getFocalPoint(),a=o.getDirectionOfProjection(),s=i*t.zoomScale;let l=s*a[0];e[0]+=l,r[0]+=l,l=s*a[1],e[1]+=l,r[1]+=l,l=s*a[2],e[2]+=l,r[2]+=l,o.getFreezeFocalPoint()||o.setFocalPoint(r[0],r[1],r[2]),o.setPosition(e[0],e[1],e[2]),n.resetCameraClippingRange()}e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r},e.onScroll=(e,t,n)=>{if(!n)return;const r=t.getActiveCamera(),i=1-n/10;r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/i):(r.dolly(i),t.resetCameraClippingRange()),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}const ro={zoomScale:0,flipDirection:!1};function io(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ro,n),r.m.obj(e,t),$r.Z.extend(e,t,n),Ur.extend(e,t,n),r.m.setGet(e,t,["flipDirection"]),no(e,t)}var oo={newInstance:r.m.newInstance(io,"vtkMouseCameraTrackballZoomManipulator"),extend:io};function ao(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomToMouseManipulator");const n=e.onButtonDown;e.onButtonDown=(e,r,i)=>{n(e,r,i),t.zoomPosition=i},e.onMouseMove=(e,n,r)=>{if(!r)return;const i=(t.previousPosition.y-r.y)*t.zoomScale;pe.dollyToPosition(1-i,t.zoomPosition,n,e),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r},e.onScroll=(e,t,n,r)=>{if(!n||!r)return;const i=1-.1*n;pe.dollyToPosition(i,r,t,e),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}const so={zoomPosition:null};function lo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,so,n),oo.extend(e,t,n),ao(e,t)}var uo={newInstance:r.m.newInstance(lo,"vtkMouseCameraTrackballZoomToMouseManipulator"),extend:lo},co=n(464);function po(e,t){t.classHierarchy.push("vtkVRButtonPanManipulator"),e.onButton3D=(e,t,n,r,i,o)=>{o?e.startCameraPose():n===Z.IS_CAMERA_POSE&&e.endCameraPose()},e.onMove3D=(e,t,n,r)=>{if(n!==Z.IS_CAMERA_POSE)return;const i=t.getActiveCamera(),o=i.getPhysicalTranslation(),a=.05*r.gamepad.axes[1]*i.getPhysicalScale(),s=i.physicalOrientationToWorldDirection(r.orientation);i.setPhysicalTranslation(o[0]+s[0]*a,o[1]+s[1]*a,o[2]+s[2]*a)}}const fo={device:Zr.AS.RightController,input:Zr.II.TrackPad};function ho(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fo,n),r.m.obj(e,t),Xr.extend(e,t,n),po(e,t)}var mo={newInstance:r.m.newInstance(ho,"vtkVRButtonPanManipulator"),extend:ho},go={vtkCompositeCameraManipulator:Ur,vtkCompositeGestureManipulator:jr,vtkCompositeKeyboardManipulator:Wr,vtkCompositeMouseManipulator:$r.Z,vtkCompositeVRManipulator:Xr,vtkGestureCameraManipulator:ti,vtkKeyboardCameraManipulator:si,vtkMouseBoxSelectorManipulator:fi,vtkMouseCameraAxisRotateManipulator:vi,vtkMouseCameraSliceManipulator:xi,vtkMouseCameraUnicamManipulator:Ii,vtkMouseCameraUnicamRotateManipulator:Pi,vtkMouseCameraTrackballFirstPersonManipulator:Fi,vtkMouseCameraTrackballMultiRotateManipulator:Xi,vtkMouseCameraTrackballPanManipulator:to,vtkMouseCameraTrackballRollManipulator:Wi,vtkMouseCameraTrackballRotateManipulator:zi,vtkMouseCameraTrackballZoomManipulator:oo,vtkMouseCameraTrackballZoomToMouseManipulator:uo,vtkMouseRangeManipulator:co.ZP,vtkVRButtonPanManipulator:mo};const vo={slice:go.vtkMouseCameraSliceManipulator,multiRotate:go.vtkMouseCameraTrackballMultiRotateManipulator,pan:go.vtkMouseCameraTrackballPanManipulator,roll:go.vtkMouseCameraTrackballRollManipulator,rotate:go.vtkMouseCameraTrackballRotateManipulator,axisRotate:go.vtkMouseCameraAxisRotateManipulator,zoom:go.vtkMouseCameraTrackballZoomManipulator,zoomToMouse:go.vtkMouseCameraTrackballZoomToMouseManipulator,range:go.vtkMouseRangeManipulator,vrPan:go.vtkVRButtonPanManipulator,gestureCamera:go.vtkGestureCameraManipulator,movement:go.vtkKeyboardCameraManipulator,freeLook:go.vtkMouseCameraTrackballFirstPersonManipulator,unicam:go.vtkMouseCameraUnicamManipulator,unicamRotate:go.vtkMouseCameraUnicamRotateManipulator},yo={"3D":[{type:"rotate"},{type:"pan",options:{shift:!0}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{dragEnabled:!1,scrollEnabled:!0}},{type:"zoom",options:{button:3}},{type:"roll",options:{shift:!0,control:!0}},{type:"roll",options:{shift:!0,alt:!0}},{type:"roll",options:{shift:!0,button:3}},{type:"vrPan"},{type:"gestureCamera"}],"2D":[{type:"pan",options:{shift:!0}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{button:3}},{type:"roll",options:{shift:!0,alt:!0}},{type:"roll",options:{shift:!0,button:3}},{type:"roll",options:{shift:!0}},{type:"vrPan"},{type:"gestureCamera"}],FirstPerson:[{type:"movement"},{type:"freeLook"}],Unicam:[{type:"unicam"}],zRotateTop:[{type:"pan",options:{shift:!0}},{type:"axisRotate",options:{rotationAxis:[0,0,1],useHalfAxis:!0}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{dragEnabled:!1,scrollEnabled:!0}},{type:"zoom",options:{button:3}}],zRotateAll:[{type:"pan",options:{shift:!0}},{type:"axisRotate",options:{rotationAxis:[0,0,1],useHalfAxis:!1}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{dragEnabled:!1,scrollEnabled:!0}},{type:"zoom",options:{button:3}}]};function _o(e,t){t.removeAllManipulators();for(let n=0;n1.5?"black":"white"}t.classHierarchy.push("vtkViewProxy"),t.renderWindow=be.newInstance(),t.renderer=Pr.newInstance({background:[0,0,0]}),t.renderWindow.addRenderer(t.renderer),t._openGLRenderWindow=t.renderWindow.newAPISpecificView(),t.renderWindow.addView(t._openGLRenderWindow),t.interactor=Br.ZP.newInstance(),t.interactor.setView(t._openGLRenderWindow),t.interactorStyle3D=pe.newInstance(),t.interactorStyle2D=pe.newInstance(),t._resetCamera=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t.renderer.resetCamera(e)},bo.applyPreset("3D",t.interactorStyle3D),bo.applyPreset("2D",t.interactorStyle2D),t.cornerAnnotation=W.newInstance(),t.interactor.setInteractorStyle(t.useParallelRendering?t.interactorStyle2D:t.interactorStyle3D),t.camera=t.renderer.getActiveCamera(),t.camera.setParallelProjection(!!t.useParallelRendering),t.orientationAxesArrow=D.newInstance(),t.orientationAxesCube=g.newInstance(),d.applyPreset("default",t.orientationAxesCube),d.applyPreset("lps",t.orientationAxesCube),t.orientationAxesMap={arrow:t.orientationAxesArrow,cube:t.orientationAxesCube},t.orientationWidget=Rr.newInstance({actor:t.orientationAxesArrow,interactor:t.renderWindow.getInteractor()}),t.orientationWidget.setEnabled(!0),t.orientationWidget.setViewportCorner(Rr.Corners.BOTTOM_LEFT),t.orientationWidget.setViewportSize(.1),e.setPresetToInteractor3D=e=>Array.isArray(e)?bo.applyDefinitions(e,t.interactorStyle3D):bo.applyPreset(e,t.interactorStyle3D),e.setPresetToInteractor2D=e=>Array.isArray(e)?bo.applyDefinitions(e,t.interactorStyle2D):bo.applyPreset(e,t.interactorStyle2D),e.setOrientationAxesType=n=>{const r=t.orientationAxesMap[n];r&&(t.orientationAxesType=n,t.orientationWidget.setActor(r),e.renderLater())},e.registerOrientationAxis=(e,n)=>{t.orientationAxesMap[e]=n},e.unregisterOrientationAxis=e=>{delete t.orientationAxesMap[e]},e.listOrientationAxis=()=>Object.keys(t.orientationAxesMap),e.setPresetToOrientationAxes=n=>{let r=!1;return"string"==typeof n?(t.presetToOrientationAxes!==n&&(t.presetToOrientationAxes=n,r=d.applyPreset(n,t.orientationAxesCube),e.modified()),r):(t.presetToOrientationAxes="Custom",r=d.applyDefinitions(n,t.orientationAxesCube),e.modified(),r)},e.setContainer=e=>{const n=t.orientationWidget.getEnabled();t.container&&(t.orientationWidget.setEnabled(!1),t.interactor.unbindEvents(t.container),t._openGLRenderWindow.setContainer(null),t.cornerAnnotation.setContainer(null)),t.container=e,e&&(t._openGLRenderWindow.setContainer(e),t.cornerAnnotation.setContainer(e),t.interactor.initialize(),t.interactor.bindEvents(e),t.orientationWidget.setEnabled(n))},e.resize=()=>{if(t.container){const n=t.container.getBoundingClientRect();if(n.width===n.height&&0===n.width)return;const r=window.devicePixelRatio||1,i=Math.max(10,Math.floor(r*n.width)),o=Math.max(10,Math.floor(r*n.height));t._openGLRenderWindow.setSize(i,o),e.invokeResize({width:i,height:o}),e.renderLater()}},e.renderLater=()=>{e.render(!1)},e.render=function(){let n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t.representations.length>0&&t.resetCameraOnFirstRender&&(t.resetCameraOnFirstRender=!1,e.resetCamera()),t.orientationWidget.updateMarkerOrientation(),t.renderer.resetCameraClippingRange(),n?t.renderWindow.render():setTimeout(t.renderWindow.render,0)},e.addRepresentation=e=>{e&&-1===t.representations.indexOf(e)&&(t.representations.push(e),t.renderer.addViewProp(e))},e.removeRepresentation=e=>{e&&(-1!==t.representations.indexOf(e)&&(t.representations=t.representations.filter((t=>t!==e)),t.renderer.removeViewProp(e)),0===t.representations.length&&(t.resetCameraOnFirstRender=!0))},e.setCameraParameters=e=>{let{position:n,focalPoint:r,bounds:i,parallelScale:o,viewAngle:a}=e;null!=n&&t.camera.setPosition(...n),null!=r&&t.camera.setFocalPoint(...r),null!=i?t.renderer.resetCameraClippingRange(i):t.renderer.resetCameraClippingRange(),null!=o&&t.camera.setParallelScale(o),null!=a&&t.camera.setViewAngle(a)},e.resetCamera=()=>{t._resetCamera(),t.interactorStyle2D.setCenterOfRotation(t.camera.getFocalPoint()),t.interactorStyle3D.setCenterOfRotation(t.camera.getFocalPoint()),e.renderLater()},e.captureImage=function(){let{format:e="image/png",...n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.renderWindow.captureImages(e,n)[0]},e.openCaptureImage=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"_blank";const n=new Image;return e.captureImage().then((e=>{n.src=e;const r=window.open("",t);r.document.write(n.outerHTML),r.document.title="vtk.js Image Capture",window.focus()}))},e.setCornerAnnotation=(e,n)=>{t.cornerAnnotation.updateTemplates({[e]:e=>W.applyTemplate(n,e)})},e.setCornerAnnotations=function(n){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r?Object.keys(n).forEach((t=>{e.setCornerAnnotation(t,n[t])})):t.cornerAnnotation.updateTemplates(n)},e.updateCornerAnnotation=e=>t.cornerAnnotation.updateMetadata(e),e.setAnnotationOpacity=n=>{t.annotationOpacity!==Number(n)&&(t.annotationOpacity=Number(n),t.cornerAnnotation.getAnnotationContainer().style.opacity=n,e.modified())},e.setBackground=(0,r.h)(t.renderer.setBackground,n),e.getBackground=t.renderer.getBackground,e.setAnimation=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!t.disableAnimation||!n)if(n)t.renderWindow.getInteractor().requestAnimation(r);else{const n=r===e||0===`${r}`.indexOf("ViewProxy.moveCamera.");t.renderWindow.getInteractor().cancelAnimation(r,n)}},e.updateOrientation=function(n,r,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(void 0===n)return Promise.resolve();const a=t.camera.getPosition(),s=t.camera.getViewUp(),l=t.camera.getFocalPoint();t.axis=n,t.orientation=r,t.viewUp=i;const u=t.camera.getFocalPoint();u[t.axis]+=t.orientation,t.camera.setPosition(...u),t.camera.setViewUp(...i),t.renderer.resetCamera();const c=t.camera.getFocalPoint(),d=t.camera.getPosition(),p=t.camera.getViewUp();return t.camera.setFocalPoint(...l),t.camera.setPosition(...a),t.camera.setViewUp(...s),e.moveCamera(c,d,p,o)},e.moveCamera=function(n,r,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const a=t.camera.getFocalPoint(),s=t.camera.getPosition(),l=t.camera.getViewUp(),u=[{focalPoint:n,position:r,viewUp:i}];if(o){const e=[(a[0]-n[0])/o,(a[1]-n[1])/o,(a[2]-n[2])/o],t=[(s[0]-r[0])/o,(s[1]-r[1])/o,(s[2]-r[2])/o],c=[(l[0]-i[0])/o,(l[1]-i[1])/o,(l[2]-i[2])/o],d=e[0]||e[1]||e[2]||t[0]||t[1]||t[2]||c[0]||c[1]||c[2],p=e.map((e=>Math.abs(e)e+t),0),f=t.map((e=>Math.abs(e)e+t),0),h=1===c.map((e=>Math.abs(e)e+t),0)&&0===f&&0===p;if(d)if(h){const e=a.map(((e,t)=>Math.abs(s[t]-e)null!==e)).find((e=>Math.abs(c[e]){const i=`ViewProxy.moveCamera.${performance.now().toString()}`;e.setAnimation(!0,i);let o=null;o=setInterval((()=>{if(u.length){const{focalPoint:e,position:n,viewUp:r}=u.pop();t.camera.setFocalPoint(...e),t.camera.setPosition(...n),t.camera.setViewUp(...r),t.renderer.resetCameraClippingRange(),t.interactor.getLightFollowCamera()&&t.renderer.updateLightsGeometryToFollowCamera()}else clearInterval(o),e.setAnimation(!1,i),n()}),1)}))},e.resetOrientation=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e.updateOrientation(t.axis,t.orientation,t.viewUp,n)},e.rotate=e=>{const{viewUp:n,focalPoint:r,position:i}=t.camera.get("viewUp","focalPoint","position"),o=[r[0]-i[0],r[1]-i[1],r[2]-i[2]];v.Z.buildFromDegree().rotate(Number.isNaN(e)?90:e,o).apply(n),t.camera.setViewUp(...n),t.camera.modified(),t.orientationWidget.updateMarkerOrientation(),t.renderWindow.render()},e.focusTo=(0,r.h)(t.camera.setFocalPoint,t.interactorStyle2D.setCenterOfRotation,t.interactorStyle3D.setCenterOfRotation),e.delete=(0,r.h)((()=>{e.setContainer(null),t.orientationWidget.setEnabled(!1),t.orientationWidget.delete(),t.orientationAxesArrow.delete(),t.orientationAxesCube.delete(),t.interactorStyle2D.delete(),t.interactorStyle3D.delete(),t.cornerAnnotation.delete(),t.interactor.delete(),t.renderer.delete(),t._openGLRenderWindow.delete(),t.renderWindow.delete()}),e.delete),e.resetOrientation(),n()}const So={representations:[],sectionName:"view",annotationOpacity:1,resetCameraOnFirstRender:!0,presetToOrientationAxes:"lps",orientationAxesType:"arrow",disableAnimation:!1,axis:1,orientation:0,viewUp:[0,0,1]};function Co(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,So,n),(0,r.o)(e,t),(0,r.e)(e,t,["name","disableAnimation"]),(0,r.g)(e,t,["annotationOpacity","camera","container","cornerAnnotation","interactor","interactorStyle2D","interactorStyle3D","_openGLRenderWindow","orientationAxesType","presetToOrientationAxes","renderer","renderWindow","representations","useParallelRendering"]),(0,r.i)(e,t,["openGLRenderWindow"]),(0,r.f)(e,t,"Resize"),wo(e,t),(0,r.p)(e,t),(0,r.j)(e,t,{orientationAxesVisibility:{modelKey:"orientationWidget",property:"enabled"},orientationAxesCorner:{modelKey:"orientationWidget",property:"viewportCorner"},orientationAxesSize:{modelKey:"orientationWidget",property:"viewportSize"},cameraViewUp:{modelKey:"camera",property:"viewUp",modified:!1},cameraPosition:{modelKey:"camera",property:"position",modified:!1},cameraFocalPoint:{modelKey:"camera",property:"focalPoint",modified:!1}})}var To={newInstance:(0,r.n)(Co,"vtkViewProxy"),extend:Co}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return d}});var r=n(0),i=n(467),o=n(540),a=n(541),s=n(25);function l(e,t){t.classHierarchy.push("vtkArrowSource"),e.requestData=function(e,n){if(t.deleted)return;const r=a.ZP.newInstance({capping:!0});r.setResolution(t.shaftResolution),r.setRadius(t.shaftRadius),r.setHeight(1-t.tipLength),r.setCenter(0,.5*(1-t.tipLength),0);const l=r.getOutputData(),u=l.getPoints().getData(),c=l.getPointData().getNormals().getData();s.Z.buildFromDegree().rotateZ(-90).apply(u).apply(c);const d=o.ZP.newInstance();d.setResolution(t.tipResolution),d.setHeight(t.tipLength),d.setRadius(t.tipRadius);const p=d.getOutputData(),f=p.getPoints().getData();s.Z.buildFromRadian().translate(1-.5*t.tipLength,0,0).apply(f);const h=i.ZP.newInstance();h.setInputData(l),h.addInputData(p);const m=h.getOutputData(),g=m.getPoints().getData();s.Z.buildFromRadian().translate(.5*t.tipLength-.5,0,0).apply(g),t.invert?(s.Z.buildFromRadian().rotateFromDirections([1,0,0],t.direction).scale(-1,-1,-1).apply(g),n[0]=m):(s.Z.buildFromRadian().rotateFromDirections([1,0,0],t.direction).scale(1,1,1).apply(g),n[0]=h.getOutputData())}}const u={tipResolution:6,tipRadius:.1,tipLength:.35,shaftResolution:6,shaftRadius:.03,invert:!1,direction:[1,0,0],pointType:"Float64Array"};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),r.m.obj(e,t),r.m.setGet(e,t,["tipResolution","tipRadius","tipLength","shaftResolution","shaftRadius","invert"]),r.m.setGetArray(e,t,["direction"],3),r.m.algo(e,t,0,1),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkArrowSource"),extend:c}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return h}});var r=n(0),i=n(4),o=n(37),a=n(5),s=n(145),l=n(14);const{vtkErrorMacro:u}=r.m;function c(e,t,n,r){e.set(function(e,t){let n=0;return e.map(((e,r)=>r===n?(n+=e+1,e):e+t))}(t,n),r)}function d(e,t){t.classHierarchy.push("vtkAppendPolyData"),e.requestData=(n,r)=>{const d=e.getNumberOfInputPorts();if(!d)return void u("No input specified.");if(1===d)return void(r[0]=n[0]);const p=a.ZP.newInstance();let f=0,h=0,m=1,g=1,v=0,y=0,_=0,b=0,x=!0,w=!0,S=!0;for(let e=0;em?h:m);const i=t.getPointData();i?(x=x&&null!==i.getNormals(),w=w&&null!==i.getTCoords(),S=S&&null!==i.getScalars()):(x=!1,w=!1,S=!1)}t.outputPointsPrecision===s.XJ.SINGLE?h=l.Tu.FLOAT:t.outputPointsPrecision===s.XJ.DOUBLE&&(h=l.Tu.DOUBLE);const C=o.ZP.newInstance({dataType:h});C.setNumberOfPoints(f);const T=C.getData(),M=new Uint32Array(v),D=new Uint32Array(y),A=new Uint32Array(_),P=new Uint32Array(b);let k=null,L=null,O=null;const E=n[d-1];if(x){const e=E.getPointData().getNormals();k=i.ZP.newInstance({numberOfComponents:3,numberOfTuples:f,size:3*f,dataType:e.getDataType(),name:e.getName()})}if(w){const e=E.getPointData().getTCoords();L=i.ZP.newInstance({numberOfComponents:2,numberOfTuples:f,size:2*f,dataType:e.getDataType(),name:e.getName()})}if(S){const e=E.getPointData().getScalars();O=i.ZP.newInstance({numberOfComponents:e.getNumberOfComponents(),numberOfTuples:f,size:f*e.getNumberOfComponents(),dataType:e.getDataType(),name:e.getName()})}f=0,v=0,y=0,_=0,b=0;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),r.m.setGet(e,t,["outputPointsPrecision"]),r.m.obj(e,t),r.m.algo(e,t,1,1),d(e,t)}var h={newInstance:r.m.newInstance(f,"vtkAppendPolyData"),extend:f}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return d}});var r=n(0),i=n(542);const{vtkErrorMacro:o,VOID:a}=r.m;const s={computeWorldToDisplay:function(e,t,n,r){return e.getRenderWindow().getViews()[0].worldToDisplay(t,n,r,e)},computeDisplayToWorld:function(e,t,n,r){return e.getRenderWindow().getViews()[0].displayToWorld(t,n,r,e)}};function l(e,t){t.classHierarchy.push("vtkInteractorObserver");const n={...e};function r(){for(;t.subscribedEvents.length;)t.subscribedEvents.pop().unsubscribe()}function s(){i.ZP.handledEvents.forEach((n=>{e[`handle${n}`]&&t.subscribedEvents.push(t._interactor[`on${n}`]((r=>t.processEvents?e[`handle${n}`](r):a),t.priority))}))}e.setInteractor=n=>{n!==t._interactor&&(r(),t._interactor=n,n&&t.enabled&&s(),e.modified())},e.setEnabled=n=>{n!==t.enabled&&(r(),n&&(t._interactor?s():o("\n The interactor must be set before subscribing to events\n ")),t.enabled=n,e.modified())},e.computeDisplayToWorld=(e,n,r,i)=>e?t._interactor.getView().displayToWorld(n,r,i,e):null,e.computeWorldToDisplay=(e,n,r,i)=>e?t._interactor.getView().worldToDisplay(n,r,i,e):null,e.setPriority=e=>{n.setPriority(e)&&t._interactor&&(r(),s())}}const u={enabled:!0,priority:0,processEvents:!0,subscribedEvents:[]};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),r.m.obj(e,t),r.m.event(e,t,"InteractionEvent"),r.m.event(e,t,"StartInteractionEvent"),r.m.event(e,t,"EndInteractionEvent"),r.m.get(e,t,["_interactor","enabled"]),r.m.setGet(e,t,["priority","processEvents"]),r.m.moveToProtected(e,t,["interactor"]),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkInteractorObserver"),extend:c,...s}},function(e){e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,i,o,a,s,l,u=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(c,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(c,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),l=parseInt(a[1],16)||0,o[14]=s,o[15]=l,n(c,o),c}function a(e){var t,r,o,a,s,l,u=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(c,i(e.subarray(t-64,t)));for(r=(e=t-64>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(c,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),l=parseInt(a[1],16)||0,o[14]=s,o[15]=l,n(c,o),c}function s(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function l(e){var t;for(t=0;tc?new ArrayBuffer(0):(i=c-u,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,u,i),a.set(s),o)}}(),h.prototype.append=function(e){return this.appendBinary(u(e)),this},h.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},h.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=l(this._hash),e&&(n=f(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(e,t){var r,i,o,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,e),a=0;a<16;a+=1)e[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},h.hash=function(e,t){return h.hashBinary(u(e),t)},h.hashBinary=function(e,t){var n=l(o(e));return t?f(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(e){var t,r=p(this._buff.buffer,e,!0),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=l(this._hash),e&&(n=f(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var e=h.prototype.getState.call(this);return e.buff=d(e.buff),e},h.ArrayBuffer.prototype.setState=function(e){return e.buff=c(e.buff,!0),h.prototype.setState.call(this,e)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(e,t){var n=l(a(new Uint8Array(e)));return t?f(n):n},h}()},function(e,t,n){"use strict";n.d(t,{ZP:function(){return w}});var r=n(0),i=n(2);function o(e,t){t.classHierarchy.push("vtkAbstractPicker"),e.initialize=()=>{t.renderer=null,t.selectionPoint[0]=0,t.selectionPoint[1]=0,t.selectionPoint[2]=0,t.pickPosition[0]=0,t.pickPosition[1]=0,t.pickPosition[2]=0},e.initializePickList=()=>{t.pickList=[]},e.addPickList=e=>{t.pickList.push(e)},e.deletePickList=e=>{const n=t.pickList.indexOf(e);-1!==n&&t.pickList.splice(n,1)}}const a={renderer:null,selectionPoint:[0,0,0],pickPosition:[0,0,0],pickFromList:0,pickList:[]};function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a,n),r.m.obj(e,t),r.m.get(e,t,["renderer"]),r.m.getArray(e,t,["selectionPoint","pickPosition"]),r.m.setGet(e,t,["pickFromList","pickList"]),o(e,t)}var l={newInstance:r.m.newInstance(s,"vtkAbstractPicker"),extend:s},u=n(10),c=n(572),d=n(577);const{vtkErrorMacro:p}=r.m,{vtkWarningMacro:f}=r.m;function h(e,t){t.classHierarchy.push("vtkPicker");const n={...e};e.intersectWithLine=(e,t,n,r)=>{if(!r)return Number.MAX_VALUE;const o=r.getCenter(),a=[];for(let n=0;n<3;n++)a[n]=t[n]-e[n];const s=(0,i.d)(a,a);if(0===s)return 2;return(a[0]*(o[0]-e[0])+a[1]*(o[1]-e[1])+a[2]*(o[2]-e[2]))/s},e.pick=(r,o)=>{3!==r.length&&f("vtkPicker::pick: selectionPt needs three components");const a=r[0],s=r[1];let l=r[2],h=[],m=[],g=[],v=[];const y=[],_=[];let b,x,w=[];const S=[],C=[];let T,M,D=[],A=[],P=[],k=[],L=0,O=[],E=!1;const I=new Float64Array(4),N=new Float64Array(4),R=u.ZP.newInstance(),B=[],F=[],V=o.getRenderWindow().getViews()[0];if(n.initialize(),t.actors=[],t.pickedPositions=[],t.mapperPosition[0]=0,t.mapperPosition[1]=0,t.mapperPosition[2]=0,t.mapper=null,t.dataSet=null,t.globalTMin=Number.MAX_VALUE,t.renderer=o,t.selectionPoint[0]=a,t.selectionPoint[1]=s,t.selectionPoint[2]=l,!o)return void p("Picker::Pick Must specify renderer");const U=o.getActiveCamera();h=U.getPosition(),m=U.getFocalPoint();const G=V.getViewportSize(o),z=G[0]/G[1];g=o.worldToNormalizedDisplay(m[0],m[1],m[2],z),g=V.normalizedDisplayToDisplay(g[0],g[1],g[2]),l=g[2];const j=V.displayToNormalizedDisplay(a,s,l);v=o.normalizedDisplayToWorld(j[0],j[1],j[2],z);for(let e=0;e<3;e++)t.pickPosition[e]=v[e];for(let e=0;e<3;e++)y[e]=t.pickPosition[e]-h[e];for(let e=0;e<3;e++)_[e]=m[e]-h[e];(0,i.l)(_);const Y=(0,i.d)(_,y);if(0===Y)return void f("Picker::Pick Cannot process points");if(w=U.getClippingRange(),U.getParallelProjection()){b=w[0]-Y,x=w[1]-Y;for(let e=0;e<3;e++)S[e]=t.pickPosition[e]+b*_[e],C[e]=t.pickPosition[e]+x*_[e]}else{b=w[0]/Y,x=w[1]/Y;for(let e=0;e<3;e++)S[e]=h[e]+b*y[e],C[e]=h[e]+x*y[e]}S[3]=1,C[3]=1,D=o.getViewport(),o.getRenderWindow()&&(A=o.getRenderWindow().getViews()[0].getSize()),T=A[0]*D[0],M=A[1]*D[1];const H=V.displayToNormalizedDisplay(T,M,l);P=o.normalizedDisplayToWorld(H[0],H[1],H[2],z),T=A[0]*D[2],M=A[1]*D[3];const W=V.displayToNormalizedDisplay(T,M,l);k=o.normalizedDisplayToWorld(W[0],W[1],W[2],z);for(let e=0;e<3;e++)L+=(k[e]-P[e])*(k[e]-P[e]);L=Math.sqrt(L)*t.tolerance,O=t.pickFromList?t.pickList:o.getActors();const $=[];O.forEach((n=>{const r=n.getMapper();if(E=n.getNestedPickable()&&n.getNestedVisibility(),n.getProperty().getOpacity()<=0&&(E=!1),E){t.transformMatrix=n.getMatrix().slice(0),c.transpose(t.transformMatrix,t.transformMatrix),c.invert(t.transformMatrix,t.transformMatrix);const o=[t.transformMatrix[0],t.transformMatrix[1],t.transformMatrix[2]],a=[t.transformMatrix[4],t.transformMatrix[5],t.transformMatrix[6]],s=[t.transformMatrix[8],t.transformMatrix[9],t.transformMatrix[10]];$[0]=(0,i.n)(o),$[1]=(0,i.n)(a),$[2]=(0,i.n)(s),d.fF(I,S,t.transformMatrix),d.fF(N,C,t.transformMatrix),I[0]/=I[3],I[1]/=I[3],I[2]/=I[3],N[0]/=N[3],N[1]/=N[3],N[2]/=N[3];for(let e=0;e<3;e++)y[e]=N[e]-I[e];if(r?(R.setBounds(r.getBounds()),R.inflate(L)):R.reset(),R.intersectBox(I,y,F,B)&&(B[0]=e.intersectWithLine(I,N,.333*L*($[0]+$[1]+$[2]),r),B[0]2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,m,n),l.extend(e,t,n),r.m.setGet(e,t,["tolerance"]),r.m.setGetArray(e,t,["mapperPosition"],3),r.m.get(e,t,["mapper","dataSet","actors","pickedPositions"]),r.m.event(e,t,"pickChange"),h(e,t)}var v={newInstance:r.m.newInstance(g,"vtkPicker"),extend:g};const{vtkErrorMacro:y}=r.m;function _(e,t){t.classHierarchy.push("vtkPointPicker"),e.intersectWithLine=(n,r,i,o)=>{let a=Number.MAX_VALUE;if(o.isA("vtkImageMapper")||o.isA("vtkImageArrayMapper")){const e=o.intersectWithLineForPointPicking(n,r);e&&(a=e.t,t.pointIJK=e.ijk)}else o.isA("vtkMapper")&&(a=e.intersectActorWithLine(n,r,i,o));return a},e.intersectActorWithLine=(e,n,r,o)=>{const a=o.getInputData();let s=0;const l=a.getPoints().getNumberOfPoints();if(l<=s)return 2;const u=[];for(let t=0;t<3;t++)u[t]=n[t]-e[t];const c=(0,i.d)(u,u);if(0===c)return y("Cannot process points"),2;let d,p=-1,f=Number.MAX_VALUE,h=Number.MAX_VALUE;const m=[],g=[],v=a.getPoints();if(t.useCells){const n=a.getPolys().getData(),i=n[0],o=a.getPolys().getNumberOfCells();for(let a=0;a=0&&d<=1&&d<=f+t.tolerance){let t=0;for(let n=0;n<3;n++){m[n]=e[n]+d*u[n];const r=Math.abs(g[n]-m[n]);r>t&&(t=r)}t<=r&&t=0&&d<=1&&d<=f+t.tolerance){let t=0;for(let n=0;n<3;n++){m[n]=e[n]+d*u[n];const r=Math.abs(g[n]-m[n]);r>t&&(t=r)}t<=r&&t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,b,n),v.extend(e,t,n),r.m.getArray(e,t,["pointIJK"]),r.m.get(e,t,["pointId"]),r.m.setGet(e,t,["useCells"]),_(e,t)}var w={newInstance:r.m.newInstance(x,"vtkPointPicker"),extend:x}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(0),i=n(5),o=n(25),a=n(2);function s(e,t){t.classHierarchy.push("vtkCircleSource"),e.requestData=function(e,n){if(t.deleted)return;let s=n[0];const l=r.m.newTypedArray(t.pointType,3*t.resolution),u=new Uint32Array(t.resolution+2);u[0]=t.resolution+1;const c=2*Math.PI/t.resolution;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l(n)),r.m.obj(e,t),r.m.setGet(e,t,["radius","resolution","lines","face"]),r.m.setGetArray(e,t,["center","direction"],3),r.m.algo(e,t,0,1),s(e,t)}var c={newInstance:r.m.newInstance(u,"vtkCircleSource"),extend:u}},function(e,t,n){"use strict";n.d(t,{e:function(){return r}});const r=.5},function(e,t,n){"use strict";n.d(t,{ZP:function(){return m}});var r=n(0),i=n(13),o=n(550),a=n(11),s=n(5),l=n(324),u=n(60);const{vtkErrorMacro:c}=r.m,d=[2,0,1,2,0,2,2,0,4,2,1,3,2,1,5,2,2,3,2,2,6,2,3,7,2,4,5,2,4,6,2,5,7,2,6,7];function p(e,t){t.classHierarchy.push("vtkCroppingOutlineRepresentation"),t.internalPolyData=s.ZP.newInstance({mtime:0}),(0,u.n7)(t.internalPolyData,"lines",d.length).getData().set(d);const n=(0,l.hW)(e,t);t.mapper=a.ZP.newInstance({scalarVisibility:!1}),t.actor=i.ZP.newInstance({parentProp:e}),t.actor.getProperty().setEdgeColor(...t.edgeColor),t.mapper.setInputConnection(e.getOutputPort()),t.actor.setMapper(t.mapper),e.addActor(t.actor),e.requestData=(r,i)=>{const o=e.getRepresentationStates(r[0]).filter((e=>e.getOrigin&&e.getOrigin()));8===o.length?(n(t.internalPolyData,o),t.internalPolyData.getPoints().modified(),t.internalPolyData.modified(),i[0]=t.internalPolyData):c("CroppingOutlineRepresentation did not get 8 states")}}const f={edgeColor:[1,1,1]};function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,f,n),o.Z.extend(e,t,n),r.m.setGetArray(e,t,["edgeColor"],3),r.m.get(e,t,["mapper","actor"]),p(e,t)}var m={newInstance:r.m.newInstance(h,"vtkCroppingOutlineRepresentation"),extend:h}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return s}});var r=n(0);function i(e,t){t.classHierarchy.push("vtkAbstractManipulator"),e.getOrigin=e=>t.userOrigin?t.userOrigin:t.useCameraFocalPoint?e.pokedRenderer.getActiveCamera().getFocalPoint():t.handleOrigin?t.handleOrigin:t.widgetOrigin?t.widgetOrigin:[0,0,0],e.getNormal=e=>t.userNormal?t.userNormal:t.useCameraNormal?e.pokedRenderer.getActiveCamera().getDirectionOfProjection():t.handleNormal?t.handleNormal:t.widgetNormal?t.widgetNormal:[0,0,1]}const o={useCameraFocalPoint:!1,useCameraNormal:!1};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.obj(e,t),r.m.setGet(e,t,["useCameraFocalPoint","useCameraNormal"]),r.m.setGetArray(e,t,["userOrigin","handleOrigin","widgetOrigin","userNormal","handleNormal","widgetNormal"],3),i(e,t)}var s={extend:a,newInstance:r.m.newInstance(a,"vtkAbstractManipulator")}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return k}});var r=n(0),i=n(13),o=n(11),a=n(2),s=n(10),l=n(44),u=n(4),c=n(37),d=n(5),p=n(145),f=n(14);var h={VaryRadius:{VARY_RADIUS_OFF:0,VARY_RADIUS_BY_SCALAR:1,VARY_RADIUS_BY_VECTOR:2,VARY_RADIUS_BY_ABSOLUTE_SCALAR:3},GenerateTCoords:{TCOORDS_OFF:0,TCOORDS_FROM_NORMALIZED_LENGTH:1,TCOORDS_FROM_LENGTH:2,TCOORDS_FROM_SCALARS:3}};const{VaryRadius:m,GenerateTCoords:g}=h,{vtkDebugMacro:v,vtkErrorMacro:y,vtkWarningMacro:_}=r.m;function b(e,t){function n(e,n){let r=e;return t.sidesShareVertices?r+=t.numberOfSides*n:r+=2*t.numberOfSides*n,t.capping&&(r+=2*t.numberOfSides),r}function r(e,t,n){const r=t[n],i=e.slice(3*r,3*(r+1));let o=n+1;for(;o3&&void 0!==arguments[3]?arguments[3]:null,o=[0,0,1];const s=t;let l=s[0];for(let t=0;t1){let u=0,c=[0,0,0];const d=[0,0,0],p=s.slice(t+1,t+1+l);if(u=r(e,p,0),u!==l){let t=p[u],s=e.slice(3*t,3*(t+1)),f=p[u+1],h=e.slice(3*f,3*(f+1));if(c=h.map(((e,t)=>e-s[t])),(0,a.l)(c),i)o=i;else{for(;++u.001){o=n,c=d;break}}if(u>=l)for(let e=0;e<3;++e)if(0!==c[e]){o[(e+2)%3]=0,o[(e+1)%3]=1,o[e]=-c[(e+1)%3]/c[e];break}}(0,a.l)(o);let m=0;for(;++u0?Math.sqrt(i):0;const s=[0,0,0];for(let e=0;e<3;++e)s[e]=d[e]+c[e];(0,a.l)(s),(0,a.j)(s,e,r),(0,a.j)(c,e,s),(0,a.d)(o,s)*(0,a.d)(r,s)<0&&(i*=-1);for(let e=m;et.radiusFactor&&(k=t.radiusFactor);else if(c&&t.varyRadius===m.VARY_RADIUS_BY_ABSOLUTE_SCALAR&&(k=c.getComponent(r[e],0),k<0))return _("Scalar value less than zero, skipping line"),0;if(t.sidesShareVertices)for(let n=0;n{const v=d.ZP.newInstance();a[0]=v;const b=r[0];if(!b)return void y("Invalid or missing input");const x=b.getPoints();if(!x)return;const w=x.getNumberOfPoints();if(w<1)return;const S=b.getLines();if(!S)return;if(S.getNumberOfCells()<1)return;let C=0,T=0;const M=S.getData();let D=M[0];for(let e=0;e{const r=n%3;return t.defaultNormal[r]})):B=!0);const F=b.getPointData().getNumberOfArrays();let V=null,U=null;for(let e=0;e1&&B){const t=M.slice(e,e+D+1);i(x.getData(),t,N)}o(J,D,t,x.getData(),P.getData(),b.getPointData(),K,k,j,H,W,$,R,X)?(I=s(J,D,Q,I,b.getCellData(),Z,E),q&&h(J,D,t,x.getData(),j,q.getData())):_("Could not generate points"),J=n(J,D),Q++}v.setPoints(P),v.setStrips(E),v.setPointData(K),K.setNormals(L),a[0]=v}}const x={outputPointsPrecision:p.XJ.DEFAULT,radius:.5,varyRadius:m.VARY_RADIUS_OFF,numberOfSides:3,radiusFactor:10,defaultNormal:[0,0,1],useDefaultNormal:!1,sidesShareVertices:!0,capping:!1,onRatio:1,offset:0,generateTCoords:g.TCOORDS_OFF,textureLength:1};function w(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,x,n),r.m.setGet(e,t,["outputPointsPrecision","radius","varyRadius","numberOfSides","radiusFactor","defaultNormal","useDefaultNormal","sidesShareVertices","capping","onRatio","offset","generateTCoords","textureLength"]),r.m.obj(e,t),r.m.algo(e,t,1,1),b(e,t)}var S={newInstance:r.m.newInstance(w,"vtkTubeFilter"),extend:w},C=n(62),T=n(60),M=n(21);function D(e,t){t.classHierarchy.push("vtkPolyLineRepresentation");const n={...e},r=d.ZP.newInstance({mtime:0});function l(n){let i=n;if(e.getScaleInPixels()&&r){const e=s.ZP.getCenter(r.getBounds());i*=(0,C.j3)(e,t.displayScaleParams)}t._pipelines.tubes.filter.setRadius(i)}t._pipelines={tubes:{source:e,filter:S.newInstance({radius:t.lineThickness,numberOfSides:12,capping:!1}),mapper:o.ZP.newInstance(),actor:i.ZP.newInstance({parentProp:e})}},T.ZP.connectPipeline(t._pipelines.tubes),e.addActor(t._pipelines.tubes.actor),e.requestData=(n,i)=>{const o=n[0];i[0]=r;const s=e.getRepresentationStates(o).reduce(((e,t)=>{const n=t.getOrigin&&t.getOrigin()?t.getOrigin():null,r=e.length&&e[e.length-1].getOrigin();return!n||r&&(0,a.B)(n,r)||e.push(t),e}),[]),u=s.length,c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=null;if(t<2)r=(0,T.n7)(e,"points",1).getData(),r.set([0,0,0]),(0,T.n7)(e,"lines",0).getData();else if(!e.getPoints()||e.getPoints().length!==3*t){r=(0,T.n7)(e,"points",t).getData();const i=t+(n?1:0);if(1!==e.getLines().getNumberOfCells()||e.getLines().getCellSizes()[0]!==i){const t=(0,T.n7)(e,"lines",i+1),r=t.getData();r[0]=i;for(let e=1;e<=i;e++)r[e]=e-1;n&&(r[i]=0),t.setData(r)}}return r}(i[0],u,t.closePolyLine&&u>2);if(c)for(let e=0;et.inputData[0],e.updateActorVisibility=(e,r,i)=>{let o=t.inputData[0].getLineThickness?.()??t.lineThickness;return e===M.rT.PICKING_BUFFER&&(o=Math.max(4,o)),l(o),n.updateActorVisibility(e,r,i)}}const A={threshold:Number.EPSILON,closePolyLine:!1,lineThickness:2,scaleInPixels:!0};function P(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={...A,...n};T.ZP.extend(e,t,i),r.m.setGet(e,t,["threshold","closePolyLine","lineThickness"]),D(e,t)}var k={newInstance:r.m.newInstance(P,"vtkPolyLineRepresentation"),extend:P}},function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(0),i=n(470);function o(e,t){t.classHierarchy.push("vtkAngleWidgetProp"),t._isDragging=!1;const n=i.ZP.newInstance();function o(e){return e.altKey||e.controlKey||e.shiftKey}n.setPickFromList(1),e.setDisplayCallback=e=>t.representations[0].setDisplayCallback(e),e.handleLeftButtonPress=i=>{if(!t.activeState||!t.activeState.getActive()||!t.pickable||o(i))return r.m.VOID;n.initializePickList(),n.setPickList(e.getNestedProps());const a=t.activeState?.getManipulator?.()??t.manipulator;if(t.activeState===t.widgetState.getMoveHandle()&&t.widgetState.getHandleList().length<3&&a){const{worldCoords:e}=a.handleEvent(i,t._apiSpecificRenderWindow),n=t.widgetState.getMoveHandle();n.setOrigin(...e);const r=t.widgetState.addHandle();r.setOrigin(...n.getOrigin()),r.setColor(n.getColor()),r.setScale1(n.getScale1()),r.setManipulator(a)}else t.dragable&&(t._isDragging=!0,t._apiSpecificRenderWindow.setCursor("grabbing"),t._interactor.requestAnimation(e));return e.invokeStartInteractionEvent(),r.m.EVENT_ABORT},e.handleMouseMove=n=>{const i=t.activeState?.getManipulator?.()??t.manipulator;if(i&&t.pickable&&t.dragable&&t.activeState&&t.activeState.getActive()&&!o(n)){const{worldCoords:o}=i.handleEvent(n,t._apiSpecificRenderWindow);if(o.length&&(t.activeState===t.widgetState.getMoveHandle()||t._isDragging)&&t.activeState.setOrigin)return t.activeState.setOrigin(o),e.invokeInteractionEvent(),r.m.EVENT_ABORT}return t.hasFocus&&t._widgetManager.disablePicking(),r.m.VOID},e.handleLeftButtonRelease=()=>t.activeState&&t.activeState.getActive()&&t.pickable?t.hasFocus&&3===t.widgetState.getHandleList().length?(e.loseFocus(),r.m.VOID):(t._isDragging?(t._apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t._interactor.cancelAnimation(e),t._isDragging=!1):t.activeState!==t.widgetState.getMoveHandle()&&t.widgetState.deactivate(),(t.hasFocus&&!t.activeState||t.activeState&&!t.activeState.getActive())&&(t._widgetManager.enablePicking(),t._interactor.render()),e.invokeEndInteractionEvent(),r.m.EVENT_ABORT):r.m.VOID,e.grabFocus=()=>{!t.hasFocus&&t.widgetState.getHandleList().length<3&&(t.activeState=t.widgetState.getMoveHandle(),t.activeState.activate(),t.activeState.setVisible(!0),t._interactor.requestAnimation(e),e.invokeStartInteractionEvent()),t.hasFocus=!0},e.loseFocus=()=>{t.hasFocus&&(t._interactor.cancelAnimation(e),e.invokeEndInteractionEvent()),t.widgetState.deactivate(),t.widgetState.getMoveHandle().deactivate(),t.widgetState.getMoveHandle().setVisible(!1),t.widgetState.getMoveHandle().setOrigin(null),t.activeState=null,t.hasFocus=!1,t._widgetManager.enablePicking(),t._interactor.render()}}},function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(0);function i(e,t){function n(e){return e.altKey||e.controlKey||e.shiftKey}t.classHierarchy.push("vtkDistanceWidgetProp"),t._isDragging=!1,e.setDisplayCallback=e=>t.representations[0].setDisplayCallback(e),e.handleLeftButtonPress=i=>{if(!t.activeState||!t.activeState.getActive()||!t.pickable||n(i))return r.m.VOID;const o=t.activeState?.getManipulator?.()??t.manipulator;if(t.activeState===t.widgetState.getMoveHandle()&&t.widgetState.getHandleList().length<2&&o){const{worldCoords:e}=o.handleEvent(i,t._apiSpecificRenderWindow),n=t.widgetState.getMoveHandle();n.setOrigin(...e);const r=t.widgetState.addHandle();r.setOrigin(...n.getOrigin()),r.setColor(n.getColor()),r.setScale1(n.getScale1()),r.setManipulator(o)}else t.dragable&&(t._isDragging=!0,t._apiSpecificRenderWindow.setCursor("grabbing"),t._interactor.requestAnimation(e));return e.invokeStartInteractionEvent(),r.m.EVENT_ABORT},e.handleMouseMove=i=>{const o=t.activeState?.getManipulator?.()??t.manipulator;if(o&&t.pickable&&t.dragable&&t.activeState&&t.activeState.getActive()&&!n(i)){const{worldCoords:n}=o.handleEvent(i,t._apiSpecificRenderWindow);if(n.length&&(t.activeState===t.widgetState.getMoveHandle()||t._isDragging)&&t.activeState.setOrigin)return t.activeState.setOrigin(n),e.invokeInteractionEvent(),r.m.EVENT_ABORT}return r.m.VOID},e.handleLeftButtonRelease=()=>t.activeState&&t.activeState.getActive()&&t.pickable?t.hasFocus&&2===t.widgetState.getHandleList().length?(e.loseFocus(),r.m.VOID):(t._isDragging?(t._apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t._interactor.cancelAnimation(e),t._isDragging=!1):t.activeState!==t.widgetState.getMoveHandle()&&t.widgetState.deactivate(),(t.hasFocus&&!t.activeState||t.activeState&&!t.activeState.getActive())&&(t._widgetManager.enablePicking(),t._interactor.render()),e.invokeEndInteractionEvent(),r.m.EVENT_ABORT):r.m.VOID,e.grabFocus=()=>{!t.hasFocus&&t.widgetState.getHandleList().length<2&&(t.activeState=t.widgetState.getMoveHandle(),t.activeState.activate(),t.activeState.setVisible(!0),t._interactor.requestAnimation(e),e.invokeStartInteractionEvent()),t.hasFocus=!0},e.loseFocus=()=>{t.hasFocus&&(t._interactor.cancelAnimation(e),e.invokeEndInteractionEvent()),t.widgetState.deactivate(),t.widgetState.getMoveHandle().deactivate(),t.widgetState.getMoveHandle().setVisible(!1),t.widgetState.getMoveHandle().setOrigin(null),t.activeState=null,t.hasFocus=!1,t._widgetManager.enablePicking(),t._interactor.render()}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return f}});var r=n(0),i=n(479),o=n(480),a=n(40);function s(e,t){return e+t}function l(){for(var e=arguments.length,t=new Array(e),n=0;n!!e&&(t.slicingMode!==e&&(t.slicingMode=e,n(e),!0)),e.getSliceIndex=()=>-1!=="XYZ".indexOf(t.slicingMode)?t.mapper.getSliceAtPosition(t.mapper.getSlice()):t.mapper.getSlice(),e.getAnnotations=()=>{const n={},r=e.getSliceIndex(),i=t.mapper.getBoundsForSlice(),o=t.mapper.getSlicingModeNormal(),{ijkMode:a}=t.mapper.getClosestIJKAxis(),s=[.5*(i[0]+i[1]),.5*(i[2]+i[3]),.5*(i[4]+i[5])];let l=0;i[1]-i[0]Number.EPSILON&&(e[0]="IJK"[t]),r[3]-r[2]>Number.EPSILON&&(e[1]="IJK"[t]),r[5]-r[4]>Number.EPSILON&&(e[2]="IJK"[t])}n.ijkOrientation=e.join("")}return{ijkMode:a,sliceBounds:i,sliceIndex:r,sliceNormal:o,sliceOrigin:s,slicePosition:l,...n}};const r=e.setColorBy;e.setColorBy=function(n,i){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(null===n)t.property.setRGBTransferFunction(null),t.property.setPiecewiseFunction(null);else{r(n,i,o);const a=e.getLookupTableProxy(n),s=e.getPiecewiseFunctionProxy(n);t.property.setRGBTransferFunction(a.getLookupTable()),t.property.setPiecewiseFunction(s.getPiecewiseFunction())}},n(t.slicingMode||"X")}const d={};function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),a.Z.extend(e,t,n),r.m.get(e,t,["slicingMode"]),c(e,t),r.m.proxyPropertyMapping(e,t,{visibility:{modelKey:"actor",property:"visibility"},windowWidth:{modelKey:"property",property:"colorWindow"},windowLevel:{modelKey:"property",property:"colorLevel"},interpolationType:{modelKey:"property",property:"interpolationType"},slice:{modelKey:"mapper",property:"slice"}})}var f={newInstance:r.m.newInstance(p,"vtkSliceRepresentationProxy"),extend:p}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return y}});var r=n(572),i=n(0),o=n(10),a=n(493),s=n(47);const{InterpolationType:l}=s.C,{vtkErrorMacro:u}=i.m;function c(e,t){t.classHierarchy.push("vtkImageProperty"),e.getMTime=()=>{let e,n=t.mtime;for(let r=0;r<4;r++)t.componentData[r].rGBTransferFunction&&(e=t.componentData[r].rGBTransferFunction.getMTime(),n=n>e?n:e),t.componentData[r].piecewiseFunction&&(e=t.componentData[r].piecewiseFunction.getMTime(),n=n>e?n:e);return n},e.setRGBTransferFunction=(n,r)=>{let i=n,o=r;return Number.isInteger(n)||(o=n,i=0),t.componentData[i].rGBTransferFunction!==o&&(t.componentData[i].rGBTransferFunction=o,e.modified(),!0)},e.getRGBTransferFunction=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].rGBTransferFunction},e.setPiecewiseFunction=(n,r)=>{let i=n,o=r;return Number.isInteger(n)||(o=n,i=0),t.componentData[i].piecewiseFunction!==o&&(t.componentData[i].piecewiseFunction=o,e.modified(),!0)},e.getPiecewiseFunction=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].piecewiseFunction},e.setScalarOpacity=(t,n)=>{let r=t,i=n;return Number.isInteger(t)||(i=t,r=0),e.setPiecewiseFunction(r,i)},e.getScalarOpacity=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e.getPiecewiseFunction(t)},e.setComponentWeight=(n,r)=>{if(n<0||n>=4)return u("Invalid index"),!1;const i=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==i&&(t.componentData[n].componentWeight=i,e.modified(),!0)},e.getComponentWeight=e=>e<0||e>=4?(u("Invalid index"),0):t.componentData[e].componentWeight,e.setInterpolationTypeToNearest=()=>e.setInterpolationType(l.NEAREST),e.setInterpolationTypeToLinear=()=>e.setInterpolationType(l.LINEAR),e.getInterpolationTypeAsString=()=>i.m.enumToString(l,t.interpolationType)}const d={independentComponents:!1,interpolationType:l.LINEAR,colorWindow:255,colorLevel:127.5,ambient:1,diffuse:0,opacity:1,useLookupTableScalarRange:!1};function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,d,n),i.m.obj(e,t),!t.componentData){t.componentData=[];for(let e=0;e<4;e++)t.componentData.push({rGBTransferFunction:null,piecewiseFunction:null,componentWeight:1})}i.m.setGet(e,t,["independentComponents","interpolationType","colorWindow","colorLevel","ambient","diffuse","opacity","useLookupTableScalarRange"]),c(e,t)}var f={newInstance:i.m.newInstance(p,"vtkImageProperty"),extend:p};const{vtkDebugMacro:h}=i.m;function m(e,t){t.classHierarchy.push("vtkImageSlice"),e.getActors=()=>e,e.getImages=()=>e,e.getIsOpaque=()=>{if(t.forceOpaque)return!0;if(t.forceTranslucent)return!1;t.property||e.getProperty();let n=t.property.getOpacity()>=1;return n=n&&(!t.mapper||t.mapper.getIsOpaque()),n},e.hasTranslucentPolygonalGeometry=()=>!1,e.makeProperty=f.newInstance,e.getProperty=()=>(null===t.property&&(t.property=e.makeProperty()),t.property),e.getBounds=()=>{if(null===t.mapper)return t.bounds;const n=t.mapper.getBounds();if(!n||6!==n.length)return n;if(n[0]>n[1])return t.mapperBounds=n.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),n;if(!t.mapperBounds||!(i=[n,t.mapperBounds],i[0].map(((e,t)=>i.map((e=>e[t]))))).reduce(((e,t)=>e&&t[0]===t[1]),!0)||e.getMTime()>t.boundsMTime.getMTime()){h("Recomputing bounds..."),t.mapperBounds=n.map((e=>e)),e.computeMatrix();const i=new Float64Array(16);r.transpose(i,t.matrix),o.ZP.transformBounds(n,i,t.bounds),t.boundsMTime.modified()}var i;return t.bounds},e.getBoundsForSlice=(n,i)=>{const a=t.mapper.getBoundsForSlice(n,i);if(!o.ZP.isValid(a))return a;e.computeMatrix();const s=new Float64Array(16);r.transpose(s,t.matrix);return o.ZP.transformBounds(a,s)},e.getMinXBound=()=>e.getBounds()[0],e.getMaxXBound=()=>e.getBounds()[1],e.getMinYBound=()=>e.getBounds()[2],e.getMaxYBound=()=>e.getBounds()[3],e.getMinZBound=()=>e.getBounds()[4],e.getMaxZBound=()=>e.getBounds()[5],e.getMTime=()=>{let e=t.mtime;if(null!==t.property){const n=t.property.getMTime();e=n>e?n:e}return e},e.getRedrawMTime=()=>{let e=t.mtime;if(null!==t.mapper){let n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),n=t.mapper.getInput().getMTime(),e=n>e?n:e)}if(null!==t.property){let n=t.property.getMTime();e=n>e?n:e,null!==t.property.getRGBTransferFunction()&&(n=t.property.getRGBTransferFunction().getMTime(),e=n>e?n:e)}return e},e.getSupportsSelection=()=>!!t.mapper&&t.mapper.getSupportsSelection()}const g={mapper:null,property:null,bounds:[...o.ZP.INIT_BOUNDS]};function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,g,n),a.ZP.extend(e,t,n),t.boundsMTime={},i.m.obj(t.boundsMTime),i.m.set(e,t,["property"]),i.m.setGet(e,t,["mapper"]),i.m.getArray(e,t,["bounds"],6),m(e,t)}var y={newInstance:i.m.newInstance(v,"vtkImageSlice"),extend:v}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return b}});var r=n(72),i=n(0),o=n(358),a=n(2);function s(e,t){t.classHierarchy.push("vtkAbstractImageMapper"),e.getIsOpaque=()=>!0,e.getCurrentImage=()=>null,e.getBoundsForSlice=()=>(i.m.vtkErrorMacro("vtkAbstractImageMapper.getBoundsForSlice - NOT IMPLEMENTED"),(0,a.F)())}const l={slice:0,customDisplayExtent:[0,0,0,0,0,0],useCustomExtents:!1,backgroundColor:[0,0,0,1]};var u={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l,n),o.Z.extend(e,t,n),i.m.setGet(e,t,["slice","useCustomExtents"]),i.m.setGetArray(e,t,["customDisplayExtent"],6),i.m.setGetArray(e,t,["backgroundColor"],4),s(e,t)}},c=n(575),d=n(43);function p(e,t,n){const r=n.getCurrentImage(),i=r.getExtent(),o=[i[0],i[2],i[4]],{ijkMode:a}=n.getClosestIJKAxis();let s=n.isA("vtkImageArrayMapper")?n.getSubSlice():n.getSlice();a!==n.getSlicingMode()&&(s=n.getSliceAtPosition(s)),o[a]+=s;const l=[0,0,0];r.indexToWorld(o,l),o[a]+=1;const u=[0,0,0];r.indexToWorld(o,u),u[0]-=l[0],u[1]-=l[1],u[2]-=l[2],c.Fv(u,u);const p=d.ZP.intersectWithLine(e,t,l,u);if(p.intersection){const e=p.x,t=[0,0,0];return r.worldToIndex(e,t),{t:p.t,absoluteIJK:t}}return null}var f=n(101);const{staticOffsetAPI:h,otherStaticMethods:m}=f.Z,{SlicingMode:g}=r.Z;function v(e,t){function n(){let n;switch(t.slicingMode){case g.X:n=0;break;case g.Y:n=1;break;case g.Z:n=2;break;default:return void(t.closestIJKAxis={ijkMode:t.slicingMode,flip:!1})}const r=e.getCurrentImage().getDirection(),i=(0,a.P)(r);let o=0;for(;o<3&&0===i[n+3*o];++o);const s=i[n+3*o]<0;t.closestIJKAxis={ijkMode:o,flip:s}}t.classHierarchy.push("vtkImageMapper"),e.getSliceAtPosition=n=>{const r=e.getCurrentImage();let i;if(3===n.length)i=n;else if(Number.isFinite(n)){const e=r.getBounds();switch(t.slicingMode){case g.X:i=[n,(e[3]+e[2])/2,(e[5]+e[4])/2];break;case g.Y:i=[(e[1]+e[0])/2,n,(e[5]+e[4])/2];break;case g.Z:i=[(e[1]+e[0])/2,(e[3]+e[2])/2,n]}}const o=[0,0,0];r.worldToIndex(i,o);const s=r.getExtent(),{ijkMode:l}=e.getClosestIJKAxis();let u=0;switch(l){case g.I:u=(0,a.C)(o[0],s[0],s[1]);break;case g.J:u=(0,a.C)(o[1],s[2],s[3]);break;case g.K:u=(0,a.C)(o[2],s[4],s[5]);break;default:return 0}return u},e.setSliceFromCamera=n=>{const r=n.getFocalPoint();switch(t.slicingMode){case g.I:case g.J:case g.K:{const t=e.getSliceAtPosition(r);e.setSlice(t)}break;case g.X:e.setSlice(r[0]);break;case g.Y:e.setSlice(r[1]);break;case g.Z:e.setSlice(r[2])}},e.setXSlice=t=>{e.setSlicingMode(g.X),e.setSlice(t)},e.setYSlice=t=>{e.setSlicingMode(g.Y),e.setSlice(t)},e.setZSlice=t=>{e.setSlicingMode(g.Z),e.setSlice(t)},e.setISlice=t=>{e.setSlicingMode(g.I),e.setSlice(t)},e.setJSlice=t=>{e.setSlicingMode(g.J),e.setSlice(t)},e.setKSlice=t=>{e.setSlicingMode(g.K),e.setSlice(t)},e.getSlicingModeNormal=()=>{const n=[0,0,0],r=e.getCurrentImage().getDirection();switch(t.slicingMode){case g.X:n[0]=1;break;case g.Y:n[1]=1;break;case g.Z:n[2]=1;break;case g.I:(0,a.O)(r,[1,0,0],n);break;case g.J:(0,a.O)(r,[0,1,0],n);break;case g.K:(0,a.O)(r,[0,0,1],n)}return n},e.setSlicingMode=r=>{t.slicingMode!==r&&(t.slicingMode=r,e.getCurrentImage()&&n(),e.modified())},e.getClosestIJKAxis=()=>(void 0!==t.closestIJKAxis&&t.closestIJKAxis.ijkMode!==g.NONE||!e.getCurrentImage()||n(),t.closestIJKAxis),e.getBounds=()=>{const n=e.getCurrentImage();if(!n)return(0,a.F)();if(!t.useCustomExtents)return n.getBounds();const r=t.customDisplayExtent.slice(),{ijkMode:i}=e.getClosestIJKAxis();let o=t.slice;switch(i!==t.slicingMode&&(o=e.getSliceAtPosition(t.slice)),i){case g.I:r[0]=o,r[1]=o;break;case g.J:r[2]=o,r[3]=o;break;case g.K:r[4]=o,r[5]=o}return n.extentToBounds(r)},e.getBoundsForSlice=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.slice,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=e.getCurrentImage();if(!i)return(0,a.F)();const o=i.getSpatialExtent(),{ijkMode:s}=e.getClosestIJKAxis();let l=n;switch(s!==t.slicingMode&&(l=e.getSliceAtPosition(n)),s){case g.I:o[0]=l-r,o[1]=l+r;break;case g.J:o[2]=l-r,o[3]=l+r;break;case g.K:o[4]=l-r,o[5]=l+r}return i.extentToBounds(o)},e.intersectWithLineForPointPicking=(t,n)=>function(e,t,n){const r=p(e,t,n);if(r){const e=n.getCurrentImage().getExtent(),t=[Math.round(r.absoluteIJK[0]),Math.round(r.absoluteIJK[1]),Math.round(r.absoluteIJK[2])];return t[0]e[1]||t[1]e[3]||t[2]e[5]?null:{t:r.t,ijk:t}}return null}(t,n,e),e.intersectWithLineForCellPicking=(t,n)=>function(e,t,n){const r=p(e,t,n);if(r){const e=n.getCurrentImage().getExtent(),t=r.absoluteIJK,i=[Math.floor(t[0]),Math.floor(t[1]),Math.floor(t[2])];if(i[0]e[1]-1||i[1]e[3]-1||i[2](e[5]?e[5]-1:e[5]))return null;const o=[t[0]-i[0],t[1]-i[1],t[2]-i[2]];return{t:r.t,ijk:i,pCoords:o}}return null}(t,n,e),e.getCurrentImage=()=>e.getInputData()}const y={slicingMode:g.NONE,closestIJKAxis:{ijkMode:g.NONE,flip:!1},renderToRectangle:!1,sliceAtFocalPoint:!1,preferSizeOverAccuracy:!1};function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,y,n),u.extend(e,t,n),i.m.get(e,t,["slicingMode"]),i.m.setGet(e,t,["closestIJKAxis","renderToRectangle","sliceAtFocalPoint","preferSizeOverAccuracy"]),f.Z.implementCoincidentTopologyMethods(e,t),v(e,t)}var b={newInstance:i.m.newInstance(_,"vtkImageMapper"),extend:_,...h,...m,...r.Z}},function(e,t,n){"use strict";e.exports=function(){if("object"==typeof globalThis)return globalThis;var e;try{e=this||new Function("return this")()}catch(e){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return e}()},function(e){var t=new Map([["bmp","itkBMPImageIOJSBinding"],["BMP","itkBMPImageIOJSBinding"],["dcm","itkGDCMImageIOJSBinding"],["DCM","itkGDCMImageIOJSBinding"],["gipl","itkGiplImageIOJSBinding"],["gipl.gz","itkGiplImageIOJSBinding"],["hdf5","itkHDF5ImageIOJSBinding"],["jpg","itkJPEGImageIOJSBinding"],["JPG","itkJPEGImageIOJSBinding"],["jpeg","itkJPEGImageIOJSBinding"],["JPEG","itkJPEGImageIOJSBinding"],["json","itkJSONImageIOJSBinding"],["lsm","itkLSMImageIOJSBinding"],["mnc","itkMINCImageIOJSBinding"],["MNC","itkMINCImageIOJSBinding"],["mnc.gz","itkMINCImageIOJSBinding"],["MNC.GZ","itkMINCImageIOJSBinding"],["mnc2","itkMINCImageIOJSBinding"],["MNC2","itkMINCImageIOJSBinding"],["mgh","itkMGHImageIOJSBinding"],["mgz","itkMGHImageIOJSBinding"],["mgh.gz","itkMGHImageIOJSBinding"],["mha","itkMetaImageIOJSBinding"],["mhd","itkMetaImageIOJSBinding"],["mrc","itkMRCImageIOJSBinding"],["nia","itkNiftiImageIOJSBinding"],["nii","itkNiftiImageIOJSBinding"],["nii.gz","itkNiftiImageIOJSBinding"],["hdr","itkNiftiImageIOJSBinding"],["nrrd","itkNrrdImageIOJSBinding"],["NRRD","itkNrrdImageIOJSBinding"],["nhdr","itkNrrdImageIOJSBinding"],["NHDR","itkNrrdImageIOJSBinding"],["png","itkPNGImageIOJSBinding"],["PNG","itkPNGImageIOJSBinding"],["pic","itkBioRadImageIOJSBinding"],["PIC","itkBioRadImageIOJSBinding"],["tif","itkTIFFImageIOJSBinding"],["TIF","itkTIFFImageIOJSBinding"],["tiff","itkTIFFImageIOJSBinding"],["TIFF","itkTIFFImageIOJSBinding"],["vtk","itkVTKImageIOJSBinding"],["VTK","itkVTKImageIOJSBinding"]]);e.exports=t},function(e){var t=new Map([]);e.exports=t},function(e){e.exports=function(e){var t=e.slice(2+(e.lastIndexOf(".")-1>>>0));if("gz"===t.toLowerCase()){var n=e.slice(0,-3).lastIndexOf(".");t=e.slice(2+(n-1>>>0))}return t}},function(e){function t(e,t){if(!(e instanceof Blob))throw new TypeError("Must be a File or Blob");return new Promise((function(n,r){var i=new FileReader;i.onload=function(e){n(e.target.result)},i.onerror=function(t){r(new Error("Error reading"+e.name+": "+t.target.result))},i["readAs"+t](e)}))}e.exports={readAsDataURL:function(e){return t(e,"DataURL")},readAsText:function(e){return t(e,"Text")},readAsArrayBuffer:function(e){return t(e,"ArrayBuffer")}}},function(e,t,n){var r=n(487),i=n(327);e.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new r;this.imageType=e,this.name="Image";var t=e.dimension;this.origin=new Array(t),this.origin.fill(0),this.spacing=new Array(t),this.spacing.fill(1),this.direction=new i(t,t),this.direction.setIdentity(),this.size=new Array(t),this.size.fill(0),this.data=null}},function(e,t,n){var r=n(132),i=n(488);e.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.UInt8,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.Scalar,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;this.dimension=e,this.componentType=t,this.pixelType=n,this.components=o}},function(e){e.exports={Unknown:0,Scalar:1,RGB:2,RGBA:3,Offset:4,Vector:5,Point:6,CovariantVector:7,SymmetricSecondRankTensor:8,DiffusionTensor3D:9,Complex:10,FixedArray:11,Array:12,Matrix:13,VariableLengthVector:14,VariableSizeMatrix:15}},,function(e,t,n){"use strict";n.r(t);var r=Object.freeze({});function i(e){return null==e}function o(e){return null!=e}function a(e){return!0===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function l(e){return null!==e&&"object"==typeof e}var u=Object.prototype.toString;function c(e){return"[object Object]"===u.call(e)}function d(e){return"[object RegExp]"===u.call(e)}function p(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function f(e){return o(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function h(e){return null==e?"":Array.isArray(e)||c(e)&&e.toString===u?JSON.stringify(e,null,2):String(e)}function m(e){var t=parseFloat(e);return isNaN(t)?e:t}function g(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function x(e,t){return b.call(e,t)}function w(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var S=/-(\w)/g,C=w((function(e){return e.replace(S,(function(e,t){return t?t.toUpperCase():""}))})),T=w((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),M=/\B([A-Z])/g,D=w((function(e){return e.replace(M,"-$1").toLowerCase()}));var A=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function P(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function k(e,t){for(var n in t)e[n]=t[n];return e}function L(e){for(var t={},n=0;n0,ee=X&&X.indexOf("edge/")>0,te=(X&&X.indexOf("android"),X&&/iphone|ipad|ipod|ios/.test(X)||"ios"===q),ne=(X&&/chrome\/\d+/.test(X),X&&/phantomjs/.test(X),X&&X.match(/firefox\/(\d+)/)),re={}.watch,ie=!1;if(Z)try{var oe={};Object.defineProperty(oe,"passive",{get:function(){ie=!0}}),window.addEventListener("test-passive",null,oe)}catch(e){}var ae=function(){return void 0===W&&(W=!Z&&!K&&void 0!==n.g&&(n.g.process&&"server"===n.g.process.env.VUE_ENV)),W},se=Z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function le(e){return"function"==typeof e&&/native code/.test(e.toString())}var ue,ce="undefined"!=typeof Symbol&&le(Symbol)&&"undefined"!=typeof Reflect&&le(Reflect.ownKeys);ue="undefined"!=typeof Set&&le(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var de=O,pe=0,fe=function(){this.id=pe++,this.subs=[]};fe.prototype.addSub=function(e){this.subs.push(e)},fe.prototype.removeSub=function(e){_(this.subs,e)},fe.prototype.depend=function(){fe.target&&fe.target.addDep(this)},fe.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t-1)if(o&&!x(i,"default"))a=!1;else if(""===a||a===D(e)){var l=He(String,i.type);(l<0||s0&&(mt((r=gt(r,(t||"")+"_"+n))[0])&&mt(u)&&(c[l]=be(u.text+r[0].text),r.shift()),c.push.apply(c,r)):s(r)?mt(u)?c[l]=be(u.text+r):""!==r&&c.push(be(r)):mt(r)&&mt(u)?c[l]=be(u.text+r.text):(a(e._isVList)&&o(r.tag)&&i(r.key)&&o(t)&&(r.key="__vlist"+t+"_"+n+"__"),c.push(r)));return c}function vt(e,t){if(e){for(var n=Object.create(null),r=ce?Reflect.ownKeys(e):Object.keys(e),i=0;i0,a=e?!!e.$stable:!o,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&n&&n!==r&&s===n.$key&&!o&&!n.$hasNormal)return n;for(var l in i={},e)e[l]&&"$"!==l[0]&&(i[l]=wt(t,l,e[l]))}else i={};for(var u in t)u in i||(i[u]=St(t,u));return e&&Object.isExtensible(e)&&(e._normalized=i),Y(i,"$stable",a),Y(i,"$key",s),Y(i,"$hasNormal",o),i}function wt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({}),t=(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:ht(e))&&e[0];return e&&(!t||1===e.length&&t.isComment&&!bt(t))?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function St(e,t){return function(){return e[t]}}function Ct(e,t){var n,r,i,a,s;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,i=e.length;rdocument.createEvent("Event").timeStamp&&(gn=function(){return vn.now()})}function yn(){var e,t;for(mn=gn(),fn=!0,un.sort((function(e,t){return e.id-t.id})),hn=0;hnhn&&un[n].id>e.id;)n--;un.splice(n+1,0,e)}else un.push(e);pn||(pn=!0,ot(yn))}}(this)},bn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||l(e)||this.deep){var t=this.value;if(this.value=e,this.user){var n='callback for watcher "'+this.expression+'"';$e(this.cb,this.vm,[e,t],this.vm,n)}else this.cb.call(this.vm,e,t)}}},bn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},bn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},bn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||_(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var xn={enumerable:!0,configurable:!0,get:O,set:O};function wn(e,t,n){xn.get=function(){return this[t][n]},xn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,xn)}function Sn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&Me(!1);var o=function(o){i.push(o);var a=Ge(o,t,n,e);Pe(r,o,a),o in e||wn(e,"_props",o)};for(var a in t)o(a);Me(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?O:A(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;c(t=e._data="function"==typeof t?function(e,t){me();try{return e.call(t,t)}catch(e){return We(e,t,"data()"),{}}finally{ge()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];0,r&&x(r,o)||j(o)||wn(e,"_data",o)}Ae(t,!0)}(e):Ae(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=ae();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;0,r||(n[i]=new bn(e,a||O,O,Cn)),i in e||Tn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==re&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!d(e)&&e.test(t)}function Nn(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=a.name;s&&!t(s)&&Rn(n,o,r,i)}}}function Rn(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,_(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=Pn++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Ve(kn(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&tn(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,i=n&&n.context;e.$slots=yt(t._renderChildren,i),e.$scopedSlots=r,e._c=function(t,n,r,i){return Wt(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Wt(e,t,n,r,i,!0)};var o=n&&n.data;Pe(e,"$attrs",o&&o.attrs||r,null,!0),Pe(e,"$listeners",t._parentListeners||r,null,!0)}(t),ln(t,"beforeCreate"),function(e){var t=vt(e.$options.inject,e);t&&(Me(!1),Object.keys(t).forEach((function(n){Pe(e,n,t[n])})),Me(!0))}(t),Sn(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),ln(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(Ln),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=ke,e.prototype.$delete=Le,e.prototype.$watch=function(e,t,n){var r=this;if(c(t))return An(r,e,t,n);(n=n||{}).user=!0;var i=new bn(r,e,t,n);if(n.immediate){var o='callback for immediate watcher "'+i.expression+'"';me(),$e(t,r,[i.value],r,o),ge()}return function(){i.teardown()}}}(Ln),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i1?P(n):n;for(var r=P(arguments,1),i='event handler for "'+e+'"',o=0,a=n.length;oparseInt(this.max)&&Rn(t,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Rn(this.cache,e,this.keys)},mounted:function(){var e=this;this.cacheVNode(),this.$watch("include",(function(t){Nn(e,(function(e){return In(t,e)}))})),this.$watch("exclude",(function(t){Nn(e,(function(e){return!In(t,e)}))}))},updated:function(){this.cacheVNode()},render:function(){var e=this.$slots.default,t=Xt(e),n=t&&t.componentOptions;if(n){var r=En(n),i=this.include,o=this.exclude;if(i&&(!r||!In(i,r))||o&&r&&In(o,r))return t;var a=this.cache,s=this.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;a[l]?(t.componentInstance=a[l].componentInstance,_(s,l),s.push(l)):(this.vnodeToCache=t,this.keyToCache=l),t.data.keepAlive=!0}return t||e&&e[0]}},Vn={KeepAlive:Fn};!function(e){var t={get:function(){return G}};Object.defineProperty(e,"config",t),e.util={warn:de,extend:k,mergeOptions:Ve,defineReactive:Pe},e.set=ke,e.delete=Le,e.nextTick=ot,e.observable=function(e){return Ae(e),e},e.options=Object.create(null),V.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,k(e.options.components,Vn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=P(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Ve(this.options,e),this}}(e),On(e),function(e){V.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&c(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(Ln),Object.defineProperty(Ln.prototype,"$isServer",{get:ae}),Object.defineProperty(Ln.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Ln,"FunctionalRenderContext",{value:Vt}),Ln.version="2.6.14";var Un=g("style,class"),Gn=g("input,textarea,option,select,progress"),zn=function(e,t,n){return"value"===n&&Gn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},jn=g("contenteditable,draggable,spellcheck"),Yn=g("events,caret,typing,plaintext-only"),Hn=g("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Wn="http://www.w3.org/1999/xlink",$n=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Zn=function(e){return $n(e)?e.slice(6,e.length):""},Kn=function(e){return null==e||!1===e};function qn(e){for(var t=e.data,n=e,r=e;o(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Xn(r.data,t));for(;o(n=n.parent);)n&&n.data&&(t=Xn(t,n.data));return function(e,t){if(o(e)||o(t))return Jn(e,Qn(t));return""}(t.staticClass,t.class)}function Xn(e,t){return{staticClass:Jn(e.staticClass,t.staticClass),class:o(e.class)?[e.class,t.class]:t.class}}function Jn(e,t){return e?t?e+" "+t:e:t||""}function Qn(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,i=e.length;r-1?Cr(e,t,n):Hn(t)?Kn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):jn(t)?e.setAttribute(t,function(e,t){return Kn(t)||"false"===t?"false":"contenteditable"===e&&Yn(t)?t:"true"}(t,n)):$n(t)?Kn(n)?e.removeAttributeNS(Wn,Zn(t)):e.setAttributeNS(Wn,t,n):Cr(e,t,n)}function Cr(e,t,n){if(Kn(n))e.removeAttribute(t);else{if(J&&!Q&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var Tr={create:wr,update:wr};function Mr(e,t){var n=t.elm,r=t.data,a=e.data;if(!(i(r.staticClass)&&i(r.class)&&(i(a)||i(a.staticClass)&&i(a.class)))){var s=qn(t),l=n._transitionClasses;o(l)&&(s=Jn(s,Qn(l))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Dr,Ar,Pr,kr,Lr,Or,Er={create:Mr,update:Mr},Ir=/[\w).+\-_$\]]/;function Nr(e){var t,n,r,i,o,a=!1,s=!1,l=!1,u=!1,c=0,d=0,p=0,f=0;for(r=0;r=0&&" "===(m=e.charAt(h));h--);m&&Ir.test(m)||(u=!0)}}else void 0===i?(f=r+1,i=e.slice(0,r).trim()):g();function g(){(o||(o=[])).push(e.slice(f,r).trim()),f=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==f&&g(),o)for(r=0;r-1?{exp:e.slice(0,kr),key:'"'+e.slice(kr+1)+'"'}:{exp:e,key:null};Ar=e,kr=Lr=Or=0;for(;!Jr();)Qr(Pr=Xr())?ti(Pr):91===Pr&&ei(Pr);return{exp:e.slice(0,Lr),key:e.slice(Lr+1,Or)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Xr(){return Ar.charCodeAt(++kr)}function Jr(){return kr>=Dr}function Qr(e){return 34===e||39===e}function ei(e){var t=1;for(Lr=kr;!Jr();)if(Qr(e=Xr()))ti(e);else if(91===e&&t++,93===e&&t--,0===t){Or=kr;break}}function ti(e){for(var t=e;!Jr()&&(e=Xr())!==t;);}var ni,ri="__r";function ii(e,t,n){var r=ni;return function i(){var o=t.apply(null,arguments);null!==o&&si(e,i,n,r)}}var oi=Xe&&!(ne&&Number(ne[1])<=53);function ai(e,t,n,r){if(oi){var i=mn,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}ni.addEventListener(e,t,ie?{capture:n,passive:r}:n)}function si(e,t,n,r){(r||ni).removeEventListener(e,t._wrapper||t,n)}function li(e,t){if(!i(e.data.on)||!i(t.data.on)){var n=t.data.on||{},r=e.data.on||{};ni=t.elm,function(e){if(o(e.__r)){var t=J?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}o(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),dt(n,r,ai,si,ii,t.context),ni=void 0}}var ui,ci={create:li,update:li};function di(e,t){if(!i(e.data.domProps)||!i(t.data.domProps)){var n,r,a=t.elm,s=e.data.domProps||{},l=t.data.domProps||{};for(n in o(l.__ob__)&&(l=t.data.domProps=k({},l)),s)n in l||(a[n]="");for(n in l){if(r=l[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=r;var u=i(r)?"":String(r);pi(a,u)&&(a.value=u)}else if("innerHTML"===n&&nr(a.tagName)&&i(a.innerHTML)){(ui=ui||document.createElement("div")).innerHTML=""+r+"";for(var c=ui.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}else if(r!==s[n])try{a[n]=r}catch(e){}}}}function pi(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(o(r)){if(r.number)return m(n)!==m(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var fi={create:di,update:di},hi=w((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function mi(e){var t=gi(e.style);return e.staticStyle?k(e.staticStyle,t):t}function gi(e){return Array.isArray(e)?L(e):"string"==typeof e?hi(e):e}var vi,yi=/^--/,_i=/\s*!important$/,bi=function(e,t,n){if(yi.test(t))e.style.setProperty(t,n);else if(_i.test(n))e.style.setProperty(D(t),n.replace(_i,""),"important");else{var r=wi(t);if(Array.isArray(n))for(var i=0,o=n.length;i-1?t.split(Ti).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Di(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Ti).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Ai(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&k(t,Pi(e.name||"v")),k(t,e),t}return"string"==typeof e?Pi(e):void 0}}var Pi=w((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),ki=Z&&!Q,Li="transition",Oi="animation",Ei="transition",Ii="transitionend",Ni="animation",Ri="animationend";ki&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ei="WebkitTransition",Ii="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ni="WebkitAnimation",Ri="webkitAnimationEnd"));var Bi=Z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Fi(e){Bi((function(){Bi(e)}))}function Vi(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Mi(e,t))}function Ui(e,t){e._transitionClasses&&_(e._transitionClasses,t),Di(e,t)}function Gi(e,t,n){var r=ji(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Li?Ii:Ri,l=0,u=function(){e.removeEventListener(s,c),n()},c=function(t){t.target===e&&++l>=a&&u()};setTimeout((function(){l0&&(n=Li,c=a,d=o.length):t===Oi?u>0&&(n=Oi,c=u,d=l.length):d=(n=(c=Math.max(a,u))>0?a>u?Li:Oi:null)?n===Li?o.length:l.length:0,{type:n,timeout:c,propCount:d,hasTransform:n===Li&&zi.test(r[Ei+"Property"])}}function Yi(e,t){for(;e.length1}function qi(e,t){!0!==t.data.show&&Wi(t)}var Xi=function(e){var t,n,r={},l=e.modules,u=e.nodeOps;for(t=0;th?_(e,i(n[v+1])?null:n[v+1].elm,n,f,v,r):f>v&&x(t,p,h)}(p,g,v,n,c):o(v)?(o(e.text)&&u.setTextContent(p,""),_(p,null,v,0,v.length-1,n)):o(g)?x(g,0,g.length-1):o(e.text)&&u.setTextContent(p,""):e.text!==t.text&&u.setTextContent(p,t.text),o(h)&&o(f=h.hook)&&o(f=f.postpatch)&&f(e,t)}}}function T(e,t,n){if(a(n)&&o(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r-1,a.selected!==o&&(a.selected=o);else if(N(no(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function to(e,t){return t.every((function(t){return!N(t,e)}))}function no(e){return"_value"in e?e._value:e.value}function ro(e){e.target.composing=!0}function io(e){e.target.composing&&(e.target.composing=!1,oo(e.target,"input"))}function oo(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function ao(e){return!e.componentInstance||e.data&&e.data.transition?e:ao(e.componentInstance._vnode)}var so={bind:function(e,t,n){var r=t.value,i=(n=ao(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Wi(n,(function(){e.style.display=o}))):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=ao(n)).data&&n.data.transition?(n.data.show=!0,r?Wi(n,(function(){e.style.display=e.__vOriginalDisplay})):$i(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}},lo={model:Ji,show:so},uo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function co(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?co(Xt(t.children)):e}function po(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[C(o)]=i[o];return t}function fo(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var ho=function(e){return e.tag||bt(e)},mo=function(e){return"show"===e.name},go={name:"transition",props:uo,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(ho)).length){0;var r=this.mode;0;var i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var o=co(i);if(!o)return i;if(this._leaving)return fo(e,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var l=(o.data||(o.data={})).transition=po(this),u=this._vnode,c=co(u);if(o.data.directives&&o.data.directives.some(mo)&&(o.data.show=!0),c&&c.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(o,c)&&!bt(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var d=c.data.transition=k({},l);if("out-in"===r)return this._leaving=!0,pt(d,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),fo(e,i);if("in-out"===r){if(bt(o))return u;var p,f=function(){p()};pt(l,"afterEnter",f),pt(l,"enterCancelled",f),pt(d,"delayLeave",(function(e){p=e}))}}return i}}},vo=k({tag:String,moveClass:String},uo);function yo(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function _o(e){e.data.newPos=e.elm.getBoundingClientRect()}function bo(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete vo.mode;var xo={Transition:go,TransitionGroup:{props:vo,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=rn(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=po(this),s=0;s-1?or[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:or[e]=/HTMLUnknownElement/.test(t.toString())},k(Ln.options.directives,lo),k(Ln.options.components,xo),Ln.prototype.__patch__=Z?Xi:O,Ln.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=_e),ln(e,"beforeMount"),r=function(){e._update(e._render(),n)},new bn(e,r,O,{before:function(){e._isMounted&&!e._isDestroyed&&ln(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,ln(e,"mounted")),e}(this,e=e&&Z?sr(e):void 0,t)},Z&&setTimeout((function(){G.devtools&&se&&se.emit("init",Ln)}),0);var wo=/\{\{((?:.|\r?\n)+?)\}\}/g,So=/[-.*+?^${}()|[\]\/\\]/g,Co=w((function(e){var t=e[0].replace(So,"\\$&"),n=e[1].replace(So,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}));var To={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Wr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Hr(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var Mo,Do={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Wr(e,"style");n&&(e.staticStyle=JSON.stringify(hi(n)));var r=Hr(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},Ao=function(e){return(Mo=Mo||document.createElement("div")).innerHTML=e,Mo.textContent},Po=g("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ko=g("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Lo=g("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Oo=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Eo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Io="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+z.source+"]*",No="((?:"+Io+"\\:)?"+Io+")",Ro=new RegExp("^<"+No),Bo=/^\s*(\/?)>/,Fo=new RegExp("^<\\/"+No+"[^>]*>"),Vo=/^]+>/i,Uo=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Ho=/&(?:lt|gt|quot|amp|#39);/g,Wo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,$o=g("pre,textarea",!0),Zo=function(e,t){return e&&$o(e)&&"\n"===t[0]};function Ko(e,t){var n=t?Wo:Ho;return e.replace(n,(function(e){return Yo[e]}))}var qo,Xo,Jo,Qo,ea,ta,na,ra,ia=/^@|^v-on:/,oa=/^v-|^@|^:|^#/,aa=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,sa=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,la=/^\(|\)$/g,ua=/^\[.*\]$/,ca=/:(.*)$/,da=/^:|^\.|^v-bind:/,pa=/\.[^.\]]+(?=[^\]]*$)/g,fa=/^v-slot(:|$)|^#/,ha=/[\r\n]/,ma=/[ \f\t\r\n]+/g,ga=w(Ao),va="_empty_";function ya(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:Ta(t),rawAttrsMap:{},parent:n,children:[]}}function _a(e,t){qo=t.warn||Br,ta=t.isPreTag||E,na=t.mustUseProp||E,ra=t.getTagNamespace||E;var n=t.isReservedTag||E;(function(e){return!(!(e.component||e.attrsMap[":is"]||e.attrsMap["v-bind:is"])&&(e.attrsMap.is?n(e.attrsMap.is):n(e.tag)))}),Jo=Fr(t.modules,"transformNode"),Qo=Fr(t.modules,"preTransformNode"),ea=Fr(t.modules,"postTransformNode"),Xo=t.delimiters;var r,i,o=[],a=!1!==t.preserveWhitespace,s=t.whitespace,l=!1,u=!1;function c(e){if(d(e),l||e.processed||(e=ba(e,t)),o.length||e===r||r.if&&(e.elseif||e.else)&&wa(r,{exp:e.elseif,block:e}),i&&!e.forbidden)if(e.elseif||e.else)a=e,s=function(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}(i.children),s&&s.if&&wa(s,{exp:a.elseif,block:a});else{if(e.slotScope){var n=e.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[n]=e}i.children.push(e),e.parent=i}var a,s;e.children=e.children.filter((function(e){return!e.slotScope})),d(e),e.pre&&(l=!1),ta(e.tag)&&(u=!1);for(var c=0;c]*>)","i")),p=e.replace(d,(function(e,n,r){return u=r.length,zo(c)||"noscript"===c||(n=n.replace(//g,"$1").replace(//g,"$1")),Zo(c,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));l+=e.length-p.length,e=p,M(c,l-u,l)}else{var f=e.indexOf("<");if(0===f){if(Uo.test(e)){var h=e.indexOf("--\x3e");if(h>=0){t.shouldKeepComment&&t.comment(e.substring(4,h),l,l+h+3),S(h+3);continue}}if(Go.test(e)){var m=e.indexOf("]>");if(m>=0){S(m+2);continue}}var g=e.match(Vo);if(g){S(g[0].length);continue}var v=e.match(Fo);if(v){var y=l;S(v[0].length),M(v[1],y,l);continue}var _=C();if(_){T(_),Zo(_.tagName,e)&&S(1);continue}}var b=void 0,x=void 0,w=void 0;if(f>=0){for(x=e.slice(f);!(Fo.test(x)||Ro.test(x)||Uo.test(x)||Go.test(x)||(w=x.indexOf("<",1))<0);)f+=w,x=e.slice(f);b=e.substring(0,f)}f<0&&(b=e),b&&S(b.length),t.chars&&b&&t.chars(b,l-b.length,l)}if(e===n){t.chars&&t.chars(e);break}}function S(t){l+=t,e=e.substring(t)}function C(){var t=e.match(Ro);if(t){var n,r,i={tagName:t[1],attrs:[],start:l};for(S(t[0].length);!(n=e.match(Bo))&&(r=e.match(Eo)||e.match(Oo));)r.start=l,S(r[0].length),r.end=l,i.attrs.push(r);if(n)return i.unarySlash=n[1],S(n[0].length),i.end=l,i}}function T(e){var n=e.tagName,l=e.unarySlash;o&&("p"===r&&Lo(n)&&M(r),s(n)&&r===n&&M(n));for(var u=a(n)||!!l,c=e.attrs.length,d=new Array(c),p=0;p=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)t.end&&t.end(i[u].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}M()}(e,{warn:qo,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,n,a,s,d){var p=i&&i.ns||ra(e);J&&"svg"===p&&(n=function(e){for(var t=[],n=0;nl&&(s.push(o=e.slice(l,i)),a.push(JSON.stringify(o)));var u=Nr(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),l=i+r[0].length}return l-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),Yr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+qr(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+qr(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+qr(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=Hr(e,"value")||"null";Vr(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Yr(e,"change",qr(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type;0;var i=n||{},o=i.lazy,a=i.number,s=i.trim,l=!o&&"range"!==r,u=o?"change":"range"===r?ri:"input",c="$event.target.value";s&&(c="$event.target.value.trim()");a&&(c="_n("+c+")");var d=qr(t,c);l&&(d="if($event.target.composing)return;"+d);Vr(e,"value","("+t+")"),Yr(e,u,d,null,!0),(s||a)&&Yr(e,"blur","$forceUpdate()")}(e,r,i);else{if(!G.isReservedTag(o))return Kr(e,r,i),!1}return!0},text:function(e,t){t.value&&Vr(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Vr(e,"innerHTML","_s("+t.value+")",t)}},Ea={expectHTML:!0,modules:Pa,directives:Oa,isPreTag:function(e){return"pre"===e},isUnaryTag:Po,mustUseProp:zn,canBeLeftOpenTag:ko,isReservedTag:rr,getTagNamespace:ir,staticKeys:function(e){return e.reduce((function(e,t){return e.concat(t.staticKeys||[])}),[]).join(",")}(Pa)},Ia=w((function(e){return g("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))}));function Na(e,t){e&&(ka=Ia(t.staticKeys||""),La=t.isReservedTag||E,Ra(e),Ba(e,!1))}function Ra(e){if(e.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||v(e.tag)||!La(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(ka)))}(e),1===e.type){if(!La(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var t=0,n=e.children.length;t|^function(?:\s+[\w$]+)?\s*\(/,Va=/\([^)]*?\);*$/,Ua=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ga={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},za={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},ja=function(e){return"if("+e+")return null;"},Ya={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:ja("$event.target !== $event.currentTarget"),ctrl:ja("!$event.ctrlKey"),shift:ja("!$event.shiftKey"),alt:ja("!$event.altKey"),meta:ja("!$event.metaKey"),left:ja("'button' in $event && $event.button !== 0"),middle:ja("'button' in $event && $event.button !== 1"),right:ja("'button' in $event && $event.button !== 2")};function Ha(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=Wa(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function Wa(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map((function(e){return Wa(e)})).join(",")+"]";var t=Ua.test(e.value),n=Fa.test(e.value),r=Ua.test(e.value.replace(Va,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(Ya[s])o+=Ya[s],Ga[s]&&a.push(s);else if("exact"===s){var l=e.modifiers;o+=ja(["ctrl","shift","alt","meta"].filter((function(e){return!l[e]})).map((function(e){return"$event."+e+"Key"})).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map($a).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+".apply(null, arguments)":n?"return ("+e.value+").apply(null, arguments)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function $a(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ga[e],r=za[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Za={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:O},Ka=function(e){this.options=e,this.warn=e.warn||Br,this.transforms=Fr(e.modules,"transformCode"),this.dataGenFns=Fr(e.modules,"genData"),this.directives=k(k({},Za),e.directives);var t=e.isReservedTag||E;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function qa(e,t){var n=new Ka(t);return{render:"with(this){return "+(e?"script"===e.tag?"null":Xa(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Xa(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ja(e,t);if(e.once&&!e.onceProcessed)return Qa(e,t);if(e.for&&!e.forProcessed)return ns(e,t);if(e.if&&!e.ifProcessed)return es(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=as(e,t),i="_t("+n+(r?",function(){return "+r+"}":""),o=e.attrs||e.dynamicAttrs?us((e.attrs||[]).concat(e.dynamicAttrs||[]).map((function(e){return{name:C(e.name),value:e.value,dynamic:e.dynamic}}))):null,a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:as(t,n,!0);return"_c("+e+","+rs(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=rs(e,t));var i=e.inlineTemplate?null:as(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];0;if(n&&1===n.type){var r=qa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(e){return"function(){"+e+"}"})).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+us(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function is(e){return 1===e.type&&("slot"===e.tag||e.children.some(is))}function os(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return es(e,t,os,"null");if(e.for&&!e.forProcessed)return ns(e,t,os);var r=e.slotScope===va?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(as(e,t)||"undefined")+":undefined":as(e,t)||"undefined":Xa(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function as(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Xa)(a,t)+s}var l=n?function(e,t){for(var n=0,r=0;r':'
',hs.innerHTML.indexOf(" ")>0}var _s=!!Z&&ys(!1),bs=!!Z&&ys(!0),xs=w((function(e){var t=sr(e);return t&&t.innerHTML})),ws=Ln.prototype.$mount;Ln.prototype.$mount=function(e,t){if((e=e&&sr(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=xs(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){0;var i=vs(r,{outputSourceRange:!1,shouldDecodeNewlines:_s,shouldDecodeNewlinesForHref:bs,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return ws.call(this,e,t)},Ln.compile=vs,t.default=Ln},function(e){"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},function(e,t,n){"use strict";var r=n(572),i=n(574),o=n(0),a=n(6),s=n(8);function l(e,t){t.classHierarchy.push("vtkOpenGLCamera"),e.buildPass=n=>{n&&(t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t._openGLRenderWindow=t._openGLRenderer.getParent(),t.context=t._openGLRenderWindow.getContext())},e.opaquePass=e=>{if(e){const e=t._openGLRenderer.getTiledSizeAndOrigin();t.context.viewport(e.lowerLeftU,e.lowerLeftV,e.usize,e.vsize),t.context.scissor(e.lowerLeftU,e.lowerLeftV,e.usize,e.vsize)}},e.translucentPass=e.opaquePass,e.zBufferPass=e.opaquePass,e.opaqueZBufferPass=e.opaquePass,e.volumePass=e.opaquePass,e.getKeyMatrices=n=>{if(n!==t.lastRenderer||t._openGLRenderWindow.getMTime()>t.keyMatrixTime.getMTime()||e.getMTime()>t.keyMatrixTime.getMTime()||n.getMTime()>t.keyMatrixTime.getMTime()||t.renderable.getMTime()>t.keyMatrixTime.getMTime()){r.copy(t.keyMatrices.wcvc,t.renderable.getViewMatrix()),i.fromMat4(t.keyMatrices.normalMatrix,t.keyMatrices.wcvc),i.invert(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),r.transpose(t.keyMatrices.wcvc,t.keyMatrices.wcvc);const e=t._openGLRenderer.getAspectRatio();r.copy(t.keyMatrices.vcpc,t.renderable.getProjectionMatrix(e,-1,1)),r.transpose(t.keyMatrices.vcpc,t.keyMatrices.vcpc),r.multiply(t.keyMatrices.wcpc,t.keyMatrices.vcpc,t.keyMatrices.wcvc),t.keyMatrixTime.modified(),t.lastRenderer=n}return t.keyMatrices}}const u={context:null,lastRenderer:null,keyMatrixTime:null,keyMatrices:null};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),a.Z.extend(e,t,n),t.keyMatrixTime={},(0,o.o)(t.keyMatrixTime),t.keyMatrices={normalMatrix:new Float64Array(9),vcpc:new Float64Array(16),wcvc:new Float64Array(16),wcpc:new Float64Array(16)},(0,o.e)(e,t,["context","keyMatrixTime"]),l(e,t)}const d=(0,o.n)(c);(0,s.vw)("vtkCamera",d);const{vtkDebugMacro:p}=o.c;function f(e,t){t.classHierarchy.push("vtkOpenGLRenderer"),e.buildPass=n=>{if(n){if(!t.renderable)return;e.updateLights(),e.prepareNodes(),e.addMissingNode(t.renderable.getActiveCamera()),e.addMissingNodes(t.renderable.getViewPropsWithNestedProps()),e.removeUnusedNodes()}},e.updateLights=()=>{let e=0;const n=t.renderable.getLightsByReference();for(let t=0;t0&&e++;return e||(p("No lights are on, creating one."),t.renderable.createLight()),e},e.zBufferPass=n=>{if(n){let n=0;const r=t.context;t.renderable.getTransparent()||(t.context.clearColor(1,0,0,1),n|=r.COLOR_BUFFER_BIT),t.renderable.getPreserveDepthBuffer()||(r.clearDepth(1),n|=r.DEPTH_BUFFER_BIT,t.context.depthMask(!0));const i=e.getTiledSizeAndOrigin();r.enable(r.SCISSOR_TEST),r.scissor(i.lowerLeftU,i.lowerLeftV,i.usize,i.vsize),r.viewport(i.lowerLeftU,i.lowerLeftV,i.usize,i.vsize),r.colorMask(!0,!0,!0,!0),n&&r.clear(n),r.enable(r.DEPTH_TEST)}},e.opaqueZBufferPass=t=>e.zBufferPass(t),e.cameraPass=t=>{t&&e.clear()},e.getAspectRatio=()=>{const e=t._parent.getSizeByReference(),n=t.renderable.getViewportByReference();return e[0]*(n[2]-n[0])/((n[3]-n[1])*e[1])},e.getTiledSizeAndOrigin=()=>{const e=t.renderable.getViewportByReference(),n=[0,0,1,1],r=e[0]-n[0],i=e[1]-n[1],o=t._parent.normalizedDisplayToDisplay(r,i),a=Math.round(o[0]),s=Math.round(o[1]),l=e[2]-n[0],u=e[3]-n[1],c=t._parent.normalizedDisplayToDisplay(l,u);let d=Math.round(c[0])-a,p=Math.round(c[1])-s;return d<0&&(d=0),p<0&&(p=0),{usize:d,vsize:p,lowerLeftU:a,lowerLeftV:s}},e.clear=()=>{let n=0;const r=t.context;if(!t.renderable.getTransparent()){const e=t.renderable.getBackgroundByReference();t.context.clearColor(e[0],e[1],e[2],e[3]),n|=r.COLOR_BUFFER_BIT}t.renderable.getPreserveDepthBuffer()||(r.clearDepth(1),n|=r.DEPTH_BUFFER_BIT,t.context.depthMask(!0)),r.colorMask(!0,!0,!0,!0);const i=e.getTiledSizeAndOrigin();r.enable(r.SCISSOR_TEST),r.scissor(i.lowerLeftU,i.lowerLeftV,i.usize,i.vsize),r.viewport(i.lowerLeftU,i.lowerLeftV,i.usize,i.vsize),n&&r.clear(n),r.enable(r.DEPTH_TEST)},e.releaseGraphicsResources=()=>{null!==t.selector&&t.selector.releaseGraphicsResources()},e.setOpenGLRenderWindow=n=>{t._openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t._openGLRenderWindow=n,t.context=null,n&&(t.context=t._openGLRenderWindow.getContext()))}}const h={context:null,selector:null};function m(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,h,n),a.Z.extend(e,t,n),(0,o.g)(e,t,["shaderCache"]),(0,o.e)(e,t,["selector"]),(0,o.i)(e,t,["openGLRenderWindow"]),f(e,t)}const g=(0,o.n)(m,"vtkOpenGLRenderer");function v(e,t){t.classHierarchy.push("vtkOpenGLActor"),e.buildPass=n=>{if(n){t._openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t._openGLRenderWindow.getContext(),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes(),t.ogltextures=null,t.activeTextures=null;for(let e=0;e{t.renderable&&t.renderable.getNestedVisibility()&&(!t._openGLRenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.oglmapper.traverse(n),e.apply(n,!1))},e.traverseOpaqueZBufferPass=t=>e.traverseOpaquePass(t),e.traverseOpaquePass=n=>{t.renderable&&t.renderable.getNestedVisibility()&&t.renderable.getIsOpaque()&&(!t._openGLRenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.oglmapper.traverse(n),e.apply(n,!1))},e.traverseTranslucentPass=n=>{!t.renderable||!t.renderable.getNestedVisibility()||t.renderable.getIsOpaque()||t._openGLRenderer.getSelector()&&!t.renderable.getNestedPickable()||(e.apply(n,!0),t.oglmapper.traverse(n),e.apply(n,!1))},e.activateTextures=()=>{if(t.ogltextures){t.activeTextures=[];for(let e=0;e{if(e){if(!t.renderable||!t.renderable.getVisibility())return;t.renderable.getIsOpaque()?n.incrementOpaqueActorCount():n.incrementTranslucentActorCount()}},e.zBufferPass=(t,n)=>e.opaquePass(t,n),e.opaqueZBufferPass=(t,n)=>e.opaquePass(t,n),e.opaquePass=(n,r)=>{if(n)t.context.depthMask(!0),e.activateTextures();else if(t.activeTextures)for(let e=0;e{if(n)t.context.depthMask(!1),e.activateTextures();else if(t.activeTextures)for(let e=0;e(t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),r.copy(t.keyMatrices.mcwc,t.renderable.getMatrix()),r.transpose(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.renderable.getIsIdentity()?i.identity(t.keyMatrices.normalMatrix):(i.fromMat4(t.keyMatrices.normalMatrix,t.keyMatrices.mcwc),i.invert(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),i.transpose(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix)),t.keyMatrixTime.modified()),t.keyMatrices)}(0,s.vw)("vtkRenderer",g);const y={context:null,keyMatrixTime:null,keyMatrices:null,activeTextures:null};function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,y,n),a.Z.extend(e,t,n),t.keyMatrixTime={},(0,o.o)(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:i.identity(new Float64Array(9)),mcwc:r.identity(new Float64Array(16))},(0,o.e)(e,t,["context"]),(0,o.g)(e,t,["activeTextures"]),v(e,t)}const b=(0,o.n)(_);function x(e,t){t.classHierarchy.push("vtkOpenGLActor2D"),e.buildPass=n=>{if(n){if(!t.renderable)return;t._openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t._openGLRenderWindow.getContext(),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes(),t.ogltextures=null,t.activeTextures=null;for(let e=0;e{if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementOverlayActorCount()}},e.traverseOpaquePass=n=>{t.oglmapper&&t.renderable&&t.renderable.getNestedVisibility()&&t.renderable.getIsOpaque()&&(!t._openGLRenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.oglmapper.traverse(n),e.apply(n,!1))},e.traverseTranslucentPass=n=>{t.oglmapper&&t.renderable&&t.renderable.getNestedVisibility()&&!t.renderable.getIsOpaque()&&(!t._openGLRenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.oglmapper.traverse(n),e.apply(n,!1))},e.traverseOverlayPass=n=>{t.oglmapper&&t.renderable&&t.renderable.getNestedVisibility()&&(!t._openGLRenderer.getSelector()||t.renderable.getNestedPickable)&&(e.apply(n,!0),t.oglmapper.traverse(n),e.apply(n,!1))},e.activateTextures=()=>{if(t.ogltextures){t.activeTextures=[];for(let e=0;e{if(n)t.context.depthMask(!0),e.activateTextures();else if(t.activeTextures)for(let e=0;e{if(n)t.context.depthMask(!1),e.activateTextures();else if(t.activeTextures)for(let e=0;e{if(n)t.context.depthMask(!0),e.activateTextures();else if(t.activeTextures)for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,w,n),a.Z.extend(e,t,n),(0,o.e)(e,t,["context"]),(0,o.g)(e,t,["activeTextures"]),x(e,t)}const C=(0,o.n)(S);(0,s.vw)("vtkActor2D",C);var T=n(575),M=Math.sqrt(50),D=Math.sqrt(10),A=Math.sqrt(2);function P(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=M?10:o>=D?5:o>=A?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=M?10:o>=D?5:o>=A?2:1)}function k(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function L(e){let t=e,n=e,r=e;function i(e,t,i=0,o=e.length){if(i>>1;r(e[n],t)<0?i=n+1:o=n}while(ie(t)-n,n=k,r=(t,n)=>k(e(t),n)),{left:i,center:function(e,n,r=0,o=e.length){const a=i(e,n,r,o-1);return a>r&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,i=0,o=e.length){if(i>>1;r(e[n],t)<=0?i=n+1:o=n}while(i>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?te(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?te(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Y.exec(e))?new ie(t[1],t[2],t[3],1):(t=H.exec(e))?new ie(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=W.exec(e))?te(t[1],t[2],t[3],t[4]):(t=$.exec(e))?te(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Z.exec(e))?ce(t[1],t[2]/100,t[3]/100,1):(t=K.exec(e))?ce(t[1],t[2]/100,t[3]/100,t[4]):q.hasOwnProperty(e)?ee(q[e]):"transparent"===e?new ie(NaN,NaN,NaN,0):null}function ee(e){return new ie(e>>16&255,e>>8&255,255&e,1)}function te(e,t,n,r){return r<=0&&(e=t=n=NaN),new ie(e,t,n,r)}function ne(e){return e instanceof B||(e=Q(e)),e?new ie((e=e.rgb()).r,e.g,e.b,e.opacity):new ie}function re(e,t,n,r){return 1===arguments.length?ne(e):new ie(e,t,n,null==r?1:r)}function ie(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function oe(){return`#${ue(this.r)}${ue(this.g)}${ue(this.b)}`}function ae(){const e=se(this.opacity);return`${1===e?"rgb(":"rgba("}${le(this.r)}, ${le(this.g)}, ${le(this.b)}${1===e?")":`, ${e})`}`}function se(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function le(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ue(e){return((e=le(e))<16?"0":"")+e.toString(16)}function ce(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pe(e,t,n,r)}function de(e){if(e instanceof pe)return new pe(e.h,e.s,e.l,e.opacity);if(e instanceof B||(e=Q(e)),!e)return new pe;if(e instanceof pe)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n0&&l<1?0:a,new pe(a,s,l,e.opacity)}function pe(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function fe(e){return(e=(e||0)%360)<0?e+360:e}function he(e){return Math.max(0,Math.min(1,e||0))}function me(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function ge(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}N(B,Q,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:X,formatHex:X,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return de(this).formatHsl()},formatRgb:J,toString:J}),N(ie,re,R(B,{brighter(e){return e=null==e?V:Math.pow(V,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?F:Math.pow(F,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ie(le(this.r),le(this.g),le(this.b),se(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oe,formatHex:oe,formatHex8:function(){return`#${ue(this.r)}${ue(this.g)}${ue(this.b)}${ue(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ae,toString:ae})),N(pe,(function(e,t,n,r){return 1===arguments.length?de(e):new pe(e,t,n,null==r?1:r)}),R(B,{brighter(e){return e=null==e?V:Math.pow(V,e),new pe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?F:Math.pow(F,e),new pe(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ie(me(e>=240?e-240:e+120,i,r),me(e,i,r),me(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new pe(fe(this.h),he(this.s),he(this.l),se(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=se(this.opacity);return`${1===e?"hsl(":"hsla("}${fe(this.h)}, ${100*he(this.s)}%, ${100*he(this.l)}%${1===e?")":`, ${e})`}`}}));var ve=e=>()=>e;function ye(e,t){return function(n){return e+n*t}}function _e(e){return 1==(e=+e)?be:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):ve(isNaN(t)?n:t)}}function be(e,t){var n=t-e;return n?ye(e,n):ve(isNaN(e)?t:e)}var xe=function e(t){var n=_e(t);function r(e,t){var r=n((e=re(e)).r,(t=re(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=be(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function we(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=ro&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Te(n,r)})),o=Ae.lastIndex;return ot&&(n=e,e=t,t=n),u=function(n){return Math.max(e,Math.min(t,n))}),r=l>2?Fe:Be,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=r(s,a.map(e),Te)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,Ee),c()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=Oe,c()},d.clamp=function(e){return arguments.length?(u=!!e||Ne,c()):u!==Ne},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}function Ge(){return Ue()(Ne,Ne)}function ze(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var je,Ye=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function He(e){if(!(t=Ye.exec(e)))throw new Error("invalid format: "+e);var t;return new We({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function We(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function $e(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ze(e){return(e=$e(Math.abs(e)))?e[1]:NaN}function Ke(e,t){var n=$e(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}He.prototype=We.prototype,We.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var qe={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Ke(100*e,t),r:Ke,s:function(e,t){var n=$e(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(je=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+$e(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Xe(e){return e}var Je,Qe,et,tt=Array.prototype.map,nt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rt(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Xe:(t=tt.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Xe:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(tt.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=He(e)).fill,n=e.align,d=e.sign,p=e.symbol,f=e.zero,h=e.width,m=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(m=!0,y="g"):qe[y]||(void 0===g&&(g=12),v=!0,y="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var _="$"===p?i:"#"===p&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===p?o:/[%p]/.test(y)?l:"",x=qe[y],w=/[defgprs%]/.test(y);function S(e){var i,o,l,p=_,S=b;if("c"===y)S=x(e)+S,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),p=(C?"("===d?d:u:"-"===d||"("===d?"":d)+p,S=("s"===y?nt[8+je/3]:"")+S+(C&&"("===d?")":""),w)for(i=-1,o=e.length;++i(l=e.charCodeAt(i))||l>57){S=(46===l?a+e.slice(i+1):e.slice(i))+S,e=e.slice(0,i);break}}m&&!f&&(e=r(e,1/0));var T=p.length+e.length+S.length,M=T>1)+p+e+S+M.slice(T);break;default:e=M+p+e+S}return s(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),S.toString=function(){return e+""},S}return{format:d,formatPrefix:function(e,t){var n=d(((e=He(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Ze(t)/3))),i=Math.pow(10,-r),o=nt[8+r/3];return function(e){return n(i*e)+o}}}}function it(e,t,n,r){var i,o=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=M?i*=10:o>=D?i*=5:o>=A&&(i*=2),t0)return[e];if((r=t0){let n=Math.round(e/a),r=Math.round(t/a);for(n*at&&--r,o=new Array(i=r-n+1);++st&&--r,o=new Array(i=r-n+1);++s0;){if((i=P(l,u,n))===r)return o[a]=l,o[s]=u,t(o);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i}r=i}return e},e}function at(){var e=Ge();return e.copy=function(){return Ve(e,at())},ze.apply(e,arguments),ot(e)}Je=rt({thousands:",",grouping:[3],currency:["$",""]}),Qe=Je.format,et=Je.formatPrefix;var st=n(2),lt=n(13),ut=n(10),ct=n(4),dt=n(11),pt=n(5),ft=n(33);const ht=[[-1,0,0],[1,0,0],[0,-1,0],[0,1,0],[0,0,-1],[0,0,1]],mt=[[8,7,11,3],[9,1,10,5],[4,9,0,8],[2,11,6,10],[0,3,2,1],[4,5,6,7]],gt=[[0,1],[1,3],[2,3],[0,2],[4,5],[5,7],[6,7],[4,6],[0,4],[1,5],[3,7],[2,6]],vt=[0,1,0,1,0,1,0,1,2,2,2,2],yt=[[1,2],[1,2],[0,2],[0,2],[0,1],[0,1]],_t=new Float64Array(3),bt=new Float64Array(3),xt=new Float64Array(3),wt=new Float64Array(3),St=new Float64Array(3),Ct=new Float64Array(3),Tt=new Float64Array(16);function Mt(e,t){e.strokeStyle=t.strokeColor,e.lineWidth=t.strokeSize,e.fillStyle=t.fontColor,e.font=`${t.fontStyle} ${t.fontSize}px ${t.fontFamily}`}function Dt(e,t){t.classHierarchy.push("vtkCubeAxesActorHelper"),e.setRenderable=n=>{t.renderable!==n&&(t.renderable=n,t.tmActor.addTexture(t.renderable.getTmTexture()),t.tmActor.setProperty(n.getProperty()),t.tmActor.setParentProp(n),e.modified())},e.createPolyDataForOneLabel=(e,n,r,i,o,a,s)=>{const l=t.renderable.get_tmAtlas().get(e);if(!l)return;const u=t.renderable.getTextPolyData().getPoints().getData(),c=t.lastSize;_t[0]=u[3*n],_t[1]=u[3*n+1],_t[2]=u[3*n+2],T.fF(xt,_t,r),xt[0]+=.1,T.fF(bt,xt,i),T.$X(St,bt,_t),xt[0]-=.1,xt[1]+=.1,T.fF(bt,xt,i),T.$X(Ct,bt,_t);for(let e=0;e<3;e++)St[e]/=.05*c[0],Ct[e]/=.05*c[1];let d=s.ptIdx,p=s.cellIdx;_t[0]=u[3*n],_t[1]=u[3*n+1],_t[2]=u[3*n+2],o[0]<-.5?T.bA(xt,St,o[0]*a-l.width):o[0]>.5?T.bA(xt,St,o[0]*a):T.bA(xt,St,o[0]*a-l.width/2),T.IH(_t,_t,xt),T.bA(xt,Ct,o[1]*a-l.height/2),T.IH(_t,_t,xt),s.points[3*d]=_t[0],s.points[3*d+1]=_t[1],s.points[3*d+2]=_t[2],s.tcoords[2*d]=l.tcoords[0],s.tcoords[2*d+1]=l.tcoords[1],d++,T.bA(xt,St,l.width),T.IH(_t,_t,xt),s.points[3*d]=_t[0],s.points[3*d+1]=_t[1],s.points[3*d+2]=_t[2],s.tcoords[2*d]=l.tcoords[2],s.tcoords[2*d+1]=l.tcoords[3],d++,T.bA(xt,Ct,l.height),T.IH(_t,_t,xt),s.points[3*d]=_t[0],s.points[3*d+1]=_t[1],s.points[3*d+2]=_t[2],s.tcoords[2*d]=l.tcoords[4],s.tcoords[2*d+1]=l.tcoords[5],d++,T.bA(xt,St,l.width),T.$X(_t,_t,xt),s.points[3*d]=_t[0],s.points[3*d+1]=_t[1],s.points[3*d+2]=_t[2],s.tcoords[2*d]=l.tcoords[6],s.tcoords[2*d+1]=l.tcoords[7],d++,s.polys[4*p]=3,s.polys[4*p+1]=d-4,s.polys[4*p+2]=d-3,s.polys[4*p+3]=d-2,p++,s.polys[4*p]=3,s.polys[4*p+1]=d-4,s.polys[4*p+2]=d-2,s.polys[4*p+3]=d-1,s.ptIdx+=4,s.cellIdx+=2},e.updateTexturePolyData=()=>{const n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);r.transpose(n,n);const i=t.renderable.getTextValues().length,o=4*i,a=2*i,s=new Float64Array(3*o),l=new Uint16Array(4*a),u=new Float32Array(2*o);r.invert(Tt,n);const c={ptIdx:0,cellIdx:0,polys:l,points:s,tcoords:u};let d=0,p=0,f=0;const h=t.renderable.getTextPolyData().getPoints().getData(),m=t.renderable.getTextValues();for(;d{t.lastSize[0]===n[0]&&t.lastSize[1]===n[1]||(t.lastSize[0]=n[0],t.lastSize[1]=n[1],t.lastAspectRatio=n[0]/n[1],t.forceUpdate=!0),t.camera=r,e.updateTexturePolyData()}}const At=o.m.newInstance((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{renderable:null};Object.assign(t,{},n),o.m.obj(e,t),t.tmPolyData=pt.ZP.newInstance(),t.tmMapper=dt.ZP.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmActor=lt.ZP.newInstance({parentProp:e}),t.tmActor.setMapper(t.tmMapper),o.m.setGet(e,t,["renderable"]),o.m.get(e,t,["lastSize","lastAspectRatio","axisTextStyle","tickTextStyle","tmActor","ticks"]),t.forceUpdate=!1,t.lastRedrawTime={},o.m.obj(t.lastRedrawTime,{mtime:0}),t.lastRebuildTime={},o.m.obj(t.lastRebuildTime,{mtime:0}),t.lastSize=[-1,-1],t.lastTickBounds=[],Dt(e,t)}),"vtkCubeAxesActorHelper");function Pt(e,t){t.classHierarchy.push("vtkCubeAxesActor"),e.setCamera=n=>{t.camera!==n&&(t.cameraModifiedSub&&(t.cameraModifiedSub.unsubscribe(),t.cameraModifiedSub=null),t.camera=n,n&&(t.cameraModifiedSub=n.onModified(e.update)),e.update(),e.modified())},e.computeFacesToDraw=()=>{const e=t.camera.getViewMatrix();r.transpose(e,e);let n=!1;const i=ut.ZP.getDiagonalLength(t.dataBounds),o=Math.sin(t.faceVisibilityAngle*Math.PI/180);for(let r=0;r<6;r++){let a=!1;const s=Math.floor(r/2),l=(s+1)%3,u=(s+2)%3;t.dataBounds[2*l]!==t.dataBounds[2*l+1]&&t.dataBounds[2*u]!==t.dataBounds[2*u+1]&&(_t[s]=t.dataBounds[r]-.1*i*ht[r][s],_t[l]=.5*(t.dataBounds[2*l]+t.dataBounds[2*l+1]),_t[u]=.5*(t.dataBounds[2*u]+t.dataBounds[2*u+1]),T.fF(xt,_t,e),_t[s]=t.dataBounds[r],T.fF(wt,_t,e),T.$X(xt,wt,xt),T.Fv(xt,xt),a=xt[2]>o,t.camera.getParallelProjection()||(T.Fv(wt,wt),a=T.AK(wt,xt)>o)),a!==t.lastFacesToDraw[r]&&(t.lastFacesToDraw[r]=a,n=!0)}return n},e.updatePolyData=(e,n,r)=>{let i=0,o=0;i+=8;let a=0;for(let e=0;e<12;e++)n[e]>0&&a++;if(o+=a,t.gridLines)for(let t=0;t<6;t++)e[t]&&(i+=2*r[yt[t][0]].length+2*r[yt[t][1]].length,o+=r[yt[t][0]].length+r[yt[t][1]].length);const s=new Float64Array(3*i),l=new Uint32Array(3*o);let u=0,c=0;for(let e=0;e<2;e++)for(let n=0;n<2;n++)for(let r=0;r<2;r++)s[3*u]=t.dataBounds[r],s[3*u+1]=t.dataBounds[2+n],s[3*u+2]=t.dataBounds[4+e],u++;for(let e=0;e<12;e++)n[e]>0&&(l[3*c]=2,l[3*c+1]=gt[e][0],l[3*c+2]=gt[e][1],c++);if(t.gridLines)for(let n=0;n<6;n++)if(e[n]){const e=Math.floor(n/2);let i=r[yt[n][0]];for(let r=0;r{let o=0;for(let e=0;e<12;e++)1===n[e]&&(o+=2,o+=r[vt[e]].length);const a=t.polyData.getPoints().getData(),s=new Float64Array(3*o);let l=0,u=0,c=0;for(let o=0;o<6;o++)if(e[o])for(let e=0;e<4;e++){const d=mt[o][e];if(1===n[d]){const e=vt[d],n=3*gt[d][0],p=3*gt[d][1];s[3*l]=.5*(a[n]+a[p]),s[3*l+1]=.5*(a[n+1]+a[p+1]),s[3*l+2]=.5*(a[n+2]+a[p+2]),l++;s[3*l+Math.floor(o/2)]=t.dataBounds[o],s[3*l+yt[o][0]]=.5*(t.dataBounds[2*yt[o][0]]+t.dataBounds[2*yt[o][0]+1]),s[3*l+yt[o][1]]=.5*(t.dataBounds[2*yt[o][1]]+t.dataBounds[2*yt[o][1]+1]),l++,t.textValues[u]=t.axisLabels[e],u++;const f=(e+1)%3,h=(e+2)%3,m=r[e],g=i[e];t.tickCounts[c]=m.length;for(let r=0;r{if(!t.camera)return;const n=e.computeFacesToDraw(),r=t.lastFacesToDraw;let i=!1;for(let e=0;e<6;e++)t.dataBounds[e]!==t.lastTickBounds[e]&&(i=!0,t.lastTickBounds[e]=t.dataBounds[e]);if(n||i||t.forceUpdate){const n=new Array(12).fill(0);for(let e=0;e<6;e++)if(r[e])for(let t=0;t<4;t++)n[mt[e][t]]++;const o=[],a=[];for(let e=0;e<3;e++){const n=at().domain([t.dataBounds[2*e],t.dataBounds[2*e+1]]);o[e]=n.ticks(5);const r=n.tickFormat(5);a[e]=o[e].map(r)}e.updatePolyData(r,n,o),e.updateTextData(r,n,o,a),(i||t.forceUpdate)&&e.updateTextureAtlas(a)}t.forceUpdate=!1},e.updateTextureAtlas=e=>{t.tmContext.textBaseline="bottom",t.tmContext.textAlign="left",t._tmAtlas.clear();let n=0,r=1;for(let i=0;i<3;i++){if(!t._tmAtlas.has(t.axisLabels[i])){Mt(t.tmContext,t.axisTextStyle);const e=t.tmContext.measureText(t.axisLabels[i]),o={height:e.actualBoundingBoxAscent+2,startingHeight:r,width:e.width+2,textStyle:t.axisTextStyle};t._tmAtlas.set(t.axisLabels[i],o),r+=o.height,n{e.tcoords=[0,(r-e.startingHeight-e.height)/r,e.width/n,(r-e.startingHeight-e.height)/r,e.width/n,(r-e.startingHeight)/r,0,(r-e.startingHeight)/r]})),t.tmCanvas.width=n,t.tmCanvas.height=r,t.tmContext.textBaseline="bottom",t.tmContext.textAlign="left",t.tmContext.clearRect(0,0,n,r),t._tmAtlas.forEach(((e,n)=>{Mt(t.tmContext,e.textStyle),t.tmContext.fillText(n,1,e.startingHeight+e.height-1)})),t.tmTexture.setCanvas(t.tmCanvas),t.tmTexture.modified()},e.onModified((()=>{t.forceUpdate=!0,e.update()})),e.setTickTextStyle=n=>{t.tickTextStyle={...t.tickTextStyle,...n},e.modified()},e.setAxisTextStyle=n=>{t.axisTextStyle={...t.axisTextStyle,...n},e.modified()},e.get_tmAtlas=()=>t._tmAtlas,e.getBounds=()=>(e.update(),ut.ZP.setBounds(t.bounds,t.gridActor.getBounds()),ut.ZP.scaleAboutCenter(t.bounds,t.boundsScaleFactor,t.boundsScaleFactor,t.boundsScaleFactor),t.bounds);const n=o.m.chain(e.setProperty,t.gridActor.setProperty);e.setProperty=e=>n(e)[0]}function kt(e){return{boundsScaleFactor:1.3,camera:null,dataBounds:[...ut.ZP.INIT_BOUNDS],faceVisibilityAngle:8,gridLines:!0,axisLabels:null,axisTitlePixelOffset:35,axisTextStyle:{fontColor:"white",fontStyle:"normal",fontSize:18,fontFamily:"serif"},tickLabelPixelOffset:12,tickTextStyle:{fontColor:"white",fontStyle:"normal",fontSize:14,fontFamily:"serif"},...e}}function Lt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kt(n)),lt.ZP.extend(e,t,n),t.lastFacesToDraw=[!1,!1,!1,!1,!1,!1],t.axisLabels=["X-Axis","Y-Axis","Z-Axis"],t.tickCounts=[],t.textValues=[],t.lastTickBounds=[],t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t._tmAtlas=new Map,t.tmTexture=ft.ZP.newInstance(),t.tmTexture.setInterpolate(!1),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.gridMapper=dt.ZP.newInstance(),t.polyData=pt.ZP.newInstance(),t.gridMapper.setInputData(t.polyData),t.gridActor=lt.ZP.newInstance(),t.gridActor.setMapper(t.gridMapper),t.gridActor.setProperty(e.getProperty()),t.gridActor.setParentProp(e),t.textPolyData=pt.ZP.newInstance(),o.m.setGet(e,t,["axisTitlePixelOffset","boundsScaleFactor","faceVisibilityAngle","gridLines","tickLabelPixelOffset"]),o.m.setGetArray(e,t,["dataBounds"],6),o.m.setGetArray(e,t,["axisLabels"],3),o.m.get(e,t,["axisTextStyle","tickTextStyle","camera","tmTexture","textValues","textPolyData","tickCounts","gridActor"]),Pt(e,t)}var Ot={newInstance:o.m.newInstance(Lt,"vtkCubeAxesActor"),extend:Lt,newCubeAxesActorHelper:At};function Et(e,t){t.classHierarchy.push("vtkOpenGLCubeAxesActor"),e.buildPass=n=>{n&&(t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t._openGLRenderWindow=t._openGLRenderer.getParent(),t.CubeAxesActorHelper.getRenderable()||t.CubeAxesActorHelper.setRenderable(t.renderable),e.prepareNodes(),e.addMissingNode(t.CubeAxesActorHelper.getTmActor()),e.addMissingNode(t.renderable.getGridActor()),e.removeUnusedNodes())},e.opaquePass=(e,n)=>{if(e){const e=t._openGLRenderer?t._openGLRenderer.getRenderable().getActiveCamera():null,n=t._openGLRenderer.getTiledSizeAndOrigin();t.CubeAxesActorHelper.updateAPISpecificData([n.usize,n.vsize],e,t._openGLRenderWindow.getRenderable())}}}const It={};function Nt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,It,n),a.Z.extend(e,t,n),t.CubeAxesActorHelper=Ot.newCubeAxesActorHelper(),Et(e,t)}const Rt=(0,o.n)(Nt,"vtkOpenGLCubeAxesActor");(0,s.vw)("vtkCubeAxesActor",Rt);var Bt=n(27),Ft=n(24),Vt=n(32),Ut=n(26),Gt=n(16),zt="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexMC;\n\n// frag position in VC\n//VTK::PositionVC::Dec\n\n// optional normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// material property values\n//VTK::Color::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// picking support\n//VTK::Picking::Dec\n\nvoid main()\n{\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Clip::Impl\n\n //VTK::PrimID::Impl\n\n //VTK::PositionVC::Impl\n\n //VTK::Light::Impl\n\n //VTK::Picking::Impl\n}\n",jt="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataFS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// Template for the polydata mappers fragment shader\n\nuniform int PrimitiveIDOffset;\n\n// VC position of this fragment\n//VTK::PositionVC::Dec\n\n// optional color passed in from the vertex shader, vertexColor\n//VTK::Color::Dec\n\n// optional surface normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// Depth Peeling Support\n//VTK::DepthPeeling::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// handle coincident offsets\n//VTK::Coincident::Dec\n\n//VTK::ZBuffer::Dec\n\nvoid main()\n{\n // VC position of this fragment. This should not branch/return/discard.\n //VTK::PositionVC::Impl\n\n // Place any calls that require uniform flow (e.g. dFdx) here.\n //VTK::UniformFlow::Impl\n\n // Set gl_FragDepth here (gl_FragCoord.z by default)\n //VTK::Depth::Impl\n\n // Early depth peeling abort:\n //VTK::DepthPeeling::PreColor\n\n // Apple Bug\n //VTK::PrimID::Impl\n\n //VTK::Clip::Impl\n\n //VTK::Color::Impl\n\n // Generate the normal if we are not passed in one\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Light::Impl\n\n if (gl_FragData[0].a <= 0.0)\n {\n discard;\n }\n\n //VTK::DepthPeeling::Impl\n\n //VTK::Picking::Impl\n\n // handle coincident offsets\n //VTK::Coincident::Impl\n\n //VTK::ZBuffer::Impl\n\n //VTK::RenderPassFragmentShader::Impl\n}\n";var Yt={implementReplaceShaderCoincidentOffset:function(e,t){e.replaceShaderCoincidentOffset=(n,r,i)=>{const o=e.getCoincidentParameters(r,i);if(o&&(0!==o.factor||0!==o.offset)){let e=n.Fragment;e=Gt.Z.substitute(e,"//VTK::Coincident::Dec",["uniform float cfactor;","uniform float coffset;"]).result,t.context.getExtension("EXT_frag_depth")&&(0!==o.factor?(e=Gt.Z.substitute(e,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,e=Gt.Z.substitute(e,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):e=Gt.Z.substitute(e,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + 0.000016*coffset;").result),t._openGLRenderWindow.getWebgl2()&&(0!==o.factor?(e=Gt.Z.substitute(e,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,e=Gt.Z.substitute(e,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):e=Gt.Z.substitute(e,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + 0.000016*coffset;").result),n.Fragment=e}}},implementBuildShadersWithReplacements:function(e,t){e.applyShaderReplacements=(e,t,n)=>{let r=null;if(t&&(r=t.ShaderReplacements),r)for(let t=0;t{e.getReplacedShaderTemplate(n,r,i),t.lastRenderPassShaderReplacement=t.currentRenderPass?t.currentRenderPass.getShaderReplacement():null,t.lastRenderPassShaderReplacement&&t.lastRenderPassShaderReplacement(n);const o=t.renderable.getViewSpecificProperties().OpenGL;e.applyShaderReplacements(n,o,!0),e.replaceShaderValues(n,r,i),e.applyShaderReplacements(n,o)},e.getReplacedShaderTemplate=(n,r,i)=>{const o=t.renderable.getViewSpecificProperties().OpenGL;e.getShaderTemplate(n,r,i);let a=n.Vertex;if(o){const e=o.VertexShaderCode;void 0!==e&&""!==e&&(a=e)}n.Vertex=a;let s=n.Fragment;if(o){const e=o.FragmentShaderCode;void 0!==e&&""!==e&&(s=e)}n.Fragment=s;let l=n.Geometry;if(o){const e=o.GeometryShaderCode;void 0!==e&&(l=e)}n.Geometry=l}}},Ht=n(108),Wt=n(36);const{FieldAssociations:$t}=Wt.ZP,{primTypes:Zt}=Bt.ZP,{Representation:Kt,Shading:qt}=Ut.ZP,{ScalarMode:Xt}=dt.ZP,{Filter:Jt,Wrap:Qt}=Ft.ZP,{vtkErrorMacro:en}=o.c,tn={type:"StartEvent"},nn={type:"EndEvent"},{CoordinateSystem:rn}=Vt.ZP;function on(e,t){function n(e,t,n){return t.identity(n),e.reduce(((e,n,r)=>0===r?n?t.copy(e,n):t.identity(e):n?t.multiply(e,e,n):e),n)}t.classHierarchy.push("vtkOpenGLPolyDataMapper"),e.buildPass=n=>{n&&(t.currentRenderPass=null,t.openGLActor=e.getFirstAncestorOfType("vtkOpenGLActor"),t._openGLRenderer=t.openGLActor.getFirstAncestorOfType("vtkOpenGLRenderer"),t._openGLRenderWindow=t._openGLRenderer.getParent(),t.openGLCamera=t._openGLRenderer.getViewNodeFor(t._openGLRenderer.getRenderable().getActiveCamera()))},e.translucentPass=(n,r)=>{n&&(t.currentRenderPass=r,e.render())},e.zBufferPass=n=>{n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaqueZBufferPass=t=>e.zBufferPass(t),e.opaquePass=t=>{t&&e.render()},e.render=()=>{const n=t._openGLRenderWindow.getContext();if(t.context!==n){t.context=n;for(let e=Zt.Start;e{e.Vertex=zt,e.Fragment=jt,e.Geometry=""},e.replaceShaderColor=(e,n,r)=>{let i=e.Vertex,o=e.Geometry,a=e.Fragment;const s=t.lastBoundBO.getReferenceByName("lastLightComplexity");let l=["uniform float ambient;","uniform float diffuse;","uniform float specular;","uniform float opacityUniform; // the fragment opacity","uniform vec3 ambientColorUniform;","uniform vec3 diffuseColorUniform;"];s&&(l=l.concat(["uniform vec3 specularColorUniform;","uniform float specularPowerUniform;"]));let u=["vec3 ambientColor;"," vec3 diffuseColor;"," float opacity;"];s&&(u=u.concat([" vec3 specularColor;"," float specularPower;"])),u=u.concat([" ambientColor = ambientColorUniform;"," diffuseColor = diffuseColorUniform;"," opacity = opacityUniform;"]),s&&(u=u.concat([" specularColor = specularColorUniform;"," specularPower = specularPowerUniform;"])),0===t.lastBoundBO.getCABO().getColorComponents()||t.drawingEdges||(l=l.concat(["varying vec4 vertexColorVSOutput;"]),i=Gt.Z.substitute(i,"//VTK::Color::Dec",["attribute vec4 scalarColor;","varying vec4 vertexColorVSOutput;"]).result,i=Gt.Z.substitute(i,"//VTK::Color::Impl",["vertexColorVSOutput = scalarColor;"]).result,o=Gt.Z.substitute(o,"//VTK::Color::Dec",["in vec4 vertexColorVSOutput[];","out vec4 vertexColorGSOutput;"]).result,o=Gt.Z.substitute(o,"//VTK::Color::Impl",["vertexColorGSOutput = vertexColorVSOutput[i];"]).result),0===t.lastBoundBO.getCABO().getColorComponents()||t.drawingEdges?t.renderable.getInterpolateScalarsBeforeMapping()&&t.renderable.getColorCoordinates()&&!t.drawingEdges?a=Gt.Z.substitute(a,"//VTK::Color::Impl",u.concat([" vec4 texColor = texture2D(texture1, tcoordVCVSOutput.st);"," diffuseColor = texColor.rgb;"," ambientColor = texColor.rgb;"," opacity = opacity*texColor.a;"])).result:(r.getBackfaceProperty()&&!t.drawingEdges&&(l=l.concat(["uniform float opacityUniformBF; // the fragment opacity","uniform float ambientIntensityBF; // the material ambient","uniform float diffuseIntensityBF; // the material diffuse","uniform vec3 ambientColorUniformBF; // ambient material color","uniform vec3 diffuseColorUniformBF; // diffuse material color"]),s?(l=l.concat(["uniform float specularIntensityBF; // the material specular intensity","uniform vec3 specularColorUniformBF; // intensity weighted color","uniform float specularPowerUniformBF;"]),u=u.concat(["if (gl_FrontFacing == false) {"," ambientColor = ambientIntensityBF * ambientColorUniformBF;"," diffuseColor = diffuseIntensityBF * diffuseColorUniformBF;"," specularColor = specularIntensityBF * specularColorUniformBF;"," specularPower = specularPowerUniformBF;"," opacity = opacityUniformBF; }"])):u=u.concat(["if (gl_FrontFacing == false) {"," ambientColor = ambientIntensityBF * ambientColorUniformBF;"," diffuseColor = diffuseIntensityBF * diffuseColorUniformBF;"," opacity = opacityUniformBF; }"])),t.haveCellScalars&&!t.drawingEdges&&(l=l.concat(["uniform samplerBuffer texture1;"])),a=Gt.Z.substitute(a,"//VTK::Color::Impl",u).result):a=Gt.Z.substitute(a,"//VTK::Color::Impl",u.concat([" diffuseColor = vertexColorVSOutput.rgb;"," ambientColor = vertexColorVSOutput.rgb;"," opacity = opacity*vertexColorVSOutput.a;"])).result,a=Gt.Z.substitute(a,"//VTK::Color::Dec",l).result,e.Vertex=i,e.Geometry=o,e.Fragment=a},e.replaceShaderLight=(e,n,r)=>{let i=e.Fragment;const o=t.lastBoundBO.getReferenceByName("lastLightComplexity"),a=t.lastBoundBO.getReferenceByName("lastLightCount");let s=[];switch(o){case 0:i=Gt.Z.substitute(i,"//VTK::Light::Impl",[" gl_FragData[0] = vec4(ambientColor * ambient + diffuseColor * diffuse, opacity);"," //VTK::Light::Impl"],!1).result;break;case 1:i=Gt.Z.substitute(i,"//VTK::Light::Impl",[" float df = max(0.0, normalVCVSOutput.z);"," float sf = pow(df, specularPower);"," vec3 diffuseL = df * diffuseColor;"," vec3 specularL = sf * specularColor;"," gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);"," //VTK::Light::Impl"],!1).result;break;case 2:for(let e=0;e= cos(radians(lightConeAngle${e})))`," {",` attenuation = attenuation * pow(coneDot, lightExponent${e});`," }"," else"," {"," attenuation = 0.0;"," }"," }"," }"," df = max(0.0, attenuation*dot(normalVCVSOutput, -vertLightDirectionVC));",` diffuseL += ((df) * lightColor${e});`," if (dot(normalVCVSOutput, vertLightDirectionVC) < 0.0)"," {",` float sf = sign(df)*attenuation*pow(max(1e-5,\n dot(reflect(lightDirectionVC${e},\n normalVCVSOutput),\n normalize(-vertexVC.xyz))),\n specularPower);`,` specularL += ((sf) * lightColor${e});`," }"]);s=s.concat([" diffuseL = diffuseL * diffuseColor;"," specularL = specularL * specularColor;"," gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);"," //VTK::Light::Impl"]),i=Gt.Z.substitute(i,"//VTK::Light::Impl",s,!1).result;break;default:en("bad light complexity")}e.Fragment=i},e.replaceShaderNormal=(e,n,r)=>{if(t.lastBoundBO.getReferenceByName("lastLightComplexity")>0){let n=e.Vertex,i=e.Geometry,o=e.Fragment;t.lastBoundBO.getCABO().getNormalOffset()?(n=Gt.Z.substitute(n,"//VTK::Normal::Dec",["attribute vec3 normalMC;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,n=Gt.Z.substitute(n,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * normalMC;"]).result,i=Gt.Z.substitute(i,"//VTK::Normal::Dec",["in vec3 normalVCVSOutput[];","out vec3 normalVCGSOutput;"]).result,i=Gt.Z.substitute(i,"//VTK::Normal::Impl",["normalVCGSOutput = normalVCVSOutput[i];"]).result,o=Gt.Z.substitute(o,"//VTK::Normal::Dec",["varying vec3 normalVCVSOutput;"]).result,o=Gt.Z.substitute(o,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalVCVSOutput);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):t.haveCellNormals?(o=Gt.Z.substitute(o,"//VTK::Normal::Dec",["uniform mat3 normalMatrix;","uniform samplerBuffer textureN;"]).result,o=Gt.Z.substitute(o,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalMatrix *"," texelFetchBuffer(textureN, gl_PrimitiveID + PrimitiveIDOffset).xyz);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):t.lastBoundBO.getOpenGLMode(r.getProperty().getRepresentation())===t.context.LINES?(o=Gt.Z.substitute(o,"//VTK::UniformFlow::Impl",[" vec3 fdx = dFdx(vertexVC.xyz);"," vec3 fdy = dFdy(vertexVC.xyz);"," //VTK::UniformFlow::Impl"]).result,o=Gt.Z.substitute(o,"//VTK::Normal::Impl",["vec3 normalVCVSOutput;"," if (abs(fdx.x) > 0.0)"," { fdx = normalize(fdx); normalVCVSOutput = normalize(cross(vec3(fdx.y, -fdx.x, 0.0), fdx)); }"," else { fdy = normalize(fdy); normalVCVSOutput = normalize(cross(vec3(fdy.y, -fdy.x, 0.0), fdy));}"]).result):(o=Gt.Z.substitute(o,"//VTK::Normal::Dec",["uniform int cameraParallel;"]).result,o=Gt.Z.substitute(o,"//VTK::UniformFlow::Impl",[" vec3 fdx = dFdx(vertexVC.xyz);"," vec3 fdy = dFdy(vertexVC.xyz);"," //VTK::UniformFlow::Impl"]).result,o=Gt.Z.substitute(o,"//VTK::Normal::Impl",[" fdx = normalize(fdx);"," fdy = normalize(fdy);"," vec3 normalVCVSOutput = normalize(cross(fdx,fdy));"," if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"," if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"]).result),e.Vertex=n,e.Geometry=i,e.Fragment=o}},e.replaceShaderPositionVC=(e,n,r)=>{t.lastBoundBO.replaceShaderPositionVC(e,n,r);let i=e.Vertex,o=e.Geometry,a=e.Fragment;t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(i=Gt.Z.substitute(i,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,i=Gt.Z.substitute(i,"//VTK::PositionVC::Impl",["vertexVCVSOutput = MCVCMatrix * vertexMC;"," gl_Position = MCPCMatrix * vertexMC;"]).result,i=Gt.Z.substitute(i,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result,o=Gt.Z.substitute(o,"//VTK::PositionVC::Dec",["in vec4 vertexVCVSOutput[];","out vec4 vertexVCGSOutput;"]).result,o=Gt.Z.substitute(o,"//VTK::PositionVC::Impl",["vertexVCGSOutput = vertexVCVSOutput[i];"]).result,a=Gt.Z.substitute(a,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,a=Gt.Z.substitute(a,"//VTK::PositionVC::Impl",["vec4 vertexVC = vertexVCVSOutput;"]).result):(i=Gt.Z.substitute(i,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,i=Gt.Z.substitute(i,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result),e.Vertex=i,e.Geometry=o,e.Fragment=a},e.replaceShaderTCoord=(e,n,r)=>{if(t.lastBoundBO.getCABO().getTCoordOffset()){let n=e.Vertex,r=e.Geometry,i=e.Fragment;if(t.drawingEdges)return;n=Gt.Z.substitute(n,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result;const o=t.openGLActor.getActiveTextures();let a=2,s=2;if(o&&o.length>0&&(a=o[0].getComponents(),o[0].getTarget()===t.context.TEXTURE_CUBE_MAP&&(s=3)),t.renderable.getColorTextureMap()&&(a=t.renderable.getColorTextureMap().getPointData().getScalars().getNumberOfComponents(),s=2),2===s){if(n=Gt.Z.substitute(n,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result,r=Gt.Z.substitute(r,"//VTK::TCoord::Dec",["in vec2 tcoordVCVSOutput[];","out vec2 tcoordVCGSOutput;"]).result,r=Gt.Z.substitute(r,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Gt.Z.substitute(i,"//VTK::TCoord::Dec",["varying vec2 tcoordVCVSOutput;","uniform sampler2D texture1;"]).result,o&&o.length>=1)switch(a){case 1:i=Gt.Z.substitute(i,"//VTK::TCoord::Impl",[" vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.r;"," diffuseColor = diffuseColor*tcolor.r;"]).result;break;case 2:i=Gt.Z.substitute(i,"//VTK::TCoord::Impl",[" vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.r;"," diffuseColor = diffuseColor*tcolor.r;"," opacity = opacity * tcolor.g;"]).result;break;default:i=Gt.Z.substitute(i,"//VTK::TCoord::Impl",[" vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.rgb;"," diffuseColor = diffuseColor*tcolor.rgb;"," opacity = opacity * tcolor.a;"]).result}}else switch(n=Gt.Z.substitute(n,"//VTK::TCoord::Dec","attribute vec3 tcoordMC; varying vec3 tcoordVCVSOutput;").result,r=Gt.Z.substitute(r,"//VTK::TCoord::Dec",["in vec3 tcoordVCVSOutput[];","out vec3 tcoordVCGSOutput;"]).result,r=Gt.Z.substitute(r,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Gt.Z.substitute(i,"//VTK::TCoord::Dec",["varying vec3 tcoordVCVSOutput;","uniform samplerCube texture1;"]).result,a){case 1:i=Gt.Z.substitute(i,"//VTK::TCoord::Impl",[" vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.r;"," diffuseColor = diffuseColor*tcolor.r;"]).result;break;case 2:i=Gt.Z.substitute(i,"//VTK::TCoord::Impl",[" vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.r;"," diffuseColor = diffuseColor*tcolor.r;"," opacity = opacity * tcolor.g;"]).result;break;default:i=Gt.Z.substitute(i,"//VTK::TCoord::Impl",[" vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.rgb;"," diffuseColor = diffuseColor*tcolor.rgb;"," opacity = opacity * tcolor.a;"]).result}e.Vertex=n,e.Geometry=r,e.Fragment=i}},e.replaceShaderClip=(e,n,r)=>{let i=e.Vertex,o=e.Fragment;if(t.renderable.getNumberOfClippingPlanes()){const e=t.renderable.getNumberOfClippingPlanes();i=Gt.Z.substitute(i,"//VTK::Clip::Dec",["uniform int numClipPlanes;",`uniform vec4 clipPlanes[${e}];`,`varying float clipDistancesVSOutput[${e}];`]).result,i=Gt.Z.substitute(i,"//VTK::Clip::Impl",[`for (int planeNum = 0; planeNum < ${e}; planeNum++)`," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,o=Gt.Z.substitute(o,"//VTK::Clip::Dec",["uniform int numClipPlanes;",`varying float clipDistancesVSOutput[${e}];`]).result,o=Gt.Z.substitute(o,"//VTK::Clip::Impl",[`for (int planeNum = 0; planeNum < ${e}; planeNum++)`," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," if (clipDistancesVSOutput[planeNum] < 0.0) discard;"," }"]).result}e.Vertex=i,e.Fragment=o},e.getCoincidentParameters=(e,n)=>{let r={factor:0,offset:0};const i=n.getProperty();if(t.renderable.getResolveCoincidentTopology()||i.getEdgeVisibility()&&i.getRepresentation()===Kt.SURFACE){const e=t.lastBoundBO.getPrimitiveType();e===Zt.Points||i.getRepresentation()===Kt.POINTS?r=t.renderable.getCoincidentTopologyPointOffsetParameter():e===Zt.Lines||i.getRepresentation()===Kt.WIREFRAME?r=t.renderable.getCoincidentTopologyLineOffsetParameters():e!==Zt.Tris&&e!==Zt.TriStrips||(r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()),e!==Zt.TrisEdges&&e!==Zt.TriStripsEdges||(r=t.renderable.getCoincidentTopologyPolygonOffsetParameters(),r.factor/=2,r.offset/=2)}const o=t._openGLRenderer.getSelector();return o&&o.getFieldAssociation()===$t.FIELD_ASSOCIATION_POINTS&&(r.offset-=2),r},e.replaceShaderPicking=(e,n,r)=>{let i=e.Fragment,o=e.Vertex;if(i=Gt.Z.substitute(i,"//VTK::Picking::Dec",["uniform int picking;","//VTK::Picking::Dec"]).result,t._openGLRenderer.getSelector()){switch(t.lastSelectionState!==Ht.X.ID_LOW24&&t.lastSelectionState!==Ht.X.ID_HIGH24||(o=Gt.Z.substitute(o,"//VTK::Picking::Dec",["flat out int vertexIDVSOutput;\n","uniform int VertexIDOffset;\n"]).result,o=Gt.Z.substitute(o,"//VTK::Picking::Impl"," vertexIDVSOutput = gl_VertexID + VertexIDOffset;\n").result,i=Gt.Z.substitute(i,"//VTK::Picking::Dec","flat in int vertexIDVSOutput;\n").result,i=Gt.Z.substitute(i,"//VTK::Picking::Impl",[" int idx = vertexIDVSOutput;","//VTK::Picking::Impl"]).result),t.lastSelectionState){case Ht.X.ID_LOW24:i=Gt.Z.substitute(i,"//VTK::Picking::Impl"," gl_FragData[0] = vec4(float(idx%256)/255.0, float((idx/256)%256)/255.0, float((idx/65536)%256)/255.0, 1.0);").result;break;case Ht.X.ID_HIGH24:i=Gt.Z.substitute(i,"//VTK::Picking::Impl"," gl_FragData[0] = vec4(float(idx)/255.0, 0.0, 0.0, 1.0);").result;break;default:i=Gt.Z.substitute(i,"//VTK::Picking::Dec","uniform vec3 mapperIndex;").result,i=Gt.Z.substitute(i,"//VTK::Picking::Impl"," gl_FragData[0] = picking != 0 ? vec4(mapperIndex,1.0) : gl_FragData[0];").result}e.Fragment=i,e.Vertex=o}},e.replaceShaderValues=(n,r,i)=>{if(e.replaceShaderColor(n,r,i),e.replaceShaderNormal(n,r,i),e.replaceShaderLight(n,r,i),e.replaceShaderTCoord(n,r,i),e.replaceShaderPicking(n,r,i),e.replaceShaderClip(n,r,i),e.replaceShaderCoincidentOffset(n,r,i),e.replaceShaderPositionVC(n,r,i),t.haveSeenDepthRequest){let e=n.Fragment;e=Gt.Z.substitute(e,"//VTK::ZBuffer::Dec","uniform int depthRequest;").result,e=Gt.Z.substitute(e,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float iz = floor(gl_FragCoord.z*65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result,n.Fragment=e}},e.getNeedToRebuildShaders=(e,n,r)=>{let i=0,o=0;const a=e.getPrimitiveType(),s=t.currentInput;let l=!1;const u=s.getPointData().getNormals(),c=s.getCellData().getNormals(),d=r.getProperty().getInterpolation()===qt.FLAT,p=r.getProperty().getRepresentation(),f=e.getOpenGLMode(p,a);if(f===t.context.TRIANGLES||c&&!u||!d&&u?l=!0:d||f!==t.context.LINES||(l=!0),r.getProperty().getLighting()&&l){i=0;const e=n.getLightsByReference();for(let t=0;t0&&(o++,0===i&&(i=1)),1===i&&(o>1||1!==n.getIntensity()||!n.lightTypeIsHeadLight())&&(i=2),i<3&&n.getPositional()&&(i=3)}}let h=!1;const m=t.lastBoundBO.getReferenceByName("lastLightComplexity"),g=t.lastBoundBO.getReferenceByName("lastLightCount");return m===i&&g===o||(t.lastBoundBO.set({lastLightComplexity:i},!0),t.lastBoundBO.set({lastLightCount:o},!0),h=!0),(!t.currentRenderPass&&t.lastRenderPassShaderReplacement||t.currentRenderPass&&t.currentRenderPass.getShaderReplacement()!==t.lastRenderPassShaderReplacement)&&(h=!0),!!(t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||e.getShaderSourceTime().getMTime(){const i=t.renderable.getViewSpecificProperties().ShadersCallbacks;i&&i.forEach((t=>{t.callback(t.userData,e,n,r)}))},e.setMapperShaderParameters=(n,i,o)=>{if(n.getProgram().isUniformUsed("PrimitiveIDOffset")&&n.getProgram().setUniformi("PrimitiveIDOffset",t.primitiveIDOffset),n.getProgram().isUniformUsed("VertexIDOffset")&&n.getProgram().setUniformi("VertexIDOffset",t.vertexIDOffset),n.getCABO().getElementCount()&&(t.VBOBuildTime.getMTime()>n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())){const e=t.lastBoundBO.getReferenceByName("lastLightComplexity");n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||en("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("normalMC")&&n.getCABO().getNormalOffset()&&e>0?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"normalMC",n.getCABO().getNormalOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||en("Error setting normalMC in shader VAO."):n.getVAO().removeAttributeArray("normalMC"),t.renderable.getCustomShaderAttributes().forEach(((e,r)=>{n.getProgram().isAttributeUsed(`${e}MC`)&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),`${e}MC`,n.getCABO().getCustomData()[r].offset,n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getCustomData()[r].components,!1)||en(`Error setting ${e}MC in shader VAO.`))})),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),!1)||en("Error setting tcoordMC in shader VAO."):n.getVAO().removeAttributeArray("tcoordMC"),n.getProgram().isAttributeUsed("scalarColor")&&n.getCABO().getColorComponents()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO().getColorBO(),"scalarColor",n.getCABO().getColorOffset(),n.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,4,!0)||en("Error setting scalarColor in shader VAO."):n.getVAO().removeAttributeArray("scalarColor"),n.getAttributeUpdateTime().modified()}if(t.renderable.getNumberOfClippingPlanes()){const e=t.renderable.getNumberOfClippingPlanes(),i=[],a=n.getCABO().getCoordShiftAndScaleEnabled()?n.getCABO().getInverseShiftAndScaleMatrix():null,s=a?r.copy(t.tmpMat4,o.getMatrix()):o.getMatrix();a&&(r.transpose(s,s),r.multiply(s,s,a),r.transpose(s,s));for(let n=0;n{const o=t.lastBoundBO.getReferenceByName("lastLightComplexity");if(o<2)return;const a=e.getProgram();let s=0;const l=n.getLightsByReference();for(let e=0;e0){const e=r.getColorByReference(),i=r.getIntensity();t.lightColor[0]=e[0]*i,t.lightColor[1]=e[1]*i,t.lightColor[2]=e[2]*i;const o=r.getDirection(),l=n.getActiveCamera().getViewMatrix(),u=[...o];r.lightTypeIsSceneLight()&&(u[0]=l[0]*o[0]+l[1]*o[1]+l[2]*o[2],u[1]=l[4]*o[0]+l[5]*o[1]+l[6]*o[2],u[2]=l[8]*o[0]+l[9]*o[1]+l[10]*o[2],(0,st.l)(u)),t.lightDirection[0]=u[0],t.lightDirection[1]=u[1],t.lightDirection[2]=u[2],(0,st.l)(t.lightDirection),a.setUniform3fArray(`lightColor${s}`,t.lightColor),a.setUniform3fArray(`lightDirectionVC${s}`,t.lightDirection),s++}}if(o<3)return;const u=n.getActiveCamera().getViewMatrix();r.transpose(u,u),s=0;for(let e=0;e0){const e=t.getTransformedPosition(),n=new Float64Array(3);T.fF(n,e,u),a.setUniform3fArray(`lightAttenuation${s}`,t.getAttenuationValuesByReference()),a.setUniformi(`lightPositional${s}`,t.getPositional()),a.setUniformf(`lightExponent${s}`,t.getExponent()),a.setUniformf(`lightConeAngle${s}`,t.getConeAngle()),a.setUniform3fArray(`lightPositionVC${s}`,[n[0],n[1],n[2]]),s++}}},e.setCameraShaderParameters=(e,o,a)=>{const s=e.getProgram(),l=t.openGLCamera.getKeyMatrices(o),u=o.getActiveCamera(),c=t.openGLCamera.getKeyMatrixTime().getMTime(),d=s.getLastCameraMTime(),p=e.getCABO().getCoordShiftAndScaleEnabled()?e.getCABO().getInverseShiftAndScaleMatrix():null,f=a.getIsIdentity(),h=f?{mcwc:null,normalMatrix:null}:t.openGLActor.getKeyMatrices();if(a.getCoordinateSystem()===rn.DISPLAY){const e=t._openGLRenderer.getTiledSizeAndOrigin();r.identity(t.tmpMat4),t.tmpMat4[0]=2/e.usize,t.tmpMat4[12]=-1,t.tmpMat4[5]=2/e.vsize,t.tmpMat4[13]=-1,r.multiply(t.tmpMat4,t.tmpMat4,p),s.setUniformMatrix("MCPCMatrix",t.tmpMat4)}else s.setUniformMatrix("MCPCMatrix",n([l.wcpc,h.mcwc,p],r,t.tmpMat4));s.isUniformUsed("MCVCMatrix")&&s.setUniformMatrix("MCVCMatrix",n([l.wcvc,h.mcwc,p],r,t.tmpMat4)),s.isUniformUsed("normalMatrix")&&s.setUniformMatrix3x3("normalMatrix",n([l.normalMatrix,h.normalMatrix],i,t.tmpMat3)),d!==c&&(s.isUniformUsed("cameraParallel")&&s.setUniformi("cameraParallel",u.getParallelProjection()),s.setLastCameraMTime(c)),f||s.setLastCameraMTime(0)},e.setPropertyShaderParameters=(e,n,r)=>{const i=e.getProgram();let o=r.getProperty(),a=o.getOpacity(),s=t.drawingEdges?o.getEdgeColorByReference():o.getAmbientColorByReference(),l=t.drawingEdges?o.getEdgeColorByReference():o.getDiffuseColorByReference(),u=t.drawingEdges?1:o.getAmbient(),c=t.drawingEdges?0:o.getDiffuse(),d=t.drawingEdges?0:o.getSpecular();const p=o.getSpecularPower();i.setUniformf("opacityUniform",a),i.setUniform3fArray("ambientColorUniform",s),i.setUniform3fArray("diffuseColorUniform",l),i.setUniformf("ambient",u),i.setUniformf("diffuse",c);const f=t.lastBoundBO.getReferenceByName("lastLightComplexity");if(f<1)return;let h=o.getSpecularColorByReference();if(i.setUniform3fArray("specularColorUniform",h),i.setUniformf("specularPowerUniform",p),i.setUniformf("specular",d),i.isUniformUsed("ambientIntensityBF")){if(o=r.getBackfaceProperty(),a=o.getOpacity(),s=o.getAmbientColor(),u=o.getAmbient(),l=o.getDiffuseColor(),c=o.getDiffuse(),h=o.getSpecularColor(),d=o.getSpecular(),i.setUniformf("ambientIntensityBF",u),i.setUniformf("diffuseIntensityBF",c),i.setUniformf("opacityUniformBF",a),i.setUniform3fArray("ambientColorUniformBF",s),i.setUniform3fArray("diffuseColorUniformBF",l),f<1)return;i.setUniformf("specularIntensityBF",d),i.setUniform3fArray("specularColorUniformBF",h),i.setUniformf("specularPowerUniformBF",p)}},e.updateMaximumPointCellIds=(e,n)=>{const r=t._openGLRenderer.getSelector();if(!r)return;if(t.selectionWebGLIdsToVTKIds?.points?.length){const e=t.selectionWebGLIdsToVTKIds.points.length;r.setMaximumPointId(e-1)}if(t.selectionWebGLIdsToVTKIds?.cells?.length){const e=t.selectionWebGLIdsToVTKIds.cells.length;r.setMaximumCellId(e-1)}r.getFieldAssociation()===$t.FIELD_ASSOCIATION_POINTS&&(t.pointPicking=!0)},e.renderPieceStart=(n,r)=>{t.primitiveIDOffset=0,t.vertexIDOffset=0;const i=function(e){const t=e.getSelector();return t?t.getCurrentPass():Ht.X.MIN_KNOWN_PASS-1}(t._openGLRenderer);t.lastSelectionState!==i&&(t.selectionStateChanged.modified(),t.lastSelectionState=i),t._openGLRenderer.getSelector()&&t._openGLRenderer.getSelector().renderProp(r),e.updateBufferObjects(n,r),t.renderable.getColorTextureMap()&&t.internalColorTexture.activate(),t.lastBoundBO=null},e.renderPieceDraw=(n,r)=>{const i=r.getProperty().getRepresentation(),o=r.getProperty().getEdgeVisibility()&&i===Kt.SURFACE,a=t._openGLRenderer.getSelector(),s=a&&a.getFieldAssociation()===$t.FIELD_ASSOCIATION_POINTS&&(t.lastSelectionState===Ht.X.ID_LOW24||t.lastSelectionState===Ht.X.ID_HIGH24);for(let a=Zt.Start;a=0)||(t.lastBoundBO=t.primitives[a],t.primitiveIDOffset+=t.primitives[a].drawArrays(n,r,i,e),t.vertexIDOffset+=t.primitives[a].getCABO().getElementCount()))}},e.renderPieceFinish=(e,n)=>{t.LastBoundBO&&t.LastBoundBO.getVAO().release(),t.renderable.getColorTextureMap()&&t.internalColorTexture.deactivate()},e.renderPiece=(n,r)=>{if(e.invokeEvent(tn),t.renderable.getStatic()||t.renderable.update(),t.currentInput=t.renderable.getInputData(),e.invokeEvent(nn),!t.currentInput)return void en("No input!");if(!t.currentInput.getPoints||!t.currentInput.getPoints().getNumberOfValues())return;const i=t.context,o=r.getProperty().getBackfaceCulling(),a=r.getProperty().getFrontfaceCulling();o||a?a?(t._openGLRenderWindow.enableCullFace(),i.cullFace(i.FRONT)):(t._openGLRenderWindow.enableCullFace(),i.cullFace(i.BACK)):t._openGLRenderWindow.disableCullFace(),e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r)},e.computeBounds=(n,r)=>{e.getInput()?t.bounds=e.getInput().getBounds():(0,st.u)(t.bounds)},e.updateBufferObjects=(t,n)=>{e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=(n,r)=>{const i=t.VBOBuildTime.getMTime();return i{const i=t.currentInput;if(null===i)return;t.renderable.mapScalars(i,1);const o=t.renderable.getColorMapColors();t.haveCellScalars=!1;const a=t.renderable.getScalarMode();t.renderable.getScalarVisibility()&&(a!==Xt.USE_CELL_DATA&&a!==Xt.USE_CELL_FIELD_DATA&&a!==Xt.USE_FIELD_DATA&&i.getPointData().getScalars()||a===Xt.USE_POINT_FIELD_DATA||!o||(t.haveCellScalars=!0));let s=r.getProperty().getInterpolation()!==qt.FLAT?i.getPointData().getNormals():null;null===s&&i.getCellData().getNormals()&&(t.haveCellNormals=!0,s=i.getCellData().getNormals());const l=r.getProperty().getRepresentation();let u=i.getPointData().getTCoords();if(t.openGLActor.getActiveTextures()||(u=null),t.renderable.getColorCoordinates()){u=t.renderable.getColorCoordinates(),t.internalColorTexture||(t.internalColorTexture=Ft.ZP.newInstance({resizable:!0}));const e=t.internalColorTexture;e.setMinificationFilter(Jt.NEAREST),e.setMagnificationFilter(Jt.NEAREST),e.setWrapS(Qt.CLAMP_TO_EDGE),e.setWrapT(Qt.CLAMP_TO_EDGE),e.setOpenGLRenderWindow(t._openGLRenderWindow);const n=t.renderable.getColorTextureMap(),r=n.getExtent(),i=n.getPointData().getScalars();e.create2DFromRaw(r[1]-r[0]+1,r[3]-r[2]+1,i.getNumberOfComponents(),i.getDataType(),i.getData()),e.activate(),e.sendParameters(),e.deactivate()}const c=`${i.getMTime()}A${l}B${i.getMTime()}C${s?s.getMTime():1}D${o?o.getMTime():1}E${r.getProperty().getEdgeVisibility()}F${u?u.getMTime():1}`;if(t.VBOBuildString!==c){const n={points:i.getPoints(),normals:s,tcoords:u,colors:o,cellOffset:0,vertexOffset:0,haveCellScalars:t.haveCellScalars,haveCellNormals:t.haveCellNormals,customAttributes:t.renderable.getCustomShaderAttributes().map((e=>i.getPointData().getArrayByName(e)))};t.renderable.getPopulateSelectionSettings()&&(t.selectionWebGLIdsToVTKIds={points:null,cells:null});const a=[{inRep:"verts",cells:i.getVerts()},{inRep:"lines",cells:i.getLines()},{inRep:"polys",cells:i.getPolys()},{inRep:"strips",cells:i.getStrips()},{inRep:"polys",cells:i.getPolys()},{inRep:"strips",cells:i.getStrips()}],d=r.getProperty().getEdgeVisibility()&&l===Kt.SURFACE;for(let e=Zt.Start;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,an,n),a.Z.extend(e,t,n),Yt.implementReplaceShaderCoincidentOffset(e,t,n),Yt.implementBuildShadersWithReplacements(e,t,n),t.primitives=[],t.primTypes=Zt,t.tmpMat3=i.identity(new Float64Array(9)),t.tmpMat4=r.identity(new Float64Array(16));for(let e=Zt.Start;e{t.lookupTable=dn.ZP.newInstance()},e.getColorModeAsString=()=>o.m.enumToString(fn,t.colorMode),e.setColorModeToDefault=()=>e.setColorMode(0),e.setColorModeToMapScalars=()=>e.setColorMode(1),e.setColorModeToDirectScalars=()=>e.setColorMode(2),e.getScalarModeAsString=()=>o.m.enumToString(hn,t.scalarMode),e.setScalarModeToDefault=()=>e.setScalarMode(0),e.setScalarModeToUsePointData=()=>e.setScalarMode(1),e.setScalarModeToUseCellData=()=>e.setScalarMode(2),e.setScalarModeToUsePointFieldData=()=>e.setScalarMode(3),e.setScalarModeToUseCellFieldData=()=>e.setScalarMode(4),e.setScalarModeToUseFieldData=()=>e.setScalarMode(5),e.getAbstractScalars=(e,n,r,i,o)=>{if(!e||!t.scalarVisibility)return{scalars:null,cellFLag:!1};let a=null,s=!1;if(n===hn.DEFAULT)a=e.getPointData().getScalars(),a||(a=e.getCellData().getScalars(),s=!0);else if(n===hn.USE_POINT_DATA)a=e.getPointData().getScalars();else if(n===hn.USE_CELL_DATA)a=e.getCellData().getScalars(),s=!0;else if(n===hn.USE_POINT_FIELD_DATA){const t=e.getPointData();a=r===mn.BY_ID?t.getArrayByIndex(i):t.getArrayByName(o)}else if(n===hn.USE_CELL_FIELD_DATA){const t=e.getCellData();s=!0,a=r===mn.BY_ID?t.getArrayByIndex(i):t.getArrayByName(o)}else if(n===hn.USE_FIELD_DATA){const t=e.getFieldData();a=r===mn.BY_ID?t.getArrayByIndex(i):t.getArrayByName(o)}return{scalars:a,cellFlag:s}},e.getLookupTable=()=>(t.lookupTable||e.createDefaultLookupTable(),t.lookupTable),e.getMTime=()=>{let e=t.mtime;if(null!==t.lookupTable){const n=t.lookupTable.getMTime();e=n>e?n:e}return e},e.mapScalars=(n,r)=>{const i=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName).scalars;if(!i)return void(t.colorMapColors=null);const o=`${e.getMTime()}${i.getMTime()}${r}`;if(t.colorBuildString===o)return;t.useLookupTableScalarRange||e.getLookupTable().setRange(t.scalarRange[0],t.scalarRange[1]);const a=e.getLookupTable();a&&(a.build(),t.colorMapColors=a.mapScalars(i,t.colorMode,t.fieldDataTupleId)),t.colorBuildString=`${e.getMTime()}${i.getMTime()}${r}`}}const vn={static:!1,lookupTable:null,scalarVisibility:!1,scalarRange:[0,1],useLookupTableScalarRange:!1,colorMode:0,scalarMode:0,arrayAccessMode:1,renderTime:0,colorByArrayName:null,transformCoordinate:null,viewSpecificProperties:null,customShaderAttributes:[]};function yn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vn,n),cn.Z.extend(e,t,n),o.m.get(e,t,["colorMapColors"]),o.m.setGet(e,t,["arrayAccessMode","colorByArrayName","colorMode","lookupTable","renderTime","scalarMode","scalarVisibility","static","transformCoordinate","useLookupTableScalarRange","viewSpecificProperties","customShaderAttributes"]),o.m.setGetArray(e,t,["scalarRange"],2),t.viewSpecificProperties||(t.viewSpecificProperties={}),gn(e,t)}var _n={newInstance:o.m.newInstance(yn,"vtkMapper2D"),extend:yn},bn=n(37);const xn={BACKGROUND:0,FOREGROUND:1};var wn={DisplayLocation:xn};const{primTypes:Sn}=Bt.ZP,{ScalarMode:Cn}=_n,{vtkErrorMacro:Tn}=o.c,Mn={type:"StartEvent"},Dn={type:"EndEvent"};function An(e,t){t.classHierarchy.push("vtkOpenGLPolyDataMapper2D"),e.buildPass=n=>{n&&(t.openGLActor2D=e.getFirstAncestorOfType("vtkOpenGLActor2D"),t._openGLRenderer=t.openGLActor2D.getFirstAncestorOfType("vtkOpenGLRenderer"),t._openGLRenderWindow=t._openGLRenderer.getParent(),t.openGLCamera=t._openGLRenderer.getViewNodeFor(t._openGLRenderer.getRenderable().getActiveCamera()))},e.overlayPass=t=>{t&&e.render()},e.getShaderTemplate=(e,t,n)=>{e.Vertex="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyData2DVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\n// all variables that represent positions or directions have a suffix\n// indicating the coordinate system they are in. The possible values are\n// MC - Model Coordinates\n// WC - WC world coordinates\n// VC - View Coordinates\n// DC - Display Coordinates\n\nin vec4 vertexWC;\n\n// frag position in VC\n//VTK::PositionVC::Dec\n\n// material property values\n//VTK::Color::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\nuniform mat4 WCVCMatrix; // World to view matrix\n\nvoid main()\n{\n // Apple Bug\n //VTK::PrimID::Impl\n\n gl_Position = WCVCMatrix*vertexWC;\n\n //VTK::TCoord::Impl\n\n //VTK::Color::Impl\n\n //VTK::PositionVC::Impl\n}\n",e.Fragment="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyData2DFS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nuniform int PrimitiveIDOffset;\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// Scalar coloring\n//VTK::Color::Dec\n\n// Depth Peeling\n//VTK::DepthPeeling::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\nvoid main()\n{\n // Apple Bug\n //VTK::PrimID::Impl\n\n //VTK::Color::Impl\n //VTK::TCoord::Impl\n\n //VTK::DepthPeeling::Impl\n //VTK::Picking::Impl\n\n if (gl_FragData[0].a <= 0.0)\n {\n discard;\n }\n}\n",e.Geometry=""},e.render=()=>{const n=t._openGLRenderWindow.getContext();if(t.context!==n){t.context=n;for(let e=Sn.Start;e{e.invokeEvent(Mn),t.renderable.getStatic()||t.renderable.update(),t.currentInput=t.renderable.getInputData(),e.invokeEvent(Dn),t.currentInput?t.currentInput.getPoints&&t.currentInput.getPoints().getNumberOfValues()&&(e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r)):Tn("No input!")},e.renderPieceStart=(n,r)=>{t.primitiveIDOffset=0,t._openGLRenderer.getSelector()&&(t._openGLRenderer.getSelector().getCurrentPass(),t._openGLRenderer.getSelector().renderProp(r)),e.updateBufferObjects(n,r),t.lastBoundBO=null},e.getNeedToRebuildShaders=(e,n,r)=>e.getShaderSourceTime().getMTime(){e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=(n,r)=>{const i=t.VBOBuildTime.getMTime();return!!(i{const r=t.currentInput;if(null===r)return;t.renderable.mapScalars(r,n.getProperty().getOpacity());const i=t.renderable.getColorMapColors();t.haveCellScalars=!1;const o=t.renderable.getScalarMode();t.renderable.getScalarVisibility()&&(o!==Cn.USE_CELL_DATA&&o!==Cn.USE_CELL_FIELD_DATA&&o!==Cn.USE_FIELD_DATA&&r.getPointData().getScalars()||o===Cn.USE_POINT_FIELD_DATA||!i||(t.haveCellScalars=!0));const a=n.getProperty().getRepresentation();let s=r.getPointData().getTCoords();t.openGLActor2D.getActiveTextures()||(s=null);const l=t.renderable.getTransformCoordinate(),u=e.getRenderWindow().getViews()[0].getViewportSize(e),c=`${r.getMTime()}A${a}B${r.getMTime()}C${i?i.getMTime():1}D${s?s.getMTime():1}E${l?e.getMTime():1}F${u}`;if(t.VBOBuildString!==c){let n=r.getPoints();if(l){const t=bn.ZP.newInstance(),r=n.getNumberOfPoints();t.setNumberOfPoints(r);const i=[];for(let o=0;or.getPointData().getArrayByName(e)))};o.cellOffset+=t.primitives[Sn.Points].getCABO().createVBO(r.getVerts(),"verts",a,o),o.cellOffset+=t.primitives[Sn.Lines].getCABO().createVBO(r.getLines(),"lines",a,o),o.cellOffset+=t.primitives[Sn.Tris].getCABO().createVBO(r.getPolys(),"polys",a,o),o.cellOffset+=t.primitives[Sn.TriStrips].getCABO().createVBO(r.getStrips(),"strips",a,o),t.VBOBuildTime.modified(),t.VBOBuildString=c}},e.renderPieceDraw=(n,r)=>{const i=r.getProperty().getRepresentation();t.context.depthMask(!0);for(let o=Sn.Start;o{t.lastBoundBO&&t.lastBoundBO.getVAO().release()},e.replaceShaderValues=(t,n,r)=>{e.replaceShaderColor(t,n,r),e.replaceShaderTCoord(t,n,r),e.replaceShaderPicking(t,n,r),e.replaceShaderPositionVC(t,n,r)},e.replaceShaderColor=(e,n,r)=>{let i=e.Vertex,o=e.Geometry,a=e.Fragment;t.haveCellScalars&&(a=Gt.Z.substitute(a,"//VTK::Color::Dec",["uniform samplerBuffer texture1;"]).result,a=Gt.Z.substitute(a,"//VTK::Color::Impl",["gl_FragData[0] = texelFetchBuffer(texture1, gl_PrimitiveID + PrimitiveIDOffset);"]).result),0!==t.lastBoundBO.getCABO().getColorComponents()?(i=Gt.Z.substitute(i,"//VTK::Color::Dec",["in vec4 diffuseColor;","out vec4 fcolorVSOutput;"]).result,i=Gt.Z.substitute(i,"//VTK::Color::Impl",["fcolorVSOutput = diffuseColor;"]).result,o=Gt.Z.substitute(o,"//VTK::Color::Dec",["in vec4 fcolorVSOutput[];\n","out vec4 fcolorGSOutput;"]).result,o=Gt.Z.substitute(o,"//VTK::Color::Impl",["fcolorGSOutput = fcolorVSOutput[i];"]).result,a=Gt.Z.substitute(a,"//VTK::Color::Dec",["in vec4 fcolorVSOutput;"]).result,a=Gt.Z.substitute(a,"//VTK::Color::Impl",["gl_FragData[0] = fcolorVSOutput;"]).result):(a=Gt.Z.substitute(a,"//VTK::Color::Dec",["uniform vec4 diffuseColor;"]).result,a=Gt.Z.substitute(a,"//VTK::Color::Impl",["gl_FragData[0] = diffuseColor;"]).result),e.Vertex=i,e.Geometry=o,e.Fragment=a},e.replaceShaderTCoord=(e,n,r)=>{if(t.lastBoundBO.getCABO().getTCoordOffset()){let n=e.Vertex,r=e.Geometry,i=e.Fragment;const o=t.lastBoundBO.getCABO().getTCoordComponents();1===o?(n=Gt.Z.substitute(n,"//VTK::TCoord::Dec",["in float tcoordMC;","out float tcoordVCVSOutput;"]).result,n=Gt.Z.substitute(n,"//VTK::TCoord::Impl",["tcoordVCVSOutput = tcoordMC;"]).result,r=Gt.Z.substitute(r,"//VTK::TCoord::Dec",["in float tcoordVCVSOutput[];\n","out float tcoordVCGSOutput;"]).result,r=Gt.Z.substitute(r,["//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];"]).result,i=Gt.Z.substitute(i,"//VTK::TCoord::Dec",["in float tcoordVCVSOutput;","uniform sampler2D texture1;"]).result,i=Gt.Z.substitute(i,"//VTK::TCoord::Impl",["gl_FragData[0] = gl_FragData[0]*texture2D(texture1, vec2(tcoordVCVSOutput,0));"]).result):2===o&&(n=Gt.Z.substitute(n,"//VTK::TCoord::Dec",["in vec2 tcoordMC;","out vec2 tcoordVCVSOutput;"]).result,n=Gt.Z.substitute(n,"//VTK::TCoord::Impl",["tcoordVCVSOutput = tcoordMC;"]).result,r=Gt.Z.substitute(r,"//VTK::TCoord::Dec",["in vec2 tcoordVCVSOutput[];\n","out vec2 tcoordVCGSOutput;"]).result,r=Gt.Z.substitute(r,"//VTK::TCoord::Impl",["tcoordVCGSOutput = tcoordVCVSOutput[i];"]).result,i=Gt.Z.substitute(i,"//VTK::TCoord::Dec",["in vec2 tcoordVCVSOutput;","uniform sampler2D texture1;"]).result,i=Gt.Z.substitute(i,"//VTK::TCoord::Impl",["gl_FragData[0] = gl_FragData[0]*texture2D(texture1, tcoordVCVSOutput.st);"]).result),t.haveCellScalars&&(r=Gt.Z.substitute(r,"//VTK::PrimID::Impl",["gl_PrimitiveID = gl_PrimitiveIDIn;"]).result),e.Vertex=n,e.Geometry=r,e.Fragment=i}},e.replaceShaderPicking=(e,t,n)=>{let r=e.Fragment;r=Gt.Z.substitute(r,"//VTK::Picking::Dec",["uniform vec3 mapperIndex;","uniform int picking;"]).result,r=Gt.Z.substitute(r,"//VTK::Picking::Impl"," gl_FragData[0] = picking != 0 ? vec4(mapperIndex,1.0) : gl_FragData[0];").result,e.Fragment=r},e.replaceShaderPositionVC=(e,n,r)=>{t.lastBoundBO.replaceShaderPositionVC(e,n,r)},e.invokeShaderCallbacks=(e,n,r)=>{const i=t.renderable.getViewSpecificProperties().ShadersCallbacks;i&&i.forEach((t=>{t.callback(t.userData,e,n,r)}))},e.setMapperShaderParameters=(e,n,r)=>{if(e.getProgram().isUniformUsed("PrimitiveIDOffset")&&e.getProgram().setUniformi("PrimitiveIDOffset",t.primitiveIDOffset),e.getProgram().isAttributeUsed("vertexWC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"vertexWC",e.getCABO().getVertexOffset(),e.getCABO().getStride(),t.context.FLOAT,3,!1)||Tn("Error setting vertexWC in shader VAO.")),e.getCABO().getElementCount()&&(t.VBOBuildTime.getMTime()>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())){t.renderable.getCustomShaderAttributes().forEach(((n,r)=>{e.getProgram().isAttributeUsed(`${n}MC`)&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),`${n}MC`,e.getCABO().getCustomData()[r].offset,e.getCABO().getStride(),t.context.FLOAT,e.getCABO().getCustomData()[r].components,!1)||Tn(`Error setting ${n}MC in shader VAO.`))})),e.getProgram().isAttributeUsed("tcoordMC")&&e.getCABO().getTCoordOffset()?e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"tcoordMC",e.getCABO().getTCoordOffset(),e.getCABO().getStride(),t.context.FLOAT,e.getCABO().getTCoordComponents(),!1)||Tn("Error setting tcoordMC in shader VAO."):e.getVAO().removeAttributeArray("tcoordMC"),t.internalColorTexture&&e.getProgram().isUniformUsed("texture1")&&e.getProgram().setUniformi("texture1",t.internalColorTexture.getTextureUnit());const i=t.openGLActor2D.getActiveTextures();if(i)for(let t=0;t{const i=t.renderable.getColorMapColors();if(!i||0===i.getNumberOfComponents()){const t=e.getProgram(),n=r.getProperty(),i=n.getOpacity(),o=n.getColor(),a=[o[0],o[1],o[2],i];t.setUniform4f("diffuseColor",a)}},e.setLightingShaderParameters=(e,t,n)=>{},e.setCameraShaderParameters=(e,n,i)=>{const o=e.getProgram(),a=e.getCABO().getCoordShiftAndScaleEnabled()?e.getCABO().getInverseShiftAndScaleMatrix():null,s=n.getRenderWindow().getViews()[0].getViewportSize(n),l=n.getViewport(),u=i.getActualPositionCoordinate().getComputedDoubleViewportValue(n),c=[0,0,1,1],d=[0,0,1,1];if(d[0]=l[0]>=c[0]?l[0]:c[0],d[1]=l[1]>=c[1]?l[1]:c[1],d[2]=l[2]<=c[2]?l[2]:c[2],d[3]=l[3]<=c[3]?l[3]:c[3],d[0]>=d[2])return;if(d[1]>=d[3])return;s[0]=(0,st.L)(s[0]*(d[2]-d[0])/(l[2]-l[0])),s[1]=(0,st.L)(s[1]*(d[3]-d[1])/(l[3]-l[1]));const p=t._openGLRenderer.getParent().getSize(),f=(0,st.L)(u[0]-(d[0]-l[0])*p[0]),h=(0,st.L)(u[1]-(d[1]-l[1])*p[1]),m=-f;let g=-f+s[0];const v=-h;let y=-h+s[1];m===g&&(g=m+1),v===y&&(y=v+1);const _=r.identity(new Float64Array(16));var b,x,w;_[0]=2/(g-m),_[5]=2/(y-v),_[3]=-1*(g+m)/(g-m),_[7]=-1*(y+v)/(y-v),_[10]=0,_[11]=i.getProperty().getDisplayLocation()===xn.FOREGROUND?-1:1,_[15]=1,r.transpose(_,_),o.setUniformMatrix("WCVCMatrix",(b=[_,a],x=r,w=t.tmpMat4,x.identity(w),b.reduce(((e,t,n)=>0===n?t?x.copy(e,t):x.identity(e):t?x.multiply(e,e,t):e),w)))}}const Pn={context:null,VBOBuildTime:0,VBOBuildString:null,primitives:null,primTypes:null,shaderRebuildString:null};function kn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pn,n),a.Z.extend(e,t,n),Yt.implementReplaceShaderCoincidentOffset(e,t,n),Yt.implementBuildShadersWithReplacements(e,t,n),t.primitives=[],t.primTypes=Sn,t.tmpMat4=r.identity(new Float64Array(16));for(let e=Sn.Start;e{const n=e.getLastSize(),r=(n[0]/700)**.8,i=(n[1]/700)**.8,o=Math.min(r,i),a=e.getAxisTextStyle(),s=e.getTickTextStyle();Object.assign(a,t.axisTextStyle),Object.assign(s,t.tickTextStyle),a.fontSize=Math.max(24*o,12),e.getLastAspectRatio()>1?s.fontSize=Math.max(20*o,10):s.fontSize=Math.max(16*o,10);const l=e.updateTextureAtlas();e.setTopTitle(!1);const u=e.getBoxSizeByReference();if(e.getLastAspectRatio()>1)e.setTickLabelPixelOffset(.3*s.fontSize),l.titleWidth<=l.tickWidth+e.getTickLabelPixelOffset()+.8*s.fontSize?(e.setTopTitle(!0),e.setAxisTitlePixelOffset(.2*s.fontSize),u[0]=2*(l.tickWidth+e.getTickLabelPixelOffset()+.8*s.fontSize)/n[0],e.setBoxPosition([.98-u[0],-.92])):(e.setAxisTitlePixelOffset(.2*s.fontSize),u[0]=2*(l.titleHeight+e.getAxisTitlePixelOffset()+l.tickWidth+e.getTickLabelPixelOffset()+.8*s.fontSize)/n[0],e.setBoxPosition([.99-u[0],-.92])),u[1]=Math.max(1.2,Math.min(1.84/i,1.84));else{e.setAxisTitlePixelOffset(1.2*s.fontSize),e.setTickLabelPixelOffset(.1*s.fontSize);const t=2*(.8*s.fontSize+l.titleHeight+e.getAxisTitlePixelOffset())/n[1],r=2*l.tickWidth/n[0];u[0]=Math.min(1.9,Math.max(1.4,1.4*r*(e.getTicks().length+3))),u[1]=t,e.setBoxPosition([-.5*u[0],-.97])}e.recomputeBarSegments(l)}}function Rn(e,t){return e=>{const t=e.getLastTickBounds(),n=at().domain([t[0],t[1]]),r=n.ticks(5),i=n.tickFormat(5);e.setTicks(r),e.setTickStrings(r.map(i))}}function Bn(e,t){t.classHierarchy.push("vtkScalarBarActorHelper"),e.setRenderable=n=>{t.renderable!==n&&(t.renderable=n,t.barActor.setProperty(n.getProperty()),t.barActor.setParentProp(n),t.barActor.setCoordinateSystemToDisplay(),t.tmActor.setProperty(n.getProperty()),t.tmActor.setParentProp(n),t.tmActor.setCoordinateSystemToDisplay(),t.generateTicks=n.generateTicks,t.axisTextStyle={...n.getAxisTextStyle()},t.tickTextStyle={...n.getTickTextStyle()},e.modified())},e.updateAPISpecificData=(n,r,i)=>{t.lastSize[0]===n[0]&&t.lastSize[1]===n[1]||(t.lastSize[0]=n[0],t.lastSize[1]=n[1],t.lastAspectRatio=n[0]/n[1],t.forceUpdate=!0);const o=t.renderable.getScalarsToColors();if(o&&t.renderable.getVisibility()&&(t.barMapper.setLookupTable(o),t.camera=r,t.renderWindow=i,t.forceUpdate||Math.max(o.getMTime(),e.getMTime(),t.renderable.getMTime())>t.lastRebuildTime.getMTime())){const n=o.getMappingRange();if(t.lastTickBounds=[...n],t.renderable.getGenerateTicks()(e),t.renderable.getAutomated())t.renderable.getAutoLayout()(e);else{t.axisTextStyle={...t.renderable.getAxisTextStyle()},t.tickTextStyle={...t.renderable.getTickTextStyle()},t.barPosition=[...t.renderable.getBarPosition()],t.barSize=[...t.renderable.getBarSize()],t.boxPosition=[...t.renderable.getBoxPosition()],t.boxSize=[...t.renderable.getBoxSize()],t.axisTitlePixelOffset=t.renderable.getAxisTitlePixelOffset(),t.tickLabelPixelOffset=t.renderable.getTickLabelPixelOffset();const n=e.updateTextureAtlas();e.recomputeBarSegments(n)}e.updatePolyDataForLabels(),e.updatePolyDataForBarSegments(),t.lastRebuildTime.modified(),t.forceUpdate=!1}},e.updateTextureAtlas=()=>{t.tmContext.textBaseline="bottom",t.tmContext.textAlign="left";const n={},r=new Map;let i=0,o=1;In(t.tmContext,t.axisTextStyle);let a=t.tmContext.measureText(t.renderable.getAxisLabel()),s={height:a.actualBoundingBoxAscent+2,startingHeight:o,width:a.width+2,textStyle:t.axisTextStyle};r.set(t.renderable.getAxisLabel(),s),o+=s.height,i=s.width,n.titleWidth=s.width,n.titleHeight=s.height,n.tickWidth=0,n.tickHeight=0,In(t.tmContext,t.tickTextStyle);const l=[...e.getTickStrings(),"NaN","Below","Above"];for(let e=0;e{e.tcoords=[0,(o-e.startingHeight-e.height)/o,e.width/i,(o-e.startingHeight-e.height)/o,e.width/i,(o-e.startingHeight)/o,0,(o-e.startingHeight)/o]})),t.tmCanvas.width=i,t.tmCanvas.height=o,t.tmContext.textBaseline="bottom",t.tmContext.textAlign="left",t.tmContext.clearRect(0,0,i,o),r.forEach(((e,n)=>{In(t.tmContext,e.textStyle),t.tmContext.fillText(n,1,e.startingHeight+e.height-1)})),t.tmTexture.setCanvas(t.tmCanvas),t.tmTexture.modified(),t._tmAtlas=r,n},e.computeBarSize=e=>{t.vertical=t.boxSize[1]>t.boxSize[0];const n=2*e.tickHeight/t.lastSize[1],r=[1,1];if(t.vertical){const i=2*(e.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];if(t.topTitle){const n=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0]-i,t.barSize[1]=t.boxSize[1]-n}else{const n=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];t.barSize[0]=t.boxSize[0]-n-i,t.barSize[1]=t.boxSize[1]}t.barPosition[0]=t.boxPosition[0]+i,t.barPosition[1]=t.boxPosition[1],r[1]=n}else{const n=(2*e.tickWidth-8)/t.lastSize[0],i=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0],t.barPosition[0]=t.boxPosition[0],t.barSize[1]=t.boxSize[1]-i,t.barPosition[1]=t.boxPosition[1],r[0]=n}return r},e.recomputeBarSegments=n=>{const r=e.computeBarSize(n);t.barSegments=[];const i=[0,0],o=t.vertical?1:0,a=t.vertical?.01:.02;function s(e,n){t.barSegments.push({corners:[[...i],[i[0]+r[0],i[1]],[i[0]+r[0],i[1]+r[1]],[i[0],i[1]+r[1]]],scalars:n,title:e}),i[o]+=r[o]+a}t.renderable.getDrawNanAnnotation()&&t.renderable.getScalarsToColors().getNanColor()&&s("NaN",[NaN,NaN,NaN,NaN]),t.renderable.getDrawBelowRangeSwatch()&&t.renderable.getScalarsToColors().getUseBelowRangeColor?.()&&s("Below",[-.1,-.1,-.1,-.1]);const l=t.renderable.getScalarsToColors().getUseAboveRangeColor?.();i[o]+=a;const u=r[o];r[o]=l?1-2*a-r[o]-i[o]:1-a-i[o],s("ticks",t.vertical?[0,0,.995,.995]:[0,.995,.995,0]),t.renderable.getDrawAboveRangeSwatch()&&l&&(r[o]=u,i[o]+=a,s("Above",[1.1,1.1,1.1,1.1]))};const n=new Float64Array(3);e.createPolyDataForOneLabel=(e,r,i,o,a,s)=>{const l=t._tmAtlas.get(e);if(!l)return;let u=s.ptIdx,c=s.cellIdx;n[0]=(.5*r[0]+.5)*t.lastSize[0],n[1]=(.5*r[1]+.5)*t.lastSize[1],n[2]=r[2],n[0]+=a[0],n[1]+=a[1];const d=[],p="vertical"===o?[1,0]:[0,1];"vertical"===o?(d[0]=l.width,d[1]=-l.height,"middle"===i[0]?n[1]-=l.width/2:"right"===i[0]&&(n[1]-=l.width),"middle"===i[1]?n[0]+=l.height/2:"top"===i[1]&&(n[0]+=l.height)):(d[0]=l.width,d[1]=l.height,"middle"===i[0]?n[0]-=l.width/2:"right"===i[0]&&(n[0]-=l.width),"middle"===i[1]?n[1]-=l.height/2:"top"===i[1]&&(n[1]-=l.height)),s.points[3*u]=n[0],s.points[3*u+1]=n[1],s.points[3*u+2]=n[2],s.tcoords[2*u]=l.tcoords[0],s.tcoords[2*u+1]=l.tcoords[1],u++,n[p[0]]+=d[0],s.points[3*u]=n[0],s.points[3*u+1]=n[1],s.points[3*u+2]=n[2],s.tcoords[2*u]=l.tcoords[2],s.tcoords[2*u+1]=l.tcoords[3],u++,n[p[1]]+=d[1],s.points[3*u]=n[0],s.points[3*u+1]=n[1],s.points[3*u+2]=n[2],s.tcoords[2*u]=l.tcoords[4],s.tcoords[2*u+1]=l.tcoords[5],u++,n[p[0]]-=d[0],s.points[3*u]=n[0],s.points[3*u+1]=n[1],s.points[3*u+2]=n[2],s.tcoords[2*u]=l.tcoords[6],s.tcoords[2*u+1]=l.tcoords[7],u++,s.polys[4*c]=3,s.polys[4*c+1]=u-4,s.polys[4*c+2]=u-3,s.polys[4*c+3]=u-2,c++,s.polys[4*c]=3,s.polys[4*c+1]=u-4,s.polys[4*c+2]=u-2,s.polys[4*c+3]=u-1,s.ptIdx+=4,s.cellIdx+=2};const r=new Float64Array(3);e.updatePolyDataForLabels=()=>{const n=e.getTickStrings().length+t.barSegments.length,i=4*n,o=2*n,a=new Float64Array(3*i),s=new Uint16Array(4*o),l=new Float32Array(2*i),u={ptIdx:0,cellIdx:0,polys:s,points:a,tcoords:l},c=t.vertical?0:1,d=t.vertical?1:0;r[2]=-.99;const p=t.vertical?["right","middle"]:["middle","bottom"];let f=[0,1];const h=[0,0];t.vertical?(h[0]=-t.tickLabelPixelOffset,t.topTitle?(r[0]=t.boxPosition[0]+.5*t.boxSize[0],r[1]=t.barPosition[1]+t.barSize[1],e.createPolyDataForOneLabel(t.renderable.getAxisLabel(),r,["middle","bottom"],"horizontal",[0,t.axisTitlePixelOffset],u)):(r[0]=t.barPosition[0]+t.barSize[0],r[1]=t.barPosition[1]+.5*t.barSize[1],e.createPolyDataForOneLabel(t.renderable.getAxisLabel(),r,["middle","top"],"vertical",[t.axisTitlePixelOffset,0],u)),f=[-1,0]):(h[1]=t.tickLabelPixelOffset,r[0]=t.barPosition[0]+.5*t.barSize[0],r[1]=t.barPosition[1]+t.barSize[1],e.createPolyDataForOneLabel(t.renderable.getAxisLabel(),r,["middle","bottom"],"horizontal",[0,t.axisTitlePixelOffset],u)),r[c]=t.barPosition[c]+(.5*f[c]+.5)*t.barSize[c],r[d]=t.barPosition[d]+.5*t.barSize[d];let m=null;for(let n=0;n{const e=t.renderable.getScalarsToColors();let n=0;t.renderable.getDrawNanAnnotation()&&e.getNanColor()&&(n+=1),t.renderable.getDrawBelowRangeSwatch()&&e.getUseBelowRangeColor?.()&&(n+=1),t.renderable.getDrawAboveRangeSwatch()&&e.getUseAboveRangeColor?.()&&(n+=1);const i=4*(1+n),o=i;let a=1;e.getVectorMode()===En.COMPONENT&&(a=e.getVectorComponent()+1);const s=new Float64Array(3*i),l=new Uint16Array(5*o),u=new Float32Array(i*a);let c=0,d=0;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{renderable:null};Object.assign(t,{},n),o.m.obj(e,t),o.m.setGet(e,t,["axisTitlePixelOffset","tickLabelPixelOffset","renderable","topTitle","ticks","tickStrings"]),o.m.get(e,t,["lastSize","lastAspectRatio","lastTickBounds","axisTextStyle","tickTextStyle","barActor","tmActor"]),o.m.getArray(e,t,["boxPosition","boxSize"]),o.m.setArray(e,t,["boxPosition","boxSize"],2),t.forceUpdate=!1,t.lastRebuildTime={},o.m.obj(t.lastRebuildTime,{mtime:0}),t.lastSize=[-1,-1],t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t._tmAtlas=new Map,t.barMapper=dt.ZP.newInstance(),t.barMapper.setInterpolateScalarsBeforeMapping(!0),t.barMapper.setUseLookupTableScalarRange(!0),t.polyData=pt.ZP.newInstance(),t.barMapper.setInputData(t.polyData),t.barActor=lt.ZP.newInstance(),t.barActor.setMapper(t.barMapper),t.tmPolyData=pt.ZP.newInstance(),t.tmMapper=dt.ZP.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=ft.ZP.newInstance({resizable:!0}),t.tmTexture.setInterpolate(!1),t.tmActor=lt.ZP.newInstance({parentProp:e}),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.barPosition=[0,0],t.barSize=[0,0],t.boxPosition=[.88,-.92],t.boxSize=[.1,1.1],t.lastTickBounds=[],Bn(e,t)}),"vtkScalarBarActorHelper");function Vn(e,t){t.classHierarchy.push("vtkScalarBarActor"),e.setTickTextStyle=n=>{t.tickTextStyle={...t.tickTextStyle,...n},e.modified()},e.setAxisTextStyle=n=>{t.axisTextStyle={...t.axisTextStyle,...n},e.modified()},e.resetAutoLayoutToDefault=()=>{e.setAutoLayout(Nn(0,t))},e.resetGenerateTicksToDefault=()=>{e.setGenerateTicks(Rn())}}function Un(e){return{automated:!0,autoLayout:null,axisLabel:"Scalar Value",barPosition:[0,0],barSize:[0,0],boxPosition:[.88,-.92],boxSize:[.1,1.1],scalarToColors:null,axisTitlePixelOffset:36,axisTextStyle:{fontColor:"white",fontStyle:"normal",fontSize:18,fontFamily:"serif"},tickLabelPixelOffset:14,tickTextStyle:{fontColor:"white",fontStyle:"normal",fontSize:14,fontFamily:"serif"},generateTicks:null,drawNanAnnotation:!0,drawBelowRangeSwatch:!0,drawAboveRangeSwatch:!0,...e}}function Gn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Un(n)),t.autoLayout||(t.autoLayout=Nn(0,t)),t.generateTicks||(t.generateTicks=Rn()),lt.ZP.extend(e,t,n),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),o.m.setGet(e,t,["automated","autoLayout","axisTitlePixelOffset","axisLabel","scalarsToColors","tickLabelPixelOffset","generateTicks","drawNanAnnotation","drawBelowRangeSwatch","drawAboveRangeSwatch"]),o.m.get(e,t,["axisTextStyle","tickTextStyle"]),o.m.getArray(e,t,["barPosition","barSize","boxPosition","boxSize"]),o.m.setArray(e,t,["barPosition","barSize","boxPosition","boxSize"],2),Vn(e,t)}var zn={newInstance:o.m.newInstance(Gn,"vtkScalarBarActor"),extend:Gn,newScalarBarActorHelper:Fn};function jn(e,t){t.classHierarchy.push("vtkOpenGLScalarBarActor"),e.buildPass=n=>{n&&(t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t._openGLRenderWindow=t._openGLRenderer.getParent(),t.scalarBarActorHelper.getRenderable()||t.scalarBarActorHelper.setRenderable(t.renderable),e.prepareNodes(),e.addMissingNode(t.scalarBarActorHelper.getBarActor()),e.addMissingNode(t.scalarBarActorHelper.getTmActor()),e.removeUnusedNodes())},e.opaquePass=(e,n)=>{if(e){const e=t._openGLRenderer?t._openGLRenderer.getRenderable().getActiveCamera():null,n=t._openGLRenderer.getTiledSizeAndOrigin();t.scalarBarActorHelper.updateAPISpecificData([n.usize,n.vsize],e,t._openGLRenderWindow.getRenderable())}}}const Yn={};function Hn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yn,n),a.Z.extend(e,t,n),t.scalarBarActorHelper=zn.newScalarBarActorHelper(),jn(e,t)}const Wn=(0,o.n)(Hn,"vtkOpenGLScalarBarActor");(0,s.vw)("vtkScalarBarActor",Wn);var $n=n(31);const{vtkErrorMacro:Zn}=o.c;function Kn(e,t){t.classHierarchy.push("vtkOpenGLSkybox"),e.buildPass=n=>{if(n){t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t._openGLRenderWindow=t._openGLRenderer.getParent(),t.context=t._openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t._openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t._openGLRenderWindow);const n=t._openGLRenderer.getRenderable();t.openGLCamera=t._openGLRenderer.getViewNodeFor(n.getActiveCamera())}},e.queryPass=(e,n)=>{if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementOpaqueActorCount()}},e.opaquePass=(n,i)=>{if(n&&!t._openGLRenderer.getSelector()){e.updateBufferObjects(),t.context.depthMask(!0),t._openGLRenderWindow.getShaderCache().readyShaderProgram(t.tris.getProgram()),t.openGLTexture.render(t._openGLRenderWindow);const n=t.openGLTexture.getTextureUnit();t.tris.getProgram().setUniformi("sbtexture",n);const i=t._openGLRenderer.getRenderable(),o=t.openGLCamera.getKeyMatrices(i),a=new Float64Array(16);if(r.invert(a,o.wcpc),t.tris.getProgram().setUniformMatrix("IMCPCMatrix",a),"box"===t.lastFormat){const e=i.getActiveCamera().getPosition();t.tris.getProgram().setUniform3f("camPos",e[0],e[1],e[2])}t.tris.getVAO().bind(),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.openGLTexture.deactivate()}},e.updateBufferObjects=()=>{if(!t.tris.getCABO().getElementCount()){const e=new Float32Array(12);for(let t=0;t<4;t++)e[3*t]=t%2*2-1,e[3*t+1]=t>1?1:-1,e[3*t+2]=1;const n=ct.ZP.newInstance({numberOfComponents:3,values:e});n.setName("points");const r=new Uint16Array(8);r[0]=3,r[1]=0,r[2]=1,r[3]=3,r[4]=3,r[5]=0,r[6]=3,r[7]=2;const i=ct.ZP.newInstance({numberOfComponents:1,values:r});t.tris.getCABO().createVBO(i,"polys",$n.hX.SURFACE,{points:n,cellOffset:0})}t.renderable.getFormat()!==t.lastFormat&&(t.lastFormat=t.renderable.getFormat(),"box"===t.lastFormat&&t.tris.setProgram(t._openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec3 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = wpos.xyz/wpos.w;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec3 TexCoords;\n uniform samplerCube sbtexture;\n uniform vec3 camPos;\n void main () {\n // skybox looks from inside out\n // which means we have to adjust\n // our tcoords. Otherwise text would\n // be flipped\n vec3 tc = normalize(TexCoords - camPos);\n if (abs(tc.z) < max(abs(tc.x),abs(tc.y)))\n {\n tc = vec3(1.0, 1.0, -1.0) * tc;\n }\n else\n {\n tc = vec3(-1.0, 1.0, 1.0) * tc;\n }\n gl_FragData[0] = textureCube(sbtexture, tc);\n }","")),"background"===t.lastFormat&&t.tris.setProgram(t._openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec2 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = vec2(vertexMC.x, vertexMC.y)*0.5 + 0.5;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec2 TexCoords;\n uniform sampler2D sbtexture;\n void main () {\n gl_FragData[0] = texture2D(sbtexture, TexCoords);\n }","")),t.tris.getShaderSourceTime().modified(),t.tris.getVAO().bind(),t.tris.getVAO().addAttributeArray(t.tris.getProgram(),t.tris.getCABO(),"vertexMC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Zn("Error setting vertexMC in shader VAO."));const e=t.renderable.getTextures();e.length||Zn("vtkSkybox requires a texture map"),t.openGLTexture.getRenderable()!==e[0]&&(t.openGLTexture.releaseGraphicsResources(t._openGLRenderWindow),t.openGLTexture.setRenderable(e[0]))}}const qn={context:null};function Xn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qn,n),a.Z.extend(e,t,n),t.openGLTexture=Ft.ZP.newInstance(),t.tris=Bt.ZP.newInstance(),t.keyMatrixTime={},(0,o.o)(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:i.identity(new Float64Array(9)),mcwc:r.identity(new Float64Array(16))},(0,o.e)(e,t,["context"]),(0,o.g)(e,t,["activeTextures"]),Kn(e,t)}const Jn=(0,o.n)(Xn);(0,s.vw)("vtkSkybox",Jn);var Qn=n(71),er=n(362);const{vtkErrorMacro:tr}=o.c,{Representation:nr}=Ut.ZP,{ObjectType:rr}=Qn.ZP,{PassTypes:ir}=er.ZP,or={type:"StartEvent"},ar={type:"EndEvent"};function sr(e,t){t.classHierarchy.push("vtkOpenGLGlyph3DMapper");const n={...e};e.renderPiece=(n,r)=>{if(e.invokeEvent(or),t.renderable.getStatic()||t.renderable.update(),t.currentInput=t.renderable.getInputData(1),e.invokeEvent(ar),!t.currentInput)return void tr("No input!");if(!t.currentInput.getPoints||!t.currentInput.getPoints().getNumberOfValues())return;const i=t.context;t._openGLRenderWindow.getWebgl2()?(t.hardwareSupport=!0,t.extension=null):t.extension||(t.extension=t.context.getExtension("ANGLE_instanced_arrays"),t.hardwareSupport=!!t.extension);const o=r.getProperty().getBackfaceCulling(),a=r.getProperty().getFrontfaceCulling();o||a?a?(t._openGLRenderWindow.enableCullFace(),i.cullFace(i.FRONT)):(t._openGLRenderWindow.enableCullFace(),i.cullFace(i.BACK)):t._openGLRenderWindow.disableCullFace(),e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r)},e.multiply4x4WithOffset=(e,t,n,r)=>{const i=t[0],o=t[1],a=t[2],s=t[3],l=t[4],u=t[5],c=t[6],d=t[7],p=t[8],f=t[9],h=t[10],m=t[11],g=t[12],v=t[13],y=t[14],_=t[15];let b=n[r],x=n[r+1],w=n[r+2],S=n[r+3];e[0]=b*i+x*l+w*p+S*g,e[1]=b*o+x*u+w*f+S*v,e[2]=b*a+x*c+w*h+S*y,e[3]=b*s+x*d+w*m+S*_,b=n[r+4],x=n[r+5],w=n[r+6],S=n[r+7],e[4]=b*i+x*l+w*p+S*g,e[5]=b*o+x*u+w*f+S*v,e[6]=b*a+x*c+w*h+S*y,e[7]=b*s+x*d+w*m+S*_,b=n[r+8],x=n[r+9],w=n[r+10],S=n[r+11],e[8]=b*i+x*l+w*p+S*g,e[9]=b*o+x*u+w*f+S*v,e[10]=b*a+x*c+w*h+S*y,e[11]=b*s+x*d+w*m+S*_,b=n[r+12],x=n[r+13],w=n[r+14],S=n[r+15],e[12]=b*i+x*l+w*p+S*g,e[13]=b*o+x*u+w*f+S*v,e[14]=b*a+x*c+w*h+S*y,e[15]=b*s+x*d+w*m+S*_},e.replaceShaderNormal=(e,r,i)=>{if(t.hardwareSupport){if(t.lastBoundBO.getReferenceByName("lastLightComplexity")>0){let n=e.Vertex;t.lastBoundBO.getCABO().getNormalOffset()&&(n=Gt.Z.substitute(n,"//VTK::Normal::Dec",["attribute vec3 normalMC;","attribute mat3 gNormal;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,n=Gt.Z.substitute(n,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * gNormal * normalMC;"]).result),e.Vertex=n}}n.replaceShaderNormal(e,r,i)},e.replaceShaderColor=(e,r,i)=>{if(t.hardwareSupport&&t.renderable.getColorArray()){let n=e.Vertex,r=e.Geometry,i=e.Fragment;const o=t.lastBoundBO.getReferenceByName("lastLightComplexity");let a=["uniform float ambient;","uniform float diffuse;","uniform float specular;","uniform float opacityUniform; // the fragment opacity"];o&&(a=a.concat(["uniform vec3 specularColorUniform;","uniform float specularPowerUniform;"]));let s=["vec3 ambientColor;"," vec3 diffuseColor;"," float opacity;"];o&&(s=s.concat([" vec3 specularColor;"," float specularPower;"])),s=s.concat([" opacity = opacityUniform;"]),o&&(s=s.concat([" specularColor = specularColorUniform;"," specularPower = specularPowerUniform;"])),t.drawingEdges||(a=a.concat(["varying vec4 vertexColorVSOutput;"]),n=Gt.Z.substitute(n,"//VTK::Color::Dec",["attribute vec4 gColor;","varying vec4 vertexColorVSOutput;"]).result,n=Gt.Z.substitute(n,"//VTK::Color::Impl",["vertexColorVSOutput = gColor;"]).result,r=Gt.Z.substitute(r,"//VTK::Color::Dec",["in vec4 vertexColorVSOutput[];","out vec4 vertexColorGSOutput;"]).result,r=Gt.Z.substitute(r,"//VTK::Color::Impl",["vertexColorGSOutput = vertexColorVSOutput[i];"]).result,s=s.concat([" diffuseColor = vertexColorVSOutput.rgb;"," ambientColor = vertexColorVSOutput.rgb;"," opacity = opacity*vertexColorVSOutput.a;"])),i=Gt.Z.substitute(i,"//VTK::Color::Impl",s).result,i=Gt.Z.substitute(i,"//VTK::Color::Dec",a).result,e.Vertex=n,e.Geometry=r,e.Fragment=i}n.replaceShaderColor(e,r,i)},e.replaceShaderPositionVC=(e,r,i)=>{if(t.hardwareSupport){let n=e.Vertex;t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(n=Gt.Z.substitute(n,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;","vertexVCVSOutput = MCVCMatrix * gVertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result,n=Gt.Z.substitute(n,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result):(n=Gt.Z.substitute(n,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;"]).result,n=Gt.Z.substitute(n,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result),e.Vertex=n}n.replaceShaderPositionVC(e,r,i)},e.replaceShaderPicking=(e,r,i)=>{if(t.hardwareSupport){let t=e.Fragment,n=e.Vertex;n=Gt.Z.substitute(n,"//VTK::Picking::Dec",["attribute vec3 mapperIndexVS;","varying vec3 mapperIndexVSOutput;"]).result,n=Gt.Z.substitute(n,"//VTK::Picking::Impl"," mapperIndexVSOutput = mapperIndexVS;").result,e.Vertex=n,t=Gt.Z.substitute(t,"//VTK::Picking::Dec",["varying vec3 mapperIndexVSOutput;","uniform vec3 mapperIndex;","uniform int picking;"]).result,t=Gt.Z.substitute(t,"//VTK::Picking::Impl",[" vec4 pickColor = picking == 2 ? vec4(mapperIndexVSOutput,1.0) : vec4(mapperIndex,1.0);"," gl_FragData[0] = picking != 0 ? pickColor : gl_FragData[0];"]).result,e.Fragment=t}else n.replaceShaderPicking(e,r,i)},e.updateGlyphShaderParameters=(n,r,i,o,a,s,l,u)=>{const c=i.getProgram();if(n){const e=t.normalMatrix,n=s,r=9*l,i=t.tmpMat3,o=e[0],a=e[1],u=e[2],d=e[3],p=e[4],f=e[5],h=e[6],m=e[7],g=e[8],v=n[r],y=n[r+1],_=n[r+2],b=n[r+3],x=n[r+4],w=n[r+5],S=n[r+6],C=n[r+7],T=n[r+8];i[0]=v*o+y*d+_*h,i[1]=v*a+y*p+_*m,i[2]=v*u+y*f+_*g,i[3]=b*o+x*d+w*h,i[4]=b*a+x*p+w*m,i[5]=b*u+x*f+w*g,i[6]=S*o+C*d+T*h,i[7]=S*a+C*p+T*m,i[8]=S*u+C*f+T*g,c.setUniformMatrix3x3("normalMatrix",t.tmpMat3)}if(e.multiply4x4WithOffset(t.tmpMat4,t.mcpcMatrix,a,16*l),c.setUniformMatrix("MCPCMatrix",t.tmpMat4),r&&(e.multiply4x4WithOffset(t.tmpMat4,t.mcvcMatrix,a,16*l),c.setUniformMatrix("MCVCMatrix",t.tmpMat4)),o){const e=o.getData();t.tmpColor[0]=e[4*l]/255,t.tmpColor[1]=e[4*l+1]/255,t.tmpColor[2]=e[4*l+2]/255,c.setUniform3fArray("ambientColorUniform",t.tmpColor),c.setUniform3fArray("diffuseColorUniform",t.tmpColor)}u&&c.setUniform3fArray("mapperIndex",u.getPropColorValue())},e.renderPieceDraw=(n,o)=>{const a=o.getProperty().getRepresentation(),s=t.context,l=o.getProperty().getEdgeVisibility()&&a===nr.SURFACE,u=t.openGLCamera.getKeyMatrices(n),c=t.openGLActor.getKeyMatrices();i.multiply(t.normalMatrix,u.normalMatrix,c.normalMatrix),r.multiply(t.mcpcMatrix,u.wcpc,c.mcwc),r.multiply(t.mcvcMatrix,u.wcvc,c.mcwc);const d=t.renderable.getMatrixArray(),p=t.renderable.getNormalArray(),f=t.renderable.getColorArray(),h=d.length/16;let m=!1;t._openGLRenderer.getSelector()&&t._openGLRenderer.getSelector().getCurrentPass()===ir.COMPOSITE_INDEX_PASS&&(m=!0);for(let r=t.primTypes.Start;r{if(e.getCABO().getElementCount()&&(t.glyphBOBuildTime.getMTime()>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime()))return e.getProgram().isAttributeUsed("gMatrix")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.matrixBuffer,"gMatrix",0,64,t.context.FLOAT,4,!1,1)||tr("Error setting gMatrix in shader VAO."):e.getVAO().removeAttributeArray("gMatrix"),e.getProgram().isAttributeUsed("gNormal")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.normalBuffer,"gNormal",0,36,t.context.FLOAT,3,!1,1)||tr("Error setting gNormal in shader VAO."):e.getVAO().removeAttributeArray("gNormal"),e.getProgram().isAttributeUsed("gColor")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.colorBuffer,"gColor",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||tr("Error setting gColor in shader VAO."):e.getVAO().removeAttributeArray("gColor"),e.getProgram().isAttributeUsed("mapperIndexVS")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.pickBuffer,"mapperIndexVS",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||tr("Error setting mapperIndexVS in shader VAO."):e.getVAO().removeAttributeArray("mapperIndexVS"),n.setMapperShaderParameters(e,r,i),void e.getAttributeUpdateTime().modified();n.setMapperShaderParameters(e,r,i)},e.getNeedToRebuildBufferObjects=(e,r)=>{t.renderable.buildArrays();return t.VBOBuildTime.getMTime()!!(n.getNeedToRebuildShaders(e,r,i)||e.getShaderSourceTime().getMTime(){if(t.hardwareSupport){const e=t.renderable.getMatrixArray(),n=t.renderable.getNormalArray(),r=t.renderable.getColorArray();if(t.matrixBuffer||(t.matrixBuffer=Qn.ZP.newInstance(),t.matrixBuffer.setOpenGLRenderWindow(t._openGLRenderWindow),t.normalBuffer=Qn.ZP.newInstance(),t.normalBuffer.setOpenGLRenderWindow(t._openGLRenderWindow),t.colorBuffer=Qn.ZP.newInstance(),t.colorBuffer.setOpenGLRenderWindow(t._openGLRenderWindow),t.pickBuffer=Qn.ZP.newInstance(),t.pickBuffer.setOpenGLRenderWindow(t._openGLRenderWindow)),t.renderable.getBuildTime().getMTime()>t.glyphBOBuildTime.getMTime()){t.matrixBuffer.upload(e,rr.ARRAY_BUFFER),t.normalBuffer.upload(n,rr.ARRAY_BUFFER),r?t.colorBuffer.upload(r.getData(),rr.ARRAY_BUFFER):t.colorBuffer.releaseGraphicsResources();const i=e.length/16,o=new Uint8Array(4*i);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lr,n),un.extend(e,t,n),t.tmpMat3=i.identity(new Float64Array(9)),t.normalMatrix=i.identity(new Float64Array(9)),t.mcpcMatrix=r.identity(new Float64Array(16)),t.mcvcMatrix=r.identity(new Float64Array(16)),t.tmpColor=[],t.glyphBOBuildTime={},(0,o.o)(t.glyphBOBuildTime,{mtime:0}),sr(e,t)}const cr=(0,o.n)(ur,"vtkOpenGLGlyph3DMapper");(0,s.vw)("vtkGlyph3DMapper",cr);var dr=n(44);const{vtkErrorMacro:pr}=o.m;class fr{constructor(){this.segmentMapping={},this.segments=[null],this.faces=[]}addSegment(e){const t=e[0],n=e[e.length-1];if(t===n||e.length<2)return;const r=this.segmentMapping[t],i=this.segmentMapping[n];if(void 0!==r&&void 0!==i)if(Math.abs(r)===Math.abs(i)){const o=r0)for(let t=1;t0){const t=this.segments[r];for(let n=1;n0){const n=this.segments[i];for(let t=1;t{const n=e[0];if(!n)return void pr("Invalid or missing input");const r=pt.ZP.newInstance();r.shallowCopy(n);const i=new fr,o=n.getLines().getData();let a=0;for(;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mr,n),o.m.obj(e,t),o.m.algo(e,t,1,1),hr(e,t)}var vr={newInstance:o.m.newInstance(gr,"vtkClosedPolyLineToSurfaceFilter"),extend:gr};const{vtkErrorMacro:yr}=o.c;function _r(e,t){t.classHierarchy.push("vtkCutter");const n={...e};function r(e,n){const r=e.getPoints(),i=r.getData(),a=r.getNumberOfPoints(),s=[],l=[],u=[];(!t.cutScalars||t.cutScalars.length0;let r=!0;for(let t=1;t0!==e){r=!1;break}}if(r)continue;const o=[];for(let e=0;e0;if(m[r]>0===a)continue;let s=e,l=r,u=m[l]-m[s];u<=0&&(s=r,l=e,u*=-1);let c=0;0!==u&&(c=(t.cutValue-m[s])/u);const d=n.cell[s],p=n.cell[l];f[0]=i[3*d],f[1]=i[3*d+1],f[2]=i[3*d+2],h[0]=i[3*p],h[1]=i[3*p+1],h[2]=i[3*p+2];const g=[f[0]+c*(h[0]-f[0]),f[1]+c*(h[1]-f[1]),f[2]+c*(h[2]-f[2])];o.push({pointEdge1:d,pointEdge2:p,intersectedPoint:g,newPointID:-1})}for(let e=0;e2&&(u.push(a),o.forEach((e=>{u.push(e.newPointID)})))}n.getPoints().setData((0,o.b)(r.getDataType(),s),3),0!==l.length&&n.getLines().setData(Uint16Array.from(l)),0!==u.length&&n.getPolys().setData(Uint16Array.from(u))}e.getMTime=()=>{let e=n.getMTime();return t.cutFunction?(e=Math.max(e,t.cutFunction.getMTime()),e):e},e.requestData=(e,n)=>{const i=e[0];if(!i)return void yr("Invalid or missing input");if(!t.cutFunction)return void yr("Missing cut function");const o=pt.ZP.newInstance();r(i,o),n[0]=o}}const br={cutFunction:null,cutScalars:null,cutValue:0};function xr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,br,n),(0,o.o)(e,t),(0,o.d)(e,t,1,1),(0,o.e)(e,t,["cutFunction","cutValue"]),_r(e,t)}var wr={newInstance:(0,o.n)(xr,"vtkCutter"),extend:xr},Sr=n(112);const{vtkErrorMacro:Cr}=o.m;function Tr(e,t){t.classHierarchy.push("vtkImageDataOutlineFilter");const n={...e};e.requestData=(e,n)=>{const r=e[0];if(!r||!r.isA("vtkImageData"))return void Cr("Invalid or missing input");const i=r.getSpatialExtent();i?(t._cubeSource.setBounds(i),t._cubeSource.setMatrix(r.getIndexToWorld()),n[0]=t._cubeSource.getOutputData()):Cr("Unable to fetch spatial extents of input image.")},e.getMTime=()=>Math.max(n.getMTime(),t._cubeSource.getMTime()),e.setGenerateFaces=t._cubeSource.setGenerateFaces,e.setGenerateLines=t._cubeSource.setGenerateLines,e.getGenerateFaces=t._cubeSource.getGenerateFaces,e.getGenerateLines=t._cubeSource.getGenerateLines}const Mr={};function Dr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mr,n),o.m.obj(e,t),o.m.algo(e,t,1,1),t._cubeSource=Sr.ZP.newInstance(),o.m.moveToProtected(e,t,["cubeSource","tmpOut"]),Tr(e,t)}var Ar={newInstance:o.m.newInstance(Dr,"vtkImageDataOutlineFilter"),extend:Dr},Pr=n(43);let kr;function Lr(e,t){t.classHierarchy.push("vtkAbstractTransform","vtkHomogeneousTransform","vtkTransform"),e.transformPoint=(e,n)=>(T.fF(n,e,t.matrix),n),e.transformPoints=(e,n)=>{const r=new Float64Array(3),i=new Float64Array(3);for(let o=0;o{e.setPreMultiplyFlag(!0)},e.postMultiply=()=>{e.setPreMultiplyFlag(!1)},e.transformMatrix=(e,n)=>(t.preMultiplyFlag?r.multiply(n,t.matrix,e):r.multiply(n,e,t.matrix),n),e.transformMatrices=(e,n)=>{const i=new Float64Array(16),o=new Float64Array(16),a=t.preMultiplyFlag?()=>r.multiply(o,t.matrix,i):()=>r.multiply(o,i,t.matrix);for(let t=0;tkr({matrix:st.f.invertMatrix(Array.from(t.matrix),[],4),preMultiplyFlag:t.preMultiplyFlag})}const Or={preMultiplyFlag:!1,matrix:[...n(68).Wd]};function Er(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Or,n),o.m.obj(e,t),o.m.setGet(e,t,["preMultiplyFlag"]),o.m.setGetArray(e,t,["matrix"],16),Lr(e,t)}kr=o.m.newInstance(Er,"vtkTransform");var Ir={newInstance:kr,extend:Er},Nr=n(45),Rr=n(47),Br=n(14);const{vtkErrorMacro:Fr}=o.c;function Vr(e,t,n){if(t.apply(e)){const t=e.getIndependentComponents();return`${e.getMTime()}-${t}-${n}`}return"0"}function Ur(e,t,n){return t.identity(n),e.reduce(((e,n,r)=>0===r?n?t.copy(e,n):t.identity(e):n?t.multiply(e,e,n):e),n)}function Gr(e,t){t.classHierarchy.push("vtkOpenGLImageResliceMapper"),e.buildPass=n=>{if(n){t.currentRenderPass=null,t._openGLImageSlice=e.getFirstAncestorOfType("vtkOpenGLImageSlice"),t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer");const n=t._openGLRenderer.getRenderable();t._openGLCamera=t._openGLRenderer.getViewNodeFor(n.getActiveCamera()),t._openGLRenderWindow=t._openGLRenderer.getParent(),t.context=t._openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t._openGLRenderWindow),t.openGLTexture||(t.openGLTexture=Ft.ZP.newInstance()),t.openGLTexture.setOpenGLRenderWindow(t._openGLRenderWindow),t.colorTexture.setOpenGLRenderWindow(t._openGLRenderWindow),t.pwfTexture.setOpenGLRenderWindow(t._openGLRenderWindow)}},e.translucentPass=(n,r)=>{n&&(t.currentRenderPass=r,e.render())},e.zBufferPass=n=>{n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaqueZBufferPass=t=>e.zBufferPass(t),e.opaquePass=t=>{t&&e.render()},e.getCoincidentParameters=(e,n)=>t.renderable.getResolveCoincidentTopology()?t.renderable.getCoincidentTopologyPolygonOffsetParameters():null,e.render=()=>{const n=t._openGLImageSlice.getRenderable(),r=t._openGLRenderer.getRenderable();e.renderPiece(r,n)},e.renderPiece=(n,r)=>{e.invokeEvent({type:"StartEvent"}),t.renderable.update(),t.currentInput=t.renderable.getInputData(),t.currentInput?(e.updateResliceGeometry(),e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r),e.invokeEvent({type:"EndEvent"})):Fr("No input!")},e.renderPieceStart=(n,r)=>{e.updateBufferObjects(n,r);r.getProperty().getInterpolationType()===Rr.Z.NEAREST?(t.openGLTexture.setMinificationFilter(Nr.wn.NEAREST),t.openGLTexture.setMagnificationFilter(Nr.wn.NEAREST),t.colorTexture.setMinificationFilter(Nr.wn.NEAREST),t.colorTexture.setMagnificationFilter(Nr.wn.NEAREST),t.pwfTexture.setMinificationFilter(Nr.wn.NEAREST),t.pwfTexture.setMagnificationFilter(Nr.wn.NEAREST)):(t.openGLTexture.setMinificationFilter(Nr.wn.LINEAR),t.openGLTexture.setMagnificationFilter(Nr.wn.LINEAR),t.colorTexture.setMinificationFilter(Nr.wn.LINEAR),t.colorTexture.setMagnificationFilter(Nr.wn.LINEAR),t.pwfTexture.setMinificationFilter(Nr.wn.LINEAR),t.pwfTexture.setMagnificationFilter(Nr.wn.LINEAR)),t.lastBoundBO=null},e.renderPieceDraw=(n,r)=>{const i=t.context;t.openGLTexture.activate(),t.colorTexture.activate(),t.pwfTexture.activate(),e.updateShaders(t.tris,n,r),i.drawArrays(i.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.openGLTexture.deactivate(),t.colorTexture.deactivate(),t.pwfTexture.deactivate()},e.renderPieceFinish=(e,t)=>{},e.updateBufferObjects=(t,n)=>{e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=(n,r)=>t.VBOBuildTime.getMTime(){const r=t.currentInput;if(!r)return;const i=r.getPointData()?.getScalars();if(!i)return;const o=i.getNumberOfComponents();if(!t._externalOpenGLTexture){const e=`${r.getMTime()}A${i.getMTime()}`;if(t.openGLTextureString!==e){const n=r.getDimensions();t.openGLTexture.getOglNorm16Ext(t.context.getExtension("EXT_texture_norm16")),t.openGLTexture.releaseGraphicsResources(t._openGLRenderWindow),t.openGLTexture.resetFormatAndType(),t.openGLTexture.create3DFilterableFromDataArray(n[0],n[1],n[2],i),t.openGLTextureString=e}}const a=n.getProperty(),s=a.getIndependentComponents(),l=s?o:1,u=s?2*l:1,c=Vr(a,a.getRGBTransferFunction,l);if(t.colorTextureString!==c){const e=1024,n=new Uint8Array(e*u*3);let r=a.getRGBTransferFunction();if(r){const i=new Float32Array(3*e);for(let t=0;t0){const e=t.resliceGeom.getPointData().getNormals();e?r.normals=e:Fr("Slab mode requested without normals")}t.tris.getCABO().createVBO(n,"polys",$n.hX.SURFACE,r)}t.VBOBuildString=p,t.VBOBuildTime.modified()},e.updateShaders=(n,r,i)=>{if(t.lastBoundBO=n,e.getNeedToRebuildShaders(n,r,i)){const o={Vertex:null,Fragment:null,Geometry:null};e.buildShaders(o,r,i);const a=t._openGLRenderWindow.getShaderCache().readyShaderProgramArray(o.Vertex,o.Fragment,o.Geometry);a!==n.getProgram()&&(n.setProgram(a),n.getVAO().releaseGraphicsResources()),n.getShaderSourceTime().modified()}else t._openGLRenderWindow.getShaderCache().readyShaderProgram(n.getProgram());n.getVAO().bind(),e.setMapperShaderParameters(n,r,i),e.setCameraShaderParameters(n,r,i),e.setPropertyShaderParameters(n,r,i)},e.setMapperShaderParameters=(n,i,o)=>{const a=n.getProgram();if(n.getCABO().getElementCount()&&(t.VBOBuildTime.getMTime()>n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())){a.isUniformUsed("texture1")&&a.setUniformi("texture1",t.openGLTexture.getTextureUnit()),a.isAttributeUsed("vertexWC")&&(n.getVAO().addAttributeArray(a,n.getCABO(),"vertexWC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Fr("Error setting vertexWC in shader VAO.")),a.isAttributeUsed("normalWC")&&(n.getVAO().addAttributeArray(a,n.getCABO(),"normalWC",n.getCABO().getNormalOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Fr("Error setting normalWC in shader VAO.")),a.isUniformUsed("slabThickness")&&a.setUniformf("slabThickness",t.renderable.getSlabThickness()),a.isUniformUsed("spacing")&&a.setUniform3fv("spacing",t.currentInput.getSpacing()),a.isUniformUsed("slabType")&&a.setUniformi("slabType",t.renderable.getSlabType()),a.isUniformUsed("slabType")&&a.setUniformi("slabType",t.renderable.getSlabType()),a.isUniformUsed("slabTrapezoid")&&a.setUniformi("slabTrapezoid",t.renderable.getSlabTrapezoidIntegration());const e=n.getCABO().getCoordShiftAndScaleEnabled()?n.getCABO().getInverseShiftAndScaleMatrix():null;if(a.isUniformUsed("WCTCMatrix")){const n=t.currentInput,i=n.getDimensions();r.copy(t.tmpMat4,n.getIndexToWorld()),r.scale(t.tmpMat4,t.tmpMat4,i),r.invert(t.tmpMat4,t.tmpMat4),e&&r.multiply(t.tmpMat4,t.tmpMat4,e),a.setUniformMatrix("WCTCMatrix",t.tmpMat4)}a.isUniformUsed("vboScaling")&&a.setUniform3fv("vboScaling",n.getCABO().getCoordScale()),n.getAttributeUpdateTime().modified()}if(t.haveSeenDepthRequest&&n.getProgram().setUniformi("depthRequest",t.renderDepth?1:0),n.getProgram().isUniformUsed("coffset")){const t=e.getCoincidentParameters(i,o);n.getProgram().setUniformf("coffset",t.offset),n.getProgram().isUniformUsed("cfactor")&&n.getProgram().setUniformf("cfactor",t.factor)}},e.setCameraShaderParameters=(e,n,i)=>{const o=t._openGLCamera.getKeyMatrices(n),a=t._openGLImageSlice.getKeyMatrices(),s=e.getCABO().getCoordShiftAndScaleEnabled()?e.getCABO().getInverseShiftAndScaleMatrix():null,l=e.getProgram();l.isUniformUsed("MCPCMatrix")&&(r.identity(t.tmpMat4),l.setUniformMatrix("MCPCMatrix",Ur([o.wcpc,a.mcwc,s],r,t.tmpMat4))),l.isUniformUsed("MCVCMatrix")&&(r.identity(t.tmpMat4),l.setUniformMatrix("MCVCMatrix",Ur([o.wcvc,a.mcwc,s],r,t.tmpMat4)))},e.setPropertyShaderParameters=(e,n,r)=>{const i=e.getProgram(),o=r.getProperty(),a=o.getOpacity();i.setUniformf("opacity",a);const s=t.openGLTexture.getComponents(),l=o.getIndependentComponents();if(l)for(let e=0;e{const i=t.openGLTexture.getComponents(),o=r.getProperty().getIndependentComponents(),a=t.renderable.getSlabThickness(),s=t.renderable.getSlabType(),l=t.renderable.getSlabTrapezoidIntegration();let u=!1;return(!t.currentRenderPass&&t.lastRenderPassShaderReplacement||t.currentRenderPass&&t.currentRenderPass.getShaderReplacement()!==t.lastRenderPassShaderReplacement)&&(u=!0),!(!u&&t.lastHaveSeenDepthRequest===t.haveSeenDepthRequest&&0!==e.getProgram()&&t.lastTextureComponents===i&&t.lastIndependentComponents===o&&t.lastSlabThickness===a&&t.lastSlabType===s&&t.lastSlabTrapezoidIntegration===l)&&(t.lastHaveSeenDepthRequest=t.haveSeenDepthRequest,t.lastTextureComponents=i,t.lastIndependentComponents=o,t.lastSlabThickness=a,t.lastSlabType=s,t.lastSlabTrapezoidIntegration=l,!0)},e.getShaderTemplate=(e,t,n)=>{e.Vertex="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkImageResliceMapperVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\n// all variables that represent positions or directions have a suffix\n// indicating the coordinate system they are in. The possible values are\n// MC - Model coordinates\n// WC - World coordinates\n// VC - View coordinates\n// DC - Display coordinates\n// TC - Texture coordinates\n\n// frag position in VC\n//VTK::PositionVC::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\nvoid main()\n{\n //VTK::PositionVC::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Picking::Impl\n}\n",e.Fragment="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkImageResliceMapperFS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// Template for the gpu image mapper fragment shader\n\n// VC position of this fragment\n//VTK::PositionVC::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// handle coincident offsets\n//VTK::Coincident::Dec\n\n//VTK::ZBuffer::Dec\n\n// the output of this shader\n//VTK::Output::Dec\n\nvoid main()\n{\n // VC position of this fragment. This should not branch/return/discard.\n //VTK::PositionVC::Impl\n\n // Place any calls that require uniform flow (e.g. dFdx) here.\n //VTK::UniformFlow::Impl\n\n // Set gl_FragDepth here (gl_FragCoord.z by default)\n //VTK::Depth::Impl\n\n // Early depth peeling abort:\n //VTK::DepthPeeling::PreColor\n\n //VTK::TCoord::Impl\n\n if (gl_FragData[0].a <= 0.0)\n {\n discard;\n }\n\n //VTK::DepthPeeling::Impl\n\n //VTK::Picking::Impl\n\n // handle coincident offsets\n //VTK::Coincident::Impl\n\n //VTK::ZBuffer::Impl\n\n //VTK::RenderPassFragmentShader::Impl\n}\n",e.Geometry=""},e.replaceShaderValues=(n,r,i)=>{if(e.replaceShaderTCoord(n,r,i),e.replaceShaderPositionVC(n,r,i),t.haveSeenDepthRequest){let e=n.Fragment;e=Gt.Z.substitute(e,"//VTK::ZBuffer::Dec","uniform int depthRequest;").result,e=Gt.Z.substitute(e,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float iz = floor(gl_FragCoord.z*65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result,n.Fragment=e}e.replaceShaderCoincidentOffset(n,r,i)},e.replaceShaderTCoord=(e,n,r)=>{let i=e.Vertex;const o=e.Geometry;let a=e.Fragment;const s=t.renderable.getSlabThickness();i=Gt.Z.substitute(i,"//VTK::TCoord::Dec",["uniform mat4 WCTCMatrix;","out vec3 fragTexCoord;"]).result;i=Gt.Z.substitute(i,"//VTK::TCoord::Impl",["fragTexCoord = (WCTCMatrix * vertexWC).xyz;"]).result;const l=t.openGLTexture.getComponents(),u=r.getProperty().getIndependentComponents();let c=["in vec3 fragTexCoord;","uniform highp sampler3D texture1;","uniform mat4 WCTCMatrix;","uniform float cshift0;","uniform float cscale0;","uniform float pwfshift0;","uniform float pwfscale0;","uniform sampler2D colorTexture1;","uniform sampler2D pwfTexture1;","uniform float opacity;","uniform vec4 backgroundColor;"];if(u){for(let e=1;e0&&(c=c.concat(["uniform vec3 spacing;","uniform float slabThickness;","uniform int slabType;","uniform int slabTrapezoid;","uniform vec3 vboScaling;"]),c=c.concat(["vec4 compositeValue(vec4 currVal, vec4 valToComp, int trapezoid)","{"," vec4 retVal = vec4(1.0);"," if (slabType == 0) // min"," {"," retVal = min(currVal, valToComp);"," }"," else if (slabType == 1) // max"," {"," retVal = max(currVal, valToComp);"," }"," else if (slabType == 3) // sum"," {"," retVal = currVal + (trapezoid > 0 ? 0.5 * valToComp : valToComp); "," }"," else // mean"," {"," retVal = currVal + (trapezoid > 0 ? 0.5 * valToComp : valToComp); "," }"," return retVal;","}"])),a=Gt.Z.substitute(a,"//VTK::TCoord::Dec",c).result;let d=["if (any(greaterThan(fragTexCoord, vec3(1.0))) || any(lessThan(fragTexCoord, vec3(0.0))))","{"," // set the background color and exit"," gl_FragData[0] = backgroundColor;"," return;","}","vec4 tvalue = texture(texture1, fragTexCoord);"];if(s>0&&(d=d.concat(["// Get the first and last samples","int numSlices = 1;","float scaling = min(min(spacing.x, spacing.y), spacing.z) * 0.5;","vec3 normalxspacing = scaling * normalWCVSOutput;","float distTraveled = length(normalxspacing);","int trapezoid = 0;","while (distTraveled < slabThickness * 0.5)","{"," distTraveled += length(normalxspacing);"," float fnumSlices = float(numSlices);"," if (distTraveled > slabThickness * 0.5)"," {"," // Before stepping outside the slab, sample at the boundaries"," normalxspacing = normalWCVSOutput * slabThickness * 0.5 / fnumSlices;"," trapezoid = slabTrapezoid;"," }"," vec3 fragTCoordNeg = (WCTCMatrix * vec4(vertexWCVSOutput.xyz - fnumSlices * normalxspacing * vboScaling, 1.0)).xyz;"," if (!any(greaterThan(fragTCoordNeg, vec3(1.0))) && !any(lessThan(fragTCoordNeg, vec3(0.0))))"," {"," vec4 newVal = texture(texture1, fragTCoordNeg);"," tvalue = compositeValue(tvalue, newVal, trapezoid);"," numSlices += 1;"," }"," vec3 fragTCoordPos = (WCTCMatrix * vec4(vertexWCVSOutput.xyz + fnumSlices * normalxspacing * vboScaling, 1.0)).xyz;"," if (!any(greaterThan(fragTCoordNeg, vec3(1.0))) && !any(lessThan(fragTCoordNeg, vec3(0.0))))"," {"," vec4 newVal = texture(texture1, fragTCoordPos);"," tvalue = compositeValue(tvalue, newVal, trapezoid);"," numSlices += 1;"," }","}","// Finally, if slab type is *mean*, divide the sum by the numSlices","if (slabType == 2)","{"," tvalue = tvalue / float(numSlices);","}"])),u){const e=["r","g","b","a"];for(let t=0;t{let o=n.Vertex;const a=n.Geometry;let s=n.Fragment;const l=t.renderable.getSlabThickness();let u=["attribute vec4 vertexWC;"];u=u.concat([`//${e.getMTime()}${t.resliceGeomUpdateString}`]),l>0&&(u=u.concat(["attribute vec3 normalWC;","varying vec3 normalWCVSOutput;","varying vec4 vertexWCVSOutput;"])),o=Gt.Z.substitute(o,"//VTK::PositionVC::Dec",u).result;let c=["gl_Position = MCPCMatrix * vertexWC;"];l>0&&(c=c.concat(["normalWCVSOutput = normalWC;","vertexWCVSOutput = vertexWC;"])),o=Gt.Z.substitute(o,"//VTK::PositionVC::Impl",c).result,o=Gt.Z.substitute(o,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result;let d=[];l>0&&(d=d.concat(["varying vec3 normalWCVSOutput;","varying vec4 vertexWCVSOutput;"])),s=Gt.Z.substitute(s,"//VTK::PositionVC::Dec",d).result,n.Vertex=o,n.Geometry=a,n.Fragment=s},e.updateResliceGeometry=()=>{let e="";const n=t.currentInput,r=n?.getBounds();let o=!0,a=2;const s=t.renderable.getSlicePolyData(),l=t.renderable.getSlicePlane();if(s)e=e.concat(`PolyData${s.getMTime()}`);else if(l){e=e.concat(`Plane${l.getMTime()}`),n&&(e=e.concat(`Image${n.getMTime()}`));const t=i.fromValues(n?.getDirection());i.invert(t,t);const r=[...l.getNormal()];T.kK(r,r,t),[o,a]=function(e){st.f.normalize(e);const t=[0,0,0];for(let n=0;n<3;++n){T.bM(t),t[n]=1;const r=st.f.dot(e,t);if(r<-.999||r>.999)return[!0,n]}return[!1,2]}(r)}else{const i=Pr.ZP.newInstance();i.setNormal(0,0,1);let o=[0,1,0,1,0,1];n&&(o=r),i.setOrigin(o[0],o[2],.5*(o[5]+o[4])),t.renderable.setSlicePlane(i),e=e.concat(`Plane${l?.getMTime()}`),n&&(e=e.concat(`Image${n.getMTime()}`))}if(!t.resliceGeom||t.resliceGeomUpdateString!==e){if(s)t.resliceGeom||(t.resliceGeom=pt.ZP.newInstance()),t.resliceGeom.getPoints().setData(s.getPoints().getData(),3),t.resliceGeom.getPolys().setData(s.getPolys().getData(),1),t.resliceGeom.getPointData().setNormals(s.getPointData().getNormals());else if(l)if(o){const e=new Float32Array(12),r=n.worldToIndex(l.getOrigin(),[0,0,0]),i=[(a+1)%3,(a+2)%3].sort(),o=n.getDimensions(),s=[0,o[0]-1,0,o[1]-1,0,o[2]-1];let u=0;for(let t=0;t<2;++t)for(let n=0;n<2;++n)e[u+a]=r[a],e[u+i[0]]=s[2*i[0]+n],e[u+i[1]]=s[2*i[1]+t],u+=3;t.transform.setMatrix(n.getIndexToWorld()),t.transform.transformPoints(e,e);const c=new Uint16Array(8);c[0]=3,c[1]=0,c[2]=1,c[3]=3,c[4]=3,c[5]=0,c[6]=3,c[7]=2;const d=l.getNormal();st.f.normalize(d);const p=new Float32Array(12);for(let e=0;e<4;++e)p[3*e]=d[0],p[3*e+1]=d[1],p[3*e+2]=d[2];t.resliceGeom||(t.resliceGeom=pt.ZP.newInstance()),t.resliceGeom.getPoints().setData(e,3),t.resliceGeom.getPolys().setData(c,1);const f=ct.ZP.newInstance({numberOfComponents:3,values:p,name:"Normals"});t.resliceGeom.getPointData().setNormals(f)}else{t.outlineFilter.setInputData(n),t.cutter.setInputConnection(t.outlineFilter.getOutputPort()),t.cutter.setCutFunction(l),t.lineToSurfaceFilter.setInputConnection(t.cutter.getOutputPort()),t.lineToSurfaceFilter.update(),t.resliceGeom||(t.resliceGeom=pt.ZP.newInstance());const e=t.lineToSurfaceFilter.getOutputData();t.resliceGeom.getPoints().setData(e.getPoints().getData(),3),t.resliceGeom.getPolys().setData(e.getPolys().getData(),1),t.resliceGeom.getPointData().setNormals(e.getPointData().getNormals());const r=l.getNormal(),i=t.resliceGeom.getNumberOfPoints();st.f.normalize(r);const o=new Float32Array(3*i);for(let e=0;e{e&&(t.openGLTexture=e,t._externalOpenGLTexture=!0)}}const zr={VBOBuildTime:{},VBOBuildString:null,haveSeenDepthRequest:!1,lastHaveSeenDepthRequest:!1,lastIndependentComponents:!1,lastTextureComponents:0,lastSlabThickness:0,lastSlabTrapezoidIntegration:0,lastSlabType:-1,openGLTexture:null,openGLTextureString:null,colorTextureString:null,pwfTextureString:null,resliceGeom:null,resliceGeomUpdateString:null,tris:null,colorTexture:null,pwfTexture:null,_externalOpenGLTexture:!1};function jr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zr,n),a.Z.extend(e,t,n),Yt.implementReplaceShaderCoincidentOffset(e,t,n),Yt.implementBuildShadersWithReplacements(e,t,n),t.tris=Bt.ZP.newInstance(),t.openGLTexture=Ft.ZP.newInstance(),t.colorTexture=Ft.ZP.newInstance(),t.pwfTexture=Ft.ZP.newInstance(),t.VBOBuildTime={},(0,o.o)(t.VBOBuildTime),t.tmpMat4=r.identity(new Float64Array(16)),t.outlineFilter=Ar.newInstance(),t.outlineFilter.setGenerateFaces(!0),t.outlineFilter.setGenerateLines(!1),t.cubePolyData=pt.ZP.newInstance(),t.cutter=wr.newInstance(),t.lineToSurfaceFilter=vr.newInstance(),t.transform=Ir.newInstance(),(0,o.g)(e,t,["openGLTexture"]),Gr(e,t)}const Yr=(0,o.n)(jr,"vtkOpenGLImageResliceMapper");(0,s.vw)("vtkImageResliceMapper",Yr);var Hr=n(72);const{vtkErrorMacro:Wr}=o.c,{SlicingMode:$r}=Hr.Z;function Zr(e,t,n){if(t.apply(e)){const t=e.getIndependentComponents();return`${e.getMTime()}-${t}-${n}`}return"0"}function Kr(e,t){t.classHierarchy.push("vtkOpenGLImageMapper"),e.buildPass=n=>{if(n){t.currentRenderPass=null,t.openGLImageSlice=e.getFirstAncestorOfType("vtkOpenGLImageSlice"),t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t._openGLRenderWindow=t._openGLRenderer.getParent(),t.context=t._openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t._openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t._openGLRenderWindow),t.colorTexture.setOpenGLRenderWindow(t._openGLRenderWindow),t.pwfTexture.setOpenGLRenderWindow(t._openGLRenderWindow);const n=t._openGLRenderer.getRenderable();t.openGLCamera=t._openGLRenderer.getViewNodeFor(n.getActiveCamera()),t.renderable.isA("vtkImageMapper")&&t.renderable.getSliceAtFocalPoint()&&t.renderable.setSliceFromCamera(n.getActiveCamera())}},e.translucentPass=(n,r)=>{n&&(t.currentRenderPass=r,e.render())},e.zBufferPass=n=>{n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaqueZBufferPass=t=>e.zBufferPass(t),e.opaquePass=t=>{t&&e.render()},e.getCoincidentParameters=(e,n)=>t.renderable.getResolveCoincidentTopology()?t.renderable.getCoincidentTopologyPolygonOffsetParameters():null,e.render=()=>{const n=t.openGLImageSlice.getRenderable(),r=t._openGLRenderer.getRenderable();e.renderPiece(r,n)},e.getShaderTemplate=(e,t,n)=>{e.Vertex=zt,e.Fragment=jt,e.Geometry=""},e.replaceShaderValues=(n,r,i)=>{let o=n.Vertex,a=n.Fragment;o=Gt.Z.substitute(o,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,o=Gt.Z.substitute(o,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result,o=Gt.Z.substitute(o,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result,o=Gt.Z.substitute(o,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result;const s=t.openGLTexture.getComponents(),l=i.getProperty().getIndependentComponents();let u=["varying vec2 tcoordVCVSOutput;","uniform float cshift0;","uniform float cscale0;","uniform float pwfshift0;","uniform float pwfscale0;","uniform sampler2D texture1;","uniform sampler2D colorTexture1;","uniform sampler2D pwfTexture1;","uniform float opacity;"];if(l){for(let e=1;e{let i=e.Vertex,a=e.Fragment;if(t.renderable.getNumberOfClippingPlanes()){let e=t.renderable.getNumberOfClippingPlanes();e>6&&((0,o.r)("OpenGL has a limit of 6 clipping planes"),e=6),i=Gt.Z.substitute(i,"//VTK::Clip::Dec",["uniform int numClipPlanes;","uniform vec4 clipPlanes[6];","varying float clipDistancesVSOutput[6];"]).result,i=Gt.Z.substitute(i,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,a=Gt.Z.substitute(a,"//VTK::Clip::Dec",["uniform int numClipPlanes;","varying float clipDistancesVSOutput[6];"]).result,a=Gt.Z.substitute(a,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," if (clipDistancesVSOutput[planeNum] < 0.0) discard;"," }"]).result}e.Vertex=i,e.Fragment=a},e.getNeedToRebuildShaders=(e,n,r)=>{const i=t.openGLTexture.getComponents(),o=r.getProperty().getIndependentComponents();let a=!1;return(!t.currentRenderPass&&t.lastRenderPassShaderReplacement||t.currentRenderPass&&t.currentRenderPass.getShaderReplacement()!==t.lastRenderPassShaderReplacement)&&(a=!0),!(!a&&t.lastHaveSeenDepthRequest===t.haveSeenDepthRequest&&0!==e.getProgram()&&t.lastTextureComponents===i&&t.lastIndependentComponents===o)&&(t.lastHaveSeenDepthRequest=t.haveSeenDepthRequest,t.lastTextureComponents=i,t.lastIndependentComponents=o,!0)},e.updateShaders=(n,r,i)=>{if(t.lastBoundBO=n,e.getNeedToRebuildShaders(n,r,i)){const o={Vertex:null,Fragment:null,Geometry:null};e.buildShaders(o,r,i);const a=t._openGLRenderWindow.getShaderCache().readyShaderProgramArray(o.Vertex,o.Fragment,o.Geometry);a!==n.getProgram()&&(n.setProgram(a),n.getVAO().releaseGraphicsResources()),n.getShaderSourceTime().modified()}else t._openGLRenderWindow.getShaderCache().readyShaderProgram(n.getProgram());n.getVAO().bind(),e.setMapperShaderParameters(n,r,i),e.setCameraShaderParameters(n,r,i),e.setPropertyShaderParameters(n,r,i)},e.setMapperShaderParameters=(n,i,a)=>{n.getCABO().getElementCount()&&(t.VBOBuildTime>n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Wr("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),t.context.FALSE)||Wr("Error setting tcoordMC in shader VAO.")),n.getAttributeUpdateTime().modified());const s=t.openGLTexture.getTextureUnit();n.getProgram().setUniformi("texture1",s);const l=t.openGLTexture.getComponents(),u=a.getProperty().getIndependentComponents();if(u)for(let e=0;e6&&((0,o.r)("OpenGL has a limit of 6 clipping planes"),e=6);const i=n.getCABO().getCoordShiftAndScaleEnabled()?n.getCABO().getInverseShiftAndScaleMatrix():null,s=i?r.copy(t.imagematinv,a.getMatrix()):a.getMatrix();i&&(r.transpose(s,s),r.multiply(s,s,i),r.transpose(s,s)),r.transpose(t.imagemat,t.currentInput.getIndexToWorld()),r.multiply(t.imagematinv,s,t.imagemat);const l=[];for(let n=0;n{const o=e.getProgram(),a=t.openGLImageSlice.getKeyMatrices(),s=t.currentInput.getIndexToWorld();r.multiply(t.imagemat,a.mcwc,s);const l=t.openGLCamera.getKeyMatrices(n);if(r.multiply(t.imagemat,l.wcpc,t.imagemat),e.getCABO().getCoordShiftAndScaleEnabled()){const n=e.getCABO().getInverseShiftAndScaleMatrix();r.multiply(t.imagemat,t.imagemat,n)}o.setUniformMatrix("MCPCMatrix",t.imagemat)},e.setPropertyShaderParameters=(e,t,n)=>{const r=e.getProgram(),i=n.getProperty().getOpacity();r.setUniformf("opacity",i)},e.renderPieceStart=(n,r)=>{e.updateBufferObjects(n,r),t.lastBoundBO=null},e.renderPieceDraw=(n,r)=>{const i=t.context;t.openGLTexture.activate(),t.colorTexture.activate(),t.pwfTexture.activate(),t.tris.getCABO().getElementCount()&&(e.updateShaders(t.tris,n,r),i.drawArrays(i.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release()),t.openGLTexture.deactivate(),t.colorTexture.deactivate(),t.pwfTexture.deactivate()},e.renderPieceFinish=(e,t)=>{},e.renderPiece=(n,r)=>{e.invokeEvent({type:"StartEvent"}),t.renderable.update(),t.currentInput=t.renderable.getCurrentImage(),e.invokeEvent({type:"EndEvent"}),t.currentInput?(e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r)):Wr("No input!")},e.computeBounds=(n,r)=>{e.getInput()?t.bounds=e.getInput().getBounds():(0,st.u)(t.bounds)},e.updateBufferObjects=(t,n)=>{e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=(n,r)=>t.VBOBuildTime.getMTime(){const i=t.currentInput;if(!i)return;const o=i.getPointData()&&i.getPointData().getScalars();if(!o)return;const a=o.getDataType(),s=o.getNumberOfComponents(),l=r.getProperty(),u=l.getInterpolationType();u===Rr.Z.NEAREST?(t.colorTexture.setMinificationFilter(Nr.wn.NEAREST),t.colorTexture.setMagnificationFilter(Nr.wn.NEAREST),t.pwfTexture.setMinificationFilter(Nr.wn.NEAREST),t.pwfTexture.setMagnificationFilter(Nr.wn.NEAREST)):(t.colorTexture.setMinificationFilter(Nr.wn.LINEAR),t.colorTexture.setMagnificationFilter(Nr.wn.LINEAR),t.pwfTexture.setMinificationFilter(Nr.wn.LINEAR),t.pwfTexture.setMagnificationFilter(Nr.wn.LINEAR));const c=l.getIndependentComponents(),d=c?s:1,p=c?2*d:1,f=Zr(l,l.getRGBTransferFunction,d);if(t.colorTextureString!==f){const e=1024,n=new Uint8Array(e*p*3);let r=l.getRGBTransferFunction();if(r){const i=new Float32Array(3*e);for(let t=0;t1?1:0;const d=[$r.X,$r.Y,$r.Z].includes(t.renderable.getSlicingMode())?g:v,p=i.getSpatialExtent(),f=o.getData();let h=null;if(m===$r.I){h=new f.constructor(e[2]*e[1]*s);let t=0;for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qr,n),a.Z.extend(e,t,n),Yt.implementReplaceShaderCoincidentOffset(e,t,n),Yt.implementBuildShadersWithReplacements(e,t,n),t.tris=Bt.ZP.newInstance(),t.openGLTexture=Ft.ZP.newInstance({resizable:!0}),t.colorTexture=Ft.ZP.newInstance({resizable:!0}),t.pwfTexture=Ft.ZP.newInstance({resizable:!0}),t.imagemat=r.identity(new Float64Array(16)),t.imagematinv=r.identity(new Float64Array(16)),(0,o.e)(e,t,[]),t.VBOBuildTime={},(0,o.o)(t.VBOBuildTime),Kr(e,t)}const Jr=(0,o.n)(Xr,"vtkOpenGLImageMapper");(0,s.vw)("vtkAbstractImageMapper",Jr);const{vtkErrorMacro:Qr}=o.m;function ei(e,t,n){if(t.apply(e)){const t=e.getIndependentComponents();return`${e.getMTime()}-${t}-${n}`}return"0"}function ti(e,t){t.classHierarchy.push("vtkOpenGLImageCPRMapper"),e.buildPass=n=>{n&&(t.currentRenderPass=null,t.openGLImageSlice=e.getFirstAncestorOfType("vtkOpenGLImageSlice"),t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t._openGLRenderWindow=t._openGLRenderer.getParent(),t.context=t._openGLRenderWindow.getContext(),t.openGLCamera=t._openGLRenderer.getViewNodeFor(t._openGLRenderer.getRenderable().getActiveCamera()),t.tris.setOpenGLRenderWindow(t._openGLRenderWindow),t.volumeTexture.setOpenGLRenderWindow(t._openGLRenderWindow),t.colorTexture.setOpenGLRenderWindow(t._openGLRenderWindow),t.pwfTexture.setOpenGLRenderWindow(t._openGLRenderWindow))},e.opaquePass=(n,r)=>{n&&(t.currentRenderPass=r,e.render())},e.opaqueZBufferPass=n=>{n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.getCoincidentParameters=(e,n)=>t.renderable.getResolveCoincidentTopology()?t.renderable.getCoincidentTopologyPolygonOffsetParameters():null,e.render=()=>{const n=t.openGLImageSlice.getRenderable(),r=t._openGLRenderer.getRenderable();e.renderPiece(r,n)},e.renderPiece=(n,r)=>{e.invokeEvent({type:"StartEvent"}),t.renderable.update(),e.invokeEvent({type:"EndEvent"}),t.renderable.preRenderCheck()&&(t.currentImageDataInput=t.renderable.getInputData(0),t.currentCenterlineInput=t.renderable.getOrientedCenterline(),e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r))},e.renderPieceStart=(t,n)=>{e.updateBufferObjects(t,n)},e.renderPieceDraw=(n,r)=>{const i=t.context;t.volumeTexture.activate(),t.colorTexture.activate(),t.pwfTexture.activate(),t.tris.getCABO().getElementCount()&&(e.updateShaders(t.tris,n,r),i.drawArrays(i.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release()),t.volumeTexture.deactivate(),t.colorTexture.deactivate(),t.pwfTexture.deactivate()},e.renderPieceFinish=(e,t)=>{},e.updateBufferObjects=(t,n)=>{e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=(n,r)=>{const i=t.VBOBuildTime.getMTime();return i{const r=t.currentImageDataInput,i=t.currentCenterlineInput;n.getProperty().getInterpolationType()===Rr.Z.NEAREST?(t.volumeTexture.setMinificationFilter(Nr.wn.NEAREST),t.volumeTexture.setMagnificationFilter(Nr.wn.NEAREST),t.colorTexture.setMinificationFilter(Nr.wn.NEAREST),t.colorTexture.setMagnificationFilter(Nr.wn.NEAREST),t.pwfTexture.setMinificationFilter(Nr.wn.NEAREST),t.pwfTexture.setMagnificationFilter(Nr.wn.NEAREST)):(t.volumeTexture.setMinificationFilter(Nr.wn.LINEAR),t.volumeTexture.setMagnificationFilter(Nr.wn.LINEAR),t.colorTexture.setMinificationFilter(Nr.wn.LINEAR),t.colorTexture.setMagnificationFilter(Nr.wn.LINEAR),t.pwfTexture.setMinificationFilter(Nr.wn.LINEAR),t.pwfTexture.setMagnificationFilter(Nr.wn.LINEAR));const o=r.getMTime();if(t.volumeTextureTime!==o){const e=r.getDimensions(),n=r.getPointData().getScalars();if(!n)return;t.volumeTexture.setOglNorm16Ext(t.context.getExtension("EXT_texture_norm16")),t.volumeTexture.releaseGraphicsResources(t._openGLRenderWindow),t.volumeTexture.resetFormatAndType(),t.volumeTexture.create3DFilterableFromRaw(e[0],e[1],e[2],n.getNumberOfComponents(),n.getDataType(),n.getData(),t.renderable.getPreferSizeOverAccuracy()),t.volumeTextureTime=o}const a=r.getPointData()&&r.getPointData().getScalars();if(!a)return;const s=a.getNumberOfComponents(),l=n.getProperty(),u=l.getIndependentComponents(),c=u?s:1,d=u?2*c:1,p=ei(l,l.getRGBTransferFunction,c);if(t.colorTextureString!==p){const e=1024,n=new Uint8Array(e*d*3);let r=l.getRGBTransferFunction();if(r){const i=new Float32Array(3*e);for(let t=0;t{const i=t.volumeTexture.getComponents(),o=r.getProperty().getIndependentComponents(),a=!!t.renderable.getCenterPoint(),s=t.renderable.getUseUniformOrientation();return(0===e.getProgram()||t.lastUseCenterPoint!==a||t.lastUseUniformOrientation!==s||t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||t.lastTextureComponents!==i||t.lastIndependentComponents!==o)&&(t.lastUseCenterPoint=a,t.lastUseUniformOrientation=s,t.lastHaveSeenDepthRequest=t.haveSeenDepthRequest,t.lastTextureComponents=i,t.lastIndependentComponents=o,!0)},e.buildShaders=(t,n,r)=>{e.getShaderTemplate(t,n,r),e.replaceShaderValues(t,n,r)},e.replaceShaderValues=(n,r,i)=>{let o=n.Vertex,a=n.Fragment;o=Gt.Z.substitute(o,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,o=Gt.Z.substitute(o,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result;const s=["attribute vec3 centerlinePosition;","attribute float quadIndex;","uniform float width;","out vec2 quadOffsetVSOutput;","out vec3 centerlinePosVSOutput;"],l=t.renderable.getUseUniformOrientation();l?s.push("out vec3 centerlineDirVSOutput;","uniform vec3 centerlineDirection;"):s.push("out vec3 centerlineTopDirVSOutput;","out vec3 centerlineBotDirVSOutput;","out float centerlineAngleVSOutput;","attribute vec3 centerlineTopDirection;","attribute vec3 centerlineBotDirection;"),o=Gt.Z.substitute(o,"//VTK::Color::Dec",s).result;const u=["quadOffsetVSOutput = vec2(width * (mod(quadIndex, 2.0) == 0.0 ? -0.5 : 0.5), quadIndex > 1.0 ? 0.0 : 1.0);","centerlinePosVSOutput = centerlinePosition;"];l?u.push("centerlineDirVSOutput = centerlineDirection;"):u.push("vec3 sumVec = centerlineTopDirection + centerlineBotDirection;","float sumLen2 = dot(sumVec, sumVec);","float diffLen2 = 4.0 - sumLen2;","if (diffLen2 < 0.001) {"," // vectors are too close to each other, use lerp"," centerlineAngleVSOutput = -1.0; // use negative angle as a flag for lerp"," centerlineTopDirVSOutput = centerlineTopDirection;"," centerlineBotDirVSOutput = centerlineBotDirection;","} else if (sumLen2 == 0.0) {"," // vector are opposite to each other, don't make a choice for the user"," // use slerp without direction, it will display the centerline color on each row of pixel"," centerlineAngleVSOutput = 0.0;"," centerlineTopDirVSOutput = vec3(0.0);"," centerlineBotDirVSOutput = vec3(0.0);","} else {"," // use slerp"," centerlineAngleVSOutput = 2.0 * atan(sqrt(diffLen2/sumLen2));"," float sinAngle = sin(centerlineAngleVSOutput);"," centerlineTopDirVSOutput = centerlineTopDirection / sinAngle;"," centerlineBotDirVSOutput = centerlineBotDirection / sinAngle;","}"),o=Gt.Z.substitute(o,"//VTK::Color::Impl",u).result;const c=t.volumeTexture.getComponents(),d=i.getProperty().getIndependentComponents();let p=["uniform mat4 MCTCMatrix; // Model coordinates to texture coordinates","in vec2 quadOffsetVSOutput;","in vec3 centerlinePosVSOutput;","uniform highp sampler3D volumeTexture;","uniform sampler2D colorTexture1;","uniform sampler2D pwfTexture1;","uniform float opacity;","uniform vec4 backgroundColor;","uniform float cshift0;","uniform float cscale0;","uniform float pwfshift0;","uniform float pwfscale0;"];l?p.push("in vec3 centerlineDirVSOutput;"):p.push("in vec3 centerlineTopDirVSOutput;","in vec3 centerlineBotDirVSOutput;","in float centerlineAngleVSOutput;");const f=t.renderable.getCenterPoint();if(f&&p.push("uniform vec3 globalCenterPoint;"),d){for(let e=1;e{let i=e.Vertex,a=e.Fragment;if(t.renderable.getNumberOfClippingPlanes()){let e=t.renderable.getNumberOfClippingPlanes();e>6&&(o.m.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),e=6),i=Gt.Z.substitute(i,"//VTK::Clip::Dec",["uniform int numClipPlanes;","uniform vec4 clipPlanes[6];","varying float clipDistancesVSOutput[6];"]).result,i=Gt.Z.substitute(i,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,a=Gt.Z.substitute(a,"//VTK::Clip::Dec",["uniform int numClipPlanes;","varying float clipDistancesVSOutput[6];"]).result,a=Gt.Z.substitute(a,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," if (clipDistancesVSOutput[planeNum] < 0.0) discard;"," }"]).result}e.Vertex=i,e.Fragment=a},e.getShaderTemplate=(e,t,n)=>{e.Vertex=zt,e.Fragment=jt,e.Geometry=""},e.setMapperShaderParameters=(n,i,a)=>{n.getCABO().getElementCount()&&(t.VBOBuildTime.getMTime()>n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Qr("Error setting vertexMC in shader VAO.")),n.getCABO().getCustomData().forEach((e=>{e&&n.getProgram().isAttributeUsed(e.name)&&!n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),e.name,e.offset,n.getCABO().getStride(),t.context.FLOAT,e.components,t.context.FALSE)&&Qr(`Error setting ${e.name} in shader VAO.`)})),n.getAttributeUpdateTime().modified());const s=t.volumeTexture.getTextureUnit();if(n.getProgram().setUniformi("volumeTexture",s),n.getProgram().setUniformf("width",t.renderable.getWidth()),n.getProgram().setUniform4f("backgroundColor",...t.renderable.getBackgroundColor()),n.getProgram().isUniformUsed("centerlineDirection")){const e=t.renderable.getUniformDirection();n.getProgram().setUniform3fArray("centerlineDirection",e)}if(n.getProgram().isUniformUsed("globalCenterPoint")){const e=t.renderable.getCenterPoint();n.getProgram().setUniform3fArray("globalCenterPoint",e)}const l=t.currentImageDataInput,u=l.getWorldToIndex(),c=r.fromScaling(new Float32Array(16),T.SO([],l.getDimensions())),d=r.mul(c,c,u);if(n.getProgram().setUniformMatrix("MCTCMatrix",d),t.haveSeenDepthRequest&&n.getProgram().setUniformi("depthRequest",t.renderDepth?1:0),t.renderable.getNumberOfClippingPlanes()){let e=t.renderable.getNumberOfClippingPlanes();e>6&&(o.m.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),e=6);const i=n.getCABO().getCoordShiftAndScaleEnabled()?n.getCABO().getInverseShiftAndScaleMatrix():null,s=i?r.copy(t.imagematinv,a.getMatrix()):a.getMatrix();i&&(r.transpose(s,s),r.multiply(s,s,i),r.transpose(s,s)),r.transpose(t.imagemat,t.currentImageDataInput.getIndexToWorld()),r.multiply(t.imagematinv,s,t.imagemat);const l=[];for(let n=0;n{const o=t.openGLImageSlice.getKeyMatrices().mcwc,a=t.openGLCamera.getKeyMatrices(n).wcpc;if(r.multiply(t.imagemat,a,o),e.getCABO().getCoordShiftAndScaleEnabled()){const n=e.getCABO().getInverseShiftAndScaleMatrix();r.multiply(t.imagemat,t.imagemat,n)}e.getProgram().setUniformMatrix("MCPCMatrix",t.imagemat)},e.setPropertyShaderParameters=(e,n,r)=>{const i=e.getProgram(),o=r.getProperty(),a=o.getOpacity();i.setUniformf("opacity",a);const s=t.volumeTexture.getComponents(),l=o.getIndependentComponents();if(l)for(let e=0;e{if(e.getNeedToRebuildShaders(n,r,i)){const o={Vertex:null,Fragment:null,Geometry:null};e.buildShaders(o,r,i);const a=t._openGLRenderWindow.getShaderCache().readyShaderProgramArray(o.Vertex,o.Fragment,o.Geometry);a!==n.getProgram()&&(n.setProgram(a),n.getVAO().releaseGraphicsResources()),n.getShaderSourceTime().modified()}else t._openGLRenderWindow.getShaderCache().readyShaderProgram(n.getProgram());n.getVAO().bind(),e.setMapperShaderParameters(n,r,i),e.setCameraShaderParameters(n,r,i),e.setPropertyShaderParameters(n,r,i)}}const ni={currentRenderPass:null,volumeTexture:null,volumeTextureTime:0,colorTexture:null,colorTextureString:null,pwfTexture:null,pwfTextureString:null,tris:null,lastHaveSeenDepthRequest:!1,haveSeenDepthRequest:!1,lastTextureComponents:0,lastIndependentComponents:0,imagemat:null,imagematinv:null};function ri(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ni,n),a.Z.extend(e,t,n),Yt.implementReplaceShaderCoincidentOffset(e,t,n),o.m.algo(e,t,2,0),t.tris=Bt.ZP.newInstance(),t.volumeTexture=Ft.ZP.newInstance(),t.colorTexture=Ft.ZP.newInstance(),t.pwfTexture=Ft.ZP.newInstance(),t.imagemat=r.identity(new Float64Array(16)),t.imagematinv=r.identity(new Float64Array(16)),t.VBOBuildTime={},o.m.obj(t.VBOBuildTime,{mtime:0}),ti(e,t)}const ii=o.m.newInstance(ri,"vtkOpenGLImageCPRMapper");function oi(e,t){t.classHierarchy.push("vtkOpenGLImageSlice"),e.buildPass=n=>{if(t.renderable&&t.renderable.getVisibility()&&n){if(!t.renderable)return;t._openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t._openGLRenderWindow.getContext(),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseZBufferPass=n=>{t.renderable&&t.renderable.getNestedVisibility()&&(!t._openGLRenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.children.forEach((e=>{e.traverse(n)})),e.apply(n,!1))},e.traverseOpaqueZBufferPass=t=>e.traverseOpaquePass(t),e.traverseOpaquePass=n=>{t.renderable&&t.renderable.getNestedVisibility()&&t.renderable.getIsOpaque()&&(!t._openGLRenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.children.forEach((e=>{e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=n=>{!t.renderable||!t.renderable.getNestedVisibility()||t.renderable.getIsOpaque()||t._openGLRenderer.getSelector()&&!t.renderable.getNestedPickable()||(e.apply(n,!0),t.children.forEach((e=>{e.traverse(n)})),e.apply(n,!1))},e.queryPass=(e,n)=>{if(e){if(!t.renderable||!t.renderable.getVisibility())return;t.renderable.getIsOpaque()?n.incrementOpaqueActorCount():n.incrementTranslucentActorCount()}},e.zBufferPass=(t,n)=>e.opaquePass(t,n),e.opaqueZBufferPass=(t,n)=>e.opaquePass(t,n),e.opaquePass=(e,n)=>{e&&t.context.depthMask(!0)},e.translucentPass=(e,n)=>{t.context.depthMask(!e)},e.getKeyMatrices=()=>(t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(r.copy(t.keyMatrices.mcwc,t.renderable.getMatrix()),r.transpose(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.keyMatrixTime.modified()),t.keyMatrices)}(0,s.vw)("vtkImageCPRMapper",ii);const ai={context:null,keyMatrixTime:null,keyMatrices:null};function si(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ai,n),a.Z.extend(e,t,n),t.keyMatrixTime={},(0,o.o)(t.keyMatrixTime,{mtime:0}),t.keyMatrices={mcwc:r.identity(new Float64Array(16))},(0,o.e)(e,t,["context"]),oi(e,t)}const li=(0,o.n)(si,"vtkOpenGLImageSlice");function ui(e,t){t.classHierarchy.push("vtkOpenGLVolume"),e.buildPass=n=>{t.renderable&&t.renderable.getVisibility()&&n&&(t._openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t._openGLRenderWindow.getContext(),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes())},e.queryPass=(e,n)=>{if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementVolumeCount()}},e.traverseVolumePass=n=>{t.renderable&&t.renderable.getNestedVisibility()&&(!t._openGLRenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.children[0].traverse(n),e.apply(n,!1))},e.volumePass=e=>{t.renderable&&t.renderable.getVisibility()&&t.context.depthMask(!e)},e.getKeyMatrices=()=>(t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),r.copy(t.MCWCMatrix,t.renderable.getMatrix()),r.transpose(t.MCWCMatrix,t.MCWCMatrix),t.renderable.getIsIdentity()?i.identity(t.normalMatrix):(i.fromMat4(t.normalMatrix,t.MCWCMatrix),i.invert(t.normalMatrix,t.normalMatrix)),t.keyMatrixTime.modified()),{mcwc:t.MCWCMatrix,normalMatrix:t.normalMatrix})}(0,s.vw)("vtkImageSlice",li);const ci={};function di(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ci,n),a.Z.extend(e,t,n),t.keyMatrixTime={},(0,o.o)(t.keyMatrixTime,{mtime:0}),t.normalMatrix=new Float64Array(9),t.MCWCMatrix=new Float64Array(16),(0,o.e)(e,t,["context"]),ui(e,t)}const pi=(0,o.n)(di,"vtkOpenGLVolume");(0,s.vw)("vtkVolume",pi);var fi=n(46),hi=n(54),mi=n(365),gi=n(113);const{vtkWarningMacro:vi,vtkErrorMacro:yi}=o.c;function _i(e,t){t.classHierarchy.push("vtkOpenGLVolumeMapper"),e.buildPass=()=>{t.zBufferTexture=null},e.zBufferPass=(e,n)=>{if(e){const e=n.getZBufferTexture();e!==t.zBufferTexture&&(t.zBufferTexture=e)}},e.opaqueZBufferPass=(t,n)=>e.zBufferPass(t,n),e.volumePass=(n,r)=>{if(n){t._openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t.context=t._openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t._openGLRenderWindow),t.jitterTexture.setOpenGLRenderWindow(t._openGLRenderWindow),t.framebuffer.setOpenGLRenderWindow(t._openGLRenderWindow),t.scalarTexture.setOpenGLRenderWindow(t._openGLRenderWindow),t.colorTexture.setOpenGLRenderWindow(t._openGLRenderWindow),t.opacityTexture.setOpenGLRenderWindow(t._openGLRenderWindow),t.openGLVolume=e.getFirstAncestorOfType("vtkOpenGLVolume");const n=t.openGLVolume.getRenderable();t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer");const r=t._openGLRenderer.getRenderable();t.openGLCamera=t._openGLRenderer.getViewNodeFor(r.getActiveCamera()),e.renderPiece(r,n)}},e.buildShaders=(t,n,r)=>{e.getShaderTemplate(t,n,r),e.replaceShaderValues(t,n,r)},e.getShaderTemplate=(e,t,n)=>{e.Vertex="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexDC;\n\nvarying vec3 vertexVCVSOutput;\nuniform mat4 PCVCMatrix;\n\nuniform float dcxmin;\nuniform float dcxmax;\nuniform float dcymin;\nuniform float dcymax;\n\nvoid main()\n{\n // dcsmall is the device coords reduced to the\n // x y area covered by the volume\n vec4 dcsmall = vec4(\n dcxmin + 0.5 * (vertexDC.x + 1.0) * (dcxmax - dcxmin),\n dcymin + 0.5 * (vertexDC.y + 1.0) * (dcymax - dcymin),\n vertexDC.z,\n vertexDC.w);\n vec4 vcpos = PCVCMatrix * dcsmall;\n vertexVCVSOutput = vcpos.xyz/vcpos.w;\n gl_Position = dcsmall;\n}\n",e.Fragment="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkVolumeFS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// Template for the volume mappers fragment shader\n\n// the output of this shader\n//VTK::Output::Dec\n\nvarying vec3 vertexVCVSOutput;\n\n// first declare the settings from the mapper\n// that impact the code paths in here\n\n// always set vtkNumComponents 1,2,3,4\n//VTK::NumComponents\n\n// possibly define vtkTrilinearOn\n//VTK::TrilinearOn\n\n// possibly define vtkIndependentComponents\n//VTK::IndependentComponentsOn\n\n// possibly define any \"proportional\" components\n//VTK::vtkProportionalComponents\n\n// Define the blend mode to use\n#define vtkBlendMode //VTK::BlendMode\n\n// Possibly define vtkImageLabelOutlineOn\n//VTK::ImageLabelOutlineOn\n\n#ifdef vtkImageLabelOutlineOn\nuniform int outlineThickness;\nuniform float outlineOpacity;\nuniform float vpWidth;\nuniform float vpHeight;\nuniform float vpOffsetX;\nuniform float vpOffsetY;\nuniform mat4 PCWCMatrix;\nuniform mat4 vWCtoIDX;\n#endif\n\n// define vtkLightComplexity\n//VTK::LightComplexity\n#if vtkLightComplexity > 0\nuniform float vSpecularPower;\nuniform float vAmbient;\nuniform float vDiffuse;\nuniform float vSpecular;\n//VTK::Light::Dec\n#endif\n\n//VTK::VolumeShadowOn\n//VTK::SurfaceShadowOn\n//VTK::localAmbientOcclusionOn\n//VTK::LAO::Dec\n//VTK::VolumeShadow::Dec\n\n// define vtkComputeNormalFromOpacity\n//VTK::vtkComputeNormalFromOpacity\n\n// possibly define vtkGradientOpacityOn\n//VTK::GradientOpacityOn\n#ifdef vtkGradientOpacityOn\nuniform float goscale0;\nuniform float goshift0;\nuniform float gomin0;\nuniform float gomax0;\n#if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\nuniform float goscale1;\nuniform float goshift1;\nuniform float gomin1;\nuniform float gomax1;\n#if vtkNumComponents >= 3\nuniform float goscale2;\nuniform float goshift2;\nuniform float gomin2;\nuniform float gomax2;\n#endif\n#if vtkNumComponents >= 4\nuniform float goscale3;\nuniform float goshift3;\nuniform float gomin3;\nuniform float gomax3;\n#endif\n#endif\n#endif\n\n// if you want to see the raw tiled\n// data in webgl1 uncomment the following line\n// #define debugtile\n\n// camera values\nuniform float camThick;\nuniform float camNear;\nuniform float camFar;\nuniform int cameraParallel;\n\n// values describing the volume geometry\nuniform vec3 vOriginVC;\nuniform vec3 vSpacing;\nuniform ivec3 volumeDimensions; // 3d texture dimensions\nuniform vec3 vPlaneNormal0;\nuniform float vPlaneDistance0;\nuniform vec3 vPlaneNormal1;\nuniform float vPlaneDistance1;\nuniform vec3 vPlaneNormal2;\nuniform float vPlaneDistance2;\nuniform vec3 vPlaneNormal3;\nuniform float vPlaneDistance3;\nuniform vec3 vPlaneNormal4;\nuniform float vPlaneDistance4;\nuniform vec3 vPlaneNormal5;\nuniform float vPlaneDistance5;\n\n//VTK::ClipPlane::Dec\n\n// opacity and color textures\nuniform sampler2D otexture;\nuniform float oshift0;\nuniform float oscale0;\nuniform sampler2D ctexture;\nuniform float cshift0;\nuniform float cscale0;\n\n// jitter texture\nuniform sampler2D jtexture;\n\n// some 3D texture values\nuniform float sampleDistance;\nuniform vec3 vVCToIJK;\n\n// the heights defined below are the locations\n// for the up to four components of the tfuns\n// the tfuns have a height of 2XnumComps pixels so the\n// values are computed to hit the middle of the two rows\n// for that component\n#ifdef vtkIndependentComponentsOn\n#if vtkNumComponents == 2\nuniform float mix0;\nuniform float mix1;\n#define height0 0.25\n#define height1 0.75\n#endif\n#if vtkNumComponents == 3\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\n#define height0 0.17\n#define height1 0.5\n#define height2 0.83\n#endif\n#if vtkNumComponents == 4\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\nuniform float mix3;\n#define height0 0.125\n#define height1 0.375\n#define height2 0.625\n#define height3 0.875\n#endif\n#endif\n\n#if vtkNumComponents >= 2\nuniform float oshift1;\nuniform float oscale1;\nuniform float cshift1;\nuniform float cscale1;\n#endif\n#if vtkNumComponents >= 3\nuniform float oshift2;\nuniform float oscale2;\nuniform float cshift2;\nuniform float cscale2;\n#endif\n#if vtkNumComponents >= 4\nuniform float oshift3;\nuniform float oscale3;\nuniform float cshift3;\nuniform float cscale3;\n#endif\n\nuniform vec4 ipScalarRangeMin;\nuniform vec4 ipScalarRangeMax;\n\n// declaration for intermixed geometry\n//VTK::ZBuffer::Dec\n\n//=======================================================================\n// global and custom variables (a temporary section before photorealistics rendering module is complete)\nvec3 rayDirVC;\nfloat sampleDistanceISVS;\nfloat sampleDistanceIS;\n\n#define SQRT3 1.7321\n#define INV4PI 0.0796\n#define EPSILON 0.001\n#define PI 3.1415\n#define PI2 9.8696\n\n//=======================================================================\n// Webgl2 specific version of functions\n#if __VERSION__ == 300\n\nuniform highp sampler3D texture1;\n\nvec4 getTextureValue(vec3 pos)\n{\n vec4 tmp = texture(texture1, pos);\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.a = tmp.g;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n return tmp;\n}\n\n//=======================================================================\n// WebGL1 specific version of functions\n#else\n\nuniform sampler2D texture1;\n\nuniform float texWidth;\nuniform float texHeight;\nuniform int xreps;\nuniform int xstride;\nuniform int ystride;\n\n// if computing trilinear values from multiple z slices\n#ifdef vtkTrilinearOn\nvec4 getTextureValue(vec3 ijk)\n{\n float zoff = 1.0/float(volumeDimensions.z);\n vec4 val1 = getOneTextureValue(ijk);\n vec4 val2 = getOneTextureValue(vec3(ijk.xy, ijk.z + zoff));\n\n float indexZ = float(volumeDimensions)*ijk.z;\n float zmix = indexZ - floor(indexZ);\n\n return mix(val1, val2, zmix);\n}\n\nvec4 getOneTextureValue(vec3 ijk)\n#else // nearest or fast linear\nvec4 getTextureValue(vec3 ijk)\n#endif\n{\n vec3 tdims = vec3(volumeDimensions);\n\n#ifdef debugtile\n vec2 tpos = vec2(ijk.x, ijk.y);\n vec4 tmp = texture2D(texture1, tpos);\n tmp.a = 1.0;\n\n#else\n int z = int(ijk.z * tdims.z);\n int yz = z / xreps;\n int xz = z - yz*xreps;\n\n int tileWidth = volumeDimensions.x/xstride;\n int tileHeight = volumeDimensions.y/ystride;\n\n xz *= tileWidth;\n yz *= tileHeight;\n\n float ni = float(xz) + (ijk.x*float(tileWidth));\n float nj = float(yz) + (ijk.y*float(tileHeight));\n\n vec2 tpos = vec2(ni/texWidth, nj/texHeight);\n\n vec4 tmp = texture2D(texture1, tpos);\n\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.g = tmp.a;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n#endif\n\n return tmp;\n}\n\n// End of Webgl1 specific code\n//=======================================================================\n#endif\n\n//=======================================================================\n// transformation between VC and IS space\n\n// convert vector position from idx to vc\n#if (vtkLightComplexity > 0) || (defined vtkClippingPlanesOn)\nvec3 IStoVC(vec3 posIS){\n vec3 posVC = posIS / vVCToIJK;\n return posVC.x * vPlaneNormal0 +\n posVC.y * vPlaneNormal2 +\n posVC.z * vPlaneNormal4 +\n vOriginVC;\n}\n\n// convert vector position from vc to idx\nvec3 VCtoIS(vec3 posVC){\n posVC = posVC - vOriginVC;\n posVC = vec3(\n dot(posVC, vPlaneNormal0),\n dot(posVC, vPlaneNormal2),\n dot(posVC, vPlaneNormal4));\n return posVC * vVCToIJK;\n}\n#endif\n\n//Rotate vector to view coordinate\n#if (vtkLightComplexity > 0) || (defined vtkGradientOpacityOn)\nvoid rotateToViewCoord(inout vec3 dirIS){\n dirIS.xyz =\n dirIS.x * vPlaneNormal0 +\n dirIS.y * vPlaneNormal2 +\n dirIS.z * vPlaneNormal4;\n}\n\n//Rotate vector to idx coordinate\nvec3 rotateToIDX(vec3 dirVC){\n vec3 dirIS;\n dirIS.xyz = vec3(\n dot(dirVC, vPlaneNormal0),\n dot(dirVC, vPlaneNormal2),\n dot(dirVC, vPlaneNormal4));\n return dirIS;\n}\n#endif\n\n//=======================================================================\n// Given a normal compute the gradient opacity factors\nfloat computeGradientOpacityFactor(\n float normalMag, float goscale, float goshift, float gomin, float gomax)\n{\n#if defined(vtkGradientOpacityOn)\n return clamp(normalMag * goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n//=======================================================================\n// compute the normal and gradient magnitude for a position, uses forward difference\n#if (vtkLightComplexity > 0) || (defined vtkGradientOpacityOn)\n#ifdef vtkClippingPlanesOn\n void adjustClippedVoxelValues(vec3 pos, vec3 texPos[3], inout vec3 g1)\n {\n vec3 g1VC[3];\n for (int i = 0; i < 3; ++i)\n {\n g1VC[i] = IStoVC(texPos[i]);\n }\n vec3 posVC = IStoVC(pos);\n for (int i = 0; i < clip_numPlanes; ++i)\n {\n for (int j = 0; j < 3; ++j)\n {\n if(dot(vec3(vClipPlaneOrigins[i] - g1VC[j].xyz), vClipPlaneNormals[i]) > 0.0)\n {\n g1[j] = 0.0;\n }\n }\n }\n }\n#endif\n\n #ifdef vtkComputeNormalFromOpacity\n #ifdef vtkGradientOpacityOn\n vec4 computeDensityNormal(float gradientMag, vec3 scalarInterp[2])\n {\n #else\n //if gradient opacity not on but using density gradient\n vec4 computeDensityNormal(vec3 scalarInterp[2])\n {\n #endif\n vec3 opacityG1, opacityG2;\n opacityG1.x = texture2D(otexture, vec2(scalarInterp[0].x * oscale0 + oshift0, 0.5)).r;\n opacityG1.y = texture2D(otexture, vec2(scalarInterp[0].y * oscale0 + oshift0, 0.5)).r;\n opacityG1.z = texture2D(otexture, vec2(scalarInterp[0].z * oscale0 + oshift0, 0.5)).r;\n opacityG2.x = texture2D(otexture, vec2(scalarInterp[1].x * oscale0 + oshift0, 0.5)).r;\n opacityG2.y = texture2D(otexture, vec2(scalarInterp[1].y * oscale0 + oshift0, 0.5)).r;\n opacityG2.z = texture2D(otexture, vec2(scalarInterp[1].z * oscale0 + oshift0, 0.5)).r;\n #ifdef vtkGradientOpacityOn\n float gradOpacityFactor = 1.0f;\n if (gradientMag >= 0.0){\n gradOpacityFactor = computeGradientOpacityFactor(gradientMag, goscale0, goshift0, gomin0, gomax0);\n }\n opacityG1.xyz *= gradOpacityFactor;\n opacityG2.xyz *= gradOpacityFactor;\n #endif\n\n vec4 opacityG = vec4(opacityG1 - opacityG2, 1.0f);\n // divide by spacing\n opacityG.xyz /= vSpacing;\n opacityG.w = length(opacityG.xyz);\n // rotate to View Coords\n rotateToViewCoord(opacityG.xyz);\n if (length(opacityG.xyz) > 0.0) {\n return vec4(normalize(opacityG.xyz),opacityG.w);\n } else {\n return vec4(0.0);\n }\n }\n\n vec4 computeNormalForDensity(vec3 pos, vec3 tstep, out vec3 scalarInterp[2])\n {\n vec3 xvec = vec3(tstep.x, 0.0, 0.0);\n vec3 yvec = vec3(0.0, tstep.y, 0.0);\n vec3 zvec = vec3(0.0, 0.0, tstep.z);\n vec3 texPosPVec[3];\n texPosPVec[0] = pos + xvec;\n texPosPVec[1] = pos + yvec;\n texPosPVec[2] = pos + zvec;\n vec3 texPosNVec[3];\n texPosNVec[0] = pos - xvec;\n texPosNVec[1] = pos - yvec;\n texPosNVec[2] = pos - zvec;\n vec3 g1, g2;\n\n scalarInterp[0].x = getTextureValue(texPosPVec[0]).a;\n scalarInterp[0].y = getTextureValue(texPosPVec[1]).a;\n scalarInterp[0].z = getTextureValue(texPosPVec[2]).a;\n scalarInterp[1].x = getTextureValue(texPosNVec[0]).a;\n scalarInterp[1].y = getTextureValue(texPosNVec[1]).a;\n scalarInterp[1].z = getTextureValue(texPosNVec[2]).a;\n\n #ifdef vtkClippingPlanesOn\n adjustClippedVoxelValues(pos, texPosPVec, scalarInterp[0]);\n adjustClippedVoxelValues(pos, texPosNVec, scalarInterp[1]);\n #endif\n vec4 result;\n result.x = scalarInterp[0].x - scalarInterp[1].x;\n result.y = scalarInterp[0].y - scalarInterp[1].y;\n result.z = scalarInterp[0].z - scalarInterp[1].z;\n // divide by spacing\n result.xyz /= vSpacing;\n result.w = length(result.xyz);\n // rotate to View Coords\n rotateToViewCoord(result.xyz);\n if (length(result.xyz) > 0.0) {\n return vec4(normalize(result.xyz),result.w);\n } else {\n return vec4(0.0);\n }\n }\n #endif\n\n vec4 computeNormal(vec3 pos, vec3 tstep)\n {\n vec3 xvec = vec3(tstep.x, 0.0, 0.0);\n vec3 yvec = vec3(0.0, tstep.y, 0.0);\n vec3 zvec = vec3(0.0, 0.0, tstep.z);\n vec3 texPosPVec[3];\n texPosPVec[0] = pos + xvec;\n texPosPVec[1] = pos + yvec;\n texPosPVec[2] = pos + zvec;\n vec3 texPosNVec[3];\n texPosNVec[0] = pos - xvec;\n texPosNVec[1] = pos - yvec;\n texPosNVec[2] = pos - zvec;\n vec3 g1, g2;\n g1.x = getTextureValue(texPosPVec[0]).a;\n g1.y = getTextureValue(texPosPVec[1]).a;\n g1.z = getTextureValue(texPosPVec[2]).a;\n g2.x = getTextureValue(texPosNVec[0]).a;\n g2.y = getTextureValue(texPosNVec[1]).a;\n g2.z = getTextureValue(texPosNVec[2]).a;\n #ifdef vtkClippingPlanesOn\n adjustClippedVoxelValues(pos, texPosPVec, g1);\n adjustClippedVoxelValues(pos, texPosNVec, g2);\n #endif\n vec4 result;\n result = vec4(g1 - g2, -1.0);\n // divide by spacing\n result.xyz /= vSpacing;\n result.w = length(result.xyz);\n if (result.w > 0.0){\n // rotate to View Coords\n rotateToViewCoord(result.xyz);\n return vec4(normalize(result.xyz),result.w);\n } else {\n return vec4(0.0);\n }\n }\n#endif\n\n#ifdef vtkImageLabelOutlineOn\nvec3 fragCoordToIndexSpace(vec4 fragCoord) {\n vec4 pcPos = vec4(\n (fragCoord.x / vpWidth - vpOffsetX - 0.5) * 2.0,\n (fragCoord.y / vpHeight - vpOffsetY - 0.5) * 2.0,\n (fragCoord.z - 0.5) * 2.0,\n 1.0);\n\n vec4 worldCoord = PCWCMatrix * pcPos;\n vec4 vertex = (worldCoord/worldCoord.w);\n\n vec3 index = (vWCtoIDX * vertex).xyz;\n\n // half voxel fix for labelmapOutline\n return (index + vec3(0.5)) / vec3(volumeDimensions);\n}\n#endif\n\n//=======================================================================\n// compute the normals and gradient magnitudes for a position\n// for independent components\nmat4 computeMat4Normal(vec3 pos, vec4 tValue, vec3 tstep)\n{\n mat4 result;\n vec4 distX = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - tValue;\n vec4 distY = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - tValue;\n vec4 distZ = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - tValue;\n\n // divide by spacing\n distX /= vSpacing.x;\n distY /= vSpacing.y;\n distZ /= vSpacing.z;\n\n mat3 rot;\n rot[0] = vPlaneNormal0;\n rot[1] = vPlaneNormal2;\n rot[2] = vPlaneNormal4;\n\n#if !defined(vtkComponent0Proportional)\n result[0].xyz = vec3(distX.r, distY.r, distZ.r);\n result[0].a = length(result[0].xyz);\n result[0].xyz *= rot;\n if (result[0].w > 0.0)\n {\n result[0].xyz /= result[0].w;\n }\n#endif\n\n// optionally compute the 2nd component\n#if vtkNumComponents >= 2 && !defined(vtkComponent1Proportional)\n result[1].xyz = vec3(distX.g, distY.g, distZ.g);\n result[1].a = length(result[1].xyz);\n result[1].xyz *= rot;\n if (result[1].w > 0.0)\n {\n result[1].xyz /= result[1].w;\n }\n#endif\n\n// optionally compute the 3rd component\n#if vtkNumComponents >= 3 && !defined(vtkComponent2Proportional)\n result[2].xyz = vec3(distX.b, distY.b, distZ.b);\n result[2].a = length(result[2].xyz);\n result[2].xyz *= rot;\n if (result[2].w > 0.0)\n {\n result[2].xyz /= result[2].w;\n }\n#endif\n\n// optionally compute the 4th component\n#if vtkNumComponents >= 4 && !defined(vtkComponent3Proportional)\n result[3].xyz = vec3(distX.a, distY.a, distZ.a);\n result[3].a = length(result[3].xyz);\n result[3].xyz *= rot;\n if (result[3].w > 0.0)\n {\n result[3].xyz /= result[3].w;\n }\n#endif\n\n return result;\n}\n\n//=======================================================================\n// global shadow - secondary ray\n#if defined(VolumeShadowOn) || defined(localAmbientOcclusionOn)\nfloat random()\n{\n float rand = fract(sin(dot(gl_FragCoord.xy,vec2(12.9898,78.233)))*43758.5453123);\n float jitter=texture2D(jtexture,gl_FragCoord.xy/32.).r;\n uint pcg_state = floatBitsToUint(jitter);\n uint state = pcg_state;\n pcg_state = pcg_state * uint(747796405) + uint(2891336453);\n uint word = ((state >> ((state >> uint(28)) + uint(4))) ^ state) * uint(277803737);\n return (float((((word >> uint(22)) ^ word) >> 1 ))/float(2147483647) + rand)/2.0;\n}\n#endif\n\n#ifdef VolumeShadowOn\n// henyey greenstein phase function\nfloat phase_function(float cos_angle)\n{\n // divide by 2.0 instead of 4pi to increase intensity\n return ((1.0-anisotropy2)/pow(1.0+anisotropy2-2.0*anisotropy*cos_angle, 1.5))/2.0;\n}\n\n// Computes the intersection between a ray and a box\nstruct Hit\n{\n float tmin;\n float tmax;\n};\n\nstruct Ray\n{\n vec3 origin;\n vec3 dir;\n vec3 invDir;\n};\n\nbool BBoxIntersect(vec3 boundMin, vec3 boundMax, const Ray r, out Hit hit)\n{\n vec3 tbot = r.invDir * (boundMin - r.origin);\n vec3 ttop = r.invDir * (boundMax - r.origin);\n vec3 tmin = min(ttop, tbot);\n vec3 tmax = max(ttop, tbot);\n vec2 t = max(tmin.xx, tmin.yz);\n float t0 = max(t.x, t.y);\n t = min(tmax.xx, tmax.yz);\n float t1 = min(t.x, t.y);\n hit.tmin = t0;\n hit.tmax = t1;\n return t1 > max(t0,0.0);\n}\n\n// As BBoxIntersect requires the inverse of the ray coords,\n// this function is used to avoid numerical issues\nvoid safe_0_vector(inout Ray ray)\n{\n if(abs(ray.dir.x) < EPSILON) ray.dir.x = sign(ray.dir.x) * EPSILON;\n if(abs(ray.dir.y) < EPSILON) ray.dir.y = sign(ray.dir.y) * EPSILON;\n if(abs(ray.dir.z) < EPSILON) ray.dir.z = sign(ray.dir.z) * EPSILON;\n}\n\nfloat volume_shadow(vec3 posIS, vec3 lightDirNormIS)\n{\n float shadow = 1.0;\n float opacity = 0.0;\n\n // modify sample distance with a random number between 1.5 and 3.0\n float sampleDistanceISVS_jitter = sampleDistanceISVS * mix(1.5, 3.0, random());\n float opacityPrev = texture2D(otexture, vec2(getTextureValue(posIS).r * oscale0 + oshift0, 0.5)).r;\n\n // in case the first sample near surface has a very tiled light ray, we need to offset start position\n posIS += sampleDistanceISVS_jitter * lightDirNormIS;\n\n // compute the start and end points for the ray\n Ray ray;\n Hit hit;\n ray.origin = posIS;\n ray.dir = lightDirNormIS;\n safe_0_vector(ray);\n ray.invDir = 1.0/ray.dir;\n\n if(!BBoxIntersect(vec3(0.0),vec3(1.0), ray, hit))\n {\n return 1.0;\n }\n float maxdist = hit.tmax;\n\n // interpolate shadow ray length between: 1 unit of sample distance in IS to SQRT3, based on globalIlluminationReach\n float maxgi = mix(sampleDistanceISVS_jitter,SQRT3,giReach);\n maxdist = min(maxdist,maxgi);\n if(maxdist < EPSILON) {\n return 1.0;\n }\n\n // support gradient opacity\n #ifdef vtkGradientOpacityOn\n vec4 normal;\n #endif\n\n float current_dist = 0.0;\n float current_step = length(sampleDistanceISVS_jitter * lightDirNormIS);\n float clamped_step = 0.0;\n\n vec4 scalar = vec4(0.0);\n while(current_dist < maxdist)\n {\n#ifdef vtkClippingPlanesOn\n vec3 posVC = IStoVC(posIS);\n for (int i = 0; i < clip_numPlanes; ++i)\n {\n if (dot(vec3(vClipPlaneOrigins[i] - posVC), vClipPlaneNormals[i]) > 0.0)\n {\n current_dist = maxdist;\n }\n }\n#endif\n scalar = getTextureValue(posIS);\n opacity = texture2D(otexture, vec2(scalar.r * oscale0 + oshift0, 0.5)).r;\n #ifdef vtkGradientOpacityOn\n normal = computeNormal(posIS, vec3(1.0/vec3(volumeDimensions)));\n opacity *= computeGradientOpacityFactor(normal.w, goscale0, goshift0, gomin0, gomax0);\n #endif\n shadow *= 1.0 - opacity;\n\n // optimization: early termination\n if (shadow < EPSILON){\n return 0.0;\n }\n\n clamped_step = min(maxdist - current_dist, current_step);\n posIS += clamped_step * lightDirNormIS;\n current_dist += current_step;\n }\n\n return shadow;\n}\n\nvec3 applyShadowRay(vec3 tColor, vec3 posIS, vec3 viewDirectionVC)\n{\n vec3 vertLight = vec3(0.0);\n vec3 secondary_contrib = vec3(0.0);\n // here we assume only positional light, no effect of cones\n for (int i = 0; i < lightNum; i++)\n {\n #if(vtkLightComplexity==3)\n if (lightPositional[i] == 1){\n vertLight = lightPositionVC[i] - IStoVC(posIS);\n }else{\n vertLight = - lightDirectionVC[i];\n }\n #else\n vertLight = - lightDirectionVC[i];\n #endif\n // here we assume achromatic light, only intensity\n float dDotL = dot(viewDirectionVC, normalize(vertLight));\n // isotropic scatter returns 0.5 instead of 1/4pi to increase intensity\n float phase_attenuation = 0.5;\n if (abs(anisotropy) > EPSILON){\n phase_attenuation = phase_function(dDotL);\n }\n float vol_shadow = volume_shadow(posIS, normalize(rotateToIDX(vertLight)));\n secondary_contrib += tColor * vDiffuse * lightColor[i] * vol_shadow * phase_attenuation;\n secondary_contrib += tColor * vAmbient;\n }\n return secondary_contrib;\n}\n#endif\n\n//=======================================================================\n// local ambient occlusion\n#ifdef localAmbientOcclusionOn\nvec3 sample_direction_uniform(int i)\n{\n float rand = random() * 0.5;\n float theta = PI2 * (kernelSample[i][0] + rand);\n float phi = acos(2.0 * (kernelSample[i][1] + rand) -1.0) / 2.5;\n return normalize(vec3(cos(theta)*sin(phi), sin(theta)*sin(phi), cos(phi)));\n}\n\n// return a matrix that transform startDir into z axis; startDir should be normalized\nmat3 zBaseRotationalMatrix(vec3 startDir){\n vec3 axis = cross(startDir, vec3(0.0,0.0,1.0));\n float cosA = startDir.z;\n float k = 1.0 / (1.0 + cosA);\n mat3 matrix = mat3((axis.x * axis.x * k) + cosA, (axis.y * axis.x * k) - axis.z, (axis.z * axis.x * k) + axis.y,\n (axis.x * axis.y * k) + axis.z, (axis.y * axis.y * k) + cosA, (axis.z * axis.y * k) - axis.x,\n (axis.x * axis.z * k) - axis.y, (axis.y * axis.z * k) + axis.x, (axis.z * axis.z * k) + cosA);\n return matrix;\n}\n\nfloat computeLAO(vec3 posIS, float op, vec3 lightDir, vec4 normal){\n // apply LAO only at selected locations, otherwise return full brightness\n if (normal.w > 0.0 && op > 0.05){\n float total_transmittance = 0.0;\n mat3 inverseRotateBasis = inverse(zBaseRotationalMatrix(normalize(-normal.xyz)));\n vec3 currPos, randomDirStep;\n float weight, transmittance, opacity;\n for (int i = 0; i < kernelSize; i++)\n {\n randomDirStep = inverseRotateBasis * sample_direction_uniform(i) * sampleDistanceIS;\n weight = 1.0 - dot(normalize(lightDir), normalize(randomDirStep));\n currPos = posIS;\n transmittance = 1.0;\n for (int j = 0; j < kernelRadius ; j++){\n currPos += randomDirStep;\n // check if it's at clipping plane, if so return full brightness\n if (all(greaterThan(currPos, vec3(EPSILON))) && all(lessThan(currPos,vec3(1.0-EPSILON)))){\n opacity = texture2D(otexture, vec2(getTextureValue(currPos).r * oscale0 + oshift0, 0.5)).r;\n #ifdef vtkGradientOpacityOn\n opacity *= computeGradientOpacityFactor(normal.w, goscale0, goshift0, gomin0, gomax0);\n #endif\n transmittance *= 1.0 - opacity;\n }\n else{\n break;\n }\n }\n total_transmittance += transmittance / float(kernelRadius) * weight;\n\n // early termination if fully translucent\n if (total_transmittance > 1.0 - EPSILON){\n return 1.0;\n }\n }\n // average transmittance and reduce variance\n return clamp(total_transmittance / float(kernelSize), 0.3, 1.0);\n } else {\n return 1.0;\n }\n}\n#endif\n\n//=======================================================================\n// surface light contribution\n#if vtkLightComplexity > 0\n void applyLighting(inout vec3 tColor, vec4 normal)\n {\n vec3 diffuse = vec3(0.0, 0.0, 0.0);\n vec3 specular = vec3(0.0, 0.0, 0.0);\n float df, sf = 0.0;\n for (int i = 0; i < lightNum; i++){\n df = abs(dot(normal.rgb, -lightDirectionVC[i]));\n diffuse += df * lightColor[i];\n sf = pow( abs(dot(lightHalfAngleVC[i],normal.rgb)), vSpecularPower);\n specular += sf * lightColor[i];\n }\n tColor.rgb = tColor.rgb*(diffuse*vDiffuse + vAmbient) + specular*vSpecular;\n }\n #ifdef SurfaceShadowOn\n #if vtkLightComplexity < 3\n vec3 applyLightingDirectional(vec3 posIS, vec4 tColor, vec4 normal)\n {\n // everything in VC\n vec3 diffuse = vec3(0.0);\n vec3 specular = vec3(0.0);\n #ifdef localAmbientOcclusionOn\n vec3 ambient = vec3(0.0);\n #endif\n vec3 vertLightDirection;\n for (int i = 0; i < lightNum; i++){\n float ndotL,vdotR;\n vertLightDirection = lightDirectionVC[i];\n ndotL = dot(normal.xyz, vertLightDirection);\n if (ndotL < 0.0 && twoSidedLighting)\n {\n ndotL = -ndotL;\n }\n if (ndotL > 0.0)\n {\n diffuse += ndotL * lightColor[i];\n //specular\n vdotR = dot(-rayDirVC, normalize(2.0 * ndotL * -normal.xyz + vertLightDirection));\n if (vdotR > 0.0)\n {\n specular += pow(vdotR, vSpecularPower) * lightColor[i];\n }\n }\n #ifdef localAmbientOcclusionOn\n ambient += computeLAO(posIS, tColor.a, vertLightDirection, normal);\n #endif\n }\n #ifdef localAmbientOcclusionOn\n return tColor.rgb * (diffuse * vDiffuse + vAmbient * ambient) + specular*vSpecular;\n #else\n return tColor.rgb * (diffuse * vDiffuse + vAmbient) + specular*vSpecular;\n #endif\n }\n #else\n vec3 applyLightingPositional(vec3 posIS, vec4 tColor, vec4 normal, vec3 posVC)\n {\n // everything in VC\n vec3 diffuse = vec3(0.0);\n vec3 specular = vec3(0.0);\n #ifdef localAmbientOcclusionOn\n vec3 ambient = vec3(0.0);\n #endif\n vec3 vertLightDirection;\n for (int i = 0; i < lightNum; i++){\n float distance,attenuation,ndotL,vdotR;\n vec3 lightDir;\n if (lightPositional[i] == 1){\n lightDir = lightDirectionVC[i];\n vertLightDirection = posVC - lightPositionVC[i];\n distance = length(vertLightDirection);\n vertLightDirection = normalize(vertLightDirection);\n attenuation = 1.0 / (lightAttenuation[i].x\n + lightAttenuation[i].y * distance\n + lightAttenuation[i].z * distance * distance);\n // per OpenGL standard cone angle is 90 or less for a spot light\n if (lightConeAngle[i] <= 90.0){\n float coneDot = dot(vertLightDirection, lightDir);\n if (coneDot >= cos(radians(lightConeAngle[i]))){ // if inside cone\n attenuation = attenuation * pow(coneDot, lightExponent[i]);\n }\n else {\n attenuation = 0.0;\n }\n }\n ndotL = dot(normal.xyz, vertLightDirection);\n if (ndotL < 0.0 && twoSidedLighting)\n {\n ndotL = -ndotL;\n }\n if (ndotL > 0.0)\n {\n diffuse += ndotL * attenuation * lightColor[i];\n //specular\n vdotR = dot(-rayDirVC, normalize(2.0 * ndotL * -normal.xyz + vertLightDirection));\n if (vdotR > 0.0)\n {\n specular += pow(vdotR, vSpecularPower) * attenuation * lightColor[i];\n }\n }\n #ifdef localAmbientOcclusionOn\n ambient += computeLAO(posIS, tColor.a, vertLightDirection, normal);\n #endif\n } else {\n vertLightDirection = lightDirectionVC[i];\n ndotL = dot(normal.xyz, vertLightDirection);\n if (ndotL < 0.0 && twoSidedLighting)\n {\n ndotL = -ndotL;\n }\n if (ndotL > 0.0)\n {\n diffuse += ndotL * lightColor[i];\n //specular\n vdotR = dot(-rayDirVC, normalize(2.0 * ndotL * -normal.xyz + vertLightDirection));\n if (vdotR > 0.0)\n {\n specular += pow(vdotR, vSpecularPower) * lightColor[i];\n }\n }\n #ifdef localAmbientOcclusionOn\n ambient += computeLAO(posIS, tColor.a, vertLightDirection, normal);\n #endif\n }\n }\n #ifdef localAmbientOcclusionOn\n return tColor.rgb * (diffuse * vDiffuse + vAmbient * ambient) + specular*vSpecular;\n #else\n return tColor.rgb * (diffuse * vDiffuse + vAmbient) + specular*vSpecular;\n #endif\n }\n #endif\n #endif\n#endif\n\n//=======================================================================\n// Given a texture value compute the color and opacity\n//\nvec4 getColorForValue(vec4 tValue, vec3 posIS, vec3 tstep)\n{\n#ifdef vtkImageLabelOutlineOn\n vec3 centerPosIS = fragCoordToIndexSpace(gl_FragCoord); // pos in texture space\n vec4 centerValue = getTextureValue(centerPosIS);\n bool pixelOnBorder = false;\n vec4 tColor = texture2D(ctexture, vec2(centerValue.r * cscale0 + cshift0, 0.5));\n\n // Get alpha of segment from opacity function.\n tColor.a = texture2D(otexture, vec2(centerValue.r * oscale0 + oshift0, 0.5)).r;\n\n // Only perform outline check on fragments rendering voxels that aren't invisible.\n // Saves a bunch of needless checks on the background.\n // TODO define epsilon when building shader?\n if (float(tColor.a) > 0.01) {\n for (int i = -outlineThickness; i <= outlineThickness; i++) {\n for (int j = -outlineThickness; j <= outlineThickness; j++) {\n if (i == 0 || j == 0) {\n continue;\n }\n\n vec4 neighborPixelCoord = vec4(gl_FragCoord.x + float(i),\n gl_FragCoord.y + float(j),\n gl_FragCoord.z, gl_FragCoord.w);\n\n vec3 neighborPosIS = fragCoordToIndexSpace(neighborPixelCoord);\n vec4 value = getTextureValue(neighborPosIS);\n\n // If any of my neighbours are not the same value as I\n // am, this means I am on the border of the segment.\n // We can break the loops\n if (any(notEqual(value, centerValue))) {\n pixelOnBorder = true;\n break;\n }\n }\n\n if (pixelOnBorder == true) {\n break;\n }\n }\n\n // If I am on the border, I am displayed at full opacity\n if (pixelOnBorder == true) {\n tColor.a = outlineOpacity;\n }\n }\n\n#else\n // compute the normal and gradient magnitude if needed\n // We compute it as a vec4 if possible otherwise a mat4\n //\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n\n // compute the normal vectors as needed\n #if (vtkLightComplexity > 0) || defined(vtkGradientOpacityOn)\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n mat4 normalMat = computeMat4Normal(posIS, tValue, tstep);\n #if !defined(vtkComponent0Proportional)\n vec4 normal0 = normalMat[0];\n #endif\n #if !defined(vtkComponent1Proportional)\n vec4 normal1 = normalMat[1];\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n vec4 normal2 = normalMat[2];\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n vec4 normal3 = normalMat[3];\n #endif\n #endif\n #endif\n #else\n vec4 normalLight;\n #ifdef vtkComputeNormalFromOpacity\n vec3 scalarInterp[2];\n vec4 normal0 = computeNormalForDensity(posIS, tstep, scalarInterp);\n if (length(normal0)>0.0){\n #ifdef vtkGradientOpacityOn\n normalLight = computeDensityNormal(normal0.w, scalarInterp);\n #else\n normalLight = computeDensityNormal(scalarInterp);\n #endif\n if (length(normalLight) == 0.0){\n normalLight = normal0;\n }\n }\n #else\n vec4 normal0 = computeNormal(posIS, tstep);\n normalLight = normal0;\n #endif\n #endif\n #endif\n\n // compute gradient opacity factors as needed\n #if defined(vtkGradientOpacityOn)\n #if !defined(vtkComponent0Proportional)\n goFactor.x =\n computeGradientOpacityFactor(normal0.a, goscale0, goshift0, gomin0, gomax0);\n #endif\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n #if !defined(vtkComponent1Proportional)\n goFactor.y =\n computeGradientOpacityFactor(normal1.a, goscale1, goshift1, gomin1, gomax1);\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n goFactor.z =\n computeGradientOpacityFactor(normal2.a, goscale2, goshift2, gomin2, gomax2);\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n goFactor.w =\n computeGradientOpacityFactor(normal3.a, goscale3, goshift3, gomin3, gomax3);\n #endif\n #endif\n #endif\n #endif\n #endif\n\n // single component is always independent\n #if vtkNumComponents == 1\n vec4 tColor = texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, 0.5));\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, 0.5)).r;\n if (tColor.a < EPSILON){\n return vec4(0.0);\n }\n #endif\n\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n vec4 tColor = mix0*texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, height0));\n #if !defined(vtkComponent0Proportional)\n tColor.a = goFactor.x*mix0*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n tColor *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix0));\n #endif\n\n vec3 tColor1 = mix1*texture2D(ctexture, vec2(tValue.g * cscale1 + cshift1, height1)).rgb;\n #if !defined(vtkComponent1Proportional)\n tColor.a += goFactor.y*mix1*texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n tColor1 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix1));\n #endif\n\n #if vtkNumComponents >= 3\n vec3 tColor2 = mix2*texture2D(ctexture, vec2(tValue.b * cscale2 + cshift2, height2)).rgb;\n #if !defined(vtkComponent2Proportional)\n tColor.a += goFactor.z*mix2*texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n tColor2 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix2));\n #endif\n\n #if vtkNumComponents >= 4\n vec3 tColor3 = mix3*texture2D(ctexture, vec2(tValue.a * cscale3 + cshift3, height3)).rgb;\n #if !defined(vtkComponent3Proportional)\n tColor.a += goFactor.w*mix3*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n tColor3 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix3));\n #endif\n #endif\n #endif\n #else // then not independent\n\n #if vtkNumComponents == 2\n float lum = tValue.r * cscale0 + cshift0;\n float alpha = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale1 + oshift1, 0.5)).r;\n vec4 tColor = vec4(lum, lum, lum, alpha);\n #endif\n #if vtkNumComponents == 3\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale0 + oshift0, 0.5)).r;\n #endif\n #if vtkNumComponents == 4\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, 0.5)).r;\n #endif\n #endif // dependent\n\n // apply lighting if requested as appropriate\n #if vtkLightComplexity > 0\n #if !defined(vtkComponent0Proportional)\n #if vtkNumComponents == 1\n #ifdef SurfaceShadowOn\n #if vtkLightComplexity < 3\n vec3 tColorS = applyLightingDirectional(posIS, tColor, normalLight);\n #else\n vec3 tColorS = applyLightingPositional(posIS, tColor, normalLight, IStoVC(posIS));\n #endif\n #endif\n\n #ifdef VolumeShadowOn\n vec3 tColorVS = applyShadowRay(tColor.rgb, posIS, rayDirVC);\n #ifdef SurfaceShadowOn\n float vol_coef = volumetricScatteringBlending * (1.0 - tColor.a / 2.0) * (1.0 - atan(normalLight.w) * INV4PI);\n tColor.rgb = (1.0-vol_coef) * tColorS + vol_coef * tColorVS;\n #else\n tColor.rgb = tColorVS;\n #endif\n #else\n tColor.rgb = tColorS;\n #endif\n\n #else\n applyLighting(tColor.rgb, normal0);\n #endif\n #endif\n\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n #if !defined(vtkComponent1Proportional)\n applyLighting(tColor1, normal1);\n #endif\n #if vtkNumComponents >= 3\n #if !defined(vtkComponent2Proportional)\n applyLighting(tColor2, normal2);\n #endif\n #if vtkNumComponents >= 4\n #if !defined(vtkComponent3Proportional)\n applyLighting(tColor3, normal3);\n #endif\n #endif\n #endif\n #endif\n #endif\n\n// perform final independent blend as needed\n#if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n tColor.rgb += tColor1;\n#if vtkNumComponents >= 3\n tColor.rgb += tColor2;\n#if vtkNumComponents >= 4\n tColor.rgb += tColor3;\n#endif\n#endif\n#endif\n\n#endif\nreturn tColor;\n}\n\nbool valueWithinScalarRange(vec4 val, vec4 min, vec4 max) {\n bool withinRange = false;\n #if vtkNumComponents == 1\n if (val.r >= min.r && val.r <= max.r) {\n withinRange = true;\n }\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents == 2\n if (val.r >= min.r && val.r <= max.r &&\n val.g >= min.g && val.g <= max.g) {\n withinRange = true;\n }\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 3\n if (all(greaterThanEqual(val, ipScalarRangeMin)) &&\n all(lessThanEqual(val, ipScalarRangeMax))) {\n withinRange = true;\n }\n #endif\n return withinRange;\n}\n\n//=======================================================================\n// Apply the specified blend mode operation along the ray's path.\n//\nvoid applyBlend(vec3 posIS, vec3 endIS, vec3 tdims)\n{\n vec3 tstep = 1.0/tdims;\n\n // start slightly inside and apply some jitter\n vec3 delta = endIS - posIS;\n vec3 stepIS = normalize(delta)*sampleDistanceIS;\n float raySteps = length(delta)/sampleDistanceIS;\n\n // avoid 0.0 jitter\n float jitter = 0.01 + 0.99*texture2D(jtexture, gl_FragCoord.xy/32.0).r;\n float stepsTraveled = jitter;\n\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n vec4 tValue;\n vec4 tColor;\n\n // if we have less than one step then pick the middle point\n // as our value\n // if (raySteps <= 1.0)\n // {\n // posIS = (posIS + endIS)*0.5;\n // }\n\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n #if vtkBlendMode == 0 // COMPOSITE_BLEND\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n gl_FragData[0] = tColor;\n return;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb*tColor.a, tColor.a);\n posIS += (jitter*stepIS);\n\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n float mix = (1.0 - color.a);\n\n // this line should not be needed but nvidia seems to not handle\n // the break correctly on windows/chrome 58 angle\n //mix = mix * sign(max(raySteps - stepsTraveled - 1.0, 0.0));\n\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n stepsTraveled++;\n posIS += stepIS;\n if (color.a > 0.99) { color.a = 1.0; break; }\n }\n\n if (color.a < 0.99 && (raySteps - stepsTraveled) > 0.0)\n {\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps - stepsTraveled);\n\n float mix = (1.0 - color.a);\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n }\n\n gl_FragData[0] = vec4(color.rgb/color.a, color.a);\n #endif\n #if vtkBlendMode == 1 || vtkBlendMode == 2\n // MAXIMUM_INTENSITY_BLEND || MINIMUM_INTENSITY_BLEND\n // Find maximum/minimum intensity along the ray.\n\n // Define the operation we will use (min or max)\n #if vtkBlendMode == 1\n #define OP max\n #else\n #define OP min\n #endif\n\n // If the clipping range is shorter than the sample distance\n // we can skip the sampling loop along the ray.\n if (raySteps <= 1.0)\n {\n gl_FragData[0] = getColorForValue(tValue, posIS, tstep);\n return;\n }\n\n vec4 value = tValue;\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // Update the maximum value if necessary\n value = OP(tValue, value);\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n tValue = getTextureValue(posIS);\n value = OP(tValue, value);\n\n // Now map through opacity and color\n gl_FragData[0] = getColorForValue(value, posIS, tstep);\n #endif\n #if vtkBlendMode == 3 || vtkBlendMode == 4 //AVERAGE_INTENSITY_BLEND || ADDITIVE_BLEND\n vec4 sum = vec4(0.);\n\n if (valueWithinScalarRange(tValue, ipScalarRangeMin, ipScalarRangeMax)) {\n sum += tValue;\n }\n\n if (raySteps <= 1.0) {\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n return;\n }\n\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation.\n // Notes:\n // - We are comparing all values in the texture to see if any of them\n // are outside of the scalar range. In the future we might want to allow\n // scalar ranges for each component.\n if (valueWithinScalarRange(tValue, ipScalarRangeMin, ipScalarRangeMax)) {\n // Sum the values across each step in the path\n sum += tValue;\n }\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the IPScalarRange to disregard scalar values, not in the range of interest, from the average computation\n if (valueWithinScalarRange(tValue, ipScalarRangeMin, ipScalarRangeMax)) {\n sum += tValue;\n\n stepsTraveled++;\n }\n\n #if vtkBlendMode == 3 // Average\n sum /= vec4(stepsTraveled, stepsTraveled, stepsTraveled, 1.0);\n #endif\n\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n #endif\n #if vtkBlendMode == 5 // RADON\n float normalizedRayIntensity = 1.0;\n\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tValue = getTextureValue(posIS);\n normalizedRayIntensity = normalizedRayIntensity - sampleDistance*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, 0.5)).r;\n gl_FragData[0] = texture2D(ctexture, vec2(normalizedRayIntensity, 0.5));\n return;\n }\n\n posIS += (jitter*stepIS);\n\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar value\n tValue = getTextureValue(posIS);\n\n // Convert scalar value to normalizedRayIntensity coefficient and accumulate normalizedRayIntensity\n normalizedRayIntensity = normalizedRayIntensity - sampleDistance*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, 0.5)).r;\n\n posIS += stepIS;\n stepsTraveled++;\n }\n\n // map normalizedRayIntensity to color\n gl_FragData[0] = texture2D(ctexture, vec2(normalizedRayIntensity , 0.5));\n\n #endif\n}\n\n//=======================================================================\n// Compute a new start and end point for a given ray based\n// on the provided bounded clipping plane (aka a rectangle)\nvoid getRayPointIntersectionBounds(\n vec3 rayPos, vec3 rayDir,\n vec3 planeDir, float planeDist,\n inout vec2 tbounds, vec3 vPlaneX, vec3 vPlaneY,\n float vSize1, float vSize2)\n{\n float result = dot(rayDir, planeDir);\n if (abs(result) < 1e-6)\n {\n return;\n }\n result = -1.0 * (dot(rayPos, planeDir) + planeDist) / result;\n vec3 xposVC = rayPos + rayDir*result;\n vec3 vxpos = xposVC - vOriginVC;\n vec2 vpos = vec2(\n dot(vxpos, vPlaneX),\n dot(vxpos, vPlaneY));\n\n // on some apple nvidia systems this does not work\n // if (vpos.x < 0.0 || vpos.x > vSize1 ||\n // vpos.y < 0.0 || vpos.y > vSize2)\n // even just\n // if (vpos.x < 0.0 || vpos.y < 0.0)\n // fails\n // so instead we compute a value that represents in and out\n //and then compute the return using this value\n float xcheck = max(0.0, vpos.x * (vpos.x - vSize1)); // 0 means in bounds\n float check = sign(max(xcheck, vpos.y * (vpos.y - vSize2))); // 0 means in bounds, 1 = out\n\n tbounds = mix(\n vec2(min(tbounds.x, result), max(tbounds.y, result)), // in value\n tbounds, // out value\n check); // 0 in 1 out\n}\n\n//=======================================================================\n// given a\n// - ray direction (rayDir)\n// - starting point (vertexVCVSOutput)\n// - bounding planes of the volume\n// - optionally depth buffer values\n// - far clipping plane\n// compute the start/end distances of the ray we need to cast\nvec2 computeRayDistances(vec3 rayDir, vec3 tdims)\n{\n vec2 dists = vec2(100.0*camFar, -1.0);\n\n vec3 vSize = vSpacing*tdims;\n\n // all this is in View Coordinates\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal0, vPlaneDistance0, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal1, vPlaneDistance1, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal2, vPlaneDistance2, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal3, vPlaneDistance3, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal4, vPlaneDistance4, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal5, vPlaneDistance5, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n\n //VTK::ClipPlane::Impl\n\n // do not go behind front clipping plane\n dists.x = max(0.0,dists.x);\n\n // do not go PAST far clipping plane\n float farDist = -camThick/rayDir.z;\n dists.y = min(farDist,dists.y);\n\n // Do not go past the zbuffer value if set\n // This is used for intermixing opaque geometry\n //VTK::ZBuffer::Impl\n\n return dists;\n}\n\n//=======================================================================\n// Compute the index space starting position (pos) and end\n// position\n//\nvoid computeIndexSpaceValues(out vec3 pos, out vec3 endPos, vec3 rayDir, vec2 dists)\n{\n // compute starting and ending values in volume space\n pos = vertexVCVSOutput + dists.x*rayDir;\n pos = pos - vOriginVC;\n // convert to volume basis and origin\n pos = vec3(\n dot(pos, vPlaneNormal0),\n dot(pos, vPlaneNormal2),\n dot(pos, vPlaneNormal4));\n\n endPos = vertexVCVSOutput + dists.y*rayDir;\n endPos = endPos - vOriginVC;\n endPos = vec3(\n dot(endPos, vPlaneNormal0),\n dot(endPos, vPlaneNormal2),\n dot(endPos, vPlaneNormal4));\n\n float delta = length(endPos - pos);\n\n pos *= vVCToIJK;\n endPos *= vVCToIJK;\n\n float delta2 = length(endPos - pos);\n sampleDistanceIS = sampleDistance*delta2/delta;\n #ifdef VolumeShadowOn\n sampleDistanceISVS = sampleDistanceIS * volumeShadowSamplingDistFactor;\n #endif\n}\n\nvoid main()\n{\n\n if (cameraParallel == 1)\n {\n // Camera is parallel, so the rayDir is just the direction of the camera.\n rayDirVC = vec3(0.0, 0.0, -1.0);\n } else {\n // camera is at 0,0,0 so rayDir for perspective is just the vc coord\n rayDirVC = normalize(vertexVCVSOutput);\n }\n\n vec3 tdims = vec3(volumeDimensions);\n\n // compute the start and end points for the ray\n vec2 rayStartEndDistancesVC = computeRayDistances(rayDirVC, tdims);\n\n // do we need to composite? aka does the ray have any length\n // If not, bail out early\n if (rayStartEndDistancesVC.y <= rayStartEndDistancesVC.x)\n {\n discard;\n }\n\n // IS = Index Space\n vec3 posIS;\n vec3 endIS;\n computeIndexSpaceValues(posIS, endIS, rayDirVC, rayStartEndDistancesVC);\n\n // Perform the blending operation along the ray\n applyBlend(posIS, endIS, tdims);\n}\n",e.Geometry=""},e.replaceShaderValues=(n,r,i)=>{let o=n.Fragment;i.getProperty().getInterpolationType()===mi.ZG.LINEAR&&(o=Gt.Z.substitute(o,"//VTK::TrilinearOn","#define vtkTrilinearOn").result);!0===i.getProperty().getUseLabelOutline()&&(o=Gt.Z.substitute(o,"//VTK::ImageLabelOutlineOn","#define vtkImageLabelOutlineOn").result);const a=t.scalarTexture.getComponents();o=Gt.Z.substitute(o,"//VTK::NumComponents",`#define vtkNumComponents ${a}`).result;const s=i.getProperty().getIndependentComponents();if(s){o=Gt.Z.substitute(o,"//VTK::IndependentComponentsOn","#define vtkIndependentComponentsOn").result;const e=[];for(let t=0;t0&&(o=Gt.Z.substitute(o,"//VTK::vtkProportionalComponents",e.join("\n")).result)}const l=t.currentInput.getSpatialExtent(),u=t.currentInput.getSpacing(),c=new Float64Array(3);T.t8(c,(l[1]-l[0])*u[0],(l[3]-l[2])*u[1],(l[5]-l[4])*u[2]);const d=T.kE(c)/e.getCurrentSampleDistance(r);o=Gt.Z.substitute(o,"//VTK::MaximumSamplesValue",`${Math.ceil(d)}`).result,o=Gt.Z.substitute(o,"//VTK::LightComplexity",`#define vtkLightComplexity ${t.lastLightComplexity}`).result,t.lastLightComplexity>0&&(t.renderable.getVolumetricScatteringBlending()>0&&(o=Gt.Z.substitute(o,"//VTK::VolumeShadowOn","#define VolumeShadowOn").result),t.renderable.getVolumetricScatteringBlending()<1&&(o=Gt.Z.substitute(o,"//VTK::SurfaceShadowOn","#define SurfaceShadowOn").result),t.renderable.getLocalAmbientOcclusion()&&i.getProperty().getAmbient()>0&&(o=Gt.Z.substitute(o,"//VTK::localAmbientOcclusionOn","#define localAmbientOcclusionOn").result)),t.gopacity=i.getProperty().getUseGradientOpacity(0);for(let e=1;s&&!t.gopacity&&e{if(0===t.lastLightComplexity)return;let i=e.Fragment,o=0;n.getLights().forEach((e=>{e.getSwitch()&&(o+=1)})),i=Gt.Z.substitute(i,"//VTK::Light::Dec",["uniform int lightNum;","uniform bool twoSidedLighting;",`uniform vec3 lightColor[${o}];`,`uniform vec3 lightDirectionVC[${o}]; // normalized`,`uniform vec3 lightHalfAngleVC[${o}];`,"//VTK::Light::Dec"],!1).result,3===t.lastLightComplexity&&(i=Gt.Z.substitute(i,"//VTK::Light::Dec",[`uniform vec3 lightPositionVC[${o}];`,`uniform vec3 lightAttenuation[${o}];`,`uniform float lightConeAngle[${o}];`,`uniform float lightExponent[${o}];`,`uniform int lightPositional[${o}];`],!1).result),t.renderable.getVolumetricScatteringBlending()>0&&(i=Gt.Z.substitute(i,"//VTK::VolumeShadow::Dec",["uniform float volumetricScatteringBlending;","uniform float giReach;","uniform float volumeShadowSamplingDistFactor;","uniform float anisotropy;","uniform float anisotropy2;"],!1).result),t.renderable.getLocalAmbientOcclusion()&&r.getProperty().getAmbient()>0&&(i=Gt.Z.substitute(i,"//VTK::LAO::Dec",["uniform int kernelRadius;",`uniform vec2 kernelSample[${t.renderable.getLAOKernelRadius()}];`,"uniform int kernelSize;"],!1).result),e.Fragment=i},e.replaceShaderClippingPlane=(e,n,r)=>{let i=e.Fragment;if(t.renderable.getClippingPlanes().length>0){const e=t.renderable.getClippingPlanes().length;i=Gt.Z.substitute(i,"//VTK::ClipPlane::Dec",["uniform vec3 vClipPlaneNormals[6];","uniform float vClipPlaneDistances[6];","uniform vec3 vClipPlaneOrigins[6];","uniform int clip_numPlanes;","//VTK::ClipPlane::Dec","#define vtkClippingPlanesOn"],!1).result,i=Gt.Z.substitute(i,"//VTK::ClipPlane::Impl",[`for(int i = 0; i < ${e}; i++) {`," float rayDirRatio = dot(rayDir, vClipPlaneNormals[i]);"," float equationResult = dot(vertexVCVSOutput, vClipPlaneNormals[i]) + vClipPlaneDistances[i];"," if (rayDirRatio == 0.0)"," {"," if (equationResult < 0.0) dists.x = dists.y;"," continue;"," }"," float result = -1.0 * equationResult / rayDirRatio;"," if (rayDirRatio < 0.0) dists.y = min(dists.y, result);"," else dists.x = max(dists.x, result);","}","//VTK::ClipPlane::Impl"],!1).result}e.Fragment=i},e.getNeedToRebuildShaders=(n,r,i)=>{let o=0;i.getProperty().getShade()&&t.renderable.getBlendMode()===gi.bt.COMPOSITE_BLEND&&(o=0,t.numberOfLights=0,r.getLights().forEach((e=>{e.getSwitch()>0&&(t.numberOfLights++,0===o&&(o=1)),1===o&&(t.numberOfLights>1||1!==e.getIntensity()||!e.lightTypeIsHeadLight())&&(o=2),o<3&&e.getPositional()&&(o=3)})));let a=!1;t.lastLightComplexity!==o&&(t.lastLightComplexity=o,a=!0);const s=t.scalarTexture.getComponents(),l=i.getProperty().getIndependentComponents();let u=!1;const c=[];if(l){for(let e=0;e0&&(u=!0)}const d=t.currentInput.getSpatialExtent(),p=t.currentInput.getSpacing(),f=new Float64Array(3);T.t8(f,(d[1]-d[0])*p[0],(d[3]-d[2])*p[1],(d[5]-d[4])*p[2]);const h=T.kE(f)/e.getCurrentSampleDistance(r),m={interpolationType:i.getProperty().getInterpolationType(),useLabelOutline:i.getProperty().getUseLabelOutline(),numComp:s,usesProportionalComponents:u,iComps:l,maxSamples:h,useGradientOpacity:i.getProperty().getUseGradientOpacity(0),blendMode:t.renderable.getBlendMode(),proportionalComponents:c};return t.previousState&&t.previousState.interpolationType===m.interpolationType&&t.previousState.useLabelOutline===m.useLabelOutline&&t.previousState.numComp===m.numComp&&t.previousState.usesProportionalComponents===m.usesProportionalComponents&&t.previousState.iComps===m.iComps&&t.previousState.maxSamples===m.maxSamples&&t.previousState.useGradientOpacity===m.useGradientOpacity&&t.previousState.blendMode===m.blendMode&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{if(t.lastBoundBO=n,e.getNeedToRebuildShaders(n,r,i)){const o={Vertex:null,Fragment:null,Geometry:null};e.buildShaders(o,r,i);const a=t._openGLRenderWindow.getShaderCache().readyShaderProgramArray(o.Vertex,o.Fragment,o.Geometry);a!==n.getProgram()&&(n.setProgram(a),n.getVAO().releaseGraphicsResources()),n.getShaderSourceTime().modified()}else t._openGLRenderWindow.getShaderCache().readyShaderProgram(n.getProgram());n.getVAO().bind(),e.setMapperShaderParameters(n,r,i),e.setCameraShaderParameters(n,r,i),e.setPropertyShaderParameters(n,r,i),e.getClippingPlaneShaderParameters(n,r,i)},e.setMapperShaderParameters=(n,r,i)=>{const o=n.getProgram();n.getCABO().getElementCount()&&(t.VBOBuildTime.getMTime()>n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(o.isAttributeUsed("vertexDC")&&(n.getVAO().addAttributeArray(o,n.getCABO(),"vertexDC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||yi("Error setting vertexDC in shader VAO.")),n.getAttributeUpdateTime().modified()),o.setUniformi("texture1",t.scalarTexture.getTextureUnit()),o.setUniformf("sampleDistance",e.getCurrentSampleDistance(r));const a=t.scalarTexture.getVolumeInfo(),s=t.renderable.getIpScalarRange(),l=[],u=[];for(let e=0;e<4;e++)l[e]=s[0]*a.dataComputedScale[e]+a.dataComputedOffset[e],u[e]=s[1]*a.dataComputedScale[e]+a.dataComputedOffset[e],l[e]=(l[e]-a.offset[e])/a.scale[e],u[e]=(u[e]-a.offset[e])/a.scale[e];if(o.setUniform4f("ipScalarRangeMin",l[0],l[1],l[2],l[3]),o.setUniform4f("ipScalarRangeMax",u[0],u[1],u[2],u[3]),null!==t.zBufferTexture){o.setUniformi("zBufferTexture",t.zBufferTexture.getTextureUnit());const e=t._useSmallViewport?[t._smallViewportWidth,t._smallViewportHeight]:t._openGLRenderWindow.getFramebufferSize();o.setUniformf("vpWidth",e[0]),o.setUniformf("vpHeight",e[1])}},e.setCameraShaderParameters=(n,o,a)=>{const s=t.openGLCamera.getKeyMatrices(o),l=t.openGLVolume.getKeyMatrices();r.multiply(t.modelToView,s.wcvc,l.mcwc);const u=n.getProgram(),c=t.openGLCamera.getRenderable(),d=c.getClippingRange();u.setUniformf("camThick",d[1]-d[0]),u.setUniformf("camNear",d[0]),u.setUniformf("camFar",d[1]);const p=t.currentInput.getBounds(),f=t.currentInput.getDimensions(),h=new Float64Array(3),m=new Float64Array(3);let g=1,v=-1,y=1,_=-1;for(let e=0;e<8;++e){if(T.t8(h,p[e%2],p[2+Math.floor(e/2)%2],p[4+Math.floor(e/4)]),T.fF(h,h,t.modelToView),!c.getParallelProjection()){T.Fv(m,h);const e=-d[0]/h[2];T.bA(h,m,e)}T.fF(h,h,s.vcpc),g=Math.min(h[0],g),v=Math.max(h[0],v),y=Math.min(h[1],y),_=Math.max(h[1],_)}u.setUniformf("dcxmin",g),u.setUniformf("dcxmax",v),u.setUniformf("dcymin",y),u.setUniformf("dcymax",_),u.isUniformUsed("cameraParallel")&&u.setUniformi("cameraParallel",c.getParallelProjection());const b=t.currentInput.getSpatialExtent(),x=t.currentInput.getSpacing(),w=new Float64Array(3);T.t8(w,(b[1]-b[0])*x[0],(b[3]-b[2])*x[1],(b[5]-b[4])*x[2]),u.setUniform3f("vSpacing",x[0],x[1],x[2]),T.t8(h,b[0],b[2],b[4]),t.currentInput.indexToWorldVec3(h,h),T.fF(h,h,t.modelToView),u.setUniform3f("vOriginVC",h[0],h[1],h[2]);const S=t.currentInput.getIndexToWorld();r.multiply(t.idxToView,t.modelToView,S),i.multiply(t.idxNormalMatrix,s.normalMatrix,l.normalMatrix),i.multiply(t.idxNormalMatrix,t.idxNormalMatrix,t.currentInput.getDirectionByReference());const C=T.kE(w)/e.getCurrentSampleDistance(o);C>t.renderable.getMaximumSamplesPerRay()&&vi(`The number of steps required ${Math.ceil(C)} is larger than the\n specified maximum number of steps ${t.renderable.getMaximumSamplesPerRay()}.\n Please either change the\n volumeMapper sampleDistance or its maximum number of samples.`);const M=new Float64Array(3);if(T.t8(M,1,1,1),T.cs(M,M,w),u.setUniform3f("vVCToIJK",M[0],M[1],M[2]),u.setUniform3i("volumeDimensions",f[0],f[1],f[2]),!t._openGLRenderWindow.getWebgl2()){const e=t.scalarTexture.getVolumeInfo();u.setUniformf("texWidth",t.scalarTexture.getWidth()),u.setUniformf("texHeight",t.scalarTexture.getHeight()),u.setUniformi("xreps",e.xreps),u.setUniformi("xstride",e.xstride),u.setUniformi("ystride",e.ystride)}const D=new Float64Array(3),A=new Float64Array(3);for(let e=0;e<6;++e){switch(e){case 1:T.t8(D,-1,0,0),T.t8(A,b[0],b[2],b[4]);break;case 2:T.t8(D,0,1,0),T.t8(A,b[1],b[3],b[5]);break;case 3:T.t8(D,0,-1,0),T.t8(A,b[0],b[2],b[4]);break;case 4:T.t8(D,0,0,1),T.t8(A,b[1],b[3],b[5]);break;case 5:T.t8(D,0,0,-1),T.t8(A,b[0],b[2],b[4]);break;default:T.t8(D,1,0,0),T.t8(A,b[1],b[3],b[5])}T.kK(D,D,t.idxNormalMatrix),T.fF(A,A,t.idxToView);const n=-1*T.AK(A,D);u.setUniform3f(`vPlaneNormal${e}`,D[0],D[1],D[2]),u.setUniformf(`vPlaneDistance${e}`,n)}if(a.getProperty().getUseLabelOutline()){const n=t.currentInput.getWorldToIndex();u.setUniformMatrix("vWCtoIDX",n);const i=o.getActiveCamera(),[a,s]=i.getClippingRange(),l=i.getDistance();i.setClippingRange(l,l+.1);const c=t.openGLCamera.getKeyMatrices(o);r.invert(t.projectionToWorld,c.wcpc),i.setClippingRange(a,s),t.openGLCamera.getKeyMatrices(o),u.setUniformMatrix("PCWCMatrix",t.projectionToWorld);const d=e.getRenderTargetSize();u.setUniformf("vpWidth",d[0]),u.setUniformf("vpHeight",d[1]);const p=e.getRenderTargetOffset();u.setUniformf("vpOffsetX",p[0]/d[0]),u.setUniformf("vpOffsetY",p[1]/d[1])}if(r.invert(t.projectionToView,s.vcpc),u.setUniformMatrix("PCVCMatrix",t.projectionToView),0===t.lastLightComplexity)return;let P=0;const k=[],L=[],O=[];if(o.getLights().forEach((e=>{if(e.getSwitch()>0){const t=e.getColor(),n=e.getIntensity();k[0+3*P]=t[0]*n,k[1+3*P]=t[1]*n,k[2+3*P]=t[2]*n;const r=e.getDirection();T.t8(D,r[0],r[1],r[2]),T.kK(D,D,s.normalMatrix),T.Fv(D,D),L[0+3*P]=D[0],L[1+3*P]=D[1],L[2+3*P]=D[2],O[0+3*P]=-.5*D[0],O[1+3*P]=-.5*D[1],O[2+3*P]=-.5*(D[2]-1),P++}})),u.setUniformi("twoSidedLighting",o.getTwoSidedLighting()),u.setUniformi("lightNum",P),u.setUniform3fv("lightColor",k),u.setUniform3fv("lightDirectionVC",L),u.setUniform3fv("lightHalfAngleVC",O),3===t.lastLightComplexity){P=0;const e=[],n=[],r=[],i=[],a=[];o.getLights().forEach((o=>{if(o.getSwitch()>0){const s=o.getAttenuationValues();n[0+3*P]=s[0],n[1+3*P]=s[1],n[2+3*P]=s[2],i[P]=o.getExponent(),r[P]=o.getConeAngle(),a[P]=o.getPositional();const l=o.getTransformedPosition();T.fF(l,l,t.modelToView),e[0+3*P]=l[0],e[1+3*P]=l[1],e[2+3*P]=l[2],P+=1}})),u.setUniform3fv("lightPositionVC",e),u.setUniform3fv("lightAttenuation",n),u.setUniformfv("lightConeAngle",r),u.setUniformfv("lightExponent",i),u.setUniformiv("lightPositional",a)}if(t.renderable.getVolumetricScatteringBlending()>0&&(u.setUniformf("giReach",t.renderable.getGlobalIlluminationReach()),u.setUniformf("volumetricScatteringBlending",t.renderable.getVolumetricScatteringBlending()),u.setUniformf("volumeShadowSamplingDistFactor",t.renderable.getVolumeShadowSamplingDistFactor()),u.setUniformf("anisotropy",t.renderable.getAnisotropy()),u.setUniformf("anisotropy2",t.renderable.getAnisotropy()**2)),t.renderable.getLocalAmbientOcclusion()&&a.getProperty().getAmbient()>0){const e=t.renderable.getLAOKernelSize();u.setUniformi("kernelSize",e);const n=[];for(let t=0;t{const i=e.getProgram();i.setUniformi("ctexture",t.colorTexture.getTextureUnit()),i.setUniformi("otexture",t.opacityTexture.getTextureUnit()),i.setUniformi("jtexture",t.jitterTexture.getTextureUnit());const o=t.scalarTexture.getVolumeInfo(),a=r.getProperty(),s=t.scalarTexture.getComponents(),l=r.getProperty().getIndependentComponents();if(l&&s>=2)for(let e=0;e0&&(i.setUniformf("vAmbient",a.getAmbient()),i.setUniformf("vDiffuse",a.getDiffuse()),i.setUniformf("vSpecular",a.getSpecular()),i.setUniformf("vSpecularPower",a.getSpecularPower()))},e.getClippingPlaneShaderParameters=(e,n,r)=>{if(t.renderable.getClippingPlanes().length>0){const r=t.openGLCamera.getKeyMatrices(n),i=[],o=[],a=[],s=t.renderable.getClippingPlanes(),l=s.length;for(let e=0;e{t._animationRateSubscription&&(t._animationRateSubscription.unsubscribe(),t._animationRateSubscription=null)}),e.delete),e.getRenderTargetSize=()=>{if(t._useSmallViewport)return[t._smallViewportWidth,t._smallViewportHeight];const{usize:e,vsize:n}=t._openGLRenderer.getTiledSizeAndOrigin();return[e,n]},e.getRenderTargetOffset=()=>{const{lowerLeftU:e,lowerLeftV:n}=t._openGLRenderer.getTiledSizeAndOrigin();return[e,n]},e.getCurrentSampleDistance=e=>{const n=e.getVTKWindow().getInteractor(),r=t.renderable.getSampleDistance();if(n.isAnimating()){return r*t.renderable.getInteractionSampleDistanceFactor()}return r},e.renderPieceStart=(n,r)=>{const i=n.getVTKWindow().getInteractor();if(t._lastScale||(t._lastScale=t.renderable.getInitialInteractionScale()),t._useSmallViewport=!1,i.isAnimating()&&t._lastScale>1.5&&(t._useSmallViewport=!0),t._animationRateSubscription||(t._animationRateSubscription=i.onAnimationFrameRateUpdate((()=>{if(t.renderable.getAutoAdjustSampleDistances()){const e=i.getRecentAnimationFrameRate(),n=i.getDesiredUpdateRate()/e;(n>1.15||n<.85)&&(t._lastScale*=n),t._lastScale>400&&(t._lastScale=400),t._lastScale<1.5&&(t._lastScale=1.5)}else t._lastScale=t.renderable.getImageSampleDistance()*t.renderable.getImageSampleDistance()}))),t._useSmallViewport){const e=t._openGLRenderWindow.getFramebufferSize(),n=1/Math.sqrt(t._lastScale);if(t._smallViewportWidth=Math.ceil(n*e[0]),t._smallViewportHeight=Math.ceil(n*e[1]),t._smallViewportHeight>e[1]&&(t._smallViewportHeight=e[1]),t._smallViewportWidth>e[0]&&(t._smallViewportWidth=e[0]),t.framebuffer.saveCurrentBindingsAndBuffers(),null===t.framebuffer.getGLFramebuffer())t.framebuffer.create(e[0],e[1]),t.framebuffer.populateFramebuffer();else{const n=t.framebuffer.getSize();n[0]===e[0]&&n[1]===e[1]||(t.framebuffer.create(e[0],e[1]),t.framebuffer.populateFramebuffer())}t.framebuffer.bind();const r=t.context;r.clearColor(0,0,0,0),r.colorMask(!0,!0,!0,!0),r.clear(r.COLOR_BUFFER_BIT),r.viewport(0,0,t._smallViewportWidth,t._smallViewportHeight),t.fvp=[t._smallViewportWidth/e[0],t._smallViewportHeight/e[1]]}t.context.disable(t.context.DEPTH_TEST),e.updateBufferObjects(n,r);r.getProperty().getInterpolationType()===mi.ZG.NEAREST?(t.scalarTexture.setMinificationFilter(Nr.wn.NEAREST),t.scalarTexture.setMagnificationFilter(Nr.wn.NEAREST)):(t.scalarTexture.setMinificationFilter(Nr.wn.LINEAR),t.scalarTexture.setMagnificationFilter(Nr.wn.LINEAR)),t.lastBoundBO=null,null!==t.zBufferTexture&&t.zBufferTexture.activate()},e.renderPieceDraw=(n,r)=>{const i=t.context;t.scalarTexture.activate(),t.opacityTexture.activate(),t.colorTexture.activate(),t.jitterTexture.activate(),e.updateShaders(t.tris,n,r),i.drawArrays(i.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.scalarTexture.deactivate(),t.colorTexture.deactivate(),t.opacityTexture.deactivate(),t.jitterTexture.deactivate()},e.renderPieceFinish=(e,n)=>{if(null!==t.zBufferTexture&&t.zBufferTexture.deactivate(),t._useSmallViewport){if(t.framebuffer.restorePreviousBindingsAndBuffers(),null===t.copyShader){t.copyShader=t._openGLRenderWindow.getShaderCache().readyShaderProgramArray(["//VTK::System::Dec","attribute vec4 vertexDC;","uniform vec2 tfactor;","varying vec2 tcoord;","void main() { tcoord = vec2(vertexDC.x*0.5 + 0.5, vertexDC.y*0.5 + 0.5) * tfactor; gl_Position = vertexDC; }"].join("\n"),["//VTK::System::Dec","//VTK::Output::Dec","uniform sampler2D texture1;","varying vec2 tcoord;","void main() { gl_FragData[0] = texture2D(texture1,tcoord); }"].join("\n"),"");const e=t.copyShader;t.copyVAO=hi.ZP.newInstance(),t.copyVAO.setOpenGLRenderWindow(t._openGLRenderWindow),t.tris.getCABO().bind(),t.copyVAO.addAttributeArray(e,t.tris.getCABO(),"vertexDC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||yi("Error setting vertexDC in copy shader VAO.")}else t._openGLRenderWindow.getShaderCache().readyShaderProgram(t.copyShader);const e=t._openGLRenderWindow.getFramebufferSize();t.context.viewport(0,0,e[0],e[1]);const n=t.framebuffer.getColorTexture();n.activate(),t.copyShader.setUniformi("texture",n.getTextureUnit()),t.copyShader.setUniform2f("tfactor",t.fvp[0],t.fvp[1]);const r=t.context;r.blendFuncSeparate(r.ONE,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),n.deactivate(),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)}},e.renderPiece=(n,r)=>{e.invokeEvent({type:"StartEvent"}),t.renderable.update(),t.currentInput=t.renderable.getInputData(),e.invokeEvent({type:"EndEvent"}),t.currentInput?(e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r)):yi("No input!")},e.computeBounds=(n,r)=>{e.getInput()?t.bounds=e.getInput().getBounds():(0,st.u)(t.Bounds)},e.updateBufferObjects=(t,n)=>{e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=(n,r)=>t.VBOBuildTime.getMTime(){const i=t.currentInput;if(!i)return;const o=i.getPointData()&&i.getPointData().getScalars();if(!o)return;const a=r.getProperty();if(!t.jitterTexture.getHandle()){const e=new Uint8Array(1024);for(let t=0;t<1024;++t)e[t]=255*Math.random();t.jitterTexture.setMinificationFilter(Nr.wn.LINEAR),t.jitterTexture.setMagnificationFilter(Nr.wn.LINEAR),t.jitterTexture.create2DFromRaw(32,32,1,Br.Tu.UNSIGNED_CHAR,e)}const s=o.getNumberOfComponents(),l=a.getIndependentComponents()?s:1;let u=`${a.getMTime()}`;if(t.opacityTextureString!==u){const r=1024,i=2*r*l,o=new Float32Array(i),s=new Float32Array(r);for(let t=0;t1?1:-1,e[3*t+2]=-1;const n=new Uint16Array(8);n[0]=3,n[1]=0,n[2]=1,n[3]=3,n[4]=3,n[5]=0,n[6]=3,n[7]=2;const r=ct.ZP.newInstance({numberOfComponents:3,values:e});r.setName("points");const i=ct.ZP.newInstance({numberOfComponents:1,values:n});t.tris.getCABO().createVBO(i,"polys",$n.hX.SURFACE,{points:r,cellOffset:0})}t.VBOBuildTime.modified()}}const bi={context:null,VBOBuildTime:null,scalarTexture:null,scalarTextureString:null,opacityTexture:null,opacityTextureString:null,colorTexture:null,colorTextureString:null,jitterTexture:null,tris:null,framebuffer:null,copyShader:null,copyVAO:null,lastXYF:1,targetXYF:1,zBufferTexture:null,lastZBufferTexture:null,lastLightComplexity:0,fullViewportTime:1,idxToView:null,idxNormalMatrix:null,modelToView:null,projectionToView:null,avgWindowArea:0,avgFrameTime:0};function xi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bi,n),a.Z.extend(e,t,n),t.VBOBuildTime={},(0,o.o)(t.VBOBuildTime,{mtime:0}),t.tris=Bt.ZP.newInstance(),t.scalarTexture=Ft.ZP.newInstance(),t.opacityTexture=Ft.ZP.newInstance(),t.colorTexture=Ft.ZP.newInstance(),t.jitterTexture=Ft.ZP.newInstance(),t.jitterTexture.setWrapS(Nr.Eq.REPEAT),t.jitterTexture.setWrapT(Nr.Eq.REPEAT),t.framebuffer=fi.ZP.newInstance(),t.idxToView=r.identity(new Float64Array(16)),t.idxNormalMatrix=i.identity(new Float64Array(9)),t.modelToView=r.identity(new Float64Array(16)),t.projectionToView=r.identity(new Float64Array(16)),t.projectionToWorld=r.identity(new Float64Array(16)),(0,o.e)(e,t,["context"]),_i(e,t)}const wi=(0,o.n)(xi,"vtkOpenGLVolumeMapper");(0,s.vw)("vtkVolumeMapper",wi);const{vtkDebugMacro:Si}=o.c;function Ci(e,t){t.classHierarchy.push("vtkOpenGLPixelSpaceCallbackMapper"),e.opaquePass=(n,r)=>{t._openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t._openGLRenderWindow=t._openGLRenderer.getParent();const i=t._openGLRenderer.getAspectRatio(),o=t._openGLRenderer?t._openGLRenderer.getRenderable().getActiveCamera():null,a=t._openGLRenderer.getTiledSizeAndOrigin();let s=null;if(t.renderable.getUseZValues()){const e=r.getZBufferTexture(),n=Math.floor(e.getWidth()),i=Math.floor(e.getHeight()),o=t._openGLRenderWindow.getContext();e.bind();const a=r.getFramebuffer();a?a.saveCurrentBindingsAndBuffers():Si("No framebuffer to save/restore");const l=o.createFramebuffer();o.bindFramebuffer(o.FRAMEBUFFER,l),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,e.getHandle(),0),o.checkFramebufferStatus(o.FRAMEBUFFER)===o.FRAMEBUFFER_COMPLETE&&(s=new Uint8Array(n*i*4),o.viewport(0,0,n,i),o.readPixels(0,0,n,i,o.RGBA,o.UNSIGNED_BYTE,s)),a&&a.restorePreviousBindingsAndBuffers(),o.deleteFramebuffer(l)}t.renderable.invokeCallback(t.renderable.getInputData(),o,i,a,s)},e.queryPass=(e,n)=>{e&&t.renderable.getUseZValues()&&n.requestDepth()}}const Ti={};function Mi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ti,n),a.Z.extend(e,t,n),Ci(e,t)}const Di=(0,o.n)(Mi,"vtkOpenGLPixelSpaceCallbackMapper");(0,s.vw)("vtkPixelSpaceCallbackMapper",Di);var Ai="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtktextureObjectVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexDC;\nattribute vec2 tcoordDC;\nvarying vec2 tcoordVC;\n\nvoid main()\n{\n tcoordVC = tcoordDC;\n gl_Position = vertexDC;\n}\n";const{Representation:Pi}=Ut.ZP;function ki(e,t,n,r){let[i,o]=t;const a=e.getContext(),s=Ft.ZP.newInstance({autoParameters:!1,wrapS:r,wrapT:r,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:a.FLOAT,baseLevel:0,maxLevel:0});return s.setOpenGLRenderWindow(e),s.setInternalFormat(a.RGBA32F),s.create2DFromRaw(i,o,4,"Float32Array",null),s.activate(),s.sendParameters(),s.deactivate(),s}function Li(e,t){return ki(e,t,Ft.ZP.Filter.NEAREST,Ft.ZP.Wrap.CLAMP_TO_EDGE)}function Oi(e,t){var n,r;(t.classHierarchy.push("vtkLICPingPongBufferManager"),t._openGLRenderWindow)?(t.quad=function(e){const t=Bt.ZP.newInstance();t.setOpenGLRenderWindow(e);const n=new Float32Array(12);for(let e=0;e<4;e++)n[3*e]=e%2*2-1,n[3*e+1]=e>1?1:-1,n[3*e+2]=0;const r=new Float32Array([0,0,1,0,0,1,1,1]),i=new Uint16Array(8);i[0]=3,i[1]=0,i[2]=1,i[3]=3,i[4]=3,i[5]=0,i[6]=3,i[7]=2;const o=ct.ZP.newInstance({numberOfComponents:3,values:n});o.setName("points");const a=ct.ZP.newInstance({numberOfComponents:1,values:i}),s=ct.ZP.newInstance({numberOfComponents:2,values:r});return t.getCABO().createVBO(a,"polys",Pi.SURFACE,{points:o,cellOffset:0,tcoords:s}),t}(t._openGLRenderWindow),t.context=t._openGLRenderWindow.getContext(),t.licTexture0=Li(t._openGLRenderWindow,t.size),t.seedTexture0=Li(t._openGLRenderWindow,t.size),t.licTexture1=Li(t._openGLRenderWindow,t.size),t.seedTexture1=Li(t._openGLRenderWindow,t.size),t.eeTexture=t.doEEPass?(n=t._openGLRenderWindow,r=t.size,ki(n,r,Ft.ZP.Filter.NEAREST,Ft.ZP.Wrap.CLAMP_TO_EDGE)):null,t.imageVectorTexture=t.doVTPass?function(e,t){return ki(e,t,Ft.ZP.Filter.LINEAR,Ft.ZP.Wrap.CLAMP_TO_EDGE)}(t._openGLRenderWindow,t.size):null,t.pingTextures[0]=t.licTexture0,t.pingTextures[1]=t.seedTexture0,t.pongTextures[0]=t.licTexture1,t.pongTextures[1]=t.seedTexture1,t.textures[0]=t.pingTextures,t.textures[1]=t.pongTextures,e.swap=()=>{t.readIndex=1-t.readIndex},e.renderQuad=(e,n)=>{const r=t.quad,i=t.context;let o=t.quadVAO;o||(o=hi.ZP.newInstance(),o.setOpenGLRenderWindow(t._openGLRenderWindow),t.quadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),i.drawArrays(i.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.getLastLICBuffer=()=>0===t.readIndex?t.licTexture0:t.licTexture1,e.getLastSeedBuffer=()=>0===t.readIndex?t.seedTexture0:t.seedTexture1,e.getLICBuffer=()=>1-t.readIndex==0?t.licTexture0:t.licTexture1,e.getSeedBuffer=()=>1-t.readIndex==0?t.seedTexture0:t.seedTexture1,e.getLICTextureUnit=()=>{const e=t.textures[t.readIndex][0];return e.activate(),e.getTextureUnit()},e.getSeedTextureUnit=()=>{const e=t.textures[t.readIndex][1];return e.activate(),e.getTextureUnit()},e.getNoiseTextureUnit=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return 0===e?(t.noiseTexture.activate(),t.noiseTexture.getTextureUnit()):(t.eeTexture.activate(),t.eeTexture.getTextureUnit())},e.getVectorTextureUnit=()=>(t.vectorTexture.activate(),t.vectorTexture.getTextureUnit()),e.getImageVectorTextureUnit=()=>t.imageVectorTexture?(t.imageVectorTexture.activate(),t.imageVectorTexture.getTextureUnit()):e.getVectorTextureUnit(),e.getMaskVectorTextureUnit=()=>t.maskVectorTexture?(t.maskVectorTexture.activate(),t.maskVectorTexture.getTextureUnit()):e.getImageVectorTextureUnit(),e.clearBuffers=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),n.setColorBuffer(t.licTexture0,0),n.setColorBuffer(t.seedTexture0,1),n.setColorBuffer(t.licTexture1,2),n.setColorBuffer(t.seedTexture1,3);const i=[r.COLOR_ATTACHMENT0,r.COLOR_ATTACHMENT1,r.COLOR_ATTACHMENT2,r.COLOR_ATTACHMENT3];e&&(n.removeColorBuffer(4),n.setColorBuffer(t.eeTexture,4),i.push(r.COLOR_ATTACHMENT4)),r.drawBuffers(i),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),e&&n.removeColorBuffer(4),r.drawBuffers([r.NONE])},e.clearBuffer=e=>{const n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.setColorBuffer(e,0),r.drawBuffers([r.COLOR_ATTACHMENT0]),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(e,0),r.drawBuffers([r.NONE])},e.activateVectorTextures=()=>{t.imageVectorTexture?t.imageVectorTexture.activate():t.vectorTexture.activate(),t.maskVectorTexture&&t.maskVectorTexture.activate()},e.deactivateVectorTextures=()=>{t.imageVectorTexture?t.imageVectorTexture.deactivate():t.vectorTexture.deactivate(),t.maskVectorTexture&&t.maskVectorTexture.deactivate()},e.activateNoiseTexture=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.activate();break;case 1:t.eeTexture.activate();break;default:console.error("Wrong LIC pass number")}},e.deactivateNoiseTexture=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.deactivate();break;case 1:t.eeTexture.deactivate();break;default:console.error("Wrong LIC pass number")}},e.attachLICBuffers=()=>{const e=t.textures[t.readIndex],n=t.textures[1-t.readIndex],r=t.framebuffer,i=t.context;e[0].activate(),e[1].activate(),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(n[0],0),r.setColorBuffer(n[1],1),i.drawBuffers([i.COLOR_ATTACHMENT0,i.COLOR_ATTACHMENT1])},e.detachLICBuffers=()=>{const e=t.textures[t.readIndex],n=t.context,r=t.framebuffer;e[0].deactivate(),e[1].deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE])},e.attachImageVectorBuffer=()=>{const e=t.framebuffer,n=t.context;t.vectorTexture.activate(),e.removeColorBuffer(0),e.setColorBuffer(t.imageVectorTexture,0),n.drawBuffers([n.COLOR_ATTACHMENT0])},e.detachImageVectorBuffer=()=>{const e=t.context,n=t.framebuffer;t.vectorTexture.deactivate(),n.removeColorBuffer(0),e.drawBuffers([e.NONE])},e.attachEEBuffer=()=>{t.textures[t.readIndex][0].activate(),t.framebuffer.removeColorBuffer(0),t.framebuffer.setColorBuffer(t.eeTexture,0);const e=t.context;e.drawBuffers([e.COLOR_ATTACHMENT0])},e.detachEEBuffer=()=>{const e=t.context;t.framebuffer.removeColorBuffer(0),e.drawBuffers([e.NONE]);t.textures[t.readIndex][0].deactivate()},e.detachBuffers=()=>{const e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),e.drawBuffers([e.NONE]);const r=t.textures[t.readIndex],i=t.textures[1-t.readIndex];r[0]&&r[0].deactivate(),r[1]&&r[1].deactivate(),i[0]&&i[0].deactivate(),i[1]&&i[1].deactivate(),t.eeTexture&&t.eeTexture.deactivate(),t.noiseTexture&&t.noiseTexture.deactivate()},e.getWriteIndex=()=>1-t.readIndex,e.detachBuffers()):console.error("Pass renderwindow to ping pong manager")}const Ei={vectorTexture:null,maskVectorTexture:null,noiseTexture:null,doEEPass:!1,doVTPass:!1,readIndex:0,quad:null,lastProgramHash:null,framebuffer:null,size:null,pingTextures:[],pongTextures:[],textures:[]};function Ii(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ei,n),o.m.obj(e,t),o.m.get(e,t,["readIndex"]),o.m.setGet(e,t,["doEEPass","doVTPass","_openGLRenderWindow","vectorTexture","maskVectorTexture","noiseTexture","framebuffer","size"]),o.m.moveToProtected(e,t,["openGLRenderWindow"]),Oi(e,t)}var Ni={newInstance:o.m.newInstance(Ii,"vtkLICPingPongBufferManager"),extend:Ii};const Ri={NONE:0,LIC:1,COLOR:2,BOTH:3},Bi={UNIFORM:0,GAUSSIAN:1},Fi={BLEND:0,MULTIPLY:1};function Vi(e,t){function n(e,t){e.setUniformi("texLIC",t.getLICTextureUnit()),e.setUniformi("texSeedPts",t.getSeedTextureUnit())}function r(e,t,n){e.attachLICBuffers(),e.renderQuad(t,n),e.detachLICBuffers(),e.swap()}t.classHierarchy.push("vtkLineIntegralConvolution2D"),e.buildAShader=e=>t._openGLRenderWindow.getShaderCache().readyShaderProgramArray(Ai,e,""),e.dumpTextureValues=function(e,n){let[r,i]=n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t._openGLRenderWindow,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4;const l=fi.ZP.newInstance(),u=o;let c=null;return l.setOpenGLRenderWindow(a),l.saveCurrentBindingsAndBuffers(),l.create(r,i),l.populateFramebuffer(),l.setColorBuffer(e),c=new Float32Array(r*i*s),u.readPixels(0,0,r,i,4===s?u.RGBA:u.RGB,u.FLOAT,c),l.restorePreviousBindingsAndBuffers(),c},e.getTextureMinMax=function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t._openGLRenderWindow;const a=e.dumpTextureValues(n,r,i,o,4);let s=Number.MAX_VALUE,l=Number.MIN_VALUE;for(let e=0;el&&(l=t)}return{min:s,max:l}},e.getComponentSelectionProgram=e=>{const t="xyzw";return`.${t[e[0]]}${t[e[1]]}`},e.buildShaders=()=>{t.LIC0ShaderProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LIC0.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n/**\nThis shader initializes the convolution for the LIC computation.\n*/\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texMaskVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\n\nuniform int uStepNo; // in step 0 initialize lic and seeds, else just seeds\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uMaskThreshold; // if |V| < uMaskThreshold render transparent\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the *whole* domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value. this\n// depends on the pass number.\nvec2 getNoiseTC(vec2 vectc)\n{\n // in pass 1 : convert from vector tc to noise tc\n // in pass 2 : use vector tc\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(vectc);\n }\n else\n {\n return vectc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the\n// need to convert to noise texture coordinates.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\nvoid main(void)\n{\n vec2 vectc = tcoordVC.st;\n\n // lic => (convolution, mask, 0, step count)\n if (uStepNo == 0)\n {\n float maskCriteria = length(texture2D(texMaskVectors, vectc).xyz);\n float maskFlag;\n if (maskCriteria <= uMaskThreshold)\n {\n maskFlag = 1.0;\n }\n else\n {\n maskFlag = 0.0;\n }\n float noise = getNoise(vectc);\n LICOutput = vec4(noise, maskFlag, 0.0, 1.0);\n }\n else\n {\n LICOutput = texture2D(texLIC, vectc);\n }\n\n // initial seed\n SeedOutput = vec4(vectc, 0.0, 1.0);\n}\n");const n=Gt.Z.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_VT.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// move vector field to normalized image space\n// pre-processing for vtkLineIntegralConvolution2D\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Fragment shader used by the gaussian blur filter render pass.\n\nuniform sampler2D texVectors; // input texture\nuniform vec2 uTexSize; // size of texture\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n //VTK::LICComponentSelection::Impl\n V = V/uTexSize;\n gl_FragData[0] = vec4(V, 0.0, 1.0);\n}\n","//VTK::LICComponentSelection::Impl",`vec2 V = texture2D(texVectors, tcoordVC.st)${e.getComponentSelectionProgram(t.componentIds)};`).result;t.VTProgram=e.buildAShader(n);const r=Gt.Z.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs1.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\nuniform sampler2D texSeedPts;\n\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uStepSize; // step size in parametric space\n\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n//VTK::LICVectorLookup::Impl\n\n// We need to do this manually since CLAMP_TO_BORDER and and borderColor\n// are very poorly supported in webgl\nvec2 clampToBorder(vec2 uv){\n if(uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0)\n {\n return vec2(0.0, 0.0);\n }\n return getVector(uv);\n}\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the whole domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value.\n// in pass 1 repeatedly tile the noise texture across\n// the computational domain.\nvec2 getNoiseTC(vec2 tc)\n{\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(tc);\n }\n else\n {\n return tc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the need\n// to convert to either noise or lic texture coordinates in\n// pass 1 and 2 respectively.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\n// fourth-order Runge-Kutta streamline integration\n// no bounds checks are made, therefore it's essential\n// to have the entire texture initialized to 0\n// and set clamp to border and have border color 0\n// an integer is set if the step was taken, keeping\n// an accurate step count is necessary to prevent\n// boundary artifacts. Don't count the step if\n// all vector lookups are identically 0. This is\n// a proxy for \"stepped outside valid domain\"\nvec2 rk4(vec2 pt0, float dt, out bool count)\n{\n count=true;\n float dtHalf = dt * 0.5;\n vec2 pt1;\n\n vec2 v0 = clampToBorder(pt0);\n pt1 = pt0 + v0 * dtHalf;\n\n vec2 v1 = clampToBorder(pt1);\n pt1 = pt0 + v1 * dtHalf;\n\n vec2 v2 = clampToBorder(pt1);\n pt1 = pt0 + v2 * dt;\n\n vec2 v3 = clampToBorder(pt1);\n vec2 vSum = v0 + v1 + v1 + v2 + v2 + v3;\n\n if (vSum == vec2(0.0, 0.0))\n {\n count = false;\n }\n\n pt1 = pt0 + (vSum) * (dt * (1.0/6.0));\n\n return pt1;\n}\n\nvoid main(void)\n{\n vec2 lictc = tcoordVC.st;\n vec4 lic = texture2D(texLIC, lictc);\n vec2 pt0 = texture2D(texSeedPts, lictc).st;\n\n bool count;\n vec2 pt1 = rk4(pt0, uStepSize, count);\n\n if (count)\n {\n // accumulate lic step\n // (lic, mask, 0, step count)\n float noise = getNoise(pt1);\n LICOutput = vec4(lic.r + noise, lic.g, 0.0, lic.a + 1.0);\n SeedOutput = vec4(pt1, 0.0, 1.0);\n }\n else\n {\n // keep existing values\n LICOutput = lic;\n SeedOutput = vec4(pt0, 0.0, 1.0);\n }\n}\n","//VTK::LICVectorLookup::Impl",function(){const e="\n vec2 getVector( vec2 vectc )\n\n {\n\n vec2 V = texture2D( texVectors, vectc ).xy;\n\n // normalize if |V| not 0\n\n float lenV = length( V );\n\n if ( lenV > 1.0e-8 )\n\n {\n\n return V/lenV;\n\n }\n\n else\n\n {\n\n return vec2( 0.0, 0.0 );\n\n }\n\n }\n\n ",t="\n vec2 getVector( vec2 vectc )\n\n {\n\n return texture2D( texVectors, vectc ).xy;\n\n }\n\n ";return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?t:e}(t.normalizeVectors),!0).result;t.LICIShaderProgram=e.buildAShader(r),t.LICNShaderProgram=e.buildAShader(" //VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LICN.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n/**\nThis shader finalizes the convolution for the LIC computation\napplying the normalization. eg. if box kernel is used the this\nis the number of steps taken.\n*/\n\nuniform sampler2D texLIC;\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n vec4 conv = texture2D(texLIC, tcoordVC.st);\n conv.r = conv.r/conv.a;\n // lic => (convolution, mask, 0, 1)\n LICOutput = vec4(conv.rg , 0.0, 1.0);\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.CEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// gray scale contrast enhance stage implemented via histogram stretching\n// if the min and max are tweaked it can generate out-of-range values\n// these will be clamped in 0 to 1\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uMin; // min gray scale color value\nuniform float uMaxMinDiff; // max-min\n\nin vec2 tcoordVC;\n\nvoid main( void )\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g!=0.0)\n {\n LICOutput = lic;\n }\n else\n {\n float CElic = clamp((lic.r - uMin)/uMaxMinDiff, 0.0, 1.0);\n LICOutput = vec4(CElic, lic.gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.EEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// high-pass filter stage employed by vtkLineIntegralConvolution2D\n// between LIC pass 1 and LIC pass 2. filtered LIC pass 1, becomes\n// noise for pass2.\n\n// the output of this shader\nlayout(location = 0) out vec4 EEOutput;\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uDx; // fragment size\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n// kernel for simple laplace edge enhancement.\n// p=Laplace(p)+p\nfloat K[9] = float[9](\n -1.0, -1.0, -1.0,\n -1.0, 9.0, -1.0,\n -1.0, -1.0, -1.0\n );\n\n// determine if the fragment was masked\nbool Masked(float val) { return val != 0.0; }\n\nvoid main(void)\n{\n // tex coord neighbor offsets\n vec2 fragDx[9] = vec2[9](\n vec2(-uDx, uDy), vec2(0.0, uDy), vec2(uDx, uDy),\n vec2(-uDx, 0.0), vec2(0.0, 0.0), vec2(uDx, 0.0),\n vec2(-uDx,-uDy), vec2(0.0,-uDy), vec2(uDx,-uDy)\n );\n\n vec2 lictc = tcoordVC.st;\n\n // compute the convolution but don't use convovled values if\n // any masked fragments on the stencil. Fragments outside\n // the valid domain are masked during initialization, and\n // texture wrap parameters are clamp to border with border\n // color that contains masked flag\n float conv = 0.0;\n bool dontUse = false;\n for (int i=0; i<9; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n vec4 lic = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic.g);\n conv = conv + K[i] * lic.r;\n }\n\n if (dontUse)\n {\n EEOutput = vec4(texture2D(texLIC, lictc).rg, 0.0, 1.0);\n }\n else\n {\n conv = clamp(conv, 0.0, 1.0);\n EEOutput = vec4(conv,texture2D(texLIC, lictc).g, 0.0, 1.0);\n }\n\n}\n"),t.AAHProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAH.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// horizontal pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDx; // fragment size\n\nin vec2 tcoordVC;\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDx[3] = vec2[3](vec2(-uDx,0.0), vec2(0.0,0.0), vec2(uDx,0.0));\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.AAVProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAV.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// vertical pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDy[3] = vec2[3](vec2(0.0,-uDy), vec2(0.0,0.0), vec2(0.0,uDy));\n\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDy[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n")},e.executeLIC=(i,o,a,s,l,u)=>{if(t._openGLRenderWindow=l,t.context=l.getContext(),Object.assign(t,u),i[0]<=0||i[1]<=0)return null;const c=[1/i[0],1/i[1]];let d=t.stepSize*Math.sqrt(c[0]*c[0]+c[1]*c[1]);d<=0&&(d=1e-10);const p=t.context;let f=t.framebuffer;f&&i[0]===f.getSize()[0]&&i[1]===f.getSize()[1]||(f=fi.ZP.newInstance(),f.setOpenGLRenderWindow(t._openGLRenderWindow),f.saveCurrentBindingsAndBuffers(),f.create(...i),f.populateFramebuffer(),f.restorePreviousBindingsAndBuffers(),t.framebuffer=f),f.saveCurrentBindingsAndBuffers(),f.bind(),p.viewport(0,0,...i),p.scissor(0,0,...i),t.shadersNeedBuild&&(e.buildShaders(),t.shadersNeedBuild=!1),t.bufs?(t.bufs.setVectorTexture(o),t.bufs.setMaskVectorTexture(a),t.bufs.setNoiseTexture(s)):t.bufs=Ni.newInstance({openGLRenderWindow:l,doEEPass:t.enhancedLIC,doVTPass:t.transformVectors,vectorTexture:o,maskVectorTexture:a,noiseTexture:s,framebuffer:f,size:i});const h=[(s.getWidth()+1)/i[0],(s.getHeight()+1)/i[1]],m=1/i[0],g=1/i[1],v=t._openGLRenderWindow.getShaderCache();if(t.transformVectors){const e=t.VTProgram;v.readyShaderProgram(e),t.bufs.attachImageVectorBuffer(),e.setUniform2f("uTexSize",...i),e.setUniformi("texVectors",t.bufs.getVectorTextureUnit()),p.clearColor(0,0,0,0),p.clear(p.COLOR_BUFFER_BIT),t.bufs.renderQuad(i,e),t.bufs.detachImageVectorBuffer()}t.bufs.clearBuffers(t.enhancedLIC),t.bufs.activateVectorTextures(),t.bufs.activateNoiseTexture(0);const{LIC0ShaderProgram:y}=t;v.readyShaderProgram(y),y.setUniformi("uStepNo",0),y.setUniformi("uPassNo",0),y.setUniformf("uMaskThreshold",t.maskThreshold),y.setUniform2f("uNoiseBoundsPt1",...h),y.setUniformi("texMaskVectors",t.bufs.getMaskVectorTextureUnit()),y.setUniformi("texLIC",t.bufs.getLICTextureUnit()),y.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0)),r(t.bufs,i,y);const{LICIShaderProgram:_}=t;v.readyShaderProgram(_),_.setUniformi("uPassNo",0),_.setUniformf("uStepSize",-d),_.setUniform2f("uNoiseBoundsPt1",...h),_.setUniformi("texVectors",t.bufs.getImageVectorTextureUnit()),_.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0));for(let e=0;e{const o=t._openGLRenderWindow.getShaderCache();let{min:a,max:s}=e.getTextureMinMax(t.bufs.getLastLICBuffer(),i,t.context,t._openGLRenderWindow);(s<=a||s>1||a<0)&&(console.error("Invalid color range: ",a,s),a=0,s=1);let l=s-a;n&&(a+=l*t.lowLICContrastEnhancementFactor,s-=l*t.highLICContrastEnhancementFactor,l=s-a);const{CEProgram:u}=t;o.readyShaderProgram(u),u.setUniformi("texLIC",t.bufs.getLICTextureUnit()),u.setUniformf("uMin",a),u.setUniformf("uMaxMinDiff",l),r(t.bufs,i,u)}}const Ui={shadersNeedBuild:!0,stepSize:1,numberOfSteps:10,enhancedLIC:!0,enhanceContrast:!1,lowContrastEnhancementFactor:0,highContrastEnhancementFactor:0,antiAlias:0,componentIds:[0,1],normalizeVectors:!0,maskThreshold:0,transformVectors:!0,bufs:null,isComposite:!0};function Gi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ui,n),o.m.obj(e,t),o.m.setGet(e,t,["context","_openGLRenderWindow","nuberOfSteps","stepSize","normalizeVectors","maskThreshold","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","componentIds","isComposite"]),o.m.moveToProtected(e,t,["openGLRenderWindow"]),Vi(e,t)}var zi={newInstance:o.m.newInstance(Gi,"vtkLineIntegralConvolution2D"),extend:Gi},ji=n(67),Yi=n.n(ji);function Hi(e,t){t.classHierarchy.push("vtkSurfaceLICInterface")}const Wi={enableLIC:!1,nuberOfSteps:40,stepSize:.25,transformVectors:!0,normalizeVectors:!0,maskOnSurface:!1,maskThreshold:0,maskColor:[0,0,0],maskIntensity:0,enhancedLIC:!0,enhanceContrast:Ri.NONE,lowLICContrastEnhancementFactor:0,highLICContrastEnhancementFactor:0,lowColorContrastEnhancementFactor:0,highColorContrastEnhancementFactor:0,antiAlias:0,colorMode:Fi.BLEND,LICIntensity:1,mapModeBias:0,noiseTextureSize:200,noiseTextureType:Bi.GAUSSIAN,noiseGrainSize:8,noiseImpulseProbability:.1,noiseImpulseBackgroundValue:0,noiseGeneratorSeed:0,minNoiseValue:0,maxNoiseValue:1,numberOfNoiseLevels:2,shadersNeedBuilding:!0,reallocateTextures:!0,rebuildNoiseTexture:!1,viewPortScale:1};function $i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wi,n),o.m.obj(e,t),o.m.setGet(e,t,["enableLIC","numberOfSteps","stepSize","normalizeVectors","transformVectors","maskOnSurface","maskThreshold","maskColor","maskIntensity","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor","antiAlias","colorMode","LICIntensity","mapModeBias","noiseTextureSize","noiseTextureType","noiseGrainSize","minNoiseValue","maxNoiseValue","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","noiseGeneratorSeed","viewPortScale","rebuildNoiseTexture"]),Hi(0,t)}var Zi={newInstance:o.m.newInstance($i,"vtkSurfaceLICInterface"),extend:$i};const{Representation:Ki}=Ut.ZP;function qi(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICInterface"),e.renderQuad=(e,n)=>{const r=t.licQuad,i=t.context;let o=t.licQuadVAO;o||(o=hi.ZP.newInstance(),o.setOpenGLRenderWindow(t._openGLRenderWindow),t.licQuadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),i.drawArrays(i.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.generateNoiseTexture=e=>{if(!t.noiseTexture||t.licInterface.getRebuildNoiseTexture()){t.licInterface.setRebuildNoiseTexture(!1),t.noiseTexture&&t.noiseTexture.releaseGraphicsResources(),Yi()(t.noiseGeneratorSeed,{global:!0});let n=[];const{noiseTextureType:r,noiseGrainSize:i,numberOfNoiseLevels:o,noiseImpulseProbability:a,noiseImpulseBackgroundValue:s,minNoiseValue:l,maxNoiseValue:u}=t.licInterface.get("noiseTextureType","noiseGrainSize","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","minNoiseValue","maxNoiseValue");if(r===Bi.GAUSSIAN)n=function(e,t,n,r,i,o){const a=Math.max(0,Math.min(1,n)),s=Float32Array.from({length:e*e},(()=>{let e=0;if(1===a||Math.random()>1-a)for(let t=0;t<2048;++t)e+=Math.random();return e}));let l=0,u=2049;s.forEach((e=>{u=1===a?e0?e:u,l=e>l?e:l}));let c=l-u;0===c&&(u=0,c=0===l?1:l);const d=t-1,p=0!==d?1/d:0,f=o-i;return s.map((e=>{const n=e=u?1===t?o:i+(a>d?d:a)*p*f:r}))}(Math.floor(e/i),o,a,s,l,u);else n=function(e,t,n,r){let[i,o]=e;const a=r-n;return Float32Array.from({length:i*o},(()=>{let e=Math.random();return e=Math.floor(e*t)/t,e=e*a+n,e>1?1:e<0?0:e}))}([Math.ceil(e/i),Math.ceil(e/i)],o,l,u);const c=1/i,d=Float32Array.from({length:e*e*4},((t,r)=>{const o=r/4;if(r%4==0){const t=Math.floor(o%e*c),r=Math.floor(o/e*c);return n[r*(e/i)+t]}return r%4==1||r%4==3?1:0})),p=Ft.ZP.newInstance({wrapS:Ft.ZP.Wrap.REPEAT,wrapT:Ft.ZP.Wrap.REPEAT,minificationFilter:Ft.ZP.Filter.NEAREST,magnificationFilter:Ft.ZP.Filter.NEAREST,generateMipMap:!1,openGLDataType:t.context.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});p.setOpenGLRenderWindow(t._openGLRenderWindow),p.create2DFromRaw(e,e,4,"Float32Array",d),p.activate(),p.sendParameters(),p.deactivate(),t.noiseTexture=p}},e.buildAShader=e=>t._openGLRenderWindow.getShaderCache().readyShaderProgramArray(Ai,e,""),e.allocateTextures=()=>{const n=Ft.ZP.Filter.NEAREST,r=Ft.ZP.Filter.LINEAR,i=t._openGLRenderWindow;t.geometryImage||(t.geometryImage=e.allocateTexture(i,n)),t.vectorImage||(t.vectorImage=e.allocateTexture(i,r)),t.maskVectorImage||(t.maskVectorImage=e.allocateTexture(i,r)),t.LICImage||(t.LICImage=e.allocateTexture(i,n)),t.RGBColorImage||(t.RGBColorImage=e.allocateTexture(i,n)),t.HSLColorImage||(t.HSLColorImage=e.allocateTexture(i,n)),t.depthTexture||(t.depthTexture=e.allocateDepthTexture(i))},e.allocateTexture=(e,n)=>{const r=t.context,i=Ft.ZP.newInstance({wrapS:Ft.ZP.Wrap.CLAMP_TO_EDGE,wrapT:Ft.ZP.Wrap.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:r.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});return i.setOpenGLRenderWindow(e),i.setInternalFormat(r.RGBA32F),i.create2DFromRaw(...t.size,4,"Float32Array",null),i.activate(),i.sendParameters(),i.deactivate(),i},e.allocateDepthTexture=e=>{const n=t.context,r=Ft.ZP.newInstance({generateMipmap:!1,openGLDataType:n.FLOAT,autoParameters:!1});return r.setOpenGLRenderWindow(e),r.createDepthFromRaw(...t.size,"Float32Array",null),r.activate(),r.sendParameters(),r.deactivate(),r},e.createFBO=()=>{if(!t.framebuffer){t.licHelper=null;const e=fi.ZP.newInstance();e.setOpenGLRenderWindow(t._openGLRenderWindow),e.saveCurrentBindingsAndBuffers(),e.create(...t.size),e.populateFramebuffer(),t.framebuffer=e,e.restorePreviousBindingsAndBuffers()}},e.completedGeometry=()=>{const e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeDepthBuffer(),e.drawBuffers([e.NONE]),n.restorePreviousBindingsAndBuffers()},e.buildAllShaders=()=>{t.shadersNeedBuilding&&(t.licColorPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader combines surface geometry, LIC, and scalar colors.\n\n// the output of this shader\nlayout(location = 0) out vec4 RGBOutput;\nlayout(location = 1) out vec4 HSLOutput;\n\nuniform sampler2D texVectors; // vectors, depth\nuniform sampler2D texGeomColors; // scalar colors + lighting\nuniform sampler2D texLIC; // image lic\nuniform int uScalarColorMode; // select between blend, and map shader\nuniform float uLICIntensity; // blend shader: blending factor for lic'd colors\nuniform float uMapBias; // map shader: adjust the brightness of the result\nuniform float uMaskIntensity; // blending factor for mask color\nuniform vec3 uMaskColor; // color for the masked out fragments\n\nin vec2 tcoordVC;\n\n/**\nConvert from RGB color space into HSL colorspace.\n*/\nvec3 RGBToHSL(vec3 RGB)\n{\n vec3 HSL = vec3(0.0, 0.0, 0.0);\n\n float RGBMin = min(min(RGB.r, RGB.g), RGB.b);\n float RGBMax = max(max(RGB.r, RGB.g), RGB.b);\n float RGBMaxMinDiff = RGBMax - RGBMin;\n\n HSL.z = (RGBMax + RGBMin) / 2.0;\n\n if (RGBMaxMinDiff == 0.0)\n {\n // Gray scale\n HSL.x = 0.0;\n HSL.y = 0.0;\n }\n else\n {\n // Color\n if (HSL.z < 0.5)\n HSL.y = RGBMaxMinDiff / (RGBMax + RGBMin);\n else\n HSL.y = RGBMaxMinDiff / (2.0 - RGBMax - RGBMin);\n\n float dR\n = (((RGBMax - RGB.r) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dG\n = (((RGBMax - RGB.g) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dB\n = (((RGBMax - RGB.b) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n\n if (RGB.r == RGBMax)\n HSL.x = dB - dG;\n else\n if (RGB.g == RGBMax)\n HSL.x = (1.0 / 3.0) + dR - dB;\n else\n if (RGB.b == RGBMax)\n HSL.x = (2.0 / 3.0) + dG - dR;\n\n if (HSL.x < 0.0)\n HSL.x += 1.0;\n\n if (HSL.x > 1.0)\n HSL.x -= 1.0;\n }\n\n return HSL;\n}\n\n/**\nHelper for HSL to RGB conversion.\n*/\nfloat Util(float v1, float v2, float vH)\n{\n if (vH < 0.0)\n vH += 1.0;\n\n if (vH > 1.0)\n vH -= 1.0;\n\n if ((6.0 * vH) < 1.0)\n return (v1 + (v2 - v1) * 6.0 * vH);\n\n if ((2.0 * vH) < 1.0)\n return (v2);\n\n if ((3.0 * vH) < 2.0)\n return (v1 + (v2 - v1) * ((2.0 / 3.0) - vH) * 6.0);\n\n return v1;\n}\n\n/**\nConvert from HSL space into RGB space.\n*/\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n if (HSL.y == 0.0)\n {\n // Gray\n RGB.r = HSL.z;\n RGB.g = HSL.z;\n RGB.b = HSL.z;\n }\n else\n {\n // Chromatic\n float v2;\n if (HSL.z < 0.5)\n v2 = HSL.z * (1.0 + HSL.y);\n else\n v2 = (HSL.z + HSL.y) - (HSL.y * HSL.z);\n\n float v1 = 2.0 * HSL.z - v2;\n\n RGB.r = Util(v1, v2, HSL.x + (1.0 / 3.0));\n RGB.g = Util(v1, v2, HSL.x);\n RGB.b = Util(v1, v2, HSL.x - (1.0 / 3.0));\n }\n\n return RGB.rgb;\n}\n\nvoid main()\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n\n // depth is used to determine which fragment belong to us\n // and we can change\n float depth = texture2D(texVectors, tcoordVC.st).a;\n\n vec3 fragColorRGB;\n float valid;\n if (depth > 1.0e-3)\n {\n // we own it\n // shade LIC'ed geometry, or apply mask\n if (lic.g!=0.0)\n {\n // it's masked\n // apply fragment mask\n fragColorRGB = uMaskIntensity * uMaskColor + (1.0 - uMaskIntensity) * geomColor.rgb;\n valid = 0.0;\n }\n else\n {\n if (uScalarColorMode==0)\n {\n // blend with scalars\n fragColorRGB = lic.rrr * uLICIntensity + geomColor.rgb * (1.0 - uLICIntensity);\n }\n else\n {\n // multiply with scalars\n fragColorRGB = geomColor.rgb * clamp((uMapBias + lic.r), 0.0, 1.0);\n }\n if (lic.b != 0.0)\n {\n // didn't have the required guard pixels\n // don't consider it in min max estimation\n // for histpgram stretching\n valid = 0.0;\n }\n else\n {\n // ok to use in min/max estimates for histogram\n // stretching\n valid = 1.0;\n }\n }\n }\n else\n {\n // we don't own it\n // pass through scalars\n fragColorRGB = geomColor.rgb;\n valid = 0.0;\n }\n\n // if no further stages this texture is\n // copied to the screen\n RGBOutput = vec4(fragColorRGB, geomColor.a);\n\n // if further stages, move to hsl space for contrast\n // enhancement. encoding validity saves moving a texture to the cpu\n vec3 fragColorHSL = RGBToHSL(fragColorRGB);\n HSLOutput = vec4(fragColorHSL, valid);\n}\n"),t.licCopyPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_DCpy.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader copies fragments and depths to the output buffer\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texDepth; // z values from vertex shader\nuniform sampler2D texRGBColors; // final rgb LIC colors\n\nin vec2 tcoordVC;\n\nvoid main()\n{\n gl_FragDepth = texture2D(texDepth, tcoordVC).x;\n gl_FragData[0] = texture2D(texRGBColors, tcoordVC);\n\n // since we render a screen aligned quad\n // we're going to be writing fragments\n // not touched by the original geometry\n // it's critical not to modify those\n // fragments.\n if (gl_FragDepth == 1.0)\n {\n discard;\n }\n}\n"),t.enhanceContrastPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// color contrast enhance stage implemented via histogram stretching\n// on lightness channel. if the min and max are tweaked it can generate\n// out-of-range values these will be clamped in 0 to 1\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texGeomColors; // scalars + lighting\nuniform sampler2D texLIC; // image lic, mask\nuniform sampler2D texHSLColors; // hsla colors\n\nuniform float uLMin; // min lightness over all fragments\nuniform float uLMaxMinDiff; // max - min lightness over all fragments\n\nin vec2 tcoordVC;\n\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n float v;\n float h = HSL.x;\n float sl = HSL.y;\n float l = HSL.z;\n\n v = (l <= 0.5) ? (l * (1.0 + sl)) : (l + sl - l * sl);\n if (v <= 0.0) {\n RGB = vec3(0.0,0.0,0.0);\n } else {\n float m;\n int sextant;\n float fract, vsf, mid1, mid2;\n\n m = l + l - v;\n h *= 6.0;\n sextant = int(h);\n fract = h - float(sextant);\n\n vsf = (v - m) * fract;\n mid1 = m + vsf;\n mid2 = v - vsf;\n switch (sextant) {\n case 0: RGB.r = v; RGB.g = mid1; RGB.b = m; break;\n case 1: RGB.r = mid2; RGB.g = v; RGB.b = m; break;\n case 2: RGB.r = m; RGB.g = v; RGB.b = mid1; break;\n case 3: RGB.r = m; RGB.g = mid2; RGB.b = v; break;\n case 4: RGB.r = mid1; RGB.g = m; RGB.b = v; break;\n case 5: RGB.r = v; RGB.g = m; RGB.b = mid2; break;\n }\n }\n return RGB;\n}\n\nvoid main()\n{\n // lookup hsl color , mask\n vec4 fragColor = texture2D(texHSLColors, tcoordVC.st);\n\n // don't modify masked fragments (masked => lic.g==1)\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g==0.0)\n {\n // normalize lightness channel\n fragColor.z = clamp((fragColor.z - uLMin)/uLMaxMinDiff, 0.0, 1.0);\n }\n\n // back into rgb space\n fragColor.rgb = HSLToRGB(fragColor.xyz);\n\n // add alpha\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n fragColor.a = geomColor.a;\n\n gl_FragData[0] = fragColor;\n}\n"),t.shadersNeedBuilding=!1)},e.initializeResources=()=>{e.createFBO(),e.generateNoiseTexture(t.licInterface.getNoiseTextureSize()),e.allocateTextures(),e.buildAllShaders(),t.licQuad||(t.licQuad=function(e){const t=Bt.ZP.newInstance();t.setOpenGLRenderWindow(e);const n=new Float32Array(12);for(let e=0;e<4;e++)n[3*e]=e%2*2-1,n[3*e+1]=e>1?1:-1,n[3*e+2]=0;const r=new Float32Array([0,0,1,0,0,1,1,1]),i=new Uint16Array(8);i[0]=3,i[1]=0,i[2]=1,i[3]=3,i[4]=3,i[5]=0,i[6]=3,i[7]=2;const o=ct.ZP.newInstance({numberOfComponents:3,values:n});o.setName("points");const a=ct.ZP.newInstance({numberOfComponents:1,values:i}),s=ct.ZP.newInstance({numberOfComponents:2,values:r});return t.getCABO().createVBO(a,"polys",Ki.SURFACE,{points:o,cellOffset:0,tcoords:s}),t}(t._openGLRenderWindow)),t.licHelper||(t.licHelper=zi.newInstance())},e.prepareForGeometry=()=>{const e=t.framebuffer;e.saveCurrentBindingsAndBuffers(),e.bind(),t.geometryImage.activate(),t.vectorImage.activate(),t.maskVectorImage.activate(),e.removeColorBuffer(0),e.removeColorBuffer(2),e.removeColorBuffer(3),e.setColorBuffer(t.geometryImage,0),e.setColorBuffer(t.vectorImage,2),e.setColorBuffer(t.maskVectorImage,3),e.setDepthBuffer(t.depthTexture);const n=t.context;n.drawBuffers([n.COLOR_ATTACHMENT0,n.NONE,n.COLOR_ATTACHMENT2,n.COLOR_ATTACHMENT3]),n.viewport(0,0,...t.size),n.scissor(0,0,...t.size),n.disable(n.BLEND),n.disable(n.DEPTH_TEST),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.DEPTH_BUFFER_BIT|n.COLOR_BUFFER_BIT)},e.copyToScreen=n=>{t.RGBColorImage.activate(),t.depthTexture.activate(),t.licCopyPass||e.initializeResources();const r=t.licCopyPass;t._openGLRenderWindow.getShaderCache().readyShaderProgram(r);const i=t.context;i.viewport(0,0,...n),i.scissor(0,0,...n),i.disable(i.BLEND),i.enable(i.DEPTH_TEST),i.disable(i.SCISSOR_TEST),r.setUniformi("texDepth",t.depthTexture.getTextureUnit()),r.setUniformi("texRGBColors",t.RGBColorImage.getTextureUnit()),e.renderQuad(n,r),t.RGBColorImage.deactivate(),t.depthTexture.deactivate()},e.combineColorsAndLIC=()=>{const n=t.context,r=t.framebuffer;r.saveCurrentBindingsAndBuffers(),r.bind(),r.create(...t.size),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(t.RGBColorImage,0),r.setColorBuffer(t.HSLColorImage,1),n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1]),n.disable(n.DEPTH_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),t.vectorImage.activate(),t.geometryImage.activate(),t.LICImage.activate(),t.licColorPass||e.initializeResources();const i=t.licColorPass;t._openGLRenderWindow.getShaderCache().readyShaderProgram(i),i.setUniformi("texVectors",t.vectorImage.getTextureUnit()),i.setUniformi("texGeomColors",t.geometryImage.getTextureUnit());const{colorMode:o,LICIntensity:a,mapModeBias:s,maskIntensity:l,maskColor:u,enhanceContrast:c,lowColorContrastEnhancementFactor:d,highColorContrastEnhancementFactor:p}=t.licInterface.get("colorMode","LICIntensity","mapModeBias","maskIntensity","maskColor","enhanceContrast","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor");if(i.setUniformi("texLIC",t.LICImage.getTextureUnit()),i.setUniformi("uScalarColorMode",o),i.setUniformf("uLICIntensity",a),i.setUniformf("uMapBias",s),i.setUniformf("uMaskIntensity",l),i.setUniform3f("uMaskColor",...u),e.renderQuad(t.size,i),t.vectorImage.deactivate(),t.geometryImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE]),c===Ri.COLOR||c===Ri.BOTH){let i=0,o=1,a=o-i;i+=a*d,o-=a*p,a=o-i,r.setColorBuffer(t.RGBColorImage),n.drawBuffers([n.COLOR_ATTACHMENT0]),t.geometryImage.activate(),t.HSLColorImage.activate(),t.LICImage.activate(),t.enhanceContrastPass||e.initializeResources();const{enhanceContrastPass:s}=t;t._openGLRenderWindow.getShaderCache().readyShaderProgram(s),s.setUniformi("texGeomColors",t.geometryImage.getTextureUnit()),s.setUniformi("texHSLColors",t.HSLColorImage.getTextureUnit()),s.setUniformi("texLIC",t.LICImage.getTextureUnit()),s.setUniformf("uLMin",i),s.setUniformf("uLMaxMinDiff",a),e.renderQuad(t.size,s),t.geometryImage.deactivate(),t.HSLColorImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),n.drawBuffers([n.NONE])}r.restorePreviousBindingsAndBuffers()},e.applyLIC=()=>{const e=t.licInterface.get("stepSize","numberOfSteps","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","normalizeVectors","maskThreshold","transformVectors"),n=t.licHelper.executeLIC(t.size,t.vectorImage,t.maskVectorImage,t.noiseTexture,t._openGLRenderWindow,e);if(!n)return console.error("Failed to compute image LIC"),void(t.LICImage=null);t.LICImage=n},e.setSize=n=>{Array.isArray(n)&&2===n.length&&(t.size&&t.size[0]===n[0]&&t.size[1]===n[1]||(t.size=n,e.releaseGraphicsResources()))},e.releaseGraphicsResources=()=>{t.geometryImage&&(t.geometryImage.releaseGraphicsResources(),t.geometryImage=null),t.vectorImage&&(t.vectorImage.releaseGraphicsResources(),t.vectorImage=null),t.maskVectorImage&&(t.maskVectorImage.releaseGraphicsResources(),t.maskVectorImage=null),t.LICImage&&(t.LICImage.releaseGraphicsResources(),t.LICImage=null),t.RGBColorImage&&(t.RGBColorImage.releaseGraphicsResources(),t.RGBColorImage=null),t.HSLColorImage&&(t.HSLColorImage.releaseGraphicsResources(),t.HSLColorImage=null),t.depthTexture&&(t.depthTexture.releaseGraphicsResources(),t.depthTexture=null),t.framebuffer&&(t.framebuffer.releaseGraphicsResources(),t.framebuffer=null)}}const Xi={context:null,shadersNeedBuilding:!0,reallocateTextures:!0,size:null,licInterface:null};function Ji(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Xi,n),Zi.extend(e,t,n),o.m.obj(e,t),o.m.setGet(e,t,["context","_openGLRenderWindow","reallocateTextures","licInterface","size"]),o.m.moveToProtected(e,t,["openGLRenderWindow"]),qi(e,t)}var Qi={newInstance:o.m.newInstance(Ji,"vtkSurfaceLICInterface"),extend:Ji};const{vtkErrorMacro:eo}=o.c;function to(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICMapper");const n={...e};e.getNeedToRebuildShaders=(e,r,i)=>t.rebuildLICShaders||n.getNeedToRebuildShaders(e,r,i),e.replaceShaderValues=(e,r,i)=>{const o=t.lastBoundBO.getReferenceByName("lastLightComplexity");let a=e.Vertex,s=e.Fragment;const l=t.renderable.getInputArrayToProcess(0);if(l&&t.canDrawLIC){s=Gt.Z.substitute(s,"//VTK::Output::Dec",["//VTK::Output::Dec","layout(location = 2) out vec4 vectorTexture;","layout(location = 3) out vec4 maskVectorTexture;"]).result;const n=`${l.getName()}MC`;0===o&&t.lastBoundBO.set({lastLightComplexity:1},!0),a=Gt.Z.substitute(a,"//VTK::TCoord::Dec",[`attribute vec3 ${n};`,"out vec3 licOutput;","//VTK::TCoord::Dec"]).result,a=Gt.Z.substitute(a,"//VTK::TCoord::Impl",[`licOutput = ${n};`,"//VTK::TCoord::Impl"]).result,s=Gt.Z.substitute(s,"//VTK::TCoord::Dec",["uniform int uMaskOnSurface;","uniform mat3 normalMatrix;","in vec3 licOutput;","//VTK::TCoord::Dec"]).result,s=Gt.Z.substitute(s,"//VTK::TCoord::Impl",["// projected vectors"," vec3 tcoordLIC = normalMatrix * licOutput;"," vec3 normN = normalize(normalVCVSOutput);"," float k = dot(tcoordLIC, normN);"," vec3 projected = (tcoordLIC - k*normN);"," vectorTexture = vec4(projected.x, projected.y, 0.0 , 1.0);","// vectors for fragment masking"," if (uMaskOnSurface == 0)"," {"," maskVectorTexture = vec4(licOutput, 1.0);"," }"," else"," {"," maskVectorTexture = vec4(projected.x, projected.y, 0.0 , 1.0);"," }","//VTK::TCoord::Impl"],!1).result,e.Vertex=a}t.rebuildLICShaders=!1,e.Fragment=s,n.replaceShaderValues(e,r,i),o>0&&t.lastBoundBO.set({lastLightComplexity:o},!0)},e.setMapperShaderParameters=(e,r,i)=>{n.setMapperShaderParameters(e,r,i),t.canDrawLIC&&e.getProgram().setUniformi("uMaskOnSurface",t.maskOnSurface)},e.getNeedToRebuildBufferObjects=(e,r)=>t.rebuildLICBuffers||n.getNeedToRebuildBufferObjects(e,r),e.buildBufferObjects=(e,r)=>{if(t.canDrawLIC){const e=t.renderable.getInputArrayToProcess(0);e&&e.getNumberOfComponents()>1&&t.renderable.setCustomShaderAttributes([e.getName()])}t.rebuildLICBuffers=!1,n.buildBufferObjects(e,r)},e.pushState=e=>{t.stateCache={[e.BLEND]:e.isEnabled(e.BLEND),[e.DEPTH_TEST]:e.isEnabled(e.DEPTH_TEST),[e.SCISSOR_TEST]:e.isEnabled(e.SCISSOR_TEST),[e.CULL_FACE]:e.isEnabled(e.CULL_FACE)}},e.popState=e=>{const n=n=>t.stateCache[n]?e.enable(n):e.disable(n);n(e.BLEND),n(e.DEPTH_TEST),n(e.SCISSOR_TEST),n(e.CULL_FACE)},e.renderPiece=(r,i)=>{let o=!0;t._openGLRenderWindow.getWebgl2()||(eo("SurfaceLICMapper Requires WebGL 2"),o=!1),t.context.getExtension("EXT_color_buffer_float")&&t.context.getExtension("OES_texture_float_linear")||(eo("SurfaceLICMapper requires the EXT_color_buffer_float and OES_texture_float_linear WebGL2 extensions."),o=!1),t.currentInput=t.renderable.getInputData(),t.currentInput||(eo("No input"),o=!1);let a=t.renderable.getLicInterface();a||(a=Zi.newInstance(),t.renderable.setLicInterface(a)),t.openGLLicInterface||(t.openGLLicInterface=Qi.newInstance()),a!==t.openGLLicInterface.getLicInterface()&&t.openGLLicInterface.setLicInterface(a);const s=t.renderable.getInputArrayToProcess(0);if(a.getEnableLIC()&&(!s||s.getNumberOfComponents()<2)&&(eo("No vector input array"),o=!1),a.getEnableLIC()||(o=!1),t.canDrawLIC!==o&&(t.rebuildLICShaders=!0,t.rebuildLICBuffers=!0),t.canDrawLIC=o,!o||!a.getEnableLIC())return void n.renderPiece(r,i);const l=t.context,u=i.getProperty().getBackfaceCulling(),c=i.getProperty().getFrontfaceCulling();u||c?c?(t._openGLRenderWindow.enableCullFace(),l.cullFace(l.FRONT)):(t._openGLRenderWindow.enableCullFace(),l.cullFace(l.BACK)):t._openGLRenderWindow.disableCullFace();const d=t._openGLRenderWindow.getSize(),p=d.map((e=>Math.round(e*a.getViewPortScale())));t.openGLLicInterface.setSize(p),t.openGLLicInterface.setOpenGLRenderWindow(t._openGLRenderWindow),t.openGLLicInterface.setContext(t.context),e.pushState(t.context),t.openGLLicInterface.initializeResources(),t.openGLLicInterface.prepareForGeometry(),e.popState(t.context),n.renderPieceStart(r,i),n.renderPieceDraw(r,i),n.renderPieceFinish(r,i),e.pushState(t.context),t.VBOBuildTime.modified(),t.openGLLicInterface.completedGeometry(),t.context.disable(t.context.CULL_FACE),t.openGLLicInterface.applyLIC(),t.openGLLicInterface.combineColorsAndLIC(),t.openGLLicInterface.copyToScreen(d),e.popState(t.context)}}const no={canDrawLIC:!1,rebuildLICShaders:!1,rebuildLICBuffers:!1,openGLLicInterface:null};function ro(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,no,n),un.extend(e,t,n),to(e,t),(0,o.e)(e,t,["openGLLicInterface"])}const io=(0,o.n)(ro,"vtkOpenGLSurfaceLICMapper");(0,s.vw)("vtkSurfaceLICMapper",io);var oo=n(53);const{vtkErrorMacro:ao}=o.c;function so(e,t){t.classHierarchy.push("vtkOpenGLSphereMapper");const n={...e};e.getShaderTemplate=(e,t,n)=>{e.Vertex="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkSphereMapperVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// this shader implements imposters in OpenGL for Spheres\n\nattribute vec4 vertexMC;\nattribute vec2 offsetMC;\n\n// optional normal declaration\n//VTK::Normal::Dec\n\n//VTK::Picking::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\nuniform mat3 normalMatrix; // transform model coordinate directions to view coordinates\n\n// material property values\n//VTK::Color::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\nvarying vec4 vertexVCVSOutput;\nvarying float radiusVCVSOutput;\nvarying vec3 centerVCVSOutput;\n\nuniform int cameraParallel;\nuniform float scaleFactor;\n\nvoid main()\n{\n //VTK::Picking::Impl\n\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Clip::Impl\n\n // compute the projected vertex position\n vec2 scaledOffsetMC = scaleFactor * offsetMC;\n vertexVCVSOutput = MCVCMatrix * vertexMC;\n centerVCVSOutput = vertexVCVSOutput.xyz;\n radiusVCVSOutput = length(scaledOffsetMC)*0.5;\n\n // make the triangle face the camera\n if (cameraParallel == 0)\n {\n vec3 dir = normalize(-vertexVCVSOutput.xyz);\n vec3 base2 = normalize(cross(dir,vec3(1.0,0.0,0.0)));\n vec3 base1 = cross(base2,dir);\n vertexVCVSOutput.xyz = vertexVCVSOutput.xyz + scaledOffsetMC.x*base1 + scaledOffsetMC.y*base2;\n }\n else\n {\n // add in the offset\n vertexVCVSOutput.xy = vertexVCVSOutput.xy + scaledOffsetMC;\n }\n\n gl_Position = VCPCMatrix * vertexVCVSOutput;\n}\n",e.Fragment=jt,e.Geometry=""},e.replaceShaderValues=(e,r,i)=>{let o=e.Vertex,a=e.Fragment;o=Gt.Z.substitute(o,"//VTK::Camera::Dec",["uniform mat4 VCPCMatrix;\n","uniform mat4 MCVCMatrix;"]).result,a=Gt.Z.substitute(a,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,a=Gt.Z.substitute(a,"//VTK::PositionVC::Impl",["vec4 vertexVC = vertexVCVSOutput;\n"]).result;a=Gt.Z.substitute(a,"//VTK::Normal::Dec",["uniform float invertedDepth;\n","uniform int cameraParallel;\n","varying float radiusVCVSOutput;\n","varying vec3 centerVCVSOutput;\n","uniform mat4 VCPCMatrix;\n"]).result;let s="";t.context.getExtension("EXT_frag_depth")&&(s="gl_FragDepthEXT = (pos.z / pos.w + 1.0) / 2.0;\n"),t._openGLRenderWindow.getWebgl2()&&(s="gl_FragDepth = (pos.z / pos.w + 1.0) / 2.0;\n"),a=Gt.Z.substitute(a,"//VTK::Depth::Impl",[" vec3 EyePos;\n"," vec3 EyeDir;\n"," if (cameraParallel != 0) {\n"," EyePos = vec3(vertexVC.x, vertexVC.y, vertexVC.z + 3.0*radiusVCVSOutput);\n"," EyeDir = vec3(0.0,0.0,-1.0); }\n"," else {\n"," EyeDir = vertexVC.xyz;\n"," EyePos = vec3(0.0,0.0,0.0);\n"," float lengthED = length(EyeDir);\n"," EyeDir = normalize(EyeDir);\n"," if (lengthED > radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float b = 2.0*dot(EyePos,EyeDir);\n"," float c = dot(EyePos,EyePos) - 1.0;\n"," float d = b*b - 4.0*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - invertedDepth*sqrt(d))*0.5;\n"," normalVCVSOutput = invertedDepth*normalize(EyePos + t*EyeDir);\n"," vertexVC.xyz = normalVCVSOutput*radiusVCVSOutput + centerVCVSOutput;\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",s]).result,a=Gt.Z.substitute(a,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(a=Gt.Z.substitute(a,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=a,n.replaceShaderValues(e,r,i)},e.setMapperShaderParameters=(e,r,i)=>{if(e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"offsetMC",12,e.getCABO().getStride(),t.context.FLOAT,2,!1)||ao("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isUniformUsed("invertedDepth")&&e.getProgram().setUniformf("invertedDepth",t.invert?-1:1),e.getProgram().isUniformUsed("scaleFactor")){const n=t.currentInput.getPointData();null!=t.renderable.getScaleArray()&&n.hasArray(t.renderable.getScaleArray())?e.getProgram().setUniformf("scaleFactor",t.renderable.getScaleFactor()):e.getProgram().setUniformf("scaleFactor",1)}n.setMapperShaderParameters(e,r,i)},e.setCameraShaderParameters=(e,n,i)=>{const o=e.getProgram(),a=n.getActiveCamera(),s=t.openGLCamera.getKeyMatrices(n);if(o.isUniformUsed("VCPCMatrix")&&o.setUniformMatrix("VCPCMatrix",s.vcpc),o.isUniformUsed("MCVCMatrix"))if(i.getIsIdentity())o.setUniformMatrix("MCVCMatrix",s.wcvc);else{const e=t.openGLActor.getKeyMatrices(),n=new Float64Array(16);r.multiply(n,s.wcvc,e.mcwc),o.setUniformMatrix("MCVCMatrix",n)}o.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",a.getParallelProjection())},e.getOpenGLMode=(e,n)=>t.context.TRIANGLES,e.buildBufferObjects=(e,n)=>{const r=t.currentInput;if(null===r)return;t.renderable.mapScalars(r,1);const i=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),a=r.getPointData(),s=r.getPoints(),l=s.getNumberOfPoints(),u=s.getData();let c=null;null!=t.renderable.getScaleArray()&&a.hasArray(t.renderable.getScaleArray())&&(c=a.getArray(t.renderable.getScaleArray()).getData());let d=null,p=0,f=null;i?(p=i.getNumberOfComponents(),o.setColorOffset(0),o.setColorBOStride(4),d=i.getData(),f=new Uint8Array(3*l*4),o.getColorBO()||o.setColorBO(Qn.ZP.newInstance()),o.getColorBO().setOpenGLRenderWindow(t._openGLRenderWindow)):o.getColorBO()&&o.setColorBO(null),o.setColorComponents(p);const h=new Float32Array(5*l*3);o.setStride(20);const m=Math.cos((0,st.r)(30));let g=0,v=0,y=0,_=0;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lo,n),un.extend(e,t,n),so(e,t)}const co=(0,o.n)(uo,"vtkOpenGLSphereMapper");(0,s.vw)("vtkSphereMapper",co);const{vtkErrorMacro:po}=o.c;function fo(e,t){t.classHierarchy.push("vtkOpenGLStickMapper");const n={...e};e.getShaderTemplate=(e,t,n)=>{e.Vertex="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkStickMapperVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// this shader implements imposters in OpenGL for Sticks\n\nattribute vec4 vertexMC;\nattribute vec3 orientMC;\nattribute vec4 offsetMC;\nattribute float radiusMC;\n\n// optional normal declaration\n//VTK::Normal::Dec\n\n//VTK::Picking::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\nuniform mat3 normalMatrix; // transform model coordinate directions to view coordinates\n\n// material property values\n//VTK::Color::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\nvarying vec4 vertexVCVSOutput;\nvarying float radiusVCVSOutput;\nvarying float lengthVCVSOutput;\nvarying vec3 centerVCVSOutput;\nvarying vec3 orientVCVSOutput;\n\nuniform int cameraParallel;\n\nvoid main()\n{\n //VTK::Picking::Impl\n\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Clip::Impl\n\n vertexVCVSOutput = MCVCMatrix * vertexMC;\n centerVCVSOutput = vertexVCVSOutput.xyz;\n radiusVCVSOutput = radiusMC;\n lengthVCVSOutput = length(orientMC);\n orientVCVSOutput = normalMatrix * normalize(orientMC);\n\n // make sure it is pointing out of the screen\n if (orientVCVSOutput.z < 0.0)\n {\n orientVCVSOutput = -orientVCVSOutput;\n }\n\n // make the basis\n vec3 xbase;\n vec3 ybase;\n vec3 dir = vec3(0.0,0.0,1.0);\n if (cameraParallel == 0)\n {\n dir = normalize(-vertexVCVSOutput.xyz);\n }\n if (abs(dot(dir,orientVCVSOutput)) == 1.0)\n {\n xbase = normalize(cross(vec3(0.0,1.0,0.0),orientVCVSOutput));\n ybase = cross(xbase,orientVCVSOutput);\n }\n else\n {\n xbase = normalize(cross(orientVCVSOutput,dir));\n ybase = cross(orientVCVSOutput,xbase);\n }\n\n vec3 offsets = offsetMC.xyz*2.0-1.0;\n vertexVCVSOutput.xyz = vertexVCVSOutput.xyz +\n radiusVCVSOutput*offsets.x*xbase +\n radiusVCVSOutput*offsets.y*ybase +\n 0.5*lengthVCVSOutput*offsets.z*orientVCVSOutput;\n\n gl_Position = VCPCMatrix * vertexVCVSOutput;\n}\n",e.Fragment=jt,e.Geometry=""},e.replaceShaderValues=(e,r,i)=>{let o=e.Vertex,a=e.Fragment;o=Gt.Z.substitute(o,"//VTK::Camera::Dec",["uniform mat4 VCPCMatrix;\n","uniform mat4 MCVCMatrix;"]).result,a=Gt.Z.substitute(a,"//VTK::PositionVC::Dec","varying vec4 vertexVCVSOutput;").result,a=Gt.Z.substitute(a,"//VTK::PositionVC::Impl"," vec4 vertexVC = vertexVCVSOutput;\n").result;a=Gt.Z.substitute(a,"//VTK::Normal::Dec",["uniform int cameraParallel;\n","varying float radiusVCVSOutput;\n","varying vec3 orientVCVSOutput;\n","varying float lengthVCVSOutput;\n","varying vec3 centerVCVSOutput;\n","uniform mat4 VCPCMatrix;\n"]).result;let s="";t.context.getExtension("EXT_frag_depth")&&(s=" gl_FragDepthEXT = (pos.z / pos.w + 1.0) / 2.0;\n"),t._openGLRenderWindow.getWebgl2()&&(s="gl_FragDepth = (pos.z / pos.w + 1.0) / 2.0;\n"),a=Gt.Z.substitute(a,"//VTK::Depth::Impl",[" vec3 EyePos;\n"," vec3 EyeDir;\n"," if (cameraParallel != 0) {\n"," EyePos = vec3(vertexVC.x, vertexVC.y, vertexVC.z + 3.0*radiusVCVSOutput);\n"," EyeDir = vec3(0.0,0.0,-1.0); }\n"," else {\n"," EyeDir = vertexVC.xyz;\n"," EyePos = vec3(0.0,0.0,0.0);\n"," float lengthED = length(EyeDir);\n"," EyeDir = normalize(EyeDir);\n"," if (lengthED > radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," vec3 base1;\n"," if (abs(orientVCVSOutput.z) < 0.99) {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,0.0,1.0))); }\n"," else {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,1.0,0.0))); }\n"," vec3 base2 = cross(orientVCVSOutput,base1);\n"," EyePos = vec3(dot(EyePos,base1),dot(EyePos,base2),dot(EyePos,orientVCVSOutput));\n"," EyeDir = vec3(dot(EyeDir,base1),dot(EyeDir,base2),dot(EyeDir,orientVCVSOutput));\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float a = EyeDir.x*EyeDir.x + EyeDir.y*EyeDir.y;\n"," float b = 2.0*(EyePos.x*EyeDir.x + EyePos.y*EyeDir.y);\n"," float c = EyePos.x*EyePos.x + EyePos.y*EyePos.y - 1.0;\n"," float d = b*b - 4.0*a*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - sqrt(d))/(2.0*a);\n"," float tz = EyePos.z + t*EyeDir.z;\n"," vec3 iPoint = EyePos + t*EyeDir;\n"," if (abs(iPoint.z)*radiusVCVSOutput > lengthVCVSOutput*0.5) {\n"," float t2 = (-b + sqrt(d))/(2.0*a);\n"," float tz2 = EyePos.z + t2*EyeDir.z;\n"," if (tz2*radiusVCVSOutput > lengthVCVSOutput*0.5 || tz*radiusVCVSOutput < -0.5*lengthVCVSOutput) { discard; }\n"," else {\n"," normalVCVSOutput = orientVCVSOutput;\n"," float t3 = (lengthVCVSOutput*0.5/radiusVCVSOutput - EyePos.z)/EyeDir.z;\n"," iPoint = EyePos + t3*EyeDir;\n"," vertexVC.xyz = radiusVCVSOutput*(iPoint.x*base1 + iPoint.y*base2 + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," else {\n"," normalVCVSOutput = iPoint.x*base1 + iPoint.y*base2;\n"," vertexVC.xyz = radiusVCVSOutput*(normalVCVSOutput + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",s]).result,a=Gt.Z.substitute(a,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(a=Gt.Z.substitute(a,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=a,n.replaceShaderValues(e,r,i)},e.setMapperShaderParameters=(e,r,i)=>{e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&(e.getProgram().isAttributeUsed("orientMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"orientMC",12,e.getCABO().getStride(),t.context.FLOAT,3,!1)||po("Error setting 'orientMC' in shader VAO.")),e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO().getColorBO(),"offsetMC",0,e.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,3,!0)||po("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isAttributeUsed("radiusMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"radiusMC",24,e.getCABO().getStride(),t.context.FLOAT,1,!1)||po("Error setting 'radiusMC' in shader VAO."))),n.setMapperShaderParameters(e,r,i)},e.setCameraShaderParameters=(e,n,o)=>{const a=e.getProgram(),s=n.getActiveCamera(),l=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",l.vcpc),o.getIsIdentity())a.isUniformUsed("MCVCMatrix")&&a.setUniformMatrix("MCVCMatrix",l.wcvc),a.isUniformUsed("normalMatrix")&&a.setUniformMatrix3x3("normalMatrix",l.normalMatrix);else{const e=t.openGLActor.getKeyMatrices();if(a.isUniformUsed("MCVCMatrix")){const t=new Float64Array(16);r.multiply(t,l.wcvc,e.mcwc),a.setUniformMatrix("MCVCMatrix",t)}if(a.isUniformUsed("normalMatrix")){const t=new Float64Array(9);i.multiply(t,l.normalMatrix,e.normalMatrix),a.setUniformMatrix3x3("normalMatrix",t)}}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",s.getParallelProjection())},e.getOpenGLMode=(e,n)=>t.context.TRIANGLES,e.buildBufferObjects=(e,n)=>{const r=t.currentInput;if(null===r)return;t.renderable.mapScalars(r,1);const i=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),a=r.getPointData(),s=r.getPoints(),l=s.getNumberOfPoints(),u=s.getData();let c=3;c+=4;let d=null,p=0;o.setColorBOStride(4),o.getColorBO()||o.setColorBO(Qn.ZP.newInstance()),o.getColorBO().setOpenGLRenderWindow(t._openGLRenderWindow),i&&(p=i.getNumberOfComponents(),o.setColorOffset(4),d=i.getData(),o.setColorBOStride(8)),o.setColorComponents(p),o.setStride(28);const f=new Float32Array(7*l*12),h=new Uint8Array(12*l*(d?8:4));let m=null,g=null;null!=t.renderable.getScaleArray()&&a.hasArray(t.renderable.getScaleArray())&&(m=a.getArray(t.renderable.getScaleArray()).getData()),null!=t.renderable.getOrientationArray()&&a.hasArray(t.renderable.getOrientationArray())?g=a.getArray(t.renderable.getOrientationArray()).getData():po(["Error setting orientationArray.\n","You have to specify the stick orientation"]);const v=[0,1,3,0,3,2,2,3,5,2,5,4];let y=0,_=0,b=0,x=0;for(let e=0;e=4?255:0,h[x++]=v[t]>=2?255:0,h[x++]=255,_=e*p,d&&(h[x++]=d[_],h[x++]=d[_+1],h[x++]=d[_+2],h[x++]=d[_+3])}o.setElementCount(b/7),o.upload(f,oo.L.ARRAY_BUFFER),o.getColorBO().upload(h,oo.L.ARRAY_BUFFER),t.VBOBuildTime.modified()}}const ho={};function mo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ho,n),un.extend(e,t,n),fo(e,t)}const go=(0,o.n)(mo,"vtkOpenGLStickMapper");(0,s.vw)("vtkStickMapper",go);var vo=n(12);function yo(e,t){t.classHierarchy.push("vtkWebGPUCamera"),e.getProjectionMatrix=(e,n,i,o)=>{if(r.identity(e),t.renderable.getParallelProjection()){const r=t.renderable.getParallelScale(),a=r*n,s=r,l=(o[0]-1)*a,u=(o[0]+1)*a,c=(o[1]-1)*s,d=(o[1]+1)*s,p=1/(u-l),f=1/(d-c);e[0]=2*p,e[5]=2*f,e[10]=1/(i[1]-i[0]),e[12]=(u+l)*p,e[13]=(d+c)*f,e[14]=i[1]/(i[1]-i[0])}else{const r=Math.tan(Math.PI*t.renderable.getViewAngle()/360);let a,s;!0===t.renderable.getUseHorizontalViewAngle()?(a=i[0]*r,s=i[0]*r/n):(a=i[0]*r*n,s=i[0]*r);const l=(o[0]-1)*a,u=(o[0]+1)*a,c=(o[1]-1)*s,d=(o[1]+1)*s;e[0]=2*i[0]/(u-l),e[5]=2*i[0]/(d-c),e[12]=(l+u)/(u-l),e[13]=(c+d)/(d-c),e[10]=0,e[14]=i[0],e[11]=-1,e[15]=0}},e.convertToOpenGLDepth=e=>{if(t.renderable.getParallelProjection())return 1-e;const n=t.renderable.getClippingRangeByReference();let r=-n[0]/e;return r=(n[0]+n[1])/(n[1]-n[0])+2*n[0]*n[1]/(r*(n[1]-n[0])),.5*r+.5},e.getKeyMatrices=n=>{const i=n.getRenderable(),o=n.getParent();if(Math.max(o.getMTime(),e.getMTime(),i.getMTime(),t.renderable.getMTime(),n.getStabilizedTime())>t.keyMatrixTime.getMTime()){const i=t.renderable.getViewMatrix();r.copy(t.keyMatrices.normalMatrix,i),t.keyMatrices.normalMatrix[3]=0,t.keyMatrices.normalMatrix[7]=0,t.keyMatrices.normalMatrix[11]=0,r.invert(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),r.transpose(t.keyMatrices.wcvc,i);const o=n.getStabilizedCenterByReference();r.translate(t.keyMatrices.scvc,t.keyMatrices.wcvc,o);const a=n.getAspectRatio(),s=t.renderable.getClippingRangeByReference();e.getProjectionMatrix(t.keyMatrices.vcpc,a,s,t.renderable.getWindowCenterByReference()),r.multiply(t.keyMatrices.scpc,t.keyMatrices.vcpc,t.keyMatrices.scvc),r.invert(t.keyMatrices.pcsc,t.keyMatrices.scpc),t.keyMatrixTime.modified()}return t.keyMatrices}}const _o={keyMatrixTime:null,keyMatrices:null};function bo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_o,n),a.Z.extend(e,t,n),t.keyMatrixTime={},o.m.obj(t.keyMatrixTime),t.keyMatrices={normalMatrix:new Float64Array(16),vcpc:new Float64Array(16),pcsc:new Float64Array(16),wcvc:new Float64Array(16),scpc:new Float64Array(16),scvc:new Float64Array(16)},o.m.setGet(e,t,["keyMatrixTime"]),yo(e,t)}const xo=o.m.newInstance(bo);(0,vo.vw)("vtkCamera",xo);var wo=n(366),So=n(48),Co=n(114),To=n(55);const{vtkDebugMacro:Mo}=o.c,Do="\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n@fragment\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n var computedColor: vec4 = mapperUBO.BackgroundColor;\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n",Ao=new Float64Array(16),Po=new Float64Array(16);function ko(e,t){t.classHierarchy.push("vtkWebGPURenderer"),e.buildPass=n=>{if(n){if(!t.renderable)return;t.camera=t.renderable.getActiveCamera(),e.updateLights(),e.prepareNodes(),e.addMissingNode(t.camera),e.addMissingNodes(t.renderable.getViewPropsWithNestedProps()),e.removeUnusedNodes(),t.webgpuCamera=e.getViewNodeFor(t.camera),e.updateStabilizedMatrix()}},e.updateStabilizedMatrix=()=>{const e=t.camera.getClippingRange(),n=t.camera.getPositionByReference(),r=t.camera.getDirectionOfProjectionByReference(),i=[],o=[];T.bA(o,r,.5*(e[0]+e[1])),T.IH(i,n,o),T.lu(o,i,t.stabilizedCenter);T.Zh(o)/(e[1]-e[0])>t.recenterThreshold&&(t.stabilizedCenter=i,t.stabilizedTime.modified())},e.updateLights=()=>{let e=0;const n=t.renderable.getLightsByReference();for(let t=0;t0&&e++;return e||(Mo("No lights are on, creating one."),t.renderable.createLight()),e},e.updateUBO=()=>{const n=t.UBO.getSendTime();if(t._parent.getMTime()>n||e.getMTime()>n||t.camera.getMTime()>n||t.renderable.getMTime()>n){const n=t.webgpuCamera.getKeyMatrices(e);t.UBO.setArray("WCVCMatrix",n.wcvc),t.UBO.setArray("SCPCMatrix",n.scpc),t.UBO.setArray("PCSCMatrix",n.pcsc),t.UBO.setArray("SCVCMatrix",n.scvc),t.UBO.setArray("VCPCMatrix",n.vcpc),t.UBO.setArray("WCVCNormals",n.normalMatrix),t.UBO.setValue("LightCount",t.renderable.getLights().length),t.UBO.setValue("MaxEnvironmentMipLevel",t.renderable.getEnvironmentTexture()?.getMipLevel()),t.UBO.setValue("BackgroundDiffuseStrength",t.renderable.getEnvironmentTextureDiffuseStrength()),t.UBO.setValue("BackgroundSpecularStrength",t.renderable.getEnvironmentTextureSpecularStrength());const r=e.getYInvertedTiledSizeAndOrigin();t.UBO.setArray("viewportSize",[r.usize,r.vsize]),t.UBO.setValue("cameraParallel",t.camera.getParallelProjection());const i=t._parent.getDevice();t.UBO.sendIfNeeded(i)}},e.updateSSBO=()=>{const n=t.renderable.getLights(),r=t.webgpuCamera.getKeyMatrices(e);let i=`${t.renderable.getMTime()}`;for(let e=0;e=90?0:2:1,s[l+1]=Math.cos((0,st.r)(n[t].getConeAngle())),s[l+2]=Math.cos((0,st.r)(n[t].getConeAngle()+n[t].getConeFalloff())),s[l+3]=0}t.SSBO.clearData(),t.SSBO.setNumberOfInstances(n.length),t.SSBO.addEntry("LightPos","vec4"),t.SSBO.addEntry("LightDir","vec4"),t.SSBO.addEntry("LightColor","vec4"),t.SSBO.addEntry("LightData","vec4"),t.SSBO.setAllInstancesFromArray("LightPos",e),t.SSBO.setAllInstancesFromArray("LightDir",i),t.SSBO.setAllInstancesFromArray("LightColor",a),t.SSBO.setAllInstancesFromArray("LightData",s);const l=t._parent.getDevice();t.SSBO.send(l)}var o;t.lightTimeString=i},e.scissorAndViewport=t=>{const n=e.getYInvertedTiledSizeAndOrigin();t.getHandle().setViewport(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize,0,1),t.getHandle().setScissorRect(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize)},e.bindUBO=e=>{e.activateBindGroup(t.bindGroup)},e.opaquePass=n=>{n?(t.renderEncoder.begin(t._parent.getCommandEncoder()),e.updateUBO(),e.updateSSBO()):(e.scissorAndViewport(t.renderEncoder),e.clear(),t.renderEncoder.end())},e.clear=()=>{if(t.renderable.getTransparent()||t.suppressClear)return;const n=t._parent.getDevice();if(!t.clearFSQ){t.clearFSQ=So.ZP.newInstance(),t.clearFSQ.setDevice(n),t.clearFSQ.setPipelineHash("clearfsq"),t.clearFSQ.setFragmentShaderTemplate(Do);const e=To.ZP.newInstance({label:"mapperUBO"});e.addEntry("FSQMatrix","mat4x4"),e.addEntry("BackgroundColor","vec4"),t.clearFSQ.setUBO(e),t.backgroundTex=t.renderable.getEnvironmentTexture()}if("clearfsqwithtexture"!==t.clearFSQ.getPipelineHash()&&t.renderable.getUseEnvironmentTextureAsBackground()&&t.backgroundTex?.getImageLoaded()){t.clearFSQ.setFragmentShaderTemplate("\nfn vecToRectCoord(dir: vec3) -> vec2 {\n var tau: f32 = 6.28318530718;\n var pi: f32 = 3.14159265359;\n var out: vec2 = vec2(0.0);\n\n out.x = atan2(dir.z, dir.x) / tau;\n out.x += 0.5;\n\n var phix: f32 = length(vec2(dir.x, dir.z));\n out.y = atan2(dir.y, phix) / pi + 0.5;\n\n return out;\n}\n\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n@fragment\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n var tcoord: vec4 = vec4(input.vertexVC.xy, -1, 1);\n var V: vec4 = normalize(mapperUBO.FSQMatrix * tcoord); // vec2((input.tcoordVS.x - 0.5) * 2, -(input.tcoordVS.y - 0.5) * 2);\n // textureSampleLevel gets rid of some ugly artifacts\n var background = textureSampleLevel(EnvironmentTexture, EnvironmentTextureSampler, vecToRectCoord(V.xyz), 0);\n var computedColor: vec4 = vec4(background.rgb, 1);\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n");const e=To.ZP.newInstance({label:"mapperUBO"});e.addEntry("FSQMatrix","mat4x4"),e.addEntry("BackgroundColor","vec4"),t.clearFSQ.setUBO(e);const r=n.getTextureManager().getTextureForVTKTexture(t.backgroundTex);if(r.getReady()){const e=r.createView("EnvironmentTexture");t.clearFSQ.setTextureViews([e]),t.backgroundTexLoaded=!0;const i=t.backgroundTex.getInterpolate()?"linear":"nearest";e.addSampler(n,{addressModeU:"repeat",addressModeV:"clamp-to-edge",addressModeW:"repeat",minFilter:i,magFilter:i,mipmapFilter:"linear"})}t.clearFSQ.setPipelineHash("clearfsqwithtexture")}else if("clearfsqwithtexture"===t.clearFSQ.getPipelineHash()&&!t.renderable.getUseEnvironmentTextureAsBackground()){t.clearFSQ=So.ZP.newInstance(),t.clearFSQ.setDevice(n),t.clearFSQ.setPipelineHash("clearfsq"),t.clearFSQ.setFragmentShaderTemplate(Do);const e=To.ZP.newInstance({label:"mapperUBO"});e.addEntry("FSQMatrix","mat4x4"),e.addEntry("BackgroundColor","vec4"),t.clearFSQ.setUBO(e)}const i=t.webgpuCamera.getKeyMatrices(e),o=t.renderable.getBackgroundByReference();t.clearFSQ.getUBO().setArray("BackgroundColor",o),r.transpose(Po,i.normalMatrix),r.mul(Ao,i.scvc,i.pcsc),r.mul(Ao,Po,Ao),t.clearFSQ.getUBO().setArray("FSQMatrix",Ao),t.clearFSQ.getUBO().sendIfNeeded(n),t.clearFSQ.prepareAndDraw(t.renderEncoder)},e.translucentPass=n=>{n?t.renderEncoder.begin(t._parent.getCommandEncoder()):(e.scissorAndViewport(t.renderEncoder),t.renderEncoder.end())},e.volumeDepthRangePass=n=>{n?t.renderEncoder.begin(t._parent.getCommandEncoder()):(e.scissorAndViewport(t.renderEncoder),t.renderEncoder.end())},e.getAspectRatio=()=>{const e=t._parent.getSizeByReference(),n=t.renderable.getViewportByReference();return e[0]*(n[2]-n[0])/((n[3]-n[1])*e[1])},e.convertToOpenGLDepth=e=>t.webgpuCamera.convertToOpenGLDepth(e),e.getYInvertedTiledSizeAndOrigin=()=>{const n=e.getTiledSizeAndOrigin(),r=t._parent.getSizeByReference();return n.lowerLeftV=r[1]-n.vsize-n.lowerLeftV,n},e.getTiledSizeAndOrigin=()=>{const e=t.renderable.getViewportByReference(),n=[0,0,1,1],r=e[0]-n[0],i=e[1]-n[1],o=t._parent.normalizedDisplayToDisplay(r,i),a=Math.round(o[0]),s=Math.round(o[1]),l=e[2]-n[0],u=e[3]-n[1],c=t._parent.normalizedDisplayToDisplay(l,u);let d=Math.round(c[0])-a,p=Math.round(c[1])-s;return d<0&&(d=0),p<0&&(p=0),{usize:d,vsize:p,lowerLeftU:a,lowerLeftV:s}},e.getPropFromID=e=>{for(let n=0;nt.stabilizedTime.getMTime(),e.releaseGraphicsResources=()=>{null!==t.selector&&t.selector.releaseGraphicsResources()}}const Lo={bindGroup:null,selector:null,renderEncoder:null,recenterThreshold:20,suppressClear:!1,stabilizedCenter:[0,0,0]};function Oo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lo,n),a.Z.extend(e,t,n),t.UBO=To.ZP.newInstance({label:"rendererUBO"}),t.UBO.addEntry("WCVCMatrix","mat4x4"),t.UBO.addEntry("SCPCMatrix","mat4x4"),t.UBO.addEntry("PCSCMatrix","mat4x4"),t.UBO.addEntry("SCVCMatrix","mat4x4"),t.UBO.addEntry("VCPCMatrix","mat4x4"),t.UBO.addEntry("WCVCNormals","mat4x4"),t.UBO.addEntry("viewportSize","vec2"),t.UBO.addEntry("LightCount","i32"),t.UBO.addEntry("MaxEnvironmentMipLevel","f32"),t.UBO.addEntry("BackgroundDiffuseStrength","f32"),t.UBO.addEntry("BackgroundSpecularStrength","f32"),t.UBO.addEntry("cameraParallel","u32"),t.SSBO=Co.ZP.newInstance({label:"rendererLightSSBO"}),t.lightTimeString="",t.bindGroup=wo.ZP.newInstance({label:"rendererBG"}),t.bindGroup.setBindables([t.UBO,t.SSBO]),t.tmpMat4=r.identity(new Float64Array(16)),t.stabilizedTime={},(0,o.o)(t.stabilizedTime,{mtime:0}),(0,o.g)(e,t,["bindGroup","stabilizedTime"]),(0,o.k)(e,t,["stabilizedCenter"]),(0,o.e)(e,t,["renderEncoder","selector","suppressClear","UBO"]),ko(e,t)}const Eo=(0,o.n)(Oo,"vtkWebGPURenderer");(0,vo.vw)("vtkRenderer",Eo);const{CoordinateSystem:Io}=Vt.ZP;function No(e,t){t.classHierarchy.push("vtkWebGPUActor"),e.buildPass=n=>{n&&(t.WebGPURenderer=e.getFirstAncestorOfType("vtkWebGPURenderer"),t.WebGPURenderWindow=t.WebGPURenderer.getFirstAncestorOfType("vtkWebGPURenderWindow"),void 0===t.propID&&(t.propID=t.WebGPURenderWindow.getUniquePropID()),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes())},e.traverseOpaquePass=n=>{t.renderable&&t.renderable.getNestedVisibility()&&t.renderable.getIsOpaque()&&(!t.WebGPURenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.children[0]&&t.children[0].traverse(n),e.apply(n,!1))},e.traverseTranslucentPass=n=>{!t.renderable||!t.renderable.getNestedVisibility()||t.renderable.getIsOpaque()||t.WebGPURenderer.getSelector()&&!t.renderable.getNestedPickable()||(e.apply(n,!0),t.children[0]&&t.children[0].traverse(n),e.apply(n,!1))},e.queryPass=(e,n)=>{if(e){if(!t.renderable||!t.renderable.getVisibility())return;t.renderable.getIsOpaque()?n.incrementOpaqueActorCount():n.incrementTranslucentActorCount()}},e.getBufferShift=n=>(e.getKeyMatrices(n),t.bufferShift),e.getKeyMatrices=e=>{if(Math.max(t.renderable.getMTime(),e.getStabilizedTime())>t.keyMatricesTime.getMTime()){t.renderable.computeMatrix();const n=t.renderable.getMatrix();t.bufferShift[0]=n[3],t.bufferShift[1]=n[7],t.bufferShift[2]=n[11];const i=e.getStabilizedCenterByReference();t.renderable.getCoordinateSystem()===Io.WORLD&&(t.bufferShift[0]-=i[0],t.bufferShift[1]-=i[1],t.bufferShift[2]-=i[2]),r.transpose(t.keyMatrices.bcwc,n),t.renderable.getIsIdentity()?r.identity(t.keyMatrices.normalMatrix):(r.copy(t.keyMatrices.normalMatrix,t.keyMatrices.bcwc),t.keyMatrices.normalMatrix[3]=0,t.keyMatrices.normalMatrix[7]=0,t.keyMatrices.normalMatrix[11]=0,r.invert(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),r.transpose(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix)),r.translate(t.keyMatrices.bcwc,t.keyMatrices.bcwc,[-t.bufferShift[0],-t.bufferShift[1],-t.bufferShift[2]]),t.renderable.getCoordinateSystem()===Io.WORLD?r.translate(t.keyMatrices.bcsc,t.keyMatrices.bcwc,[-i[0],-i[1],-i[2]]):r.copy(t.keyMatrices.bcsc,t.keyMatrices.bcwc),t.keyMatricesTime.modified()}return t.keyMatrices}}const Ro={keyMatricesTime:null,keyMatrices:null,propID:void 0,bufferShift:void 0};function Bo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ro,n),a.Z.extend(e,t,n),t.keyMatricesTime={},o.m.obj(t.keyMatricesTime,{mtime:0}),t.keyMatrices={normalMatrix:new Float64Array(16),bcwc:new Float64Array(16),bcsc:new Float64Array(16)},o.m.get(e,t,["propID","keyMatricesTime"]),t.bufferShift=[0,0,0,0],No(e,t)}const Fo=o.m.newInstance(Bo);(0,vo.vw)("vtkActor",Fo);const{CoordinateSystem:Vo}=Vt.ZP;function Uo(e,t){t.classHierarchy.push("vtkWebGPUActor2D"),e.buildPass=n=>{n&&(t.WebGPURenderer=e.getFirstAncestorOfType("vtkWebGPURenderer"),t.WebGPURenderWindow=t.WebGPURenderer.getFirstAncestorOfType("vtkWebGPURenderWindow"),void 0===t.propID&&(t.propID=t.WebGPURenderWindow.getUniquePropID()),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes())},e.traverseOpaquePass=n=>{t.renderable&&t.renderable.getNestedVisibility()&&t.renderable.getIsOpaque()&&(!t.WebGPURenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.children[0]&&t.children[0].traverse(n),e.apply(n,!1))},e.traverseTranslucentPass=n=>{!t.renderable||!t.renderable.getNestedVisibility()||t.renderable.getIsOpaque()||t.WebGPURenderer.getSelector()&&!t.renderable.getNestedPickable()||(e.apply(n,!0),t.children[0]&&t.children[0].traverse(n),e.apply(n,!1))},e.queryPass=(e,n)=>{if(e){if(!t.renderable||!t.renderable.getVisibility())return;t.renderable.getIsOpaque()?n.incrementOpaqueActorCount():n.incrementTranslucentActorCount()}},e.getBufferShift=n=>(e.getKeyMatrices(n),t.bufferShift),e.getKeyMatrices=e=>{if(Math.max(t.renderable.getMTime(),e.getStabilizedTime())>t.keyMatricesTime.getMTime()){t.bufferShift[0]=0,t.bufferShift[1]=0,t.bufferShift[2]=0;const n=e.getStabilizedCenterByReference();t.renderable.getCoordinateSystem()===Vo.WORLD&&(t.bufferShift[0]-=n[0],t.bufferShift[1]-=n[1],t.bufferShift[2]-=n[2]),r.identity(t.keyMatrices.bcwc),r.identity(t.keyMatrices.normalMatrix),r.translate(t.keyMatrices.bcwc,t.keyMatrices.bcwc,[-t.bufferShift[0],-t.bufferShift[1],-t.bufferShift[2]]),t.renderable.getCoordinateSystem()===Vo.WORLD?r.translate(t.keyMatrices.bcsc,t.keyMatrices.bcwc,[-n[0],-n[1],-n[2]]):r.copy(t.keyMatrices.bcsc,t.keyMatrices.bcwc),t.keyMatricesTime.modified()}return t.keyMatrices}}const Go={keyMatricesTime:null,keyMatrices:null,propID:void 0,bufferShift:void 0};function zo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Go,n),a.Z.extend(e,t,n),t.keyMatricesTime={},o.m.obj(t.keyMatricesTime,{mtime:0}),t.keyMatrices={normalMatrix:new Float64Array(16),bcwc:new Float64Array(16),bcsc:new Float64Array(16)},o.m.get(e,t,["propID","keyMatricesTime"]),t.bufferShift=[0,0,0,0],Uo(e,t)}const jo=o.m.newInstance(zo);function Yo(e,t){t.classHierarchy.push("vtkWebGPUCubeAxesActor"),e.buildPass=n=>{n&&(t.WebGPURenderer=e.getFirstAncestorOfType("vtkWebGPURenderer"),t.WebGPURenderWindow=t.WebGPURenderer.getParent(),t.CubeAxesActorHelper.getRenderable()||t.CubeAxesActorHelper.setRenderable(t.renderable),e.prepareNodes(),e.addMissingNode(t.CubeAxesActorHelper.getTmActor()),e.addMissingNode(t.renderable.getGridActor()),e.removeUnusedNodes())},e.opaquePass=(e,n)=>{if(e){const e=t.WebGPURenderer?t.WebGPURenderer.getRenderable().getActiveCamera():null,n=t.WebGPURenderer.getTiledSizeAndOrigin();t.CubeAxesActorHelper.updateAPISpecificData([n.usize,n.vsize],e,t.WebGPURenderWindow.getRenderable())}}}(0,vo.vw)("vtkActor2D",jo);const Ho={};function Wo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ho,n),a.Z.extend(e,t,n),t.CubeAxesActorHelper=Ot.newCubeAxesActorHelper(),Yo(e,t)}const $o=(0,o.n)(Wo,"vtkWebGPUCubeAxesActor");(0,vo.vw)("vtkCubeAxesActor",$o);var Zo=n(28);const{DisplayLocation:Ko}=wn;function qo(e,t){t.classHierarchy.push("vtkProperty2D"),e.setDisplayLocationToBackground=()=>e.setDisplayLocation(Ko.BACKGROUND),e.setDisplayLocationToForeground=()=>e.setDisplayLocation(Ko.FOREGROUND),e.setRepresentationToWireframe=()=>e.setRepresentation($n.hX.WIREFRAME),e.setRepresentationToSurface=()=>e.setRepresentation($n.hX.SURFACE),e.setRepresentationToPoints=()=>e.setRepresentation($n.hX.POINTS),e.getRepresentationAsString=()=>o.m.enumToString($n.hX,t.representation)}const Xo={color:[1,1,1],opacity:1,pointSize:1,lineWidth:1,representation:$n.hX.SURFACE,displayLocation:Ko.FOREGROUND};function Jo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Xo,n),o.m.obj(e,t),o.m.setGet(e,t,["opacity","lineWidth","pointSize","displayLocation","representation"]),o.m.setGetArray(e,t,["color"],3),qo(e,t)}var Qo={newInstance:o.m.newInstance(Jo,"vtkProperty2D"),extend:Jo,...wn},ea=n(18),ta=n(102),na=n(34);const{BufferUsage:ra,PrimitiveTypes:ia}=Zo.ZP,{Representation:oa}=Ut.ZP,{ScalarMode:aa}=dt.ZP,{CoordinateSystem:sa}=Vt.ZP,{DisplayLocation:la}=Qo,ua="\n//VTK::Renderer::Dec\n\n//VTK::Color::Dec\n\n//VTK::Normal::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Select::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::IOStructs::Dec\n\n@vertex\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : vertexOutput;\n\n var vertex: vec4 = vertexBC;\n\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Select::Impl\n\n //VTK::Position::Impl\n\n return output;\n}\n",ca='\nstruct PBRData {\n diffuse: vec3,\n specular: vec3,\n}\n\n// Dot product with the max already in it\nfn mdot(a: vec3, b: vec3) -> f32 {\n return max(0.0, dot(a, b));\n}\n// Dot product with a max in it that does not allow for negative values\n// Physically based rendering is accurate as long as normals are accurate,\n// however this is pretty often not the case. In order to prevent negative\n// values from ruining light calculations and creating zones of zero light,\n// this remapping is used, which smoothly clamps the dot product between\n// zero and one while still maintaining a good amount of accuracy.\nfn cdot(a: vec3, b: vec3) -> f32 {\n var d: f32 = max(0.0, dot(a, b));\n d = pow((d + 1) / 2.0, 2.6);\n return d;\n}\n\n// Lambertian diffuse model\nfn lambertDiffuse(base: vec3, N: vec3, L: vec3) -> vec3 {\n var pi: f32 = 3.14159265359; \n var NdotL: f32 = mdot(N, L);\n NdotL = pow(NdotL, 1.5);\n return (base/pi)*NdotL;\n}\n\n// Yasuhiro Fujii improvement on the Oren-Nayar model\n// https://mimosa-pudica.net/improved-oren-nayar.html\n// p is surface color, o is roughness\nfn fujiiOrenNayar(p: vec3, o: f32, N: vec3, L: vec3, V: vec3) -> vec3 {\n var invpi: f32 = 0.31830988618; // 1/pi\n\n var o2 = o*o;\n var NdotL: f32 = mdot(N, L);\n NdotL = pow(NdotL, 1.5); // Less physically accurate, but hides the "seams" between lights better\n\n var NdotV: f32 = mdot(N, V);\n var LdotV: f32 = mdot(L, V);\n\n var s: f32 = LdotV - NdotL*NdotV;\n var t: f32 = mix(1, max(NdotL, NdotV), step(0, s)); // Mix with step is the equivalent of an if statement\n var A: vec3 = 0.5*(o2 / (o2 + 0.33)) + 0.17*p*(o2 / (o2 + 0.13));\n A = invpi*(1 - A);\n var B: f32 = 0.45*(o2 / (o2 + 0.09));\n B = invpi*B;\n\n return p*NdotL*(A + B*(s/t));\n}\n\n// Fresnel portion of BRDF (IOR only, simplified)\nfn schlickFresnelIOR(V: vec3, N: vec3, ior: f32, k: f32) -> f32 {\n var NdotV: f32 = mdot(V, N);\n var F0: f32 = (pow((ior - 1.0), 2) + k*k) / (pow((ior + 1.0), 2) + k*k); // This takes into account the roughness, which the other one does not\n return F0 + (1 - F0) * pow((1-NdotV), 5); \n}\n\n// Fresnel portion of BRDF (Color ior, better)\nfn schlickFresnelRGB(V: vec3, N: vec3, F0: vec3) -> vec3 {\n var NdotV: f32 = mdot(V, N);\n return F0 + (1 - F0) * pow((1-NdotV), 5); \n}\n\n// Normal portion of BRDF\n// https://learnopengl.com/PBR/Theory\n// Trowbridge-Reitz GGX functions: normal, halfway, roughness^2\nfn trGGX(N: vec3, H: vec3, a: f32) -> f32 {\n var pi: f32 = 3.14159265359; \n\n var a2: f32 = a*a;\n var NdotH = mdot(N, H);\n var NdotH2 = NdotH*NdotH;\n \n var denom: f32 = NdotH2 * (a2 - 1.0) + 1.0;\n\n return a2 / max((pi*denom*denom), 0.000001);\n}\n\n// A VERY bad approximation of anisotropy. Real anisotropic calculations require tangent and bitangent\nfn anisotrophicTrGGX(N: vec3, H: vec3, O: vec3, s: f32, a: f32) -> f32 {\n var Op: vec3 = (rendererUBO.WCVCNormals * vec4(normalize(O) * s, 0.)).xyz;\n\n var ggx1: f32 = trGGX(N + Op*s, H, a);\n var ggx2: f32 = trGGX(N - Op*s, H, a);\n return (0.5 * ggx1 + 0.5 * ggx2);\n}\n\n// Geometry portion of BRDF\nfn schlickGGX(N: vec3, X: vec3, k: f32) -> f32 {\n var NdotX = cdot(N, X);\n return NdotX / max(0.000001, (NdotX*(1-k) + k));\n}\n\nfn smithSurfaceRoughness(N: vec3, V: vec3, L: vec3, k: f32) -> f32 {\n var ggx1: f32 = min(1, schlickGGX(N, V, k));\n var ggx2: f32 = min(1, schlickGGX(N, L, k));\n return ggx1*ggx2;\n}\n\n// BRDF Combination\nfn cookTorrance(D: f32, F: f32, G: f32, N: vec3, V: vec3, L: vec3) -> f32 {\n var num: f32 = D*F*G;\n var denom: f32 = 4*cdot(V, N)*cdot(L, N);\n\n return num / max(denom, 0.000001);\n}\n\n// Different lighting calculations for different light sources\nfn calcDirectionalLight(N: vec3, V: vec3, ior: f32, roughness: f32, metallic: f32, direction: vec3, color: vec3, base: vec3) -> PBRData { \n var L: vec3 = normalize(direction); // Light Vector\n var H: vec3 = normalize(L + V); // Halfway Vector\n\n var alpha = roughness*roughness;\n var k: f32 = alpha*alpha / 2;\n\n var D: f32 = trGGX(N, H, alpha); // Distribution\n // var F: f32 = schlickFresnelIOR(V, N, ior, k); // Fresnel\n var G: f32 = smithSurfaceRoughness(N, V, L, k); // Geometry\n\n var brdf: f32 = cookTorrance(D, 1, G, N, V, L); // Fresnel term is replaced with 1 because it is added later\n var incoming: vec3 = color;\n var angle: f32 = mdot(L, N);\n angle = pow(angle, 1.5);\n\n var specular: vec3 = brdf*incoming*angle;\n // Oren-Nayar gives a clay-like effect when fully rough which some people may not want, so it might be better to give a separate\n // control property for the diffuse vs specular roughness\n var diffuse: vec3 = incoming*fujiiOrenNayar(base, roughness, N, L, V); \n // Stores the specular and diffuse separately to allow for finer post processing\n var out = PBRData(diffuse, specular);\n \n return out; // Returns angle along with color of light so the final color can be multiplied by angle as well (creates black areas)\n}\n\n// TODO: find some way to reduce the number of arguments going in here\nfn calcPointLight(N: vec3, V: vec3, fragPos: vec3, ior: f32, roughness: f32, metallic: f32, position: vec3, color: vec3, base: vec3) -> PBRData {\n var L: vec3 = normalize(position - fragPos); // Light Vector\n var H: vec3 = normalize(L + V); // Halfway Vector\n var dist = distance(position, fragPos);\n\n var alpha = roughness*roughness;\n var k: f32 = alpha*alpha / 2; // could also be pow(alpha + 1.0, 2) / 8\n\n var D: f32 = trGGX(N, H, alpha); // Distribution\n // var F: f32 = schlickFresnelIOR(V, N, ior, k); // Fresnel\n var G: f32 = smithSurfaceRoughness(N, V, L, k); // Geometry\n\n var brdf: f32 = cookTorrance(D, 1, G, N, V, L); \n var incoming: vec3 = color * (1. / (dist*dist));\n var angle: f32 = mdot(L, N);\n angle = pow(angle, 1.5); // Smoothing factor makes it less accurate, but reduces ugly "seams" bewteen light sources\n\n var specular: vec3 = brdf*incoming*angle;\n var diffuse: vec3 = incoming*fujiiOrenNayar(base, roughness, N, L, V);\n\n // Stores the specular and diffuse separately to allow for finer post processing\n // Could also be done (propably more properly) with a struct\n var out = PBRData(diffuse, specular);\n \n return out; // Returns angle along with color of light so the final color can be multiplied by angle as well (creates black areas)\n}\n\n// For a reason unknown to me, spheres dont seem to behave propperly with head-on spot lights\nfn calcSpotLight(N: vec3, V: vec3, fragPos: vec3, ior: f32, roughness: f32, metallic: f32, position: vec3, direction: vec3, cones: vec2, color: vec3, base: vec3) -> PBRData {\n var L: vec3 = normalize(position - fragPos);\n var H: vec3 = normalize(L + V); // Halfway Vector\n var dist = distance(position, fragPos);\n\n var alpha = roughness*roughness;\n var k: f32 = alpha*alpha / 2; // could also be pow(alpha + 1.0, 2) / 8\n\n var D: f32 = trGGX(N, H, alpha); // Distribution\n // var F: f32 = schlickFresnelIOR(V, N, ior, k); // Fresnel\n var G: f32 = smithSurfaceRoughness(N, V, L, k); // Geometry\n\n var brdf: f32 = cookTorrance(D, 1, G, N, V, L); \n \n // Cones.x is the inner phi and cones.y is the outer phi\n var theta: f32 = mdot(normalize(direction), L);\n var epsilon: f32 = cones.x - cones.y;\n var intensity: f32 = (theta - cones.y) / epsilon;\n intensity = clamp(intensity, 0.0, 1.0);\n intensity /= dist*dist;\n\n var incoming: vec3 = color * intensity;\n\n var angle: f32 = mdot(L, N);\n angle = pow(angle, 1.5); // Smoothing factor makes it less accurate, but reduces ugly "seams" bewteen light sources\n\n var specular: vec3 = brdf*incoming*angle;\n var diffuse: vec3 = incoming*fujiiOrenNayar(base, roughness, N, L, V);\n\n // Stores the specular and diffuse separately to allow for finer post processing\n // Could also be done (propably more properly) with a struct\n var out = PBRData(diffuse, specular);\n \n return out; // Returns angle along with color of light so the final color can be multiplied by angle as well (creates black areas)\n}\n\n// Environment mapping stuff\n// Takes in a vector and converts it to an equivalent coordinate in a rectilinear texture. Should be replaced with cubemaps at some point\nfn vecToRectCoord(dir: vec3) -> vec2 {\n var tau: f32 = 6.28318530718;\n var pi: f32 = 3.14159265359;\n var out: vec2 = vec2(0.0);\n\n out.x = atan2(dir.z, dir.x) / tau;\n out.x += 0.5;\n\n var phix: f32 = length(vec2(dir.x, dir.z));\n out.y = atan2(dir.y, phix) / pi + 0.5;\n\n return out;\n}\n\n//VTK::Renderer::Dec\n\n//VTK::Color::Dec\n\n//VTK::TCoord::Dec\n\n// optional surface normal declaration\n//VTK::Normal::Dec\n\n//VTK::Select::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::IOStructs::Dec\n\n@fragment\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : fragmentOutput;\n\n // Temporary ambient, diffuse, and opacity\n var ambientColor: vec4 = mapperUBO.AmbientColor;\n var diffuseColor: vec4 = mapperUBO.DiffuseColor;\n var opacity: f32 = mapperUBO.Opacity;\n\n // This should be declared somewhere else\n var _diffuseMap: vec4 = vec4(1);\n var _roughnessMap: vec4 = vec4(1);\n var _metallicMap: vec4 = vec4(1);\n var _normalMap: vec4 = vec4(0, 0, 1, 0); // normal map was setting off the normal vector detection in fragment\n var _ambientOcclusionMap: vec4 = vec4(1);\n var _emissionMap: vec4 = vec4(0);\n\n //VTK::Color::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Normal::Impl\n\n var computedColor: vec4 = vec4(diffuseColor.rgb, 1.0);\n\n //VTK::Light::Impl\n\n //VTK::Select::Impl\n\n if (computedColor.a == 0.0) { discard; };\n\n //VTK::Position::Impl\n\n //VTK::RenderEncoder::Impl\n\n return output;\n}\n';function da(e){return e.indexOf("edge")>=0}function pa(e,t){t.classHierarchy.push("vtkWebGPUCellArrayMapper"),e.buildPass=n=>{n&&(t.is2D?(t.WebGPUActor=e.getFirstAncestorOfType("vtkWebGPUActor2D"),t.forceZValue=!0):(t.WebGPUActor=e.getFirstAncestorOfType("vtkWebGPUActor"),t.forceZValue=!1),t.coordinateSystem=t.WebGPUActor.getRenderable().getCoordinateSystem(),t.useRendererMatrix=t.coordinateSystem!==sa.DISPLAY,t.WebGPURenderer=t.WebGPUActor.getFirstAncestorOfType("vtkWebGPURenderer"),t.WebGPURenderWindow=t.WebGPURenderer.getParent(),t.device=t.WebGPURenderWindow.getDevice())},e.translucentPass=n=>{n&&(e.prepareToDraw(t.WebGPURenderer.getRenderEncoder()),t.renderEncoder.registerDrawCallback(t.pipeline,e.draw))},e.opaquePass=n=>{n&&(e.prepareToDraw(t.WebGPURenderer.getRenderEncoder()),t.renderEncoder.registerDrawCallback(t.pipeline,e.draw))},e.updateUBO=()=>{const n=t.WebGPUActor.getRenderable().getProperty(),r=t.UBO.getSendTime();if(e.getMTime()>r||n.getMTime()>r||t.renderable.getMTime()>r){const e=t.WebGPUActor.getKeyMatrices(t.WebGPURenderer);if(t.UBO.setArray("BCWCMatrix",e.bcwc),t.UBO.setArray("BCSCMatrix",e.bcsc),t.UBO.setArray("MCWCNormals",e.normalMatrix),t.is2D){t.UBO.setValue("ZValue",t.WebGPUActor.getRenderable().getProperty().getDisplayLocation()===la.FOREGROUND?1:0);const e=n.getColorByReference();t.UBO.setValue("AmbientIntensity",1),t.UBO.setArray("DiffuseColor",[e[0],e[1],e[2],1]),t.UBO.setValue("DiffuseIntensity",0),t.UBO.setValue("SpecularIntensity",0)}else{let e=n.getAmbientColorByReference();t.UBO.setValue("AmbientIntensity",n.getAmbient()),t.UBO.setArray("AmbientColor",[e[0],e[1],e[2],1]),t.UBO.setValue("DiffuseIntensity",n.getDiffuse()),e=n.getDiffuseColorByReference(),t.UBO.setArray("DiffuseColor",[e[0],e[1],e[2],1]),t.UBO.setValue("Roughness",n.getRoughness()),t.UBO.setValue("BaseIOR",n.getBaseIOR()),t.UBO.setValue("Metallic",n.getMetallic()),t.UBO.setValue("NormalStrength",n.getNormalStrength()),t.UBO.setValue("Emission",n.getEmission()),t.UBO.setValue("SpecularIntensity",n.getSpecular()),e=n.getSpecularColorByReference(),t.UBO.setArray("SpecularColor",[e[0],e[1],e[2],1])}const r=n.getEdgeColorByReference?.();r&&t.UBO.setArray("EdgeColor",[r[0],r[1],r[2],1]),t.UBO.setValue("LineWidth",n.getLineWidth()),t.UBO.setValue("Opacity",n.getOpacity()),t.UBO.setValue("PropID",t.WebGPUActor.getPropID());const i=t.WebGPURenderWindow.getDevice();t.UBO.sendIfNeeded(i)}},e.haveWideLines=()=>{const e=t.WebGPUActor.getRenderable(),n=e.getProperty().getRepresentation();return!(e.getProperty().getLineWidth()<=1)&&(t.primitiveType!==ia.Verts&&(t.primitiveType!==ia.Triangles&&t.primitiveType!==ia.TriangleStrips||n===oa.WIREFRAME))},e.replaceShaderPosition=(n,r,i)=>{const o=r.getShaderDescription("vertex");o.addBuiltinOutput("vec4","@builtin(position) Position"),o.hasOutput("vertexVC")||o.addOutput("vec4","vertexVC");let a=o.getCode();t.useRendererMatrix?(a=ea.ZP.substitute(a,"//VTK::Position::Impl",[" var pCoord: vec4 = rendererUBO.SCPCMatrix*mapperUBO.BCSCMatrix*vertexBC;"," output.vertexVC = rendererUBO.SCVCMatrix * mapperUBO.BCSCMatrix * vec4(vertexBC.xyz, 1.0);","//VTK::Position::Impl"]).result,t.forceZValue&&(a=ea.ZP.substitute(a,"//VTK::Position::Impl",["pCoord = vec4(pCoord.xyz/pCoord.w, 1.0);","pCoord.z = mapperUBO.ZValue;","//VTK::Position::Impl"]).result)):(a=ea.ZP.substitute(a,"//VTK::Position::Impl",[" var pCoord: vec4 = mapperUBO.BCSCMatrix*vertexBC;"," pCoord.x = 2.0* pCoord.x / rendererUBO.viewportSize.x - 1.0;"," pCoord.y = 2.0* pCoord.y / rendererUBO.viewportSize.y - 1.0;"," pCoord.z = 0.5 - 0.5 * pCoord.z;","//VTK::Position::Impl"]).result,t.forceZValue&&(a=ea.ZP.substitute(a,"//VTK::Position::Impl",[" pCoord.z = mapperUBO.ZValue;","//VTK::Position::Impl"]).result)),e.haveWideLines()&&(o.addBuiltinInput("u32","@builtin(instance_index) instanceIndex"),a=ea.ZP.substitute(a,"//VTK::Position::Impl",[" var tmpPos: vec4 = pCoord;"," var numSteps: f32 = ceil(mapperUBO.LineWidth - 1.0);"," var offset: f32 = (mapperUBO.LineWidth - 1.0) * (f32(input.instanceIndex / 2u) - numSteps/2.0) / numSteps;"," var tmpPos2: vec3 = tmpPos.xyz / tmpPos.w;"," tmpPos2.x = tmpPos2.x + 2.0 * (f32(input.instanceIndex) % 2.0) * offset / rendererUBO.viewportSize.x;"," tmpPos2.y = tmpPos2.y + 2.0 * (f32(input.instanceIndex + 1u) % 2.0) * offset / rendererUBO.viewportSize.y;"," tmpPos2.z = min(1.0, tmpPos2.z + 0.00001);"," pCoord = vec4(tmpPos2.xyz * tmpPos.w, tmpPos.w);","//VTK::Position::Impl"]).result),a=ea.ZP.substitute(a,"//VTK::Position::Impl",[" output.Position = pCoord;"]).result,o.setCode(a)},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition),e.replaceShaderNormal=(e,n,r)=>{const i=r.getBuffer("normalMC"),o=t.WebGPUActor.getRenderable();if(i){const e=n.getShaderDescription("vertex");e.hasOutput("normalVC")||e.addOutput("vec3","normalVC",i.getArrayInformation()[0].interpolation),e.hasOutput("tangentVC")||e.addOutput("vec3","tangentVC",i.getArrayInformation()[0].interpolation),e.hasOutput("bitangentVC")||e.addOutput("vec3","bitangentVC",i.getArrayInformation()[0].interpolation);let t=e.getCode();t=ea.ZP.substitute(t,"//VTK::Normal::Impl",[" output.normalVC = normalize((rendererUBO.WCVCNormals * mapperUBO.MCWCNormals * normalMC).xyz);"," var c1: vec3 = cross(output.normalVC, vec3(0, 0, 1));"," var c2: vec3 = cross(output.normalVC, vec3(0, 1, 0));"," var tangent: vec3 = mix(c1, c2, distance(c1, c2));"," output.tangentVC = normalize(tangent);"," output.bitangentVC = normalize(cross(output.normalVC, tangent));"]).result,e.setCode(t);const r=n.getShaderDescription("fragment");t=r.getCode(),t=o.getProperty().getNormalTexture()?ea.ZP.substitute(t,"//VTK::Normal::Impl",[" var normal: vec3 = input.normalVC;"," if (!input.frontFacing) { normal = -normal; }"," var tangent: vec3 = input.tangentVC;"," var bitangent: vec3 = input.bitangentVC;"," var TCVCMatrix: mat3x3 = mat3x3("," tangent.x, bitangent.x, normal.x,"," tangent.y, bitangent.y, normal.y,"," tangent.z, bitangent.z, normal.z,"," );"," var mappedNormal: vec3 = TCVCMatrix * (_normalMap.xyz * 2 - 1);"," normal = mix(normal, mappedNormal, mapperUBO.NormalStrength);"," normal = normalize(normal);"]).result:ea.ZP.substitute(t,"//VTK::Normal::Impl",[" var normal: vec3 = input.normalVC;"," if (!input.frontFacing) { normal = -normal; }"," normal = normalize(normal);"]).result,r.setCode(t)}},t.shaderReplacements.set("replaceShaderNormal",e.replaceShaderNormal),e.replaceShaderLight=(e,n,r)=>{if(e.includes("sel"))return;const i=n.getShaderDescription("vertex");i.hasOutput("vertexVC")||i.addOutput("vec4","vertexVC");const o=t.WebGPURenderer.getRenderable(),a=n.getShaderDescription("fragment");let s=a.getCode();if(!s.includes("var normal:")||!t.useRendererMatrix||da(e)||t.is2D||e.includes("sel"))s=ea.ZP.substitute(s,"//VTK::Light::Impl",[" var diffuse: vec3 = diffuseColor.rgb;"," var specular: vec3 = mapperUBO.SpecularColor.rgb * mapperUBO.SpecularColor.a;"," computedColor = vec4(diffuse * _diffuseMap.rgb, mapperUBO.Opacity);"]).result,a.setCode(s);else{const e=[" var pi: f32 = 3.14159265359;"," var fragPos: vec3 = vec3(input.vertexVC.xyz);"," var V: vec3 = mix(normalize(-fragPos), vec3(0, 0, 1), f32(rendererUBO.cameraParallel)); // View Vector"," var baseColor: vec3 = _diffuseMap.rgb * diffuseColor.rgb;"," var roughness: f32 = max(0.000001, mapperUBO.Roughness * _roughnessMap.r);"," var metallic: f32 = mapperUBO.Metallic * _metallicMap.r;"," var alpha: f32 = roughness*roughness;"," var ior: f32 = mapperUBO.BaseIOR;"," var k: f32 = alpha*alpha / 2;"," var diffuse: vec3 = vec3(0.);"," var specular: vec3 = vec3(0.);"," var emission: vec3 = _emissionMap.rgb * mapperUBO.Emission;"," {"," var i: i32 = 0;"," loop {"," if !(i < rendererUBO.LightCount) { break; }"," switch (i32(rendererLightSSBO.values[i].LightData.x)) {"," // Point Light"," case 0 {"," var color: vec3 = rendererLightSSBO.values[i].LightColor.rgb * rendererLightSSBO.values[i].LightColor.w;"," var pos: vec3 = (rendererLightSSBO.values[i].LightPos).xyz;"," var calculated: PBRData = calcPointLight(normal, V, fragPos, ior, roughness, metallic, pos, color, baseColor);"," diffuse += max(vec3(0), calculated.diffuse);"," specular += max(vec3(0), calculated.specular);"," }"," // Directional light"," case 1 {"," var dir: vec3 = (rendererUBO.WCVCNormals * vec4(normalize(rendererLightSSBO.values[i].LightDir.xyz), 0.)).xyz;"," dir = normalize(dir);"," var color: vec3 = rendererLightSSBO.values[i].LightColor.rgb * rendererLightSSBO.values[i].LightColor.w;"," var calculated: PBRData = calcDirectionalLight(normal, V, ior, roughness, metallic, dir, color, baseColor); // diffuseColor.rgb needs to be fixed with a more dynamic diffuse color"," diffuse += max(vec3(0), calculated.diffuse);"," specular += max(vec3(0), calculated.specular);"," }"," // Spot Light"," case 2 {"," var color: vec3 = rendererLightSSBO.values[i].LightColor.rgb * rendererLightSSBO.values[i].LightColor.w;"," var pos: vec3 = (rendererLightSSBO.values[i].LightPos).xyz;"," var dir: vec3 = (rendererUBO.WCVCNormals * vec4(normalize(rendererLightSSBO.values[i].LightDir.xyz), 0.)).xyz;"," dir = normalize(dir);"," var cones: vec2 = vec2(rendererLightSSBO.values[i].LightData.y, rendererLightSSBO.values[i].LightData.z);"," var calculated: PBRData = calcSpotLight(normal, V, fragPos, ior, roughness, metallic, pos, dir, cones, color, baseColor);"," diffuse += max(vec3(0), calculated.diffuse);"," specular += max(vec3(0), calculated.specular);"," }"," default { continue; }"," }"," continuing { i++; }"," }"," }"," var fresnel: f32 = schlickFresnelIOR(V, normal, ior, k); // Fresnel"," fresnel = min(1, fresnel);"," // This could be controlled with its own variable (that isnt base color) for better artistic control"," var fresnelMetallic: vec3 = schlickFresnelRGB(V, normal, baseColor); // Fresnel for metal, takes color into account"," var kS: vec3 = mix(vec3(fresnel), fresnelMetallic, metallic);"," kS = min(vec3(1), kS);"," var kD: vec3 = (1.0 - kS) * (1.0 - metallic);"," var PBR: vec3 = mapperUBO.DiffuseIntensity*kD*diffuse + kS*specular;"," PBR += emission;"," computedColor = vec4(PBR, mapperUBO.Opacity);"];o.getEnvironmentTexture()?.getImageLoaded()&&e.push(" // To get diffuse IBL, the texture is sampled with normals in worldspace"," var diffuseIBLCoords: vec3 = (transpose(rendererUBO.WCVCNormals) * vec4(normal, 1.)).xyz;"," var diffuseCoords: vec2 = vecToRectCoord(diffuseIBLCoords);"," // To get specular IBL, the texture is sampled as the worldspace reflection between the normal and view vectors"," // Reflections are first calculated in viewspace, then converted to worldspace to sample the environment"," var VreflN: vec3 = normalize(reflect(-V, normal));"," var reflectionIBLCoords = (transpose(rendererUBO.WCVCNormals) * vec4(VreflN, 1.)).xyz;"," var specularCoords: vec2 = vecToRectCoord(reflectionIBLCoords);"," var diffuseIBL = textureSampleLevel(EnvironmentTexture, EnvironmentTextureSampler, diffuseCoords, rendererUBO.MaxEnvironmentMipLevel);"," var level = roughness * rendererUBO.MaxEnvironmentMipLevel;"," var specularIBL = textureSampleLevel(EnvironmentTexture, EnvironmentTextureSampler, specularCoords, level);"," var specularIBLContribution: vec3 = specularIBL.rgb*rendererUBO.BackgroundSpecularStrength;"," computedColor += vec4(specularIBLContribution*kS, 0);"," var diffuseIBLContribution: vec3 = diffuseIBL.rgb*rendererUBO.BackgroundDiffuseStrength;"," diffuseIBLContribution *= baseColor * _ambientOcclusionMap.rgb;"," computedColor += vec4(diffuseIBLContribution*kD, 0);"),s=ea.ZP.substitute(s,"//VTK::Light::Impl",e).result,a.setCode(s)}},t.shaderReplacements.set("replaceShaderLight",e.replaceShaderLight),e.replaceShaderColor=(e,t,n)=>{if(da(e)){const e=t.getShaderDescription("fragment");let n=e.getCode();return n=ea.ZP.substitute(n,"//VTK::Color::Impl",["ambientColor = mapperUBO.EdgeColor;","diffuseColor = mapperUBO.EdgeColor;"]).result,void e.setCode(n)}const r=n.getBuffer("colorVI");if(!r)return;const i=t.getShaderDescription("vertex");i.addOutput("vec4","color",r.getArrayInformation()[0].interpolation);let o=i.getCode();o=ea.ZP.substitute(o,"//VTK::Color::Impl",[" output.color = colorVI;"]).result,i.setCode(o);const a=t.getShaderDescription("fragment");o=a.getCode(),o=ea.ZP.substitute(o,"//VTK::Color::Impl",["ambientColor = input.color;","diffuseColor = input.color;","opacity = mapperUBO.Opacity * input.color.a;"]).result,a.setCode(o)},t.shaderReplacements.set("replaceShaderColor",e.replaceShaderColor),e.replaceShaderTCoord=(e,n,r)=>{if(!r.hasAttribute("tcoord"))return;const i=n.getShaderDescription("vertex"),o=r.getBuffer("tcoord"),a=na.Z.getNumberOfComponentsFromBufferFormat(o.getArrayInformation()[0].format);let s=i.getCode();i.addOutput(`vec${a}`,"tcoordVS"),s=ea.ZP.substitute(s,"//VTK::TCoord::Impl",[" output.tcoordVS = tcoord;"]).result,i.setCode(s);const l=n.getShaderDescription("fragment");s=l.getCode();const u=t.WebGPUActor.getRenderable(),c=e=>{if(!e)return!1;return e.getDimensionality()===a},d=[];(u.getProperty().getDiffuseTexture?.()?.getImageLoaded()||u.getTextures()[0]||t.colorTexture)&&(c(u.getProperty().getDiffuseTexture?.())||c(u.getTextures()[0])||c(t.colorTexture))&&d.push("_diffuseMap = textureSample(DiffuseTexture, DiffuseTextureSampler, input.tcoordVS);"),u.getProperty().getRoughnessTexture?.()?.getImageLoaded()&&c(u.getProperty().getRoughnessTexture())&&d.push("_roughnessMap = textureSample(RoughnessTexture, RoughnessTextureSampler, input.tcoordVS);"),u.getProperty().getMetallicTexture?.()?.getImageLoaded()&&c(u.getProperty().getMetallicTexture())&&d.push("_metallicMap = textureSample(MetallicTexture, MetallicTextureSampler, input.tcoordVS);"),u.getProperty().getNormalTexture?.()?.getImageLoaded()&&c(u.getProperty().getNormalTexture())&&d.push("_normalMap = textureSample(NormalTexture, NormalTextureSampler, input.tcoordVS);"),u.getProperty().getAmbientOcclusionTexture?.()?.getImageLoaded()&&c(u.getProperty().getAmbientOcclusionTexture())&&d.push("_ambientOcclusionMap = textureSample(AmbientOcclusionTexture, AmbientOcclusionTextureSampler, input.tcoordVS);"),u.getProperty().getEmissionTexture?.()?.getImageLoaded()&&c(u.getProperty().getEmissionTexture())&&d.push("_emissionMap = textureSample(EmissionTexture, EmissionTextureSampler, input.tcoordVS);"),s=ea.ZP.substitute(s,"//VTK::TCoord::Impl",d).result,l.setCode(s)},t.shaderReplacements.set("replaceShaderTCoord",e.replaceShaderTCoord),e.replaceShaderSelect=(e,t,n)=>{if(e.includes("sel")){const e=t.getShaderDescription("fragment");let n=e.getCode();n=ea.ZP.substitute(n,"//VTK::Select::Impl",[" var compositeID: u32 = 0u;"]).result,e.setCode(n)}},t.shaderReplacements.set("replaceShaderSelect",e.replaceShaderSelect),e.getUsage=(e,t)=>e===oa.POINTS||t===ia.Points?ra.Verts:t===ia.Lines?ra.Lines:e===oa.WIREFRAME?t===ia.Triangles?ra.LinesFromTriangles:ra.LinesFromStrips:t===ia.Triangles?ra.Triangles:t===ia.TriangleStrips?ra.Strips:t===ia.TriangleEdges?ra.LinesFromTriangles:ra.LinesFromStrips,e.getHashFromUsage=e=>`pt${e}`,e.getTopologyFromUsage=e=>{switch(e){case ra.Triangles:return"triangle-list";case ra.Verts:return"point-list";case ra.Lines:default:return"line-list"}},e.buildVertexInput=()=>{const n=t.currentInput,r=t.cellArray,i=t.primitiveType;let o=t.WebGPUActor.getRenderable().getProperty().getRepresentation();const a=t.WebGPURenderWindow.getDevice();let s=!1;i===ia.TriangleEdges&&(s=!0,o=oa.WIREFRAME);const l=t.vertexInput,u=n.getPoints();let c;if(r){const e={hash:`R${o}P${i}${r.getMTime()}`,usage:ra.Index,cells:r,numberOfPoints:u.getNumberOfPoints(),primitiveType:i,representation:o};c=a.getBufferManager().getBuffer(e),l.setIndexBuffer(c)}else l.setIndexBuffer(null);if(u){const e=t.WebGPUActor.getBufferShift(t.WebGPURenderer),n={hash:`${u.getMTime()}I${c.getMTime()}${e.join()}float32x4`,usage:ra.PointArray,format:"float32x4",dataArray:u,indexBuffer:c,shift:e,packExtra:!0},r=a.getBufferManager().getBuffer(n);l.addBuffer(r,["vertexBC"])}else l.removeBufferIfPresent("vertexBC");const d=e.getUsage(o,i);if(t._usesCellNormals=!1,t.is2D||d!==ra.Triangles&&d!==ra.Strips)l.removeBufferIfPresent("normalMC");else{const e=n.getPointData().getNormals(),o={format:"snorm8x4",indexBuffer:c,packExtra:!0,shift:0,scale:127};if(e){o.hash=`${e.getMTime()}I${c.getMTime()}snorm8x4`,o.dataArray=e,o.usage=ra.PointArray;const t=a.getBufferManager().getBuffer(o);l.addBuffer(t,["normalMC"])}else if(i===ia.Triangles){t._usesCellNormals=!0,o.hash=`PFN${u.getMTime()}I${c.getMTime()}snorm8x4`,o.dataArray=u,o.cells=r,o.usage=ra.NormalsFromPoints;const e=a.getBufferManager().getBuffer(o);l.addBuffer(e,["normalMC"])}else l.removeBufferIfPresent("normalMC")}let p=!1;if(t.renderable.getScalarVisibility()){const e=t.renderable.getColorMapColors();if(e&&!s){const r=t.renderable.getScalarMode();let i=!1;r!==aa.USE_CELL_DATA&&r!==aa.USE_CELL_FIELD_DATA&&r!==aa.USE_FIELD_DATA&&n.getPointData().getScalars()||r===aa.USE_POINT_FIELD_DATA||!e||(i=!0);const o={usage:ra.PointArray,format:"unorm8x4",hash:`${i}${e.getMTime()}I${c.getMTime()}unorm8x4`,dataArray:e,indexBuffer:c,cellData:i,cellOffset:0},s=a.getBufferManager().getBuffer(o);l.addBuffer(s,["colorVI"]),p=!0}}p||l.removeBufferIfPresent("colorVI");let f=null;if(f=t.renderable.getInterpolateScalarsBeforeMapping?.()&&t.renderable.getColorCoordinates()?t.renderable.getColorCoordinates():n.getPointData().getTCoords(),f&&!s){const e=a.getBufferManager().getBufferForPointArray(f,l.getIndexBuffer());l.addBuffer(e,["tcoord"])}else l.removeBufferIfPresent("tcoord")},e.updateTextures=()=>{const e=[],n=[],r=t.renderable.getColorTextureMap?.();r&&(t.colorTexture||(t.colorTexture=ft.ZP.newInstance({label:"polyDataColor"})),t.colorTexture.setInputData(r),n.push(["Diffuse",t.colorTexture]));const i=t.WebGPUActor.getRenderable(),o=t.WebGPURenderer.getRenderable(),a=[];if(i.getProperty().getDiffuseTexture?.()){const e=["Diffuse",i.getProperty().getDiffuseTexture()];a.push(e)}if(i.getTextures()[0]){const e=["Diffuse",i.getTextures()[0]];a.push(e)}if(t.colorTexture){const e=["Diffuse",t.colorTexture];a.push(e)}if(i.getProperty().getRoughnessTexture?.()){const e=["Roughness",i.getProperty().getRoughnessTexture()];a.push(e)}if(i.getProperty().getMetallicTexture?.()){const e=["Metallic",i.getProperty().getMetallicTexture()];a.push(e)}if(i.getProperty().getNormalTexture?.()){const e=["Normal",i.getProperty().getNormalTexture()];a.push(e)}if(i.getProperty().getAmbientOcclusionTexture?.()){const e=["AmbientOcclusion",i.getProperty().getAmbientOcclusionTexture()];a.push(e)}if(i.getProperty().getEmissionTexture?.()){const e=["Emission",i.getProperty().getEmissionTexture()];a.push(e)}if(o.getEnvironmentTexture?.()){const e=["Environment",o.getEnvironmentTexture()];a.push(e)}for(let e=0;e=0;n--)e[n]||(t.textures.splice(n,1),t.textureViews.splice(n,1))},e.computePipelineHash=()=>{let n=`pd${t.useRendererMatrix?"r":""}${t.forceZValue?"z":""}`;if(t.primitiveType===ia.TriangleEdges||t.primitiveType===ia.TriangleStripEdges)n+="edge";else{if(t.vertexInput.hasAttribute("normalMC")&&(n+="n"),t.vertexInput.hasAttribute("colorVI")&&(n+="c"),t.vertexInput.hasAttribute("tcoord")){const e=t.vertexInput.getBuffer("tcoord");n+=`t${na.Z.getNumberOfComponentsFromBufferFormat(e.getArrayInformation()[0].format)}`}t.textures.length&&(n+=`tx${t.textures.length}`)}t._usesCellNormals&&(n+="cn"),t.SSBO&&(n+="ssbo");n+=e.getHashFromUsage(t.usage),n+=t.renderEncoder.getPipelineHash(),t.pipelineHash=n},e.updateBuffers=()=>{t.primitiveType!==ia.TriangleEdges&&t.primitiveType!==ia.TriangleStripEdges&&e.updateTextures();const n=t.WebGPUActor.getRenderable(),r=n.getProperty().getRepresentation();t.usage=e.getUsage(r,t.primitiveType),e.buildVertexInput();const i=t.vertexInput.getBuffer("vertexBC");if(e.setNumberOfVertices(i.getSizeInBytes()/i.getStrideInBytes()),e.setTopology(e.getTopologyFromUsage(t.usage)),e.updateUBO(),e.haveWideLines()){const t=n.getProperty();e.setNumberOfInstances(Math.ceil(2*t.getLineWidth()))}else e.setNumberOfInstances(1)}}const fa={is2D:!1,cellArray:null,currentInput:null,cellOffset:0,primitiveType:0,colorTexture:null,renderEncoder:null,textures:null};function ha(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fa,n),ta.ZP.extend(e,t,n),t.fragmentShaderTemplate=ca,t.vertexShaderTemplate=ua,t._tmpMat3=i.identity(new Float64Array(9)),t._tmpMat4=r.identity(new Float64Array(16)),t.UBO=To.ZP.newInstance({label:"mapperUBO"}),t.UBO.addEntry("BCWCMatrix","mat4x4"),t.UBO.addEntry("BCSCMatrix","mat4x4"),t.UBO.addEntry("MCWCNormals","mat4x4"),t.UBO.addEntry("AmbientColor","vec4"),t.UBO.addEntry("DiffuseColor","vec4"),t.UBO.addEntry("EdgeColor","vec4"),t.UBO.addEntry("SpecularColor","vec4"),t.UBO.addEntry("AmbientIntensity","f32"),t.UBO.addEntry("DiffuseIntensity","f32"),t.UBO.addEntry("Roughness","f32"),t.UBO.addEntry("Metallic","f32"),t.UBO.addEntry("Ambient","f32"),t.UBO.addEntry("Normal","f32"),t.UBO.addEntry("Emission","f32"),t.UBO.addEntry("NormalStrength","f32"),t.UBO.addEntry("BaseIOR","f32"),t.UBO.addEntry("SpecularIntensity","f32"),t.UBO.addEntry("LineWidth","f32"),t.UBO.addEntry("Opacity","f32"),t.UBO.addEntry("ZValue","f32"),t.UBO.addEntry("PropID","u32"),t.UBO.addEntry("ClipNear","f32"),t.UBO.addEntry("ClipFar","f32"),t.UBO.addEntry("Time","u32"),(0,o.e)(e,t,["cellArray","currentInput","cellOffset","is2D","primitiveType","renderEncoder"]),t.textures=[],pa(e,t)}var ma={newInstance:(0,o.n)(ha,"vtkWebGPUCellArrayMapper"),extend:ha};const{PrimitiveTypes:ga}=Zo.ZP;function va(e,t){t.classHierarchy.push("vtkWebGPUPolyDataMapper"),e.createCellArrayMapper=()=>ma.newInstance(),e.buildPass=n=>{if(n){t.WebGPUActor=e.getFirstAncestorOfType("vtkWebGPUActor"),t.renderable.getStatic()||t.renderable.update();const n=t.renderable.getInputData();t.renderable.mapScalars(n,1),e.updateCellArrayMappers(n)}},e.updateCellArrayMappers=n=>{const r=[n.getVerts(),n.getLines(),n.getPolys(),n.getStrips()],i=[];let o=0;for(let a=ga.Points;a<=ga.Triangles;a++)if(r[a].getNumberOfValues()>0){t.primitives[a]||(t.primitives[a]=e.createCellArrayMapper());const s=t.primitives[a];s.setCellArray(r[a]),s.setCurrentInput(n),s.setCellOffset(o),s.setPrimitiveType(a),s.setRenderable(t.renderable),o+=r[a].getNumberOfCells(),i.push(s)}else t.primitives[a]=null;if(t.WebGPUActor.getRenderable().getProperty().getEdgeVisibility())for(let o=ga.TriangleEdges;o<=ga.TriangleStripEdges;o++)if(r[o-2].getNumberOfValues()>0){t.primitives[o]||(t.primitives[o]=e.createCellArrayMapper());const a=t.primitives[o];a.setCellArray(r[o-2]),a.setCurrentInput(n),a.setCellOffset(t.primitives[o-2].getCellOffset()),a.setPrimitiveType(o),a.setRenderable(t.renderable),i.push(a)}else t.primitives[o]=null;e.prepareNodes(),e.addMissingChildren(i),e.removeUnusedNodes()}}const ya={primitives:null};function _a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ya,n),a.Z.extend(e,t,n),t.primitives=[],va(e,t)}const ba=(0,o.n)(_a,"vtkWebGPUPolyDataMapper");var xa={newInstance:ba,extend:_a};(0,vo.vw)("vtkMapper",ba);const{PrimitiveTypes:wa}=Zo.ZP;function Sa(e,t){t.classHierarchy.push("vtkWebGPUPolyDataMapper2D"),e.createCellArrayMapper=()=>ma.newInstance(),e.buildPass=n=>{if(n){t.WebGPUActor=e.getFirstAncestorOfType("vtkWebGPUActor2D"),t.renderable.getStatic()||t.renderable.update();const n=t.renderable.getInputData();t.renderable.mapScalars(n,1),e.updateCellArrayMappers(n)}},e.updateCellArrayMappers=n=>{const r=[n.getVerts(),n.getLines(),n.getPolys(),n.getStrips()],i=[];let o=0;for(let a=wa.Points;a<=wa.Triangles;a++)if(r[a].getNumberOfValues()>0){t.primitives[a]||(t.primitives[a]=e.createCellArrayMapper());const s=t.primitives[a];s.setCellArray(r[a]),s.setCurrentInput(n),s.setCellOffset(o),s.setPrimitiveType(a),s.setRenderable(t.renderable),s.setIs2D(!0),o+=r[a].getNumberOfCells(),i.push(s)}else t.primitives[a]=null;e.prepareNodes(),e.addMissingChildren(i),e.removeUnusedNodes()}}function Ca(e){return{primitives:[],...e}}function Ta(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ca(n)),a.Z.extend(e,t,n),t.primitives=[],Sa(e,t)}const Ma=(0,o.n)(Ta,"vtkWebGPUPolyDataMapper2D");function Da(e,t){t.classHierarchy.push("vtkWebGPUScalarBarActor"),e.buildPass=n=>{n&&(t.WebGPURenderer=e.getFirstAncestorOfType("vtkWebGPURenderer"),t.WebGPURenderWindow=t.WebGPURenderer.getParent(),t.scalarBarActorHelper.getRenderable()||t.scalarBarActorHelper.setRenderable(t.renderable),e.prepareNodes(),e.addMissingNode(t.scalarBarActorHelper.getBarActor()),e.addMissingNode(t.scalarBarActorHelper.getTmActor()),e.removeUnusedNodes())},e.opaquePass=(e,n)=>{if(e){const e=t.WebGPURenderer?t.WebGPURenderer.getRenderable().getActiveCamera():null,n=t.WebGPURenderer.getTiledSizeAndOrigin();t.scalarBarActorHelper.updateAPISpecificData([n.usize,n.vsize],e,t.WebGPURenderWindow.getRenderable())}}}(0,vo.vw)("vtkMapper2D",Ma);const Aa={};function Pa(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Aa,n),a.Z.extend(e,t,n),t.scalarBarActorHelper=zn.newScalarBarActorHelper(),Da(e,t)}const ka=(0,o.n)(Pa,"vtkWebGPUScalarBarActor");(0,vo.vw)("vtkScalarBarActor",ka);n(49);function La(e,t){t.classHierarchy.push("vtkWebGPUGlyph3DCellArrayMapper");const n={...e};e.setGlyphInstances=e=>{t.glyphInstances=e},e.updateBuffers=()=>{n.updateBuffers(),e.setNumberOfInstances(t.glyphInstances)},e.replaceShaderPosition=(e,t,n)=>{const r=t.getShaderDescription("vertex");r.addBuiltinInput("u32","@builtin(instance_index) instanceIndex"),r.addBuiltinOutput("vec4","@builtin(position) Position"),r.hasOutput("vertexVC")||r.addOutput("vec3","vertexVC");let i=r.getCode();i=ea.ZP.substitute(i,"//VTK::Position::Impl",[" var vertexSC: vec4 = mapperUBO.BCSCMatrix*glyphSSBO.values[input.instanceIndex].matrix*vertexBC;"," output.vertexVC = (rendererUBO.SCVCMatrix*vertexSC).xyz;"," output.Position = rendererUBO.SCPCMatrix*vertexSC;"]).result,r.setCode(i)},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition),e.replaceShaderNormal=(e,t,r)=>{if(r.hasAttribute("normalMC")){const e=t.getShaderDescription("vertex");let n=e.getCode();n=ea.ZP.substitute(n,"//VTK::Normal::Impl",[" output.normalVC = normalize((rendererUBO.WCVCNormals"," * mapperUBO.MCWCNormals"," * glyphSSBO.values[input.instanceIndex].normal*normalMC).xyz);"]).result,e.setCode(n)}n.replaceShaderNormal(e,t,r)},t.shaderReplacements.set("replaceShaderNormal",e.replaceShaderNormal),e.replaceShaderColor=(e,r,i)=>{if(!t.renderable.getColorArray())return void n.replaceShaderColor(e,r,i);const o=r.getShaderDescription("vertex");o.addOutput("vec4","color");let a=o.getCode();a=ea.ZP.substitute(a,"//VTK::Color::Impl",[" output.color = glyphSSBO.values[input.instanceIndex].color;"]).result,o.setCode(a);const s=r.getShaderDescription("fragment");a=s.getCode(),a=ea.ZP.substitute(a,"//VTK::Color::Impl",["ambientColor = input.color;","diffuseColor = input.color;","opacity = mapperUBO.Opacity * input.color.a;"]).result,s.setCode(a)},t.shaderReplacements.set("replaceShaderColor",e.replaceShaderColor),e.replaceShaderSelect=(e,t,n)=>{if(e.includes("sel")){const e=t.getShaderDescription("vertex");e.addOutput("u32","compositeID","flat");let n=e.getCode();n=ea.ZP.substitute(n,"//VTK::Select::Impl",[" output.compositeID = input.instanceIndex;"]).result,e.setCode(n);const r=t.getShaderDescription("fragment");n=r.getCode(),n=ea.ZP.substitute(n,"//VTK::Select::Impl",["var compositeID: u32 = input.compositeID;"]).result,r.setCode(n)}},t.shaderReplacements.set("replaceShaderSelect",e.replaceShaderSelect)}const Oa=(0,o.n)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,{},n),ma.extend(e,t,n),La(e,t)}),"vtkWebGPUGlyph3DCellArrayMapper");function Ea(e,t){t.classHierarchy.push("vtkWebGPUGlyph3DMapper"),e.createCellArrayMapper=()=>{const e=Oa();return e.setSSBO(t.SSBO),e.setRenderable(t.renderable),e},e.buildPass=n=>{if(n){t.WebGPUActor=e.getFirstAncestorOfType("vtkWebGPUActor"),t.renderable.getStatic()||t.renderable.update();const n=t.renderable.getInputData(1);t.renderable.mapScalars(n,1),e.updateSSBO(),e.updateCellArrayMappers(n);for(let e=0;e{t.currentInput=t.renderable.getInputData(1),t.renderable.buildArrays();const n=t.renderable.getMatrixArray(),r=t.renderable.getNormalArray();if(t.carray=t.renderable.getColorArray(),t.numInstances=n.length/16,t.renderable.getBuildTime().getMTime()>t.glyphBOBuildTime.getMTime()){t.WebGPURenderWindow=e.getFirstAncestorOfType("vtkWebGPURenderWindow");const i=t.WebGPURenderWindow.getDevice();t.SSBO.clearData(),t.SSBO.setNumberOfInstances(t.numInstances),t.SSBO.addEntry("matrix","mat4x4"),t.SSBO.addEntry("normal","mat4x4"),t.carray&&t.SSBO.addEntry("color","vec4"),t.SSBO.setAllInstancesFromArray("matrix",n),t.SSBO.setAllInstancesFromArray3x3To4x4("normal",r),t.carray&&t.SSBO.setAllInstancesFromArrayColorToFloat("color",t.carray.getData()),t.SSBO.send(i),t.glyphBOBuildTime.modified()}}}const Ia={};function Na(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ia,n),xa.extend(e,t,n),t.glyphBOBuildTime={},(0,o.o)(t.glyphBOBuildTime,{mtime:0}),t.SSBO=Co.ZP.newInstance({label:"glyphSSBO"}),Ea(e,t)}const Ra=(0,o.n)(Na,"vtkWebGPUGlyph3DMapper");(0,vo.vw)("vtkGlyph3DMapper",Ra);var Ba=n(577),Fa=n(74);const{SlicingMode:Va}=Hr.Z,Ua="\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Image::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n@fragment\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n //VTK::Image::Sample\n\n // var computedColor: vec4 = vec4(1.0,0.7, 0.5, 1.0);\n\n//VTK::RenderEncoder::Impl\n\n return output;\n}\n";const Ga=new Float64Array(16),za=new Float64Array(16),ja=new Float64Array(16),Ya=new Float64Array(4),Ha=new Float64Array(4);function Wa(e,t){t.classHierarchy.push("vtkWebGPUImageMapper"),e.buildPass=n=>{if(n){t.WebGPUImageSlice=e.getFirstAncestorOfType("vtkWebGPUImageSlice"),t.WebGPURenderer=t.WebGPUImageSlice.getFirstAncestorOfType("vtkWebGPURenderer"),t.WebGPURenderWindow=t.WebGPURenderer.getParent(),t.device=t.WebGPURenderWindow.getDevice();const n=t.WebGPURenderer.getRenderable();t.renderable.getSliceAtFocalPoint()&&t.renderable.setSliceFromCamera(n.getActiveCamera())}},e.translucentPass=t=>{t&&e.render()},e.opaquePass=t=>{t&&e.render()},e.render=()=>{t.renderable.update(),t.currentInput=t.renderable.getInputData(),e.prepareToDraw(t.WebGPURenderer.getRenderEncoder()),t.renderEncoder.registerDrawCallback(t.pipeline,e.draw)},e.computePipelineHash=()=>{const e=t.currentInput.getExtent();e[0]===e[1]||e[2]===e[3]||e[4]===e[5]?(t.dimensions=2,t.pipelineHash="img2"):(t.dimensions=3,t.pipelineHash="img3")},e.updateUBO=()=>{const n=t.UBO.getSendTime(),i=t.WebGPUImageSlice.getRenderable(),o=i.getMapper();if(e.getMTime()>n||t.renderable.getMTime()>n||i.getProperty().getMTime()>n){const e=o.getInputData(),n=t.WebGPURenderer.getStabilizedCenterByReference();r.identity(Ga),r.translate(Ga,Ga,n);const a=i.getMatrix();r.transpose(za,a),r.invert(za,za),r.multiply(Ga,za,Ga);const s=e.getWorldToIndex();r.multiply(Ga,s,Ga),r.invert(ja,Ga),r.fromTranslation(za,[.5,.5,.5]),r.multiply(Ga,za,Ga);const l=e.getDimensions();r.identity(za),r.scale(za,za,[1/l[0],1/l[1],1/l[2]]),r.multiply(Ga,za,Ga),t.UBO.setArray("SCTCMatrix",Ga);const u=t.currentInput.getExtent(),{ijkMode:c}=t.renderable.getClosestIJKAxis();let d=t.renderable.getSlice();c!==t.renderable.getSlicingMode()&&(d=t.renderable.getSliceAtPosition(d));let p=2,f=0,h=1;c===Va.I?(p=0,f=1,h=2):c===Va.J&&(p=1,f=2,h=0),Ya[p]=d,Ya[f]=u[2*f]-.5,Ya[h]=u[2*h]-.5,Ya[3]=1,Ba.fF(Ya,Ya,ja),t.UBO.setArray("Origin",Ya),Ha[p]=d,Ha[f]=u[2*f+1]+.5,Ha[h]=u[2*h]-.5,Ha[3]=1,Ba.fF(Ha,Ha,ja),Ba.$X(Ha,Ha,Ya),Ha[3]=1,t.UBO.setArray("Axis1",Ha),Ha[p]=d,Ha[f]=u[2*f]-.5,Ha[h]=u[2*h+1]+.5,Ha[3]=1,Ba.fF(Ha,Ha,ja),Ba.$X(Ha,Ha,Ya),Ha[3]=1,t.UBO.setArray("Axis2",Ha);const m=[1,1,1,1],g=[0,0,0,0],v=t.textureViews[0],y=v.getTexture().getScale(),_=v.getTexture().getNumberOfComponents();for(let e=0;e<_;e++){let t=i.getProperty().getColorWindow(),n=i.getProperty().getColorLevel();const r=0,o=i.getProperty().getRGBTransferFunction(r);if(o){const e=o.getRange();t=e[1]-e[0],n=.5*(e[1]+e[0])}m[e]=y/t,g[e]=-n/t+.5}t.UBO.setArray("cScale",m),t.UBO.setArray("cShift",g),t.UBO.sendIfNeeded(t.device)}},e.updateLUTImage=()=>{const n=t.WebGPUImageSlice.getRenderable().getProperty();e.getTextureViews()[0].getTexture().getNumberOfComponents();const r=function(e,t,n){if(t.apply(e)){const t=e.getIndependentComponents();return`${e.getMTime()}-${t}-${n}`}return"0"}(n,n.getRGBTransferFunction,1);if(t.colorTextureString!==r){t.numRows=1;const e=new Uint8Array(2*t.numRows*t.rowLength*4);let i=n.getRGBTransferFunction();if(i){const r=new Float32Array(3*t.rowLength);for(let o=0;o<1;o++){i=n.getRGBTransferFunction(o);const a=i.getRange();i.getTable(a[0],a[1],t.rowLength,r,1);for(let n=0;n{n();const r=t.device.getTextureManager().getTextureForImageData(t.currentInput),i=t.textureViews;if(!i[0]||i[0].getTexture()!==r){const e=r.createView("imgTexture");i[0]=e}e.updateLUTImage(),e.updateUBO();const o=t.WebGPUImageSlice.getRenderable().getProperty().getInterpolationType()===Rr.Z.NEAREST?"nearest":"linear";t.clampSampler&&o===t.clampSampler.getOptions().minFilter||(t.clampSampler=Fa.ZP.newInstance({label:"clampSampler"}),t.clampSampler.create(t.device,{minFilter:o,magFilter:o}),t.additionalBindables=[t.clampSampler])};const i=e.getShaderReplacements();e.replaceShaderPosition=(e,n,r)=>{const i=n.getShaderDescription("vertex");i.addBuiltinOutput("vec4","@builtin(position) Position");let o=i.getCode();const a=["var pos: vec4 = mapperUBO.Origin +"," (vertexBC.x * 0.5 + 0.5) * mapperUBO.Axis1 + (vertexBC.y * 0.5 + 0.5) * mapperUBO.Axis2;","pos.w = 1.0;"];2===t.dimensions?a.push("var tcoord : vec2 = (mapperUBO.SCTCMatrix * pos).xy;"):a.push("var tcoord : vec3 = (mapperUBO.SCTCMatrix * pos).xyz;"),a.push("output.tcoordVS = tcoord;","output.Position = rendererUBO.SCPCMatrix * pos;"),o=ea.ZP.substitute(o,"//VTK::Position::Impl",a).result,i.setCode(o)},i.set("replaceShaderPosition",e.replaceShaderPosition),e.replaceShaderTCoord=(e,n,r)=>{const i=n.getShaderDescription("vertex");2===t.dimensions?i.addOutput("vec2","tcoordVS"):i.addOutput("vec3","tcoordVS")},i.set("replaceShaderTCoord",e.replaceShaderTCoord),e.replaceShaderImage=(e,n,r)=>{const i=n.getShaderDescription("fragment");let o=i.getCode();o=(t.dimensions,ea.ZP.substitute(o,"//VTK::Image::Sample",[" var computedColor: vec4 ="," textureSampleLevel(imgTexture, clampSampler, input.tcoordVS, 0.0);","//VTK::Image::Sample"]).result),o=ea.ZP.substitute(o,"//VTK::Image::Sample",[" var coord: vec2 ="," vec2(computedColor.r * mapperUBO.cScale.r + mapperUBO.cShift.r, 0.5);"," computedColor = textureSampleLevel(tfunTexture, clampSampler, coord, 0.0);"]).result,i.setCode(o)},i.set("replaceShaderImage",e.replaceShaderImage)}const $a={rowLength:1024};function Za(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$a,n),So.ZP.extend(e,t,n),e.setFragmentShaderTemplate(Ua),t.UBO=To.ZP.newInstance({label:"mapperUBO"}),t.UBO.addEntry("SCTCMatrix","mat4x4"),t.UBO.addEntry("Origin","vec4"),t.UBO.addEntry("Axis2","vec4"),t.UBO.addEntry("Axis1","vec4"),t.UBO.addEntry("cScale","vec4"),t.UBO.addEntry("cShift","vec4"),t.lutBuildTime={},(0,o.o)(t.lutBuildTime,{mtime:0}),t.imagemat=r.identity(new Float64Array(16)),t.imagematinv=r.identity(new Float64Array(16)),t.VBOBuildTime={},(0,o.o)(t.VBOBuildTime),Wa(e,t)}const Ka=(0,o.n)(Za,"vtkWebGPUImageMapper");function qa(e,t){t.classHierarchy.push("vtkWebGPUImageSlice"),e.buildPass=n=>{if(t.renderable&&t.renderable.getVisibility()&&n){if(!t.renderable)return;t.WebGPURenderer=e.getFirstAncestorOfType("vtkWebGPURenderer"),t.WebGPURenderWindow=t.WebGPURenderer.getFirstAncestorOfType("vtkWebGPURenderWindow"),void 0===t.propID&&(t.propID=t.WebGPURenderWindow.getUniquePropID()),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaquePass=n=>{t.renderable&&t.renderable.getNestedVisibility()&&t.renderable.getIsOpaque()&&(!t.WebGPURenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.children.forEach((e=>{e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=n=>{!t.renderable||!t.renderable.getNestedVisibility()||t.renderable.getIsOpaque()||t.WebGPURenderer.getSelector()&&!t.renderable.getNestedPickable()||(e.apply(n,!0),t.children.forEach((e=>{e.traverse(n)})),e.apply(n,!1))},e.queryPass=(e,n)=>{if(e){if(!t.renderable||!t.renderable.getVisibility())return;t.renderable.getIsOpaque()?n.incrementOpaqueActorCount():n.incrementTranslucentActorCount()}},e.getBufferShift=n=>(e.getKeyMatrices(n),t.bufferShift),e.getKeyMatrices=e=>{if(Math.max(t.renderable.getMTime(),e.getStabilizedTime())>t.keyMatricesTime.getMTime()){t.renderable.computeMatrix();const n=t.renderable.getMatrix(),i=e.getStabilizedCenterByReference();t.bufferShift[0]=n[3]-i[0],t.bufferShift[1]=n[7]-i[1],t.bufferShift[2]=n[11]-i[2],r.transpose(t.keyMatrices.bcwc,n),t.renderable.getIsIdentity()?r.identity(t.keyMatrices.normalMatrix):(r.copy(t.keyMatrices.normalMatrix,t.keyMatrices.bcwc),t.keyMatrices.normalMatrix[3]=0,t.keyMatrices.normalMatrix[7]=0,t.keyMatrices.normalMatrix[11]=0,r.invert(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),r.transpose(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix)),r.translate(t.keyMatrices.bcwc,t.keyMatrices.bcwc,[-t.bufferShift[0],-t.bufferShift[1],-t.bufferShift[2]]),r.translate(t.keyMatrices.bcsc,t.keyMatrices.bcwc,[-i[0],-i[1],-i[2]]),t.keyMatricesTime.modified()}return t.keyMatrices}}(0,vo.vw)("vtkImageMapper",Ka);const Xa={bufferShift:void 0,keyMatrixTime:null,keyMatrices:null,propID:void 0};function Ja(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Xa,n),a.Z.extend(e,t,n),t.keyMatricesTime={},(0,o.o)(t.keyMatricesTime,{mtime:0}),t.keyMatrices={normalMatrix:new Float64Array(16),bcwc:new Float64Array(16),bcsc:new Float64Array(16)},t.keyMatrixTime={},(0,o.o)(t.keyMatrixTime,{mtime:0}),t.keyMatrices={mcwc:r.identity(new Float64Array(16))},t.bufferShift=[0,0,0,0],(0,o.g)(e,t,["propID","keyMatricesTime"]),qa(e,t)}const Qa=(0,o.n)(Ja,"vtkWebGPUImageSlice");function es(e,t){t.classHierarchy.push("vtkWebGPUVolume"),e.buildPass=n=>{t.renderable&&t.renderable.getVisibility()&&n&&(t.WebGPURenderer=e.getFirstAncestorOfType("vtkWebGPURenderer"),t.WebGPURenderWindow=t.WebGPURenderer.getFirstAncestorOfType("vtkWebGPURenderWindow"),void 0===t.propID&&(t.propID=t.WebGPURenderWindow.getUniquePropID()),t.renderable.getMapper().update())},e.queryPass=(n,r)=>{if(n){if(!t.renderable||!t.renderable.getVisibility())return;const n=t.renderable.getMapper().getBounds();if(!n||6!==n.length||n[0]>n[1])return;r.addVolume(e)}};const n=new Float64Array(3),i=new Float64Array(3);e.getBoundingCubePoints=(e,r)=>{const o=t.renderable.getMapper().getInputData();if(!o)return;const a=o.getExtent(),s=t.renderable.getMatrix();let l=0;for(let t=4;t<6;t++){n[2]=a[t];for(let t=2;t<4;t++){n[1]=a[t];for(let t=0;t<2;t++){n[0]=a[t],o.indexToWorld(n,i);let u=r+3*l;e[u++]=s[0]*i[0]+s[1]*i[1]+s[2]*i[2]+s[3],e[u++]=s[4]*i[0]+s[5]*i[1]+s[6]*i[2]+s[7],e[u++]=s[8]*i[0]+s[9]*i[1]+s[10]*i[2]+s[11],l++}}}},e.getKeyMatrices=e=>{if(Math.max(t.renderable.getMTime(),e.getStabilizedTime())>t.keyMatricesTime.getMTime()){t.renderable.computeMatrix();const n=t.renderable.getMatrix(),i=e.getStabilizedCenterByReference();r.transpose(t.keyMatrices.bcwc,n),r.translate(t.keyMatrices.bcsc,t.keyMatrices.bcwc,[-i[0],-i[1],-i[2]]),t.keyMatricesTime.modified()}return t.keyMatrices}}(0,vo.vw)("vtkImageSlice",Qa);const ts={propID:void 0,keyMatricesTime:null};function ns(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ts,n),a.Z.extend(e,t,n),t.keyMatricesTime={},o.m.obj(t.keyMatricesTime,{mtime:0}),t.keyMatrices={bcwc:new Float64Array(16),bcsc:new Float64Array(16)},o.m.get(e,t,["propID","keyMatricesTime"]),es(e,t)}const rs=o.m.newInstance(ns,"vtkWebGPUVolume");function is(e,t){t.classHierarchy.push("vtkWebGPUPixelSpaceCallbackMapper"),e.opaquePass=(n,r)=>{t.WebGPURenderer=e.getFirstAncestorOfType("vtkWebGPURenderer"),t.WebGPURenderWindow=t.WebGPURenderer.getParent();const i=t.WebGPURenderer.getAspectRatio(),o=t.WebGPURenderer?t.WebGPURenderer.getRenderable().getActiveCamera():null,a=t.WebGPURenderer.getTiledSizeAndOrigin();t.renderable.getUseZValues(),t.renderable.invokeCallback(t.renderable.getInputData(),o,i,a,null)}}(0,vo.vw)("vtkVolume",rs);const os={};function as(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,os,n),a.Z.extend(e,t,n),is(e,t)}const ss=o.m.newInstance(as,"vtkWebGPUPixelSpaceCallbackMapper");(0,vo.vw)("vtkPixelSpaceCallbackMapper",ss);const{BufferUsage:ls}=Zo.ZP,{vtkErrorMacro:us}=o.c,cs="\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::Color::Dec\n\n//VTK::IOStructs::Dec\n\n@vertex\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : vertexOutput;\n\n var vertexVC: vec4 = rendererUBO.SCVCMatrix * mapperUBO.BCSCMatrix * vec4(vertexBC.xyz, 1.0);\n\n //VTK::Color::Impl\n\n // compute the projected vertex position\n output.centerVC = vertexVC.xyz;\n output.radiusVC = length(offsetMC)*0.5;\n\n // make the triangle face the camera\n if (rendererUBO.cameraParallel == 0u)\n {\n var dir: vec3 = normalize(-vertexVC.xyz);\n var base2: vec3 = normalize(cross(dir,vec3(1.0,0.0,0.0)));\n var base1: vec3 = cross(base2,dir);\n dir = vertexVC.xyz + offsetMC.x*base1 + offsetMC.y*base2;\n vertexVC = vec4(dir, 1.0);\n }\n else\n {\n // add in the offset\n var tmp2: vec2 = vertexVC.xy + offsetMC;\n vertexVC = vec4(tmp2, vertexVC.zw);\n }\n\n output.vertexVC = vec4(vertexVC.xyz, 0.0);\n\n //VTK::Position::Impl\n\n return output;\n}\n";function ds(e,t){t.classHierarchy.push("vtkWebGPUSphereMapper");const n=e.buildPass;e.buildPass=r=>{if(r){t.renderable.getStatic()||t.renderable.update();const n=t.renderable.getInputData();e.setCellArray(n.getVerts()),e.setCurrentInput(n)}n(r)},e.replaceShaderNormal=(e,t,n)=>{const r=t.getShaderDescription("vertex");r.hasOutput("vertexVC")||r.addOutput("vec4","vertexVC"),r.addOutput("vec3","centerVC"),r.addOutput("f32","radiusVC");const i=t.getShaderDescription("fragment");i.addBuiltinOutput("f32","@builtin(frag_depth) fragDepth");let o=i.getCode();o=ea.ZP.substitute(o,"//VTK::Normal::Impl",["\n // compute the eye position and unit direction\n var vertexVC: vec4;\n var EyePos: vec3;\n var EyeDir: vec3;\n var invertedDepth: f32 = 1.0;\n if (rendererUBO.cameraParallel != 0u) {\n EyePos = vec3(input.vertexVC.x, input.vertexVC.y, input.vertexVC.z + 3.0*input.radiusVC);\n EyeDir = vec3(0.0, 0.0, -1.0);\n }\n else {\n EyeDir = input.vertexVC.xyz;\n EyePos = vec3(0.0,0.0,0.0);\n var lengthED: f32 = length(EyeDir);\n EyeDir = normalize(EyeDir);\n // we adjust the EyePos to be closer if it is too far away\n // to prevent floating point precision noise\n if (lengthED > input.radiusVC*3.0) {\n EyePos = input.vertexVC.xyz - EyeDir*3.0*input.radiusVC;\n }\n }\n\n // translate to Sphere center\n EyePos = EyePos - input.centerVC;\n // scale to radius 1.0\n EyePos = EyePos * (1.0 / input.radiusVC);\n // find the intersection\n var b: f32 = 2.0*dot(EyePos,EyeDir);\n var c: f32 = dot(EyePos,EyePos) - 1.0;\n var d: f32 = b*b - 4.0*c;\n var normal: vec3 = vec3(0.0,0.0,1.0);\n if (d < 0.0) { discard; }\n else {\n var t: f32 = (-b - invertedDepth*sqrt(d))*0.5;\n\n // compute the normal, for unit sphere this is just\n // the intersection point\n normal = invertedDepth*normalize(EyePos + t*EyeDir);\n // compute the intersection point in VC\n vertexVC = vec4(normal * input.radiusVC + input.centerVC, 1.0);\n }\n // compute the pixel's depth\n var pos: vec4 = rendererUBO.VCPCMatrix * vertexVC;\n output.fragDepth = pos.z / pos.w;\n "]).result,i.setCode(o)},e.replaceShaderPosition=(e,t,n)=>{const r=t.getShaderDescription("vertex");r.addBuiltinOutput("vec4","@builtin(position) Position");let i=r.getCode();i=ea.ZP.substitute(i,"//VTK::Position::Impl",[" output.Position = rendererUBO.VCPCMatrix*vertexVC;"]).result,r.setCode(i)},e.computePipelineHash=()=>{t.pipelineHash="spm",t.vertexInput.hasAttribute("colorVI")&&(t.pipelineHash+="c"),t.pipelineHash+=t.renderEncoder.getPipelineHash()},e.updateBuffers=()=>{const n=t.currentInput;t.renderable.mapScalars(n,1);const r=n.getPoints(),i=r.getNumberOfPoints(),o=r.getData();e.setNumberOfInstances(1),e.setNumberOfVertices(3*i);const a=t.vertexInput;let s=`spm${r.getMTime()}float32x3`;if(!t.device.getBufferManager().hasBuffer(s)){const e={hash:s,usage:ls.RawVertex,format:"float32x3"},n=new Float32Array(3*i*3);let r=0,l=0;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ps,n),ma.extend(e,t,n),e.setVertexShaderTemplate(cs),ds(e,t);const r=t.shaderReplacements;r.set("replaceShaderPosition",e.replaceShaderPosition),r.set("replaceShaderNormal",e.replaceShaderNormal)}const hs=(0,o.n)(fs,"vtkWebGPUSphereMapper");(0,vo.vw)("vtkSphereMapper",hs);const{BufferUsage:ms}=Zo.ZP,{vtkErrorMacro:gs}=o.c,vs="\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::Color::Dec\n\n//VTK::IOStructs::Dec\n\n@vertex\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var offsetsArray: array, 12> = array, 12>(\n vec3(-1.0, -1.0, -1.0),\n vec3(1.0, -1.0, -1.0),\n vec3(1.0, -1.0, 1.0),\n\n vec3(-1.0, -1.0, -1.0),\n vec3(1.0, -1.0, 1.0),\n vec3(-1.0, -1.0, 1.0),\n\n vec3(-1.0, -1.0, 1.0),\n vec3(1.0, -1.0, 1.0),\n vec3(1.0, 1.0, 1.0),\n\n vec3(-1.0, -1.0, 1.0),\n vec3(1.0, 1.0, 1.0),\n vec3(-1.0, 1.0, 1.0)\n );\n\n var output : vertexOutput;\n\n var vertexVC: vec4 = rendererUBO.SCVCMatrix * mapperUBO.BCSCMatrix * vec4(vertexBC.xyz, 1.0);\n\n //VTK::Color::Impl\n\n // compute the projected vertex position\n output.centerVC = vertexVC.xyz;\n output.radiusVC = radiusMC;\n output.lengthVC = length(orientMC);\n output.orientVC = (rendererUBO.WCVCNormals * vec4(normalize(orientMC), 0.0)).xyz;\n\n // make sure it is pointing out of the screen\n if (output.orientVC.z < 0.0)\n {\n output.orientVC = -output.orientVC;\n }\n\n // make the basis\n var xbase: vec3;\n var ybase: vec3;\n var dir: vec3 = vec3(0.0,0.0,1.0);\n if (rendererUBO.cameraParallel == 0u)\n {\n dir = normalize(-vertexVC.xyz);\n }\n if (abs(dot(dir,output.orientVC)) == 1.0)\n {\n xbase = normalize(cross(vec3(0.0,1.0,0.0),output.orientVC));\n ybase = cross(xbase,output.orientVC);\n }\n else\n {\n xbase = normalize(cross(output.orientVC,dir));\n ybase = cross(output.orientVC,xbase);\n }\n\n\n var vertIdx: u32 = input.vertexIndex % 12u;\n var offsets: vec3 = offsetsArray[vertIdx];\n\n vertexVC = vec4(vertexVC.xyz +\n output.radiusVC * offsets.x * xbase +\n output.radiusVC * offsets.y * ybase +\n 0.5 * output.lengthVC * offsets.z * output.orientVC, 1.0);\n\n output.vertexVC = vertexVC;\n\n //VTK::Position::Impl\n\n return output;\n}\n";function ys(e,t){t.classHierarchy.push("vtkWebGPUStickMapper");const n=e.buildPass;e.buildPass=r=>{if(r){t.renderable.getStatic()||t.renderable.update();const n=t.renderable.getInputData();e.setCellArray(n.getVerts()),e.setCurrentInput(n)}n(r)},e.replaceShaderNormal=(e,t,n)=>{const r=t.getShaderDescription("vertex");r.hasOutput("vertexVC")||r.addOutput("vec4","vertexVC"),r.addOutput("vec3","centerVC"),r.addOutput("vec3","orientVC"),r.addOutput("f32","radiusVC"),r.addOutput("f32","lengthVC"),r.addBuiltinInput("u32","@builtin(vertex_index) vertexIndex");const i=t.getShaderDescription("fragment");i.addBuiltinOutput("f32","@builtin(frag_depth) fragDepth");let o=i.getCode();o=ea.ZP.substitute(o,"//VTK::Normal::Impl",["\n // compute the eye position and unit direction\n var vertexVC: vec4;\n var EyePos: vec3;\n var EyeDir: vec3;\n\n if (rendererUBO.cameraParallel != 0u)\n {\n EyePos = vec3(input.vertexVC.x, input.vertexVC.y, input.vertexVC.z + 3.0*input.radiusVC);\n EyeDir = vec3(0.0, 0.0, -1.0);\n }\n else\n {\n EyeDir = input.vertexVC.xyz;\n EyePos = vec3(0.0,0.0,0.0);\n var lengthED: f32 = length(EyeDir);\n EyeDir = normalize(EyeDir);\n // we adjust the EyePos to be closer if it is too far away\n // to prevent floating point precision noise\n if (lengthED > input.radiusVC*3.0)\n {\n EyePos = input.vertexVC.xyz - EyeDir*3.0*input.radiusVC;\n }\n }\n // translate to Sphere center\n EyePos = EyePos - input.centerVC;\n\n // rotate to new basis\n // base1, base2, orientVC\n var base1: vec3;\n if (abs(input.orientVC.z) < 0.99)\n {\n base1 = normalize(cross(input.orientVC,vec3(0.0,0.0,1.0)));\n }\n else\n {\n base1 = normalize(cross(input.orientVC,vec3(0.0,1.0,0.0)));\n }\n var base2: vec3 = cross(input.orientVC,base1);\n EyePos = vec3(dot(EyePos,base1),dot(EyePos,base2),dot(EyePos,input.orientVC));\n EyeDir = vec3(dot(EyeDir,base1),dot(EyeDir,base2),dot(EyeDir,input.orientVC));\n\n // scale to radius 1.0\n EyePos = EyePos * (1.0 / input.radiusVC);\n\n // find the intersection\n var a: f32 = EyeDir.x*EyeDir.x + EyeDir.y*EyeDir.y;\n var b: f32 = 2.0*(EyePos.x*EyeDir.x + EyePos.y*EyeDir.y);\n var c: f32 = EyePos.x*EyePos.x + EyePos.y*EyePos.y - 1.0;\n var d: f32 = b*b - 4.0*a*c;\n var normal: vec3 = vec3(0.0,0.0,1.0);\n if (d < 0.0) { discard; }\n else\n {\n var t: f32 = (-b - sqrt(d))*(0.5 / a);\n var tz: f32 = EyePos.z + t*EyeDir.z;\n var iPoint: vec3 = EyePos + t*EyeDir;\n if (abs(iPoint.z)*input.radiusVC > input.lengthVC*0.5)\n {\n // test for end cap\n var t2: f32 = (-b + sqrt(d))*(0.5 / a);\n var tz2: f32 = EyePos.z + t2*EyeDir.z;\n if (tz2*input.radiusVC > input.lengthVC*0.5 || tz*input.radiusVC < -0.5*input.lengthVC) { discard; }\n else\n {\n normal = input.orientVC;\n var t3: f32 = (input.lengthVC*0.5/input.radiusVC - EyePos.z)/EyeDir.z;\n iPoint = EyePos + t3*EyeDir;\n vertexVC = vec4(input.radiusVC*(iPoint.x*base1 + iPoint.y*base2 + iPoint.z*input.orientVC) + input.centerVC, 1.0);\n }\n }\n else\n {\n // The normal is the iPoint.xy rotated back into VC\n normal = iPoint.x*base1 + iPoint.y*base2;\n // rescale rerotate and translate\n vertexVC = vec4(input.radiusVC*(normal + iPoint.z*input.orientVC) + input.centerVC, 1.0);\n }\n }\n // compute the pixel's depth\n var pos: vec4 = rendererUBO.VCPCMatrix * vertexVC;\n output.fragDepth = pos.z / pos.w;\n "]).result,i.setCode(o)},e.replaceShaderPosition=(e,t,n)=>{const r=t.getShaderDescription("vertex");r.addBuiltinOutput("vec4","@builtin(position) Position");let i=r.getCode();i=ea.ZP.substitute(i,"//VTK::Position::Impl",[" output.Position = rendererUBO.VCPCMatrix*vertexVC;"]).result,r.setCode(i)},e.computePipelineHash=()=>{t.pipelineHash="stm",t.vertexInput.hasAttribute("colorVI")&&(t.pipelineHash+="c"),t.pipelineHash+=t.renderEncoder.getPipelineHash()},e.updateBuffers=()=>{const n=t.currentInput;t.renderable.mapScalars(n,1);const r=t.device,i=n.getPoints(),o=n.getPointData(),a=i.getNumberOfPoints(),s=i.getData();e.setNumberOfInstances(a),e.setNumberOfVertices(12);const l=t.vertexInput;let u=`stm${i.getMTime()}float32x3`;if(!r.getBufferManager().hasBuffer(u)){const e={hash:u,usage:ms.RawVertex,format:"float32x3"},t=new Float32Array(3*a);let n=0,i=0;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_s,n),ma.extend(e,t,n),e.setVertexShaderTemplate(vs),ys(e,t);const r=t.shaderReplacements;r.set("replaceShaderPosition",e.replaceShaderPosition),r.set("replaceShaderNormal",e.replaceShaderNormal)}const xs=(0,o.n)(bs,"vtkWebGPUStickMapper");(0,vo.vw)("vtkStickMapper",xs)},function(e,t,n){"use strict";n.d(t,{ZP:function(){return p}});var r=n(576),i=n(572),o=n(0),a=n(10),s=n(2),l=n(32);function u(e,t){t.classHierarchy.push("vtkProp3D"),e.addPosition=n=>{t.position=t.position.map(((e,t)=>e+n[t])),e.modified()},e.getOrientationWXYZ=()=>{const e=r.Ue();i.getRotation(e,t.rotation);const n=new Float64Array(3),o=r.Bh(n,e);return[(0,s.A)(o),n[0],n[1],n[2]]},e.rotateX=n=>{0!==n&&(i.rotateX(t.rotation,t.rotation,(0,s.r)(n)),e.modified())},e.rotateY=n=>{0!==n&&(i.rotateY(t.rotation,t.rotation,(0,s.r)(n)),e.modified())},e.rotateZ=n=>{0!==n&&(i.rotateZ(t.rotation,t.rotation,(0,s.r)(n)),e.modified())},e.rotateWXYZ=(n,o,a,l)=>{if(0===n||0===o&&0===a&&0===l)return;const u=(0,s.r)(n),c=r.Ue();r.yY(c,[o,a,l],u);const d=new Float64Array(16);i.fromQuat(d,c),i.multiply(t.rotation,t.rotation,d),e.modified()},e.setOrientation=(n,r,o)=>(n!==t.orientation[0]||r!==t.orientation[1]||o!==t.orientation[2])&&(t.orientation=[n,r,o],i.identity(t.rotation),e.rotateZ(o),e.rotateX(n),e.rotateY(r),e.modified(),!0),e.setUserMatrix=n=>!(0,s.a)(t.userMatrix,n)&&(i.copy(t.userMatrix,n),e.modified(),!0),e.getMatrix=()=>(e.computeMatrix(),t.matrix),e.computeMatrix=()=>{if(e.getMTime()>t.matrixMTime.getMTime()){i.identity(t.matrix),t.userMatrix&&i.multiply(t.matrix,t.matrix,t.userMatrix),i.translate(t.matrix,t.matrix,t.origin),i.translate(t.matrix,t.matrix,t.position),i.multiply(t.matrix,t.matrix,t.rotation),i.scale(t.matrix,t.matrix,t.scale),i.translate(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),i.transpose(t.matrix,t.matrix),t.isIdentity=!0;for(let e=0;e<4;++e)for(let n=0;n<4;++n)(e===n?1:0)!==t.matrix[e+4*n]&&(t.isIdentity=!1);t.matrixMTime.modified()}},e.getCenter=()=>a.ZP.getCenter(t.bounds),e.getLength=()=>a.ZP.getLength(t.bounds),e.getXRange=()=>a.ZP.getXRange(t.bounds),e.getYRange=()=>a.ZP.getYRange(t.bounds),e.getZRange=()=>a.ZP.getZRange(t.bounds),e.getUserMatrix=()=>t.userMatrix,e.onModified((function(){e.computeMatrix()}))}const c={origin:[0,0,0],position:[0,0,0],orientation:[0,0,0],rotation:null,scale:[1,1,1],bounds:[1,-1,1,-1,1,-1],userMatrix:null,userMatrixMTime:null,cachedProp3D:null,isIdentity:!0,matrixMTime:null};function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,c,n),l.ZP.extend(e,t,n),t.matrixMTime={},o.m.obj(t.matrixMTime),o.m.get(e,t,["bounds","isIdentity"]),o.m.getArray(e,t,["orientation"]),o.m.setGetArray(e,t,["origin","position","scale"],3),t.matrix=i.identity(new Float64Array(16)),t.rotation=i.identity(new Float64Array(16)),t.userMatrix=i.identity(new Float64Array(16)),t.transform=null,u(e,t)}var p={newInstance:o.m.newInstance(d,"vtkProp3D"),extend:d}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return d}});var r=n(0),i=n(5),o=n(372);function a(e,t,n,r,i,a,s){const l=Number(n.getAttribute(`NumberOf${t}`));if(l>0){const u=n.getElementsByTagName(t)[0].getElementsByTagName("DataArray")[0],{values:c,numberOfComponents:d}=o.ZP.processDataArray(l,u,r,i,a,s);e[`get${t}`]().setData(c,d)}return l}function s(e,t,n,r,i,a,s){const l=Number(n.getAttribute(`NumberOf${t}`));if(l>0){const u=o.ZP.processCells(l,n.getElementsByTagName(t)[0],r,i,a,s);e[`get${t}`]().setData(u)}return l}function l(e,t){t.classHierarchy.push("vtkXMLPolyDataReader"),e.parseXML=(e,n,r,l,u)=>{const c=e.getElementsByTagName(t.dataType)[0].getElementsByTagName("Piece"),d=c.length;for(let e=0;e{f+=s(n,e,d,r,l,u,t.binaryBuffer)})),o.ZP.processFieldData(p,d.getElementsByTagName("PointData")[0],n.getPointData(),r,l,u,t.binaryBuffer),o.ZP.processFieldData(f,d.getElementsByTagName("CellData")[0],n.getCellData(),r,l,u,t.binaryBuffer),t.output[e]=n}}}const u={dataType:"PolyData"};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),o.ZP.extend(e,t,n),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkXMLPolyDataReader"),extend:c}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(372),i=n(0),o=n(15);function a(e,t){t.classHierarchy.push("vtkXMLImageDataReader"),e.parseXML=(e,n,i,a,s)=>{const l=e.getElementsByTagName(t.dataType)[0],u=l.getAttribute("Origin").split(" ").map((e=>Number(e))),c=l.getAttribute("Spacing").split(" ").map((e=>Number(e))),d=l.getAttribute("Direction")?.split(" ").map((e=>Number(e))),p=l.getElementsByTagName("Piece"),f=p.length;for(let e=0;eNumber(e))),f=o.ZP.newInstance({origin:u,spacing:c,direction:d,extent:l});r.ZP.processFieldData(f.getNumberOfPoints(),n.getElementsByTagName("PointData")[0],f.getPointData(),i,a,s,t.binaryBuffer),r.ZP.processFieldData(f.getNumberOfCells(),n.getElementsByTagName("CellData")[0],f.getCellData(),i,a,s,t.binaryBuffer),t.output[e]=f}}}const s={dataType:"ImageData"};function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),r.ZP.extend(e,t,n),a(e,t)}var u={newInstance:i.m.newInstance(l,"vtkXMLImageDataReader"),extend:l}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return m}});var r=n(117),i=n(19),o=n(0),a=n(4),s=n(25),l=n(5);n(29);const{vtkErrorMacro:u}=o.m;function c(e,t){for(let n=0;ne)).slice(-3).map(Number),i);-1!==e[t+s].indexOf("vertex");){c(e[t+s].split(/[ \t]+/).filter((e=>e)).slice(-3).map(Number),n),a++,s++}r.push(a);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:{};const i=void 0!==r.compression?r.compression:t.compression,o=void 0!==r.progressCallback?r.progressCallback:t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:i,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:i,progressCallback:o})}t.classHierarchy.push("vtkSTLReader"),t.dataAccessHelper||(t.dataAccessHelper=i.ZP.get("http")),e.setUrl=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;const i=n.split("/");return i.pop(),t.baseURL=i.join("/"),e.loadData(r)},e.loadData=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=n(t.url,r);return i.then(e.parse),i},e.parse=t=>{"string"==typeof t?e.parseAsText(t):e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=n=>{if(!n)return;if(n===t.parseData)return;e.modified(),t.parseData=n;let i=!1;if(i=84+50*new DataView(n,0,84).getUint32(80,!0)===n.byteLength,!i)return void e.parseAsText(r.Z.arrayBufferToString(n));const o=n.slice(0,80),c=function(e){const t=e.split(" ").filter((e=>e.indexOf("=")>-1)),n={};for(let e=0;e{if(!n)return;if(n===t.parseData)return;e.modified(),t.parseData=n;const r=n.split("\n");let i=1;const o=[],s=[],u=[];for(;-1!==i;)i=d(r,i,o,s,u);const c=l.ZP.newInstance();c.getPoints().setData(Float32Array.from(o),3),c.getPolys().setData(Uint32Array.from(s)),c.getCellData().setNormals(a.ZP.newInstance({name:"Normals",values:Float32Array.from(u),numberOfComponents:3})),t.output[0]=c},e.requestData=(n,r)=>{e.parse(t.parseData)}}const f={};function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,f,n),o.m.obj(e,t),o.m.get(e,t,["url","baseURL"]),o.m.setGet(e,t,["dataAccessHelper"]),o.m.algo(e,t,0,1),p(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}var m={extend:h,newInstance:o.m.newInstance(h,"vtkSTLReader")}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return h}});var r=n(0);const i=["chemical json","name","inchi","formula","atoms","bonds","properties"];function o(e,t){t.classHierarchy.push("vtkMolecule")}const a={"chemical json":0,name:"",inchi:"",formula:"",atoms:null,bonds:null,properties:null};function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a,n),r.m.obj(e,t),t.atoms||(t.atoms={}),t.bonds||(t.bonds={}),t.properties||(t.properties={}),r.m.setGet(e,t,i),o(0,t)}var l={newInstance:r.m.newInstance(s,"vtkMolecule"),extend:s},u=n(19),c={H:[1],He:[2],Li:[3],Be:[4],B:[5],C:[6],N:[7],O:[8],F:[9],Ne:[10],Na:[11],Mg:[12],Al:[13],Si:[14],P:[15],S:[16],Cl:[17],Ar:[18],K:[19],Ca:[20],Sc:[21],Ti:[22],V:[23],Cr:[24],Mn:[25],Fe:[26],Co:[27],Ni:[28],Cu:[29],Zn:[30],Ga:[31],Ge:[32],As:[33],Se:[34],Br:[35],Kr:[36],Rb:[37],Sr:[38],Y:[39],Zr:[40],Nb:[41],Mo:[42],Tc:[43],Ru:[44],Rh:[45],Pd:[46],Ag:[47],Cd:[48],In:[49],Sn:[50],Sb:[51],Te:[52],I:[53],Xe:[54],Cs:[55],Ba:[56],La:[57],Ce:[58],Pr:[59],Nd:[60],Pm:[61],Sm:[62],Eu:[63],Gd:[64],Tb:[65],Dy:[66],Ho:[67],Er:[68],Tm:[69],Yb:[70],Lu:[71],Hf:[72],Ta:[73],W:[74],Re:[75],Os:[76],Ir:[77],Pt:[78],Au:[79],Hg:[80],Tl:[81],Pb:[82],Bi:[83],Po:[84],At:[85],Rn:[86],Fr:[87],Ra:[88],Ac:[89],Th:[90],Pa:[91],U:[92],Np:[93],Pu:[94],Am:[95],Cm:[96],Bk:[97],Cf:[98],Es:[99],Fm:[100],Md:[101],No:[102],Lr:[103],Rf:[104],Db:[105],Sg:[106],Bh:[107],Hs:[108],Mt:[109],Ds:[110],Rg:[111],Cn:[112],Uut:[113],Uuq:[114],Uup:[115],Uuh:[116],Uus:[117],Uuo:[118]};n(29);function d(e,t){t.classHierarchy.push("vtkPDBReader"),t.dataAccessHelper||(t.dataAccessHelper=u.ZP.get("http")),e.setUrl=(n,r)=>{if(-1===n.indexOf(".pdb"))t.baseURL=n,t.url=`${n}`;else{t.url=n;const e=n.split("/");e.pop(),t.baseURL=e.join("/")}return e.loadData(r)},e.loadData=n=>function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then(e.parseAsText),e.parseAsText=n=>(t.pdb=n,t.molecule=[],t.molecule=t.pdb.split("\n"),e.modified(),!0),e.requestData=(e,n)=>{const r=l.newInstance();if(t.molecule){const e=t.molecule.length,n=[],i=[];t.numberOfAtoms=0;let o=0;for(;o=78&&(u=r.substr(76,2).replace(/\s+/g,"")),""===u&&(u=o.substr(0,2).replace(/\d/g,"")),n.push(a),n.push(s),n.push(l);const[d]=c[u];i.push(d),t.numberOfAtoms++}o++}r.getAtoms().elements={},r.getAtoms().elements.number=Int8Array.from(i),r.getAtoms().coords={},r.getAtoms().coords["3d"]=Float32Array.from(n)}t.output[0]=r},e.isBusy=()=>!!t.requestCount}const p={numberOfAtoms:0,requestCount:0};function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),r.m.obj(e,t),r.m.get(e,t,["url","baseURL","numberOfAtoms","requestCount"]),r.m.setGet(e,t,["dataAccessHelper"]),r.m.algo(e,t,0,1),r.m.event(e,t,"busy"),d(e,t)}var h={newInstance:r.m.newInstance(f,"vtkPDBReader"),extend:f}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return w}});var r=n(117),i=n(19),o=n(0),a=n(4),s=n(5);n(29);const l="ascii",u="binary_little_endian",c={diffuse_red:"red",diffuse_green:"green",diffuse_blue:"blue"},d={patternHeader:/ply([\s\S]*)end_header\r?\n/,patternBody:/end_header\s([\s\S]*)$/};function p(e){let t="",n=0;const r=d.patternHeader.exec(e);null!==r&&(t=r[1],n=r[0].length);const i={comments:[],elements:[],headerLength:n},o=t.split("\n");let a,s,l;for(let e=0;e"vertex"===e.name)),r=t.find((e=>"face"===e.name));let i=0,o=0;n&&(i=n.count),r&&(o=r.count);const l=new Float32Array(3*i),u=new Uint8Array(3*i),c=new Float32Array(2*i),d=new Float32Array(3*i),p=e.colors.length>0,f=e.uvs.length>0,h=e.normals.length>0,m=e.faceVertexUvs.length>0;for(let t=0;t0&&(e.indices.push(t.length),t.forEach(((t,n)=>{e.indices.push(t)}))),e.faceVertexUvs.push(r)}}function v(e,t,n,r){let i;switch(n){case"int8":case"char":i=[e.getInt8(t),1];break;case"uint8":case"uchar":i=[e.getUint8(t),1];break;case"int16":case"short":i=[e.getInt16(t,r),2];break;case"uint16":case"ushort":i=[e.getUint16(t,r),2];break;case"int32":case"int":i=[e.getInt32(t,r),4];break;case"uint32":case"uint":i=[e.getUint32(t,r),4];break;case"float32":case"float":i=[e.getFloat32(t,r),4];break;case"float64":case"double":i=[e.getFloat64(t,r),8];break;default:console.log("Unsupported type")}return i}function y(e,t,n,r){const i={};let o,a=0;for(let s=0;s1&&void 0!==arguments[1]?arguments[1]:{};const{compression:i,progressCallback:o}=t;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:i,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:i,progressCallback:o})}t.classHierarchy.push("vtkPLYReader"),t.dataAccessHelper||(t.dataAccessHelper=i.ZP.get("http")),e.setUrl=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;const i=n.split("/");return i.pop(),t.baseURL=i.join("/"),t.compression=r.compression,e.loadData({progressCallback:r.progressCallback,binary:!!r.binary})},e.loadData=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=n(t.url,r);return i.then(e.parse),i},e.parse=t=>{"string"==typeof t?e.parseAsText(t):e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=n=>{if(!n)return;if(n===t.parseData)return;e.modified();const i=p(r.Z.arrayBufferToString(n));if(!(i.format!==l))return void e.parseAsText(n);t.parseData=n;const o={indices:[],vertices:[],normals:[],uvs:[],faceVertexUvs:[],colors:[]},a=i.format===u,s=n instanceof ArrayBuffer?n:n.buffer,c=new DataView(s,i.headerLength);let d,h=0;for(let e=0;e{if(!n)return;if(n===t.parseData)return;e.modified(),t.parseData=n;const i=r.Z.arrayBufferToString(n),o=p(i);if(o.format!==l)return void e.parseAsArrayBuffer(n);const a={indices:[],vertices:[],normals:[],uvs:[],faceVertexUvs:[],colors:[]},s=d.patternBody.exec(i);let u="";null!==s&&(u=s[1]);const c=u.split("\n");let h=0,v=0;for(let e=0;e=o.elements[h].count&&(h++,v=0);const e=m(o.elements[h].properties,t);g(a,o.elements[h].name,e),v++}}const y=f(a,o.elements);t.output[0]=y},e.requestData=(n,r)=>{e.parse(t.parseData)}}const b={};function x(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,b,n),o.m.obj(e,t),o.m.get(e,t,["url","baseURL"]),o.m.setGet(e,t,["dataAccessHelper"]),o.m.algo(e,t,0,1),_(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}var w={extend:x,newInstance:o.m.newInstance(x,"vtkPLYReader")}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return s}});var r=n(0);function i(e,t){function n(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkJSONReader"),e.setUrl=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.url=n,e.loadData(r)},e.loadData=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsText)},e.parseAsText=n=>!!n&&(t.data=JSON.parse(n),e.modified(),!0),e.requestData=(e,n)=>{n[0]=t.data},e.isBusy=()=>!1,e.getNumberOfOutputPorts=()=>t.numberOfOutputs}const o={};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.obj(e,t),r.m.get(e,t,["url"]),r.m.algo(e,t,0,1),r.m.event(e,t,"busy"),i(e,t)}var s={newInstance:r.m.newInstance(a,"vtkJSONReader"),extend:a}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(0),i=n(376),o=n(33),a=n(580);function s(e,t){t.classHierarchy.push("vtkSkyboxReader"),e.setUrl=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.url=n,e.loadData(r)},e.loadData=function(){return function(e){const{compression:n,progressCallback:r}=t;return t.dataAccessHelper.fetchBinary(e,{compression:n,progressCallback:r})}(t.url).then(e.parseAsArrayBuffer)},e.parseAsArrayBuffer=n=>{if(!n)return!1;t.textures={},t.busy=!0,e.invokeBusy(t.busy),t.dataMapping={};const r=[];const s=(0,a.GZ)(new Uint8Array(n)),l=[];return Object.entries(s).forEach((e=>{let[n,i]=e;if(n.match(/index.json$/)){const e=(0,a.T8)(i),n=JSON.parse(e);n.skybox&&n.skybox.faceMapping&&(t.faceMapping=n.skybox.faceMapping),n.metadata&&n.metadata.skybox&&n.metadata.skybox.faceMapping&&(t.faceMapping=n.metadata.skybox.faceMapping)}if(n.match(/\.jpg$/)){const e=n.split("/"),o=e.pop(),a=e.pop();t.dataMapping[a]||(t.dataMapping[a]={});const s=new Blob([i.buffer]),u=new Image,c=`${a}/${o}`;t.dataMapping[a][o]=u,l.push(new Promise((e=>{u.onload=()=>{r.push(c),e()}}))),u.src=URL.createObjectURL(s)}})),t.positions=Object.keys(t.dataMapping),t.position=t.positions[0],Promise.all(l).then((()=>{!function(){for(let e=0;e{n[0]=t.textures[t.position]},e.setPosition=n=>{-1!==t.positions.indexOf(n)&&n!==t.position&&(t.position=n,e.modified())},e.getReadyPromise=()=>t.busy?new Promise(((t,n)=>{const r=e.onBusy((n=>{n||(r.unsubscribe(),t(e))}))})):Promise.resolve(e),e.isBusy=()=>t.busy}const l={busy:!1,faceMapping:[{fileName:"right.jpg",transform:{flipY:!0}},{fileName:"left.jpg",transform:{flipY:!0}},{fileName:"up.jpg",transform:{flipY:!0}},{fileName:"down.jpg",transform:{flipY:!0}},{fileName:"back.jpg",transform:{flipY:!0}},{fileName:"front.jpg",transform:{flipY:!0}}]};function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l,n),r.m.obj(e,t),r.m.get(e,t,["url","positions","position"]),r.m.setGet(e,t,["faceMapping"]),r.m.event(e,t,"busy"),r.m.algo(e,t,0,6),s(e,t)}var c={newInstance:r.m.newInstance(u,"vtkSkyboxReader"),extend:u}},function(e,t,n){"use strict";var r=n(580),i=n(0),o=n(118),a=n(14),s=n(19),l=n(373);const{vtkErrorMacro:u,vtkDebugMacro:c}=i.m;function d(e){return function(e){return"/"===e[0]?e.substr(1):e}(function(e){return new URL(e,"http://any").pathname}(e))}const p={create:function(e){let t=!1,n=0,s=null,p="";var f;return(f=e.zipContent,new Promise(((e,t)=>{"string"==typeof f?e((0,r.TD)(f)):f instanceof Blob?e(f.arrayBuffer().then((e=>new Uint8Array(e)))):f instanceof ArrayBuffer?e(new Uint8Array(f)):f?.buffer instanceof ArrayBuffer?e(new Uint8Array(f.buffer)):t(new Error("Invalid datatype to unpack."))}))).then((n=>{s=(0,r.GZ)(n),t=!0;const i=[];Object.keys(s).forEach((e=>{e.endsWith("index.json")&&i.push(e)})),i.sort(((e,t)=>e.length-t.length)),p=i[0].replace(/index\.json$/,""),e.callback&&e.callback(s)})),{fetchArray(e,l,f){let h=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise(((m,g)=>{t||u("ERROR!!! zip not ready...");const v=d([l,f.ref.basepath,h.compression?`${f.ref.id}.gz`:f.ref.id].join("/"));function y(){delete f.ref,0==--n&&e?.invokeBusy&&e.invokeBusy(!1),e?.modified&&e.modified(),m(f)}1==++n&&e?.invokeBusy&&e.invokeBusy(!0);const _=s[`${p}${v}`];if("string"!==f.dataType||h.compression){const e=function(e,t,n){return s=>{e.buffer=new ArrayBuffer(s.length),new Uint8Array(e.buffer).set(s),t&&("string"===e.dataType||"JSON"===e.dataType?e.buffer=(0,r.T8)((0,r.iF)(new Uint8Array(e.buffer))):e.buffer=(0,r.iF)(new Uint8Array(e.buffer)).buffer),"JSON"===e.ref.encode?e.values=JSON.parse(e.buffer):(o.ZP.ENDIANNESS!==e.ref.encode&&o.ZP.ENDIANNESS&&(c(`Swap bytes of ${e.name}`),o.ZP.swapBytes(e.buffer,a.Xe[e.dataType])),e.values=i.m.newTypedArray(e.dataType,e.buffer)),e.values.length!==e.size&&u(`Error in FetchArray: ${e.name} does not have the proper array size. Got ${e.values.length}, instead of ${e.size}`),n()}}(f,h.compression,y);e(_)}else{const e=function(e,t,n){return i=>{e.values=t?JSON.parse((0,r.T8)((0,r.iF)(i))):JSON.parse(i),n()}}(f,h.compression,y);e((0,r.T8)(_))}}))},fetchJSON(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=d(n);t||u("ERROR!!! zip not ready...");const a=s[`${p}${o}`];if(i.compression){if("gz"===i.compression){const e=(0,r.T8)((0,r.iF)(a));return Promise.resolve(JSON.parse(e))}return Promise.reject(new Error("Invalid compression"))}return Promise.resolve(JSON.parse((0,r.T8)(a)))},fetchText(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=d(n);t||u("ERROR!!! zip not ready...");const a=s[`${p}${o}`];return i.compression?"gz"===i.compression?Promise.resolve((0,r.T8)((0,r.GZ)(a))):Promise.reject(new Error("Invalid compression")):Promise.resolve((0,r.T8)(a))},fetchImage(e,n){const r=d(n);t||u("ERROR!!! zip not ready...");const i=s[`${p}${r}`];return new Promise(((e,t)=>{const n=new Image;n.onload=()=>e(n),n.onerror=t;const o=(0,l.go)(i.buffer);n.src=`data:image/${function(e){const t=e.split(".").pop().toLowerCase();return"jpg"===t?"jpeg":t}(r)};base64,${o}`}))},fetchBinary(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=d(n);t||u("ERROR!!! zip not ready...");const a=s[`${p}${o}`];return i.compression?"gz"===i.compression?Promise.resolve((0,r.iF)(a).buffer):Promise.reject(new Error("Invalid compression")):Promise.resolve(a.buffer)}}}};(0,s.Fn)("zip",(e=>p.create(e)))},function(e,t,n){"use strict";n.d(t,{ZP:function(){return te}});var r=n(0),i=n(13),o=n(119),a=(n(15),n(5),n(23)),s=n(19),l=n(4),u=n(374);n(29);const c=["pointData","cellData","fieldData"],d={vtkDataArray:l.ZP,vtkStringArray:u.ZP},p={},f={vtkPolyData(e){const t=[];return t.push(e.points),["verts","lines","polys","strips"].forEach((n=>{e[n]&&t.push(e[n])})),t},vtkImageData:e=>[],vtkUnstructuredGrid(e){const t=[];return t.push(e.points),t.push(e.cells),t.push(e.cellTypes),t},vtkRectilinearGrid(e){const t=[];return t.push(e.xCoordinates),t.push(e.yCoordinates),t.push(e.zCoordinates),t}};function h(e,t){function n(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=`${n.ref.id}|${n.vtkClass}`;return p[i]?Promise.resolve(p[i]).then((e=>{n!==e&&(Object.assign(n,e),delete n.ref)})):p[i]=t.dataAccessHelper.fetchArray(e,t.baseURL,n,r).then((e=>(p[i]=e,e))),Promise.resolve(p[i])}t.classHierarchy.push("vtkHttpDataSetReader"),t.output[0]=(0,a.Z)({vtkClass:"vtkPolyData"}),t.dataAccessHelper||(t.dataAccessHelper=s.ZP.get("http")),e.updateMetadata=function(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"zip"===t.compression?new Promise(((r,i)=>{s.ZP.get("http").fetchBinary(t.url).then((o=>{t.dataAccessHelper=s.ZP.get("zip",{zipContent:o,callback:o=>{t.baseURL="",t.dataAccessHelper.fetchJSON(e,"index.json").then((t=>{e.parseObject(t,{loadData:n,deepCopy:!1}).then(r,i)}),(e=>{i(e)}))}})}),(e=>{i(e)}))})):new Promise(((r,i)=>{t.dataAccessHelper.fetchJSON(e,t.url).then((t=>{e.parseObject(t,{loadData:n,deepCopy:!1}).then(r,i)}),(e=>{i(e)}))}))},e.setUrl=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf("index.json")||r.fullpath){t.url=n;const e=n.split("/");e.pop(),t.baseURL=e.join("/")}else t.baseURL=n,t.url=`${n}/index.json`;return t.compression=r.compression,e.updateMetadata(!!r.loadData)},e.parseObject=(r,i)=>{let{loadData:o,baseUrl:s,deepCopy:l=!0}=i;s&&(t.baseURL=s);const u=l?structuredClone(r):r;return new Promise(((r,i)=>{!function(e,t,n,r,i,o,s){const l=t.enableArray;t.arrays=[],c.forEach((e=>{n[e]&&(n[e].arrays.map((e=>e.data)).forEach((n=>{t.arrays.push({name:n.name,enable:l,location:e,array:n,registration:n.ref.registration||"addArray"})})),n[e].arrays=[])}));const u=[],{progressCallback:d}=t,p=t.fetchGzip?"gz":null;function h(){t.dataset=(0,a.Z)(n),s?e.loadData().then((()=>{t.output[0]=t.dataset,i(e,t.output[0])})):(t.output[0]=t.dataset,i(e,t.output[0]))}f[n.vtkClass](n).forEach((e=>{u.push(r(e,{compression:p,progressCallback:d}))})),u.length?Promise.all(u).then(h,(e=>{o(e)})):h()}(e,t,u,n,r,i,o)}))},e.loadData=()=>{const i=t.dataset,o=t.arrays.filter((e=>e.enable)).filter((e=>e.array.ref)).map((e=>e.array));return new Promise(((a,s)=>{const l=e=>{s(e)},u=()=>{if(o.length){const{progressCallback:e}=t,r=t.fetchGzip?"gz":null;n(o.pop(),{compression:r,progressCallback:e}).then(u,l)}else i&&(t.arrays.filter((e=>e.registration&&!e.array.ref)).forEach((e=>{const t=d[e.array.vtkClass].newInstance(e.array);i[`get${r.m.capitalize(e.location)}`]()[e.registration](t),delete e.registration})),i.modified(),a(e,i))};u()}))},e.requestData=(e,t)=>{},e.enableArray=function(e,n){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const i=t.arrays.filter((t=>t.name===n&&t.location===e));1===i.length&&(i[0].enable=r)},e.isBusy=()=>!!t.requestCount}const m={enableArray:!0,fetchGzip:!1,arrays:[],url:null,baseURL:null,requestCount:0};function g(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,m,n),r.m.obj(e,t),r.m.get(e,t,["enableArray","fetchGzip","url","baseURL","dataAccessHelper"]),r.m.set(e,t,["dataAccessHelper","progressCallback"]),r.m.getArray(e,t,["arrays"]),r.m.algo(e,t,0,1),r.m.event(e,t,"busy"),h(e,t),void 0===t.progressCallback&&(t.progressCallback=null)}var v={newInstance:r.m.newInstance(g,"vtkHttpDataSetReader"),extend:g};const y=s.ZP.get("http");function _(e,t,n,r,i,o){t.readers=[];const a=[];return n.series.forEach((e=>{const n=v.newInstance({fetchGzip:t.fetchGzip,dataAccessHelper:t.dataAccessHelper});a.push(n.setUrl(`${t.baseURL}/${e.url}`,{loadData:o})),t.readers.push({timeStep:e.timeStep,reader:n})})),Promise.all(a).then((()=>{const t=e.getTimeRange();t&&0!==t.length&&e.setUpdateTimeStep(t[0]),r(e)}),(e=>{i(e)}))}function b(e,t){t.classHierarchy.push("vtkHttpDataSetSeriesReader"),t.output[0]=(0,a.Z)({vtkClass:"vtkPolyData"}),t.dataAccessHelper||(t.dataAccessHelper=y),t.currentReader=null,e.updateMetaData=function(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"zip"===t.compression?new Promise(((r,i)=>{y.fetchBinary(t.baseURL).then((o=>{t.dataAccessHelper=s.ZP.get("zip",{zipContent:o,callback:o=>{t.baseURL="",t.dataAccessHelper.fetchJSON(e,"index.json").then((o=>{_(e,t,o,r,i,n)}),(e=>{i(e)}))}})}))})):new Promise(((r,i)=>{t.dataAccessHelper.fetchJSON(e,t.url).then((o=>_(e,t,o,r,i,n)),(e=>{i(e)}))}))},e.setUrl=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.endsWith("index.json")||r.fullpath){t.url=n;const e=n.split("/");e.pop(),t.baseURL=e.join("/")}else t.baseURL=n,t.url=`${n}/index.json`;return t.compression=r.compression,e.updateMetaData(r.loadData)},e.getTimeSteps=()=>t.readers.map((e=>e.timeStep)).sort(),e.getTimeRange=()=>{const t=e.getTimeSteps(),n=t.length;return n>=1?[t[0],t[n-1]]:[]},e.setUpdateTimeStep=n=>{const r=t.readers.reduce(((e,t)=>t.timeStep<=n?t:e));void 0!==r&&(t.currentReader=r.reader,t.output[0]=t.currentReader.getOutputData(),t.output[0].modified(),e.modified())},e.requestData=(e,n)=>{t.currentReader&&(n[0]=t.currentReader.getOutputData())},e.enableArray=function(e,n){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.currentReader&&t.currentReader.reader.enableArray(e,n,r)},e.loadData=()=>{t.currentReader&&t.currentReader.reader.loadData()}}const x={fetchGzip:!1,url:null,baseURL:null,dataAccessHelper:null};function w(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,x,n),r.m.obj(e,t),r.m.get(e,t,["url","baseURL"]),r.m.set(e,t,["dataAccessHelper"]),r.m.algo(e,t,0,1),b(e,t)}var S={newInstance:r.m.newInstance(w,"vtkHttpDataSetSeriesReader"),extend:w},C=n(11),T=n(33);const{vtkErrorMacro:M}=r.m;function D(e,t){t.classHierarchy.push("vtkTextureLODsDownloader");const n={downloadStack:[]};e.startDownloads=()=>{if(!t.texture)return void M("Texture was not set.");if(!t.files||0===t.files.length)return void M("No files set.");let e=t.baseUrl;e&&!e.endsWith("/")&&(e+="/"),n.downloadStack=[],t.files.forEach((t=>n.downloadStack.push(`${e}${t}`)));const r=()=>{if(0===n.downloadStack.length)return;const e=()=>{setTimeout(r,t.waitTimeBetweenDownloads)},i=new Image;t.crossOrigin&&(i.crossOrigin=t.crossOrigin);const o=n.downloadStack.shift();(e=>new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("HEAD",e,!0),r.onreadystatechange=()=>{if(4===r.readyState)if(200===r.status){const e=r.getResponseHeader("Content-Length");t(e)}else console.log("Failed to get remote file size of",e),n(r)},r.send()})))(o).then((n=>{if(!n||n/1024>t.maxTextureLODSize)return n?console.log("Skipping image",o,", because it is larger","than the max texture size:",t.maxTextureLODSize,"KiB"):console.log("Failed to get image size"),void e();i.src=o,i.decode().then((()=>{t.texture.setImage(i),t.stepFinishedCallback&&t.stepFinishedCallback(),e()})).catch((t=>{console.log("Failed to decode image:",i.src),console.log("Error is:",t),e()}))})).catch((t=>{console.log("Failed to get size of:",o),console.log("status was:",t.status),console.log("statusText was:",t.statusText),e()}))};setTimeout(r,t.waitTimeToStart)}}const A={baseUrl:"",files:[],texture:null,crossOrigin:void 0,maxTextureLODSize:5e4,stepFinishedCallback:null,waitTimeToStart:4e3,waitTimeBetweenDownloads:0};function P(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,A,n),r.m.obj(e,t),r.m.setGet(e,t,["baseUrl","files","texture","crossOrigin","maxTextureLODSize","stepFinishedCallback","waitTimeToStart","waitTimeBetweenDownloads"]),D(e,t)}var k={newInstance:r.m.newInstance(P,"vtkTextureLODsDownloader"),extend:P};const{vtkErrorMacro:L}=r.m;function O(e,t){t.classHierarchy.push("vtkHttpDataSetLODsLoader");const n={downloadStack:[]};e.startDownloads=()=>{if(!t.mapper)return void L("Mapper was not set.");if(!t.files||0===t.files.length)return void L("No files set.");let e=t.baseUrl;e&&!e.endsWith("/")&&(e+="/"),n.downloadStack=[],t.files.forEach((t=>n.downloadStack.push(`${e}${t}`)));const r=()=>{const e=n.downloadStack.shift(),i=v.newInstance({dataAccessHelper:s.ZP.get("http")});t.currentSource=i;i.setUrl(e,{compression:"zip",loadData:!0,fullpath:!0}).then((()=>{if(t.mapper.setInputConnection(i.getOutputPort()),t.sceneItem){const e=t.sceneItem.defaultSettings;e.mapper&&e.mapper.colorByArrayName&&i.enableArray(e.mapper.colorByArrayName,e.mapper.colorByArrayName),t.sceneItem.source=i}t.stepFinishedCallback&&t.stepFinishedCallback(),0!==n.downloadStack.length&&setTimeout(r,t.waitTimeBetweenDownloads)}))};setTimeout(r,t.waitTimeToStart)}}const E={baseUrl:"",currentSource:null,files:[],mapper:null,sceneItem:null,stepFinishedCallback:null,waitTimeToStart:4e3,waitTimeBetweenDownloads:0};function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,E,n),r.m.obj(e,t),r.m.setGet(e,t,["baseUrl","files","mapper","sceneItem","stepFinishedCallback","waitTimeToStart","waitTimeBetweenDownloads"]),r.m.get(e,t,["currentSource"]),O(e,t)}var N={newInstance:r.m.newInstance(I,"vtkHttpDataSetLODsLoader"),extend:I},R=n(51),B=n(50),F=n(120);function V(e,t){e.setCurrentTimeStep=n=>{t.timeSteps&&0!==t.timeSteps.length&&(t.timeSteps.includes(n)?t.currentTimeStep=n:n<=t.timeSteps[0]?t.currentTimeStep=t.timeSteps[0]:t.currentTimeStep=t.timeSteps.find(((e,t,r)=>t===r.length-1||n>=e&&n{t.data=e,e.timeSteps&&(t.timeSteps=e.timeSteps.map((e=>e.time)),t.timeRange=[t.timeSteps[0],t.timeSteps[t.timeSteps.length-1]],t.currentTimeStep=t.timeSteps[0])},e.setScene=(e,n,r,i)=>{t.scene=e,t.originalMetadata=n,t.applySettings=r,t.renderer=i},e.setCameraParameters=e=>{t.renderers&&t.renderers.forEach((t=>{const n=t.getActiveCamera();n&&n.set(e)}))},e.setBackground=e=>{t.renderers&&t.renderers.forEach((t=>{t.setBackground(e)}))},e.update=()=>{if(!t.data||!t.scene)return;const n=t.data.timeSteps.find((e=>e.time===t.currentTimeStep));if(n.camera){const r={...t.originalMetadata.camera};Object.assign(r,n.camera),e.setCameraParameters(r)}n.background&&e.setBackground(n.background),t.scene&&t.scene.forEach((e=>{e.source.setUpdateTimeStep&&e.source.getTimeSteps().includes(t.currentTimeStep)&&e.source.setUpdateTimeStep(t.currentTimeStep);const r=e.id;if(n[r]){const i={...e.defaultSettings};Object.assign(i,n[r]),t.applySettings(e,i)}}))},e.addRenderer=e=>{e&&!t.renderers.includes(e)&&t.renderers.push(e)}}const U={timeSteps:[0],timeRange:[0,0],currentTimeStep:0,scene:null,data:null,renderers:[],applySettings:null,originalMetadata:null};function G(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,U,n),r.m.obj(e,t),r.m.get(e,t,["applySettings","currentTimeStep","data","originalMetada","scene","timeRange","timeSteps"]),r.m.setGet(e,t,["renderers"]),V(e,t)}var z={newInstance:r.m.newInstance(G,"vtkTimeStepBasedAnimationHandler"),extend:G};const{vtkErrorMacro:j}=r.m;let Y=1;function H(e,t){if(t.actor&&e.actor.set(t.actor),t.actorRotation&&e.actor.rotateWXYZ(t.actorRotation[0],t.actorRotation[1],t.actorRotation[2],t.actorRotation[3]),t.volumeRotation&&e.volume.rotateWXYZ(t.volumeRotation[0],t.volumeRotation[1],t.volumeRotation[2],t.volumeRotation[3]),t.property)if(t.volume){const n={...t.property};if(delete n.components,e.volume.getProperty().set(n),t.property.components){const n=e.volume.getProperty();e.volumeComponents.forEach(((e,r)=>{n.setScalarOpacityUnitDistance(r,t.property.components[r].scalarOpacityUnitDistance),e.rgbTransferFunction&&n.setRGBTransferFunction(r,e.rgbTransferFunction),e.grayTransferFunction&&n.setGrayTransferFunction(r,e.grayTransferFunction),e.scalarOpacity&&n.setScalarOpacity(r,e.scalarOpacity)}))}}else e.actor.getProperty().set(t.property);t.mapper&&(t.mapper.colorByArrayName&&(e.source.enableArray(t.mapper.colorByArrayName,t.mapper.colorByArrayName),e.source.loadData()),e.mapper.set(t.mapper),t.mapper.colorByArrayName&&t.luts[t.mapper.colorByArrayName]&&(e.mapper.setLookupTable(t.luts[t.mapper.colorByArrayName]),e.mapper.setUseLookupTableScalarRange(!0))),t.lookupTable&&(e.mapper.getLookupTable().set(t.lookupTable),e.mapper.getLookupTable().build()),t.textureLODs&&(e.textureLODs=t.textureLODs),t.sourceLODs&&(e.sourceLODs=t.sourceLODs)}function W(e){const t=R.ZP.newInstance(e);return e.nodes&&(t.removeAllPoints(),e.nodes.forEach((e=>{let[n,r,i,o,a,s]=e;t.addRGBPointLong(n,r,i,o,a,s)}))),t}function $(e){const t=B.ZP.newInstance(e);return e.points&&(t.removeAllPoints(),e.points.forEach((e=>{let[n,r,i,o]=e;return t.addPointLong(n,r,i,o)}))),t}function Z(e){return(t,n,r)=>{const a=e.newInstance({fetchGzip:n.fetchGzip,dataAccessHelper:n.dataAccessHelper});let s;s=t.volume?F.ZP.newInstance():C.ZP.newInstance();const l={name:t.name||"Item "+Y++,source:a,mapper:s,defaultSettings:t};if(t.volume){const e=o.ZP.newInstance();l.volume=e,n.renderer&&n.renderer.addVolume(e),t.property&&t.property.components&&(l.volumeComponents=t.property.components.map((e=>{const t={};return e.rgbTransferFunction?t.rgbTransferFunction=W(e.rgbTransferFunction):e.grayTransferFunction&&(t.grayTransferFunction=$(e.grayTransferFunction)),e.scalarOpacity&&(t.scalarOpacity=$(e.scalarOpacity)),t}))),e.setMapper(s)}else{const r=i.ZP.newInstance();if(l.actor=r,t.texture&&t.texture in n.usedTextures)r.addTexture(n.usedTextures[t.texture]);else if(t.texture){const i=[n.baseURL,t.texture].join("/"),o=T.ZP.newInstance();if(o.setInterpolate(!0),o.setRepeat(!0),r.addTexture(o),l.texture=o,n.usedTextures[t.texture]=o,function(e){const t=e.split(".").pop().toLowerCase();return-1!==["jpg","png","jpeg"].indexOf(t)}(t.texture))n.dataAccessHelper.fetchImage({},i,{crossOrigin:"anonymous"}).then((e=>{o.setImage(e)}));else{const t=e.newInstance({fetchGzip:n.fetchGzip,dataAccessHelper:n.dataAccessHelper});t.setUrl(i,{loadData:!0}).then((()=>{o.setInputData(t.getOutputData())}))}}const{textureLODs:o}=t;if(o&&o.files&&0!==o.files.length){const e=JSON.stringify(o);if(e in n.usedTextureLODs)r.addTexture(n.usedTextureLODs[e]);else{l.textureLODsDownloader=k.newInstance();const t=l.textureLODsDownloader,i=T.ZP.newInstance();i.setInterpolate(!0),r.addTexture(i),n.usedTextureLODs[e]=i,t.setTexture(i),t.setCrossOrigin("anonymous"),t.setBaseUrl(o.baseUrl),t.setFiles(o.files),n.startLODLoaders&&t.startDownloads()}}n.renderer&&n.renderer.addActor(r),r.setMapper(s)}s.setInputConnection(a.getOutputPort()),a.setUrl([n.baseURL,t[t.type].url].join("/"),{loadData:!0}).then((()=>r.invokeReady())),H(l,t),n.scene.push(l);const{sourceLODs:u}=t;if(u&&u.files&&0!==u.files.length){l.dataSetLODsLoader=N.newInstance();const{dataSetLODsLoader:e}=l;e.setMapper(s),e.setSceneItem(l),e.setBaseUrl(u.baseUrl),e.setFiles(u.files),n.startLODLoaders&&e.startDownloads()}return l}}function K(e,t){t.animationHandler=z.newInstance({scene:t.scene,originalMetadata:t.metadata,applySettings:H}),t.animationHandler&&t.renderer&&t.animationHandler.addRenderer(t.renderer),t.animationHandler.setData(e)}const q={httpDataSetReader:Z(v),vtkHttpDataSetReader:Z(v),httpDataSetSeriesReader:Z(S),vtkHttpDataSetSeriesReader:Z(S)},X={timeStepBasedAnimationHandler:K,vtkTimeStepBasedAnimationHandler:K};function J(e,t){const r={};function i(e){if(t.renderer){const n=t.renderer.getActiveCamera();n?n.set(e):j("No active camera to update")}}function o(e){t.renderer&&t.renderer.setBackground(e)}t.usedTextures||(t.usedTextures={}),t.usedTextureLODs||(t.usedTextureLODs={}),t.classHierarchy.push("vtkHttpSceneLoader"),t.scene||(t.scene=[]),t.dataAccessHelper||(t.dataAccessHelper=s.ZP.get("http")),e.update=()=>{t.dataAccessHelper.fetchJSON(e,t.url).then((a=>{void 0!==a.fetchGzip&&(t.fetchGzip=a.fetchGzip),a.background&&t.renderer&&o(a.background),a.camera&&(r.camera=a.camera,i(a.camera));const s={};if(a.lookupTables&&Object.keys(a.lookupTables).forEach((e=>{const t=W(a.lookupTables[e]);s[e]=t})),a.scene&&(a.scene.forEach((n=>{const r=q[n.type];r&&r({luts:s,...n},t,e)})),n.g.scene=t.scene,t.usedTextures={},t.usedTextureLODs={}),t.metadata=a,a.animation){(0,X[a.animation.type])({...a.animation},t,e,i,o)}}),(e=>{j(`Error fetching scene ${e}`)}))},e.resetScene=()=>{r.camera&&i(r.camera)},e.setUrl=n=>{if(-1===n.indexOf("index.json"))t.baseURL=n,t.url=`${n}/index.json`;else{t.url=n;const e=n.split("/");e.pop(),t.baseURL=e.join("/")}return e.update()}}const Q={fetchGzip:!1,url:null,baseURL:null,animationHandler:null,startLODLoaders:!0};function ee(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Q,n),r.m.obj(e,t),r.m.get(e,t,["fetchGzip","url","baseURL","scene","metadata","animationHandler"]),r.m.setGet(e,t,["renderer"]),r.m.event(e,t,"ready"),J(e,t)}var te={newInstance:r.m.newInstance(ee,"vtkHttpSceneLoader"),extend:ee,applySettings:H,updateDatasetTypeMapping:function(e,t){q[e]=t}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(0),i=n(19),o=n(33);n(29);function a(e,t){function n(){t.requestCount--,0===t.requestCount&&e.invokeBusy(!1)}function r(e){if("#"===e[0]||0===e.length)return;const r=e.split(/[ \t]+/).map((e=>e.trim())).filter((e=>e.length));if("newmtl"===r[0])r.shift(),t.currentMaterial=r.join(" ").trim();else if(t.currentMaterial){if(r.length<2)return;if(t.materials[t.currentMaterial]||(t.materials[t.currentMaterial]={}),t.materials[t.currentMaterial][r[0]]=r.slice(1),"map_Kd"===r[0]){const e=new Image;e.onload=()=>setTimeout(n,0),e.src=[t.baseURL,r[1]].join("/"),t.materials[t.currentMaterial].image=e,t.requestCount++}}}t.classHierarchy.push("vtkMTLReader"),t.dataAccessHelper||(t.dataAccessHelper=i.ZP.get("http")),e.setUrl=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf(".mtl")||r.fullpath){t.url=n;const e=n.split("/");e.pop(),t.baseURL=e.join("/")}else t.baseURL=n,t.url=`${n}/index.mtl`;return e.loadData(r)},e.loadData=n=>new Promise(((r,i)=>{var o,a;(o=t.url,a=n,t.dataAccessHelper.fetchText(e,o,a)).then((t=>{e.parseAsText(t),r()}),(e=>{i()}))})),e.parseAsText=n=>{e.modified(),t.materials={},n.split("\n").forEach(r)},e.isBusy=()=>!!t.requestCount,e.getMaterialNames=()=>Object.keys(t.materials),e.getMaterial=e=>t.materials[e],e.listImages=()=>Object.keys(t.materials).map((e=>t.materials[e].map_Kd)).filter((e=>!!e)).map((e=>e[0].trim())),e.setImageSrc=(e,n)=>new Promise(((r,i)=>{const o=Object.keys(t.materials).find((n=>t.materials[n].map_Kd&&t.materials[n].map_Kd[0].trim()===e.trim())),a=t.materials[o];a&&a.image?(a.image.src=n,a.image.onload=()=>setTimeout(r,0)):r()})),e.applyMaterialToActor=(e,n)=>{const r=t.materials[e];if(r&&n){const e=[1,1,1],i={ambientColor:r.Ka?r.Ka.map((e=>Number(e))):e,specularColor:r.Ks?r.Ks.map((e=>Number(e))):e,diffuseColor:r.Kd?r.Kd.map((e=>Number(e))):e,opacity:r.d?Number(r.d):1,specularPower:r.Ns?Number(r.Ns):1},a=Number(r.illum||2);if(["ambient","diffuse","specular"].forEach(((e,t)=>{i[e]=t<=a?1:0})),r.image){const e=o.ZP.newInstance({interpolate:t.interpolateTextures});e.setImage(r.image),n.addTexture(e)}n.getProperty().set(i)}}}const s={numberOfOutputs:1,requestCount:0,materials:{},interpolateTextures:!0};function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),(0,r.o)(e,t),(0,r.g)(e,t,["url","baseURL"]),(0,r.e)(e,t,["dataAccessHelper","interpolateTextures","splitGroup"]),(0,r.f)(e,t,"busy"),a(e,t)}var u={newInstance:(0,r.n)(l,"vtkMTLReader"),extend:l}},function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(580),i=n(0),o=n(118),a=n(14),s=n(19);const{vtkErrorMacro:l,vtkDebugMacro:u}=i.m;let c=0;function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new XMLHttpRequest;return r.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((e=>{let[t,n]=e;return r.setRequestHeader(t,n)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}const p={fetchArray:function(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n.ref&&!n.ref.pending?new Promise(((p,f)=>{let h=null;h=n.ref.url?n.ref.url:[t,n.ref.basepath,s.compression?`${n.ref.id}.gz`:n.ref.id].join("/");const m=d("GET",h,s);m.onreadystatechange=t=>{1===m.readyState&&(n.ref.pending=!0,1==++c&&e?.invokeBusy&&e.invokeBusy(!0)),4===m.readyState&&(n.ref.pending=!1,200===m.status||0===m.status?(n.buffer=m.response,s.compression&&("string"===n.dataType||"JSON"===n.dataType?n.buffer=(0,r.T8)((0,r.iF)(new Uint8Array(n.buffer))):n.buffer=(0,r.iF)(new Uint8Array(n.buffer)).buffer),"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(o.ZP.ENDIANNESS!==n.ref.encode&&o.ZP.ENDIANNESS&&(u(`Swap bytes of ${n.name}`),o.ZP.swapBytes(n.buffer,a.Xe[n.dataType])),n.values=i.m.newTypedArray(n.dataType,n.buffer)),n.values.length!==n.size&&l(`Error in FetchArray: ${n.name}, does not have the proper array size. Got ${n.values.length}, instead of ${n.size}`),delete n.ref,0==--c&&e?.invokeBusy&&e.invokeBusy(!1),e?.modified&&e.modified(),p(n)):f({xhr:m,e:t}))},m.responseType=s.compression||"string"!==n.dataType?"arraybuffer":"text",m.send()})):Promise.resolve(n)},fetchJSON:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((i,o)=>{const a=d("GET",t,n);a.onreadystatechange=t=>{1===a.readyState&&1==++c&&e?.invokeBusy&&e.invokeBusy(!0),4===a.readyState&&(0==--c&&e?.invokeBusy&&e.invokeBusy(!1),200===a.status||0===a.status?n.compression?i(JSON.parse((0,r.T8)((0,r.iF)(new Uint8Array(a.response))))):i(JSON.parse(a.responseText)):o({xhr:a,e:t}))},a.responseType=n.compression?"arraybuffer":"text",a.send()}))},fetchText:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression&&"gz"!==n.compression&&(l("Supported algorithms are: [gz]"),l(`Unkown compression algorithm: ${n.compression}`)),new Promise(((i,o)=>{const a=d("GET",t,n);a.onreadystatechange=t=>{1===a.readyState&&1==++c&&e?.invokeBusy&&e.invokeBusy(!0),4===a.readyState&&(0==--c&&e?.invokeBusy&&e.invokeBusy(!1),200===a.status||0===a.status?n.compression?i((0,r.T8)((0,r.iF)(new Uint8Array(a.response)))):i(a.responseText):o({xhr:a,e:t}))},a.responseType=n.compression?"arraybuffer":"text",a.send()}))},fetchBinary:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t&&t.compression&&"gz"!==t.compression&&(l("Supported algorithms are: [gz]"),l(`Unkown compression algorithm: ${t.compression}`)),new Promise(((n,i)=>{const o=d("GET",e,t);o.onreadystatechange=e=>{4===o.readyState&&(200===o.status||0===o.status?t.compression?n((0,r.iF)(new Uint8Array(o.response)).buffer):n(o.response):i({xhr:o,e:e}))},o.responseType="arraybuffer",o.send()}))},fetchImage:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((e,r)=>{const i=new Image;n.crossOrigin&&(i.crossOrigin=n.crossOrigin),i.onload=()=>e(i),i.onerror=r,i.src=t}))}};(0,s.Fn)("http",(e=>p))},,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,{ZP:function(){return O}});var r=n(575),i=n(103),o=n.n(i),a=n(0),s=n(15),l=n(4),u=n(2),c=n(110),d=n(43);function p(e,t){t.classHierarchy.push("vtkPriorityQueue"),e.push=(e,n)=>{const r=t.elements.findIndex((t=>t.priority>e));t.elements.splice(r,0,{priority:e,element:n})},e.pop=()=>t.elements.length>0?t.elements.shift().element:null,e.deleteById=e=>{t.elements=t.elements.filter((t=>{let{element:n}=t;return n.id!==e}))},e.length=()=>t.elements.length}const f={elements:[]};function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,f,n),a.m.obj(e,t),p(e,t)}var m={newInstance:a.m.newInstance(h,"vtkPriorityQueue"),extend:h},g=n(10),v=n(360);const y=1e-6,_=1.1920929e-7,b={FAILURE:-1,OUTSIDE:0,INSIDE:1,INTERSECTION:2,ON_LINE:3};function x(e,t,n,r,i){return(r[e]-n[e])*(i[t]-n[t])-(i[e]-n[e])*(r[t]-n[t])}const w={PolygonWithPointIntersectionState:b,pointInPolygon:function(e,t,n,r){if(e[0]n[1]||e[1]n[3]||e[2]n[5])return b.OUTSIDE;if((0,u.l)(r)<=_)return b.FAILURE;let i=1e-8*((n[1]-n[0])*(n[1]-n[0])+(n[3]-n[2])*(n[3]-n[2])+(n[5]-n[4])*(n[5]-n[4]));i*=i,i=0===i?_:i;const o=[],a=[];for(let n=0;n0&&s<1)return b.INSIDE}let s,l;Math.abs(r[0])>Math.abs(r[1])?Math.abs(r[0])>Math.abs(r[2])?(s=1,l=2):(s=0,l=1):Math.abs(r[1])>Math.abs(r[2])?(s=0,l=2):(s=0,l=1);let d=0;for(let n=0;ne[l]&&x(s,l,o,a,e)>0&&++d:a[l]<=e[l]&&x(s,l,o,a,e)<0&&--d;return 0===d?b.OUTSIDE:b.INSIDE},getBounds:function(e,t,n){const r=e.length,i=[];t.getPoint(e[0],i),n[0]=i[0],n[1]=i[0],n[2]=i[1],n[3]=i[1],n[4]=i[2],n[5]=i[2];for(let o=1;oy?1:a<-y?-1:0,l=s<0?1:0;for(let e=r.next.next;e.id!==n.id;e=e.next){const t=e.previous;a=d.ZP.evaluate(o,n.point,e.point);const i=a>y?1:a<-y?-1:0;if(i!==s){if(l||(l=i<=0?1:0),c.ZP.intersection(n.point,r.point,e.point,t.point,[0],[0])===v.C.YES_INTERSECTION)return!1;s=i}}return 1===l}function i(e,r){t.pointCount-=1;const i=e.previous,o=e.next;t.tris=t.tris.concat(e.point),t.tris=t.tris.concat(o.point),t.tris=t.tris.concat(i.point),i.next=o,o.previous=i,r.deleteById(i.id),r.deleteById(o.id);const a=n(i);a>0&&r.push(a,i);const s=n(o);s>0&&r.push(s,o),e.id===t.firstPoint.id&&(t.firstPoint=o)}function o(){!function(){const e=[0,0,0],n=[0,0,0];t.normal=[0,0,0];const r=[...t.firstPoint.point];let i=t.firstPoint;for(let o=0;o0&&e.push(t,o),o=o.next}for(;t.pointCount>2&&e.length()>0;)if(t.pointCount===e.length()){i(e.pop(),e)}else{const t=e.pop();r(t)&&i(t,e)}return t.pointCount<=2}t.classHierarchy.push("vtkPolygon"),e.triangulate=()=>t.firstPoint?o():null,e.setPoints=e=>{t.pointCount=e.length,t.firstPoint={id:0,point:e[0],next:null,previous:null};let n=t.firstPoint;for(let r=1;rt.tris}const C={firstPoint:null,pointCount:0,tris:[]};function T(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,C,n),a.m.obj(e,t),S(e,t)}var M={newInstance:a.m.newInstance(T,"vtkPolygon"),extend:T,...w},D=(0,n(579).c)((function(){!function(){var e={exports:{}},t=function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r1?t-1:0),r=1;r1?r-1:0),a=1;a3&&void 0!==arguments[3]?arguments[3]:[];h([0,e,t,n],r)},_=function(e,t,n){if(!t)throw new Error("eventName is required");if("string"!=typeof t)throw new Error("eventName should be string");h([1,e,t,n])};return self.addEventListener("message",(function(e){var t=e.data;Array.isArray(t)?g.apply(void 0,s(t)):t&&t.eventName&&m.emitLocally.apply(m,[t.eventName].concat(s(t.args)))})),m},e.exports.TransferableResponse=p;var f=e.exports;const h=-1;var m,g="undefined"!=typeof Float32Array?Float32Array:Array;function v(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function y(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function _(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),m=new g(3),g!=Float32Array&&(m[0]=0,m[1]=0,m[2]=0);const b={buffer:null,dimensions:[0,0,0],prevPoint:null,slicingMode:null};function x(e){let{center:t,scale3:n}=e;const r=[...n],i=t.map((e=>Math.round(e)));let o=-1;null!=b.slicingMode&&b.slicingMode!==h&&(o=b.slicingMode%3);const a=b.dimensions[0],s=b.dimensions[0]*b.dimensions[1];let[l,u,c]=i,[d,p,f]=i;2!==o&&(c=Math.round(Math.max(i[2]-r[2],0)),f=Math.round(Math.min(i[2]+r[2],b.dimensions[2]-1)));for(let e=c;e<=f;e++){let t=0;2!==o&&(t=(i[2]-e)/r[2]);const n=t*t;if(n<=1){const t=r[1]*Math.sqrt(1-n);1!==o&&(u=Math.round(Math.max(i[1]-t,0)),p=Math.round(Math.min(i[1]+t,b.dimensions[1]-1)));for(let t=u;t<=p;t++){let u=0;1!==o&&(u=(i[1]-t)/r[1]);const c=u*u;if(c+n<=1){if(0!==o){const e=r[0]*Math.sqrt(1-c-n);l=Math.round(Math.max(i[0]-e,0)),d=Math.round(Math.min(i[0]+e,b.dimensions[0]-1))}if(l<=d){const n=t*a+e*s;b.buffer.fill(1,n+l,n+d+1)}}}}}}f().operation("start",(e=>{let{bufferType:t,dimensions:n,slicingMode:r}=e;if(!b.buffer){const e=n[0]*n[1]*n[2];b.buffer=new self[t](e),b.dimensions=n,b.prevPoint=null,b.slicingMode=r}})).operation("paint",(function(e){let{point:t,radius:n}=e;b.prevPoint||(b.prevPoint=t);const r=[t[0]-b.prevPoint[0],t[1]-b.prevPoint[1],t[2]-b.prevPoint[2]],i=[1,1,1];for(let e=0;e<3;e++)r[e]<0&&(r[e]=-r[e],i[e]=-1);const o=Math.max(...r),a=[o,o,o],s=[...b.prevPoint];for(let e=0;e<=o;e++){x({center:s,scale3:n});for(let e=0;e<3;e++)a[e]-=r[e],a[e]<=0&&(a[e]+=o,s[e]+=i[e])}b.prevPoint=t})).operation("paintRectangle",(function(e){let{point1:t,point2:n}=e;const[r,i,o]=t,[a,s,l]=n,u=Math.max(Math.min(r,a),0),c=Math.min(Math.max(r,a),b.dimensions[0]-1);if(u<=c){const e=Math.max(Math.min(i,s),0),t=Math.min(Math.max(i,s),b.dimensions[1]-1),n=Math.max(Math.min(o,l),0),r=Math.min(Math.max(o,l),b.dimensions[2]-1),a=b.dimensions[0],d=b.dimensions[0]*b.dimensions[1];for(let i=n;i<=r;i++)for(let n=e;n<=t;n++){const e=n*a+i*d;b.buffer.fill(1,e+u,e+c+1)}}})).operation("paintEllipse",x).operation("paintTriangles",(function(e){let{triangleList:t}=e;const n=Math.floor(t.length/9);for(let e=0;e=0&&t[0]=0&&t[1]=0&&t[2]{const e=new f.TransferableResponse(b.buffer.buffer,[b.buffer.buffer]);return b.buffer=null,e}))}()}),null);const{vtkErrorMacro:A}=a.m;function P(e,t){t.classHierarchy.push("vtkPaintFilter");let n=null,i=null;const a={};function u(){a.index=-1,a.snapshots=[],a.labels=[]}function c(e,t){const n=a.index+1,r=a.snapshots.length-a.index;a.snapshots.splice(n,r),a.labels.splice(n,r),a.snapshots.push(e),a.labels.push(t),a.index++}e.startStroke=()=>{t.labelMap&&(i||(n=new D,i=new(o())(n)),i.exec("start",{bufferType:"Uint8Array",dimensions:t.labelMap.getDimensions(),slicingMode:t.slicingMode}))},e.endStroke=()=>{let t;return i&&(t=i.exec("end"),t.then((t=>{e.applyBinaryMask(t),n.terminate(),n=null,i=null}))),t},e.applyBinaryMask=n=>{const r=t.labelMap.getPointData().getScalars(),i=r.getData(),o=new Uint8Array(n);let a=0;for(let e=0;e{if(i){const n=[e[0],e[1],e[2]],o=[0,0,0];r.fF(o,n,t.maskWorldToIndex),o[0]=Math.round(o[0]),o[1]=Math.round(o[1]),o[2]=Math.round(o[2]);const a=t.labelMap.getSpacing().map((e=>t.radius/e));i.exec("paint",{point:o,radius:a})}},e.paintRectangle=(e,n)=>{if(i){const o=[0,0,0],a=[0,0,0];r.fF(o,e,t.maskWorldToIndex),r.fF(a,n,t.maskWorldToIndex),o[0]=Math.round(o[0]),o[1]=Math.round(o[1]),o[2]=Math.round(o[2]),a[0]=Math.round(a[0]),a[1]=Math.round(a[1]),a[2]=Math.round(a[2]),i.exec("paintRectangle",{point1:o,point2:a})}},e.paintEllipse=(e,n)=>{if(i){const o=[0,0,0],a=[0,0,0];let s=[0,0,0];r.fF(o,e,t.maskWorldToIndex),r.fF(a,a,t.maskWorldToIndex),r.fF(s,n,t.maskWorldToIndex),r.$X(s,s,a),s=s.map((e=>0===e?.25:Math.abs(e))),i.exec("paintEllipse",{center:o,scale3:s})}},e.canUndo=()=>a.index>-1,e.paintPolygon=e=>{if(i&&e.length>0){const n=M.newInstance(),o=[];for(let t=0;t{const r=t.labelMap.getPointData().getScalars().getData(),i=n.getPointData().getScalars().getData(),o=[];for(let e=0;e{if(a.index>-1){const n=t.labelMap.getPointData().getScalars(),r=n.getData(),i=a.snapshots[a.index];for(let e=0;ea.index{if(a.index!!d(e)&&(t.maskWorldToIndex=t.labelMap.getWorldToIndex(),u(),!0),e.requestData=(n,r)=>{if(!t.backgroundImage)return void A("No background image");if(!t.backgroundImage.getPointData().getScalars())return void A("Background image has no scalars");if(!t.labelMap){const n=s.ZP.newInstance(t.backgroundImage.get("spacing","origin","direction"));n.setDimensions(t.backgroundImage.getDimensions()),n.computeTransforms();const r=new Uint8Array(t.backgroundImage.getNumberOfPoints()),i=l.ZP.newInstance({numberOfComponents:1,values:r});n.getPointData().setScalars(i),e.setLabelMap(n)}t.maskWorldToIndex||(t.maskWorldToIndex=t.labelMap.getWorldToIndex());t.labelMap.getPointData().getScalars()?(t.labelMap.modified(),r[0]=t.labelMap):A("Mask image has no scalars")},u()}const k={backgroundImage:null,labelMap:null,maskWorldToIndex:null,voxelFunc:null,radius:1,label:0,slicingMode:null};function L(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,k,n),a.m.obj(e,t),a.m.algo(e,t,0,1),a.m.setGet(e,t,["backgroundImage","labelMap","maskWorldToIndex","voxelFunc","label","radius","slicingMode"]),P(e,t)}var O={newInstance:a.m.newInstance(L,"vtkPaintFilter"),extend:L}},function(e,t,n){"use strict";var r=n(129),i=n.n(r),o=n(664),a=n(663),s=n(384),l=n.n(s),u=n(83),c=n(58),d=n(59),p=n.n(d),f=n(403),h=n.n(f),m={};function g(e,t,n,r){var s=e;"/"===e[0]||e.startsWith("http")||(s="..");var u=s+"/"+t;if("object"===(0,a.Z)(window.WebAssembly)&&"function"==typeof window.WebAssembly.Memory){var c=u+"/"+n+"Wasm.js";return r&&(c=n+"Wasm.js"),new Promise((function(e,t){var n=document.createElement("script");n.src=c,n.onload=e,n.onerror=t,document.head.appendChild(n)})).then((0,o.Z)(i().mark((function e(){var t,o,a,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.replace(/.*\//,""),o=u+"/"+n+"Wasm.wasm",r&&(o=n+"Wasm.wasm"),e.next=5,l().get(o,{responseType:"arraybuffer"});case 5:return a=e.sent,s=a.data,e.abrupt("return",Promise.resolve(window[t]({moduleScriptDir:u,isAbsoluteURL:r,pipelinePath:n,wasmBinary:s})));case 8:case"end":return e.stop()}}),e)}))))}var d=u+"/"+n+".js";return r&&(d=n+".js"),new Promise((function(e,t){var n=document.createElement("script");n.src=d,n.onload=e,n.onerror=t,document.head.appendChild(n)})).then((function(){return window.Module}))}function v(){return(v=(0,o.Z)(i().mark((function e(t,n,r){var o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=null,!(n in m)){e.next=5;break}o=m[n],e.next=9;break;case 5:return e.next=7,g(c.Z.itkModulesPath,t,n,r);case 7:m[n]=e.sent,o=m[n];case 9:return e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var y="function"==typeof window.SharedArrayBuffer;function _(e){var t=null;return e.buffer?t=e.buffer:e.byteLength&&(t=e),t&&y&&t instanceof SharedArrayBuffer&&(t=null),t}t.Z=function(e,t,n,r,i){var o=t instanceof URL;!1===e&&function(e,t,n){return v.apply(this,arguments)}("Pipelines",t.toString(),o).then((function(e){return h()(e,n,r,i)}));var a=e;return(0,u.Z)("Pipeline",a).then((function(e){var s=e.webworkerPromise,l=e.worker;a=l;var u=[];return i&&i.forEach((function(e){if(e.type===p().Binary){var t=_(e.data);t&&u.push(t)}if(e.type===p().Image){var n=_(e.data.data);n&&u.push(n)}if(e.type===p().Mesh){if(e.data.points){var r=_(e.data.points);r&&u.push(r)}if(e.data.pointData){var i=_(e.data.pointData);i&&u.push(i)}if(e.data.cells){var o=_(e.data.cells);o&&u.push(o)}if(e.data.cellData){var a=_(e.data.cellData);a&&u.push(a)}}})),s.postMessage({operation:"runPipeline",config:c.Z,pipelinePath:t.toString(),isAbsoluteURL:o,args:n,outputs:r,inputs:i},u).then((function(e){var t=e.stdout,n=e.stderr,r=e.outputs;return Promise.resolve({stdout:t,stderr:n,outputs:r,webWorker:a})}))}))}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return y}});var r=n(0),i=n(669),o="FPSMonitor-module_verticalContainer__1oES5",a="FPSMonitor-module_horizontalContainer__3dO_q",s="FPSMonitor-module_leftPane__3PHsp",l="FPSMonitor-module_rightPane__30Een",u="FPSMonitor-module_title__3a5vQ",c="FPSMonitor-module_graph__lvtIQ",d="FPSMonitor-module_label__3saqc",p="FPSMonitor-module_value__2WrfF";(0,i.s)(".FPSMonitor-module_verticalContainer__1oES5 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.FPSMonitor-module_horizontalContainer__3dO_q {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n}\n\n.FPSMonitor-module_leftPane__3PHsp {\n flex: none;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.FPSMonitor-module_rightPane__30Een {\n flex: 1;\n display: grid;\n grid-template-columns: auto auto;\n grid-auto-rows: 1.5em;\n grid-column-gap: 5px;\n grid-row-gap: 2px;\n padding: 10px;\n}\n\n.FPSMonitor-module_title__3a5vQ {\n flex: 1;\n font-weight: bold;\n padding: 5px 10px 0 10px;\n}\n\n.FPSMonitor-module_graph__lvtIQ {\n flex: none;\n border: solid 1px black;\n margin: 10px ;\n border-radius: 2px;\n overflow: hidden;\n}\n\n.FPSMonitor-module_label__3saqc {\n font-weight: bold;\n text-transform: capitalize;\n text-align: right;\n align-self: center;\n}\n\n.FPSMonitor-module_value__2WrfF {\n font-style: italic;\n text-align: center;\n align-self: center;\n}\n");const f=Function.prototype;function h(e){const t=[];let n=e;for(;n>1e3;)t.push(("000"+n%1e3).slice(-3)),n=Math.floor(n/1e3);return n>0&&t.push(n),t.reverse(),t.join("'")}function m(e,t){function n(){if(t.title.style.display=t.titleVisibility?"block":"none",!t.titleVisibility)return;const e=t.buffer[t.buffer.length-1],n=`Mean: ${Math.round(t.fpsSum/t.buffer.length)} - Current: ${Math.round(e)}`;n!==t.lastText&&(t.lastText=n,t.title.innerHTML=n)}function r(){if(t.info.style.display=t.infoVisibility?"grid":"none",!t.infoVisibility)return;const e=[];if(t.renderWindow){const n=t.renderWindow.getViews()[0];n&&n.getSize&&e.push(`${n.getSize().join("x")}`);const r={...t.renderWindow.getStatistics(),...t.addOnStats},i=Object.keys(r);i.sort();for(let t=0;t${i[t]}${h(r[i[t]])}`)}t.info.innerHTML=e.join("")}function i(){if(t.canvas.style.display=t.canvasVisibility?"block":"none",!t.canvasVisibility)return;t.canvas.setAttribute("width",t.bufferSize),t.canvas.setAttribute("height",t.graphHeight);const e=t.canvas.getContext("2d"),{width:n,height:r}=t.canvas;e.clearRect(0,0,n,r),e.strokeStyle="green",e.beginPath(),e.moveTo(0,r-t.buffer[0]);for(let n=1;nt.bufferSize;)t.fpsSum-=t.buffer.shift();n(),i()}t.classHierarchy.push("vtkFPSMonitor"),t.fpsMonitorContainer=document.createElement("div"),t.fpsMonitorContainer.setAttribute("class",t.orientationClass),t.fpsMonitorContainer.innerHTML=`\n
\n
Mean N/A - Current N/A
\n \n
\n
\n
`,t.canvas=t.fpsMonitorContainer.querySelector(".js-graph"),t.title=t.fpsMonitorContainer.querySelector(".js-title"),t.info=t.fpsMonitorContainer.querySelector(".js-info"),e.update=()=>{e.render()},e.setRenderWindow=e=>{for(;t.subscriptions.length;)t.subscriptions.pop().unsubscribe();t.renderWindow=e,t.interactor=e?e.getInteractor():null,t.interactor&&t.subscriptions.push(t.interactor.onAnimation(m))},e.setContainer=n=>{t.container&&t.container!==n&&t.container.removeChild(t.fpsMonitorContainer),t.container!==n&&(t.container=n,t.container&&(t.container.appendChild(t.fpsMonitorContainer),e.resize()),e.modified())},e.render=()=>{n(),r(),i()},e.resize=f,e.setOrientationToHorizontal=()=>{t.fpsMonitorContainer.classList.remove(t.orientationClass),t.orientationClass=a,t.fpsMonitorContainer.classList.add(t.orientationClass)},e.setOrientationToVertical=()=>{t.fpsMonitorContainer.classList.remove(t.orientationClass),t.orientationClass=o,t.fpsMonitorContainer.classList.add(t.orientationClass)},e.setOrientation=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"horizontal";"horizontal"===t?e.setOrientationToHorizontal():e.setOrientationToVertical()},e.setAddOnStats=e=>{t.addOnStats||(t.addOnStats={}),Object.assign(t.addOnStats,e),r()},e.setMonitorVisibility=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.setCanvasVisibility(n),e.setInfoVisibility(r),e.setTitleVisibility(t)};const g=e.delete;e.delete=()=>{e.setRenderWindow(null),e.setContainer(null),g()},t.subscriptions.push(e.onModified(e.update))}const g={bufferSize:200,graphHeight:120,buffer:[60],subscriptions:[],fpsSum:0,orientationClass:a,canvasVisibility:!0,titleVisibility:!0,infoVisibility:!0};function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,g,n),r.m.obj(e,t),r.m.get(e,t,["fpsMonitorContainer","renderWindow","addOnStats"]),r.m.setGet(e,t,["bufferSize","canvasVisibility","infoVisibility","titleVisibility"]),m(e,t)}var y={newInstance:r.m.newInstance(v,"vtkFPSMonitor"),extend:v}},function(e,t,n){"use strict";var r=n(83),i=n(58);t.Z=function(e,t,n,o,a){var s=e;return(0,r.Z)("ImageIO",s).then((function(e){var r=e.webworkerPromise,l=e.worker;return s=l,r.postMessage({operation:"writeImage",name:o,type:a,image:n,useCompression:t,config:i.Z},[n.data.buffer]).then((function(e){return Promise.resolve({arrayBuffer:e,webWorker:s})}))}))}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(0),i=n(4),o=n(406),a=n(361);function s(e,t){t.classHierarchy.push("vtkXMLPolyDataWriter");const n={...e};e.create=t=>{const r=n.create(t),o=r.ele("PolyData",{}).ele("Piece",{NumberOfPoints:t.getPoints().getNumberOfPoints(),NumberOfVerts:t.getNumberOfVerts(),NumberOfLines:t.getNumberOfLines(),NumberOfStrips:t.getNumberOfStrips(),NumberOfPolys:t.getNumberOfPolys()});return e.processDataSetAttributes(o,"PointData",t.getPointData()),e.processDataSetAttributes(o,"CellData",t.getCellData()),e.processDataArray(o.ele("Points"),t.getPoints()),a.a.forEach((n=>{const r=n.replace(/(?:^\w|[A-Z]|\b\w)/g,(e=>e.toUpperCase())).replace(/\s+/g,"");const a=[],s=[],l=t[`get${r}`]().getData();let u=l[0],c=0;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l,n),o.Z.extend(e,t,n),s(e,t)}var c={newInstance:r.m.newInstance(u,"vtkXMLPolyDataWriter"),extend:u}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return v}});var r=n(575),i=n(0),o=n(578);const a={ASCII:"ascii",BINARY:"binary"};const{vtkErrorMacro:s}=i.m;function l(e,t,n){return e.setFloat32(t,n.toPrecision(6),!0),t+4}function u(e,t,n){let r=l(e,t,n[0]);return r=l(e,r,n[1]),l(e,r,n[2])}const c=()=>{let e=0,t=null;return{init:e=>{const n=e.getPolys().getData(),r=new ArrayBuffer(84+50*n.length/4);t=new DataView(r)},writeHeader:n=>{e+=80,t.setUint32(e,n.getNumberOfCells(),!0),e+=4},writeTriangle:(n,r,i,o)=>{e=u(t,e,o),e=u(t,e,n),e=u(t,e,r),e=u(t,e,i),e+=2},writeFooter:e=>{},getOutputData:()=>t}},d=()=>{let e="";return{init:e=>{},writeHeader:t=>{e+="solid ascii\n"},writeTriangle:(t,n,r,i)=>{e+=` facet normal ${i[0].toPrecision(6)} ${i[1].toPrecision(6)} ${i[2].toPrecision(6)}\n`,e+=" outer loop\n",e+=` vertex ${t[0].toPrecision(6)} ${t[1].toPrecision(6)} ${t[2].toPrecision(6)}\n`,e+=` vertex ${n[0].toPrecision(6)} ${n[1].toPrecision(6)} ${n[2].toPrecision(6)}\n`,e+=` vertex ${r[0].toPrecision(6)} ${r[1].toPrecision(6)} ${r[2].toPrecision(6)}\n`,e+=" endloop\n",e+=" endfacet\n"},writeFooter:t=>{e+="endsolid\n"},getOutputData:()=>e}};function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BINARY,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=null;t===a.BINARY?i=c():t===a.ASCII?i=d():s("Invalid format type"),i.init(e),i.writeHeader(e);const l=e.getPolys().getData(),u=e.getPoints().getData(),p=e.getStrips()?e.getStrips().getData():null,f=[];let h=[],m=[],g=[];if(p&&p.length>0)throw new Error("Unsupported strips");for(let e=0;e{const r=e[0];r&&"vtkPolyData"===r.getClassName()?n[0]=p(r,t.format,t.transform):s("Invalid or missing input")}}const m={format:a.BINARY,transform:null};function g(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,m,n),i.m.obj(e,t),i.m.algo(e,t,1,1),i.m.setGet(e,t,["format","transform"]),h(e,t)}var v={newInstance:i.m.newInstance(g,"vtkSTLWriter"),extend:g,...f}},function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-card",{staticClass:"fill-height",attrs:{flat:"flat"}},[n("v-row",{staticClass:"flex-column flex-nowrap fill-height",attrs:{"no-gutters":"no-gutters"}},[e._t("header",(function(){return[n("v-card-title",{attrs:{"primary-title":"primary-title"}},[n("div",[e.hideHeadline?e._e():n("div",{staticClass:"headline"},[e._v("\n Upload to "),n("span",{staticClass:"font-weight-bold"},[e._v(e._s(e.dest.name))])]),e._v(" "),n("div",{staticClass:"grey--text title"},[e._v("\n "+e._s(e.statusMessage)+"\n ")])])])]})),e._v(" "),e.uploading?n("v-progress-linear",{attrs:{value:e.totalProgressPercent,indeterminate:e.indeterminate,height:"20"}}):e._e(),e._v(" "),n("v-card-actions",{directives:[{name:"show",rawName:"v-show",value:e.files.length&&!e.errorMessage&&!e.uploading,expression:"files.length && !errorMessage && !uploading"}]},[n("v-btn",{attrs:{text:"text"},on:{click:e.reset}},[e._v("\n Clear all\n ")]),e._v(" "),e.hideStartButton?e._e():n("v-btn",{attrs:{color:"primary"},on:{click:e.startUpload}},[e._v("\n "+e._s(e.startButtonText)+"\n ")])],1),e._v(" "),n("v-slide-y-reverse-transition",{attrs:{"hide-on-leave":""}},[e.files.length?e._e():n("v-col",[e._t("dropzone",(function(){return[n("dropzone",{attrs:{message:e.dropzoneMessage,multiple:e.multiple,accept:e.accept},on:{change:e.inputFilesChanged}})]}),null,{files:e.files,dropzoneMessage:e.dropzoneMessage,multiple:e.multiple,accept:e.accept,inputFilesChanged:e.inputFilesChanged})],2)],1),e._v(" "),e.errorMessage?n("div",[n("v-alert",{attrs:{value:!0,dark:"dark",tile:"tile",type:"error"}},[e._v("\n "+e._s(e.errorMessage)+"\n "),e.uploading?e._e():n("v-btn",{staticClass:"ml-3",attrs:{dark:"dark",small:"small",outlined:"outlined"},on:{click:e.startUpload}},[e._v("\n Resume upload\n ")]),e._v(" "),e.uploading?e._e():n("v-btn",{staticClass:"ml-3",attrs:{dark:"dark",small:"small",outlined:"outlined"},on:{click:e.reset}},[e._v("\n Abort\n ")])],1)],1):e._e(),e._v(" "),e._t("files",(function(){return[n("v-slide-y-transition",{attrs:{"hide-on-leave":""}},[e.files.length?n("file-upload-list",e._b({style:{overflow:"scroll"},on:{input:e.setFiles}},"file-upload-list",{value:e.files,maxShow:e.maxShow},!1)):e._e()],1)]}),null,{files:e.files,setFiles:e.setFiles,maxShow:e.maxShow})],2)],1)};r._withStripped=!0;var i=n(681),o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"dropzone-wrapper",class:e.dropzoneClass,on:{dragenter:function(t){e.dropzoneClass="animate"},dragleave:function(t){e.dropzoneClass=null},drop:function(t){e.dropzoneClass=null}}},[n("div",{staticClass:"dropzone-overlay"}),e._v(" "),n("v-row",{staticClass:"flex-column align-center justify-center fill-height dropzone-message",attrs:{"no-gutters":""}},[n("v-icon",{attrs:{size:"50px"}},[e._v("\n $vuetify.icons.fileUpload\n ")]),e._v(" "),n("div",{staticClass:"title mt-3"},[e._v("\n "+e._s(e.message)+"\n ")])],1),n("input",{staticClass:"file-input",attrs:{multiple:e.multiple,accept:e.accept,type:"file"},on:{change:function(t){e.$emit("change",Array.apply(void 0,t.target.files))}}})],1)};o._withStripped=!0;var a={props:{message:{type:String,required:!0},multiple:{type:Boolean,required:!0},accept:{type:String,default:null}},data:()=>({dropzoneClass:null})},s=n(581),l=n(3),u=n.n(l),c=n(610),d=n(680),p=(0,s.Z)(a,o,[],!1,null,"6fbe8696",null);u()(p,{VIcon:c.Z,VRow:d.Z}),p.options.__file="node_modules/@girder/components/src/components/Presentation/Dropzone.vue";var f=p.exports,h=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-list",{directives:[{name:"show",rawName:"v-show",value:e.value.length,expression:"value.length"}],staticClass:"files-list",attrs:{dense:"dense"}},[e._l(e.shownFiles,(function(t,r){return n("div",{key:t.file.name,staticClass:"file-tile",class:"status-"+t.status},[r>0?n("v-divider"):e._e(),e._v(" "),n("v-list-item",[n("v-list-item-icon",["pending"===t.status?n("v-btn",{attrs:{icon:"icon"},on:{click:function(t){e.$emit("input",e.splice(r))}}},[n("v-icon",[e._v("$vuetify.icons.close")])],1):e._e(),e._v(" "),"uploading"===t.status?n("v-progress-circular",{attrs:{rotate:-90,value:e.progressPercent(Object.assign({},t.progress,{total:t.progress.size})),indeterminate:t.progress.indeterminate,color:"primary"}}):e._e(),e._v(" "),"done"===t.status?n("v-icon",{attrs:{color:"success",large:"large"}},[e._v("\n $vuetify.icons.complete\n ")]):e._e(),e._v(" "),"error"===t.status?n("v-icon",{attrs:{color:"error",large:"large"}},[e._v("\n $vuetify.icons.error\n ")]):e._e()],1),e._v(" "),n("v-list-item-content",[n("v-list-item-title",[e._v(e._s(t.file.name))]),e._v(" "),n("v-list-item-subtitle",[t.progress.current?n("span",[e._v(e._s(e.formatSize(t.progress.current))+" /")]):e._e(),e._v(" "),n("span",[e._v(e._s(e.formatSize(t.file.size)))])])],1),e._v(" "),e._t("item",null,null,{file:t})],2)],1)})),e.hiddenCount?[n("v-divider"),e._v(" "),n("v-list-item",[n("v-list-item-content",[n("div",{staticClass:"grey--text subtitle-1"},[e._v("\n + "+e._s(e.hiddenCount)+" more...\n ")])])],1)]:e._e()],2)};h._withStripped=!0;var m={mixins:[i.i$,i.hu],props:{value:{type:Array,required:!0},maxShow:{type:Number,default:0}},computed:{notDone(){return this.value.filter((e=>"done"!==e.status))},shownFiles(){return this.maxShow?this.notDone.slice(0,this.maxShow):this.value},hiddenCount(){return this.maxShow?this.notDone.length-this.shownFiles.length:0}},methods:{splice(e){return[...this.value.slice(0,e),...this.value.slice(e+1)]}}},g=n(582),v=n(644),y=n(647),_=n(641),b=n(646),x=n(649),w=n(599),S=(0,s.Z)(m,h,[],!1,null,"21423e16",null);u()(S,{VBtn:g.Z,VDivider:v.Z,VIcon:c.Z,VList:y.Z,VListItem:_.Z,VListItemContent:b.km,VListItemIcon:x.Z,VListItemSubtitle:b.oZ,VListItemTitle:b.V9,VProgressCircular:w.Z}),S.options.__file="node_modules/@girder/components/src/components/Presentation/FileUploadList.vue";var C=S.exports,T=n(682),M={components:{Dropzone:f,FileUploadList:C},mixins:[i.KQ,i.i$,i.hu],inject:["girderRest"],props:{dest:{required:!0,type:Object},maxShow:{default:0,type:Number},multiple:{default:!0,type:Boolean},preUpload:{default:()=>{},type:Function},postUpload:{default:()=>{},type:Function},uploadCls:{default:T.Z,type:Function},accept:{default:null,type:String},startButtonText:{default:"Start Upload",type:String},hideStartButton:{default:!1,type:Boolean},hideHeadline:{default:!1,type:Boolean}},data:()=>({dragover:!1}),computed:{dropzoneMessage(){return this.multiple?"Drag files here or click to select them":"Drag a file here or click to select one"},statusMessage(){return this.uploading?`${this.formatSize(this.totalProgress)} / ${this.formatSize(this.totalSize)} (${this.totalProgressPercent}%)`:`${this.files.length} selected (${this.formatSize(this.totalSize)} total)`}},methods:{startUpload(){const{dest:e,uploadCls:t,preUpload:n,postUpload:r}=this;this.start({dest:e,uploadCls:t,preUpload:n,postUpload:r}).catch((()=>{}))}}},D=n(668),A=n(601),P=n(607),k=n(683),L=n(603),O=n(605),E=(0,s.Z)(M,r,[],!1,null,null,null);u()(E,{VAlert:D.Z,VBtn:g.Z,VCard:A.Z,VCardActions:P.h7,VCardTitle:P.EB,VCol:k.Z,VProgressLinear:L.Z,VRow:d.Z,VSlideYReverseTransition:O.V,VSlideYTransition:O.cu}),E.options.__file="node_modules/@girder/components/src/components/Upload.vue";var I=E.exports},,function(e,t,n){"use strict";e.exports=n(407)},function(e){"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},function(e,t,n){"use strict";t.Any=n(133),t.Cc=n(134),t.Cf=n(414),t.P=n(85),t.Z=n(135)},function(e,t,n){"use strict";t.parseLinkLabel=n(415),t.parseLinkDestination=n(416),t.parseLinkTitle=n(417)},function(e,t,n){"use strict";n.r(t),n.d(t,{ucs2decode:function(){return f},ucs2encode:function(){return h},decode:function(){return v},encode:function(){return y},toASCII:function(){return b},toUnicode:function(){return _}});const r=2147483647,i=36,o=/^xn--/,a=/[^\0-\x7E]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},u=Math.floor,c=String.fromCharCode;function d(e){throw new RangeError(l[e])}function p(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]);const i=function(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}((e=e.replace(s,".")).split("."),t).join(".");return r+i}function f(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),m=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},g=function(e,t,n){let r=0;for(e=n?u(e/700):e>>1,e+=u(e/t);e>455;r+=i)e=u(e/35);return u(r+36*e/(e+38))},v=function(e){const t=[],n=e.length;let o=0,a=128,s=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let n=0;n=128&&d("not-basic"),t.push(e.charCodeAt(n));for(let p=l>0?l+1:0;p=n&&d("invalid-input");const l=(c=e.charCodeAt(p++))-48<10?c-22:c-65<26?c-65:c-97<26?c-97:i;(l>=i||l>u((r-o)/t))&&d("overflow"),o+=l*t;const f=a<=s?1:a>=s+26?26:a-s;if(lu(r/h)&&d("overflow"),t*=h}const f=t.length+1;s=g(o-l,f,0==l),u(o/f)>r-a&&d("overflow"),a+=u(o/f),o%=f,t.splice(o++,0,a)}var c;return String.fromCodePoint(...t)},y=function(e){const t=[];let n=(e=f(e)).length,o=128,a=0,s=72;for(const n of e)n<128&&t.push(c(n));let l=t.length,p=l;for(l&&t.push("-");p=o&&tu((r-a)/f)&&d("overflow"),a+=(n-o)*f,o=n;for(const n of e)if(nr&&d("overflow"),n==o){let e=a;for(let n=i;;n+=i){const r=n<=s?1:n>=s+26?26:n-s;if(el.fF(e,e,n))),o}function p(e,t){t.classHierarchy.push("vtkView2DProxy"),e.updateWidthHeightAnnotation=()=>{const{ijkOrientation:n,dimensions:r}=t.cornerAnnotation.getMetadata();if(n&&r){let i=r;r.length>3&&(i=r.split(",").map(Number));const o=t.camera.getDirectionOfProjection(),s=t.camera.getViewUp(),l=[0,0,0];(0,a.j)(o,s,l);const u=(0,a.E)(l),c=(0,a.E)(s),d=i["IJK".indexOf(n[u])],p=i["IJK".indexOf(n[c])];e.updateCornerAnnotation({sliceWidth:d,sliceHeight:p})}};const n=e.updateOrientation;e.updateOrientation=(r,i,o)=>{const a=n(r,i,o);let s=t.representations.length;for(;s--;){const e=t.representations[s],n="XYZ"[r];e.setSlicingMode&&e.setSlicingMode(n)}return e.updateCornerAnnotation({axis:"XYZ"[r]}),a};const r=e.addRepresentation;e.addRepresentation=n=>{r(n),n.setSlicingMode&&n.setSlicingMode("XYZ"[t.axis]),e.bindRepresentationToManipulator(n)};const o=e.removeRepresentation;e.removeRepresentation=n=>{if(o(n),n===t.sliceRepresentation){e.bindRepresentationToManipulator(null);let n=t.representations.length;for(;n--;)e.bindRepresentationToManipulator(t.representations[n])&&(n=0)}};const p=t._resetCamera;function f(n){e.updateCornerAnnotation({windowWidth:n}),t.sliceRepresentation&&t.sliceRepresentation.setWindowWidth&&t.sliceRepresentation.setWindowWidth(n)}function h(n){e.updateCornerAnnotation({windowLevel:n}),t.sliceRepresentation&&t.sliceRepresentation.setWindowLevel&&t.sliceRepresentation.setWindowLevel(n)}function m(n){const r=Number(n),i={slice:Number.isInteger(r)?n:r.toFixed(2)};if(t.sliceRepresentation&&t.sliceRepresentation.setSlice&&t.sliceRepresentation.setSlice(r),t.sliceRepresentation&&t.sliceRepresentation.getAnnotations){const e=t.sliceRepresentation.getAnnotations();Object.keys(e).forEach((t=>{i[t]=c(e[t])}))}e.updateCornerAnnotation(i)}t._resetCamera=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const r=p(n);if(!t.fitProps||!t.useParallelRendering||!r)return r;const i=[];if(n?u.ZP.getCorners(n,i):e.getRepresentations().forEach((e=>[e.getActors(),e.getVolumes()].flat().forEach((e=>i.push(...d(e)))))),!i)return r;const o=u.ZP.reset([]),c=t.camera.getViewMatrix();s.transpose(c,c);for(let e=0;e{let r=0;for(t.rangeManipulator.removeAllListeners(),t.sliceRepresentation=n;t.sliceRepresentationSubscriptions.length;)t.sliceRepresentationSubscriptions.pop().unsubscribe();if(n){if(t.sliceRepresentationSubscriptions.push(t.camera.onModified(e.updateWidthHeightAnnotation)),n.getWindowWidth){const e=()=>f(n.getWindowWidth()),i=n.getPropertyDomainByName("windowWidth"),{min:o,max:a}=i;let{step:s}=i;s&&"any"!==s||(s=1/512),t.rangeManipulator.setVerticalListener(o,a,s,n.getWindowWidth,f),t.sliceRepresentationSubscriptions.push(n.onModified(e)),e(),r++}if(n.getWindowLevel){const e=()=>h(n.getWindowLevel()),i=n.getPropertyDomainByName("windowLevel"),{min:o,max:a}=i;let{step:s}=i;s&&"any"!==s||(s=1/512),t.rangeManipulator.setHorizontalListener(o,a,s,n.getWindowLevel,h),t.sliceRepresentationSubscriptions.push(n.onModified(e)),e(),r++}const i=n.getPropertyDomainByName("slice");if(n.getSlice&&i){const e=()=>m(n.getSlice());t.rangeManipulator.setScrollListener(i.min,i.max,i.step,n.getSlice,m),t.sliceRepresentationSubscriptions.push(n.onModified(e)),e(),r++}}return r}}const f={axis:2,orientation:-1,viewUp:[0,1,0],useParallelRendering:!0,sliceRepresentationSubscriptions:[],fitProps:!1};function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,f,n),o.Z.extend(e,t,n),r.m.get(e,t,["axis"]),r.m.setGet(e,t,["fitProps"]),p(e,t)}var m={newInstance:r.m.newInstance(h,"vtkView2DProxy"),extend:h}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(0),i=n(5),o=n(25);function a(e,t){t.classHierarchy.push("vtkConeSource"),e.requestData=function(e,n){if(t.deleted)return;let a=n[0];const s=2*Math.PI/t.resolution,l=-t.height/2,u=t.resolution+1,c=4*t.resolution+1+t.resolution;let d=0;const p=r.m.newTypedArray(t.pointType,3*u);let f=0;const h=new Uint32Array(c);p[0]=t.height/2,p[1]=0,p[2]=0,t.capping&&(h[f++]=t.resolution);for(let e=0;et.resolution?1:e+2;o.Z.buildFromRadian().translate(...t.center).rotateFromDirections([1,0,0],t.direction).apply(p),a=i.ZP.newInstance(),a.getPoints().setData(p,3),a.getPolys().setData(h,1),n[0]=a}}const s={height:1,radius:.5,resolution:6,center:[0,0,0],direction:[1,0,0],capping:!0,pointType:"Float64Array"};function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),r.m.obj(e,t),r.m.setGet(e,t,["height","radius","resolution","capping"]),r.m.setGetArray(e,t,["center","direction"],3),r.m.algo(e,t,0,1),a(e,t)}var u={newInstance:r.m.newInstance(l,"vtkConeSource"),extend:l}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(0),i=n(4),o=n(5),a=n(25);function s(e,t){t.classHierarchy.push("vtkCylinderSource"),e.requestData=function(e,n){if(t.deleted)return;let s=n[0];const l=2*Math.PI/t.resolution;let u=2*t.resolution,c=5*t.resolution;t.capping&&(u=4*t.resolution,c=7*t.resolution+2);const d=r.m.newTypedArray(t.pointType,3*u);let p=0;const f=new Uint32Array(c),h=new Float32Array(3*u),m=i.ZP.newInstance({numberOfComponents:3,values:h,name:"Normals"}),g=new Float32Array(2*u),v=i.ZP.newInstance({numberOfComponents:2,values:g,name:"TCoords"}),y=[0,0,0],_=[0,0,0],b=[0,0,0],x=[0,0,0],w=[0,0],S=[0,0],C=null==t.otherRadius?t.radius:t.otherRadius;for(let e=0;e-1*e))).apply(d),s=o.ZP.newInstance(),s.getPoints().setData(d,3),s.getPolys().setData(f,1),s.getPointData().setNormals(m),s.getPointData().setTCoords(v),n[0]=s}}const l={height:1,initAngle:0,radius:1,resolution:6,center:[0,0,0],direction:[0,1,0],capping:!0,pointType:"Float64Array"};function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l,n),r.m.obj(e,t),r.m.setGet(e,t,["height","initAngle","otherRadius","radius","resolution","capping"]),r.m.setGetArray(e,t,["center","direction"],3),r.m.algo(e,t,0,1),s(e,t)}var c={newInstance:r.m.newInstance(u,"vtkCylinderSource"),extend:u}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return b}});var r=n(0),i=n(2),o=n(322);const{Device:a,Input:s}=o.ZP,{vtkWarningMacro:l,vtkErrorMacro:u,normalizeWheel:c,vtkOnceErrorMacro:d}=r.m,p={ctrlKey:!1,altKey:!1,shiftKey:!1},f={"xr-standard":[s.Trigger,s.Grip,s.TrackPad,s.Thumbstick,s.A,s.B]},h=["StartAnimation","Animation","EndAnimation","PointerEnter","PointerLeave","MouseEnter","MouseLeave","StartMouseMove","MouseMove","EndMouseMove","LeftButtonPress","LeftButtonRelease","MiddleButtonPress","MiddleButtonRelease","RightButtonPress","RightButtonRelease","KeyPress","KeyDown","KeyUp","StartMouseWheel","MouseWheel","EndMouseWheel","StartPinch","Pinch","EndPinch","StartPan","Pan","EndPan","StartRotate","Rotate","EndRotate","Button3D","Move3D","StartPointerLock","EndPointerLock","StartInteraction","Interaction","EndInteraction","AnimationFrameRateUpdate"];function m(e){e.cancelable&&e.preventDefault()}function g(e){const t=Object.create(null);return e.forEach((e=>{let{pointerId:n,position:r}=e;t[n]=r})),t}function v(e,t){t.classHierarchy.push("vtkRenderWindowInteractor");const n=new Set,r=new Map;let o=1;function v(n,r){t._forcedRenderer||(t.currentRenderer=e.findPokedRenderer(n,r))}e.start=()=>{(t.initialized||(e.initialize(),t.initialized))&&e.startEventLoop()},e.setRenderWindow=e=>{u("you want to call setView(view) instead of setRenderWindow on a vtk.js interactor")},e.setInteractorStyle=n=>{t.interactorStyle!==n&&(null!=t.interactorStyle&&t.interactorStyle.setInteractor(null),t.interactorStyle=n,null!=t.interactorStyle&&t.interactorStyle.getInteractor()!==e&&t.interactorStyle.setInteractor(e))},e.initialize=()=>{t.initialized=!0,e.enable(),e.render()},e.enable=()=>e.setEnabled(!0),e.disable=()=>e.setEnabled(!1),e.startEventLoop=()=>l("empty event loop"),e.getCurrentRenderer=()=>(t.currentRenderer||v(0,0),t.currentRenderer);const y=t._getScreenEventPositionFor||function(e){const n=t._view.getCanvas(),i=n.getBoundingClientRect(),o=n.width/i.width,a=n.height/i.height,s={x:o*(e.clientX-i.left),y:a*(i.height-e.clientY+i.top),z:0};return(r.size<=1||!t.currentRenderer)&&v(s.x,s.y),s};function _(e){return{controlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey}}function b(e){const t=_(e);return{key:e.key,keyCode:e.charCode,...t}}function x(e){return e.pointerType||""}function w(){t._view&&t.enabled&&t.enableRender&&(t.inRender=!0,t._view.traverseAllPasses(),t.inRender=!1),e.invokeRenderEvent()}e.bindEvents=n=>{t.container=n,n.addEventListener("contextmenu",m),n.addEventListener("wheel",e.handleWheel),n.addEventListener("DOMMouseScroll",e.handleWheel),n.addEventListener("pointerenter",e.handlePointerEnter),n.addEventListener("pointerleave",e.handlePointerLeave),n.addEventListener("pointermove",e.handlePointerMove,{passive:!1}),n.addEventListener("pointerdown",e.handlePointerDown,{passive:!1}),n.addEventListener("pointerup",e.handlePointerUp),n.addEventListener("pointercancel",e.handlePointerCancel),document.addEventListener("keypress",e.handleKeyPress),document.addEventListener("keydown",e.handleKeyDown),document.addEventListener("keyup",e.handleKeyUp),document.addEventListener("pointerlockchange",e.handlePointerLockChange),n.style.touchAction="none",n.style.userSelect="none",n.style.webkitTapHighlightColor="rgba(0,0,0,0)"},e.unbindEvents=()=>{const{container:n}=t;n.removeEventListener("contextmenu",m),n.removeEventListener("wheel",e.handleWheel),n.removeEventListener("DOMMouseScroll",e.handleWheel),n.removeEventListener("pointerenter",e.handlePointerEnter),n.removeEventListener("pointerleave",e.handlePointerLeave),n.removeEventListener("pointermove",e.handlePointerMove,{passive:!1}),n.removeEventListener("pointerdown",e.handlePointerDown,{passive:!1}),n.removeEventListener("pointerup",e.handlePointerUp),n.removeEventListener("pointercancel",e.handlePointerCancel),document.removeEventListener("keypress",e.handleKeyPress),document.removeEventListener("keydown",e.handleKeyDown),document.removeEventListener("keyup",e.handleKeyUp),document.removeEventListener("pointerlockchange",e.handlePointerLockChange),t.container=null,r.clear()},e.handleKeyPress=t=>{const n=b(t);e.keyPressEvent(n)},e.handleKeyDown=t=>{const n=b(t);e.keyDownEvent(n)},e.handleKeyUp=t=>{const n=b(t);e.keyUpEvent(n)},e.handlePointerEnter=t=>{const n={..._(t),position:y(t),deviceType:x(t)};e.pointerEnterEvent(n),"mouse"===n.deviceType&&e.mouseEnterEvent(n)},e.handlePointerLeave=t=>{const n={..._(t),position:y(t),deviceType:x(t)};e.pointerLeaveEvent(n),"mouse"===n.deviceType&&e.mouseLeaveEvent(n)},e.handlePointerDown=n=>{if(!(n.button>2||e.isPointerLocked()))switch(t.preventDefaultOnPointerDown&&m(n),n.target.hasPointerCapture(n.pointerId)&&n.target.releasePointerCapture(n.pointerId),t.container.setPointerCapture(n.pointerId),r.has(n.pointerId)&&l("[RenderWindowInteractor] duplicate pointerId detected"),r.set(n.pointerId,{pointerId:n.pointerId,position:y(n)}),n.pointerType){case"pen":case"touch":e.handleTouchStart(n);break;default:e.handleMouseDown(n)}},e.handlePointerUp=n=>{if(r.has(n.pointerId))switch(t.preventDefaultOnPointerUp&&m(n),r.delete(n.pointerId),t.container.releasePointerCapture(n.pointerId),n.pointerType){case"pen":case"touch":e.handleTouchEnd(n);break;default:e.handleMouseUp(n)}},e.handlePointerCancel=t=>{if(r.has(t.pointerId))switch(r.delete(t.pointerId),t.pointerType){case"pen":case"touch":e.handleTouchEnd(t);break;default:e.handleMouseUp(t)}},e.handlePointerMove=t=>{if(r.has(t.pointerId)){r.get(t.pointerId).position=y(t)}switch(t.pointerType){case"pen":case"touch":e.handleTouchMove(t);break;default:e.handleMouseMove(t)}},e.handleMouseDown=t=>{const n={..._(t),position:y(t),deviceType:x(t)};switch(t.button){case 0:e.leftButtonPressEvent(n);break;case 1:e.middleButtonPressEvent(n);break;case 2:e.rightButtonPressEvent(n);break;default:u(`Unknown mouse button pressed: ${t.button}`)}},e.requestPointerLock=()=>{t.container&&t.container.requestPointerLock()},e.exitPointerLock=()=>document.exitPointerLock?.(),e.isPointerLocked=()=>!!t.container&&document.pointerLockElement===t.container,e.handlePointerLockChange=()=>{e.isPointerLocked()?e.startPointerLockEvent():e.endPointerLockEvent()},e.requestAnimation=r=>{void 0!==r?n.has(r)?l("requester is already registered for animating"):(n.add(r),t.animationRequest||1!==n.size||t.xrAnimation||(t._animationStartTime=Date.now(),t._animationFrameCount=0,t.animationRequest=requestAnimationFrame(e.handleAnimation),e.startAnimationEvent())):u("undefined requester, can not start animating")},e.extendAnimation=r=>{const i=Date.now()+r;t._animationExtendedEnd=Math.max(t._animationExtendedEnd,i),t.animationRequest||0!==n.size||t.xrAnimation||(t._animationStartTime=Date.now(),t._animationFrameCount=0,t.animationRequest=requestAnimationFrame(e.handleAnimation),e.startAnimationEvent())},e.isAnimating=()=>t.xrAnimation||null!==t.animationRequest,e.cancelAnimation=function(r){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n.has(r))n.delete(r),t.animationRequest&&0===n.size&&Date.now()>t._animationExtendedEnd&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null,e.endAnimationEvent(),e.render());else if(!i){const e=r&&r.getClassName?r.getClassName():r;l(`${e} did not request an animation`)}},e.switchToXRAnimation=()=>{t.animationRequest&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null),t.xrAnimation=!0},e.returnFromXRAnimation=()=>{t.xrAnimation=!1,0!==n.size&&(t.recentAnimationFrameRate=10,t.animationRequest=requestAnimationFrame(e.handleAnimation))},e.updateXRGamepads=(n,r,i)=>{n.inputSources.forEach((n=>{const o=null==n.gripSpace?null:r.getPose(n.gripSpace,i),l=n.gamepad,u=n.handedness;if(l){l.index in t.lastGamepadValues||(t.lastGamepadValues[l.index]={left:{buttons:{}},right:{buttons:{}},none:{buttons:{}}});for(let r=0;r{const r={..._(n),position:y(n),deviceType:x(n)};0===t.moveTimeoutID?e.startMouseMoveEvent(r):(e.mouseMoveEvent(r),clearTimeout(t.moveTimeoutID)),t.moveTimeoutID=setTimeout((()=>{e.endMouseMoveEvent(),t.moveTimeoutID=0}),200)},e.handleAnimation=()=>{const r=Date.now();t._animationFrameCount++,r-t._animationStartTime>1e3&&t._animationFrameCount>1&&(t.recentAnimationFrameRate=1e3*(t._animationFrameCount-1)/(r-t._animationStartTime),t.lastFrameTime=1/t.recentAnimationFrameRate,e.animationFrameRateUpdateEvent(),t._animationStartTime=r,t._animationFrameCount=1),e.animationEvent(),w(),n.size>0||Date.now(){m(n);const r={...c(n),..._(n),position:y(n),deviceType:x(n)};0===t.wheelTimeoutID&&(o=Math.abs(r.spinY)>=.3?Math.abs(r.spinY):1),r.spinY/=o,0===t.wheelTimeoutID?(e.startMouseWheelEvent(r),e.mouseWheelEvent(r)):(e.mouseWheelEvent(r),clearTimeout(t.wheelTimeoutID)),t.mouseScrollDebounceByPass?(e.extendAnimation(600),e.endMouseWheelEvent(),t.wheelTimeoutID=0):t.wheelTimeoutID=setTimeout((()=>{e.extendAnimation(600),e.endMouseWheelEvent(),t.wheelTimeoutID=0}),200)},e.handleMouseUp=t=>{const n={..._(t),position:y(t),deviceType:x(t)};switch(t.button){case 0:e.leftButtonReleaseEvent(n);break;case 1:e.middleButtonReleaseEvent(n);break;case 2:e.rightButtonReleaseEvent(n);break;default:u(`Unknown mouse button released: ${t.button}`)}},e.handleTouchStart=n=>{const i=[...r.values()];if(t.recognizeGestures&&i.length>1){const t=g(r);if(2===i.length){const t={..._(p),position:i[0].position,deviceType:x(n)};e.leftButtonReleaseEvent(t)}e.recognizeGesture("TouchStart",t)}else if(1===i.length){const t={..._(p),position:y(n),deviceType:x(n)};e.leftButtonPressEvent(t)}},e.handleTouchMove=n=>{const i=[...r.values()];if(t.recognizeGestures&&i.length>1){const t=g(r);e.recognizeGesture("TouchMove",t)}else if(1===i.length){const t={..._(p),position:i[0].position,deviceType:x(n)};e.mouseMoveEvent(t)}},e.handleTouchEnd=n=>{const i=[...r.values()];if(t.recognizeGestures)if(0===i.length){const t={..._(p),position:y(n),deviceType:x(n)};e.leftButtonReleaseEvent(t)}else if(1===i.length){const t=g(r);e.recognizeGesture("TouchEnd",t);const o={..._(p),position:i[0].position,deviceType:x(n)};e.leftButtonPressEvent(o)}else{const t=g(r);e.recognizeGesture("TouchMove",t)}else if(1===i.length){const t={..._(p),position:i[0].position,deviceType:x(n)};e.leftButtonReleaseEvent(t)}},e.setView=n=>{t._view!==n&&(t._view=n,t._view.getRenderable().setInteractor(e),e.modified())},e.getFirstRenderer=()=>t._view?.getRenderable()?.getRenderersByReference()?.[0],e.findPokedRenderer=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!t._view)return null;const r=t._view?.getRenderable()?.getRenderers();if(!r||0===r.length)return null;r.sort(((e,t)=>e.getLayer()-t.getLayer()));let i=null,o=null,a=null,s=r.length;for(;s--;){const l=r[s];if(t._view.isInViewport(e,n,l)&&l.getInteractive()){a=l;break}null===i&&l.getInteractive()&&(i=l),null===o&&t._view.isInViewport(e,n,l)&&(o=l)}return null===a&&(a=i),null===a&&(a=o),null==a&&(a=r[0]),a},e.render=()=>{e.isAnimating()||t.inRender||w()},h.forEach((n=>{const r=n.charAt(0).toLowerCase()+n.slice(1);e[`${r}Event`]=r=>{if(!t.enabled)return;if(!e.getCurrentRenderer())return void d("\n Can not forward events without a current renderer on the interactor.\n ");const i={type:n,pokedRenderer:t.currentRenderer,firstRenderer:e.getFirstRenderer(),...r};e[`invoke${n}`](i)}})),e.recognizeGesture=(n,r)=>{if(Object.keys(r).length>2)return;if(t.startingEventPositions||(t.startingEventPositions={}),"TouchStart"===n)return Object.keys(r).forEach((e=>{t.startingEventPositions[e]=r[e]})),void(t.currentGesture="Start");if("TouchEnd"===n)return"Pinch"===t.currentGesture&&(e.render(),e.endPinchEvent()),"Rotate"===t.currentGesture&&(e.render(),e.endRotateEvent()),"Pan"===t.currentGesture&&(e.render(),e.endPanEvent()),t.currentGesture="Start",void(t.startingEventPositions={});let o=0;const a=[],s=[];Object.keys(r).forEach((e=>{a[o]=r[e],s[o]=t.startingEventPositions[e],o++}));const l=Math.sqrt((s[0].x-s[1].x)*(s[0].x-s[1].x)+(s[0].y-s[1].y)*(s[0].y-s[1].y)),u=Math.sqrt((a[0].x-a[1].x)*(a[0].x-a[1].x)+(a[0].y-a[1].y)*(a[0].y-a[1].y));let c=(0,i.A)(Math.atan2(s[1].y-s[0].y,s[1].x-s[0].x)),d=(0,i.A)(Math.atan2(a[1].y-a[0].y,a[1].x-a[0].x)),p=d-c;d=d+180>=360?d-180:d+180,c=c+180>=360?c-180:c+180,Math.abs(d-c)n&&i>o&&i>a){t.currentGesture="Pinch";const n={scale:1,touches:r};e.startPinchEvent(n)}else if(o>n&&o>a){t.currentGesture="Rotate";const n={rotation:0,touches:r};e.startRotateEvent(n)}else if(a>n){t.currentGesture="Pan";const n={translation:[0,0],touches:r};e.startPanEvent(n)}}else{if("Rotate"===t.currentGesture){const t={rotation:p,touches:r};e.rotateEvent(t)}if("Pinch"===t.currentGesture){const t={scale:u/l,touches:r};e.pinchEvent(t)}if("Pan"===t.currentGesture){const t={translation:f,touches:r};e.panEvent(t)}}},e.handleVisibilityChange=()=>{t._animationStartTime=Date.now(),t._animationFrameCount=0},e.setCurrentRenderer=e=>{t._forcedRenderer=!!e,t.currentRenderer=e};const S=e.delete;e.delete=()=>{for(;n.size;)e.cancelAnimation(n.values().next().value);void 0!==document.hidden&&document.removeEventListener("visibilitychange",e.handleVisibilityChange),t.container&&e.unbindEvents(),S()},void 0!==document.hidden&&document.addEventListener("visibilitychange",e.handleVisibilityChange,!1)}const y={renderWindow:null,interactorStyle:null,picker:null,pickingManager:null,initialized:!1,enabled:!1,enableRender:!0,currentRenderer:null,lightFollowCamera:!0,desiredUpdateRate:30,stillUpdateRate:2,container:null,recognizeGestures:!0,currentGesture:"Start",animationRequest:null,lastFrameTime:.1,recentAnimationFrameRate:10,wheelTimeoutID:0,moveTimeoutID:0,lastGamepadValues:{},preventDefaultOnPointerDown:!1,preventDefaultOnPointerUp:!1,mouseScrollDebounceByPass:!1};function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,y,n),r.m.obj(e,t),t._animationExtendedEnd=0,r.m.event(e,t,"RenderEvent"),h.forEach((n=>r.m.event(e,t,n))),r.m.get(e,t,["initialized","container","interactorStyle","lastFrameTime","recentAnimationFrameRate","_view"]),r.m.setGet(e,t,["lightFollowCamera","enabled","enableRender","recognizeGestures","desiredUpdateRate","stillUpdateRate","picker","preventDefaultOnPointerDown","preventDefaultOnPointerUp","mouseScrollDebounceByPass"]),r.m.moveToProtected(e,t,["view"]),v(e,t)}var b={newInstance:r.m.newInstance(_,"vtkRenderWindowInteractor"),extend:_,handledEvents:h,...o.ZP}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return p}});var r=n(0),i=n(13),o=n(11),a=n(40);const s={representation:{"Surface with edges":{property:{edgeVisibility:!0,representation:2}},Surface:{property:{edgeVisibility:!1,representation:2}},Wireframe:{property:{edgeVisibility:!1,representation:1}},Points:{property:{edgeVisibility:!1,representation:0}}}},l={representation:"Surface"};function u(e,t){t.classHierarchy.push("vtkGeometryRepresentationProxy"),t.mapper=o.ZP.newInstance({interpolateScalarsBeforeMapping:!0,useLookupTableScalarRange:!0,scalarVisibility:!1}),t.actor=i.ZP.newInstance(),t.property=t.actor.getProperty(),t.sourceDependencies.push(t.mapper),t.actor.setMapper(t.mapper),t.actors.push(t.actor)}const c={representation:"Surface"};function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,c,n),a.Z.extend(e,t,n),u(0,t),r.m.proxyPropertyState(e,t,s,l),r.m.proxyPropertyMapping(e,t,{opacity:{modelKey:"property",property:"opacity"},visibility:{modelKey:"actor",property:"visibility"},color:{modelKey:"property",property:"diffuseColor"},interpolateScalarsBeforeMapping:{modelKey:"mapper",property:"interpolateScalarsBeforeMapping"},pointSize:{modelKey:"property",property:"pointSize"},useShadow:{modelKey:"property",property:"lighting"},lineWidth:{modelKey:"property",property:"lineWidth"},useBounds:{modelKey:"actor",property:"useBounds"}})}var p={newInstance:r.m.newInstance(d,"vtkGeometryRepresentationProxy"),extend:d}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return f}});var r=n(0),i=n(13);function o(e,t){t.classHierarchy.push("vtkSkybox"),e.getIsOpaque=()=>!0,e.hasTranslucentPolygonalGeometry=()=>!1,e.getSupportsSelection=()=>!1}const a={format:"box"};function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,a,n),i.ZP.extend(e,t,n),r.m.setGet(e,t,["format"]),o(e,t)}var l={newInstance:r.m.newInstance(s,"vtkSkybox"),extend:s},u=n(40);function c(e,t){t.classHierarchy.push("vtkSkyboxRepresentationProxy"),t.actor=l.newInstance(),t.actors.push(t.actor),t.sourceDependencies.push({setInputData:function(n){t.actor.removeAllTextures(),t.actor.addTexture(n);const r=t.input.getAlgo().getPositions();e.updateProxyProperty("position",{values:r})}}),e.setColorBy=()=>{},e.getColorBy=()=>[],e.listDataArrays=()=>[],e.setPosition=e=>{t.input.getAlgo().setPosition(e)},e.getPosition=()=>t.input.getAlgo().getPosition()}const d={};function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),u.Z.extend(e,t,n),c(e,t)}var f={newInstance:r.m.newInstance(p,"vtkSkyboxRepresentationProxy"),extend:p}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return Z}});var r=n(0),i=n(23),o=n(13),a=n(26),s=n(696),l=n(4),u=n(5),c=n(51),d=n(40),p=(n(466),n(471),n(25));function f(e,t){function n(){for(;t.cellFields.length{t.radius=[],t.cellFields=[],e.modified()},e.addRadius=(r,i)=>{t.radius.push(r),void 0!==i&&t.cellFields.push(i),n(),e.modified()},e.getNumberOfRadius=()=>t.radius.length,e.getRadius=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.radius[e]},e.setRadius=(n,r)=>{t.radius[n]=r,e.modified()},e.setCellField=(n,r)=>{t.cellFields[n]=r,e.modified()},e.removeMask=()=>{t.mask=null,e.modified()},e.setMaskLayer=(n,r)=>{let i=!1;!t.mask&&r&&(i=!0,t.mask=[]),t.mask&&(!t.mask[n]!=!r&&(i=!0),t.mask[n]=r),i&&e.modified()},e.getMaskLayer=e=>void 0===e?t.mask:t.mask[e],e.requestData=function(e,i){if(t.deleted||!t.radius.length)return;n();let o=i[0];const a=t.radius.length,s=t.height/2;let c=0,d=0,f=t.startThetat.startTheta?t.endTheta:t.startTheta;h*=Math.PI/180;let m=t.resolution,g=!1;h>=f+2*Math.PI?h=f+2*Math.PI:(++m,g=!0);const v=(h-f)/t.resolution,y=m*a*2+2;if(t.skipInnerFaces||t.mask)if(!t.skipInnerFaces&&t.mask){t.mask[0]||(c+=2*(m+1)+5*m+(g?10:0),d+=2+m+(g?2:0));for(let e=1;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,h,n),r.m.obj(e,t),r.m.setGet(e,t,["height","resolution","startTheta","endTheta","skipInnerFaces"]),r.m.setGetArray(e,t,["center","direction"],3),r.m.getArray(e,t,["cellFields"]),r.m.algo(e,t,0,1),f(e,t)}r.m.newInstance(m,"vtkConcentricCylinderSource"),n(540),n(112);var g=n(44),v=n(37);function y(e,t){t.classHierarchy.push("vtkCursor3D"),e.setModelBounds=n=>{if(Array.isArray(n)&&!(n.length<6)&&(t.modelBounds[0]!==n[0]||t.modelBounds[1]!==n[1]||t.modelBounds[2]!==n[2]||t.modelBounds[3]!==n[3]||t.modelBounds[4]!==n[4]||t.modelBounds[5]!==n[5])){e.modified(),t.modelBounds=n.map((e=>Number(e)));for(let e=0;e<3;++e)t.modelBounds[2*e]=Math.min(t.modelBounds[2*e],t.modelBounds[2*e+1])}},e.setFocalPoint=n=>{if(!Array.isArray(n)||n.length<3)return;if(n[0]===t.focalPoint[0]&&n[1]===t.focalPoint[1]&&n[2]===t.focalPoint[2])return;e.modified();const r=[];for(let e=0;e<3;e++)r[e]=n[e]-t.focalPoint[e],t.focalPoint[e]=Number(n[e]),t.translationMode?(t.modelBounds[2*e]+=r[e],t.modelBounds[2*e+1]+=r[e]):t.wrap?t.focalPoint[e]=t.modelBounds[2*e]+1*(t.focalPoint[e]-t.modelBounds[2*e])%(1*(t.modelBounds[2*e+1]-t.modelBounds[2*e])):(n[e]t.modelBounds[2*e+1]&&(t.focalPoint[e]=t.modelBounds[2*e+1]))},e.setAll=t=>{e.setOutline(t),e.setAxes(t),e.setXShadows(t),e.setYShadows(t),e.setZShadows(t)},e.allOn=()=>{e.setAll(!0)},e.allOff=()=>{e.setAll(!1)},e.requestData=(e,n)=>{if(t.deleted)return;let r=0,i=0;if(t.wrap)for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_,n),r.m.obj(e,t),r.m.get(e,t,["focus"]),r.m.getArray(e,t,["modelBounds"],6),r.m.getArray(e,t,["focalPoint"],3),r.m.setGet(e,t,["outline"]),r.m.setGet(e,t,["axes"]),r.m.setGet(e,t,["xShadows"]),r.m.setGet(e,t,["yShadows"]),r.m.setGet(e,t,["zShadows"]),r.m.setGet(e,t,["wrap"]),r.m.setGet(e,t,["translationMode"]),r.m.algo(e,t,0,1),y(e,t)}r.m.newInstance(b,"vtkCursor3D"),n(541);var x=n(15);function w(e,t){t.classHierarchy.push("vtkImageGridSource"),e.requestData=(e,n)=>{if(t.deleted)return;const r={},i={type:"vtkImageData",mtime:t.mtime,metadata:{source:"vtkImageGridSource",state:r}};["gridSpacing","gridOrigin","dataSpacing","dataOrigin"].forEach((e=>{r[e]=[].concat(t[e])}));const o=x.ZP.newInstance(i);o.setOrigin(t.dataOrigin[0],t.dataOrigin[1],t.dataOrigin[2]),o.setSpacing(t.dataSpacing[0],t.dataSpacing[1],t.dataSpacing[2]),o.setExtent.apply(this,t.dataExtent),o.setDirection(t.dataDirection);let a=[0,0,0];a=a.map(((e,n)=>t.dataExtent[2*n+1]-t.dataExtent[2*n]+1));const s=new Uint8Array(a[0]*a[1]*a[2]);let u=0,c=0,d=0,p=0;for(let e=t.dataExtent[4];e<=t.dataExtent[5];e++){d=t.gridSpacing[2]?e%t.gridSpacing[2]===t.gridOrigin[2]:0;for(let e=t.dataExtent[2];e<=t.dataExtent[3];e++){c=t.gridSpacing[1]?e%t.gridSpacing[1]===t.gridOrigin[1]:0;for(let e=t.dataExtent[0];e<=t.dataExtent[1];e++)u=t.gridSpacing[0]?e%t.gridSpacing[0]===t.gridOrigin[0]:0,s[p]=d||c||u?t.lineValue:t.fillValue,p++}}const f=l.ZP.newInstance({numberOfComponents:1,values:s});f.setName("scalars");o.getPointData().setScalars(f),n[0]=o}}const S={lineValue:0,fillValue:255,gridSpacing:[10,10,0],gridOrigin:[0,0,0],dataSpacing:[1,1,1],dataOrigin:[0,0,0],dataExtent:[0,255,0,255,0,0],dataDirection:[1,0,0,0,1,0,0,0,1]};function C(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,S,n),r.m.obj(e,t),r.m.setGet(e,t,["lineValue","fillValue"]),r.m.setGetArray(e,t,["gridOrigin","gridSpacing","dataOrigin","dataSpacing"],3),r.m.setGetArray(e,t,["dataExtent"],6),r.m.setGetArray(e,t,["dataDirection"],9),r.m.algo(e,t,0,1),w(e,t)}r.m.newInstance(C,"vtkImageGridSource");var T=n(2);const{vtkWarningMacro:M}=r.m;function D(e,t){t.classHierarchy.push("vtkLineSource"),e.requestData=(e,n)=>{if(t.deleted)return;const i=n[0],o=i?i.getPoints().getDataType():t.pointType,a=u.ZP.newInstance(),s=[];if((0,T.s)(t.point2,t.point1,s),(0,T.n)(s)<=0)return void M("Zero-length line definition");const l=t.resolution,c=l+1,d=r.m.newTypedArray(o,3*c);a.getPoints().setData(d,3);const p=new Uint32Array(c+1);a.getLines().setData(p,1);let f=0,h=0;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,A,n),r.m.obj(e,t),r.m.setGet(e,t,["resolution"]),r.m.setGetArray(e,t,["point1","point2"],3),r.m.algo(e,t,0,1),D(e,t)}r.m.newInstance(P,"vtkLineSource");var k=n(572),L=n(575);const{vtkWarningMacro:O}=r.m;function E(e,t){t.classHierarchy.push("vtkPlaneSource"),e.requestData=(n,i)=>{if(t.deleted)return;const o=i[0],a=o?o.getPoints().getDataType():t.pointType,s=u.ZP.newInstance(),c=[],d=[];if((0,T.s)(t.point1,t.origin,c),(0,T.s)(t.point2,t.origin,d),!e.updatePlane(c,d))return void O("Bad plane definition");const p=t.xResolution,f=t.yResolution,h=(p+1)*(f+1),m=p*f,g=r.m.newTypedArray(a,3*h);s.getPoints().setData(g,3);const v=new Uint32Array(5*m);s.getPolys().setData(v,1);const y=new Float32Array(3*h),_=l.ZP.newInstance({numberOfComponents:3,values:y,name:"Normals"});s.getPointData().setNormals(_);const b=new Float32Array(2*h),x=l.ZP.newInstance({numberOfComponents:2,values:b,name:"TextureCoordinates"});s.getPointData().setTCoords(x);const w=new Float32Array(2);let S=0;for(let e=0;e{if(Math.abs(n)<1e-6)return;const i=k.identity(new Float64Array(16)),o=[];L.tk(o,t.center),k.translate(i,i,t.center),k.rotate(i,i,n,r),k.translate(i,i,o),L.fF(t.origin,t.origin,i),L.fF(t.point1,t.point1,i),L.fF(t.point2,t.point2,i),p.Z.buildFromRadian().rotate(n,r).apply(t.normal),e.modified()},e.setCenter=function(){let n=[];if(1===arguments.length||Array.isArray(arguments.length<=0?void 0:arguments[0])?n=[...arguments.length<=0?void 0:arguments[0]]:3===arguments.length&&(n=[arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2]]),!L.I6(n,t.center)){const r=[];(0,T.s)(t.point1,t.origin,r);const i=[];(0,T.s)(t.point2,t.origin,i);for(let e=0;e<3;e++)t.center[e]=n[e],t.origin[e]=t.center[e]-.5*(r[e]+i[e]),t.point1[e]=t.origin[e]+r[e],t.point2[e]=t.origin[e]+i[e];e.modified()}},e.setPoint1=function(){let n=[];if(1===arguments.length||Array.isArray(arguments.length<=0?void 0:arguments[0])?n=[...arguments.length<=0?void 0:arguments[0]]:3===arguments.length&&(n=[arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2]]),!L.I6(n,t.point1)){const r=[],i=[];t.point1=[...n],(0,T.s)(t.point1,t.origin,r),(0,T.s)(t.point2,t.origin,i),e.updatePlane(r,i),e.modified()}},e.setPoint2=function(){let n=[];if(1===arguments.length||Array.isArray(arguments.length<=0?void 0:arguments[0])?n=[...arguments.length<=0?void 0:arguments[0]]:3===arguments.length&&(n=[arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2]]),!L.I6(n,t.point2)){const r=[],i=[];t.point2=[...n],(0,T.s)(t.point1,t.origin,r),(0,T.s)(t.point2,t.origin,i),e.updatePlane(r,i),e.modified()}},e.updatePlane=(e,n)=>{for(let r=0;r<3;r++)t.center[r]=t.origin[r]+.5*(e[r]+n[r]);return(0,T.j)(e,n,t.normal),0!==(0,T.l)(t.normal)}}const I={xResolution:10,yResolution:10,origin:[0,0,0],point1:[1,0,0],point2:[0,1,0],pointType:"Float64Array"};function N(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,I,n),t.normal=[0,0,1],t.center=[0,0,0],r.m.obj(e,t),r.m.setGet(e,t,["xResolution","yResolution"]),r.m.setGetArray(e,t,["origin"],3),r.m.getArray(e,t,["point1","point2","normal","center"],3),r.m.algo(e,t,0,1),E(e,t),e.setPoint1(t.point1),e.setPoint2(t.point2)}r.m.newInstance(N,"vtkPlaneSource");function R(e,t){t.classHierarchy.push("vtkPointSource"),e.requestData=(e,n)=>{if(t.deleted)return;const i=n[0],o=i?i.getPoints().getDataType():t.pointType,a=u.ZP.newInstance(),s=t.numberOfPoints,l=r.m.newTypedArray(o,3*s);a.getPoints().setData(l,3);const c=new Uint32Array(s+1);let d,p,f,h,m;a.getVerts().setData(c,1);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,B,n),r.m.obj(e,t),r.m.setGet(e,t,["numberOfPoints","radius"]),r.m.setGetArray(e,t,["center"],3),r.m.algo(e,t,0,1),R(e,t)}r.m.newInstance(F,"vtkPointSource");function V(e,t){t.classHierarchy.push("vtkRTAnalyticSource"),e.requestData=(e,n)=>{if(t.deleted)return;const r={},i={type:"vtkImageData",mtime:t.mtime,metadata:{source:"vtkRTAnalyticSource",state:r}};["standardDeviation","center","frequency","magnitude","maximum"].forEach((e=>{r[e]=[].concat(t[e])}));const o=x.ZP.newInstance(i);o.setSpacing(1,1,1),o.setExtent.apply(this,t.wholeExtent),o.setOrigin(0,0,0),o.setDirection(t.dataDirection);let a=[0,0,0];a=a.map(((e,n)=>t.wholeExtent[2*n+1]-t.wholeExtent[2*n]+1));const s=new Uint8Array(a[0]*a[1]*a[2]),u=1/(2*t.standardDeviation*t.standardDeviation);let c=0,d=0,p=0;const f=[1/(t.wholeExtent[1]-t.wholeExtent[0]),1/(t.wholeExtent[3]-t.wholeExtent[2]),1/(t.wholeExtent[5]-t.wholeExtent[4])];let h=0;for(let e=t.wholeExtent[4];e<=t.wholeExtent[5];e++){p=(t.center[2]-e)*f[2];const n=t.magnitude[2]*Math.cos(t.frequency[2]*p);p*=p;for(let e=t.wholeExtent[2];e<=t.wholeExtent[3];e++){d=(t.center[1]-e)*f[1];const r=t.magnitude[1]*Math.sin(t.frequency[1]*d);d*=d;for(let e=t.wholeExtent[0];e<=t.wholeExtent[1];e++){c=(t.center[0]-e)*f[0];const i=p+d+c*c,o=t.magnitude[0]*Math.sin(t.frequency[0]*c);s[h]=t.maximum*Math.exp(-i*u)+o+r+n+t.offset,h++}}}const m=l.ZP.newInstance({numberOfComponents:1,values:s});m.setName("scalars");o.getPointData().setScalars(m),n[0]=o}}const U={offset:40,maximum:120,center:[0,0,0],frequency:[60,30,40],magnitude:[10,18,5],standardDeviation:.5,wholeExtent:[-10,10,-10,10,-10,10],dataDirection:[1,0,0,0,1,0,0,0,1]};function G(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,U,n),r.m.obj(e,t),r.m.setGet(e,t,["offset","maximum","standardDeviation"]),r.m.setGetArray(e,t,["center","frequency","magnitude"],3),r.m.setGetArray(e,t,["wholeExtent"],6),r.m.setGetArray(e,t,["dataDirection"],9),r.m.algo(e,t,0,1),V(e,t)}r.m.newInstance(G,"vtkRTAnalyticSource");function z(e,t){t.classHierarchy.push("vtkSLICSource"),e.addCluster=(n,r,i,o,a,s,l)=>{const u=t.clusters.length;return t.clusters.push(new Float64Array([n,r,i,o,a,s,l])),e.modified(),u},e.removeCluster=n=>{t.clusters.splice(n,1),e.modified()},e.removeAllClusters=()=>{t.clusters=[],e.modified()},e.updateCluster=(n,r,i,o,a,s,l,u)=>{t.clusters[n]||(t.clusters[n]=new Float64Array(7)),t.clusters[n][0]=r,t.clusters[n][1]=i,t.clusters[n][2]=o,t.clusters[n][3]=a,t.clusters[n][4]=s,t.clusters[n][5]=l,t.clusters[n][6]=u,e.modified()},e.getNumberOfClusters=()=>t.clusters.length,e.requestData=(e,n)=>{if(t.deleted)return;const i=t.dimensions[0]*t.dimensions[1]*t.dimensions[2],o=x.ZP.newInstance();o.setSpacing(...t.spacing),o.setExtent(0,t.dimensions[0]-1,0,t.dimensions[1]-1,0,t.dimensions[2]-1),o.setOrigin(...t.origin);const a=function(e,t,n){const r=new Float64Array(t[0]*t[1]*t[2]*3);let i=0;for(let o=0;o{const i=(t[0]-a[3*e])*(t[0]-a[3*e])+(t[1]-a[3*e+1])*(t[1]-a[3*e+1])+(t[2]-a[3*e+2])*(t[2]-a[3*e+2]);i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,j,n),r.m.obj(e,t),r.m.setGet(e,t,["clusterArrayName","scalarArrayName"]),r.m.setGetArray(e,t,["origin","spacing","dimensions"],3),r.m.algo(e,t,0,1),z(e,t)}r.m.newInstance(Y,"vtkSLICSource"),n(323);function H(e,t){t.classHierarchy.push("vtkGlyphRepresentationProxy"),t.property=a.ZP.newInstance(),t.sourceDependencies.push({setInputData:function(e){t.actors.length=0;const n=c.ZP.newInstance();n.applyColorMap({RGBPoints:e.rgbPoints}),t.glyph={};let r=e.glyph.length;for(;r--;){const n=e.glyph[r];t.glyph[n.id]=(0,i.Z)(n)}for(r=e.mapping.length;r--;){const i=e.mapping[r],a=t.glyph[i.glyphId],c=u.ZP.newInstance();c.getPoints().setData(Float32Array.from(i.coordinates),3),i.scale&&c.getPointData().addArray(l.ZP.newInstance({name:"scaling",values:Float32Array.from(i.scale),numberOfComponents:3}));const d=s.ZP.newInstance({useLookupTableScalarRange:!0,lookupTable:n,orient:!1,scaling:!!i.scale,scaleArray:"scaling",scaleMode:s.ZP.ScaleModes.SCALE_BY_COMPONENTS}),p=o.ZP.newInstance();t.property&&p.setProperty(t.property),p.setMapper(d),d.setInputData(c,0),d.setInputConnection(a.getOutputPort(),1),t.actors.push(p)}}}),e.setColorBy=()=>{},e.getColorBy=()=>[],e.listDataArrays=()=>[]}const W={};function $(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,W,n),d.Z.extend(e,t,n),H(e,t),r.m.proxyPropertyMapping(e,t,{edgeVisibility:{modelKey:"property",property:"edgeVisibility"}})}var Z={newInstance:r.m.newInstance($,"vtkGlyphRepresentationProxy"),extend:$}},function(e,t,n){"use strict";n.d(t,{mk:function(){return r},ZP:function(){return i}});const r={DIRECTION:0,ROTATION:1,MATRIX:2};var i={OrientationModes:r,ScaleModes:{SCALE_BY_CONSTANT:0,SCALE_BY_MAGNITUDE:1,SCALE_BY_COMPONENTS:2}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return p}});var r=n(0),i=n(121),o=n(51),a=n(377);const{Mode:s,Defaults:l}=a.Z;function u(e,t){t.classHierarchy.push("vtkLookupTableProxy"),t.lookupTable=t.lookupTable||o.ZP.newInstance(),t.lookupTable.setVectorModeToMagnitude(),e.setPresetName=n=>{t.presetName!==n&&(t.presetName=n,t.mode=s.Preset,e.applyMode())},e.setRGBPoints=n=>{t.rgbPoints!==n&&(t.rgbPoints=(n||l.RGBPoints).slice(),e.applyMode())},e.setHSVPoints=n=>{t.hsvPoints!==n&&(t.hsvPoints=(n||l.HSVPoints).slice(),e.applyMode())},e.setNodes=n=>{t.nodes!==n&&(t.nodes=(n||l.Nodes).slice(),e.applyMode())},e.setMode=n=>{t.mode!==n&&(t.mode=n,e.applyMode())},e.applyMode=()=>{switch(t.mode){case s.Preset:{const e=i.Z.getPresetByName(t.presetName);e&&t.lookupTable.applyColorMap(e)}break;case s.RGBPoints:t.lookupTable.removeAllPoints(),t.rgbPoints.forEach((e=>t.lookupTable.addRGBPointLong(...e)));break;case s.HSVPoints:t.lookupTable.removeAllPoints(),t.hsvPoints.forEach((e=>t.lookupTable.addHSVPointLong(...e)));break;case s.Nodes:t.lookupTable.setNodes(t.nodes)}t.lookupTable.setMappingRange(t.dataRange[0],t.dataRange[1]),t.lookupTable.updateRange(),e.modified()},e.setDataRange=(n,r)=>{t.dataRange[0]===n&&t.dataRange[1]===r||(t.dataRange[0]=n,t.dataRange[1]=r,t.lookupTable.setMappingRange(t.dataRange[0],t.dataRange[1]),t.lookupTable.updateRange(),e.applyMode())},e.applyMode()}const c={mode:s.Preset,presetName:l.Preset,rgbPoints:l.RGBPoints,hsvPoints:l.HSVPoints,nodes:l.Nodes,arrayName:"No array associated",arrayLocation:"pointData",dataRange:[0,1]};function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,c,n),r.m.obj(e,t),r.m.setGet(e,t,["arrayName"]),r.m.get(e,t,["mode","lookupTable","presetName","rgbPoints","hsvPoints","nodes","dataRange"]),u(e,t),r.m.proxy(e,t)}var p={newInstance:r.m.newInstance(d,"vtkLookupTableProxy"),extend:d,Mode:s,Defaults:l}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return P}});var r=n(0),i=n(13),o=n(11);function a(e,t){t.classHierarchy.push("vtkSphereMapper")}const s={scaleArray:null,radius:.05,scaleFactor:1};function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),o.ZP.extend(e,t,n),r.m.setGet(e,t,["radius","scaleArray","scaleFactor"]),a(0,t)}var u={newInstance:r.m.newInstance(l,"vtkSphereMapper"),extend:l};function c(e,t){t.classHierarchy.push("vtkStickMapper")}const d={scaleArray:null,orientationArray:null,radius:.025,length:.1};function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),o.ZP.extend(e,t,n),r.m.setGet(e,t,["scaleArray","orientationArray","radius","length"]),c(0,t)}var f={newInstance:r.m.newInstance(p,"vtkStickMapper"),extend:p},h=n(5),m=n(4),g=n(2),v={atoms:[{id:"Xx",atomicNumber:0,mass:0,exactMass:0,radiusCovalent:0,radiusVDW:0,symbol:"Xx",name:"Dummy",elementColor:[.07,.5,.7]},{id:"H",atomicNumber:1,mass:1.00794,exactMass:1.007825032,ionization:13.5984,electronAffinity:.75420375,electronegativityPauling:2.2,nameOrigin:"Greek 'hydro' and 'gennao' for 'forms water'",radiusCovalent:.37,radiusVDW:1.2,boilingpoint:20.28,meltingpoint:14.01,periodTableBlock:"s",discoveryDate:"1766",period:"1",group:"1",electronicConfiguration:"1s1",family:"Non-Metal",symbol:"H",name:"Hydrogen",elementColor:[1,1,1],discoveryCountry:["uk"],discoverers:["C.","Cavendish"]},{id:"He",atomicNumber:2,mass:4.002602,exactMass:4.002603254,ionization:24.5874,electronAffinity:0,nameOrigin:"The Greek word for the sun was 'helios'",radiusCovalent:.32,radiusVDW:1.4,boilingpoint:4.216,meltingpoint:.95,periodTableBlock:"p",discoveryDate:"1895",period:"1",group:"8",electronicConfiguration:"1s2",family:"Noblegas",symbol:"He",name:"Helium",elementColor:[.85,1,1],discoveryCountry:["se","uk"],discoverers:["P. J. Janssen","J. N. Lockyer"]},{id:"Li",atomicNumber:3,mass:6.941,exactMass:7.01600455,ionization:5.3917,electronAffinity:.618049,electronegativityPauling:.98,nameOrigin:"Greek 'lithos' means 'stone'",radiusCovalent:1.34,radiusVDW:2.2,boilingpoint:1615,meltingpoint:453.7,periodTableBlock:"s",discoveryDate:"1817",period:"2",group:"1",electronicConfiguration:"He 2s1",family:"Alkali_Earth",symbol:"Li",name:"Lithium",elementColor:[.8,.5,1],discoveryCountry:["se"],discoverers:["A.","Arfvedson"]},{id:"Be",atomicNumber:4,mass:9.012182,exactMass:9.0121822,ionization:9.3227,electronAffinity:0,electronegativityPauling:1.57,nameOrigin:"Greek 'beryllos' for 'light-green stone'",radiusCovalent:.9,radiusVDW:1.9,boilingpoint:3243,meltingpoint:1560,periodTableBlock:"s",discoveryDate:"1797",period:"2",group:"2",electronicConfiguration:"He 2s2",family:"Alkaline_Earth",symbol:"Be",name:"Beryllium",elementColor:[.76,1,0],discoveryCountry:["fr"],discoverers:["Nicholas","Louis","Vauquelin"]},{id:"B",atomicNumber:5,mass:10.811,exactMass:11.0093054,ionization:8.298,electronAffinity:.279723,electronegativityPauling:2.04,nameOrigin:"Boron means 'Bor(ax) + (carb)on'. It is found in borax and behaves a lot like carbon",radiusCovalent:.82,radiusVDW:1.8,boilingpoint:4275,meltingpoint:2365,periodTableBlock:"p",discoveryDate:"1808",period:"2",group:"3",electronicConfiguration:"He 2s2 2p1",family:"Metalloids",symbol:"B",name:"Boron",elementColor:[1,.71,.71],discoveryCountry:["uk","fr"],discoverers:["Louis Joseph Gay-Lussac","Louis Jacques Thenard"]},{id:"C",atomicNumber:6,mass:12.0107,exactMass:12,ionization:11.2603,electronAffinity:1.262118,electronegativityPauling:2.55,nameOrigin:"Latin 'carboneum' for carbon",radiusCovalent:.77,radiusVDW:1.7,boilingpoint:5100,meltingpoint:3825,periodTableBlock:"p",discoveryDate:"0",period:"2",group:"4",electronicConfiguration:"He 2s2 2p2",family:"Non-Metal",symbol:"C",name:"Carbon",elementColor:[.5,.5,.5],discoveryCountry:["ancient"]},{id:"N",atomicNumber:7,mass:14.0067,exactMass:14.003074,ionization:14.5341,electronAffinity:-.07,electronegativityPauling:3.04,nameOrigin:"Latin 'nitrogenium' ('forms saltpeter')",radiusCovalent:.75,radiusVDW:1.6,boilingpoint:77.344,meltingpoint:63.15,periodTableBlock:"p",discoveryDate:"1772",period:"2",group:"5",electronicConfiguration:"He 2s2 2p3",family:"Non-Metal",symbol:"N",name:"Nitrogen",elementColor:[.05,.05,1],discoveryCountry:["uk"],discoverers:["D.","Rutherford"]},{id:"O",atomicNumber:8,mass:15.9994,exactMass:15.99491462,ionization:13.6181,electronAffinity:1.461112,electronegativityPauling:3.44,nameOrigin:"Latin 'oxygenium' (forms acids)",radiusCovalent:.73,radiusVDW:1.55,boilingpoint:90.188,meltingpoint:54.8,periodTableBlock:"p",discoveryDate:"1774",period:"2",group:"6",electronicConfiguration:"He 2s2 2p4",family:"Non-Metal",symbol:"O",name:"Oxygen",elementColor:[1,.05,.05],discoveryCountry:["se","uk"],discoverers:["J.","Priestley"]},{id:"F",atomicNumber:9,mass:18.9984032,exactMass:18.99840322,ionization:17.4228,electronAffinity:3.4011887,electronegativityPauling:3.98,nameOrigin:"Latin 'fluere' ('floats')",radiusCovalent:.71,radiusVDW:1.5,boilingpoint:85,meltingpoint:53.55,periodTableBlock:"p",discoveryDate:"1886",period:"2",group:"7",electronicConfiguration:"He 2s2 2p5",family:"Halogen",symbol:"F",name:"Fluorine",elementColor:[.7,1,1],discoveryCountry:["fr"],discoverers:["H.","F.","Moissan"]},{id:"Ne",atomicNumber:10,mass:20.1797,exactMass:19.99244018,ionization:21.5645,electronAffinity:0,nameOrigin:"Greek 'neo'. meaning 'new'",radiusCovalent:.69,radiusVDW:1.54,boilingpoint:27.1,meltingpoint:24.55,periodTableBlock:"p",discoveryDate:"1898",period:"2",group:"8",electronicConfiguration:"He 2s2 2p6",family:"Noblegas",symbol:"Ne",name:"Neon",elementColor:[.7,.89,.96],discoveryCountry:["uk"],discoverers:["W. Ramsay","M.W. Travers"]},{id:"Na",atomicNumber:11,mass:22.98976928,exactMass:22.98976928,ionization:5.1391,electronAffinity:.547926,electronegativityPauling:.93,nameOrigin:"Arabic 'natrun' for 'soda'",radiusCovalent:1.54,radiusVDW:2.4,boilingpoint:1156,meltingpoint:371,periodTableBlock:"s",discoveryDate:"1807",period:"3",group:"1",electronicConfiguration:"Ne 3s1",family:"Alkali_Earth",symbol:"Na",name:"Sodium",elementColor:[.67,.36,.95],discoveryCountry:["uk"],discoverers:["Sir","Humphrey","Davy"]},{id:"Mg",atomicNumber:12,mass:24.305,exactMass:23.9850417,ionization:7.6462,electronAffinity:0,electronegativityPauling:1.31,nameOrigin:"Named after the city of Magnesia",radiusCovalent:1.3,radiusVDW:2.2,boilingpoint:1380,meltingpoint:922,periodTableBlock:"s",discoveryDate:"1808",period:"3",group:"2",electronicConfiguration:"Ne 3s2",family:"Alkaline_Earth",symbol:"Mg",name:"Magnesium",elementColor:[.54,1,0],discoveryCountry:["uk"],discoverers:["H.","B.","Davy"]},{id:"Al",atomicNumber:13,mass:26.9815386,exactMass:26.98153863,ionization:5.9858,electronAffinity:.43283,electronegativityPauling:1.61,nameOrigin:"Latin 'alumen'",radiusCovalent:1.18,radiusVDW:2.1,boilingpoint:2740,meltingpoint:933.5,periodTableBlock:"p",discoveryDate:"1825",period:"3",group:"3",electronicConfiguration:"Ne 3s2 3p1",family:"Other_Metal",symbol:"Al",name:"Aluminium",elementColor:[.75,.65,.65],discoveryCountry:["dk"],discoverers:["H.","Ch.","Oersted"]},{id:"Si",atomicNumber:14,mass:28.0855,exactMass:27.97692653,ionization:8.1517,electronAffinity:1.389521,electronegativityPauling:1.9,nameOrigin:"Latin 'silex'",radiusCovalent:1.11,radiusVDW:2.1,boilingpoint:2630,meltingpoint:1683,periodTableBlock:"p",discoveryDate:"1823",period:"3",group:"4",electronicConfiguration:"Ne 3s2 3p2",family:"Metalloids",symbol:"Si",name:"Silicon",elementColor:[.5,.6,.6],discoveryCountry:["se"],discoverers:["J.","J.","Berzelius"]},{id:"P",atomicNumber:15,mass:30.973762,exactMass:30.97376163,ionization:10.4867,electronAffinity:.7465,electronegativityPauling:2.19,nameOrigin:"Greek 'phosphoros' for 'carries light'",radiusCovalent:1.06,radiusVDW:1.95,boilingpoint:553,meltingpoint:317.3,periodTableBlock:"p",discoveryDate:"1669",period:"3",group:"5",electronicConfiguration:"Ne 3s2 3p3",family:"Non-Metal",symbol:"P",name:"Phosphorus",elementColor:[1,.5,0],discoveryCountry:["de"],discoverers:["H.","Brandt"]},{id:"S",atomicNumber:16,mass:32.065,exactMass:31.972071,ionization:10.36,electronAffinity:2.0771029,electronegativityPauling:2.58,nameOrigin:"In sanskrit 'sweb' means 'to sleep'",radiusCovalent:1.02,radiusVDW:1.8,boilingpoint:717.82,meltingpoint:392.2,periodTableBlock:"p",discoveryDate:"0",period:"3",group:"6",electronicConfiguration:"Ne 3s2 3p4",family:"Non-Metal",symbol:"S",name:"Sulfur",elementColor:[1,1,.19],discoveryCountry:["ancient"]},{id:"Cl",atomicNumber:17,mass:35.453,exactMass:34.96885268,ionization:12.9676,electronAffinity:3.612724,electronegativityPauling:3.16,nameOrigin:"Greek 'chloros' for 'yellow-green'",radiusCovalent:.99,radiusVDW:1.8,boilingpoint:239.18,meltingpoint:172.17,periodTableBlock:"p",discoveryDate:"1774",period:"3",group:"7",electronicConfiguration:"Ne 3s2 3p5",family:"Halogen",symbol:"Cl",name:"Chlorine",elementColor:[.12,.94,.12],discoveryCountry:["se"],discoverers:["C.","W.","Scheele"]},{id:"Ar",atomicNumber:18,mass:39.948,exactMass:39.96238312,ionization:15.7596,electronAffinity:0,nameOrigin:"Greek 'aergon' for 'inactive'",radiusCovalent:.97,radiusVDW:1.88,boilingpoint:87.45,meltingpoint:83.95,periodTableBlock:"p",discoveryDate:"1894",period:"3",group:"8",electronicConfiguration:"Ne 3s2 3p6",family:"Noblegas",symbol:"Ar",name:"Argon",elementColor:[.5,.82,.89],discoveryCountry:["uk"],discoverers:["W. Ramsay","J. Rayleigh"]},{id:"K",atomicNumber:19,mass:39.0983,exactMass:38.96370668,ionization:4.3407,electronAffinity:.501459,electronegativityPauling:.82,nameOrigin:"Arabic 'al qaliy' for potash",radiusCovalent:1.96,radiusVDW:2.8,boilingpoint:1033,meltingpoint:336.8,periodTableBlock:"s",discoveryDate:"1807",period:"4",group:"1",electronicConfiguration:"Ar 4s1",family:"Alkali_Earth",symbol:"K",name:"Potassium",elementColor:[.56,.25,.83],discoveryCountry:["uk"],discoverers:["H.","B.","Davy"]},{id:"Ca",atomicNumber:20,mass:40.078,exactMass:39.96259098,ionization:6.1132,electronAffinity:.02455,electronegativityPauling:1,nameOrigin:"Latin 'calx' for 'lime'",radiusCovalent:1.74,radiusVDW:2.4,boilingpoint:1757,meltingpoint:1112,periodTableBlock:"s",discoveryDate:"1808",period:"4",group:"2",electronicConfiguration:"Ar 4s2",family:"Alkaline_Earth",symbol:"Ca",name:"Calcium",elementColor:[.24,1,0],discoveryCountry:["uk"],discoverers:["H.","B.","Davy"]},{id:"Sc",atomicNumber:21,mass:44.955912,exactMass:44.9559119,ionization:6.5615,electronAffinity:.188,electronegativityPauling:1.36,nameOrigin:"Named because it was found in Scandinavia",radiusCovalent:1.44,radiusVDW:2.3,boilingpoint:3109,meltingpoint:1814,periodTableBlock:"d",discoveryDate:"1879",period:"4",group:"3",electronicConfiguration:"Ar 3d1 4s2",family:"Transition",symbol:"Sc",name:"Scandium",elementColor:[.9,.9,.9],discoveryCountry:["se"],discoverers:["L.","Nilson"]},{id:"Ti",atomicNumber:22,mass:47.867,exactMass:47.9479463,ionization:6.8281,electronAffinity:.084,electronegativityPauling:1.54,nameOrigin:"The Titans were giants in Greek mythology",radiusCovalent:1.36,radiusVDW:2.15,boilingpoint:3560,meltingpoint:1935,periodTableBlock:"d",discoveryDate:"1791",period:"4",group:"4",electronicConfiguration:"Ar 3d2 4s2",family:"Transition",symbol:"Ti",name:"Titanium",elementColor:[.75,.76,.78],discoveryCountry:["uk"],discoverers:["W.","Gregor"]},{id:"V",atomicNumber:23,mass:50.9415,exactMass:50.9439595,ionization:6.7462,electronAffinity:.525,electronegativityPauling:1.63,nameOrigin:"'Vanadis' is another name for the Nordic goddess Freyja",radiusCovalent:1.25,radiusVDW:2.05,boilingpoint:3650,meltingpoint:2163,periodTableBlock:"d",discoveryDate:"1830",period:"4",group:"5",electronicConfiguration:"Ar 3d3 4s2",family:"Transition",symbol:"V",name:"Vanadium",elementColor:[.65,.65,.67],discoveryCountry:["se"],discoverers:["N.","Sefström"]},{id:"Cr",atomicNumber:24,mass:51.9961,exactMass:51.9405075,ionization:6.7665,electronAffinity:.67584,electronegativityPauling:1.66,nameOrigin:"Greek 'chroma' means 'color'",radiusCovalent:1.27,radiusVDW:2.05,boilingpoint:2945,meltingpoint:2130,periodTableBlock:"d",discoveryDate:"1797",period:"4",group:"6",electronicConfiguration:"Ar 3d5 4s1",family:"Transition",symbol:"Cr",name:"Chromium",elementColor:[.54,.6,.78],discoveryCountry:["fr"],discoverers:["Nicholas","Louis","Vauquelin"]},{id:"Mn",atomicNumber:25,mass:54.938045,exactMass:54.9380451,ionization:7.434,electronAffinity:0,electronegativityPauling:1.55,nameOrigin:"It was discovered near a town named Magnesia in black earth. Thus, it was named 'magnesia nigra', or for short, Manganese.",radiusCovalent:1.39,radiusVDW:2.05,boilingpoint:2235,meltingpoint:1518,periodTableBlock:"d",discoveryDate:"1774",period:"4",group:"7",electronicConfiguration:"Ar 3d5 4s2",family:"Transition",symbol:"Mn",name:"Manganese",elementColor:[.61,.48,.78],discoveryCountry:["se"],discoverers:["C.","W.","Scheele"]},{id:"Fe",atomicNumber:26,mass:55.845,exactMass:55.9349375,ionization:7.9024,electronAffinity:.151,electronegativityPauling:1.83,nameOrigin:"Latin 'ferrum'",radiusCovalent:1.25,radiusVDW:2.05,boilingpoint:3023,meltingpoint:1808,periodTableBlock:"d",discoveryDate:"0",period:"4",group:"8",electronicConfiguration:"Ar 3d6 4s2",family:"Transition",symbol:"Fe",name:"Iron",elementColor:[.5,.48,.78],discoveryCountry:["ancient"]},{id:"Co",atomicNumber:27,mass:58.933195,exactMass:58.933195,ionization:7.881,electronAffinity:.6633,electronegativityPauling:1.88,nameOrigin:"Named after the German word 'Kobold' for 'goblin'",radiusCovalent:1.26,radiusVDW:2,boilingpoint:3143,meltingpoint:1768,periodTableBlock:"d",discoveryDate:"1737",period:"4",group:"8",electronicConfiguration:"Ar 3d7 4s2",family:"Transition",symbol:"Co",name:"Cobalt",elementColor:[.44,.48,.78],discoveryCountry:["se"],discoverers:["G.","Brandt"]},{id:"Ni",atomicNumber:28,mass:58.6934,exactMass:57.9353429,ionization:7.6398,electronAffinity:1.15716,electronegativityPauling:1.91,nameOrigin:"'Nickel' was the name of a mountain goblin",radiusCovalent:1.21,radiusVDW:2,boilingpoint:3005,meltingpoint:1726,periodTableBlock:"d",discoveryDate:"1751",period:"4",group:"8",electronicConfiguration:"Ar 3d8 4s2",family:"Transition",symbol:"Ni",name:"Nickel",elementColor:[.36,.48,.76],discoveryCountry:["se"],discoverers:["A.","F.","Cronstedt"]},{id:"Cu",atomicNumber:29,mass:63.546,exactMass:62.9295975,ionization:7.7264,electronAffinity:1.23578,electronegativityPauling:1.9,nameOrigin:"Greek 'cuprum' for Cypres",radiusCovalent:1.38,radiusVDW:2,boilingpoint:2840,meltingpoint:1356.6,periodTableBlock:"d",discoveryDate:"0",period:"4",group:"1",electronicConfiguration:"Ar 3d10 4s1",family:"Transition",symbol:"Cu",name:"Copper",elementColor:[1,.48,.38],discoveryCountry:["ancient"]},{id:"Zn",atomicNumber:30,mass:65.38,exactMass:63.9291422,ionization:9.3942,electronAffinity:0,electronegativityPauling:1.65,nameOrigin:"German 'zinking' for 'rough', because zinc ore is very rough",radiusCovalent:1.31,radiusVDW:2.1,boilingpoint:1180,meltingpoint:692.73,periodTableBlock:"d",discoveryDate:"1746",period:"4",group:"2",electronicConfiguration:"Ar 3d10 4s2",family:"Transition",symbol:"Zn",name:"Zinc",elementColor:[.49,.5,.69],discoveryCountry:["de"],discoverers:["Andreas","Marggraf"]},{id:"Ga",atomicNumber:31,mass:69.723,exactMass:68.9255736,ionization:5.9993,electronAffinity:.41,electronegativityPauling:1.81,nameOrigin:"'Gallia' is an old name for France",radiusCovalent:1.26,radiusVDW:2.1,boilingpoint:2478,meltingpoint:302.92,periodTableBlock:"p",discoveryDate:"1875",period:"4",group:"3",electronicConfiguration:"Ar 3d10 4s2 4p1",family:"Other_Metal",symbol:"Ga",name:"Gallium",elementColor:[.76,.56,.56],discoveryCountry:["fr"],discoverers:["P.","E.","Lecoq","de","Boisbaudran"]},{id:"Ge",atomicNumber:32,mass:72.64,exactMass:73.9211778,ionization:7.8994,electronAffinity:1.232712,electronegativityPauling:2.01,nameOrigin:"Latin 'germania' is an old name for Germany",radiusCovalent:1.22,radiusVDW:2.1,boilingpoint:3107,meltingpoint:1211.5,periodTableBlock:"p",discoveryDate:"1886",period:"4",group:"4",electronicConfiguration:"Ar 3d10 4s2 4p2",family:"Metalloids",symbol:"Ge",name:"Germanium",elementColor:[.4,.56,.56],discoveryCountry:["de"],discoverers:["C.","A.","Winkler"]},{id:"As",atomicNumber:33,mass:74.9216,exactMass:74.9215965,ionization:9.7886,electronAffinity:.814,electronegativityPauling:2.18,nameOrigin:"Greek 'arsenikos' for 'male' or 'bold'",radiusCovalent:1.19,radiusVDW:2.05,boilingpoint:876,meltingpoint:1090,periodTableBlock:"p",discoveryDate:"0",period:"4",group:"5",electronicConfiguration:"Ar 3d10 4s2 4p3",family:"Metalloids",symbol:"As",name:"Arsenic",elementColor:[.74,.5,.89],discoveryCountry:["ancient"]},{id:"Se",atomicNumber:34,mass:78.96,exactMass:79.9165213,ionization:9.7524,electronAffinity:2.02067,electronegativityPauling:2.55,nameOrigin:"Greek 'selena' for 'moon'",radiusCovalent:1.16,radiusVDW:1.9,boilingpoint:958,meltingpoint:494,periodTableBlock:"p",discoveryDate:"1817",period:"4",group:"6",electronicConfiguration:"Ar 3d10 4s2 4p4",family:"Non-Metal",symbol:"Se",name:"Selenium",elementColor:[1,.63,0],discoveryCountry:["se"],discoverers:["J.","J.","Berzelius"]},{id:"Br",atomicNumber:35,mass:79.904,exactMass:78.9183371,ionization:11.8138,electronAffinity:3.363588,electronegativityPauling:2.96,nameOrigin:"Greek 'bromos' for 'smells badly'",radiusCovalent:1.14,radiusVDW:1.9,boilingpoint:331.85,meltingpoint:265.95,periodTableBlock:"p",discoveryDate:"1826",period:"4",group:"7",electronicConfiguration:"Ar 3d10 4s2 4p5",family:"Halogen",symbol:"Br",name:"Bromine",elementColor:[.65,.16,.16],discoveryCountry:["fr"],discoverers:["A.","J.","Balard"]},{id:"Kr",atomicNumber:36,mass:83.798,exactMass:83.911507,ionization:13.9996,electronAffinity:0,electronegativityPauling:3,nameOrigin:"Greek 'kryptos' for 'hidden'",radiusCovalent:1.1,radiusVDW:2.02,boilingpoint:120.85,meltingpoint:116,periodTableBlock:"p",discoveryDate:"1898",period:"4",group:"8",electronicConfiguration:"Ar 3d10 4s2 4p6",family:"Noblegas",symbol:"Kr",name:"Krypton",elementColor:[.36,.72,.82],discoveryCountry:["uk"],discoverers:["W. Ramsay","M. W. Travers"]},{id:"Rb",atomicNumber:37,mass:85.4678,exactMass:84.91178974,ionization:4.1771,electronAffinity:.485916,electronegativityPauling:.82,nameOrigin:"Latin 'rubidus' for 'dark red'",radiusCovalent:2.11,radiusVDW:2.9,boilingpoint:961,meltingpoint:312.63,periodTableBlock:"s",discoveryDate:"1861",period:"5",group:"1",electronicConfiguration:"Kr 5s1",family:"Alkali_Earth",symbol:"Rb",name:"Rubidium",elementColor:[.44,.18,.69],discoveryCountry:["de"],discoverers:["Robert W. Bunsen","Gustav R. Kirchhoff"]},{id:"Sr",atomicNumber:38,mass:87.62,exactMass:87.9056121,ionization:5.6949,electronAffinity:.05206,electronegativityPauling:.95,nameOrigin:"Named after the mineral Strontianit",radiusCovalent:1.92,radiusVDW:2.55,boilingpoint:1655,meltingpoint:1042,periodTableBlock:"s",discoveryDate:"1790",period:"5",group:"2",electronicConfiguration:"Kr 5s2",family:"Alkaline_Earth",symbol:"Sr",name:"Strontium",elementColor:[0,1,0],discoveryCountry:["uk"],discoverers:["H.","B.","Davy"]},{id:"Y",atomicNumber:39,mass:88.90585,exactMass:88.9058483,ionization:6.2173,electronAffinity:.307,electronegativityPauling:1.22,nameOrigin:"Named after the small town of Ytterby near Stockholm in Sweden. Terbium. Ytterbium and Gadolinium are also named after this town.",radiusCovalent:1.62,radiusVDW:2.4,boilingpoint:3611,meltingpoint:1795,periodTableBlock:"d",discoveryDate:"1794",period:"5",group:"3",electronicConfiguration:"Kr 4d1 5s2",family:"Transition",symbol:"Y",name:"Yttrium",elementColor:[.58,1,1],discoveryCountry:["fi"],discoverers:["Johann","Gadolin"]},{id:"Zr",atomicNumber:40,mass:91.224,exactMass:89.9047044,ionization:6.6339,electronAffinity:.426,electronegativityPauling:1.33,nameOrigin:"Named after the mineral zircon",radiusCovalent:1.48,radiusVDW:2.3,boilingpoint:4682,meltingpoint:2128,periodTableBlock:"d",discoveryDate:"1789",period:"5",group:"4",electronicConfiguration:"Kr 4d2 5s2",family:"Transition",symbol:"Zr",name:"Zirconium",elementColor:[.58,.88,.88],discoveryCountry:["de"],discoverers:["Martin","Heinrich","Klaproth"]},{id:"Nb",atomicNumber:41,mass:92.90638,exactMass:92.9063781,ionization:6.7589,electronAffinity:.893,electronegativityPauling:1.6,nameOrigin:"Named after Niobe, the daughter of the Greek god Tantalus.",radiusCovalent:1.37,radiusVDW:2.15,boilingpoint:5015,meltingpoint:2742,periodTableBlock:"d",discoveryDate:"1801",period:"5",group:"5",electronicConfiguration:"Kr 4d4",family:"Transition",symbol:"Nb",name:"Niobium",elementColor:[.45,.76,.79],discoveryCountry:["uk"],discoverers:["Ch.","Hatchett"]},{id:"Mo",atomicNumber:42,mass:95.96,exactMass:97.9054082,ionization:7.0924,electronAffinity:.7472,electronegativityPauling:2.16,nameOrigin:"This name has Greek roots. It means 'like Platinum' - it was difficult to distinguish Molybdenum from Platinum.",radiusCovalent:1.45,radiusVDW:2.1,boilingpoint:4912,meltingpoint:2896,periodTableBlock:"d",discoveryDate:"1778",period:"5",group:"6",electronicConfiguration:"Kr 4d5 5s1",family:"Transition",symbol:"Mo",name:"Molybdenum",elementColor:[.33,.71,.71],discoveryCountry:["se"],discoverers:["C.","W.","Scheele"]},{id:"Tc",atomicNumber:43,mass:98,exactMass:97.907216,ionization:7.28,electronAffinity:.55,electronegativityPauling:1.9,nameOrigin:"Greek 'technetos' for artificial",radiusCovalent:1.56,radiusVDW:2.05,boilingpoint:4538,meltingpoint:2477,periodTableBlock:"d",discoveryDate:"1937",period:"5",group:"7",electronicConfiguration:"Kr 4d6 5s1",family:"Transition",symbol:"Tc",name:"Technetium",elementColor:[.23,.62,.62],discoveryCountry:["it"],discoverers:["C. Perrier","E. G. Segre"]},{id:"Ru",atomicNumber:44,mass:101.07,exactMass:101.9043493,ionization:7.3605,electronAffinity:1.04638,electronegativityPauling:2.2,nameOrigin:"Ruthenia is the old name of Russia",radiusCovalent:1.26,radiusVDW:2.05,boilingpoint:4425,meltingpoint:2610,periodTableBlock:"d",discoveryDate:"1844",period:"5",group:"8",electronicConfiguration:"Kr 4d7 5s1",family:"Transition",symbol:"Ru",name:"Ruthenium",elementColor:[.14,.56,.56],discoveryCountry:["ru"],discoverers:["K.","Klaus"]},{id:"Rh",atomicNumber:45,mass:102.9055,exactMass:102.905504,ionization:7.4589,electronAffinity:1.14289,electronegativityPauling:2.28,nameOrigin:"Greek 'rhodeos' means 'red like a rose'",radiusCovalent:1.35,radiusVDW:2,boilingpoint:3970,meltingpoint:2236,periodTableBlock:"d",discoveryDate:"1803",period:"5",group:"8",electronicConfiguration:"Kr 4d8 5s1",family:"Transition",symbol:"Rh",name:"Rhodium",elementColor:[.04,.49,.55],discoveryCountry:["uk"],discoverers:["W.","Wollaston"]},{id:"Pd",atomicNumber:46,mass:106.42,exactMass:105.903486,ionization:8.3369,electronAffinity:.56214,electronegativityPauling:2.2,nameOrigin:"Named after the asteroid Pallas",radiusCovalent:1.31,radiusVDW:2.05,boilingpoint:3240,meltingpoint:1825,periodTableBlock:"d",discoveryDate:"1803",period:"5",group:"8",electronicConfiguration:"Kr 4d10",family:"Transition",symbol:"Pd",name:"Palladium",elementColor:[0,.41,.52],discoveryCountry:["uk"]},{id:"Ag",atomicNumber:47,mass:107.8682,exactMass:106.905097,ionization:7.5762,electronAffinity:1.30447,electronegativityPauling:1.93,nameOrigin:"Latin 'argentum' for silver",radiusCovalent:1.53,radiusVDW:2.1,boilingpoint:2436,meltingpoint:1235.1,periodTableBlock:"d",discoveryDate:"0",period:"5",group:"1",electronicConfiguration:"Kr 4d10 5s1",family:"Transition",symbol:"Ag",name:"Silver",elementColor:[.88,.88,1],discoveryCountry:["ancient"]},{id:"Cd",atomicNumber:48,mass:112.411,exactMass:113.9033585,ionization:8.9938,electronAffinity:0,electronegativityPauling:1.69,nameOrigin:"Greek 'kadmia' ('Galmei' = Zinc carbonate)",radiusCovalent:1.48,radiusVDW:2.2,boilingpoint:1040,meltingpoint:594.26,periodTableBlock:"d",discoveryDate:"1817",period:"5",group:"2",electronicConfiguration:"Kr 4d10 5s2",family:"Transition",symbol:"Cd",name:"Cadmium",elementColor:[1,.85,.56],discoveryCountry:["de"],discoverers:["F.","Stromeyer"]},{id:"In",atomicNumber:49,mass:114.818,exactMass:114.903878,ionization:5.7864,electronAffinity:.404,electronegativityPauling:1.78,nameOrigin:"Named after 'Indigo' because of its blue spectrum",radiusCovalent:1.44,radiusVDW:2.2,boilingpoint:2350,meltingpoint:429.78,periodTableBlock:"p",discoveryDate:"1863",period:"5",group:"3",electronicConfiguration:"Kr 4d10 5s2 5p1",family:"Other_Metal",symbol:"In",name:"Indium",elementColor:[.65,.46,.45],discoveryCountry:["de"],discoverers:["F. Reich","H.T. Richter"]},{id:"Sn",atomicNumber:50,mass:118.71,exactMass:119.9021947,ionization:7.3439,electronAffinity:1.112066,electronegativityPauling:1.96,nameOrigin:"Latin 'stannum' for tin",radiusCovalent:1.41,radiusVDW:2.25,boilingpoint:2876,meltingpoint:505.12,periodTableBlock:"p",discoveryDate:"0",period:"5",group:"4",electronicConfiguration:"Kr 4d10 5s2 5p2",family:"Other_Metal",symbol:"Sn",name:"Tin",elementColor:[.4,.5,.5],discoveryCountry:["ancient"]},{id:"Sb",atomicNumber:51,mass:121.76,exactMass:120.9038157,ionization:8.6084,electronAffinity:1.047401,electronegativityPauling:2.05,nameOrigin:"Arabic 'anthos ammonos' for 'blossom of the god Ammon'",radiusCovalent:1.38,radiusVDW:2.2,boilingpoint:1860,meltingpoint:903.91,periodTableBlock:"p",discoveryDate:"0",period:"5",group:"5",electronicConfiguration:"Kr 4d10 5s2 5p3",family:"Metalloids",symbol:"Sb",name:"Antimony",elementColor:[.62,.39,.71],discoveryCountry:["ancient"]},{id:"Te",atomicNumber:52,mass:127.6,exactMass:129.9062244,ionization:9.0096,electronAffinity:1.970875,electronegativityPauling:2.1,nameOrigin:"Latin 'tellus' or 'telluris' for 'Planet Earth'",radiusCovalent:1.35,radiusVDW:2.1,boilingpoint:1261,meltingpoint:722.72,periodTableBlock:"p",discoveryDate:"1782",period:"5",group:"6",electronicConfiguration:"Kr 4d10 5s2 5p4",family:"Metalloids",symbol:"Te",name:"Tellurium",elementColor:[.83,.48,0],discoveryCountry:["de"],discoverers:["Franz","Joseph","Muller","von","Reichstein"]},{id:"I",atomicNumber:53,mass:126.90447,exactMass:126.904473,ionization:10.4513,electronAffinity:3.059038,electronegativityPauling:2.66,nameOrigin:"Greek 'ioeides' for 'violet'.",radiusCovalent:1.33,radiusVDW:2.1,boilingpoint:457.5,meltingpoint:386.7,periodTableBlock:"p",discoveryDate:"1811",period:"5",group:"7",electronicConfiguration:"Kr 4d10 5s2 5p5",family:"Halogen",symbol:"I",name:"Iodine",elementColor:[.58,0,.58],discoveryCountry:["fr"],discoverers:["Bernard","Courtois"]},{id:"Xe",atomicNumber:54,mass:131.293,exactMass:131.9041535,ionization:12.1298,electronAffinity:0,electronegativityPauling:2.6,nameOrigin:"Greek 'xenos' for 'foreigner'",radiusCovalent:1.3,radiusVDW:2.16,boilingpoint:165.1,meltingpoint:161.39,periodTableBlock:"p",discoveryDate:"1898",period:"5",group:"8",electronicConfiguration:"Kr 4d10 5s2 5p6",family:"Noblegas",symbol:"Xe",name:"Xenon",elementColor:[.26,.62,.69],discoveryCountry:["uk"],discoverers:["W. Ramsay","M. W. Travers"]},{id:"Cs",atomicNumber:55,mass:132.9054519,exactMass:132.9054519,ionization:3.8939,electronAffinity:.471626,electronegativityPauling:.79,nameOrigin:"Latin 'caesius' for 'heaven blue'.",radiusCovalent:2.25,radiusVDW:3,boilingpoint:944,meltingpoint:301.54,periodTableBlock:"s",discoveryDate:"1860",period:"6",group:"1",electronicConfiguration:"Xe 6s1",family:"Alkali_Earth",symbol:"Cs",name:"Caesium",elementColor:[.34,.09,.56],discoveryCountry:["de"],discoverers:["Robert Wilhelm Bunsen","Gustav Robert Kirchhoff"]},{id:"Ba",atomicNumber:56,mass:137.327,exactMass:137.9052472,ionization:5.2117,electronAffinity:.14462,electronegativityPauling:.89,nameOrigin:"Greek 'barys' for 'heavy'",radiusCovalent:1.98,radiusVDW:2.7,boilingpoint:2078,meltingpoint:1002,periodTableBlock:"s",discoveryDate:"1808",period:"6",group:"2",electronicConfiguration:"Xe 6s2",family:"Alkaline_Earth",symbol:"Ba",name:"Barium",elementColor:[0,.79,0],discoveryCountry:["uk"],discoverers:["Humphry","Bartholomew","Davy"]},{id:"La",atomicNumber:57,mass:138.90547,exactMass:138.9063533,ionization:5.5769,electronAffinity:.47,electronegativityPauling:1.1,nameOrigin:"Greek 'lanthanein' for 'hidden'. The Lanthanoids are also called the 'rare earth' elements.",radiusCovalent:1.69,radiusVDW:2.5,boilingpoint:3737,meltingpoint:1191,periodTableBlock:"f",discoveryDate:"1839",period:"6",group:"3",electronicConfiguration:"Xe 5d1 6s2",family:"Rare_Earth",symbol:"La",name:"Lanthanum",elementColor:[.44,.83,1],discoveryCountry:["se"],discoverers:["K.","G.","Mosander"]},{id:"Ce",atomicNumber:58,mass:140.116,exactMass:139.9054387,ionization:5.5387,electronAffinity:.5,electronegativityPauling:1.12,nameOrigin:"Named after the planetoid Ceres",radiusVDW:2.48,boilingpoint:3715,meltingpoint:1071,periodTableBlock:"f",discoveryDate:"1803",period:"6",group:"4",electronicConfiguration:"Xe 4f1 5d1 6s2",family:"Rare_Earth",symbol:"Ce",name:"Cerium",elementColor:[1,1,.78],discoverers:["Jöns Jacob Berzelius","W. Hisinger","M. Klaproth"]},{id:"Pr",atomicNumber:59,mass:140.90765,exactMass:140.9076528,ionization:5.473,electronAffinity:.5,electronegativityPauling:1.13,nameOrigin:"Greek 'prasinos didymos' for 'green twin'",radiusVDW:2.47,boilingpoint:3785,meltingpoint:1204,periodTableBlock:"f",discoveryDate:"1885",period:"6",group:"5",electronicConfiguration:"Xe 4f3 6s2",family:"Rare_Earth",symbol:"Pr",name:"Praseodymium",elementColor:[.85,1,.78],discoverers:["Carl","F.","Auer","von","Welsbach"]},{id:"Nd",atomicNumber:60,mass:144.242,exactMass:141.9077233,ionization:5.525,electronAffinity:.5,electronegativityPauling:1.14,nameOrigin:"Greek 'neos didymos' for 'new twin'",radiusVDW:2.45,boilingpoint:3347,meltingpoint:1294,periodTableBlock:"f",discoveryDate:"1885",period:"6",group:"6",electronicConfiguration:"Xe 4f4 6s2",family:"Rare_Earth",symbol:"Nd",name:"Neodymium",elementColor:[.78,1,.78],discoverers:["Carl","F.","Auer","von","Welsbach"]},{id:"Pm",atomicNumber:61,mass:145,exactMass:144.912749,ionization:5.582,electronAffinity:.5,nameOrigin:"Named after the Greek Prometheus. Prometheus stole the fire from the gods and gave it to mankind.",radiusVDW:2.43,boilingpoint:3273,meltingpoint:1315,periodTableBlock:"f",discoveryDate:"1945",period:"6",group:"7",electronicConfiguration:"Xe 4f5 6s2",family:"Rare_Earth",symbol:"Pm",name:"Promethium",elementColor:[.64,1,.78],discoverers:["J. A. Marinsky","C. D. Coryell","L. E. Glendenin"]},{id:"Sm",atomicNumber:62,mass:150.36,exactMass:151.9197324,ionization:5.6437,electronAffinity:.5,electronegativityPauling:1.17,nameOrigin:"Named after the mineral Samarskit",radiusVDW:2.42,boilingpoint:2067,meltingpoint:1347,periodTableBlock:"f",discoveryDate:"1879",period:"6",group:"8",electronicConfiguration:"Xe 4f6 6s2",family:"Rare_Earth",symbol:"Sm",name:"Samarium",elementColor:[.56,1,.78],discoverers:["P.","Lecoq","de","Boisbaudran"]},{id:"Eu",atomicNumber:63,mass:151.964,exactMass:152.9212303,ionization:5.6704,electronAffinity:.5,nameOrigin:"Named after Europe",radiusVDW:2.4,boilingpoint:1800,meltingpoint:1095,periodTableBlock:"f",discoveryDate:"1901",period:"6",group:"8",electronicConfiguration:"Xe 4f7 6s2",family:"Rare_Earth",symbol:"Eu",name:"Europium",elementColor:[.38,1,.78],discoverers:["E.","A.","Demarcay"]},{id:"Gd",atomicNumber:64,mass:157.25,exactMass:157.9241039,ionization:6.1498,electronAffinity:.5,electronegativityPauling:1.2,nameOrigin:"Named after the Finnish chemist Johan Gadolin",radiusVDW:2.38,boilingpoint:3545,meltingpoint:1585,periodTableBlock:"f",discoveryDate:"1880",period:"6",group:"8",electronicConfiguration:"Xe 4f7 5d1 6s2",family:"Rare_Earth",symbol:"Gd",name:"Gadolinium",elementColor:[.27,1,.78],discoverers:["Jean","de","Marignac"]},{id:"Tb",atomicNumber:65,mass:158.92535,exactMass:158.9253468,ionization:5.8638,electronAffinity:.5,nameOrigin:"Named after the Swedish town of Ytterby",radiusVDW:2.37,boilingpoint:3500,meltingpoint:1629,periodTableBlock:"f",discoveryDate:"1843",period:"6",group:"1",electronicConfiguration:"Xe 4f9 6s2",family:"Rare_Earth",symbol:"Tb",name:"Terbium",elementColor:[.19,1,.78],discoverers:["K.","G.","Mosander"]},{id:"Dy",atomicNumber:66,mass:162.5,exactMass:163.9291748,ionization:5.9389,electronAffinity:.5,electronegativityPauling:1.22,nameOrigin:"Greek 'dysprositor' for 'difficult to reach'",radiusVDW:2.35,boilingpoint:2840,meltingpoint:1685,periodTableBlock:"f",discoveryDate:"1886",period:"6",group:"2",electronicConfiguration:"Xe 4f10 6s2",family:"Rare_Earth",symbol:"Dy",name:"Dysprosium",elementColor:[.12,1,.78],discoverers:["F.","E.","Lecoq","de","Boisbaudran"]},{id:"Ho",atomicNumber:67,mass:164.93032,exactMass:164.9303221,ionization:6.0215,electronAffinity:.5,electronegativityPauling:1.23,nameOrigin:"Latin 'holmia' for the old name of Stockholm",radiusVDW:2.33,boilingpoint:2968,meltingpoint:1747,periodTableBlock:"f",discoveryDate:"1878",period:"6",group:"3",electronicConfiguration:"Xe 4f11 6s2",family:"Rare_Earth",symbol:"Ho",name:"Holmium",elementColor:[0,1,.61],discoverers:["J. L. Soret","P.T. Cleve"]},{id:"Er",atomicNumber:68,mass:167.259,exactMass:165.9302931,ionization:6.1077,electronAffinity:.5,electronegativityPauling:1.24,nameOrigin:"Named ofter the Swedish town of Ytterby. Terbium and Ytterbium are also named after this town.",radiusVDW:2.32,boilingpoint:3140,meltingpoint:1802,periodTableBlock:"f",discoveryDate:"1843",period:"6",group:"4",electronicConfiguration:"Xe 4f12 6s2",family:"Rare_Earth",symbol:"Er",name:"Erbium",elementColor:[0,.9,.46],discoverers:["K.","G.","Mosander"]},{id:"Tm",atomicNumber:69,mass:168.93421,exactMass:168.9342133,ionization:6.1843,electronAffinity:.5,electronegativityPauling:1.25,nameOrigin:"Named after the old name of Scandinavia, 'Thule'.",radiusVDW:2.3,boilingpoint:2223,meltingpoint:1818,periodTableBlock:"f",discoveryDate:"1879",period:"6",group:"5",electronicConfiguration:"Xe 4f13 6s2",family:"Rare_Earth",symbol:"Tm",name:"Thulium",elementColor:[0,.83,.32],discoverers:["P.","T.","Cleve"]},{id:"Yb",atomicNumber:70,mass:173.054,exactMass:173.9388621,ionization:6.2542,electronAffinity:.5,nameOrigin:"Like Terbium and Gadolinium, this is named after the Swedish town of Ytterby.",radiusVDW:2.28,boilingpoint:1469,meltingpoint:1092,periodTableBlock:"f",discoveryDate:"1878",period:"6",group:"6",electronicConfiguration:"Xe 4f14 6s2",family:"Rare_Earth",symbol:"Yb",name:"Ytterbium",elementColor:[0,.75,.22],discoverers:["J.","Ch.","Marignac"]},{id:"Lu",atomicNumber:71,mass:174.9668,exactMass:174.9407718,ionization:5.4259,electronAffinity:.5,electronegativityPauling:1.27,nameOrigin:"Named after the Roman name 'Lutetia' for Paris",radiusCovalent:1.6,radiusVDW:2.27,boilingpoint:3668,meltingpoint:1936,periodTableBlock:"f",discoveryDate:"1907",period:"6",group:"7",electronicConfiguration:"Xe 4f14 5d1 6s2",family:"Rare_Earth",symbol:"Lu",name:"Lutetium",elementColor:[0,.67,.14],discoverers:["Carl F. Auer von Welsbach","G. Urbain"]},{id:"Hf",atomicNumber:72,mass:178.49,exactMass:179.94655,ionization:6.8251,electronAffinity:0,electronegativityPauling:1.3,nameOrigin:"'Hafnia' is the old name of Kopenhagen (Denmark)",radiusCovalent:1.5,radiusVDW:2.25,boilingpoint:4875,meltingpoint:2504,periodTableBlock:"d",discoveryDate:"1923",period:"6",group:"4",electronicConfiguration:"Xe 4f14 5d2 6s2",family:"Transition",symbol:"Hf",name:"Hafnium",elementColor:[.3,.76,1],discoveryCountry:["dk"],discoverers:["D. Coster","G. Hevesy"]},{id:"Ta",atomicNumber:73,mass:180.94788,exactMass:180.9479958,ionization:7.5496,electronAffinity:.322,electronegativityPauling:1.5,nameOrigin:"Named after the Greek myth of Tantalos",radiusCovalent:1.38,radiusVDW:2.2,boilingpoint:5730,meltingpoint:3293,periodTableBlock:"d",discoveryDate:"1802",period:"6",group:"5",electronicConfiguration:"Xe 4f14 5d3 6s2",family:"Transition",symbol:"Ta",name:"Tantalum",elementColor:[.3,.65,1],discoveryCountry:["se"],discoverers:["A.","Ekeberg"]},{id:"W",atomicNumber:74,mass:183.84,exactMass:183.9509312,ionization:7.864,electronAffinity:.815,electronegativityPauling:2.36,nameOrigin:"'tung sten' means 'heavy stone' in Swedish. The old name (and thus the symbol 'W') was Wolfram, named after a mineral.",radiusCovalent:1.46,radiusVDW:2.1,boilingpoint:5825,meltingpoint:3695,periodTableBlock:"d",discoveryDate:"1783",period:"6",group:"6",electronicConfiguration:"Xe 4f14 5d4 6s2",family:"Transition",symbol:"W",name:"Tungsten",elementColor:[.13,.58,.84],discoveryCountry:["es"],discoverers:["C.","W.","Scheele"]},{id:"Re",atomicNumber:75,mass:186.207,exactMass:186.9557531,ionization:7.8335,electronAffinity:.15,electronegativityPauling:1.9,nameOrigin:"Named after the German river Rhine (latin 'Rhenium').",radiusCovalent:1.59,radiusVDW:2.05,boilingpoint:5870,meltingpoint:3455,periodTableBlock:"d",discoveryDate:"1925",period:"6",group:"7",electronicConfiguration:"Xe 4f14 5d5 6s2",family:"Transition",symbol:"Re",name:"Rhenium",elementColor:[.15,.49,.67],discoveryCountry:["de"],discoverers:["Walter Noddack","Ida Tacke-Noddack","Otto Berg"]},{id:"Os",atomicNumber:76,mass:190.23,exactMass:191.9614807,ionization:8.4382,electronAffinity:1.0778,electronegativityPauling:2.2,nameOrigin:"Greek for 'smell'. Its oxides smell strongly like radishes.",radiusCovalent:1.28,radiusVDW:2,boilingpoint:5300,meltingpoint:3300,periodTableBlock:"d",discoveryDate:"1804",period:"6",group:"8",electronicConfiguration:"Xe 4f14 5d6 6s2",family:"Transition",symbol:"Os",name:"Osmium",elementColor:[.15,.4,.59],discoveryCountry:["uk"],discoverers:["S.","Tennant"]},{id:"Ir",atomicNumber:77,mass:192.217,exactMass:192.9629264,ionization:8.967,electronAffinity:1.56436,electronegativityPauling:2.2,nameOrigin:"Greek 'iris' for 'rainbow'",radiusCovalent:1.37,radiusVDW:2,boilingpoint:4700,meltingpoint:2720,periodTableBlock:"d",discoveryDate:"1804",period:"6",group:"8",electronicConfiguration:"Xe 4f14 5d7 6s2",family:"Transition",symbol:"Ir",name:"Iridium",elementColor:[.09,.33,.53],discoveryCountry:["uk"],discoverers:["S.","Tennant"]},{id:"Pt",atomicNumber:78,mass:195.084,exactMass:194.9647911,ionization:8.9588,electronAffinity:2.1251,electronegativityPauling:2.28,nameOrigin:"Spanish 'platina' means 'small silver'",radiusCovalent:1.28,radiusVDW:2.05,boilingpoint:4100,meltingpoint:2042.1,periodTableBlock:"d",discoveryDate:"1735",period:"6",group:"8",electronicConfiguration:"Xe 4f14 5d9 6s1",family:"Transition",symbol:"Pt",name:"Platinum",elementColor:[.96,.93,.82],discoveryCountry:["uk"],discoverers:["A.","de","Ulloa"]},{id:"Au",atomicNumber:79,mass:196.966569,exactMass:196.9665687,ionization:9.2255,electronAffinity:2.30861,electronegativityPauling:2.54,nameOrigin:"Latin 'aurum'. Named after Aurora, the goddess of sunrise",radiusCovalent:1.44,radiusVDW:2.1,boilingpoint:3130,meltingpoint:1337.58,periodTableBlock:"d",discoveryDate:"0",period:"6",group:"1",electronicConfiguration:"Xe 4f14 5d10 6s1",family:"Transition",symbol:"Au",name:"Gold",elementColor:[.8,.82,.12],discoveryCountry:["ancient"]},{id:"Hg",atomicNumber:80,mass:200.59,exactMass:201.970643,ionization:10.4375,electronAffinity:0,electronegativityPauling:2,nameOrigin:"Graeco-Latin 'hydrargyrum' for 'liquid silver'",radiusCovalent:1.49,radiusVDW:2.05,boilingpoint:629.88,meltingpoint:234.31,periodTableBlock:"d",discoveryDate:"0",period:"6",group:"2",electronicConfiguration:"Xe 4f14 5d10 6s2",family:"Transition",symbol:"Hg",name:"Mercury",elementColor:[.71,.71,.76],discoveryCountry:["ancient"]},{id:"Tl",atomicNumber:81,mass:204.3833,exactMass:204.9744275,ionization:6.1082,electronAffinity:.377,electronegativityPauling:1.62,nameOrigin:"Greek 'tallos' for 'young twig'",radiusCovalent:1.48,radiusVDW:2.2,boilingpoint:1746,meltingpoint:577,periodTableBlock:"p",discoveryDate:"1861",period:"6",group:"3",electronicConfiguration:"Xe 4f14 5d10 6s2 6p1",family:"Other_Metal",symbol:"Tl",name:"Thallium",elementColor:[.65,.33,.3],discoveryCountry:["uk"],discoverers:["W.","Crookes"]},{id:"Pb",atomicNumber:82,mass:207.2,exactMass:207.9766521,ionization:7.4167,electronAffinity:.364,electronegativityPauling:2.33,nameOrigin:"Latin 'plumbum' for Lead",radiusCovalent:1.47,radiusVDW:2.3,boilingpoint:2023,meltingpoint:600.65,periodTableBlock:"p",discoveryDate:"0",period:"6",group:"4",electronicConfiguration:"Xe 4f14 5d10 6s2 6p2",family:"Other_Metal",symbol:"Pb",name:"Lead",elementColor:[.34,.35,.38],discoveryCountry:["ancient"]},{id:"Bi",atomicNumber:83,mass:208.9804,exactMass:208.9803987,ionization:7.2855,electronAffinity:.942363,electronegativityPauling:2.02,nameOrigin:"The old name of Bismuth is 'Wismut', which stood for 'white mass'.",radiusCovalent:1.46,radiusVDW:2.3,boilingpoint:1837,meltingpoint:544.59,periodTableBlock:"p",discoveryDate:"0",period:"6",group:"5",electronicConfiguration:"Xe 4f14 5d10 6s2 6p3",family:"Other_Metal",symbol:"Bi",name:"Bismuth",elementColor:[.62,.31,.71],discoveryCountry:["ancient"]},{id:"Po",atomicNumber:84,mass:209,exactMass:208.9824304,ionization:8.414,electronAffinity:1.9,electronegativityPauling:2,nameOrigin:"Named after Poland to honor Marie Curie",radiusVDW:2,meltingpoint:527,periodTableBlock:"p",discoveryDate:"1898",period:"6",group:"6",electronicConfiguration:"Xe 4f14 5d10 6s2 6p4",family:"Metalloids",symbol:"Po",name:"Polonium",elementColor:[.67,.36,0],discoveryCountry:["fr"],discoverers:["M. Sklodowska-Curie","P. Curie"]},{id:"At",atomicNumber:85,mass:210,exactMass:209.987148,ionization:0,electronAffinity:2.8,electronegativityPauling:2.2,nameOrigin:"Greek 'astator' for 'changing'",radiusVDW:2,boilingpoint:610,meltingpoint:575,periodTableBlock:"p",discoveryDate:"1940",period:"6",group:"7",electronicConfiguration:"Xe 4f14 5d10 6s2 6p5",family:"Halogen",symbol:"At",name:"Astatine",elementColor:[.46,.31,.27],discoveryCountry:["us"],discoverers:["D. R. Corson","K. R. McKenzie","E. Segre"]},{id:"Rn",atomicNumber:86,mass:222,exactMass:222.0175777,ionization:10.7485,electronAffinity:0,nameOrigin:"Named after Radium. It ends with 'on' to make it clear that it is a noble gas.",radiusCovalent:1.45,radiusVDW:2,boilingpoint:211.4,meltingpoint:202,periodTableBlock:"p",discoveryDate:"1898",period:"6",group:"8",electronicConfiguration:"Xe 4f14 5d10 6s2 6p6",family:"Noblegas",symbol:"Rn",name:"Radon",elementColor:[.26,.51,.59],discoveryCountry:["de"],discoverers:["E.","Dorn"]},{id:"Fr",atomicNumber:87,mass:223,exactMass:223.0197359,ionization:4.0727,electronegativityPauling:.7,nameOrigin:"Named after France to honor Marguerite Perey",radiusVDW:2,boilingpoint:950,meltingpoint:300,periodTableBlock:"s",discoveryDate:"1939",period:"7",group:"1",electronicConfiguration:"Rn 7s1",family:"Alkali_Earth",symbol:"Fr",name:"Francium",elementColor:[.26,0,.4],discoveryCountry:["fr"],discoverers:["M.","Perey"]},{id:"Ra",atomicNumber:88,mass:226,exactMass:226.0254098,ionization:5.2784,electronegativityPauling:.9,nameOrigin:"Latin 'radius' for 'beam', as it is radioactive",radiusVDW:2,boilingpoint:1413,meltingpoint:973,periodTableBlock:"s",discoveryDate:"1898",period:"7",group:"2",electronicConfiguration:"Rn 7s2",family:"Alkaline_Earth",symbol:"Ra",name:"Radium",elementColor:[0,.49,0],discoveryCountry:["fr"],discoverers:["M. Sklodowska-Curie","P. Curie"]},{id:"Ac",atomicNumber:89,mass:227,exactMass:227.0277521,ionization:5.17,electronegativityPauling:1.1,nameOrigin:"Greek 'aktis' for 'beam' - actinium is radioactive",radiusVDW:2,boilingpoint:3470,meltingpoint:1324,periodTableBlock:"f",discoveryDate:"1899",period:"7",group:"3",electronicConfiguration:"Rn 6d1 7s2",family:"Other_Metal",symbol:"Ac",name:"Actinium",elementColor:[.44,.67,.98],discoveryCountry:["fr"],discoverers:["A.","L.","Debierne"]},{id:"Th",atomicNumber:90,mass:232.03806,exactMass:232.0380553,ionization:6.3067,electronegativityPauling:1.3,nameOrigin:"Named after the German god of thunder: Thor",radiusVDW:2.4,boilingpoint:5060,meltingpoint:2028,periodTableBlock:"f",discoveryDate:"1828",period:"7",group:"4",electronicConfiguration:"Rn 6d2 7s2",family:"Other_Metal",symbol:"Th",name:"Thorium",elementColor:[0,.73,1],discoverers:["J.","J.","Berzelius"]},{id:"Pa",atomicNumber:91,mass:231.03588,exactMass:231.035884,ionization:5.89,electronegativityPauling:1.5,nameOrigin:"Greek 'protos' for 'ancester'. Protactinium is before Actinium in the periodic table.",radiusVDW:2,boilingpoint:4300,meltingpoint:1845,periodTableBlock:"f",discoveryDate:"1917",period:"7",group:"5",electronicConfiguration:"Rn 5f2 6d1 7s2",family:"Other_Metal",symbol:"Pa",name:"Protactinium",elementColor:[0,.63,1],discoverers:["O. Hahn","L. Meitern","W. Wollaston"]},{id:"U",atomicNumber:92,mass:238.02891,exactMass:238.0507882,ionization:6.1941,electronegativityPauling:1.38,nameOrigin:"Greek 'ouranos' for 'heaven'. Named after the planet Uranus.",radiusVDW:2.3,boilingpoint:4407,meltingpoint:1408,periodTableBlock:"f",discoveryDate:"1789",period:"7",group:"6",electronicConfiguration:"Rn 5f3 6d1 7s2",family:"Other_Metal",symbol:"U",name:"Uranium",elementColor:[0,.56,1],discoverers:["M.","M.","Klaproth"]},{id:"Np",atomicNumber:93,mass:237,exactMass:237.0481734,ionization:6.2657,electronegativityPauling:1.36,nameOrigin:"Named after the planet Neptune.",radiusVDW:2,boilingpoint:4175,meltingpoint:912,periodTableBlock:"f",discoveryDate:"1940",period:"7",group:"7",electronicConfiguration:"Rn 5f4 6d1 7s2",family:"Other_Metal",symbol:"Np",name:"Neptunium",elementColor:[0,.5,1],discoverers:["E. M. McMillan","P. Aberson"]},{id:"Pu",atomicNumber:94,mass:244,exactMass:244.064204,ionization:6.026,electronegativityPauling:1.28,nameOrigin:"Named after the planet Pluto.",radiusVDW:2,boilingpoint:3505,meltingpoint:913,periodTableBlock:"f",discoveryDate:"1940",period:"7",group:"8",electronicConfiguration:"Rn 5f6 7s2",family:"Other_Metal",symbol:"Pu",name:"Plutonium",elementColor:[0,.42,1],discoverers:["Glenn T. Seaborg","E. M. McMillan","J. W. Kennedy","A.C. Wahl"]},{id:"Am",atomicNumber:95,mass:243,exactMass:243.0613811,ionization:5.9738,electronegativityPauling:1.3,nameOrigin:"Named after America.",radiusVDW:2,boilingpoint:2880,meltingpoint:1449,periodTableBlock:"f",discoveryDate:"1945",period:"7",group:"8",electronicConfiguration:"Rn 5f7 7s2",family:"Other_Metal",symbol:"Am",name:"Americium",elementColor:[.33,.36,.95],discoverers:["Glenn T. Seaborg","L. O. Morgan","R. A. James","A. Ghiors"]},{id:"Cm",atomicNumber:96,mass:247,exactMass:247.070354,ionization:5.9914,electronegativityPauling:1.3,nameOrigin:"Named after Marie Curie.",radiusVDW:2,boilingpoint:3383,meltingpoint:1620,periodTableBlock:"f",discoveryDate:"1944",period:"7",group:"8",electronicConfiguration:"Rn 5f7 6d1 7s2",family:"Other_Metal",symbol:"Cm",name:"Curium",elementColor:[.47,.36,.89],discoverers:["Glenn T. Seaborg","R. A. James","A. Ghiors"]},{id:"Bk",atomicNumber:97,mass:247,exactMass:247.070307,ionization:6.1979,electronegativityPauling:1.3,nameOrigin:"Named after the town Berkeley where it was discovered.",radiusVDW:2,boilingpoint:983,meltingpoint:1258,periodTableBlock:"f",discoveryDate:"1949",period:"7",group:"1",electronicConfiguration:"Rn 5f9 7s2",family:"Other_Metal",symbol:"Bk",name:"Berkelium",elementColor:[.54,.31,.89],discoverers:["Glenn T. Seaborg","A. Ghiors","S. G. Thompson"]},{id:"Cf",atomicNumber:98,mass:251,exactMass:251.079587,ionization:6.2817,electronegativityPauling:1.3,nameOrigin:"Named after the US-State of California.",radiusVDW:2,boilingpoint:1173,meltingpoint:1172,periodTableBlock:"f",discoveryDate:"1950",period:"7",group:"2",electronicConfiguration:"Rn 5f10 7s2",family:"Other_Metal",symbol:"Cf",name:"Californium",elementColor:[.63,.21,.83],discoverers:["Glenn T. Seaborg","A. Ghiors","S. G. Thompson"]},{id:"Es",atomicNumber:99,mass:252,exactMass:252.08298,ionization:6.42,electronegativityPauling:1.3,nameOrigin:"Named after the scientist Albert Einstein.",radiusVDW:2,meltingpoint:1130,periodTableBlock:"f",discoveryDate:"1952",period:"7",group:"3",electronicConfiguration:"Rn 5f11 7s2",family:"Other_Metal",symbol:"Es",name:"Einsteinium",elementColor:[.7,.12,.83],discoverers:["Glenn T. Seaborg","et al."]},{id:"Fm",atomicNumber:100,mass:257,exactMass:257.095105,ionization:6.5,electronegativityPauling:1.3,nameOrigin:"Named after the scientist Enrico Fermi.",radiusVDW:2,meltingpoint:1800,periodTableBlock:"f",discoveryDate:"1953",period:"7",group:"4",electronicConfiguration:"Rn 5f12 7s2",family:"Other_Metal",symbol:"Fm",name:"Fermium",elementColor:[.7,.12,.73],discoverers:["Glenn T. Seaborg","et al."]},{id:"Md",atomicNumber:101,mass:258,exactMass:258.098431,ionization:6.58,electronegativityPauling:1.3,nameOrigin:"Named after the scientist D.I. Mendeleev.",radiusVDW:2,meltingpoint:1100,periodTableBlock:"f",discoveryDate:"1955",period:"7",group:"5",electronicConfiguration:"Rn 5f13 7s2",family:"Other_Metal",symbol:"Md",name:"Mendelevium",elementColor:[.7,.05,.65],discoverers:["Glenn T. Seaborg","Albert Ghiorso","Bernard Harvey","Gregory Choppin","Stanley G. Thompson"]},{id:"No",atomicNumber:102,mass:259,exactMass:259.10103,ionization:6.65,electronegativityPauling:1.3,nameOrigin:"Named after the scientist Alfred Nobel.",radiusVDW:2,meltingpoint:1100,periodTableBlock:"f",discoveryDate:"1958",period:"7",group:"6",electronicConfiguration:"Rn 5f14 7s2",family:"Other_Metal",symbol:"No",name:"Nobelium",elementColor:[.74,.05,.53]},{id:"Lr",atomicNumber:103,mass:262,exactMass:262.10963,ionization:4.9,nameOrigin:"Named after the scientist Ernest Orlando Lawrence.",radiusVDW:2,meltingpoint:1900,periodTableBlock:"f",discoveryDate:"1961",period:"7",group:"7",electronicConfiguration:"Rn 5f14 7s2 7p1",family:"Other_Metal",symbol:"Lr",name:"Lawrencium",elementColor:[.78,0,.4],discoverers:["Albert Ghiorso","Torbjorn Sikkeland","Almon Larsh","Robert M. Latimer"]},{id:"Rf",atomicNumber:104,mass:267,exactMass:261.10877,ionization:6,nameOrigin:"Named after the scientist Ernest Rutherford",radiusVDW:2,periodTableBlock:"d",discoveryDate:"1964",period:"7",group:"4",electronicConfiguration:"Rn 5f14 6d2 7s2",family:"Transition",symbol:"Rf",name:"Rutherfordium",elementColor:[.8,0,.35],discoveryCountry:["ru","us"]},{id:"Db",atomicNumber:105,mass:268,exactMass:262.11408,nameOrigin:"Named after the science-town Dubna in Russia",radiusVDW:2,periodTableBlock:"d",discoveryDate:"1967",period:"7",group:"5",electronicConfiguration:"Rn 5f14 6d3 7s2",family:"Transition",symbol:"Db",name:"Dubnium",elementColor:[.82,0,.31],discoveryCountry:["ru","us"]},{id:"Sg",atomicNumber:106,mass:271,exactMass:263.11832,nameOrigin:"Named after the scientist G. Theodore Seaborg.",radiusVDW:2,periodTableBlock:"d",discoveryDate:"1974",period:"7",group:"6",family:"Transition",symbol:"Sg",name:"Seaborgium",elementColor:[.85,0,.27],discoveryCountry:["ru","us"],discoverers:["Albert Ghiorso","et al."]},{id:"Bh",atomicNumber:107,mass:272,exactMass:264.1246,nameOrigin:"Named after the scientist Niels Bohr.",radiusVDW:2,periodTableBlock:"d",discoveryDate:"1981",period:"7",group:"7",family:"Transition",symbol:"Bh",name:"Bohrium",elementColor:[.88,0,.22],discoveryCountry:["ru"],discoverers:["Peter Armbruster","Gottfried Münzenber","et al."]},{id:"Hs",atomicNumber:108,mass:270,exactMass:265.13009,nameOrigin:"Latin 'hassia' for the German county Hessen. In Hessen a lot elements have been discovered.",radiusVDW:2,periodTableBlock:"d",discoveryDate:"1984",period:"7",group:"8",family:"Transition",symbol:"Hs",name:"Hassium",elementColor:[.9,0,.18],discoveryCountry:["de"],discoverers:["Peter Armbruster","Gottfried Münzenber","et al."]},{id:"Mt",atomicNumber:109,mass:276,exactMass:268.13873,nameOrigin:"Named after the scientist Lise Meitner.",radiusVDW:2,periodTableBlock:"d",discoveryDate:"1982",period:"7",group:"8",family:"Transition",symbol:"Mt",name:"Meitnerium",elementColor:[.91,0,.15],discoveryCountry:["de"],discoverers:["Peter Armbruster","Gottfried Münzenber","et al."]},{id:"Ds",atomicNumber:110,mass:281,exactMass:271.14606,nameOrigin:"Named after the German city Darmstadt where many elements have been discovered.",periodTableBlock:"d",discoveryDate:"1994",period:"7",group:"8",family:"Transition",symbol:"Ds",name:"Darmstadtium",elementColor:[.92,0,.14],discoveryCountry:["de"],discoverers:["S. Hofmann","V. Ninov","F. P. Hessberger","P. Armbruster","H. Folger","G. Münzenberg","H. J. Schött","et al."]},{id:"Rg",atomicNumber:111,mass:280,exactMass:272.15362,nameOrigin:"Named after Wilhelm Conrad Röntgen.",periodTableBlock:"d",discoveryDate:"1994",period:"7",group:"1",family:"Transition",symbol:"Rg",name:"Roentgenium",elementColor:[.93,0,.13],discoveryCountry:["de"],discoverers:["S. Hofmann","V. Ninov","F. P. Hessberger","P. Armbruster","H. Folger","G. Münzenberg","et al."]},{id:"Cn",atomicNumber:112,mass:285,exactMass:285.17411,nameOrigin:"Historically known as eka-mercury. Ununbium is a temporary IUPAC systematic element name.",periodTableBlock:"d",discoveryDate:"1996",period:"7",family:"Transition",symbol:"Cn",name:"Copernicium",elementColor:[.94,0,.12],discoveryCountry:["de"],discoverers:["First","created","at","the","Gesellschaft","für","Schwerionenforschung"]},{id:"Uut",atomicNumber:113,mass:284,exactMass:284.17808,nameOrigin:"Historically known as eka-thallium. Ununtrium is a temporary IUPAC systematic element name.",periodTableBlock:"p",discoveryDate:"2003",period:"7",family:"Other_Metal",symbol:"Uut",name:"Ununtrium",elementColor:[.95,0,.11],discoveryCountry:["ru","us"],discoverers:["Russian scientists at Dubna (JINR)","American scientists at the Lawrence Livermore National Laboratory."]},{id:"Uuq",atomicNumber:114,mass:289,exactMass:289.18728,nameOrigin:"Historically known as eka-lead. Ununquadium is a temporary IUPAC systematic element name.",periodTableBlock:"p",discoveryDate:"1998",period:"7",family:"Other_Metal",symbol:"Uuq",name:"Ununquadium",elementColor:[.96,0,.1],discoveryCountry:["ru","us"],discoverers:["Joint","Institute","for","Nuclear","Research"]},{id:"Uup",atomicNumber:115,mass:288,exactMass:288.19249,nameOrigin:"Historically known as eka-bismuth. Ununpentium is a temporary IUPAC systematic element name.",periodTableBlock:"p",discoveryDate:"2004",period:"7",family:"Other_Metal",symbol:"Uup",name:"Ununpentium",elementColor:[.97,0,.09],discoveryCountry:["ru","us"],discoverers:["Russian scientists at Dubna (JINR)","American scientists at the Lawrence Livermore National Laboratory."]},{id:"Uuh",atomicNumber:116,mass:293,exactMass:292.19979,nameOrigin:"Historically known as eka-polonium. Ununhexium is a temporary IUPAC systematic element name.",periodTableBlock:"p",discoveryDate:"2000",period:"7",family:"Other_Metal",symbol:"Uuh",name:"Ununhexium",elementColor:[.98,0,.08],discoveryCountry:["ru"],discoverers:["Joint","Institute","for","Nuclear","Research"]},{id:"Uus",atomicNumber:117,nameOrigin:"Temporary symbol and name. Can also be referred to as eka-astatine.",periodTableBlock:"p",discoveryDate:"0",period:"7",family:"Halogen",symbol:"Uus",name:"Ununseptium",elementColor:[.99,0,.07]},{id:"Uuo",atomicNumber:118,mass:294,nameOrigin:"Historically known as eka-radon, eka-emanation before 1960. Ununoctium is a temporary IUPAC systematic element name.",periodTableBlock:"p",discoveryDate:"2002",period:"7",family:"Noblegas",symbol:"Uuo",name:"Ununoctium",elementColor:[1,0,.06],discoveryCountry:["ru","us"],discoverers:["Russian scientists at Dubna (JINR)","American scientists at the Lawrence Livermore National Laboratory."]}]};const{vtkErrorMacro:y,vtkDebugMacro:_}=r.m,b={};function x(e,t){const n=[],r=[],i=[],o=[];function a(e,a,s){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[1,1,1],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.bondRadius;r.push(s),r.push(u),i.push(a[0]),i.push(a[1]),i.push(a[2]),n.push(e[0]),n.push(e[1]),n.push(e[2]);for(let e=0;e{const u=s[0];if(!u)return y("Invalid or missing input"),1;const c=h.ZP.newInstance(),d=h.ZP.newInstance();let p=0,f=0,v=null,x=null,w=null,S=null;n.length=0,r.length=0,i.length=0,o.length=0,u.getAtoms()&&(void 0!==u.getAtoms().coords&&void 0!==u.getAtoms().coords["3d"]&&(v=u.getAtoms().coords["3d"],p=v.length/3),void 0!==u.getAtoms().elements&&void 0!==u.getAtoms().elements.number&&(x=u.getAtoms().elements.number)),u.getBonds()&&(void 0!==u.getBonds().connections&&void 0!==u.getBonds().connections.index&&(w=u.getBonds().connections.index,f=w.length/2),void 0!==u.getBonds().order&&(S=u.getBonds().order));const C=[],T=[],M=[],D=[],A=[],P=[];_("Checking for bonds with tolerance ",t.tolerance);let k=0;for(let e=0;e0&&T.push(D[e]*t.atomicRadiusScaleFactor),P.length>0&&(k=3*e,M.push(255*P[k]),M.push(255*P[k+1]),M.push(255*P[k+2])));if(!w){w=[],S=[];for(let e=0;er||Math.abs(a[1])>r||Math.abs(a[2])>r)continue;const s=r*r,l=a[0]*a[0]+a[1]*a[1]+a[2]*a[2];l.1&&(w.push(e),w.push(n),S.push(1))}f=w.length/2}for(let e=0;e2*c*.6&&(t.bondRadius*=2*c*.6/d,u=(2+t.deltaBondFactor)*t.bondRadius);const p=S[e]%2;for(let t=p;t0){const t=Math.sqrt(l)/2;f=[v[i]-t*c[0]/2+e*d[0],v[i+1]-t*c[1]/2+e*d[1],v[i+2]-t*c[2]/2+e*d[2]],a(f,c,t,P.slice(i,i+3)),f=[v[o]+t*c[0]/2+e*d[0],v[o+1]+t*c[1]/2+e*d[1],v[o+2]+t*c[2]/2+e*d[2]],a(f,c,t,P.slice(o,o+3))}else{const t=Math.sqrt(l);f=[v[i]-s[0]/2+e*d[0],v[i+1]-s[1]/2+e*d[1],v[i+2]-s[2]/2+e*d[2]],P.length>0?a(f,c,t,P.slice(o,o+3)):a(f,c,t)}}}if(c.getPoints().setData(C,3),D){const t=m.ZP.newInstance({numberOfComponents:1,values:T,name:e.getSphereScaleArrayName()});c.getPointData().addArray(t)}if(P.length>0){const e=m.ZP.newInstance({numberOfComponents:3,values:Uint8Array.from(M),name:"colors"});c.getPointData().setScalars(e)}d.getPoints().setData(n,3);const L=m.ZP.newInstance({numberOfComponents:2,values:r,name:"stickScales"});d.getPointData().addArray(L);const O=m.ZP.newInstance({numberOfComponents:3,values:i,name:"orientation"});if(d.getPointData().addArray(O),P.length>0){const e=m.ZP.newInstance({numberOfComponents:3,values:Uint8Array.from(o),name:"colors"});d.getPointData().setScalars(e)}return l[0]=c,l[1]=d,1}}v.atoms.forEach((e=>{b[e.atomicNumber]=e}));const w={sphereScaleArrayName:"radius",tolerance:.45,atomicRadiusScaleFactor:.3,bondRadius:.075,deltaBondFactor:.6,radiusType:"radiusVDW",hideElements:""};function S(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,w,n),r.m.obj(e,t),r.m.setGet(e,t,["atomicRadiusScaleFactor","bondRadius","deltaBondFactor","hideElements","radiusType","sphereScaleArrayName","tolerance"]),r.m.algo(e,t,1,2),x(e,t)}var C={newInstance:r.m.newInstance(S,"vtkMoleculeToRepresentation"),extend:S},T=n(40);function M(e,t){t.classHierarchy.push("vtkMoleculeRepresentationProxy"),t.filter=C.newInstance(),t.sphereMapper=u.newInstance(),t.stickMapper=f.newInstance(),t.sphereActor=i.ZP.newInstance(),t.stickActor=i.ZP.newInstance(),t.sourceDependencies.push(t.filter),t.sphereMapper.setInputConnection(t.filter.getOutputPort(0)),t.sphereMapper.setScaleArray(t.filter.getSphereScaleArrayName()),t.sphereActor.setMapper(t.sphereMapper),t.stickMapper.setInputConnection(t.filter.getOutputPort(1)),t.stickMapper.setScaleArray("stickScales"),t.stickMapper.setOrientationArray("orientation"),t.stickActor.setMapper(t.stickMapper),t.actors.push(t.sphereActor),t.actors.push(t.stickActor),e.setColorBy=()=>{},e.getColorBy=()=>[],e.listDataArrays=()=>[]}const D={};function A(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,D,n),T.Z.extend(e,t,n),M(e,t),r.m.proxyPropertyMapping(e,t,{tolerance:{modelKey:"filter",property:"tolerance"},atomicRadiusScaleFactor:{modelKey:"filter",property:"atomicRadiusScaleFactor"},bondRadius:{modelKey:"filter",property:"bondRadius"},deltaBondFactor:{modelKey:"filter",property:"deltaBondFactor"},radiusType:{modelKey:"filter",property:"radiusType"},hideElements:{modelKey:"filter",property:"hideElements"}})}var P={newInstance:r.m.newInstance(A,"vtkMoleculeRepresentationProxy"),extend:A}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return s}});var r=n(0);function i(e,t){t.classHierarchy.push("vtkSourceProxy"),e.setInputProxy=n=>{t.inputSubscription&&(t.inputSubscription(),t.inputSubscription=null),t.inputProxy=n,t.inputProxy&&(t.inputSubscription=n.onModified(e.update,-1).unsubscribe),e.update()},e.setInputData=(n,r)=>{t.dataset!==n&&(t.dataset=n,t.type=r||n.getClassName(),e.modified(),e.invokeDatasetChange())},e.setInputAlgorithm=function(n,r){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.type=r,t.algo!==n&&(t.algo=n,t.algoSubscription&&(t.algoSubscription(),t.algoSubscription=null),n&&i&&(t.algoSubscription=n.onModified((()=>{e.update()}),-1).unsubscribe,e.update()))},e.update=()=>{t.algo&&t.inputProxy&&t.algo.setInputData(t.inputProxy.getDataset()),t.updateDomain&&t.inputProxy&&t.updateDomain(e,t.inputProxy.getDataset()),t.algo&&e.setInputData(t.algo.getOutputData(),t.type)},e.getUpdate=()=>t.algo.getMTime()>t.dataset.getMTime(),e.delete=r.m.chain((()=>{t.algoSubscription&&(t.algoSubscription(),t.algoSubscription=null),t.inputSubscription&&(t.inputSubscription(),t.inputSubscription=null)}),e.delete),t.inputProxy&&(t.inputSubscription=t.inputProxy.onModified((()=>{e.update()}),-1).unsubscribe),t.algoFactory&&e.setInputAlgorithm(t.algoFactory.newInstance(),null,t.autoUpdate),e.update()}const o={name:"Default source"};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.obj(e,t),r.m.get(e,t,["name","type","dataset","algo","inputProxy"]),r.m.set(e,t,["name"]),r.m.event(e,t,"DatasetChange"),r.m.proxy(e,t),i(e,t),t.proxyPropertyMapping&&r.m.proxyPropertyMapping(e,t,t.proxyPropertyMapping)}var s={newInstance:r.m.newInstance(a,"vtkSourceProxy"),extend:a}},function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(60);function i(e,t){t.classHierarchy.push("vtkContextRepresentation")}const o={behavior:n(61).c.CONTEXT,pickable:!1,dragable:!0};var a={extend:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a={...o,...n};r.ZP.extend(e,t,a),i(0,t)}}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return P}});var r=n(0),i=n(63),o=n(64),a=n(2),s=n(474);function l(e,t,n,r,i,o){const s=o.displayToWorld(e,t,0,i),l=o.displayToWorld(e,t,1,i),u=[0,0,0];(0,a.s)(l,s,u);const c=[0,0,0];(0,a.j)(r,u,c),(0,a.j)(c,u,c);const d=(0,a.d)([s[0]-n[0],s[1]-n[1],s[2]-n[2]],c),p=(0,a.d)(c,r),f=r.slice();return(0,a.w)(f,d/p),(0,a.k)(n,f,f),f}function u(e,t){t.classHierarchy.push("vtkLineManipulator"),e.handleEvent=(t,n)=>({worldCoords:l(t.position.x,t.position.y,e.getOrigin(t),e.getNormal(t),t.pokedRenderer,n)})}function c(e){return{...e}}function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s.ZP.extend(e,t,c(n)),u(e,t)}var p={projectDisplayToLine:l,extend:d,newInstance:r.m.newInstance(d,"vtkLineManipulator")},f=n(35),h=n(473),m=n(575),g=n(576),v=n(572);const y=["-","=","+"];function _(e,t){const n=new Float64Array(3);return m.fF(n,e,t),n}function b(e,t){const n=m.Ue(),r=g.Ue();return v.getRotation(r,t),m.VC(n,e,r),n}function x(e){const[t,n,r]=e.split("").map((e=>y.indexOf(e)-1));return t*n*r!=0?"corners":t*n!=0||n*r!=0||r*t!=0?"edges":"faces"}function w(e,t){t._isDragging=!1,e.setDisplayCallback=e=>t.representations[0].setDisplayCallback(e),e.handleLeftButtonPress=()=>t.activeState&&t.activeState.getActive()&&t.pickable?(t.dragable&&(t._isDragging=!0,t._apiSpecificRenderWindow.setCursor("grabbing"),t._interactor.requestAnimation(e)),r.m.EVENT_ABORT):r.m.VOID,e.handleMouseMove=n=>t._isDragging?e.handleEvent(n):r.m.VOID,e.handleLeftButtonRelease=()=>t.activeState&&t.activeState.getActive()&&t.pickable?(t._isDragging&&(t._isDragging=!1,t._interactor.cancelAnimation(e),t.widgetState.deactivate()),r.m.EVENT_ABORT):r.m.VOID,e.handleEvent=e=>{if(t.pickable&&t.activeState&&t.activeState.getActive()){const n=t.activeState.getManipulator();if(n){const i=t.activeState.getName(),o=x(i),a=i.split("").map((e=>y.indexOf(e))),s=t.widgetState.getCroppingPlanes().getPlanes(),l=t.widgetState.getIndexToWorldT();let u=[];if("corners"===o&&(u=n.handleEvent(e,t._apiSpecificRenderWindow).worldCoords),"faces"===o){const r=[1-a[0],1-a[1],1-a[2]],i=[(s[0]+s[1])/2,(s[2]+s[3])/2,(s[4]+s[5])/2];n.setHandleOrigin(_(i,l)),n.setHandleNormal(b(r,l)),u=n.handleEvent(e,t._apiSpecificRenderWindow).worldCoords}if("edges"===o){const r=a.map((e=>1===e?e:0));n.setHandleNormal(b(r,l)),u=n.handleEvent(e,t._apiSpecificRenderWindow).worldCoords}if(u.length){const e=_(u,t.widgetState.getWorldToIndexT());for(let t=0;t<3;t++)0===a[t]?s[2*t]=e[t]:2===a[t]&&(s[2*t+1]=e[t]);return t.activeState.setOrigin(...u),t.widgetState.getCroppingPlanes().setPlanes(...s),r.m.EVENT_ABORT}}}return r.m.VOID},t._camera=t._renderer.getActiveCamera(),t.classHierarchy.push("vtkImageCroppingWidgetProp")}var S=n(41);function C(){const e=S.Z.createBuilder();e.addField({name:"indexToWorldT",initialValue:Array(16).fill(0)}).addField({name:"worldToIndexT",initialValue:Array(16).fill(0)});const t=S.Z.createBuilder().addField({name:"planes",initialValue:[0,1,0,1,0,1]}).build();e.addStateFromInstance({labels:["croppingPlanes"],name:"croppingPlanes",instance:t});for(let t=-1;t<2;t++)for(let n=-1;n<2;n++)for(let r=-1;r<2;r++)if(0!==t||0!==n||0!==r){const i=y[t+1]+y[n+1]+y[r+1],o=x(i);e.addStateFromMixin({labels:["handles",i,o],mixins:["name","origin","color","scale1","visible","manipulator"],name:i,initialValues:{scale1:30,origin:[t,n,r],visible:!0,name:i}})}return e.build()}var T=n(21);function M(e,t){t.classHierarchy.push("vtkImageCroppingWidget");const n={...e};let i=null;function a(e,n){t.widgetState.getStatesWithLabel(e).forEach((e=>{e.setVisible(n)}))}e.setFaceHandlesEnabled=e=>a("faces",e),e.setEdgeHandlesEnabled=e=>a("edges",e),e.setCornerHandlesEnabled=e=>a("corners",e),e.copyImageDataDescription=n=>{t.widgetState.setIndexToWorldT(...n.getIndexToWorld()),t.widgetState.setWorldToIndexT(...n.getWorldToIndex());const r=n.getDimensions();t.widgetState.getCroppingPlanes().setPlanes([0,r[0],0,r[1],0,r[2]]),e.modified()},e.updateHandles=()=>{const e=t.widgetState.getCroppingPlanes().getPlanes(),n=[(e[0]+e[1])/2,(e[2]+e[3])/2,(e[4]+e[5])/2],r=[e[0],n[0],e[1]],i=[e[2],n[1],e[3]],o=[e[4],n[2],e[5]],a=t.widgetState.getIndexToWorldT(),s=e=>y[e];for(let e=0;e<3;e++)for(let n=0;n<3;n++)for(let l=0;l<3;l++)if(1!==e||1!==n||1!==l){const u=[e,n,l].map(s).join(""),c=_([r[e],i[n],o[l]],a),[d]=t.widgetState.getStatesWithLabel(u);d.setOrigin(...c)}},e.delete=r.m.chain(e.delete,(()=>{i&&i.unsubscribe()})),t.methodsToLink=["scaleInPixels"],e.getRepresentationsForViewType=e=>{switch(e){case T.cO.DEFAULT:case T.cO.GEOMETRY:case T.cO.SLICE:case T.cO.VOLUME:}return[{builder:f.ZP,labels:["handles"]},{builder:h.ZP,labels:["corners"]}]},i=t.widgetState.getCroppingPlanes().onModified(e.updateHandles),e.setCornerManipulator=e=>{n.setCornerManipulator(e),t.widgetState.getStatesWithLabel("corners").forEach((t=>t.setManipulator(e)))},e.setEdgeManipulator=e=>{n.setEdgeManipulator(e),t.widgetState.getStatesWithLabel("edges").forEach((t=>t.setManipulator(e)))},e.setFaceManipulator=e=>{n.setFaceManipulator(e),t.widgetState.getStatesWithLabel("faces").forEach((t=>t.setManipulator(e)))},e.setCornerManipulator(o.ZP.newInstance({useCameraNormal:!0})),e.setEdgeManipulator(o.ZP.newInstance()),e.setFaceManipulator(p.newInstance())}const D=e=>({behavior:w,widgetState:C(),...e});function A(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,D(n)),i.ZP.extend(e,t,n),r.m.setGet(e,t,["cornerManipulator","edgeManipulator","faceManipulator"]),M(e,t)}var P={newInstance:r.m.newInstance(A,"vtkImageCroppingWidget"),extend:A}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return m}});var r=n(0),i=n(63),o=n(64),a=n(475),s=n(35),l=n(2),u=n(476),c=n(41);var d=n(21);function p(e,t){t.classHierarchy.push("vtkAngleWidget"),t.methodsToLink=["activeScaleFactor","activeColor","useActiveColor","glyphResolution","defaultScale","scaleInPixels"],t._onManipulatorChanged=()=>{t.widgetState.getMoveHandle().setManipulator(t.manipulator),t.widgetState.getHandleList().forEach((e=>{e.setManipulator(t.manipulator)}))},e.getRepresentationsForViewType=e=>{switch(e){case d.cO.DEFAULT:case d.cO.GEOMETRY:case d.cO.SLICE:case d.cO.VOLUME:}return[{builder:s.ZP,labels:["handles","moveHandle"]},{builder:a.ZP,labels:["handles","moveHandle"]}]},e.getAngle=()=>{const e=t.widgetState.getHandleList();if(3!==e.length)return 0;if(!e[0].getOrigin()||!e[1].getOrigin()||!e[2].getOrigin())return 0;const n=[0,0,0],r=[0,0,0];return(0,l.s)(e[0].getOrigin(),e[1].getOrigin(),n),(0,l.s)(e[2].getOrigin(),e[1].getOrigin(),r),(0,l.S)(n,r)},t.widgetState.onBoundsChange((e=>{const n=[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])];t.widgetState.getMoveHandle().setOrigin(n)})),e.setManipulator(t.manipulator||o.ZP.newInstance({useCameraNormal:!0}))}const f=e=>({behavior:u.Z,widgetState:c.Z.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible","manipulator"],name:"moveHandle",initialValues:{scale1:30,visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible","manipulator"],name:"handle",initialValues:{scale1:30}}).build(),...e});function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,f(n)),i.ZP.extend(e,t,n),r.m.setGet(e,t,["manipulator"]),p(e,t)}var m={newInstance:r.m.newInstance(h,"vtkAngleWidget"),extend:h}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return m}});var r=n(0),i=n(63),o=n(64),a=n(475),s=n(35),l=n(2),u=n(477),c=n(41);var d=n(21);function p(e,t){t.classHierarchy.push("vtkDistanceWidget");const n={...e};t.methodsToLink=["activeScaleFactor","activeColor","useActiveColor","glyphResolution","defaultScale","scaleInPixels"],e.getRepresentationsForViewType=e=>{switch(e){case d.cO.DEFAULT:case d.cO.GEOMETRY:case d.cO.SLICE:case d.cO.VOLUME:}return[{builder:s.ZP,labels:["handles"]},{builder:s.ZP,labels:["moveHandle"]},{builder:a.ZP,labels:["handles","moveHandle"]}]},e.getDistance=()=>{const e=t.widgetState.getHandleList();return 2!==e.length?0:e[0].getOrigin()&&e[1].getOrigin()?Math.sqrt((0,l.e)(e[0].getOrigin(),e[1].getOrigin())):0},e.setManipulator=e=>{n.setManipulator(e),t.widgetState.getMoveHandle().setManipulator(e),t.widgetState.getHandleList().forEach((t=>{t.setManipulator(e)}))},t.widgetState.onBoundsChange((e=>{const n=[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])];t.widgetState.getMoveHandle().setOrigin(n)})),e.setManipulator(t.manipulator||o.ZP.newInstance({useCameraNormal:!0}))}const f=e=>({behavior:u.Z,widgetState:c.Z.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible","manipulator"],name:"moveHandle",initialValues:{scale1:30,visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible","manipulator"],name:"handle",initialValues:{scale1:30}}).build(),...e});function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,f(n)),i.ZP.extend(e,t,n),r.m.setGet(e,t,["manipulator"]),p(e,t)}var m={newInstance:r.m.newInstance(h,"vtkDistanceWidget"),extend:h}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return x}});var r=n(0),i=n(63),o=n(471),a=n(324),s=n(61);function l(e,t){t.classHierarchy.push("vtkCircleContextRepresentation"),t._pipeline.actor.getProperty().setOpacity(.2),t._pipeline.mapper.setResolveCoincidentTopology(!0),t._pipeline.mapper.setRelativeCoincidentTopologyPolygonOffsetParameters(-1,-1),e.setGlyphResolution=r.m.chain(e.setGlyphResolution,t._pipeline.glyph.setResolution),e.setDrawBorder=r.m.chain(e.setDrawBorder,(e=>t._pipeline.glyph.setLines(e))),e.setDrawFace=r.m.chain(e.setDrawFace,(e=>t._pipeline.glyph.setFace(e))),e.setOpacity=e=>{t._pipeline.actor.getProperty().setOpacity(e)}}function u(e){return{behavior:s.c.CONTEXT,glyphResolution:32,drawBorder:!1,drawFace:!0,...e,_pipeline:{glyph:e?.pipeline?.glyph??o.ZP.newInstance({resolution:e.glyphResolution??32,radius:1,lines:e.drawBorder??!1,face:e.drawFace??!0,direction:[0,0,1]}),...e?.pipeline}}}function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a.ZP.extend(e,t,u(n)),r.m.setGet(e,t,["glyphResolution","drawFace","drawBorder"]),r.m.get(e,t._pipeline,["glyph","mapper","actor"]),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkCircleContextRepresentation"),extend:c},p=n(64),f=n(35),h=n(575);function m(e,t){t.painting=t._factory.getPainting(),e.handleLeftButtonPress=()=>{if(!t.activeState||!t.activeState.getActive())return r.m.VOID;t.painting=!0;return t.widgetState.addTrail().set(t.activeState.get("origin","up","right","direction","scale1")),e.invokeStartInteractionEvent(),r.m.EVENT_ABORT},e.handleMouseMove=t=>e.handleEvent(t),e.handleLeftButtonRelease=()=>(t.painting&&(e.invokeEndInteractionEvent(),t.widgetState.clearTrailList()),t.painting=!1,t.hasFocus?r.m.EVENT_ABORT:r.m.VOID),e.handleEvent=n=>{const i=t.activeState?.getManipulator?.()??t.manipulator;if(i&&t.activeState&&t.activeState.getActive()){const o=t._camera.getDirectionOfProjection(),a=t._camera.getViewUp(),s=[];h.kC(s,a,o),t.activeState.setUp(...a),t.activeState.setRight(...s),t.activeState.setDirection(...o);const{worldCoords:l}=i.handleEvent(n,t._apiSpecificRenderWindow);if(l.length&&(t.widgetState.setTrueOrigin(...l),t.activeState.setOrigin(...l),t.painting)){t.widgetState.addTrail().set(t.activeState.get("origin","up","right","direction","scale1"))}return e.invokeInteractionEvent(),r.m.EVENT_ABORT}return r.m.VOID},e.grabFocus=()=>{if(!t.hasFocus){t.activeState=t.widgetState.getHandle(),t.activeState.activate(),t._interactor.requestAnimation(e);const n=t._apiSpecificRenderWindow.getCanvas();n.onmouseenter=()=>{t.hasFocus&&t.activeState===t.widgetState.getHandle()&&t.activeState.setVisible(!0)},n.onmouseleave=()=>{t.hasFocus&&t.activeState===t.widgetState.getHandle()&&t.activeState.setVisible(!1)}}t.hasFocus=!0},e.loseFocus=()=>{t.hasFocus&&t._interactor.cancelAnimation(e),t.widgetState.deactivate(),t.widgetState.getHandle().deactivate(),t.activeState=null,t.hasFocus=!1},r.m.get(e,t,["painting"])}var g=n(41);var v=n(21);function y(e,t){t.classHierarchy.push("vtkPaintWidget");const n={...e};e.getRepresentationsForViewType=e=>{switch(e){case v.cO.DEFAULT:case v.cO.GEOMETRY:case v.cO.SLICE:return[{builder:d,labels:["handle","trail"]}];case v.cO.VOLUME:default:return[{builder:f.ZP,labels:["handle"]}]}},e.setManipulator=e=>{n.setManipulator(e),t.widgetState.getHandle().setManipulator(e)};const r=e.setRadius;e.setRadius=e=>{r(e)&&t.widgetState.getHandle().setScale1(e)},e.setManipulator(t.manipulator||p.ZP.newInstance({useCameraNormal:!0}))}const _=e=>{return{radius:1,painting:!1,color:[1],behavior:m,widgetState:(t=e?.radius??1,g.Z.createBuilder().addField({name:"trueOrigin",initialValue:[0,0,0]}).addStateFromMixin({labels:["handle"],mixins:["origin","color","scale1","orientation","manipulator","visible"],name:"handle",initialValues:{scale1:2*t,orientation:[1,0,0,0,1,0,0,0,1]}}).addDynamicMixinState({labels:["trail"],mixins:["origin","color","scale1","orientation","visible"],name:"trail",initialValues:{scale1:2*t,orientation:[1,0,0,0,1,0,0,0,1]}}).build()),...e};var t};function b(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_(n)),i.ZP.extend(e,t,n),r.m.get(e,t,["painting"]),r.m.setGet(e,t,["manipulator","radius","color"]),y(e,t)}var x={newInstance:r.m.newInstance(b,"vtkPaintWidget"),extend:b}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return S}});var r=n(0),i=n(10),o=n(15),a=n(4);const{vtkErrorMacro:s}=r.m;function l(e,t){t.classHierarchy.push("vtkImageCropFilter"),e.reset=()=>{const t=e.getInputData();t&&e.setCroppingPlanes(...t.getExtent())},e.requestData=(e,n)=>{const r=e[0];if(!r)return void s("Invalid or missing input");const i=r.getPointData().getScalars();if(!i)return void s("No scalars from input");const l=r.getExtent(),u=t.croppingPlanes&&6===t.croppingPlanes.length?l.map(((e,n)=>n%2==0?Math.max(e,Math.round(t.croppingPlanes[n])):Math.min(e,Math.round(t.croppingPlanes[n])))):l.slice();if(u[0]===l[0]&&u[1]===l[1]&&u[2]===l[2]&&u[3]===l[3]&&u[4]===l[4]&&u[5]===l[5]){const e=o.ZP.newInstance();return e.shallowCopy(r),void(n[0]=e)}for(let e=0;e<3;++e)u[2*e]>u[2*e+1]&&([u[2*e],u[2*e+1]]=[u[2*e+1],u[2*e]]);for(let e=0;e<6;e+=2)u[e]=Math.max(u[e],l[e]),u[e+1]=Math.min(u[e+1],l[e+1]);const c=i.getNumberOfComponents(),d=(u[1]-u[0]+1)*(u[3]-u[2]+1)*(u[5]-u[4]+1)*c,p=i.getData(),f=r.getDimensions(),h=c*f[0],m=c*f[0]*f[1],g=(u[0]-l[0])*c,v=(u[1]-u[0]+1)*c,y=new p.constructor(d);let _=0;for(let e=u[4];e<=u[5];++e)for(let t=u[2];t<=u[3];++t){const n=g+(t-l[2])*h+(e-l[4])*m,r=n+v,i=p.subarray(n,r);y.set(i,_),_+=i.length}const b=o.ZP.newInstance({extent:u,origin:r.getOrigin(),direction:r.getDirection(),spacing:r.getSpacing()}),x=a.ZP.newInstance({name:i.getName(),numberOfComponents:c,values:y});b.getPointData().setScalars(x),n[0]=b},e.isResetAvailable=()=>{if(null==t.croppingPlanes||0===t.croppingPlanes.length)return!1;const n=e.getInputData();if(n){return void 0!==n.getExtent().find(((e,n)=>Math.abs(t.croppingPlanes[n]-e)>Number.EPSILON))}return!1}}const u={};function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),r.m.obj(e,t),r.m.algo(e,t,1,1),r.m.setGetArray(e,t,["croppingPlanes"],6),l(e,t)}var d={newInstance:r.m.newInstance(c,"vtkImageCropFilter"),extend:c},p=n(480),f=n(479),h=n(119),m=n(120),g=n(40);function v(e,t){return e+t}function y(){for(var e=arguments.length,t=new Array(e),n=0;n1)&&e.setSampleDistance(),(t.edgeGradient<0||t.edgeGradient>1)&&e.setEdgeGradient();const s=function(e,t,n,r){const i=t.getRange(),o=e.getSpacing(),a=e.getBounds(),{ijkMode:s}=n.mapperX.getClosestIJKAxis(),{ijkMode:l}=n.mapperY.getClosestIJKAxis(),{ijkMode:u}=n.mapperZ.getClosestIJKAxis(),c={xSlice:{domain:{min:a[0],max:a[1],step:o[s]}},ySlice:{domain:{min:a[2],max:a[3],step:o[l]}},zSlice:{domain:{min:a[4],max:a[5],step:o[u]}},windowWidth:{domain:{min:0,max:i[1]-i[0],step:"any"}},windowLevel:{domain:{min:i[0],max:i[1],step:"any"}}};return r("xSlice",c.xSlice),r("ySlice",c.ySlice),r("zSlice",c.zSlice),r("windowWidth",c.windowWidth),r("windowLevel",c.windowLevel),{xSlice:y(c.xSlice.domain.min,c.xSlice.domain.max),ySlice:y(c.ySlice.domain.min,c.ySlice.domain.max),zSlice:y(c.zSlice.domain.min,c.zSlice.domain.max),windowWidth:c.windowWidth.domain.max,windowLevel:Math.floor(y(c.windowLevel.domain.min,c.windowLevel.domain.max))}}(n,e.getDataArray(),t,e.updateProxyProperty);e.set(s),2===n.getDimensions().reduce(((e,t)=>e+(t>1?1:0)),0)&&e.setIs2DVolume(!0)}}),e.setIs2DVolume=n=>{t.is2DVolume=n,n&&(e.getVisibility()&&e.setSliceVisibility(!0),t.volume.setVisibility(!1))},e.isVisible=()=>t.volume.getVisibility(),e.setVisibility=n=>{n?t.is2DVolume?e.setSliceVisibility(!0):t.volume.setVisibility(!0):(t.volume.setVisibility(!1),e.setSliceVisibility(!1))},e.getVisibility=()=>t.volume.getVisibility()||e.getSliceVisibility(),e.isVisible=e.getVisibility,e.setSliceVisibility=n=>{if(n&&t.is2DVolume){const n=e.getInputDataSet().getDimensions().indexOf(1);t.actors[n]&&t.actors[n].setVisibility(!0)}else t.actors.forEach((e=>e.setVisibility(n)))},e.getSliceVisibility=()=>t.actorX.getVisibility()||t.actorY.getVisibility()||t.actorZ.getVisibility(),e.setSampleDistance=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.4;if(t.sampleDistance!==n){t.sampleDistance=n;const r=e.getInputDataSet(),i=.7*Math.sqrt(r.getSpacing().map((e=>e*e)).reduce(((e,t)=>e+t),0));t.mapper.setSampleDistance(i*2**(3*n-1.5)),e.modified()}},e.setEdgeGradient=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.2;if(t.edgeGradient!==n){t.edgeGradient=n;const r=e.getDataArray(),i=r.getNumberOfComponents();if(0===n)for(let e=0;e0?t.volume.getProperty().setGradientOpacityMinimumValue(e,Math.exp(Math.log(.2*(i[1]-i[0]))*o*o)):t.volume.getProperty().setGradientOpacityMinimumValue(e,0),t.volume.getProperty().setGradientOpacityMaximumValue(e,Math.exp(Math.log(1*(i[1]-i[0]))*n*n))}e.modified()}};const n=e.setColorBy;e.setColorBy=function(r,i){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;n(r,i,o);const a=e.getLookupTableProxy(r),s=e.getPiecewiseFunctionProxy(r);t.property.setRGBTransferFunction(0,a.getLookupTable()),t.property.setScalarOpacity(0,s.getPiecewiseFunction())}}const x={sampleDistance:-1,edgeGradient:-1,disableSolidColor:!0,is2DVolume:!1};function w(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,x,n),g.Z.extend(e,t,n),r.m.get(e,t,["sampleDistance","edgeGradient","cropFilter","is2DVolume"]),b(e,t),r.m.proxyPropertyMapping(e,t,{xSlice:{modelKey:"mapperX",property:"slice"},ySlice:{modelKey:"mapperY",property:"slice"},zSlice:{modelKey:"mapperZ",property:"slice"},volumeVisibility:{modelKey:"volume",property:"visibility"},xSliceVisibility:{modelKey:"actorX",property:"visibility"},ySliceVisibility:{modelKey:"actorY",property:"visibility"},zSliceVisibility:{modelKey:"actorZ",property:"visibility"},windowWidth:{modelKey:"propertySlices",property:"colorWindow"},windowLevel:{modelKey:"propertySlices",property:"colorLevel"},useShadow:{modelKey:"property",property:"shade"},croppingPlanes:{modelKey:"cropFilter",property:"croppingPlanes"}})}var S={newInstance:r.m.newInstance(w,"vtkVolumeRepresentationProxy"),extend:w,updateConfiguration:_}},function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(0);function i(e,t){t.classHierarchy.push("vtkAnimationProxyManager"),e.addAnimation=n=>{t.animations.includes(n)||t.animations.push(n),n.onModified(e.updateFrames),e.updateFrames()},e.play=()=>{const n=t.frames[t.currentFrameIndex],r=t.frames[t.currentFrameIndex+1];clearTimeout(t.timeOut),t.currentFrameIndex{e.nextFrame(),e.play()}),1e3*(r-n)):e.invokeDonePlaying()},e.pause=()=>{clearTimeout(t.timeOut),t.timeOut=null},e.nextFrame=()=>{t.currentFrameIndex{t.currentFrameIndex>0&&e.setFrameIndex(t.currentFrameIndex-1)},e.firstFrame=()=>{e.setFrameIndex(0)},e.lastFrame=()=>{e.setFrameIndex(t.frames.length-1)},e.setFrameIndex=n=>{t.currentFrameIndex=n,t.animations.forEach((e=>{e.setTime(t.frames[t.currentFrameIndex])})),e.invokeCurrentFrameChanged()},e.updateFrames=()=>{const n=[];t.animations.forEach((e=>{n.push(...e.getFrames())})),t.frames=n.sort(((e,t)=>e-t)).filter(((e,t,n)=>n.indexOf(e)===t)),e.invokeFramesChanged(),e.setFrameIndex(0)},e.getCurrentFrame=()=>t.frames[t.currentFrameIndex]}const o={animations:[],currentFrameIndex:0,frames:[],timeOut:null};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.obj(e,t),r.m.get(e,t,["frames","currentFrameIndex"]),i(e,t),r.m.proxy(e,t),r.m.event(e,t,"currentFrameChanged"),r.m.event(e,t,"framesChanged"),r.m.event(e,t,"donePlaying")}var s={newInstance:r.m.newInstance(a,"vtkAnimationProxyManager"),extend:a}},function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(0);function i(e,t){t.classHierarchy.push("vtkTimeStepBasedAnimationHandlerProxy"),e.setTime=e=>{t.handler.setCurrentTimeStep(e)},e.getFrames=()=>t.handler?t.handler.getTimeSteps():[],e.setInputAnimationHandler=e=>{t.handler=e}}const o={handler:null};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o,n),r.m.obj(e,t),r.m.setGet(e,t,["handler"]),i(e,t),r.m.proxy(e,t)}var s={newInstance:r.m.newInstance(a,"vtkTimeStepBasedAnimationHandlerProxy"),extend:a}},function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(0),i=n(23);let o=null,a=e=>e;function s(e,t){t.classHierarchy.push("vtkITKPolyDataReader"),e.parseAsArrayBuffer=n=>n&&n!==t.rawDataBuffer?(t.rawDataBuffer=n,o(n,t.fileName).then(a).then((n=>{t.output[0]=(0,i.Z)(n),e.modified()}))):Promise.resolve(),e.requestData=(n,r)=>{e.parseAsArrayBuffer(t.rawDataBuffer,t.fileName)}}const l={fileName:"",arrayName:null};function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,l,n),r.m.obj(e,t),r.m.algo(e,t,0,1),r.m.setGet(e,t,["fileName","arrayName"]),s(e,t),o||console.error("\n // Dependency needs to be added inside your project\n import readPolyDataArrayBuffer from 'itk/readPolyDataArrayBuffer';\n vtkITKPolyDataReader.setReadPolyDataArrayBufferFromITK(readPolyDataArrayBuffer);\n ")}var c={newInstance:r.m.newInstance(u,"vtkITKPolyDataReader"),extend:u,setReadPolyDataArrayBufferFromITK:function(e){o=e,o=function(){for(var t=arguments.length,n=new Array(t),r=0;r{let{webWorker:t,polyData:n}=e;return t.terminate(),n}}}},function(e,t,n){"use strict";var r=n(83),i=n(483),o=n.n(i),a=n(484),s=n.n(a),l=n(325),u=n.n(l),c=n(59),d=n.n(c),p=n(58);t.Z=function(e,t,n,i){var a=e;return(0,r.Z)("Pipeline",a).then((function(e){var r=e.webworkerPromise,l=e.worker;a=l;var c=s()(n),f=null;o().has(i)?f=o().get(i):u().has(c)&&(f=u().get(c)),null===f&&Promise.reject(Error("Could not find IO for: "+n));var h=[n,n+".output.json"],m=[{path:h[1],type:d().vtkPolyData}],g=[{path:h[0],type:d().Binary,data:new Uint8Array(t)}],v=[];return g.forEach((function(e){e.type===d().Binary&&(e.data.buffer?v.push(e.data.buffer):e.data.byteLength&&v.push(e.data))})),r.postMessage({operation:"runPolyDataIOPipeline",config:p.Z,pipelinePath:f,args:h,outputs:m,inputs:g},v).then((function(e){e.stdout,e.stderr;var t=e.outputs;return Promise.resolve({polyData:t[0].data,webWorker:a})}))}))}},function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(129),i=n.n(r),o=n(664),a=(n(326),n(83)),s=n(485),l=n.n(s);function u(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var o=this.workerQueue.pop();i.runningWorkers++,this.fcn.apply(this,[o].concat(d(n))).then((function(n){var o=n.webWorker,a=u(n,["webWorker"]);if(r.workerQueue.push(o),i.runningWorkers--,i.results[t]=a,i.completedTasks++,i.progressCallback&&i.progressCallback(i.completedTasks,i.results.length),i.taskQueue.length>0){var s=i.taskQueue.shift();r.addTask.apply(r,[e].concat(d(s)))}else if(!i.addingTasks&&!i.runningWorkers){var l=i.results,c=i.index;r.runInfo[c]=null,i.resolve(l)}})).catch((function(e){var t=i.reject,n=i.index;r.runInfo[n]=null,t(e)}))}else i.runningWorkers||!0===i.postponed?i.taskQueue.push([t,n]):(i.postponed=!0,setTimeout((function(){i.postponed=!1,r.addTask(i.index,t,n)}),50))}}])&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),g=n(486),v=n(327);var y=function(e){var t=new g(e[0].imageType);t.origin=Array.from(e[0].origin),t.spacing=Array.from(e[0].spacing);var n=t.imageType.dimension;t.direction=new v(n,n),t.direction.data=Array.from(e[0].direction.data);var r=n-1;t.size=Array.from(e[0].size);var i=e.reduce((function(e,t){return e+t.size[r]}),0);t.size[r]=i;var o=t.size.reduce((function(e,t){return e*t}),1)*t.imageType.components;t.data=new e[0].data.constructor(o);for(var a=t.imageType.components,s=0;s2&&void 0!==f[2]&&f[2],o=t,e.next=4,(0,a.Z)("ImageIO",o);case 4:return s=e.sent,l=s.webworkerPromise,u=s.worker,o=u,c=n.map((function(e){return e.data})),d={operation:"readDICOMImageSeries",fileDescriptions:n,singleSortedSeries:r,config:_.Z},e.next=12,l.postMessage(d,c);case 12:return p=e.sent,e.abrupt("return",{image:p,webWorker:o});case 14:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),x=new m(navigator.hardwareConcurrency?navigator.hardwareConcurrency:4,b),w=function(){var e=(0,o.Z)(i().mark((function e(t){var n,r,o,a,s,u,c,d,p,f,h,m=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=m.length>1&&void 0!==m[1]&&m[1],r=Array.from(t,(function(e){return l().readAsArrayBuffer(e).then((function(t){return{name:e.name,type:e.type,data:t}}))})),e.next=4,Promise.all(r);case 4:if(o=e.sent,!n){e.next=16;break}for(a=[],s=0;se+t),0)}}u.property="application";class c extends s.t{constructor(e){super(),this.xs=!1,this.sm=!1,this.md=!1,this.lg=!1,this.xl=!1,this.xsOnly=!1,this.smOnly=!1,this.smAndDown=!1,this.smAndUp=!1,this.mdOnly=!1,this.mdAndDown=!1,this.mdAndUp=!1,this.lgOnly=!1,this.lgAndDown=!1,this.lgAndUp=!1,this.xlOnly=!1,this.name="xs",this.height=0,this.width=0,this.mobile=!0,this.resizeTimeout=0;const{mobileBreakpoint:t,scrollBarWidth:n,thresholds:r}=e[c.property];this.mobileBreakpoint=t,this.scrollBarWidth=n,this.thresholds=r}init(){this.update(),"undefined"!=typeof window&&window.addEventListener("resize",this.onResize.bind(this),{passive:!0})}update(e=!1){const t=e?0:this.getClientHeight(),n=e?0:this.getClientWidth(),r=n=this.thresholds.lg-this.scrollBarWidth;switch(this.height=t,this.width=n,this.xs=r,this.sm=i,this.md=o,this.lg=a,this.xl=s,this.xsOnly=r,this.smOnly=i,this.smAndDown=(r||i)&&!(o||a||s),this.smAndUp=!r&&(i||o||a||s),this.mdOnly=o,this.mdAndDown=(r||i||o)&&!(a||s),this.mdAndUp=!(r||i)&&(o||a||s),this.lgOnly=a,this.lgAndDown=(r||i||o||a)&&!s,this.lgAndUp=!(r||i||o)&&(a||s),this.xlOnly=s,!0){case r:this.name="xs";break;case i:this.name="sm";break;case o:this.name="md";break;case a:this.name="lg";break;default:this.name="xl"}if("number"==typeof this.mobileBreakpoint)return void(this.mobile=nString(t[+n])))}}w.property="lang";var S=n(570);const C=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],T=e=>e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055,M=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],D=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function A(e){const t=Array(3),n=T,r=C;for(let i=0;i<3;++i)t[i]=Math.round(255*(0,a.uZ)(n(r[i][0]*e[0]+r[i][1]*e[1]+r[i][2]*e[2])));return(t[0]<<16)+(t[1]<<8)+(t[2]<<0)}function P(e){const t=[0,0,0],n=D,r=M,i=n((e>>16&255)/255),o=n((e>>8&255)/255),a=n((e>>0&255)/255);for(let e=0;e<3;++e)t[e]=r[e][0]*i+r[e][1]*o+r[e][2]*a;return t}const k=.20689655172413793,L=e=>e>k**3?Math.cbrt(e):e/(3*k**2)+4/29,O=e=>e>k?e**3:3*k**2*(e-4/29);function E(e){const t=L,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function I(e){const t=O,n=(e[0]+16)/116;return[.95047*t(n+e[1]/500),t(n),1.08883*t(n-e[2]/200)]}function N(e,t=!1,n=!0){const{anchor:r,...i}=e,o=Object.keys(i),a={};for(let r=0;r`\n.v-application .${e} {\n background-color: ${t} !important;\n border-color: ${t} !important;\n}\n.v-application .${e}--text {\n color: ${t} !important;\n caret-color: ${t} !important;\n}`,B=(e,t,n)=>{const[r,i]=t.split(/(\d)/,2);return`\n.v-application .${e}.${r}-${i} {\n background-color: ${n} !important;\n border-color: ${n} !important;\n}\n.v-application .${e}--text.text--${r}-${i} {\n color: ${n} !important;\n caret-color: ${n} !important;\n}`},F=(e,t="base")=>`--v-${e}-${t}`,V=(e,t="base")=>`var(${F(e,t)})`;function U(e,t){const n={base:(0,S.I4)(t)};for(let e=5;e>0;--e)n[`lighten${e}`]=(0,S.I4)(G(t,e));for(let e=1;e<=4;++e)n[`darken${e}`]=(0,S.I4)(z(t,e));return n}function G(e,t){const n=E(P(e));return n[0]=n[0]+10*t,A(I(n))}function z(e,t){const n=E(P(e));return n[0]=n[0]-10*t,A(I(n))}class j extends s.t{constructor(e){super(),this.disabled=!1,this.isDark=null,this.unwatch=null,this.vueMeta=null;const{dark:t,disable:n,options:r,themes:i}=e[j.property];this.dark=Boolean(t),this.defaults=this.themes=i,this.options=r,n?this.disabled=!0:this.themes={dark:this.fillVariant(i.dark,!0),light:this.fillVariant(i.light,!1)}}set css(e){this.vueMeta?this.isVueMeta23&&this.applyVueMeta23():this.checkOrCreateStyleElement()&&(this.styleEl.innerHTML=e)}set dark(e){const t=this.isDark;this.isDark=e,null!=t&&this.applyTheme()}get dark(){return Boolean(this.isDark)}applyTheme(){if(this.disabled)return this.clearCss();this.css=this.generatedStyles}clearCss(){this.css=""}init(e,t){this.disabled||(e.$meta?this.initVueMeta(e):t&&this.initSSR(t),this.initTheme(e))}setTheme(e,t){this.themes[e]=Object.assign(this.themes[e],t),this.applyTheme()}resetThemes(){this.themes.light=Object.assign({},this.defaults.light),this.themes.dark=Object.assign({},this.defaults.dark),this.applyTheme()}checkOrCreateStyleElement(){return this.styleEl=document.getElementById("vuetify-theme-stylesheet"),!!this.styleEl||(this.genStyleElement(),Boolean(this.styleEl))}fillVariant(e={},t){const n=this.themes[t?"dark":"light"];return Object.assign({},n,e)}genStyleElement(){"undefined"!=typeof document&&(this.styleEl=document.createElement("style"),this.styleEl.type="text/css",this.styleEl.id="vuetify-theme-stylesheet",this.options.cspNonce&&this.styleEl.setAttribute("nonce",this.options.cspNonce),document.head.appendChild(this.styleEl))}initVueMeta(e){if(this.vueMeta=e.$meta(),this.isVueMeta23)return void e.$nextTick((()=>{this.applyVueMeta23()}));const t="function"==typeof this.vueMeta.getOptions?this.vueMeta.getOptions().keyName:"metaInfo",n=e.$options[t]||{};e.$options[t]=()=>{n.style=n.style||[];const e=n.style.find((e=>"vuetify-theme-stylesheet"===e.id));return e?e.cssText=this.generatedStyles:n.style.push({cssText:this.generatedStyles,type:"text/css",id:"vuetify-theme-stylesheet",nonce:(this.options||{}).cspNonce}),n}}applyVueMeta23(){const{set:e}=this.vueMeta.addApp("vuetify");e({style:[{cssText:this.generatedStyles,type:"text/css",id:"vuetify-theme-stylesheet",nonce:this.options.cspNonce}]})}initSSR(e){const t=this.options.cspNonce?` nonce="${this.options.cspNonce}"`:"";e.head=e.head||"",e.head+=``}initTheme(e){"undefined"!=typeof document&&(this.unwatch&&(this.unwatch(),this.unwatch=null),e.$once("hook:created",(()=>{const t=r.default.observable({themes:this.themes});this.unwatch=e.$watch((()=>t.themes),(()=>this.applyTheme()),{deep:!0})})),this.applyTheme())}get currentTheme(){const e=this.dark?"dark":"light";return this.themes[e]}get generatedStyles(){const e=this.parsedTheme,t=this.options||{};let n;return null!=t.themeCache&&(n=t.themeCache.get(e),null!=n)||(n=function(e,t=!1){const{anchor:n,...r}=e,i=Object.keys(r);if(!i.length)return"";let o="",s="";s+=`.v-application a { color: ${t?V("anchor"):n}; }`,t&&(o+=` ${F("anchor")}: ${n};\n`);for(let n=0;n{const r=this.framework[n];r.framework=this.framework,r.init(e,t)})),this.framework.rtl=Boolean(this.preset.rtl)}use(e){const t=e.property;this.installed.includes(t)||(this.framework[t]=new e(this.preset,this),this.installed.push(t))}}H.install=function e(t,n={}){if(e.installed)return;e.installed=!0,r.default!==t&&(0,i.N6)("Multiple instances of Vue detected\nSee https://github.com/vuetifyjs/vuetify/issues/4068\n\nIf you're seeing \"$attrs is readonly\", it's caused by this");const o=n.components||{},a=n.directives||{};for(const e in a){const n=a[e];t.directive(e,n)}!function e(n){if(n){for(const r in n){const i=n[r];i&&!e(i.$_vuetify_subcomponents)&&t.component(r,i)}return!0}return!1}(o),t.$_vuetify_installed||(t.$_vuetify_installed=!0,t.mixin({beforeCreate(){const e=this.$options;e.vuetify?(e.vuetify.init(this,this.$ssrContext),this.$vuetify=t.observable(e.vuetify.framework)):this.$vuetify=e.parent&&e.parent.$vuetify||this},beforeMount(){this.$options.vuetify&&this.$el&&this.$el.hasAttribute("data-server-rendered")&&(this.$vuetify.isHydrating=!0,this.$vuetify.breakpoint.update(!0))},mounted(){this.$options.vuetify&&this.$vuetify.isHydrating&&(this.$vuetify.isHydrating=!1,this.$vuetify.breakpoint.update())}}))},H.installed=!1,H.version="2.6.9",H.config={silent:!1}},function(e,t,n){"use strict";n.d(t,{t:function(){return r}});class r{constructor(){this.framework={}}init(e,t){}}},function(e,t,n){"use strict";n.d(t,{Ji:function(){return i},qh:function(){return o},e$:function(){return a},lj:function(){return s},qw:function(){return l},vZ:function(){return u},vO:function(){return c},qF:function(){return d},MT:function(){return p},KK:function(){return f},r:function(){return m},ji:function(){return g},kb:function(){return v},GL:function(){return y},Do:function(){return b},RB:function(){return x},XP:function(){return w},_A:function(){return C},jC:function(){return T},sD:function(){return M},TI:function(){return D},xl:function(){return A},f9:function(){return P},KT:function(){return k},sp:function(){return L},FT:function(){return O},z9:function(){return E},uZ:function(){return I},$x:function(){return N},Ee:function(){return R},kg:function(){return B},iZ:function(){return F}});var r=n(490);function i(e,t="div",n){return r.default.extend({name:n||e.replace(/__/g,"-"),functional:!0,props:{tag:{type:String,default:t}},render:(t,{data:n,props:r,children:i})=>(n.staticClass=`${e} ${n.staticClass||""}`.trim(),t(r.tag,n,i))})}function o(e,t,n,r=!1){const i=o=>{n(o),e.removeEventListener(t,i,r)};e.addEventListener(t,i,r)}let a=!1;try{if("undefined"!=typeof window){const e=Object.defineProperty({},"passive",{get:()=>{a=!0}});window.addEventListener("testListener",e,e),window.removeEventListener("testListener",e,e)}}catch(e){console.warn(e)}function s(e,t,n,r){e.addEventListener(t,n,!!a&&r)}function l(e,t,n){const r=t.length-1;if(r<0)return void 0===e?n:e;for(let i=0;iu(e[n],t[n])))}function c(e,t,n){return null!=e&&t&&"string"==typeof t?void 0!==e[t]?e[t]:l(e,(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),n):n}function d(e,t,n){if(null==t)return void 0===e?n:e;if(e!==Object(e))return void 0===n?e:n;if("string"==typeof t)return c(e,t,n);if(Array.isArray(t))return l(e,t,n);if("function"!=typeof t)return n;const r=t(e,n);return void 0===r?n:r}function p(e){return Array.from({length:e},((e,t)=>t))}function f(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return 0;const t=+window.getComputedStyle(e).getPropertyValue("z-index");return t||f(e.parentNode)}const h={"&":"&","<":"<",">":">"};function m(e){return e.replace(/[&<>]/g,(e=>h[e]||e))}function g(e,t){const n={};for(let r=0;re.replace(S,((e,t)=>t?t.toUpperCase():""));function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}function M(e,t,n){const r=t[0],i=[];let o;for(let t=0;t{for(let a=0;a(e||"").toString().toLocaleLowerCase())),l!==u)return isNaN(l)||isNaN(u)?o.compare(l,u):Number(l)-Number(u)}}return 0}))}function P(e,t,n){return null!=e&&null!=t&&"boolean"!=typeof e&&-1!==e.toString().toLocaleLowerCase().indexOf(t.toLocaleLowerCase())}function k(e,t){return t?""===(t=t.toString().toLowerCase()).trim()?e:e.filter((e=>Object.keys(e).some((n=>P(c(e,n),t))))):e}function L(e,t,n){return e.$slots.hasOwnProperty(t)&&e.$scopedSlots.hasOwnProperty(t)&&e.$scopedSlots[t].name?n?"v-slot":"scoped":e.$slots.hasOwnProperty(t)?"normal":e.$scopedSlots.hasOwnProperty(t)?"scoped":void 0}function O(e,t){return Object.keys(t).filter((t=>t.startsWith(e))).reduce(((n,r)=>(n[r.replace(e,"")]=t[r],n)),{})}function E(e,t="default",n,r=!1){return e.$scopedSlots.hasOwnProperty(t)?e.$scopedSlots[t](n instanceof Function?n():n):!e.$slots.hasOwnProperty(t)||n&&!r?void 0:e.$slots[t]}function I(e,t=0,n=1){return Math.max(t,Math.min(n,e))}function N(e){return e?Object.keys(e).reduce(((t,n)=>(t[C(n)]=e[n],t)),{}):{}}function R(e={},t={}){for(const n in t){const r=e[n],i=t[n];_(r)&&_(i)?e[n]=R(r,i):e[n]=i}return e}function B(e,t){return Array(e).fill(t)}function F(e){if(e.composedPath)return e.composedPath();const t=[];let n=e.target;for(;n;){if(t.push(n),"HTML"===n.tagName)return t.push(document),t.push(window),t;n=n.parentElement}return t}},function(e,t,n){"use strict";n.d(t,{Kd:function(){return o},N6:function(){return a},Rn:function(){return s},fK:function(){return l},Jk:function(){return u}});var r=n(563);function i(e,t,n){if(!r.Z.config.silent){if(n&&(t={_isVue:!0,$parent:n,$options:t}),t){if(t.$_alreadyWarned=t.$_alreadyWarned||[],t.$_alreadyWarned.includes(e))return;t.$_alreadyWarned.push(e)}return`[Vuetify] ${e}`+(t?function(e){if(e._isVue&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}n>0&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return"\n\nfound in\n\n"+t.map(((e,t)=>`${0===t?"---\x3e ":" ".repeat(5+2*t)}${Array.isArray(e)?`${d(e[0])}... (${e[1]} recursive calls)`:d(e)}`)).join("\n")}return`\n\n(found in ${d(e)})`}(t):"")}}function o(e,t,n){const r=i(e,t,n);null!=r&&console.warn(r)}function a(e,t,n){const r=i(e,t,n);null!=r&&console.error(r)}function s(e,t,n,r){o(`[UPGRADE] '${e}' is deprecated, use '${t}' instead.`,n,r)}function l(e,t,n,r){a(`[BREAKING] '${e}' has been removed, use '${t}' instead. For more information, see the upgrade guide https://github.com/vuetifyjs/vuetify/releases/tag/v2.0.0#user-content-upgrade-guide`,n,r)}function u(e,t,n){o(`[REMOVED] '${e}' has been removed. You can safely omit it.`,t,n)}const c=/(?:^|[-_])(\w)/g;function d(e,t){if(e.$root===e)return"";const n="function"==typeof e&&null!=e.cid?e.options:e._isVue?e.$options||e.constructor.options:e||{};let r=n.name||n._componentTag;const i=n.__file;if(!r&&i){const e=i.match(/([^/\\]+)\.vue$/);r=e&&e[1]}return(r?`<${o=r,o.replace(c,(e=>e.toUpperCase())).replace(/[-_]/g,"")}>`:"")+(i&&!1!==t?` at ${i}`:"");var o}},function(e,t,n){"use strict";n.d(t,{A:function(){return w},Z:function(){return x}});var r={};n.r(r),n.d(r,{easeInCubic:function(){return u},easeInOutCubic:function(){return d},easeInOutQuad:function(){return l},easeInOutQuart:function(){return h},easeInOutQuint:function(){return v},easeInQuad:function(){return a},easeInQuart:function(){return p},easeInQuint:function(){return m},easeOutCubic:function(){return c},easeOutQuad:function(){return s},easeOutQuart:function(){return f},easeOutQuint:function(){return g},linear:function(){return o}});var i=n(564);const o=e=>e,a=e=>e**2,s=e=>e*(2-e),l=e=>e<.5?2*e**2:(4-2*e)*e-1,u=e=>e**3,c=e=>--e**3+1,d=e=>e<.5?4*e**3:(e-1)*(2*e-2)*(2*e-2)+1,p=e=>e**4,f=e=>1- --e**4,h=e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,m=e=>e**5,g=e=>1+--e**5,v=e=>e<.5?16*e**5:1+16*--e**5;function y(e){if("number"==typeof e)return e;let t=b(e);if(!t)throw"string"==typeof e?new Error(`Target element "${e}" not found.`):new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${_(e)} instead.`);let n=0;for(;t;)n+=t.offsetTop,t=t.offsetParent;return n}function _(e){return null==e?e:e.constructor.name}function b(e){return"string"==typeof e?document.querySelector(e):e&&e._isVue?e.$el:e instanceof HTMLElement?e:null}function x(e,t={}){const n={container:document.scrollingElement||document.body||document.documentElement,duration:500,offset:0,easing:"easeInOutCubic",appOffset:!0,...t},i=function(e){const t=b(e);if(t)return t;throw"string"==typeof e?new Error(`Container element "${e}" not found.`):new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${_(e)} instead.`)}(n.container);if(n.appOffset&&x.framework.application){const e=i.classList.contains("v-navigation-drawer"),t=i.classList.contains("v-navigation-drawer--clipped"),{bar:r,top:o}=x.framework.application;n.offset+=r,e&&!t||(n.offset+=o)}const o=performance.now();let a;a="number"==typeof e?y(e)-n.offset:y(e)-y(i)-n.offset;const s=i.scrollTop;if(a===s)return Promise.resolve(a);const l="function"==typeof n.easing?n.easing:r[n.easing];if(!l)throw new TypeError(`Easing function "${n.easing}" not found.`);return new Promise((e=>requestAnimationFrame((function t(r){const u=r-o,c=Math.abs(n.duration?Math.min(u/n.duration,1):1);i.scrollTop=Math.floor(s+(a-s)*l(c));const d=(i===document.body?document.documentElement.clientHeight:i.clientHeight)+i.scrollTop>=i.scrollHeight;if(1===c||a>i.scrollTop&&d)return e(a);requestAnimationFrame(t)}))))}x.framework={},x.init=()=>{};class w extends i.t{constructor(){return super(),x}}w.property="goTo"},,function(e,t,n){"use strict";n.d(t,{ZP:function(){return b}});var r=n(0),i=n(15),o=n(5),a=n(4);const{vtkErrorMacro:s}=r.m,l={Unknown:0,Scalar:1,RGB:2,RGBA:3,Offset:4,Vector:5,Point:6,CovariantVector:7,SymmetricSecondRankTensor:8,DiffusionTensor3D:9,Complex:10,FixedArray:11,Array:12,Matrix:13,VariableLengthVector:14,VariableSizeMatrix:15},u={Unknown:"Unknown",Scalar:"Scalar",RGB:"RGB",RGBA:"RGBA",Offset:"Offset",Vector:"Vector",Point:"Point",CovariantVector:"CovariantVector",SymmetricSecondRankTensor:"SymmetricSecondRankTensor",DiffusionTensor3D:"DiffusionTensor3D",Complex:"Complex",FixedArray:"FixedArray",Array:"Array",Matrix:"Matrix",VariableLengthVector:"VariableLengthVector",VariableSizeMatrix:"VariableSizeMatrix"},c=new Map([["Uint8Array","uint8"],["Int8Array","int8"],["Uint16Array","uint16"],["Int16Array","int16"],["Uint32Array","uint32"],["Int32Array","int32"],["Float32Array","float32"],["Float64Array","float64"]]),d=new Map([["uint8","Uint8Array"],["int8","Int8Array"],["uint16","Uint16Array"],["int16","Int16Array"],["uint32","Uint32Array"],["int32","Int32Array"],["float32","Float32Array"],["float64","Float64Array"]]);var p={convertItkToVtkImage:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={origin:[0,0,0],spacing:[1,1,1]},r=[1,1,1],o=[1,0,0,0,1,0,0,0,1],c=void 0===e.direction.data,d=c?u:l;for(let t=0;t1&&void 0!==arguments[1]&&arguments[1];const n=3,r={imageType:{dimension:n,pixelType:u.Scalar,componentType:"",components:1},name:"vtkImageData",origin:e.getOrigin(),spacing:e.getSpacing(),direction:new Float64Array(9),size:e.getDimensions()},i=e.getDirection();for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:{};const n=[];e.pointData.length&&n.push({data:{vtkClass:"vtkDataArray",name:t.pointDataName||"PointData",numberOfComponents:e.polyDataType.pointPixelComponents,size:e.pointData.length,dataType:d.get(e.polyDataType.pointPixelComponentType),buffer:e.pointData.buffer,values:e.pointData}});const r=[];e.cellData.length&&r.push({data:{vtkClass:"vtkDataArray",name:t.cellDataName||"CellData",numberOfComponents:e.polyDataType.pointPixelComponents,size:e.cellData.length,dataType:d.get(e.polyDataType.pointPixelComponentType),buffer:e.cellData.buffer,values:e.cellData}});const i={points:{vtkClass:"vtkPoints",name:"_points",numberOfComponents:3,size:e.numberOfPoints,dataType:"Float32Array",buffer:e.points.buffer,values:e.points},verts:{vtkClass:"vtkCellArray",name:"_verts",numberOfComponents:1,size:e.verticesBufferSize,dataType:"Uint32Array",buffer:e.vertices.buffer,values:e.vertices},lines:{vtkClass:"vtkCellArray",name:"_lines",numberOfComponents:1,size:e.linesBufferSize,dataType:"Uint32Array",buffer:e.lines.buffer,values:e.lines},polys:{vtkClass:"vtkCellArray",name:"_polys",numberOfComponents:1,size:e.polygonsBufferSize,dataType:"Uint32Array",buffer:e.polygons.buffer,values:e.polygons},strips:{vtkClass:"vtkCellArray",name:"_strips",numberOfComponents:1,size:e.triangleStripsBufferSize,dataType:"Uint32Array",buffer:e.triangleStrips.buffer,values:e.triangleStrips},pointData:{vtkClass:"vtkDataSetAttributes",activeGlobalIds:-1,activeNormals:-1,activePedigreeIds:-1,activeScalars:-1,activeTCoords:-1,activeTensors:-1,activeVectors:-1,copyFieldFlags:[],doCopyAllOff:!1,doCopyAllOn:!0,arrays:n},cellData:{vtkClass:"vtkDataSetAttributes",activeGlobalIds:-1,activeNormals:-1,activePedigreeIds:-1,activeScalars:-1,activeTCoords:-1,activeTensors:-1,activeVectors:-1,copyFieldFlags:[],doCopyAllOff:!1,doCopyAllOn:!0,arrays:r}},a=o.ZP.newInstance(i),l=a.getPointData(),c=a.getCellData();if(e.pointData.length)switch(u[e.polyDataType.pointPixelType]){case u.Scalar:l.setScalars(l.getArrayByIndex(0));break;case u.RGB:case u.RGBA:case u.Offset:case u.Point:case u.Complex:case u.FixedArray:case u.Array:case u.Matrix:case u.VariableLengthVector:case u.VariableSizeMatrix:break;case u.Vector:case u.CovariantVector:3===e.polyDataType.pointPixelComponents&&l.setVectors(l.getArrayByIndex(0));break;case u.SymmetricSecondRankTensor:case u.DiffusionTensor3D:6===e.polyDataType.pointPixelComponents&&l.setTensors(l.getArrayByIndex(0));break;default:return s(`Cannot handle unexpected itk-wasm pixel type ${e.polyDataType.pointPixelType}`),null}if(e.cellData.length)switch(u[e.polyDataType.cellPixelType]){case u.Scalar:c.setScalars(c.getArrayByIndex(0));break;case u.RGB:case u.RGBA:case u.Offset:case u.Point:case u.Complex:case u.FixedArray:case u.Array:case u.Matrix:case u.VariableLengthVector:case u.VariableSizeMatrix:break;case u.Vector:case u.CovariantVector:3===e.polyDataType.pointPixelComponents&&c.setVectors(c.getArrayByIndex(0));break;case u.SymmetricSecondRankTensor:case u.DiffusionTensor3D:6===e.polyDataType.pointPixelComponents&&c.setTensors(c.getArrayByIndex(0));break;default:return s(`Cannot handle unexpected itk-wasm pixel type ${e.polyDataType.pointPixelType}`),null}return a},convertVtkToItkPolyData:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={polyDataType:{pointPixelComponentType:"float32",pointPixelComponents:1,pointPixelType:"Scalar",cellPixelComponentType:"float32",cellPixelComponents:1,cellPixelType:"Scalar"},numberOfPoints:e.getNumberOfPoints(),points:e.getPoints().getData(),verticesBufferSize:e.getVerts().getNumberOfValues(),vertices:e.getVerts().getData(),linesBufferSize:e.getLines().getNumberOfValues(),lines:e.getLines().getData(),polygonsBufferSize:e.getPolys().getNumberOfValues(),polygons:e.getPolys().getData(),triangleStripsBufferSize:e.getStrips().getNumberOfValues(),triangleStrips:e.getStrips().getData(),numberOfPointPixels:0,pointData:new Float32Array,numberOfCellPixels:0,cellData:new Float32Array},r=e.getPointData();if(r.getNumberOfArrays()){const e=t.pointDataName?r.getArrayByName(t.pointDataName):r.getArrayByIndex(0);n.numberOfPointPixels=e.getNumberOfTuples(),n.pointData=e.getData(),n.polyDataType.pointPixelComponentType=c.get(e.getDataType()),n.polyDataType.cellPixelComponentType=n.polyDataType.pointPixelComponentType,n.polyDataType.pointPixelComponents=e.getNumberOfComponents(),n.polyDataType.cellPixelComponents=n.polyDataType.pointPixelComponents,r.getTensors()===e?n.polyDataType.pointPixelType=u.SymmetricSecondRankTensor:r.getVectors()===e&&(n.polyDataType.pointPixelType=u.Vector),n.polyDataType.cellPixelType=n.polyDataType.pointPixelType}const i=e.getCellData();if(i.getNumberOfArrays()){const e=t.cellDataName?r.getArrayByName(t.cellDataName):r.getArrayByIndex(0);n.numberOfCellPixels=e.getNumberOfTuples(),n.cellData=e.getData(),n.polyDataType.cellPixelComponentType=c.get(e.getDataType()),n.polyDataType.cellPixelComponents=e.getNumberOfComponents(),i.getTensors()===e?n.polyDataType.cellPixelType=u.SymmetricSecondRankTensor:i.getVectors()===e?n.polyDataType.cellPixelType=u.Vector:n.polyDataType.cellPixelType=u.Scalar}return n}};const{convertItkToVtkImage:f}=p;let h=null,m=e=>e;function g(e){const t=e.lastIndexOf(".");return`Scalars ${t>-1?e.substring(0,t):e}`}function v(e,t){t.classHierarchy.push("vtkITKImageReader"),e.parseAsArrayBuffer=n=>n&&n!==t.rawDataBuffer?(t.rawDataBuffer=n,h(n,t.fileName).then(m).then((n=>{const r=f(n,{scalarArrayName:t.arrayName||g(t.fileName)});t.output[0]=r,e.modified()}))):Promise.resolve(),e.requestData=(n,r)=>{e.parseAsArrayBuffer(t.rawDataBuffer,t.fileName)}}const y={fileName:"",arrayName:null};function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,y,n),r.m.obj(e,t),r.m.algo(e,t,0,1),r.m.setGet(e,t,["fileName","arrayName"]),v(e,t),h||console.error("\n // Dependency needs to be added inside your project\n import readImageArrayBuffer from 'itk/readImageArrayBuffer';\n vtkITKImageReader.setReadImageArrayBufferFromITK(readImageArrayBuffer);\n ")}var b={newInstance:r.m.newInstance(_,"vtkITKImageReader"),extend:_,setReadImageArrayBufferFromITK:function(e){h=e,4===h.length&&(h=function(){for(var t=arguments.length,n=new Array(t),r=0;r{let{webWorker:t,image:n}=e;return t.terminate(),n})}}},function(e,t,n){"use strict";n.d(t,{NA:function(){return i},jx:function(){return o},I4:function(){return a},hq:function(){return s}});var r=n(566);function i(e){return!!e&&!!e.match(/^(#|var\(--|(rgb|hsl)a?\()/)}function o(e){let t;if("number"==typeof e)t=e;else{if("string"!=typeof e)throw new TypeError(`Colors can only be numbers or strings, recieved ${null==e?e:e.constructor.name} instead`);{let n="#"===e[0]?e.substring(1):e;3===n.length&&(n=n.split("").map((e=>e+e)).join("")),6!==n.length&&(0,r.Kd)(`'${e}' is not a valid rgb color`),t=parseInt(n,16)}}return t<0?((0,r.Kd)(`Colors cannot be negative: '${e}'`),t=0):(t>16777215||isNaN(t))&&((0,r.Kd)(`'${e}' is not a valid rgb color`),t=16777215),t}function a(e){let t=e.toString(16);return t.length<6&&(t="0".repeat(6-t.length)+t),"#"+t}function s(e){return a(o(e))}},function(e,t,n){"use strict";n.d(t,{YW:function(){return u},sz:function(){return c},ZP:function(){return h}});var r=n(330),i=n.n(r),o=n(348),a=n.n(o),s=n(42),l=n(490);const u="#girderToken=",c="__",d="Girder-Token";function p(e){a().set("girderToken",e.token,{expires:new Date(e.expires)})}function f(e){const t=e.hash.split(u),n=t[t.length-1].split(c)[0];if(64===n.length){const t=new Date;t.setDate((new Date).getDate()+365),p({token:n,expires:t}),e.hash=e.hash.replace(`${u}${n}${c}`,"")}return n}class h extends l.default{constructor({apiRoot:e="/api/v1",token:t=a().get("girderToken")||f(window.location),axios:n=i().create(),authenticateWithCredentials:r=!1,useGirderAuthorizationHeader:o=!1,setLocalCookie:s=!0}={}){super({data:{user:null,token:t}}),Object.assign(this,n,{apiRoot:e,setLocalCookie:s,authenticateWithCredentials:r,useGirderAuthorizationHeader:o}),this.interceptors.request.use((e=>({...e,baseURL:this.apiRoot,headers:{[d]:this.token,...e.headers}})))}async login(e,t,n=null){try{await this.logout()}catch(e){}let r;const i={[d]:null};this.useGirderAuthorizationHeader?i["Girder-Authorization"]=`Basic ${window.btoa(`${e}:${t}`)}`:r={username:e,password:t},n&&(i["Girder-OTP"]=n);const o=await this.get("user/authentication",{headers:i,auth:r,withCredentials:this.authenticateWithCredentials});return this.token=o.data.authToken.token,this.user=o.data.user,this.setLocalCookie&&p(o.data.authToken),this.$emit("login",this.user),o}async logout(){if(this.token)try{await this.delete("user/authentication")}catch(e){if(401!==e.response.status)throw e}finally{this.token=null,this.user=null,a().remove("girderToken"),this.$emit("logout")}}async fetchUser(){const e=await this.get("user/me");return this.user=e.data,null===this.user&&(this.token=null),this.user}async register(e,t,n,r,i,o=!1){const a=await this.post("user",(0,s.stringify)({login:e,email:t,firstName:n,lastName:r,password:i,admin:o}));return a.data.authToken?(this.token=a.data.authToken.token,this.user=a.data,this.setLocalCookie&&p(a.data.authToken),this.$emit("register",this.user),this.$emit("login",this.user),a):a}}},function(e,t,n){"use strict";n.r(t),n.d(t,{create:function(){return i},clone:function(){return o},copy:function(){return a},fromValues:function(){return s},set:function(){return l},identity:function(){return u},transpose:function(){return c},invert:function(){return d},adjoint:function(){return p},determinant:function(){return f},multiply:function(){return h},translate:function(){return m},scale:function(){return g},rotate:function(){return v},rotateX:function(){return y},rotateY:function(){return _},rotateZ:function(){return b},fromTranslation:function(){return x},fromScaling:function(){return w},fromRotation:function(){return S},fromXRotation:function(){return C},fromYRotation:function(){return T},fromZRotation:function(){return M},fromRotationTranslation:function(){return D},fromQuat2:function(){return A},getTranslation:function(){return P},getScaling:function(){return k},getRotation:function(){return L},fromRotationTranslationScale:function(){return O},fromRotationTranslationScaleOrigin:function(){return E},fromQuat:function(){return I},frustum:function(){return N},perspectiveNO:function(){return R},perspective:function(){return B},perspectiveZO:function(){return F},perspectiveFromFieldOfView:function(){return V},orthoNO:function(){return U},ortho:function(){return G},orthoZO:function(){return z},lookAt:function(){return j},targetTo:function(){return Y},str:function(){return H},frob:function(){return W},add:function(){return $},subtract:function(){return Z},multiplyScalar:function(){return K},multiplyScalarAndAdd:function(){return q},exactEquals:function(){return X},equals:function(){return J},mul:function(){return Q},sub:function(){return ee}});var r=n(573);function i(){var e=new r.WT(16);return r.WT!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function o(e){var t=new r.WT(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function s(e,t,n,i,o,a,s,l,u,c,d,p,f,h,m,g){var v=new r.WT(16);return v[0]=e,v[1]=t,v[2]=n,v[3]=i,v[4]=o,v[5]=a,v[6]=s,v[7]=l,v[8]=u,v[9]=c,v[10]=d,v[11]=p,v[12]=f,v[13]=h,v[14]=m,v[15]=g,v}function l(e,t,n,r,i,o,a,s,l,u,c,d,p,f,h,m,g){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e[9]=c,e[10]=d,e[11]=p,e[12]=f,e[13]=h,e[14]=m,e[15]=g,e}function u(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function c(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function d(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],p=t[10],f=t[11],h=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*a,_=n*l-i*a,b=n*u-o*a,x=r*l-i*s,w=r*u-o*s,S=i*u-o*l,C=c*m-d*h,T=c*g-p*h,M=c*v-f*h,D=d*g-p*m,A=d*v-f*m,P=p*v-f*g,k=y*P-_*A+b*D+x*M-w*T+S*C;return k?(k=1/k,e[0]=(s*P-l*A+u*D)*k,e[1]=(i*A-r*P-o*D)*k,e[2]=(m*S-g*w+v*x)*k,e[3]=(p*w-d*S-f*x)*k,e[4]=(l*M-a*P-u*T)*k,e[5]=(n*P-i*M+o*T)*k,e[6]=(g*b-h*S-v*_)*k,e[7]=(c*S-p*b+f*_)*k,e[8]=(a*A-s*M+u*C)*k,e[9]=(r*M-n*A-o*C)*k,e[10]=(h*w-m*b+v*y)*k,e[11]=(d*b-c*w-f*y)*k,e[12]=(s*T-a*D-l*C)*k,e[13]=(n*D-r*T+i*C)*k,e[14]=(m*_-h*x-g*y)*k,e[15]=(c*x-d*_+p*y)*k,e):null}function p(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],p=t[10],f=t[11],h=t[12],m=t[13],g=t[14],v=t[15];return e[0]=s*(p*v-f*g)-d*(l*v-u*g)+m*(l*f-u*p),e[1]=-(r*(p*v-f*g)-d*(i*v-o*g)+m*(i*f-o*p)),e[2]=r*(l*v-u*g)-s*(i*v-o*g)+m*(i*u-o*l),e[3]=-(r*(l*f-u*p)-s*(i*f-o*p)+d*(i*u-o*l)),e[4]=-(a*(p*v-f*g)-c*(l*v-u*g)+h*(l*f-u*p)),e[5]=n*(p*v-f*g)-c*(i*v-o*g)+h*(i*f-o*p),e[6]=-(n*(l*v-u*g)-a*(i*v-o*g)+h*(i*u-o*l)),e[7]=n*(l*f-u*p)-a*(i*f-o*p)+c*(i*u-o*l),e[8]=a*(d*v-f*m)-c*(s*v-u*m)+h*(s*f-u*d),e[9]=-(n*(d*v-f*m)-c*(r*v-o*m)+h*(r*f-o*d)),e[10]=n*(s*v-u*m)-a*(r*v-o*m)+h*(r*u-o*s),e[11]=-(n*(s*f-u*d)-a*(r*f-o*d)+c*(r*u-o*s)),e[12]=-(a*(d*g-p*m)-c*(s*g-l*m)+h*(s*p-l*d)),e[13]=n*(d*g-p*m)-c*(r*g-i*m)+h*(r*p-i*d),e[14]=-(n*(s*g-l*m)-a*(r*g-i*m)+h*(r*l-i*s)),e[15]=n*(s*p-l*d)-a*(r*p-i*d)+c*(r*l-i*s),e}function f(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],d=e[10],p=e[11],f=e[12],h=e[13],m=e[14],g=e[15];return(t*a-n*o)*(d*g-p*m)-(t*s-r*o)*(c*g-p*h)+(t*l-i*o)*(c*m-d*h)+(n*s-r*a)*(u*g-p*f)-(n*l-i*a)*(u*m-d*f)+(r*l-i*s)*(u*h-c*f)}function h(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],p=t[9],f=t[10],h=t[11],m=t[12],g=t[13],v=t[14],y=t[15],_=n[0],b=n[1],x=n[2],w=n[3];return e[0]=_*r+b*s+x*d+w*m,e[1]=_*i+b*l+x*p+w*g,e[2]=_*o+b*u+x*f+w*v,e[3]=_*a+b*c+x*h+w*y,_=n[4],b=n[5],x=n[6],w=n[7],e[4]=_*r+b*s+x*d+w*m,e[5]=_*i+b*l+x*p+w*g,e[6]=_*o+b*u+x*f+w*v,e[7]=_*a+b*c+x*h+w*y,_=n[8],b=n[9],x=n[10],w=n[11],e[8]=_*r+b*s+x*d+w*m,e[9]=_*i+b*l+x*p+w*g,e[10]=_*o+b*u+x*f+w*v,e[11]=_*a+b*c+x*h+w*y,_=n[12],b=n[13],x=n[14],w=n[15],e[12]=_*r+b*s+x*d+w*m,e[13]=_*i+b*l+x*p+w*g,e[14]=_*o+b*u+x*f+w*v,e[15]=_*a+b*c+x*h+w*y,e}function m(e,t,n){var r,i,o,a,s,l,u,c,d,p,f,h,m=n[0],g=n[1],v=n[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],p=t[9],f=t[10],h=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=d,e[9]=p,e[10]=f,e[11]=h,e[12]=r*m+s*g+d*v+t[12],e[13]=i*m+l*g+p*v+t[13],e[14]=o*m+u*g+f*v+t[14],e[15]=a*m+c*g+h*v+t[15]),e}function g(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function v(e,t,n,i){var o,a,s,l,u,c,d,p,f,h,m,g,v,y,_,b,x,w,S,C,T,M,D,A,P=i[0],k=i[1],L=i[2],O=Math.hypot(P,k,L);return O0?(n[0]=2*(l*s+d*i+u*a-c*o)/p,n[1]=2*(u*s+d*o+c*i-l*a)/p,n[2]=2*(c*s+d*a+l*o-u*i)/p):(n[0]=2*(l*s+d*i+u*a-c*o),n[1]=2*(u*s+d*o+c*i-l*a),n[2]=2*(c*s+d*a+l*o-u*i)),D(e,t,n),e}function P(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function k(e,t){var n=t[0],r=t[1],i=t[2],o=t[4],a=t[5],s=t[6],l=t[8],u=t[9],c=t[10];return e[0]=Math.hypot(n,r,i),e[1]=Math.hypot(o,a,s),e[2]=Math.hypot(l,u,c),e}function L(e,t){var n=new r.WT(3);k(n,t);var i=1/n[0],o=1/n[1],a=1/n[2],s=t[0]*i,l=t[1]*o,u=t[2]*a,c=t[4]*i,d=t[5]*o,p=t[6]*a,f=t[8]*i,h=t[9]*o,m=t[10]*a,g=s+d+m,v=0;return g>0?(v=2*Math.sqrt(g+1),e[3]=.25*v,e[0]=(p-h)/v,e[1]=(f-u)/v,e[2]=(l-c)/v):s>d&&s>m?(v=2*Math.sqrt(1+s-d-m),e[3]=(p-h)/v,e[0]=.25*v,e[1]=(l+c)/v,e[2]=(f+u)/v):d>m?(v=2*Math.sqrt(1+d-s-m),e[3]=(f-u)/v,e[0]=(l+c)/v,e[1]=.25*v,e[2]=(p+h)/v):(v=2*Math.sqrt(1+m-s-d),e[3]=(l-c)/v,e[0]=(f+u)/v,e[1]=(p+h)/v,e[2]=.25*v),e}function O(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3],l=i+i,u=o+o,c=a+a,d=i*l,p=i*u,f=i*c,h=o*u,m=o*c,g=a*c,v=s*l,y=s*u,_=s*c,b=r[0],x=r[1],w=r[2];return e[0]=(1-(h+g))*b,e[1]=(p+_)*b,e[2]=(f-y)*b,e[3]=0,e[4]=(p-_)*x,e[5]=(1-(d+g))*x,e[6]=(m+v)*x,e[7]=0,e[8]=(f+y)*w,e[9]=(m-v)*w,e[10]=(1-(d+h))*w,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function E(e,t,n,r,i){var o=t[0],a=t[1],s=t[2],l=t[3],u=o+o,c=a+a,d=s+s,p=o*u,f=o*c,h=o*d,m=a*c,g=a*d,v=s*d,y=l*u,_=l*c,b=l*d,x=r[0],w=r[1],S=r[2],C=i[0],T=i[1],M=i[2],D=(1-(m+v))*x,A=(f+b)*x,P=(h-_)*x,k=(f-b)*w,L=(1-(p+v))*w,O=(g+y)*w,E=(h+_)*S,I=(g-y)*S,N=(1-(p+m))*S;return e[0]=D,e[1]=A,e[2]=P,e[3]=0,e[4]=k,e[5]=L,e[6]=O,e[7]=0,e[8]=E,e[9]=I,e[10]=N,e[11]=0,e[12]=n[0]+C-(D*C+k*T+E*M),e[13]=n[1]+T-(A*C+L*T+I*M),e[14]=n[2]+M-(P*C+O*T+N*M),e[15]=1,e}function I(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,d=r*s,p=i*a,f=i*s,h=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-h,e[1]=c+v,e[2]=p-g,e[3]=0,e[4]=c-v,e[5]=1-u-h,e[6]=f+m,e[7]=0,e[8]=p+g,e[9]=f-m,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function N(e,t,n,r,i,o,a){var s=1/(n-t),l=1/(i-r),u=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*l,e[10]=(a+o)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*u,e[15]=0,e}function R(e,t,n,r,i){var o,a=1/Math.tan(t/2);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(o=1/(r-i),e[10]=(i+r)*o,e[14]=2*i*r*o):(e[10]=-1,e[14]=-2*r),e}var B=R;function F(e,t,n,r,i){var o,a=1/Math.tan(t/2);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(o=1/(r-i),e[10]=i*o,e[14]=i*r*o):(e[10]=-1,e[14]=-r),e}function V(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(i+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(i-o)*u*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e}function U(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*u,e[15]=1,e}var G=U;function z(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=u,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=o*u,e[15]=1,e}function j(e,t,n,i){var o,a,s,l,c,d,p,f,h,m,g=t[0],v=t[1],y=t[2],_=i[0],b=i[1],x=i[2],w=n[0],S=n[1],C=n[2];return Math.abs(g-w)0&&(c*=f=1/Math.sqrt(f),d*=f,p*=f);var h=l*p-u*d,m=u*c-s*p,g=s*d-l*c;return(f=h*h+m*m+g*g)>0&&(h*=f=1/Math.sqrt(f),m*=f,g*=f),e[0]=h,e[1]=m,e[2]=g,e[3]=0,e[4]=d*g-p*m,e[5]=p*h-c*g,e[6]=c*m-d*h,e[7]=0,e[8]=c,e[9]=d,e[10]=p,e[11]=0,e[12]=i,e[13]=o,e[14]=a,e[15]=1,e}function H(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function W(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function $(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e}function Z(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e}function K(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e}function q(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e}function X(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function J(e,t){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],p=e[9],f=e[10],h=e[11],m=e[12],g=e[13],v=e[14],y=e[15],_=t[0],b=t[1],x=t[2],w=t[3],S=t[4],C=t[5],T=t[6],M=t[7],D=t[8],A=t[9],P=t[10],k=t[11],L=t[12],O=t[13],E=t[14],I=t[15];return Math.abs(n-_)<=r.Ib*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(i-b)<=r.Ib*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-x)<=r.Ib*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-w)<=r.Ib*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-S)<=r.Ib*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(l-C)<=r.Ib*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(u-T)<=r.Ib*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(c-M)<=r.Ib*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(d-D)<=r.Ib*Math.max(1,Math.abs(d),Math.abs(D))&&Math.abs(p-A)<=r.Ib*Math.max(1,Math.abs(p),Math.abs(A))&&Math.abs(f-P)<=r.Ib*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(h-k)<=r.Ib*Math.max(1,Math.abs(h),Math.abs(k))&&Math.abs(m-L)<=r.Ib*Math.max(1,Math.abs(m),Math.abs(L))&&Math.abs(g-O)<=r.Ib*Math.max(1,Math.abs(g),Math.abs(O))&&Math.abs(v-E)<=r.Ib*Math.max(1,Math.abs(v),Math.abs(E))&&Math.abs(y-I)<=r.Ib*Math.max(1,Math.abs(y),Math.abs(I))}var Q=h,ee=Z},function(e,t,n){"use strict";n.d(t,{Ib:function(){return r},WT:function(){return i},c$:function(){return a}});var r=1e-6,i="undefined"!=typeof Float32Array?Float32Array:Array;Math.random;var o=Math.PI/180;function a(e){return e*o}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)})},function(e,t,n){"use strict";n.r(t),n.d(t,{create:function(){return i},fromMat4:function(){return o},clone:function(){return a},copy:function(){return s},fromValues:function(){return l},set:function(){return u},identity:function(){return c},transpose:function(){return d},invert:function(){return p},adjoint:function(){return f},determinant:function(){return h},multiply:function(){return m},translate:function(){return g},rotate:function(){return v},scale:function(){return y},fromTranslation:function(){return _},fromRotation:function(){return b},fromScaling:function(){return x},fromMat2d:function(){return w},fromQuat:function(){return S},normalFromMat4:function(){return C},projection:function(){return T},str:function(){return M},frob:function(){return D},add:function(){return A},subtract:function(){return P},multiplyScalar:function(){return k},multiplyScalarAndAdd:function(){return L},exactEquals:function(){return O},equals:function(){return E},mul:function(){return I},sub:function(){return N}});var r=n(573);function i(){var e=new r.WT(9);return r.WT!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function a(e){var t=new r.WT(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function l(e,t,n,i,o,a,s,l,u){var c=new r.WT(9);return c[0]=e,c[1]=t,c[2]=n,c[3]=i,c[4]=o,c[5]=a,c[6]=s,c[7]=l,c[8]=u,c}function u(e,t,n,r,i,o,a,s,l,u){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e}function c(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function d(e,t){if(e===t){var n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function p(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=c*a-s*u,p=-c*o+s*l,f=u*o-a*l,h=n*d+r*p+i*f;return h?(h=1/h,e[0]=d*h,e[1]=(-c*r+i*u)*h,e[2]=(s*r-i*a)*h,e[3]=p*h,e[4]=(c*n-i*l)*h,e[5]=(-s*n+i*o)*h,e[6]=f*h,e[7]=(-u*n+r*l)*h,e[8]=(a*n-r*o)*h,e):null}function f(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8];return e[0]=a*c-s*u,e[1]=i*u-r*c,e[2]=r*s-i*a,e[3]=s*l-o*c,e[4]=n*c-i*l,e[5]=i*o-n*s,e[6]=o*u-a*l,e[7]=r*l-n*u,e[8]=n*a-r*o,e}function h(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8];return t*(u*o-a*l)+n*(-u*i+a*s)+r*(l*i-o*s)}function m(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],p=n[0],f=n[1],h=n[2],m=n[3],g=n[4],v=n[5],y=n[6],_=n[7],b=n[8];return e[0]=p*r+f*a+h*u,e[1]=p*i+f*s+h*c,e[2]=p*o+f*l+h*d,e[3]=m*r+g*a+v*u,e[4]=m*i+g*s+v*c,e[5]=m*o+g*l+v*d,e[6]=y*r+_*a+b*u,e[7]=y*i+_*s+b*c,e[8]=y*o+_*l+b*d,e}function g(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],p=n[0],f=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=p*r+f*a+u,e[7]=p*i+f*s+c,e[8]=p*o+f*l+d,e}function v(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],p=Math.sin(n),f=Math.cos(n);return e[0]=f*r+p*a,e[1]=f*i+p*s,e[2]=f*o+p*l,e[3]=f*a-p*r,e[4]=f*s-p*i,e[5]=f*l-p*o,e[6]=u,e[7]=c,e[8]=d,e}function y(e,t,n){var r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function _(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function b(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function x(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function w(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function S(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,d=r*s,p=i*a,f=i*s,h=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-h,e[3]=c-v,e[6]=p+g,e[1]=c+v,e[4]=1-u-h,e[7]=f-m,e[2]=p-g,e[5]=f+m,e[8]=1-u-d,e}function C(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],p=t[10],f=t[11],h=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*a,_=n*l-i*a,b=n*u-o*a,x=r*l-i*s,w=r*u-o*s,S=i*u-o*l,C=c*m-d*h,T=c*g-p*h,M=c*v-f*h,D=d*g-p*m,A=d*v-f*m,P=p*v-f*g,k=y*P-_*A+b*D+x*M-w*T+S*C;return k?(k=1/k,e[0]=(s*P-l*A+u*D)*k,e[1]=(l*M-a*P-u*T)*k,e[2]=(a*A-s*M+u*C)*k,e[3]=(i*A-r*P-o*D)*k,e[4]=(n*P-i*M+o*T)*k,e[5]=(r*M-n*A-o*C)*k,e[6]=(m*S-g*w+v*x)*k,e[7]=(g*b-h*S-v*_)*k,e[8]=(h*w-m*b+v*y)*k,e):null}function T(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function M(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function D(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function A(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e}function P(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}function k(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e}function L(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e}function O(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function E(e,t){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],p=t[0],f=t[1],h=t[2],m=t[3],g=t[4],v=t[5],y=t[6],_=t[7],b=t[8];return Math.abs(n-p)<=r.Ib*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(i-f)<=r.Ib*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(o-h)<=r.Ib*Math.max(1,Math.abs(o),Math.abs(h))&&Math.abs(a-m)<=r.Ib*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(s-g)<=r.Ib*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(l-v)<=r.Ib*Math.max(1,Math.abs(l),Math.abs(v))&&Math.abs(u-y)<=r.Ib*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-_)<=r.Ib*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(d-b)<=r.Ib*Math.max(1,Math.abs(d),Math.abs(b))}var I=m,N=P},function(e,t,n){"use strict";n.d(t,{Ue:function(){return i},kE:function(){return o},al:function(){return a},JG:function(){return s},t8:function(){return l},IH:function(){return u},$X:function(){return c},cs:function(){return d},bA:function(){return p},tk:function(){return f},SO:function(){return h},Fv:function(){return m},AK:function(){return g},kC:function(){return v},fF:function(){return y},kK:function(){return _},VC:function(){return b},bM:function(){return x},I6:function(){return w},fS:function(){return S},lu:function(){return T},Zh:function(){return M}});var r=n(573);function i(){var e=new r.WT(3);return r.WT!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function o(e){var t=e[0],n=e[1],r=e[2];return Math.hypot(t,n,r)}function a(e,t,n){var i=new r.WT(3);return i[0]=e,i[1]=t,i[2]=n,i}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function l(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function u(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function c(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function d(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function p(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function f(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function h(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function m(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function g(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function v(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e}function y(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,e[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,e[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,e}function _(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}function b(e,t,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=t[0],l=t[1],u=t[2],c=i*u-o*l,d=o*s-r*u,p=r*l-i*s,f=i*p-o*d,h=o*c-r*p,m=r*d-i*c,g=2*a;return c*=g,d*=g,p*=g,f*=2,h*=2,m*=2,e[0]=s+c+f,e[1]=l+d+h,e[2]=u+p+m,e}function x(e){return e[0]=0,e[1]=0,e[2]=0,e}function w(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function S(e,t){var n=e[0],i=e[1],o=e[2],a=t[0],s=t[1],l=t[2];return Math.abs(n-a)<=r.Ib*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r.Ib*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-l)<=r.Ib*Math.max(1,Math.abs(o),Math.abs(l))}var C,T=c,M=o;C=i()},function(e,t,n){"use strict";n.d(t,{Ue:function(){return s},yY:function(){return l},Bh:function(){return u},Jp:function(){return c},ZA:function(){return d},Kx:function(){return p},al:function(){return _}});var r=n(573),i=n(574),o=n(575),a=n(577);function s(){var e=new r.WT(4);return r.WT!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function l(e,t,n){n*=.5;var r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function u(e,t){var n=2*Math.acos(t[3]),i=Math.sin(n/2);return i>r.Ib?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),n}function c(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=n[0],l=n[1],u=n[2],c=n[3];return e[0]=r*c+a*s+i*u-o*l,e[1]=i*c+a*l+o*s-r*u,e[2]=o*c+a*u+r*l-i*s,e[3]=a*c-r*s-i*l-o*u,e}function d(e,t,n,i){var o,a,s,l,u,c=t[0],d=t[1],p=t[2],f=t[3],h=n[0],m=n[1],g=n[2],v=n[3];return(a=c*h+d*m+p*g+f*v)<0&&(a=-a,h=-h,m=-m,g=-g,v=-v),1-a>r.Ib?(o=Math.acos(a),s=Math.sin(o),l=Math.sin((1-i)*o)/s,u=Math.sin(i*o)/s):(l=1-i,u=i),e[0]=l*c+u*h,e[1]=l*d+u*m,e[2]=l*p+u*g,e[3]=l*f+u*v,e}function p(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}a.d9;var f,h,m,g,v,y,_=a.al,b=(a.JG,a.t8,a.IH,a.bA,a.AK,a.t7,a.kE,a.we,a.Fv);a.I6,a.fS,f=o.Ue(),h=o.al(1,0,0),m=o.al(0,1,0),g=s(),v=s(),y=i.create()},function(e,t,n){"use strict";n.d(t,{d9:function(){return i},al:function(){return o},JG:function(){return a},t8:function(){return s},IH:function(){return l},$X:function(){return u},bA:function(){return c},kE:function(){return d},we:function(){return p},Fv:function(){return f},AK:function(){return h},t7:function(){return m},fF:function(){return g},I6:function(){return v},fS:function(){return y}});var r=n(573);function i(e){var t=new r.WT(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function o(e,t,n,i){var o=new r.WT(4);return o[0]=e,o[1]=t,o[2]=n,o[3]=i,o}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function s(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function u(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function c(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function d(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.hypot(t,n,r,i)}function p(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}function f(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),e[0]=n*a,e[1]=r*a,e[2]=i*a,e[3]=o*a,e}function h(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function m(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e[3]=s+r*(n[3]-s),e}function g(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}function v(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function y(e,t){var n=e[0],i=e[1],o=e[2],a=e[3],s=t[0],l=t[1],u=t[2],c=t[3];return Math.abs(n-s)<=r.Ib*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-l)<=r.Ib*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-u)<=r.Ib*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(a-c)<=r.Ib*Math.max(1,Math.abs(a),Math.abs(c))}var _,b;_=new r.WT(4),r.WT!=Float32Array&&(_[0]=0,_[1]=0,_[2]=0,_[3]=0),b=_},function(e,t,n){"use strict";n.d(t,{ZP:function(){return h}});var r=n(0),i=n(109),o=n(2),a=n(110),s=n(43);function l(e,t,n,r){const i=n[0]-t[0],o=n[1]-t[1],a=n[2]-t[2],s=e[0]-t[0],l=e[1]-t[1],u=e[2]-t[2];r[0]=o*u-a*l,r[1]=a*s-i*u,r[2]=i*l-o*s}function u(e,t,n,r){l(e,t,n,r);const i=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);0!==i&&(r[0]/=i,r[1]/=i,r[2]/=i)}const c={computeNormalDirection:l,computeNormal:u,intersectWithTriangle:function(e,t,n,r,i,a){let l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1e-6,c=!1;const d=[],p=[],f=[],h=[],m=[];u(e,t,n,h),u(r,i,a,m);const g=-(0,o.d)(h,e),v=-(0,o.d)(m,r),y=[(0,o.d)(m,e)+v,(0,o.d)(m,t)+v,(0,o.d)(m,n)+v];if(y[0]*y[1]>l&&y[0]*y[2]>l)return{intersect:!1,coplanar:c,pt1:d,pt2:p,surfaceId:f};const _=[(0,o.d)(h,r)+g,(0,o.d)(h,i)+g,(0,o.d)(h,a)+g];if(_[0]*_[1]>l&&_[0]*_[2]>l)return{intersect:!1,coplanar:c,pt1:d,pt2:p,surfaceId:f};if(Math.abs(h[0]-m[0])<1e-9&&Math.abs(h[1]-m[1])<1e-9&&Math.abs(h[2]-m[2])<1e-9&&Math.abs(g-v)<1e-9)return c=!0,{intersect:!1,coplanar:c,pt1:d,pt2:p,surfaceId:f};const b=[e,t,n],x=[r,i,a],w=(0,o.d)(h,m),S=(g-v*w)/(w*w-1),C=(v-g*w)/(w*w-1),T=[S*h[0]+C*m[0],S*h[1]+C*m[1],S*h[2]+C*m[2]],M=(0,o.j)(h,m,[]);(0,o.l)(M);let D=0,A=0;const P=[],k=[];let L,O,E=50,I=50;for(let t=0;t<3;t++){const n=t,i=(t+1)%3,a=s.ZP.intersectWithLine(b[n],b[i],r,m);a.intersection&&a.t>0-l&&a.t<1+l&&(a.t<1+l&&a.t>1-l&&(E=D),P[D++]=(0,o.d)(a.x,M)-(0,o.d)(T,M));const u=s.ZP.intersectWithLine(x[n],x[i],e,h);u.intersection&&u.t>0-l&&u.t<1+l&&(u.t<1+l&&u.t>1-l&&(I=A),k[A++]=(0,o.d)(u.x,M)-(0,o.d)(T,M))}if(D>2){D--;const e=P[2];P[2]=P[E],P[E]=e}if(A>2){A--;const e=k[2];k[2]=k[I],k[I]=e}if(2!==D||2!==A)return{intersect:!1,coplanar:c,pt1:d,pt2:p,surfaceId:f};if(Number.isNaN(P[0])||Number.isNaN(P[1])||Number.isNaN(k[0])||Number.isNaN(k[1]))return{intersect:!1,coplanar:c,pt1:d,pt2:p,surfaceId:f};if(P[0]>P[1]){const e=P[1];P[1]=P[0],P[0]=e}if(k[0]>k[1]){const e=k[1];k[1]=k[0],k[0]=e}return P[1]2,e.intersectWithLine=(n,r,i,l,c)=>{const d={subId:0,t:Number.MAX_VALUE,intersect:0,betweenPoints:!1};c[2]=0;const p=[],f=i*i,h=[],m=[],g=[];t.points.getPoint(0,h),t.points.getPoint(1,m),t.points.getPoint(2,g);const v=[],y=[];if(u(h,m,g,v),0!==v[0]||0!==v[1]||0!==v[2]){const t=s.ZP.intersectWithLine(n,r,h,v);if(d.betweenPoints=t.betweenPoints,d.t=t.t,l[0]=t.x[0],l[1]=t.x[1],l[2]=t.x[2],!t.intersection)return c[0]=0,c[1]=0,d.intersect=0,d;const i=e.evaluatePosition(l,p,c,y);if(i.evaluation>=0)return i.dist2<=f?(d.intersect=1,d):(d.intersect=i.evaluation,d)}const _=(0,o.e)(h,m),b=(0,o.e)(m,g),x=(0,o.e)(g,h);t.line||(t.line=a.ZP.newInstance()),_>b&&_>x?(t.line.getPoints().setPoint(0,h),t.line.getPoints().setPoint(1,m)):b>x&&b>_?(t.line.getPoints().setPoint(0,m),t.line.getPoints().setPoint(1,g)):(t.line.getPoints().setPoint(0,g),t.line.getPoints().setPoint(1,h));const w=t.line.intersectWithLine(n,r,i,l,c);if(d.betweenPoints=w.betweenPoints,d.t=w.t,w.intersect){const e=[],t=[],n=[];for(let r=0;r<3;r++)e[r]=h[r]-g[r],t[r]=m[r]-g[r],n[r]=l[r]-g[r];return c[0]=(0,o.d)(n,e)/x,c[1]=(0,o.d)(n,t)/b,d.intersect=1,d}return c[0]=0,c[1]=0,d.intersect=0,d},e.evaluatePosition=(e,n,r,i)=>{const u={subId:0,dist2:0,evaluation:-1};let c,d;const p=[],f=[],h=[],m=[];let g;const v=[],y=[],_=[];let b=0,x=0;const w=[];let S,C,T,M=[];const D=[],A=[],P=[];u.subId=0,r[2]=0,t.points.getPoint(1,p),t.points.getPoint(2,f),t.points.getPoint(0,h),l(p,f,h,m),s.ZP.generalizedProjectPoint(e,p,m,P);let k=0;for(c=0;c<3;c++)g=m[c]<0?-m[c]:m[c],g>k&&(k=g,x=c);for(d=0,c=0;c<3;c++)c!==x&&(w[d++]=c);for(c=0;c<2;c++)v[c]=P[w[c]]-h[w[c]],y[c]=p[w[c]]-h[w[c]],_[c]=f[w[c]]-h[w[c]];if(b=(0,o.o)(y,_),0===b)return r[0]=0,r[1]=0,u.evaluation=-1,u;if(r[0]=(0,o.o)(v,_)/b,r[1]=(0,o.o)(y,v)/b,i[0]=1-(r[0]+r[1]),i[1]=r[0],i[2]=r[1],i[0]>=0&&i[0]<=1&&i[1]>=0&&i[1]<=1&&i[2]>=0&&i[2]<=1)n&&(u.dist2=(0,o.e)(P,e),n[0]=P[0],n[1]=P[1],n[2]=P[2]),u.evaluation=1;else{let t;if(n)if(i[1]<0&&i[2]<0)for(S=(0,o.e)(e,h),C=a.ZP.distanceToLine(e,p,h,t,D),T=a.ZP.distanceToLine(e,h,f,t,A),S{const i=[],o=[],a=[];t.points.getPoint(0,i),t.points.getPoint(1,o),t.points.getPoint(2,a);const s=1-e[0]-e[1];for(let t=0;t<3;t++)n[t]=i[t]*s+o[t]*e[0]+a[t]*e[1];r[0]=s,r[1]=e[0],r[2]=e[1]},e.getParametricDistance=e=>{let t,n=0;const r=[];r[0]=e[0],r[1]=e[1],r[2]=1-e[0]-e[1];for(let e=0;e<3;e++)t=r[e]<0?-r[e]:r[e]>1?r[e]-1:0,t>n&&(n=t);return n}}const p={};function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),i.ZP.extend(e,t,n),d(e,t)}var h={newInstance:r.m.newInstance(f,"vtkTriangle"),extend:f,...c}},function(e,t,n){"use strict";function r(e,t){var n;return function(r){return n=n||function(e,t){var n=function(e,t){var n=void 0===t?null:t,r=[],i=e.toString();return i=i.replace(/(['"])__worker_loader_strict__(['"])/g,"$1use strict$2"),r.push("("+i+")()"),n&&r.push("//# sourceMappingURL="+n+"\n"),r}(e,t),r=new Blob(n,{type:"application/javascript"});return URL.createObjectURL(r)}(e,t),new Worker(n,r)}}n.d(t,{c:function(){return r}})},function(e,t,n){"use strict";n.d(t,{iZ:function(){return re},iF:function(){return oe},TD:function(){return ue},T8:function(){return ce},GZ:function(){return he}});var r=Uint8Array,i=Uint16Array,o=Uint32Array,a=new r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),s=new r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),l=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=function(e,t){for(var n=new i(31),r=0;r<31;++r)n[r]=t+=1<>>1|(21845&v)<<1;y=(61680&(y=(52428&y)>>>2|(13107&y)<<2))>>>4|(3855&y)<<4,g[v]=((65280&y)>>>8|(255&y)<<8)>>>1}var _=function(e,t,n){for(var r=e.length,o=0,a=new i(t);o>>u]=c}else for(s=new i(r),o=0;o>>15-e[o]);return s},b=new r(288);for(v=0;v<144;++v)b[v]=8;for(v=144;v<256;++v)b[v]=9;for(v=256;v<280;++v)b[v]=7;for(v=280;v<288;++v)b[v]=8;var x=new r(32);for(v=0;v<32;++v)x[v]=5;var w=_(b,9,0),S=_(b,9,1),C=_(x,5,0),T=_(x,5,1),M=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},D=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},A=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},P=function(e){return(e+7)/8|0},k=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var a=new(2==e.BYTES_PER_ELEMENT?i:4==e.BYTES_PER_ELEMENT?o:r)(n-t);return a.set(e.subarray(t,n)),a},L=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],O=function(e,t,n){var r=new Error(t||L[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,O),!n)throw r;return r},E=function(e,t,n){var i=e.length;if(!i||n&&n.f&&!n.l)return t||new r(0);var o=!t||n,u=!n||n.i;n||(n={}),t||(t=new r(3*i));var c=function(e){var n=t.length;if(e>n){var i=new r(Math.max(2*n,e));i.set(t),t=i}},p=n.f||0,f=n.p||0,m=n.b||0,g=n.l,v=n.d,y=n.m,b=n.n,x=8*i;do{if(!g){p=D(e,f,1);var w=D(e,f+1,3);if(f+=3,!w){var C=e[(z=P(f)+4)-4]|e[z-3]<<8,L=z+C;if(L>i){u&&O(0);break}o&&c(m+C),t.set(e.subarray(z,L),m),n.b=m+=C,n.p=f=8*L,n.f=p;continue}if(1==w)g=S,v=T,y=9,b=5;else if(2==w){var E=D(e,f,31)+257,I=D(e,f+10,15)+4,N=E+D(e,f+5,31)+1;f+=14;for(var R=new r(N),B=new r(19),F=0;F>>4)<16)R[F++]=z;else{var Y=0,H=0;for(16==z?(H=3+D(e,f,3),f+=2,Y=R[F-1]):17==z?(H=3+D(e,f,7),f+=3):18==z&&(H=11+D(e,f,127),f+=7);H--;)R[F++]=Y}}var W=R.subarray(0,E),$=R.subarray(E);y=M(W),b=M($),g=_(W,y,1),v=_($,b,1)}else O(1);if(f>x){u&&O(0);break}}o&&c(m+131072);for(var Z=(1<>>4;if((f+=15&Y)>x){u&&O(0);break}if(Y||O(2),X<256)t[m++]=X;else{if(256==X){q=f,g=null;break}var J=X-254;if(X>264){var Q=a[F=X-257];J=D(e,f,(1<>>4;ee||O(3),f+=15ⅇ$=h[te];if(te>3){Q=s[te];$+=A(e,f)&(1<x){u&&O(0);break}o&&c(m+131072);for(var ne=m+J;m>>8},N=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},R=function(e,t){for(var n=[],o=0;oh&&(h=s[o].s);var m=new i(h+1),g=B(n[p-1],m,0);if(g>t){o=0;var v=0,y=g-t,_=1<t))break;v+=_-(1<>>=y;v>0;){var x=s[o].s;m[x]=0&&v;--o){var w=s[o].s;m[w]==t&&(--m[w],++v)}g=t}return[new r(m),g]},B=function(e,t,n){return-1==e.s?Math.max(B(e.l,t,n+1),B(e.r,t,n+1)):t[e.s]=n},F=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new i(++t),r=0,o=e[0],a=1,s=function(e){n[r++]=e},l=1;l<=t;++l)if(e[l]==o&&l!=t)++a;else{if(!o&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(o),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(o);a=1,o=e[l]}return[n.subarray(0,r),t]},V=function(e,t){for(var n=0,r=0;r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o4&&!G[l[j-1]];--j);var Y,H,W,$,Z=f+5<<3,K=V(o,b)+V(u,x)+c,q=V(o,g)+V(u,S)+c+14+3*j+V(O,G)+(2*O[16]+3*O[17]+7*O[18]);if(Z<=K&&Z<=q)return U(t,h,e.subarray(p,p+f));if(I(t,h,1+(q15&&(I(t,h,ee[E]>>>5&127),h+=ee[E]>>>12)}}}else Y=w,H=b,W=C,$=x;for(E=0;E255){te=r[E]>>>18&31;N(t,h,Y[te+257]),h+=H[te+257],te>7&&(I(t,h,r[E]>>>23&31),h+=a[te]);var ne=31&r[E];N(t,h,W[ne]),h+=$[ne],ne>3&&(N(t,h,r[E]>>>5&8191),h+=s[ne])}else N(t,h,Y[r[E]]),h+=H[r[E]];return N(t,h,Y[256]),h+H[256]},z=new o([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),j=new r(0),Y=function(e,t,n,l,u,c){var d=e.length,f=new r(l+d+5*(1+Math.ceil(d/7e3))+u),h=f.subarray(l,f.length-u),g=0;if(!t||d<8)for(var v=0;v<=d;v+=65535){var y=v+65535;y>=d&&(h[g>>3]=c),g=U(h,g+1,e.subarray(v,y))}else{for(var _=z[t-1],b=_>>>13,x=8191&_,w=(1<7e3||N>24576)&&H>423){g=G(e,h,0,A,L,O,I,N,B,v-B,g),N=E=I=0,B=v;for(var W=0;W<286;++W)L[W]=0;for(W=0;W<30;++W)O[W]=0}var $=2,Z=0,K=x,q=V-Y&32767;if(H>2&&F==D(v-q))for(var X=Math.min(b,H)-1,J=Math.min(32767,v),Q=Math.min(258,H);q<=J&&--K&&V!=Y;){if(e[v+$]==e[v+$-q]){for(var ee=0;ee$){if($=ee,Z=q,ee>X)break;var te=Math.min(q,ee-2),ne=0;for(W=0;Wne&&(ne=ie,Y=re)}}}q+=(V=Y)-(Y=S[V])+32768&32767}if(Z){A[N++]=268435456|p[$]<<18|m[Z];var oe=31&p[$],ae=31&m[Z];I+=a[oe]+s[ae],++L[257+oe],++O[ae],R=v+$,++E}else A[N++]=e[v],++L[e[v]]}}g=G(e,h,c,A,L,O,I,N,B,v-B,g),!c&&7&g&&(g=U(h,g+1,j))}return k(f,0,l+P(g)+u)},H=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=0|n.length,a=0;a!=o;){for(var s=Math.min(a+2655,o);a>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}},W=function(e,t,n,r,i){return Y(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)},$=function(e,t){return e[t]|e[t+1]<<8},Z=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},K=function(e,t){return Z(e,t)+4294967296*Z(e,t+4)},q=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},X=function(e){31==e[0]&&139==e[1]&&8==e[2]||O(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},J=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},Q=function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)},ee=function(e){(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)&&O(6,"invalid zlib data"),32&e[1]&&O(6,"invalid zlib data: preset dictionaries not supported")};function te(e,t){return E(e,t)}function ne(e,t){return E(e.subarray(X(e),-8),t||new r(J(e)))}function re(e,t){t||(t={});var n=H();n.p(e);var r=W(e,t,2,4);return Q(r,t),q(r,r.length-4,n.d()),r}function ie(e,t){return E((ee(e),e.subarray(2,-4)),t)}function oe(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?ne(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?te(e,t):ie(e,t)}var ae="undefined"!=typeof TextEncoder&&new TextEncoder,se="undefined"!=typeof TextDecoder&&new TextDecoder;try{se.decode(j,{stream:!0}),1}catch(e){}var le=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return[t,k(e,n-1)];i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}};function ue(e,t){if(t){for(var n=new r(e.length),i=0;i>1)),s=0,l=function(e){a[s++]=e};for(i=0;ia.length){var u=new r(s+8+(o-i<<1));u.set(a),a=u}var c=e.charCodeAt(i);c<128||t?l(c):c<2048?(l(192|c>>6),l(128|63&c)):c>55295&&c<57344?(l(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++i))>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|63&c)):(l(224|c>>12),l(128|c>>6&63),l(128|63&c))}return k(a,0,s)}function ce(e,t){if(t){for(var n="",r=0;r65558)&&O(13);var o=$(e,i+8);if(!o)return{};var a=Z(e,i+16),s=4294967295==a;s&&(i=Z(e,i-12),101075792!=Z(e,i)&&O(13),o=Z(e,i+32),a=Z(e,i+48));for(var l=t&&t.filter,u=0;u({proxyClass:"v-btn--active"}),computed:{classes(){return{"v-btn":!0,...u.Z.options.computed.classes.call(this),"v-btn--absolute":this.absolute,"v-btn--block":this.block,"v-btn--bottom":this.bottom,"v-btn--disabled":this.disabled,"v-btn--is-elevated":this.isElevated,"v-btn--fab":this.fab,"v-btn--fixed":this.fixed,"v-btn--has-bg":this.hasBg,"v-btn--icon":this.icon,"v-btn--left":this.left,"v-btn--loading":this.loading,"v-btn--outlined":this.outlined,"v-btn--plain":this.plain,"v-btn--right":this.right,"v-btn--round":this.isRound,"v-btn--rounded":this.rounded,"v-btn--router":this.to,"v-btn--text":this.text,"v-btn--tile":this.tile,"v-btn--top":this.top,...this.themeClasses,...this.groupClasses,...this.elevationClasses,...this.sizeableClasses}},computedElevation(){if(!this.disabled)return s.Z.options.computed.computedElevation.call(this)},computedRipple(){var e;const t=!this.icon&&!this.fab||{circle:!0};return!this.disabled&&(null!==(e=this.ripple)&&void 0!==e?e:t)},hasBg(){return!(this.text||this.plain||this.outlined||this.icon)},isElevated(){return Boolean(!(this.icon||this.text||this.outlined||this.depressed||this.disabled||this.plain||!(null==this.elevation||Number(this.elevation)>0)))},isRound(){return Boolean(this.icon||this.fab)},styles(){return{...this.measurableStyles}}},created(){[["flat","text"],["outline","outlined"],["round","rounded"]].forEach((([e,t])=>{this.$attrs.hasOwnProperty(e)&&(0,p.fK)(e,t,this)}))},methods:{click(e){!this.retainFocusOnClick&&!this.fab&&e.detail&&this.$el.blur(),this.$emit("click",e),this.btnToggle&&this.toggle()},genContent(){return this.$createElement("span",{staticClass:"v-btn__content"},this.$slots.default)},genLoader(){return this.$createElement("span",{class:"v-btn__loader"},this.$slots.loader||[this.$createElement(i,{props:{indeterminate:!0,size:23,width:2}})])}},render(e){const t=[this.genContent(),this.loading&&this.genLoader()],{tag:n,data:r}=this.generateRouteLink(),i=this.hasBg?this.setBackgroundColor:this.setTextColor;return"button"===n&&(r.attrs.type=this.type,r.attrs.disabled=this.disabled),r.attrs.value=["string","number"].includes(typeof this.value)?this.value:JSON.stringify(this.value),e(n,this.disabled?r:i(this.color,r),t)}})},function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(490);function i(...e){return r.default.extend({mixins:e})}},function(e,t,n){"use strict";var r=n(585);t.Z=r.Z},function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(586),i=n(587),o=n(588),a=n(589),s=n(590),l=n(591),u=(0,n(583).Z)(r.Z,i.Z,o.Z,a.Z,s.Z,l.Z).extend({name:"v-sheet",props:{outlined:Boolean,shaped:Boolean,tag:{type:String,default:"div"}},computed:{classes(){return{"v-sheet":!0,"v-sheet--outlined":this.outlined,"v-sheet--shaped":this.shaped,...this.themeClasses,...this.elevationClasses,...this.roundedClasses}},styles(){return this.measurableStyles}},render(e){const t={class:this.classes,style:this.styles,on:this.listeners$};return e(this.tag,this.setBackgroundColor(this.color,t),this.$slots.default)}})},function(e,t,n){"use strict";var r=n(490);function i(e){return function(t,n){for(const r in n)Object.prototype.hasOwnProperty.call(t,r)||this.$delete(this.$data[e],r);for(const n in t)this.$set(this.$data[e],n,t[n])}}t.Z=r.default.extend({data:()=>({attrs$:{},listeners$:{}}),created(){this.$watch("$attrs",i("attrs$"),{immediate:!0}),this.$watch("$listeners",i("listeners$"),{immediate:!0})}})},function(e,t,n){"use strict";var r=n(490),i=n(566),o=n(570);t.Z=r.default.extend({name:"colorable",props:{color:String},methods:{setBackgroundColor(e,t={}){return"string"==typeof t.style?((0,i.N6)("style must be an object",this),t):"string"==typeof t.class?((0,i.N6)("class must be an object",this),t):((0,o.NA)(e)?t.style={...t.style,"background-color":`${e}`,"border-color":`${e}`}:e&&(t.class={...t.class,[e]:!0}),t)},setTextColor(e,t={}){if("string"==typeof t.style)return(0,i.N6)("style must be an object",this),t;if("string"==typeof t.class)return(0,i.N6)("class must be an object",this),t;if((0,o.NA)(e))t.style={...t.style,color:`${e}`,"caret-color":`${e}`};else if(e){const[n,r]=e.toString().trim().split(" ",2);t.class={...t.class,[n+"--text"]:!0},r&&(t.class["text--"+r]=!0)}return t}}})},function(e,t,n){"use strict";var r=n(490);t.Z=r.default.extend({name:"elevatable",props:{elevation:[Number,String]},computed:{computedElevation(){return this.elevation},elevationClasses(){const e=this.computedElevation;return null==e||isNaN(parseInt(e))?{}:{[`elevation-${this.elevation}`]:!0}}}})},function(e,t,n){"use strict";var r=n(565),i=n(490);t.Z=i.default.extend({name:"measurable",props:{height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},computed:{measurableStyles(){const e={},t=(0,r.kb)(this.height),n=(0,r.kb)(this.minHeight),i=(0,r.kb)(this.minWidth),o=(0,r.kb)(this.maxHeight),a=(0,r.kb)(this.maxWidth),s=(0,r.kb)(this.width);return t&&(e.height=t),n&&(e.minHeight=n),i&&(e.minWidth=i),o&&(e.maxHeight=o),a&&(e.maxWidth=a),s&&(e.width=s),e}}})},function(e,t,n){"use strict";var r=n(490);t.Z=r.default.extend({name:"roundable",props:{rounded:[Boolean,String],tile:Boolean},computed:{roundedClasses(){const e=[],t="string"==typeof this.rounded?String(this.rounded):!0===this.rounded;if(this.tile)e.push("rounded-0");else if("string"==typeof t){const n=t.split(" ");for(const t of n)e.push(`rounded-${t}`)}else t&&e.push("rounded");return e.length>0?{[e.join(" ")]:!0}:{}}}})},function(e,t,n){"use strict";n.d(t,{X:function(){return i}});const r=n(490).default.extend().extend({name:"themeable",provide(){return{theme:this.themeableProvide}},inject:{theme:{default:{isDark:!1}}},props:{dark:{type:Boolean,default:null},light:{type:Boolean,default:null}},data:()=>({themeableProvide:{isDark:!1}}),computed:{appIsDark(){return this.$vuetify.theme.dark||!1},isDark(){return!0===this.dark||!0!==this.light&&this.theme.isDark},themeClasses(){return{"theme--dark":this.isDark,"theme--light":!this.isDark}},rootIsDark(){return!0===this.dark||!0!==this.light&&this.appIsDark},rootThemeClasses(){return{"theme--dark":this.rootIsDark,"theme--light":!this.rootIsDark}}},watch:{isDark:{handler(e,t){e!==t&&(this.themeableProvide.isDark=this.isDark)},immediate:!0}}});function i(e){const t={...e.props,...e.injections},n=r.options.computed.isDark.call(t);return r.options.computed.themeClasses.call({isDark:n})}t.Z=r},function(e,t,n){"use strict";var r=n(490),i=n(593),o=n(565);t.Z=r.default.extend({name:"routable",directives:{Ripple:i.Z},props:{activeClass:String,append:Boolean,disabled:Boolean,exact:{type:Boolean,default:void 0},exactPath:Boolean,exactActiveClass:String,link:Boolean,href:[String,Object],to:[String,Object],nuxt:Boolean,replace:Boolean,ripple:{type:[Boolean,Object],default:null},tag:String,target:String},data:()=>({isActive:!1,proxyClass:""}),computed:{classes(){const e={};return this.to||(this.activeClass&&(e[this.activeClass]=this.isActive),this.proxyClass&&(e[this.proxyClass]=this.isActive)),e},computedRipple(){var e;return null!==(e=this.ripple)&&void 0!==e?e:!this.disabled&&this.isClickable},isClickable(){return!this.disabled&&Boolean(this.isLink||this.$listeners.click||this.$listeners["!click"]||this.$attrs.tabindex)},isLink(){return this.to||this.href||this.link},styles:()=>({})},watch:{$route:"onRouteChange"},mounted(){this.onRouteChange()},methods:{generateRouteLink(){let e,t=this.exact;const n={attrs:{tabindex:"tabindex"in this.$attrs?this.$attrs.tabindex:void 0},class:this.classes,style:this.styles,props:{},directives:[{name:"ripple",value:this.computedRipple}],[this.to?"nativeOn":"on"]:{...this.$listeners,..."click"in this?{click:this.click}:void 0},ref:"link"};if(void 0===this.exact&&(t="/"===this.to||this.to===Object(this.to)&&"/"===this.to.path),this.to){let r=this.activeClass,i=this.exactActiveClass||r;this.proxyClass&&(r=`${r} ${this.proxyClass}`.trim(),i=`${i} ${this.proxyClass}`.trim()),e=this.nuxt?"nuxt-link":"router-link",Object.assign(n.props,{to:this.to,exact:t,exactPath:this.exactPath,activeClass:r,exactActiveClass:i,append:this.append,replace:this.replace})}else e=(this.href?"a":this.tag)||"div","a"===e&&this.href&&(n.attrs.href=this.href);return this.target&&(n.attrs.target=this.target),{tag:e,data:n}},onRouteChange(){if(!this.to||!this.$refs.link||!this.$route)return;const e=`${this.activeClass||""} ${this.proxyClass||""}`.trim(),t=`${this.exactActiveClass||""} ${this.proxyClass||""}`.trim()||e,n="_vnode.data.class."+(this.exact?t:e);this.$nextTick((()=>{!(0,o.vO)(this.$refs.link,n)===this.isActive&&this.toggle()}))},toggle(){this.isActive=!this.isActive}}})},function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(565);function i(e,t){e.style.transform=t,e.style.webkitTransform=t}function o(e){return"TouchEvent"===e.constructor.name}function a(e){return"KeyboardEvent"===e.constructor.name}const s={show(e,t,n={}){if(!t._ripple||!t._ripple.enabled)return;const r=document.createElement("span"),s=document.createElement("span");r.appendChild(s),r.className="v-ripple__container",n.class&&(r.className+=` ${n.class}`);const{radius:l,scale:u,x:c,y:d,centerX:p,centerY:f}=((e,t,n={})=>{let r=0,i=0;if(!a(e)){const n=t.getBoundingClientRect(),a=o(e)?e.touches[e.touches.length-1]:e;r=a.clientX-n.left,i=a.clientY-n.top}let s=0,l=.3;t._ripple&&t._ripple.circle?(l=.15,s=t.clientWidth/2,s=n.center?s:s+Math.sqrt((r-s)**2+(i-s)**2)/4):s=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const u=(t.clientWidth-2*s)/2+"px",c=(t.clientHeight-2*s)/2+"px";return{radius:s,scale:l,x:n.center?u:r-s+"px",y:n.center?c:i-s+"px",centerX:u,centerY:c}})(e,t,n),h=2*l+"px";s.className="v-ripple__animation",s.style.width=h,s.style.height=h,t.appendChild(r);const m=window.getComputedStyle(t);m&&"static"===m.position&&(t.style.position="relative",t.dataset.previousPosition="static"),s.classList.add("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--visible"),i(s,`translate(${c}, ${d}) scale3d(${u},${u},${u})`),s.dataset.activated=String(performance.now()),setTimeout((()=>{s.classList.remove("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--in"),i(s,`translate(${p}, ${f}) scale3d(1,1,1)`)}),0)},hide(e){if(!e||!e._ripple||!e._ripple.enabled)return;const t=e.getElementsByClassName("v-ripple__animation");if(0===t.length)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const r=performance.now()-Number(n.dataset.activated),i=Math.max(250-r,0);setTimeout((()=>{n.classList.remove("v-ripple__animation--in"),n.classList.add("v-ripple__animation--out"),setTimeout((()=>{1===e.getElementsByClassName("v-ripple__animation").length&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),n.parentNode&&e.removeChild(n.parentNode)}),300)}),i)}};function l(e){return void 0===e||!!e}function u(e){const t={},n=e.currentTarget;if(n&&n._ripple&&!n._ripple.touched&&!e.rippleStop){if(e.rippleStop=!0,o(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||a(e),n._ripple.class&&(t.class=n._ripple.class),o(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{s.show(e,n,t)},n._ripple.showTimer=window.setTimeout((()=>{n&&n._ripple&&n._ripple.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)}),80)}else s.show(e,n,t)}}function c(e){const t=e.currentTarget;if(t&&t._ripple){if(window.clearTimeout(t._ripple.showTimer),"touchend"===e.type&&t._ripple.showTimerCommit)return t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null,void(t._ripple.showTimer=setTimeout((()=>{c(e)})));window.setTimeout((()=>{t._ripple&&(t._ripple.touched=!1)})),s.hide(t)}}function d(e){const t=e.currentTarget;t&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let p=!1;function f(e){p||e.keyCode!==r.Do.enter&&e.keyCode!==r.Do.space||(p=!0,u(e))}function h(e){p=!1,c(e)}function m(e){!0===p&&(p=!1,c(e))}function g(e,t,n){const r=l(t.value);r||s.hide(e),e._ripple=e._ripple||{},e._ripple.enabled=r;const i=t.value||{};i.center&&(e._ripple.centered=!0),i.class&&(e._ripple.class=t.value.class),i.circle&&(e._ripple.circle=i.circle),r&&!n?(e.addEventListener("touchstart",u,{passive:!0}),e.addEventListener("touchend",c,{passive:!0}),e.addEventListener("touchmove",d,{passive:!0}),e.addEventListener("touchcancel",c),e.addEventListener("mousedown",u),e.addEventListener("mouseup",c),e.addEventListener("mouseleave",c),e.addEventListener("keydown",f),e.addEventListener("keyup",h),e.addEventListener("blur",m),e.addEventListener("dragstart",c,{passive:!0})):!r&&n&&v(e)}function v(e){e.removeEventListener("mousedown",u),e.removeEventListener("touchstart",u),e.removeEventListener("touchend",c),e.removeEventListener("touchmove",d),e.removeEventListener("touchcancel",c),e.removeEventListener("mouseup",c),e.removeEventListener("mouseleave",c),e.removeEventListener("keydown",f),e.removeEventListener("keyup",h),e.removeEventListener("dragstart",c),e.removeEventListener("blur",m)}var y={bind:function(e,t,n){g(e,t,!1)},unbind:function(e){delete e._ripple,v(e)},update:function(e,t){if(t.value===t.oldValue)return;g(e,t,l(t.oldValue))}}},function(e,t,n){"use strict";n.d(t,{d:function(){return a}});var r=n(490),i=n(565);const o={absolute:Boolean,bottom:Boolean,fixed:Boolean,left:Boolean,right:Boolean,top:Boolean};function a(e=[]){return r.default.extend({name:"positionable",props:e.length?(0,i.ji)(o,e):o})}t.Z=a()},function(e,t,n){"use strict";var r=n(490);t.Z=r.default.extend({name:"sizeable",props:{large:Boolean,small:Boolean,xLarge:Boolean,xSmall:Boolean},computed:{medium(){return Boolean(!(this.xSmall||this.small||this.large||this.xLarge))},sizeableClasses(){return{"v-size--x-small":this.xSmall,"v-size--small":this.small,"v-size--default":this.medium,"v-size--large":this.large,"v-size--x-large":this.xLarge}}}})},function(e,t,n){"use strict";n.d(t,{d:function(){return i}});var r=n(597);function i(e,t,n){return(0,r.f)(e,t,n).extend({name:"groupable",props:{activeClass:{type:String,default(){if(this[e])return this[e].activeClass}},disabled:Boolean},data:()=>({isActive:!1}),computed:{groupClasses(){return this.activeClass?{[this.activeClass]:this.isActive}:{}}},created(){this[e]&&this[e].register(this)},beforeDestroy(){this[e]&&this[e].unregister(this)},methods:{toggle(){this.$emit("change")}}})}i("itemGroup")},function(e,t,n){"use strict";n.d(t,{f:function(){return a},J:function(){return s}});var r=n(490),i=n(566);function o(e,t){return()=>(0,i.Kd)(`The ${e} component must be used inside a ${t}`)}function a(e,t,n){const i=t&&n?{register:o(t,n),unregister:o(t,n)}:null;return r.default.extend({name:"registrable-inject",inject:{[e]:{default:i}}})}function s(e,t=!1){return r.default.extend({name:"registrable-provide",provide(){return{[e]:t?this:{register:this.register,unregister:this.unregister}}}})}},function(e,t,n){"use strict";n.d(t,{d:function(){return i}});var r=n(490);function i(e="value",t="input"){return r.default.extend({name:"toggleable",model:{prop:e,event:t},props:{[e]:{required:!1}},data(){return{isActive:!!this[e]}},watch:{[e](e){this.isActive=!!e},isActive(n){!!n!==this[e]&&this.$emit(t,n)}}})}const o=i();t.Z=o},function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(600),i=n(587),o=n(565),a=i.Z.extend({name:"v-progress-circular",directives:{intersect:r.Z},props:{button:Boolean,indeterminate:Boolean,rotate:{type:[Number,String],default:0},size:{type:[Number,String],default:32},width:{type:[Number,String],default:4},value:{type:[Number,String],default:0}},data:()=>({radius:20,isVisible:!0}),computed:{calculatedSize(){return Number(this.size)+(this.button?8:0)},circumference(){return 2*Math.PI*this.radius},classes(){return{"v-progress-circular--visible":this.isVisible,"v-progress-circular--indeterminate":this.indeterminate,"v-progress-circular--button":this.button}},normalizedValue(){return this.value<0?0:this.value>100?100:parseFloat(this.value)},strokeDashArray(){return Math.round(1e3*this.circumference)/1e3},strokeDashOffset(){return(100-this.normalizedValue)/100*this.circumference+"px"},strokeWidth(){return Number(this.width)/+this.size*this.viewBoxSize*2},styles(){return{height:(0,o.kb)(this.calculatedSize),width:(0,o.kb)(this.calculatedSize)}},svgStyles(){return{transform:`rotate(${Number(this.rotate)}deg)`}},viewBoxSize(){return this.radius/(1-Number(this.width)/+this.size)}},methods:{genCircle(e,t){return this.$createElement("circle",{class:`v-progress-circular__${e}`,attrs:{fill:"transparent",cx:2*this.viewBoxSize,cy:2*this.viewBoxSize,r:this.radius,"stroke-width":this.strokeWidth,"stroke-dasharray":this.strokeDashArray,"stroke-dashoffset":t}})},genSvg(){const e=[this.indeterminate||this.genCircle("underlay",0),this.genCircle("overlay",this.strokeDashOffset)];return this.$createElement("svg",{style:this.svgStyles,attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:`${this.viewBoxSize} ${this.viewBoxSize} ${2*this.viewBoxSize} ${2*this.viewBoxSize}`}},e)},genInfo(){return this.$createElement("div",{staticClass:"v-progress-circular__info"},this.$slots.default)},onObserve(e,t,n){this.isVisible=n}},render(e){return e("div",this.setTextColor(this.color,{staticClass:"v-progress-circular",attrs:{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":this.indeterminate?void 0:this.normalizedValue},class:this.classes,directives:[{name:"intersect",value:this.onObserve}],style:this.styles,on:this.$listeners}),[this.genSvg(),this.genInfo()])}})},function(e,t,n){"use strict";function r(e,t,n){var r;const i=null===(r=e._observe)||void 0===r?void 0:r[n.context._uid];i&&(i.observer.unobserve(e),delete e._observe[n.context._uid])}const i={inserted:function(e,t,n){if("undefined"==typeof window||!("IntersectionObserver"in window))return;const i=t.modifiers||{},o=t.value,{handler:a,options:s}="object"==typeof o?o:{handler:o,options:{}},l=new IntersectionObserver(((o=[],s)=>{var l;const u=null===(l=e._observe)||void 0===l?void 0:l[n.context._uid];if(!u)return;const c=o.some((e=>e.isIntersecting));!a||i.quiet&&!u.init||i.once&&!c&&!u.init||a(o,s,c),c&&i.once?r(e,t,n):u.init=!0}),s);e._observe=Object(e._observe),e._observe[n.context._uid]={init:!1,observer:l},l.observe(e)},unbind:r};t.Z=i},function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(584),i=n(602),o=n(592),a=(0,n(583).Z)(i.Z,o.Z,r.Z).extend({name:"v-card",props:{flat:Boolean,hover:Boolean,img:String,link:Boolean,loaderHeight:{type:[Number,String],default:4},raised:Boolean},computed:{classes(){return{"v-card":!0,...o.Z.options.computed.classes.call(this),"v-card--flat":this.flat,"v-card--hover":this.hover,"v-card--link":this.isClickable,"v-card--loading":this.loading,"v-card--disabled":this.disabled,"v-card--raised":this.raised,...r.Z.options.computed.classes.call(this)}},styles(){const e={...r.Z.options.computed.styles.call(this)};return this.img&&(e.background=`url("${this.img}") center center / cover no-repeat`),e}},methods:{genProgress(){const e=i.Z.options.methods.genProgress.call(this);return e?this.$createElement("div",{staticClass:"v-card__progress",key:"progress"},[e]):null}},render(e){const{tag:t,data:n}=this.generateRouteLink();return n.style=this.styles,this.isClickable&&(n.attrs=n.attrs||{},n.attrs.tabindex=0),e(t,this.setBackgroundColor(this.color,n),[this.genProgress(),this.$slots.default])}})},function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(490),i=n(603).Z,o=r.default.extend().extend({name:"loadable",props:{loading:{type:[Boolean,String],default:!1},loaderHeight:{type:[Number,String],default:2}},methods:{genProgress(){return!1===this.loading?null:this.$slots.progress||this.$createElement(i,{props:{absolute:!0,color:!0===this.loading||""===this.loading?this.color||"primary":this.loading,height:this.loaderHeight,indeterminate:!0}})}}})},function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(605),i=n(600),o=n(587),a=n(594),s=n(604),l=n(591),u=n(565);var c=(0,n(583).Z)(o.Z,(0,a.d)(["absolute","fixed","top","bottom"]),s.Z,l.Z).extend({name:"v-progress-linear",directives:{intersect:i.Z},props:{active:{type:Boolean,default:!0},backgroundColor:{type:String,default:null},backgroundOpacity:{type:[Number,String],default:null},bufferValue:{type:[Number,String],default:100},color:{type:String,default:"primary"},height:{type:[Number,String],default:4},indeterminate:Boolean,query:Boolean,reverse:Boolean,rounded:Boolean,stream:Boolean,striped:Boolean,value:{type:[Number,String],default:0}},data(){return{internalLazyValue:this.value||0,isVisible:!0}},computed:{__cachedBackground(){return this.$createElement("div",this.setBackgroundColor(this.backgroundColor||this.color,{staticClass:"v-progress-linear__background",style:this.backgroundStyle}))},__cachedBar(){return this.$createElement(this.computedTransition,[this.__cachedBarType])},__cachedBarType(){return this.indeterminate?this.__cachedIndeterminate:this.__cachedDeterminate},__cachedBuffer(){return this.$createElement("div",{staticClass:"v-progress-linear__buffer",style:this.styles})},__cachedDeterminate(){return this.$createElement("div",this.setBackgroundColor(this.color,{staticClass:"v-progress-linear__determinate",style:{width:(0,u.kb)(this.normalizedValue,"%")}}))},__cachedIndeterminate(){return this.$createElement("div",{staticClass:"v-progress-linear__indeterminate",class:{"v-progress-linear__indeterminate--active":this.active}},[this.genProgressBar("long"),this.genProgressBar("short")])},__cachedStream(){return this.stream?this.$createElement("div",this.setTextColor(this.color,{staticClass:"v-progress-linear__stream",style:{width:(0,u.kb)(100-this.normalizedBuffer,"%")}})):null},backgroundStyle(){return{opacity:null==this.backgroundOpacity?this.backgroundColor?1:.3:parseFloat(this.backgroundOpacity),[this.isReversed?"right":"left"]:(0,u.kb)(this.normalizedValue,"%"),width:(0,u.kb)(Math.max(0,this.normalizedBuffer-this.normalizedValue),"%")}},classes(){return{"v-progress-linear--absolute":this.absolute,"v-progress-linear--fixed":this.fixed,"v-progress-linear--query":this.query,"v-progress-linear--reactive":this.reactive,"v-progress-linear--reverse":this.isReversed,"v-progress-linear--rounded":this.rounded,"v-progress-linear--striped":this.striped,"v-progress-linear--visible":this.isVisible,...this.themeClasses}},computedTransition(){return this.indeterminate?r.Z5:r.Qn},isReversed(){return this.$vuetify.rtl!==this.reverse},normalizedBuffer(){return this.normalize(this.bufferValue)},normalizedValue(){return this.normalize(this.internalLazyValue)},reactive(){return Boolean(this.$listeners.change)},styles(){const e={};return this.active||(e.height=0),this.indeterminate||100===parseFloat(this.normalizedBuffer)||(e.width=(0,u.kb)(this.normalizedBuffer,"%")),e}},methods:{genContent(){const e=(0,u.z9)(this,"default",{value:this.internalLazyValue});return e?this.$createElement("div",{staticClass:"v-progress-linear__content"},e):null},genListeners(){const e=this.$listeners;return this.reactive&&(e.click=this.onClick),e},genProgressBar(e){return this.$createElement("div",this.setBackgroundColor(this.color,{staticClass:"v-progress-linear__indeterminate",class:{[e]:!0}}))},onClick(e){if(!this.reactive)return;const{width:t}=this.$el.getBoundingClientRect();this.internalValue=e.offsetX/t*100},onObserve(e,t,n){this.isVisible=n},normalize:e=>e<0?0:e>100?100:parseFloat(e)},render(e){return e("div",{staticClass:"v-progress-linear",attrs:{role:"progressbar","aria-valuemin":0,"aria-valuemax":this.normalizedBuffer,"aria-valuenow":this.indeterminate?void 0:this.normalizedValue},class:this.classes,directives:[{name:"intersect",value:this.onObserve}],style:{bottom:this.bottom?0:void 0,height:this.active?(0,u.kb)(this.height):0,top:this.top?0:void 0},on:this.genListeners()},[this.__cachedStream,this.__cachedBackground,this.__cachedBuffer,this.__cachedBar,this.genContent()])}})},function(e,t,n){"use strict";var r=n(490);const i=function(e="value",t="change"){return r.default.extend({name:"proxyable",model:{prop:e,event:t},props:{[e]:{required:!1}},data(){return{internalLazyValue:this[e]}},computed:{internalValue:{get(){return this.internalLazyValue},set(e){e!==this.internalLazyValue&&(this.internalLazyValue=e,this.$emit(t,e))}}},watch:{[e](e){this.internalLazyValue=e}}})}();t.Z=i},function(e,t,n){"use strict";n.d(t,{Fx:function(){return m},Zq:function(){return g},b0:function(){return u},Z5:function(){return c},T0:function(){return d},Qn:function(){return p},V:function(){return h},cu:function(){return f}});var r=n(606);function i(e=[],...t){return Array().concat(e,...t)}function o(e,t="top center 0",n){return{name:e,functional:!0,props:{group:{type:Boolean,default:!1},hideOnLeave:{type:Boolean,default:!1},leaveAbsolute:{type:Boolean,default:!1},mode:{type:String,default:n},origin:{type:String,default:t}},render(t,n){const o="transition"+(n.props.group?"-group":""),a={props:{name:e,mode:n.props.mode},on:{beforeEnter(e){e.style.transformOrigin=n.props.origin,e.style.webkitTransformOrigin=n.props.origin}}};return n.props.leaveAbsolute&&(a.on.leave=i(a.on.leave,(e=>{const{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;e._transitionInitialStyles={position:e.style.position,top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height},e.style.position="absolute",e.style.top=t+"px",e.style.left=n+"px",e.style.width=r+"px",e.style.height=i+"px"})),a.on.afterLeave=i(a.on.afterLeave,(e=>{if(e&&e._transitionInitialStyles){const{position:t,top:n,left:r,width:i,height:o}=e._transitionInitialStyles;delete e._transitionInitialStyles,e.style.position=t||"",e.style.top=n||"",e.style.left=r||"",e.style.width=i||"",e.style.height=o||""}}))),n.props.hideOnLeave&&(a.on.leave=i(a.on.leave,(e=>{e.style.setProperty("display","none","important")}))),t(o,(0,r.ZP)(n.data,a),n.children)}}}function a(e,t,n="in-out"){return{name:e,functional:!0,props:{mode:{type:String,default:n}},render:(n,i)=>n("transition",(0,r.ZP)(i.data,{props:{name:e},on:t}),i.children)}}var s=n(565);function l(e="",t=!1){const n=t?"width":"height",r=`offset${(0,s.jC)(n)}`;return{beforeEnter(e){e._parent=e.parentNode,e._initialStyle={transition:e.style.transition,overflow:e.style.overflow,[n]:e.style[n]}},enter(t){const i=t._initialStyle;t.style.setProperty("transition","none","important"),t.style.overflow="hidden";const o=`${t[r]}px`;t.style[n]="0",t.offsetHeight,t.style.transition=i.transition,e&&t._parent&&t._parent.classList.add(e),requestAnimationFrame((()=>{t.style[n]=o}))},afterEnter:o,enterCancelled:o,leave(e){e._initialStyle={transition:"",overflow:e.style.overflow,[n]:e.style[n]},e.style.overflow="hidden",e.style[n]=`${e[r]}px`,e.offsetHeight,requestAnimationFrame((()=>e.style[n]="0"))},afterLeave:i,leaveCancelled:i};function i(t){e&&t._parent&&t._parent.classList.remove(e),o(t)}function o(e){const t=e._initialStyle[n];e.style.overflow=e._initialStyle.overflow,null!=t&&(e.style[n]=t),delete e._initialStyle}}o("carousel-transition"),o("carousel-reverse-transition"),o("tab-transition"),o("tab-reverse-transition"),o("menu-transition");const u=o("fab-transition","center center","out-in"),c=(o("dialog-transition"),o("dialog-bottom-transition"),o("dialog-top-transition"),o("fade-transition")),d=o("scale-transition"),p=(o("scroll-x-transition"),o("scroll-x-reverse-transition"),o("scroll-y-transition"),o("scroll-y-reverse-transition"),o("slide-x-transition")),f=(o("slide-x-reverse-transition"),o("slide-y-transition")),h=o("slide-y-reverse-transition"),m=a("expand-transition",l()),g=a("expand-x-transition",l("",!0))},function(e,t,n){"use strict";n.d(t,{ZP:function(){return s},ze:function(){return u},bp:function(){return c}});var r=n(565);const i=/;(?![^(]*\))/g,o=/:(.*)/;function a(e){const t={};for(const n of e.split(i)){let[e,i]=n.split(o);e=e.trim(),e&&("string"==typeof i&&(i=i.trim()),t[(0,r._A)(e)]=i)}return t}function s(){const e={};let t,n=arguments.length;for(;n--;)for(t of Object.keys(arguments[n]))switch(t){case"class":case"directives":arguments[n][t]&&(e[t]=u(e[t],arguments[n][t]));break;case"style":arguments[n][t]&&(e[t]=l(e[t],arguments[n][t]));break;case"staticClass":if(!arguments[n][t])break;void 0===e[t]&&(e[t]=""),e[t]&&(e[t]+=" "),e[t]+=arguments[n][t].trim();break;case"on":case"nativeOn":arguments[n][t]&&(e[t]=c(e[t],arguments[n][t]));break;case"attrs":case"props":case"domProps":case"scopedSlots":case"staticStyle":case"hook":case"transition":if(!arguments[n][t])break;e[t]||(e[t]={}),e[t]={...arguments[n][t],...e[t]};break;default:e[t]||(e[t]=arguments[n][t])}return e}function l(e,t){return e?t?(e=(0,r.TI)("string"==typeof e?a(e):e)).concat("string"==typeof t?a(t):t):e:t}function u(e,t){return t?e&&e?(0,r.TI)(e).concat(t):t:e}function c(...e){if(!e[0])return e[1];if(!e[1])return e[0];const t={};for(let n=2;n--;){const r=e[n];for(const e in r)r[e]&&(t[e]?t[e]=[].concat(r[e],t[e]):t[e]=r[e])}return t}},function(e,t,n){"use strict";n.d(t,{h7:function(){return o},ZB:function(){return s},EB:function(){return l}});var r=n(601),i=n(565);const o=(0,i.Ji)("v-card__actions"),a=(0,i.Ji)("v-card__subtitle"),s=(0,i.Ji)("v-card__text"),l=(0,i.Ji)("v-card__title");r.Z},function(e,t,n){"use strict";n(76);var r=n(609);t.Z=(0,r.Z)("flex")},function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(490);function i(e){return r.default.extend({name:`v-${e}`,functional:!0,props:{id:String,tag:{type:String,default:"div"}},render(t,{props:n,data:r,children:i}){r.staticClass=`${e} ${r.staticClass||""}`.trim();const{attrs:o}=r;if(o){r.attrs={};const e=Object.keys(o).filter((e=>{if("slot"===e)return!1;const t=o[e];return e.startsWith("data-")?(r.attrs[e]=t,!1):t||"string"==typeof t}));e.length&&(r.staticClass+=` ${e.join(" ")}`)}return n.id&&(r.domProps=r.domProps||{},r.domProps.id=n.id),t(n.tag,r,i)}})}},function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r,i=n(586),o=n(587),a=n(595),s=n(591),l=n(565),u=n(490),c=n(583);!function(e){e.xSmall="12px",e.small="16px",e.default="24px",e.medium="28px",e.large="36px",e.xLarge="40px"}(r||(r={}));const d=(0,c.Z)(i.Z,o.Z,a.Z,s.Z).extend({name:"v-icon",props:{dense:Boolean,disabled:Boolean,left:Boolean,right:Boolean,size:[Number,String],tag:{type:String,required:!1,default:"i"}},computed:{medium:()=>!1,hasClickListener(){return Boolean(this.listeners$.click||this.listeners$["!click"])}},methods:{getIcon(){let e="";return this.$slots.default&&(e=this.$slots.default[0].text.trim()),(0,l.RB)(this,e)},getSize(){const e={xSmall:this.xSmall,small:this.small,medium:this.medium,large:this.large,xLarge:this.xLarge},t=(0,l.XP)(e).find((t=>e[t]));return t&&r[t]||(0,l.kb)(this.size)},getDefaultData(){return{staticClass:"v-icon notranslate",class:{"v-icon--disabled":this.disabled,"v-icon--left":this.left,"v-icon--link":this.hasClickListener,"v-icon--right":this.right,"v-icon--dense":this.dense},attrs:{"aria-hidden":!this.hasClickListener,disabled:this.hasClickListener&&this.disabled,type:this.hasClickListener?"button":void 0,...this.attrs$},on:this.listeners$}},getSvgWrapperData(){const e=this.getSize(),t={...this.getDefaultData(),style:e?{fontSize:e,height:e,width:e}:void 0};return this.applyColors(t),t},applyColors(e){e.class={...e.class,...this.themeClasses},this.setTextColor(this.color,e)},renderFontIcon(e,t){const n=[],r=this.getDefaultData();let i="material-icons";const o=e.indexOf("-"),a=o<=-1;a?n.push(e):(i=e.slice(0,o),function(e){return["fas","far","fal","fab","fad","fak"].some((t=>e.includes(t)))}(i)&&(i="")),r.class[i]=!0,r.class[e]=!a;const s=this.getSize();return s&&(r.style={fontSize:s}),this.applyColors(r),t(this.hasClickListener?"button":this.tag,r,n)},renderSvgIcon(e,t){const n={class:"v-icon__svg",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":!0}},r=this.getSize();return r&&(n.style={fontSize:r,height:r,width:r}),t(this.hasClickListener?"button":"span",this.getSvgWrapperData(),[t("svg",n,[t("path",{attrs:{d:e}})])])},renderSvgIconComponent(e,t){const n={class:{"v-icon__component":!0}},r=this.getSize();r&&(n.style={fontSize:r,height:r,width:r}),this.applyColors(n);const i=e.component;return n.props=e.props,n.nativeOn=n.on,t(this.hasClickListener?"button":"span",this.getSvgWrapperData(),[t(i,n)])}},render(e){const t=this.getIcon();return"string"==typeof t?function(e){return/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4}(t)?this.renderSvgIcon(t,e):this.renderFontIcon(t,e):this.renderSvgIconComponent(t,e)}});var p=u.default.extend({name:"v-icon",$_wrapperFor:d,functional:!0,render(e,{data:t,children:n}){let r="";return t.domProps&&(r=t.domProps.textContent||t.domProps.innerHTML||r,delete t.domProps.textContent,delete t.domProps.innerHTML),e(d,t,r?[r]:n)}})},function(e,t,n){"use strict";n(76);var r=n(609);t.Z=(0,r.Z)("layout")},function(e,t,n){"use strict";n.d(t,{nv:function(){return C},Se:function(){return S},OI:function(){return w},rn:function(){return x}});var r=("undefined"!=typeof window?window:void 0!==n.g?n.g:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function i(e,t){if(void 0===t&&(t=[]),null===e||"object"!=typeof e)return e;var n,r=(n=function(t){return t.original===e},t.filter(n)[0]);if(r)return r.copy;var o=Array.isArray(e)?[]:{};return t.push({original:e,copy:o}),Object.keys(e).forEach((function(n){o[n]=i(e[n],t)})),o}function o(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function a(e){return null!==e&&"object"==typeof e}var s=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},l={namespaced:{configurable:!0}};l.namespaced.get=function(){return!!this._rawModule.namespaced},s.prototype.addChild=function(e,t){this._children[e]=t},s.prototype.removeChild=function(e){delete this._children[e]},s.prototype.getChild=function(e){return this._children[e]},s.prototype.hasChild=function(e){return e in this._children},s.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},s.prototype.forEachChild=function(e){o(this._children,e)},s.prototype.forEachGetter=function(e){this._rawModule.getters&&o(this._rawModule.getters,e)},s.prototype.forEachAction=function(e){this._rawModule.actions&&o(this._rawModule.actions,e)},s.prototype.forEachMutation=function(e){this._rawModule.mutations&&o(this._rawModule.mutations,e)},Object.defineProperties(s.prototype,l);var u=function(e){this.register([],e,!1)};function c(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return void 0;c(e.concat(r),t.getChild(r),n.modules[r])}}u.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},u.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},u.prototype.update=function(e){c([],this.root,e)},u.prototype.register=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=new s(t,n);0===e.length?this.root=i:this.get(e.slice(0,-1)).addChild(e[e.length-1],i);t.modules&&o(t.modules,(function(t,i){r.register(e.concat(i),t,n)}))},u.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],r=t.getChild(n);r&&r.runtime&&t.removeChild(n)},u.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var d;var p=function(e){var t=this;void 0===e&&(e={}),!d&&"undefined"!=typeof window&&window.Vue&&b(window.Vue);var n=e.plugins;void 0===n&&(n=[]);var i=e.strict;void 0===i&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new u(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new d,this._makeLocalGettersCache=Object.create(null);var o=this,a=this.dispatch,s=this.commit;this.dispatch=function(e,t){return a.call(o,e,t)},this.commit=function(e,t,n){return s.call(o,e,t,n)},this.strict=i;var l=this._modules.root.state;v(this,l,[],this._modules.root),g(this,l),n.forEach((function(e){return e(t)})),(void 0!==e.devtools?e.devtools:d.config.devtools)&&function(e){r&&(e._devtoolHook=r,r.emit("vuex:init",e),r.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){r.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){r.emit("vuex:action",e,t)}),{prepend:!0}))}(this)},f={state:{configurable:!0}};function h(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function m(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;v(e,n,[],e._modules.root,!0),g(e,n,t)}function g(e,t,n){var r=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,a={};o(i,(function(t,n){a[n]=function(e,t){return function(){return e(t)}}(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var s=d.config.silent;d.config.silent=!0,e._vm=new d({data:{$$state:t},computed:a}),d.config.silent=s,e.strict&&function(e){e._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}(e),r&&(n&&e._withCommit((function(){r._data.$$state=null})),d.nextTick((function(){return r.$destroy()})))}function v(e,t,n,r,i){var o=!n.length,a=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=r),!o&&!i){var s=y(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){d.set(s,l,r.state)}))}var u=r.context=function(e,t,n){var r=""===t,i={dispatch:r?e.dispatch:function(n,r,i){var o=_(n,r,i),a=o.payload,s=o.options,l=o.type;return s&&s.root||(l=t+l),e.dispatch(l,a)},commit:r?e.commit:function(n,r,i){var o=_(n,r,i),a=o.payload,s=o.options,l=o.type;s&&s.root||(l=t+l),e.commit(l,a,s)}};return Object.defineProperties(i,{getters:{get:r?function(){return e.getters}:function(){return function(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,r)===t){var o=i.slice(r);Object.defineProperty(n,o,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}(e,t)}},state:{get:function(){return y(e.state,n)}}}),i}(e,a,n);r.forEachMutation((function(t,n){!function(e,t,n,r){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){n.call(e,r.state,t)}))}(e,a+n,t,u)})),r.forEachAction((function(t,n){var r=t.root?n:a+n,i=t.handler||t;!function(e,t,n,r){(e._actions[t]||(e._actions[t]=[])).push((function(t){var i,o=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},t);return(i=o)&&"function"==typeof i.then||(o=Promise.resolve(o)),e._devtoolHook?o.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):o}))}(e,r,i,u)})),r.forEachGetter((function(t,n){!function(e,t,n,r){if(e._wrappedGetters[t])return void 0;e._wrappedGetters[t]=function(e){return n(r.state,r.getters,e.state,e.getters)}}(e,a+n,t,u)})),r.forEachChild((function(r,o){v(e,t,n.concat(o),r,i)}))}function y(e,t){return t.reduce((function(e,t){return e[t]}),e)}function _(e,t,n){return a(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}function b(e){d&&e===d||function(e){if(Number(e.version.split(".")[0])>=2)e.mixin({beforeCreate:n});else{var t=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[n].concat(e.init):n,t.call(this,e)}}function n(){var e=this.$options;e.store?this.$store="function"==typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}(d=e)}f.state.get=function(){return this._vm._data.$$state},f.state.set=function(e){0},p.prototype.commit=function(e,t,n){var r=this,i=_(e,t,n),o=i.type,a=i.payload,s=(i.options,{type:o,payload:a}),l=this._mutations[o];l&&(this._withCommit((function(){l.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,r.state)})))},p.prototype.dispatch=function(e,t){var n=this,r=_(e,t),i=r.type,o=r.payload,a={type:i,payload:o},s=this._actions[i];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,n.state)}))}catch(e){0}var l=s.length>1?Promise.all(s.map((function(e){return e(o)}))):s[0](o);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,n.state)}))}catch(e){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,n.state,e)}))}catch(e){0}t(e)}))}))}},p.prototype.subscribe=function(e,t){return h(e,this._subscribers,t)},p.prototype.subscribeAction=function(e,t){return h("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},p.prototype.watch=function(e,t,n){var r=this;return this._watcherVM.$watch((function(){return e(r.state,r.getters)}),t,n)},p.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},p.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),v(this,this.state,e,this._modules.get(e),n.preserveState),g(this,this.state)},p.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=y(t.state,e.slice(0,-1));d.delete(n,e[e.length-1])})),m(this)},p.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},p.prototype.hotUpdate=function(e){this._modules.update(e),m(this,!0)},p.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(p.prototype,f);var x=M((function(e,t){var n={};return T(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var r=D(this.$store,"mapState",e);if(!r)return;t=r.context.state,n=r.context.getters}return"function"==typeof i?i.call(this,t,n):t[i]},n[r].vuex=!0})),n})),w=M((function(e,t){var n={};return T(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=this.$store.commit;if(e){var o=D(this.$store,"mapMutations",e);if(!o)return;r=o.context.commit}return"function"==typeof i?i.apply(this,[r].concat(t)):r.apply(this.$store,[i].concat(t))}})),n})),S=M((function(e,t){var n={};return T(t).forEach((function(t){var r=t.key,i=t.val;i=e+i,n[r]=function(){if(!e||D(this.$store,"mapGetters",e))return this.$store.getters[i]},n[r].vuex=!0})),n})),C=M((function(e,t){var n={};return T(t).forEach((function(t){var r=t.key,i=t.val;n[r]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=this.$store.dispatch;if(e){var o=D(this.$store,"mapActions",e);if(!o)return;r=o.context.dispatch}return"function"==typeof i?i.apply(this,[r].concat(t)):r.apply(this.$store,[i].concat(t))}})),n}));function T(e){return function(e){return Array.isArray(e)||a(e)}(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function M(e){return function(t,n){return"string"!=typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function D(e,t,n){return e._modulesNamespaceMap[n]}function A(e,t,n){var r=n?e.groupCollapsed:e.group;try{r.call(e,t)}catch(n){e.log(t)}}function P(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function k(){var e=new Date;return" @ "+L(e.getHours(),2)+":"+L(e.getMinutes(),2)+":"+L(e.getSeconds(),2)+"."+L(e.getMilliseconds(),3)}function L(e,t){return n="0",r=t-e.toString().length,new Array(r+1).join(n)+e;var n,r}var O={Store:p,install:b,version:"3.6.2",mapState:x,mapMutations:w,mapGetters:S,mapActions:C,createNamespacedHelpers:function(e){return{mapState:x.bind(null,e),mapGetters:S.bind(null,e),mapMutations:w.bind(null,e),mapActions:C.bind(null,e)}},createLogger:function(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var r=e.transformer;void 0===r&&(r=function(e){return e});var o=e.mutationTransformer;void 0===o&&(o=function(e){return e});var a=e.actionFilter;void 0===a&&(a=function(e,t){return!0});var s=e.actionTransformer;void 0===s&&(s=function(e){return e});var l=e.logMutations;void 0===l&&(l=!0);var u=e.logActions;void 0===u&&(u=!0);var c=e.logger;return void 0===c&&(c=console),function(e){var d=i(e.state);void 0!==c&&(l&&e.subscribe((function(e,a){var s=i(a);if(n(e,d,s)){var l=k(),u=o(e),p="mutation "+e.type+l;A(c,p,t),c.log("%c prev state","color: #9E9E9E; font-weight: bold",r(d)),c.log("%c mutation","color: #03A9F4; font-weight: bold",u),c.log("%c next state","color: #4CAF50; font-weight: bold",r(s)),P(c)}d=s})),u&&e.subscribeAction((function(e,n){if(a(e,n)){var r=k(),i=s(e),o="action "+e.type+r;A(c,o,t),c.log("%c action","color: #03A9F4; font-weight: bold",i),P(c)}})))}}};t.ZP=O},function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});n(614);var r=n(618),i=n(616),o=n(615).Z.extend({name:"v-checkbox",props:{indeterminate:Boolean,indeterminateIcon:{type:String,default:"$checkboxIndeterminate"},offIcon:{type:String,default:"$checkboxOff"},onIcon:{type:String,default:"$checkboxOn"}},data(){return{inputIndeterminate:this.indeterminate}},computed:{classes(){return{...i.Z.options.computed.classes.call(this),"v-input--selection-controls":!0,"v-input--checkbox":!0,"v-input--indeterminate":this.inputIndeterminate}},computedIcon(){return this.inputIndeterminate?this.indeterminateIcon:this.isActive?this.onIcon:this.offIcon},validationState(){if(!this.isDisabled||this.inputIndeterminate)return this.hasError&&this.shouldValidate?"error":this.hasSuccess?"success":null!==this.hasColor?this.computedColor:void 0}},watch:{indeterminate(e){this.$nextTick((()=>this.inputIndeterminate=e))},inputIndeterminate(e){this.$emit("update:indeterminate",e)},isActive(){this.indeterminate&&(this.inputIndeterminate=!1)}},methods:{genCheckbox(){const{title:e,...t}=this.attrs$;return this.$createElement("div",{staticClass:"v-input--selection-controls__input"},[this.$createElement(r.Z,this.setTextColor(this.validationState,{props:{dense:this.dense,dark:this.dark,light:this.light}}),this.computedIcon),this.genInput("checkbox",{...t,"aria-checked":this.inputIndeterminate?"mixed":this.isActive.toString()}),this.genRipple(this.setTextColor(this.rippleState))])},genDefaultSlot(){return[this.genCheckbox(),this.genLabel()]}}})},function(){},function(e,t,n){"use strict";n.d(t,{X:function(){return s}});var r=n(616),i=n(620),o=n(621),a=n(583);function s(e){e.preventDefault()}t.Z=(0,a.Z)(r.Z,i.Z,o.Z).extend({name:"selectable",model:{prop:"inputValue",event:"change"},props:{id:String,inputValue:null,falseValue:null,trueValue:null,multiple:{type:Boolean,default:null},label:String},data(){return{hasColor:this.inputValue,lazyValue:this.inputValue}},computed:{computedColor(){if(this.isActive)return this.color?this.color:this.isDark&&!this.appIsDark?"white":"primary"},isMultiple(){return!0===this.multiple||null===this.multiple&&Array.isArray(this.internalValue)},isActive(){const e=this.value,t=this.internalValue;return this.isMultiple?!!Array.isArray(t)&&t.some((t=>this.valueComparator(t,e))):void 0===this.trueValue||void 0===this.falseValue?e?this.valueComparator(e,t):Boolean(t):this.valueComparator(t,this.trueValue)},isDirty(){return this.isActive},rippleState(){return this.isDisabled||this.validationState?this.validationState:void 0}},watch:{inputValue(e){this.lazyValue=e,this.hasColor=e}},methods:{genLabel(){const e=r.Z.options.methods.genLabel.call(this);return e?(e.data.on={click:s},e):e},genInput(e,t){return this.$createElement("input",{attrs:Object.assign({"aria-checked":this.isActive.toString(),disabled:this.isDisabled,id:this.computedId,role:e,type:e},t),domProps:{value:this.value,checked:this.isActive},on:{blur:this.onBlur,change:this.onChange,focus:this.onFocus,keydown:this.onKeydown,click:s},ref:"input"})},onClick(e){this.onChange(),this.$emit("click",e)},onChange(){if(!this.isInteractive)return;const e=this.value;let t=this.internalValue;if(this.isMultiple){Array.isArray(t)||(t=[]);const n=t.length;t=t.filter((t=>!this.valueComparator(t,e))),t.length===n&&t.push(e)}else t=void 0!==this.trueValue&&void 0!==this.falseValue?this.valueComparator(t,this.trueValue)?this.falseValue:this.trueValue:e?this.valueComparator(t,e)?null:e:!t;this.validate(!0,t),this.internalValue=t,this.hasColor=t},onFocus(e){this.isFocused=!0,this.$emit("focus",e)},onBlur(e){this.isFocused=!1,this.$emit("blur",e)},onKeydown(e){}}})},function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(618),i=n(619),o=n(587),a=n(591),s=n(583),l=n(565),u=(0,s.Z)(o.Z,a.Z).extend({name:"v-messages",props:{value:{type:Array,default:()=>[]}},methods:{genChildren(){return this.$createElement("transition-group",{staticClass:"v-messages__wrapper",attrs:{name:"message-transition",tag:"div"}},this.value.map(this.genMessage))},genMessage(e,t){return this.$createElement("div",{staticClass:"v-messages__message",key:t},(0,l.z9)(this,"default",{message:e,key:t})||[e])}},render(e){return e("div",this.setTextColor(this.color,{staticClass:"v-messages",class:this.themeClasses}),[this.genChildren()])}}),c=n(586),d=n(617),p=n(606);var f=(0,s.Z)(c.Z,d.Z).extend().extend({name:"v-input",inheritAttrs:!1,props:{appendIcon:String,backgroundColor:{type:String,default:""},dense:Boolean,height:[Number,String],hideDetails:[Boolean,String],hideSpinButtons:Boolean,hint:String,id:String,label:String,loading:Boolean,persistentHint:Boolean,prependIcon:String,value:null},data(){return{lazyValue:this.value,hasMouseDown:!1}},computed:{classes(){return{"v-input--has-state":this.hasState,"v-input--hide-details":!this.showDetails,"v-input--is-label-active":this.isLabelActive,"v-input--is-dirty":this.isDirty,"v-input--is-disabled":this.isDisabled,"v-input--is-focused":this.isFocused,"v-input--is-loading":!1!==this.loading&&null!=this.loading,"v-input--is-readonly":this.isReadonly,"v-input--dense":this.dense,"v-input--hide-spin-buttons":this.hideSpinButtons,...this.themeClasses}},computedId(){return this.id||`input-${this._uid}`},hasDetails(){return this.messagesToDisplay.length>0},hasHint(){return!this.hasMessages&&!!this.hint&&(this.persistentHint||this.isFocused)},hasLabel(){return!(!this.$slots.label&&!this.label)},internalValue:{get(){return this.lazyValue},set(e){this.lazyValue=e,this.$emit(this.$_modelEvent,e)}},isDirty(){return!!this.lazyValue},isLabelActive(){return this.isDirty},messagesToDisplay(){return this.hasHint?[this.hint]:this.hasMessages?this.validations.map((e=>{if("string"==typeof e)return e;const t=e(this.internalValue);return"string"==typeof t?t:""})).filter((e=>""!==e)):[]},showDetails(){return!1===this.hideDetails||"auto"===this.hideDetails&&this.hasDetails}},watch:{value(e){this.lazyValue=e}},beforeCreate(){this.$_modelEvent=this.$options.model&&this.$options.model.event||"input"},methods:{genContent(){return[this.genPrependSlot(),this.genControl(),this.genAppendSlot()]},genControl(){return this.$createElement("div",{staticClass:"v-input__control",attrs:{title:this.attrs$.title}},[this.genInputSlot(),this.genMessages()])},genDefaultSlot(){return[this.genLabel(),this.$slots.default]},genIcon(e,t,n={}){const i=this[`${e}Icon`],o=`click:${(0,l.GL)(e)}`,a=!(!this.listeners$[o]&&!t),s=(0,p.ZP)({attrs:{"aria-label":a?(0,l.GL)(e).split("-")[0]+" icon":void 0,color:this.validationState,dark:this.dark,disabled:this.isDisabled,light:this.light},on:a?{click:e=>{e.preventDefault(),e.stopPropagation(),this.$emit(o,e),t&&t(e)},mouseup:e=>{e.preventDefault(),e.stopPropagation()}}:void 0},n);return this.$createElement("div",{staticClass:"v-input__icon",class:e?`v-input__icon--${(0,l.GL)(e)}`:void 0},[this.$createElement(r.Z,s,i)])},genInputSlot(){return this.$createElement("div",this.setBackgroundColor(this.backgroundColor,{staticClass:"v-input__slot",style:{height:(0,l.kb)(this.height)},on:{click:this.onClick,mousedown:this.onMouseDown,mouseup:this.onMouseUp},ref:"input-slot"}),[this.genDefaultSlot()])},genLabel(){return this.hasLabel?this.$createElement(i.Z,{props:{color:this.validationState,dark:this.dark,disabled:this.isDisabled,focused:this.hasState,for:this.computedId,light:this.light}},this.$slots.label||this.label):null},genMessages(){return this.showDetails?this.$createElement(u,{props:{color:this.hasHint?"":this.validationState,dark:this.dark,light:this.light,value:this.messagesToDisplay},attrs:{role:this.hasMessages?"alert":null},scopedSlots:{default:e=>(0,l.z9)(this,"message",e)}}):null},genSlot(e,t,n){if(!n.length)return null;const r=`${e}-${t}`;return this.$createElement("div",{staticClass:`v-input__${r}`,ref:r},n)},genPrependSlot(){const e=[];return this.$slots.prepend?e.push(this.$slots.prepend):this.prependIcon&&e.push(this.genIcon("prepend")),this.genSlot("prepend","outer",e)},genAppendSlot(){const e=[];return this.$slots.append?e.push(this.$slots.append):this.appendIcon&&e.push(this.genIcon("append")),this.genSlot("append","outer",e)},onClick(e){this.$emit("click",e)},onMouseDown(e){this.hasMouseDown=!0,this.$emit("mousedown",e)},onMouseUp(e){this.hasMouseDown=!1,this.$emit("mouseup",e)}},render(e){return e("div",this.setTextColor(this.validationState,{staticClass:"v-input",class:this.classes}),this.genContent())}})},function(e,t,n){"use strict";var r=n(587),i=n(591),o=n(597),a=n(565),s=n(566);const l=(0,n(583).Z)(r.Z,(0,o.f)("form"),i.Z);t.Z=l.extend({name:"validatable",props:{disabled:Boolean,error:Boolean,errorCount:{type:[Number,String],default:1},errorMessages:{type:[String,Array],default:()=>[]},messages:{type:[String,Array],default:()=>[]},readonly:Boolean,rules:{type:Array,default:()=>[]},success:Boolean,successMessages:{type:[String,Array],default:()=>[]},validateOnBlur:Boolean,value:{required:!1}},data(){return{errorBucket:[],hasColor:!1,hasFocused:!1,hasInput:!1,isFocused:!1,isResetting:!1,lazyValue:this.value,valid:!1}},computed:{computedColor(){if(!this.isDisabled)return this.color?this.color:this.isDark&&!this.appIsDark?"white":"primary"},hasError(){return this.internalErrorMessages.length>0||this.errorBucket.length>0||this.error},hasSuccess(){return this.internalSuccessMessages.length>0||this.success},externalError(){return this.internalErrorMessages.length>0||this.error},hasMessages(){return this.validationTarget.length>0},hasState(){return!this.isDisabled&&(this.hasSuccess||this.shouldValidate&&this.hasError)},internalErrorMessages(){return this.genInternalMessages(this.errorMessages)},internalMessages(){return this.genInternalMessages(this.messages)},internalSuccessMessages(){return this.genInternalMessages(this.successMessages)},internalValue:{get(){return this.lazyValue},set(e){this.lazyValue=e,this.$emit("input",e)}},isDisabled(){return this.disabled||!!this.form&&this.form.disabled},isInteractive(){return!this.isDisabled&&!this.isReadonly},isReadonly(){return this.readonly||!!this.form&&this.form.readonly},shouldValidate(){return!!this.externalError||!this.isResetting&&(this.validateOnBlur?this.hasFocused&&!this.isFocused:this.hasInput||this.hasFocused)},validations(){return this.validationTarget.slice(0,Number(this.errorCount))},validationState(){if(!this.isDisabled)return this.hasError&&this.shouldValidate?"error":this.hasSuccess?"success":this.hasColor?this.computedColor:void 0},validationTarget(){return this.internalErrorMessages.length>0?this.internalErrorMessages:this.successMessages&&this.successMessages.length>0?this.internalSuccessMessages:this.messages&&this.messages.length>0?this.internalMessages:this.shouldValidate?this.errorBucket:[]}},watch:{rules:{handler(e,t){(0,a.vZ)(e,t)||this.validate()},deep:!0},internalValue(){this.hasInput=!0,this.validateOnBlur||this.$nextTick(this.validate)},isFocused(e){e||this.isDisabled||(this.hasFocused=!0,this.validateOnBlur&&this.$nextTick(this.validate))},isResetting(){setTimeout((()=>{this.hasInput=!1,this.hasFocused=!1,this.isResetting=!1,this.validate()}),0)},hasError(e){this.shouldValidate&&this.$emit("update:error",e)},value(e){this.lazyValue=e}},beforeMount(){this.validate()},created(){this.form&&this.form.register(this)},beforeDestroy(){this.form&&this.form.unregister(this)},methods:{genInternalMessages:e=>e?Array.isArray(e)?e:[e]:[],reset(){this.isResetting=!0,this.internalValue=Array.isArray(this.internalValue)?[]:null},resetValidation(){this.isResetting=!0},validate(e=!1,t){const n=[];t=t||this.internalValue,e&&(this.hasInput=this.hasFocused=!0);for(let e=0;e({activatedBy:null,animate:!1,animateTimeout:-1,stackMinZIndex:200,previousActiveElement:null}),computed:{classes(){return{[`v-dialog ${this.contentClass}`.trim()]:!0,"v-dialog--active":this.isActive,"v-dialog--persistent":this.persistent,"v-dialog--fullscreen":this.fullscreen,"v-dialog--scrollable":this.scrollable,"v-dialog--animated":this.animate}},contentClasses(){return{"v-dialog__content":!0,"v-dialog__content--active":this.isActive}},hasActivator(){return Boolean(!!this.$slots.activator||!!this.$scopedSlots.activator)}},watch:{isActive(e){var t;e?(this.show(),this.hideScroll()):(this.removeOverlay(),this.unbind(),null===(t=this.previousActiveElement)||void 0===t||t.focus())},fullscreen(e){this.isActive&&(e?(this.hideScroll(),this.removeOverlay(!1)):(this.showScroll(),this.genOverlay()))}},created(){this.$attrs.hasOwnProperty("full-width")&&(0,p.Jk)("full-width",this)},beforeMount(){this.$nextTick((()=>{this.isBooted=this.isActive,this.isActive&&this.show()}))},beforeDestroy(){"undefined"!=typeof window&&this.unbind()},methods:{animateClick(){this.animate=!1,this.$nextTick((()=>{this.animate=!0,window.clearTimeout(this.animateTimeout),this.animateTimeout=window.setTimeout((()=>this.animate=!1),150)}))},closeConditional(e){const t=e.target;return!(this._isDestroyed||!this.isActive||this.$refs.content.contains(t)||this.overlay&&t&&!this.overlay.$el.contains(t))&&this.activeZIndex>=this.getMaxZIndex()},hideScroll(){this.fullscreen?document.documentElement.classList.add("overflow-y-hidden"):s.Z.options.methods.hideScroll.call(this)},show(){!this.fullscreen&&!this.hideOverlay&&this.genOverlay(),this.$nextTick((()=>{this.$nextTick((()=>{var e,t;(null===(e=this.$refs.dialog)||void 0===e?void 0:e.contains(document.activeElement))||(this.previousActiveElement=document.activeElement,null===(t=this.$refs.dialog)||void 0===t||t.focus()),this.bind()}))}))},bind(){window.addEventListener("focusin",this.onFocusin)},unbind(){window.removeEventListener("focusin",this.onFocusin)},onClickOutside(e){this.$emit("click:outside",e),this.persistent?this.noClickAnimation||this.animateClick():this.isActive=!1},onKeydown(e){if(e.keyCode===f.Do.esc&&!this.getOpenDependents().length)if(this.persistent)this.noClickAnimation||this.animateClick();else{this.isActive=!1;const e=this.getActivator();this.$nextTick((()=>e&&e.focus()))}this.$emit("keydown",e)},onFocusin(e){if(!e||!this.retainFocus)return;const t=e.target;if(t&&this.$refs.dialog&&![document,this.$refs.dialog].includes(t)&&!this.$refs.dialog.contains(t)&&this.activeZIndex>=this.getMaxZIndex()&&!this.getOpenDependentElements().some((e=>e.contains(t)))){const e=[...this.$refs.dialog.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')].find((e=>!e.hasAttribute("disabled")));e&&e.focus()}},genContent(){return this.showLazyContent((()=>[this.$createElement(r.Z,{props:{root:!0,light:this.light,dark:this.dark}},[this.$createElement("div",{class:this.contentClasses,attrs:{role:"dialog","aria-modal":this.hideOverlay?void 0:"true",...this.getScopeIdAttrs()},on:{keydown:this.onKeydown},style:{zIndex:this.activeZIndex},ref:"content"},[this.genTransition()])])]))},genTransition(){const e=this.genInnerContent();return this.transition?this.$createElement("transition",{props:{name:this.transition,origin:this.origin,appear:!0}},[e]):e},genInnerContent(){const e={class:this.classes,attrs:{tabindex:this.isActive?0:void 0},ref:"dialog",directives:[{name:"click-outside",value:{handler:this.onClickOutside,closeConditional:this.closeConditional,include:this.getOpenDependentElements}},{name:"show",value:this.isActive}],style:{transformOrigin:this.origin}};return this.fullscreen||(e.style={...e.style,maxWidth:(0,f.kb)(this.maxWidth),width:(0,f.kb)(this.width)}),this.$createElement("div",e,this.getContentSlot())}},render(e){return e("div",{staticClass:"v-dialog__container",class:{"v-dialog__container--attached":""===this.attach||!0===this.attach||"attach"===this.attach}},[this.genActivator(),this.genContent()])}})},function(e,t,n){"use strict";var r=n(583);function i(e){const t=[];for(let n=0;n({closeDependents:!0,isActive:!1,isDependent:!0}),watch:{isActive(e){if(e)return;const t=this.getOpenDependents();for(let e=0;e{e.elm&&e.elm.parentNode&&e.elm.parentNode.removeChild(e.elm)}))}t.Z=(0,o.Z)(r.Z).extend({name:"detachable",props:{attach:{default:!1,validator:function(e){const t=typeof e;return"boolean"===t||"string"===t||e.nodeType===Node.ELEMENT_NODE}},contentClass:{type:String,default:""}},data:()=>({activatorNode:null,hasDetached:!1}),watch:{attach(){this.hasDetached=!1,this.initDetach()},hasContent(){this.$nextTick(this.initDetach)}},beforeMount(){this.$nextTick((()=>{if(this.activatorNode){(Array.isArray(this.activatorNode)?this.activatorNode:[this.activatorNode]).forEach((e=>{if(!e.elm)return;if(!this.$el.parentNode)return;const t=this.$el===this.$el.parentNode.firstChild?this.$el:this.$el.nextSibling;this.$el.parentNode.insertBefore(e.elm,t)}))}}))},mounted(){this.hasContent&&this.initDetach()},deactivated(){this.isActive=!1},beforeDestroy(){this.$refs.content&&this.$refs.content.parentNode&&this.$refs.content.parentNode.removeChild(this.$refs.content)},destroyed(){if(this.activatorNode){const e=Array.isArray(this.activatorNode)?this.activatorNode:[this.activatorNode];if(this.$el.isConnected){const t=new MutationObserver((n=>{n.some((e=>Array.from(e.removedNodes).includes(this.$el)))&&(t.disconnect(),s(e))}));t.observe(this.$el.parentNode,{subtree:!1,childList:!0})}else s(e)}},methods:{getScopeIdAttrs(){const e=(0,i.vO)(this.$vnode,"context.$options._scopeId");return e&&{[e]:""}},initDetach(){if(this._isDestroyed||!this.$refs.content||this.hasDetached||""===this.attach||!0===this.attach||"attach"===this.attach)return;let e;e=!1===this.attach?document.querySelector("[data-app]"):"string"==typeof this.attach?document.querySelector(this.attach):this.attach,e?(e.appendChild(this.$refs.content),this.hasDetached=!0):(0,a.Kd)(`Unable to locate target ${this.attach||"[data-app]"}`,this)}}})},function(e,t,n){"use strict";var r=n(566),i=n(490);t.Z=i.default.extend().extend({name:"bootable",props:{eager:Boolean},data:()=>({isBooted:!1}),computed:{hasContent(){return this.isBooted||this.eager||this.isActive}},watch:{isActive(){this.isBooted=!0}},created(){"lazy"in this.$attrs&&(0,r.Jk)("lazy",this)},methods:{showLazyContent(e){return this.hasContent&&e?e():[this.$createElement()]}}})},function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(587),i=n(591),o=n(598),a=(0,n(583).Z)(r.Z,i.Z,o.Z).extend({name:"v-overlay",props:{absolute:Boolean,color:{type:String,default:"#212121"},dark:{type:Boolean,default:!0},opacity:{type:[Number,String],default:.46},value:{default:!0},zIndex:{type:[Number,String],default:5}},computed:{__scrim(){const e=this.setBackgroundColor(this.color,{staticClass:"v-overlay__scrim",style:{opacity:this.computedOpacity}});return this.$createElement("div",e)},classes(){return{"v-overlay--absolute":this.absolute,"v-overlay--active":this.isActive,...this.themeClasses}},computedOpacity(){return Number(this.isActive?this.opacity:0)},styles(){return{zIndex:this.zIndex}}},methods:{genContent(){return this.$createElement("div",{staticClass:"v-overlay__content"},this.$slots.default)}},render(e){const t=[this.__scrim];return this.isActive&&t.push(this.genContent()),e("div",{staticClass:"v-overlay",on:this.$listeners,class:this.classes,style:this.styles},t)}}),s=n(565),l=n(490).default.extend().extend({name:"overlayable",props:{hideOverlay:Boolean,overlayColor:String,overlayOpacity:[Number,String]},data:()=>({animationFrame:0,overlay:null}),watch:{hideOverlay(e){this.isActive&&(e?this.removeOverlay():this.genOverlay())}},beforeDestroy(){this.removeOverlay()},methods:{createOverlay(){const e=new a({propsData:{absolute:this.absolute,value:!1,color:this.overlayColor,opacity:this.overlayOpacity}});e.$mount();const t=this.absolute?this.$el.parentNode:document.querySelector("[data-app]");t&&t.insertBefore(e.$el,t.firstChild),this.overlay=e},genOverlay(){if(this.hideScroll(),!this.hideOverlay)return this.overlay||this.createOverlay(),this.animationFrame=requestAnimationFrame((()=>{this.overlay&&(void 0!==this.activeZIndex?this.overlay.zIndex=String(this.activeZIndex-1):this.$el&&(this.overlay.zIndex=(0,s.KK)(this.$el)),this.overlay.value=!0)})),!0},removeOverlay(e=!0){this.overlay&&((0,s.qh)(this.overlay.$el,"transitionend",(()=>{this.overlay&&this.overlay.$el&&this.overlay.$el.parentNode&&!this.overlay.value&&!this.isActive&&(this.overlay.$el.parentNode.removeChild(this.overlay.$el),this.overlay.$destroy(),this.overlay=null)})),cancelAnimationFrame(this.animationFrame),this.overlay.value=!1),e&&this.showScroll()},scrollListener(e){if("key"in e){if(["INPUT","TEXTAREA","SELECT"].includes(e.target.tagName)||e.target.isContentEditable)return;const t=[s.Do.up,s.Do.pageup],n=[s.Do.down,s.Do.pagedown];if(t.includes(e.keyCode))e.deltaY=-1;else{if(!n.includes(e.keyCode))return;e.deltaY=1}}(e.target===this.overlay||"keydown"!==e.type&&e.target===document.body||this.checkPath(e))&&e.preventDefault()},hasScrollbar(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return(["auto","scroll"].includes(t.overflowY)||"SELECT"===e.tagName)&&e.scrollHeight>e.clientHeight||["auto","scroll"].includes(t.overflowX)&&e.scrollWidth>e.clientWidth},shouldScroll(e,t){if(e.hasAttribute("data-app"))return!1;const n=t.shiftKey||t.deltaX?"x":"y",r="y"===n?t.deltaY:t.deltaX||t.deltaY;let i,o;"y"===n?(i=0===e.scrollTop,o=e.scrollTop+e.clientHeight===e.scrollHeight):(i=0===e.scrollLeft,o=e.scrollLeft+e.clientWidth===e.scrollWidth);return!(i||!(r<0))||(!(o||!(r>0))||!(!i&&!o)&&this.shouldScroll(e.parentNode,t))},isInside(e,t){return e===t||null!==e&&e!==document.body&&this.isInside(e.parentNode,t)},checkPath(e){const t=(0,s.iZ)(e);if("keydown"===e.type&&t[0]===document.body){const t=this.$refs.dialog,n=window.getSelection().anchorNode;return!(t&&this.hasScrollbar(t)&&this.isInside(n,t))||!this.shouldScroll(t,e)}for(let n=0;n({isActive:!1,originalValue:null}),watch:{isActive(e){e?this.originalValue=this.returnValue:this.$emit("update:return-value",this.originalValue)}},methods:{save(e){this.originalValue=e,setTimeout((()=>{this.isActive=!1}))}}})},function(e,t,n){"use strict";var r=n(490),i=n(565);t.Z=r.default.extend().extend({name:"stackable",data:()=>({stackElement:null,stackExclude:null,stackMinZIndex:0,isActive:!1}),computed:{activeZIndex(){if("undefined"==typeof window)return 0;const e=this.stackElement||this.$refs.content,t=this.isActive?this.getMaxZIndex(this.stackExclude||[e])+2:(0,i.KK)(e);return null==t?t:parseInt(t)}},methods:{getMaxZIndex(e=[]){const t=this.$el,n=[this.stackMinZIndex,(0,i.KK)(t)],r=[...document.getElementsByClassName("v-menu__content--active"),...document.getElementsByClassName("v-dialog__content--active")];for(let t=0;t["string","object"].includes(typeof e)},disabled:Boolean,internalActivator:Boolean,openOnClick:{type:Boolean,default:!0},openOnHover:Boolean,openOnFocus:Boolean},data:()=>({activatorElement:null,activatorNode:[],events:["click","mouseenter","mouseleave","focus"],listeners:{}}),watch:{activator:"resetActivator",openOnFocus:"resetActivator",openOnHover:"resetActivator"},mounted(){const e=(0,a.sp)(this,"activator",!0);e&&["v-slot","normal"].includes(e)&&(0,s.N6)('The activator slot must be bound, try \'