UNPKG

@tindtechnologies/universalviewer

Version:

The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎

2 lines 894 kB
/*! For license information please see 5576.6b9cb65968ef0c19ae39.js.LICENSE.txt */ "use strict";(self.webpackChunkUV=self.webpackChunkUV||[]).push([[5576],{5576(t,e,n){n.r(e),n.d(e,{al_angle_editor:()=>A,al_console:()=>C,al_control_panel:()=>j,al_edge_editor:()=>G,al_graph_editor:()=>V,al_graph_settings:()=>Y,al_node_editor:()=>q,al_node_list:()=>J,al_settings:()=>K,al_tabs:()=>$,al_url_picker:()=>tt,al_view_controls:()=>nt,al_viewer:()=>eu,ion_app:()=>nu,ion_button:()=>ou,ion_icon:()=>du,ion_input:()=>mu,ion_item:()=>vu,ion_item_divider:()=>yu,ion_label:()=>bu,ion_list:()=>xu,ion_list_header:()=>wu,ion_range:()=>Eu,ion_ripple_effect:()=>Tu,ion_select:()=>Pu,ion_select_option:()=>Bu,ion_tab:()=>Fu,ion_tab_bar:()=>ju,ion_tab_button:()=>Uu,ion_textarea:()=>Gu,ion_toggle:()=>Wu});var i=n(5873),r=n(884),o=n(636),a=n(1178),s=n(1867),l=n(5721),c=n(8265);t=n.hmd(t);var h,u,d,p,f,m,g,v,y,b,x=(h=function(t,e){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},h(t,e)},function(t,e){function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),w=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){t.done?r(t.value):new n((function(e){e(t.value)})).then(a,s)}l((i=i.apply(t,e||[])).next())}))},E=function(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[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,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},_=void 0,M="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgY2xhc3M9InMtaW9uLWljb24iPjxwYXRoIGQ9Ik05NiAyMzVoMzIwdjQySDk2eiI+PC9wYXRoPjwvc3ZnPgo=",S="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgY2xhc3M9InMtaW9uLWljb24iPjxwYXRoIGQ9Ik0xODYuMzAxIDMzOS44OTNMOTYgMjQ5LjQ2MWwtMzIgMzAuNTA3TDE4Ni4zMDEgNDAyIDQ0OCAxNDAuNTA2IDQxNiAxMTB6Ij48L3BhdGg+PC9zdmc+Cg==",T={delete:"Delete",description:"Description",title:"Title",update:"Update"},A=function(){function t(t){(0,i.r)(this,t),this._contentStrings=T,this.deleteAngle=(0,i.c)(this,"deleteAngle",7),this.saveAngle=(0,i.c)(this,"saveAngle",7)}return t.prototype.render=function(){var t=this;if(this.angle){var e=this.angle,n=e[0],r=e[1];return(0,i.h)("form",{onSubmit:function(t){return t.preventDefault()}},(0,i.h)("ion-item",null,(0,i.h)("ion-input",{id:"title",value:r.title,placeholder:this._contentStrings.title,required:!0,onIonChange:function(t){return r.title=t.detail.value},maxlength:20})),(0,i.h)("ion-item",null,(0,i.h)("ion-textarea",{id:"description",value:r.description,placeholder:this._contentStrings.description,rows:5,onIonChange:function(t){return r.description=t.detail.value},maxlength:280})),(0,i.h)("ion-item",null,(0,i.h)("ion-button",{size:"small",onClick:function(){t.deleteAngle.emit(n),t.angle=null}},(0,i.h)("ion-icon",{src:M})," ",this._contentStrings.delete),(0,i.h)("ion-button",{size:"small",type:"submit",onClick:function(){r.title&&t.saveAngle.emit([n,r])}},(0,i.h)("ion-icon",{src:S})," ",this._contentStrings.update)))}return null},Object.defineProperty(t,"style",{get:function(){return"#title{--background:var(--al-input-background-color);--color:var(--al-input-color);--padding-bottom:var(--al-input-padding-bottom);--padding-end:var(--al-input-padding-end);--padding-start:var(--al-input-padding-start);--padding-top:var(--al-input-padding-top);font-size:var(--al-input-font-size)}#description{--background:var(--al-textarea-background-color);--color:var(--al-textarea-color);--padding-bottom:var(--al-textarea-padding-bottom);--padding-end:var(--al-textarea-padding-end);--padding-start:var(--al-textarea-padding-start);--padding-top:var(--al-textarea-padding-top);font-size:var(--al-textarea-font-size)}"},enumerable:!0,configurable:!0}),t}(),L={update:"Update"},C=function(){function t(t){(0,i.r)(this,t),this._contentStrings=L,this.graph=null,this.tabSize=2,this.graphSubmitted=(0,i.c)(this,"graphSubmitted",7)}return t.prototype._getGraphJson=function(){var t="";try{t=JSON.stringify(JSON.parse(this.graph),void 0,this.tabSize)}catch(t){}return t},t.prototype.render=function(){var t=this;return(0,i.h)("form",{onSubmit:function(t){return t.preventDefault()}},(0,i.h)("ion-item",null,(0,i.h)("ion-textarea",{id:"graph",value:this._getGraphJson(),rows:10,required:!0,onIonChange:function(e){return t.graph=e.detail.value},ref:function(e){return t._graph=e}})),(0,i.h)("ion-item",null,(0,i.h)("ion-button",{size:"small",type:"submit",onClick:function(){t.graph&&t.graphSubmitted.emit(t._graph.value)}},(0,i.h)("ion-icon",{src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgY2xhc3M9InMtaW9uLWljb24iPjxwYXRoIGQ9Ik0xOTIgMTI4bDEyOCAxMjgtMTI4IDEyOHoiPjwvcGF0aD48L3N2Zz4K"})," ",this._contentStrings.update)))},Object.defineProperty(t,"style",{get:function(){return"#graph{--background:var(--al-textarea-background-color);--color:var(--al-textarea-color);--padding-bottom:var(--al-textarea-padding-bottom);--padding-end:var(--al-textarea-padding-end);--padding-start:var(--al-textarea-padding-start);--padding-top:var(--al-textarea-padding-top);font-size:var(--al-console-font-size)}"},enumerable:!0,configurable:!0}),t}(),P=function(t,e){return(0,i.h)("div",{style:{"overflow-y":"auto",width:"100%","min-height":"0","max-height":"100%",height:t.height}},e)},R={console:"Console",graph:"Nodes",settings:"Settings",src:"Source"},O=function(){};O.boundingBoxWidth=2,O.controllerName="-controller",O.edgeMinSize=75e-6,O.edgeSize=.0075,O.fov=45,O.fontSizeLarge=1,O.fontSizeMedium=.7,O.fontSizeSmall=.4,O.frustrumScaleFactor=.5,O.lightIntensity=.5,O.maxAnimationSteps=50,O.minLoadingMS=500,O.movedEventName="-moved",O.movingStepCount=2,O.nodeMinSize=2e-4,O.nodeSize=.02,O.stackSpaceMultiplier={x:10,y:10,z:10},O.stepPowerMinMax=[1,10],O.targetFrameTime=1e3/24,O.textUnitsDecimalPlaces=3,O.titleIdName="-title",O.topLayerRenderOrder=999,O.unitsDecimalPlaces=6,O.zoomFactor=3,O.volumeRaycastSensitivity=.05,O.volumeStepsDelay=800,O.textPadding={width:.03,height:.03},O.minTimeForThrottle=5*(O.minFrameMS=15),O.buttonColors={active:"#f50057",hover:"#f50057",up:"#00b0ff"},O.colors={red:"#f50057",blue:"#00b0ff",black:"#000000",grey:"#222222",white:"#ffffff",yellow:"#ffeb3b",green:"#76ff03",lightRed:"#f77777"},O.lights={ambientLightColor:13684944,ambientLightIntensity:.25,directionalLight1Color:16777215,directionalLight1Intensity:.75,directionalLight2Color:10584,directionalLight2Intensity:.5},O.camera={dampingFactor:.25,far:1e4,fov:O.fov,maxDistance:8e3,maxPolarAngle:175,minDistance:0,minPolarAngle:5,near:.05,nearFactor:.9,orbitPanSpeed:.3,orbitRotateSpeed:.5,orbitZoomSpeed:1,panSpeed:.9,trackballRotateSpeed:2.5,trackballZoomSpeed:5},function(t){t.NODE="node",t.EDGE="edge",t.ANGLE="angle"}(u||(u={})),function(t){t.ORBIT="orbit",t.TRACKBALL="trackball"}(d||(d={})),function(t){t.SLICES="slices",t.VOLUME="volume",t.MESH="mesh"}(p||(p={})),function(t){t.DEFAULT="default",t.CLAY="clay",t.XRAY="xray",t.NORMALS="normals",t.WIREFRAME="wireframe"}(f||(f={})),function(t){t.GLTF="gltf",t.GLB="glb"}(m||(m={})),function(t){t.CORONAL="coronal",t.SAGGITAL="saggital",t.AXIAL="axial"}(g||(g={})),function(t){t.LOCK="LOCK",t.MESH="MESH"}(v||(v={})),function(t){t.MILLIMETERS="mm",t.METERS="m"}(y||(y={})),function(t){t.DCM="dcm",t.DICOM="dicom"}(b||(b={}));var I=function(){function t(){}return t.isWebGL2Available=function(){try{var t=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!t.getContext("webgl2"))}catch(t){return!1}},t.enableControls=function(t,e,n){n===d.TRACKBALL?t.setAttribute("al-trackball-control","enabled: "+e):t.setAttribute("al-orbit-control","enabled: "+e)},t.waitOneFrame=function(t){window.setTimeout((function(){t()}),O.minFrameMS)},t.objectToVector3=function(t){var e=new THREE.Vector3;return e.x=t.x,e.y=t.y,e.z=t.z,e},t.worldToScreen=function(t,e,n){var i=t.clone();return i.project(e),i.x=Math.round((i.x+1)*n.offsetWidth/2),i.y=Math.round((1-i.y)*n.offsetHeight/2),i.z=0,i},t.normaliseNumber=function(t){return Number(t.toFixed(O.unitsDecimalPlaces))},t.vector3ToString=function(t){return t.toArray().join(" ")},t.vector3ToNormalisedString=function(e){return t.normaliseNumber(e.x)+" "+t.normaliseNumber(e.y)+" "+t.normaliseNumber(e.z)},t.stringToVector3=function(t){var e=t.split(" "),n=new THREE.Vector3;return n.x=Number(e[0]),n.y=Number(e[1]),n.z=Number(e[2]),n},t.normaliseStringVector3=function(e){return t.vector3ToNormalisedString(t.stringToVector3(e))},t.slerp=function(t,e,n){var i=n,r=t,o=e,a=r.angleTo(o);if(a){a=THREE.Math.clamp(a,-.99,.99);var s=Math.sin(1-i)*a,l=Math.sin(i*a),c=Math.sin(a),h=s/c,u=l/c,d=r.clone().multiplyScalar(h),p=o.clone().multiplyScalar(u);return d.add(p)}return null},t.easeInOutCubic=function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},t.getSlerpCameraPath=function(e,n,i,r){for(var o=[],a=e.position.clone().addScalar(Number.EPSILON),s=e.target.clone().addScalar(Number.EPSILON),l=n.position.clone().addScalar(Number.EPSILON),c=n.target.clone().addScalar(Number.EPSILON),h=0;h<=O.maxAnimationSteps;h++){var u=this.easeInOutCubic(h/O.maxAnimationSteps);o.push({position:i?t.slerp(a.clone(),l.clone(),u):l,target:r?t.slerp(s.clone(),c.clone(),u):c})}return o},t.getSlerp3Path=function(e,n){for(var i=[],r=e.clone().addScalar(Number.EPSILON),o=n.clone().addScalar(Number.EPSILON),a=0;a<=O.maxAnimationSteps;a++){var s=this.easeInOutCubic(a/O.maxAnimationSteps);i.push(t.slerp(r.clone(),o.clone(),s))}return i},t.lookToFrustrumSpace=function(t,e,n,i){var r=new THREE.Vector3;e.getWorldDirection(r);var o=i.distanceTo(new THREE.Vector3(0,0,0)),a=new THREE.Plane(r,o),s=new THREE.Vector3;a.projectPoint(n,s),t.lookAt(s)},t.getFrustrumSpaceDistance=function(t,e,n){var i=new THREE.Vector3;t.getWorldDirection(i);var r=n.distanceTo(new THREE.Vector3(0,0,0)),o=new THREE.Plane(i,r),a=new THREE.Vector3;o.projectPoint(e,a);var s=new THREE.Ray(e);return s.lookAt(a),s.distanceToPlane(o)},t}(),D=function(){function t(){}return t._traceDataRay=function(t,e,n,i,r,o,a,s,l,c){var h=0,u=Math.floor,d=0|u(e),p=0|u(n),f=0|u(i),m=r>0?1:-1,g=o>0?1:-1,v=a>0?1:-1,y=Math.abs(1/r),b=Math.abs(1/o),x=Math.abs(1/a),w=y<1/0?y*(m>0?d+1-e:e-d):1/0,E=b<1/0?b*(g>0?p+1-n:n-p):1/0,_=x<1/0?x*(v>0?f+1-i:i-f):1/0,M=t.windowCenter-.5*t.windowWidth;M-=M*O.volumeRaycastSensitivity;for(var S=-1;h<=s;){var T,A=new THREE.Vector3(d,p,f),L=AMI.CoreUtils.worldToData(t.stack.lps2IJK,A),C=AMI.CoreUtils.getPixelData(t.stack,L);if(T=null!==C&&C>M?1:0)return l&&(l.x=e+h*r,l.y=n+h*o,l.z=i+h*a),c&&(c.x=c.y=c.z=0,0===S&&(c.x=-m),1===S&&(c.y=-g),2===S&&(c.z=-v)),T;w<E?w<_?(d+=m,h=w,w+=y,S=0):(f+=v,h=_,_+=x,S=2):E<_?(p+=g,h=E,E+=b,S=1):(f+=v,h=_,_+=x,S=2)}return l&&(l.x=e+h*r,l.y=n+h*o,l.z=i+h*a),c&&(c.x=c.y=c.z=0),0},t.volumeRay=function(t,e,n,i,r,o){var a=+e.x,s=+e.y,l=+e.z,c=+n.x,h=+n.y,u=+n.z,d=Math.sqrt(c*c+h*h+u*u);if(0===d)throw new Error("Can't raycast along a zero vector");return c/=d,h/=d,u/=d,i=void 0===i?64:+i,this._traceDataRay(t,a,s,l,c,h,u,i,r,o)},t.toAframeSpace=function(t){return t.divide(I.objectToVector3(O.stackSpaceMultiplier))},t}(),k=function(){function t(){}return t.debounce=function(t,e){return e=e||100,function(){if(!t.debouncing){var n=Array.prototype.slice.apply(arguments);t.lastReturnVal=t.apply(this,n),t.debouncing=!0}return clearTimeout(t.debounceTimeout),t.debounceTimeout=setTimeout((function(){t.debouncing=!1}),e),t.lastReturnVal}},t}(),N=function(){};N.SELECTED="al-graph-selected",N.POINTER_OVER="al-graph-pointer-over",N.POINTER_OUT="al-graph-pointer-out",N.DRAGGED="al-graph-dragged",N.POINTER_DOWN="al-graph-pointer-down",N.POINTER_UP="al-graph-pointer-up";var z=function(){function t(){}return t.getEntryWithHighestId=function(t){return t.size?Math.max.apply(Math,Array.from(t).map((function(t){var e=t[0];return Number(e.split(" ")[1])}))):0},t.getNextId=function(t,e){return t.charAt(0).toUpperCase()+t.slice(1)+" "+Number(this.getEntryWithHighestId(e)+1)},t}(),B=function(){function t(){}return t.addCssUnits=function(t){return this.cssUnits.some((function(e){return t.includes(e)}))||(t+="px"),t},t.getFileExtension=function(t){return t.substring(t.lastIndexOf(".")+1)},t.getFileEndCharacters=function(t,e){return t.slice(t.length-e)},t.getGeometryCenter=function(t){var e;return(e=t instanceof THREE.BufferGeometry?(new THREE.Geometry).fromBufferGeometry(t):t).computeBoundingSphere(),e.boundingSphere.center},t.getSceneDistanceFromMesh=function(t,e,n){return t?e*t.geometry.boundingSphere.radius/Math.tan(n*Math.PI/180):null},t.getSceneDistanceFromModel=function(e,n,i){if(e){var r=t.getBoundingBox(e),o=new THREE.Sphere;return r.getBoundingSphere(o),n*o.radius/Math.tan(i*Math.PI/180)}return null},t.getCameraStateFromMesh=function(t,e){if(t){var n=t.geometry,i=this.getGeometryCenter(n),r=new THREE.Vector3;return r.copy(i),r.z+=e,{target:i,position:r}}return null},t.getCameraStateFromModel=function(e,n){if(e){var i=t.getBoundingBox(e),r=new THREE.Vector3;i.getCenter(r);var o=new THREE.Vector3;return o.y=r.y,o.z+=n,{target:r,position:o}}return null},t.getCameraPositionFromNode=function(t,e,n){if(!t)return null;var i=new THREE.Vector3;i.copy(AFRAME.utils.coordinates.parse(t.position));var r=i.clone().sub(n.clone()).normalize(),o=new THREE.Vector3;return o.copy(i),o.add(r.clone().multiplyScalar(e*O.zoomFactor)),o},t.getNearFromSceneDistance=function(t){return t?t*(1-O.camera.nearFactor):null},t.getFarFromSceneDistance=function(t){return t?100*t:null},t.getBoundingBox=function(t){return(new THREE.Box3).setFromObject(t)},t.normalise=function(t,e,n){return(t-e)/(n-e)},t.reverseNumber=function(t,e,n){return n+e-t},t}();B.cssUnits=["%","ch","cm","em","ex","in","mm","pc","pt","px","rem","vh","vmax","vmin","vw"];var H,F,j=function(){function t(t){(0,i.r)(this,t),this._contentStrings=R,this.angles=null,this.consoleTabEnabled=!0,this.edges=null,this.graphTabEnabled=!0,this.nodes=null,this.selected=null,this.settingsTabEnabled=!0,this.srcTabEnabled=!0,this.tabContentHeight=null,this.url=null,this.urls=null}return t.prototype._getGraphJson=function(){if(this.nodes&&this.edges&&this.angles){var t={nodes:Array.from(this.nodes).map((function(t){var e=t[0],n=t[1];return[e,{normal:n.normal?I.normaliseStringVector3(n.normal):new THREE.Vector3,position:I.normaliseStringVector3(n.position),scale:I.normaliseNumber(n.scale),targetId:n.targetId,title:n.title,description:n.description}]})),edges:Array.from(this.edges),angles:Array.from(this.angles)};return JSON.stringify(t)}return""},t.prototype.render=function(){var t=this.tabContentHeight||this.el.parentElement.clientHeight+"px",e=[this.consoleTabEnabled,this.graphTabEnabled,this.settingsTabEnabled,this.srcTabEnabled].filter(Boolean).length;return(0,i.h)("ion-app",null,(0,i.h)("al-tabs",null,e>1?(0,i.h)("ion-tab-bar",null,this.srcTabEnabled?(0,i.h)("ion-tab-button",{tab:"src"},(0,i.h)("ion-icon",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNNDAzLjAwMiAyMTcuMDAxQzM4OC45OTggMTQ4LjAwMiAzMjguOTk4IDk2IDI1NiA5NmMtNTcuOTk4IDAtMTA3Ljk5OCAzMi45OTgt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i41LTE3LjY3MyAwLTMyLTE0LjU1MS0zMi0zMi41di05NWMwLTE3Ljk0OSAxNC4zMjctMzIuNSAzMi0zMi41IDE3LjY3MyAwIDMyIDE0LjU1MSAzMiAzMi41djk1eiIvPjwvZz48L3N2Zz4="}),(0,i.h)("ion-label",null,this._contentStrings.settings)):null,this.graphTabEnabled?(0,i.h)("ion-tab-button",{tab:"graph"},(0,i.h)("ion-icon",{src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgY2xhc3M9InMtaW9uLWljb24iPjxwYXRoIGQ9Ik0yNTYgNDhDMTQxLjEyNSA0OCA0OCAxNDEuMTI1IDQ4IDI1NnM5My4xMjUgMjA4IDIwOCAyMDggMjA4LTkzLjEyNSAyMDgtMjA4UzM3MC44NzUgNDggMjU2IDQ4em0xMDcgMjI5aC04NnY4NmgtNDJ2LTg2aC04NnYtNDJoODZ2LTg2aDQydjg2aDg2djQyeiI+PC9wYXRoPjwvc3ZnPgo="}),(0,i.h)("ion-label",null,this._contentStrings.graph)):null,this.consoleTabEnabled?(0,i.h)("ion-tab-button",{tab:"console"},(0,i.h)("ion-icon",{src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIzLjAuNiwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGQ9Ik00MjQsNjRIODhjLTI2LjYsMC00OCwyMS42LTQ4LDQ4djI4OGMwLDI2LjQsMjEuNCw0OCw0OCw0OGgzMzZjMjYuNCwwLDQ4LTIxLjYsNDgtNDhWMTEyQzQ3Miw4NS42LDQ1MC42LDY0LDQyNCw2NHoKCSBNNDI0LDQwMEg4OFYxNzZoMzM2VjQwMHoiLz4KPHBhdGggZD0iTTIwMi42LDI4Ni40bC01OC4zLDU4LjNjLTIuOCwyLjgtNy40LDIuOC0xMC4yLDBsLTYuOC02LjhjLTIuOC0yLjgtMi44LTcuNCwwLTEwLjJsNDYuMi00Ni40bC00Ni4yLTQ2LjQKCWMtMi44LTIuOC0yLjgtNy40LDAtMTAuMmw2LjgtNi44YzIuOC0yLjgsNy40LTIuOCwxMC4yLDBsNTguMyw1OC4zQzIwNS40LDI3OSwyMDUuNCwyODMuNiwyMDIuNiwyODYuNHogTTM0My4yLDM0MS4zdi05LjYKCWMwLTQtMy4yLTcuMi03LjItNy4yaC05MS4yYy00LDAtNy4yLDMuMi03LjIsNy4ydjkuNmMwLDQsMy4yLDcuMiw3LjIsNy4ySDMzNkMzMzkuOSwzNDguNSwzNDMuMiwzNDUuMywzNDMuMiwzNDEuM3oiLz4KPC9zdmc+Cg=="}),(0,i.h)("ion-label",null,this._contentStrings.console)):null):null,this.srcTabEnabled?(0,i.h)("ion-tab",{tab:"src"},(0,i.h)("al-view-controls",{"bounding-box-enabled":this.boundingBoxEnabled,"controls-type":this.controlsType}),(0,i.h)("al-url-picker",{urls:this.urls,url:this.url})):null,this.settingsTabEnabled?(0,i.h)("ion-tab",{tab:"settings"},(0,i.h)(P,{height:t},(0,i.h)("al-view-controls",{"bounding-box-enabled":this.boundingBoxEnabled,"controls-type":this.controlsType}),(0,i.h)("al-settings",{"display-mode":this.displayMode,orientation:this.orientation,"slices-index":this.slicesIndex,"slices-max-index":this.slicesMaxIndex,"slices-brightness":this.slicesBrightness,"slices-contrast":this.slicesContrast,"volume-brightness":this.volumeBrightness,"volume-contrast":this.volumeContrast,"volume-steps":this.volumeSteps,"volume-steps-high-enabled":this.volumeStepsHighEnabled}))):null,this.graphTabEnabled?(0,i.h)("ion-tab",{tab:"graph"},(0,i.h)(P,{height:t},(0,i.h)("al-view-controls",{"bounding-box-enabled":this.boundingBoxEnabled,"controls-type":this.controlsType}),(0,i.h)("al-graph-editor",{selected:this.selected,nodes:this.nodes,angles:this.angles,edges:this.edges,"graph-enabled":this.graphEnabled,"graph-visible":this.graphTabEnabled,units:this.units}))):null,this.consoleTabEnabled?(0,i.h)("ion-tab",{tab:"console"},(0,i.h)(P,{height:t},(0,i.h)("al-view-controls",{"bounding-box-enabled":this.boundingBoxEnabled,"controls-type":this.controlsType}),(0,i.h)("al-console",{graph:this._getGraphJson()}))):null))},Object.defineProperty(t.prototype,"el",{get:function(){return(0,i.d)(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return"al-tabs{--ion-tab-bar-border-color:var(--al-item-border-color)}"},enumerable:!0,configurable:!0}),t}(),U={delete:"Delete",description:"Description",title:"Title",update:"Update"},G=function(){function t(t){(0,i.r)(this,t),this._contentStrings=U,this.deleteEdge=(0,i.c)(this,"deleteEdge",7),this.saveEdge=(0,i.c)(this,"saveEdge",7)}return t.prototype.render=function(){var t=this;if(this.edge){var e=this.edge,n=e[0],r=e[1];return(0,i.h)("form",{onSubmit:function(t){return t.preventDefault()}},(0,i.h)("ion-item",null,(0,i.h)("ion-input",{id:"title",value:r.title,placeholder:this._contentStrings.title,required:!0,onIonChange:function(t){return r.title=t.detail.value},maxlength:20})),(0,i.h)("ion-item",null,(0,i.h)("ion-textarea",{id:"description",value:r.description,placeholder:this._contentStrings.description,rows:5,onIonChange:function(t){return r.description=t.detail.value},maxlength:280})),(0,i.h)("ion-item",null,(0,i.h)("ion-button",{size:"small",onClick:function(){t.deleteEdge.emit(n),t.edge=null}},(0,i.h)("ion-icon",{src:M})," ",this._contentStrings.delete),(0,i.h)("ion-button",{size:"small",type:"submit",onClick:function(){r.title&&t.saveEdge.emit([n,r])}},(0,i.h)("ion-icon",{src:S})," ",this._contentStrings.update)))}return null},Object.defineProperty(t,"style",{get:function(){return"#title{--background:var(--al-input-background-color);--color:var(--al-input-color);--padding-bottom:var(--al-input-padding-bottom);--padding-end:var(--al-input-padding-end);--padding-start:var(--al-input-padding-start);--padding-top:var(--al-input-padding-top);font-size:var(--al-input-font-size)}#description{--background:var(--al-textarea-background-color);--color:var(--al-textarea-color);--padding-bottom:var(--al-textarea-padding-bottom);--padding-end:var(--al-textarea-padding-end);--padding-start:var(--al-textarea-padding-start);--padding-top:var(--al-textarea-padding-top);font-size:var(--al-textarea-font-size)}"},enumerable:!0,configurable:!0}),t}(),V=function(){function t(t){(0,i.r)(this,t),this.nodes=null,this.angles=null,this.edges=null,this.selected=null}return t.prototype._getSelectedNode=function(){if(this.selected&&this.nodes){var t=this.nodes.get(this.selected);if(t)return[this.selected,t]}return null},t.prototype._getSelectedEdge=function(){if(this.selected&&this.edges){var t=this.edges.get(this.selected);if(t)return[this.selected,t]}return null},t.prototype._getSelectedAngle=function(){if(this.selected&&this.angles){var t=this.angles.get(this.selected);if(t)return[this.selected,t]}return null},t.prototype.render=function(){return[(0,i.h)("al-graph-settings",{"graph-enabled":this.graphEnabled,"graph-visible":this.graphVisible,units:this.units}),(0,i.h)("al-node-list",{nodes:this.nodes,selected:this.selected}),(0,i.h)("ion-item-divider",null),(0,i.h)("al-node-editor",{node:this._getSelectedNode()}),(0,i.h)("al-edge-editor",{edge:this._getSelectedEdge()}),(0,i.h)("al-angle-editor",{angle:this._getSelectedAngle()})]},Object.defineProperty(t,"style",{get:function(){return""},enumerable:!0,configurable:!0}),t}(),W={graphEnabled:"Enable Nodes",units:"Units",meters:"Meters",millimeters:"Millimeters"},Y=function(){function t(t){(0,i.r)(this,t),this._contentStrings=W,this.unitsChange=(0,i.c)(this,"unitsChange",7),this.graphEnabledChange=(0,i.c)(this,"graphEnabledChange",7)}return t.prototype._graphEnabled=function(t){this.graphEnabled=t,this.graphEnabledChange.emit(t)},t.prototype._units=function(t){this.units=t,this.unitsChange.emit(this.units)},t.prototype.renderGraphEnabled=function(){var t=this;return this.graphVisible?(0,i.h)("div",null,(0,i.h)("ion-item",{style:{display:"var(--graph-enabled-display, block)"}},(0,i.h)("span",{title:this._contentStrings.graphEnabled},this._contentStrings.graphEnabled),(0,i.h)("ion-toggle",{slot:"end",checked:this.graphEnabled,onIonChange:function(e){return t._graphEnabled(e.detail.checked)}})),(0,i.h)("ion-item",{style:{display:"var(--units-display, block)"}},(0,i.h)("span",{title:this._contentStrings.units},this._contentStrings.units),(0,i.h)("select",{slot:"end",onChange:function(e){return t._units(e.srcElement.value)}},(0,i.h)("option",{selected:this.units===y.MILLIMETERS,value:y.MILLIMETERS},this._contentStrings.millimeters),(0,i.h)("option",{selected:this.units===y.METERS,value:y.METERS},this._contentStrings.meters)))):(0,i.h)("span",null,"hello world")},t.prototype.render=function(){return(0,i.h)("div",{style:{"max-width":"100%","overflow-x":"hidden"}},this.renderGraphEnabled())},Object.defineProperty(t,"style",{get:function(){return"select{padding:5px;min-width:100px;background-color:var(--al-select-background-color);color:var(--al-item-color);border:none}@supports (-moz-appearance:none){select{background-color:#fff!important;color:#000!important}}ion-label{color:var(--al-item-color)}"},enumerable:!0,configurable:!0}),t}(),X={delete:"Delete",description:"Description",title:"Title",update:"Update"},q=function(){function t(t){(0,i.r)(this,t),this._contentStrings=X,this.deleteNode=(0,i.c)(this,"deleteNode",7),this.saveNode=(0,i.c)(this,"saveNode",7)}return t.prototype.render=function(){var t=this;if(this.node){var e=this.node,n=e[0],r=e[1];return(0,i.h)("form",{onSubmit:function(t){return t.preventDefault()}},(0,i.h)("ion-item",null,(0,i.h)("ion-input",{id:"title",value:r.title,placeholder:this._contentStrings.title,required:!0,onIonChange:function(t){return r.title=t.detail.value},maxlength:128})),(0,i.h)("ion-item",null,(0,i.h)("ion-textarea",{id:"description",value:r.description,placeholder:this._contentStrings.description,rows:5,onIonChange:function(t){return r.description=t.detail.value},maxlength:1024})),(0,i.h)("ion-item",null,(0,i.h)("ion-button",{size:"small",onClick:function(){t.deleteNode.emit(n),t.node=null}},(0,i.h)("ion-icon",{src:M})," ",this._contentStrings.delete),(0,i.h)("ion-button",{size:"small",type:"submit",onClick:function(){r.title&&t.saveNode.emit([n,r])}},(0,i.h)("ion-icon",{src:S})," ",this._contentStrings.update)))}return null},Object.defineProperty(t,"style",{get:function(){return"#title{--background:var(--al-input-background-color);--color:var(--al-input-color);--padding-bottom:var(--al-input-padding-bottom);--padding-end:var(--al-input-padding-end);--padding-start:var(--al-input-padding-start);--padding-top:var(--al-input-padding-top);font-size:var(--al-input-font-size)}#description{--background:var(--al-textarea-background-color);--color:var(--al-textarea-color);--padding-bottom:var(--al-textarea-padding-bottom);--padding-end:var(--al-textarea-padding-end);--padding-start:var(--al-textarea-padding-start);--padding-top:var(--al-textarea-padding-top);font-size:var(--al-textarea-font-size)}"},enumerable:!0,configurable:!0}),t}(),Z={graphEmpty:"No nodes have been placed."},J=function(){function t(t){(0,i.r)(this,t),this._contentStrings=Z,this.nodes=null,this.selected=null,this.selectedChange=(0,i.c)(this,"selectedChange",7)}return t.prototype.render=function(){var t=this;return this.nodes&&this.nodes.size?(0,i.h)("ion-list",{style:{color:"var(--al-item-color)","border-width":"1px 0 0 0","border-color":"var(--ion-list-header-border-color)","border-style":"solid","margin-top":"10px"}},Array.from(this.nodes).map((function(e){var n=e[0],r=e[1];return(0,i.h)("ion-item",{"data-selected":t.selected===n,onClick:function(){return t.selectedChange.emit(n)}},r.title)}))):(0,i.h)("ion-item",{style:{color:"var(--al-item-color)","border-width":"1px 0 0 0","border-color":"var(--ion-list-header-border-color)","border-style":"solid","margin-top":"10px"}},(0,i.h)("p",null,this._contentStrings.graphEmpty))},Object.defineProperty(t,"style",{get:function(){return"ion-item{--color:var(--al-item-color);--border-color:var(--al-item-border-color);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ion-item[data-selected]{--color:var(--al-item-selected-color)}"},enumerable:!0,configurable:!0}),t}(),Q={axial:"XY (Top)",bounds:"Bounds",boundingBoxEnabled:"Bounding Box",brightness:"Level",clay:"Clay",contrast:"Width",controlsType:"Controls Type",coronal:"XZ (Front)",default:"Default",displayMode:"Display Mode",graphEnabled:"Enable Node Placement",material:"Material",normals:"Normals",orbit:"Orbit",orientation:"Orientation",recenter:"Origin",renderSteps:"Render Steps",rotate:"Rotate",saggital:"YZ (Side)",sliceIndex:"Slice Index",slices:"Slices",slice:"Slice",trackball:"Trackball",units:"Units",volume:"Volume",volumeSteps:"Render Detail (only increase if you know your device is capable!)",volumeStepsHighEnabled:"Enable High Res",volumeStepsHighEnabledWarning:"Activate High Resolution Mode (Computationally Intensive!)",windowingTitle:"Windowing (Brightness/Contrast)",wireframe:"Wireframe",xray:"XRay"},K=function(){function t(t){(0,i.r)(this,t),this._contentStrings=Q,this.displayModeChange=(0,i.c)(this,"displayModeChange",7),this.orientationChange=(0,i.c)(this,"orientationChange",7),this.slicesIndexChange=(0,i.c)(this,"slicesIndexChange",7),this.slicesBrightnessChange=(0,i.c)(this,"slicesBrightnessChange",7),this.slicesContrastChange=(0,i.c)(this,"slicesContrastChange",7),this.volumeBrightnessChange=(0,i.c)(this,"volumeBrightnessChange",7),this.volumeContrastChange=(0,i.c)(this,"volumeContrastChange",7),this.volumeStepsChange=(0,i.c)(this,"volumeStepsChange",7),this.volumeStepsHighEnabledChange=(0,i.c)(this,"volumeStepsHighEnabledChange",7)}return t.prototype._displayMode=function(t){this.displayMode=t,this.displayModeChange.emit(t)},t.prototype._orientation=function(t){this.orientation=t,this.orientationChange.emit(t)},t.prototype._slicesIndex=function(t){this.slicesIndex=t,this.slicesIndexChange.emit(t)},t.prototype._slicesBrightness=function(t){this.slicesBrightness=t,this.slicesBrightnessChange.emit(t)},t.prototype._slicesContrast=function(t){this.slicesContrast=t,this.slicesContrastChange.emit(t)},t.prototype._volumeBrightness=function(t){this.volumeBrightness=t,this.volumeBrightnessChange.emit(t)},t.prototype._volumeContrast=function(t){this.volumeContrast=t,this.volumeContrastChange.emit(t)},t.prototype._volumeSteps=function(t){t=Math.round(10*t)/10,this.volumeSteps=t,this.volumeStepsChange.emit(t)},t.prototype._volumeStepsHighEnabled=function(t){t?this._volumeSteps(this.volumeSteps+.2):this._volumeSteps(this.volumeSteps-.2)},t.prototype.renderDisplayModeToggle=function(){var t=this;return this.displayMode!==p.MESH?(0,i.h)("ion-item",{style:{display:"var(--display-mode-display, block)","margin-top":"10px"}},(0,i.h)("span",{title:this._contentStrings.displayMode},"Mode"),(0,i.h)("select",{slot:"end",onChange:function(e){return t._displayMode(e.srcElement.value)}},(0,i.h)("option",{selected:this.displayMode===p.SLICES,value:p.SLICES},this._contentStrings.slices),(0,i.h)("option",{selected:this.displayMode===p.VOLUME,value:p.VOLUME},this._contentStrings.volume))):null},t.prototype.renderHiResEnabled=function(){var t=this;return(0,i.h)("ion-item",{style:{display:"var(--volume-steps-high-display, block)"}},(0,i.h)("span",{title:this._contentStrings.volumeStepsHighEnabledWarning},this._contentStrings.volumeStepsHighEnabled," ",(0,i.h)("ion-icon",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMzIgNDY0aDQ0OEwyNTYgNDggMzIgNDY0em0yNDgtNjRoLTQ4di00OGg0OHY0OHptMC04MGgtNDh2LTk2aDQ4djk2eiIvPjwvc3ZnPg=="})),(0,i.h)("ion-toggle",{slot:"end",checked:this.volumeStepsHighEnabled,onIonChange:function(e){return t._volumeStepsHighEnabled(e.detail.checked)}}))},t.prototype.renderSlicesControls=function(){var t=this;return(0,i.h)("div",null,(0,i.h)("ion-item",{style:{display:"var(--slices-orientation-display, block)"}},(0,i.h)("span",{color:"primary"},"Plane"),(0,i.h)("select",{slot:"end",onChange:function(e){return t._orientation(e.srcElement.value)}},(0,i.h)("option",{selected:this.orientation===g.CORONAL,value:g.CORONAL},this._contentStrings.coronal),(0,i.h)("option",{selected:this.orientation===g.SAGGITAL,value:g.SAGGITAL},this._contentStrings.saggital),(0,i.h)("option",{selected:this.orientation===g.AXIAL,value:g.AXIAL},this._contentStrings.axial))),(0,i.h)("ion-item",{style:{display:"var(--slices-index-display, block)"}},(0,i.h)("span",null,this._contentStrings.slice),(0,i.h)("ion-range",{slot:"end",min:0,max:1,step:1/this.slicesMaxIndex,value:this.slicesIndex,onIonChange:function(e){return t._slicesIndex(e.detail.value)}})))},t.prototype.renderSlicesWindowingControls=function(){var t=this;return(0,i.h)("div",null,(0,i.h)("ion-list-header",{style:{color:"var(--al-item-color)","border-width":"1px 0 0 0","border-color":"var(--ion-list-header-border-color)","border-style":"solid","margin-top":"10px"}},(0,i.h)("span",null,this._contentStrings.windowingTitle)),(0,i.h)("ion-item",{style:{display:"var(--slices-brightness-display, block)"}},(0,i.h)("span",null,this._contentStrings.brightness),(0,i.h)("ion-range",{slot:"end",min:0,max:1,step:.05,snaps:!0,ticks:!1,value:this.slicesBrightness,onIonChange:function(e){t._slicesBrightness(e.detail.value)}})),(0,i.h)("ion-item",{style:{display:"var(--slices-contrast-display, block)"}},(0,i.h)("span",null,this._contentStrings.contrast),(0,i.h)("ion-range",{slot:"end",min:0,max:1,step:.05,snaps:!0,ticks:!1,value:this.slicesContrast,onIonChange:function(e){return t._slicesContrast(e.detail.value)}})))},t.prototype.renderVolumeWindowingControls=function(){var t=this;return(0,i.h)("div",null,(0,i.h)("ion-list-header",{style:{color:"var(--al-item-color)","border-width":"1px 0 0 0","border-color":"var(--ion-list-header-border-color)","border-style":"solid","margin-top":"10px"}},(0,i.h)("span",null,this._contentStrings.windowingTitle)),(0,i.h)("ion-item",{style:{display:"var(--volume-brightness-display, block)"}},(0,i.h)("span",null,this._contentStrings.brightness),(0,i.h)("ion-range",{slot:"end",min:0,max:1,step:.05,snaps:!0,ticks:!1,value:this.volumeBrightness,onIonChange:function(e){t._volumeBrightness(e.detail.value)}})),(0,i.h)("ion-item",{style:{display:"var(--volume-contrast-display, block)"}},(0,i.h)("span",null,this._contentStrings.contrast),(0,i.h)("ion-range",{slot:"end",min:0,max:1,step:.05,snaps:!0,ticks:!1,value:this.volumeContrast,onIonChange:function(e){return t._volumeContrast(e.detail.value)}})))},t.prototype.renderOptions=function(){switch(this.displayMode){case p.SLICES:return(0,i.h)("div",null,this.renderSlicesControls(),this.renderSlicesWindowingControls());case p.VOLUME:return(0,i.h)("div",null,this.renderHiResEnabled(),this.renderVolumeWindowingControls());default:return}},t.prototype.render=function(){return(0,i.h)("div",{style:{"max-width":"100%","overflow-x":"hidden"}},this.renderDisplayModeToggle(),this.renderOptions())},Object.defineProperty(t,"style",{get:function(){return"select{padding:5px;min-width:100px;background-color:var(--al-select-background-color);color:var(--al-item-color);border:none}@supports (-moz-appearance:none){select{background-color:#fff!important;color:#000!important}}ion-label{color:var(--al-item-color)}"},enumerable:!0,configurable:!0}),t}(),$=function(){function t(t){var e=this;(0,i.r)(this,t),this.transitioning=!1,this.onTabClicked=function(t){var n=t.detail.tab;e.select(n)},this.ionNavWillLoad=(0,i.c)(this,"ionNavWillLoad",7),this.ionTabsWillChange=(0,i.c)(this,"ionTabsWillChange",3),this.ionTabsDidChange=(0,i.c)(this,"ionTabsDidChange",3)}return t.prototype.componentWillLoad=function(){return w(this,void 0,void 0,(function(){var t;return E(this,(function(e){switch(e.label){case 0:return t=this.tabs,[4,this.select(t[0])];case 1:return e.sent(),this.ionNavWillLoad.emit(),[2]}}))}))},t.prototype.componentWillRender=function(){var t=this.el.querySelector("ion-tab-bar");if(t){var e=this.selectedTab?this.selectedTab.tab:void 0;t.selectedTab=e}},t.prototype.select=function(t){return w(this,void 0,void 0,(function(){var e;return E(this,(function(n){switch(n.label){case 0:return[4,this.getTab(t)];case 1:return(e=n.sent())&&this.shouldSwitch(e)?(this.setActive(e),this.tabSwitch(),[2,!0]):[2,!1]}}))}))},t.prototype.getTab=function(t){return w(this,void 0,void 0,(function(){return E(this,(function(e){return[2,"string"==typeof t?this.tabs.find((function(e){return e.tab===t})):t]}))}))},t.prototype.getSelected=function(){return Promise.resolve(this.selectedTab?this.selectedTab.tab:void 0)},t.prototype.setActive=function(t){if(this.transitioning)return Promise.reject("transitioning already happening");this.transitioning=!0,this.leavingTab=this.selectedTab,this.selectedTab=t,this.ionTabsWillChange.emit({tab:t.tab});try{t.setActive()}catch(t){}return!0},t.prototype.tabSwitch=function(){var t=this.selectedTab,e=this.leavingTab;this.leavingTab=void 0,this.transitioning=!1,t&&e!==t&&(e&&(e.active=!1),this.ionTabsDidChange.emit({tab:t.tab}))},t.prototype.shouldSwitch=function(t){var e=this.selectedTab;return void 0!==t&&t!==e&&!this.transitioning},Object.defineProperty(t.prototype,"tabs",{get:function(){return Array.from(this.el.querySelectorAll("ion-tab"))},enumerable:!0,configurable:!0}),t.prototype.render=function(){return(0,i.h)(i.H,{onIonTabButtonClick:this.onTabClicked},(0,i.h)("slot",{name:"top"}),(0,i.h)("div",{class:"tabs-inner"},(0,i.h)("slot",null)),(0,i.h)("slot",{name:"bottom"}))},Object.defineProperty(t.prototype,"el",{get:function(){return(0,i.d)(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return":host{z-index:var(--z-index-page-container);--ion-tab-bar-color:var(--al-item-color)}.tabs-inner{position:relative}"},enumerable:!0,configurable:!0}),t}(),tt=function(){function t(t){(0,i.r)(this,t),this.urls=null,this.url=null,this.urlChange=(0,i.c)(this,"urlChange",7)}return t.prototype.render=function(){var t=this;return this.urls?(0,i.h)("form",{onSubmit:function(t){return t.preventDefault()}},(0,i.h)("ion-item",null,(0,i.h)("ion-select",{id:"select",value:this.url,interface:"popover",placeholder:"",onIonChange:function(e){return t.urlChange.emit(e.detail.value)}},Array.from(this.urls).map((function(t){var e=t[0],n=t[1];return(0,i.h)("ion-select-option",{value:e},n)})))),(0,i.h)("ion-item",null,(0,i.h)("ion-input",{id:"input",type:"url",size:100,placeholder:"src",required:!0,value:this.url,ref:function(e){return t._input=e}})),(0,i.h)("ion-item",null,(0,i.h)("ion-button",{id:"submit",size:"small",type:"submit",onClick:function(){return t.urlChange.emit(t._input.value)}},(0,i.h)("ion-icon",{src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgY2xhc3M9InMtaW9uLWljb24iPjxwYXRoIGQ9Ik0yNTYgMzg4Yy03Mi41OTcgMC0xMzItNTkuNDA1LTEzMi0xMzIgMC03Mi42MDEgNTkuNDAzLTEzMiAxMzItMTMyIDM2LjMgMCA2OS4yOTkgMTUuNCA5Mi40MDYgMzkuNjAxTDI3OCAyMzRoMTU0VjgwbC01MS42OTggNTEuNzAyQzM0OC40MDYgOTkuNzk4IDMwNC40MDYgODAgMjU2IDgwYy05Ni43OTcgMC0xNzYgNzkuMjAzLTE3NiAxNzZzNzguMDk0IDE3NiAxNzYgMTc2YzgxLjA0NSAwIDE0OC4yODctNTQuMTM0IDE2OS40MDEtMTI4SDM3OC44NWMtMTguNzQ1IDQ5LjU2MS02Ny4xMzggODQtMTIyLjg1IDg0eiI+PC9wYXRoPjwvc3ZnPgo="})," Load"))):null},Object.defineProperty(t,"style",{get:function(){return"#select{--padding-start:0px;width:100%;max-width:100%!important}#input{--background:var(--al-input-background-color);--color:var(--al-input-color);--padding-start:var(--al-input-padding-start)}"},enumerable:!0,configurable:!0}),t}(),et={axial:"XY (Top)",bounds:"Bounds",boundingBoxEnabled:"Bounding Box",brightness:"Level",clay:"Clay",contrast:"Width",controlsType:"Controls Type",coronal:"XZ (Front)",default:"Default",displayMode:"Display Mode",graphEnabled:"Enable Node Placement",material:"Material",meters:"Meters",millimeters:"Millimeters",normals:"Normals",orbit:"Orbit",orientation:"Orientation",recenter:"Origin",renderSteps:"Render Steps",rotate:"Rotate",saggital:"YZ (Side)",sliceIndex:"Slice Index",slices:"Slices",slice:"Slice",trackball:"Trackball",units:"Units",volume:"Volume",volumeSteps:"Render Detail (only increase if you know your device is capable!)",volumeStepsHighEnabled:"Enable High Res",volumeStepsHighEnabledWarning:"Activate High Resolution Mode (Computationally Intensive!)",windowingTitle:"Windowing (Brightness/Contrast)",wireframe:"Wireframe",xray:"XRay"},nt=function(){function t(t){(0,i.r)(this,t),this._contentStrings=et,this.boundingBoxEnabledChange=(0,i.c)(this,"boundingBoxEnabledChange",7),this.controlsTypeChange=(0,i.c)(this,"controlsTypeChange",7),this.recenter=(0,i.c)(this,"recenter",7)}return t.prototype._boundingBoxEnabled=function(t){this.boundingBoxEnabled=t,this.boundingBoxEnabledChange.emit(t)},t.prototype._controlsType=function(t){this.controlsType=t,this.controlsTypeChange.emit(t)},t.prototype._switchBoundingBoxEnabled=function(){this.boundingBoxEnabled?this._boundingBoxEnabled(!1):this._boundingBoxEnabled(!0)},t.prototype._switchControls=function(){this.controlsType===d.ORBIT?this._controlsType(d.TRACKBALL):this.controlsType===d.TRACKBALL&&this._controlsType(d.ORBIT)},t.prototype.renderControlsTypeSelect=function(){var t,e,n,r=this;return this.controlsType===d.ORBIT?(t="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIzLjAuNiwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bm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i40LTcuOQoJYzQuOC0yLjMsMTAuNC0yLjMsMTUuMywwbDE2NC42LDc5LjVjNiwyLjksOS45LDksOS45LDE1Ljh2MTgxLjhjMCw2LjYtMy43LDEyLjYtOS42LDE1LjZsLTE2NC42LDgzLjMKCUMxODUuNCwzNjkuMywxODIuNywzNjkuOSwxODAsMzY5Ljl6IE0zMy44LDI1OC45TDE4MCwzMzIuOGwxNDcuMS03NC41di0xNjBMMTgwLDI3LjNsLTE0Ni4zLDcxVjI1OC45eiIvPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMTA0LjEsMTMxLjgiLz4KPHBhdGggY2xhc3M9InN0MiIgZD0iTTkyLjEsMTM5LjUiLz4KPC9zdmc+Cg==":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIzLjAuNiwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgdmlld0JveD0iMCAwIDM2MCAzNjAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDM2MCAzNjA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTgwIiBjeT0iMTgwIiByPSIxMDEuMiIvPgo8L3N2Zz4K",(0,i.h)("div",{style:{"margin-top":"10px","text-align":"center"}},(0,i.h)("ion-button",{style:{width:"28%",height:"45px","margin-left":"5px","margin-right":"5px"},size:"small",onClick:function(){r._switchControls()}},(0,i.h)("div",{style:{"font-size":"10px",color:"white","margin-bottom":"2px"}},(0,i.h)("ion-icon",{style:{"min-width":"20px","min-height":"20px","margin-bottom":"2px"},src:t,title:e}),(0,i.h)("br",null),e)),(0,i.h)("ion-button",{style:{width:"28%",height:"45px","margin-left":"5px","margin-right":"5px"},size:"small",onClick:function(){r.recenter.emit()}},(0,i.h)("div",{style:{"font-size":"10px",color:"white","margin-bottom":"2px"}},(0,i.h)("ion-icon",{style:{"min-width":"20px","min-height":"20px","margin-bottom":"2px"},src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgY2xhc3M9InMtaW9uLWljb24iPjxwYXRoIGQ9Ik0yNTYgNDhjLTQyLjkgMC04NC4yIDEzLTExOS4yIDM3LjUtMzQuMiAyNC02MC4yIDU3LjItNzUuMSA5Ni4xTDU4IDE5Mmg0NS43bDEuOS01YzguMi0xNy44IDE5LjQtMzMuOSAzMy41LTQ4IDMxLjItMzEuMiA3Mi43LTQ4LjQgMTE2LjktNDguNHM4NS43IDE3LjIgMTE2LjkgNDguNGMzMS4yIDMxLjIgNDguNCA3Mi43IDQ4LjQgMTE2LjkgMCA0NC4xLTE3LjIgODUuNy00OC40IDExNi45LTMxLjIgMzEuMi03Mi43IDQ4LjQtMTE2LjkgNDguNC00NC4xIDAtODUuNi0xNy4yLTExNi45LTQ4LjQtMTQtMTQtMjUuMy0zMC4xLTMzLjUtNDcuOWwtMS45LTVINThsMy42IDEwLjRjMTQuOSAzOC45IDQwLjkgNzIuMSA3NS4xIDk2LjFDMTcxLjggNDUxLjEgMjEzIDQ2NCAyNTYgNDY0YzExNC43IDAgMjA4LTkzLjMgMjA4LTIwOFMzNzAuNyA0OCAyNTYgNDh6Ij48L3BhdGg+PHBhdGggZD0iTTQ4IDI3Ny40aDE4OS43bC00My42IDQ0LjdMMjI0IDM1Mmw5Ni05Ni05Ni05Ni0zMSAyOS45IDQ0LjcgNDQuN0g0OHY0Mi44eiI+PC9wYXRoPjwvc3ZnPgo=",title:this._contentStrings.recenter}),(0,i.h)("br",null),this._contentStrings.recenter)),(0,i.h)("ion-button",{style:{width:"28%",height:"45px","margin-left":"5px","margin-right":"5px"},size:"small",onClick:function(){r._switchBoundingBoxEnabled()}},(0,i.h)("div",{style:{"font-size":"10px",color:"white","margin-bottom":"2px"}},(0,i.h)("ion-icon",{style:{"min-width":"20px","min-height":"20px","margin-bottom":"2px"},src:n,title:this._contentStrings.bounds}),(0,i.h)("br",null),this._contentStrings.bounds)))},t.prototype.render=function(){return(0,i.h)("div",{style:{"max-width":"100%","overflow-x":"hidden","border-width":"0 0 1px 0","border-color":"var(--ion-list-header-border-color)","border-style":"solid","padding-bottom":"10px","margin-bottom":"10px"}},this.renderControlsTypeSelect())},Object.defineProperty(t,"style",{get:function(){return"select{padding:5px;min-width:100px;background-color:var(--al-select-background-color);color:var(--al-item-color);border:none}@supports (-moz-appearance:none){select{background-color:#fff!important;color:#000!important}}ion-label{color:var(--al-item-color)}"},enumerable:!0,configurable:!0}),t}();function it(){}!function(t){t[t.Backspace=8]="Backspace",t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Shift=16]="Shift",t[t.Ctrl=17]="Ctrl",t[t.Alt=18]="Alt",t[t.PauseBreak=19]="PauseBreak",t[t.CapsLock=20]="CapsLock",t[t.Escape=27]="Escape",t[t.Spacebar=32]="Spacebar",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.LeftArrow=37]="LeftArrow",t[t.UpArrow=38]="UpArrow",t[t.RightArrow=39]="RightArrow",t[t.DownArrow=40]="DownArrow",t[t.PrintScrn=44]="PrintScrn",t[t.Insert=45]="Insert",t[t.Delete=46]="Delete",t[t.Zero=48]="Zero",t[t.One=49]="One",t[t.Two=50]="Two",t[t.Three=51]="Three",t[t.Four=52]="Four",t[t.Five=53]="Five",t[t.Six=54]="Six",t[t.Seven=55]="Seven",t[t.Eight=56]="Eight",t[t.Nine=57]="Nine",t[t.a=65]="a",t[t.b=66]="b",t[t.c=67]="c",t[t.d=68]="d",t[t.e=69]="e",t[t.f=70]="f",t[t.g=71]="g",t[t.h=72]="h",t[t.i=73]="i",t[t.j=74]="j",t[t.k=75]="k",t[t.l=76]="l",t[t.m=77]="m",t[t.n=78]="n",t[t.o=79]="o",t[t.p=80]="p",t[t.q=81]="q",t[t.r=82]="r",t[t.s=83]="s",t[t.t=84]="t",t[t.u=85]="u",t[t.v=86]="v",t[t.w=87]="w",t[t.x=88]="x",t[t.y=89]="y",t[t.z=90]="z",t[t.LeftWindowKey=91]="LeftWindowKey",t[t.RightWindowKey=92]="RightWindowKey",t[t.SelectKey=93]="SelectKey",t[t.Numpad0=96]="Numpad0",t[t.Numpad1=97]="Numpad1",t[t.Numpad2=98]="Numpad2",t[t.Numpad3=99]="Numpad3",t[t.Numpad4=100]="Numpad4",t[t.Numpad5=101]="Numpad5",t[t.Numpad6=102]="Numpad6",t[t.Numpad7=103]="Numpad7",t[t.Numpad8=104]="Numpad8",t[t.Numpad9=105]="Numpad9",t[t.Multiply=106]="Multiply",t[t.NumpadPlus=107]="NumpadPlus",t[t.NumpadMinus=109]="NumpadMinus",t[t.DecimalPoint=110]="DecimalPoint",t[t.Divide=111]="Divide",t[t.F1=112]="F1",t[t.F2=113]="F2",t[t.F3=114]="F3",t[t.F4=115]="F4",t[t.F5=116]="F5",t[t.F6=117]="F6",t[t.F7=118]="F7",t[t.F8=119]="F8",t[t.F9=120]="F9",t[t.F10=121]="F10",t[t.F11=122]="F11",t[t.F12=123]="F12",t[t.NumLock=144]="NumLock",t[t.ScrollLock=145]="ScrollLock",t[t.Semicolon=186]="Semicolon",t[t.Equals=187]="Equals",t[t.Comma=188]="