{"version":3,"sources":["webpack:///./infrastructure/presentation/views/SearchView.vue?d1d4","webpack:///./infrastructure/presentation/views/SearchView.vue?804b","webpack:///./infrastructure/presentation/views/SearchView.vue?4461","webpack:///./infrastructure/presentation/views/SearchView.vue?a3eb","webpack:///./infrastructure/presentation/views/SearchView.vue?2fe8"],"names":["_withScopeId","n","_hoisted_1","_hoisted_2","key","class","_hoisted_3","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","render","_ctx","_cache","$props","$setup","$data","$options","_component_ModalIntroductoryContent","_component_Comment","_component_content_fallback","_component_CommentsModal","_component_card","_component_Slide","_component_Navigation","_component_carousel","_component_course","_component_PaginationDefault","openModalIntroductoryContent","course","introductoryContent","onClose","closeModalIntroductoryContent","isCommentsModalOpen","onCloseCommentsModal","closeCommentsModal","title","commentModalTitle","default","comments","length","comment","index","userName","message","date","toLocaleDateTime","createAt","stars","rating","userImage","contentName","_","schoolsSearch","courseTracksSearch","coursesSearch","settings","filterSettings","breakpoints","filterBreakpoints","addons","courseTrack","entity","onClick","$event","goToCourseTrackDetails","id","onOpenIntroductoryContent","openIntroductoryContent","onLoadCourseCommentsModal","loadCourseCommentsModal","onOpenCourse","$router","push","name","params","course_id","coursesPage","currentPage","Number","$route","query","page","onChangePage","updateQuery","components","PaginationDefault","Comment","CommentsModal","Event","Card","ContentFallback","Carousel","Slide","CourseTrack","Navigation","Pagination","ModalIntroductoryContent","store","router","route","getters","itemsToShow","snapAlign","wrapAround","320","400","470","560","630","720","820","920","1020","1120","1270","1320","1920","2340","showEntity","value","goToSchoolDetails","async","search","entityID","_course","disableBodyOverflow","document","body","style","overflow","enableBodyOverflow","openCommentsModal","dispatch","loadContentCommentsById","e","console","error","listCourses","order","__exports__"],"mappings":"2IAAA,W,kFCEA,MAAMA,EAAeC,IAAM,eAAa,mBAAmBA,EAAEA,IAAI,iBAAcA,GACzEC,EAA2BF,EAAa,IAAmB,eAAoB,OAAQ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AQ,GAGjCvF,EAA4C,eAChD,IAAMiE,EAAMG,QAAQ,sCAIhByB,EAAsB,KAC1BC,SAASC,KAAKC,MAAMC,SAAW,UAI3BC,EAAqB,KACzBJ,SAASC,KAAKC,MAAMC,SAAW,QAI3BE,EAAoBV,UACxBI,UACM5B,EAAMmC,SAAS,oCAIjBlG,EAAqBuF,UACzBS,UACMjC,EAAMmC,SAAS,0CACfnC,EAAMmC,SAAS,gCAIjBC,EAA0BZ,eACxBxB,EAAMmC,SAAS,wCAAyCxG,EAAOqC,IAGjE7B,EAAoB,eAAI,IAGxBiC,EAA0BoD,UAC9B,IACErF,EAAkBmF,MAAQ3F,EAAOO,YAC3BgG,UACAE,EAAwBzG,GAC9B,MAAO0G,GACHA,aAAa,aACT,eAAiBA,EAAE3F,UAEzB4F,QAAQC,MAAMF,SACR,eAAiB,kCAKvBhG,EAA0C,eAC9C,IAAM2D,EAAMG,QAAQ,2BAGhBqC,EAAchB,UAClB,IACE,MAAMiB,EAAQ,eAAgBvC,SACxB,eAAYsB,gBACVxB,EAAMmC,SAAS,kCAAmCM,KAE1D,MAAOJ,SACD,eAAcA,KAkBxB,OAbA,eACE,IAAMnC,EAAMnB,MAAMC,KAClBwC,UACMtB,EAAMnB,MAAMC,YACRwD,MAKZ,eAAchB,gBACNgB,MAGD,CACLrF,gBACAC,qBACAC,gBACAE,iBACAE,oBACA/B,+BACAC,SACAU,WACAN,sBACAI,oBACAwC,cACA4C,oBACAxD,yBACAsD,aACAnD,0BACApC,gCACAsC,0BACAnC,qBACAW,iBAAA,OACAsC,YAAA,W,2CC/QN,MAAMwD,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASjI,GAAQ,CAAC,YAAY,qBAE1E,gB,kCCVf","file":"js/chunk-b1f18e62.05e28a5c.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./SearchView.vue?vue&type=style&index=0&id=0bda3c4e&lang=css\"","import { resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0bda3c4e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"Não há nenhum comentário por aqui\", -1))\nconst _hoisted_2 = {\n key: 2,\n class: \"search__content view\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"search__header\" }, [\n /*#__PURE__*/_createElementVNode(\"span\", null, \"Resultados encontrados \")\n], -1))\nconst _hoisted_4 = {\n key: 0,\n class: \"search__results\"\n}\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"search__tag\" }, \"Escolas\", -1))\nconst _hoisted_6 = { class: \"cards__track\" }\nconst _hoisted_7 = {\n key: 1,\n class: \"search__results\"\n}\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"search__tag\" }, \"Trilhas\", -1))\nconst _hoisted_9 = { class: \"cards__track\" }\nconst _hoisted_10 = {\n key: 2,\n class: \"search__results\"\n}\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"search__tag\" }, \"Treinamentos\", -1))\nconst _hoisted_12 = { class: \"list-cards\" }\nconst _hoisted_13 = {\n key: 3,\n class: \"shop-empty fallback\"\n}\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"p\", { class: \"shop-empty__label\" }, \"Nenhum resultado foi encontrado.\", -1))\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_ModalIntroductoryContent = _resolveComponent(\"ModalIntroductoryContent\")!\n const _component_Comment = _resolveComponent(\"Comment\")!\n const _component_content_fallback = _resolveComponent(\"content-fallback\")!\n const _component_CommentsModal = _resolveComponent(\"CommentsModal\")!\n const _component_card = _resolveComponent(\"card\")!\n const _component_Slide = _resolveComponent(\"Slide\")!\n const _component_Navigation = _resolveComponent(\"Navigation\")!\n const _component_carousel = _resolveComponent(\"carousel\")!\n const _component_course = _resolveComponent(\"course\")!\n const _component_PaginationDefault = _resolveComponent(\"PaginationDefault\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_ctx.openModalIntroductoryContent && _ctx.course.introductoryContent)\n ? (_openBlock(), _createBlock(_component_ModalIntroductoryContent, {\n key: 0,\n onClose: _ctx.closeModalIntroductoryContent,\n \"introductory-content\": _ctx.course.introductoryContent\n }, null, 8, [\"onClose\", \"introductory-content\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.isCommentsModalOpen)\n ? (_openBlock(), _createBlock(_component_CommentsModal, {\n key: 1,\n onCloseCommentsModal: _ctx.closeCommentsModal,\n title: _ctx.commentModalTitle\n }, {\n default: _withCtx(() => [\n (_ctx.comments.length)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(_ctx.comments, (comment, index) => {\n return (_openBlock(), _createBlock(_component_Comment, {\n key: index,\n \"user-name\": comment.userName,\n comment: comment.message,\n date: _ctx.toLocaleDateTime(comment.createAt),\n stars: comment.rating,\n \"user-image\": comment.userImage,\n \"content-name\": comment.contentName\n }, null, 8, [\"user-name\", \"comment\", \"date\", \"stars\", \"user-image\", \"content-name\"]))\n }), 128))\n : (_openBlock(), _createBlock(_component_content_fallback, { key: 1 }, {\n default: _withCtx(() => [\n _hoisted_1\n ]),\n _: 1\n }))\n ]),\n _: 1\n }, 8, [\"onCloseCommentsModal\", \"title\"]))\n : _createCommentVNode(\"\", true),\n (\r\n _ctx.schoolsSearch?.length ||\r\n _ctx.courseTracksSearch?.length ||\r\n _ctx.coursesSearch?.length\r\n )\n ? (_openBlock(), _createElementBlock(\"section\", _hoisted_2, [\n _hoisted_3,\n false\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n _hoisted_5,\n _createElementVNode(\"div\", _hoisted_6, [\n _createVNode(_component_carousel, {\n class: \"cards__entity\",\n settings: _ctx.filterSettings,\n breakpoints: _ctx.filterBreakpoints\n }, {\n addons: _withCtx(() => [\n _createVNode(_component_Navigation, { class: \"navigation\" })\n ]),\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.schoolsSearch, (school, index) => {\n return (_openBlock(), _createBlock(_component_Slide, { key: index }, {\n default: _withCtx(() => [\n _createVNode(_component_card, {\n \"entity-title\": school.name,\n entity: school,\n onClick: ($event: any) => (_ctx.goToSchoolDetails(school.id))\n }, null, 8, [\"entity-title\", \"entity\", \"onClick\"])\n ]),\n _: 2\n }, 1024))\n }), 128))\n ]),\n _: 1\n }, 8, [\"settings\", \"breakpoints\"])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.courseTracksSearch?.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _hoisted_8,\n _createElementVNode(\"div\", _hoisted_9, [\n _createVNode(_component_carousel, {\n class: \"cards__entity\",\n settings: _ctx.filterSettings,\n breakpoints: _ctx.filterBreakpoints\n }, {\n addons: _withCtx(() => [\n _createVNode(_component_Navigation, { class: \"navigation\" })\n ]),\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.courseTracksSearch, (courseTrack, index) => {\n return (_openBlock(), _createBlock(_component_Slide, { key: index }, {\n default: _withCtx(() => [\n _createVNode(_component_card, {\n \"entity-title\": courseTrack.title,\n entity: courseTrack,\n onClick: ($event: any) => (_ctx.goToCourseTrackDetails(courseTrack.id))\n }, null, 8, [\"entity-title\", \"entity\", \"onClick\"])\n ]),\n _: 2\n }, 1024))\n }), 128))\n ]),\n _: 1\n }, 8, [\"settings\", \"breakpoints\"])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.coursesSearch?.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n _hoisted_11,\n _createElementVNode(\"div\", _hoisted_12, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.coursesSearch, (course, index) => {\n return (_openBlock(), _createBlock(_component_course, {\n key: index,\n course: course,\n onOpenIntroductoryContent: ($event: any) => (_ctx.openIntroductoryContent(course)),\n onLoadCourseCommentsModal: ($event: any) => (_ctx.loadCourseCommentsModal(course)),\n onOpenCourse: ($event: any) => (\r\n _ctx.$router.push({ name: 'course', params: { course_id: course.id } })\r\n )\n }, null, 8, [\"course\", \"onOpenIntroductoryContent\", \"onLoadCourseCommentsModal\", \"onOpenCourse\"]))\n }), 128))\n ]),\n (_ctx.coursesPage)\n ? (_openBlock(), _createBlock(_component_PaginationDefault, {\n key: 0,\n \"qt-pages\": _ctx.coursesPage,\n currentPage: Number(_ctx.$route.query.page) || 1,\n onChangePage: _cache[0] || (_cache[0] = ($event: any) => (_ctx.updateQuery(_ctx.$router, 'page', $event)))\n }, null, 8, [\"qt-pages\", \"currentPage\"]))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_13, [\n _createVNode(_component_content_fallback, null, {\n default: _withCtx(() => [\n _hoisted_14\n ]),\n _: 1\n })\n ]))\n ], 64))\n}","\r\nimport {\r\n computed,\r\n ComputedRef,\r\n defineComponent,\r\n onBeforeMount,\r\n Ref,\r\n watch\r\n} from \"vue\";\r\nimport { useStore } from \"vuex\";\r\nimport {\r\n ContentComment,\r\n Course,\r\n CourseTrack,\r\n School\r\n} from \"../../../domain/entities/entities\";\r\nimport Card from \"../components/application/filters/Card.vue\";\r\nimport course from \"../components/application/Course.vue\";\r\nimport { Carousel, Navigation, Pagination, Slide } from \"vue3-carousel\";\r\nimport \"vue3-carousel/dist/carousel.css\";\r\nimport { useRoute, useRouter } from \"vue-router\";\r\nimport ContentFallback from \"../components/application/moldure/ContentFallback.vue\";\r\nimport ModalIntroductoryContent from \"../components/application/ModalIntroductoryContent.vue\";\r\nimport { ref } from \"@vue/runtime-core\";\r\nimport { RepositoryException } from \"../../../domain/exceptions/exceptions\";\r\nimport { dispatchErrorBox, toLocaleDateTime } from \"../components/mixins\";\r\nimport CommentsModal from \"../components/application/DashboardComments/CommentsModal.vue\";\r\nimport Comment from \"../components/application/DashboardComments/Comment.vue\";\r\nimport PaginationDefault from \"../components/application/shop/PaginationDefault.vue\";\r\nimport { updateQuery } from \"../utils/routing_utils\";\r\nimport { wrapLoading } from \"../utils/wrap_loading\";\r\nimport { dispatchError } from \"../utils/error_handling\";\r\nimport { getOrderFromURL } from \"../utils/order_utils\";\r\n\r\nexport default defineComponent({\r\n components: {\r\n PaginationDefault,\r\n Comment,\r\n CommentsModal,\r\n Event,\r\n Card,\r\n course,\r\n ContentFallback,\r\n Carousel,\r\n Slide,\r\n CourseTrack,\r\n Navigation,\r\n Pagination,\r\n ModalIntroductoryContent\r\n },\r\n setup() {\r\n const store = useStore();\r\n const router = useRouter();\r\n const route = useRoute();\r\n\r\n const openModalIntroductoryContent: Ref = ref(false);\r\n\r\n const course = ref(new Course());\r\n\r\n const schoolsSearch: ComputedRef = computed(\r\n () => store.getters[\"globalSearch_module/schools\"]\r\n );\r\n\r\n const courseTracksSearch: ComputedRef = computed(\r\n () => store.getters[\"globalSearch_module/courseTracks\"]\r\n );\r\n\r\n const coursesSearch: ComputedRef = computed(\r\n () => store.getters[\"globalSearch_module/courses\"]\r\n );\r\n\r\n const coursesPage: ComputedRef = computed(\r\n () => store.getters[\"globalSearch_module/coursesPage\"]\r\n );\r\n\r\n /** Todo: document this explaining where and how it's gonna be used. */\r\n const filterSettings = {\r\n itemsToShow: 1,\r\n snapAlign: \"center\",\r\n wrapAround: false\r\n };\r\n\r\n /** Todo: explain what the heck is this. */\r\n const filterBreakpoints = {\r\n 320: {\r\n itemsToShow: 1.15\r\n },\r\n\r\n 400: {\r\n itemsToShow: 1.5\r\n },\r\n 470: {\r\n itemsToShow: 1.75\r\n },\r\n\r\n 560: {\r\n itemsToShow: 2\r\n },\r\n\r\n 630: {\r\n itemsToShow: 2.6\r\n },\r\n\r\n 720: {\r\n itemsToShow: 3.15\r\n },\r\n\r\n 820: {\r\n itemsToShow: 3\r\n },\r\n\r\n 920: {\r\n itemsToShow: 3.25\r\n },\r\n\r\n 1020: {\r\n itemsToShow: 3.5\r\n },\r\n\r\n 1120: {\r\n itemsToShow: 4\r\n },\r\n\r\n 1270: {\r\n itemsToShow: 5\r\n },\r\n\r\n 1320: {\r\n itemsToShow: 6\r\n },\r\n 1920: {\r\n itemsToShow: 7\r\n },\r\n 2340: {\r\n itemsToShow: 9\r\n }\r\n };\r\n\r\n const showEntity = (): number => {\r\n return (\r\n schoolsSearch.value.length ||\r\n courseTracksSearch.value.length ||\r\n coursesSearch.value.length\r\n );\r\n };\r\n\r\n const goToSchoolDetails = async (id: number) => {\r\n // await router.push({},`/details-course-tracks/${String(id)}`);\r\n await router.push({\r\n name: \"details_course_tracks\",\r\n query: {\r\n search: route.query.search\r\n },\r\n params: {\r\n entityID: id\r\n }\r\n });\r\n };\r\n\r\n const goToCourseTrackDetails = async (id: number) => {\r\n await router.push({\r\n name: \"details_courses\",\r\n query: {\r\n search: route.query.search\r\n },\r\n params: {\r\n entityID: id\r\n }\r\n });\r\n };\r\n\r\n const openIntroductoryContent = (_course: Course): void => {\r\n course.value = _course;\r\n openModalIntroductoryContent.value = true;\r\n };\r\n\r\n const closeModalIntroductoryContent = (): void => {\r\n openModalIntroductoryContent.value = false;\r\n };\r\n\r\n const isCommentsModalOpen: ComputedRef = computed(\r\n () => store.getters[\"course_module/isCommentsModalOpen\"]\r\n );\r\n\r\n /** Disable the body overflow to not let the user scroll the page behind some modal while is open. */\r\n const disableBodyOverflow = () => {\r\n document.body.style.overflow = \"hidden\";\r\n };\r\n\r\n /** Enable the body overflow to let the user scroll the page after close some modal. */\r\n const enableBodyOverflow = () => {\r\n document.body.style.overflow = \"auto\";\r\n };\r\n\r\n /** Dispatch an action to open the comment modal on screen. */\r\n const openCommentsModal = async () => {\r\n disableBodyOverflow();\r\n await store.dispatch(\"course_module/openCommentsModal\");\r\n };\r\n\r\n /** Dispatch an action to open the comment modal on screen. */\r\n const closeCommentsModal = async () => {\r\n enableBodyOverflow();\r\n await store.dispatch(\"course_module/closeCommentsModal\");\r\n await store.dispatch(\"course_module/clearComments\");\r\n };\r\n\r\n /** Dispatch an action to load the comments. */\r\n const loadContentCommentsById = async (course: Course) =>\r\n await store.dispatch(\"course_module/loadContentCommentsById\", course.id);\r\n\r\n /** Is what will be the title of the comment modal. */\r\n const commentModalTitle = ref(\"\");\r\n\r\n /** Display the modal with the comments about the course. */\r\n const loadCourseCommentsModal = async (course: Course) => {\r\n try {\r\n commentModalTitle.value = course.title;\r\n await openCommentsModal();\r\n await loadContentCommentsById(course);\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n };\r\n\r\n const comments: ComputedRef = computed(\r\n () => store.getters[\"course_module/comments\"]\r\n );\r\n\r\n const listCourses = async (): Promise => {\r\n try {\r\n const order = getOrderFromURL(route);\r\n await wrapLoading(async () => {\r\n await store.dispatch(\"globalSearch_module/loadCourses\", order);\r\n });\r\n } catch (e) {\r\n await dispatchError(e);\r\n }\r\n };\r\n\r\n /** Watches the route changes and remakes the request to list the interests. */\r\n watch(\r\n () => route.query.page,\r\n async () => {\r\n if (route.query.page) {\r\n await listCourses();\r\n }\r\n }\r\n );\r\n\r\n onBeforeMount(async () => {\r\n await listCourses();\r\n });\r\n\r\n return {\r\n schoolsSearch,\r\n courseTracksSearch,\r\n coursesSearch,\r\n filterSettings,\r\n filterBreakpoints,\r\n openModalIntroductoryContent,\r\n course,\r\n comments,\r\n isCommentsModalOpen,\r\n commentModalTitle,\r\n coursesPage,\r\n goToSchoolDetails,\r\n goToCourseTrackDetails,\r\n showEntity,\r\n openIntroductoryContent,\r\n closeModalIntroductoryContent,\r\n loadCourseCommentsModal,\r\n closeCommentsModal,\r\n toLocaleDateTime,\r\n updateQuery\r\n };\r\n }\r\n});\r\n","import { render } from \"./SearchView.vue?vue&type=template&id=0bda3c4e&scoped=true&ts=true\"\nimport script from \"./SearchView.vue?vue&type=script&lang=ts\"\nexport * from \"./SearchView.vue?vue&type=script&lang=ts\"\n\nimport \"./SearchView.vue?vue&type=style&index=0&id=0bda3c4e&lang=css\"\nimport \"./SearchView.vue?vue&type=style&index=1&id=0bda3c4e&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\Users\\\\guilherme.brisida\\\\AppData\\\\Local\\\\Temp\\\\decolabuild\\\\purple__bee\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-0bda3c4e\"]])\n\nexport default __exports__","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./SearchView.vue?vue&type=style&index=1&id=0bda3c4e&scoped=true&lang=css\""],"sourceRoot":""}