{"remainingRequest":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/babel-loader/lib/index.js!/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/eslint-loader/index.js??ref--14-0!/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/components/scripts/utilities.js","dependencies":[{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/components/scripts/utilities.js","mtime":1691447163859},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/babel.config.js","mtime":1684261475125},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/eslint-loader/index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:dmFyIF9yZWdlbmVyYXRvclJ1bnRpbWUgPSByZXF1aXJlKCIvaG9tZS9jbWlzcy9KZW5raW5zL3dvcmtzcGFjZS9tYXBpbnRlZ3JhdGVkdnVlci9ub2RlX21vZHVsZXMvQGJhYmVsL3J1bnRpbWUvaGVscGVycy9yZWdlbmVyYXRvclJ1bnRpbWUuanMiKS5kZWZhdWx0Owp2YXIgX2FzeW5jVG9HZW5lcmF0b3IgPSByZXF1aXJlKCIvaG9tZS9jbWlzcy9KZW5raW5zL3dvcmtzcGFjZS9tYXBpbnRlZ3JhdGVkdnVlci9ub2RlX21vZHVsZXMvQGJhYmVsL3J1bnRpbWUvaGVscGVycy9hc3luY1RvR2VuZXJhdG9yLmpzIikuZGVmYXVsdDsKcmVxdWlyZSgiY29yZS1qcy9tb2R1bGVzL2VzLm9iamVjdC50by1zdHJpbmcuanMiKTsKcmVxdWlyZSgiY29yZS1qcy9tb2R1bGVzL3dlYi5kb20tY29sbGVjdGlvbnMuaXRlcmF0b3IuanMiKTsKcmVxdWlyZSgiY29yZS1qcy9tb2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DA6CiAgICAgICAgICBlbnRyeSA9IHt9OwogICAgICAgICAgaWYgKCEodHlwZSA9PT0gIkFDIikpIHsKICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDU7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgZW50cnkgPSB7CiAgICAgICAgICAgIHJlc291cmNlOiAiUmF0IiwKICAgICAgICAgICAgdHlwZTogIk11bHRpRmxhdG1hcCIsCiAgICAgICAgICAgIG1vZGU6ICJtYWluIiwKICAgICAgICAgICAgc3RhdGU6IHVuZGVmaW5lZCwKICAgICAgICAgICAgbGFiZWw6ICIiLAogICAgICAgICAgICBkaXNjb3ZlcklkOiB1bmRlZmluZWQKICAgICAgICAgIH07CiAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMTQ7CiAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlIDU6CiAgICAgICAgICBpZiAoISh0eXBlID09PSAiRkMiKSkgewogICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gOTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBlbnRyeSA9IHsKICAgICAgICAgICAgcmVzb3VyY2U6ICJGdW5jdGlvbmFsQ29ubmVjdGl2aXR5IiwKICAgICAgICAgICAgdHlwZTogIkZsYXRtYXAiLAogICAgICAgICAgICBtb2RlOiAibWFpbiIsCiAgICAgICAgICAgIHN0YXRlOiB1bmRlZmluZWQsCiAgICAgICAgICAgIGxhYmVsOiAiRnVuY3Rpb25hbCIsCiAgICAgICAgICAgIGRpc2NvdmVySWQ6IHVuZGVmaW5lZAogICAgICAgICAgfTsKICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSAxNDsKICAgICAgICAgIGJyZWFrOwogICAgICAgIGNhc2UgOToKICAgICAgICAgIGlmICghKHR5cGUgPT09ICIzRCIpKSB7CiAgICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSAxNDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMTI7CiAgICAgICAgICByZXR1cm4gZ2V0Qm9keVNjYWZmb2xkKHNwYXJjQXBpLCAiaHVtYW4iKTsKICAgICAgICBjYXNlIDEyOgogICAgICAgICAgdXJsID0gX2NvbnRleHQuc2VudDsKICAgICAgICAgIGVudHJ5ID0gewogICAgICAgICAgICByZXNvdXJjZTogdXJsLAogICAgICAgICAgICB0eXBlOiAiU2NhZmZvbGQiLAogICAgICAgICAgICBtb2RlOiAibWFpbiIsCiAgICAgICAgICAgIHN0YXRlOiB1bmRlZmluZWQsCiAgICAgICAgICAgIGxhYmVsOiAiSHVtYW4iLAogICAgICAgICAgICBpc0JvZHlTY2FmZm9sZDogdHJ1ZQogICAgICAgICAgfTsKICAgICAgICBjYXNlIDE0OgogICAgICAgICAgcmV0dXJuIF9jb250ZXh0LmFicnVwdCgicmV0dXJuIiwgZW50cnkpOwogICAgICAgIGNhc2UgMTU6CiAgICAgICAgY2FzZSAiZW5kIjoKICAgICAgICAgIHJldHVybiBfY29udGV4dC5zdG9wKCk7CiAgICAgIH0KICAgIH0sIF9jYWxsZWUpOwogIH0pKTsKICByZXR1cm4gZnVuY3Rpb24gZ2V0TmV3TWFwRW50cnkoX3gsIF94MikgewogICAgcmV0dXJuIF9yZWYuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICB9Owp9KCk7CgovKgogKiBJbml0aWFsIHN0YXRlIGZvciB0aGUgc3BsaXQgZmxvdwogKi8KdmFyIGluaXRpYWxTdGF0ZSA9IC8qI19fUFVSRV9fKi9mdW5jdGlvbiAoKSB7CiAgdmFyIF9yZWYyID0gX2FzeW5jVG9HZW5lcmF0b3IoIC8qI19fUFVSRV9fKi9fcmVnZW5lcmF0b3JSdW50aW1lKCkubWFyayhmdW5jdGlvbiBfY2FsbGVlMih0eXBlLCBzcGFyY0FwaSkgewogICAgdmFyIHN0YXRlLCB1cmw7CiAgICByZXR1cm4gX3JlZ2VuZXJhdG9yUnVudGltZSgpLndyYXAoZnVuY3Rpb24gX2NhbGxlZTIkKF9jb250ZXh0MikgewogICAgICB3aGlsZSAoMSkgc3dpdGNoIChfY29udGV4dDIucHJldiA9IF9jb250ZXh0Mi5uZXh0KSB7CiAgICAgICAgY2FzZSAwOgogICAgICAgICAgc3RhdGUgPSBpbml0aWFsRGVmYXVsdFN0YXRlKCk7CiAgICAgICAgICBpZiAoISh0eXBlID09PSAiRkMiKSkgewogICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDg7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgc3RhdGUubWFpblRhYk5hbWUgPSAiRmxhdG1hcCI7CiAgICAgICAgICBzdGF0ZS5lbnRyaWVzWzBdLnJlc291cmNlID0gIkZ1bmN0aW9uYWxDb25uZWN0aXZpdHkiOwogICAgICAgICAgc3RhdGUuZW50cmllc1swXS50eXBlID0gIkZsYXRtYXAiOwogICAgICAgICAgc3RhdGUuZW50cmllc1swXS5sYWJlbCA9ICJGdW5jdGlvbmFsIjsKICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gMTc7CiAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlIDg6CiAgICAgICAgICBpZiAoISh0eXBlID09PSAiV2hvbGVCb2R5IikpIHsKICAgICAgICAgICAgX2NvbnRleHQyLm5leHQgPSAxNzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDExOwogICAgICAgICAgcmV0dXJuIGdldEJvZHlTY2FmZm9sZChzcGFyY0FwaSwgImh1bWFuIik7CiAgICAgICAgY2FzZSAxMToKICAgICAgICAgIHVybCA9IF9jb250ZXh0Mi5zZW50OwogICAgICAgICAgc3RhdGUubWFpblRhYk5hbWUgPSAiU2NhZmZvbGQiOwogICAgICAgICAgc3RhdGUuZW50cmllc1swXS5yZXNvdXJjZSA9IHVybDsKICAgICAgICAgIHN0YXRlLmVudHJpZXNbMF0udHlwZSA9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IH0sCiAgICAiSHVtYW4gTWFsZSI6IHsKICAgICAgdGF4bzogIk5DQklUYXhvbjo5NjA2IiwKICAgICAgYmlvbG9naWNhbFNleDogIlBBVE86MDAwMDM4NCIsCiAgICAgIGljb25DbGFzczogIm1hcGljb24taWNvbl9odW1hbiIsCiAgICAgIGRpc3BsYXlMYXRlc3RDaGFuZ2VzOiB0cnVlLAogICAgICBkaXNwbGF5V2FybmluZzogdHJ1ZQogICAgfSwKICAgICJSYXQiOiB7CiAgICAgIHRheG86ICJOQ0JJVGF4b246MTAxMTQiLAogICAgICBpY29uQ2xhc3M6ICJtYXBpY29uLWljb25fcmF0IiwKICAgICAgZGlzcGxheUxhdGVzdENoYW5nZXM6IHRydWUsCiAgICAgIGRpc3BsYXlXYXJuaW5nOiB0cnVlCiAgICB9LAogICAgIk1vdXNlIjogewogICAgICB0YXhvOiAiTkNCSVRheG9uOjEwMDkwIiwKICAgICAgaWNvbkNsYXNzOiAibWFwaWNvbi1pY29uX21vdXNlIiwKICAgICAgZGlzcGxheUxhdGVzdENoYW5nZXM6IHRydWUsCiAgICAgIGRpc3BsYXlXYXJuaW5nOiB0cnVlCiAgICB9LAogICAgIlBpZyI6IHsKICAgICAgdGF4bzogIk5DQklUYXhvbjo5ODIzIiwKICAgICAgaWNvbkNsYXNzOiAibWFwaWNvbi1pY29uX3BpZyIsCiAgICAgIGRpc3BsYXlMYXRlc3RDaGFuZ2VzOiB0cnVlLAogICAgICBkaXNwbGF5V2FybmluZzogdHJ1ZQogICAgfSwKICAgICJDYXQiOiB7CiAgICAgIHRheG86ICJOQ0JJVGF4b246OTY4NSIsCiAgICAgIGljb25DbGFzczogIm1hcGljb24taWNvbl9jYXQiLAogICAgICBkaXNwbGF5TGF0ZXN0Q2hhbmdlczogdHJ1ZSwKICAgICAgZGlzcGxheVdhcm5pbmc6IHRydWUKICAgIH0KICB9Owp9OwoKLyoKICogTG9vayBmb3IgdGhlIGtleSBpbiBhdmFpbGFibGVTcGVjaWVzIHd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ZSwgZGF0YSwgYnVja2V0OwogICAgcmV0dXJuIF9yZWdlbmVyYXRvclJ1bnRpbWUoKS53cmFwKGZ1bmN0aW9uIF9jYWxsZWUzJChfY29udGV4dDMpIHsKICAgICAgd2hpbGUgKDEpIHN3aXRjaCAoX2NvbnRleHQzLnByZXYgPSBfY29udGV4dDMubmV4dCkgewogICAgICAgIGNhc2UgMDoKICAgICAgICAgIF9jb250ZXh0My5uZXh0ID0gMjsKICAgICAgICAgIHJldHVybiBmZXRjaCgiIi5jb25jYXQoc3BhcmNBcGksICJnZXRfYm9keV9zY2FmZm9sZF9pbmZvLyIpLmNvbmNhdChzcGVjaWVzKSk7CiAgICAgICAgY2FzZSAyOgogICAgICAgICAgcmVzcG9uc2UgPSBfY29udGV4dDMuc2VudDsKICAgICAgICAgIGlmICghcmVzcG9uc2Uub2spIHsKICAgICAgICAgICAgX2NvbnRleHQzLm5leHQgPSAxMTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBfY29udGV4dDMubmV4dCA9IDY7CiAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpOwogICAgICAgIGNhc2UgNjoKICAgICAgICAgIGRhdGEgPSBfY29udGV4dDMuc2VudDsKICAgICAgICAgIC8vQ29uc3RydWN0IHRoZSB1cmwgZW5kcG9pbnQgZm9yIGRvd25sb2FkaW5nIHRoZSBzY2FmZm9sZAogICAgICAgICAgYnVja2V0ID0gZXh0cmFjdFMzQnVja2V0TmFtZShkYXRhLnMzdXJpKTsKICAgICAgICAgIHJldHVybiBfY29udGV4dDMuYWJydXB0KCJyZXR1cm4iLCAiIi5jb25jYXQoc3BhcmNBcGksICJzMy1yZXNvdXJjZS8iKS5jb25jYXQoZGF0YS5pZCwgIi8iKS5jb25jYXQoZGF0YS52ZXJzaW9uLCAiL2ZpbGVzLyIpLmNvbmNhdChkYXRhLnBhdGgsICI/czNCdWNrZXROYW1lPSIpLmNvbmNhdChidWNrZXQpKTsKICAgICAgIC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gZmluZFNwZWNpZXNLZXk7CmV4cG9ydHMuaW5pdGlhbFN0YXRlID0gaW5pdGlhbFN0YXRlOwpleHBvcnRzLmluaXRpYWxEZWZhdWx0U3RhdGUgPSBpbml0aWFsRGVmYXVsdFN0YXRlOwpleHBvcnRzLmdldEJvZHlTY2FmZm9sZCA9IGdldEJvZHlTY2FmZm9sZDsKZXhwb3J0cy5nZXROZXdNYXBFbnRyeSA9IGdldE5ld01hcEVudHJ5Ow=="},{"version":3,"names":["initialDefaultState","mainTabName","zIndex","showDialogIcons","activeDockedId","currentCount","entries","resource","type","mode","id","state","undefined","label","discoverId","sideBarVisibility","search","startUp","getNewMapEntry","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","sparcApi","entry","url","wrap","_callee$","_context","prev","next","getBodyScaffold","sent","isBodyScaffold","abrupt","stop","_x","_x2","apply","arguments","initialState","_ref2","_callee2","_callee2$","_context2","_x3","_x4","capitalise","term","charAt","toUpperCase","slice","availableSpecies","taxo","biologicalSex","iconClass","displayLatestChanges","displayWarning","findSpeciesKey","condition","list","key","extractS3BucketName","uri","substring","split","_ref3","_callee3","species","response","data","bucket","_callee3$","_context3","fetch","concat","ok","json","s3uri","version","path","_x5","_x6","exports"],"sources":["/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/components/scripts/utilities.js"],"sourcesContent":["const initialDefaultState = () => {\n return {\n mainTabName: \"Flatmap\",\n zIndex: 1,\n showDialogIcons: false,\n activeDockedId: 1,\n currentCount: 1,\n entries: [\n {\n resource: \"Rat\",\n type: \"MultiFlatmap\",\n zIndex: 1,\n mode: \"main\",\n id: 1,\n state: undefined,\n label: \"\",\n discoverId: undefined\n }\n ],\n sideBarVisibility: true,\n search: '',\n startUp: true\n };\n}\n\nconst getNewMapEntry = async (type, sparcApi) => {\n let entry = { };\n if (type === \"AC\") {\n entry = {\n resource: \"Rat\",\n type: \"MultiFlatmap\",\n mode: \"main\",\n state: undefined,\n label: \"\",\n discoverId: undefined\n };\n } else if (type === \"FC\") {\n entry = {\n resource: \"FunctionalConnectivity\",\n type: \"Flatmap\",\n mode: \"main\",\n state: undefined,\n label: \"Functional\",\n discoverId: undefined\n }\n } else if (type === \"3D\") {\n const url = await getBodyScaffold(sparcApi, \"human\");\n entry = {\n resource: url,\n type: \"Scaffold\",\n mode: \"main\",\n state: undefined,\n label: \"Human\",\n isBodyScaffold: true\n };\n }\n\n return entry;\n}\n\n/*\n * Initial state for the split flow\n */\nconst initialState = async (type, sparcApi) => {\n const state = initialDefaultState();\n if (type === \"FC\") {\n state.mainTabName = \"Flatmap\";\n state.entries[0].resource = \"FunctionalConnectivity\";\n state.entries[0].type = \"Flatmap\";\n state.entries[0].label = \"Functional\";\n } else if (type === \"WholeBody\") {\n const url = await getBodyScaffold(sparcApi, \"human\");\n state.mainTabName = \"Scaffold\";\n state.entries[0].resource = url;\n state.entries[0].type = \"Scaffold\";\n state.entries[0].label = \"Human\";\n state.entries[0].isBodyScaffold = true;\n }\n\n return state;\n}\n\nconst capitalise = term => {\n if (term)\n return term.charAt(0).toUpperCase() + term.slice(1);\n return term;\n};\n\n/*\n * Provide a list of available species for the flatmap\n */\nconst availableSpecies = () => {\n return {\n \"Human Female\": { taxo: \"NCBITaxon:9606\", biologicalSex: \"PATO:0000383\", iconClass: \"mapicon-icon_human\", displayLatestChanges: true, displayWarning: true },\n \"Human Male\": { taxo: \"NCBITaxon:9606\", biologicalSex: \"PATO:0000384\", iconClass: \"mapicon-icon_human\", displayLatestChanges: true, displayWarning: true },\n \"Rat\": { taxo: \"NCBITaxon:10114\", iconClass: \"mapicon-icon_rat\", displayLatestChanges: true, displayWarning: true },\n \"Mouse\": { taxo: \"NCBITaxon:10090\", iconClass: \"mapicon-icon_mouse\", displayLatestChanges: true, displayWarning: true },\n \"Pig\": { taxo: \"NCBITaxon:9823\", iconClass: \"mapicon-icon_pig\", displayLatestChanges: true, displayWarning: true },\n \"Cat\": { taxo: \"NCBITaxon:9685\", iconClass: \"mapicon-icon_cat\", displayLatestChanges: true, displayWarning: true },\n }\n}\n\n/*\n * Look for the key in availableSpecies with the provided condition\n */\nconst findSpeciesKey = condition => {\n if (condition) {\n const list = availableSpecies();\n for (let key in list) {\n if (condition.taxo === list[key].taxo) {\n if (condition.biologicalSex && list[key].biologicalSex) {\n if (condition.biologicalSex === list[key].biologicalSex)\n return key;\n } else {\n return key;\n }\n }\n }\n }\n return \"\";\n}\n\nconst extractS3BucketName = uri => {\n if (uri) {\n const substring = uri.split(\"//\")[1]\n if (substring) {\n return substring.split(\"/\")[0]\n }\n }\n return undefined\n}\n\nconst getBodyScaffold = async (sparcApi, species) => {\n //Get body scaffold information\n const response = await fetch(`${sparcApi}get_body_scaffold_info/${species}`);\n if (response.ok) {\n const data = await response.json();\n //Construct the url endpoint for downloading the scaffold\n const bucket = extractS3BucketName(data.s3uri);\n return `${sparcApi}s3-resource/${data.id}/${data.version}/files/${data.path}?s3BucketName=${bucket}`;\n } else {\n //Use default url if data is not found for any reason\n if (species === \"rat\") {\n return \"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json\";\n } else if (species === \"human\") {\n return \"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/27-4-23-human/human_body_metadata.json\";\n }\n }\n}\n\nexports.availableSpecies = availableSpecies;\nexports.capitalise = capitalise;\nexports.findSpeciesKey = findSpeciesKey;\nexports.initialState = initialState;\nexports.initialDefaultState = initialDefaultState;\nexports.getBodyScaffold = getBodyScaffold;\nexports.getNewMapEntry = getNewMapEntry;\n"],"mappings":";;;;;;AAAA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAA,EAAS;EAChC,OAAO;IACLC,WAAW,EAAE,SAAS;IACtBC,MAAM,EAAE,CAAC;IACTC,eAAe,EAAE,KAAK;IACtBC,cAAc,EAAE,CAAC;IACjBC,YAAY,EAAE,CAAC;IACfC,OAAO,EAAE,CACP;MACEC,QAAQ,EAAE,KAAK;MACfC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