@abi-software/mapintegratedvuer 1.3.3 → 1.3.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3090,7 +3090,7 @@ ${t.vs}`,t}setDataProperty(t,r,n){const i=ar(this,mx).get(+t);i&&(!(r in i)||i[r
3090
3090
  state: () => new MyClass()
3091
3091
  Found in store "${S.$id}".`),m&&o&&r.hydrate&&r.hydrate(S.$state,m),u=!0,d=!0,S}function yjr(e,t,r){let n,i;const o=typeof t=="function";n=e,i=o?r:t;function s(l,c){const u=a.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&zA&&zA._testing?null:l)||(u?a.inject(pjr,null):null),l&&UU(l),process.env.NODE_ENV!=="production"&&!zA)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
3092
3092
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
3093
- This will fail in production.`);l=zA,l._s.has(n)||(o?N1e(n,t,i,l):Wje(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const d=l._s.get(n);if(process.env.NODE_ENV!=="production"&&c){const h="__hot:"+n,p=o?N1e(h,t,i,l,!0):Wje(h,jd({},i),l,!0);c._hotUpdate(p),delete l.state.value[h],l._s.delete(h)}if(process.env.NODE_ENV!=="production"&&V1e){const h=a.getCurrentInstance();if(h&&h.proxy&&!c){const p=h.proxy,f="_pStores"in p?p._pStores:p._pStores={};f[n]=d}}return d}return s.$id=n,s}function Tjr(e,t){return Array.isArray(t)?t.reduce((r,n)=>(r[n]=function(){return e(this.$pinia)[n]},r),{}):Object.keys(t).reduce((r,n)=>(r[n]=function(){const i=e(this.$pinia),o=t[n];return typeof o=="function"?o.call(this,i):i[o]},r),{})}const vjr=yjr("main",{state:()=>({userProfile:{token:""}}),getters:{userToken(e){return e.userProfile.token}},actions:{setUserToken(e){this.userProfile.token=e}}}),bjr=e=>{let t={lng:0,lat:0},r;return e.type==="Polygon"?r=e.coordinates[0]:r=e.coordinates,e.type!=="Point"?(r.map(n=>{t.lng+=parseFloat(n[0]),t.lat+=parseFloat(n[1])}),t.lng=t.lng/r.length,t.lat=t.lat/r.length):(t.lng+=parseFloat(r[0]),t.lat+=parseFloat(r[1])),t},qje=(e,t)=>{const r=[];let n=e.organs?e.organs:e.ftus;const i=n?n.filter((o,s)=>n.findIndex(l=>l.label===o.label)===s):void 0;return i&&i.forEach(o=>{const s={label:o.label,models:o.models,key:`${t}.${o.label}`},l=qje(o,s.key);l.length>0&&(s.children=l),r.push(s)}),r},Qjr=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0}},xjr={name:"FlatmapVuer",components:{Button:GEe,Col:WC,Loading:Lpr,Radio:sAe,Icon:Cu,RadioGroup:lAe,Row:GC,Select:AB,Dialog:Bhr,MapSvgIcon:$S,MapSvgSpriteColor:PH,Tooltip:hCe,TreeControls:pCe,SelectionsGroup:bAe,SvgLegends:QAe,ElIconWarningFilled:_Me,ElIconArrowDown:_ne,ElIconArrowLeft:QMe,DrawToolbar:dCe},beforeCreate:function(){this.mapManager=void 0,this.mapImp=void 0,this.setStateRequired=!1},setup(e){return{annotator:a.markRaw(new djr(`${e.flatmapAPI}annotator`))}},methods:{initialiseDrawing:function(){this.connectionEntry={},this.activeDrawTool=void 0,this.activeDrawMode=void 0,this.drawnCreatedEvent={}},cancelDrawnFeature:function(){this.isValidDrawnCreated&&(this.closeTooltip(),this.annotationEntry={...this.drawnCreatedEvent.feature,resourceId:this.serverURL},this.rollbackAnnotationEvent(),this.initialiseDrawing())},connectedFeatureTooltip:function(e){if(this.mapImp)if(e){const t=Number(e);let r={feature:{}};if(t){const n=this.mapImp.featureProperties(t);r.feature=n}else{const n=this.existDrawnFeatures.find(i=>i.id===e.replace(" ",""));r.feature.feature=n}this.checkAndCreatePopups(r)}else this.closeTooltip()},confirmDrawnFeature:function(){this.isValidDrawnCreated&&(this.checkAndCreatePopups(this.drawnCreatedEvent),Object.keys(this.connectionEntry).length>0&&(this.annotationEntry.feature.connection=this.connectionEntry),this.initialiseDrawing())},toolbarEvent:function(e,t){if(this.closeTooltip(),this.doubleClickedFeature=!1,this.connectionEntry={},e==="mode")this.changeAnnotationDrawMode({mode:"simple_select"}),this.activeDrawMode=t,Object.keys(this.annotationEntry).length>0&&!this.featureAnnotationSubmitted&&this.rollbackAnnotationEvent();else if(e==="tool"){if(t){const r=t.replace(/[A-Z]/g,n=>`_${n.toLowerCase()}`);this.changeAnnotationDrawMode({mode:`draw${r}`}),this.initialiseDrawing()}else this.changeAnnotationDrawMode({mode:"simple_select"}),this.cancelDrawnFeature();this.activeDrawTool=t}},annotationDrawModeEvent:function(e){this.activeDrawMode==="Edit"&&this.doubleClickedFeature&&(e.feature.feature.geometry.type!=="Point"&&(this.changeAnnotationDrawMode({mode:"direct_select",options:{featureId:e.feature.feature.id}}),this.modifyAnnotationFeature()),this.doubleClickedFeature=!1),this.activeDrawMode==="Delete"&&(this.changeAnnotationDrawMode({mode:"simple_select",options:{featureIds:[e.feature.feature.id]}}),this.modifyAnnotationFeature())},createConnectivityBody:function(){if(Object.keys(this.connectionEntry).length>0){const e=Object.values(this.connectionEntry),t={type:"connectivity",source:e[0],target:e[e.length-1],intermediates:e.filter((r,n)=>n!==0&&n!==e.length-1)};this.annotationEntry.body=t}},changeAnnotationDrawMode:function(e){this.mapImp&&this.mapImp.changeAnnotationDrawMode(e)},clearAnnotationFeature:function(){this.mapImp&&this.existDrawnFeatures.length>0&&this.mapImp.clearAnnotationFeature()},modifyAnnotationFeature:function(){this.mapImp&&this.mapImp.removeAnnotationFeature()},rollbackAnnotationEvent:function(){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&(this.mapImp.rollbackAnnotationEvent(this.annotationEntry),this.annotationEntry={})},commitAnnotationEvent:function(e){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&e&&(this.featureAnnotationSubmitted=!0,this.mapImp.commitAnnotationEvent(this.annotationEntry),this.annotationEntry.type==="deleted"?(this.closeTooltip(),this.annotationEntry={}):this.addAnnotationFeature())},fetchAnnotatedItemIds:async function(e=void 0,t=void 0){let r=await this.annotator.annotatedItemIds(this.userToken,this.serverURL,e,t);return"resource"in r&&(r=r.itemIds),r},setFeatureAnnotated:async function(){if(this.mapImp){const e=await this.fetchAnnotatedItemIds();for(const t of e)this.mapImp.setFeatureAnnotated(t)}},fetchDrawnFeatures:async function(e,t){const r=await this.fetchAnnotatedItemIds(e,t);let n=await this.annotator.drawnFeatures(this.userToken,this.serverURL,r);return"resource"in n&&(n=n.features),this.drawnType!=="All tools"&&(n=n.filter(i=>i.geometry.type===this.drawnType)),n},addAnnotationFeature:async function(){if(this.mapImp&&(this.featureAnnotationSubmitted||this.clearAnnotationFeature(),this.drawnType!=="None")){this.featureAnnotationSubmitted||(this.loading=!0);const e=this.annotatedType==="Anyone"?void 0:this.userInformation.orcid?this.userInformation.orcid:"0000-0000-0000-0000",t=this.annotatedType==="Anyone"?void 0:this.annotatedType==="Me",r=await this.fetchDrawnFeatures(e,t);if(this.existDrawnFeatures=r,this.loading=!1,!this.featureAnnotationSubmitted)for(const n of r)this.mapImp.addAnnotationFeature(n)}},showAnnotator:function(e){this.mapImp&&(this.mapImp.showAnnotator(e),this.$el.querySelector(".maplibregl-ctrl-group").style.display="none")},setDrawnType:function(e){this.drawnType=e,this.mapImp&&(this.addAnnotationFeature(),this.initialiseDrawing())},setAnnotatedType:function(e){this.annotatedType=e,this.mapImp&&this.addAnnotationFeature()},setFlightPath3D:function(e){this.flightPath3DRadio=e,this.mapImp&&this.mapImp.enableFlightPaths(e)},viewLatestMap:function(){let e=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(e="PATO:0000384");const t={entry:this.entry,biologicalSex:e,viewport:this.mapImp.getState()};this.$emit("view-latest-map",t)},backgroundChangeCallback:function(e){this.currentBackground=e,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(e){if(this.systems.length=0,e&&e.length>0){const t={label:"All",key:"All",children:[]};e.forEach(r=>{const n={colour:r.colour,enabled:r.enabled,label:r.id,key:r.id},i=qje(r,n.key);i.length>0&&(n.children=i),t.children.push(n)}),this.systems.push(t)}},processTaxon:function(e,t){this.taxonConnectivity.length=0,t.forEach(r=>{xAe(e,r).then(n=>{const i={taxon:r,label:n};this.taxonConnectivity.push(i)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(e){this.colourRadio=e,this.mapImp&&this.mapImp.setColour({colour:e,outline:this.outlinesRadio})},setOutlines:function(e){this.outlineRadio=e,this.mapImp&&this.mapImp.setColour({colour:this.colourRadio,outline:e})},resetView:function(){this.mapImp&&(this.mapImp.resetMap(),this.$refs.centrelinesSelection&&this.$refs.centrelinesSelection.reset(),this.$refs.skcanSelection&&this.$refs.skcanSelection.reset(),this.$refs.layersSelection&&this.$refs.layersSelection.reset(),this.$refs.systemsSelection&&this.$refs.pathwaysSelection.reset(),this.$refs.pathwaysSelection&&this.$refs.pathwaysSelection.reset())},zoomIn:function(){this.mapImp&&this.mapImp.zoomIn()},zoomOut:function(){this.mapImp&&this.mapImp.zoomOut()},centreLinesSelected:function(e){this.mapImp&&this.mapImp.enableCentrelines(e.value)},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},sckanSelected:function(e){this.mapImp&&this.mapImp.enableSckanPath(e.key,e.value)},checkAllSCKAN:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableSckanPath(t,e.value))},highlightConnectedPaths:async function(e){var t,r;if(this.mapImp){let n=[...this.mapImp.pathModelNodes(e)].map(c=>this.mapImp.featureProperties(c)),i=await this.flatmapQueries.queryForConnectivity(e),o=(r=(t=i==null?void 0:i.ids)==null?void 0:t.dendrites)==null?void 0:r.flat().flat(),s=[],l=!1;n.forEach(c=>{this.mapImp.nodePathModels(c.featureId).forEach(u=>{l=!0,this.mapImp.pathModelNodes(u).forEach(d=>{let h=this.mapImp.featureProperties([d]);if(o.includes(h.models)){l=!1;return}}),l&&s.push(u)})}),this.mapImp.zoomToFeatures(s,{noZoomIn:!0})}},resetMapFilter:function(){const e=this.mapFilters.alert;let t;e.with?e.without||(t={HAS:"alert"}):e.without?t={NOT:{HAS:"alert"}}:t={AND:[{NOT:{HAS:"alert"}},{HAS:"alert"}]},t?this.mapImp.setVisibilityFilter(t):this.mapImp.clearVisibilityFilter()},alertMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){let t;e.key==="alert"?t={HAS:"alert"}:e.key==="withoutAlert"&&(t={NOT:{HAS:"alert"}}),this.mapImp.setVisibilityFilter(t)}else this.resetMapFilter()},alertSelected:function(e){this.mapImp&&(e.key==="alert"?e.value?this.mapFilters.alert.with=!0:this.mapFilters.alert.with=!1:e.key==="withoutAlert"&&(e.value?this.mapFilters.alert.without=!0:this.mapFilters.alert.without=!1),this.resetMapFilter())},checkAllAlerts:function(e){this.mapImp&&(e.value?(this.mapFilters.alert.without=!0,this.mapFilters.alert.with=!0):(this.mapFilters.alert.without=!1,this.mapFilters.alert.with=!1),this.resetMapFilter())},systemSelected:function(e){this.mapImp&&this.mapImp.enableSystem(e.key,e.value)},checkAllSystems:function(e){this.mapImp&&this.systems[0].children.forEach(t=>this.mapImp.enableSystem(t.label,e))},ftuSelected:function(e){this.searchAndShowResult(e,!0)},layersSelected:function(e){this.mapImp&&this.mapImp.enableLayer(e.key,e.value)},checkAllLayers:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableLayer(t,e.value))},taxonsSelected:function(e){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(e.key,e.value)},taxonMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){let t=this.mapImp.taxonFeatureIds(e.key);this.mapImp.enableConnectivityByTaxonIds(e.key,e.value),this.mapImp.zoomToGeoJSONFeatures(t,{noZoomIn:!0})}else this.mapImp.selectGeoJSONFeatures("-1"),e.selections.forEach(t=>{let r=e.checked.includes(t.taxon);this.mapImp.enableConnectivityByTaxonIds(t.taxon,r)})},checkAllTaxons:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableConnectivityByTaxonIds(t,e.value))},pathwaysSelected:function(e){this.mapImp&&this.mapImp.enablePath(e.key,e.value)},checkAllPathways:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enablePath(t,e.value))},enablePanZoomEvents:function(e){this.mapImp.enablePanZoomEvents(e)},annotationEventCallback:function(e,t){if(t.type==="aborted")this.featureAnnotationSubmitted?this.featureAnnotationSubmitted=!1:this.rollbackAnnotationEvent();else if(t.type==="modeChanged")t.feature.mode==="direct_select"&&(this.doubleClickedFeature=!0);else if(t.type==="selectionChanged"){if(this.selectedDrawnFeature=t.feature.features.length===0?void 0:t.feature.features[0],e.feature.feature=this.selectedDrawnFeature,!this.activeDrawTool&&(this.connectionEntry={},this.selectedDrawnFeature)){const r=this.existDrawnFeatures.find(n=>n.id===this.selectedDrawnFeature.id);r&&r.connection&&(this.connectionEntry=r.connection),this.annotationDrawModeEvent(e)}}else{if(t.type==="created"||t.type==="updated"){t.type==="updated"&&t.feature.action&&(t.positionUpdated=t.feature.action==="move");const r=this.mapImp.refreshAnnotationFeatureGeometry(t.feature);e.feature.feature=r}t.type==="created"?this.drawnCreatedEvent=e:this.checkAndCreatePopups(e)}},eventCallback:function(){return(e,t,...r)=>{if(e==="annotation"){const n={feature:t,userData:r,eventType:e};this.annotationEventCallback(n,t)}else if(e!=="pan-zoom"){const n=t.label,i=[t.models],o=this.entry,s=this.biologicalSex;let l;t.taxons&&(typeof t.taxons!="object"?l=JSON.parse(t.taxons):l=t.taxons);const c={dataset:t.dataset,biologicalSex:s,taxonomy:o,resource:i,label:n,feature:t,userData:r,eventType:e,provenanceTaxonomy:l};if(e==="click"){if(this.featuresAlert=t.alert,this.viewingMode==="Neuron Connection")this.highlightConnectedPaths([t.models]);else if(this.currentActive=t.models?t.models:"",this.activeDrawTool&&!this.isValidDrawnCreated){const u=t.featureId||this.existDrawnFeatures.find(d=>d.id===t.id);if(this.activeDrawTool==="LineString"&&u){const d=t.featureId?t.featureId:t.id,h=t.label?t.label:`Feature ${t.id}`;this.connectionEntry[` ${d}`]=Object.assign({label:h},Object.fromEntries(Object.entries(t).filter(([p])=>["featureId","models"].includes(p)).map(([p,f])=>[p==="featureId"?"id":p,f])))}}}else e==="mouseenter"&&this.viewingMode!=="Neuron Connection"&&(this.currentHover=t.models?t.models:"");t&&t.type!=="marker"&&e==="click"&&this.viewingMode!=="Neuron Connection"&&!this.activeDrawTool&&this.checkAndCreatePopups(c),this.$emit("resource-selected",c)}else this.$emit("pan-zoom-callback",t)}},changeViewingMode:function(e=null){e!==null&&(this.viewingModeIndex=e),this.closeTooltip()},checkAndCreatePopups:async function(e){if(this.viewingMode==="Annotation")e.feature?(this.annotationEntry={...e.feature,resourceId:this.serverURL},e.feature.featureId&&e.feature.models?this.displayTooltip(e.feature.models):e.feature.feature&&(this.activeDrawTool||this.activeDrawMode||Object.keys(this.connectionEntry).length>0?(this.featureAnnotationSubmitted=!1,this.annotationEntry.featureId=e.feature.feature.id,this.activeDrawTool&&this.createConnectivityBody(),this.displayTooltip(e.feature.feature.id,bjr(e.feature.feature.geometry))):this.rollbackAnnotationEvent())):this.annotation={};else{let t=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(e);(t[0]||t[1]||e.feature.hyperlinks&&e.feature.hyperlinks.length>0)&&(this.resourceForTooltip=e.resource[0],e.resourceForTooltip=this.resourceForTooltip,this.createTooltipFromNeuronCuration(e))}},popUpCssHacks:function(){const e=document.querySelector(".flatmap-tooltip-popup"),t=document.querySelector(".maplibregl-popup-close-button");e&&(e.style.display="none"),t.style.display="block",this.$refs.tooltip.$el.style.display="flex",t.onclick=()=>{this.$emit("connectivity-info-close"),e&&(e.style.display="block")}},closeTooltip:function(){this.$refs.tooltip.$el.style.display="none",document.querySelectorAll(".maplibregl-popup").forEach(e=>{e.style.display="none"})},createTooltipFromNeuronCuration:async function(e){this.tooltipEntry=await this.flatmapQueries.createTooltipData(e),this.displayTooltip(e.resource[0])},showPopup:function(e,t,r){let n=r;this.mapImp&&(n?n.className||(n.className="custom-popup"):n={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(e,t,n))},showMarkerPopup:function(e,t,r){this.mapImp&&this.mapImp.showMarkerPopup(e,t,r)},closeMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(e.classList.add("enlarge"),e.classList.remove("shrink")):(e.classList.add("shrink"),e.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");e&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),e.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(e){const t=this.hoverVisibilities.length,r=t-1,n=this.hoverVisibilities[this.helpModeActiveIndex];if(n){const i=n==null?void 0:n.refs,o=n==null?void 0:n.ref,s=this.$refs[i||o];if(s){const{parentElement:l,nextElementSibling:c}=s.$el,u=d=>d&&(d.classList.contains("pathway-container")||d.classList.contains("pathway-location"));(u(l)||u(c))&&(this.drawerOpen=!0)}else this.helpModeActiveIndex+=1}e||(this.helpModeActiveIndex=this.helpModeInitialIndex),this.viewingMode!=="Annotation"&&this.helpModeActiveIndex>9&&(this.helpModeActiveIndex=r),e&&this.helpModeActiveIndex>=r&&this.$emit("help-mode-last-item",!0),e&&!this.helpModeDialog?(this.inHelp=!0,this.hoverVisibilities.forEach(i=>{i.value=!0})):e&&this.helpModeDialog&&t>this.helpModeActiveIndex?this.helpModeActiveIndex>-1?(this.closeFlatmapHelpPopup(),setTimeout(()=>{this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.showTooltip(this.helpModeActiveIndex,200)},300)):this.helpModeActiveIndex===-1&&this.openFlatmapHelpPopup():(this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.closeFlatmapHelpPopup())},showTooltip:function(e,t=500){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!0,this.$emit("shown-tooltip")},t))},hideTooltip:function(e,t=500){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!1},t))},displayTooltip:function(e,t=void 0){let r,n={className:"flatmapvuer-popover"};t?(r=e,n.annotationFeatureGeometry=t):(r=this.mapImp.modelFeatureIds(e)[0],this.activeDrawTool||(n.positionAtLastClick=!0)),this.connectivityInfoSidebar&&this.viewingMode!=="Annotation"&&this.$emit("connectivity-info-open",this.tooltipEntry),!this.disableUI&&(!this.connectivityInfoSidebar||this.viewingMode==="Annotation")&&(this.tooltipDisplay=!0,this.$nextTick(()=>{this.mapImp.showPopup(r,this.$refs.tooltip.$el,n),this.popUpCssHacks()}))},moveMap:function(e,t={}){if(this.mapImp){const{offsetX:r=0,offsetY:n=0,zoom:i=4}=t,o=this.mapImp._map,s=this.mapImp._bounds.toArray();this.mapImp.zoomToFeatures(e,{noZoomIn:!0}),this.showPathwaysDrawer(!1),s!=null&&s.length&&setTimeout(()=>{o.fitBounds(s,{offset:[r,n],zoom:i,animate:!0})})}},openFlatmapHelpPopup:function(){if(this.mapImp){let e=this.mapImp.modelFeatureIds("UBERON:0000948");e&&e.length>0&&(this.mapImp.showPopup(e[0],"Click for more information",{anchor:"top",className:"flatmap-popup-popper"}),this.$emit("shown-map-tooltip"))}},closeFlatmapHelpPopup:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(e=>{e.click()})},getLabels:function(){let e=[];if(this.mapImp){let t=this.mapImp.annotations;for(let r of t.values())r.label&&e.push(r.label);return Array.from(new Set(e))}},getState:function(){if(this.mapImp){let e={entry:this.entry,viewport:this.mapImp.getState()};const t=this.mapImp.getIdentifier();return this.biologicalSex?e.biologicalSex=this.biologicalSex:t&&t.biologicalSex&&(e.biologicalSex=t.biologicalSex),t&&t.uuid&&(e.uuid=t.uuid),e}},setState:function(e){e&&(this.mapImp&&e.entry&&this.entry==e.entry&&(!e.biologicalSex||e.biologicalSex===this.biologicalSex)?e.viewport&&this.mapImp.setState(e.viewport):this.createFlatmap(e),this.setStateRequired=!1)},restoreMapState:function(e){e&&(e.viewport&&this.mapImp.setState(e.viewport),e.searchTerm&&this.searchAndShowResult(e.searchTerm,!0))},setFlightPathInfo:function(e){(e===1.6||e>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!1))},createFlatmap:function(e){if(!this.mapImp&&!this.loading){this.loading=!0;let t=!1;this.displayMinimap&&(t={position:"top-right"});let r={taxon:this.entry};this.uuid&&(r.uuid=this.uuid),e?e.uuid?r={uuid:e.uuid}:e.entry&&(r.taxon=e.entry,e.biologicalSex?r.biologicalSex=e.biologicalSex:r.taxon==="NCBITaxon:9606"&&(r.biologicalSex="PATO:0000384")):this.biologicalSex&&(r.biologicalSex=this.biologicalSex),this.mapManager.loadMap(r,this.$refs.display,this.eventCallback(),{minZoom:this.minZoom,tooltips:this.tooltips,minimap:t}).then(n=>{this.mapImp=n,this.serverURL=this.mapImp.makeServerUrl("").slice(0,-1);let i=this.mapImp.details.version;this.setFlightPathInfo(i),this.onFlatmapReady(),this._stateToBeSet?this.restoreMapState(this._stateToBeSet):this.restoreMapState(e)})}else e&&(this._stateToBeSet={viewport:e.viewport,searchTerm:e.searchTerm},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const e=this.$refs.display;if(e){const t=getComputedStyle(e),r=parseInt(t.paddingTop)+parseInt(t.paddingBottom),n=e.clientHeight-r;this.pathwaysMaxHeight=n-170}},mapResize:function(){try{this.computePathControlsMaximumHeight(),this.mapImp&&(this.mapImp.resize(),this.showMinimap(this.displayMinimap),this.mapImp._minimap&&this.mapImp._minimap._miniMap.resize())}catch{console.error("Map resize error")}},onFlatmapReady:function(){this.sensor=new Gpr(this.$refs.display,this.mapResize),this.mapImp.options&&this.mapImp.options.style==="functional"&&(this.isFC=!0),this.mapImp.setBackgroundOpacity(1),this.backgroundChangeCallback(this.currentBackground),this.pathways=this.mapImp.pathTypes(),this.mapImp.enableCentrelines(!1),this.processSystems(this.mapImp.getSystems()),this.processTaxon(this.flatmapAPI,this.mapImp.taxonIdentifiers),this.containsAlert="alert"in this.mapImp.featureFilterRanges(),this.addResizeButtonToMinimap(),this.loading=!1,this.computePathControlsMaximumHeight(),this.drawerOpen=!0,this.mapResize(),this.handleMapClick(),this.$emit("ready",this)},handleMapClick:function(){const e=this.mapImp._map;e&&e.on("click",t=>{this.tooltipEntry.featureId&&this.$emit("connectivity-info-close")})},showMinimap:function(e){this.mapImp&&this.mapImp.showMinimap(e)},showPathwaysDrawer:function(e){this.drawerOpen=e},searchAndShowResult:function(e,t){if(this.mapImp){if(e===void 0||e==="")return this.mapImp.clearSearchResults(),!0;{const r=this.mapImp.search(e);if(r&&r.results&&r.results.length>0){if(this.mapImp.showSearchResults(r),t&&r.results[0].featureId&&r.results[0].text){const n=this.mapImp.annotation(r.results[0].featureId);this.mapImp.showPopup(r.results[0].featureId,n.label,{className:"custom-popup",positionAtLastClick:!1,preserveSelection:!0})}return!0}else this.mapImp.clearSearchResults()}}return!1},searchSuggestions:function(e){return this.mapImp?this.mapImp.search(e):[]}},props:{entry:{type:String,required:!0},uuid:String,biologicalSex:{type:String,default:""},minZoom:{type:Number,default:4},tooltips:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},helpModeInitialIndex:{type:Number,default:0},renderAtMounted:{type:Boolean,default:!0},displayMinimap:{type:Boolean,default:!1},displayWarning:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array,default:function(){return[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}]}},showStarInLegend:{type:Boolean,default:!1},isLegacy:{type:Boolean,default:!1},displayLatestChanges:{type:Boolean,default:!1},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1}},provide(){return{flatmapAPI:this.flatmapAPI,sparcAPI:this.sparcAPI,$annotator:this.annotator,getFeaturesAlert:()=>this.featuresAlert,userApiKey:this.userToken}},data:function(){return{annotationEntry:{},tooltipDisplay:!1,serverURL:void 0,layers:[],pathways:[],sckanDisplay:[{label:"Display Path with SCKAN",key:"VALID"}],centreLines:[{label:"Display Nerves",key:"centrelines",enabled:!1}],systems:[],taxonConnectivity:[],pathwaysMaxHeight:1e3,hoverVisibilities:[{value:!1,ref:"markerPopover"},{value:!1,ref:"zoomInPopover"},{value:!1,ref:"zoomOutPopover"},{value:!1,ref:"zoomFitPopover"},{value:!1,ref:"openMapPopover"},{value:!1,ref:"settingsPopover"},{value:!1,ref:"checkBoxPopover"},{value:!1,ref:"warningPopover"},{value:!1,ref:"whatsNewPopover"},{value:!1,ref:"featuredMarkerPopover"},{value:!1,refs:"toolbarPopover",ref:"editPopover"},{value:!1,refs:"toolbarPopover",ref:"deletePopover"},{value:!1,refs:"toolbarPopover",ref:"pointPopover"},{value:!1,refs:"toolbarPopover",ref:"lineStringPopover"},{value:!1,refs:"toolbarPopover",ref:"polygonPopover"},{value:!1,refs:"toolbarPopover",ref:"connectionPopover"}],helpModeActiveIndex:this.helpModeInitialIndex,yellowstar:jpr,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:Dpr,tooltipEntry:Qjr(),connectivityTooltipVisible:!1,drawerOpen:!1,featuresAlert:void 0,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",selectedDrawnFeature:void 0,currentHover:"",viewingModeIndex:0,viewingModes:{0:{name:"Exploration",description:"Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources"},1:{name:"Neuron Connection",description:"Discover Neuron connections by selecting a neuron and viewing its associated network connections"},2:{name:"Annotation",description:"View internal identifiers of features"}},drawnType:"All tools",drawnTypes:["All tools","Point","LineString","Polygon","None"],annotatedType:"Anyone",annotatedTypes:["Anyone","Me","Others"],openMapRef:void 0,backgroundIconRef:void 0,toolbarOptions:["Edit","Delete","Point","LineString","Polygon","Connection"],annotator:void 0,userInformation:void 0,activeDrawMode:void 0,activeDrawTool:void 0,featureAnnotationSubmitted:!1,drawnCreatedEvent:{},connectionEntry:{},existDrawnFeatures:[],doubleClickedFeature:!1,containsAlert:!1,alertOptions:[{label:"Display Path With Alerts",key:"alert",enabled:!0},{label:"Display Path Without Alerts",key:"withoutAlert",enabled:!0}],mapFilters:a.markRaw({alert:{with:!0,without:!0}})}},computed:{...Tjr(vjr,["userToken"]),isValidDrawnCreated:function(){return Object.keys(this.drawnCreatedEvent).length>0},viewingMode:function(){return this.viewingModes[this.viewingModeIndex].name}},watch:{entry:function(){this.state||this.createFlatmap()},helpMode:function(e,t){e!==t&&this.setHelpMode(e)},helpModeActiveItem:function(){this.helpMode&&(this.helpModeActiveIndex+=1,this.setHelpMode(this.helpMode))},state:{handler:function(e,t){e!==t&&(this.mapManager?this.setState(e):this.setStateRequired=!0)},immediate:!0,deep:!0},viewingMode:function(e){e==="Annotation"?(this.loading=!0,this.annotator.authenticate(this.userToken).then(t=>{t.name&&t.email&&(this.showAnnotator(!0),this.userInformation=t,this.setFeatureAnnotated(),this.existDrawnFeatures.length===0&&this.addAnnotationFeature()),this.loading=!1})):this.showAnnotator(!1)},disableUI:function(e){e&&this.closeTooltip()}},mounted:function(){this.openMapRef=a.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=a.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait=[],this.tooltipWait.length=this.hoverVisibilities.length,this.mapManager=new A1e(this.flatmapAPI),this.flatmapQueries=new zpr,this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap()}},Cp=e=>(a.pushScopeId("data-v-bf497ec4"),e=e(),a.popScopeId(),e),_jr={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},wjr={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},Ljr={style:{height:"100%",width:"100%"},ref:"display"},Sjr={class:"beta-popovers"},kjr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),Cjr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),Mjr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),Ejr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),Ajr=Cp(()=>a.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),Ojr={key:1,class:"warning-text"},Ijr=Cp(()=>a.createElementVNode("span",{class:"warning-text"},"What's new?",-1)),Pjr=Cp(()=>a.createElementVNode("b",null,"Neuron Connection mode",-1)),Vjr=Cp(()=>a.createElementVNode("p",null," You can now view the network of neurons connected to a selected neuron. This mode is located in the settings at the bottom right. Once discovery mode is on, click on a neuron to see its connections. ",-1)),Hjr=Cp(()=>a.createElementVNode("b",null,"Now can display up to 6 panes",-1)),Rjr=Cp(()=>a.createElementVNode("p",null," You can now display up to 6 panes in the flatmap. This allows you to compare between different datasets and/or different views of the same dataset. ",-1)),Njr={class:"bottom-right-control"},Bjr=Cp(()=>a.createElementVNode("div",null,[a.createTextVNode(" Fit to "),a.createElementVNode("br"),a.createTextVNode(" window ")],-1)),Fjr=["innerHTML"],Djr=["innerHTML"],zjr={style:{"margin-bottom":"2px"}},jjr={key:0,class:"viewing-mode-title"},Ujr=["onClick"],Gjr=["onClick"];function Wjr(e,t,r,n,i,o){const s=a.resolveComponent("map-svg-sprite-color"),l=_Me,c=Cu,u=OB,d=_ne,h=a.resolveComponent("DrawToolbar"),p=a.resolveComponent("map-svg-icon"),f=QAe,m=a.resolveComponent("tree-controls"),g=bAe,T=QMe,y=GEe,v=GC,Q=WC,_=aie,L=AB,w=sAe,S=lAe,C=a.resolveComponent("Tooltip"),E=yAe,O=lie;return a.withDirectives((a.openBlock(),a.createElementBlock("div",_jr,[a.createVNode(s),a.createElementVNode("div",wjr,[a.createElementVNode("div",Ljr,null,512),a.withDirectives(a.createElementVNode("div",Sjr,[a.createElementVNode("div",null,[a.createVNode(u,{placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:e.hoverVisibilities[7].value,ref:"warningPopover"},{reference:a.withCtx(()=>[r.displayWarning?(a.openBlock(),a.createElementBlock("div",{key:0,class:"warning-icon",onMouseover:t[7]||(t[7]=I=>o.showTooltip(6)),onMouseout:t[8]||(t[8]=I=>o.hideTooltip(6))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),r.isLegacy?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Ajr,a.createElementVNode("div",{class:"latest-map-text",onClick:t[6]||(t[6]=(...I)=>o.viewLatestMap&&o.viewLatestMap(...I))}," Click here for the latest map ")],64)):(a.openBlock(),a.createElementBlock("span",Ojr,"Beta"))],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[r.isLegacy?(a.openBlock(),a.createElementBlock("p",{key:0,onMouseover:t[0]||(t[0]=I=>o.showTooltip(7)),onMouseout:t[1]||(t[1]=I=>o.hideTooltip(7))}," This is a legacy map, you may view the latest map instead. ",32)):e.isFC?(a.openBlock(),a.createElementBlock("p",{key:1,onMouseover:t[2]||(t[2]=I=>o.showTooltip(7)),onMouseout:t[3]||(t[3]=I=>o.hideTooltip(7))},[a.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),kjr,a.createTextVNode(" models available in "),Cjr,a.createTextVNode(". ")],32)):(a.openBlock(),a.createElementBlock("p",{key:2,onMouseover:t[4]||(t[4]=I=>o.showTooltip(6)),onMouseout:t[5]||(t[5]=I=>o.hideTooltip(6))},[a.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),Mjr,a.createTextVNode(" models available in "),Ejr,a.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")],32))]),_:1},8,["visible"])]),r.displayLatestChanges?(a.openBlock(),a.createBlock(u,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:e.hoverVisibilities[8].value,ref:"whatsNewPopover"},{reference:a.withCtx(()=>[r.displayLatestChanges?(a.openBlock(),a.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:t[9]||(t[9]=I=>o.showTooltip(8)),onMouseout:t[10]||(t[10]=I=>o.hideTooltip(8))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),Ijr],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[Pjr,Vjr,Hjr,Rjr]),_:1},8,["visible"])):a.createCommentVNode("",!0)],512),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(c,{class:a.normalizeClass(["minimap-resize",{enlarge:e.minimapSmall,shrink:!e.minimapSmall}]),ref:"minimapResize",onClick:o.closeMinimap},{default:a.withCtx(()=>[a.createVNode(d)]),_:1},8,["class","onClick"]),[[a.vShow,e.minimapResizeShow]]),o.viewingMode==="Annotation"&&e.userInformation&&!r.disableUI?(a.openBlock(),a.createBlock(h,{key:0,mapCanvas:{containerHTML:this.$el,class:".maplibregl-canvas"},toolbarOptions:e.toolbarOptions,drawnType:e.drawnType,activeDrawTool:e.activeDrawTool,activeDrawMode:e.activeDrawMode,newlyDrawnEntry:e.drawnCreatedEvent,connectionEntry:e.connectionEntry,hoverVisibilities:e.hoverVisibilities,onClickToolbar:o.toolbarEvent,onFeatureTooltip:o.connectedFeatureTooltip,onConfirmDrawn:o.confirmDrawnFeature,onCancelDrawn:o.cancelDrawnFeature,onShowTooltip:o.showTooltip,onHideTooltip:o.hideTooltip,ref:"toolbarPopover"},null,8,["mapCanvas","toolbarOptions","drawnType","activeDrawTool","activeDrawMode","newlyDrawnEntry","connectionEntry","hoverVisibilities","onClickToolbar","onFeatureTooltip","onConfirmDrawn","onCancelDrawn","onShowTooltip","onHideTooltip"])):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",Njr,[a.createVNode(u,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[1].value,ref:"zoomInPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"zoomIn",class:"icon-button zoomIn",onClick:t[11]||(t[11]=I=>o.zoomIn()),onMouseover:t[12]||(t[12]=I=>o.showTooltip(1)),onMouseout:t[13]||(t[13]=I=>o.hideTooltip(1))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[2].value,ref:"zoomOutPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"zoomOut",class:"icon-button zoomOut",onClick:t[14]||(t[14]=I=>o.zoomOut()),onMouseover:t[15]||(t[15]=I=>o.showTooltip(2)),onMouseout:t[16]||(t[16]=I=>o.hideTooltip(2))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[3].value,ref:"zoomFitPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"fitWindow",class:"icon-button fitWindow",onClick:t[17]||(t[17]=I=>o.resetView()),onMouseover:t[18]||(t[18]=I=>o.showTooltip(3)),onMouseout:t[19]||(t[19]=I=>o.hideTooltip(3))})]),default:a.withCtx(()=>[Bjr]),_:1},8,["visible"])],512),[[a.vShow,!r.disableUI]]),a.createVNode(u,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual",offset:-18,"popper-class":"flatmap-popper",visible:e.hoverVisibilities[6].value,ref:"checkBoxPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["pathway-location",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["pathway-container",{open:e.drawerOpen,close:!e.drawerOpen}]),style:a.normalizeStyle({"max-height":e.pathwaysMaxHeight+"px"})},[e.isFC?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(f,{key:0,class:"svg-legends-container"})),r.showStarInLegend?(a.openBlock(),a.createBlock(u,{key:1,content:"Location of the featured dataset",placement:"right",teleported:!0,trigger:"manual",width:"max-content",offset:-10,"popper-class":"flatmap-popper flatmap-teleport-popper",visible:e.hoverVisibilities[9].value,ref:"featuredMarkerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"yellow-star-legend",innerHTML:e.yellowstar,onMouseover:t[20]||(t[20]=I=>o.showTooltip(9)),onMouseout:t[21]||(t[21]=I=>o.hideTooltip(9))},null,40,Fjr),[[E,void 0,"featuredMarkerPopover"]])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(u,{content:"Find these markers for data. The number inside the markers is the number of datasets available for each marker.",placement:"right",teleported:!1,width:"200",trigger:"manual","popper-class":"flatmap-popper flatmap-marker-popper",visible:e.hoverVisibilities[5].value,ref:"markerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:e.flatmapMarker},null,8,Djr),[[a.vShow,e.hoverVisibilities[0].value],[E,void 0,"markerPopover"]])]),_:1},8,["visible"]),e.isFC&&e.systems&&e.systems.length>0?(a.openBlock(),a.createBlock(m,{key:2,class:"treeControls",mapType:"flatmap",title:"Systems",treeData:e.systems,active:e.currentActive,hover:e.currentHover,onCheckChanged:o.systemSelected,onCheckAll:o.checkAllSystems,onChangeActive:o.ftuSelected,ref:"treeControls"},null,8,["treeData","active","hover","onCheckChanged","onCheckAll","onChangeActive"])):a.createCommentVNode("",!0),e.containsAlert&&e.alertOptions?(a.openBlock(),a.createBlock(g,{title:"Alert",labelKey:"label",identifierKey:"key",selections:e.alertOptions,onChanged:o.alertSelected,onCheckboxMouseEnter:o.alertMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllAlerts,ref:"alertSelection",key:"alertSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),e.pathways&&e.pathways.length>0?(a.openBlock(),a.createBlock(g,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:e.pathways,onChanged:o.pathwaysSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","onChanged","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),!e.isFC&&e.taxonConnectivity&&e.taxonConnectivity.length>0?(a.openBlock(),a.createBlock(g,{title:"Studied in",labelKey:"label",identifierKey:"taxon",helpMessage:"Evidence exists that this set of neuron populations have been studied in the given species.",selections:e.taxonConnectivity,onChanged:o.taxonsSelected,onCheckboxMouseEnter:o.taxonMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),!e.isFC&&e.centreLines&&e.centreLines.length>0?(a.openBlock(),a.createBlock(g,{title:"Nerves",labelKey:"label",identifierKey:"key",selections:e.centreLines,onChanged:o.centreLinesSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,ref:"centrelinesSelection",key:"centrelinesSelection"},null,8,["selections","onChanged","onSelectionsDataChanged"])):a.createCommentVNode("",!0)],6)),[[E,void 0,"checkBoxPopover"]]),a.createElementVNode("div",{onClick:t[22]||(t[22]=(...I)=>o.toggleDrawer&&o.toggleDrawer(...I)),class:a.normalizeClass(["drawer-button",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(T)]),_:1})],2)],2),[[a.vShow,!r.disableUI]])]),_:1},8,["visible"]),e.openMapRef?(a.openBlock(),a.createBlock(u,{key:1,ref:"open-map-popover","virtual-ref":e.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.openMapOptions,I=>(a.openBlock(),a.createBlock(v,{key:I.key},{default:a.withCtx(()=>[a.createVNode(y,{type:"primary",plain:"",onClick:R=>e.$emit("open-map",I.key)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):a.createCommentVNode("",!0),a.createVNode(u,{ref:"backgroundPopover","virtual-ref":e.backgroundIconRef,placement:"top-start",width:"320",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Viewing Mode")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createElementVNode("div",zjr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.viewingModes,(I,R)=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:I+R},[I.name===o.viewingMode?(a.openBlock(),a.createElementBlock("span",jjr,[a.createElementVNode("b",null,a.toDisplayString(I.name),1)])):(a.openBlock(),a.createElementBlock("span",{key:1,class:"viewing-mode-unselected",onClick:B=>o.changeViewingMode(R)},a.toDisplayString(I.name),9,Ujr))],64))),128))]),a.createVNode(v,{class:"viewing-mode-description"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e.viewingModes[e.viewingModeIndex].description),1)]),_:1})]),_:1}),o.viewingMode==="Annotation"&&e.userInformation?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Drawn By*")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(L,{teleported:!1,modelValue:e.drawnType,"onUpdate:modelValue":t[23]||(t[23]=I=>e.drawnType=I),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setDrawnType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.drawnTypes,I=>(a.openBlock(),a.createBlock(_,{key:I,label:I,value:I},{default:a.withCtx(()=>[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(Q,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Annotated By*")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(L,{teleported:!1,modelValue:e.annotatedType,"onUpdate:modelValue":t[24]||(t[24]=I=>e.annotatedType=I),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setAnnotatedType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.annotatedTypes,I=>(a.openBlock(),a.createBlock(_,{key:I,label:I,value:I},{default:a.withCtx(()=>[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(Q,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})],64)):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:1,class:"backgroundSpacer"})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:2,class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Flight path display")]),_:1})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:3,class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.flightPath3DRadio,"onUpdate:modelValue":t[25]||(t[25]=I=>e.flightPath3DRadio=I),class:"flatmap-radio",onChange:o.setFlightPath3D},{default:a.withCtx(()=>[a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("2D")]),_:1}),a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):a.createCommentVNode("",!0),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Organs display")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.colourRadio,"onUpdate:modelValue":t[26]||(t[26]=I=>e.colourRadio=I),class:"flatmap-radio",onChange:o.setColour},{default:a.withCtx(()=>[a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Colour")]),_:1}),a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Greyscale")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Outlines display")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.outlinesRadio,"onUpdate:modelValue":t[27]||(t[27]=I=>e.outlinesRadio=I),class:"flatmap-radio",onChange:o.setOutlines},{default:a.withCtx(()=>[a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Show")]),_:1}),a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Change background")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.availableBackground,I=>(a.openBlock(),a.createElementBlock("div",{key:I,class:a.normalizeClass(["backgroundChoice",I,I==e.currentBackground?"active":""]),onClick:R=>o.backgroundChangeCallback(I)},null,10,Gjr))),128))]),_:1})])]),_:1},8,["virtual-ref"]),a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["settings-group",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(u,{visible:e.hoverVisibilities[4].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper",ref:"openMapPopover"},{reference:a.withCtx(()=>[r.enableOpenMapUI&&r.openMapOptions.length>0?(a.openBlock(),a.createBlock(p,{key:0,ref:"openMapRef",icon:"openMap",class:"icon-button open-map-button",onMouseover:t[28]||(t[28]=I=>o.showTooltip(4)),onMouseout:t[29]||(t[29]=I=>o.hideTooltip(4))},null,512)):a.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1}),a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(u,{content:"Change settings",placement:"right",visible:e.hoverVisibilities[5].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper",ref:"settingsPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{ref:"backgroundIconRef",icon:"changeBckgd",class:"icon-button",onMouseover:t[30]||(t[30]=I=>o.showTooltip(5)),onMouseout:t[31]||(t[31]=I=>o.hideTooltip(5))},null,512)]),_:1},8,["visible"])]),_:1})],2),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(C,{ref:"tooltip",class:"tooltip",annotationEntry:e.annotationEntry,tooltipEntry:e.tooltipEntry,annotationDisplay:o.viewingMode==="Annotation",onAnnotation:o.commitAnnotationEvent},null,8,["annotationEntry","tooltipEntry","annotationDisplay","onAnnotation"]),[[a.vShow,e.tooltipDisplay]])])])),[[O,e.loading]])}const B1e=VB(xjr,[["render",Wjr],["__scopeId","data-v-bf497ec4"]]);function qjr(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const Zje=new qjr,Xje={"NCBITaxon:10114":"01fedbf9-d783-509c-a10c-827941ab13da","NCBITaxon:9823":"a336ac04-24db-561f-a25f-1c994fe17410","NCBITaxon:9606":"42ed6323-f645-5fbe-bada-9581819cf689","NCBITaxon:10090":"25285fab-48a0-5620-a6a0-f9a0374837d5","NCBITaxon:9685":"73060497-46a6-52bf-b975-cac511c127cb"},Zjr={name:"MultiFlatmapVuer",components:{Col:WC,Row:GC,Option:aie,Select:AB,Popover:OB,FlatmapVuer:B1e},beforeMount(){this._resolveList=[],this._initialised=!1},mounted:function(){this.initialise(),Zje.on("onActionClick",e=>{this.resourceSelected(e)}),Zje.on("open-pubmed-url",e=>{this.$emit("open-pubmed-url",e)})},methods:{initialise:function(){return new Promise(e=>{this.requireInitialisation?(this.requireInitialisation=!1,fetch(this.flatmapAPI).then(t=>t.json()).then(t=>{Object.keys(this.availableSpecies).forEach(n=>{const i=this.availableSpecies[n].uuid;if(i&&t.map(o=>o.uuid).indexOf(i)>0)this.speciesList[n]=a.reactive(this.availableSpecies[n]);else for(let o=0;o<t.length;o++)if(this.availableSpecies[n].taxo===t[o].taxon)if(this.availableSpecies[n].biologicalSex){if(t[o].biologicalSex&&t[o].biologicalSex===this.availableSpecies[n].biologicalSex){this.speciesList[n]=a.reactive(this.availableSpecies[n]);break}}else{this.speciesList[n]=a.reactive(this.availableSpecies[n]);break}});let r=this.initial;if(this.state){const n=this.state.state;(!n||!n.uuid&&!n.entry)&&this.state.species?r=this.state.species:r=void 0}r&&(r&&this.speciesList[r]!==void 0?this.activeSpecies=r:this.activeSpecies=Object.keys(this.speciesList)[0],this.setSpecies(this.activeSpecies,this.state?this.state.state:void 0,5)),this._initialised=!0,e(),this._resolveList.forEach(n=>{n()})})):this._initialised?e():this._resolveList.push(e)})},resourceSelected:function(e){this.$emit("resource-selected",e)},FlatmapReady:function(e){this.$emit("ready",e)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(e){this.$emit("pan-zoom-callback",e)},onConnectivityInfoClose:function(){this.$emit("connectivity-info-close")},onConnectivityInfoOpen:function(e){this.$emit("connectivity-info-open",e)},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},showPopup:function(e,t,r){this.getCurrentFlatmap().showPopup(e,t,r)},showMarkerPopup:function(e,t,r){this.getCurrentFlatmap().showMarkerPopup(e,t,r)},setSpecies:function(e,t,r){if(this.$refs&&e in this.$refs)this.activeSpecies=e,this.$refs[this.activeSpecies][0].createFlatmap(t),this.$emit("flatmapChanged",this.activeSpecies);else if(r){const n=r-1;n>=0&&this.$nextTick(()=>{this.setSpecies(e,t,n)})}},viewLatestMap:function(e){const t=Object.keys(this.speciesList);for(let r=0;r<t.length;r++){const n=this.speciesList[t[r]];if(!n.isLegacy&&n.taxo===e.entry&&n.biologicalSex===e.biologicalSex){this.setSpecies(t[r],e,0);return}}},createLegacyEntry:function(e,t,r){if(r&&t){let n="Legacy";return e.species&&(e.species.slice(0,6)==="Legacy"?n=e.species:n=n+` ${e.species}`),this.speciesList[n]=a.reactive({taxo:t,isLegacy:!0,displayWarning:!0}),{species:n,state:{entry:t,uuid:r,viewport:e.state.viewport,searchTerm:e.state.searchTerm}}}},updateState:function(e){return new Promise(t=>{if(e&&e.state){const r=e.state;if(r.uuid){if(r.entry)return new Promise(()=>{const n=new A1e(this.flatmapAPI),i={taxon:r.entry};r.biologicalSex&&(i.biologicalSex=r.biologicalSex),n.findMap_(i).then(o=>{if(o.uuid!==r.uuid)return this.createLegacyEntry(e,r.entry,r.uuid)}).then(o=>{t(o||e)}).catch(()=>{t(e)})})}else if(r.entry){const n=r.entry in Xje?Xje[r.entry]:void 0,i=this.createLegacyEntry(e,r.entry,n);t(i||e)}}t(e)})},getState:function(){let e={species:this.activeSpecies,state:void 0},t=this.getCurrentFlatmap();return e.state=t.getState(),e},setState:function(e){e&&this.updateState(e).then(t=>{this.initialise().then(()=>{t.species&&t.species!==this.activeSpecies?this.setSpecies(t.species,t.state,5):t.state&&this.getCurrentFlatmap().setState(t.state)})})},activateTooltipByIndex:function(e){return e===this.helpModeActiveItem&&this.helpMode},onHelpModeLastItem:function(e){e&&this.$emit("help-mode-last-item",!0)},onTooltipShown:function(){this.$emit("shown-tooltip")},onMapTooltipShown:function(){this.$emit("shown-map-tooltip")}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:4},renderAtMounted:{type:Boolean,default:!1},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},displayMinimap:{type:Boolean,default:!1},showStarInLegend:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array},availableSpecies:{type:Object,default:function(){return{"Human Female":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000383",iconClass:"mapicon-icon_human",displayWarning:!0},"Human Male":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000384",iconClass:"mapicon-icon_human",displayWarning:!0},Rat:{taxo:"NCBITaxon:10114",iconClass:"mapicon-icon_rat",displayLatestChanges:!0},Mouse:{taxo:"NCBITaxon:10090",iconClass:"mapicon-icon_mouse",displayWarning:!0},Pig:{taxo:"NCBITaxon:9823",iconClass:"mapicon-icon_pig",displayWarning:!0},Cat:{taxo:"NCBITaxon:9685",iconClass:"mapicon-icon_cat",displayWarning:!0}}}},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1}},data:function(){return{activeSpecies:void 0,speciesList:{},requireInitialisation:!0}},watch:{state:{handler:function(e){this.setState(e)},immediate:!0,deep:!0}}},Xjr=e=>(a.pushScopeId("data-v-c373f9aa"),e=e(),a.popScopeId(),e),Kjr={class:"multi-container",ref:"multiContainer"},Yjr={key:0,style:{position:"absolute","z-index":"10"}},Jjr=Xjr(()=>a.createElementVNode("div",{class:"species-display-text"},"Species",-1)),$jr={class:"select-box-icon"};function eUr(e,t,r,n,i,o){const s=aie,l=AB,c=OB,u=B1e;return a.openBlock(),a.createElementBlock("div",Kjr,[r.disableUI?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",Yjr,[Jjr,a.createVNode(c,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper flatmap-teleport-popper right-popper",width:"max-content",visible:o.activateTooltipByIndex(0),teleported:!1,ref:"selectPopover"},{reference:a.withCtx(()=>[a.createVNode(l,{id:"flatmap-select",teleported:!1,modelValue:e.activeSpecies,"onUpdate:modelValue":t[0]||(t[0]=d=>e.activeSpecies=d),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:o.setSpecies},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>(a.openBlock(),a.createBlock(s,{key:h,label:h,value:h},{default:a.withCtx(()=>[a.createElementVNode("span",$jr,[a.createElementVNode("i",{class:a.normalizeClass(d.iconClass)},null,2)]),a.createTextVNode(" "+a.toDisplayString(h),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>a.withDirectives((a.openBlock(),a.createBlock(u,{key:h,entry:d.taxo,uuid:d.uuid,biologicalSex:d.biologicalSex,displayWarning:d.displayWarning,displayLatestChanges:d.displayLatestChanges,isLegacy:d.isLegacy,ref_for:!0,ref:h,enableOpenMapUI:r.enableOpenMapUI,openMapOptions:r.openMapOptions,disableUI:r.disableUI,onViewLatestMap:o.viewLatestMap,onResourceSelected:o.resourceSelected,onReady:o.FlatmapReady,onPanZoomCallback:o.panZoomCallback,connectivityInfoSidebar:r.connectivityInfoSidebar,onConnectivityInfoOpen:o.onConnectivityInfoOpen,onConnectivityInfoClose:o.onConnectivityInfoClose,onOpenMap:t[1]||(t[1]=p=>e.$emit("open-map",p)),onPathwaySelectionChanged:o.onSelectionsDataChanged,minZoom:r.minZoom,helpMode:e.activeSpecies==h&&r.helpMode,helpModeActiveItem:r.helpModeActiveItem,helpModeDialog:r.helpModeDialog,helpModeInitialIndex:-2,onHelpModeLastItem:o.onHelpModeLastItem,onShownTooltip:o.onTooltipShown,onShownMapTooltip:o.onMapTooltipShown,renderAtMounted:r.renderAtMounted,displayMinimap:r.displayMinimap,showStarInLegend:r.showStarInLegend,style:{height:"100%"},flatmapAPI:r.flatmapAPI,sparcAPI:r.sparcAPI},null,8,["entry","uuid","biologicalSex","displayWarning","displayLatestChanges","isLegacy","enableOpenMapUI","openMapOptions","disableUI","onViewLatestMap","onResourceSelected","onReady","onPanZoomCallback","connectivityInfoSidebar","onConnectivityInfoOpen","onConnectivityInfoClose","onPathwaySelectionChanged","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","renderAtMounted","displayMinimap","showStarInLegend","flatmapAPI","sparcAPI"])),[[a.vShow,e.activeSpecies==h]])),128))],512)}const tUr=VB(Zjr,[["render",eUr],["__scopeId","data-v-c373f9aa"]]),rUr={name:"Flatmap",mixins:[rQ,Hwe],components:{FlatmapVuer:B1e,HelpModeDialog:nne},methods:{getState:function(){return this.$refs.flatmap.getState()},search:function(e){return this.$refs.flatmap.searchAndShowResult(e)},getFlatmapImp(){var e;return(e=this.$refs.flatmap)==null?void 0:e.mapImp},flatmaprResourceSelected:function(e,t){if(this.resourceSelected(e,t,this.$refs.flatmap.viewingMode==="Exploration"),t.eventType==="click"&&t.feature.type==="feature"){const r={label:t.label||"",id:t.feature.id||"",featureId:t.feature.featureId||"",taxonomy:t.taxonomy||"",resources:t.resource.join(", ")},n=lye(r);V1.sendEvent({event:"interaction_event",event_name:"portal_maps_connectivity",category:n,location:e+" "+this.$refs.flatmap.viewingMode})}},flatmapReadyCall:function(e){let t={id:this.entry.id,prov:this.getFlatmapImp().provenance};Yi.emit("mapImpProv",t),this.$emit("flatmap-provenance-ready",t),this.getAvailableTerms(),this.entry.resource==="FunctionalConnectivity"&&this.flatmapReadyForMarkerUpdates(e)},onPathwaySelectionChanged:function(e){const{label:t,property:r,checked:n,selectionsTitle:i}=e;V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pathway_change",category:t+" ["+r+"] "+n,location:i})},highlightFeatures:function(e){let t=e.name;const r=this.$refs.flatmap.mapImp;if(t){const n=r.search(t);n.featureIds[0]&&r.highlightFeatures([r.modelForFeature(n.featureIds[0])])}},searchSuggestions:function(e,t){e&&this.$refs.flatmap.mapImp&&this.$refs.flatmap.mapImp.search(e).__featureIds.forEach(n=>{const i=this.$refs.flatmap.mapImp.annotation(n);i&&i.label&&t.push(i.label)})},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.flatmap.mapImp;if(r){const i=n.search(r);if(i.featureIds.length){let o=n.modelForFeature(i.featureIds[0]);o?(t&&n.selectFeatures(o),n.zoomToFeatures(o)):n.clearSearchResults()}}else n.clearSearchResults()}},computed:{facetSpecies(){return this.settingsStore.facets.species}},mounted:function(){this.getAvailableTerms(),Yi.on("markerUpdate",()=>{this.flatmapMarkerUpdate(void 0)}),Yi.on("hoverUpdate",()=>{this.mapHoverHighlight(this.$refs.flatmap.mapImp)}),Yi.on("show-connectivity",e=>{const{featureIds:t,offset:r}=e,n=this.$refs.flatmap;n&&n.moveMap(t,{offsetX:r?-150:0,zoom:4})})}},nUr={class:"viewer-container"};function iUr(e,t,r,n,i,o){const s=a.resolveComponent("FlatmapVuer"),l=a.resolveComponent("HelpModeDialog");return a.openBlock(),a.createElementBlock("div",nUr,[a.createVNode(s,{state:e.entry.state,entry:e.entry.resource,onResourceSelected:t[0]||(t[0]=c=>o.flatmaprResourceSelected(e.entry.type,c)),onPanZoomCallback:e.flatmapPanZoomCallback,name:e.entry.resource,style:{height:"100%",width:"100%"},minZoom:e.entry.minZoom,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeInitialIndex:-1,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityInfoClose:e.onConnectivityInfoClose,connectivityInfoSidebar:e.connectivityInfoSidebar,pathControls:!0,ref:"flatmap",onReady:o.flatmapReadyCall,displayMinimap:!1,displayWarning:!0,enableOpenMapUI:!0,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onOpenMap:e.openMap,onPathwaySelectionChanged:o.onPathwaySelectionChanged},null,8,["state","entry","onPanZoomCallback","name","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","onConnectivityInfoOpen","onConnectivityInfoClose","connectivityInfoSidebar","onReady","flatmapAPI","sparcAPI","onOpenMap","onPathwaySelectionChanged"]),e.helpMode&&e.useHelpModeDialog?(a.openBlock(),a.createBlock(l,{key:0,ref:"flatmapHelp",flatmapRef:e.flatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,["flatmapRef","lastItem","onShowNext","onFinishHelpMode"])):a.createCommentVNode("",!0)])}const oUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(rUr,[["render",iUr],["__scopeId","data-v-54f19c88"]])},Symbol.toStringTag,{value:"Module"})),aUr={name:"Iframe",mixins:[rQ]},sUr={class:"map-iframe-container"},lUr=["src"];function cUr(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",sUr,[a.createElementVNode("iframe",{class:"my-iframe",src:e.entry.resource.share_link},null,8,lUr)])}const uUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(aUr,[["render",cUr],["__scopeId","data-v-60f8bfe1"]])},Symbol.toStringTag,{value:"Module"})),dUr='<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>',Kje=e=>{const t=[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}];switch(e){case"Human Male":case"Human Female":case"Rat":t.push({display:"Open Sync Map",key:"SYNC"});break}return t},hUr={name:"MultiFlatmap",mixins:[rQ,Hwe],components:{MultiFlatmapVuer:tUr,HelpModeDialog:nne},data:function(){return{zoomLevel:6,flatmapReady:!1,availableSpecies:sye(),scaffoldResource:{},showStarInLegend:!1,openMapOptions:Kje("Rat")}},methods:{toggleSyncMode:async function(){if(this.syncMode==!1){let e;this.activeSpecies==="Rat"?e={contextCard:void 0,discoverId:void 0,label:"Rat Body",resource:"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json",title:"View 3D scaffold",layout:"2horpanel",type:"SyncMap"}:(this.activeSpecies==="Human Male"||this.activeSpecies==="Human Female")&&("human"in this.scaffoldResource||(this.scaffoldResource.human=await s$(this.apiLocation,"human")),e={contextCardUrl:this.scaffoldResource.human.datasetInfo.contextCardUrl,discoverId:this.scaffoldResource.human.datasetInfo.discoverId,s3uri:this.scaffoldResource.human.datasetInfo.s3uri,version:this.scaffoldResource.human.datasetInfo.version,label:"Human Body",resource:this.scaffoldResource.human.url,title:"View 3D scaffold",layout:"2vertpanel",type:"SyncMap",isBodyScaffold:!0}),e&&Yi.emit("SyncModeRequest",{flag:!0,action:e})}else Yi.emit("SyncModeRequest",{flag:!1})},getState:function(){if(this.flatmapReady)return this.$refs.multiflatmap.getState()},flatmapPanZoomCallback:function(e){if(this.mouseHovered){const t={paneIndex:this.entry.id,eventType:"panZoom",payload:e,type:this.entry.type};this.$emit("resource-selected",t)}},search:function(e){return this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(e,!0)},searchSuggestions:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();e&&r.mapImp&&r.mapImp.search(e).__featureIds.forEach(i=>{const o=r.mapImp.annotation(i);o&&o.label&&t.push(o.label)})},flatmaprResourceSelected:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();if(this.resourceSelected(e,t,r.viewingMode==="Exploration"),t.eventType==="click"&&t.feature.type==="feature"){const n={label:t.label||"",id:t.feature.id||"",featureId:t.feature.featureId||"",taxonomy:t.taxonomy||"",resources:t.resource.join(", ")},i=lye(n);V1.sendEvent({event:"interaction_event",event_name:"portal_maps_connectivity",category:i,location:e+" "+r.viewingMode})}},onPathwaySelectionChanged:function(e){const{label:t,property:r,checked:n,selectionsTitle:i}=e;V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pathway_change",category:t+" ["+r+"] "+n,location:i})},onOpenPubmedUrl:function(e){V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pubmed_url",file_path:e,location:"map_popup_button"})},handleSyncPanZoomEvent:function(e){if(!this.mouseHovered&&e.type!==this.entry.type){const t=e.payload.zoom,r=e.payload.target,n=this.$el.clientHeight,i=this.$el.clientWidth,o=Math.max(i,n);let s=i/o/t;const l=n/o/t,c=[r[0]/2+.5-s/2,.5-r[1]/2-l/2];this.$refs.multiflatmap.getCurrentFlatmap().mapImp.panZoomTo(c,[s,l])}},displayTooltip:function(e){if(e){let t=e.name;t?this.search(t):this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(r){const i=n.search(r);i.featureIds.length>0?(t&&n.selectFeatures(i.featureIds),n.zoomToFeatures(i.featureIds)):n.clearSearchResults()}else n.clearSearchResults()},highlightFeatures:function(e){let t=e.name;const r=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(t){const n=r.search(t);n.featureIds.length>0&&r.zoomToFeatures(n.featureIds,{noZoomIn:!0})}},updateProvCard:function(){const e=this.getFlatmapImp();if(e){let t={id:this.entry.id,prov:e.provenance};this.$emit("flatmap-provenance-ready",t)}},flatmapChanged:async function(e){this.activeSpecies=e,this.openMapOptions=Kje(e),this.$emit("species-changed",e),this.entry.state&&this.entry.state.species===this.activeSpecies||this.syncMode==!0&&await this.toggleSyncMode(),this.updateProvCard(),this.onConnectivityInfoClose(),V1.sendEvent({event:"interaction_event",event_name:"portal_maps_species_change",category:this.activeSpecies})},multiFlatmapReady:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;const t=e.mapImp;this.flatmapMarkerUpdate(t),this.updateProvCard()}},getFlatmapImp:function(){if(this.entry.type==="MultiFlatmap"&&this.flatmapReady&&this.$refs.multiflatmap)return this.$refs.multiflatmap.getCurrentFlatmap().mapImp},flatmapAreaSearch(){let r={type:"Facets",label:"Unused",val:this.getFlatmapImp().visibleMarkerAnatomicalIds().map(n=>this.idNamePair[n])};Yi.emit("PopoverActionClick",r)},restoreFeaturedMarkers:function(e){this.settingsStore.resetFeaturedMarkerIdentifier();const t=this.settingsStore.featuredMarkers;this.updateFeaturedMarkers(t,e)},updateFeaturedMarkers:function(e,t){this.showStarInLegend=!1;for(let r=0;r<e.length;++r)e[r]&&(this.settingsStore.featuredMarkerIdentifiers[r]||this.addFeaturedMarker(e[r],r,t)&&(this.showStarInLegend=!0))},addFeaturedMarker:function(e,t,r){const n=this.settingsStore.featuredMarkerSpecies[t];if(n&&!this.activeSpecies.startsWith(n))return!1;let i=r;if(i||(i=this.getFlatmapImp()),i){let o=document.createElement("div");o.innerHTML=dUr;const s=i.addMarker(e,{element:o,className:"highlight-marker",cluster:!1});return this.settingsStore.updateFeaturedMarkerIdentifier({index:t,markerIdentifier:s}),!0}return!1}},computed:{facetSpecies(){return this.settingsStore.facets.species},featuredMarkers(){return this.settingsStore.featuredMarkers}},watch:{syncMode:function(e){this.$refs.multiflatmap.getCurrentFlatmap()&&this.$refs.multiflatmap.getCurrentFlatmap().enablePanZoomEvents(e)},featuredMarkers:function(e){this.flatmapReady&&this.updateFeaturedMarkers(e,void 0)}},mounted:function(){this.getAvailableTerms(),this.getFeaturedDatasets(),Yi.on("show-connectivity",e=>{const{featureIds:t,offset:r}=e;if(this.flatmapReady&&this.$refs.multiflatmap){const n=this.$refs.multiflatmap.getCurrentFlatmap();n&&n.moveMap(t,{offsetX:r?-150:0,zoom:4})}}),Yi.on("markerUpdate",()=>{this.flatmapReady&&this.flatmapMarkerUpdate(this.$refs.multiflatmap.getCurrentFlatmap().mapImp)}),Yi.on("hoverUpdate",()=>{this.flatmapReady&&this.mapHoverHighlight(this.$refs.multiflatmap.getCurrentFlatmap().mapImp)})}},pUr={class:"viewer-container"};function fUr(e,t,r,n,i,o){const s=a.resolveComponent("MultiFlatmapVuer"),l=a.resolveComponent("HelpModeDialog");return a.openBlock(),a.createElementBlock("div",pUr,[a.createVNode(s,{availableSpecies:e.availableSpecies,onFlatmapChanged:o.flatmapChanged,onReady:o.multiFlatmapReady,state:e.entry.state,onResourceSelected:t[0]||(t[0]=c=>o.flatmaprResourceSelected(e.entry.type,c)),style:{height:"100%",width:"100%"},initial:e.entry.resource,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityInfoClose:e.onConnectivityInfoClose,connectivityInfoSidebar:e.connectivityInfoSidebar,ref:"multiflatmap",displayMinimap:!0,showStarInLegend:e.showStarInLegend,enableOpenMapUI:!0,openMapOptions:e.openMapOptions,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onPanZoomCallback:o.flatmapPanZoomCallback,onOpenMap:e.openMap,onFinishHelpMode:e.endHelp,onPathwaySelectionChanged:o.onPathwaySelectionChanged,onOpenPubmedUrl:o.onOpenPubmedUrl},null,8,["availableSpecies","onFlatmapChanged","onReady","state","initial","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","onConnectivityInfoOpen","onConnectivityInfoClose","connectivityInfoSidebar","showStarInLegend","openMapOptions","flatmapAPI","sparcAPI","onPanZoomCallback","onOpenMap","onFinishHelpMode","onPathwaySelectionChanged","onOpenPubmedUrl"]),e.helpMode&&e.useHelpModeDialog?(a.openBlock(),a.createBlock(l,{key:0,ref:"multiflatmapHelp",multiflatmapRef:e.multiflatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,["multiflatmapRef","lastItem","onShowNext","onFinishHelpMode"])):a.createCommentVNode("",!0)])}const mUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(hUr,[["render",fUr],["__scopeId","data-v-089c8852"]])},Symbol.toStringTag,{value:"Module"}));function gUr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yje={exports:{}},sl=Yje.exports={},Rf,Nf;function F1e(){throw new Error("setTimeout has not been defined")}function D1e(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Rf=setTimeout:Rf=F1e}catch{Rf=F1e}try{typeof clearTimeout=="function"?Nf=clearTimeout:Nf=D1e}catch{Nf=D1e}})();function Jje(e){if(Rf===setTimeout)return setTimeout(e,0);if((Rf===F1e||!Rf)&&setTimeout)return Rf=setTimeout,setTimeout(e,0);try{return Rf(e,0)}catch{try{return Rf.call(null,e,0)}catch{return Rf.call(this,e,0)}}}function yUr(e){if(Nf===clearTimeout)return clearTimeout(e);if((Nf===D1e||!Nf)&&clearTimeout)return Nf=clearTimeout,clearTimeout(e);try{return Nf(e)}catch{try{return Nf.call(null,e)}catch{return Nf.call(this,e)}}}var d5=[],o_=!1,oT,GU=-1;function TUr(){!o_||!oT||(o_=!1,oT.length?d5=oT.concat(d5):GU=-1,d5.length&&$je())}function $je(){if(!o_){var e=Jje(TUr);o_=!0;for(var t=d5.length;t;){for(oT=d5,d5=[];++GU<t;)oT&&oT[GU].run();GU=-1,t=d5.length}oT=null,o_=!1,yUr(e)}}sl.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];d5.push(new eUe(e,t)),d5.length===1&&!o_&&Jje($je)};function eUe(e,t){this.fun=e,this.array=t}eUe.prototype.run=function(){this.fun.apply(null,this.array)},sl.title="browser",sl.browser=!0,sl.env={},sl.argv=[],sl.version="",sl.versions={};function h5(){}sl.on=h5,sl.addListener=h5,sl.once=h5,sl.off=h5,sl.removeListener=h5,sl.removeAllListeners=h5,sl.emit=h5,sl.prependListener=h5,sl.prependOnceListener=h5,sl.listeners=function(e){return[]},sl.binding=function(e){throw new Error("process.binding is not supported")},sl.cwd=function(){return"/"},sl.chdir=function(e){throw new Error("process.chdir is not supported")},sl.umask=function(){return 0};var vUr=Yje.exports;const a_=gUr(vUr),p5=(e,t,{checkForDefaultPrevented:r=!0}={})=>n=>{const i=e==null?void 0:e(n);if(r===!1||!i)return t==null?void 0:t(n)},s_=globalThis||void 0||self;var tUe;const W1=typeof window<"u",bUr=e=>typeof e=="string",rUe=()=>{},QUr=W1&&((tUe=window==null?void 0:window.navigator)==null?void 0:tUe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function nUe(e){return typeof e=="function"?e():a.unref(e)}function xUr(e){return e}function WU(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function _Ur(e,t=!0){a.getCurrentInstance()?a.onMounted(e):t?e():a.nextTick(e)}function f5(e){var t;const r=nUe(e);return(t=r==null?void 0:r.$el)!=null?t:r}const qU=W1?window:void 0;function aT(...e){let t,r,n,i;if(bUr(e[0])||Array.isArray(e[0])?([r,n,i]=e,t=qU):[t,r,n,i]=e,!t)return rUe;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const o=[],s=()=>{o.forEach(d=>d()),o.length=0},l=(d,h,p,f)=>(d.addEventListener(h,p,f),()=>d.removeEventListener(h,p,f)),c=a.watch(()=>[f5(t),nUe(i)],([d,h])=>{s(),d&&o.push(...r.flatMap(p=>n.map(f=>l(d,p,f,h))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return WU(u),u}let iUe=!1;function wUr(e,t,r={}){const{window:n=qU,ignore:i=[],capture:o=!0,detectIframe:s=!1}=r;if(!n)return;QUr&&!iUe&&(iUe=!0,Array.from(n.document.body.children).forEach(d=>d.addEventListener("click",rUe)));let l=!0;const c=d=>i.some(h=>{if(typeof h=="string")return Array.from(n.document.querySelectorAll(h)).some(p=>p===d.target||d.composedPath().includes(p));{const p=f5(h);return p&&(d.target===p||d.composedPath().includes(p))}}),u=[aT(n,"click",d=>{const h=f5(e);if(!(!h||h===d.target||d.composedPath().includes(h))){if(d.detail===0&&(l=!c(d)),!l){l=!0;return}t(d)}},{passive:!0,capture:o}),aT(n,"pointerdown",d=>{const h=f5(e);h&&(l=!d.composedPath().includes(h)&&!c(d))},{passive:!0}),s&&aT(n,"blur",d=>{var h;const p=f5(e);((h=n.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(d)})].filter(Boolean);return()=>u.forEach(d=>d())}function oUe(e,t=!1){const r=a.ref(),n=()=>r.value=!!e();return n(),_Ur(n,t),r}const z1e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof s_<"u"?s_:typeof self<"u"?self:{},j1e="__vueuse_ssr_handlers__";z1e[j1e]=z1e[j1e]||{},z1e[j1e];var aUe=Object.getOwnPropertySymbols,LUr=Object.prototype.hasOwnProperty,SUr=Object.prototype.propertyIsEnumerable,kUr=(e,t)=>{var r={};for(var n in e)LUr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&aUe)for(var n of aUe(e))t.indexOf(n)<0&&SUr.call(e,n)&&(r[n]=e[n]);return r};function m5(e,t,r={}){const n=r,{window:i=qU}=n,o=kUr(n,["window"]);let s;const l=oUe(()=>i&&"ResizeObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>f5(e),h=>{c(),l.value&&i&&h&&(s=new ResizeObserver(t),s.observe(h,o))},{immediate:!0,flush:"post"}),d=()=>{c(),u()};return WU(d),{isSupported:l,stop:d}}var sUe=Object.getOwnPropertySymbols,CUr=Object.prototype.hasOwnProperty,MUr=Object.prototype.propertyIsEnumerable,EUr=(e,t)=>{var r={};for(var n in e)CUr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sUe)for(var n of sUe(e))t.indexOf(n)<0&&MUr.call(e,n)&&(r[n]=e[n]);return r};function AUr(e,t,r={}){const n=r,{window:i=qU}=n,o=EUr(n,["window"]);let s;const l=oUe(()=>i&&"MutationObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>f5(e),h=>{c(),l.value&&i&&h&&(s=new MutationObserver(t),s.observe(h,o))},{immediate:!0}),d=()=>{c(),u()};return WU(d),{isSupported:l,stop:d}}var lUe;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(lUe||(lUe={}));var OUr=Object.defineProperty,cUe=Object.getOwnPropertySymbols,IUr=Object.prototype.hasOwnProperty,PUr=Object.prototype.propertyIsEnumerable,uUe=(e,t,r)=>t in e?OUr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VUr=(e,t)=>{for(var r in t||(t={}))IUr.call(t,r)&&uUe(e,r,t[r]);if(cUe)for(var r of cUe(t))PUr.call(t,r)&&uUe(e,r,t[r]);return e};VUr({linear:xUr},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const HUr=()=>W1&&/firefox/i.test(window.navigator.userAgent);a_.env.NODE_ENV!=="production"&&Object.freeze({}),a_.env.NODE_ENV!=="production"&&Object.freeze([]);const UA=()=>{},RUr=Object.prototype.hasOwnProperty,dUe=(e,t)=>RUr.call(e,t),Ud=Array.isArray,Gd=e=>typeof e=="function",Bf=e=>typeof e=="string",Wd=e=>e!==null&&typeof e=="object",NUr=Object.prototype.toString,BUr=e=>NUr.call(e),U1e=e=>BUr(e).slice(8,-1);var hUe=typeof s_=="object"&&s_&&s_.Object===Object&&s_,FUr=typeof self=="object"&&self&&self.Object===Object&&self,Ff=hUe||FUr||Function("return this")(),t7=Ff.Symbol,pUe=Object.prototype,DUr=pUe.hasOwnProperty,zUr=pUe.toString,GA=t7?t7.toStringTag:void 0;function jUr(e){var t=DUr.call(e,GA),r=e[GA];try{e[GA]=void 0;var n=!0}catch{}var i=zUr.call(e);return n&&(t?e[GA]=r:delete e[GA]),i}var UUr=Object.prototype,GUr=UUr.toString;function WUr(e){return GUr.call(e)}var qUr="[object Null]",ZUr="[object Undefined]",fUe=t7?t7.toStringTag:void 0;function l_(e){return e==null?e===void 0?ZUr:qUr:fUe&&fUe in Object(e)?jUr(e):WUr(e)}function c_(e){return e!=null&&typeof e=="object"}var XUr="[object Symbol]";function ZU(e){return typeof e=="symbol"||c_(e)&&l_(e)==XUr}function KUr(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Df=Array.isArray,YUr=1/0,mUe=t7?t7.prototype:void 0,gUe=mUe?mUe.toString:void 0;function yUe(e){if(typeof e=="string")return e;if(Df(e))return KUr(e,yUe)+"";if(ZU(e))return gUe?gUe.call(e):"";var t=e+"";return t=="0"&&1/e==-YUr?"-0":t}var JUr=/\s/;function $Ur(e){for(var t=e.length;t--&&JUr.test(e.charAt(t)););return t}var eGr=/^\s+/;function tGr(e){return e&&e.slice(0,$Ur(e)+1).replace(eGr,"")}function u_(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var TUe=NaN,rGr=/^[-+]0x[0-9a-f]+$/i,nGr=/^0b[01]+$/i,iGr=/^0o[0-7]+$/i,oGr=parseInt;function G1e(e){if(typeof e=="number")return e;if(ZU(e))return TUe;if(u_(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=u_(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=tGr(e);var r=nGr.test(e);return r||iGr.test(e)?oGr(e.slice(2),r?2:8):rGr.test(e)?TUe:+e}var vUe=1/0,aGr=17976931348623157e292;function sGr(e){if(!e)return e===0?e:0;if(e=G1e(e),e===vUe||e===-vUe){var t=e<0?-1:1;return t*aGr}return e===e?e:0}function lGr(e){var t=sGr(e),r=t%1;return t===t?r?t-r:t:0}function cGr(e){return e}var uGr="[object AsyncFunction]",dGr="[object Function]",hGr="[object GeneratorFunction]",pGr="[object Proxy]";function bUe(e){if(!u_(e))return!1;var t=l_(e);return t==dGr||t==hGr||t==uGr||t==pGr}var W1e=Ff["__core-js_shared__"],QUe=function(){var e=/[^.]+$/.exec(W1e&&W1e.keys&&W1e.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function fGr(e){return!!QUe&&QUe in e}var mGr=Function.prototype,gGr=mGr.toString;function sT(e){if(e!=null){try{return gGr.call(e)}catch{}try{return e+""}catch{}}return""}var yGr=/[\\^$.*+?()[\]{}|]/g,TGr=/^\[object .+?Constructor\]$/,vGr=Function.prototype,bGr=Object.prototype,QGr=vGr.toString,xGr=bGr.hasOwnProperty,_Gr=RegExp("^"+QGr.call(xGr).replace(yGr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wGr(e){if(!u_(e)||fGr(e))return!1;var t=bUe(e)?_Gr:TGr;return t.test(sT(e))}function LGr(e,t){return e==null?void 0:e[t]}function d_(e,t){var r=LGr(e,t);return wGr(r)?r:void 0}var q1e=d_(Ff,"WeakMap");function SGr(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var kGr=9007199254740991,CGr=/^(?:0|[1-9]\d*)$/;function xUe(e,t){var r=typeof e;return t=t??kGr,!!t&&(r=="number"||r!="symbol"&&CGr.test(e))&&e>-1&&e%1==0&&e<t}function _Ue(e,t){return e===t||e!==e&&t!==t}var MGr=9007199254740991;function Z1e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MGr}function EGr(e){return e!=null&&Z1e(e.length)&&!bUe(e)}var AGr=Object.prototype;function OGr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||AGr;return e===r}function IGr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var PGr="[object Arguments]";function wUe(e){return c_(e)&&l_(e)==PGr}var LUe=Object.prototype,VGr=LUe.hasOwnProperty,HGr=LUe.propertyIsEnumerable,SUe=wUe(function(){return arguments}())?wUe:function(e){return c_(e)&&VGr.call(e,"callee")&&!HGr.call(e,"callee")};function RGr(){return!1}var kUe=typeof Pn=="object"&&Pn&&!Pn.nodeType&&Pn,CUe=kUe&&typeof module=="object"&&module&&!module.nodeType&&module,NGr=CUe&&CUe.exports===kUe,MUe=NGr?Ff.Buffer:void 0,BGr=MUe?MUe.isBuffer:void 0,X1e=BGr||RGr,FGr="[object Arguments]",DGr="[object Array]",zGr="[object Boolean]",jGr="[object Date]",UGr="[object Error]",GGr="[object Function]",WGr="[object Map]",qGr="[object Number]",ZGr="[object Object]",XGr="[object RegExp]",KGr="[object Set]",YGr="[object String]",JGr="[object WeakMap]",$Gr="[object ArrayBuffer]",eWr="[object DataView]",tWr="[object Float32Array]",rWr="[object Float64Array]",nWr="[object Int8Array]",iWr="[object Int16Array]",oWr="[object Int32Array]",aWr="[object Uint8Array]",sWr="[object Uint8ClampedArray]",lWr="[object Uint16Array]",cWr="[object Uint32Array]",is={};is[tWr]=is[rWr]=is[nWr]=is[iWr]=is[oWr]=is[aWr]=is[sWr]=is[lWr]=is[cWr]=!0,is[FGr]=is[DGr]=is[$Gr]=is[zGr]=is[eWr]=is[jGr]=is[UGr]=is[GGr]=is[WGr]=is[qGr]=is[ZGr]=is[XGr]=is[KGr]=is[YGr]=is[JGr]=!1;function uWr(e){return c_(e)&&Z1e(e.length)&&!!is[l_(e)]}function dWr(e){return function(t){return e(t)}}var EUe=typeof Pn=="object"&&Pn&&!Pn.nodeType&&Pn,WA=EUe&&typeof module=="object"&&module&&!module.nodeType&&module,hWr=WA&&WA.exports===EUe,K1e=hWr&&hUe.process,AUe=function(){try{var e=WA&&WA.require&&WA.require("util").types;return e||K1e&&K1e.binding&&K1e.binding("util")}catch{}}(),OUe=AUe&&AUe.isTypedArray,IUe=OUe?dWr(OUe):uWr,pWr=Object.prototype,fWr=pWr.hasOwnProperty;function mWr(e,t){var r=Df(e),n=!r&&SUe(e),i=!r&&!n&&X1e(e),o=!r&&!n&&!i&&IUe(e),s=r||n||i||o,l=s?IGr(e.length,String):[],c=l.length;for(var u in e)(t||fWr.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||xUe(u,c)))&&l.push(u);return l}function gWr(e,t){return function(r){return e(t(r))}}var yWr=gWr(Object.keys,Object),TWr=Object.prototype,vWr=TWr.hasOwnProperty;function bWr(e){if(!OGr(e))return yWr(e);var t=[];for(var r in Object(e))vWr.call(e,r)&&r!="constructor"&&t.push(r);return t}function PUe(e){return EGr(e)?mWr(e):bWr(e)}var QWr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xWr=/^\w*$/;function Y1e(e,t){if(Df(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ZU(e)?!0:xWr.test(e)||!QWr.test(e)||t!=null&&e in Object(t)}var qA=d_(Object,"create");function _Wr(){this.__data__=qA?qA(null):{},this.size=0}function wWr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var LWr="__lodash_hash_undefined__",SWr=Object.prototype,kWr=SWr.hasOwnProperty;function CWr(e){var t=this.__data__;if(qA){var r=t[e];return r===LWr?void 0:r}return kWr.call(t,e)?t[e]:void 0}var MWr=Object.prototype,EWr=MWr.hasOwnProperty;function AWr(e){var t=this.__data__;return qA?t[e]!==void 0:EWr.call(t,e)}var OWr="__lodash_hash_undefined__";function IWr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=qA&&t===void 0?OWr:t,this}function lT(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}lT.prototype.clear=_Wr,lT.prototype.delete=wWr,lT.prototype.get=CWr,lT.prototype.has=AWr,lT.prototype.set=IWr;function PWr(){this.__data__=[],this.size=0}function XU(e,t){for(var r=e.length;r--;)if(_Ue(e[r][0],t))return r;return-1}var VWr=Array.prototype,HWr=VWr.splice;function RWr(e){var t=this.__data__,r=XU(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():HWr.call(t,r,1),--this.size,!0}function NWr(e){var t=this.__data__,r=XU(t,e);return r<0?void 0:t[r][1]}function BWr(e){return XU(this.__data__,e)>-1}function FWr(e,t){var r=this.__data__,n=XU(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function g5(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}g5.prototype.clear=PWr,g5.prototype.delete=RWr,g5.prototype.get=NWr,g5.prototype.has=BWr,g5.prototype.set=FWr;var ZA=d_(Ff,"Map");function DWr(){this.size=0,this.__data__={hash:new lT,map:new(ZA||g5),string:new lT}}function zWr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function KU(e,t){var r=e.__data__;return zWr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function jWr(e){var t=KU(this,e).delete(e);return this.size-=t?1:0,t}function UWr(e){return KU(this,e).get(e)}function GWr(e){return KU(this,e).has(e)}function WWr(e,t){var r=KU(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function y5(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}y5.prototype.clear=DWr,y5.prototype.delete=jWr,y5.prototype.get=UWr,y5.prototype.has=GWr,y5.prototype.set=WWr;var qWr="Expected a function";function J1e(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(qWr);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(J1e.Cache||y5),r}J1e.Cache=y5;var ZWr=500;function XWr(e){var t=J1e(e,function(n){return r.size===ZWr&&r.clear(),n}),r=t.cache;return t}var KWr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,YWr=/\\(\\)?/g,JWr=XWr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(KWr,function(r,n,i,o){t.push(i?o.replace(YWr,"$1"):n||r)}),t});function $Wr(e){return e==null?"":yUe(e)}function VUe(e,t){return Df(e)?e:Y1e(e,t)?[e]:JWr($Wr(e))}var eqr=1/0;function YU(e){if(typeof e=="string"||ZU(e))return e;var t=e+"";return t=="0"&&1/e==-eqr?"-0":t}function HUe(e,t){t=VUe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[YU(t[r++])];return r&&r==n?e:void 0}function T5(e,t,r){var n=e==null?void 0:HUe(e,t);return n===void 0?r:n}function tqr(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function RUe(){if(!arguments.length)return[];var e=arguments[0];return Df(e)?e:[e]}function rqr(){this.__data__=new g5,this.size=0}function nqr(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function iqr(e){return this.__data__.get(e)}function oqr(e){return this.__data__.has(e)}var aqr=200;function sqr(e,t){var r=this.__data__;if(r instanceof g5){var n=r.__data__;if(!ZA||n.length<aqr-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new y5(n)}return r.set(e,t),this.size=r.size,this}function v5(e){var t=this.__data__=new g5(e);this.size=t.size}v5.prototype.clear=rqr,v5.prototype.delete=nqr,v5.prototype.get=iqr,v5.prototype.has=oqr,v5.prototype.set=sqr;function lqr(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function cqr(){return[]}var uqr=Object.prototype,dqr=uqr.propertyIsEnumerable,NUe=Object.getOwnPropertySymbols,hqr=NUe?function(e){return e==null?[]:(e=Object(e),lqr(NUe(e),function(t){return dqr.call(e,t)}))}:cqr;const pqr=hqr;function fqr(e,t,r){var n=t(e);return Df(e)?n:tqr(n,r(e))}function BUe(e){return fqr(e,PUe,pqr)}var $1e=d_(Ff,"DataView"),eue=d_(Ff,"Promise"),tue=d_(Ff,"Set"),FUe="[object Map]",mqr="[object Object]",DUe="[object Promise]",zUe="[object Set]",jUe="[object WeakMap]",UUe="[object DataView]",gqr=sT($1e),yqr=sT(ZA),Tqr=sT(eue),vqr=sT(tue),bqr=sT(q1e),cT=l_;($1e&&cT(new $1e(new ArrayBuffer(1)))!=UUe||ZA&&cT(new ZA)!=FUe||eue&&cT(eue.resolve())!=DUe||tue&&cT(new tue)!=zUe||q1e&&cT(new q1e)!=jUe)&&(cT=function(e){var t=l_(e),r=t==mqr?e.constructor:void 0,n=r?sT(r):"";if(n)switch(n){case gqr:return UUe;case yqr:return FUe;case Tqr:return DUe;case vqr:return zUe;case bqr:return jUe}return t});const GUe=cT;var Qqr=Ff.Uint8Array;const WUe=Qqr;var xqr="__lodash_hash_undefined__";function _qr(e){return this.__data__.set(e,xqr),this}function wqr(e){return this.__data__.has(e)}function JU(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new y5;++t<r;)this.add(e[t])}JU.prototype.add=JU.prototype.push=_qr,JU.prototype.has=wqr;function Lqr(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Sqr(e,t){return e.has(t)}var kqr=1,Cqr=2;function qUe(e,t,r,n,i,o){var s=r&kqr,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,f=r&Cqr?new JU:void 0;for(o.set(e,t),o.set(t,e);++h<l;){var m=e[h],g=t[h];if(n)var T=s?n(g,m,h,t,e,o):n(m,g,h,e,t,o);if(T!==void 0){if(T)continue;p=!1;break}if(f){if(!Lqr(t,function(y,v){if(!Sqr(f,v)&&(m===y||i(m,y,r,n,o)))return f.push(v)})){p=!1;break}}else if(!(m===g||i(m,g,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function Mqr(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Eqr(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Aqr=1,Oqr=2,Iqr="[object Boolean]",Pqr="[object Date]",Vqr="[object Error]",Hqr="[object Map]",Rqr="[object Number]",Nqr="[object RegExp]",Bqr="[object Set]",Fqr="[object String]",Dqr="[object Symbol]",zqr="[object ArrayBuffer]",jqr="[object DataView]",ZUe=t7?t7.prototype:void 0,rue=ZUe?ZUe.valueOf:void 0;function Uqr(e,t,r,n,i,o,s){switch(r){case jqr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case zqr:return!(e.byteLength!=t.byteLength||!o(new WUe(e),new WUe(t)));case Iqr:case Pqr:case Rqr:return _Ue(+e,+t);case Vqr:return e.name==t.name&&e.message==t.message;case Nqr:case Fqr:return e==t+"";case Hqr:var l=Mqr;case Bqr:var c=n&Aqr;if(l||(l=Eqr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=Oqr,s.set(e,t);var d=qUe(l(e),l(t),n,i,o,s);return s.delete(e),d;case Dqr:if(rue)return rue.call(e)==rue.call(t)}return!1}var Gqr=1,Wqr=Object.prototype,qqr=Wqr.hasOwnProperty;function Zqr(e,t,r,n,i,o){var s=r&Gqr,l=BUe(e),c=l.length,u=BUe(t),d=u.length;if(c!=d&&!s)return!1;for(var h=c;h--;){var p=l[h];if(!(s?p in t:qqr.call(t,p)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var T=s;++h<c;){p=l[h];var y=e[p],v=t[p];if(n)var Q=s?n(v,y,p,t,e,o):n(y,v,p,e,t,o);if(!(Q===void 0?y===v||i(y,v,r,n,o):Q)){g=!1;break}T||(T=p=="constructor")}if(g&&!T){var _=e.constructor,L=t.constructor;_!=L&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof L=="function"&&L instanceof L)&&(g=!1)}return o.delete(e),o.delete(t),g}var Xqr=1,XUe="[object Arguments]",KUe="[object Array]",$U="[object Object]",Kqr=Object.prototype,YUe=Kqr.hasOwnProperty;function Yqr(e,t,r,n,i,o){var s=Df(e),l=Df(t),c=s?KUe:GUe(e),u=l?KUe:GUe(t);c=c==XUe?$U:c,u=u==XUe?$U:u;var d=c==$U,h=u==$U,p=c==u;if(p&&X1e(e)){if(!X1e(t))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new v5),s||IUe(e)?qUe(e,t,r,n,i,o):Uqr(e,t,c,r,n,i,o);if(!(r&Xqr)){var f=d&&YUe.call(e,"__wrapped__"),m=h&&YUe.call(t,"__wrapped__");if(f||m){var g=f?e.value():e,T=m?t.value():t;return o||(o=new v5),i(g,T,r,n,o)}}return p?(o||(o=new v5),Zqr(e,t,r,n,i,o)):!1}function eG(e,t,r,n,i){return e===t?!0:e==null||t==null||!c_(e)&&!c_(t)?e!==e&&t!==t:Yqr(e,t,r,n,eG,i)}var Jqr=1,$qr=2;function eZr(e,t,r,n){var i=r.length,o=i,s=!n;if(e==null)return!o;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){l=r[i];var c=l[0],u=e[c],d=l[1];if(s&&l[2]){if(u===void 0&&!(c in e))return!1}else{var h=new v5;if(n)var p=n(u,d,c,e,t,h);if(!(p===void 0?eG(d,u,Jqr|$qr,n,h):p))return!1}}return!0}function JUe(e){return e===e&&!u_(e)}function tZr(e){for(var t=PUe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,JUe(i)]}return t}function $Ue(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function rZr(e){var t=tZr(e);return t.length==1&&t[0][2]?$Ue(t[0][0],t[0][1]):function(r){return r===e||eZr(r,e,t)}}function nZr(e,t){return e!=null&&t in Object(e)}function iZr(e,t,r){t=VUe(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var s=YU(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&Z1e(i)&&xUe(s,i)&&(Df(e)||SUe(e)))}function oZr(e,t){return e!=null&&iZr(e,t,nZr)}var aZr=1,sZr=2;function lZr(e,t){return Y1e(e)&&JUe(t)?$Ue(YU(e),t):function(r){var n=T5(r,e);return n===void 0&&n===t?oZr(r,e):eG(t,n,aZr|sZr)}}function cZr(e){return function(t){return t==null?void 0:t[e]}}function uZr(e){return function(t){return HUe(t,e)}}function dZr(e){return Y1e(e)?cZr(YU(e)):uZr(e)}function hZr(e){return typeof e=="function"?e:e==null?cGr:typeof e=="object"?Df(e)?lZr(e[0],e[1]):rZr(e):dZr(e)}var nue=function(){return Ff.Date.now()},pZr="Expected a function",fZr=Math.max,mZr=Math.min;function gZr(e,t,r){var n,i,o,s,l,c,u=0,d=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(pZr);t=G1e(t)||0,u_(r)&&(d=!!r.leading,h="maxWait"in r,o=h?fZr(G1e(r.maxWait)||0,t):o,p="trailing"in r?!!r.trailing:p);function f(w){var S=n,C=i;return n=i=void 0,u=w,s=e.apply(C,S),s}function m(w){return u=w,l=setTimeout(y,t),d?f(w):s}function g(w){var S=w-c,C=w-u,E=t-S;return h?mZr(E,o-C):E}function T(w){var S=w-c,C=w-u;return c===void 0||S>=t||S<0||h&&C>=o}function y(){var w=nue();if(T(w))return v(w);l=setTimeout(y,g(w))}function v(w){return l=void 0,p&&n?f(w):(n=i=void 0,s)}function Q(){l!==void 0&&clearTimeout(l),u=0,n=c=i=l=void 0}function _(){return l===void 0?s:v(nue())}function L(){var w=nue(),S=T(w);if(n=arguments,i=this,c=w,S){if(l===void 0)return m(c);if(h)return clearTimeout(l),l=setTimeout(y,t),f(c)}return l===void 0&&(l=setTimeout(y,t)),s}return L.cancel=Q,L.flush=_,L}var yZr=Math.max,TZr=Math.min;function vZr(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=n-1;return r!==void 0&&(i=lGr(r),i=r<0?yZr(n+i,0):TZr(i,n-1)),SGr(e,hZr(t),i,!0)}function tG(e){for(var t=-1,r=e==null?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n}function XA(e,t){return eG(e,t)}function rG(e){return e==null}function bZr(e){return e===void 0}const eGe=e=>e===void 0,iue=e=>typeof e=="boolean",k0=e=>typeof e=="number",KA=e=>typeof Element>"u"?!1:e instanceof Element,QZr=e=>Bf(e)?!Number.isNaN(Number(e)):!1,xZr=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d");let tGe=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function _Zr(e,t){throw new tGe(`[${e}] ${t}`)}function qd(e,t){if(a_.env.NODE_ENV!=="production"){const r=Bf(e)?new tGe(`[${e}] ${t}`):e;console.warn(r)}}const wZr="utils/dom/style";function nG(e,t="px"){if(!e)return"";if(k0(e)||QZr(e))return`${e}${t}`;if(Bf(e))return e;qd(wZr,"binding value must be a string or number")}function LZr(e,t){if(!W1)return;if(!t){e.scrollTop=0;return}const r=[];let n=t.offsetParent;for(;n!==null&&e!==n&&e.contains(n);)r.push(n),n=n.offsetParent;const i=t.offsetTop+r.reduce((c,u)=>c+u.offsetTop,0),o=i+t.offsetHeight,s=e.scrollTop,l=s+e.clientHeight;i<s?e.scrollTop=i:o>l&&(e.scrollTop=o-e.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var SZr=a.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),kZr=SZr,CZr=a.defineComponent({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),MZr=CZr,EZr=a.defineComponent({name:"CircleCheck",__name:"circle-check",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),a.createElementVNode("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),AZr=EZr,OZr=a.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),oue=OZr,IZr=a.defineComponent({name:"Close",__name:"close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),rGe=IZr,PZr=a.defineComponent({name:"Hide",__name:"hide",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),a.createElementVNode("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),VZr=PZr,HZr=a.defineComponent({name:"Loading",__name:"loading",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),nGe=HZr,RZr=a.defineComponent({name:"View",__name:"view",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),NZr=RZr;const iGe="__epPropKey",$i=e=>e,BZr=e=>Wd(e)&&!!e[iGe],iG=(e,t)=>{if(!Wd(e)||BZr(e))return e;const{values:r,required:n,default:i,type:o,validator:s}=e,l={type:o,required:!!n,validator:r||s?c=>{let u=!1,d=[];if(r&&(d=Array.from(r),dUe(e,"default")&&d.push(i),u||(u=d.includes(c))),s&&(u||(u=s(c))),!u&&d.length>0){const h=[...new Set(d)].map(p=>JSON.stringify(p)).join(", ");a.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${h}], got value ${JSON.stringify(c)}.`)}return u}:void 0,[iGe]:!0};return dUe(e,"default")&&(l.default=i),l},Cs=e=>tG(Object.entries(e).map(([t,r])=>[t,iG(r,t)])),uT=$i([String,Object,Function]),oGe={validating:nGe,success:AZr,error:oue},zf=(e,t)=>{if(e.install=r=>{for(const n of[e,...Object.values(t??{})])r.component(n.name,n)},t)for(const[r,n]of Object.entries(t))e[r]=n;return e},FZr=(e,t)=>(e.install=r=>{r.directive(t,e)},e),oG=e=>(e.install=UA,e),YA={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},_2="update:modelValue",aG="change",aGe=["","default","small","large"],sGe=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),lGe=e=>e,DZr=["class","style"],zZr=/^on[A-Z]/,jZr=(e={})=>{const{excludeListeners:t=!1,excludeKeys:r}=e,n=a.computed(()=>((r==null?void 0:r.value)||[]).concat(DZr)),i=a.getCurrentInstance();return i?a.computed(()=>{var o;return tG(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([s])=>!n.value.includes(s)&&!(t&&zZr.test(s))))}):(qd("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),a.computed(()=>({})))},cGe=({from:e,replacement:t,scope:r,version:n,ref:i,type:o="API"},s)=>{a.watch(()=>a.unref(s),l=>{l&&qd(r,`[${o}] ${e} is about to be deprecated in version ${n}, please use ${t} instead.
3093
+ This will fail in production.`);l=zA,l._s.has(n)||(o?N1e(n,t,i,l):Wje(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const d=l._s.get(n);if(process.env.NODE_ENV!=="production"&&c){const h="__hot:"+n,p=o?N1e(h,t,i,l,!0):Wje(h,jd({},i),l,!0);c._hotUpdate(p),delete l.state.value[h],l._s.delete(h)}if(process.env.NODE_ENV!=="production"&&V1e){const h=a.getCurrentInstance();if(h&&h.proxy&&!c){const p=h.proxy,f="_pStores"in p?p._pStores:p._pStores={};f[n]=d}}return d}return s.$id=n,s}function Tjr(e,t){return Array.isArray(t)?t.reduce((r,n)=>(r[n]=function(){return e(this.$pinia)[n]},r),{}):Object.keys(t).reduce((r,n)=>(r[n]=function(){const i=e(this.$pinia),o=t[n];return typeof o=="function"?o.call(this,i):i[o]},r),{})}const vjr=yjr("main",{state:()=>({userProfile:{token:""}}),getters:{userToken(e){return e.userProfile.token}},actions:{setUserToken(e){this.userProfile.token=e}}}),bjr=e=>{let t={lng:0,lat:0},r;return e.type==="Polygon"?r=e.coordinates[0]:r=e.coordinates,e.type!=="Point"?(r.map(n=>{t.lng+=parseFloat(n[0]),t.lat+=parseFloat(n[1])}),t.lng=t.lng/r.length,t.lat=t.lat/r.length):(t.lng+=parseFloat(r[0]),t.lat+=parseFloat(r[1])),t},qje=(e,t)=>{const r=[];let n=e.organs?e.organs:e.ftus;const i=n?n.filter((o,s)=>n.findIndex(l=>l.label===o.label)===s):void 0;return i&&i.forEach(o=>{const s={label:o.label,models:o.models,key:`${t}.${o.label}`},l=qje(o,s.key);l.length>0&&(s.children=l),r.push(s)}),r},Qjr=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0}},xjr={name:"FlatmapVuer",components:{Button:GEe,Col:WC,Loading:Lpr,Radio:sAe,Icon:Cu,RadioGroup:lAe,Row:GC,Select:AB,Dialog:Bhr,MapSvgIcon:$S,MapSvgSpriteColor:PH,Tooltip:hCe,TreeControls:pCe,SelectionsGroup:bAe,SvgLegends:QAe,ElIconWarningFilled:_Me,ElIconArrowDown:_ne,ElIconArrowLeft:QMe,DrawToolbar:dCe},beforeCreate:function(){this.mapManager=void 0,this.mapImp=void 0,this.setStateRequired=!1},setup(e){return{annotator:a.markRaw(new djr(`${e.flatmapAPI}annotator`))}},methods:{initialiseDrawing:function(){this.connectionEntry={},this.activeDrawTool=void 0,this.activeDrawMode=void 0,this.drawnCreatedEvent={}},cancelDrawnFeature:function(){this.isValidDrawnCreated&&(this.closeTooltip(),this.annotationEntry={...this.drawnCreatedEvent.feature,resourceId:this.serverURL},this.rollbackAnnotationEvent(),this.initialiseDrawing())},connectedFeatureTooltip:function(e){if(this.mapImp)if(e){const t=Number(e);let r={feature:{}};if(t){const n=this.mapImp.featureProperties(t);r.feature=n}else{const n=this.existDrawnFeatures.find(i=>i.id===e.replace(" ",""));r.feature.feature=n}this.checkAndCreatePopups(r)}else this.closeTooltip()},confirmDrawnFeature:function(){this.isValidDrawnCreated&&(this.checkAndCreatePopups(this.drawnCreatedEvent),Object.keys(this.connectionEntry).length>0&&(this.annotationEntry.feature.connection=this.connectionEntry),this.initialiseDrawing())},toolbarEvent:function(e,t){if(this.closeTooltip(),this.doubleClickedFeature=!1,this.connectionEntry={},e==="mode")this.changeAnnotationDrawMode({mode:"simple_select"}),this.activeDrawMode=t,Object.keys(this.annotationEntry).length>0&&!this.featureAnnotationSubmitted&&this.rollbackAnnotationEvent();else if(e==="tool"){if(t){const r=t.replace(/[A-Z]/g,n=>`_${n.toLowerCase()}`);this.changeAnnotationDrawMode({mode:`draw${r}`}),this.initialiseDrawing()}else this.changeAnnotationDrawMode({mode:"simple_select"}),this.cancelDrawnFeature();this.activeDrawTool=t}},annotationDrawModeEvent:function(e){this.activeDrawMode==="Edit"&&this.doubleClickedFeature&&(e.feature.feature.geometry.type!=="Point"&&(this.changeAnnotationDrawMode({mode:"direct_select",options:{featureId:e.feature.feature.id}}),this.modifyAnnotationFeature()),this.doubleClickedFeature=!1),this.activeDrawMode==="Delete"&&(this.changeAnnotationDrawMode({mode:"simple_select",options:{featureIds:[e.feature.feature.id]}}),this.modifyAnnotationFeature())},createConnectivityBody:function(){if(Object.keys(this.connectionEntry).length>0){const e=Object.values(this.connectionEntry),t={type:"connectivity",source:e[0],target:e[e.length-1],intermediates:e.filter((r,n)=>n!==0&&n!==e.length-1)};this.annotationEntry.body=t}},changeAnnotationDrawMode:function(e){this.mapImp&&this.mapImp.changeAnnotationDrawMode(e)},clearAnnotationFeature:function(){this.mapImp&&this.existDrawnFeatures.length>0&&this.mapImp.clearAnnotationFeature()},modifyAnnotationFeature:function(){this.mapImp&&this.mapImp.removeAnnotationFeature()},rollbackAnnotationEvent:function(){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&(this.mapImp.rollbackAnnotationEvent(this.annotationEntry),this.annotationEntry={})},commitAnnotationEvent:function(e){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&e&&(this.featureAnnotationSubmitted=!0,this.mapImp.commitAnnotationEvent(this.annotationEntry),this.annotationEntry.type==="deleted"?(this.closeTooltip(),this.annotationEntry={}):this.addAnnotationFeature())},fetchAnnotatedItemIds:async function(e=void 0,t=void 0){let r=await this.annotator.annotatedItemIds(this.userToken,this.serverURL,e,t);return"resource"in r&&(r=r.itemIds),r},setFeatureAnnotated:async function(){if(this.mapImp){const e=await this.fetchAnnotatedItemIds();for(const t of e)this.mapImp.setFeatureAnnotated(t)}},fetchDrawnFeatures:async function(e,t){const r=await this.fetchAnnotatedItemIds(e,t);let n=await this.annotator.drawnFeatures(this.userToken,this.serverURL,r);return"resource"in n&&(n=n.features),this.drawnType!=="All tools"&&(n=n.filter(i=>i.geometry.type===this.drawnType)),n},addAnnotationFeature:async function(){if(this.mapImp&&(this.featureAnnotationSubmitted||this.clearAnnotationFeature(),this.drawnType!=="None")){this.featureAnnotationSubmitted||(this.loading=!0);const e=this.annotatedType==="Anyone"?void 0:this.userInformation.orcid?this.userInformation.orcid:"0000-0000-0000-0000",t=this.annotatedType==="Anyone"?void 0:this.annotatedType==="Me",r=await this.fetchDrawnFeatures(e,t);if(this.existDrawnFeatures=r,this.loading=!1,!this.featureAnnotationSubmitted)for(const n of r)this.mapImp.addAnnotationFeature(n)}},showAnnotator:function(e){this.mapImp&&(this.mapImp.showAnnotator(e),this.$el.querySelector(".maplibregl-ctrl-group").style.display="none")},setDrawnType:function(e){this.drawnType=e,this.mapImp&&(this.addAnnotationFeature(),this.initialiseDrawing())},setAnnotatedType:function(e){this.annotatedType=e,this.mapImp&&this.addAnnotationFeature()},setFlightPath3D:function(e){this.flightPath3DRadio=e,this.mapImp&&this.mapImp.enableFlightPaths(e)},viewLatestMap:function(){let e=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(e="PATO:0000384");const t={entry:this.entry,biologicalSex:e,viewport:this.mapImp.getState()};this.$emit("view-latest-map",t)},backgroundChangeCallback:function(e){this.currentBackground=e,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(e){if(this.systems.length=0,e&&e.length>0){const t={label:"All",key:"All",children:[]};e.forEach(r=>{const n={colour:r.colour,enabled:r.enabled,label:r.id,key:r.id},i=qje(r,n.key);i.length>0&&(n.children=i),t.children.push(n)}),this.systems.push(t)}},processTaxon:function(e,t){this.taxonConnectivity.length=0,t.forEach(r=>{xAe(e,r).then(n=>{const i={taxon:r,label:n};this.taxonConnectivity.push(i)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(e){this.colourRadio=e,this.mapImp&&this.mapImp.setColour({colour:e,outline:this.outlinesRadio})},setOutlines:function(e){this.outlineRadio=e,this.mapImp&&this.mapImp.setColour({colour:this.colourRadio,outline:e})},resetView:function(){this.mapImp&&(this.mapImp.resetMap(),this.$refs.centrelinesSelection&&this.$refs.centrelinesSelection.reset(),this.$refs.skcanSelection&&this.$refs.skcanSelection.reset(),this.$refs.layersSelection&&this.$refs.layersSelection.reset(),this.$refs.systemsSelection&&this.$refs.pathwaysSelection.reset(),this.$refs.pathwaysSelection&&this.$refs.pathwaysSelection.reset())},zoomIn:function(){this.mapImp&&this.mapImp.zoomIn()},zoomOut:function(){this.mapImp&&this.mapImp.zoomOut()},centreLinesSelected:function(e){this.mapImp&&this.mapImp.enableCentrelines(e.value)},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},sckanSelected:function(e){this.mapImp&&this.mapImp.enableSckanPath(e.key,e.value)},checkAllSCKAN:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableSckanPath(t,e.value))},highlightConnectedPaths:async function(e){var t,r;if(this.mapImp){let n=[...this.mapImp.pathModelNodes(e)].map(c=>this.mapImp.featureProperties(c)),i=await this.flatmapQueries.queryForConnectivity(e),o=(r=(t=i==null?void 0:i.ids)==null?void 0:t.dendrites)==null?void 0:r.flat().flat(),s=[],l=!1;n.forEach(c=>{this.mapImp.nodePathModels(c.featureId).forEach(u=>{l=!0,this.mapImp.pathModelNodes(u).forEach(d=>{let h=this.mapImp.featureProperties([d]);if(o.includes(h.models)){l=!1;return}}),l&&s.push(u)})}),this.mapImp.zoomToFeatures(s,{noZoomIn:!0})}},resetMapFilter:function(){const e=this.mapFilters.alert;let t;e.with?e.without||(t={HAS:"alert"}):e.without?t={NOT:{HAS:"alert"}}:t={AND:[{NOT:{HAS:"alert"}},{HAS:"alert"}]},t?this.mapImp.setVisibilityFilter(t):this.mapImp.clearVisibilityFilter()},alertMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){let t;e.key==="alert"?t={HAS:"alert"}:e.key==="withoutAlert"&&(t={NOT:{HAS:"alert"}}),this.mapImp.setVisibilityFilter(t)}else this.resetMapFilter()},alertSelected:function(e){this.mapImp&&(e.key==="alert"?e.value?this.mapFilters.alert.with=!0:this.mapFilters.alert.with=!1:e.key==="withoutAlert"&&(e.value?this.mapFilters.alert.without=!0:this.mapFilters.alert.without=!1),this.resetMapFilter())},checkAllAlerts:function(e){this.mapImp&&(e.value?(this.mapFilters.alert.without=!0,this.mapFilters.alert.with=!0):(this.mapFilters.alert.without=!1,this.mapFilters.alert.with=!1),this.resetMapFilter())},systemSelected:function(e){this.mapImp&&this.mapImp.enableSystem(e.key,e.value)},checkAllSystems:function(e){this.mapImp&&this.systems[0].children.forEach(t=>this.mapImp.enableSystem(t.label,e))},ftuSelected:function(e){this.searchAndShowResult(e,!0)},layersSelected:function(e){this.mapImp&&this.mapImp.enableLayer(e.key,e.value)},checkAllLayers:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableLayer(t,e.value))},taxonsSelected:function(e){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(e.key,e.value)},taxonMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){let t=this.mapImp.taxonFeatureIds(e.key);this.mapImp.enableConnectivityByTaxonIds(e.key,e.value),this.mapImp.zoomToGeoJSONFeatures(t,{noZoomIn:!0})}else this.mapImp.selectGeoJSONFeatures("-1"),e.selections.forEach(t=>{let r=e.checked.includes(t.taxon);this.mapImp.enableConnectivityByTaxonIds(t.taxon,r)})},checkAllTaxons:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableConnectivityByTaxonIds(t,e.value))},pathwaysSelected:function(e){this.mapImp&&this.mapImp.enablePath(e.key,e.value)},checkAllPathways:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enablePath(t,e.value))},enablePanZoomEvents:function(e){this.mapImp.enablePanZoomEvents(e)},annotationEventCallback:function(e,t){if(t.type==="aborted")this.featureAnnotationSubmitted?this.featureAnnotationSubmitted=!1:this.rollbackAnnotationEvent();else if(t.type==="modeChanged")t.feature.mode==="direct_select"&&(this.doubleClickedFeature=!0);else if(t.type==="selectionChanged"){if(this.selectedDrawnFeature=t.feature.features.length===0?void 0:t.feature.features[0],e.feature.feature=this.selectedDrawnFeature,!this.activeDrawTool&&(this.connectionEntry={},this.selectedDrawnFeature)){const r=this.existDrawnFeatures.find(n=>n.id===this.selectedDrawnFeature.id);r&&r.connection&&(this.connectionEntry=r.connection),this.annotationDrawModeEvent(e)}}else{if(t.type==="created"||t.type==="updated"){t.type==="updated"&&t.feature.action&&(t.positionUpdated=t.feature.action==="move");const r=this.mapImp.refreshAnnotationFeatureGeometry(t.feature);e.feature.feature=r}t.type==="created"?this.drawnCreatedEvent=e:this.checkAndCreatePopups(e)}},eventCallback:function(){return(e,t,...r)=>{if(e==="annotation"){const n={feature:t,userData:r,eventType:e};this.annotationEventCallback(n,t)}else if(e!=="pan-zoom"){const n=t.label,i=[t.models],o=this.entry,s=this.biologicalSex;let l;t.taxons&&(typeof t.taxons!="object"?l=JSON.parse(t.taxons):l=t.taxons);const c={dataset:t.dataset,biologicalSex:s,taxonomy:o,resource:i,label:n,feature:t,userData:r,eventType:e,provenanceTaxonomy:l};if(e==="click"){if(this.featuresAlert=t.alert,this.viewingMode==="Neuron Connection")this.highlightConnectedPaths([t.models]);else if(this.currentActive=t.models?t.models:"",this.activeDrawTool&&!this.isValidDrawnCreated){const u=t.featureId||this.existDrawnFeatures.find(d=>d.id===t.id);if(this.activeDrawTool==="LineString"&&u){const d=t.featureId?t.featureId:t.id,h=t.label?t.label:`Feature ${t.id}`;this.connectionEntry[` ${d}`]=Object.assign({label:h},Object.fromEntries(Object.entries(t).filter(([p])=>["featureId","models"].includes(p)).map(([p,f])=>[p==="featureId"?"id":p,f])))}}}else e==="mouseenter"&&this.viewingMode!=="Neuron Connection"&&(this.currentHover=t.models?t.models:"");t&&t.type!=="marker"&&e==="click"&&this.viewingMode!=="Neuron Connection"&&!this.activeDrawTool&&this.checkAndCreatePopups(c),this.$emit("resource-selected",c)}else this.$emit("pan-zoom-callback",t)}},changeViewingMode:function(e=null){e!==null&&(this.viewingModeIndex=e),this.closeTooltip()},checkAndCreatePopups:async function(e){if(this.viewingMode==="Annotation")e.feature?(this.annotationEntry={...e.feature,resourceId:this.serverURL},e.feature.featureId&&e.feature.models?this.displayTooltip(e.feature.models):e.feature.feature&&(this.activeDrawTool||this.activeDrawMode||Object.keys(this.connectionEntry).length>0?(this.featureAnnotationSubmitted=!1,this.annotationEntry.featureId=e.feature.feature.id,this.activeDrawTool&&this.createConnectivityBody(),this.displayTooltip(e.feature.feature.id,bjr(e.feature.feature.geometry))):this.rollbackAnnotationEvent())):this.annotation={};else{let t=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(e);(t[0]||t[1]||e.feature.hyperlinks&&e.feature.hyperlinks.length>0)&&(this.resourceForTooltip=e.resource[0],e.resourceForTooltip=this.resourceForTooltip,this.createTooltipFromNeuronCuration(e))}},popUpCssHacks:function(){const e=document.querySelector(".flatmap-tooltip-popup"),t=document.querySelector(".maplibregl-popup-close-button");e&&(e.style.display="none"),t.style.display="block",this.$refs.tooltip.$el.style.display="flex",t.onclick=()=>{this.$emit("connectivity-info-close"),e&&(e.style.display="block")}},closeTooltip:function(){this.$refs.tooltip.$el.style.display="none",document.querySelectorAll(".maplibregl-popup").forEach(e=>{e.style.display="none"})},createTooltipFromNeuronCuration:async function(e){this.tooltipEntry=await this.flatmapQueries.createTooltipData(e),this.displayTooltip(e.resource[0])},showPopup:function(e,t,r){let n=r;this.mapImp&&(n?n.className||(n.className="custom-popup"):n={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(e,t,n))},showMarkerPopup:function(e,t,r){this.mapImp&&this.mapImp.showMarkerPopup(e,t,r)},closeMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(e.classList.add("enlarge"),e.classList.remove("shrink")):(e.classList.add("shrink"),e.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");e&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),e.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(e){const t=this.hoverVisibilities.length,r=t-1,n=this.hoverVisibilities[this.helpModeActiveIndex];if(n){const i=n==null?void 0:n.refs,o=n==null?void 0:n.ref,s=this.$refs[i||o];if(s){const{parentElement:l,nextElementSibling:c}=s.$el,u=d=>d&&(d.classList.contains("pathway-container")||d.classList.contains("pathway-location"));(u(l)||u(c))&&(this.drawerOpen=!0)}else this.helpModeActiveIndex+=1}e||(this.helpModeActiveIndex=this.helpModeInitialIndex),this.viewingMode!=="Annotation"&&this.helpModeActiveIndex>9&&(this.helpModeActiveIndex=r),e&&this.helpModeActiveIndex>=r&&this.$emit("help-mode-last-item",!0),e&&!this.helpModeDialog?(this.inHelp=!0,this.hoverVisibilities.forEach(i=>{i.value=!0})):e&&this.helpModeDialog&&t>this.helpModeActiveIndex?this.helpModeActiveIndex>-1?(this.closeFlatmapHelpPopup(),setTimeout(()=>{this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.showTooltip(this.helpModeActiveIndex,200)},300)):this.helpModeActiveIndex===-1&&this.openFlatmapHelpPopup():(this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.closeFlatmapHelpPopup())},showTooltip:function(e,t=500){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!0,this.$emit("shown-tooltip")},t))},hideTooltip:function(e,t=500){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!1},t))},displayTooltip:function(e,t=void 0){let r,n={className:"flatmapvuer-popover"};t?(r=e,n.annotationFeatureGeometry=t):(r=this.mapImp.modelFeatureIds(e)[0],this.activeDrawTool||(n.positionAtLastClick=!0)),this.connectivityInfoSidebar&&this.hasTooltipEntry()&&this.viewingMode!=="Annotation"&&this.$emit("connectivity-info-open",this.tooltipEntry),!this.disableUI&&(this.viewingMode==="Annotation"||this.viewingMode==="Exploration"&&!this.connectivityInfoSidebar&&this.hasTooltipEntry())&&(this.tooltipDisplay=!0,this.$nextTick(()=>{this.mapImp.showPopup(r,this.$refs.tooltip.$el,n),this.popUpCssHacks()}))},hasTooltipEntry:function(){const{components:e,destinations:t,origins:r,provenanceTaxonomy:n,provenanceTaxonomyLabel:i}=this.tooltipEntry;return!!(e!=null&&e.length||t!=null&&t.length||r!=null&&r.length||n!=null&&n.length||i!=null&&i.length)},moveMap:function(e,t={}){if(this.mapImp){const{offsetX:r=0,offsetY:n=0,zoom:i=4}=t,o=this.mapImp._map,s=this.mapImp._bounds.toArray();this.mapImp.zoomToFeatures(e,{noZoomIn:!0}),this.showPathwaysDrawer(!1),s!=null&&s.length&&setTimeout(()=>{o.fitBounds(s,{offset:[r,n],zoom:i,animate:!0})})}},openFlatmapHelpPopup:function(){if(this.mapImp){let e=this.mapImp.modelFeatureIds("UBERON:0000948");e&&e.length>0&&(this.mapImp.showPopup(e[0],"Click for more information",{anchor:"top",className:"flatmap-popup-popper"}),this.$emit("shown-map-tooltip"))}},closeFlatmapHelpPopup:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(e=>{e.click()})},getLabels:function(){let e=[];if(this.mapImp){let t=this.mapImp.annotations;for(let r of t.values())r.label&&e.push(r.label);return Array.from(new Set(e))}},getState:function(){if(this.mapImp){let e={entry:this.entry,viewport:this.mapImp.getState()};const t=this.mapImp.getIdentifier();return this.biologicalSex?e.biologicalSex=this.biologicalSex:t&&t.biologicalSex&&(e.biologicalSex=t.biologicalSex),t&&t.uuid&&(e.uuid=t.uuid),e}},setState:function(e){e&&(this.mapImp&&e.entry&&this.entry==e.entry&&(!e.biologicalSex||e.biologicalSex===this.biologicalSex)?e.viewport&&this.mapImp.setState(e.viewport):this.createFlatmap(e),this.setStateRequired=!1)},restoreMapState:function(e){e&&(e.viewport&&this.mapImp.setState(e.viewport),e.searchTerm&&this.searchAndShowResult(e.searchTerm,!0))},setFlightPathInfo:function(e){(e===1.6||e>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!1))},createFlatmap:function(e){if(!this.mapImp&&!this.loading){this.loading=!0;let t=!1;this.displayMinimap&&(t={position:"top-right"});let r={taxon:this.entry};this.uuid&&(r.uuid=this.uuid),e?e.uuid?r={uuid:e.uuid}:e.entry&&(r.taxon=e.entry,e.biologicalSex?r.biologicalSex=e.biologicalSex:r.taxon==="NCBITaxon:9606"&&(r.biologicalSex="PATO:0000384")):this.biologicalSex&&(r.biologicalSex=this.biologicalSex),this.mapManager.loadMap(r,this.$refs.display,this.eventCallback(),{minZoom:this.minZoom,tooltips:this.tooltips,minimap:t}).then(n=>{this.mapImp=n,this.serverURL=this.mapImp.makeServerUrl("").slice(0,-1);let i=this.mapImp.details.version;this.setFlightPathInfo(i),this.onFlatmapReady(),this._stateToBeSet?this.restoreMapState(this._stateToBeSet):this.restoreMapState(e)})}else e&&(this._stateToBeSet={viewport:e.viewport,searchTerm:e.searchTerm},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const e=this.$refs.display;if(e){const t=getComputedStyle(e),r=parseInt(t.paddingTop)+parseInt(t.paddingBottom),n=e.clientHeight-r;this.pathwaysMaxHeight=n-170}},mapResize:function(){try{this.computePathControlsMaximumHeight(),this.mapImp&&(this.mapImp.resize(),this.showMinimap(this.displayMinimap),this.mapImp._minimap&&this.mapImp._minimap._miniMap.resize())}catch{console.error("Map resize error")}},onFlatmapReady:function(){this.sensor=new Gpr(this.$refs.display,this.mapResize),this.mapImp.options&&this.mapImp.options.style==="functional"&&(this.isFC=!0),this.mapImp.setBackgroundOpacity(1),this.backgroundChangeCallback(this.currentBackground),this.pathways=this.mapImp.pathTypes(),this.mapImp.enableCentrelines(!1),this.processSystems(this.mapImp.getSystems()),this.processTaxon(this.flatmapAPI,this.mapImp.taxonIdentifiers),this.containsAlert="alert"in this.mapImp.featureFilterRanges(),this.addResizeButtonToMinimap(),this.loading=!1,this.computePathControlsMaximumHeight(),this.drawerOpen=!0,this.mapResize(),this.handleMapClick(),this.$emit("ready",this)},handleMapClick:function(){const e=this.mapImp._map;e&&e.on("click",t=>{this.tooltipEntry.featureId&&this.$emit("connectivity-info-close")})},showMinimap:function(e){this.mapImp&&this.mapImp.showMinimap(e)},showPathwaysDrawer:function(e){this.drawerOpen=e},searchAndShowResult:function(e,t){if(this.mapImp){if(e===void 0||e==="")return this.mapImp.clearSearchResults(),!0;{const r=this.mapImp.search(e);if(r&&r.results&&r.results.length>0){if(this.mapImp.showSearchResults(r),t&&r.results[0].featureId&&r.results[0].text){const n=this.mapImp.annotation(r.results[0].featureId);this.mapImp.showPopup(r.results[0].featureId,n.label,{className:"custom-popup",positionAtLastClick:!1,preserveSelection:!0})}return!0}else this.mapImp.clearSearchResults()}}return!1},searchSuggestions:function(e){return this.mapImp?this.mapImp.search(e):[]}},props:{entry:{type:String,required:!0},uuid:String,biologicalSex:{type:String,default:""},minZoom:{type:Number,default:4},tooltips:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},helpModeInitialIndex:{type:Number,default:0},renderAtMounted:{type:Boolean,default:!0},displayMinimap:{type:Boolean,default:!1},displayWarning:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array,default:function(){return[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}]}},showStarInLegend:{type:Boolean,default:!1},isLegacy:{type:Boolean,default:!1},displayLatestChanges:{type:Boolean,default:!1},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1}},provide(){return{flatmapAPI:this.flatmapAPI,sparcAPI:this.sparcAPI,$annotator:this.annotator,getFeaturesAlert:()=>this.featuresAlert,userApiKey:this.userToken}},data:function(){return{annotationEntry:{},tooltipDisplay:!1,serverURL:void 0,layers:[],pathways:[],sckanDisplay:[{label:"Display Path with SCKAN",key:"VALID"}],centreLines:[{label:"Display Nerves",key:"centrelines",enabled:!1}],systems:[],taxonConnectivity:[],pathwaysMaxHeight:1e3,hoverVisibilities:[{value:!1,ref:"markerPopover"},{value:!1,ref:"zoomInPopover"},{value:!1,ref:"zoomOutPopover"},{value:!1,ref:"zoomFitPopover"},{value:!1,ref:"openMapPopover"},{value:!1,ref:"settingsPopover"},{value:!1,ref:"checkBoxPopover"},{value:!1,ref:"warningPopover"},{value:!1,ref:"whatsNewPopover"},{value:!1,ref:"featuredMarkerPopover"},{value:!1,refs:"toolbarPopover",ref:"editPopover"},{value:!1,refs:"toolbarPopover",ref:"deletePopover"},{value:!1,refs:"toolbarPopover",ref:"pointPopover"},{value:!1,refs:"toolbarPopover",ref:"lineStringPopover"},{value:!1,refs:"toolbarPopover",ref:"polygonPopover"},{value:!1,refs:"toolbarPopover",ref:"connectionPopover"}],helpModeActiveIndex:this.helpModeInitialIndex,yellowstar:jpr,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:Dpr,tooltipEntry:Qjr(),connectivityTooltipVisible:!1,drawerOpen:!1,featuresAlert:void 0,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",selectedDrawnFeature:void 0,currentHover:"",viewingModeIndex:0,viewingModes:{0:{name:"Exploration",description:"Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources"},1:{name:"Neuron Connection",description:"Discover Neuron connections by selecting a neuron and viewing its associated network connections"},2:{name:"Annotation",description:"View internal identifiers of features"}},drawnType:"All tools",drawnTypes:["All tools","Point","LineString","Polygon","None"],annotatedType:"Anyone",annotatedTypes:["Anyone","Me","Others"],openMapRef:void 0,backgroundIconRef:void 0,toolbarOptions:["Edit","Delete","Point","LineString","Polygon","Connection"],annotator:void 0,userInformation:void 0,activeDrawMode:void 0,activeDrawTool:void 0,featureAnnotationSubmitted:!1,drawnCreatedEvent:{},connectionEntry:{},existDrawnFeatures:[],doubleClickedFeature:!1,containsAlert:!1,alertOptions:[{label:"Display Path With Alerts",key:"alert",enabled:!0},{label:"Display Path Without Alerts",key:"withoutAlert",enabled:!0}],mapFilters:a.markRaw({alert:{with:!0,without:!0}})}},computed:{...Tjr(vjr,["userToken"]),isValidDrawnCreated:function(){return Object.keys(this.drawnCreatedEvent).length>0},viewingMode:function(){return this.viewingModes[this.viewingModeIndex].name}},watch:{entry:function(){this.state||this.createFlatmap()},helpMode:function(e,t){e!==t&&this.setHelpMode(e)},helpModeActiveItem:function(){this.helpMode&&(this.helpModeActiveIndex+=1,this.setHelpMode(this.helpMode))},state:{handler:function(e,t){e!==t&&(this.mapManager?this.setState(e):this.setStateRequired=!0)},immediate:!0,deep:!0},viewingMode:function(e){e==="Annotation"?(this.loading=!0,this.annotator.authenticate(this.userToken).then(t=>{t.name&&t.email&&(this.showAnnotator(!0),this.userInformation=t,this.setFeatureAnnotated(),this.existDrawnFeatures.length===0&&this.addAnnotationFeature()),this.loading=!1})):this.showAnnotator(!1)},disableUI:function(e){e&&this.closeTooltip()}},mounted:function(){this.openMapRef=a.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=a.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait=[],this.tooltipWait.length=this.hoverVisibilities.length,this.mapManager=new A1e(this.flatmapAPI),this.flatmapQueries=new zpr,this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap()}},Cp=e=>(a.pushScopeId("data-v-fceca72a"),e=e(),a.popScopeId(),e),_jr={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},wjr={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},Ljr={style:{height:"100%",width:"100%"},ref:"display"},Sjr={class:"beta-popovers"},kjr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),Cjr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),Mjr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),Ejr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),Ajr=Cp(()=>a.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),Ojr={key:1,class:"warning-text"},Ijr=Cp(()=>a.createElementVNode("span",{class:"warning-text"},"What's new?",-1)),Pjr=Cp(()=>a.createElementVNode("b",null,"Neuron Connection mode",-1)),Vjr=Cp(()=>a.createElementVNode("p",null," You can now view the network of neurons connected to a selected neuron. This mode is located in the settings at the bottom right. Once discovery mode is on, click on a neuron to see its connections. ",-1)),Hjr=Cp(()=>a.createElementVNode("b",null,"Now can display up to 6 panes",-1)),Rjr=Cp(()=>a.createElementVNode("p",null," You can now display up to 6 panes in the flatmap. This allows you to compare between different datasets and/or different views of the same dataset. ",-1)),Njr={class:"bottom-right-control"},Bjr=Cp(()=>a.createElementVNode("div",null,[a.createTextVNode(" Fit to "),a.createElementVNode("br"),a.createTextVNode(" window ")],-1)),Fjr=["innerHTML"],Djr=["innerHTML"],zjr={style:{"margin-bottom":"2px"}},jjr={key:0,class:"viewing-mode-title"},Ujr=["onClick"],Gjr=["onClick"];function Wjr(e,t,r,n,i,o){const s=a.resolveComponent("map-svg-sprite-color"),l=_Me,c=Cu,u=OB,d=_ne,h=a.resolveComponent("DrawToolbar"),p=a.resolveComponent("map-svg-icon"),f=QAe,m=a.resolveComponent("tree-controls"),g=bAe,T=QMe,y=GEe,v=GC,Q=WC,_=aie,L=AB,w=sAe,S=lAe,C=a.resolveComponent("Tooltip"),E=yAe,O=lie;return a.withDirectives((a.openBlock(),a.createElementBlock("div",_jr,[a.createVNode(s),a.createElementVNode("div",wjr,[a.createElementVNode("div",Ljr,null,512),a.withDirectives(a.createElementVNode("div",Sjr,[a.createElementVNode("div",null,[a.createVNode(u,{placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:e.hoverVisibilities[7].value,ref:"warningPopover"},{reference:a.withCtx(()=>[r.displayWarning?(a.openBlock(),a.createElementBlock("div",{key:0,class:"warning-icon",onMouseover:t[7]||(t[7]=I=>o.showTooltip(6)),onMouseout:t[8]||(t[8]=I=>o.hideTooltip(6))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),r.isLegacy?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Ajr,a.createElementVNode("div",{class:"latest-map-text",onClick:t[6]||(t[6]=(...I)=>o.viewLatestMap&&o.viewLatestMap(...I))}," Click here for the latest map ")],64)):(a.openBlock(),a.createElementBlock("span",Ojr,"Beta"))],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[r.isLegacy?(a.openBlock(),a.createElementBlock("p",{key:0,onMouseover:t[0]||(t[0]=I=>o.showTooltip(7)),onMouseout:t[1]||(t[1]=I=>o.hideTooltip(7))}," This is a legacy map, you may view the latest map instead. ",32)):e.isFC?(a.openBlock(),a.createElementBlock("p",{key:1,onMouseover:t[2]||(t[2]=I=>o.showTooltip(7)),onMouseout:t[3]||(t[3]=I=>o.hideTooltip(7))},[a.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),kjr,a.createTextVNode(" models available in "),Cjr,a.createTextVNode(". ")],32)):(a.openBlock(),a.createElementBlock("p",{key:2,onMouseover:t[4]||(t[4]=I=>o.showTooltip(6)),onMouseout:t[5]||(t[5]=I=>o.hideTooltip(6))},[a.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),Mjr,a.createTextVNode(" models available in "),Ejr,a.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")],32))]),_:1},8,["visible"])]),r.displayLatestChanges?(a.openBlock(),a.createBlock(u,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:e.hoverVisibilities[8].value,ref:"whatsNewPopover"},{reference:a.withCtx(()=>[r.displayLatestChanges?(a.openBlock(),a.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:t[9]||(t[9]=I=>o.showTooltip(8)),onMouseout:t[10]||(t[10]=I=>o.hideTooltip(8))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),Ijr],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[Pjr,Vjr,Hjr,Rjr]),_:1},8,["visible"])):a.createCommentVNode("",!0)],512),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(c,{class:a.normalizeClass(["minimap-resize",{enlarge:e.minimapSmall,shrink:!e.minimapSmall}]),ref:"minimapResize",onClick:o.closeMinimap},{default:a.withCtx(()=>[a.createVNode(d)]),_:1},8,["class","onClick"]),[[a.vShow,e.minimapResizeShow]]),o.viewingMode==="Annotation"&&e.userInformation&&!r.disableUI?(a.openBlock(),a.createBlock(h,{key:0,mapCanvas:{containerHTML:this.$el,class:".maplibregl-canvas"},toolbarOptions:e.toolbarOptions,drawnType:e.drawnType,activeDrawTool:e.activeDrawTool,activeDrawMode:e.activeDrawMode,newlyDrawnEntry:e.drawnCreatedEvent,connectionEntry:e.connectionEntry,hoverVisibilities:e.hoverVisibilities,onClickToolbar:o.toolbarEvent,onFeatureTooltip:o.connectedFeatureTooltip,onConfirmDrawn:o.confirmDrawnFeature,onCancelDrawn:o.cancelDrawnFeature,onShowTooltip:o.showTooltip,onHideTooltip:o.hideTooltip,ref:"toolbarPopover"},null,8,["mapCanvas","toolbarOptions","drawnType","activeDrawTool","activeDrawMode","newlyDrawnEntry","connectionEntry","hoverVisibilities","onClickToolbar","onFeatureTooltip","onConfirmDrawn","onCancelDrawn","onShowTooltip","onHideTooltip"])):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",Njr,[a.createVNode(u,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[1].value,ref:"zoomInPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"zoomIn",class:"icon-button zoomIn",onClick:t[11]||(t[11]=I=>o.zoomIn()),onMouseover:t[12]||(t[12]=I=>o.showTooltip(1)),onMouseout:t[13]||(t[13]=I=>o.hideTooltip(1))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[2].value,ref:"zoomOutPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"zoomOut",class:"icon-button zoomOut",onClick:t[14]||(t[14]=I=>o.zoomOut()),onMouseover:t[15]||(t[15]=I=>o.showTooltip(2)),onMouseout:t[16]||(t[16]=I=>o.hideTooltip(2))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[3].value,ref:"zoomFitPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"fitWindow",class:"icon-button fitWindow",onClick:t[17]||(t[17]=I=>o.resetView()),onMouseover:t[18]||(t[18]=I=>o.showTooltip(3)),onMouseout:t[19]||(t[19]=I=>o.hideTooltip(3))})]),default:a.withCtx(()=>[Bjr]),_:1},8,["visible"])],512),[[a.vShow,!r.disableUI]]),a.createVNode(u,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual",offset:-18,"popper-class":"flatmap-popper",visible:e.hoverVisibilities[6].value,ref:"checkBoxPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["pathway-location",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["pathway-container",{open:e.drawerOpen,close:!e.drawerOpen}]),style:a.normalizeStyle({"max-height":e.pathwaysMaxHeight+"px"})},[e.isFC?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(f,{key:0,class:"svg-legends-container"})),r.showStarInLegend?(a.openBlock(),a.createBlock(u,{key:1,content:"Location of the featured dataset",placement:"right",teleported:!0,trigger:"manual",width:"max-content",offset:-10,"popper-class":"flatmap-popper flatmap-teleport-popper",visible:e.hoverVisibilities[9].value,ref:"featuredMarkerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"yellow-star-legend",innerHTML:e.yellowstar,onMouseover:t[20]||(t[20]=I=>o.showTooltip(9)),onMouseout:t[21]||(t[21]=I=>o.hideTooltip(9))},null,40,Fjr),[[E,void 0,"featuredMarkerPopover"]])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(u,{content:"Find these markers for data. The number inside the markers is the number of datasets available for each marker.",placement:"right",teleported:!1,width:"200",trigger:"manual","popper-class":"flatmap-popper flatmap-marker-popper",visible:e.hoverVisibilities[5].value,ref:"markerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:e.flatmapMarker},null,8,Djr),[[a.vShow,e.hoverVisibilities[0].value],[E,void 0,"markerPopover"]])]),_:1},8,["visible"]),e.isFC&&e.systems&&e.systems.length>0?(a.openBlock(),a.createBlock(m,{key:2,class:"treeControls",mapType:"flatmap",title:"Systems",treeData:e.systems,active:e.currentActive,hover:e.currentHover,onCheckChanged:o.systemSelected,onCheckAll:o.checkAllSystems,onChangeActive:o.ftuSelected,ref:"treeControls"},null,8,["treeData","active","hover","onCheckChanged","onCheckAll","onChangeActive"])):a.createCommentVNode("",!0),e.containsAlert&&e.alertOptions?(a.openBlock(),a.createBlock(g,{title:"Alert",labelKey:"label",identifierKey:"key",selections:e.alertOptions,onChanged:o.alertSelected,onCheckboxMouseEnter:o.alertMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllAlerts,ref:"alertSelection",key:"alertSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),e.pathways&&e.pathways.length>0?(a.openBlock(),a.createBlock(g,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:e.pathways,onChanged:o.pathwaysSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","onChanged","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),!e.isFC&&e.taxonConnectivity&&e.taxonConnectivity.length>0?(a.openBlock(),a.createBlock(g,{title:"Studied in",labelKey:"label",identifierKey:"taxon",helpMessage:"Evidence exists that this set of neuron populations have been studied in the given species.",selections:e.taxonConnectivity,onChanged:o.taxonsSelected,onCheckboxMouseEnter:o.taxonMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),!e.isFC&&e.centreLines&&e.centreLines.length>0?(a.openBlock(),a.createBlock(g,{title:"Nerves",labelKey:"label",identifierKey:"key",selections:e.centreLines,onChanged:o.centreLinesSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,ref:"centrelinesSelection",key:"centrelinesSelection"},null,8,["selections","onChanged","onSelectionsDataChanged"])):a.createCommentVNode("",!0)],6)),[[E,void 0,"checkBoxPopover"]]),a.createElementVNode("div",{onClick:t[22]||(t[22]=(...I)=>o.toggleDrawer&&o.toggleDrawer(...I)),class:a.normalizeClass(["drawer-button",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(T)]),_:1})],2)],2),[[a.vShow,!r.disableUI]])]),_:1},8,["visible"]),e.openMapRef?(a.openBlock(),a.createBlock(u,{key:1,ref:"open-map-popover","virtual-ref":e.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.openMapOptions,I=>(a.openBlock(),a.createBlock(v,{key:I.key},{default:a.withCtx(()=>[a.createVNode(y,{type:"primary",plain:"",onClick:R=>e.$emit("open-map",I.key)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):a.createCommentVNode("",!0),a.createVNode(u,{ref:"backgroundPopover","virtual-ref":e.backgroundIconRef,placement:"top-start",width:"320",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Viewing Mode")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createElementVNode("div",zjr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.viewingModes,(I,R)=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:I+R},[I.name===o.viewingMode?(a.openBlock(),a.createElementBlock("span",jjr,[a.createElementVNode("b",null,a.toDisplayString(I.name),1)])):(a.openBlock(),a.createElementBlock("span",{key:1,class:"viewing-mode-unselected",onClick:B=>o.changeViewingMode(R)},a.toDisplayString(I.name),9,Ujr))],64))),128))]),a.createVNode(v,{class:"viewing-mode-description"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e.viewingModes[e.viewingModeIndex].description),1)]),_:1})]),_:1}),o.viewingMode==="Annotation"&&e.userInformation?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Drawn By*")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(L,{teleported:!1,modelValue:e.drawnType,"onUpdate:modelValue":t[23]||(t[23]=I=>e.drawnType=I),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setDrawnType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.drawnTypes,I=>(a.openBlock(),a.createBlock(_,{key:I,label:I,value:I},{default:a.withCtx(()=>[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(Q,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Annotated By*")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(L,{teleported:!1,modelValue:e.annotatedType,"onUpdate:modelValue":t[24]||(t[24]=I=>e.annotatedType=I),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setAnnotatedType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.annotatedTypes,I=>(a.openBlock(),a.createBlock(_,{key:I,label:I,value:I},{default:a.withCtx(()=>[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(Q,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})],64)):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:1,class:"backgroundSpacer"})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:2,class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Flight path display")]),_:1})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:3,class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.flightPath3DRadio,"onUpdate:modelValue":t[25]||(t[25]=I=>e.flightPath3DRadio=I),class:"flatmap-radio",onChange:o.setFlightPath3D},{default:a.withCtx(()=>[a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("2D")]),_:1}),a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):a.createCommentVNode("",!0),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Organs display")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.colourRadio,"onUpdate:modelValue":t[26]||(t[26]=I=>e.colourRadio=I),class:"flatmap-radio",onChange:o.setColour},{default:a.withCtx(()=>[a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Colour")]),_:1}),a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Greyscale")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Outlines display")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.outlinesRadio,"onUpdate:modelValue":t[27]||(t[27]=I=>e.outlinesRadio=I),class:"flatmap-radio",onChange:o.setOutlines},{default:a.withCtx(()=>[a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Show")]),_:1}),a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Change background")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.availableBackground,I=>(a.openBlock(),a.createElementBlock("div",{key:I,class:a.normalizeClass(["backgroundChoice",I,I==e.currentBackground?"active":""]),onClick:R=>o.backgroundChangeCallback(I)},null,10,Gjr))),128))]),_:1})])]),_:1},8,["virtual-ref"]),a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["settings-group",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(u,{visible:e.hoverVisibilities[4].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper",ref:"openMapPopover"},{reference:a.withCtx(()=>[r.enableOpenMapUI&&r.openMapOptions.length>0?(a.openBlock(),a.createBlock(p,{key:0,ref:"openMapRef",icon:"openMap",class:"icon-button open-map-button",onMouseover:t[28]||(t[28]=I=>o.showTooltip(4)),onMouseout:t[29]||(t[29]=I=>o.hideTooltip(4))},null,512)):a.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1}),a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(u,{content:"Change settings",placement:"right",visible:e.hoverVisibilities[5].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper",ref:"settingsPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{ref:"backgroundIconRef",icon:"changeBckgd",class:"icon-button",onMouseover:t[30]||(t[30]=I=>o.showTooltip(5)),onMouseout:t[31]||(t[31]=I=>o.hideTooltip(5))},null,512)]),_:1},8,["visible"])]),_:1})],2),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(C,{ref:"tooltip",class:"tooltip",annotationEntry:e.annotationEntry,tooltipEntry:e.tooltipEntry,annotationDisplay:o.viewingMode==="Annotation",onAnnotation:o.commitAnnotationEvent},null,8,["annotationEntry","tooltipEntry","annotationDisplay","onAnnotation"]),[[a.vShow,e.tooltipDisplay]])])])),[[O,e.loading]])}const B1e=VB(xjr,[["render",Wjr],["__scopeId","data-v-fceca72a"]]);function qjr(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const Zje=new qjr,Xje={"NCBITaxon:10114":"01fedbf9-d783-509c-a10c-827941ab13da","NCBITaxon:9823":"a336ac04-24db-561f-a25f-1c994fe17410","NCBITaxon:9606":"42ed6323-f645-5fbe-bada-9581819cf689","NCBITaxon:10090":"25285fab-48a0-5620-a6a0-f9a0374837d5","NCBITaxon:9685":"73060497-46a6-52bf-b975-cac511c127cb"},Zjr={name:"MultiFlatmapVuer",components:{Col:WC,Row:GC,Option:aie,Select:AB,Popover:OB,FlatmapVuer:B1e},beforeMount(){this._resolveList=[],this._initialised=!1},mounted:function(){this.initialise(),Zje.on("onActionClick",e=>{this.resourceSelected(e)}),Zje.on("open-pubmed-url",e=>{this.$emit("open-pubmed-url",e)})},methods:{initialise:function(){return new Promise(e=>{this.requireInitialisation?(this.requireInitialisation=!1,fetch(this.flatmapAPI).then(t=>t.json()).then(t=>{Object.keys(this.availableSpecies).forEach(n=>{const i=this.availableSpecies[n].uuid;if(i&&t.map(o=>o.uuid).indexOf(i)>0)this.speciesList[n]=a.reactive(this.availableSpecies[n]);else for(let o=0;o<t.length;o++)if(this.availableSpecies[n].taxo===t[o].taxon)if(this.availableSpecies[n].biologicalSex){if(t[o].biologicalSex&&t[o].biologicalSex===this.availableSpecies[n].biologicalSex){this.speciesList[n]=a.reactive(this.availableSpecies[n]);break}}else{this.speciesList[n]=a.reactive(this.availableSpecies[n]);break}});let r=this.initial;if(this.state){const n=this.state.state;(!n||!n.uuid&&!n.entry)&&this.state.species?r=this.state.species:r=void 0}r&&(r&&this.speciesList[r]!==void 0?this.activeSpecies=r:this.activeSpecies=Object.keys(this.speciesList)[0],this.setSpecies(this.activeSpecies,this.state?this.state.state:void 0,5)),this._initialised=!0,e(),this._resolveList.forEach(n=>{n()})})):this._initialised?e():this._resolveList.push(e)})},resourceSelected:function(e){this.$emit("resource-selected",e)},FlatmapReady:function(e){this.$emit("ready",e)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(e){this.$emit("pan-zoom-callback",e)},onConnectivityInfoClose:function(){this.$emit("connectivity-info-close")},onConnectivityInfoOpen:function(e){this.$emit("connectivity-info-open",e)},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},showPopup:function(e,t,r){this.getCurrentFlatmap().showPopup(e,t,r)},showMarkerPopup:function(e,t,r){this.getCurrentFlatmap().showMarkerPopup(e,t,r)},setSpecies:function(e,t,r){if(this.$refs&&e in this.$refs)this.activeSpecies=e,this.$refs[this.activeSpecies][0].createFlatmap(t),this.$emit("flatmapChanged",this.activeSpecies);else if(r){const n=r-1;n>=0&&this.$nextTick(()=>{this.setSpecies(e,t,n)})}},viewLatestMap:function(e){const t=Object.keys(this.speciesList);for(let r=0;r<t.length;r++){const n=this.speciesList[t[r]];if(!n.isLegacy&&n.taxo===e.entry&&n.biologicalSex===e.biologicalSex){this.setSpecies(t[r],e,0);return}}},createLegacyEntry:function(e,t,r){if(r&&t){let n="Legacy";return e.species&&(e.species.slice(0,6)==="Legacy"?n=e.species:n=n+` ${e.species}`),this.speciesList[n]=a.reactive({taxo:t,isLegacy:!0,displayWarning:!0}),{species:n,state:{entry:t,uuid:r,viewport:e.state.viewport,searchTerm:e.state.searchTerm}}}},updateState:function(e){return new Promise(t=>{if(e&&e.state){const r=e.state;if(r.uuid){if(r.entry)return new Promise(()=>{const n=new A1e(this.flatmapAPI),i={taxon:r.entry};r.biologicalSex&&(i.biologicalSex=r.biologicalSex),n.findMap_(i).then(o=>{if(o.uuid!==r.uuid)return this.createLegacyEntry(e,r.entry,r.uuid)}).then(o=>{t(o||e)}).catch(()=>{t(e)})})}else if(r.entry){const n=r.entry in Xje?Xje[r.entry]:void 0,i=this.createLegacyEntry(e,r.entry,n);t(i||e)}}t(e)})},getState:function(){let e={species:this.activeSpecies,state:void 0},t=this.getCurrentFlatmap();return e.state=t.getState(),e},setState:function(e){e&&this.updateState(e).then(t=>{this.initialise().then(()=>{t.species&&t.species!==this.activeSpecies?this.setSpecies(t.species,t.state,5):t.state&&this.getCurrentFlatmap().setState(t.state)})})},activateTooltipByIndex:function(e){return e===this.helpModeActiveItem&&this.helpMode},onHelpModeLastItem:function(e){e&&this.$emit("help-mode-last-item",!0)},onTooltipShown:function(){this.$emit("shown-tooltip")},onMapTooltipShown:function(){this.$emit("shown-map-tooltip")}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:4},renderAtMounted:{type:Boolean,default:!1},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},displayMinimap:{type:Boolean,default:!1},showStarInLegend:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array},availableSpecies:{type:Object,default:function(){return{"Human Female":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000383",iconClass:"mapicon-icon_human",displayWarning:!0},"Human Male":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000384",iconClass:"mapicon-icon_human",displayWarning:!0},Rat:{taxo:"NCBITaxon:10114",iconClass:"mapicon-icon_rat",displayLatestChanges:!0},Mouse:{taxo:"NCBITaxon:10090",iconClass:"mapicon-icon_mouse",displayWarning:!0},Pig:{taxo:"NCBITaxon:9823",iconClass:"mapicon-icon_pig",displayWarning:!0},Cat:{taxo:"NCBITaxon:9685",iconClass:"mapicon-icon_cat",displayWarning:!0}}}},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1}},data:function(){return{activeSpecies:void 0,speciesList:{},requireInitialisation:!0}},watch:{state:{handler:function(e){this.setState(e)},immediate:!0,deep:!0}}},Xjr=e=>(a.pushScopeId("data-v-c373f9aa"),e=e(),a.popScopeId(),e),Kjr={class:"multi-container",ref:"multiContainer"},Yjr={key:0,style:{position:"absolute","z-index":"10"}},Jjr=Xjr(()=>a.createElementVNode("div",{class:"species-display-text"},"Species",-1)),$jr={class:"select-box-icon"};function eUr(e,t,r,n,i,o){const s=aie,l=AB,c=OB,u=B1e;return a.openBlock(),a.createElementBlock("div",Kjr,[r.disableUI?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",Yjr,[Jjr,a.createVNode(c,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper flatmap-teleport-popper right-popper",width:"max-content",visible:o.activateTooltipByIndex(0),teleported:!1,ref:"selectPopover"},{reference:a.withCtx(()=>[a.createVNode(l,{id:"flatmap-select",teleported:!1,modelValue:e.activeSpecies,"onUpdate:modelValue":t[0]||(t[0]=d=>e.activeSpecies=d),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:o.setSpecies},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>(a.openBlock(),a.createBlock(s,{key:h,label:h,value:h},{default:a.withCtx(()=>[a.createElementVNode("span",$jr,[a.createElementVNode("i",{class:a.normalizeClass(d.iconClass)},null,2)]),a.createTextVNode(" "+a.toDisplayString(h),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>a.withDirectives((a.openBlock(),a.createBlock(u,{key:h,entry:d.taxo,uuid:d.uuid,biologicalSex:d.biologicalSex,displayWarning:d.displayWarning,displayLatestChanges:d.displayLatestChanges,isLegacy:d.isLegacy,ref_for:!0,ref:h,enableOpenMapUI:r.enableOpenMapUI,openMapOptions:r.openMapOptions,disableUI:r.disableUI,onViewLatestMap:o.viewLatestMap,onResourceSelected:o.resourceSelected,onReady:o.FlatmapReady,onPanZoomCallback:o.panZoomCallback,connectivityInfoSidebar:r.connectivityInfoSidebar,onConnectivityInfoOpen:o.onConnectivityInfoOpen,onConnectivityInfoClose:o.onConnectivityInfoClose,onOpenMap:t[1]||(t[1]=p=>e.$emit("open-map",p)),onPathwaySelectionChanged:o.onSelectionsDataChanged,minZoom:r.minZoom,helpMode:e.activeSpecies==h&&r.helpMode,helpModeActiveItem:r.helpModeActiveItem,helpModeDialog:r.helpModeDialog,helpModeInitialIndex:-2,onHelpModeLastItem:o.onHelpModeLastItem,onShownTooltip:o.onTooltipShown,onShownMapTooltip:o.onMapTooltipShown,renderAtMounted:r.renderAtMounted,displayMinimap:r.displayMinimap,showStarInLegend:r.showStarInLegend,style:{height:"100%"},flatmapAPI:r.flatmapAPI,sparcAPI:r.sparcAPI},null,8,["entry","uuid","biologicalSex","displayWarning","displayLatestChanges","isLegacy","enableOpenMapUI","openMapOptions","disableUI","onViewLatestMap","onResourceSelected","onReady","onPanZoomCallback","connectivityInfoSidebar","onConnectivityInfoOpen","onConnectivityInfoClose","onPathwaySelectionChanged","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","renderAtMounted","displayMinimap","showStarInLegend","flatmapAPI","sparcAPI"])),[[a.vShow,e.activeSpecies==h]])),128))],512)}const tUr=VB(Zjr,[["render",eUr],["__scopeId","data-v-c373f9aa"]]),rUr={name:"Flatmap",mixins:[rQ,Hwe],components:{FlatmapVuer:B1e,HelpModeDialog:nne},methods:{getState:function(){return this.$refs.flatmap.getState()},search:function(e){return this.$refs.flatmap.searchAndShowResult(e)},getFlatmapImp(){var e;return(e=this.$refs.flatmap)==null?void 0:e.mapImp},flatmaprResourceSelected:function(e,t){if(this.resourceSelected(e,t,this.$refs.flatmap.viewingMode==="Exploration"),t.eventType==="click"&&t.feature.type==="feature"){const r={label:t.label||"",id:t.feature.id||"",featureId:t.feature.featureId||"",taxonomy:t.taxonomy||"",resources:t.resource.join(", ")},n=lye(r);V1.sendEvent({event:"interaction_event",event_name:"portal_maps_connectivity",category:n,location:e+" "+this.$refs.flatmap.viewingMode})}},flatmapReadyCall:function(e){let t={id:this.entry.id,prov:this.getFlatmapImp().provenance};Yi.emit("mapImpProv",t),this.$emit("flatmap-provenance-ready",t),this.getAvailableTerms(),this.entry.resource==="FunctionalConnectivity"&&this.flatmapReadyForMarkerUpdates(e)},onPathwaySelectionChanged:function(e){const{label:t,property:r,checked:n,selectionsTitle:i}=e;V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pathway_change",category:t+" ["+r+"] "+n,location:i})},highlightFeatures:function(e){let t=e.name;const r=this.$refs.flatmap.mapImp;if(t){const n=r.search(t);n.featureIds[0]&&r.highlightFeatures([r.modelForFeature(n.featureIds[0])])}},searchSuggestions:function(e,t){e&&this.$refs.flatmap.mapImp&&this.$refs.flatmap.mapImp.search(e).__featureIds.forEach(n=>{const i=this.$refs.flatmap.mapImp.annotation(n);i&&i.label&&t.push(i.label)})},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.flatmap.mapImp;if(r){const i=n.search(r);if(i.featureIds.length){let o=n.modelForFeature(i.featureIds[0]);o?(t&&n.selectFeatures(o),n.zoomToFeatures(o)):n.clearSearchResults()}}else n.clearSearchResults()}},computed:{facetSpecies(){return this.settingsStore.facets.species}},mounted:function(){this.getAvailableTerms(),Yi.on("markerUpdate",()=>{this.flatmapMarkerUpdate(void 0)}),Yi.on("hoverUpdate",()=>{this.mapHoverHighlight(this.$refs.flatmap.mapImp)}),Yi.on("show-connectivity",e=>{const{featureIds:t,offset:r}=e,n=this.$refs.flatmap;n&&n.moveMap(t,{offsetX:r?-150:0,zoom:4})})}},nUr={class:"viewer-container"};function iUr(e,t,r,n,i,o){const s=a.resolveComponent("FlatmapVuer"),l=a.resolveComponent("HelpModeDialog");return a.openBlock(),a.createElementBlock("div",nUr,[a.createVNode(s,{state:e.entry.state,entry:e.entry.resource,onResourceSelected:t[0]||(t[0]=c=>o.flatmaprResourceSelected(e.entry.type,c)),onPanZoomCallback:e.flatmapPanZoomCallback,name:e.entry.resource,style:{height:"100%",width:"100%"},minZoom:e.entry.minZoom,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeInitialIndex:-1,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityInfoClose:e.onConnectivityInfoClose,connectivityInfoSidebar:e.connectivityInfoSidebar,pathControls:!0,ref:"flatmap",onReady:o.flatmapReadyCall,displayMinimap:!1,displayWarning:!0,enableOpenMapUI:!0,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onOpenMap:e.openMap,onPathwaySelectionChanged:o.onPathwaySelectionChanged},null,8,["state","entry","onPanZoomCallback","name","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","onConnectivityInfoOpen","onConnectivityInfoClose","connectivityInfoSidebar","onReady","flatmapAPI","sparcAPI","onOpenMap","onPathwaySelectionChanged"]),e.helpMode&&e.useHelpModeDialog?(a.openBlock(),a.createBlock(l,{key:0,ref:"flatmapHelp",flatmapRef:e.flatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,["flatmapRef","lastItem","onShowNext","onFinishHelpMode"])):a.createCommentVNode("",!0)])}const oUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(rUr,[["render",iUr],["__scopeId","data-v-54f19c88"]])},Symbol.toStringTag,{value:"Module"})),aUr={name:"Iframe",mixins:[rQ]},sUr={class:"map-iframe-container"},lUr=["src"];function cUr(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",sUr,[a.createElementVNode("iframe",{class:"my-iframe",src:e.entry.resource.share_link},null,8,lUr)])}const uUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(aUr,[["render",cUr],["__scopeId","data-v-60f8bfe1"]])},Symbol.toStringTag,{value:"Module"})),dUr='<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>',Kje=e=>{const t=[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}];switch(e){case"Human Male":case"Human Female":case"Rat":t.push({display:"Open Sync Map",key:"SYNC"});break}return t},hUr={name:"MultiFlatmap",mixins:[rQ,Hwe],components:{MultiFlatmapVuer:tUr,HelpModeDialog:nne},data:function(){return{zoomLevel:6,flatmapReady:!1,availableSpecies:sye(),scaffoldResource:{},showStarInLegend:!1,openMapOptions:Kje("Rat")}},methods:{toggleSyncMode:async function(){if(this.syncMode==!1){let e;this.activeSpecies==="Rat"?e={contextCard:void 0,discoverId:void 0,label:"Rat Body",resource:"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json",title:"View 3D scaffold",layout:"2horpanel",type:"SyncMap"}:(this.activeSpecies==="Human Male"||this.activeSpecies==="Human Female")&&("human"in this.scaffoldResource||(this.scaffoldResource.human=await s$(this.apiLocation,"human")),e={contextCardUrl:this.scaffoldResource.human.datasetInfo.contextCardUrl,discoverId:this.scaffoldResource.human.datasetInfo.discoverId,s3uri:this.scaffoldResource.human.datasetInfo.s3uri,version:this.scaffoldResource.human.datasetInfo.version,label:"Human Body",resource:this.scaffoldResource.human.url,title:"View 3D scaffold",layout:"2vertpanel",type:"SyncMap",isBodyScaffold:!0}),e&&Yi.emit("SyncModeRequest",{flag:!0,action:e})}else Yi.emit("SyncModeRequest",{flag:!1})},getState:function(){if(this.flatmapReady)return this.$refs.multiflatmap.getState()},flatmapPanZoomCallback:function(e){if(this.mouseHovered){const t={paneIndex:this.entry.id,eventType:"panZoom",payload:e,type:this.entry.type};this.$emit("resource-selected",t)}},search:function(e){return this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(e,!0)},searchSuggestions:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();e&&r.mapImp&&r.mapImp.search(e).__featureIds.forEach(i=>{const o=r.mapImp.annotation(i);o&&o.label&&t.push(o.label)})},flatmaprResourceSelected:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();if(this.resourceSelected(e,t,r.viewingMode==="Exploration"),t.eventType==="click"&&t.feature.type==="feature"){const n={label:t.label||"",id:t.feature.id||"",featureId:t.feature.featureId||"",taxonomy:t.taxonomy||"",resources:t.resource.join(", ")},i=lye(n);V1.sendEvent({event:"interaction_event",event_name:"portal_maps_connectivity",category:i,location:e+" "+r.viewingMode})}},onPathwaySelectionChanged:function(e){const{label:t,property:r,checked:n,selectionsTitle:i}=e;V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pathway_change",category:t+" ["+r+"] "+n,location:i})},onOpenPubmedUrl:function(e){V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pubmed_url",file_path:e,location:"map_popup_button"})},handleSyncPanZoomEvent:function(e){if(!this.mouseHovered&&e.type!==this.entry.type){const t=e.payload.zoom,r=e.payload.target,n=this.$el.clientHeight,i=this.$el.clientWidth,o=Math.max(i,n);let s=i/o/t;const l=n/o/t,c=[r[0]/2+.5-s/2,.5-r[1]/2-l/2];this.$refs.multiflatmap.getCurrentFlatmap().mapImp.panZoomTo(c,[s,l])}},displayTooltip:function(e){if(e){let t=e.name;t?this.search(t):this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(r){const i=n.search(r);i.featureIds.length>0?(t&&n.selectFeatures(i.featureIds),n.zoomToFeatures(i.featureIds)):n.clearSearchResults()}else n.clearSearchResults()},highlightFeatures:function(e){let t=e.name;const r=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(t){const n=r.search(t);n.featureIds.length>0&&r.zoomToFeatures(n.featureIds,{noZoomIn:!0})}},updateProvCard:function(){const e=this.getFlatmapImp();if(e){let t={id:this.entry.id,prov:e.provenance};this.$emit("flatmap-provenance-ready",t)}},flatmapChanged:async function(e){this.activeSpecies=e,this.openMapOptions=Kje(e),this.$emit("species-changed",e),this.entry.state&&this.entry.state.species===this.activeSpecies||this.syncMode==!0&&await this.toggleSyncMode(),this.updateProvCard(),this.onConnectivityInfoClose(),V1.sendEvent({event:"interaction_event",event_name:"portal_maps_species_change",category:this.activeSpecies})},multiFlatmapReady:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;const t=e.mapImp;this.flatmapMarkerUpdate(t),this.updateProvCard()}},getFlatmapImp:function(){if(this.entry.type==="MultiFlatmap"&&this.flatmapReady&&this.$refs.multiflatmap)return this.$refs.multiflatmap.getCurrentFlatmap().mapImp},flatmapAreaSearch(){let r={type:"Facets",label:"Unused",val:this.getFlatmapImp().visibleMarkerAnatomicalIds().map(n=>this.idNamePair[n])};Yi.emit("PopoverActionClick",r)},restoreFeaturedMarkers:function(e){this.settingsStore.resetFeaturedMarkerIdentifier();const t=this.settingsStore.featuredMarkers;this.updateFeaturedMarkers(t,e)},updateFeaturedMarkers:function(e,t){this.showStarInLegend=!1;for(let r=0;r<e.length;++r)e[r]&&(this.settingsStore.featuredMarkerIdentifiers[r]||this.addFeaturedMarker(e[r],r,t)&&(this.showStarInLegend=!0))},addFeaturedMarker:function(e,t,r){const n=this.settingsStore.featuredMarkerSpecies[t];if(n&&!this.activeSpecies.startsWith(n))return!1;let i=r;if(i||(i=this.getFlatmapImp()),i){let o=document.createElement("div");o.innerHTML=dUr;const s=i.addMarker(e,{element:o,className:"highlight-marker",cluster:!1});return this.settingsStore.updateFeaturedMarkerIdentifier({index:t,markerIdentifier:s}),!0}return!1}},computed:{facetSpecies(){return this.settingsStore.facets.species},featuredMarkers(){return this.settingsStore.featuredMarkers}},watch:{syncMode:function(e){this.$refs.multiflatmap.getCurrentFlatmap()&&this.$refs.multiflatmap.getCurrentFlatmap().enablePanZoomEvents(e)},featuredMarkers:function(e){this.flatmapReady&&this.updateFeaturedMarkers(e,void 0)}},mounted:function(){this.getAvailableTerms(),this.getFeaturedDatasets(),Yi.on("show-connectivity",e=>{const{featureIds:t,offset:r}=e;if(this.flatmapReady&&this.$refs.multiflatmap){const n=this.$refs.multiflatmap.getCurrentFlatmap();n&&n.moveMap(t,{offsetX:r?-150:0,zoom:4})}}),Yi.on("markerUpdate",()=>{this.flatmapReady&&this.flatmapMarkerUpdate(this.$refs.multiflatmap.getCurrentFlatmap().mapImp)}),Yi.on("hoverUpdate",()=>{this.flatmapReady&&this.mapHoverHighlight(this.$refs.multiflatmap.getCurrentFlatmap().mapImp)})}},pUr={class:"viewer-container"};function fUr(e,t,r,n,i,o){const s=a.resolveComponent("MultiFlatmapVuer"),l=a.resolveComponent("HelpModeDialog");return a.openBlock(),a.createElementBlock("div",pUr,[a.createVNode(s,{availableSpecies:e.availableSpecies,onFlatmapChanged:o.flatmapChanged,onReady:o.multiFlatmapReady,state:e.entry.state,onResourceSelected:t[0]||(t[0]=c=>o.flatmaprResourceSelected(e.entry.type,c)),style:{height:"100%",width:"100%"},initial:e.entry.resource,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityInfoClose:e.onConnectivityInfoClose,connectivityInfoSidebar:e.connectivityInfoSidebar,ref:"multiflatmap",displayMinimap:!0,showStarInLegend:e.showStarInLegend,enableOpenMapUI:!0,openMapOptions:e.openMapOptions,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onPanZoomCallback:o.flatmapPanZoomCallback,onOpenMap:e.openMap,onFinishHelpMode:e.endHelp,onPathwaySelectionChanged:o.onPathwaySelectionChanged,onOpenPubmedUrl:o.onOpenPubmedUrl},null,8,["availableSpecies","onFlatmapChanged","onReady","state","initial","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","onConnectivityInfoOpen","onConnectivityInfoClose","connectivityInfoSidebar","showStarInLegend","openMapOptions","flatmapAPI","sparcAPI","onPanZoomCallback","onOpenMap","onFinishHelpMode","onPathwaySelectionChanged","onOpenPubmedUrl"]),e.helpMode&&e.useHelpModeDialog?(a.openBlock(),a.createBlock(l,{key:0,ref:"multiflatmapHelp",multiflatmapRef:e.multiflatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,["multiflatmapRef","lastItem","onShowNext","onFinishHelpMode"])):a.createCommentVNode("",!0)])}const mUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(hUr,[["render",fUr],["__scopeId","data-v-089c8852"]])},Symbol.toStringTag,{value:"Module"}));function gUr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yje={exports:{}},sl=Yje.exports={},Rf,Nf;function F1e(){throw new Error("setTimeout has not been defined")}function D1e(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Rf=setTimeout:Rf=F1e}catch{Rf=F1e}try{typeof clearTimeout=="function"?Nf=clearTimeout:Nf=D1e}catch{Nf=D1e}})();function Jje(e){if(Rf===setTimeout)return setTimeout(e,0);if((Rf===F1e||!Rf)&&setTimeout)return Rf=setTimeout,setTimeout(e,0);try{return Rf(e,0)}catch{try{return Rf.call(null,e,0)}catch{return Rf.call(this,e,0)}}}function yUr(e){if(Nf===clearTimeout)return clearTimeout(e);if((Nf===D1e||!Nf)&&clearTimeout)return Nf=clearTimeout,clearTimeout(e);try{return Nf(e)}catch{try{return Nf.call(null,e)}catch{return Nf.call(this,e)}}}var d5=[],o_=!1,oT,GU=-1;function TUr(){!o_||!oT||(o_=!1,oT.length?d5=oT.concat(d5):GU=-1,d5.length&&$je())}function $je(){if(!o_){var e=Jje(TUr);o_=!0;for(var t=d5.length;t;){for(oT=d5,d5=[];++GU<t;)oT&&oT[GU].run();GU=-1,t=d5.length}oT=null,o_=!1,yUr(e)}}sl.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];d5.push(new eUe(e,t)),d5.length===1&&!o_&&Jje($je)};function eUe(e,t){this.fun=e,this.array=t}eUe.prototype.run=function(){this.fun.apply(null,this.array)},sl.title="browser",sl.browser=!0,sl.env={},sl.argv=[],sl.version="",sl.versions={};function h5(){}sl.on=h5,sl.addListener=h5,sl.once=h5,sl.off=h5,sl.removeListener=h5,sl.removeAllListeners=h5,sl.emit=h5,sl.prependListener=h5,sl.prependOnceListener=h5,sl.listeners=function(e){return[]},sl.binding=function(e){throw new Error("process.binding is not supported")},sl.cwd=function(){return"/"},sl.chdir=function(e){throw new Error("process.chdir is not supported")},sl.umask=function(){return 0};var vUr=Yje.exports;const a_=gUr(vUr),p5=(e,t,{checkForDefaultPrevented:r=!0}={})=>n=>{const i=e==null?void 0:e(n);if(r===!1||!i)return t==null?void 0:t(n)},s_=globalThis||void 0||self;var tUe;const W1=typeof window<"u",bUr=e=>typeof e=="string",rUe=()=>{},QUr=W1&&((tUe=window==null?void 0:window.navigator)==null?void 0:tUe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function nUe(e){return typeof e=="function"?e():a.unref(e)}function xUr(e){return e}function WU(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function _Ur(e,t=!0){a.getCurrentInstance()?a.onMounted(e):t?e():a.nextTick(e)}function f5(e){var t;const r=nUe(e);return(t=r==null?void 0:r.$el)!=null?t:r}const qU=W1?window:void 0;function aT(...e){let t,r,n,i;if(bUr(e[0])||Array.isArray(e[0])?([r,n,i]=e,t=qU):[t,r,n,i]=e,!t)return rUe;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const o=[],s=()=>{o.forEach(d=>d()),o.length=0},l=(d,h,p,f)=>(d.addEventListener(h,p,f),()=>d.removeEventListener(h,p,f)),c=a.watch(()=>[f5(t),nUe(i)],([d,h])=>{s(),d&&o.push(...r.flatMap(p=>n.map(f=>l(d,p,f,h))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return WU(u),u}let iUe=!1;function wUr(e,t,r={}){const{window:n=qU,ignore:i=[],capture:o=!0,detectIframe:s=!1}=r;if(!n)return;QUr&&!iUe&&(iUe=!0,Array.from(n.document.body.children).forEach(d=>d.addEventListener("click",rUe)));let l=!0;const c=d=>i.some(h=>{if(typeof h=="string")return Array.from(n.document.querySelectorAll(h)).some(p=>p===d.target||d.composedPath().includes(p));{const p=f5(h);return p&&(d.target===p||d.composedPath().includes(p))}}),u=[aT(n,"click",d=>{const h=f5(e);if(!(!h||h===d.target||d.composedPath().includes(h))){if(d.detail===0&&(l=!c(d)),!l){l=!0;return}t(d)}},{passive:!0,capture:o}),aT(n,"pointerdown",d=>{const h=f5(e);h&&(l=!d.composedPath().includes(h)&&!c(d))},{passive:!0}),s&&aT(n,"blur",d=>{var h;const p=f5(e);((h=n.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(d)})].filter(Boolean);return()=>u.forEach(d=>d())}function oUe(e,t=!1){const r=a.ref(),n=()=>r.value=!!e();return n(),_Ur(n,t),r}const z1e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof s_<"u"?s_:typeof self<"u"?self:{},j1e="__vueuse_ssr_handlers__";z1e[j1e]=z1e[j1e]||{},z1e[j1e];var aUe=Object.getOwnPropertySymbols,LUr=Object.prototype.hasOwnProperty,SUr=Object.prototype.propertyIsEnumerable,kUr=(e,t)=>{var r={};for(var n in e)LUr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&aUe)for(var n of aUe(e))t.indexOf(n)<0&&SUr.call(e,n)&&(r[n]=e[n]);return r};function m5(e,t,r={}){const n=r,{window:i=qU}=n,o=kUr(n,["window"]);let s;const l=oUe(()=>i&&"ResizeObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>f5(e),h=>{c(),l.value&&i&&h&&(s=new ResizeObserver(t),s.observe(h,o))},{immediate:!0,flush:"post"}),d=()=>{c(),u()};return WU(d),{isSupported:l,stop:d}}var sUe=Object.getOwnPropertySymbols,CUr=Object.prototype.hasOwnProperty,MUr=Object.prototype.propertyIsEnumerable,EUr=(e,t)=>{var r={};for(var n in e)CUr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sUe)for(var n of sUe(e))t.indexOf(n)<0&&MUr.call(e,n)&&(r[n]=e[n]);return r};function AUr(e,t,r={}){const n=r,{window:i=qU}=n,o=EUr(n,["window"]);let s;const l=oUe(()=>i&&"MutationObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>f5(e),h=>{c(),l.value&&i&&h&&(s=new MutationObserver(t),s.observe(h,o))},{immediate:!0}),d=()=>{c(),u()};return WU(d),{isSupported:l,stop:d}}var lUe;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(lUe||(lUe={}));var OUr=Object.defineProperty,cUe=Object.getOwnPropertySymbols,IUr=Object.prototype.hasOwnProperty,PUr=Object.prototype.propertyIsEnumerable,uUe=(e,t,r)=>t in e?OUr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VUr=(e,t)=>{for(var r in t||(t={}))IUr.call(t,r)&&uUe(e,r,t[r]);if(cUe)for(var r of cUe(t))PUr.call(t,r)&&uUe(e,r,t[r]);return e};VUr({linear:xUr},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const HUr=()=>W1&&/firefox/i.test(window.navigator.userAgent);a_.env.NODE_ENV!=="production"&&Object.freeze({}),a_.env.NODE_ENV!=="production"&&Object.freeze([]);const UA=()=>{},RUr=Object.prototype.hasOwnProperty,dUe=(e,t)=>RUr.call(e,t),Ud=Array.isArray,Gd=e=>typeof e=="function",Bf=e=>typeof e=="string",Wd=e=>e!==null&&typeof e=="object",NUr=Object.prototype.toString,BUr=e=>NUr.call(e),U1e=e=>BUr(e).slice(8,-1);var hUe=typeof s_=="object"&&s_&&s_.Object===Object&&s_,FUr=typeof self=="object"&&self&&self.Object===Object&&self,Ff=hUe||FUr||Function("return this")(),t7=Ff.Symbol,pUe=Object.prototype,DUr=pUe.hasOwnProperty,zUr=pUe.toString,GA=t7?t7.toStringTag:void 0;function jUr(e){var t=DUr.call(e,GA),r=e[GA];try{e[GA]=void 0;var n=!0}catch{}var i=zUr.call(e);return n&&(t?e[GA]=r:delete e[GA]),i}var UUr=Object.prototype,GUr=UUr.toString;function WUr(e){return GUr.call(e)}var qUr="[object Null]",ZUr="[object Undefined]",fUe=t7?t7.toStringTag:void 0;function l_(e){return e==null?e===void 0?ZUr:qUr:fUe&&fUe in Object(e)?jUr(e):WUr(e)}function c_(e){return e!=null&&typeof e=="object"}var XUr="[object Symbol]";function ZU(e){return typeof e=="symbol"||c_(e)&&l_(e)==XUr}function KUr(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Df=Array.isArray,YUr=1/0,mUe=t7?t7.prototype:void 0,gUe=mUe?mUe.toString:void 0;function yUe(e){if(typeof e=="string")return e;if(Df(e))return KUr(e,yUe)+"";if(ZU(e))return gUe?gUe.call(e):"";var t=e+"";return t=="0"&&1/e==-YUr?"-0":t}var JUr=/\s/;function $Ur(e){for(var t=e.length;t--&&JUr.test(e.charAt(t)););return t}var eGr=/^\s+/;function tGr(e){return e&&e.slice(0,$Ur(e)+1).replace(eGr,"")}function u_(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var TUe=NaN,rGr=/^[-+]0x[0-9a-f]+$/i,nGr=/^0b[01]+$/i,iGr=/^0o[0-7]+$/i,oGr=parseInt;function G1e(e){if(typeof e=="number")return e;if(ZU(e))return TUe;if(u_(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=u_(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=tGr(e);var r=nGr.test(e);return r||iGr.test(e)?oGr(e.slice(2),r?2:8):rGr.test(e)?TUe:+e}var vUe=1/0,aGr=17976931348623157e292;function sGr(e){if(!e)return e===0?e:0;if(e=G1e(e),e===vUe||e===-vUe){var t=e<0?-1:1;return t*aGr}return e===e?e:0}function lGr(e){var t=sGr(e),r=t%1;return t===t?r?t-r:t:0}function cGr(e){return e}var uGr="[object AsyncFunction]",dGr="[object Function]",hGr="[object GeneratorFunction]",pGr="[object Proxy]";function bUe(e){if(!u_(e))return!1;var t=l_(e);return t==dGr||t==hGr||t==uGr||t==pGr}var W1e=Ff["__core-js_shared__"],QUe=function(){var e=/[^.]+$/.exec(W1e&&W1e.keys&&W1e.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function fGr(e){return!!QUe&&QUe in e}var mGr=Function.prototype,gGr=mGr.toString;function sT(e){if(e!=null){try{return gGr.call(e)}catch{}try{return e+""}catch{}}return""}var yGr=/[\\^$.*+?()[\]{}|]/g,TGr=/^\[object .+?Constructor\]$/,vGr=Function.prototype,bGr=Object.prototype,QGr=vGr.toString,xGr=bGr.hasOwnProperty,_Gr=RegExp("^"+QGr.call(xGr).replace(yGr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wGr(e){if(!u_(e)||fGr(e))return!1;var t=bUe(e)?_Gr:TGr;return t.test(sT(e))}function LGr(e,t){return e==null?void 0:e[t]}function d_(e,t){var r=LGr(e,t);return wGr(r)?r:void 0}var q1e=d_(Ff,"WeakMap");function SGr(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var kGr=9007199254740991,CGr=/^(?:0|[1-9]\d*)$/;function xUe(e,t){var r=typeof e;return t=t??kGr,!!t&&(r=="number"||r!="symbol"&&CGr.test(e))&&e>-1&&e%1==0&&e<t}function _Ue(e,t){return e===t||e!==e&&t!==t}var MGr=9007199254740991;function Z1e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MGr}function EGr(e){return e!=null&&Z1e(e.length)&&!bUe(e)}var AGr=Object.prototype;function OGr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||AGr;return e===r}function IGr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var PGr="[object Arguments]";function wUe(e){return c_(e)&&l_(e)==PGr}var LUe=Object.prototype,VGr=LUe.hasOwnProperty,HGr=LUe.propertyIsEnumerable,SUe=wUe(function(){return arguments}())?wUe:function(e){return c_(e)&&VGr.call(e,"callee")&&!HGr.call(e,"callee")};function RGr(){return!1}var kUe=typeof Pn=="object"&&Pn&&!Pn.nodeType&&Pn,CUe=kUe&&typeof module=="object"&&module&&!module.nodeType&&module,NGr=CUe&&CUe.exports===kUe,MUe=NGr?Ff.Buffer:void 0,BGr=MUe?MUe.isBuffer:void 0,X1e=BGr||RGr,FGr="[object Arguments]",DGr="[object Array]",zGr="[object Boolean]",jGr="[object Date]",UGr="[object Error]",GGr="[object Function]",WGr="[object Map]",qGr="[object Number]",ZGr="[object Object]",XGr="[object RegExp]",KGr="[object Set]",YGr="[object String]",JGr="[object WeakMap]",$Gr="[object ArrayBuffer]",eWr="[object DataView]",tWr="[object Float32Array]",rWr="[object Float64Array]",nWr="[object Int8Array]",iWr="[object Int16Array]",oWr="[object Int32Array]",aWr="[object Uint8Array]",sWr="[object Uint8ClampedArray]",lWr="[object Uint16Array]",cWr="[object Uint32Array]",is={};is[tWr]=is[rWr]=is[nWr]=is[iWr]=is[oWr]=is[aWr]=is[sWr]=is[lWr]=is[cWr]=!0,is[FGr]=is[DGr]=is[$Gr]=is[zGr]=is[eWr]=is[jGr]=is[UGr]=is[GGr]=is[WGr]=is[qGr]=is[ZGr]=is[XGr]=is[KGr]=is[YGr]=is[JGr]=!1;function uWr(e){return c_(e)&&Z1e(e.length)&&!!is[l_(e)]}function dWr(e){return function(t){return e(t)}}var EUe=typeof Pn=="object"&&Pn&&!Pn.nodeType&&Pn,WA=EUe&&typeof module=="object"&&module&&!module.nodeType&&module,hWr=WA&&WA.exports===EUe,K1e=hWr&&hUe.process,AUe=function(){try{var e=WA&&WA.require&&WA.require("util").types;return e||K1e&&K1e.binding&&K1e.binding("util")}catch{}}(),OUe=AUe&&AUe.isTypedArray,IUe=OUe?dWr(OUe):uWr,pWr=Object.prototype,fWr=pWr.hasOwnProperty;function mWr(e,t){var r=Df(e),n=!r&&SUe(e),i=!r&&!n&&X1e(e),o=!r&&!n&&!i&&IUe(e),s=r||n||i||o,l=s?IGr(e.length,String):[],c=l.length;for(var u in e)(t||fWr.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||xUe(u,c)))&&l.push(u);return l}function gWr(e,t){return function(r){return e(t(r))}}var yWr=gWr(Object.keys,Object),TWr=Object.prototype,vWr=TWr.hasOwnProperty;function bWr(e){if(!OGr(e))return yWr(e);var t=[];for(var r in Object(e))vWr.call(e,r)&&r!="constructor"&&t.push(r);return t}function PUe(e){return EGr(e)?mWr(e):bWr(e)}var QWr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xWr=/^\w*$/;function Y1e(e,t){if(Df(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ZU(e)?!0:xWr.test(e)||!QWr.test(e)||t!=null&&e in Object(t)}var qA=d_(Object,"create");function _Wr(){this.__data__=qA?qA(null):{},this.size=0}function wWr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var LWr="__lodash_hash_undefined__",SWr=Object.prototype,kWr=SWr.hasOwnProperty;function CWr(e){var t=this.__data__;if(qA){var r=t[e];return r===LWr?void 0:r}return kWr.call(t,e)?t[e]:void 0}var MWr=Object.prototype,EWr=MWr.hasOwnProperty;function AWr(e){var t=this.__data__;return qA?t[e]!==void 0:EWr.call(t,e)}var OWr="__lodash_hash_undefined__";function IWr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=qA&&t===void 0?OWr:t,this}function lT(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}lT.prototype.clear=_Wr,lT.prototype.delete=wWr,lT.prototype.get=CWr,lT.prototype.has=AWr,lT.prototype.set=IWr;function PWr(){this.__data__=[],this.size=0}function XU(e,t){for(var r=e.length;r--;)if(_Ue(e[r][0],t))return r;return-1}var VWr=Array.prototype,HWr=VWr.splice;function RWr(e){var t=this.__data__,r=XU(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():HWr.call(t,r,1),--this.size,!0}function NWr(e){var t=this.__data__,r=XU(t,e);return r<0?void 0:t[r][1]}function BWr(e){return XU(this.__data__,e)>-1}function FWr(e,t){var r=this.__data__,n=XU(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function g5(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}g5.prototype.clear=PWr,g5.prototype.delete=RWr,g5.prototype.get=NWr,g5.prototype.has=BWr,g5.prototype.set=FWr;var ZA=d_(Ff,"Map");function DWr(){this.size=0,this.__data__={hash:new lT,map:new(ZA||g5),string:new lT}}function zWr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function KU(e,t){var r=e.__data__;return zWr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function jWr(e){var t=KU(this,e).delete(e);return this.size-=t?1:0,t}function UWr(e){return KU(this,e).get(e)}function GWr(e){return KU(this,e).has(e)}function WWr(e,t){var r=KU(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function y5(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}y5.prototype.clear=DWr,y5.prototype.delete=jWr,y5.prototype.get=UWr,y5.prototype.has=GWr,y5.prototype.set=WWr;var qWr="Expected a function";function J1e(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(qWr);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(J1e.Cache||y5),r}J1e.Cache=y5;var ZWr=500;function XWr(e){var t=J1e(e,function(n){return r.size===ZWr&&r.clear(),n}),r=t.cache;return t}var KWr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,YWr=/\\(\\)?/g,JWr=XWr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(KWr,function(r,n,i,o){t.push(i?o.replace(YWr,"$1"):n||r)}),t});function $Wr(e){return e==null?"":yUe(e)}function VUe(e,t){return Df(e)?e:Y1e(e,t)?[e]:JWr($Wr(e))}var eqr=1/0;function YU(e){if(typeof e=="string"||ZU(e))return e;var t=e+"";return t=="0"&&1/e==-eqr?"-0":t}function HUe(e,t){t=VUe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[YU(t[r++])];return r&&r==n?e:void 0}function T5(e,t,r){var n=e==null?void 0:HUe(e,t);return n===void 0?r:n}function tqr(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function RUe(){if(!arguments.length)return[];var e=arguments[0];return Df(e)?e:[e]}function rqr(){this.__data__=new g5,this.size=0}function nqr(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function iqr(e){return this.__data__.get(e)}function oqr(e){return this.__data__.has(e)}var aqr=200;function sqr(e,t){var r=this.__data__;if(r instanceof g5){var n=r.__data__;if(!ZA||n.length<aqr-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new y5(n)}return r.set(e,t),this.size=r.size,this}function v5(e){var t=this.__data__=new g5(e);this.size=t.size}v5.prototype.clear=rqr,v5.prototype.delete=nqr,v5.prototype.get=iqr,v5.prototype.has=oqr,v5.prototype.set=sqr;function lqr(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function cqr(){return[]}var uqr=Object.prototype,dqr=uqr.propertyIsEnumerable,NUe=Object.getOwnPropertySymbols,hqr=NUe?function(e){return e==null?[]:(e=Object(e),lqr(NUe(e),function(t){return dqr.call(e,t)}))}:cqr;const pqr=hqr;function fqr(e,t,r){var n=t(e);return Df(e)?n:tqr(n,r(e))}function BUe(e){return fqr(e,PUe,pqr)}var $1e=d_(Ff,"DataView"),eue=d_(Ff,"Promise"),tue=d_(Ff,"Set"),FUe="[object Map]",mqr="[object Object]",DUe="[object Promise]",zUe="[object Set]",jUe="[object WeakMap]",UUe="[object DataView]",gqr=sT($1e),yqr=sT(ZA),Tqr=sT(eue),vqr=sT(tue),bqr=sT(q1e),cT=l_;($1e&&cT(new $1e(new ArrayBuffer(1)))!=UUe||ZA&&cT(new ZA)!=FUe||eue&&cT(eue.resolve())!=DUe||tue&&cT(new tue)!=zUe||q1e&&cT(new q1e)!=jUe)&&(cT=function(e){var t=l_(e),r=t==mqr?e.constructor:void 0,n=r?sT(r):"";if(n)switch(n){case gqr:return UUe;case yqr:return FUe;case Tqr:return DUe;case vqr:return zUe;case bqr:return jUe}return t});const GUe=cT;var Qqr=Ff.Uint8Array;const WUe=Qqr;var xqr="__lodash_hash_undefined__";function _qr(e){return this.__data__.set(e,xqr),this}function wqr(e){return this.__data__.has(e)}function JU(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new y5;++t<r;)this.add(e[t])}JU.prototype.add=JU.prototype.push=_qr,JU.prototype.has=wqr;function Lqr(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Sqr(e,t){return e.has(t)}var kqr=1,Cqr=2;function qUe(e,t,r,n,i,o){var s=r&kqr,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,f=r&Cqr?new JU:void 0;for(o.set(e,t),o.set(t,e);++h<l;){var m=e[h],g=t[h];if(n)var T=s?n(g,m,h,t,e,o):n(m,g,h,e,t,o);if(T!==void 0){if(T)continue;p=!1;break}if(f){if(!Lqr(t,function(y,v){if(!Sqr(f,v)&&(m===y||i(m,y,r,n,o)))return f.push(v)})){p=!1;break}}else if(!(m===g||i(m,g,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function Mqr(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Eqr(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Aqr=1,Oqr=2,Iqr="[object Boolean]",Pqr="[object Date]",Vqr="[object Error]",Hqr="[object Map]",Rqr="[object Number]",Nqr="[object RegExp]",Bqr="[object Set]",Fqr="[object String]",Dqr="[object Symbol]",zqr="[object ArrayBuffer]",jqr="[object DataView]",ZUe=t7?t7.prototype:void 0,rue=ZUe?ZUe.valueOf:void 0;function Uqr(e,t,r,n,i,o,s){switch(r){case jqr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case zqr:return!(e.byteLength!=t.byteLength||!o(new WUe(e),new WUe(t)));case Iqr:case Pqr:case Rqr:return _Ue(+e,+t);case Vqr:return e.name==t.name&&e.message==t.message;case Nqr:case Fqr:return e==t+"";case Hqr:var l=Mqr;case Bqr:var c=n&Aqr;if(l||(l=Eqr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=Oqr,s.set(e,t);var d=qUe(l(e),l(t),n,i,o,s);return s.delete(e),d;case Dqr:if(rue)return rue.call(e)==rue.call(t)}return!1}var Gqr=1,Wqr=Object.prototype,qqr=Wqr.hasOwnProperty;function Zqr(e,t,r,n,i,o){var s=r&Gqr,l=BUe(e),c=l.length,u=BUe(t),d=u.length;if(c!=d&&!s)return!1;for(var h=c;h--;){var p=l[h];if(!(s?p in t:qqr.call(t,p)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var T=s;++h<c;){p=l[h];var y=e[p],v=t[p];if(n)var Q=s?n(v,y,p,t,e,o):n(y,v,p,e,t,o);if(!(Q===void 0?y===v||i(y,v,r,n,o):Q)){g=!1;break}T||(T=p=="constructor")}if(g&&!T){var _=e.constructor,L=t.constructor;_!=L&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof L=="function"&&L instanceof L)&&(g=!1)}return o.delete(e),o.delete(t),g}var Xqr=1,XUe="[object Arguments]",KUe="[object Array]",$U="[object Object]",Kqr=Object.prototype,YUe=Kqr.hasOwnProperty;function Yqr(e,t,r,n,i,o){var s=Df(e),l=Df(t),c=s?KUe:GUe(e),u=l?KUe:GUe(t);c=c==XUe?$U:c,u=u==XUe?$U:u;var d=c==$U,h=u==$U,p=c==u;if(p&&X1e(e)){if(!X1e(t))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new v5),s||IUe(e)?qUe(e,t,r,n,i,o):Uqr(e,t,c,r,n,i,o);if(!(r&Xqr)){var f=d&&YUe.call(e,"__wrapped__"),m=h&&YUe.call(t,"__wrapped__");if(f||m){var g=f?e.value():e,T=m?t.value():t;return o||(o=new v5),i(g,T,r,n,o)}}return p?(o||(o=new v5),Zqr(e,t,r,n,i,o)):!1}function eG(e,t,r,n,i){return e===t?!0:e==null||t==null||!c_(e)&&!c_(t)?e!==e&&t!==t:Yqr(e,t,r,n,eG,i)}var Jqr=1,$qr=2;function eZr(e,t,r,n){var i=r.length,o=i,s=!n;if(e==null)return!o;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){l=r[i];var c=l[0],u=e[c],d=l[1];if(s&&l[2]){if(u===void 0&&!(c in e))return!1}else{var h=new v5;if(n)var p=n(u,d,c,e,t,h);if(!(p===void 0?eG(d,u,Jqr|$qr,n,h):p))return!1}}return!0}function JUe(e){return e===e&&!u_(e)}function tZr(e){for(var t=PUe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,JUe(i)]}return t}function $Ue(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function rZr(e){var t=tZr(e);return t.length==1&&t[0][2]?$Ue(t[0][0],t[0][1]):function(r){return r===e||eZr(r,e,t)}}function nZr(e,t){return e!=null&&t in Object(e)}function iZr(e,t,r){t=VUe(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var s=YU(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&Z1e(i)&&xUe(s,i)&&(Df(e)||SUe(e)))}function oZr(e,t){return e!=null&&iZr(e,t,nZr)}var aZr=1,sZr=2;function lZr(e,t){return Y1e(e)&&JUe(t)?$Ue(YU(e),t):function(r){var n=T5(r,e);return n===void 0&&n===t?oZr(r,e):eG(t,n,aZr|sZr)}}function cZr(e){return function(t){return t==null?void 0:t[e]}}function uZr(e){return function(t){return HUe(t,e)}}function dZr(e){return Y1e(e)?cZr(YU(e)):uZr(e)}function hZr(e){return typeof e=="function"?e:e==null?cGr:typeof e=="object"?Df(e)?lZr(e[0],e[1]):rZr(e):dZr(e)}var nue=function(){return Ff.Date.now()},pZr="Expected a function",fZr=Math.max,mZr=Math.min;function gZr(e,t,r){var n,i,o,s,l,c,u=0,d=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(pZr);t=G1e(t)||0,u_(r)&&(d=!!r.leading,h="maxWait"in r,o=h?fZr(G1e(r.maxWait)||0,t):o,p="trailing"in r?!!r.trailing:p);function f(w){var S=n,C=i;return n=i=void 0,u=w,s=e.apply(C,S),s}function m(w){return u=w,l=setTimeout(y,t),d?f(w):s}function g(w){var S=w-c,C=w-u,E=t-S;return h?mZr(E,o-C):E}function T(w){var S=w-c,C=w-u;return c===void 0||S>=t||S<0||h&&C>=o}function y(){var w=nue();if(T(w))return v(w);l=setTimeout(y,g(w))}function v(w){return l=void 0,p&&n?f(w):(n=i=void 0,s)}function Q(){l!==void 0&&clearTimeout(l),u=0,n=c=i=l=void 0}function _(){return l===void 0?s:v(nue())}function L(){var w=nue(),S=T(w);if(n=arguments,i=this,c=w,S){if(l===void 0)return m(c);if(h)return clearTimeout(l),l=setTimeout(y,t),f(c)}return l===void 0&&(l=setTimeout(y,t)),s}return L.cancel=Q,L.flush=_,L}var yZr=Math.max,TZr=Math.min;function vZr(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=n-1;return r!==void 0&&(i=lGr(r),i=r<0?yZr(n+i,0):TZr(i,n-1)),SGr(e,hZr(t),i,!0)}function tG(e){for(var t=-1,r=e==null?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n}function XA(e,t){return eG(e,t)}function rG(e){return e==null}function bZr(e){return e===void 0}const eGe=e=>e===void 0,iue=e=>typeof e=="boolean",k0=e=>typeof e=="number",KA=e=>typeof Element>"u"?!1:e instanceof Element,QZr=e=>Bf(e)?!Number.isNaN(Number(e)):!1,xZr=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d");let tGe=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function _Zr(e,t){throw new tGe(`[${e}] ${t}`)}function qd(e,t){if(a_.env.NODE_ENV!=="production"){const r=Bf(e)?new tGe(`[${e}] ${t}`):e;console.warn(r)}}const wZr="utils/dom/style";function nG(e,t="px"){if(!e)return"";if(k0(e)||QZr(e))return`${e}${t}`;if(Bf(e))return e;qd(wZr,"binding value must be a string or number")}function LZr(e,t){if(!W1)return;if(!t){e.scrollTop=0;return}const r=[];let n=t.offsetParent;for(;n!==null&&e!==n&&e.contains(n);)r.push(n),n=n.offsetParent;const i=t.offsetTop+r.reduce((c,u)=>c+u.offsetTop,0),o=i+t.offsetHeight,s=e.scrollTop,l=s+e.clientHeight;i<s?e.scrollTop=i:o>l&&(e.scrollTop=o-e.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var SZr=a.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),kZr=SZr,CZr=a.defineComponent({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),MZr=CZr,EZr=a.defineComponent({name:"CircleCheck",__name:"circle-check",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),a.createElementVNode("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),AZr=EZr,OZr=a.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),oue=OZr,IZr=a.defineComponent({name:"Close",__name:"close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),rGe=IZr,PZr=a.defineComponent({name:"Hide",__name:"hide",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),a.createElementVNode("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),VZr=PZr,HZr=a.defineComponent({name:"Loading",__name:"loading",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),nGe=HZr,RZr=a.defineComponent({name:"View",__name:"view",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),NZr=RZr;const iGe="__epPropKey",$i=e=>e,BZr=e=>Wd(e)&&!!e[iGe],iG=(e,t)=>{if(!Wd(e)||BZr(e))return e;const{values:r,required:n,default:i,type:o,validator:s}=e,l={type:o,required:!!n,validator:r||s?c=>{let u=!1,d=[];if(r&&(d=Array.from(r),dUe(e,"default")&&d.push(i),u||(u=d.includes(c))),s&&(u||(u=s(c))),!u&&d.length>0){const h=[...new Set(d)].map(p=>JSON.stringify(p)).join(", ");a.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${h}], got value ${JSON.stringify(c)}.`)}return u}:void 0,[iGe]:!0};return dUe(e,"default")&&(l.default=i),l},Cs=e=>tG(Object.entries(e).map(([t,r])=>[t,iG(r,t)])),uT=$i([String,Object,Function]),oGe={validating:nGe,success:AZr,error:oue},zf=(e,t)=>{if(e.install=r=>{for(const n of[e,...Object.values(t??{})])r.component(n.name,n)},t)for(const[r,n]of Object.entries(t))e[r]=n;return e},FZr=(e,t)=>(e.install=r=>{r.directive(t,e)},e),oG=e=>(e.install=UA,e),YA={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},_2="update:modelValue",aG="change",aGe=["","default","small","large"],sGe=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),lGe=e=>e,DZr=["class","style"],zZr=/^on[A-Z]/,jZr=(e={})=>{const{excludeListeners:t=!1,excludeKeys:r}=e,n=a.computed(()=>((r==null?void 0:r.value)||[]).concat(DZr)),i=a.getCurrentInstance();return i?a.computed(()=>{var o;return tG(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([s])=>!n.value.includes(s)&&!(t&&zZr.test(s))))}):(qd("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),a.computed(()=>({})))},cGe=({from:e,replacement:t,scope:r,version:n,ref:i,type:o="API"},s)=>{a.watch(()=>a.unref(s),l=>{l&&qd(r,`[${o}] ${e} is about to be deprecated in version ${n}, please use ${t} instead.
3094
3094
  For more detail, please visit: ${i}
3095
3095
  `)},{immediate:!0})};var UZr={name:"en",el:{colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"}}};const GZr=e=>(t,r)=>WZr(t,r,a.unref(e)),WZr=(e,t,r)=>T5(r,e,e).replace(/\{(\w+)\}/g,(n,i)=>{var o;return`${(o=t==null?void 0:t[i])!=null?o:`{${i}}`}`}),qZr=e=>{const t=a.computed(()=>a.unref(e).name),r=a.isRef(e)?e:a.ref(e);return{lang:t,locale:r,t:GZr(e)}},ZZr=Symbol("localeContextKey"),XZr=e=>{const t=e||a.inject(ZZr,a.ref());return qZr(a.computed(()=>t.value||UZr))},aue="el",KZr="is-",dT=(e,t,r,n,i)=>{let o=`${e}-${t}`;return r&&(o+=`-${r}`),n&&(o+=`__${n}`),i&&(o+=`--${i}`),o},YZr=Symbol("namespaceContextKey"),sue=e=>{const t=e||(a.getCurrentInstance()?a.inject(YZr,a.ref(aue)):a.ref(aue));return a.computed(()=>a.unref(t)||aue)},Ts=(e,t)=>{const r=sue(t);return{namespace:r,b:(n="")=>dT(r.value,e,n,"",""),e:n=>n?dT(r.value,e,"",n,""):"",m:n=>n?dT(r.value,e,"","",n):"",be:(n,i)=>n&&i?dT(r.value,e,n,i,""):"",em:(n,i)=>n&&i?dT(r.value,e,"",n,i):"",bm:(n,i)=>n&&i?dT(r.value,e,n,"",i):"",bem:(n,i,o)=>n&&i&&o?dT(r.value,e,n,i,o):"",is:(n,...i)=>{const o=i.length>=1?i[0]:!0;return n&&o?`${KZr}${n}`:""},cssVar:n=>{const i={};for(const o in n)n[o]&&(i[`--${r.value}-${o}`]=n[o]);return i},cssVarName:n=>`--${r.value}-${n}`,cssVarBlock:n=>{const i={};for(const o in n)n[o]&&(i[`--${r.value}-${e}-${o}`]=n[o]);return i},cssVarBlockName:n=>`--${r.value}-${e}-${n}`}},JZr=iG({type:$i(Boolean),default:null}),$Zr=iG({type:$i(Function)}),eXr=e=>{const t=`update:${e}`,r=`onUpdate:${e}`,n=[t],i={[e]:JZr,[r]:$Zr};return{useModelToggle:({indicator:o,toggleReason:s,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const h=a.getCurrentInstance(),{emit:p}=h,f=h.props,m=a.computed(()=>Gd(f[r])),g=a.computed(()=>f[e]===null),T=w=>{o.value!==!0&&(o.value=!0,s&&(s.value=w),Gd(u)&&u(w))},y=w=>{o.value!==!1&&(o.value=!1,s&&(s.value=w),Gd(d)&&d(w))},v=w=>{if(f.disabled===!0||Gd(c)&&!c())return;const S=m.value&&W1;S&&p(t,!0),(g.value||!S)&&T(w)},Q=w=>{if(f.disabled===!0||!W1)return;const S=m.value&&W1;S&&p(t,!1),(g.value||!S)&&y(w)},_=w=>{iue(w)&&(f.disabled&&w?m.value&&p(t,!1):o.value!==w&&(w?T():y()))},L=()=>{o.value?Q():v()};return a.watch(()=>f[e],_),l&&h.appContext.config.globalProperties.$route!==void 0&&a.watch(()=>({...h.proxy.$route}),()=>{l.value&&o.value&&Q()}),a.onMounted(()=>{_(f[e])}),{hide:Q,show:v,toggle:L,hasUpdateHandler:m}},useModelToggleProps:i,useModelToggleEmits:n}},uGe=e=>{const t=a.getCurrentInstance();return a.computed(()=>{var r,n;return(n=(r=t==null?void 0:t.proxy)==null?void 0:r.$props)==null?void 0:n[e]})};var C0="top",Zd="bottom",Xd="right",M0="left",lue="auto",JA=[C0,Zd,Xd,M0],h_="start",$A="end",tXr="clippingParents",dGe="viewport",eO="popper",rXr="reference",hGe=JA.reduce(function(e,t){return e.concat([t+"-"+h_,t+"-"+$A])},[]),sG=[].concat(JA,[lue]).reduce(function(e,t){return e.concat([t,t+"-"+h_,t+"-"+$A])},[]),nXr="beforeRead",iXr="read",oXr="afterRead",aXr="beforeMain",sXr="main",lXr="afterMain",cXr="beforeWrite",uXr="write",dXr="afterWrite",hXr=[nXr,iXr,oXr,aXr,sXr,lXr,cXr,uXr,dXr];function jf(e){return e?(e.nodeName||"").toLowerCase():null}function Mp(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function p_(e){var t=Mp(e).Element;return e instanceof t||e instanceof Element}function Kd(e){var t=Mp(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function cue(e){if(typeof ShadowRoot>"u")return!1;var t=Mp(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function pXr(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!Kd(o)||!jf(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function fXr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),l=s.reduce(function(c,u){return c[u]="",c},{});!Kd(i)||!jf(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}var pGe={name:"applyStyles",enabled:!0,phase:"write",fn:pXr,effect:fXr,requires:["computeStyles"]};function Uf(e){return e.split("-")[0]}var hT=Math.max,lG=Math.min,f_=Math.round;function m_(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,i=1;if(Kd(e)&&t){var o=e.offsetHeight,s=e.offsetWidth;s>0&&(n=f_(r.width)/s||1),o>0&&(i=f_(r.height)/o||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function uue(e){var t=m_(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function fGe(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&cue(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function b5(e){return Mp(e).getComputedStyle(e)}function mXr(e){return["table","td","th"].indexOf(jf(e))>=0}function r7(e){return((p_(e)?e.ownerDocument:e.document)||window.document).documentElement}function cG(e){return jf(e)==="html"?e:e.assignedSlot||e.parentNode||(cue(e)?e.host:null)||r7(e)}function mGe(e){return!Kd(e)||b5(e).position==="fixed"?null:e.offsetParent}function gXr(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&Kd(e)){var n=b5(e);if(n.position==="fixed")return null}var i=cG(e);for(cue(i)&&(i=i.host);Kd(i)&&["html","body"].indexOf(jf(i))<0;){var o=b5(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function tO(e){for(var t=Mp(e),r=mGe(e);r&&mXr(r)&&b5(r).position==="static";)r=mGe(r);return r&&(jf(r)==="html"||jf(r)==="body"&&b5(r).position==="static")?t:r||gXr(e)||t}function due(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function rO(e,t,r){return hT(e,lG(t,r))}function yXr(e,t,r){var n=rO(e,t,r);return n>r?r:n}function gGe(){return{top:0,right:0,bottom:0,left:0}}function yGe(e){return Object.assign({},gGe(),e)}function TGe(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var TXr=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,yGe(typeof e!="number"?e:TGe(e,JA))};function vXr(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,s=r.modifiersData.popperOffsets,l=Uf(r.placement),c=due(l),u=[M0,Xd].indexOf(l)>=0,d=u?"height":"width";if(!(!o||!s)){var h=TXr(i.padding,r),p=uue(o),f=c==="y"?C0:M0,m=c==="y"?Zd:Xd,g=r.rects.reference[d]+r.rects.reference[c]-s[c]-r.rects.popper[d],T=s[c]-r.rects.reference[c],y=tO(o),v=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,Q=g/2-T/2,_=h[f],L=v-p[d]-h[m],w=v/2-p[d]/2+Q,S=rO(_,w,L),C=c;r.modifiersData[n]=(t={},t[C]=S,t.centerOffset=S-w,t)}}function bXr(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!fGe(t.elements.popper,i)||(t.elements.arrow=i))}var QXr={name:"arrow",enabled:!0,phase:"main",fn:vXr,effect:bXr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function g_(e){return e.split("-")[1]}var xXr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _Xr(e){var t=e.x,r=e.y,n=window,i=n.devicePixelRatio||1;return{x:f_(t*i)/i||0,y:f_(r*i)/i||0}}function vGe(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=s.x,f=p===void 0?0:p,m=s.y,g=m===void 0?0:m,T=typeof d=="function"?d({x:f,y:g}):{x:f,y:g};f=T.x,g=T.y;var y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),Q=M0,_=C0,L=window;if(u){var w=tO(r),S="clientHeight",C="clientWidth";if(w===Mp(r)&&(w=r7(r),b5(w).position!=="static"&&l==="absolute"&&(S="scrollHeight",C="scrollWidth")),w=w,i===C0||(i===M0||i===Xd)&&o===$A){_=Zd;var E=h&&w===L&&L.visualViewport?L.visualViewport.height:w[S];g-=E-n.height,g*=c?1:-1}if(i===M0||(i===C0||i===Zd)&&o===$A){Q=Xd;var O=h&&w===L&&L.visualViewport?L.visualViewport.width:w[C];f-=O-n.width,f*=c?1:-1}}var I=Object.assign({position:l},u&&xXr),R=d===!0?_Xr({x:f,y:g}):{x:f,y:g};if(f=R.x,g=R.y,c){var B;return Object.assign({},I,(B={},B[_]=v?"0":"",B[Q]=y?"0":"",B.transform=(L.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",B))}return Object.assign({},I,(t={},t[_]=v?g+"px":"",t[Q]=y?f+"px":"",t.transform="",t))}function wXr(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,s=o===void 0?!0:o,l=r.roundOffsets,c=l===void 0?!0:l,u={placement:Uf(t.placement),variation:g_(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,vGe(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,vGe(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var bGe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:wXr,data:{}},uG={passive:!0};function LXr(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,s=n.resize,l=s===void 0?!0:s,c=Mp(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",r.update,uG)}),l&&c.addEventListener("resize",r.update,uG),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",r.update,uG)}),l&&c.removeEventListener("resize",r.update,uG)}}var QGe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:LXr,data:{}},SXr={left:"right",right:"left",bottom:"top",top:"bottom"};function dG(e){return e.replace(/left|right|bottom|top/g,function(t){return SXr[t]})}var kXr={start:"end",end:"start"};function xGe(e){return e.replace(/start|end/g,function(t){return kXr[t]})}function hue(e){var t=Mp(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function pue(e){return m_(r7(e)).left+hue(e).scrollLeft}function CXr(e){var t=Mp(e),r=r7(e),n=t.visualViewport,i=r.clientWidth,o=r.clientHeight,s=0,l=0;return n&&(i=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=n.offsetLeft,l=n.offsetTop)),{width:i,height:o,x:s+pue(e),y:l}}function MXr(e){var t,r=r7(e),n=hue(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=hT(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=hT(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-n.scrollLeft+pue(e),c=-n.scrollTop;return b5(i||r).direction==="rtl"&&(l+=hT(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function fue(e){var t=b5(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function _Ge(e){return["html","body","#document"].indexOf(jf(e))>=0?e.ownerDocument.body:Kd(e)&&fue(e)?e:_Ge(cG(e))}function nO(e,t){var r;t===void 0&&(t=[]);var n=_Ge(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Mp(n),s=i?[o].concat(o.visualViewport||[],fue(n)?n:[]):n,l=t.concat(s);return i?l:l.concat(nO(cG(s)))}function mue(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function EXr(e){var t=m_(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function wGe(e,t){return t===dGe?mue(CXr(e)):p_(t)?EXr(t):mue(MXr(r7(e)))}function AXr(e){var t=nO(cG(e)),r=["absolute","fixed"].indexOf(b5(e).position)>=0,n=r&&Kd(e)?tO(e):e;return p_(n)?t.filter(function(i){return p_(i)&&fGe(i,n)&&jf(i)!=="body"}):[]}function OXr(e,t,r){var n=t==="clippingParents"?AXr(e):[].concat(t),i=[].concat(n,[r]),o=i[0],s=i.reduce(function(l,c){var u=wGe(e,c);return l.top=hT(u.top,l.top),l.right=lG(u.right,l.right),l.bottom=lG(u.bottom,l.bottom),l.left=hT(u.left,l.left),l},wGe(e,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function LGe(e){var t=e.reference,r=e.element,n=e.placement,i=n?Uf(n):null,o=n?g_(n):null,s=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2,c;switch(i){case C0:c={x:s,y:t.y-r.height};break;case Zd:c={x:s,y:t.y+t.height};break;case Xd:c={x:t.x+t.width,y:l};break;case M0:c={x:t.x-r.width,y:l};break;default:c={x:t.x,y:t.y}}var u=i?due(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case h_:c[u]=c[u]-(t[d]/2-r[d]/2);break;case $A:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function iO(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.boundary,s=o===void 0?tXr:o,l=r.rootBoundary,c=l===void 0?dGe:l,u=r.elementContext,d=u===void 0?eO:u,h=r.altBoundary,p=h===void 0?!1:h,f=r.padding,m=f===void 0?0:f,g=yGe(typeof m!="number"?m:TGe(m,JA)),T=d===eO?rXr:eO,y=e.rects.popper,v=e.elements[p?T:d],Q=OXr(p_(v)?v:v.contextElement||r7(e.elements.popper),s,c),_=m_(e.elements.reference),L=LGe({reference:_,element:y,strategy:"absolute",placement:i}),w=mue(Object.assign({},y,L)),S=d===eO?w:_,C={top:Q.top-S.top+g.top,bottom:S.bottom-Q.bottom+g.bottom,left:Q.left-S.left+g.left,right:S.right-Q.right+g.right},E=e.modifiersData.offset;if(d===eO&&E){var O=E[i];Object.keys(C).forEach(function(I){var R=[Xd,Zd].indexOf(I)>=0?1:-1,B=[C0,Zd].indexOf(I)>=0?"y":"x";C[I]+=O[B]*R})}return C}function IXr(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?sG:c,d=g_(n),h=d?l?hGe:hGe.filter(function(m){return g_(m)===d}):JA,p=h.filter(function(m){return u.indexOf(m)>=0});p.length===0&&(p=h);var f=p.reduce(function(m,g){return m[g]=iO(e,{placement:g,boundary:i,rootBoundary:o,padding:s})[Uf(g)],m},{});return Object.keys(f).sort(function(m,g){return f[m]-f[g]})}function PXr(e){if(Uf(e)===lue)return[];var t=dG(e);return[xGe(e),t,xGe(t)]}function VXr(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,s=r.altAxis,l=s===void 0?!0:s,c=r.fallbackPlacements,u=r.padding,d=r.boundary,h=r.rootBoundary,p=r.altBoundary,f=r.flipVariations,m=f===void 0?!0:f,g=r.allowedAutoPlacements,T=t.options.placement,y=Uf(T),v=y===T,Q=c||(v||!m?[dG(T)]:PXr(T)),_=[T].concat(Q).reduce(function(Qe,me){return Qe.concat(Uf(me)===lue?IXr(t,{placement:me,boundary:d,rootBoundary:h,padding:u,flipVariations:m,allowedAutoPlacements:g}):me)},[]),L=t.rects.reference,w=t.rects.popper,S=new Map,C=!0,E=_[0],O=0;O<_.length;O++){var I=_[O],R=Uf(I),B=g_(I)===h_,D=[C0,Zd].indexOf(R)>=0,j=D?"width":"height",N=iO(t,{placement:I,boundary:d,rootBoundary:h,altBoundary:p,padding:u}),V=D?B?Xd:M0:B?Zd:C0;L[j]>w[j]&&(V=dG(V));var W=dG(V),G=[];if(o&&G.push(N[R]<=0),l&&G.push(N[V]<=0,N[W]<=0),G.every(function(Qe){return Qe})){E=I,C=!1;break}S.set(I,G)}if(C)for(var X=m?3:1,$=function(Qe){var me=_.find(function(ne){var le=S.get(ne);if(le)return le.slice(0,Qe).every(function(ee){return ee})});if(me)return E=me,"break"},te=X;te>0;te--){var ce=$(te);if(ce==="break")break}t.placement!==E&&(t.modifiersData[n]._skip=!0,t.placement=E,t.reset=!0)}}var HXr={name:"flip",enabled:!0,phase:"main",fn:VXr,requiresIfExists:["offset"],data:{_skip:!1}};function SGe(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function kGe(e){return[C0,Xd,Zd,M0].some(function(t){return e[t]>=0})}function RXr(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=iO(t,{elementContext:"reference"}),l=iO(t,{altBoundary:!0}),c=SGe(s,n),u=SGe(l,i,o),d=kGe(c),h=kGe(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}var NXr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:RXr};function BXr(e,t,r){var n=Uf(e),i=[M0,C0].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[M0,Xd].indexOf(n)>=0?{x:l,y:s}:{x:s,y:l}}function FXr(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,s=sG.reduce(function(d,h){return d[h]=BXr(h,t.rects,o),d},{}),l=s[t.placement],c=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=s}var DXr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:FXr};function zXr(e){var t=e.state,r=e.name;t.modifiersData[r]=LGe({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var CGe={name:"popperOffsets",enabled:!0,phase:"read",fn:zXr,data:{}};function jXr(e){return e==="x"?"y":"x"}function UXr(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,s=r.altAxis,l=s===void 0?!1:s,c=r.boundary,u=r.rootBoundary,d=r.altBoundary,h=r.padding,p=r.tether,f=p===void 0?!0:p,m=r.tetherOffset,g=m===void 0?0:m,T=iO(t,{boundary:c,rootBoundary:u,padding:h,altBoundary:d}),y=Uf(t.placement),v=g_(t.placement),Q=!v,_=due(y),L=jXr(_),w=t.modifiersData.popperOffsets,S=t.rects.reference,C=t.rects.popper,E=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,O=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(w){if(o){var B,D=_==="y"?C0:M0,j=_==="y"?Zd:Xd,N=_==="y"?"height":"width",V=w[_],W=V+T[D],G=V-T[j],X=f?-C[N]/2:0,$=v===h_?S[N]:C[N],te=v===h_?-C[N]:-S[N],ce=t.elements.arrow,Qe=f&&ce?uue(ce):{width:0,height:0},me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:gGe(),ne=me[D],le=me[j],ee=rO(0,S[N],Qe[N]),oe=Q?S[N]/2-X-ee-ne-O.mainAxis:$-ee-ne-O.mainAxis,ie=Q?-S[N]/2+X+ee+le+O.mainAxis:te+ee+le+O.mainAxis,he=t.elements.arrow&&tO(t.elements.arrow),we=he?_==="y"?he.clientTop||0:he.clientLeft||0:0,Pe=(B=I==null?void 0:I[_])!=null?B:0,pe=V+oe-Pe-we,Ce=V+ie-Pe,Le=rO(f?lG(W,pe):W,V,f?hT(G,Ce):G);w[_]=Le,R[_]=Le-V}if(l){var Oe,De=_==="x"?C0:M0,ot=_==="x"?Zd:Xd,rt=w[L],dt=L==="y"?"height":"width",wt=rt+T[De],yt=rt-T[ot],ye=[C0,M0].indexOf(y)!==-1,Xe=(Oe=I==null?void 0:I[L])!=null?Oe:0,pt=ye?wt:rt-S[dt]-C[dt]-Xe+O.altAxis,ft=ye?rt+S[dt]+C[dt]-Xe-O.altAxis:yt,_t=f&&ye?yXr(pt,rt,ft):rO(f?pt:wt,rt,f?ft:yt);w[L]=_t,R[L]=_t-rt}t.modifiersData[n]=R}}var GXr={name:"preventOverflow",enabled:!0,phase:"main",fn:UXr,requiresIfExists:["offset"]};function WXr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function qXr(e){return e===Mp(e)||!Kd(e)?hue(e):WXr(e)}function ZXr(e){var t=e.getBoundingClientRect(),r=f_(t.width)/e.offsetWidth||1,n=f_(t.height)/e.offsetHeight||1;return r!==1||n!==1}function XXr(e,t,r){r===void 0&&(r=!1);var n=Kd(t),i=Kd(t)&&ZXr(t),o=r7(t),s=m_(e,i),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((jf(t)!=="body"||fue(o))&&(l=qXr(t)),Kd(t)?(c=m_(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=pue(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function KXr(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!r.has(l)){var c=t.get(l);c&&i(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function YXr(e){var t=KXr(e);return hXr.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function JXr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function $Xr(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var MGe={placement:"bottom",modifiers:[],strategy:"absolute"};function EGe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function gue(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?MGe:i;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},MGe,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],h=!1,p={state:u,setOptions:function(g){var T=typeof g=="function"?g(u.options):g;m(),u.options=Object.assign({},o,u.options,T),u.scrollParents={reference:p_(s)?nO(s):s.contextElement?nO(s.contextElement):[],popper:nO(l)};var y=YXr($Xr([].concat(n,u.options.modifiers)));return u.orderedModifiers=y.filter(function(v){return v.enabled}),f(),p.update()},forceUpdate:function(){if(!h){var g=u.elements,T=g.reference,y=g.popper;if(EGe(T,y)){u.rects={reference:XXr(T,tO(y),u.options.strategy==="fixed"),popper:uue(y)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(C){return u.modifiersData[C.name]=Object.assign({},C.data)});for(var v=0;v<u.orderedModifiers.length;v++){if(u.reset===!0){u.reset=!1,v=-1;continue}var Q=u.orderedModifiers[v],_=Q.fn,L=Q.options,w=L===void 0?{}:L,S=Q.name;typeof _=="function"&&(u=_({state:u,options:w,name:S,instance:p})||u)}}}},update:JXr(function(){return new Promise(function(g){p.forceUpdate(),g(u)})}),destroy:function(){m(),h=!0}};if(!EGe(s,l))return p;p.setOptions(c).then(function(g){!h&&c.onFirstUpdate&&c.onFirstUpdate(g)});function f(){u.orderedModifiers.forEach(function(g){var T=g.name,y=g.options,v=y===void 0?{}:y,Q=g.effect;if(typeof Q=="function"){var _=Q({state:u,name:T,instance:p,options:v}),L=function(){};d.push(_||L)}})}function m(){d.forEach(function(g){return g()}),d=[]}return p}}gue();var eKr=[QGe,CGe,bGe,pGe];gue({defaultModifiers:eKr});var tKr=[QGe,CGe,bGe,pGe,DXr,HXr,GXr,QXr,NXr],rKr=gue({defaultModifiers:tKr});const nKr=(e,t,r={})=>{const n={name:"updateState",enabled:!0,phase:"write",fn:({state:c})=>{const u=iKr(c);Object.assign(s.value,u)},requires:["computeStyles"]},i=a.computed(()=>{const{onFirstUpdate:c,placement:u,strategy:d,modifiers:h}=a.unref(r);return{onFirstUpdate:c,placement:u||"bottom",strategy:d||"absolute",modifiers:[...h||[],n,{name:"applyStyles",enabled:!1}]}}),o=a.shallowRef(),s=a.ref({styles:{popper:{position:a.unref(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{o.value&&(o.value.destroy(),o.value=void 0)};return a.watch(i,c=>{const u=a.unref(o);u&&u.setOptions(c)},{deep:!0}),a.watch([e,t],([c,u])=>{l(),!(!c||!u)&&(o.value=rKr(c,u,a.unref(i)))}),a.onBeforeUnmount(()=>{l()}),{state:a.computed(()=>{var c;return{...((c=a.unref(o))==null?void 0:c.state)||{}}}),styles:a.computed(()=>a.unref(s).styles),attributes:a.computed(()=>a.unref(s).attributes),update:()=>{var c;return(c=a.unref(o))==null?void 0:c.update()},forceUpdate:()=>{var c;return(c=a.unref(o))==null?void 0:c.forceUpdate()},instanceRef:a.computed(()=>a.unref(o))}};function iKr(e){const t=Object.keys(e.elements),r=tG(t.map(i=>[i,e.styles[i]||{}])),n=tG(t.map(i=>[i,e.attributes[i]]));return{styles:r,attributes:n}}function AGe(){let e;const t=(n,i)=>{r(),e=window.setTimeout(n,i)},r=()=>window.clearTimeout(e);return WU(()=>r()),{registerTimeout:t,cancelTimeout:r}}const yue={prefix:Math.floor(Math.random()*1e4),current:0},oKr=Symbol("elIdInjection"),Tue=()=>a.getCurrentInstance()?a.inject(oKr,yue):yue,hG=e=>{const t=Tue();!W1&&t===yue&&qd("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
3096
3096
  usage: app.provide(ID_INJECTION_KEY, {