You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1 lines
25 KiB

{"version":3,"sources":["webpack://plugin-webrtc/webpack/universalModuleDefinition","webpack://plugin-webrtc/webpack/bootstrap","webpack://plugin-webrtc/./node_modules/@soda/get-current-script/index.js","webpack://plugin-webrtc/./src/App.vue?df96","webpack://plugin-webrtc/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://plugin-webrtc/./src/App.vue?f5f0","webpack://plugin-webrtc/src/App.vue","webpack://plugin-webrtc/./src/App.vue?8b47","webpack://plugin-webrtc/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://plugin-webrtc/./src/App.vue","webpack://plugin-webrtc/./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","getCurrentScript","document","currentScript","Error","err","pageSource","inlineScriptSourceRegExp","inlineScriptSource","ieStackRegExp","ffStackRegExp","stackDetails","exec","stack","scriptLocation","line","currentLocation","location","href","replace","hash","scripts","getElementsByTagName","documentElement","outerHTML","RegExp","trim","length","readyState","src","innerHTML","window","match","render","_vm","_h","$createElement","_c","_self","$parent","titleTabActive","_v","_s","localSDP","remoteSDP","attrs","model","callback","$$v","streamPath","expression","ask","staticClass","iceConnectionState","on","$event","startSession","stopSession","_e","ref","domProps","stream","staticRenderFns","config","iceServers","pc","RTCPeerConnection","localDescription","sdp","remoteDescription","type","methods","ajax","processData","data","JSON","stringify","url","dataType","then","result","errmsg","$toast","error","titleTabs","setRemoteDescription","RTCSessionDescription","close","connectICE","catch","message","addStream","setLocalDescription","createOffer","oniceconnectionstatechange","e","info","onicecandidate","event","candidate","ontrack","streams","tabs","push","navigator","mediaDevices","getUserMedia","video","audio","normalizeComponent","scriptExports","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","options","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","concat","component"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,IACQ,oBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,kBAAZC,QACdA,QAAQ,iBAAmBD,IAE3BD,EAAK,iBAAmBC,KAR1B,CASoB,qBAATK,KAAuBA,KAAOC,MAAO,WAChD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUR,QAGnC,IAAIC,EAASK,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQH,GAAUI,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASO,GAG/DN,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAO,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASf,EAASgB,EAAMC,GAC3CV,EAAoBW,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAASvB,GACX,qBAAXwB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAepB,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAepB,EAAS,aAAc,CAAE0B,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAA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AAQE,YAAa,GAInBN,IACFI,EAAQG,SAAW,UAAYP,GAI7BC,GACFE,EAAO,SAAUK,GAEfA,EACEA,GACC5J,KAAK6J,QAAU7J,KAAK6J,OAAOC,YAC3B9J,KAAK+J,QAAU/J,KAAK+J,OAAOF,QAAU7J,KAAK+J,OAAOF,OAAOC,WAEtDF,GAA0C,qBAAxBI,sBACrBJ,EAAUI,qBAGRb,GACFA,EAAa5I,KAAKP,KAAM4J,GAGtBA,GAAWA,EAAQK,uBACrBL,EAAQK,sBAAsBC,IAAIb,IAKtCG,EAAQW,aAAeZ,GACdJ,IACTI,EAAOD,EACH,WACAH,EAAa5I,KACXP,MACCwJ,EAAQE,WAAa1J,KAAK+J,OAAS/J,MAAMoK,MAAMC,SAASC,aAG3DnB,GAGFI,EACF,GAAIC,EAAQE,WAAY,CAGtBF,EAAQe,cAAgBhB,EAExB,IAAIiB,EAAiBhB,EAAQpF,OAC7BoF,EAAQpF,OAAS,SAAmCqG,EAAGb,GAErD,OADAL,EAAKhJ,KAAKqJ,GACHY,EAAeC,EAAGb,QAEtB,CAEL,IAAIc,EAAWlB,EAAQmB,aACvBnB,EAAQmB,aAAeD,EACnB,GAAGE,OAAOF,EAAUnB,GACpB,CAACA,GAIT,MAAO,CACL5J,QAASsJ,EACTO,QAASA,GCvFb,IAAIqB,EAAY,EACd,EACAzG,EACA6B,GACA,EACA,KACA,WACA,MAIa,EAAA4E,E,QCjBA,kB","file":"plugin-webrtc.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"plugin-webrtc\"] = factory();\n\telse\n\t\troot[\"plugin-webrtc\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fb15\");\n","// addapted from the document.currentScript polyfill by Adam Miller\n// MIT license\n// source: https://github.com/amiller-gh/currentScript-polyfill\n\n// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = factory();\n } else {\n root.getCurrentScript = factory();\n }\n}(typeof self !== 'undefined' ? self : this, function () {\n function getCurrentScript () {\n if (document.currentScript) {\n return document.currentScript\n }\n \n // IE 8-10 support script readyState\n // IE 11+ & Firefox support stack trace\n try {\n throw new Error();\n }\n catch (err) {\n // Find the second match for the \"at\" string to get file src url from stack.\n var ieStackRegExp = /.*at [^(]*\\((.*):(.+):(.+)\\)$/ig,\n ffStackRegExp = /@([^@]*):(\\d+):(\\d+)\\s*$/ig,\n stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),\n scriptLocation = (stackDetails && stackDetails[1]) || false,\n line = (stackDetails && stackDetails[2]) || false,\n currentLocation = document.location.href.replace(document.location.hash, ''),\n pageSource,\n inlineScriptSourceRegExp,\n inlineScriptSource,\n scripts = document.getElementsByTagName('script'); // Live NodeList collection\n \n if (scriptLocation === currentLocation) {\n pageSource = document.documentElement.outerHTML;\n inlineScriptSourceRegExp = new RegExp('(?:[^\\\\n]+?\\\\n){0,' + (line - 2) + '}[^<]*<script>([\\\\d\\\\D]*?)<\\\\/script>[\\\\d\\\\D]*', 'i');\n inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();\n }\n \n for (var i = 0; i < scripts.length; i++) {\n // If ready state is interactive, return the script tag\n if (scripts[i].readyState === 'interactive') {\n return scripts[i];\n }\n \n // If src matches, return the script tag\n if (scripts[i].src === scriptLocation) {\n return scripts[i];\n }\n \n // If inline source matches, return the script tag\n if (\n scriptLocation === currentLocation &&\n scripts[i].innerHTML &&\n scripts[i].innerHTML.trim() === inlineScriptSource\n ) {\n return scripts[i];\n }\n }\n \n // If no match, return null\n return null;\n }\n };\n\n return getCurrentScript\n}));\n","import mod from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&id=3d66f6b2&scoped=true&lang=css&\"; export default mod; export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&id=3d66f6b2&scoped=true&lang=css&\"","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.$parent.titleTabActive == 1)?_c('pre',[_vm._v(_vm._s(_vm.localSDP))]):(_vm.$parent.titleTabActive == 2)?_c('pre',[_vm._v(_vm._s(_vm.remoteSDP))]):_c('div',[_c('mu-text-field',{attrs:{\"label\":\"streamPath\"},model:{value:(_vm.streamPath),callback:function ($$v) {_vm.streamPath=$$v},expression:\"streamPath\"}}),(!_vm.localSDP || _vm.ask)?_c('span',{staticClass:\"blink\"},[_vm._v(\"Connecting\")]):(_vm.iceConnectionState!='connected')?[_c('m-button',{on:{\"click\":function($event){return _vm.startSession('publish')}}},[_vm._v(\"Publish\")]),_c('m-button',{on:{\"click\":function($event){return _vm.startSession('play')}}},[_vm._v(\"Play\")])]:(_vm.iceConnectionState=='connected')?_c('m-button',{on:{\"click\":_vm.stopSession}},[_vm._v(\"Stop\")]):_vm._e(),_c('br'),_c('video',{ref:\"video1\",attrs:{\"width\":\"640\",\"height\":\"480\",\"autoplay\":\"\",\"muted\":\"\"},domProps:{\"srcObject\":_vm.stream,\"muted\":true}})],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div>\r\n <pre v-if=\"$parent.titleTabActive == 1\">{{localSDP}}</pre>\r\n <pre v-else-if=\"$parent.titleTabActive == 2\">{{remoteSDP}}</pre>\r\n <div v-else>\r\n <mu-text-field v-model=\"streamPath\" label=\"streamPath\"></mu-text-field>\r\n <span class=\"blink\" v-if=\"!localSDP || ask\">Connecting</span>\r\n <template v-else-if=\"iceConnectionState!='connected'\">\r\n <m-button @click=\"startSession('publish')\">Publish</m-button>\r\n <m-button @click=\"startSession('play')\">Play</m-button>\r\n </template>\r\n <m-button @click=\"stopSession\" v-else-if=\"iceConnectionState=='connected'\">Stop</m-button>\r\n <br />\r\n <video ref=\"video1\" :srcObject.prop=\"stream\" width=\"640\" height=\"480\" autoplay muted></video>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nconst config = {\r\n iceServers:[\r\n // {\r\n // urls:[\r\n // \"stun:stun.ekiga.net\",\r\n // \"stun:stun.ideasip.com\",\r\n // \"stun:stun.schlund.de\",\r\n // \"stun:stun.stunprotocol.org:3478\",\r\n // \"stun:stun.voiparound.com\",\r\n // \"stun:stun.voipbuster.com\",\r\n // \"stun:stun.voipstunt.com\",\r\n // \"stun:stun.voxgratia.org\",\r\n // \"stun:stun.services.mozilla.com\",\r\n // \"stun:stun.xten.com\",\r\n // \"stun:stun.softjoys.com\",\r\n // \"stun:stunserver.org\",\r\n // \"stun:stun.schlund.de\",\r\n // \"stun:stun.rixtelecom.se\",\r\n // \"stun:stun.iptel.org\",\r\n // \"stun:stun.ideasip.com\",\r\n // \"stun:stun.fwdnet.net\",\r\n // \"stun:stun.ekiga.net\",\r\n // \"stun:stun01.sipphone.com\",\r\n // ]\r\n // }\r\n ]\r\n}\r\nlet pc = new RTCPeerConnection(config);\r\nvar stream = null\r\nvar streamPath = \"live/rtc\"\r\nexport default {\r\n data() {\r\n return {\r\n localSDP: pc&&pc.localDescription&&pc.localDescription.sdp,\r\n remoteSDP: pc&&pc.remoteDescription&&pc.remoteDescription.sdp,\r\n streamPath,\r\n iceConnectionState:pc&&pc.iceConnectionState,\r\n stream,\r\n type:\"\",\r\n ask:false\r\n };\r\n },\r\n methods: {\r\n startSession(type) {\r\n this.type = type\r\n this.ask = true\r\n this.ajax({type: 'POST',processData:false,data: JSON.stringify(pc.localDescription),url:\"/webrtc/\"+type+\"?streamPath=\"+this.streamPath,dataType:\"json\"}).then(result => {\r\n this.ask = false\r\n if (result.errmsg){\r\n this.$toast.error(result.errmsg)\r\n }else{\r\n streamPath = this.streamPath\r\n this.remoteSDP = result.sdp;\r\n this.$parent.titleTabs = [\"摄像头\", \"localSDP\",\"remoteSDP\"];\r\n pc.setRemoteDescription(new RTCSessionDescription(result));\r\n }\r\n });\r\n },\r\n stopSession(){\r\n pc.close()\r\n pc = new RTCPeerConnection(config)\r\n this.remoteSDP = \"\"\r\n this.localSDP = \"\"\r\n this.connectICE().catch(err=> this.$toast.error(err.message))\r\n },\r\n async connectICE(){\r\n pc.addStream(stream);\r\n await pc.setLocalDescription(await pc.createOffer())\r\n pc.oniceconnectionstatechange = e => {\r\n this.$toast.info(pc.iceConnectionState)\r\n this.iceConnectionState = pc.iceConnectionState\r\n };\r\n pc.onicecandidate = event => {\r\n if (event.candidate === null) {\r\n this.localSDP = pc.localDescription.sdp;\r\n this.$parent.titleTabs = [\"摄像头\", \"localSDP\"];\r\n }\r\n };\r\n pc.ontrack = event=>{\r\n if(this.type==\"play\" && event.streams[0]){\r\n this.stream = stream = event.streams[0]\r\n }\r\n }\r\n }\r\n },\r\n async mounted() {\r\n if (this.localSDP){\r\n let tabs = [\"摄像头\"]\r\n if(this.localSDP)tabs.push(\"localSDP\")\r\n if(this.remoteSDP)tabs.push(\"remoteSDP\")\r\n this.$parent.titleTabs = tabs;\r\n } else {\r\n try{\r\n if(!this.stream)\r\n this.stream = stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: true })\r\n await this.connectICE()\r\n }catch(err){\r\n this.$toast.error(err.message)\r\n }\r\n }\r\n }\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n @keyframes blink {\r\n 0% {\r\n opacity: 0.2;\r\n }\r\n 50% {\r\n opacity: 1;\r\n }\r\n 100% {\r\n opacity: 0.2;\r\n }\r\n }\r\n .blink {\r\n animation: blink 1s infinite;\r\n }\r\n\r\n</style>","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=3d66f6b2&scoped=true&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&id=3d66f6b2&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3d66f6b2\",\n null\n \n)\n\nexport default component.exports","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"sourceRoot":""}